@dnb/eufemia 9.26.1 → 9.27.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/CHANGELOG.md +51 -0
- package/assets/icons/bookmark.svg +1 -0
- package/assets/icons/bookmark_medium.svg +1 -0
- package/assets/icons/calendar_cancel.svg +1 -0
- package/assets/icons/calendar_cancel_medium.svg +1 -0
- package/assets/icons/eufemia-icons-pdf-categorized.tgz +0 -0
- package/assets/icons/eufemia-icons-pdf.tgz +0 -0
- package/assets/icons/exclamation.svg +1 -1
- package/assets/icons/exclamation_circled.svg +1 -1
- package/assets/icons/exclamation_medium.svg +1 -1
- package/assets/icons/reply.svg +1 -1
- package/assets/icons/reply_medium.svg +1 -1
- package/assets/icons/stopwatch.svg +1 -1
- package/cjs/components/Style.d.ts +1 -0
- package/cjs/components/Style.js +52 -0
- package/cjs/components/Table.d.ts +3 -0
- package/cjs/components/Table.js +52 -0
- package/cjs/components/accordion/AccordionContent.js +1 -1
- package/cjs/components/autocomplete/Autocomplete.d.ts +9 -0
- package/cjs/components/autocomplete/Autocomplete.js +49 -23
- package/cjs/components/autocomplete/style/_autocomplete.scss +57 -6
- package/cjs/components/autocomplete/style/dnb-autocomplete.css +45 -13
- package/cjs/components/autocomplete/style/dnb-autocomplete.min.css +2 -2
- package/cjs/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.css +7 -0
- package/cjs/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.min.css +1 -1
- package/cjs/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.scss +8 -0
- package/cjs/components/avatar/Avatar.js +14 -12
- package/cjs/components/breadcrumb/Breadcrumb.js +20 -18
- package/cjs/components/button/Button.d.ts +5 -3
- package/cjs/components/date-picker/DatePicker.d.ts +6 -0
- package/cjs/components/date-picker/DatePicker.js +9 -4
- package/cjs/components/date-picker/DatePickerFooter.js +3 -3
- package/cjs/components/date-picker/DatePickerInput.d.ts +6 -0
- package/cjs/components/date-picker/DatePickerInput.js +37 -23
- package/cjs/components/date-picker/style/_date-picker.scss +40 -0
- package/cjs/components/date-picker/style/dnb-date-picker.css +52 -8
- package/cjs/components/date-picker/style/dnb-date-picker.min.css +2 -2
- package/cjs/components/dialog/Dialog.js +7 -3
- package/cjs/components/dialog/DialogContent.js +6 -3
- package/cjs/components/dialog/style/_dialog.scss +24 -35
- package/cjs/components/dialog/style/dnb-dialog.css +57 -80
- package/cjs/components/dialog/style/dnb-dialog.min.css +1 -1
- package/cjs/components/dialog/types.d.ts +9 -2
- package/cjs/components/drawer/style/dnb-drawer.css +33 -40
- package/cjs/components/drawer/style/dnb-drawer.min.css +1 -1
- package/cjs/components/dropdown/Dropdown.d.ts +25 -0
- package/cjs/components/dropdown/Dropdown.js +1 -1
- package/cjs/components/form-row/FormRow.js +2 -12
- package/cjs/components/form-row/FormRowHelpers.d.ts +6 -0
- package/cjs/components/form-row/FormRowHelpers.js +18 -0
- package/cjs/components/icon/Icon.js +5 -9
- package/cjs/components/icon/IconHelpers.d.ts +1 -0
- package/cjs/components/icon/IconHelpers.js +16 -0
- package/cjs/components/index.d.ts +2 -1
- package/cjs/components/index.js +8 -0
- package/cjs/components/input/Input.d.ts +6 -1
- package/cjs/components/input/Input.js +12 -2
- package/cjs/components/input/style/_input.scss +11 -9
- package/cjs/components/input/style/dnb-input.css +7 -8
- package/cjs/components/input/style/dnb-input.min.css +1 -1
- package/cjs/components/input-masked/InputMasked.d.ts +6 -1
- package/cjs/components/input-masked/InputMaskedUtils.js +11 -4
- package/cjs/components/input-masked/addons/createNumberMask.d.ts +1 -2
- package/cjs/components/input-masked/addons/createNumberMask.js +1 -14
- package/cjs/components/input-masked/style/dnb-input-masked.css +7 -8
- package/cjs/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/cjs/components/lib.d.ts +6 -1
- package/cjs/components/lib.js +9 -0
- package/cjs/components/modal/Modal.d.ts +1 -22
- package/cjs/components/modal/Modal.js +4 -1
- package/cjs/components/modal/ModalContent.d.ts +7 -2
- package/cjs/components/modal/ModalContent.js +111 -70
- package/cjs/components/modal/ModalContext.d.ts +1 -0
- package/cjs/components/modal/ModalContext.js +1 -0
- package/cjs/components/modal/parts/CloseButton.d.ts +3 -24
- package/cjs/components/modal/parts/ModalHeader.d.ts +1 -0
- package/cjs/components/modal/parts/ModalHeaderBar.d.ts +3 -2
- package/cjs/components/modal/parts/ModalInner.d.ts +1 -0
- package/cjs/components/modal/style/_modal-mixins.scss +1 -0
- package/cjs/components/modal/style/dnb-modal.css +30 -40
- package/cjs/components/modal/style/dnb-modal.min.css +1 -1
- package/cjs/components/modal/types.d.ts +16 -38
- package/cjs/components/number-format/NumberFormat.d.ts +5 -0
- package/cjs/components/number-format/NumberFormat.js +7 -2
- package/cjs/components/pagination/PaginationBar.d.ts +7 -6
- package/cjs/components/radio/Radio.js +5 -2
- package/cjs/components/skeleton/SkeletonHelper.d.ts +4 -4
- package/cjs/components/table/Table.d.ts +40 -0
- package/cjs/components/table/Table.js +91 -0
- package/cjs/components/table/TableStickyHeader.d.ts +21 -0
- package/cjs/components/table/TableStickyHeader.js +159 -0
- package/cjs/components/table/TableTd.d.ts +15 -0
- package/cjs/components/table/TableTd.js +42 -0
- package/cjs/components/table/TableTh.d.ts +14 -0
- package/cjs/components/table/TableTh.js +42 -0
- package/cjs/components/table/TableTr.d.ts +15 -0
- package/cjs/components/table/TableTr.js +41 -0
- package/cjs/components/table/index.d.ts +3 -0
- package/cjs/components/table/index.js +52 -0
- package/cjs/components/table/style/_table.scss +147 -0
- package/cjs/components/table/style/dnb-table.css +181 -0
- package/cjs/components/table/style/dnb-table.min.css +1 -0
- package/cjs/components/table/style/dnb-table.scss +12 -0
- package/cjs/components/table/style/index.d.ts +6 -0
- package/cjs/components/table/style/index.js +3 -0
- package/cjs/components/table/style/themes/dnb-table-theme-ui.css +444 -0
- package/cjs/components/table/style/themes/dnb-table-theme-ui.min.css +2 -0
- package/cjs/components/table/style/themes/dnb-table-theme-ui.scss +97 -0
- package/cjs/components/table/style/themes/table-basis.scss +161 -0
- package/cjs/components/table/style/themes/ui.d.ts +1 -0
- package/cjs/components/table/style/themes/ui.js +3 -0
- package/cjs/components/table/style.d.ts +1 -0
- package/cjs/components/table/style.js +3 -0
- package/cjs/components/tag/Tag.js +16 -13
- package/cjs/components/timeline/Timeline.js +11 -7
- package/cjs/components/timeline/TimelineItem.d.ts +12 -4
- package/cjs/components/timeline/TimelineItem.js +60 -24
- package/cjs/components/timeline/style/_timeline.scss +2 -2
- package/cjs/components/timeline/style/dnb-timeline.css +6 -6
- package/cjs/components/timeline/style/dnb-timeline.min.css +1 -1
- package/cjs/components/timeline/style/themes/dnb-timeline-theme-ui.css +4 -4
- package/cjs/components/timeline/style/themes/dnb-timeline-theme-ui.min.css +1 -1
- package/cjs/components/timeline/style/themes/dnb-timeline-theme-ui.scss +4 -4
- package/cjs/elements/Table.d.ts +3 -35
- package/cjs/elements/Table.js +25 -270
- package/cjs/elements/Td.d.ts +2 -28
- package/cjs/elements/Td.js +32 -40
- package/cjs/elements/Th.d.ts +2 -28
- package/cjs/elements/Th.js +32 -40
- package/cjs/elements/Tr.d.ts +2 -28
- package/cjs/elements/Tr.js +32 -40
- package/cjs/elements/lib.d.ts +4 -6
- package/cjs/elements/lib.js +0 -9
- package/cjs/fragments/drawer-list/DrawerList.d.ts +13 -0
- package/cjs/fragments/drawer-list/DrawerList.js +25 -10
- package/cjs/fragments/drawer-list/DrawerListHelpers.d.ts +20 -0
- package/cjs/fragments/drawer-list/DrawerListHelpers.js +18 -1
- package/cjs/fragments/drawer-list/DrawerListProvider.d.ts +6 -9
- package/cjs/fragments/drawer-list/DrawerListProvider.js +28 -42
- package/cjs/fragments/drawer-list/style/_drawer-list.scss +40 -5
- package/cjs/fragments/drawer-list/style/themes/dnb-drawer-list-theme-ui.scss +58 -38
- package/cjs/icons/bookmark.d.ts +2 -0
- package/cjs/icons/bookmark.js +36 -0
- package/cjs/icons/bookmark_medium.d.ts +2 -0
- package/cjs/icons/bookmark_medium.js +36 -0
- package/cjs/icons/calendar_cancel.d.ts +2 -0
- package/cjs/icons/calendar_cancel.js +32 -0
- package/cjs/icons/calendar_cancel_medium.d.ts +2 -0
- package/cjs/icons/calendar_cancel_medium.js +32 -0
- package/cjs/icons/exclamation.js +5 -2
- package/cjs/icons/exclamation_circled.js +1 -1
- package/cjs/icons/exclamation_medium.js +5 -2
- package/cjs/icons/icons-meta.json +232 -198
- package/cjs/icons/icons-pdf.lock +6294 -0
- package/cjs/icons/icons-svg.lock +6294 -1
- package/cjs/icons/index.d.ts +5 -1
- package/cjs/icons/index.js +32 -0
- package/cjs/icons/reply.js +2 -1
- package/cjs/icons/reply_medium.js +2 -1
- package/cjs/icons/secondary_icons.d.ts +3 -1
- package/cjs/icons/secondary_icons.js +16 -0
- package/cjs/icons/secondary_icons_medium.d.ts +3 -1
- package/cjs/icons/secondary_icons_medium.js +16 -0
- package/cjs/icons/stopwatch.js +1 -1
- package/cjs/index.d.ts +30 -30
- package/cjs/index.js +58 -58
- package/cjs/shared/AnimateHeight.d.ts +1 -0
- package/cjs/shared/AnimateHeight.js +18 -2
- package/cjs/shared/Context.d.ts +92 -44
- package/cjs/shared/Context.js +3 -16
- package/cjs/shared/Eufemia.js +1 -1
- package/cjs/shared/MediaQuery.d.ts +18 -37
- package/cjs/shared/MediaQuery.js +3 -19
- package/cjs/shared/MediaQueryUtils.d.ts +61 -23
- package/cjs/shared/MediaQueryUtils.js +2 -2
- package/cjs/shared/Provider.d.ts +36 -12
- package/cjs/shared/Provider.js +6 -15
- package/cjs/shared/component-helper.d.ts +1 -1
- package/cjs/shared/component-helper.js +5 -5
- package/cjs/shared/interfaces.d.ts +13 -0
- package/cjs/shared/locales/en-GB.d.ts +1 -0
- package/cjs/shared/locales/en-GB.js +1 -0
- package/cjs/shared/locales/en-US.d.ts +1 -0
- package/cjs/shared/locales/index.d.ts +2 -0
- package/cjs/shared/locales/nb-NO.d.ts +1 -0
- package/cjs/shared/locales/nb-NO.js +1 -0
- package/cjs/shared/useMediaQuery.d.ts +3 -1
- package/cjs/shared/useTranslation.d.ts +1 -22
- package/cjs/style/dnb-ui-components.css +275 -74
- package/cjs/style/dnb-ui-components.min.css +3 -3
- package/cjs/style/dnb-ui-components.scss +1 -0
- package/cjs/style/dnb-ui-elements.css +1 -534
- package/cjs/style/dnb-ui-elements.min.css +1 -2
- package/cjs/style/dnb-ui-fragments.css +37 -15
- package/cjs/style/dnb-ui-fragments.min.css +1 -1
- package/cjs/style/dnb-ui-tags.css +1 -1065
- package/cjs/style/dnb-ui-tags.min.css +1 -3
- package/cjs/style/elements/table.scss +1 -389
- package/cjs/style/elements/ui-tags.scss +2 -2
- package/cjs/style/themes/theme-eiendom/dnb-theme-eiendom.css +511 -574
- package/cjs/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +7 -5
- package/cjs/style/themes/theme-ui/dnb-theme-ui.css +511 -574
- package/cjs/style/themes/theme-ui/dnb-theme-ui.min.css +7 -5
- package/cjs/style/themes/theme-ui/dnb-theme-ui.scss +1 -0
- package/components/Style.d.ts +1 -0
- package/components/Style.js +3 -0
- package/components/Table.d.ts +3 -0
- package/components/Table.js +3 -0
- package/components/accordion/AccordionContent.js +1 -1
- package/components/autocomplete/Autocomplete.d.ts +9 -0
- package/components/autocomplete/Autocomplete.js +49 -23
- package/components/autocomplete/style/_autocomplete.scss +57 -6
- package/components/autocomplete/style/dnb-autocomplete.css +45 -13
- package/components/autocomplete/style/dnb-autocomplete.min.css +2 -2
- package/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.css +7 -0
- package/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.min.css +1 -1
- package/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.scss +8 -0
- package/components/avatar/Avatar.js +15 -14
- package/components/breadcrumb/Breadcrumb.js +21 -20
- package/components/button/Button.d.ts +5 -3
- package/components/date-picker/DatePicker.d.ts +6 -0
- package/components/date-picker/DatePicker.js +9 -4
- package/components/date-picker/DatePickerFooter.js +3 -3
- package/components/date-picker/DatePickerInput.d.ts +6 -0
- package/components/date-picker/DatePickerInput.js +37 -23
- package/components/date-picker/style/_date-picker.scss +40 -0
- package/components/date-picker/style/dnb-date-picker.css +52 -8
- package/components/date-picker/style/dnb-date-picker.min.css +2 -2
- package/components/dialog/Dialog.js +7 -3
- package/components/dialog/DialogContent.js +7 -4
- package/components/dialog/style/_dialog.scss +24 -35
- package/components/dialog/style/dnb-dialog.css +57 -80
- package/components/dialog/style/dnb-dialog.min.css +1 -1
- package/components/dialog/types.d.ts +9 -2
- package/components/drawer/style/dnb-drawer.css +33 -40
- package/components/drawer/style/dnb-drawer.min.css +1 -1
- package/components/dropdown/Dropdown.d.ts +25 -0
- package/components/dropdown/Dropdown.js +2 -2
- package/components/form-row/FormRow.js +0 -7
- package/components/form-row/FormRowHelpers.d.ts +6 -0
- package/components/form-row/FormRowHelpers.js +8 -0
- package/components/icon/Icon.js +1 -3
- package/components/icon/IconHelpers.d.ts +1 -0
- package/components/icon/IconHelpers.js +5 -0
- package/components/index.d.ts +2 -1
- package/components/index.js +2 -1
- package/components/input/Input.d.ts +6 -1
- package/components/input/Input.js +12 -2
- package/components/input/style/_input.scss +11 -9
- package/components/input/style/dnb-input.css +7 -8
- package/components/input/style/dnb-input.min.css +1 -1
- package/components/input-masked/InputMasked.d.ts +6 -1
- package/components/input-masked/InputMaskedUtils.js +11 -4
- package/components/input-masked/addons/createNumberMask.d.ts +1 -2
- package/components/input-masked/addons/createNumberMask.js +1 -12
- package/components/input-masked/style/dnb-input-masked.css +7 -8
- package/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/components/lib.d.ts +6 -1
- package/components/lib.js +3 -1
- package/components/modal/Modal.d.ts +1 -22
- package/components/modal/Modal.js +4 -1
- package/components/modal/ModalContent.d.ts +7 -2
- package/components/modal/ModalContent.js +81 -60
- package/components/modal/ModalContext.d.ts +1 -0
- package/components/modal/ModalContext.js +1 -0
- package/components/modal/parts/CloseButton.d.ts +3 -24
- package/components/modal/parts/ModalHeader.d.ts +1 -0
- package/components/modal/parts/ModalHeaderBar.d.ts +3 -2
- package/components/modal/parts/ModalInner.d.ts +1 -0
- package/components/modal/style/_modal-mixins.scss +1 -0
- package/components/modal/style/dnb-modal.css +30 -40
- package/components/modal/style/dnb-modal.min.css +1 -1
- package/components/modal/types.d.ts +16 -38
- package/components/number-format/NumberFormat.d.ts +5 -0
- package/components/number-format/NumberFormat.js +7 -2
- package/components/pagination/PaginationBar.d.ts +7 -6
- package/components/radio/Radio.js +5 -2
- package/components/skeleton/SkeletonHelper.d.ts +4 -4
- package/components/table/Table.d.ts +40 -0
- package/components/table/Table.js +51 -0
- package/components/table/TableStickyHeader.d.ts +21 -0
- package/components/table/TableStickyHeader.js +105 -0
- package/components/table/TableTd.d.ts +15 -0
- package/components/table/TableTd.js +18 -0
- package/components/table/TableTh.d.ts +14 -0
- package/components/table/TableTh.js +18 -0
- package/components/table/TableTr.d.ts +15 -0
- package/components/table/TableTr.js +17 -0
- package/components/table/index.d.ts +3 -0
- package/components/table/index.js +3 -0
- package/components/table/style/_table.scss +147 -0
- package/components/table/style/dnb-table.css +181 -0
- package/components/table/style/dnb-table.min.css +1 -0
- package/components/table/style/dnb-table.scss +12 -0
- package/components/table/style/index.d.ts +6 -0
- package/components/table/style/index.js +1 -0
- package/components/table/style/themes/dnb-table-theme-ui.css +444 -0
- package/components/table/style/themes/dnb-table-theme-ui.min.css +2 -0
- package/components/table/style/themes/dnb-table-theme-ui.scss +97 -0
- package/components/table/style/themes/table-basis.scss +161 -0
- package/components/table/style/themes/ui.d.ts +1 -0
- package/components/table/style/themes/ui.js +1 -0
- package/components/table/style.d.ts +1 -0
- package/components/table/style.js +1 -0
- package/components/tag/Tag.js +14 -13
- package/components/timeline/Timeline.js +10 -8
- package/components/timeline/TimelineItem.d.ts +12 -4
- package/components/timeline/TimelineItem.js +59 -24
- package/components/timeline/style/_timeline.scss +2 -2
- package/components/timeline/style/dnb-timeline.css +6 -6
- package/components/timeline/style/dnb-timeline.min.css +1 -1
- package/components/timeline/style/themes/dnb-timeline-theme-ui.css +4 -4
- package/components/timeline/style/themes/dnb-timeline-theme-ui.min.css +1 -1
- package/components/timeline/style/themes/dnb-timeline-theme-ui.scss +4 -4
- package/elements/Table.d.ts +3 -35
- package/elements/Table.js +3 -218
- package/elements/Td.d.ts +2 -28
- package/elements/Td.js +2 -36
- package/elements/Th.d.ts +2 -28
- package/elements/Th.js +2 -36
- package/elements/Tr.d.ts +2 -28
- package/elements/Tr.js +2 -36
- package/elements/lib.d.ts +4 -6
- package/elements/lib.js +1 -3
- package/es/components/Style.d.ts +1 -0
- package/es/components/Style.js +3 -0
- package/es/components/Table.d.ts +3 -0
- package/es/components/Table.js +3 -0
- package/es/components/accordion/AccordionContent.js +1 -1
- package/es/components/autocomplete/Autocomplete.d.ts +9 -0
- package/es/components/autocomplete/Autocomplete.js +43 -18
- package/es/components/autocomplete/style/_autocomplete.scss +57 -6
- package/es/components/autocomplete/style/dnb-autocomplete.css +45 -13
- package/es/components/autocomplete/style/dnb-autocomplete.min.css +2 -2
- package/es/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.css +7 -0
- package/es/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.min.css +1 -1
- package/es/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.scss +8 -0
- package/es/components/avatar/Avatar.js +8 -7
- package/es/components/breadcrumb/Breadcrumb.js +8 -7
- package/es/components/button/Button.d.ts +5 -3
- package/es/components/date-picker/DatePicker.d.ts +6 -0
- package/es/components/date-picker/DatePicker.js +9 -4
- package/es/components/date-picker/DatePickerFooter.js +3 -3
- package/es/components/date-picker/DatePickerInput.d.ts +6 -0
- package/es/components/date-picker/DatePickerInput.js +43 -32
- package/es/components/date-picker/style/_date-picker.scss +40 -0
- package/es/components/date-picker/style/dnb-date-picker.css +52 -8
- package/es/components/date-picker/style/dnb-date-picker.min.css +2 -2
- package/es/components/dialog/Dialog.js +7 -3
- package/es/components/dialog/DialogContent.js +7 -4
- package/es/components/dialog/style/_dialog.scss +24 -35
- package/es/components/dialog/style/dnb-dialog.css +57 -80
- package/es/components/dialog/style/dnb-dialog.min.css +1 -1
- package/es/components/dialog/types.d.ts +9 -2
- package/es/components/drawer/style/dnb-drawer.css +33 -40
- package/es/components/drawer/style/dnb-drawer.min.css +1 -1
- package/es/components/dropdown/Dropdown.d.ts +25 -0
- package/es/components/dropdown/Dropdown.js +2 -2
- package/es/components/form-row/FormRow.js +0 -7
- package/es/components/form-row/FormRowHelpers.d.ts +6 -0
- package/es/components/form-row/FormRowHelpers.js +8 -0
- package/es/components/icon/Icon.js +2 -2
- package/es/components/icon/IconHelpers.d.ts +1 -0
- package/es/components/icon/IconHelpers.js +1 -0
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/input/Input.d.ts +6 -1
- package/es/components/input/Input.js +11 -2
- package/es/components/input/style/_input.scss +11 -9
- package/es/components/input/style/dnb-input.css +7 -8
- package/es/components/input/style/dnb-input.min.css +1 -1
- package/es/components/input-masked/InputMasked.d.ts +6 -1
- package/es/components/input-masked/InputMaskedUtils.js +11 -4
- package/es/components/input-masked/addons/createNumberMask.d.ts +1 -2
- package/es/components/input-masked/addons/createNumberMask.js +1 -9
- package/es/components/input-masked/style/dnb-input-masked.css +7 -8
- package/es/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/es/components/lib.d.ts +6 -1
- package/es/components/lib.js +3 -1
- package/es/components/modal/Modal.d.ts +1 -22
- package/es/components/modal/Modal.js +3 -1
- package/es/components/modal/ModalContent.d.ts +7 -2
- package/es/components/modal/ModalContent.js +27 -8
- package/es/components/modal/ModalContext.d.ts +1 -0
- package/es/components/modal/ModalContext.js +1 -0
- package/es/components/modal/parts/CloseButton.d.ts +3 -24
- package/es/components/modal/parts/ModalHeader.d.ts +1 -0
- package/es/components/modal/parts/ModalHeaderBar.d.ts +3 -2
- package/es/components/modal/parts/ModalInner.d.ts +1 -0
- package/es/components/modal/style/_modal-mixins.scss +1 -0
- package/es/components/modal/style/dnb-modal.css +30 -40
- package/es/components/modal/style/dnb-modal.min.css +1 -1
- package/es/components/modal/types.d.ts +16 -38
- package/es/components/number-format/NumberFormat.d.ts +5 -0
- package/es/components/number-format/NumberFormat.js +7 -2
- package/es/components/pagination/PaginationBar.d.ts +7 -6
- package/es/components/radio/Radio.js +5 -2
- package/es/components/skeleton/SkeletonHelper.d.ts +4 -4
- package/es/components/table/Table.d.ts +40 -0
- package/es/components/table/Table.js +51 -0
- package/es/components/table/TableStickyHeader.d.ts +21 -0
- package/es/components/table/TableStickyHeader.js +98 -0
- package/es/components/table/TableTd.d.ts +15 -0
- package/es/components/table/TableTd.js +20 -0
- package/es/components/table/TableTh.d.ts +14 -0
- package/es/components/table/TableTh.js +20 -0
- package/es/components/table/TableTr.d.ts +15 -0
- package/es/components/table/TableTr.js +19 -0
- package/es/components/table/index.d.ts +3 -0
- package/es/components/table/index.js +3 -0
- package/es/components/table/style/_table.scss +147 -0
- package/es/components/table/style/dnb-table.css +181 -0
- package/es/components/table/style/dnb-table.min.css +1 -0
- package/es/components/table/style/dnb-table.scss +12 -0
- package/es/components/table/style/index.d.ts +6 -0
- package/es/components/table/style/index.js +1 -0
- package/es/components/table/style/themes/dnb-table-theme-ui.css +444 -0
- package/es/components/table/style/themes/dnb-table-theme-ui.min.css +2 -0
- package/es/components/table/style/themes/dnb-table-theme-ui.scss +97 -0
- package/es/components/table/style/themes/table-basis.scss +161 -0
- package/es/components/table/style/themes/ui.d.ts +1 -0
- package/es/components/table/style/themes/ui.js +1 -0
- package/es/components/table/style.d.ts +1 -0
- package/es/components/table/style.js +1 -0
- package/es/components/tag/Tag.js +8 -7
- package/es/components/timeline/Timeline.js +8 -6
- package/es/components/timeline/TimelineItem.d.ts +12 -4
- package/es/components/timeline/TimelineItem.js +52 -21
- package/es/components/timeline/style/_timeline.scss +2 -2
- package/es/components/timeline/style/dnb-timeline.css +6 -6
- package/es/components/timeline/style/dnb-timeline.min.css +1 -1
- package/es/components/timeline/style/themes/dnb-timeline-theme-ui.css +4 -4
- package/es/components/timeline/style/themes/dnb-timeline-theme-ui.min.css +1 -1
- package/es/components/timeline/style/themes/dnb-timeline-theme-ui.scss +4 -4
- package/es/elements/Table.d.ts +3 -35
- package/es/elements/Table.js +3 -170
- package/es/elements/Td.d.ts +2 -28
- package/es/elements/Td.js +2 -26
- package/es/elements/Th.d.ts +2 -28
- package/es/elements/Th.js +2 -26
- package/es/elements/Tr.d.ts +2 -28
- package/es/elements/Tr.js +2 -26
- package/es/elements/lib.d.ts +4 -6
- package/es/elements/lib.js +1 -3
- package/es/fragments/drawer-list/DrawerList.d.ts +13 -0
- package/es/fragments/drawer-list/DrawerList.js +25 -13
- package/es/fragments/drawer-list/DrawerListHelpers.d.ts +20 -0
- package/es/fragments/drawer-list/DrawerListHelpers.js +15 -0
- package/es/fragments/drawer-list/DrawerListProvider.d.ts +6 -9
- package/es/fragments/drawer-list/DrawerListProvider.js +31 -44
- package/es/fragments/drawer-list/style/_drawer-list.scss +40 -5
- package/es/fragments/drawer-list/style/themes/dnb-drawer-list-theme-ui.scss +58 -38
- package/es/icons/bookmark.d.ts +2 -0
- package/es/icons/bookmark.js +22 -0
- package/es/icons/bookmark_medium.d.ts +2 -0
- package/es/icons/bookmark_medium.js +22 -0
- package/es/icons/calendar_cancel.d.ts +2 -0
- package/es/icons/calendar_cancel.js +18 -0
- package/es/icons/calendar_cancel_medium.d.ts +2 -0
- package/es/icons/calendar_cancel_medium.js +18 -0
- package/es/icons/exclamation.js +5 -2
- package/es/icons/exclamation_circled.js +1 -1
- package/es/icons/exclamation_medium.js +5 -2
- package/es/icons/icons-meta.json +232 -198
- package/es/icons/icons-pdf.lock +6294 -0
- package/es/icons/icons-svg.lock +6294 -1
- package/es/icons/index.d.ts +5 -1
- package/es/icons/index.js +5 -1
- package/es/icons/reply.js +2 -1
- package/es/icons/reply_medium.js +2 -1
- package/es/icons/secondary_icons.d.ts +3 -1
- package/es/icons/secondary_icons.js +3 -1
- package/es/icons/secondary_icons_medium.d.ts +3 -1
- package/es/icons/secondary_icons_medium.js +3 -1
- package/es/icons/stopwatch.js +1 -1
- package/es/index.d.ts +30 -30
- package/es/index.js +30 -30
- package/es/shared/AnimateHeight.d.ts +1 -0
- package/es/shared/AnimateHeight.js +18 -2
- package/es/shared/Context.d.ts +92 -44
- package/es/shared/Context.js +4 -17
- package/es/shared/Eufemia.js +1 -1
- package/es/shared/MediaQuery.d.ts +18 -37
- package/es/shared/MediaQuery.js +3 -18
- package/es/shared/MediaQueryUtils.d.ts +61 -23
- package/es/shared/MediaQueryUtils.js +2 -2
- package/es/shared/Provider.d.ts +36 -12
- package/es/shared/Provider.js +6 -14
- package/es/shared/component-helper.d.ts +1 -1
- package/es/shared/component-helper.js +5 -5
- package/es/shared/interfaces.d.ts +13 -0
- package/es/shared/locales/en-GB.d.ts +1 -0
- package/es/shared/locales/en-GB.js +1 -0
- package/es/shared/locales/en-US.d.ts +1 -0
- package/es/shared/locales/index.d.ts +2 -0
- package/es/shared/locales/nb-NO.d.ts +1 -0
- package/es/shared/locales/nb-NO.js +1 -0
- package/es/shared/useMediaQuery.d.ts +3 -1
- package/es/shared/useTranslation.d.ts +1 -22
- package/es/style/dnb-ui-components.css +275 -74
- package/es/style/dnb-ui-components.min.css +3 -3
- package/es/style/dnb-ui-components.scss +1 -0
- package/es/style/dnb-ui-elements.css +1 -534
- package/es/style/dnb-ui-elements.min.css +1 -2
- package/es/style/dnb-ui-fragments.css +37 -15
- package/es/style/dnb-ui-fragments.min.css +1 -1
- package/es/style/dnb-ui-tags.css +1 -1065
- package/es/style/dnb-ui-tags.min.css +1 -3
- package/es/style/elements/table.scss +1 -389
- package/es/style/elements/ui-tags.scss +2 -2
- package/es/style/themes/theme-eiendom/dnb-theme-eiendom.css +511 -574
- package/es/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +7 -5
- package/es/style/themes/theme-ui/dnb-theme-ui.css +511 -574
- package/es/style/themes/theme-ui/dnb-theme-ui.min.css +7 -5
- package/es/style/themes/theme-ui/dnb-theme-ui.scss +1 -0
- package/esm/dnb-ui-basis.min.mjs +1 -1
- package/esm/dnb-ui-components.min.mjs +3 -3
- package/esm/dnb-ui-elements.min.mjs +3 -3
- package/esm/dnb-ui-extensions.min.mjs +4 -4
- package/esm/dnb-ui-icons.min.mjs +1 -1
- package/esm/dnb-ui-lib.min.mjs +4 -4
- package/esm/dnb-ui-web-components.min.mjs +4 -4
- package/fragments/drawer-list/DrawerList.d.ts +13 -0
- package/fragments/drawer-list/DrawerList.js +24 -12
- package/fragments/drawer-list/DrawerListHelpers.d.ts +20 -0
- package/fragments/drawer-list/DrawerListHelpers.js +15 -0
- package/fragments/drawer-list/DrawerListProvider.d.ts +6 -9
- package/fragments/drawer-list/DrawerListProvider.js +29 -43
- package/fragments/drawer-list/style/_drawer-list.scss +40 -5
- package/fragments/drawer-list/style/themes/dnb-drawer-list-theme-ui.scss +58 -38
- package/icons/bookmark.d.ts +2 -0
- package/icons/bookmark.js +24 -0
- package/icons/bookmark_medium.d.ts +2 -0
- package/icons/bookmark_medium.js +24 -0
- package/icons/calendar_cancel.d.ts +2 -0
- package/icons/calendar_cancel.js +20 -0
- package/icons/calendar_cancel_medium.d.ts +2 -0
- package/icons/calendar_cancel_medium.js +20 -0
- package/icons/exclamation.js +5 -2
- package/icons/exclamation_circled.js +1 -1
- package/icons/exclamation_medium.js +5 -2
- package/icons/icons-meta.json +232 -198
- package/icons/icons-pdf.lock +6294 -0
- package/icons/icons-svg.lock +6294 -1
- package/icons/index.d.ts +5 -1
- package/icons/index.js +5 -1
- package/icons/reply.js +2 -1
- package/icons/reply_medium.js +2 -1
- package/icons/secondary_icons.d.ts +3 -1
- package/icons/secondary_icons.js +3 -1
- package/icons/secondary_icons_medium.d.ts +3 -1
- package/icons/secondary_icons_medium.js +3 -1
- package/icons/stopwatch.js +1 -1
- package/index.d.ts +30 -30
- package/index.js +30 -30
- package/package.json +1 -1
- package/shared/AnimateHeight.d.ts +1 -0
- package/shared/AnimateHeight.js +18 -2
- package/shared/Context.d.ts +92 -44
- package/shared/Context.js +3 -16
- package/shared/Eufemia.js +1 -1
- package/shared/MediaQuery.d.ts +18 -37
- package/shared/MediaQuery.js +3 -17
- package/shared/MediaQueryUtils.d.ts +61 -23
- package/shared/MediaQueryUtils.js +2 -2
- package/shared/Provider.d.ts +36 -12
- package/shared/Provider.js +5 -12
- package/shared/component-helper.d.ts +1 -1
- package/shared/component-helper.js +5 -5
- package/shared/interfaces.d.ts +13 -0
- package/shared/locales/en-GB.d.ts +1 -0
- package/shared/locales/en-GB.js +1 -0
- package/shared/locales/en-US.d.ts +1 -0
- package/shared/locales/index.d.ts +2 -0
- package/shared/locales/nb-NO.d.ts +1 -0
- package/shared/locales/nb-NO.js +1 -0
- package/shared/useMediaQuery.d.ts +3 -1
- package/shared/useTranslation.d.ts +1 -22
- package/style/dnb-ui-components.css +275 -74
- package/style/dnb-ui-components.min.css +3 -3
- package/style/dnb-ui-components.scss +1 -0
- package/style/dnb-ui-elements.css +1 -534
- package/style/dnb-ui-elements.min.css +1 -2
- package/style/dnb-ui-fragments.css +37 -15
- package/style/dnb-ui-fragments.min.css +1 -1
- package/style/dnb-ui-tags.css +1 -1065
- package/style/dnb-ui-tags.min.css +1 -3
- package/style/elements/table.scss +1 -389
- package/style/elements/ui-tags.scss +2 -2
- package/style/themes/theme-eiendom/dnb-theme-eiendom.css +511 -574
- package/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +7 -5
- package/style/themes/theme-ui/dnb-theme-ui.css +511 -574
- package/style/themes/theme-ui/dnb-theme-ui.min.css +7 -5
- package/style/themes/theme-ui/dnb-theme-ui.scss +1 -0
- package/umd/dnb-ui-basis.min.js +1 -1
- package/umd/dnb-ui-components.min.js +3 -3
- package/umd/dnb-ui-elements.min.js +5 -5
- package/umd/dnb-ui-extensions.min.js +5 -5
- package/umd/dnb-ui-icons.min.js +1 -1
- package/umd/dnb-ui-lib.min.js +3 -3
- package/umd/dnb-ui-web-components.min.js +4 -4
- package/cjs/style/themes/theme-ui/prism/dnb-prism-styles.d.ts +0 -6
- package/cjs/style/themes/theme-ui/prism/dnb-prism-styles.js +0 -9
- package/es/style/themes/theme-ui/prism/dnb-prism-styles.d.ts +0 -6
- package/es/style/themes/theme-ui/prism/dnb-prism-styles.js +0 -93
- package/style/themes/theme-ui/prism/dnb-prism-styles.d.ts +0 -6
- package/style/themes/theme-ui/prism/dnb-prism-styles.js +0 -2
|
@@ -6,18 +6,8 @@ require("core-js/modules/es.object.get-prototype-of.js");
|
|
|
6
6
|
|
|
7
7
|
require("core-js/modules/es.reflect.construct.js");
|
|
8
8
|
|
|
9
|
-
require("core-js/modules/es.object.keys.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/es.array.index-of.js");
|
|
12
|
-
|
|
13
9
|
require("core-js/modules/es.symbol.js");
|
|
14
10
|
|
|
15
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
-
|
|
17
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
18
|
-
|
|
19
|
-
require("core-js/modules/es.object.assign.js");
|
|
20
|
-
|
|
21
11
|
require("core-js/modules/es.symbol.description.js");
|
|
22
12
|
|
|
23
13
|
require("core-js/modules/es.symbol.iterator.js");
|
|
@@ -28,6 +18,24 @@ require("core-js/modules/es.string.iterator.js");
|
|
|
28
18
|
|
|
29
19
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
30
20
|
|
|
21
|
+
require("core-js/modules/es.array.from.js");
|
|
22
|
+
|
|
23
|
+
require("core-js/modules/es.array.slice.js");
|
|
24
|
+
|
|
25
|
+
require("core-js/modules/es.function.name.js");
|
|
26
|
+
|
|
27
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
28
|
+
|
|
29
|
+
require("core-js/modules/es.object.keys.js");
|
|
30
|
+
|
|
31
|
+
require("core-js/modules/es.array.index-of.js");
|
|
32
|
+
|
|
33
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
34
|
+
|
|
35
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
36
|
+
|
|
37
|
+
require("core-js/modules/es.object.assign.js");
|
|
38
|
+
|
|
31
39
|
Object.defineProperty(exports, "__esModule", {
|
|
32
40
|
value: true
|
|
33
41
|
});
|
|
@@ -37,6 +45,8 @@ require("core-js/modules/es.array.filter.js");
|
|
|
37
45
|
|
|
38
46
|
require("core-js/modules/es.object.to-string.js");
|
|
39
47
|
|
|
48
|
+
require("core-js/modules/es.array.concat.js");
|
|
49
|
+
|
|
40
50
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
41
51
|
|
|
42
52
|
require("core-js/modules/es.parse-float.js");
|
|
@@ -76,6 +86,18 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
76
86
|
|
|
77
87
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
78
88
|
|
|
89
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
90
|
+
|
|
91
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
92
|
+
|
|
93
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
94
|
+
|
|
95
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
96
|
+
|
|
97
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
98
|
+
|
|
99
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
100
|
+
|
|
79
101
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
80
102
|
|
|
81
103
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -118,6 +140,10 @@ var ModalContent = function (_React$PureComponent) {
|
|
|
118
140
|
|
|
119
141
|
_defineProperty(_assertThisInitialized(_this), "_contentRef", void 0);
|
|
120
142
|
|
|
143
|
+
_defineProperty(_assertThisInitialized(_this), "_scrollRef", void 0);
|
|
144
|
+
|
|
145
|
+
_defineProperty(_assertThisInitialized(_this), "_overlayClickRef", void 0);
|
|
146
|
+
|
|
121
147
|
_defineProperty(_assertThisInitialized(_this), "_id", void 0);
|
|
122
148
|
|
|
123
149
|
_defineProperty(_assertThisInitialized(_this), "_lockTimeout", void 0);
|
|
@@ -135,9 +161,11 @@ var ModalContent = function (_React$PureComponent) {
|
|
|
135
161
|
var firstLevel = modalRoots[0];
|
|
136
162
|
|
|
137
163
|
if (firstLevel === _assertThisInitialized(_this)) {
|
|
164
|
+
var _this$props;
|
|
165
|
+
|
|
138
166
|
_this._ii = new _componentHelper.InteractionInvalidation();
|
|
139
167
|
|
|
140
|
-
_this._ii.setBypassSelector(['.dnb-modal__content *', "#dnb-modal-".concat(_this.props.root_id || 'root'), "#dnb-modal-".concat(_this.props.root_id || 'root', " *")].filter(Boolean));
|
|
168
|
+
_this._ii.setBypassSelector(['.dnb-modal__content *', "#dnb-modal-".concat(_this.props.root_id || 'root'), "#dnb-modal-".concat(_this.props.root_id || 'root', " *")].concat(_toConsumableArray(((_this$props = _this.props) === null || _this$props === void 0 ? void 0 : _this$props.bypass_invalidation_selectors) || [])).filter(Boolean));
|
|
141
169
|
|
|
142
170
|
_this._ii.activate();
|
|
143
171
|
} else {
|
|
@@ -183,7 +211,16 @@ var ModalContent = function (_React$PureComponent) {
|
|
|
183
211
|
});
|
|
184
212
|
});
|
|
185
213
|
|
|
214
|
+
_defineProperty(_assertThisInitialized(_this), "onContentMouseDownHandler", function (event) {
|
|
215
|
+
_this._overlayClickRef.current = event.target === event.currentTarget ? event.target : null;
|
|
216
|
+
});
|
|
217
|
+
|
|
186
218
|
_defineProperty(_assertThisInitialized(_this), "onContentClickHandler", function (event) {
|
|
219
|
+
if (_this._overlayClickRef.current !== event.target) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
_this._overlayClickRef.current = null;
|
|
187
224
|
var prevent_overlay_close = _this.props.prevent_overlay_close;
|
|
188
225
|
|
|
189
226
|
if (!(0, _componentHelper.isTrue)(prevent_overlay_close)) {
|
|
@@ -221,7 +258,9 @@ var ModalContent = function (_React$PureComponent) {
|
|
|
221
258
|
});
|
|
222
259
|
});
|
|
223
260
|
|
|
224
|
-
_this._contentRef = _react.default.createRef();
|
|
261
|
+
_this._contentRef = _this.props.content_ref || _react.default.createRef();
|
|
262
|
+
_this._scrollRef = _this.props.scroll_ref || _react.default.createRef();
|
|
263
|
+
_this._overlayClickRef = _react.default.createRef();
|
|
225
264
|
_this._id = props.id;
|
|
226
265
|
return _this;
|
|
227
266
|
}
|
|
@@ -229,13 +268,13 @@ var ModalContent = function (_React$PureComponent) {
|
|
|
229
268
|
_createClass(ModalContent, [{
|
|
230
269
|
key: "componentDidMount",
|
|
231
270
|
value: function componentDidMount() {
|
|
232
|
-
var _this$
|
|
233
|
-
_this$
|
|
234
|
-
id = _this$
|
|
235
|
-
_this$
|
|
236
|
-
no_animation = _this$
|
|
237
|
-
_this$
|
|
238
|
-
animation_duration = _this$
|
|
271
|
+
var _this$props2 = this.props,
|
|
272
|
+
_this$props2$id = _this$props2.id,
|
|
273
|
+
id = _this$props2$id === void 0 ? null : _this$props2$id,
|
|
274
|
+
_this$props2$no_anima = _this$props2.no_animation,
|
|
275
|
+
no_animation = _this$props2$no_anima === void 0 ? false : _this$props2$no_anima,
|
|
276
|
+
_this$props2$animatio = _this$props2.animation_duration,
|
|
277
|
+
animation_duration = _this$props2$animatio === void 0 ? null : _this$props2$animatio;
|
|
239
278
|
var timeoutDuration = typeof animation_duration === 'string' ? parseFloat(animation_duration) : animation_duration;
|
|
240
279
|
(0, _helpers2.addToIndex)(this);
|
|
241
280
|
this.removeScrollPossibility();
|
|
@@ -315,13 +354,13 @@ var ModalContent = function (_React$PureComponent) {
|
|
|
315
354
|
}, {
|
|
316
355
|
key: "setFocus",
|
|
317
356
|
value: function setFocus() {
|
|
318
|
-
var _this$
|
|
319
|
-
_this$
|
|
320
|
-
focus_selector = _this$
|
|
321
|
-
_this$
|
|
322
|
-
no_animation = _this$
|
|
323
|
-
_this$
|
|
324
|
-
animation_duration = _this$
|
|
357
|
+
var _this$props3 = this.props,
|
|
358
|
+
_this$props3$focus_se = _this$props3.focus_selector,
|
|
359
|
+
focus_selector = _this$props3$focus_se === void 0 ? null : _this$props3$focus_se,
|
|
360
|
+
_this$props3$no_anima = _this$props3.no_animation,
|
|
361
|
+
no_animation = _this$props3$no_anima === void 0 ? null : _this$props3$no_anima,
|
|
362
|
+
_this$props3$animatio = _this$props3.animation_duration,
|
|
363
|
+
animation_duration = _this$props3$animatio === void 0 ? null : _this$props3$animatio;
|
|
325
364
|
var elem = this._contentRef.current;
|
|
326
365
|
var timeoutDuration = typeof animation_duration === 'string' ? parseFloat(animation_duration) : animation_duration;
|
|
327
366
|
|
|
@@ -350,14 +389,14 @@ var ModalContent = function (_React$PureComponent) {
|
|
|
350
389
|
}, {
|
|
351
390
|
key: "removeScrollPossibility",
|
|
352
391
|
value: function removeScrollPossibility() {
|
|
353
|
-
if (this.
|
|
354
|
-
(0, _bodyScrollLock.disableBodyScroll)(this.
|
|
392
|
+
if (this._scrollRef.current) {
|
|
393
|
+
(0, _bodyScrollLock.disableBodyScroll)(this._scrollRef.current);
|
|
355
394
|
}
|
|
356
395
|
}
|
|
357
396
|
}, {
|
|
358
397
|
key: "revertScrollPossibility",
|
|
359
398
|
value: function revertScrollPossibility() {
|
|
360
|
-
(0, _bodyScrollLock.enableBodyScroll)(this.
|
|
399
|
+
(0, _bodyScrollLock.enableBodyScroll)(this._scrollRef.current);
|
|
361
400
|
(0, _bodyScrollLock.clearAllBodyScrollLocks)();
|
|
362
401
|
}
|
|
363
402
|
}, {
|
|
@@ -382,47 +421,47 @@ var ModalContent = function (_React$PureComponent) {
|
|
|
382
421
|
}, {
|
|
383
422
|
key: "render",
|
|
384
423
|
value: function render() {
|
|
385
|
-
var _this$
|
|
386
|
-
_this$
|
|
387
|
-
mode = _this$
|
|
388
|
-
hide = _this$
|
|
389
|
-
title = _this$
|
|
390
|
-
labelled_by = _this$
|
|
391
|
-
_id = _this$
|
|
392
|
-
_this$
|
|
393
|
-
close_title = _this$
|
|
394
|
-
_this$
|
|
395
|
-
dialog_title = _this$
|
|
396
|
-
_this$
|
|
397
|
-
hide_close_button = _this$
|
|
398
|
-
close_button_attributes = _this$
|
|
399
|
-
animation_duration = _this$
|
|
400
|
-
_this$
|
|
401
|
-
no_animation = _this$
|
|
402
|
-
_this$
|
|
403
|
-
no_animation_on_mobile = _this$
|
|
404
|
-
_this$
|
|
405
|
-
fullscreen = _this$
|
|
406
|
-
_this$
|
|
407
|
-
align_content = _this$
|
|
408
|
-
_this$
|
|
409
|
-
container_placement = _this$
|
|
410
|
-
close = _this$
|
|
411
|
-
content_class = _this$
|
|
412
|
-
overlay_class = _this$
|
|
413
|
-
content_id = _this$
|
|
414
|
-
children = _this$
|
|
415
|
-
min_width = _this$
|
|
416
|
-
max_width = _this$
|
|
417
|
-
modal_content = _this$
|
|
418
|
-
header_content = _this$
|
|
419
|
-
bar_content = _this$
|
|
420
|
-
className = _this$
|
|
421
|
-
prevent_core_style = _this$
|
|
422
|
-
_className = _this$
|
|
423
|
-
_this$
|
|
424
|
-
dialog_role = _this$
|
|
425
|
-
rest = _objectWithoutProperties(_this$
|
|
424
|
+
var _this$props4 = this.props,
|
|
425
|
+
_this$props4$mode = _this$props4.mode,
|
|
426
|
+
mode = _this$props4$mode === void 0 ? 'modal' : _this$props4$mode,
|
|
427
|
+
hide = _this$props4.hide,
|
|
428
|
+
title = _this$props4.title,
|
|
429
|
+
labelled_by = _this$props4.labelled_by,
|
|
430
|
+
_id = _this$props4.id,
|
|
431
|
+
_this$props4$close_ti = _this$props4.close_title,
|
|
432
|
+
close_title = _this$props4$close_ti === void 0 ? 'Lukk' : _this$props4$close_ti,
|
|
433
|
+
_this$props4$dialog_t = _this$props4.dialog_title,
|
|
434
|
+
dialog_title = _this$props4$dialog_t === void 0 ? 'Vindu' : _this$props4$dialog_t,
|
|
435
|
+
_this$props4$hide_clo = _this$props4.hide_close_button,
|
|
436
|
+
hide_close_button = _this$props4$hide_clo === void 0 ? false : _this$props4$hide_clo,
|
|
437
|
+
close_button_attributes = _this$props4.close_button_attributes,
|
|
438
|
+
animation_duration = _this$props4.animation_duration,
|
|
439
|
+
_this$props4$no_anima = _this$props4.no_animation,
|
|
440
|
+
no_animation = _this$props4$no_anima === void 0 ? false : _this$props4$no_anima,
|
|
441
|
+
_this$props4$no_anima2 = _this$props4.no_animation_on_mobile,
|
|
442
|
+
no_animation_on_mobile = _this$props4$no_anima2 === void 0 ? false : _this$props4$no_anima2,
|
|
443
|
+
_this$props4$fullscre = _this$props4.fullscreen,
|
|
444
|
+
fullscreen = _this$props4$fullscre === void 0 ? 'auto' : _this$props4$fullscre,
|
|
445
|
+
_this$props4$align_co = _this$props4.align_content,
|
|
446
|
+
align_content = _this$props4$align_co === void 0 ? 'left' : _this$props4$align_co,
|
|
447
|
+
_this$props4$containe = _this$props4.container_placement,
|
|
448
|
+
container_placement = _this$props4$containe === void 0 ? 'right' : _this$props4$containe,
|
|
449
|
+
close = _this$props4.close,
|
|
450
|
+
content_class = _this$props4.content_class,
|
|
451
|
+
overlay_class = _this$props4.overlay_class,
|
|
452
|
+
content_id = _this$props4.content_id,
|
|
453
|
+
children = _this$props4.children,
|
|
454
|
+
min_width = _this$props4.min_width,
|
|
455
|
+
max_width = _this$props4.max_width,
|
|
456
|
+
modal_content = _this$props4.modal_content,
|
|
457
|
+
header_content = _this$props4.header_content,
|
|
458
|
+
bar_content = _this$props4.bar_content,
|
|
459
|
+
className = _this$props4.className,
|
|
460
|
+
prevent_core_style = _this$props4.prevent_core_style,
|
|
461
|
+
_className = _this$props4.class,
|
|
462
|
+
_this$props4$dialog_r = _this$props4.dialog_role,
|
|
463
|
+
dialog_role = _this$props4$dialog_r === void 0 ? null : _this$props4$dialog_r,
|
|
464
|
+
rest = _objectWithoutProperties(_this$props4, _excluded2);
|
|
426
465
|
|
|
427
466
|
var color = this.state.color;
|
|
428
467
|
var contentId = content_id || (0, _componentHelper.makeUniqueId)('modal-');
|
|
@@ -440,6 +479,7 @@ var ModalContent = function (_React$PureComponent) {
|
|
|
440
479
|
'aria-describedby': (0, _componentHelper.combineDescribedBy)(this.props, contentId + '-content'),
|
|
441
480
|
'aria-label': !title && !labelled_by ? dialog_title : undefined,
|
|
442
481
|
className: (0, _classnames.default)('dnb-modal__content', (0, _componentHelper.isTrue)(fullscreen) ? 'dnb-modal__content--fullscreen' : fullscreen === 'auto' && 'dnb-modal__content--auto-fullscreen', (container_placement || mode === 'drawer') && "dnb-modal__content--".concat(container_placement || 'right'), content_class, mode && "dnb-modal__content--".concat(mode)),
|
|
482
|
+
onMouseDown: this.onContentMouseDownHandler,
|
|
443
483
|
onClick: this.onContentClickHandler
|
|
444
484
|
};
|
|
445
485
|
|
|
@@ -474,6 +514,7 @@ var ModalContent = function (_React$PureComponent) {
|
|
|
474
514
|
preventClick: this.preventClick,
|
|
475
515
|
onKeyDownHandler: this.onKeyDownHandler,
|
|
476
516
|
contentRef: this._contentRef,
|
|
517
|
+
scrollRef: this._scrollRef,
|
|
477
518
|
contentId: contentId,
|
|
478
519
|
close: close
|
|
479
520
|
}
|
|
@@ -4,35 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { ButtonProps } from '../../button';
|
|
7
|
-
export
|
|
7
|
+
export declare type CloseButtonProps = {
|
|
8
8
|
/**
|
|
9
9
|
* The title of the close button. Defaults to <em>Close</em> or <em>Lukk</em>.
|
|
10
10
|
*/
|
|
11
11
|
close_title?: string;
|
|
12
|
-
}
|
|
12
|
+
} & Partial<ButtonProps>;
|
|
13
13
|
export default class CloseButton extends React.PureComponent<CloseButtonProps> {
|
|
14
|
-
static contextType: React.Context<
|
|
15
|
-
translation: any;
|
|
16
|
-
updateTranslation: (locale: any, translation: any) => void;
|
|
17
|
-
getTranslation: (props: any) => any;
|
|
18
|
-
locale: any;
|
|
19
|
-
locales: any;
|
|
20
|
-
skeleton: any;
|
|
21
|
-
Button: {};
|
|
22
|
-
Avatar: {};
|
|
23
|
-
AvatarGroup: {};
|
|
24
|
-
Breadcrumb: {};
|
|
25
|
-
BreadcrumbItem: {};
|
|
26
|
-
InfoCard: {};
|
|
27
|
-
Tag: {};
|
|
28
|
-
TagGroup: {};
|
|
29
|
-
Timeline: {};
|
|
30
|
-
TimelineItem: {};
|
|
31
|
-
VisuallyHidden: {};
|
|
32
|
-
Drawer: {};
|
|
33
|
-
Dialog: {};
|
|
34
|
-
NumberFormat: {};
|
|
35
|
-
}>;
|
|
14
|
+
static contextType: React.Context<import("../../../shared/Context").ContextProps>;
|
|
36
15
|
static defaultProps: {
|
|
37
16
|
close_title: any;
|
|
38
17
|
size: string;
|
|
@@ -31,10 +31,11 @@ export default class ModalHeaderBar extends React.PureComponent<ModalHeaderBarPr
|
|
|
31
31
|
setBackgroundColor: any;
|
|
32
32
|
onCloseClickHandler: any;
|
|
33
33
|
contentRef: any;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
scrollRef: any;
|
|
35
|
+
hide: any; /**
|
|
36
36
|
* The content which will appear when triggering the modal/drawer.
|
|
37
37
|
*/
|
|
38
|
+
contentId: any;
|
|
38
39
|
close: any;
|
|
39
40
|
}>;
|
|
40
41
|
_ref: React.RefObject<any>;
|
|
@@ -1099,6 +1099,7 @@ button.dnb-button::-moz-focus-inner {
|
|
|
1099
1099
|
width: 100%;
|
|
1100
1100
|
height: 100vh;
|
|
1101
1101
|
max-width: 100%;
|
|
1102
|
+
max-height: 100vh;
|
|
1102
1103
|
border-radius: 0;
|
|
1103
1104
|
-webkit-box-shadow: none;
|
|
1104
1105
|
box-shadow: none;
|
|
@@ -1128,6 +1129,7 @@ button.dnb-button::-moz-focus-inner {
|
|
|
1128
1129
|
width: 100%;
|
|
1129
1130
|
height: 100vh;
|
|
1130
1131
|
max-width: 100%;
|
|
1132
|
+
max-height: 100vh;
|
|
1131
1133
|
border-radius: 0;
|
|
1132
1134
|
-webkit-box-shadow: none;
|
|
1133
1135
|
box-shadow: none; } }
|
|
@@ -1223,6 +1225,7 @@ button.dnb-button::-moz-focus-inner {
|
|
|
1223
1225
|
width: 100%;
|
|
1224
1226
|
height: 100vh;
|
|
1225
1227
|
max-width: 100%;
|
|
1228
|
+
max-height: 100vh;
|
|
1226
1229
|
border-radius: 0;
|
|
1227
1230
|
-webkit-box-shadow: none;
|
|
1228
1231
|
box-shadow: none; }
|
|
@@ -1458,7 +1461,6 @@ button.dnb-button::-moz-focus-inner {
|
|
|
1458
1461
|
|
|
1459
1462
|
.dnb-dialog {
|
|
1460
1463
|
position: relative;
|
|
1461
|
-
max-height: 100vh;
|
|
1462
1464
|
border-radius: 0.5rem;
|
|
1463
1465
|
-webkit-box-shadow: 0 8px 16px rgba(51, 51, 51, 0.08);
|
|
1464
1466
|
box-shadow: 0 8px 16px rgba(51, 51, 51, 0.08);
|
|
@@ -1469,7 +1471,22 @@ button.dnb-button::-moz-focus-inner {
|
|
|
1469
1471
|
user-select: text;
|
|
1470
1472
|
-webkit-user-select: text;
|
|
1471
1473
|
border: none;
|
|
1472
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
1474
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
1475
|
+
max-height: 100vh;
|
|
1476
|
+
overflow: hidden; }
|
|
1477
|
+
.dnb-dialog .dnb-scroll-view {
|
|
1478
|
+
max-height: 90vh; }
|
|
1479
|
+
.dnb-dialog__inner {
|
|
1480
|
+
position: relative;
|
|
1481
|
+
display: -webkit-box;
|
|
1482
|
+
display: -ms-flexbox;
|
|
1483
|
+
display: flex;
|
|
1484
|
+
-webkit-box-orient: vertical;
|
|
1485
|
+
-webkit-box-direction: normal;
|
|
1486
|
+
-ms-flex-direction: column;
|
|
1487
|
+
flex-direction: column;
|
|
1488
|
+
width: 100%;
|
|
1489
|
+
height: 100%; }
|
|
1473
1490
|
.dnb-dialog--information {
|
|
1474
1491
|
min-width: 320px;
|
|
1475
1492
|
min-width: var(--dialog-min-width);
|
|
@@ -1480,33 +1497,32 @@ button.dnb-button::-moz-focus-inner {
|
|
|
1480
1497
|
.dnb-dialog--confirmation {
|
|
1481
1498
|
max-width: 40rem;
|
|
1482
1499
|
max-width: var(--dialog-confirm-max-width);
|
|
1483
|
-
margin:
|
|
1500
|
+
margin-left: 1rem;
|
|
1501
|
+
margin-right: 1rem; }
|
|
1484
1502
|
@media screen and (max-width: 40em) {
|
|
1485
1503
|
.dnb-dialog--auto-fullscreen {
|
|
1486
1504
|
width: 100%;
|
|
1487
1505
|
height: 100vh;
|
|
1488
1506
|
max-width: 100%;
|
|
1507
|
+
max-height: 100vh;
|
|
1489
1508
|
border-radius: 0;
|
|
1490
1509
|
-webkit-box-shadow: none;
|
|
1491
|
-
box-shadow: none;
|
|
1510
|
+
box-shadow: none;
|
|
1511
|
+
margin: auto 0; } }
|
|
1492
1512
|
.dnb-dialog--fullscreen {
|
|
1493
1513
|
width: 100%;
|
|
1494
1514
|
height: 100vh;
|
|
1495
1515
|
max-width: 100%;
|
|
1516
|
+
max-height: 100vh;
|
|
1496
1517
|
border-radius: 0;
|
|
1497
1518
|
-webkit-box-shadow: none;
|
|
1498
|
-
box-shadow: none;
|
|
1519
|
+
box-shadow: none;
|
|
1520
|
+
margin: auto 0; }
|
|
1499
1521
|
.dnb-dialog--spacing.dnb-dialog--information .dnb-dialog__content {
|
|
1500
1522
|
padding-bottom: 4rem;
|
|
1501
1523
|
padding-bottom: calc(2rem * 2);
|
|
1502
1524
|
padding-bottom: calc(var(--dialog-spacing)*2);
|
|
1503
1525
|
padding-bottom: calc(var(--dialog-spacing) * 2); }
|
|
1504
|
-
@supports (-webkit-touch-callout: none) {
|
|
1505
|
-
.dnb-dialog--spacing.dnb-dialog--information .dnb-dialog__content {
|
|
1506
|
-
padding-bottom: 16rem;
|
|
1507
|
-
padding-bottom: calc(2rem * 8);
|
|
1508
|
-
padding-bottom: calc(var(--dialog-spacing)*8);
|
|
1509
|
-
padding-bottom: calc(var(--dialog-spacing) * 8); } }
|
|
1510
1526
|
.dnb-dialog--spacing.dnb-dialog--information .dnb-dialog__inner {
|
|
1511
1527
|
padding-left: 3.5rem;
|
|
1512
1528
|
padding-left: calc(2rem * 1.75);
|
|
@@ -1552,32 +1568,6 @@ button.dnb-button::-moz-focus-inner {
|
|
|
1552
1568
|
padding: 2rem;
|
|
1553
1569
|
padding: calc(2rem);
|
|
1554
1570
|
padding: calc(var(--dialog-spacing)); }
|
|
1555
|
-
@supports (-webkit-touch-callout: none) {
|
|
1556
|
-
.dnb-dialog--spacing.dnb-dialog--confirmation .dnb-dialog__inner {
|
|
1557
|
-
padding-bottom: 16rem;
|
|
1558
|
-
padding-bottom: calc(2rem * 8);
|
|
1559
|
-
padding-bottom: calc(var(--dialog-spacing)*8);
|
|
1560
|
-
padding-bottom: calc(var(--dialog-spacing) * 8); } }
|
|
1561
|
-
.dnb-dialog__inner {
|
|
1562
|
-
position: relative;
|
|
1563
|
-
display: -webkit-box;
|
|
1564
|
-
display: -ms-flexbox;
|
|
1565
|
-
display: flex;
|
|
1566
|
-
-webkit-box-orient: vertical;
|
|
1567
|
-
-webkit-box-direction: normal;
|
|
1568
|
-
-ms-flex-direction: column;
|
|
1569
|
-
flex-direction: column;
|
|
1570
|
-
width: 100%;
|
|
1571
|
-
height: 100%;
|
|
1572
|
-
overflow-x: hidden; }
|
|
1573
|
-
.dnb-dialog__inner::after {
|
|
1574
|
-
content: '';
|
|
1575
|
-
position: absolute;
|
|
1576
|
-
z-index: -4;
|
|
1577
|
-
left: 0;
|
|
1578
|
-
top: 0;
|
|
1579
|
-
width: 100vw;
|
|
1580
|
-
height: 100%; }
|
|
1581
1571
|
.dnb-dialog__align--centered .dnb-dialog__inner {
|
|
1582
1572
|
-webkit-box-align: center;
|
|
1583
1573
|
-ms-flex-align: center;
|
|
@@ -1710,9 +1700,9 @@ button.dnb-button::-moz-focus-inner {
|
|
|
1710
1700
|
.dnb-dialog__icon ~ .dnb-dialog__header {
|
|
1711
1701
|
margin-top: 1.5rem; }
|
|
1712
1702
|
@supports (-webkit-touch-callout: none) {
|
|
1713
|
-
@media (max-height: 40em)
|
|
1714
|
-
.dnb-dialog
|
|
1715
|
-
max-height:
|
|
1703
|
+
@media (max-height: 40em) {
|
|
1704
|
+
.dnb-dialog .dnb-scroll-view {
|
|
1705
|
+
max-height: 82vh; } } }
|
|
1716
1706
|
|
|
1717
1707
|
[data-visual-test].hide-page-content #___gatsby {
|
|
1718
1708
|
opacity: 0; }
|