@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
|
@@ -38,10 +38,12 @@ export type DrawerListData =
|
|
|
38
38
|
| React.ReactNode
|
|
39
39
|
| {
|
|
40
40
|
selected_value?: string | React.ReactNode;
|
|
41
|
+
suffix_value?: string | React.ReactNode;
|
|
41
42
|
content?: string | React.ReactNode | string[];
|
|
42
43
|
}
|
|
43
44
|
)[];
|
|
44
45
|
export type DrawerListSelectedValue = string | React.ReactNode;
|
|
46
|
+
export type DrawerListSuffixValue = string | React.ReactNode;
|
|
45
47
|
export type DrawerListContent = string | React.ReactNode | string[];
|
|
46
48
|
export type DrawerListRawData = any[] | Object | ((...args: any[]) => any);
|
|
47
49
|
export type DrawerListIgnoreEvents = string | boolean;
|
|
@@ -103,6 +105,7 @@ export interface DrawerListProps extends React.HTMLProps<HTMLElement> {
|
|
|
103
105
|
class?: string;
|
|
104
106
|
data?: DrawerListData;
|
|
105
107
|
selected_value?: DrawerListSelectedValue;
|
|
108
|
+
suffix_value?: DrawerListSuffixValue;
|
|
106
109
|
content?: DrawerListContent;
|
|
107
110
|
prepared_data?: any[];
|
|
108
111
|
raw_data?: DrawerListRawData;
|
|
@@ -132,3 +135,13 @@ export default class DrawerList extends React.Component<
|
|
|
132
135
|
static defaultProps: object;
|
|
133
136
|
render(): JSX.Element;
|
|
134
137
|
}
|
|
138
|
+
export type ItemContentChildren = React.ReactNode | Object;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* NB: Do not change the docs (comments) in here. The docs are updated during build time by "generateTypes.js" and "fetchPropertiesFromDocs.js".
|
|
142
|
+
*/
|
|
143
|
+
export interface ItemContentProps {
|
|
144
|
+
hash?: string;
|
|
145
|
+
children?: ItemContentChildren;
|
|
146
|
+
}
|
|
147
|
+
export const ItemContent: React.FC<ItemContentProps>;
|
|
@@ -456,28 +456,40 @@ DrawerList.Item.defaultProps = {
|
|
|
456
456
|
active: null,
|
|
457
457
|
value: null
|
|
458
458
|
};
|
|
459
|
-
|
|
460
|
-
var
|
|
461
|
-
|
|
459
|
+
export function ItemContent(_ref3) {
|
|
460
|
+
var _ref3$hash = _ref3.hash,
|
|
461
|
+
hash = _ref3$hash === void 0 ? '' : _ref3$hash,
|
|
462
462
|
children = _ref3.children;
|
|
463
|
+
var content = null;
|
|
463
464
|
|
|
464
465
|
if (Array.isArray(children.content || children)) {
|
|
465
|
-
|
|
466
|
+
content = (children.content || children).map(function (item, n) {
|
|
466
467
|
return React.createElement("span", {
|
|
467
468
|
key: hash + n,
|
|
468
|
-
className: "dnb-drawer-list__option__item"
|
|
469
|
+
className: "dnb-drawer-list__option__item item-nr-".concat(n + 1)
|
|
469
470
|
}, children.render ? children.render(item, hash + n) : item);
|
|
470
471
|
});
|
|
471
472
|
} else if (Object.prototype.hasOwnProperty.call(children, 'content')) {
|
|
472
|
-
|
|
473
|
-
}
|
|
473
|
+
content = children.render ? children.render(children.content, hash, children) : children.content;
|
|
474
474
|
|
|
475
|
-
|
|
476
|
-
|
|
475
|
+
if (content) {
|
|
476
|
+
content = React.createElement("span", {
|
|
477
|
+
className: "dnb-drawer-list__option__item"
|
|
478
|
+
}, content);
|
|
479
|
+
}
|
|
480
|
+
} else {
|
|
481
|
+
content = children && React.createElement("span", {
|
|
482
|
+
className: "dnb-drawer-list__option__item"
|
|
483
|
+
}, children);
|
|
484
|
+
}
|
|
477
485
|
|
|
486
|
+
return Object.prototype.hasOwnProperty.call(children, 'suffix_value') ? React.createElement(React.Fragment, null, content, React.createElement("span", {
|
|
487
|
+
className: "dnb-drawer-list__option__item dnb-drawer-list__option__suffix"
|
|
488
|
+
}, children.suffix_value)) : content;
|
|
489
|
+
}
|
|
478
490
|
process.env.NODE_ENV !== "production" ? ItemContent.propTypes = {
|
|
479
|
-
hash: PropTypes.string
|
|
480
|
-
children: PropTypes.oneOfType([PropTypes.node, PropTypes.
|
|
491
|
+
hash: PropTypes.string,
|
|
492
|
+
children: PropTypes.oneOfType([PropTypes.node, PropTypes.object])
|
|
481
493
|
} : void 0;
|
|
482
494
|
|
|
483
495
|
DrawerList.HorizontalItem = function (_ref4) {
|
|
@@ -485,7 +497,7 @@ DrawerList.HorizontalItem = function (_ref4) {
|
|
|
485
497
|
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
486
498
|
|
|
487
499
|
return React.createElement("span", _extends({
|
|
488
|
-
className: classnames('dnb-drawer-
|
|
500
|
+
className: classnames('dnb-drawer-list__option__item dnb-drawer-list__option__item--horizontal', className)
|
|
489
501
|
}, props));
|
|
490
502
|
};
|
|
491
503
|
|
|
@@ -107,6 +107,26 @@ export namespace drawerListDefaultProps {
|
|
|
107
107
|
export const on_state_update: any;
|
|
108
108
|
export const options_render: any;
|
|
109
109
|
}
|
|
110
|
+
export namespace drawerListProviderPropTypes {
|
|
111
|
+
export const enable_body_lock: PropTypes.Requireable<boolean>;
|
|
112
|
+
const use_drawer_on_mobile_1: PropTypes.Requireable<string | boolean>;
|
|
113
|
+
export { use_drawer_on_mobile_1 as use_drawer_on_mobile };
|
|
114
|
+
export const page_offset: PropTypes.Requireable<string | number>;
|
|
115
|
+
export const observer_element: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
116
|
+
export const min_height: PropTypes.Requireable<string | number>;
|
|
117
|
+
}
|
|
118
|
+
export namespace drawerListProviderDefaultProps {
|
|
119
|
+
const enable_body_lock_1: boolean;
|
|
120
|
+
export { enable_body_lock_1 as enable_body_lock };
|
|
121
|
+
const use_drawer_on_mobile_2: any;
|
|
122
|
+
export { use_drawer_on_mobile_2 as use_drawer_on_mobile };
|
|
123
|
+
const page_offset_1: any;
|
|
124
|
+
export { page_offset_1 as page_offset };
|
|
125
|
+
const observer_element_1: any;
|
|
126
|
+
export { observer_element_1 as observer_element };
|
|
127
|
+
const min_height_1: number;
|
|
128
|
+
export { min_height_1 as min_height };
|
|
129
|
+
}
|
|
110
130
|
export function parseContentTitle(dataItem: any, { separator, removeNumericOnlyValues, preferSelectedValue, }?: {
|
|
111
131
|
separator?: string;
|
|
112
132
|
removeNumericOnlyValues?: boolean;
|
|
@@ -58,6 +58,7 @@ export var drawerListPropTypes = _objectSpread(_objectSpread({
|
|
|
58
58
|
class: PropTypes.string,
|
|
59
59
|
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({
|
|
60
60
|
selected_value: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
61
|
+
suffix_value: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
61
62
|
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.arrayOf(PropTypes.string)])
|
|
62
63
|
})]))]),
|
|
63
64
|
prepared_data: PropTypes.array,
|
|
@@ -126,6 +127,20 @@ export var drawerListDefaultProps = {
|
|
|
126
127
|
on_state_update: null,
|
|
127
128
|
options_render: null
|
|
128
129
|
};
|
|
130
|
+
export var drawerListProviderPropTypes = {
|
|
131
|
+
enable_body_lock: PropTypes.bool,
|
|
132
|
+
use_drawer_on_mobile: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
133
|
+
page_offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
134
|
+
observer_element: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
135
|
+
min_height: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
136
|
+
};
|
|
137
|
+
export var drawerListProviderDefaultProps = {
|
|
138
|
+
enable_body_lock: false,
|
|
139
|
+
use_drawer_on_mobile: null,
|
|
140
|
+
page_offset: null,
|
|
141
|
+
observer_element: null,
|
|
142
|
+
min_height: 10
|
|
143
|
+
};
|
|
129
144
|
export var parseContentTitle = function parseContentTitle(dataItem) {
|
|
130
145
|
var _dataItem;
|
|
131
146
|
|
|
@@ -9,6 +9,7 @@ export type DrawerListProviderSize =
|
|
|
9
9
|
| 'large';
|
|
10
10
|
export type DrawerListProviderNoAnimation = string | boolean;
|
|
11
11
|
export type DrawerListProviderNoScrollAnimation = string | boolean;
|
|
12
|
+
export type DrawerListProviderUseDrawerOnMobile = string | boolean;
|
|
12
13
|
export type DrawerListProviderPreventSelection = string | boolean;
|
|
13
14
|
export type DrawerListProviderActionMenu = string | boolean;
|
|
14
15
|
export type DrawerListProviderIsPopup = string | boolean;
|
|
@@ -41,10 +42,12 @@ export type DrawerListProviderData =
|
|
|
41
42
|
| React.ReactNode
|
|
42
43
|
| {
|
|
43
44
|
selected_value?: string | React.ReactNode;
|
|
45
|
+
suffix_value?: string | React.ReactNode;
|
|
44
46
|
content?: string | React.ReactNode | string[];
|
|
45
47
|
}
|
|
46
48
|
)[];
|
|
47
49
|
export type DrawerListProviderSelectedValue = string | React.ReactNode;
|
|
50
|
+
export type DrawerListProviderSuffixValue = string | React.ReactNode;
|
|
48
51
|
export type DrawerListProviderContent =
|
|
49
52
|
| string
|
|
50
53
|
| React.ReactNode
|
|
@@ -68,13 +71,6 @@ export type DrawerListProviderTop = string | number | boolean;
|
|
|
68
71
|
export type DrawerListProviderRight = string | number | boolean;
|
|
69
72
|
export type DrawerListProviderBottom = string | number | boolean;
|
|
70
73
|
export type DrawerListProviderLeft = string | number | boolean;
|
|
71
|
-
export type DrawerListProviderChildren =
|
|
72
|
-
| string
|
|
73
|
-
| ((...args: any[]) => any)
|
|
74
|
-
| React.ReactNode
|
|
75
|
-
| Object
|
|
76
|
-
| any[];
|
|
77
|
-
export type DrawerListProviderUseDrawerOnMobile = string | boolean;
|
|
78
74
|
export type DrawerListProviderPageOffset = string | number;
|
|
79
75
|
export type DrawerListProviderObserverElement = string | React.ReactNode;
|
|
80
76
|
export type DrawerListProviderMinHeight = string | number;
|
|
@@ -95,6 +91,7 @@ export interface DrawerListProviderProps
|
|
|
95
91
|
max_height?: number;
|
|
96
92
|
no_animation?: DrawerListProviderNoAnimation;
|
|
97
93
|
no_scroll_animation?: DrawerListProviderNoScrollAnimation;
|
|
94
|
+
use_drawer_on_mobile?: DrawerListProviderUseDrawerOnMobile;
|
|
98
95
|
prevent_selection?: DrawerListProviderPreventSelection;
|
|
99
96
|
action_menu?: DrawerListProviderActionMenu;
|
|
100
97
|
is_popup?: DrawerListProviderIsPopup;
|
|
@@ -116,6 +113,7 @@ export interface DrawerListProviderProps
|
|
|
116
113
|
class?: string;
|
|
117
114
|
data?: DrawerListProviderData;
|
|
118
115
|
selected_value?: DrawerListProviderSelectedValue;
|
|
116
|
+
suffix_value?: DrawerListProviderSuffixValue;
|
|
119
117
|
content?: DrawerListProviderContent;
|
|
120
118
|
prepared_data?: any[];
|
|
121
119
|
raw_data?: DrawerListProviderRawData;
|
|
@@ -126,7 +124,6 @@ export interface DrawerListProviderProps
|
|
|
126
124
|
bottom?: DrawerListProviderBottom;
|
|
127
125
|
left?: DrawerListProviderLeft;
|
|
128
126
|
className?: string;
|
|
129
|
-
children?: DrawerListProviderChildren;
|
|
130
127
|
custom_element?: Object;
|
|
131
128
|
custom_method?: (...args: any[]) => any;
|
|
132
129
|
on_show?: (...args: any[]) => any;
|
|
@@ -138,10 +135,10 @@ export interface DrawerListProviderProps
|
|
|
138
135
|
on_select?: (...args: any[]) => any;
|
|
139
136
|
on_state_update?: (...args: any[]) => any;
|
|
140
137
|
enable_body_lock?: boolean;
|
|
141
|
-
use_drawer_on_mobile?: DrawerListProviderUseDrawerOnMobile;
|
|
142
138
|
page_offset?: DrawerListProviderPageOffset;
|
|
143
139
|
observer_element?: DrawerListProviderObserverElement;
|
|
144
140
|
min_height?: DrawerListProviderMinHeight;
|
|
141
|
+
children: React.ReactNode;
|
|
145
142
|
}
|
|
146
143
|
export default class DrawerListProvider extends React.Component<
|
|
147
144
|
DrawerListProviderProps,
|
|
@@ -32,7 +32,7 @@ import keycode from 'keycode';
|
|
|
32
32
|
import Context from '../../shared/Context';
|
|
33
33
|
import { warn, isTrue, roundToNearest, isInsideScrollView, detectOutsideClick, dispatchCustomElementEvent, getPreviousSibling } from '../../shared/component-helper';
|
|
34
34
|
import { getOffsetTop, getOffsetLeft, hasSelectedText, getSelectedElement } from '../../shared/helpers';
|
|
35
|
-
import { getData, normalizeData, findClosest, getSelectedItemValue, parseContentTitle, getEventData, prepareStartupState, prepareDerivedState, drawerListPropTypes, drawerListDefaultProps } from './DrawerListHelpers';
|
|
35
|
+
import { getData, normalizeData, findClosest, getSelectedItemValue, parseContentTitle, getEventData, prepareStartupState, prepareDerivedState, drawerListPropTypes, drawerListDefaultProps, drawerListProviderPropTypes, drawerListProviderDefaultProps } from './DrawerListHelpers';
|
|
36
36
|
import DrawerListContext from './DrawerListContext';
|
|
37
37
|
import { disableBodyScroll, enableBodyScroll } from '../../components/modal/bodyScrollLock';
|
|
38
38
|
|
|
@@ -122,12 +122,16 @@ var DrawerListProvider = function (_React$PureComponent) {
|
|
|
122
122
|
_ref2$event = _ref2.event,
|
|
123
123
|
event = _ref2$event === void 0 ? null : _ref2$event;
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
_this.setState({
|
|
126
|
+
active_item: active_item
|
|
127
|
+
}, function () {
|
|
128
|
+
if (parseFloat(active_item) === -1) {
|
|
129
|
+
var _document$activeEleme;
|
|
130
|
+
|
|
131
|
+
if (((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.tagName) !== 'INPUT') {
|
|
132
|
+
var _this$_refUl$current;
|
|
133
|
+
|
|
134
|
+
(_this$_refUl$current = _this._refUl.current) === null || _this$_refUl$current === void 0 ? void 0 : _this$_refUl$current.focus({
|
|
131
135
|
preventScroll: true
|
|
132
136
|
});
|
|
133
137
|
}
|
|
@@ -135,15 +139,7 @@ var DrawerListProvider = function (_React$PureComponent) {
|
|
|
135
139
|
dispatchCustomElementEvent(_assertThisInitialized(_this), 'on_show_focus', {
|
|
136
140
|
element: _this._refUl.current
|
|
137
141
|
});
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (parseFloat(active_item) > -1) {
|
|
144
|
-
_this.setState({
|
|
145
|
-
active_item: active_item
|
|
146
|
-
}, function () {
|
|
142
|
+
} else if (parseFloat(active_item) > -1) {
|
|
147
143
|
var selected_item = _this.state.selected_item;
|
|
148
144
|
|
|
149
145
|
if (fireSelectEvent) {
|
|
@@ -168,8 +164,8 @@ var DrawerListProvider = function (_React$PureComponent) {
|
|
|
168
164
|
_this.scrollToItem(active_item, {
|
|
169
165
|
scrollTo: scrollTo
|
|
170
166
|
});
|
|
171
|
-
}
|
|
172
|
-
}
|
|
167
|
+
}
|
|
168
|
+
});
|
|
173
169
|
});
|
|
174
170
|
|
|
175
171
|
_defineProperty(_assertThisInitialized(_this), "setWrapperElement", function () {
|
|
@@ -433,9 +429,9 @@ var DrawerListProvider = function (_React$PureComponent) {
|
|
|
433
429
|
});
|
|
434
430
|
|
|
435
431
|
_defineProperty(_assertThisInitialized(_this), "getSelectedElement", function () {
|
|
436
|
-
var _this$_refUl$
|
|
432
|
+
var _this$_refUl$current2;
|
|
437
433
|
|
|
438
|
-
return ((_this$_refUl$
|
|
434
|
+
return ((_this$_refUl$current2 = _this._refUl.current) === null || _this$_refUl$current2 === void 0 ? void 0 : _this$_refUl$current2.querySelector('li.dnb-drawer-list__option--selected')) || _this._refUl.current || {
|
|
439
435
|
getAttribute: function getAttribute() {
|
|
440
436
|
return null;
|
|
441
437
|
}
|
|
@@ -449,9 +445,9 @@ var DrawerListProvider = function (_React$PureComponent) {
|
|
|
449
445
|
});
|
|
450
446
|
|
|
451
447
|
_defineProperty(_assertThisInitialized(_this), "getActiveElement", function () {
|
|
452
|
-
var _this$_refUl$
|
|
448
|
+
var _this$_refUl$current3;
|
|
453
449
|
|
|
454
|
-
return ((_this$_refUl$
|
|
450
|
+
return ((_this$_refUl$current3 = _this._refUl.current) === null || _this$_refUl$current3 === void 0 ? void 0 : _this$_refUl$current3.querySelector('li.dnb-drawer-list__option--focus')) || _this.getSelectedElement();
|
|
455
451
|
});
|
|
456
452
|
|
|
457
453
|
_defineProperty(_assertThisInitialized(_this), "getCurrentActiveItem", function () {
|
|
@@ -473,16 +469,16 @@ var DrawerListProvider = function (_React$PureComponent) {
|
|
|
473
469
|
});
|
|
474
470
|
|
|
475
471
|
_defineProperty(_assertThisInitialized(_this), "getFirstItem", function () {
|
|
476
|
-
var _this$_refUl$
|
|
472
|
+
var _this$_refUl$current4;
|
|
477
473
|
|
|
478
|
-
var elem = (_this$_refUl$
|
|
474
|
+
var elem = (_this$_refUl$current4 = _this._refUl.current) === null || _this$_refUl$current4 === void 0 ? void 0 : _this$_refUl$current4.querySelector('li.dnb-drawer-list__option.first-of-type');
|
|
479
475
|
return parseFloat(elem && elem.getAttribute('data-item'));
|
|
480
476
|
});
|
|
481
477
|
|
|
482
478
|
_defineProperty(_assertThisInitialized(_this), "getLastItem", function () {
|
|
483
|
-
var _this$_refUl$
|
|
479
|
+
var _this$_refUl$current5;
|
|
484
480
|
|
|
485
|
-
var elem = (_this$_refUl$
|
|
481
|
+
var elem = (_this$_refUl$current5 = _this._refUl.current) === null || _this$_refUl$current5 === void 0 ? void 0 : _this$_refUl$current5.querySelector('li.dnb-drawer-list__option.last-of-type');
|
|
486
482
|
return parseFloat(elem && elem.getAttribute('data-item'));
|
|
487
483
|
});
|
|
488
484
|
|
|
@@ -801,12 +797,12 @@ var DrawerListProvider = function (_React$PureComponent) {
|
|
|
801
797
|
}
|
|
802
798
|
|
|
803
799
|
if (this.state.opened) {
|
|
804
|
-
var _document$
|
|
800
|
+
var _document$activeEleme2;
|
|
805
801
|
|
|
806
|
-
if (this.props.data !== prevProps.data && typeof document !== 'undefined' && ((_document$
|
|
807
|
-
var _this$_refUl$
|
|
802
|
+
if (this.props.data !== prevProps.data && typeof document !== 'undefined' && ((_document$activeEleme2 = document.activeElement) === null || _document$activeEleme2 === void 0 ? void 0 : _document$activeEleme2.tagName) === 'BODY') {
|
|
803
|
+
var _this$_refUl$current6;
|
|
808
804
|
|
|
809
|
-
(_this$_refUl$
|
|
805
|
+
(_this$_refUl$current6 = this._refUl.current) === null || _this$_refUl$current6 === void 0 ? void 0 : _this$_refUl$current6.focus();
|
|
810
806
|
}
|
|
811
807
|
}
|
|
812
808
|
}
|
|
@@ -1191,21 +1187,11 @@ var DrawerListProvider = function (_React$PureComponent) {
|
|
|
1191
1187
|
|
|
1192
1188
|
_defineProperty(DrawerListProvider, "contextType", Context);
|
|
1193
1189
|
|
|
1194
|
-
_defineProperty(DrawerListProvider, "defaultProps", _objectSpread(_objectSpread({}, drawerListDefaultProps),
|
|
1195
|
-
enable_body_lock: false,
|
|
1196
|
-
use_drawer_on_mobile: null,
|
|
1197
|
-
page_offset: null,
|
|
1198
|
-
observer_element: null,
|
|
1199
|
-
min_height: 10
|
|
1200
|
-
}));
|
|
1190
|
+
_defineProperty(DrawerListProvider, "defaultProps", _objectSpread(_objectSpread({}, drawerListDefaultProps), drawerListProviderDefaultProps));
|
|
1201
1191
|
|
|
1202
1192
|
_defineProperty(DrawerListProvider, "blurDelay", 201);
|
|
1203
1193
|
|
|
1204
1194
|
export { DrawerListProvider as default };
|
|
1205
|
-
process.env.NODE_ENV !== "production" ? DrawerListProvider.propTypes = _objectSpread(_objectSpread({}, drawerListPropTypes), {}, {
|
|
1206
|
-
|
|
1207
|
-
use_drawer_on_mobile: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
1208
|
-
page_offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
1209
|
-
observer_element: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
1210
|
-
min_height: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
1195
|
+
process.env.NODE_ENV !== "production" ? DrawerListProvider.propTypes = _objectSpread(_objectSpread(_objectSpread({}, drawerListPropTypes), drawerListProviderPropTypes), {}, {
|
|
1196
|
+
children: PropTypes.node.isRequired
|
|
1211
1197
|
}) : void 0;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
html[data-visual-test] &,
|
|
31
31
|
&--no-animation {
|
|
32
|
-
animation:
|
|
32
|
+
animation-duration: 1ms !important;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
html[data-visual-test] &,
|
|
46
46
|
&--no-animation {
|
|
47
|
-
animation:
|
|
47
|
+
animation-duration: 1ms !important;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -165,9 +165,22 @@
|
|
|
165
165
|
position: relative;
|
|
166
166
|
z-index: 1; // only to go over &__triangle
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
// IE11 support
|
|
169
|
+
@supports not (display: grid) {
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@supports (display: grid) {
|
|
176
|
+
display: grid;
|
|
177
|
+
|
|
178
|
+
// Use two columns
|
|
179
|
+
grid-template-columns: 1fr minmax(2rem, auto);
|
|
180
|
+
|
|
181
|
+
// Use a high number in order to be able to vertically center the check icon (among others) and suffix with "grid-row: 1 / -1;"
|
|
182
|
+
grid-template-rows: repeat(10, min-content);
|
|
183
|
+
}
|
|
171
184
|
|
|
172
185
|
outline: none;
|
|
173
186
|
|
|
@@ -187,6 +200,17 @@
|
|
|
187
200
|
display: block;
|
|
188
201
|
text-overflow: ellipsis;
|
|
189
202
|
|
|
203
|
+
// Place all items in the first column, but underneath
|
|
204
|
+
grid-column: 1;
|
|
205
|
+
|
|
206
|
+
&--horizontal {
|
|
207
|
+
display: flex;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
> .dnb-icon {
|
|
211
|
+
vertical-align: initial;
|
|
212
|
+
}
|
|
213
|
+
|
|
190
214
|
.dnb-anchor {
|
|
191
215
|
display: inline-block;
|
|
192
216
|
margin-right: 0.5rem;
|
|
@@ -197,6 +221,17 @@
|
|
|
197
221
|
}
|
|
198
222
|
}
|
|
199
223
|
|
|
224
|
+
&__suffix {
|
|
225
|
+
// TODO: Use CSS Container Queries when available
|
|
226
|
+
@include allAbove(small) {
|
|
227
|
+
grid-column: 2;
|
|
228
|
+
grid-row: 1 / -1;
|
|
229
|
+
|
|
230
|
+
justify-self: end;
|
|
231
|
+
align-self: center;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
200
235
|
&--ignore {
|
|
201
236
|
cursor: default;
|
|
202
237
|
pointer-events: none;
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
pointer-events: none;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
// This is our border
|
|
60
|
-
|
|
59
|
+
// This is our border (separator line) instead of border-bottom: var(--drawer-list-option-border-width) solid
|
|
60
|
+
&__inner::before {
|
|
61
61
|
pointer-events: none;
|
|
62
62
|
|
|
63
63
|
content: '';
|
|
@@ -73,12 +73,11 @@
|
|
|
73
73
|
background-color: var(--color-mint-green-25);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
&__item
|
|
76
|
+
&__item.item-nr-1 {
|
|
77
77
|
font-weight: var(--font-weight-medium);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
&__inner {
|
|
81
|
-
padding-right: 2rem;
|
|
82
81
|
background-color: var(--color-white);
|
|
83
82
|
}
|
|
84
83
|
|
|
@@ -97,7 +96,7 @@
|
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
// Focus ring around item. Only for keyboard usage
|
|
100
|
-
&--focus {
|
|
99
|
+
&--focus &__inner {
|
|
101
100
|
// we use the border/line and change it to a fake focus
|
|
102
101
|
&::before {
|
|
103
102
|
z-index: 3;
|
|
@@ -117,7 +116,12 @@
|
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
|
|
120
|
-
&--
|
|
119
|
+
&--ignore &__inner {
|
|
120
|
+
color: var(--color-black-80);
|
|
121
|
+
background-color: var(--color-white);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&--selected &__inner {
|
|
121
125
|
color: var(--color-white);
|
|
122
126
|
background-color: var(--color-emerald-green);
|
|
123
127
|
.dnb-drawer-list__option__inner {
|
|
@@ -133,12 +137,25 @@
|
|
|
133
137
|
}
|
|
134
138
|
}
|
|
135
139
|
|
|
140
|
+
// check icon
|
|
136
141
|
&::after {
|
|
137
142
|
content: '';
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
|
|
144
|
+
// IE11 support
|
|
145
|
+
@supports not (display: grid) {
|
|
146
|
+
position: absolute;
|
|
147
|
+
z-index: 1;
|
|
148
|
+
top: calc(50% - 0.5rem);
|
|
149
|
+
right: 1rem;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@supports (display: grid) {
|
|
153
|
+
grid-column: 2;
|
|
154
|
+
grid-row: 1 / -1;
|
|
155
|
+
|
|
156
|
+
justify-self: end;
|
|
157
|
+
align-self: center;
|
|
158
|
+
}
|
|
142
159
|
|
|
143
160
|
width: 1rem;
|
|
144
161
|
height: 1rem;
|
|
@@ -149,51 +166,54 @@
|
|
|
149
166
|
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0ibm9uZSI+ICA8cGF0aCAgICBmaWxsPSIjRTlGOEY0IiAgICBkPSJNMyA4LjhhLjc1Ljc1IDAgMSAwLTEuMjIuODZMMyA4Ljc5em0xLjg0IDMuOWwuNjMtLjQxdi0uMDFoLS4wMWwtLjYyLjQyem0xLjcxLjA1bC0uNTktLjQ2di4wMWwuNTkuNDV6bTguNDMtOS40NWEuNzUuNzUgMCAwIDAtMS4xOC0uOTNsMS4xOC45M3pNMS43OCA5LjY2bDIuNDUgMy40OCAxLjIzLS44N0wzIDguOGwtMS4yMy44N3ptMi40NCAzLjQ2Yy4zMi40OC44Ni43OCAxLjQ0LjhsLjA1LTEuNWEuMy4zIDAgMCAxLS4yNC0uMTNsLTEuMjUuODN6bTEuNDQuOGExLjggMS44IDAgMCAwIDEuNDktLjcxbC0xLjItLjlhLjMuMyAwIDAgMS0uMjQuMWwtLjA1IDEuNXptMS40OC0uN2w3Ljg0LTkuOTItMS4xOC0uOTMtNy44NCA5LjkyIDEuMTguOTN6Ii8+PC9zdmc+);
|
|
150
167
|
}
|
|
151
168
|
|
|
152
|
-
// Remove line on selected items
|
|
169
|
+
// Remove separator line on selected items
|
|
153
170
|
&::before {
|
|
154
171
|
visibility: hidden;
|
|
155
172
|
}
|
|
156
173
|
}
|
|
157
174
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
var(--color-mint-green),
|
|
164
|
-
var(--drawer-list-focus-border-width)
|
|
165
|
-
);
|
|
175
|
+
// TODO: Use CSS Container Queries when available
|
|
176
|
+
@include allAbove(small) {
|
|
177
|
+
&--selected &__suffix {
|
|
178
|
+
z-index: 2; // over check icon
|
|
179
|
+
background-color: inherit; // to "hide" the check icon
|
|
166
180
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
&--ignore {
|
|
170
|
-
.dnb-drawer-list__option__inner {
|
|
181
|
+
&:not(#{&}--selected) &__suffix#{&}__item:nth-of-type(n + 2) {
|
|
171
182
|
color: var(--color-black-80);
|
|
172
|
-
background-color: var(--color-white);
|
|
173
183
|
}
|
|
174
184
|
}
|
|
175
185
|
|
|
186
|
+
// show focus border when using keyboard
|
|
187
|
+
html[data-whatinput='keyboard']
|
|
188
|
+
&--selected#{&}--focus
|
|
189
|
+
&__inner::before {
|
|
190
|
+
visibility: visible;
|
|
191
|
+
|
|
192
|
+
@include fakeBorder(
|
|
193
|
+
var(--color-mint-green),
|
|
194
|
+
var(--drawer-list-focus-border-width)
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
176
198
|
// Focus ring around item. Only for keyboard usage
|
|
177
|
-
&--focus:not(#{&}--selected) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
background-color: var(--color-mint-green-12);
|
|
181
|
-
}
|
|
199
|
+
&--focus:not(#{&}--selected) &__inner {
|
|
200
|
+
color: var(--color-sea-green);
|
|
201
|
+
background-color: var(--color-mint-green-12);
|
|
182
202
|
}
|
|
183
203
|
|
|
184
204
|
&--focus.first-of-type &__inner,
|
|
185
|
-
&--focus.first-of-type::before {
|
|
205
|
+
&--focus.first-of-type &__inner::before {
|
|
186
206
|
border-radius: var(--drawer-list-options-border-radius)
|
|
187
207
|
var(--drawer-list-options-border-radius) 0 0;
|
|
188
208
|
}
|
|
189
209
|
&.last-of-type,/* only for the visual demo */
|
|
190
|
-
&--focus.last-of-type &__inner
|
|
191
|
-
&--focus.last-of-type::before {
|
|
210
|
+
&--focus.last-of-type &__inner,
|
|
211
|
+
&--focus.last-of-type &__inner::before {
|
|
192
212
|
border-radius: 0 0 var(--drawer-list-options-border-radius)
|
|
193
213
|
var(--drawer-list-options-border-radius);
|
|
194
214
|
}
|
|
195
215
|
// remove last bottom border
|
|
196
|
-
&.last-of-type:not(#{&}--focus)::before {
|
|
216
|
+
&.last-of-type:not(#{&}--focus) &__inner::before {
|
|
197
217
|
content: none;
|
|
198
218
|
}
|
|
199
219
|
|
|
@@ -205,24 +225,24 @@
|
|
|
205
225
|
}
|
|
206
226
|
|
|
207
227
|
// make sure we have a spacing on the right side if we have a scrollbar
|
|
208
|
-
&--scroll &__option:not(#{&}__option--focus)::before {
|
|
228
|
+
&--scroll &__option:not(#{&}__option--focus) &__option__inner::before {
|
|
209
229
|
left: 0.5rem;
|
|
210
230
|
right: 0.5rem;
|
|
211
231
|
}
|
|
212
232
|
|
|
213
|
-
&--bottom &__option--focus.closest-to-top::before {
|
|
233
|
+
&--bottom &__option--focus.closest-to-top &__option__inner::before {
|
|
214
234
|
border-radius: var(--drawer-list-options-border-radius)
|
|
215
235
|
var(--drawer-list-options-border-radius) 0 0;
|
|
216
236
|
}
|
|
217
|
-
&--bottom &__option--focus.closest-to-bottom::before {
|
|
237
|
+
&--bottom &__option--focus.closest-to-bottom &__option__inner::before {
|
|
218
238
|
border-radius: 0 0 var(--drawer-list-options-border-radius)
|
|
219
239
|
var(--drawer-list-options-border-radius);
|
|
220
240
|
}
|
|
221
|
-
&--top &__option--focus.closest-to-bottom::before {
|
|
241
|
+
&--top &__option--focus.closest-to-bottom &__option__inner::before {
|
|
222
242
|
border-radius: 0 0 var(--drawer-list-options-border-radius)
|
|
223
243
|
var(--drawer-list-options-border-radius);
|
|
224
244
|
}
|
|
225
|
-
&--top &__option--focus.closest-to-top::before {
|
|
245
|
+
&--top &__option--focus.closest-to-top &__option__inner::before {
|
|
226
246
|
border-radius: var(--drawer-list-options-border-radius)
|
|
227
247
|
var(--drawer-list-options-border-radius) 0 0;
|
|
228
248
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
|
|
3
|
+
var _path;
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
var bookmark = function bookmark(props) {
|
|
8
|
+
return React.createElement("svg", _extends({
|
|
9
|
+
width: 16,
|
|
10
|
+
height: 16,
|
|
11
|
+
viewBox: "0 0 16 16",
|
|
12
|
+
fill: "none",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
14
|
+
}, props), _path || (_path = React.createElement("path", {
|
|
15
|
+
clipRule: "evenodd",
|
|
16
|
+
d: "M12.057 14.913 8 12.073l-4.057 2.84a.481.481 0 0 1-.757-.394V1.963c0-.532.43-.963.962-.963h7.704c.531 0 .962.431.962.963v12.556a.481.481 0 0 1-.757.394Z",
|
|
17
|
+
stroke: "#000",
|
|
18
|
+
strokeWidth: 1.5,
|
|
19
|
+
strokeLinecap: "round",
|
|
20
|
+
strokeLinejoin: "round"
|
|
21
|
+
})));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default bookmark;
|