@inera/ids-react 7.2.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/accordion.d.ts +1 -0
- package/components/accordion/accordion.js +5 -43
- package/components/alert/alert.d.ts +3 -3
- package/components/alert/alert.js +8 -5
- package/components/badge/badge.d.ts +3 -6
- package/components/badge/badge.js +3 -3
- package/components/box-link/box-link.d.ts +3 -5
- package/components/box-link/box-link.js +3 -4
- package/components/breadcrumbs/breadcrumbs.d.ts +2 -3
- package/components/breadcrumbs/breadcrumbs.js +5 -6
- package/components/button/button.d.ts +6 -8
- package/components/button/button.js +5 -79
- package/components/button-group/button-group.d.ts +2 -3
- package/components/button-group/button-group.js +2 -2
- package/components/card/card.d.ts +6 -7
- package/components/card/card.js +16 -10
- package/components/carousel/carousel-item.js +5 -5
- package/components/carousel/carousel.d.ts +0 -2
- package/components/carousel/carousel.js +22 -42
- package/components/date-label/date-label.d.ts +8 -2
- package/components/date-label/date-label.js +10 -17
- package/components/dialog/dialog.d.ts +13 -13
- package/components/dialog/dialog.js +10 -13
- package/components/dropdown/dropdown-content-button.d.ts +7 -0
- package/components/dropdown/dropdown-content-button.js +11 -0
- package/components/dropdown/dropdown-content-link.d.ts +1 -1
- package/components/dropdown/dropdown-content-link.js +4 -3
- package/components/dropdown/dropdown.d.ts +6 -5
- package/components/dropdown/dropdown.js +12 -11
- package/components/footer-1177/footer-1177.d.ts +3 -7
- package/components/footer-1177/footer-1177.js +9 -52
- package/components/footer-1177-admin/footer-1177-admin.d.ts +6 -8
- package/components/footer-1177-admin/footer-1177-admin.js +11 -53
- package/components/footer-1177-pro/footer-1177-pro.d.ts +16 -11
- package/components/footer-1177-pro/footer-1177-pro.js +13 -31
- package/components/footer-inera/footer-inera.d.ts +3 -7
- package/components/footer-inera/footer-inera.js +10 -53
- package/components/footer-inera-admin/footer-inera-admin.d.ts +3 -7
- package/components/footer-inera-admin/footer-inera-admin.js +12 -52
- package/components/form/check-button/check-button.d.ts +1 -0
- package/components/form/check-button/check-button.js +2 -2
- package/components/form/checkbox/checkbox-group.d.ts +1 -1
- package/components/form/checkbox/checkbox-group.js +6 -6
- package/components/form/checkbox/checkbox.d.ts +1 -0
- package/components/form/checkbox/checkbox.js +3 -3
- package/components/form/input/input.d.ts +2 -4
- package/components/form/input/input.js +16 -37
- package/components/form/radio/radio-group.d.ts +2 -2
- package/components/form/radio/radio-group.js +6 -6
- package/components/form/radio/radio.d.ts +3 -3
- package/components/form/radio/radio.js +2 -2
- package/components/form/radio-button/radio-button-group.d.ts +2 -2
- package/components/form/radio-button/radio-button-group.js +7 -7
- package/components/form/radio-button/radio-button.d.ts +4 -3
- package/components/form/radio-button/radio-button.js +2 -2
- package/components/form/range/range.d.ts +1 -0
- package/components/form/range/range.js +2 -2
- package/components/form/select/select.d.ts +1 -1
- package/components/form/select/select.js +5 -3
- package/components/form/select-multiple/select-multiple.d.ts +3 -0
- package/components/form/select-multiple/select-multiple.js +13 -6
- package/components/form/textarea/textarea.d.ts +1 -0
- package/components/form/textarea/textarea.js +2 -2
- package/components/form/time/time.d.ts +1 -0
- package/components/form/time/time.js +6 -6
- package/components/form/toggle/toggle.d.ts +1 -0
- package/components/form/toggle/toggle.js +5 -5
- package/components/global-alert/global-alert.d.ts +16 -0
- package/components/global-alert/global-alert.js +26 -0
- package/components/grid/column.d.ts +3 -4
- package/components/grid/column.js +2 -3
- package/components/grid/container.d.ts +4 -4
- package/components/grid/container.js +7 -18
- package/components/grid/row.d.ts +4 -4
- package/components/grid/row.js +6 -11
- package/components/header-1177/header-1177-avatar.d.ts +5 -2
- package/components/header-1177/header-1177-avatar.js +21 -10
- package/components/header-1177/header-1177-item.d.ts +3 -2
- package/components/header-1177/header-1177-item.js +22 -16
- package/components/header-1177/header-1177-menu-mobile.d.ts +1 -1
- package/components/header-1177/header-1177-menu-mobile.js +29 -18
- package/components/header-1177/header-1177-nav-item-mobile.js +7 -12
- package/components/header-1177/header-1177-nav-item.d.ts +4 -4
- package/components/header-1177/header-1177-nav-item.js +23 -18
- package/components/header-1177/header-1177-nav.d.ts +4 -2
- package/components/header-1177/header-1177-nav.js +6 -8
- package/components/header-1177/header-1177-region-picker-mobile.d.ts +9 -0
- package/components/header-1177/header-1177-region-picker-mobile.js +36 -0
- package/components/header-1177/header-1177-region-picker.d.ts +9 -0
- package/components/header-1177/header-1177-region-picker.js +34 -0
- package/components/header-1177/header-1177.d.ts +3 -7
- package/components/header-1177/header-1177.js +7 -36
- package/components/header-1177-admin/header-1177-admin-avatar-mobile.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-avatar-mobile.js +28 -3
- package/components/header-1177-admin/header-1177-admin-avatar.d.ts +3 -2
- package/components/header-1177-admin/header-1177-admin-avatar.js +31 -18
- package/components/header-1177-admin/header-1177-admin-item.d.ts +2 -2
- package/components/header-1177-admin/header-1177-admin-item.js +23 -19
- package/components/header-1177-admin/header-1177-admin-menu-mobile.d.ts +11 -0
- package/components/header-1177-admin/header-1177-admin-menu-mobile.js +53 -0
- package/components/header-1177-admin/header-1177-admin-nav-item.d.ts +4 -4
- package/components/header-1177-admin/header-1177-admin-nav-item.js +22 -17
- package/components/header-1177-admin/header-1177-admin-nav.d.ts +2 -2
- package/components/header-1177-admin/header-1177-admin-nav.js +7 -9
- package/components/header-1177-admin/header-1177-admin.d.ts +3 -6
- package/components/header-1177-admin/header-1177-admin.js +7 -21
- package/components/header-1177-pro/header-1177-pro-avatar-mobile.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-avatar-mobile.js +28 -3
- package/components/header-1177-pro/header-1177-pro-avatar.d.ts +3 -2
- package/components/header-1177-pro/header-1177-pro-avatar.js +31 -18
- package/components/header-1177-pro/header-1177-pro-item.d.ts +2 -2
- package/components/header-1177-pro/header-1177-pro-item.js +23 -16
- package/components/header-1177-pro/{header-1177-pro-nav-menu-mobile.d.ts → header-1177-pro-menu-mobile.d.ts} +3 -3
- package/components/header-1177-pro/header-1177-pro-menu-mobile.js +53 -0
- package/components/header-1177-pro/header-1177-pro-nav-item.d.ts +5 -5
- package/components/header-1177-pro/header-1177-pro-nav-item.js +17 -21
- package/components/header-1177-pro/header-1177-pro-nav.d.ts +4 -5
- package/components/header-1177-pro/header-1177-pro-nav.js +8 -25
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile.d.ts +9 -0
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile.js +36 -0
- package/components/header-1177-pro/header-1177-pro-region-picker.d.ts +9 -0
- package/components/header-1177-pro/header-1177-pro-region-picker.js +34 -0
- package/components/header-1177-pro/header-1177-pro.d.ts +6 -9
- package/components/header-1177-pro/header-1177-pro.js +6 -34
- package/components/header-inera/header-inera-item.d.ts +3 -4
- package/components/header-inera/header-inera-item.js +30 -15
- package/components/header-inera/header-inera-menu-mobile.d.ts +11 -0
- package/components/header-inera/header-inera-menu-mobile.js +54 -0
- package/components/header-inera/header-inera-nav-item.js +9 -25
- package/components/header-inera/header-inera-nav.d.ts +1 -1
- package/components/header-inera/header-inera-nav.js +6 -8
- package/components/header-inera/header-inera.d.ts +3 -4
- package/components/header-inera/header-inera.js +6 -13
- package/components/header-inera-admin/header-inera-admin-avatar-mobile.d.ts +5 -2
- package/components/header-inera-admin/header-inera-admin-avatar-mobile.js +23 -3
- package/components/header-inera-admin/header-inera-admin-avatar.d.ts +3 -4
- package/components/header-inera-admin/header-inera-admin-avatar.js +34 -22
- package/components/header-inera-admin/header-inera-admin-item.d.ts +3 -4
- package/components/header-inera-admin/header-inera-admin-item.js +17 -13
- package/components/header-inera-admin/header-inera-admin-menu-mobile.d.ts +11 -0
- package/components/header-inera-admin/header-inera-admin-menu-mobile.js +53 -0
- package/components/header-inera-admin/header-inera-admin-nav-item.d.ts +1 -3
- package/components/header-inera-admin/header-inera-admin-nav-item.js +15 -31
- package/components/header-inera-admin/header-inera-admin-nav.d.ts +2 -3
- package/components/header-inera-admin/header-inera-admin-nav.js +4 -6
- package/components/header-inera-admin/header-inera-admin.d.ts +2 -2
- package/components/header-inera-admin/header-inera-admin.js +6 -8
- package/components/header-patient/header-patient.d.ts +3 -3
- package/components/header-patient/header-patient.js +2 -2
- package/components/link/link.d.ts +4 -4
- package/components/link/link.js +17 -15
- package/components/mobile/menu/item/mobile-item.js +4 -4
- package/components/navigation/content/navigation-content.d.ts +3 -3
- package/components/navigation/content/navigation-content.js +7 -13
- package/components/navigation/local/navigation-local.d.ts +2 -3
- package/components/navigation/local/navigation-local.js +2 -2
- package/components/notification/badge/notification-badge.d.ts +2 -3
- package/components/notification/badge/notification-badge.js +2 -2
- package/components/pagination/data-pagination/data-pagination.d.ts +8 -13
- package/components/pagination/data-pagination/data-pagination.js +7 -8
- package/components/pagination/list-pagination/list-pagination.d.ts +1 -1
- package/components/pagination/list-pagination/list-pagination.js +7 -13
- package/components/popover/popover.js +9 -9
- package/components/progressbar/progressbar.d.ts +5 -3
- package/components/progressbar/progressbar.js +4 -4
- package/components/puff-list/puff-list-item/puff-list-item-date.d.ts +13 -0
- package/components/puff-list/puff-list-item/puff-list-item-date.js +23 -0
- package/components/puff-list/puff-list-item/puff-list-item-header.d.ts +10 -0
- package/components/puff-list/puff-list-item/puff-list-item-header.js +11 -0
- package/components/puff-list/puff-list-item/puff-list-item-info.d.ts +4 -5
- package/components/puff-list/puff-list-item/puff-list-item-info.js +5 -3
- package/components/puff-list/puff-list-item/puff-list-item.d.ts +10 -13
- package/components/puff-list/puff-list-item/puff-list-item.js +10 -46
- package/components/puff-list/puff-list.d.ts +1 -1
- package/components/puff-list/puff-list.js +4 -3
- package/components/region-icon/region-icon.d.ts +2 -2
- package/components/region-icon/region-icon.js +6 -6
- package/components/side-menu/side-menu.d.ts +1 -1
- package/components/side-menu/side-menu.js +7 -7
- package/components/side-panel/side-panel.d.ts +2 -0
- package/components/side-panel/side-panel.js +5 -5
- package/components/stepper/step.js +2 -2
- package/components/stepper/stepper.d.ts +1 -1
- package/components/stepper/stepper.js +5 -5
- package/components/tabs/tab-panel.js +2 -2
- package/components/tabs/tab.js +2 -2
- package/components/tabs/tabs.js +13 -13
- package/components/tag/tag.d.ts +11 -4
- package/components/tag/tag.js +7 -7
- package/components/tooltip/tooltip.d.ts +1 -0
- package/components/tooltip/tooltip.js +8 -7
- package/components/utils/contexts/HeaderContext.d.ts +0 -2
- package/components/utils/hooks/useFocusTrap.js +2 -1
- package/index.d.ts +18 -144
- package/index.js +18 -144
- package/package.json +2 -3
- package/components/agent/agent.d.ts +0 -12
- package/components/agent/agent.js +0 -18
- package/components/alert-global/alert-global.d.ts +0 -16
- package/components/alert-global/alert-global.js +0 -28
- package/components/header-1177-pro/header-1177-pro-nav-menu-mobile.js +0 -35
- package/components/header-inera/header-inera-nav-mobile.d.ts +0 -11
- package/components/header-inera/header-inera-nav-mobile.js +0 -47
- package/components/header-inera-admin/header-inera-admin-nav-mobile.d.ts +0 -12
- package/components/header-inera-admin/header-inera-admin-nav-mobile.js +0 -35
- package/components/icons/icon-1177.d.ts +0 -3
- package/components/icons/icon-1177.js +0 -12
- package/components/icons/icon-activity.d.ts +0 -3
- package/components/icons/icon-activity.js +0 -12
- package/components/icons/icon-agent.d.ts +0 -3
- package/components/icons/icon-agent.js +0 -12
- package/components/icons/icon-alarm-clock-inactivity.d.ts +0 -3
- package/components/icons/icon-alarm-clock-inactivity.js +0 -12
- package/components/icons/icon-alarm-clock-neutral.d.ts +0 -3
- package/components/icons/icon-alarm-clock-neutral.js +0 -12
- package/components/icons/icon-archive.d.ts +0 -3
- package/components/icons/icon-archive.js +0 -12
- package/components/icons/icon-arrow.d.ts +0 -3
- package/components/icons/icon-arrow.js +0 -12
- package/components/icons/icon-attention.d.ts +0 -3
- package/components/icons/icon-attention.js +0 -12
- package/components/icons/icon-blekinge.d.ts +0 -3
- package/components/icons/icon-blekinge.js +0 -12
- package/components/icons/icon-bookmark.d.ts +0 -3
- package/components/icons/icon-bookmark.js +0 -12
- package/components/icons/icon-calendar.d.ts +0 -3
- package/components/icons/icon-calendar.js +0 -12
- package/components/icons/icon-call-active.d.ts +0 -3
- package/components/icons/icon-call-active.js +0 -12
- package/components/icons/icon-call.d.ts +0 -3
- package/components/icons/icon-call.js +0 -12
- package/components/icons/icon-camera-off.d.ts +0 -3
- package/components/icons/icon-camera-off.js +0 -12
- package/components/icons/icon-camera-on.d.ts +0 -3
- package/components/icons/icon-camera-on.js +0 -12
- package/components/icons/icon-camera-switch.d.ts +0 -3
- package/components/icons/icon-camera-switch.js +0 -12
- package/components/icons/icon-chart-bar.d.ts +0 -3
- package/components/icons/icon-chart-bar.js +0 -12
- package/components/icons/icon-chart-line.d.ts +0 -3
- package/components/icons/icon-chart-line.js +0 -12
- package/components/icons/icon-chat.d.ts +0 -3
- package/components/icons/icon-chat.js +0 -12
- package/components/icons/icon-check.d.ts +0 -3
- package/components/icons/icon-check.js +0 -12
- package/components/icons/icon-chevron-bold.d.ts +0 -3
- package/components/icons/icon-chevron-bold.js +0 -12
- package/components/icons/icon-chevron.d.ts +0 -3
- package/components/icons/icon-chevron.js +0 -12
- package/components/icons/icon-clipboard-cross.d.ts +0 -3
- package/components/icons/icon-clipboard-cross.js +0 -12
- package/components/icons/icon-clipboard-text.d.ts +0 -3
- package/components/icons/icon-clipboard-text.js +0 -12
- package/components/icons/icon-clipboard.d.ts +0 -3
- package/components/icons/icon-clipboard.js +0 -12
- package/components/icons/icon-clock.d.ts +0 -3
- package/components/icons/icon-clock.js +0 -12
- package/components/icons/icon-close-bold.d.ts +0 -3
- package/components/icons/icon-close-bold.js +0 -12
- package/components/icons/icon-close.d.ts +0 -3
- package/components/icons/icon-close.js +0 -12
- package/components/icons/icon-cog.d.ts +0 -3
- package/components/icons/icon-cog.js +0 -12
- package/components/icons/icon-computer-inera.d.ts +0 -3
- package/components/icons/icon-computer-inera.js +0 -12
- package/components/icons/icon-computer.d.ts +0 -3
- package/components/icons/icon-computer.js +0 -12
- package/components/icons/icon-copy-file.d.ts +0 -3
- package/components/icons/icon-copy-file.js +0 -12
- package/components/icons/icon-copy-link.d.ts +0 -3
- package/components/icons/icon-copy-link.js +0 -12
- package/components/icons/icon-dalarna.d.ts +0 -3
- package/components/icons/icon-dalarna.js +0 -12
- package/components/icons/icon-denied.d.ts +0 -3
- package/components/icons/icon-denied.js +0 -12
- package/components/icons/icon-doctors-bag.d.ts +0 -3
- package/components/icons/icon-doctors-bag.js +0 -12
- package/components/icons/icon-document.d.ts +0 -3
- package/components/icons/icon-document.js +0 -12
- package/components/icons/icon-download.d.ts +0 -3
- package/components/icons/icon-download.js +0 -12
- package/components/icons/icon-drag-n-drop.d.ts +0 -3
- package/components/icons/icon-drag-n-drop.js +0 -12
- package/components/icons/icon-ear-hearing.d.ts +0 -3
- package/components/icons/icon-ear-hearing.js +0 -12
- package/components/icons/icon-edit.d.ts +0 -3
- package/components/icons/icon-edit.js +0 -12
- package/components/icons/icon-email-sent.d.ts +0 -3
- package/components/icons/icon-email-sent.js +0 -12
- package/components/icons/icon-email-unread.d.ts +0 -3
- package/components/icons/icon-email-unread.js +0 -12
- package/components/icons/icon-email.d.ts +0 -3
- package/components/icons/icon-email.js +0 -12
- package/components/icons/icon-expand.d.ts +0 -3
- package/components/icons/icon-expand.js +0 -12
- package/components/icons/icon-external.d.ts +0 -3
- package/components/icons/icon-external.js +0 -12
- package/components/icons/icon-facebook.d.ts +0 -3
- package/components/icons/icon-facebook.js +0 -12
- package/components/icons/icon-file-csv.d.ts +0 -3
- package/components/icons/icon-file-csv.js +0 -12
- package/components/icons/icon-file-excel.d.ts +0 -3
- package/components/icons/icon-file-excel.js +0 -12
- package/components/icons/icon-file-other.d.ts +0 -3
- package/components/icons/icon-file-other.js +0 -12
- package/components/icons/icon-file-pdf.d.ts +0 -3
- package/components/icons/icon-file-pdf.js +0 -12
- package/components/icons/icon-file-picture.d.ts +0 -3
- package/components/icons/icon-file-picture.js +0 -12
- package/components/icons/icon-file-powerpoint.d.ts +0 -3
- package/components/icons/icon-file-powerpoint.js +0 -12
- package/components/icons/icon-file-word.d.ts +0 -3
- package/components/icons/icon-file-word.js +0 -12
- package/components/icons/icon-find-care.d.ts +0 -3
- package/components/icons/icon-find-care.js +0 -12
- package/components/icons/icon-find-region.d.ts +0 -3
- package/components/icons/icon-find-region.js +0 -12
- package/components/icons/icon-flag.d.ts +0 -3
- package/components/icons/icon-flag.js +0 -12
- package/components/icons/icon-form-numbered-reocurring.d.ts +0 -3
- package/components/icons/icon-form-numbered-reocurring.js +0 -12
- package/components/icons/icon-form-numbered.d.ts +0 -3
- package/components/icons/icon-form-numbered.js +0 -12
- package/components/icons/icon-gavleborg.d.ts +0 -3
- package/components/icons/icon-gavleborg.js +0 -12
- package/components/icons/icon-gotland.d.ts +0 -3
- package/components/icons/icon-gotland.js +0 -12
- package/components/icons/icon-halland.d.ts +0 -3
- package/components/icons/icon-halland.js +0 -12
- package/components/icons/icon-headphones.d.ts +0 -3
- package/components/icons/icon-headphones.js +0 -12
- package/components/icons/icon-hourglass-end.d.ts +0 -3
- package/components/icons/icon-hourglass-end.js +0 -12
- package/components/icons/icon-hourglass-start.d.ts +0 -3
- package/components/icons/icon-hourglass-start.js +0 -12
- package/components/icons/icon-hourglass.d.ts +0 -3
- package/components/icons/icon-hourglass.js +0 -12
- package/components/icons/icon-house.d.ts +0 -3
- package/components/icons/icon-house.js +0 -12
- package/components/icons/icon-id-card-locked.d.ts +0 -3
- package/components/icons/icon-id-card-locked.js +0 -12
- package/components/icons/icon-id-card.d.ts +0 -3
- package/components/icons/icon-id-card.js +0 -12
- package/components/icons/icon-image.d.ts +0 -3
- package/components/icons/icon-image.js +0 -12
- package/components/icons/icon-inera-legacy.d.ts +0 -3
- package/components/icons/icon-inera-legacy.js +0 -12
- package/components/icons/icon-inera.d.ts +0 -3
- package/components/icons/icon-inera.js +0 -12
- package/components/icons/icon-information.d.ts +0 -3
- package/components/icons/icon-information.js +0 -12
- package/components/icons/icon-jamtland-harjedalen.d.ts +0 -3
- package/components/icons/icon-jamtland-harjedalen.js +0 -12
- package/components/icons/icon-jonkoping.d.ts +0 -3
- package/components/icons/icon-jonkoping.js +0 -12
- package/components/icons/icon-kalmar.d.ts +0 -3
- package/components/icons/icon-kalmar.js +0 -12
- package/components/icons/icon-kronoberg.d.ts +0 -3
- package/components/icons/icon-kronoberg.js +0 -12
- package/components/icons/icon-lightbulb.d.ts +0 -3
- package/components/icons/icon-lightbulb.js +0 -12
- package/components/icons/icon-linkedin.d.ts +0 -3
- package/components/icons/icon-linkedin.js +0 -12
- package/components/icons/icon-list.d.ts +0 -3
- package/components/icons/icon-list.js +0 -12
- package/components/icons/icon-lock-open.d.ts +0 -3
- package/components/icons/icon-lock-open.js +0 -12
- package/components/icons/icon-lock.d.ts +0 -3
- package/components/icons/icon-lock.js +0 -12
- package/components/icons/icon-log-locked.d.ts +0 -3
- package/components/icons/icon-log-locked.js +0 -12
- package/components/icons/icon-log.d.ts +0 -3
- package/components/icons/icon-log.js +0 -12
- package/components/icons/icon-menu.d.ts +0 -3
- package/components/icons/icon-menu.js +0 -12
- package/components/icons/icon-minus.d.ts +0 -3
- package/components/icons/icon-minus.js +0 -12
- package/components/icons/icon-moment-start.d.ts +0 -3
- package/components/icons/icon-moment-start.js +0 -12
- package/components/icons/icon-moment-stop.d.ts +0 -3
- package/components/icons/icon-moment-stop.js +0 -12
- package/components/icons/icon-norrbotten.d.ts +0 -3
- package/components/icons/icon-norrbotten.js +0 -12
- package/components/icons/icon-office-building.d.ts +0 -3
- package/components/icons/icon-office-building.js +0 -12
- package/components/icons/icon-orebro.d.ts +0 -3
- package/components/icons/icon-orebro.js +0 -12
- package/components/icons/icon-organization.d.ts +0 -3
- package/components/icons/icon-organization.js +0 -12
- package/components/icons/icon-ostergotland.d.ts +0 -3
- package/components/icons/icon-ostergotland.js +0 -12
- package/components/icons/icon-plus.d.ts +0 -3
- package/components/icons/icon-plus.js +0 -12
- package/components/icons/icon-prescription.d.ts +0 -3
- package/components/icons/icon-prescription.js +0 -12
- package/components/icons/icon-print.d.ts +0 -3
- package/components/icons/icon-print.js +0 -12
- package/components/icons/icon-question.d.ts +0 -3
- package/components/icons/icon-question.js +0 -12
- package/components/icons/icon-reload.d.ts +0 -3
- package/components/icons/icon-reload.js +0 -12
- package/components/icons/icon-reply.d.ts +0 -3
- package/components/icons/icon-reply.js +0 -12
- package/components/icons/icon-search-inera.d.ts +0 -3
- package/components/icons/icon-search-inera.js +0 -12
- package/components/icons/icon-search.d.ts +0 -3
- package/components/icons/icon-search.js +0 -12
- package/components/icons/icon-share.d.ts +0 -3
- package/components/icons/icon-share.js +0 -12
- package/components/icons/icon-shield-locked-primary.d.ts +0 -3
- package/components/icons/icon-shield-locked-primary.js +0 -12
- package/components/icons/icon-shield-locked.d.ts +0 -3
- package/components/icons/icon-shield-locked.js +0 -12
- package/components/icons/icon-skane.d.ts +0 -3
- package/components/icons/icon-skane.js +0 -12
- package/components/icons/icon-sormland.d.ts +0 -3
- package/components/icons/icon-sormland.js +0 -12
- package/components/icons/icon-star-filled.d.ts +0 -3
- package/components/icons/icon-star-filled.js +0 -12
- package/components/icons/icon-star.d.ts +0 -3
- package/components/icons/icon-star.js +0 -12
- package/components/icons/icon-stockholm.d.ts +0 -3
- package/components/icons/icon-stockholm.js +0 -12
- package/components/icons/icon-success.d.ts +0 -3
- package/components/icons/icon-success.js +0 -12
- package/components/icons/icon-swap.d.ts +0 -3
- package/components/icons/icon-swap.js +0 -12
- package/components/icons/icon-switch-person.d.ts +0 -3
- package/components/icons/icon-switch-person.js +0 -12
- package/components/icons/icon-telephone.d.ts +0 -3
- package/components/icons/icon-telephone.js +0 -12
- package/components/icons/icon-test-tube-analyze.d.ts +0 -3
- package/components/icons/icon-test-tube-analyze.js +0 -12
- package/components/icons/icon-test-tube-empty.d.ts +0 -3
- package/components/icons/icon-test-tube-empty.js +0 -12
- package/components/icons/icon-test-tube.d.ts +0 -3
- package/components/icons/icon-test-tube.js +0 -12
- package/components/icons/icon-toggle-card.d.ts +0 -3
- package/components/icons/icon-toggle-card.js +0 -12
- package/components/icons/icon-toggle-list.d.ts +0 -3
- package/components/icons/icon-toggle-list.js +0 -12
- package/components/icons/icon-trash.d.ts +0 -3
- package/components/icons/icon-trash.js +0 -12
- package/components/icons/icon-twitter.d.ts +0 -3
- package/components/icons/icon-twitter.js +0 -12
- package/components/icons/icon-uppsala.d.ts +0 -3
- package/components/icons/icon-uppsala.js +0 -12
- package/components/icons/icon-user.d.ts +0 -3
- package/components/icons/icon-user.js +0 -12
- package/components/icons/icon-varmland.d.ts +0 -3
- package/components/icons/icon-varmland.js +0 -12
- package/components/icons/icon-vasterbotten.d.ts +0 -3
- package/components/icons/icon-vasterbotten.js +0 -12
- package/components/icons/icon-vasternorrland.d.ts +0 -3
- package/components/icons/icon-vasternorrland.js +0 -12
- package/components/icons/icon-vastmanland.d.ts +0 -3
- package/components/icons/icon-vastmanland.js +0 -12
- package/components/icons/icon-vastra-gotaland.d.ts +0 -3
- package/components/icons/icon-vastra-gotaland.js +0 -12
- package/components/icons/icon-video-off.d.ts +0 -3
- package/components/icons/icon-video-off.js +0 -12
- package/components/icons/icon-video-on.d.ts +0 -3
- package/components/icons/icon-video-on.js +0 -12
- package/components/icons/icon-video-switch.d.ts +0 -3
- package/components/icons/icon-video-switch.js +0 -12
- package/components/icons/icon-visibility-off.d.ts +0 -3
- package/components/icons/icon-visibility-off.js +0 -12
- package/components/icons/icon-visibility.d.ts +0 -3
- package/components/icons/icon-visibility.js +0 -12
- package/components/icons/icon-warning.d.ts +0 -3
- package/components/icons/icon-warning.js +0 -12
- package/components/icons/icon-x.d.ts +0 -3
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
2
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef, useRef } from 'react';
|
|
4
4
|
import { useElementId } from '../../utils/hooks/useElementId.js';
|
|
5
5
|
import { IDSErrorMessage } from '../error-message/error-message.js';
|
|
6
6
|
import { useInputValidity } from '../form-hooks/useInputValidity.js';
|
|
7
7
|
import { useAriaDescribedBy } from '../form-hooks/useAriaDescribedBy.js';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
|
|
10
|
-
const IDSInput = forwardRef(({ label = "", type = "text", icon = "", hint = "", showSearchLabel = false, errorMsg = "",
|
|
10
|
+
const IDSInput = forwardRef(({ label = "", type = "text", icon = "", hint = "", showSearchLabel = false, errorMsg = "", dataTestId = "", disabled = false, invalid = false, required = false, noValidation = false, focusAnchor = false, light = false, readOnly = false, id, tooltip, submitButton, className, ...props }, ref) => {
|
|
11
11
|
const fieldId = useElementId(id);
|
|
12
12
|
const errorMsgId = useElementId();
|
|
13
13
|
const hintId = useElementId();
|
|
14
|
-
const oldIconRef = useRef(null);
|
|
15
14
|
const inputRef = useRef(null);
|
|
16
15
|
const combinedRef = (node) => {
|
|
17
16
|
inputRef.current = node;
|
|
@@ -23,39 +22,19 @@ const IDSInput = forwardRef(({ label = "", type = "text", icon = "", hint = "",
|
|
|
23
22
|
const hasValidValue = useInputValidity(inputRef);
|
|
24
23
|
const isInvalid = (invalid || !hasValidValue) && !noValidation;
|
|
25
24
|
useAriaDescribedBy(inputRef, errorMsgId, isInvalid, !!errorMsg && !noValidation, !!hint, hintId);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
if (disabled) {
|
|
40
|
-
color = "var(--IDS-INPUT--DISABLED__ICON-FILL)";
|
|
41
|
-
color2 = "var(--IDS-INPUT--DISABLED__ICON-FILL)";
|
|
42
|
-
}
|
|
43
|
-
iconComponent.setAttribute("color", color);
|
|
44
|
-
iconComponent.setAttribute("color2", color2);
|
|
45
|
-
};
|
|
46
|
-
const renderOldIcon = oldIcon && React__default.isValidElement(oldIcon) ? React__default.cloneElement(oldIcon, { ref: oldIconRef }) : oldIcon;
|
|
47
|
-
return (jsxs("div", { className: clsx("ids-input-component", className), children: [jsxs("div", { className: "ids-label-tooltip-wrapper", children: [jsx("label", { className: clsx("ids-label", {
|
|
48
|
-
"ids-label--disabled": disabled || readOnly,
|
|
49
|
-
"ids-hidden": type === "search" && !showSearchLabel
|
|
50
|
-
}), "aria-hidden": "false", htmlFor: fieldId, children: label }), tooltip] }), jsxs("div", { className: "ids-input__wrapper", children: [jsxs("div", { className: clsx("ids-input__inner-wrapper", {
|
|
51
|
-
"ids-input--icon": icon,
|
|
52
|
-
"ids-input__inner-wrapper--search": type === "search"
|
|
53
|
-
}), children: [jsx("input", { ref: combinedRef, id: fieldId, type: type, readOnly: readOnly, className: clsx("ids-input", {
|
|
54
|
-
"ids-input--light": light,
|
|
55
|
-
"ids-input--invalid": invalid,
|
|
56
|
-
"ids-focus-anchor": focusAnchor
|
|
57
|
-
}), "aria-invalid": isInvalid, required: required, "aria-required": required, disabled: disabled, "aria-disabled": disabled, ...props }), type === "search" && jsx("span", { className: "ids-input__search-icon" }), icon && jsx("span", { className: `ids-input__icon ids-icon-${icon}` }), oldIcon && jsx("span", { className: "ids-input__icon", children: renderOldIcon })] }), submitButton] }), hint && (jsx("div", { id: hintId, className: "ids-input__hint", children: hint })), isInvalid && errorMsg && (jsx(IDSErrorMessage, { id: errorMsgId, show: true, children: errorMsg }))] }));
|
|
25
|
+
const inputElement = (jsxs("div", { className: clsx("ids-input__wrapper", {
|
|
26
|
+
"ids-input--icon": icon
|
|
27
|
+
}), "data-testid": dataTestId, children: [type === "search" && jsx("span", { className: "ids-input__search-icon" }), jsx("input", { ref: combinedRef, id: fieldId, type: type, readOnly: readOnly, className: clsx("ids-input__input", {
|
|
28
|
+
"ids-input--light": light,
|
|
29
|
+
"ids-input--invalid": invalid,
|
|
30
|
+
"ids-focus-anchor": focusAnchor
|
|
31
|
+
}), "aria-invalid": isInvalid, required: required, "aria-required": required, disabled: disabled, "aria-disabled": disabled, ...props }), icon && type !== "search" && jsx("span", { className: `ids-input__icon ids-icon-${icon}` })] }));
|
|
32
|
+
const labelElement = (jsxs("div", { className: "ids-label-tooltip-wrapper", children: [jsx("label", { className: clsx("ids-label", {
|
|
33
|
+
"ids-label--disabled": disabled || readOnly,
|
|
34
|
+
"ids-hidden": type === "search" && !showSearchLabel
|
|
35
|
+
}), htmlFor: fieldId, children: label }), tooltip] }));
|
|
36
|
+
return (jsxs("div", { className: clsx("ids-input", { "ids-input--search": type === "search" }, className), children: [type === "search" ? (jsxs(Fragment, { children: [jsxs("div", { className: "ids-input__search-wrapper", children: [labelElement, inputElement] }), submitButton] })) : (jsxs(Fragment, { children: [labelElement, inputElement] })), hint && (jsx("div", { id: hintId, className: "ids-input__hint", children: hint })), isInvalid && errorMsg && (jsx(IDSErrorMessage, { id: errorMsgId, show: true, children: errorMsg }))] }));
|
|
58
37
|
});
|
|
59
|
-
IDSInput.displayName = "IDSInput";
|
|
38
|
+
IDSInput.displayName = "IDSInput";
|
|
60
39
|
|
|
61
40
|
export { IDSInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode, ChangeEvent } from "react";
|
|
2
2
|
interface IDSRadioGroupProps extends React.FieldsetHTMLAttributes<HTMLFieldSetElement> {
|
|
3
3
|
name: string;
|
|
4
4
|
legend?: string;
|
|
@@ -7,7 +7,7 @@ interface IDSRadioGroupProps extends React.FieldsetHTMLAttributes<HTMLFieldSetEl
|
|
|
7
7
|
required?: boolean;
|
|
8
8
|
tooltip?: ReactNode;
|
|
9
9
|
children?: ReactNode;
|
|
10
|
-
onRadioChange?: (e:
|
|
10
|
+
onRadioChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare const IDSRadioGroup: React.FC<IDSRadioGroupProps>;
|
|
13
13
|
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React, { useRef } from 'react';
|
|
4
4
|
import { IDSErrorMessage } from '../error-message/error-message.js';
|
|
5
5
|
import { useElementId } from '../../utils/hooks/useElementId.js';
|
|
6
6
|
import { useGroupValidity } from '../form-hooks/useGroupValidity.js';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
|
|
9
|
-
const IDSRadioGroup = ({ name = "options", legend = "", errorMsg = "", compact = false, required = false, onRadioChange, tooltip, className, children }) => {
|
|
9
|
+
const IDSRadioGroup = ({ name = "options", legend = "", errorMsg = "", compact = false, required = false, onRadioChange, tooltip, className, children, ...props }) => {
|
|
10
10
|
const groupRef = useRef(null);
|
|
11
11
|
const isValid = useGroupValidity(groupRef, "radio");
|
|
12
12
|
const errorMsgId = useElementId();
|
|
13
|
-
const clonedChildren =
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
13
|
+
const clonedChildren = React.Children.map(children, child => {
|
|
14
|
+
if (React.isValidElement(child) && child.type.displayName === "IDSRadio") {
|
|
15
|
+
return React.cloneElement(child, {
|
|
16
16
|
key: child.props.id,
|
|
17
17
|
name,
|
|
18
18
|
required,
|
|
@@ -25,7 +25,7 @@ const IDSRadioGroup = ({ name = "options", legend = "", errorMsg = "", compact =
|
|
|
25
25
|
});
|
|
26
26
|
return (jsxs("fieldset", { ref: groupRef, "aria-required": required, className: clsx("ids-form-group__fieldset", {
|
|
27
27
|
"ids-form-group__fieldset--compact": compact
|
|
28
|
-
}, className), children: [jsxs("legend", { children: [legend, tooltip] }), clonedChildren, !isValid && !!errorMsg && (jsx(IDSErrorMessage, { id: errorMsgId, show: true, children: errorMsg }))] }));
|
|
28
|
+
}, className), ...props, children: [jsxs("legend", { children: [legend, tooltip] }), clonedChildren, !isValid && !!errorMsg && (jsx(IDSErrorMessage, { id: errorMsgId, show: true, children: errorMsg }))] }));
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export { IDSRadioGroup };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode, ChangeEvent, InputHTMLAttributes } from "react";
|
|
2
2
|
export interface IDSRadioProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
3
|
name?: string;
|
|
4
4
|
id?: string;
|
|
@@ -6,7 +6,6 @@ export interface IDSRadioProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
6
6
|
invalid?: boolean;
|
|
7
7
|
groupInvalid?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
-
noLabel?: boolean;
|
|
10
9
|
noValidation?: boolean;
|
|
11
10
|
light?: boolean;
|
|
12
11
|
compact?: boolean;
|
|
@@ -14,5 +13,6 @@ export interface IDSRadioProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
14
13
|
tooltip?: ReactNode;
|
|
15
14
|
children?: ReactNode;
|
|
16
15
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
dataTestId?: string;
|
|
17
17
|
}
|
|
18
|
-
export declare const IDSRadio:
|
|
18
|
+
export declare const IDSRadio: import("react").ForwardRefExoticComponent<IDSRadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -6,7 +6,7 @@ import { useInputValidity } from '../form-hooks/useInputValidity.js';
|
|
|
6
6
|
import { useAriaDescribedBy } from '../form-hooks/useAriaDescribedBy.js';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
|
|
9
|
-
const IDSRadio = forwardRef(({ name = "", groupErrorMsgId = "", invalid = false, groupInvalid = false, disabled = false, noValidation = false, light = false, compact = false, focusAnchor = false, tooltip, id, children, className, onChange, ...props }, ref) => {
|
|
9
|
+
const IDSRadio = forwardRef(({ name = "", groupErrorMsgId = "", invalid = false, groupInvalid = false, disabled = false, noValidation = false, light = false, compact = false, focusAnchor = false, dataTestId = "", tooltip, id, children, className, onChange, ...props }, ref) => {
|
|
10
10
|
const fieldId = useElementId(id);
|
|
11
11
|
const radioRef = useRef(null);
|
|
12
12
|
useImperativeHandle(ref, () => radioRef.current);
|
|
@@ -15,7 +15,7 @@ const IDSRadio = forwardRef(({ name = "", groupErrorMsgId = "", invalid = false,
|
|
|
15
15
|
useAriaDescribedBy(radioRef, groupErrorMsgId, isInvalid, !!groupErrorMsgId);
|
|
16
16
|
return (jsxs("div", { className: clsx("ids-radio", {
|
|
17
17
|
"ids-radio--compact": compact
|
|
18
|
-
}, className), children: [jsx("input", { id: fieldId, ref: radioRef, type: "radio", className: clsx("ids-radio__input", {
|
|
18
|
+
}, className), "data-testid": dataTestId, children: [jsx("input", { id: fieldId, ref: radioRef, type: "radio", className: clsx("ids-radio__input", {
|
|
19
19
|
"ids-input--light": light,
|
|
20
20
|
"ids-focus-anchor": focusAnchor
|
|
21
21
|
}), disabled: disabled, "aria-disabled": disabled, "aria-invalid": isInvalid, name: name, onChange: onChange, ...props }), jsxs("div", { className: clsx("ids-label-tooltip-wrapper", {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode, InputHTMLAttributes } from "react";
|
|
2
|
-
interface IDSRadioButtonGroupProps extends InputHTMLAttributes<
|
|
2
|
+
interface IDSRadioButtonGroupProps extends InputHTMLAttributes<HTMLFieldSetElement> {
|
|
3
3
|
name: string;
|
|
4
4
|
legend?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
|
|
6
|
+
onRadioChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
7
|
}
|
|
8
8
|
export declare const IDSRadioButtonGroup: React.FC<IDSRadioButtonGroupProps>;
|
|
9
9
|
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React, { useRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
|
|
6
|
-
const IDSRadioButtonGroup = ({ name = "options", legend = "",
|
|
6
|
+
const IDSRadioButtonGroup = ({ name = "options", legend = "", onRadioChange, className, children, ...props }) => {
|
|
7
7
|
const groupRef = useRef(null);
|
|
8
|
-
const clonedChildren =
|
|
9
|
-
if (
|
|
10
|
-
return
|
|
8
|
+
const clonedChildren = React.Children.map(children, child => {
|
|
9
|
+
if (React.isValidElement(child) && child.type.displayName === "IDSRadioButton") {
|
|
10
|
+
return React.cloneElement(child, {
|
|
11
11
|
key: child.props.id,
|
|
12
12
|
icon: child.props.icon,
|
|
13
13
|
name,
|
|
14
|
-
onChange
|
|
14
|
+
onChange: onRadioChange
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
return child;
|
|
18
18
|
});
|
|
19
|
-
return (jsxs("fieldset", { ref: groupRef, className: clsx("ids-form-group__fieldset", className), children: [jsx("legend", { children: legend && legend }), clonedChildren] }));
|
|
19
|
+
return (jsxs("fieldset", { ref: groupRef, className: clsx("ids-form-group__fieldset", className), ...props, children: [jsx("legend", { children: legend && legend }), clonedChildren] }));
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export { IDSRadioButtonGroup };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ChangeEvent, ReactNode, InputHTMLAttributes } from "react";
|
|
2
2
|
export interface IDSRadioButtonProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
3
|
name?: string;
|
|
4
4
|
id?: string;
|
|
5
5
|
focusAnchor?: boolean;
|
|
6
6
|
icon: string;
|
|
7
7
|
children?: ReactNode;
|
|
8
|
-
|
|
8
|
+
dataTestId?: string;
|
|
9
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
9
10
|
}
|
|
10
|
-
export declare const IDSRadioButton:
|
|
11
|
+
export declare const IDSRadioButton: import("react").ForwardRefExoticComponent<IDSRadioButtonProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -4,11 +4,11 @@ import { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
|
4
4
|
import { useElementId } from '../../utils/hooks/useElementId.js';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
|
-
const IDSRadioButton = forwardRef(({ name = "", icon = "user", focusAnchor = false, id, children, onChange, className, ...props }, ref) => {
|
|
7
|
+
const IDSRadioButton = forwardRef(({ name = "", icon = "user", focusAnchor = false, id, children, onChange, dataTestId = "", className, ...props }, ref) => {
|
|
8
8
|
const fieldId = useElementId(id);
|
|
9
9
|
const radioButtonRef = useRef(null);
|
|
10
10
|
useImperativeHandle(ref, () => radioButtonRef.current);
|
|
11
|
-
return (jsxs("div", { className: clsx("ids-radio-button", className), children: [jsx("input", { id: fieldId, ref: radioButtonRef, type: "radio", className: clsx("ids-radio-button__input", {
|
|
11
|
+
return (jsxs("div", { className: clsx("ids-radio-button", className), "data-testid": dataTestId, children: [jsx("input", { id: fieldId, ref: radioButtonRef, type: "radio", className: clsx("ids-radio-button__input", {
|
|
12
12
|
"ids-focus-anchor": focusAnchor
|
|
13
13
|
}), name: name, onChange: onChange, ...props }), jsx("label", { htmlFor: fieldId, className: `ids-radio-button__label ids-icon-${icon}`, children: children })] }));
|
|
14
14
|
});
|
|
@@ -5,7 +5,7 @@ import { useElementId } from '../../utils/hooks/useElementId.js';
|
|
|
5
5
|
import '@inera/ids-design/components/form/range/range.css';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
|
|
8
|
-
const IDSRange = forwardRef(({ label = "", value = 0, showTicks = false, interval = 0, min = 0, max = 0, step = 0, disabled = false, focusAnchor = false, tooltip, id, onChange, className, ...props }, ref) => {
|
|
8
|
+
const IDSRange = forwardRef(({ label = "", value = 0, showTicks = false, interval = 0, min = 0, max = 0, step = 0, disabled = false, focusAnchor = false, dataTestId = "", tooltip, id, onChange, className, ...props }, ref) => {
|
|
9
9
|
const [internalValue, setInternalValue] = useState(value);
|
|
10
10
|
const [ticks, setTicks] = useState([]);
|
|
11
11
|
const fieldId = useElementId(id);
|
|
@@ -27,7 +27,7 @@ const IDSRange = forwardRef(({ label = "", value = 0, showTicks = false, interva
|
|
|
27
27
|
onChange(ev);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
return (jsxs("div", { className: clsx("ids-range", className), children: [jsxs("div", { className: "ids-label-tooltip-wrapper", children: [jsx("label", { htmlFor: fieldId, className: clsx("ids-label", { "ids-label--disabled": disabled }), children: label }), tooltip] }), jsx("input", { id: fieldId, ref: rangeRef, type: "range", className: clsx("ids-range__input", {
|
|
30
|
+
return (jsxs("div", { className: clsx("ids-range", className), "data-testid": dataTestId, children: [jsxs("div", { className: "ids-label-tooltip-wrapper", children: [jsx("label", { htmlFor: fieldId, className: clsx("ids-label", { "ids-label--disabled": disabled }), children: label }), tooltip] }), jsx("input", { id: fieldId, ref: rangeRef, type: "range", className: clsx("ids-range__input", {
|
|
31
31
|
"ids-focus-anchor": focusAnchor
|
|
32
32
|
}), min: min, "aria-valuemin": min, max: max, "aria-valuemax": max, step: step, value: internalValue, "aria-valuenow": internalValue, disabled: disabled, style: { backgroundSize: ((internalValue - min) * 100) / (max - min) + "% 100%" }, onChange: handleOnChange, ...props }), showTicks && (jsx("div", { className: clsx("ids-range-ticks", { "ids-range-ticks--disabled": disabled }), children: ticks.map(tick => (jsx("div", { className: "ids-range-tick", children: tick }, tick))) }))] }));
|
|
33
33
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
interface IDSSelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
3
3
|
label?: string;
|
|
4
|
-
srOf?: string;
|
|
5
4
|
errorMsg?: string;
|
|
6
5
|
disabled?: boolean;
|
|
7
6
|
required?: boolean;
|
|
@@ -11,6 +10,7 @@ interface IDSSelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
|
11
10
|
noValidation?: boolean;
|
|
12
11
|
tooltip?: ReactNode;
|
|
13
12
|
children?: ReactNode;
|
|
13
|
+
dataTestId?: string;
|
|
14
14
|
}
|
|
15
15
|
export declare const IDSSelect: React.ForwardRefExoticComponent<IDSSelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
16
16
|
export {};
|
|
@@ -7,7 +7,7 @@ import { useInputValidity } from '../form-hooks/useInputValidity.js';
|
|
|
7
7
|
import { useAriaDescribedBy } from '../form-hooks/useAriaDescribedBy.js';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
|
|
10
|
-
const IDSSelect = forwardRef(({ label = "",
|
|
10
|
+
const IDSSelect = forwardRef(({ label = "", errorMsg = "", disabled = false, required = false, invalid = false, light = false, dataTestId = "", noValidation = false, focusAnchor = false, tooltip, id, children, className, ...props }, ref) => {
|
|
11
11
|
const fieldId = useElementId(id);
|
|
12
12
|
const errorMsgId = useElementId();
|
|
13
13
|
const selectRef = useRef(null);
|
|
@@ -15,10 +15,12 @@ const IDSSelect = forwardRef(({ label = "", srOf = "av", errorMsg = "", disabled
|
|
|
15
15
|
const hasValidValue = useInputValidity(selectRef);
|
|
16
16
|
const isInvalid = (invalid || !hasValidValue) && !noValidation;
|
|
17
17
|
useAriaDescribedBy(selectRef, errorMsgId, isInvalid, !!errorMsg);
|
|
18
|
-
return (jsxs("div", { className: clsx("ids-select
|
|
18
|
+
return (jsxs("div", { className: clsx("ids-select", className), "data-testid": dataTestId, children: [jsxs("div", { className: "ids-label-tooltip-wrapper", children: [jsx("label", { htmlFor: fieldId, className: clsx("ids-label", {
|
|
19
|
+
"ids-label--disabled": disabled
|
|
20
|
+
}), children: label }), tooltip] }), jsx("div", { className: "ids-select__wrapper", children: jsx("select", { id: fieldId, ref: selectRef, className: clsx("ids-select__select", {
|
|
19
21
|
"ids-input--light": light,
|
|
20
22
|
"ids-focus-anchor": focusAnchor
|
|
21
|
-
}), "aria-invalid": isInvalid, required: required, disabled: disabled, ...props, children: children }) }), isInvalid && errorMsg && (jsx(IDSErrorMessage, { id: errorMsgId, show: true, children: errorMsg }))] }));
|
|
23
|
+
}), "aria-invalid": isInvalid, "aria-disabled": disabled, required: required, disabled: disabled, ...props, children: children }) }), isInvalid && errorMsg && (jsx(IDSErrorMessage, { id: errorMsgId, show: true, children: errorMsg }))] }));
|
|
22
24
|
});
|
|
23
25
|
IDSSelect.displayName = "IDSSelect";
|
|
24
26
|
|
|
@@ -9,11 +9,14 @@ interface IDSSelectMultipleProps extends React.InputHTMLAttributes<HTMLInputElem
|
|
|
9
9
|
expanded?: boolean;
|
|
10
10
|
errorMsg?: string;
|
|
11
11
|
invalid?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
ariaDisabled?: boolean;
|
|
12
14
|
light?: boolean;
|
|
13
15
|
focusAnchor?: boolean;
|
|
14
16
|
noValidation?: boolean;
|
|
15
17
|
tooltip?: ReactNode;
|
|
16
18
|
children?: ReactNode;
|
|
19
|
+
dataTestId?: string;
|
|
17
20
|
}
|
|
18
21
|
export declare const IDSSelectMultiple: React.FC<IDSSelectMultipleProps>;
|
|
19
22
|
export {};
|
|
@@ -7,7 +7,7 @@ import { useAriaDescribedBy } from '../form-hooks/useAriaDescribedBy.js';
|
|
|
7
7
|
import '@inera/ids-design/components/form/select-multiple/select-multiple.css';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
|
|
10
|
-
const IDSSelectMultiple = ({ label = "", selectedLabel = "vald", selectedLabelPlural = "valda", placeholder = "", maxHeight = "", expanded = false, errorMsg = "", invalid = false, light = false, noValidation = false, focusAnchor = false, tooltip, id, children, className, ...props }) => {
|
|
10
|
+
const IDSSelectMultiple = ({ label = "", selectedLabel = "vald", selectedLabelPlural = "valda", placeholder = "", maxHeight = "", dataTestId = "", expanded = false, errorMsg = "", invalid = false, disabled = false, ariaDisabled = false, light = false, noValidation = false, focusAnchor = false, tooltip, id, children, className, ...props }) => {
|
|
11
11
|
const [checkboxListInvalid, setCheckboxListInvalid] = useState(false);
|
|
12
12
|
const [checkedBoxesCount, setCheckedBoxesCount] = useState(0);
|
|
13
13
|
const [value, setValue] = useState(placeholder);
|
|
@@ -27,11 +27,16 @@ const IDSSelectMultiple = ({ label = "", selectedLabel = "vald", selectedLabelPl
|
|
|
27
27
|
}
|
|
28
28
|
setValue(inputValue);
|
|
29
29
|
}, [checkedBoxesCount]);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (checkboxListInvalid) {
|
|
32
|
+
setIsExpanded(true);
|
|
33
|
+
}
|
|
34
|
+
}, [checkboxListInvalid]);
|
|
30
35
|
useEffect(() => {
|
|
31
36
|
const handleInteractionOutside = (event) => {
|
|
32
37
|
const target = event.target;
|
|
33
38
|
if (selectMultipleRef.current) {
|
|
34
|
-
const root = selectMultipleRef.current.closest(".ids-select-multiple
|
|
39
|
+
const root = selectMultipleRef.current.closest(".ids-select-multiple");
|
|
35
40
|
if (root && !root.contains(target)) {
|
|
36
41
|
setIsExpanded(false);
|
|
37
42
|
}
|
|
@@ -51,12 +56,14 @@ const IDSSelectMultiple = ({ label = "", selectedLabel = "vald", selectedLabelPl
|
|
|
51
56
|
document.removeEventListener("keydown", handleKeyDown);
|
|
52
57
|
};
|
|
53
58
|
}, [isExpanded]);
|
|
54
|
-
return (jsxs("div", { className: clsx("ids-select-multiple
|
|
59
|
+
return (jsxs("div", { className: clsx("ids-select-multiple", className), "data-testid": dataTestId, children: [jsxs("div", { className: "ids-label-tooltip-wrapper", children: [jsx("label", { id: labelId, htmlFor: inputId, className: clsx("ids-label", {
|
|
60
|
+
"ids-label--disabled": disabled || ariaDisabled
|
|
61
|
+
}), children: label }), tooltip] }), jsx("div", { className: "ids-select-multiple__select-wrapper", children: jsx("input", { id: inputId, "aria-labelledby": labelId, ref: selectMultipleRef, type: "button", className: clsx("ids-select-multiple__select", {
|
|
55
62
|
"ids-input--light": light,
|
|
56
63
|
"ids-focus-anchor": focusAnchor
|
|
57
|
-
}), "aria-expanded": isExpanded, "aria-invalid": invalid || checkboxListInvalid, placeholder: placeholder, value: value, onClick: () => setIsExpanded(!isExpanded), ...props }) }), jsx("div", { className: "ids-select-
|
|
58
|
-
"ids-select-multiple__dropdown--
|
|
59
|
-
}), children: jsx("div", { className: "ids-select-
|
|
64
|
+
}), "aria-expanded": isExpanded, disabled: disabled, "aria-disabled": ariaDisabled, "aria-invalid": invalid || checkboxListInvalid, placeholder: placeholder, value: value, onClick: () => setIsExpanded(!isExpanded), ...props }) }), jsx("div", { className: "ids-select-multiple__dropdown-wrapper", children: jsx("div", { className: clsx("ids-select-multiple__dropdown", {
|
|
65
|
+
"ids-select-multiple__dropdown--expanded": isExpanded
|
|
66
|
+
}), children: jsx("div", { className: "ids-select-multiple__dropdown-scroll-area", style: { maxHeight: maxHeight }, children: jsx(IDSCheckboxGroup, { block: true, noValidation: noValidation, errorMsg: errorMsg, setCheckedBoxesCount: setCheckedBoxesCount, onValidityChange: (isValid) => {
|
|
60
67
|
if (!isValid) {
|
|
61
68
|
setIsExpanded(true);
|
|
62
69
|
}
|
|
@@ -14,6 +14,7 @@ interface IDSTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
|
14
14
|
focusAnchor?: boolean;
|
|
15
15
|
readOnly?: boolean;
|
|
16
16
|
tooltip?: ReactNode;
|
|
17
|
+
dataTestId?: string;
|
|
17
18
|
}
|
|
18
19
|
export declare const IDSTextarea: import("react").ForwardRefExoticComponent<IDSTextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
19
20
|
export {};
|
|
@@ -7,7 +7,7 @@ import { useInputValidity } from '../form-hooks/useInputValidity.js';
|
|
|
7
7
|
import { useAriaDescribedBy } from '../form-hooks/useAriaDescribedBy.js';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
|
|
10
|
-
const IDSTextarea = forwardRef(({ label = "", hint, errorMsg = "", disabled = false, invalid = false, required = false, noValidation = false, autoSize = false, noResize = false, block = false, light = false, readOnly = false, focusAnchor = false, id, tooltip, className, ...props }, ref) => {
|
|
10
|
+
const IDSTextarea = forwardRef(({ label = "", hint, errorMsg = "", dataTestId = "", disabled = false, invalid = false, required = false, noValidation = false, autoSize = false, noResize = false, block = false, light = false, readOnly = false, focusAnchor = false, id, tooltip, className, ...props }, ref) => {
|
|
11
11
|
const fieldId = useElementId(id);
|
|
12
12
|
const errorMsgId = useElementId();
|
|
13
13
|
const hintId = useElementId();
|
|
@@ -20,7 +20,7 @@ const IDSTextarea = forwardRef(({ label = "", hint, errorMsg = "", disabled = fa
|
|
|
20
20
|
"ids-textarea--block": block,
|
|
21
21
|
"ids-textarea--autosize": autoSize,
|
|
22
22
|
"ids-textarea--no-resize": noResize
|
|
23
|
-
}, className), children: [jsxs("div", { className: "ids-label-tooltip-wrapper", children: [jsx("label", { className: clsx("ids-label", {
|
|
23
|
+
}, className), "data-testid": dataTestId, children: [jsxs("div", { className: "ids-label-tooltip-wrapper", children: [jsx("label", { className: clsx("ids-label", {
|
|
24
24
|
"ids-label--disabled": disabled || readOnly
|
|
25
25
|
}), htmlFor: fieldId, children: label }), tooltip && tooltip] }), jsx("textarea", { ref: textareaRef, id: fieldId, className: clsx("ids-textarea__textarea", {
|
|
26
26
|
"ids-input--light": light,
|
|
@@ -9,6 +9,7 @@ interface IDSTimeProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
9
9
|
focusAnchor?: boolean;
|
|
10
10
|
light?: boolean;
|
|
11
11
|
tooltip?: ReactNode;
|
|
12
|
+
dataTestId?: string;
|
|
12
13
|
}
|
|
13
14
|
export declare const IDSTime: import("react").ForwardRefExoticComponent<IDSTimeProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
14
15
|
export {};
|
|
@@ -7,7 +7,7 @@ import { useInputValidity } from '../form-hooks/useInputValidity.js';
|
|
|
7
7
|
import { useAriaDescribedBy } from '../form-hooks/useAriaDescribedBy.js';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
|
|
10
|
-
const IDSTime = forwardRef(({ label = "", errorMsg = "", disabled = false, invalid = false, required = false, noValidation = false, light = false, focusAnchor = false, id, tooltip, className, ...props }, ref) => {
|
|
10
|
+
const IDSTime = forwardRef(({ label = "", errorMsg = "", disabled = false, invalid = false, required = false, noValidation = false, light = false, focusAnchor = false, dataTestId = "", id, tooltip, className, ...props }, ref) => {
|
|
11
11
|
const fieldId = useElementId(id);
|
|
12
12
|
const errorMsgId = useElementId();
|
|
13
13
|
const inputRef = useRef(null);
|
|
@@ -15,12 +15,12 @@ const IDSTime = forwardRef(({ label = "", errorMsg = "", disabled = false, inval
|
|
|
15
15
|
const hasValidValue = useInputValidity(inputRef);
|
|
16
16
|
const isInvalid = (invalid || !hasValidValue) && !noValidation;
|
|
17
17
|
useAriaDescribedBy(inputRef, errorMsgId, isInvalid, !!errorMsg);
|
|
18
|
-
return (jsxs("div", { className: clsx("ids-time
|
|
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
19
|
"ids-label--disabled": disabled
|
|
20
|
-
}), htmlFor: fieldId, children: label }), tooltip] }), jsx("div", { className: "ids-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 }))] }));
|
|
24
24
|
});
|
|
25
25
|
IDSTime.displayName = "IDSTime";
|
|
26
26
|
|
|
@@ -4,6 +4,7 @@ interface IDSToggleProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
4
4
|
tooltip?: ReactNode;
|
|
5
5
|
focusAnchor?: boolean;
|
|
6
6
|
children?: ReactNode;
|
|
7
|
+
dataTestId?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const IDSToggle: import("react").ForwardRefExoticComponent<IDSToggleProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
10
|
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
4
|
import { useElementId } from '../../utils/hooks/useElementId.js';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
|
-
const IDSToggle = forwardRef(({ disabled = false, focusAnchor = false, tooltip, id, children, className, ...props }, ref) => {
|
|
7
|
+
const IDSToggle = forwardRef(({ disabled = false, focusAnchor = false, tooltip, id, children, dataTestId = "", className, ...props }, ref) => {
|
|
8
8
|
const fieldId = useElementId(id);
|
|
9
9
|
const toggleRef = useRef(null);
|
|
10
10
|
useImperativeHandle(ref, () => toggleRef.current);
|
|
11
|
-
return (
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
return (jsxs("div", { className: clsx("ids-toggle", className), "data-testid": dataTestId, children: [jsx("input", { id: fieldId, ref: toggleRef, className: clsx("ids-toggle__input", {
|
|
12
|
+
"ids-focus-anchor": focusAnchor
|
|
13
|
+
}), type: "checkbox", disabled: disabled, ...props }), jsxs("div", { className: "ids-label-tooltip-wrapper ids-label-tooltip-wrapper--inline", children: [jsx("label", { htmlFor: fieldId, className: "ids-toggle__label ids-label ids-label--clickable", children: children }), tooltip] })] }));
|
|
14
14
|
});
|
|
15
15
|
IDSToggle.displayName = "IDSToggle";
|
|
16
16
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/global-alert/global-alert.css";
|
|
3
|
+
interface IDSGlobalAlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
agent?: boolean;
|
|
5
|
+
srExpandText?: string;
|
|
6
|
+
srCollapseText?: string;
|
|
7
|
+
collapsed?: boolean;
|
|
8
|
+
noRole?: boolean;
|
|
9
|
+
onCollapsedChange?: (isCollapsed: boolean) => void;
|
|
10
|
+
icon?: string;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
actions?: ReactNode;
|
|
13
|
+
headline: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const IDSGlobalAlert: React.FC<IDSGlobalAlertProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import '@inera/ids-design/components/global-alert/global-alert.css';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { useElementId } from '../utils/hooks/useElementId.js';
|
|
7
|
+
|
|
8
|
+
const IDSGlobalAlert = ({ agent = false, srExpandText = "Visa meddelande", srCollapseText = "Dölj meddelande", collapsed = false, noRole = false, onCollapsedChange, actions, headline = "", children, className, ...props }) => {
|
|
9
|
+
const [isCollapsed, setIsCollapsed] = useState(collapsed);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
setIsCollapsed(collapsed);
|
|
12
|
+
}, [collapsed]);
|
|
13
|
+
const handleToggleCollapse = () => {
|
|
14
|
+
setIsCollapsed(!isCollapsed);
|
|
15
|
+
onCollapsedChange?.(!isCollapsed);
|
|
16
|
+
};
|
|
17
|
+
const contentId = useElementId();
|
|
18
|
+
return (jsx("div", { role: noRole ? null : "alert", className: clsx("ids-global-alert", {
|
|
19
|
+
"ids-global-alert--collapsed": isCollapsed,
|
|
20
|
+
"ids-global-alert--agent": agent
|
|
21
|
+
}, className), ...props, children: jsxs("div", { className: "ids-global-alert__inner", children: [jsx("div", { className: "ids-global-alert__header", children: jsx("button", { className: clsx("ids-global-alert__button", {
|
|
22
|
+
"ids-global-alert__button--expanded": !isCollapsed
|
|
23
|
+
}), "aria-controls": contentId, "aria-expanded": !isCollapsed, onClick: handleToggleCollapse, children: jsxs("div", { className: "ids-global-alert__icon-headline", children: [jsx("div", { className: "ids-global-alert__headline", children: headline }), jsx("span", { className: "ids-global-alert__sr-only", children: isCollapsed ? srExpandText : srCollapseText })] }) }) }), jsxs("div", { id: contentId, className: "ids-global-alert__content", children: [children, actions && jsx("div", { className: "ids-global-alert__sub-content", children: actions })] })] }) }));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { IDSGlobalAlert };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import "@inera/ids-design/components/grid/column/column.css";
|
|
3
|
+
export type ColSize = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "auto";
|
|
4
|
+
export type OffsetSize = Exclude<ColSize, "auto">;
|
|
3
5
|
export interface IDSColumnProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
6
|
cols?: ColSize;
|
|
5
7
|
s?: ColSize;
|
|
@@ -10,7 +12,4 @@ export interface IDSColumnProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
10
12
|
alignSelf?: "start" | "center" | "end" | "auto" | "baseline" | "stretch";
|
|
11
13
|
children?: ReactNode;
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
type OffsetSize = Exclude<ColSize, "auto">;
|
|
15
|
-
export declare const IDSColumn: React.FC<IDSColumnProps>;
|
|
16
|
-
export {};
|
|
15
|
+
export declare function IDSColumn({ cols, s, m, offset, sOffset, mOffset, alignSelf, className, children, style, ...props }: IDSColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { useRef } from 'react';
|
|
4
3
|
import '@inera/ids-design/components/grid/column/column.css';
|
|
5
4
|
import clsx from 'clsx';
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
function IDSColumn({ cols, s, m, offset, sOffset, mOffset, alignSelf, className, children, style, ...props }) {
|
|
8
7
|
const colRef = useRef(null);
|
|
9
8
|
const classNames = 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);
|
|
10
9
|
return (jsx("div", { ref: colRef, className: classNames, style: { ...style }, ...props, children: children }));
|
|
11
|
-
}
|
|
10
|
+
}
|
|
12
11
|
|
|
13
12
|
export { IDSColumn };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode, HTMLAttributes } from "react";
|
|
2
2
|
import "@inera/ids-design/components/grid/container/container.css";
|
|
3
|
-
export interface IDSContainerProps extends
|
|
4
|
-
fluid?: boolean;
|
|
3
|
+
export interface IDSContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
4
|
width?: string;
|
|
5
|
+
maxWidth?: string;
|
|
6
6
|
gutterless?: boolean;
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export declare const IDSContainer:
|
|
9
|
+
export declare const IDSContainer: import("react").ForwardRefExoticComponent<IDSContainerProps & import("react").RefAttributes<HTMLDivElement>>;
|