@inera/ids-react 8.2.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/accordion-base.d.ts +18 -0
- package/components/accordion/accordion-base.js +33 -0
- package/components/accordion/accordion.d.ts +5 -4
- package/components/accordion/accordion.js +16 -35
- package/components/alert/alert-base.d.ts +21 -0
- package/components/alert/alert-base.js +29 -0
- package/components/alert/alert.d.ts +3 -19
- package/components/alert/alert.js +8 -18
- package/components/alert/global-alert-base.d.ts +15 -0
- package/components/alert/global-alert-base.js +21 -0
- package/components/alert/global-alert.d.ts +7 -0
- package/components/alert/global-alert.js +19 -0
- package/components/badge/badge.js +2 -2
- package/components/breadcrumbs/breadcrumbs.js +2 -2
- package/components/{button-group → button}/button-group.js +2 -2
- package/components/button/button.js +3 -3
- package/components/card/card.js +3 -3
- package/components/carousel/carousel-item.d.ts +5 -4
- package/components/carousel/carousel-item.js +8 -6
- package/components/carousel/carousel.d.ts +4 -1
- package/components/carousel/carousel.js +24 -39
- package/components/{pagination/data-pagination → data-pagination}/data-pagination.d.ts +2 -6
- package/components/data-pagination/data-pagination.js +12 -0
- package/components/date-label/date-label.js +2 -2
- package/components/dialog/dialog-base.d.ts +21 -0
- package/components/dialog/dialog-base.js +29 -0
- package/components/dialog/dialog.d.ts +14 -17
- package/components/dialog/dialog.js +36 -36
- package/components/dropdown/dropdown-base.d.ts +18 -0
- package/components/dropdown/dropdown-base.js +42 -0
- package/components/dropdown/dropdown-content-button.d.ts +0 -1
- package/components/dropdown/dropdown-content-button.js +0 -1
- package/components/dropdown/dropdown-content-link.d.ts +2 -3
- package/components/dropdown/dropdown-content-link.js +3 -10
- package/components/dropdown/dropdown.d.ts +11 -13
- package/components/dropdown/dropdown.js +34 -53
- package/components/footer-1177/footer-1177.d.ts +6 -7
- package/components/footer-1177/footer-1177.js +8 -5
- package/components/footer-1177-admin/footer-1177-admin.d.ts +6 -7
- package/components/footer-1177-admin/footer-1177-admin.js +9 -6
- package/components/footer-1177-pro/footer-1177-pro.d.ts +6 -7
- package/components/footer-1177-pro/footer-1177-pro.js +9 -6
- package/components/footer-inera/footer-inera.d.ts +6 -7
- package/components/footer-inera/footer-inera.js +9 -6
- package/components/footer-inera-admin/footer-inera-admin.d.ts +6 -7
- package/components/footer-inera-admin/footer-inera-admin.js +9 -6
- package/components/form/check-button/check-button.d.ts +5 -6
- package/components/form/check-button/check-button.js +5 -10
- package/components/form/checkbox/checkbox-base.d.ts +19 -0
- package/components/form/checkbox/checkbox-base.js +29 -0
- package/components/form/checkbox/checkbox-group-base.d.ts +12 -0
- package/components/form/checkbox/checkbox-group-base.js +13 -0
- package/components/form/checkbox/checkbox-group.d.ts +4 -5
- package/components/form/checkbox/checkbox-group.js +26 -30
- package/components/form/checkbox/checkbox.d.ts +3 -3
- package/components/form/checkbox/checkbox.js +17 -41
- package/components/form/darkmode-toggle/darkmode-toggle.d.ts +11 -0
- package/components/form/darkmode-toggle/darkmode-toggle.js +13 -0
- package/components/form/datepicker/datepicker.d.ts +11 -4
- package/components/form/datepicker/datepicker.js +65 -27
- package/components/form/error-message/error-message.d.ts +1 -2
- package/components/form/error-message/error-message.js +2 -4
- package/components/form/form-hooks/useGroupValidity.d.ts +4 -1
- package/components/form/form-hooks/useGroupValidity.js +7 -2
- package/components/form/form-hooks/useInputValidity.d.ts +1 -1
- package/components/form/form-hooks/useInputValidity.js +9 -5
- package/components/form/input/input-base.d.ts +24 -0
- package/components/form/input/input-base.js +32 -0
- package/components/form/input/input.d.ts +3 -2
- package/components/form/input/input.js +8 -24
- package/components/form/radio/radio-base.d.ts +16 -0
- package/components/form/radio/radio-base.js +24 -0
- package/components/form/radio/radio-group-base.d.ts +13 -0
- package/components/form/radio/radio-group-base.js +10 -0
- package/components/form/radio/radio-group.d.ts +6 -5
- package/components/form/radio/radio-group.js +25 -19
- package/components/form/radio/radio.d.ts +9 -9
- package/components/form/radio/radio.js +7 -20
- package/components/form/radio-button/radio-button-group-base.d.ts +8 -0
- package/components/form/radio-button/radio-button-group-base.js +8 -0
- package/components/form/radio-button/radio-button-group.d.ts +4 -3
- package/components/form/radio-button/radio-button-group.js +18 -12
- package/components/form/radio-button/radio-button.d.ts +4 -5
- package/components/form/radio-button/radio-button.js +5 -10
- package/components/form/range/range-base.d.ts +18 -0
- package/components/form/range/range-base.js +16 -0
- package/components/form/range/range.d.ts +3 -6
- package/components/form/range/range.js +23 -23
- package/components/form/select/select-base.d.ts +19 -0
- package/components/form/select/select-base.js +24 -0
- package/components/form/select/select.d.ts +7 -7
- package/components/form/select/select.js +8 -18
- package/components/form/select-multiple/select-multiple-base.d.ts +27 -0
- package/components/form/select-multiple/select-multiple-base.js +27 -0
- package/components/form/select-multiple/select-multiple.d.ts +10 -7
- package/components/form/select-multiple/select-multiple.js +29 -54
- package/components/form/spinner/spinner.d.ts +3 -4
- package/components/form/spinner/spinner.js +3 -7
- package/components/form/textarea/textarea-base.d.ts +24 -0
- package/components/form/textarea/textarea-base.js +34 -0
- package/components/form/textarea/textarea.d.ts +4 -5
- package/components/form/textarea/textarea.js +6 -22
- package/components/form/time/time-base.d.ts +17 -0
- package/components/form/time/time-base.js +24 -0
- package/components/form/time/time.d.ts +8 -7
- package/components/form/time/time.js +5 -16
- package/components/form/toggle/toggle.d.ts +1 -2
- package/components/form/toggle/toggle.js +5 -8
- package/components/grid/column.d.ts +1 -1
- package/components/grid/column.js +6 -7
- package/components/grid/container.js +1 -1
- package/components/grid/row.js +1 -1
- package/components/grid-layout/grid-column.d.ts +19 -0
- package/components/grid-layout/grid-column.js +14 -0
- package/components/grid-layout/grid-container.d.ts +10 -0
- package/components/grid-layout/grid-container.js +17 -0
- package/components/grid-layout/grid-row.d.ts +8 -0
- package/components/grid-layout/grid-row.js +12 -0
- package/components/header-1177/header-1177-avatar-base.d.ts +16 -0
- package/components/header-1177/header-1177-avatar-base.js +24 -0
- package/components/header-1177/header-1177-avatar.d.ts +4 -7
- package/components/header-1177/header-1177-avatar.js +35 -42
- package/components/header-1177/header-1177-base.d.ts +18 -0
- package/components/header-1177/header-1177-base.js +14 -0
- package/components/header-1177/header-1177-item-base.d.ts +9 -0
- package/components/header-1177/header-1177-item-base.js +13 -0
- package/components/header-1177/header-1177-item.d.ts +2 -7
- package/components/header-1177/header-1177-item.js +6 -29
- package/components/header-1177/header-1177-menu-mobile-base.d.ts +12 -0
- package/components/header-1177/header-1177-menu-mobile-base.js +18 -0
- package/components/header-1177/header-1177-menu-mobile.d.ts +4 -5
- package/components/header-1177/header-1177-menu-mobile.js +29 -28
- package/components/header-1177/header-1177-nav-base.d.ts +9 -0
- package/components/header-1177/header-1177-nav-base.js +12 -0
- package/components/header-1177/header-1177-nav-item-base.d.ts +18 -0
- package/components/header-1177/header-1177-nav-item-base.js +31 -0
- package/components/header-1177/header-1177-nav-item-mobile-base.d.ts +7 -0
- package/components/header-1177/header-1177-nav-item-mobile-base.js +10 -0
- package/components/header-1177/header-1177-nav-item-mobile.d.ts +4 -8
- package/components/header-1177/header-1177-nav-item-mobile.js +5 -16
- package/components/header-1177/header-1177-nav-item.d.ts +7 -7
- package/components/header-1177/header-1177-nav-item.js +44 -35
- package/components/header-1177/header-1177-nav.d.ts +2 -4
- package/components/header-1177/header-1177-nav.js +5 -9
- package/components/header-1177/header-1177-region-picker-base.d.ts +9 -0
- package/components/header-1177/header-1177-region-picker-base.js +21 -0
- package/components/header-1177/header-1177-region-picker-mobile-base.d.ts +9 -0
- package/components/header-1177/header-1177-region-picker-mobile-base.js +21 -0
- package/components/header-1177/header-1177-region-picker-mobile.d.ts +3 -6
- package/components/header-1177/header-1177-region-picker-mobile.js +13 -29
- package/components/header-1177/header-1177-region-picker.d.ts +3 -6
- package/components/header-1177/header-1177-region-picker.js +15 -29
- package/components/header-1177/header-1177.d.ts +3 -3
- package/components/header-1177/header-1177.js +5 -10
- package/components/header-1177-admin/header-1177-admin-avatar-base.d.ts +14 -0
- package/components/header-1177-admin/header-1177-admin-avatar-base.js +23 -0
- package/components/header-1177-admin/header-1177-admin-avatar-mobile-base.d.ts +13 -0
- package/components/header-1177-admin/header-1177-admin-avatar-mobile-base.js +23 -0
- package/components/header-1177-admin/header-1177-admin-avatar-mobile.d.ts +3 -5
- package/components/header-1177-admin/header-1177-admin-avatar-mobile.js +27 -23
- package/components/header-1177-admin/header-1177-admin-avatar.d.ts +3 -5
- package/components/header-1177-admin/header-1177-admin-avatar.js +26 -25
- package/components/header-1177-admin/header-1177-admin-base.d.ts +18 -0
- package/components/header-1177-admin/header-1177-admin-base.js +14 -0
- package/components/header-1177-admin/header-1177-admin-item-base.d.ts +8 -0
- package/components/header-1177-admin/header-1177-admin-item-base.js +12 -0
- package/components/header-1177-admin/header-1177-admin-item.d.ts +3 -8
- package/components/header-1177-admin/header-1177-admin-item.js +5 -27
- package/components/header-1177-admin/header-1177-admin-menu-mobile-base.d.ts +11 -0
- package/components/header-1177-admin/header-1177-admin-menu-mobile-base.js +18 -0
- package/components/header-1177-admin/header-1177-admin-menu-mobile.d.ts +4 -5
- package/components/header-1177-admin/header-1177-admin-menu-mobile.js +27 -25
- package/components/header-1177-admin/header-1177-admin-nav-base.d.ts +7 -0
- package/components/header-1177-admin/header-1177-admin-nav-base.js +10 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-base.d.ts +18 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-base.js +31 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-mobile-base.d.ts +7 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-mobile-base.js +10 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-mobile.d.ts +7 -0
- package/components/header-1177-admin/header-1177-admin-nav-item-mobile.js +11 -0
- package/components/header-1177-admin/header-1177-admin-nav-item.d.ts +6 -6
- package/components/header-1177-admin/header-1177-admin-nav-item.js +44 -35
- package/components/header-1177-admin/header-1177-admin-nav.d.ts +2 -4
- package/components/header-1177-admin/header-1177-admin-nav.js +4 -6
- package/components/header-1177-admin/header-1177-admin.d.ts +2 -3
- package/components/header-1177-admin/header-1177-admin.js +5 -10
- package/components/header-1177-pro/header-1177-pro-avatar-base.d.ts +14 -0
- package/components/header-1177-pro/header-1177-pro-avatar-base.js +23 -0
- package/components/header-1177-pro/header-1177-pro-avatar-mobile-base.d.ts +13 -0
- package/components/header-1177-pro/header-1177-pro-avatar-mobile-base.js +24 -0
- package/components/header-1177-pro/header-1177-pro-avatar-mobile.d.ts +3 -6
- package/components/header-1177-pro/header-1177-pro-avatar-mobile.js +23 -20
- package/components/header-1177-pro/header-1177-pro-avatar.d.ts +4 -6
- package/components/header-1177-pro/header-1177-pro-avatar.js +32 -30
- package/components/header-1177-pro/header-1177-pro-base.d.ts +19 -0
- package/components/header-1177-pro/header-1177-pro-base.js +11 -0
- package/components/header-1177-pro/header-1177-pro-item-base.d.ts +8 -0
- package/components/header-1177-pro/header-1177-pro-item-base.js +12 -0
- package/components/header-1177-pro/header-1177-pro-item.d.ts +3 -8
- package/components/header-1177-pro/header-1177-pro-item.js +5 -27
- package/components/header-1177-pro/header-1177-pro-menu-mobile-base.d.ts +11 -0
- package/components/header-1177-pro/header-1177-pro-menu-mobile-base.js +18 -0
- package/components/header-1177-pro/header-1177-pro-menu-mobile.d.ts +5 -6
- package/components/header-1177-pro/header-1177-pro-menu-mobile.js +27 -25
- package/components/header-1177-pro/header-1177-pro-nav-base.d.ts +10 -0
- package/components/header-1177-pro/header-1177-pro-nav-base.js +10 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-base.d.ts +18 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-base.js +31 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-mobile-base.d.ts +7 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-mobile-base.js +10 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-mobile.d.ts +7 -0
- package/components/header-1177-pro/header-1177-pro-nav-item-mobile.js +11 -0
- package/components/header-1177-pro/header-1177-pro-nav-item.d.ts +6 -6
- package/components/header-1177-pro/header-1177-pro-nav-item.js +44 -35
- package/components/header-1177-pro/header-1177-pro-nav.d.ts +4 -5
- package/components/header-1177-pro/header-1177-pro-nav.js +5 -7
- package/components/header-1177-pro/header-1177-pro-region-picker-base.d.ts +9 -0
- package/components/header-1177-pro/header-1177-pro-region-picker-base.js +19 -0
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile-base.d.ts +9 -0
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile-base.js +19 -0
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile.d.ts +3 -5
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile.js +13 -29
- package/components/header-1177-pro/header-1177-pro-region-picker.d.ts +3 -5
- package/components/header-1177-pro/header-1177-pro-region-picker.js +15 -29
- package/components/header-1177-pro/header-1177-pro.d.ts +4 -5
- package/components/header-1177-pro/header-1177-pro.js +5 -7
- package/components/header-inera/header-inera-base.d.ts +14 -0
- package/components/header-inera/header-inera-base.js +11 -0
- package/components/header-inera/header-inera-item-base.d.ts +8 -0
- package/components/header-inera/header-inera-item-base.js +12 -0
- package/components/header-inera/header-inera-item.d.ts +3 -8
- package/components/header-inera/header-inera-item.js +5 -36
- package/components/header-inera/header-inera-menu-mobile-base.d.ts +11 -0
- package/components/header-inera/header-inera-menu-mobile-base.js +18 -0
- package/components/header-inera/header-inera-menu-mobile.d.ts +5 -6
- package/components/header-inera/header-inera-menu-mobile.js +27 -26
- package/components/header-inera/header-inera-nav-base.d.ts +7 -0
- package/components/header-inera/header-inera-nav-base.js +10 -0
- package/components/header-inera/header-inera-nav-item-base.d.ts +17 -0
- package/components/header-inera/header-inera-nav-item-base.js +26 -0
- package/components/header-inera/header-inera-nav-item.d.ts +7 -7
- package/components/header-inera/header-inera-nav-item.js +44 -34
- package/components/header-inera/header-inera-nav.d.ts +4 -6
- package/components/header-inera/header-inera-nav.js +4 -7
- package/components/header-inera/header-inera.d.ts +1 -3
- package/components/header-inera/header-inera.js +5 -7
- package/components/header-inera-admin/header-inera-admin-avatar-base.d.ts +14 -0
- package/components/header-inera-admin/header-inera-admin-avatar-base.js +23 -0
- package/components/header-inera-admin/header-inera-admin-avatar-mobile-base.d.ts +13 -0
- package/components/header-inera-admin/header-inera-admin-avatar-mobile-base.js +23 -0
- package/components/header-inera-admin/header-inera-admin-avatar-mobile.d.ts +3 -6
- package/components/header-inera-admin/header-inera-admin-avatar-mobile.js +26 -21
- package/components/header-inera-admin/header-inera-admin-avatar.d.ts +4 -6
- package/components/header-inera-admin/header-inera-admin-avatar.js +35 -31
- package/components/header-inera-admin/header-inera-admin-base.d.ts +15 -0
- package/components/header-inera-admin/header-inera-admin-base.js +20 -0
- package/components/header-inera-admin/header-inera-admin-item-base.d.ts +8 -0
- package/components/header-inera-admin/header-inera-admin-item-base.js +13 -0
- package/components/header-inera-admin/header-inera-admin-item.d.ts +3 -8
- package/components/header-inera-admin/header-inera-admin-item.js +6 -26
- package/components/header-inera-admin/header-inera-admin-menu-mobile-base.d.ts +11 -0
- package/components/header-inera-admin/header-inera-admin-menu-mobile-base.js +18 -0
- package/components/header-inera-admin/header-inera-admin-menu-mobile.d.ts +4 -5
- package/components/header-inera-admin/header-inera-admin-menu-mobile.js +27 -25
- package/components/header-inera-admin/header-inera-admin-nav-base.d.ts +7 -0
- package/components/header-inera-admin/header-inera-admin-nav-base.js +10 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-base.d.ts +18 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-base.js +31 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-mobile-base.d.ts +7 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-mobile-base.js +10 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-mobile.d.ts +7 -0
- package/components/header-inera-admin/header-inera-admin-nav-item-mobile.js +11 -0
- package/components/header-inera-admin/header-inera-admin-nav-item.d.ts +7 -6
- package/components/header-inera-admin/header-inera-admin-nav-item.js +44 -34
- package/components/header-inera-admin/header-inera-admin-nav.d.ts +4 -6
- package/components/header-inera-admin/header-inera-admin-nav.js +5 -8
- package/components/header-inera-admin/header-inera-admin.d.ts +3 -4
- package/components/header-inera-admin/header-inera-admin.js +5 -16
- package/components/header-patient/header-patient.d.ts +2 -4
- package/components/header-patient/header-patient.js +6 -10
- package/components/{action-link → link}/action-link.js +2 -2
- package/components/link/box-link.d.ts +6 -0
- package/components/link/box-link.js +9 -0
- package/components/link/link.d.ts +2 -2
- package/components/link/link.js +3 -10
- package/components/list-pagination/list-pagination-links.d.ts +19 -0
- package/components/list-pagination/list-pagination-links.js +48 -0
- package/components/{pagination/list-pagination → list-pagination}/list-pagination.d.ts +3 -2
- package/components/{pagination/list-pagination → list-pagination}/list-pagination.js +4 -3
- package/components/mobile-menu/mobile-item-base.d.ts +14 -0
- package/components/mobile-menu/mobile-item-base.js +46 -0
- package/components/mobile-menu/mobile-item.d.ts +6 -0
- package/components/mobile-menu/mobile-item.js +26 -0
- package/components/mobile-menu/mobile-menu.d.ts +6 -0
- package/components/mobile-menu/mobile-menu.js +10 -0
- package/components/{navigation/content → navigation-content}/navigation-content.d.ts +1 -1
- package/components/{navigation/content → navigation-content}/navigation-content.js +1 -1
- package/components/{navigation/local → navigation-local}/navigation-local.d.ts +1 -1
- package/components/{navigation/local → navigation-local}/navigation-local.js +1 -1
- package/components/{notification/badge → notification-badge}/notification-badge.d.ts +1 -1
- package/components/notification-badge/notification-badge.js +9 -0
- package/components/popover/popover-base.d.ts +15 -0
- package/components/popover/popover-base.js +27 -0
- package/components/popover/popover-content.d.ts +19 -0
- package/components/popover/popover-content.js +20 -0
- package/components/popover/popover.d.ts +7 -8
- package/components/popover/popover.js +67 -161
- package/components/progressbar/progressbar.js +2 -2
- package/components/puff-list/{puff-list-item/puff-list-item-date.d.ts → puff-list-item-date.d.ts} +0 -1
- package/components/puff-list/{puff-list-item/puff-list-item-date.js → puff-list-item-date.js} +2 -3
- package/components/puff-list/{puff-list-item/puff-list-item-header.d.ts → puff-list-item-header.d.ts} +1 -1
- package/components/puff-list/puff-list-item-header.js +12 -0
- package/components/puff-list/{puff-list-item/puff-list-item-info.d.ts → puff-list-item-info.d.ts} +1 -2
- package/components/puff-list/puff-list-item-info.js +8 -0
- package/components/puff-list/{puff-list-item/puff-list-item.d.ts → puff-list-item.d.ts} +0 -1
- package/components/puff-list/{puff-list-item/puff-list-item.js → puff-list-item.js} +3 -3
- package/components/puff-list/puff-list.js +2 -3
- package/components/region-icon/region-icon.js +2 -2
- package/components/side-menu/side-menu-base.d.ts +22 -0
- package/components/side-menu/side-menu-base.js +42 -0
- package/components/side-menu/side-menu.d.ts +6 -9
- package/components/side-menu/side-menu.js +13 -43
- package/components/side-panel/side-panel-base.d.ts +24 -0
- package/components/side-panel/side-panel-base.js +33 -0
- package/components/side-panel/side-panel-provider.d.ts +7 -0
- package/components/side-panel/side-panel-provider.js +12 -0
- package/components/side-panel/side-panel.d.ts +14 -15
- package/components/side-panel/side-panel.js +49 -54
- package/components/stepper/step-base.d.ts +15 -0
- package/components/stepper/step-base.js +36 -0
- package/components/stepper/step.d.ts +5 -8
- package/components/stepper/step.js +17 -33
- package/components/stepper/stepper.d.ts +4 -6
- package/components/stepper/stepper.js +8 -13
- package/components/tabs/tab-link.d.ts +15 -0
- package/components/tabs/tab-link.js +10 -0
- package/components/tabs/tab-panel.d.ts +2 -4
- package/components/tabs/tab-panel.js +5 -12
- package/components/tabs/tab.d.ts +5 -5
- package/components/tabs/tab.js +5 -8
- package/components/tabs/tabs-base.d.ts +15 -0
- package/components/tabs/tabs-base.js +15 -0
- package/components/tabs/tabs.d.ts +5 -8
- package/components/tabs/tabs.js +38 -51
- package/components/tag/tag.d.ts +5 -15
- package/components/tag/tag.js +3 -8
- package/components/tooltip/tooltip-base.d.ts +14 -0
- package/components/tooltip/tooltip-base.js +18 -0
- package/components/tooltip/tooltip.d.ts +3 -10
- package/components/tooltip/tooltip.js +59 -43
- package/components/utils/contexts/HeaderContext.d.ts +1 -0
- package/index.d.ts +90 -16
- package/index.js +90 -16
- package/package.json +2 -2
- package/components/box-link/box-link.d.ts +0 -9
- package/components/box-link/box-link.js +0 -11
- package/components/global-alert/global-alert.d.ts +0 -16
- package/components/global-alert/global-alert.js +0 -26
- package/components/mobile/menu/item/mobile-item.d.ts +0 -15
- package/components/mobile/menu/item/mobile-item.js +0 -61
- package/components/mobile/menu/mobile-menu.d.ts +0 -7
- package/components/mobile/menu/mobile-menu.js +0 -12
- package/components/notification/badge/notification-badge.js +0 -9
- package/components/pagination/data-pagination/data-pagination.js +0 -16
- package/components/puff-list/puff-list-item/puff-list-item-header.js +0 -11
- package/components/puff-list/puff-list-item/puff-list-item-info.js +0 -10
- package/components/utils/hooks/useElementId.d.ts +0 -5
- package/components/utils/hooks/useElementId.js +0 -12
- /package/components/{button-group → button}/button-group.d.ts +0 -0
- /package/components/{action-link → link}/action-link.d.ts +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
export interface IDSTextareaBaseProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
id?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
hint?: React.ReactNode;
|
|
6
|
+
errorMsg?: string;
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
light?: boolean;
|
|
12
|
+
block?: boolean;
|
|
13
|
+
autoSize?: boolean;
|
|
14
|
+
noResize?: boolean;
|
|
15
|
+
focusAnchor?: boolean;
|
|
16
|
+
tooltip?: React.ReactNode;
|
|
17
|
+
textareaRef?: React.Ref<HTMLTextAreaElement>;
|
|
18
|
+
hintId?: string;
|
|
19
|
+
errorMsgId?: string;
|
|
20
|
+
dataTestId?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
export declare function IDSTextareaBase({ id, label, hint, hintId, errorMsg, errorMsgId, invalid, required, disabled, readOnly, light, block, autoSize, noResize, focusAnchor, tooltip, textareaRef, dataTestId, className, style, ...props }: IDSTextareaBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { IDSErrorMessage } from '../error-message/error-message.js';
|
|
4
|
+
import { useId } from 'react';
|
|
5
|
+
|
|
6
|
+
function IDSTextareaBase({ id, label, hint, hintId, errorMsg, errorMsgId, invalid, required, disabled, readOnly, light, block, autoSize, noResize, focusAnchor, tooltip, textareaRef, dataTestId, className, style, ...props }) {
|
|
7
|
+
const reactId = useId();
|
|
8
|
+
const inputId = !!id ? id : `textarea-base-${reactId}`;
|
|
9
|
+
const baseHintId = !!hintId ? hintId : `textarea-base-hint-${reactId}`;
|
|
10
|
+
const baseErrorMsgId = !!errorMsgId ? errorMsgId : `textarea-base-error-${reactId}`;
|
|
11
|
+
const showErrorMsg = invalid && !!errorMsg;
|
|
12
|
+
const ariaHandler = showErrorMsg
|
|
13
|
+
? {
|
|
14
|
+
"aria-describedby": baseErrorMsgId
|
|
15
|
+
}
|
|
16
|
+
: !!hint
|
|
17
|
+
? {
|
|
18
|
+
"aria-describedby": baseHintId
|
|
19
|
+
}
|
|
20
|
+
: {};
|
|
21
|
+
return (jsxs("div", { className: clsx("ids-textarea", {
|
|
22
|
+
"ids-textarea--block": block,
|
|
23
|
+
"ids-textarea--autosize": autoSize,
|
|
24
|
+
"ids-textarea--no-resize": noResize
|
|
25
|
+
}, className), "data-testid": dataTestId, style: style, children: [label && (jsxs("div", { className: "ids-label-wrapper ids-label-wrapper--margin-bottom", children: [jsx("label", { htmlFor: inputId, className: clsx("ids-label", {
|
|
26
|
+
"ids-label--disabled": disabled || readOnly
|
|
27
|
+
}), children: label }), tooltip && jsx("span", { className: "ids-label__tooltip", children: tooltip })] })), jsx("textarea", { ref: textareaRef, id: inputId, className: clsx("ids-textarea__textarea", {
|
|
28
|
+
"ids-input--light": light,
|
|
29
|
+
"ids-input--invalid": invalid,
|
|
30
|
+
"ids-focus-anchor": focusAnchor
|
|
31
|
+
}), "aria-invalid": invalid, "aria-required": required, "aria-disabled": disabled, required: required, disabled: disabled, readOnly: readOnly, ...ariaHandler, ...props }), hint && (jsx("div", { id: baseHintId, className: "ids-input__hint", children: hint })), showErrorMsg && (jsx(IDSErrorMessage, { id: baseErrorMsgId, show: true, children: errorMsg }))] }));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { IDSTextareaBase };
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
interface IDSTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
1
|
+
export interface IDSTextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
2
|
label?: string;
|
|
4
|
-
hint?:
|
|
3
|
+
hint?: React.ReactNode;
|
|
5
4
|
errorMsg?: string;
|
|
6
5
|
disabled?: boolean;
|
|
7
6
|
invalid?: boolean;
|
|
8
7
|
required?: boolean;
|
|
9
8
|
noValidation?: boolean;
|
|
9
|
+
validatesOnBlur?: boolean;
|
|
10
10
|
autoSize?: boolean;
|
|
11
11
|
noResize?: boolean;
|
|
12
12
|
block?: boolean;
|
|
13
13
|
light?: boolean;
|
|
14
14
|
focusAnchor?: boolean;
|
|
15
15
|
readOnly?: boolean;
|
|
16
|
-
tooltip?: ReactNode;
|
|
16
|
+
tooltip?: React.ReactNode;
|
|
17
17
|
dataTestId?: string;
|
|
18
18
|
}
|
|
19
19
|
export declare const IDSTextarea: import("react").ForwardRefExoticComponent<IDSTextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
20
|
-
export {};
|
|
@@ -1,31 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { useElementId } from '../../utils/hooks/useElementId.js';
|
|
5
|
-
import { IDSErrorMessage } from '../error-message/error-message.js';
|
|
6
4
|
import { useInputValidity } from '../form-hooks/useInputValidity.js';
|
|
7
|
-
import {
|
|
8
|
-
import clsx from 'clsx';
|
|
5
|
+
import { IDSTextareaBase } from './textarea-base.js';
|
|
9
6
|
|
|
10
|
-
const IDSTextarea = forwardRef(({ label
|
|
11
|
-
const fieldId = useElementId(id);
|
|
12
|
-
const errorMsgId = useElementId();
|
|
13
|
-
const hintId = useElementId();
|
|
7
|
+
const IDSTextarea = forwardRef(({ id, label, hint, errorMsg, disabled = false, invalid = false, required = false, noValidation = false, validatesOnBlur = false, autoSize = false, noResize = false, block = false, light = false, readOnly = false, focusAnchor = false, dataTestId = "", tooltip, className, children, style, ...props }, ref) => {
|
|
14
8
|
const textareaRef = useRef(null);
|
|
15
9
|
useImperativeHandle(ref, () => textareaRef.current);
|
|
16
|
-
const
|
|
17
|
-
const isInvalid = (invalid || !
|
|
18
|
-
|
|
19
|
-
return (jsxs("div", { className: clsx("ids-textarea", {
|
|
20
|
-
"ids-textarea--block": block,
|
|
21
|
-
"ids-textarea--autosize": autoSize,
|
|
22
|
-
"ids-textarea--no-resize": noResize
|
|
23
|
-
}, className), "data-testid": dataTestId, children: [jsxs("div", { className: "ids-label-tooltip-wrapper", children: [jsx("label", { className: clsx("ids-label", {
|
|
24
|
-
"ids-label--disabled": disabled || readOnly
|
|
25
|
-
}), htmlFor: fieldId, children: label }), tooltip && tooltip] }), jsx("textarea", { ref: textareaRef, id: fieldId, className: clsx("ids-textarea__textarea", {
|
|
26
|
-
"ids-input--light": light,
|
|
27
|
-
"ids-focus-anchor": focusAnchor
|
|
28
|
-
}), "aria-invalid": isInvalid, required: required, "aria-required": required, disabled: disabled, "aria-disabled": disabled, readOnly: readOnly, ...props }), hint && (jsx("div", { id: hintId, className: "ids-input__hint", children: hint })), isInvalid && errorMsg && (jsx(IDSErrorMessage, { id: errorMsgId, show: true, children: errorMsg }))] }));
|
|
10
|
+
const isValid = useInputValidity(textareaRef, validatesOnBlur);
|
|
11
|
+
const isInvalid = (invalid || !isValid) && !noValidation;
|
|
12
|
+
return (jsx(IDSTextareaBase, { id: id, label: label, hint: hint, errorMsg: errorMsg, invalid: isInvalid, required: required, disabled: disabled, readOnly: readOnly, light: light, autoSize: autoSize, noResize: noResize, block: block, focusAnchor: focusAnchor, tooltip: tooltip, className: className, textareaRef: textareaRef, dataTestId: dataTestId, style: style, ...props }));
|
|
29
13
|
});
|
|
30
14
|
IDSTextarea.displayName = "IDSTextarea";
|
|
31
15
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
export interface IDSTimeBaseProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
errorMsg?: string;
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
light?: boolean;
|
|
10
|
+
focusAnchor?: boolean;
|
|
11
|
+
tooltip?: React.ReactNode;
|
|
12
|
+
errorMsgId?: string;
|
|
13
|
+
dataTestId?: string;
|
|
14
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export declare function IDSTimeBase({ id, label, tooltip, errorMsg, errorMsgId, disabled, invalid, required, light, focusAnchor, dataTestId, className, inputRef, style, ...props }: IDSTimeBaseProps & React.InputHTMLAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { IDSErrorMessage } from '../error-message/error-message.js';
|
|
4
|
+
import { useId } from 'react';
|
|
5
|
+
|
|
6
|
+
function IDSTimeBase({ id, label, tooltip, errorMsg, errorMsgId, disabled = false, invalid = false, required = false, light, focusAnchor, dataTestId, className, inputRef, style, ...props }) {
|
|
7
|
+
const reactId = useId();
|
|
8
|
+
const inputId = !!id ? id : `time-base-${reactId}`;
|
|
9
|
+
const baseErrorMsgId = !!errorMsgId ? errorMsgId : `time-base-error-${reactId}`;
|
|
10
|
+
const showErrorMsg = invalid && !!errorMsg;
|
|
11
|
+
const ariaHandler = showErrorMsg
|
|
12
|
+
? {
|
|
13
|
+
"aria-describedby": baseErrorMsgId
|
|
14
|
+
}
|
|
15
|
+
: {};
|
|
16
|
+
return (jsxs("div", { className: clsx("ids-time", className), "data-testid": dataTestId, style: style, children: [label && (jsxs("div", { className: "ids-label-wrapper ids-label-wrapper--margin-bottom", children: [jsx("label", { className: clsx("ids-label", {
|
|
17
|
+
"ids-label--disabled": disabled
|
|
18
|
+
}), htmlFor: inputId, children: label }), tooltip && jsx("span", { className: "ids-label__tooltip", children: tooltip })] })), jsx("div", { className: "ids-time__input-wrapper", children: jsx("input", { ref: inputRef, id: inputId, type: "time", className: clsx("ids-time__input", {
|
|
19
|
+
"ids-input--light": light,
|
|
20
|
+
"ids-focus-anchor": focusAnchor
|
|
21
|
+
}), "aria-invalid": invalid, "aria-required": required, "aria-disabled": disabled, required: required, disabled: disabled, ...ariaHandler, ...props }) }), showErrorMsg && (jsx(IDSErrorMessage, { id: baseErrorMsgId, show: true, children: errorMsg }))] }));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { IDSTimeBase };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface IDSTimeProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
2
|
+
id?: string;
|
|
3
3
|
label?: string;
|
|
4
4
|
errorMsg?: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
5
|
invalid?: boolean;
|
|
7
6
|
required?: boolean;
|
|
8
|
-
|
|
9
|
-
focusAnchor?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
10
8
|
light?: boolean;
|
|
11
|
-
|
|
9
|
+
focusAnchor?: boolean;
|
|
10
|
+
tooltip?: React.ReactNode;
|
|
11
|
+
errorMsgId?: string;
|
|
12
12
|
dataTestId?: string;
|
|
13
|
+
noValidation?: boolean;
|
|
14
|
+
validatesOnBlur?: boolean;
|
|
13
15
|
}
|
|
14
16
|
export declare const IDSTime: import("react").ForwardRefExoticComponent<IDSTimeProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
15
|
-
export {};
|
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { useElementId } from '../../utils/hooks/useElementId.js';
|
|
5
|
-
import { IDSErrorMessage } from '../error-message/error-message.js';
|
|
6
4
|
import { useInputValidity } from '../form-hooks/useInputValidity.js';
|
|
7
|
-
import {
|
|
8
|
-
import clsx from 'clsx';
|
|
5
|
+
import { IDSTimeBase } from './time-base.js';
|
|
9
6
|
|
|
10
|
-
const IDSTime = forwardRef(({
|
|
11
|
-
const fieldId = useElementId(id);
|
|
12
|
-
const errorMsgId = useElementId();
|
|
7
|
+
const IDSTime = forwardRef(({ invalid = false, noValidation = false, validatesOnBlur = false, style, ...props }, ref) => {
|
|
13
8
|
const inputRef = useRef(null);
|
|
14
9
|
useImperativeHandle(ref, () => inputRef.current);
|
|
15
|
-
const hasValidValue = useInputValidity(inputRef);
|
|
10
|
+
const hasValidValue = useInputValidity(inputRef, validatesOnBlur);
|
|
16
11
|
const isInvalid = (invalid || !hasValidValue) && !noValidation;
|
|
17
|
-
|
|
18
|
-
return (jsxs("div", { className: clsx("ids-time", className), "data-testid": dataTestId, children: [jsxs("div", { className: "ids-label-tooltip-wrapper", children: [jsx("label", { className: clsx("ids-label", {
|
|
19
|
-
"ids-label--disabled": disabled
|
|
20
|
-
}), htmlFor: fieldId, children: label }), tooltip] }), jsx("div", { className: "ids-time__input-wrapper", children: jsx("input", { ref: inputRef, id: fieldId, type: "time", className: clsx("ids-time__input", {
|
|
21
|
-
"ids-input--light": light,
|
|
22
|
-
"ids-focus-anchor": focusAnchor
|
|
23
|
-
}), "aria-invalid": isInvalid, required: required, "aria-required": required, disabled: disabled, "aria-disabled": disabled, ...props }) }), isInvalid && errorMsg && (jsx(IDSErrorMessage, { id: errorMsgId, show: true, children: errorMsg }))] }));
|
|
12
|
+
return jsx(IDSTimeBase, { invalid: isInvalid, inputRef: inputRef, ...props, style: style });
|
|
24
13
|
});
|
|
25
14
|
IDSTime.displayName = "IDSTime";
|
|
26
15
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from "react";
|
|
2
2
|
interface IDSToggleProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
tooltip?: ReactNode;
|
|
5
5
|
focusAnchor?: boolean;
|
|
6
|
-
children?: ReactNode;
|
|
7
6
|
dataTestId?: string;
|
|
8
7
|
}
|
|
9
8
|
export declare const IDSToggle: import("react").ForwardRefExoticComponent<IDSToggleProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { forwardRef,
|
|
4
|
-
import { useElementId } from '../../utils/hooks/useElementId.js';
|
|
3
|
+
import { forwardRef, useId } from 'react';
|
|
5
4
|
import clsx from 'clsx';
|
|
6
5
|
|
|
7
|
-
const IDSToggle = forwardRef(({
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
useImperativeHandle(ref, () => toggleRef.current);
|
|
11
|
-
return (jsxs("div", { className: clsx("ids-toggle", className), "data-testid": dataTestId, children: [jsx("input", { id: fieldId, ref: toggleRef, className: clsx("ids-toggle__input", {
|
|
6
|
+
const IDSToggle = forwardRef(({ id, dataTestId, disabled, tooltip, focusAnchor, children, className, ...props }, ref) => {
|
|
7
|
+
const inputId = !!id ? id : useId();
|
|
8
|
+
return (jsxs("div", { className: clsx("ids-toggle", className), "data-testid": dataTestId, children: [jsx("input", { ref: ref, id: inputId, className: clsx("ids-toggle__input", {
|
|
12
9
|
"ids-focus-anchor": focusAnchor
|
|
13
|
-
}), type: "checkbox", disabled: disabled, ...props }), jsxs("div", { className: "ids-label-
|
|
10
|
+
}), type: "checkbox", role: "switch", "aria-checked": props.defaultChecked || props.checked, disabled: disabled, ...props }), jsxs("div", { className: "ids-label-wrapper", children: [jsx("label", { htmlFor: inputId, className: "ids-toggle__label ids-label ids-label--clickable", children: children }), tooltip && jsx("span", { className: "ids-label__tooltip", children: tooltip })] })] }));
|
|
14
11
|
});
|
|
15
12
|
IDSToggle.displayName = "IDSToggle";
|
|
16
13
|
|
|
@@ -12,4 +12,4 @@ export interface IDSColumnProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
12
12
|
alignSelf?: "start" | "center" | "end" | "auto" | "baseline" | "stretch";
|
|
13
13
|
children?: ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export declare
|
|
15
|
+
export declare const IDSColumn: React.ForwardRefExoticComponent<IDSColumnProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import '@inera/ids-design/components/grid/column/column.css';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
4
3
|
import clsx from 'clsx';
|
|
4
|
+
import '@inera/ids-design/components/grid/column/column.css';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
6
|
+
const IDSColumn = forwardRef(({ cols, s, m, offset, sOffset, mOffset, alignSelf, className, children, style, ...props }, ref) => {
|
|
7
|
+
return (jsx("div", { ref: ref, className: clsx("ids-col", cols && `ids-col--${cols}`, s && `ids-col--s-${s}`, m && `ids-col--m-${m}`, offset && `ids-col--offset-${offset}`, sOffset && `ids-col--s-offset-${sOffset}`, mOffset && `ids-col--m-offset-${mOffset}`, alignSelf && `ids-col--align-${alignSelf}`, className), style: { ...style }, ...props, children: children }));
|
|
8
|
+
});
|
|
9
|
+
IDSColumn.displayName = "IDSColumn";
|
|
11
10
|
|
|
12
11
|
export { IDSColumn };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import '@inera/ids-design/components/grid/container/container.css';
|
|
4
3
|
import clsx from 'clsx';
|
|
4
|
+
import '@inera/ids-design/components/grid/container/container.css';
|
|
5
5
|
|
|
6
6
|
const IDSContainer = forwardRef(({ gutterless = false, width, maxWidth, rowGap, children, className, style, ...props }, ref) => {
|
|
7
7
|
const mergedStyle = {
|
package/components/grid/row.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import '@inera/ids-design/components/grid/row/row.css';
|
|
4
3
|
import clsx from 'clsx';
|
|
4
|
+
import '@inera/ids-design/components/grid/row/row.css';
|
|
5
5
|
|
|
6
6
|
const IDSRow = forwardRef(({ gap, align, justify, children, className, style, ...props }, ref) => {
|
|
7
7
|
const classNames = clsx("ids-row", align && `ids-row--align-${align}`, justify && `ids-row--justify-${justify}`, className);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/grid-layout/grid-column/grid-column.css";
|
|
3
|
+
export type GridColSize = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "auto";
|
|
4
|
+
export type GridOffsetSize = Exclude<GridColSize, "auto">;
|
|
5
|
+
export type GridOrder = "-1" | "1" | "2" | "3" | "4" | undefined;
|
|
6
|
+
export interface IDSGridColumnProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
cols?: GridColSize;
|
|
8
|
+
s?: GridColSize;
|
|
9
|
+
m?: GridColSize;
|
|
10
|
+
start?: GridOffsetSize;
|
|
11
|
+
sStart?: GridOffsetSize | "none";
|
|
12
|
+
mStart?: GridOffsetSize | "none";
|
|
13
|
+
order?: GridOrder | "none";
|
|
14
|
+
mOrder?: GridOrder | "none";
|
|
15
|
+
sOrder?: GridOrder | "none";
|
|
16
|
+
alignSelf?: "start" | "center" | "end" | "auto" | "baseline" | "stretch";
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const IDSGridColumn: React.ForwardRefExoticComponent<IDSGridColumnProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import '@inera/ids-design/components/grid-layout/grid-column/grid-column.css';
|
|
5
|
+
|
|
6
|
+
const IDSGridColumn = forwardRef(({ cols = "12", s, m, start, sStart, mStart, alignSelf, order, mOrder, sOrder, className, children, style, ...props }, ref) => {
|
|
7
|
+
const internalOrder = `${order}`;
|
|
8
|
+
const internalMOrder = `${mOrder}`;
|
|
9
|
+
const internalSOrder = `${sOrder}`;
|
|
10
|
+
return (jsx("div", { ref: ref, className: clsx("ids-grid-column", cols && `ids-grid-column--${cols}`, s && `ids-grid-column--s-${s}`, m && `ids-grid-column--m-${m}`, internalOrder !== "undefined" && `ids-grid-column--order-${order}`, internalMOrder !== "undefined" && `ids-grid-column--m-order-${mOrder}`, internalSOrder !== "undefined" && `ids-grid-column--s-order-${sOrder}`, start && `ids-grid-column--start-${start}`, sStart && `ids-grid-column--s-start-${sStart}`, mStart && `ids-grid-column--m-start-${mStart}`, alignSelf && `ids-grid-column--align-${alignSelf}`, className), ...props, style: { ...style }, children: children }));
|
|
11
|
+
});
|
|
12
|
+
IDSGridColumn.displayName = "IDSGridColumn";
|
|
13
|
+
|
|
14
|
+
export { IDSGridColumn };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from "react";
|
|
2
|
+
import "@inera/ids-design/components/grid-layout/grid-container/grid-container.css";
|
|
3
|
+
export interface IDSGridContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
width?: string;
|
|
5
|
+
maxWidth?: string;
|
|
6
|
+
gutterless?: boolean;
|
|
7
|
+
rowGap?: string;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const IDSGridContainer: import("react").ForwardRefExoticComponent<IDSGridContainerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import '@inera/ids-design/components/grid-layout/grid-container/grid-container.css';
|
|
5
|
+
|
|
6
|
+
const IDSGridContainer = forwardRef(({ gutterless = false, width, maxWidth, rowGap, children, className, style, ...props }, ref) => {
|
|
7
|
+
const mergedStyle = {
|
|
8
|
+
width: width ?? style?.width,
|
|
9
|
+
maxWidth: maxWidth ?? style?.maxWidth,
|
|
10
|
+
rowGap: rowGap ?? style?.rowGap,
|
|
11
|
+
...style
|
|
12
|
+
};
|
|
13
|
+
return (jsx("div", { ref: ref, className: clsx("ids-grid-container", { "ids-grid-container--gutterless": gutterless }, className), ...props, style: mergedStyle, children: children }));
|
|
14
|
+
});
|
|
15
|
+
IDSGridContainer.displayName = "IDSGridContainer";
|
|
16
|
+
|
|
17
|
+
export { IDSGridContainer };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from "react";
|
|
2
|
+
import "@inera/ids-design/components/grid-layout/grid-row/grid-row.css";
|
|
3
|
+
export interface IDSGridRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
noGap?: boolean;
|
|
5
|
+
rowAlign?: "start" | "center" | "end" | "baseline" | "stretch";
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const IDSGridRow: import("react").ForwardRefExoticComponent<IDSGridRowProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import '@inera/ids-design/components/grid-layout/grid-row/grid-row.css';
|
|
5
|
+
|
|
6
|
+
const IDSGridRow = forwardRef(({ noGap, rowAlign, children, className, style, ...props }, ref) => {
|
|
7
|
+
const classNames = clsx("ids-grid-row", rowAlign && `ids-grid-row--align-${rowAlign}`, { "ids-grid-row--no-gap": noGap }, className);
|
|
8
|
+
return (jsx("div", { ref: ref, className: classNames, style: style, ...props, children: children }));
|
|
9
|
+
});
|
|
10
|
+
IDSGridRow.displayName = "IDSGridRow";
|
|
11
|
+
|
|
12
|
+
export { IDSGridRow };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ReactNode, HTMLAttributes } from "react";
|
|
2
|
+
interface IDSHeader1177AvatarBaseProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
username?: string;
|
|
4
|
+
agent?: ReactNode;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
unresponsive?: boolean;
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
noMobileMenu?: boolean;
|
|
9
|
+
hide?: boolean;
|
|
10
|
+
client?: boolean;
|
|
11
|
+
onToggle?: () => void;
|
|
12
|
+
componentRef?: React.RefObject<HTMLDivElement>;
|
|
13
|
+
menuRef?: React.RefObject<HTMLDivElement>;
|
|
14
|
+
}
|
|
15
|
+
export declare function IDSHeader1177AvatarBase({ username, agent, children, unresponsive, expanded, hide, noMobileMenu, client, onToggle, componentRef, menuRef, ...props }: IDSHeader1177AvatarBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
|
|
5
|
+
function IDSHeader1177AvatarBase({ username, agent, children, unresponsive = false, expanded = false, hide = false, noMobileMenu = false, client = false, onToggle, componentRef, menuRef, ...props }) {
|
|
6
|
+
if (hide)
|
|
7
|
+
return null;
|
|
8
|
+
const menuId = `header-1177-avatar-menu${useId()}`;
|
|
9
|
+
const toggleHandler = client && onToggle
|
|
10
|
+
? {
|
|
11
|
+
onClick: onToggle
|
|
12
|
+
}
|
|
13
|
+
: {};
|
|
14
|
+
return (jsx("div", { ref: componentRef, className: clsx("ids-header-1177-avatar", {
|
|
15
|
+
"ids-header-1177-avatar--unresponsive": unresponsive
|
|
16
|
+
}), style: { flexGrow: username ? "1" : "0" }, ...props, children: username && (jsx("div", { className: "ids-header-1177-avatar__avatar", children: jsxs("div", { className: "ids-header-1177-avatar__menu-wrapper", children: [jsx("button", { className: clsx("ids-header-1177-avatar__button", {
|
|
17
|
+
"ids-header-1177-avatar__button--expanded": expanded
|
|
18
|
+
}), ...toggleHandler, "aria-controls": menuId, "aria-expanded": expanded, children: jsx("div", { className: "ids-header-1177-avatar__name", title: username, children: username }) }), jsxs("div", { ref: menuRef, id: menuId, className: clsx("ids-header-1177-avatar__menu", {
|
|
19
|
+
"ids-header-1177-avatar__menu--expanded": expanded,
|
|
20
|
+
"ids-header-1177-avatar__menu--no-mobile-menu": noMobileMenu
|
|
21
|
+
}), children: [agent && jsx("div", { className: "ids-header-1177-avatar__agent", children: agent }), agent && children && jsx("hr", {}), children && jsx("div", { className: "ids-header-1177-avatar__menu-links", children: children })] })] }) })) }));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { IDSHeader1177AvatarBase };
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
|
|
3
|
-
interface IDSHeader1177AvatarProps {
|
|
1
|
+
import React, { HTMLAttributes } from "react";
|
|
2
|
+
interface IDSHeader1177AvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
3
|
username?: string;
|
|
5
4
|
expanded?: boolean;
|
|
6
|
-
agent?: ReactNode;
|
|
7
|
-
children?: ReactNode;
|
|
5
|
+
agent?: React.ReactNode;
|
|
8
6
|
persistent?: boolean;
|
|
9
7
|
noMobileMenu?: boolean;
|
|
10
|
-
mobileMenu?: ReactNode;
|
|
11
8
|
}
|
|
12
|
-
export declare
|
|
9
|
+
export declare function IDSHeader1177Avatar({ expanded, persistent, children, ...props }: IDSHeader1177AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
13
10
|
export {};
|
|
@@ -1,57 +1,50 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '@inera/ids-design/components/header-1177/header-1177-avatar.css';
|
|
5
|
-
import clsx from 'clsx';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useRef, useEffect } from 'react';
|
|
6
4
|
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
5
|
+
import { IDSHeader1177AvatarBase } from './header-1177-avatar-base.js';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
const dropdownId = useId();
|
|
10
|
-
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
7
|
+
function IDSHeader1177Avatar({ expanded = false, persistent = false, children, ...props }) {
|
|
11
8
|
const headerContext = useHeaderContext();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
9
|
+
if (headerContext?.hideAvatar)
|
|
10
|
+
return null;
|
|
11
|
+
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
12
|
+
const componentRef = useRef(null);
|
|
13
|
+
const menuRef = useRef(null);
|
|
14
|
+
const toggleAvatar = () => setIsExpanded(prev => !prev);
|
|
15
|
+
// Close when clicking outside
|
|
20
16
|
useEffect(() => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
const handleClickOutside = (event) => {
|
|
18
|
+
if (!persistent && componentRef.current && !componentRef.current.contains(event.target)) {
|
|
19
|
+
setIsExpanded(false);
|
|
20
|
+
}
|
|
24
21
|
};
|
|
22
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
23
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
25
24
|
}, [persistent]);
|
|
25
|
+
// Escape should also close
|
|
26
26
|
useEffect(() => {
|
|
27
|
-
if (!
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
if (!isExpanded || persistent)
|
|
28
|
+
return;
|
|
29
|
+
const handleKeyDown = (event) => {
|
|
30
|
+
if (event.key === "Escape") {
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
setIsExpanded(false);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
36
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
34
37
|
}, [isExpanded, persistent]);
|
|
35
|
-
|
|
36
|
-
setIsExpanded(false);
|
|
37
|
-
};
|
|
38
|
+
// Clicking a link inside dropdown closes it
|
|
38
39
|
useEffect(() => {
|
|
39
40
|
if (!persistent && isExpanded) {
|
|
40
|
-
const links =
|
|
41
|
-
links.forEach(link => link.addEventListener("click",
|
|
42
|
-
return () =>
|
|
43
|
-
links.forEach(link => link.removeEventListener("click", handleLinkClick));
|
|
44
|
-
};
|
|
41
|
+
const links = menuRef.current?.querySelectorAll("a") || [];
|
|
42
|
+
links.forEach(link => link.addEventListener("click", closeOnClick));
|
|
43
|
+
return () => links.forEach(link => link.removeEventListener("click", closeOnClick));
|
|
45
44
|
}
|
|
46
45
|
}, [isExpanded, persistent]);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"ids-header-1177-avatar__button--expanded": isExpanded
|
|
51
|
-
}), onClick: toggleExpanded, "aria-controls": dropdownId, "aria-expanded": isExpanded, children: jsx("div", { className: "ids-header-1177-avatar__name", title: username, children: username }) }), jsxs("div", { ref: dropdownRef, id: dropdownId, className: clsx("ids-header-1177-avatar__menu", {
|
|
52
|
-
"ids-header-1177-avatar__menu--expanded": isExpanded,
|
|
53
|
-
"ids-header-1177-avatar__menu--mobile-menu": !noMobileMenu
|
|
54
|
-
}), children: [agent && jsx("div", { className: "ids-header-1177-avatar__agent", children: agent }), agent && children && jsx("hr", {}), children && jsx("div", { className: "ids-header-1177-avatar__menu-links", children: children })] })] }) })), mobileMenu] }));
|
|
55
|
-
};
|
|
46
|
+
const closeOnClick = () => setIsExpanded(false);
|
|
47
|
+
return (jsx(IDSHeader1177AvatarBase, { ...props, client: true, expanded: isExpanded, onToggle: toggleAvatar, componentRef: componentRef, menuRef: menuRef, unresponsive: headerContext?.unresponsive ?? false, children: children }));
|
|
48
|
+
}
|
|
56
49
|
|
|
57
50
|
export { IDSHeader1177Avatar };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { ReactNode, AnchorHTMLAttributes } from "react";
|
|
2
|
+
import "@inera/ids-design/components/header-1177/composite-header-1177.css";
|
|
3
|
+
interface IDSHeader1177BaseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
hideRegionPicker?: boolean;
|
|
5
|
+
unresponsive?: boolean;
|
|
6
|
+
logoHref?: string;
|
|
7
|
+
logoProps?: AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
8
|
+
logo?: ReactNode;
|
|
9
|
+
srLogoText?: string;
|
|
10
|
+
regionPicker?: ReactNode;
|
|
11
|
+
skipToContentLink?: ReactNode;
|
|
12
|
+
items?: ReactNode;
|
|
13
|
+
avatar?: ReactNode;
|
|
14
|
+
mobileMenu?: ReactNode;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare function IDSHeader1177Base({ srLogoText, hideRegionPicker, unresponsive, logoHref, logoProps, logo, regionPicker, skipToContentLink, items, avatar, mobileMenu, className, children, ...props }: IDSHeader1177BaseProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import '@inera/ids-design/components/header-1177/composite-header-1177.css';
|
|
4
|
+
|
|
5
|
+
function IDSHeader1177Base({ srLogoText = "Logotyp", hideRegionPicker = false, unresponsive = false, logoHref = "", logoProps = {}, logo, regionPicker, skipToContentLink, items, avatar, mobileMenu, className, children, ...props }) {
|
|
6
|
+
const renderLogo = () => {
|
|
7
|
+
return (jsx("div", { className: "ids-header-1177__logo-wrapper", children: jsx("div", { className: "ids-header-1177__logo", children: logo ? (jsx("span", { className: "ids-header-1177__link", children: logo })) : (jsx("a", { className: "ids-header-1177__logo-link", href: logoHref, "aria-label": srLogoText, ...logoProps })) }) }));
|
|
8
|
+
};
|
|
9
|
+
return (jsxs("header", { ...props, className: clsx("ids-header-1177", {
|
|
10
|
+
"ids-header-1177--unresponsive": unresponsive
|
|
11
|
+
}, className), children: [skipToContentLink && jsx("div", { className: "ids-header-1177__skip-to-content", children: skipToContentLink }), jsxs("div", { className: "ids-header-1177__container", children: [jsx("div", { className: "ids-header-1177__left" }), jsxs("div", { className: "ids-header-1177__inner", children: [jsxs("div", { className: "ids-header-1177__inner-left", children: [renderLogo(), !hideRegionPicker && regionPicker && jsx("div", { className: "ids-header-1177__region-picker", children: regionPicker })] }), jsxs("div", { className: "ids-header-1177__inner-right", children: [items, " ", avatar, " ", mobileMenu] })] }), jsx("div", { className: "ids-header-1177__right" })] }), children] }));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { IDSHeader1177Base };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
interface IDSHeader1177ItemBaseProps extends HTMLAttributes<HTMLElement> {
|
|
3
|
+
mobile?: boolean;
|
|
4
|
+
keepTextOnMobile?: boolean;
|
|
5
|
+
icon?: string;
|
|
6
|
+
unresponsive?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function IDSHeader1177ItemBase({ mobile, keepTextOnMobile, icon, children, unresponsive, ...props }: IDSHeader1177ItemBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|