@inera/ids-react 9.1.2 → 9.2.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-base.d.ts +4 -1
- package/components/accordion/accordion-base.js +33 -7
- package/components/accordion/accordion.d.ts +4 -1
- package/components/accordion/accordion.js +14 -11
- package/components/alert/alert-base.d.ts +3 -0
- package/components/alert/alert-base.js +4 -3
- package/components/alert/alert.d.ts +6 -1
- package/components/alert/alert.js +12 -9
- package/components/badge/badge.d.ts +1 -1
- package/components/badge/badge.js +6 -3
- package/components/breadcrumbs/breadcrumbs.d.ts +3 -0
- package/components/breadcrumbs/breadcrumbs.js +25 -4
- package/components/button/button-group.d.ts +3 -0
- package/components/button/button-group.js +1 -0
- package/components/button/button.js +22 -14
- package/components/card/card.d.ts +3 -0
- package/components/card/card.js +2 -1
- package/components/carousel/carousel-item.d.ts +3 -0
- package/components/carousel/carousel-item.js +1 -0
- package/components/date-label/date-label.d.ts +3 -0
- package/components/date-label/date-label.js +1 -0
- package/components/dialog/dialog-base.d.ts +0 -1
- package/components/dialog/dialog-base.js +3 -3
- package/components/dialog/dialog.d.ts +3 -0
- package/components/dialog/dialog.js +19 -19
- package/components/dropdown/dropdown-base.js +6 -3
- package/components/dropdown/dropdown-content-button.js +1 -1
- package/components/dropdown/dropdown-content-link.d.ts +3 -0
- package/components/dropdown/dropdown-content-link.js +1 -1
- package/components/dropdown/dropdown.d.ts +3 -0
- package/components/dropdown/dropdown.js +28 -31
- package/components/footer-1177/footer-1177.d.ts +3 -0
- package/components/footer-1177/footer-1177.js +1 -0
- package/components/footer-1177-admin/footer-1177-admin.d.ts +3 -0
- package/components/footer-1177-admin/footer-1177-admin.js +1 -0
- package/components/footer-1177-pro/footer-1177-pro.d.ts +3 -0
- package/components/footer-1177-pro/footer-1177-pro.js +1 -0
- package/components/footer-inera/footer-inera.d.ts +3 -0
- package/components/footer-inera/footer-inera.js +1 -0
- package/components/footer-inera-admin/footer-inera-admin.d.ts +3 -0
- package/components/footer-inera-admin/footer-inera-admin.js +2 -1
- package/components/footer-inera-general/footer-inera-general.d.ts +21 -0
- package/components/footer-inera-general/footer-inera-general.js +28 -0
- package/components/form/check-button/check-button.js +1 -0
- package/components/form/checkbox/checkbox-base.d.ts +7 -13
- package/components/form/checkbox/checkbox-base.js +10 -10
- package/components/form/checkbox/checkbox-group-base.d.ts +3 -0
- package/components/form/checkbox/checkbox-group-base.js +3 -2
- package/components/form/checkbox/checkbox-group.d.ts +3 -0
- package/components/form/checkbox/checkbox-group.js +1 -0
- package/components/form/checkbox/checkbox.d.ts +5 -15
- package/components/form/checkbox/checkbox.js +10 -2
- package/components/form/datepicker/datepicker.d.ts +7 -11
- package/components/form/datepicker/datepicker.js +17 -16
- package/components/form/error-message/error-message.d.ts +3 -0
- package/components/form/error-message/error-message.js +1 -0
- package/components/form/form-props/form-props.d.ts +18 -0
- package/components/form/input/input-base.d.ts +7 -16
- package/components/form/input/input-base.js +15 -16
- package/components/form/input/input.d.ts +3 -16
- package/components/form/input/input.js +3 -4
- package/components/form/radio/radio-base.d.ts +8 -13
- package/components/form/radio/radio-base.js +8 -10
- package/components/form/radio/radio-group-base.d.ts +3 -0
- package/components/form/radio/radio-group-base.js +1 -0
- package/components/form/radio/radio-group.d.ts +3 -0
- package/components/form/radio/radio-group.js +2 -2
- package/components/form/radio/radio.d.ts +2 -14
- package/components/form/radio/radio.js +11 -5
- package/components/form/radio-button/radio-button-group-base.d.ts +3 -0
- package/components/form/radio-button/radio-button-group-base.js +1 -0
- package/components/form/radio-button/radio-button-group.d.ts +3 -0
- package/components/form/radio-button/radio-button-group.js +4 -1
- package/components/form/radio-button/radio-button.js +1 -0
- package/components/form/range/range-base.d.ts +6 -8
- package/components/form/range/range-base.js +3 -2
- package/components/form/range/range.d.ts +2 -7
- package/components/form/range/range.js +13 -6
- package/components/form/select/select-base.d.ts +7 -15
- package/components/form/select/select-base.js +8 -8
- package/components/form/select/select.d.ts +2 -14
- package/components/form/select/select.js +12 -5
- package/components/form/select-multiple/select-multiple-base.d.ts +7 -14
- package/components/form/select-multiple/select-multiple-base.js +7 -5
- package/components/form/select-multiple/select-multiple.d.ts +4 -15
- package/components/form/select-multiple/select-multiple.js +3 -5
- package/components/form/spinner/spinner.d.ts +3 -0
- package/components/form/spinner/spinner.js +1 -0
- package/components/form/textarea/textarea-base.d.ts +7 -15
- package/components/form/textarea/textarea-base.js +7 -10
- package/components/form/textarea/textarea.d.ts +4 -14
- package/components/form/textarea/textarea.js +13 -6
- package/components/form/time/time-base.d.ts +6 -12
- package/components/form/time/time-base.js +7 -7
- package/components/form/time/time.d.ts +2 -14
- package/components/form/time/time.js +13 -6
- package/components/global-alert/global-alert-base.d.ts +3 -0
- package/components/global-alert/global-alert-base.js +3 -2
- package/components/global-alert/global-alert.d.ts +6 -1
- package/components/global-alert/global-alert.js +12 -9
- package/components/header-1177/header-1177-avatar-base.d.ts +3 -0
- package/components/header-1177/header-1177-avatar-base.js +1 -0
- package/components/header-1177/header-1177-avatar.d.ts +3 -0
- package/components/header-1177/header-1177-avatar.js +7 -15
- package/components/header-1177/header-1177-base.d.ts +3 -0
- package/components/header-1177/header-1177-base.js +1 -0
- package/components/header-1177/header-1177-item-base.d.ts +3 -0
- package/components/header-1177/header-1177-item-base.js +1 -0
- package/components/header-1177/header-1177-item.d.ts +3 -0
- package/components/header-1177/header-1177-item.js +1 -0
- package/components/header-1177/header-1177-menu-mobile-base.d.ts +3 -0
- package/components/header-1177/header-1177-menu-mobile-base.js +1 -0
- package/components/header-1177/header-1177-menu-mobile.d.ts +3 -0
- package/components/header-1177/header-1177-menu-mobile.js +7 -24
- package/components/header-1177/header-1177-nav-base.d.ts +3 -0
- package/components/header-1177/header-1177-nav-base.js +1 -0
- package/components/header-1177/header-1177-nav-item-base.d.ts +3 -0
- package/components/header-1177/header-1177-nav-item-base.js +1 -0
- package/components/header-1177/header-1177-nav-item-mobile-base.d.ts +3 -0
- package/components/header-1177/header-1177-nav-item-mobile-base.js +1 -0
- package/components/header-1177/header-1177-nav-item-mobile.d.ts +3 -0
- package/components/header-1177/header-1177-nav-item-mobile.js +1 -0
- package/components/header-1177/header-1177-nav-item.d.ts +3 -0
- package/components/header-1177/header-1177-nav-item.js +6 -29
- package/components/header-1177/header-1177-nav.d.ts +3 -0
- package/components/header-1177/header-1177-nav.js +2 -1
- package/components/header-1177/header-1177-region-picker-base.d.ts +3 -0
- package/components/header-1177/header-1177-region-picker-base.js +1 -0
- package/components/header-1177/header-1177-region-picker-mobile-base.d.ts +3 -0
- package/components/header-1177/header-1177-region-picker-mobile-base.js +1 -0
- package/components/header-1177/header-1177-region-picker-mobile.d.ts +3 -0
- package/components/header-1177/header-1177-region-picker-mobile.js +1 -0
- package/components/header-1177/header-1177-region-picker.d.ts +3 -0
- package/components/header-1177/header-1177-region-picker.js +1 -0
- package/components/header-1177/header-1177.d.ts +3 -0
- package/components/header-1177/header-1177.js +1 -0
- package/components/header-1177-admin/header-1177-admin-avatar-base.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-avatar-base.js +2 -1
- package/components/header-1177-admin/header-1177-admin-avatar-mobile-base.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-avatar-mobile-base.js +2 -1
- 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 +7 -7
- package/components/header-1177-admin/header-1177-admin-avatar.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-avatar.js +7 -25
- package/components/header-1177-admin/header-1177-admin-base.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-base.js +1 -0
- package/components/header-1177-admin/header-1177-admin-item-base.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-item-base.js +1 -0
- package/components/header-1177-admin/header-1177-admin-item.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-item.js +1 -0
- package/components/header-1177-admin/header-1177-admin-menu-mobile-base.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-menu-mobile-base.js +1 -0
- package/components/header-1177-admin/header-1177-admin-menu-mobile.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-menu-mobile.js +7 -26
- package/components/header-1177-admin/header-1177-admin-nav-base.d.ts +6 -1
- package/components/header-1177-admin/header-1177-admin-nav-base.js +5 -3
- package/components/header-1177-admin/header-1177-admin-nav-item-base.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-base.js +1 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-mobile-base.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-mobile-base.js +1 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-mobile.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-mobile.js +1 -0
- package/components/header-1177-admin/header-1177-admin-nav-item.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-nav-item.js +6 -29
- package/components/header-1177-admin/header-1177-admin-nav.d.ts +6 -1
- package/components/header-1177-admin/header-1177-admin-nav.js +3 -2
- package/components/header-1177-admin/header-1177-admin.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin.js +1 -0
- package/components/header-1177-pro/header-1177-pro-avatar-base.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-avatar-base.js +1 -0
- package/components/header-1177-pro/header-1177-pro-avatar-mobile-base.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-avatar-mobile-base.js +1 -0
- 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 +6 -5
- package/components/header-1177-pro/header-1177-pro-avatar.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-avatar.js +7 -26
- package/components/header-1177-pro/header-1177-pro-base.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-base.js +1 -0
- package/components/header-1177-pro/header-1177-pro-item-base.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-item-base.js +1 -0
- package/components/header-1177-pro/header-1177-pro-item.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-item.js +1 -0
- package/components/header-1177-pro/header-1177-pro-menu-mobile-base.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-menu-mobile-base.js +1 -0
- package/components/header-1177-pro/header-1177-pro-menu-mobile.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-menu-mobile.js +7 -26
- package/components/header-1177-pro/header-1177-pro-nav-base.d.ts +6 -1
- package/components/header-1177-pro/header-1177-pro-nav-base.js +5 -3
- package/components/header-1177-pro/header-1177-pro-nav-item-base.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-base.js +1 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-mobile-base.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-mobile-base.js +1 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-mobile.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-mobile.js +1 -0
- package/components/header-1177-pro/header-1177-pro-nav-item.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-nav-item.js +6 -29
- package/components/header-1177-pro/header-1177-pro-nav.d.ts +6 -1
- package/components/header-1177-pro/header-1177-pro-nav.js +3 -2
- package/components/header-1177-pro/header-1177-pro-region-picker-base.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-region-picker-base.js +2 -1
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile-base.d.ts +5 -1
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile-base.js +4 -2
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile.js +2 -1
- package/components/header-1177-pro/header-1177-pro-region-picker.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-region-picker.js +1 -0
- package/components/header-1177-pro/header-1177-pro.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro.js +1 -0
- package/components/header-inera/header-inera-base.d.ts +3 -0
- package/components/header-inera/header-inera-base.js +1 -0
- package/components/header-inera/header-inera-item-base.d.ts +3 -0
- package/components/header-inera/header-inera-item-base.js +1 -0
- package/components/header-inera/header-inera-item.d.ts +3 -0
- package/components/header-inera/header-inera-item.js +1 -0
- package/components/header-inera/header-inera-menu-mobile-base.d.ts +3 -0
- package/components/header-inera/header-inera-menu-mobile-base.js +1 -0
- package/components/header-inera/header-inera-menu-mobile.d.ts +3 -0
- package/components/header-inera/header-inera-menu-mobile.js +7 -26
- package/components/header-inera/header-inera-nav-base.d.ts +3 -0
- package/components/header-inera/header-inera-nav-base.js +1 -0
- package/components/header-inera/header-inera-nav-item-base.d.ts +3 -0
- package/components/header-inera/header-inera-nav-item-base.js +1 -0
- package/components/header-inera/header-inera-nav-item.d.ts +3 -0
- package/components/header-inera/header-inera-nav-item.js +6 -29
- package/components/header-inera/header-inera-nav.d.ts +3 -0
- package/components/header-inera/header-inera-nav.js +1 -0
- package/components/header-inera/header-inera.d.ts +3 -0
- package/components/header-inera/header-inera.js +1 -0
- package/components/header-inera-admin/header-inera-admin-avatar-base.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-avatar-base.js +2 -1
- package/components/header-inera-admin/header-inera-admin-avatar-mobile-base.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-avatar-mobile-base.js +2 -1
- package/components/header-inera-admin/header-inera-admin-avatar-mobile.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-avatar-mobile.js +6 -5
- package/components/header-inera-admin/header-inera-admin-avatar.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-avatar.js +7 -25
- package/components/header-inera-admin/header-inera-admin-base.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-base.js +1 -0
- package/components/header-inera-admin/header-inera-admin-item-base.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-item-base.js +1 -0
- package/components/header-inera-admin/header-inera-admin-item.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-item.js +1 -0
- package/components/header-inera-admin/header-inera-admin-menu-mobile-base.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-menu-mobile-base.js +2 -1
- package/components/header-inera-admin/header-inera-admin-menu-mobile.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-menu-mobile.js +7 -26
- package/components/header-inera-admin/header-inera-admin-nav-base.d.ts +6 -1
- package/components/header-inera-admin/header-inera-admin-nav-base.js +5 -3
- package/components/header-inera-admin/header-inera-admin-nav-item-base.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-base.js +1 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-mobile-base.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-mobile-base.js +1 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-mobile.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-mobile.js +1 -0
- package/components/header-inera-admin/header-inera-admin-nav-item.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin-nav-item.js +6 -29
- package/components/header-inera-admin/header-inera-admin-nav.d.ts +6 -1
- package/components/header-inera-admin/header-inera-admin-nav.js +3 -2
- package/components/header-inera-admin/header-inera-admin.d.ts +3 -0
- package/components/header-inera-admin/header-inera-admin.js +1 -0
- package/components/header-inera-general/header-inera-general-base.d.ts +16 -0
- package/components/header-inera-general/header-inera-general-base.js +12 -0
- package/components/header-inera-general/header-inera-general-item-base.d.ts +11 -0
- package/components/header-inera-general/header-inera-general-item-base.js +13 -0
- package/components/header-inera-general/header-inera-general-item.d.ts +10 -0
- package/components/header-inera-general/header-inera-general-item.js +12 -0
- package/components/header-inera-general/header-inera-general-menu-mobile-base.d.ts +15 -0
- package/components/header-inera-general/header-inera-general-menu-mobile-base.js +19 -0
- package/components/header-inera-general/header-inera-general-menu-mobile.d.ts +13 -0
- package/components/header-inera-general/header-inera-general-menu-mobile.js +31 -0
- package/components/header-inera-general/header-inera-general-nav-base.d.ts +10 -0
- package/components/header-inera-general/header-inera-general-nav-base.js +11 -0
- package/components/header-inera-general/header-inera-general-nav-item-base.d.ts +21 -0
- package/components/header-inera-general/header-inera-general-nav-item-base.js +27 -0
- package/components/header-inera-general/header-inera-general-nav-item.d.ts +18 -0
- package/components/header-inera-general/header-inera-general-nav-item.js +27 -0
- package/components/header-inera-general/header-inera-general-nav.d.ts +8 -0
- package/components/header-inera-general/header-inera-general-nav.js +12 -0
- package/components/header-inera-general/header-inera-general.d.ts +15 -0
- package/components/header-inera-general/header-inera-general.js +11 -0
- package/components/header-patient/header-patient.d.ts +3 -0
- package/components/header-patient/header-patient.js +1 -0
- package/components/link/action-link.d.ts +3 -0
- package/components/link/action-link.js +2 -1
- package/components/link/box-link.d.ts +3 -0
- package/components/link/box-link.js +1 -0
- package/components/link/link.d.ts +3 -0
- package/components/link/link.js +1 -0
- package/components/list-pagination/list-pagination-links.d.ts +3 -0
- package/components/list-pagination/list-pagination-links.js +1 -0
- package/components/list-pagination/list-pagination.d.ts +3 -0
- package/components/list-pagination/list-pagination.js +4 -3
- package/components/mobile-menu/mobile-item-base.d.ts +3 -0
- package/components/mobile-menu/mobile-item-base.js +1 -0
- package/components/mobile-menu/mobile-item.d.ts +3 -0
- package/components/mobile-menu/mobile-item.js +1 -0
- package/components/mobile-menu/mobile-menu.d.ts +3 -0
- package/components/mobile-menu/mobile-menu.js +1 -0
- package/components/navigation-content/navigation-content.d.ts +3 -0
- package/components/navigation-content/navigation-content.js +1 -0
- package/components/navigation-local/navigation-local.d.ts +3 -0
- package/components/navigation-local/navigation-local.js +1 -0
- package/components/notification-badge/notification-badge.d.ts +2 -4
- package/components/notification-badge/notification-badge.js +6 -3
- package/components/popover/popover-base.d.ts +4 -1
- package/components/popover/popover-base.js +1 -0
- package/components/popover/popover-content.d.ts +7 -1
- package/components/popover/popover-content.js +6 -10
- package/components/popover/popover.d.ts +3 -0
- package/components/popover/popover.js +141 -52
- package/components/progressbar/progressbar.d.ts +4 -4
- package/components/progressbar/progressbar.js +5 -3
- package/components/puff-list/puff-list-item-date.d.ts +3 -0
- package/components/puff-list/puff-list-item-date.js +1 -0
- package/components/puff-list/puff-list-item-info.d.ts +3 -0
- package/components/puff-list/puff-list-item-info.js +1 -0
- package/components/puff-list/puff-list-item.d.ts +1 -1
- package/components/puff-list/puff-list-item.js +11 -13
- package/components/puff-list/puff-list.d.ts +4 -1
- package/components/puff-list/puff-list.js +2 -1
- package/components/region-icon/region-icon.d.ts +3 -0
- package/components/region-icon/region-icon.js +1 -0
- package/components/side-menu/side-menu.d.ts +3 -0
- package/components/side-menu/side-menu.js +1 -0
- package/components/side-panel/side-panel-base.d.ts +1 -0
- package/components/side-panel/side-panel-base.js +1 -1
- package/components/side-panel/side-panel-provider.d.ts +3 -0
- package/components/side-panel/side-panel-provider.js +1 -0
- package/components/side-panel/side-panel.d.ts +3 -0
- package/components/side-panel/side-panel.js +29 -7
- package/components/stepper/step-base.js +1 -1
- package/components/stepper/step.js +11 -4
- package/components/stepper/stepper.d.ts +3 -0
- package/components/stepper/stepper.js +1 -0
- package/components/tabs/tabs-base.d.ts +3 -0
- package/components/tabs/tabs-base.js +1 -0
- package/components/tabs/tabs.d.ts +3 -0
- package/components/tabs/tabs.js +1 -0
- package/components/tag/tag.d.ts +1 -1
- package/components/tag/tag.js +4 -3
- package/components/toolbar/toolbar.d.ts +5 -0
- package/components/toolbar/toolbar.js +11 -0
- package/components/tooltip/tooltip-base.d.ts +5 -1
- package/components/tooltip/tooltip-base.js +3 -2
- package/components/tooltip/tooltip.d.ts +3 -0
- package/components/tooltip/tooltip.js +26 -1
- package/components/utils/hooks/useClickOutside.d.ts +1 -9
- package/components/utils/hooks/useClickOutside.js +9 -16
- package/components/utils/hooks/useLinkClick.d.ts +2 -0
- package/components/utils/hooks/useLinkClick.js +22 -0
- package/index.d.ts +24 -0
- package/index.js +12 -0
- package/package.json +2 -2
|
@@ -4,21 +4,19 @@ import clsx from 'clsx';
|
|
|
4
4
|
import '@inera/ids-design/components/puff-list/puff-list.css';
|
|
5
5
|
|
|
6
6
|
function IDSPuffListItem({ header, itemLink, date, dateTo, noContent = false, lean = false, dateLabel, extra, className, children, ...props }) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
return (jsxs("div", { ...props, className: clsx("ids-puff-list-item", {
|
|
7
|
+
const Tag = lean ? "div" : "li";
|
|
8
|
+
const content = (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-wrapper", children: [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] })), jsx("div", { className: "ids-puff-list-item-header", children: header }), !noContent && jsx("div", { className: "ids-puff-list-item__body", children: children })] }), extra && jsx("div", { className: "ids-puff-list-item__extra-content", children: extra })] })] }));
|
|
9
|
+
const wrappedContent = itemLink && isValidElement(itemLink)
|
|
10
|
+
? cloneElement(itemLink, {
|
|
11
|
+
...itemLink.props,
|
|
12
|
+
className: clsx("ids-puff-list-item__item-link", itemLink.props.className),
|
|
13
|
+
children: content
|
|
14
|
+
})
|
|
15
|
+
: content;
|
|
16
|
+
return (jsx(Tag, { ...props, className: clsx("ids-puff-list-item", {
|
|
19
17
|
"ids-puff-list-item--interactive": !!itemLink,
|
|
20
18
|
"ids-puff-list-item--lean": !!lean
|
|
21
|
-
}, className), children:
|
|
19
|
+
}, className), children: wrappedContent }));
|
|
22
20
|
}
|
|
23
21
|
IDSPuffListItem.displayName = "IDSPuffListItem";
|
|
24
22
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import "@inera/ids-design/components/puff-list/puff-list.css";
|
|
3
|
-
interface IDSPuffListProps extends React.HTMLAttributes<
|
|
3
|
+
interface IDSPuffListProps extends React.HTMLAttributes<HTMLDListElement> {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export declare function IDSPuffList({ children, className, ...props }: IDSPuffListProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare namespace IDSPuffList {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
7
10
|
export {};
|
|
@@ -3,7 +3,8 @@ import clsx from 'clsx';
|
|
|
3
3
|
import '@inera/ids-design/components/puff-list/puff-list.css';
|
|
4
4
|
|
|
5
5
|
function IDSPuffList({ children, className, ...props }) {
|
|
6
|
-
return (jsx("
|
|
6
|
+
return (jsx("ul", { ...props, className: clsx("ids-puff-list", className), children: children }));
|
|
7
7
|
}
|
|
8
|
+
IDSPuffList.displayName = "IDSPuffList";
|
|
8
9
|
|
|
9
10
|
export { IDSPuffList };
|
|
@@ -9,4 +9,7 @@ export interface IDSRegionIconProps extends React.HTMLAttributes<HTMLSpanElement
|
|
|
9
9
|
inline?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare function IDSRegionIcon({ name, size, colorPreset, light, inline, className, ...props }: IDSRegionIconProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare namespace IDSRegionIcon {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
12
15
|
export {};
|
|
@@ -21,5 +21,6 @@ function IDSRegionIcon({ name, size = "m", colorPreset = 1, light = false, inlin
|
|
|
21
21
|
};
|
|
22
22
|
return (jsx("span", { ...props, 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() } }));
|
|
23
23
|
}
|
|
24
|
+
IDSRegionIcon.displayName = "IDSRegionIcon";
|
|
24
25
|
|
|
25
26
|
export { IDSRegionIcon };
|
|
@@ -11,3 +11,6 @@ export interface IDSSideMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
11
11
|
onToggleMenu?: (isExpanded: boolean) => void;
|
|
12
12
|
}
|
|
13
13
|
export declare function IDSSideMenu({ expanded, onToggleMenu, srToggleText, className, ...props }: IDSSideMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare namespace IDSSideMenu {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
@@ -24,5 +24,6 @@ function IDSSideMenu({ expanded = false, onToggleMenu, srToggleText = "Sektion",
|
|
|
24
24
|
};
|
|
25
25
|
return (jsx(IDSSideMenuBase, { ...props, client: true, className: className, srToggleText: srToggleText, isExpanded: isExpanded, onToggleMenu: handleToggleMenu, handleKeyDown: handleKeyDown }));
|
|
26
26
|
}
|
|
27
|
+
IDSSideMenu.displayName = "IDSSideMenu";
|
|
27
28
|
|
|
28
29
|
export { IDSSideMenu };
|
|
@@ -20,5 +20,6 @@ export interface IDSSidePanelBaseProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
20
20
|
srOpen?: string;
|
|
21
21
|
noScrollAreaFocus?: boolean;
|
|
22
22
|
hamburgerRef?: React.Ref<HTMLButtonElement>;
|
|
23
|
+
componentRef?: React.Ref<HTMLDivElement>;
|
|
23
24
|
}
|
|
24
25
|
export declare const IDSSidePanelBase: React.ForwardRefExoticComponent<IDSSidePanelBaseProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,7 +3,7 @@ import React, { forwardRef } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import '@inera/ids-design/components/side-panel/side-panel.css';
|
|
5
5
|
|
|
6
|
-
const IDSSidePanelBase = forwardRef(({ visible = false, left = false, elevated = false, menu = false, footer = false, noScrollAreaFocus = false, footerDarkmodeToggle, size = "m", srLabel = "Sidopanel", onTogglePanel, onClosePanel, srClose, srOpen, client, headline, footerLinks, footerText, hamburgerRef, className, children, ...props }, ref) => {
|
|
6
|
+
const IDSSidePanelBase = forwardRef(({ visible = false, left = false, elevated = false, menu = false, footer = false, noScrollAreaFocus = false, footerDarkmodeToggle, size = "m", srLabel = "Sidopanel", onTogglePanel, onClosePanel, srClose, srOpen, client, headline, footerLinks, footerText, hamburgerRef, componentRef, className, children, ...props }, ref) => {
|
|
7
7
|
const [ready, setReady] = React.useState(false);
|
|
8
8
|
React.useEffect(() => {
|
|
9
9
|
setReady(true);
|
|
@@ -5,3 +5,6 @@ export interface IDSSidePanelProviderProps extends React.HTMLAttributes<HTMLDivE
|
|
|
5
5
|
sidePanel: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare function IDSSidePanelProvider({ left, hideSidePanel, sidePanel, className, children, ...props }: IDSSidePanelProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace IDSSidePanelProvider {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -8,5 +8,6 @@ function IDSSidePanelProvider({ left, hideSidePanel, sidePanel, className, child
|
|
|
8
8
|
}
|
|
9
9
|
return (jsxs("div", { className: classNames, ...props, children: [children, " ", !hideSidePanel && sidePanel] }));
|
|
10
10
|
}
|
|
11
|
+
IDSSidePanelProvider.displayName = "IDSSidePanelProvider";
|
|
11
12
|
|
|
12
13
|
export { IDSSidePanelProvider };
|
|
@@ -20,3 +20,6 @@ export interface IDSSidePanelProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
20
20
|
noScrollAreaFocus?: boolean;
|
|
21
21
|
}
|
|
22
22
|
export declare function IDSSidePanel({ show, menu, noScrollAreaFocus, srLabel, onVisibilityChange, srClose, srOpen, onOpen, onClose, className, children, ...props }: IDSSidePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare namespace IDSSidePanel {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
@@ -5,12 +5,19 @@ import { IDSSidePanelBase } from './side-panel-base.js';
|
|
|
5
5
|
import { useEsc } from '../utils/hooks/useEsc.js';
|
|
6
6
|
|
|
7
7
|
function IDSSidePanel({ show, menu = false, noScrollAreaFocus = false, srLabel = "Sidopanel", onVisibilityChange, srClose = "Stäng", srOpen = "Öppna", onOpen, onClose, className, children, ...props }) {
|
|
8
|
-
const
|
|
8
|
+
const componentRef = useRef(null);
|
|
9
9
|
const hamburgerRef = useRef(null);
|
|
10
10
|
const isControlled = show !== undefined;
|
|
11
11
|
const [internalShow, setInternalShow] = useState(false);
|
|
12
12
|
const visible = isControlled ? show : internalShow;
|
|
13
|
-
|
|
13
|
+
const togglePanel = () => setVisible(!visible);
|
|
14
|
+
const closePanel = () => {
|
|
15
|
+
setVisible(false);
|
|
16
|
+
if (!isControlled) {
|
|
17
|
+
onClose?.();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
useEsc(closePanel, hamburgerRef, componentRef, internalShow);
|
|
14
21
|
const setVisible = (value) => {
|
|
15
22
|
if (!isControlled) {
|
|
16
23
|
setInternalShow(value);
|
|
@@ -21,7 +28,7 @@ function IDSSidePanel({ show, menu = false, noScrollAreaFocus = false, srLabel =
|
|
|
21
28
|
useEffect(() => {
|
|
22
29
|
if (visible) {
|
|
23
30
|
onOpen?.();
|
|
24
|
-
const heading =
|
|
31
|
+
const heading = componentRef.current?.querySelector("h1, h2, h3, h4, h5, h6");
|
|
25
32
|
if (heading) {
|
|
26
33
|
heading.setAttribute("tabindex", "-1");
|
|
27
34
|
setTimeout(() => {
|
|
@@ -39,7 +46,7 @@ function IDSSidePanel({ show, menu = false, noScrollAreaFocus = false, srLabel =
|
|
|
39
46
|
// Window resize ARIA attributes
|
|
40
47
|
useEffect(() => {
|
|
41
48
|
const handleResize = () => {
|
|
42
|
-
const panel =
|
|
49
|
+
const panel = componentRef.current;
|
|
43
50
|
if (!panel)
|
|
44
51
|
return;
|
|
45
52
|
if (window.innerWidth <= 1024) {
|
|
@@ -57,8 +64,6 @@ function IDSSidePanel({ show, menu = false, noScrollAreaFocus = false, srLabel =
|
|
|
57
64
|
window.addEventListener("resize", handleResize);
|
|
58
65
|
return () => window.removeEventListener("resize", handleResize);
|
|
59
66
|
}, [srLabel]);
|
|
60
|
-
const onClosePanel = () => setVisible(false);
|
|
61
|
-
const onTogglePanel = () => setVisible(!visible);
|
|
62
67
|
useEffect(() => {
|
|
63
68
|
const handleBodyScroll = () => {
|
|
64
69
|
if (visible && window.innerWidth <= 1024) {
|
|
@@ -75,7 +80,24 @@ function IDSSidePanel({ show, menu = false, noScrollAreaFocus = false, srLabel =
|
|
|
75
80
|
document.body.style.overflow = ""; // cleanup on unmount
|
|
76
81
|
};
|
|
77
82
|
}, [visible]);
|
|
78
|
-
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
const handleBodyScroll = () => {
|
|
85
|
+
if (visible && window.innerWidth <= 1024) {
|
|
86
|
+
document.body.style.overflow = "hidden";
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
document.body.style.overflow = "";
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
handleBodyScroll();
|
|
93
|
+
window.addEventListener("resize", handleBodyScroll);
|
|
94
|
+
return () => {
|
|
95
|
+
window.removeEventListener("resize", handleBodyScroll);
|
|
96
|
+
document.body.style.overflow = ""; // cleanup on unmount
|
|
97
|
+
};
|
|
98
|
+
}, [visible]);
|
|
99
|
+
return (jsx(IDSSidePanelBase, { ...props, ref: componentRef, client: true, menu: menu, className: className, srClose: srClose, srOpen: srOpen, noScrollAreaFocus: noScrollAreaFocus, visible: visible, onClosePanel: closePanel, onTogglePanel: togglePanel, hamburgerRef: hamburgerRef, children: children }));
|
|
79
100
|
}
|
|
101
|
+
IDSSidePanel.displayName = "IDSSidePanel";
|
|
80
102
|
|
|
81
103
|
export { IDSSidePanel };
|
|
@@ -25,7 +25,7 @@ const IDSStepBase = forwardRef(({ state = "", headline, label = "", stepNumber =
|
|
|
25
25
|
: {};
|
|
26
26
|
return (jsxs("div", { className: clsx("ids-step", className), ...props, children: [jsx("div", { ref: ref, role: "button", tabIndex: disabled ? -1 : 0, className: clsx("ids-step__button", {
|
|
27
27
|
"ids-step__button--disabled": disabled
|
|
28
|
-
}), "aria-expanded": expanded, ...toggleHandlers, 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: [headline && jsx("div", { className: "ids-step__headline", children: headline }), label && jsx("div", { className: "ids-
|
|
28
|
+
}), "aria-expanded": expanded, ...toggleHandlers, 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: [headline && jsx("div", { className: "ids-step__headline", children: headline }), label && jsx("div", { className: "ids-step__subtitle", children: label })] }), jsx("div", { className: clsx("ids-step__chevron", {
|
|
29
29
|
"ids-step__chevron--expanded": expanded
|
|
30
30
|
}) })] })] }) }), jsx("div", { className: clsx("ids-step__content", {
|
|
31
31
|
"ids-step__content--expanded": expanded
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import React, { forwardRef, useState, useEffect
|
|
3
|
+
import React, { forwardRef, useState, useEffect } from 'react';
|
|
4
4
|
import { IDSStepBase } from './step-base.js';
|
|
5
5
|
|
|
6
6
|
const IDSStep = forwardRef(({ state = "", headline, label, stepNumber = "", srIndicatorText = "", expanded = false, disabled = false, onToggleStep, onExpanded, onClosed, className, ...props }, ref) => {
|
|
7
7
|
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
8
|
-
const
|
|
8
|
+
const stepRef = React.useRef(null);
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
setIsExpanded(expanded);
|
|
11
11
|
}, [expanded]);
|
|
12
|
-
|
|
12
|
+
// Merge forwarded + local ref
|
|
13
|
+
const mergedRef = (node) => {
|
|
14
|
+
stepRef.current = node;
|
|
15
|
+
if (typeof ref === "function")
|
|
16
|
+
ref(node);
|
|
17
|
+
else if (ref)
|
|
18
|
+
ref.current = node;
|
|
19
|
+
};
|
|
13
20
|
const handleToggleStep = () => {
|
|
14
21
|
if (disabled)
|
|
15
22
|
return;
|
|
@@ -20,7 +27,7 @@ const IDSStep = forwardRef(({ state = "", headline, label, stepNumber = "", srIn
|
|
|
20
27
|
return next;
|
|
21
28
|
});
|
|
22
29
|
};
|
|
23
|
-
return (jsx(IDSStepBase, { client: true, ref:
|
|
30
|
+
return (jsx(IDSStepBase, { client: true, ref: mergedRef, state: state, headline: headline, label: label, stepNumber: stepNumber, srIndicatorText: srIndicatorText, expanded: isExpanded, disabled: disabled, onToggleStep: handleToggleStep, className: className, ...props }));
|
|
24
31
|
});
|
|
25
32
|
IDSStep.displayName = "IDSStep";
|
|
26
33
|
|
|
@@ -5,3 +5,6 @@ export interface IDSStepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
5
5
|
onToggleStep?: (step: string, expanded: boolean) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare function IDSStepper({ children, onToggleStep, className, ...props }: IDSStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace IDSStepper {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -12,4 +12,7 @@ interface IDSTabsBaseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
12
12
|
select?: ReactNode;
|
|
13
13
|
}
|
|
14
14
|
export declare function IDSTabsBase({ unresponsive, light, compact, breakpoint, selectLabel, tabs, className, children, select, ...props }: IDSTabsBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare namespace IDSTabsBase {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
15
18
|
export {};
|
|
@@ -11,5 +11,6 @@ function IDSTabsBase({ unresponsive = false, light = false, compact = false, bre
|
|
|
11
11
|
"ids-tabs--responsive-on-s": responsiveOnS
|
|
12
12
|
}, className), children: [jsx("div", { className: "ids-tabs__select", children: select }), jsx("div", { className: "ids-tabs__tabs", role: "tablist", children: tabs }), jsx("div", { className: "ids-tabs__panels", children: children })] }));
|
|
13
13
|
}
|
|
14
|
+
IDSTabsBase.displayName = "IDSTabsBase";
|
|
14
15
|
|
|
15
16
|
export { IDSTabsBase };
|
|
@@ -10,3 +10,6 @@ export interface IDSTabsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
selectLabel?: string;
|
|
11
11
|
}
|
|
12
12
|
export declare function IDSTabs({ tabs, selectLabel, light, compact, breakpoint, children, className, onTabChange, ...props }: IDSTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare namespace IDSTabs {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
package/components/tabs/tabs.js
CHANGED
|
@@ -82,5 +82,6 @@ function IDSTabs({ tabs = [], selectLabel, light, compact, breakpoint, children,
|
|
|
82
82
|
});
|
|
83
83
|
return (jsx(IDSTabsBase, { ...props, tabs: enhancedTabs, breakpoint: breakpoint, className: className, select: jsx(IDSSelect, { label: selectLabel, onChange: tabChangedFromSelect, value: activeTab, light: light, children: renderTabOptions() }), children: enhancedTabPanels }));
|
|
84
84
|
}
|
|
85
|
+
IDSTabs.displayName = "IDSTabs";
|
|
85
86
|
|
|
86
87
|
export { IDSTabs };
|
package/components/tag/tag.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export interface IDSTagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
4
4
|
closeButton?: ReactNode;
|
|
5
5
|
clickable?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare const IDSTag: React.
|
|
7
|
+
export declare const IDSTag: React.NamedExoticComponent<IDSTagProps & React.RefAttributes<HTMLSpanElement>>;
|
package/components/tag/tag.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
2
|
+
import { forwardRef, memo } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import '@inera/ids-design/components/tag/tag.css';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const IDSTagMemo = forwardRef(({ clickable, closeButton, className, children, ...props }, ref) => {
|
|
7
7
|
return (jsx("span", { ref: ref, ...props, className: clsx("ids-tag", { "ids-tag--clickable": clickable }, className), children: jsxs("div", { className: "ids-tag__content", children: [children, !!closeButton && jsx("span", { className: "ids-tag__close-btn", children: closeButton })] }) }));
|
|
8
8
|
});
|
|
9
|
-
|
|
9
|
+
IDSTagMemo.displayName = "IDSTag";
|
|
10
|
+
const IDSTag = memo(IDSTagMemo);
|
|
10
11
|
|
|
11
12
|
export { IDSTag };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "@inera/ids-design/components/toolbar/toolbar.css";
|
|
3
|
+
export interface IDSToolbarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
}
|
|
5
|
+
export declare const IDSToolbar: React.ForwardRefExoticComponent<IDSToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import '@inera/ids-design/components/toolbar/toolbar.css';
|
|
5
|
+
|
|
6
|
+
const IDSToolbar = forwardRef(({ className, children, ...props }, ref) => {
|
|
7
|
+
return (jsx("div", { ref: ref, ...props, className: clsx("ids-toolbar", className), children: jsx("div", { className: "ids-toolbar__content", children: children }) }));
|
|
8
|
+
});
|
|
9
|
+
IDSToolbar.displayName = "IDSToolbar";
|
|
10
|
+
|
|
11
|
+
export { IDSToolbar };
|
|
@@ -10,5 +10,9 @@ export interface IDSTooltipBaseProps extends React.HTMLAttributes<HTMLSpanElemen
|
|
|
10
10
|
triggerIsIcon?: boolean;
|
|
11
11
|
triggerRef?: React.Ref<HTMLSpanElement>;
|
|
12
12
|
tooltipContentRef?: React.Ref<HTMLSpanElement>;
|
|
13
|
+
isHidden?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function IDSTooltipBase({ position, maxWidth, translateX, translateY, trigger, triggerIsIcon, triggerRef, tooltipContentRef, isHidden, className, children, ...props }: IDSTooltipBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare namespace IDSTooltipBase {
|
|
17
|
+
var displayName: string;
|
|
13
18
|
}
|
|
14
|
-
export declare function IDSTooltipBase({ position, maxWidth, translateX, translateY, trigger, triggerIsIcon, triggerRef, tooltipContentRef, className, children, ...props }: IDSTooltipBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { useId } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import '@inera/ids-design/components/tooltip/tooltip.css';
|
|
5
5
|
|
|
6
|
-
function IDSTooltipBase({ position = "top", maxWidth = "20rem", translateX = position === "top" || position === "bottom" ? "-50%" : "0", translateY = position.includes("top") ? "-100%" : "100%", trigger, triggerIsIcon, triggerRef, tooltipContentRef, className, children, ...props }) {
|
|
6
|
+
function IDSTooltipBase({ position = "top", maxWidth = "20rem", translateX = position === "top" || position === "bottom" ? "-50%" : "0", translateY = position.includes("top") ? "-100%" : "100%", trigger, triggerIsIcon, triggerRef, tooltipContentRef, isHidden, className, children, ...props }) {
|
|
7
7
|
const tooltipId = `tooltip-${useId()}`;
|
|
8
8
|
const ariaHandler = triggerIsIcon
|
|
9
9
|
? {
|
|
@@ -12,7 +12,8 @@ function IDSTooltipBase({ position = "top", maxWidth = "20rem", translateX = pos
|
|
|
12
12
|
: {
|
|
13
13
|
"aria-describedby": tooltipId
|
|
14
14
|
};
|
|
15
|
-
return (jsxs("span", { className: clsx("ids-tooltip", className), ...props, children: [jsx("span", { className: "ids-tooltip__trigger", ...ariaHandler, ref: triggerRef, children: trigger }), jsx("span", { className: clsx("ids-tooltip__content", `ids-tooltip__content--${position}`), ref: tooltipContentRef, role: "tooltip", id: tooltipId, style: { transform: `translate(${translateX}, ${translateY})`, maxWidth }, children: children })] }));
|
|
15
|
+
return (jsxs("span", { className: clsx("ids-tooltip", className), ...props, children: [jsx("span", { className: "ids-tooltip__trigger", ...ariaHandler, ref: triggerRef, children: trigger }), jsx("span", { className: clsx("ids-tooltip__content", `ids-tooltip__content--${position}`), ref: tooltipContentRef, role: "tooltip", hidden: isHidden, id: tooltipId, style: { transform: `translate(${translateX}, ${translateY})`, maxWidth }, children: children })] }));
|
|
16
16
|
}
|
|
17
|
+
IDSTooltipBase.displayName = "IDSTooltipBase";
|
|
17
18
|
|
|
18
19
|
export { IDSTooltipBase };
|
|
@@ -2,3 +2,6 @@ import { IDSTooltipBaseProps } from "./tooltip-base";
|
|
|
2
2
|
export interface IDSTooltipProps extends Omit<IDSTooltipBaseProps, "translateX" | "translateY"> {
|
|
3
3
|
}
|
|
4
4
|
export declare function IDSTooltip({ position, maxWidth, trigger, className, ...props }: IDSTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace IDSTooltip {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
@@ -6,6 +6,7 @@ import { IDSTooltipBase } from './tooltip-base.js';
|
|
|
6
6
|
function IDSTooltip({ position = "top", maxWidth, trigger, className, ...props }) {
|
|
7
7
|
const [internalMaxWidth, setInternalMaxWidth] = useState(maxWidth);
|
|
8
8
|
const [triggerIsIcon, setTriggerIsIcon] = useState(false);
|
|
9
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
9
10
|
const tooltipContentRef = useRef(null);
|
|
10
11
|
const triggerRef = useRef(null);
|
|
11
12
|
const hasUpdatedMaxWidthRef = useRef(false);
|
|
@@ -93,7 +94,31 @@ function IDSTooltip({ position = "top", maxWidth, trigger, className, ...props }
|
|
|
93
94
|
triggerWrapper.removeEventListener("focusin", handleXOverflow);
|
|
94
95
|
};
|
|
95
96
|
}, [triggerRef]);
|
|
96
|
-
|
|
97
|
+
const isTooltipVisible = () => {
|
|
98
|
+
const tooltip = tooltipContentRef.current;
|
|
99
|
+
if (!tooltip)
|
|
100
|
+
return false;
|
|
101
|
+
const style = getComputedStyle(tooltip);
|
|
102
|
+
return style.visibility !== "hidden" && style.display !== "none" && style.opacity !== "0";
|
|
103
|
+
};
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
const triggerEl = triggerRef.current;
|
|
106
|
+
if (!triggerEl)
|
|
107
|
+
return;
|
|
108
|
+
const updateVisibility = () => setIsVisible(isTooltipVisible());
|
|
109
|
+
triggerEl.addEventListener("mouseenter", updateVisibility);
|
|
110
|
+
triggerEl.addEventListener("mouseleave", updateVisibility);
|
|
111
|
+
triggerEl.addEventListener("focusin", updateVisibility); // <-- replaces focus
|
|
112
|
+
triggerEl.addEventListener("focusout", updateVisibility); // <-- replaces blur
|
|
113
|
+
return () => {
|
|
114
|
+
triggerEl.removeEventListener("mouseenter", updateVisibility);
|
|
115
|
+
triggerEl.removeEventListener("mouseleave", updateVisibility);
|
|
116
|
+
triggerEl.removeEventListener("focusin", updateVisibility);
|
|
117
|
+
triggerEl.removeEventListener("focusout", updateVisibility);
|
|
118
|
+
};
|
|
119
|
+
}, [triggerRef.current]);
|
|
120
|
+
return (jsx(IDSTooltipBase, { ...props, position: position, maxWidth: internalMaxWidth, trigger: trigger, triggerIsIcon: triggerIsIcon, className: className, triggerRef: triggerRef, isHidden: !isVisible, tooltipContentRef: tooltipContentRef }));
|
|
97
121
|
}
|
|
122
|
+
IDSTooltip.displayName = "IDSTooltip";
|
|
98
123
|
|
|
99
124
|
export { IDSTooltip };
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
|
-
|
|
3
|
-
* useClickOutside
|
|
4
|
-
* Calls handler when a click occurs outside the provided ref(s)
|
|
5
|
-
*
|
|
6
|
-
* @param refs - one or more refs to consider "inside"
|
|
7
|
-
* @param handler - callback when a click outside occurs
|
|
8
|
-
* @param enabled - optional, defaults to true; disable the listener when false
|
|
9
|
-
*/
|
|
10
|
-
export declare function useClickOutside(refs: RefObject<HTMLElement> | RefObject<HTMLElement>[], handler: (event: MouseEvent | TouchEvent) => void, enabled?: boolean): void;
|
|
2
|
+
export declare function useClickOutside(callback: (event: MouseEvent | TouchEvent) => void, refs: RefObject<HTMLElement> | RefObject<HTMLElement>[], focusRef?: RefObject<HTMLElement>, enabled?: boolean): void;
|
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
* useClickOutside
|
|
5
|
-
* Calls handler when a click occurs outside the provided ref(s)
|
|
6
|
-
*
|
|
7
|
-
* @param refs - one or more refs to consider "inside"
|
|
8
|
-
* @param handler - callback when a click outside occurs
|
|
9
|
-
* @param enabled - optional, defaults to true; disable the listener when false
|
|
10
|
-
*/
|
|
11
|
-
function useClickOutside(refs, handler, enabled = true) {
|
|
3
|
+
function useClickOutside(callback, refs, focusRef, enabled = true) {
|
|
12
4
|
useEffect(() => {
|
|
13
5
|
if (!enabled)
|
|
14
6
|
return;
|
|
15
7
|
const elements = Array.isArray(refs) ? refs.map(r => r.current) : [refs.current];
|
|
16
|
-
const
|
|
8
|
+
const handler = (event) => {
|
|
17
9
|
// If any element contains the click, do nothing
|
|
18
10
|
if (elements.some(el => el && el.contains(event.target)))
|
|
19
11
|
return;
|
|
20
|
-
|
|
12
|
+
callback(event);
|
|
13
|
+
focusRef?.current?.focus({ preventScroll: true });
|
|
21
14
|
};
|
|
22
|
-
document.addEventListener("mousedown",
|
|
23
|
-
document.addEventListener("touchstart",
|
|
15
|
+
document.addEventListener("mousedown", handler);
|
|
16
|
+
document.addEventListener("touchstart", handler);
|
|
24
17
|
return () => {
|
|
25
|
-
document.removeEventListener("mousedown",
|
|
26
|
-
document.removeEventListener("touchstart",
|
|
18
|
+
document.removeEventListener("mousedown", handler);
|
|
19
|
+
document.removeEventListener("touchstart", handler);
|
|
27
20
|
};
|
|
28
|
-
}, [refs,
|
|
21
|
+
}, [refs, callback, enabled]);
|
|
29
22
|
}
|
|
30
23
|
|
|
31
24
|
export { useClickOutside };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
function useLinkClick(callback, containerRef, focusRef, active = true) {
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
if (!active)
|
|
6
|
+
return;
|
|
7
|
+
const container = containerRef.current;
|
|
8
|
+
if (!container)
|
|
9
|
+
return;
|
|
10
|
+
const elements = container.querySelectorAll("a");
|
|
11
|
+
const handler = (event) => {
|
|
12
|
+
callback(event);
|
|
13
|
+
focusRef?.current?.focus();
|
|
14
|
+
};
|
|
15
|
+
elements.forEach(el => el.addEventListener("click", handler));
|
|
16
|
+
return () => {
|
|
17
|
+
elements.forEach(el => el.removeEventListener("click", handler));
|
|
18
|
+
};
|
|
19
|
+
}, [containerRef, callback, active]);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { useLinkClick };
|
package/index.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ export * from "./components/navigation-content/navigation-content";
|
|
|
83
83
|
export * from "./components/carousel/carousel";
|
|
84
84
|
export * from "./components/carousel/carousel-item";
|
|
85
85
|
export * from "./components/tag/tag";
|
|
86
|
+
export * from "./components/toolbar/toolbar";
|
|
86
87
|
export * from "./components/stepper/stepper";
|
|
87
88
|
export * from "./components/stepper/step";
|
|
88
89
|
export * from "./components/stepper/step-base";
|
|
@@ -155,6 +156,28 @@ export * from "./components/header-inera/header-inera-nav-item";
|
|
|
155
156
|
export * from "./components/header-inera/header-inera-nav-item-base";
|
|
156
157
|
export * from "./components/header-inera/header-inera-menu-mobile";
|
|
157
158
|
export * from "./components/header-inera/header-inera-menu-mobile-base";
|
|
159
|
+
export * from "./components/header-inera-general/header-inera-general";
|
|
160
|
+
export * from "./components/header-inera-general/header-inera-general-base";
|
|
161
|
+
export * from "./components/header-inera-general/header-inera-general-item";
|
|
162
|
+
export * from "./components/header-inera-general/header-inera-general-item-base";
|
|
163
|
+
export * from "./components/header-inera-general/header-inera-general-nav";
|
|
164
|
+
export * from "./components/header-inera-general/header-inera-general-nav-base";
|
|
165
|
+
export * from "./components/header-inera-general/header-inera-general-nav-item";
|
|
166
|
+
export * from "./components/header-inera-general/header-inera-general-nav-item-base";
|
|
167
|
+
export * from "./components/header-inera-general/header-inera-general-menu-mobile";
|
|
168
|
+
export * from "./components/header-inera-general/header-inera-general-menu-mobile-base";
|
|
169
|
+
export * from "./components/header-inera-admin/header-inera-admin";
|
|
170
|
+
export * from "./components/header-inera-admin/header-inera-admin-base";
|
|
171
|
+
export * from "./components/header-inera/header-inera";
|
|
172
|
+
export * from "./components/header-inera/header-inera-base";
|
|
173
|
+
export * from "./components/header-inera/header-inera-item";
|
|
174
|
+
export * from "./components/header-inera/header-inera-item-base";
|
|
175
|
+
export * from "./components/header-inera/header-inera-nav";
|
|
176
|
+
export * from "./components/header-inera/header-inera-nav-base";
|
|
177
|
+
export * from "./components/header-inera/header-inera-nav-item";
|
|
178
|
+
export * from "./components/header-inera/header-inera-nav-item-base";
|
|
179
|
+
export * from "./components/header-inera/header-inera-menu-mobile";
|
|
180
|
+
export * from "./components/header-inera/header-inera-menu-mobile-base";
|
|
158
181
|
export * from "./components/header-inera-admin/header-inera-admin";
|
|
159
182
|
export * from "./components/header-inera-admin/header-inera-admin-base";
|
|
160
183
|
export * from "./components/header-inera-admin/header-inera-admin-item";
|
|
@@ -176,4 +199,5 @@ export * from "./components/footer-1177/footer-1177";
|
|
|
176
199
|
export * from "./components/footer-1177-admin/footer-1177-admin";
|
|
177
200
|
export * from "./components/footer-1177-pro/footer-1177-pro";
|
|
178
201
|
export * from "./components/footer-inera/footer-inera";
|
|
202
|
+
export * from "./components/footer-inera-general/footer-inera-general";
|
|
179
203
|
export * from "./components/footer-inera-admin/footer-inera-admin";
|
package/index.js
CHANGED
|
@@ -83,6 +83,7 @@ export { IDSNavigationContent } from './components/navigation-content/navigation
|
|
|
83
83
|
export { IDSCarousel } from './components/carousel/carousel.js';
|
|
84
84
|
export { IDSCarouselItem } from './components/carousel/carousel-item.js';
|
|
85
85
|
export { IDSTag } from './components/tag/tag.js';
|
|
86
|
+
export { IDSToolbar } from './components/toolbar/toolbar.js';
|
|
86
87
|
export { IDSStepper } from './components/stepper/stepper.js';
|
|
87
88
|
export { IDSStep } from './components/stepper/step.js';
|
|
88
89
|
export { IDSStepBase } from './components/stepper/step-base.js';
|
|
@@ -155,6 +156,16 @@ export { IDSHeaderIneraNavItem } from './components/header-inera/header-inera-na
|
|
|
155
156
|
export { IDSHeaderIneraNavItemBase } from './components/header-inera/header-inera-nav-item-base.js';
|
|
156
157
|
export { IDSHeaderIneraMenuMobile } from './components/header-inera/header-inera-menu-mobile.js';
|
|
157
158
|
export { IDSHeaderIneraMenuMobileBase } from './components/header-inera/header-inera-menu-mobile-base.js';
|
|
159
|
+
export { IDSHeaderIneraGeneral } from './components/header-inera-general/header-inera-general.js';
|
|
160
|
+
export { IDSHeaderIneraGeneralBase } from './components/header-inera-general/header-inera-general-base.js';
|
|
161
|
+
export { IDSHeaderIneraGeneralItem } from './components/header-inera-general/header-inera-general-item.js';
|
|
162
|
+
export { IDSHeaderIneraGeneralItemBase } from './components/header-inera-general/header-inera-general-item-base.js';
|
|
163
|
+
export { IDSHeaderIneraGeneralNav } from './components/header-inera-general/header-inera-general-nav.js';
|
|
164
|
+
export { IDSHeaderIneraGeneralNavBase } from './components/header-inera-general/header-inera-general-nav-base.js';
|
|
165
|
+
export { IDSHeaderIneraGeneralNavItem } from './components/header-inera-general/header-inera-general-nav-item.js';
|
|
166
|
+
export { IDSHeaderIneraGeneralNavItemBase } from './components/header-inera-general/header-inera-general-nav-item-base.js';
|
|
167
|
+
export { IDSHeaderIneraGeneralMenuMobile } from './components/header-inera-general/header-inera-general-menu-mobile.js';
|
|
168
|
+
export { IDSHeaderIneraGeneralMenuMobileBase } from './components/header-inera-general/header-inera-general-menu-mobile-base.js';
|
|
158
169
|
export { IDSHeaderIneraAdmin } from './components/header-inera-admin/header-inera-admin.js';
|
|
159
170
|
export { IDSHeaderIneraAdminBase } from './components/header-inera-admin/header-inera-admin-base.js';
|
|
160
171
|
export { IDSHeaderIneraAdminItem } from './components/header-inera-admin/header-inera-admin-item.js';
|
|
@@ -176,4 +187,5 @@ export { IDSFooter1177 } from './components/footer-1177/footer-1177.js';
|
|
|
176
187
|
export { IDSFooter1177Admin } from './components/footer-1177-admin/footer-1177-admin.js';
|
|
177
188
|
export { IDSFooter1177Pro } from './components/footer-1177-pro/footer-1177-pro.js';
|
|
178
189
|
export { IDSFooterInera } from './components/footer-inera/footer-inera.js';
|
|
190
|
+
export { IDSFooterIneraGeneral } from './components/footer-inera-general/footer-inera-general.js';
|
|
179
191
|
export { IDSFooterIneraAdmin } from './components/footer-inera-admin/footer-inera-admin.js';
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inera/ids-react",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"react": "*",
|
|
7
7
|
"react-day-picker": "^9.11.3"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@inera/ids-design": "9.
|
|
10
|
+
"@inera/ids-design": "9.2.x",
|
|
11
11
|
"clsx": "*"
|
|
12
12
|
},
|
|
13
13
|
"types": "index.d.ts",
|