@dnb/eufemia 9.25.0 → 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 +72 -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/Accordion.d.ts +17 -4
- package/cjs/components/accordion/AccordionContent.js +1 -1
- package/cjs/components/accordion/AccordionHeader.d.ts +11 -4
- package/cjs/components/accordion/AccordionHeader.js +17 -7
- package/cjs/components/accordion/AccordionPropTypes.js +5 -2
- package/cjs/components/accordion/AccordionProvider.d.ts +17 -2
- package/cjs/components/autocomplete/Autocomplete.d.ts +32 -0
- package/cjs/components/autocomplete/Autocomplete.js +57 -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 +81 -115
- 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 +57 -75
- 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/help-button/HelpButtonInstance.js +7 -7
- 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 +3 -2
- package/cjs/components/modal/style/_modal.scss +5 -6
- package/cjs/components/modal/style/dnb-modal.css +52 -71
- 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 +7 -9
- package/cjs/fragments/drawer-list/DrawerListProvider.js +28 -40
- 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 +293 -97
- package/cjs/style/dnb-ui-components.min.css +4 -4
- 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/Accordion.d.ts +17 -4
- package/components/accordion/AccordionContent.js +1 -1
- package/components/accordion/AccordionHeader.d.ts +11 -4
- package/components/accordion/AccordionHeader.js +17 -7
- package/components/accordion/AccordionPropTypes.js +5 -2
- package/components/accordion/AccordionProvider.d.ts +17 -2
- package/components/autocomplete/Autocomplete.d.ts +32 -0
- package/components/autocomplete/Autocomplete.js +57 -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 +81 -115
- 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 +57 -75
- 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/help-button/HelpButtonInstance.js +7 -7
- 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 +3 -2
- package/components/modal/style/_modal.scss +5 -6
- package/components/modal/style/dnb-modal.css +52 -71
- 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/Accordion.d.ts +17 -4
- package/es/components/accordion/AccordionContent.js +1 -1
- package/es/components/accordion/AccordionHeader.d.ts +11 -4
- package/es/components/accordion/AccordionHeader.js +18 -8
- package/es/components/accordion/AccordionPropTypes.js +5 -2
- package/es/components/accordion/AccordionProvider.d.ts +17 -2
- package/es/components/autocomplete/Autocomplete.d.ts +32 -0
- package/es/components/autocomplete/Autocomplete.js +51 -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 +81 -115
- 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 +57 -75
- 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/help-button/HelpButtonInstance.js +7 -7
- 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 +3 -2
- package/es/components/modal/style/_modal.scss +5 -6
- package/es/components/modal/style/dnb-modal.css +52 -71
- 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 +7 -9
- package/es/fragments/drawer-list/DrawerListProvider.js +31 -42
- 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 +293 -97
- package/es/style/dnb-ui-components.min.css +4 -4
- 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 +7 -9
- package/fragments/drawer-list/DrawerListProvider.js +29 -41
- 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 +293 -97
- package/style/dnb-ui-components.min.css +4 -4
- 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
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
@import '../../../components/step-indicator/style/themes/dnb-step-indicator-theme-ui.scss';
|
|
55
55
|
@import '../../../components/step-indicator/style/themes/dnb-step-indicator-v1-theme-ui.scss';
|
|
56
56
|
@import '../../../components/switch/style/themes/dnb-switch-theme-ui.scss';
|
|
57
|
+
@import '../../../components/table/style/themes/dnb-table-theme-ui.scss';
|
|
57
58
|
@import '../../../components/tabs/style/themes/dnb-tabs-theme-ui.scss';
|
|
58
59
|
@import '../../../components/textarea/style/themes/dnb-textarea-theme-ui.scss';
|
|
59
60
|
@import '../../../components/timeline/style/themes/dnb-timeline-theme-ui.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default Style;
|
|
@@ -11,12 +11,24 @@ export type AccordionPreventRerenderConditional = string | boolean;
|
|
|
11
11
|
export type AccordionRememberState = string | boolean;
|
|
12
12
|
export type AccordionFlushRememberedState = string | boolean;
|
|
13
13
|
export type AccordionSingleContainer = string | boolean;
|
|
14
|
-
export type AccordionVariant = 'default' | 'outlined' | 'filled';
|
|
14
|
+
export type AccordionVariant = 'plain' | 'default' | 'outlined' | 'filled';
|
|
15
15
|
export type AccordionAllowCloseAll = string | boolean;
|
|
16
16
|
export type AccordionDisabled = string | boolean;
|
|
17
17
|
export type AccordionSkeleton = string | boolean;
|
|
18
18
|
export type AccordionHeading = boolean | React.ReactNode;
|
|
19
19
|
export type AccordionHeadingLevel = string | number;
|
|
20
|
+
export type AccordionIcon =
|
|
21
|
+
| React.ReactNode
|
|
22
|
+
| ((...args: any[]) => any)
|
|
23
|
+
| {
|
|
24
|
+
closed?: React.ReactNode | ((...args: any[]) => any);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* If set to `true` the accordion will be expanded as its initial state.
|
|
28
|
+
*/
|
|
29
|
+
expanded?: React.ReactNode | ((...args: any[]) => any);
|
|
30
|
+
};
|
|
31
|
+
export type AccordionClosed = React.ReactNode | ((...args: any[]) => any);
|
|
20
32
|
export type AccordionIconPosition = 'left' | 'right';
|
|
21
33
|
export type AccordionAttributes = string | Object;
|
|
22
34
|
export type AccordionSpace =
|
|
@@ -104,7 +116,7 @@ export interface AccordionProps extends React.HTMLProps<HTMLElement> {
|
|
|
104
116
|
single_container?: AccordionSingleContainer;
|
|
105
117
|
|
|
106
118
|
/**
|
|
107
|
-
* Defines the used styling. As of now, only `outlined` is available. It defaults to `outlined`.
|
|
119
|
+
* Defines the used styling. As of now, only `outlined` is available. Use `plain` for no styles. It defaults to `outlined`.
|
|
108
120
|
*/
|
|
109
121
|
variant?: AccordionVariant;
|
|
110
122
|
|
|
@@ -146,9 +158,10 @@ export interface AccordionProps extends React.HTMLProps<HTMLElement> {
|
|
|
146
158
|
heading_level?: AccordionHeadingLevel;
|
|
147
159
|
|
|
148
160
|
/**
|
|
149
|
-
* Will replace the `chevron` icon. The icon will still rotate (by CSS).
|
|
161
|
+
* Will replace the `chevron` icon. The icon will still rotate (by CSS). You can use an object to use two different icons, one for the closed state and one for the expanded state `{ closed, expanded }`.
|
|
150
162
|
*/
|
|
151
|
-
icon?:
|
|
163
|
+
icon?: AccordionIcon;
|
|
164
|
+
closed?: AccordionClosed;
|
|
152
165
|
|
|
153
166
|
/**
|
|
154
167
|
* Will set the placement of the icon. Defaults to `left`.
|
|
@@ -182,7 +182,7 @@ var AccordionContent = function (_React$PureComponent) {
|
|
|
182
182
|
id: "".concat(id, "-content"),
|
|
183
183
|
role: 'region',
|
|
184
184
|
'aria-labelledby': "".concat(id, "-header"),
|
|
185
|
-
className: classnames('dnb-accordion__content__inner', createSpacingClasses(rest),
|
|
185
|
+
className: classnames('dnb-accordion__content__inner', createSpacingClasses(rest), !expanded && !keepContentInDom && 'dnb-accordion__content__inner--remove-content')
|
|
186
186
|
};
|
|
187
187
|
|
|
188
188
|
if (expanded) {
|
|
@@ -81,9 +81,12 @@ export interface AccordionHeaderContainerProps {
|
|
|
81
81
|
}
|
|
82
82
|
declare const AccordionHeaderContainer: React.FC<AccordionHeaderContainerProps>;
|
|
83
83
|
export type AccordionHeaderIconIcon =
|
|
84
|
-
| string
|
|
85
84
|
| React.ReactNode
|
|
86
|
-
| ((...args: any[]) => any)
|
|
85
|
+
| ((...args: any[]) => any)
|
|
86
|
+
| {
|
|
87
|
+
closed?: React.ReactNode | ((...args: any[]) => any);
|
|
88
|
+
expanded?: React.ReactNode | ((...args: any[]) => any);
|
|
89
|
+
};
|
|
87
90
|
|
|
88
91
|
/**
|
|
89
92
|
* NB: Do not change the docs (comments) in here. The docs are updated during build time by "generateTypes.js" and "fetchPropertiesFromDocs.js".
|
|
@@ -91,6 +94,7 @@ export type AccordionHeaderIconIcon =
|
|
|
91
94
|
export interface AccordionHeaderIconProps {
|
|
92
95
|
icon?: AccordionHeaderIconIcon;
|
|
93
96
|
size?: string;
|
|
97
|
+
expanded?: boolean;
|
|
94
98
|
}
|
|
95
99
|
declare const AccordionHeaderIcon: React.FC<AccordionHeaderIconProps>;
|
|
96
100
|
export type AccordionHeaderTitle =
|
|
@@ -116,9 +120,12 @@ export type AccordionHeaderHeading =
|
|
|
116
120
|
| ((...args: any[]) => any);
|
|
117
121
|
export type AccordionHeaderHeadingLevel = string | number;
|
|
118
122
|
export type AccordionHeaderIcon =
|
|
119
|
-
| string
|
|
120
123
|
| React.ReactNode
|
|
121
|
-
| ((...args: any[]) => any)
|
|
124
|
+
| ((...args: any[]) => any)
|
|
125
|
+
| {
|
|
126
|
+
closed?: React.ReactNode | ((...args: any[]) => any);
|
|
127
|
+
expanded?: React.ReactNode | ((...args: any[]) => any);
|
|
128
|
+
};
|
|
122
129
|
export type AccordionHeaderIconPosition = 'left' | 'right';
|
|
123
130
|
export type AccordionHeaderDisabled = string | boolean;
|
|
124
131
|
export type AccordionHeaderSkeleton = string | boolean;
|
|
@@ -14,7 +14,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
14
14
|
var _excluded = ["children"],
|
|
15
15
|
_excluded2 = ["children"],
|
|
16
16
|
_excluded3 = ["children"],
|
|
17
|
-
_excluded4 = ["icon"],
|
|
17
|
+
_excluded4 = ["icon", "expanded"],
|
|
18
18
|
_excluded5 = ["children", "className", "left_component", "expanded", "title", "description", "icon", "icon_size", "disabled"];
|
|
19
19
|
import "core-js/modules/es.symbol.js";
|
|
20
20
|
import "core-js/modules/es.symbol.description.js";
|
|
@@ -93,23 +93,29 @@ AccordionHeaderContainer.defaultProps = {
|
|
|
93
93
|
|
|
94
94
|
function AccordionHeaderIcon(_ref4) {
|
|
95
95
|
var icon = _ref4.icon,
|
|
96
|
+
expanded = _ref4.expanded,
|
|
96
97
|
rest = _objectWithoutProperties(_ref4, _excluded4);
|
|
97
98
|
|
|
98
99
|
return React.createElement("span", {
|
|
99
100
|
className: "dnb-accordion__header__icon"
|
|
100
101
|
}, React.createElement(IconPrimary, _extends({}, rest, {
|
|
101
|
-
icon: icon || 'chevron-down',
|
|
102
|
+
icon: typeof (icon === null || icon === void 0 ? void 0 : icon.expanded) !== 'undefined' ? icon[expanded ? 'expanded' : 'closed'] : icon || 'chevron-down',
|
|
102
103
|
"aria-hidden": true
|
|
103
104
|
})));
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
process.env.NODE_ENV !== "production" ? AccordionHeaderIcon.propTypes = {
|
|
107
|
-
icon: PropTypes.oneOfType([PropTypes.
|
|
108
|
-
|
|
108
|
+
icon: PropTypes.oneOfType([PropTypes.node, PropTypes.func, PropTypes.shape({
|
|
109
|
+
closed: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
110
|
+
expanded: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
|
|
111
|
+
})]),
|
|
112
|
+
size: PropTypes.string,
|
|
113
|
+
expanded: PropTypes.bool
|
|
109
114
|
} : void 0;
|
|
110
115
|
AccordionHeaderIcon.defaultProps = {
|
|
111
116
|
icon: null,
|
|
112
|
-
size: 'medium'
|
|
117
|
+
size: 'medium',
|
|
118
|
+
expanded: null
|
|
113
119
|
};
|
|
114
120
|
|
|
115
121
|
var AccordionHeader = function (_React$PureComponent) {
|
|
@@ -219,7 +225,8 @@ var AccordionHeader = function (_React$PureComponent) {
|
|
|
219
225
|
var defaultParts = [React.createElement(AccordionHeaderIcon, {
|
|
220
226
|
key: "icon",
|
|
221
227
|
icon: icon,
|
|
222
|
-
size: icon_size
|
|
228
|
+
size: icon_size,
|
|
229
|
+
expanded: this.context.expanded
|
|
223
230
|
}), React.createElement(AccordionHeaderContainer, {
|
|
224
231
|
key: "container"
|
|
225
232
|
}, left_component), React.createElement(AccordionHeaderTitle, {
|
|
@@ -368,7 +375,10 @@ process.env.NODE_ENV !== "production" ? AccordionHeader.propTypes = _objectSprea
|
|
|
368
375
|
element: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.func]),
|
|
369
376
|
heading: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.node, PropTypes.func]),
|
|
370
377
|
heading_level: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
371
|
-
icon: PropTypes.oneOfType([PropTypes.
|
|
378
|
+
icon: PropTypes.oneOfType([PropTypes.node, PropTypes.func, PropTypes.shape({
|
|
379
|
+
closed: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
380
|
+
expanded: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
|
|
381
|
+
})]),
|
|
372
382
|
icon_position: PropTypes.oneOf(['left', 'right']),
|
|
373
383
|
icon_size: PropTypes.string,
|
|
374
384
|
disabled: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
@@ -24,7 +24,7 @@ export var accordionPropTypes = _objectSpread(_objectSpread({
|
|
|
24
24
|
remember_state: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
25
25
|
flush_remembered_state: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
26
26
|
single_container: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
27
|
-
variant: PropTypes.oneOf(['default', 'outlined', 'filled']),
|
|
27
|
+
variant: PropTypes.oneOf(['plain', 'default', 'outlined', 'filled']),
|
|
28
28
|
left_component: PropTypes.node,
|
|
29
29
|
allow_close_all: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
30
30
|
disabled: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
@@ -34,7 +34,10 @@ export var accordionPropTypes = _objectSpread(_objectSpread({
|
|
|
34
34
|
element: PropTypes.node,
|
|
35
35
|
heading: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
36
36
|
heading_level: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
37
|
-
icon: PropTypes.node,
|
|
37
|
+
icon: PropTypes.oneOfType([PropTypes.node, PropTypes.func, PropTypes.shape({
|
|
38
|
+
closed: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
39
|
+
expanded: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
|
|
40
|
+
})]),
|
|
38
41
|
icon_position: PropTypes.oneOf(['left', 'right']),
|
|
39
42
|
icon_size: PropTypes.string,
|
|
40
43
|
attributes: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
@@ -8,12 +8,26 @@ export type AccordionGroupPreventRerenderConditional = string | boolean;
|
|
|
8
8
|
export type AccordionGroupRememberState = string | boolean;
|
|
9
9
|
export type AccordionGroupFlushRememberedState = string | boolean;
|
|
10
10
|
export type AccordionGroupSingleContainer = string | boolean;
|
|
11
|
-
export type AccordionGroupVariant =
|
|
11
|
+
export type AccordionGroupVariant =
|
|
12
|
+
| 'plain'
|
|
13
|
+
| 'default'
|
|
14
|
+
| 'outlined'
|
|
15
|
+
| 'filled';
|
|
12
16
|
export type AccordionGroupAllowCloseAll = string | boolean;
|
|
13
17
|
export type AccordionGroupDisabled = string | boolean;
|
|
14
18
|
export type AccordionGroupSkeleton = string | boolean;
|
|
15
19
|
export type AccordionGroupHeading = boolean | React.ReactNode;
|
|
16
20
|
export type AccordionGroupHeadingLevel = string | number;
|
|
21
|
+
export type AccordionGroupIcon =
|
|
22
|
+
| React.ReactNode
|
|
23
|
+
| ((...args: any[]) => any)
|
|
24
|
+
| {
|
|
25
|
+
closed?: React.ReactNode | ((...args: any[]) => any);
|
|
26
|
+
expanded?: React.ReactNode | ((...args: any[]) => any);
|
|
27
|
+
};
|
|
28
|
+
export type AccordionGroupClosed =
|
|
29
|
+
| React.ReactNode
|
|
30
|
+
| ((...args: any[]) => any);
|
|
17
31
|
export type AccordionGroupIconPosition = 'left' | 'right';
|
|
18
32
|
export type AccordionGroupAttributes = string | Object;
|
|
19
33
|
export type AccordionGroupSpace =
|
|
@@ -55,7 +69,8 @@ export interface AccordionGroupProps extends React.HTMLProps<HTMLElement> {
|
|
|
55
69
|
element?: React.ReactNode;
|
|
56
70
|
heading?: AccordionGroupHeading;
|
|
57
71
|
heading_level?: AccordionGroupHeadingLevel;
|
|
58
|
-
icon?:
|
|
72
|
+
icon?: AccordionGroupIcon;
|
|
73
|
+
closed?: AccordionGroupClosed;
|
|
59
74
|
icon_position?: AccordionGroupIconPosition;
|
|
60
75
|
icon_size?: string;
|
|
61
76
|
attributes?: AccordionGroupAttributes;
|
|
@@ -41,6 +41,7 @@ export type AutocompleteFixedPosition = string | boolean;
|
|
|
41
41
|
export type AutocompletePreventFocus = string | boolean;
|
|
42
42
|
export type AutocompleteSkipKeysearch = string | boolean;
|
|
43
43
|
export type AutocompleteSelectedValue = string | React.ReactNode;
|
|
44
|
+
export type AutocompleteSuffixValue = string | React.ReactNode;
|
|
44
45
|
export type AutocompleteContent = string | React.ReactNode | string[];
|
|
45
46
|
export type AutocompleteRawData =
|
|
46
47
|
| any[]
|
|
@@ -115,6 +116,7 @@ export type AutocompleteData =
|
|
|
115
116
|
| React.ReactNode
|
|
116
117
|
| {
|
|
117
118
|
selected_value?: string | React.ReactNode;
|
|
119
|
+
suffix_value?: string | React.ReactNode;
|
|
118
120
|
content?: string | React.ReactNode | string[];
|
|
119
121
|
}
|
|
120
122
|
)[];
|
|
@@ -129,6 +131,9 @@ export type AutocompleteOpened = string | boolean;
|
|
|
129
131
|
export type AutocompleteDisabled = string | boolean;
|
|
130
132
|
export type AutocompleteStretch = string | boolean;
|
|
131
133
|
export type AutocompleteSkeleton = string | boolean;
|
|
134
|
+
export type AutocompletePageOffset = string | number;
|
|
135
|
+
export type AutocompleteObserverElement = string | React.ReactNode;
|
|
136
|
+
export type AutocompleteMinHeight = string | number;
|
|
132
137
|
export type AutocompleteChildren =
|
|
133
138
|
| string
|
|
134
139
|
| ((...args: any[]) => any)
|
|
@@ -205,6 +210,7 @@ export interface AutocompleteProps extends React.HTMLProps<HTMLElement> {
|
|
|
205
210
|
*/
|
|
206
211
|
skip_keysearch?: AutocompleteSkipKeysearch;
|
|
207
212
|
selected_value?: AutocompleteSelectedValue;
|
|
213
|
+
suffix_value?: AutocompleteSuffixValue;
|
|
208
214
|
content?: AutocompleteContent;
|
|
209
215
|
prepared_data?: any[];
|
|
210
216
|
raw_data?: AutocompleteRawData;
|
|
@@ -258,6 +264,11 @@ export interface AutocompleteProps extends React.HTMLProps<HTMLElement> {
|
|
|
258
264
|
*/
|
|
259
265
|
show_options_sr?: string;
|
|
260
266
|
|
|
267
|
+
/**
|
|
268
|
+
* Only for screen readers (VocieOver). The label used to announce the selected item. Defaults to `Valgt:`.
|
|
269
|
+
*/
|
|
270
|
+
selected_sr?: string;
|
|
271
|
+
|
|
261
272
|
/**
|
|
262
273
|
* Title on submit button. Defaults to `Vis alternativer`.
|
|
263
274
|
*/
|
|
@@ -509,6 +520,26 @@ export interface AutocompleteProps extends React.HTMLProps<HTMLElement> {
|
|
|
509
520
|
* Define a custom class for the internal drawer-list. This makes it possible more easily customize the drawer-list style with styled-components and the `css` style method. Defaults to `null`.
|
|
510
521
|
*/
|
|
511
522
|
drawer_class?: string;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Defines if the available scrollable height. If scrolling not should change the height of the drawer-list, then set it to `0` (useful if the DrawerList is used in fixed positions on contrast to a scrollable page content). Defaults to `window.pageYOffset`.
|
|
526
|
+
*/
|
|
527
|
+
page_offset?: AutocompletePageOffset;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Set a HTML element, either as a selector or a DOM element. Can be used to send in an element which will be used to make the <em>direction calculation</em> on.
|
|
531
|
+
*/
|
|
532
|
+
observer_element?: AutocompleteObserverElement;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Defines if the minimum height (in `rem`) of the options list. Defaults to `10rem`.
|
|
536
|
+
*/
|
|
537
|
+
min_height?: AutocompleteMinHeight;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* If set to true, the HTML body will get locked from scrolling. Defaults to `false`.
|
|
541
|
+
*/
|
|
542
|
+
enable_body_lock?: boolean;
|
|
512
543
|
class?: string;
|
|
513
544
|
className?: string;
|
|
514
545
|
|
|
@@ -518,6 +549,7 @@ export interface AutocompleteProps extends React.HTMLProps<HTMLElement> {
|
|
|
518
549
|
children?: AutocompleteChildren;
|
|
519
550
|
custom_element?: Object;
|
|
520
551
|
custom_method?: (...args: any[]) => any;
|
|
552
|
+
ariaLiveDelay?: number;
|
|
521
553
|
|
|
522
554
|
/**
|
|
523
555
|
* Will be called once the user presses the autocomplete. Returns the data item `{ data, attributes }`.
|
|
@@ -23,7 +23,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
23
23
|
var _IconPrimary, _AlignmentHelper;
|
|
24
24
|
|
|
25
25
|
var _excluded = ["fillDataIfEmpty"],
|
|
26
|
-
_excluded2 = ["title", "placeholder", "label", "label_direction", "label_sr_only", "icon", "icon_size", "input_icon", "size", "align_autocomplete", "fixed_position", "status", "status_state", "status_props", "status_no_animation", "global_status_id", "suffix", "scrollable", "focusable", "keep_open", "keep_value", "keep_value_and_selection", "show_clear_button", "prevent_close", "no_animation", "no_scroll_animation", "show_submit_button", "submit_element", "input_element", "options_render", "prevent_selection", "max_height", "default_value", "search_numbers", "search_in_word_index", "show_options_sr", "submit_button_title", "submit_button_icon", "portal_class", "drawer_class", "input_ref", "className", "class", "disabled", "stretch", "skeleton", "triangle_position", "icon_position", "skip_portal", "mode", "data", "children", "direction", "id", "opened", "value", "input_value", "indicator_label", "no_options", "show_all", "aria_live_options", "disable_highlighting"];
|
|
26
|
+
_excluded2 = ["title", "placeholder", "label", "label_direction", "label_sr_only", "icon", "icon_size", "input_icon", "size", "align_autocomplete", "fixed_position", "status", "status_state", "status_props", "status_no_animation", "global_status_id", "suffix", "scrollable", "focusable", "keep_open", "keep_value", "keep_value_and_selection", "show_clear_button", "prevent_close", "no_animation", "no_scroll_animation", "show_submit_button", "submit_element", "input_element", "options_render", "prevent_selection", "max_height", "default_value", "search_numbers", "search_in_word_index", "show_options_sr", "selected_sr", "submit_button_title", "submit_button_icon", "portal_class", "drawer_class", "input_ref", "className", "class", "disabled", "stretch", "skeleton", "triangle_position", "icon_position", "skip_portal", "mode", "data", "children", "direction", "id", "opened", "value", "input_value", "indicator_label", "no_options", "show_all", "aria_live_options", "disable_highlighting", "ariaLiveDelay"];
|
|
27
27
|
|
|
28
28
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
29
29
|
|
|
@@ -71,7 +71,7 @@ import FormStatus from '../form-status/FormStatus';
|
|
|
71
71
|
import IconPrimary from '../icon-primary/IconPrimary';
|
|
72
72
|
import Input, { SubmitButton } from '../input/Input';
|
|
73
73
|
import ProgressIndicator from '../progress-indicator/ProgressIndicator';
|
|
74
|
-
import DrawerList from '../../fragments/drawer-list/DrawerList';
|
|
74
|
+
import DrawerList, { ItemContent } from '../../fragments/drawer-list/DrawerList';
|
|
75
75
|
import DrawerListContext from '../../fragments/drawer-list/DrawerListContext';
|
|
76
76
|
import DrawerListProvider from '../../fragments/drawer-list/DrawerListProvider';
|
|
77
77
|
import { drawerListPropTypes, parseContentTitle, getCurrentData } from '../../fragments/drawer-list/DrawerListHelpers';
|
|
@@ -128,6 +128,7 @@ _defineProperty(Autocomplete, "defaultProps", {
|
|
|
128
128
|
aria_live_options: null,
|
|
129
129
|
indicator_label: null,
|
|
130
130
|
show_options_sr: null,
|
|
131
|
+
selected_sr: null,
|
|
131
132
|
submit_button_title: null,
|
|
132
133
|
submit_button_icon: 'chevron_down',
|
|
133
134
|
input_ref: null,
|
|
@@ -179,11 +180,16 @@ _defineProperty(Autocomplete, "defaultProps", {
|
|
|
179
180
|
skeleton: null,
|
|
180
181
|
portal_class: null,
|
|
181
182
|
drawer_class: null,
|
|
183
|
+
page_offset: null,
|
|
184
|
+
observer_element: null,
|
|
185
|
+
min_height: null,
|
|
186
|
+
enable_body_lock: false,
|
|
182
187
|
class: null,
|
|
183
188
|
className: null,
|
|
184
189
|
children: null,
|
|
185
190
|
custom_element: null,
|
|
186
191
|
custom_method: null,
|
|
192
|
+
ariaLiveDelay: null,
|
|
187
193
|
on_show: null,
|
|
188
194
|
on_hide: null,
|
|
189
195
|
on_type: null,
|
|
@@ -206,6 +212,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes = _objectSpread(_
|
|
|
206
212
|
aria_live_options: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
207
213
|
indicator_label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
208
214
|
show_options_sr: PropTypes.string,
|
|
215
|
+
selected_sr: PropTypes.string,
|
|
209
216
|
submit_button_title: PropTypes.string,
|
|
210
217
|
submit_button_icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.func]),
|
|
211
218
|
input_ref: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
@@ -245,6 +252,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes = _objectSpread(_
|
|
|
245
252
|
input_element: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
246
253
|
data: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.node, PropTypes.object]), PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.string, PropTypes.node]), PropTypes.shape({
|
|
247
254
|
selected_value: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
255
|
+
suffix_value: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
248
256
|
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.string)])
|
|
249
257
|
})]))]),
|
|
250
258
|
search_in_word_index: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
@@ -261,11 +269,16 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes = _objectSpread(_
|
|
|
261
269
|
skeleton: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
262
270
|
portal_class: PropTypes.string,
|
|
263
271
|
drawer_class: PropTypes.string,
|
|
272
|
+
page_offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
273
|
+
observer_element: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
274
|
+
min_height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
275
|
+
enable_body_lock: PropTypes.bool,
|
|
264
276
|
class: PropTypes.string,
|
|
265
277
|
className: PropTypes.string,
|
|
266
278
|
children: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.node, PropTypes.object, PropTypes.array]),
|
|
267
279
|
custom_element: PropTypes.object,
|
|
268
280
|
custom_method: PropTypes.func,
|
|
281
|
+
ariaLiveDelay: PropTypes.number,
|
|
269
282
|
on_show: PropTypes.func,
|
|
270
283
|
on_type: PropTypes.func,
|
|
271
284
|
on_focus: PropTypes.func,
|
|
@@ -839,16 +852,16 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
839
852
|
};
|
|
840
853
|
});
|
|
841
854
|
|
|
842
|
-
_defineProperty(_assertThisInitialized(_this2), "
|
|
855
|
+
_defineProperty(_assertThisInitialized(_this2), "hasInjectedDataItem", function () {
|
|
843
856
|
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this2.context.drawerList.data;
|
|
844
857
|
var lastItem = data.slice(-1)[0];
|
|
845
|
-
return lastItem
|
|
858
|
+
return lastItem ? lastItem.show_all || lastItem.__id === 'no_options' : false;
|
|
846
859
|
});
|
|
847
860
|
|
|
848
861
|
_defineProperty(_assertThisInitialized(_this2), "countData", function () {
|
|
849
862
|
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this2.context.drawerList.data;
|
|
850
863
|
var count = data.length;
|
|
851
|
-
return count > 0 && _this2.
|
|
864
|
+
return count > 0 && _this2.hasInjectedDataItem(data) ? count - 1 : count;
|
|
852
865
|
});
|
|
853
866
|
|
|
854
867
|
_defineProperty(_assertThisInitialized(_this2), "hasValidData", function () {
|
|
@@ -1411,10 +1424,13 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
1411
1424
|
var opened = this.context.drawerList.opened;
|
|
1412
1425
|
var _this$_props = this._props,
|
|
1413
1426
|
aria_live_options = _this$_props.aria_live_options,
|
|
1414
|
-
no_options = _this$_props.no_options
|
|
1427
|
+
no_options = _this$_props.no_options,
|
|
1428
|
+
_this$_props$ariaLive = _this$_props.ariaLiveDelay,
|
|
1429
|
+
ariaLiveDelay = _this$_props$ariaLive === void 0 ? 1000 : _this$_props$ariaLive;
|
|
1415
1430
|
clearTimeout(this._ariaLiveUpdateTimeout);
|
|
1416
|
-
|
|
1417
|
-
|
|
1431
|
+
|
|
1432
|
+
if (opened) {
|
|
1433
|
+
this._ariaLiveUpdateTimeout = setTimeout(function () {
|
|
1418
1434
|
var newString = null;
|
|
1419
1435
|
|
|
1420
1436
|
var count = _this5.countData();
|
|
@@ -1436,14 +1452,33 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
1436
1452
|
ariaLiveUpdate: null,
|
|
1437
1453
|
_listenForPropChanges: false
|
|
1438
1454
|
});
|
|
1439
|
-
},
|
|
1455
|
+
}, 1000);
|
|
1440
1456
|
}
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1457
|
+
}, ariaLiveDelay);
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
}, {
|
|
1461
|
+
key: "getVocieOverActiveItem",
|
|
1462
|
+
value: function getVocieOverActiveItem(selected_sr) {
|
|
1463
|
+
if (IS_MAC) {
|
|
1464
|
+
var _this$context$drawerL = this.context.drawerList,
|
|
1465
|
+
active_item = _this$context$drawerL.active_item,
|
|
1466
|
+
selected_item = _this$context$drawerL.selected_item;
|
|
1467
|
+
var currentDataItem = getCurrentData(active_item, this.context.drawerList.data);
|
|
1468
|
+
return React.createElement("span", {
|
|
1469
|
+
className: "dnb-sr-only",
|
|
1470
|
+
"aria-live": "assertive",
|
|
1471
|
+
"aria-atomic": true
|
|
1472
|
+
}, currentDataItem && React.createElement(React.Fragment, null, active_item === selected_item ? React.createElement(React.Fragment, null, selected_sr, " ") : null, React.createElement(ItemContent, null, currentDataItem)));
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
return null;
|
|
1443
1476
|
}
|
|
1444
1477
|
}, {
|
|
1445
1478
|
key: "render",
|
|
1446
1479
|
value: function render() {
|
|
1480
|
+
var _getCurrentData;
|
|
1481
|
+
|
|
1447
1482
|
var props = this._props = extendPropsWithContext(this.props, Autocomplete.defaultProps, this.context.getTranslation(this.props).Autocomplete, this.context.FormRow, this.context.Autocomplete);
|
|
1448
1483
|
|
|
1449
1484
|
var title = props.title,
|
|
@@ -1482,6 +1517,7 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
1482
1517
|
search_numbers = props.search_numbers,
|
|
1483
1518
|
search_in_word_index = props.search_in_word_index,
|
|
1484
1519
|
show_options_sr = props.show_options_sr,
|
|
1520
|
+
selected_sr = props.selected_sr,
|
|
1485
1521
|
submit_button_title = props.submit_button_title,
|
|
1486
1522
|
submit_button_icon = props.submit_button_icon,
|
|
1487
1523
|
portal_class = props.portal_class,
|
|
@@ -1508,6 +1544,7 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
1508
1544
|
show_all = props.show_all,
|
|
1509
1545
|
aria_live_options = props.aria_live_options,
|
|
1510
1546
|
disable_highlighting = props.disable_highlighting,
|
|
1547
|
+
ariaLiveDelay = props.ariaLiveDelay,
|
|
1511
1548
|
attributes = _objectWithoutProperties(props, _excluded2);
|
|
1512
1549
|
|
|
1513
1550
|
var id = this._id;
|
|
@@ -1516,12 +1553,12 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
1516
1553
|
inputValue = _this$state.inputValue,
|
|
1517
1554
|
visibleIndicator = _this$state.visibleIndicator,
|
|
1518
1555
|
ariaLiveUpdate = _this$state.ariaLiveUpdate;
|
|
1519
|
-
var _this$context$
|
|
1520
|
-
hidden = _this$context$
|
|
1521
|
-
selected_item = _this$context$
|
|
1522
|
-
active_item = _this$context$
|
|
1523
|
-
direction = _this$context$
|
|
1524
|
-
opened = _this$context$
|
|
1556
|
+
var _this$context$drawerL2 = this.context.drawerList,
|
|
1557
|
+
hidden = _this$context$drawerL2.hidden,
|
|
1558
|
+
selected_item = _this$context$drawerL2.selected_item,
|
|
1559
|
+
active_item = _this$context$drawerL2.active_item,
|
|
1560
|
+
direction = _this$context$drawerL2.direction,
|
|
1561
|
+
opened = _this$context$drawerL2.opened;
|
|
1525
1562
|
var isExpanded = Boolean(opened) && this.hasValidData();
|
|
1526
1563
|
delete attributes.onBlur;
|
|
1527
1564
|
this.attributes = validateDOMAttributes(null, attributes);
|
|
@@ -1643,6 +1680,7 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
1643
1680
|
status: status ? status_state : null,
|
|
1644
1681
|
status_state: status_state,
|
|
1645
1682
|
type: null,
|
|
1683
|
+
inner_element: (_getCurrentData = getCurrentData(selected_item, this.context.drawerList.original_data)) === null || _getCurrentData === void 0 ? void 0 : _getCurrentData.suffix_value,
|
|
1646
1684
|
submit_element: submitButton,
|
|
1647
1685
|
input_state: this.state.skipFocusDuringChange ? 'focus' : undefined,
|
|
1648
1686
|
clear: isTrue(show_clear_button),
|
|
@@ -1681,16 +1719,12 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
1681
1719
|
on_hide: this.onHideHandler,
|
|
1682
1720
|
on_pre_change: this.onPreChangeHandler,
|
|
1683
1721
|
on_key_down: this.onReserveActivityHandler,
|
|
1684
|
-
onMouseDown: this.onReserveActivityHandler
|
|
1685
|
-
onTouchStart: this.onReserveActivityHandler
|
|
1722
|
+
onMouseDown: this.onReserveActivityHandler
|
|
1686
1723
|
})), suffix && React.createElement(Suffix, {
|
|
1687
1724
|
className: "dnb-autocomplete__suffix",
|
|
1688
1725
|
id: id + '-suffix',
|
|
1689
1726
|
context: props
|
|
1690
|
-
}, suffix))),
|
|
1691
|
-
className: "dnb-sr-only",
|
|
1692
|
-
"aria-live": "assertive"
|
|
1693
|
-
}, AutocompleteInstance.getCurrentDataTitle(active_item, this.context.drawerList.original_data)), React.createElement("span", {
|
|
1727
|
+
}, suffix))), this.getVocieOverActiveItem(selected_sr), React.createElement("span", {
|
|
1694
1728
|
className: "dnb-sr-only",
|
|
1695
1729
|
"aria-live": "assertive"
|
|
1696
1730
|
}, ariaLiveUpdate));
|
|
@@ -76,6 +76,11 @@
|
|
|
76
76
|
justify-content: center;
|
|
77
77
|
align-items: center;
|
|
78
78
|
|
|
79
|
+
.dnb-drawer-list__option__item {
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
}
|
|
83
|
+
|
|
79
84
|
.dnb-icon {
|
|
80
85
|
align-self: center;
|
|
81
86
|
}
|
|
@@ -98,20 +103,66 @@
|
|
|
98
103
|
width: 100%;
|
|
99
104
|
}
|
|
100
105
|
}
|
|
101
|
-
|
|
102
|
-
color: transparent;
|
|
103
|
-
}
|
|
106
|
+
|
|
104
107
|
&--opened .dnb-input__submit-button__button .dnb-icon {
|
|
105
108
|
transform: rotate(180deg);
|
|
106
109
|
transform-origin: 50% 50%;
|
|
107
110
|
}
|
|
108
111
|
.dnb-input__submit-button__button .dnb-icon {
|
|
109
112
|
transition: transform 400ms ease-out;
|
|
113
|
+
|
|
114
|
+
html[data-visual-test] & {
|
|
115
|
+
transition-duration: 1ms !important;
|
|
116
|
+
}
|
|
110
117
|
}
|
|
111
118
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
119
|
+
// Support for "suffix_value"
|
|
120
|
+
.dnb-input {
|
|
121
|
+
&__inner__element {
|
|
122
|
+
position: relative;
|
|
123
|
+
z-index: 3;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&--has-submit-element .dnb-input__placeholder,
|
|
127
|
+
&--has-submit-element .dnb-input__input {
|
|
128
|
+
@include allAbove(small) {
|
|
129
|
+
// same width of submit button
|
|
130
|
+
padding-right: 0 !important; // use important so we avoid to have all sizes in addition
|
|
131
|
+
}
|
|
132
|
+
@include allBelow(small) {
|
|
133
|
+
// same width of submit button
|
|
134
|
+
padding-right: 2.5rem !important; // use important so we avoid to have all sizes in addition
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&__inner__element.dnb-p {
|
|
139
|
+
pointer-events: none;
|
|
140
|
+
white-space: nowrap;
|
|
141
|
+
padding: 0 0.5rem;
|
|
142
|
+
|
|
143
|
+
@include allBelow(small) {
|
|
144
|
+
display: none;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&__inner__element.dnb-p,
|
|
149
|
+
.dnb-spacing &__inner__element.dnb-p {
|
|
150
|
+
margin: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&--has-submit-element .dnb-input__inner__element {
|
|
154
|
+
// same width of submit button
|
|
155
|
+
margin-right: 2.5rem !important; // use important so we avoid to have all sizes in addition
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
&--icon-position-right .dnb-input {
|
|
159
|
+
// stylelint-disable-next-line
|
|
160
|
+
&__inner__element.dnb-p {
|
|
161
|
+
padding-right: 3rem;
|
|
162
|
+
}
|
|
163
|
+
&--icon-position-right &--icon-position-right#{&}--has-icon &__input {
|
|
164
|
+
padding-right: 1rem;
|
|
165
|
+
}
|
|
115
166
|
}
|
|
116
167
|
|
|
117
168
|
&__text {
|