@dnb/eufemia 9.30.0 → 9.32.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 +63 -0
- package/assets/icons/add.svg +1 -1
- package/assets/icons/add_circled.svg +1 -1
- package/assets/icons/add_circled_medium.svg +1 -1
- package/assets/icons/add_medium.svg +1 -1
- package/assets/icons/boat.svg +1 -1
- package/assets/icons/boat_medium.svg +1 -1
- package/assets/icons/calculator.svg +1 -1
- package/assets/icons/card.svg +1 -1
- package/assets/icons/card_medium.svg +1 -1
- package/assets/icons/cat_medium.svg +1 -1
- package/assets/icons/chatbot.svg +1 -1
- package/assets/icons/chatbot_medium.svg +1 -1
- package/assets/icons/chip.svg +1 -1
- package/assets/icons/chip_medium.svg +1 -1
- package/assets/icons/cloud_download.svg +1 -1
- package/assets/icons/cloud_download_medium.svg +1 -1
- package/assets/icons/cloud_rain.svg +1 -1
- package/assets/icons/cloud_rain_medium.svg +1 -1
- package/assets/icons/cloud_sync.svg +1 -1
- package/assets/icons/cloud_sync_medium.svg +1 -1
- package/assets/icons/cloud_transfer.svg +1 -1
- package/assets/icons/cloud_transfer_medium.svg +1 -1
- package/assets/icons/cloud_upload.svg +1 -1
- package/assets/icons/cloud_upload_medium.svg +1 -1
- package/assets/icons/cookie.svg +1 -1
- package/assets/icons/cookie_medium.svg +1 -1
- package/assets/icons/diamond.svg +1 -1
- package/assets/icons/dog.svg +1 -1
- package/assets/icons/dog_medium.svg +1 -1
- package/assets/icons/eufemia-icons-pdf-categorized.tgz +0 -0
- package/assets/icons/eufemia-icons-pdf.tgz +0 -0
- package/assets/icons/exclamation_circled.svg +1 -1
- package/assets/icons/exclamation_circled_medium.svg +1 -1
- package/assets/icons/file_jpg.svg +1 -0
- package/assets/icons/file_jpg_medium.svg +1 -0
- package/assets/icons/file_png.svg +1 -0
- package/assets/icons/file_png_medium.svg +1 -0
- package/assets/icons/fish.svg +1 -0
- package/assets/icons/fish_medium.svg +1 -0
- package/assets/icons/hourglass.svg +1 -1
- package/assets/icons/instagram.svg +1 -1
- package/assets/icons/linkedin.svg +1 -1
- package/assets/icons/linkedin_medium.svg +1 -1
- package/assets/icons/loupe.svg +1 -1
- package/assets/icons/loupe_medium.svg +1 -1
- package/assets/icons/mastercard_card.svg +1 -1
- package/assets/icons/mastercard_card_medium.svg +1 -1
- package/assets/icons/news.svg +1 -1
- package/assets/icons/news_medium.svg +1 -1
- package/assets/icons/newspaper.svg +1 -0
- package/assets/icons/newspaper_medium.svg +1 -0
- package/assets/icons/phone.svg +1 -1
- package/assets/icons/phone_medium.svg +1 -1
- package/assets/icons/photo.svg +1 -1
- package/assets/icons/photo_medium.svg +1 -1
- package/assets/icons/pin.svg +1 -1
- package/assets/icons/pin_medium.svg +1 -1
- package/assets/icons/play.svg +1 -1
- package/assets/icons/savings_account.svg +1 -1
- package/assets/icons/sort.svg +1 -0
- package/assets/icons/sort_medium.svg +1 -0
- package/assets/icons/subtract.svg +1 -1
- package/assets/icons/subtract_circled.svg +1 -1
- package/assets/icons/subtract_circled_medium.svg +1 -1
- package/assets/icons/subtract_medium.svg +1 -1
- package/assets/icons/tag.svg +1 -1
- package/assets/icons/tag_medium.svg +1 -1
- package/assets/icons/thumbs_down.svg +1 -1
- package/assets/icons/thumbs_up.svg +1 -1
- package/assets/icons/video.svg +1 -1
- package/assets/icons/video_medium.svg +1 -1
- package/assets/icons/wallet_medium.svg +1 -1
- package/cjs/components/HeightAnimation.d.ts +3 -0
- package/cjs/components/HeightAnimation.js +52 -0
- package/cjs/components/accordion/Accordion.js +2 -2
- package/cjs/components/accordion/AccordionHeader.js +1 -1
- package/cjs/components/accordion/AccordionProvider.js +3 -1
- package/cjs/components/accordion/style/_accordion.scss +14 -15
- package/cjs/components/accordion/style/dnb-accordion.css +9 -6
- package/cjs/components/accordion/style/dnb-accordion.min.css +1 -1
- package/cjs/components/accordion/style/themes/dnb-accordion-theme-ui.css +100 -94
- package/cjs/components/accordion/style/themes/dnb-accordion-theme-ui.min.css +3 -3
- package/cjs/components/accordion/style/themes/dnb-accordion-theme-ui.scss +36 -39
- package/cjs/components/autocomplete/Autocomplete.d.ts +0 -10
- package/cjs/components/autocomplete/Autocomplete.js +3 -4
- package/cjs/components/autocomplete/style/_autocomplete.scss +2 -2
- package/cjs/components/autocomplete/style/dnb-autocomplete.css +46 -46
- package/cjs/components/autocomplete/style/dnb-autocomplete.min.css +1 -1
- package/cjs/components/avatar/Avatar.d.ts +5 -3
- package/cjs/components/avatar/Avatar.js +1 -3
- package/cjs/components/avatar/AvatarGroup.d.ts +2 -2
- package/cjs/components/avatar/AvatarGroup.js +8 -10
- package/cjs/components/avatar/style/themes/dnb-avatar-theme-ui.css +0 -10
- package/cjs/components/avatar/style/themes/dnb-avatar-theme-ui.min.css +1 -1
- package/cjs/components/avatar/style/themes/dnb-avatar-theme-ui.scss +0 -8
- package/cjs/components/badge/Badge.d.ts +3 -3
- package/cjs/components/badge/Badge.js +1 -17
- package/cjs/components/breadcrumb/Breadcrumb.d.ts +14 -8
- package/cjs/components/breadcrumb/Breadcrumb.js +26 -28
- package/cjs/components/breadcrumb/BreadcrumbItem.d.ts +2 -0
- package/cjs/components/breadcrumb/BreadcrumbItem.js +16 -11
- package/cjs/components/breadcrumb/BreadcrumbMultiple.d.ts +10 -0
- package/cjs/components/breadcrumb/BreadcrumbMultiple.js +52 -0
- package/cjs/components/breadcrumb/style/_breadcrumb.scss +25 -12
- package/cjs/components/breadcrumb/style/dnb-breadcrumb.css +933 -17
- package/cjs/components/breadcrumb/style/dnb-breadcrumb.min.css +1 -1
- package/cjs/components/breadcrumb/style/dnb-breadcrumb.scss +4 -0
- package/cjs/components/button/Button.d.ts +7 -9
- package/cjs/components/button/Button.js +5 -3
- package/cjs/components/button/style/dnb-button.css +14 -14
- package/cjs/components/button/style/dnb-button.min.css +1 -1
- package/cjs/components/button/style/themes/dnb-button-theme-eiendom.css +2 -2
- package/cjs/components/button/style/themes/dnb-button-theme-eiendom.min.css +1 -1
- package/cjs/components/button/style/themes/dnb-button-theme-ui.css +2 -2
- package/cjs/components/button/style/themes/dnb-button-theme-ui.min.css +1 -1
- package/cjs/components/button/style/themes/dnb-button-theme-ui.scss +2 -2
- package/cjs/components/checkbox/Checkbox.js +4 -2
- package/cjs/components/date-picker/DatePicker.js +4 -2
- package/cjs/components/date-picker/style/dnb-date-picker.css +56 -56
- package/cjs/components/date-picker/style/dnb-date-picker.min.css +1 -1
- package/cjs/components/dialog/Dialog.js +2 -2
- package/cjs/components/dialog/parts/DialogBody.d.ts +2 -1
- package/cjs/components/dialog/style/_dialog.scss +1 -1
- package/cjs/components/dialog/style/dnb-dialog.css +26 -26
- package/cjs/components/dialog/style/dnb-dialog.min.css +1 -1
- package/cjs/components/drawer/DrawerContent.d.ts +1 -1
- package/cjs/components/drawer/DrawerContent.js +2 -4
- package/cjs/components/drawer/parts/DrawerBody.d.ts +2 -1
- package/cjs/components/drawer/style/dnb-drawer.css +22 -22
- package/cjs/components/drawer/style/dnb-drawer.min.css +1 -1
- package/cjs/components/dropdown/Dropdown.d.ts +0 -4
- package/cjs/components/dropdown/Dropdown.js +4 -2
- package/cjs/components/dropdown/style/dnb-dropdown.css +14 -14
- package/cjs/components/dropdown/style/dnb-dropdown.min.css +1 -1
- package/cjs/components/form-label/FormLabel.js +4 -2
- package/cjs/components/form-row/FormRow.js +9 -3
- package/cjs/components/form-row/style/_form-row.scss +4 -1
- package/cjs/components/form-row/style/dnb-form-row.css +4 -3
- package/cjs/components/form-row/style/dnb-form-row.min.css +1 -1
- package/cjs/components/form-set/FormSet.js +1 -1
- package/cjs/components/form-status/FormStatus.js +4 -2
- package/cjs/components/global-error/style/dnb-global-error.css +14 -14
- package/cjs/components/global-error/style/dnb-global-error.min.css +1 -1
- package/cjs/components/global-status/GlobalStatus.js +3 -3
- package/cjs/components/global-status/style/dnb-global-status.css +24 -38
- package/cjs/components/global-status/style/dnb-global-status.min.css +1 -1
- package/cjs/components/height-animation/HeightAnimation.d.ts +27 -0
- package/cjs/components/height-animation/HeightAnimation.js +86 -0
- package/cjs/components/height-animation/index.d.ts +3 -0
- package/cjs/components/height-animation/index.js +52 -0
- package/cjs/components/height-animation/style/_height-animation.scss +12 -0
- package/cjs/components/height-animation/style/dnb-height-animation.css +81 -0
- package/cjs/components/height-animation/style/dnb-height-animation.min.css +1 -0
- package/cjs/components/height-animation/style/dnb-height-animation.scss +12 -0
- package/cjs/components/height-animation/style/index.d.ts +1 -0
- package/cjs/components/height-animation/style/index.js +3 -0
- package/cjs/components/height-animation/style.d.ts +1 -0
- package/cjs/components/height-animation/style.js +3 -0
- package/cjs/components/height-animation/useHeightAnimation.d.ts +40 -0
- package/cjs/components/height-animation/useHeightAnimation.js +245 -0
- package/cjs/components/help-button/HelpButton.d.ts +10 -236
- package/cjs/components/help-button/HelpButton.js +31 -124
- package/cjs/components/help-button/HelpButtonInstance.d.ts +5 -100
- package/cjs/components/help-button/HelpButtonInstance.js +54 -129
- package/cjs/components/help-button/style/dnb-help-button.css +14 -14
- package/cjs/components/help-button/style/dnb-help-button.min.css +1 -1
- package/cjs/components/icon/Icon.js +5 -3
- package/cjs/components/icon-primary/IconPrimary.js +4 -2
- package/cjs/components/index.d.ts +2 -1
- package/cjs/components/index.js +8 -0
- package/cjs/components/info-card/InfoCard.d.ts +2 -4
- package/cjs/components/info-card/InfoCard.js +23 -25
- package/cjs/components/input/Input.js +5 -3
- package/cjs/components/input/InputPassword.js +4 -2
- package/cjs/components/input/style/dnb-input.css +28 -28
- package/cjs/components/input/style/dnb-input.min.css +1 -1
- package/cjs/components/input-masked/style/dnb-input-masked.css +28 -28
- package/cjs/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/cjs/components/lib.d.ts +27 -9
- package/cjs/components/lib.js +9 -0
- package/cjs/components/logo/Logo.d.ts +5 -0
- package/cjs/components/logo/Logo.js +8 -3
- package/cjs/components/logo/style/_logo.scss +3 -0
- package/cjs/components/logo/style/dnb-logo.css +2 -0
- package/cjs/components/logo/style/dnb-logo.min.css +1 -1
- package/cjs/components/modal/Modal.d.ts +2 -2
- package/cjs/components/modal/Modal.js +5 -2
- package/cjs/components/modal/ModalRoot.d.ts +1 -1
- package/cjs/components/modal/parts/CloseButton.js +1 -1
- package/cjs/components/modal/style/_modal.scss +1 -2
- package/cjs/components/modal/style/dnb-modal.css +22 -22
- package/cjs/components/modal/style/dnb-modal.min.css +1 -1
- package/cjs/components/number-format/NumberFormat.js +2 -2
- package/cjs/components/number-format/style/dnb-number-format.css +14 -14
- package/cjs/components/number-format/style/dnb-number-format.min.css +1 -1
- package/cjs/components/number-format/useNumberFormat.js +2 -2
- package/cjs/components/pagination/Pagination.d.ts +0 -6
- package/cjs/components/pagination/Pagination.js +3 -3
- package/cjs/components/pagination/PaginationInfinity.js +0 -26
- package/cjs/components/pagination/PaginationProvider.js +11 -5
- package/cjs/components/pagination/style/dnb-pagination.css +14 -14
- package/cjs/components/pagination/style/dnb-pagination.min.css +1 -1
- package/cjs/components/progress-indicator/ProgressIndicator.js +3 -1
- package/cjs/components/radio/Radio.js +5 -2
- package/cjs/components/radio/RadioGroup.js +3 -1
- package/cjs/components/section/Section.d.ts +30 -83
- package/cjs/components/section/Section.js +33 -123
- package/cjs/components/section/style/_section.scss +8 -25
- package/cjs/components/section/style/dnb-section.css +10 -24
- package/cjs/components/section/style/dnb-section.min.css +1 -1
- package/cjs/components/section/style/themes/dnb-section-theme-ui.scss +1 -5
- package/cjs/components/skeleton/Skeleton.js +1 -1
- package/cjs/components/slider/Slider.d.ts +2 -3
- package/cjs/components/slider/SliderHelpers.d.ts +6 -4
- package/cjs/components/slider/SliderHelpers.js +18 -22
- package/cjs/components/slider/SliderInstance.js +6 -5
- package/cjs/components/slider/SliderProvider.d.ts +2 -2
- package/cjs/components/slider/SliderProvider.js +42 -26
- package/cjs/components/slider/SliderThumb.js +130 -71
- package/cjs/components/slider/SliderTrack.js +8 -10
- package/cjs/components/slider/hooks/useSliderEvents.d.ts +1 -3
- package/cjs/components/slider/hooks/useSliderEvents.js +19 -36
- package/cjs/components/slider/style/_range.scss +6 -0
- package/cjs/components/slider/style/_slider.scss +8 -5
- package/cjs/components/slider/style/dnb-range.css +10 -0
- package/cjs/components/slider/style/dnb-range.scss +6 -0
- package/cjs/components/slider/style/dnb-slider.css +211 -21
- package/cjs/components/slider/style/dnb-slider.min.css +1 -1
- package/cjs/components/slider/style/dnb-slider.scss +1 -0
- package/cjs/components/slider/types.d.ts +13 -5
- package/cjs/components/space/Space.d.ts +3 -2
- package/cjs/components/space/Space.js +17 -22
- package/cjs/components/step-indicator/StepIndicatorContext.js +4 -2
- package/cjs/components/step-indicator/StepIndicatorSidebar.js +1 -1
- package/cjs/components/step-indicator/StepIndicatorTriggerButton.js +2 -2
- package/cjs/components/step-indicator/style/dnb-step-indicator.css +14 -14
- package/cjs/components/step-indicator/style/dnb-step-indicator.min.css +1 -1
- package/cjs/components/switch/Switch.js +4 -2
- package/cjs/components/table/Table.d.ts +2 -2
- package/cjs/components/table/Table.js +1 -3
- package/cjs/components/tabs/Tabs.js +2 -2
- package/cjs/components/tabs/TabsContentWrapper.js +1 -1
- package/cjs/components/tag/Tag.d.ts +10 -3
- package/cjs/components/tag/Tag.js +8 -9
- package/cjs/components/tag/TagGroup.d.ts +2 -2
- package/cjs/components/tag/TagGroup.js +5 -7
- package/cjs/components/tag/style/dnb-tag.css +14 -14
- package/cjs/components/tag/style/dnb-tag.min.css +1 -1
- package/cjs/components/textarea/Textarea.js +4 -2
- package/cjs/components/timeline/Timeline.d.ts +2 -2
- package/cjs/components/timeline/Timeline.js +1 -3
- package/cjs/components/timeline/TimelineItem.js +2 -2
- package/cjs/components/toggle-button/ToggleButton.js +4 -1
- package/cjs/components/toggle-button/ToggleButtonGroup.js +3 -1
- package/cjs/components/toggle-button/style/dnb-toggle-button.css +14 -14
- package/cjs/components/toggle-button/style/dnb-toggle-button.min.css +1 -1
- package/cjs/components/tooltip/Tooltip.d.ts +8 -154
- package/cjs/components/tooltip/Tooltip.js +84 -166
- package/cjs/components/tooltip/TooltipContainer.d.ts +15 -68
- package/cjs/components/tooltip/TooltipContainer.js +207 -323
- package/cjs/components/tooltip/TooltipHelpers.d.ts +31 -1
- package/cjs/components/tooltip/TooltipHelpers.js +85 -1
- package/cjs/components/tooltip/TooltipPortal.d.ts +13 -31
- package/cjs/components/tooltip/TooltipPortal.js +152 -206
- package/cjs/components/tooltip/TooltipWithEvents.d.ts +11 -35
- package/cjs/components/tooltip/TooltipWithEvents.js +159 -195
- package/cjs/components/tooltip/style/_tooltip.scss +8 -7
- package/cjs/components/tooltip/style/dnb-tooltip.css +14 -14
- package/cjs/components/tooltip/style/dnb-tooltip.min.css +1 -1
- package/cjs/components/tooltip/types.d.ts +28 -0
- package/cjs/components/tooltip/types.js +1 -0
- package/cjs/components/visually-hidden/VisuallyHidden.d.ts +2 -3
- package/cjs/components/visually-hidden/VisuallyHidden.js +2 -20
- package/cjs/elements/Anchor.d.ts +5 -3
- package/cjs/elements/Anchor.js +3 -5
- package/cjs/elements/Dd.d.ts +10 -26
- package/cjs/elements/Dd.js +0 -31
- package/cjs/elements/Dl.d.ts +16 -26
- package/cjs/elements/Dl.js +24 -26
- package/cjs/elements/Dt.d.ts +10 -26
- package/cjs/elements/Dt.js +0 -31
- package/cjs/elements/Element.d.ts +4 -2
- package/cjs/elements/Element.js +1 -3
- package/cjs/elements/Li.d.ts +6 -26
- package/cjs/elements/Li.js +0 -23
- package/cjs/elements/Link.d.ts +3 -1
- package/cjs/elements/Ol.d.ts +20 -29
- package/cjs/elements/Ol.js +0 -33
- package/cjs/elements/Ul.d.ts +20 -30
- package/cjs/elements/Ul.js +0 -35
- package/cjs/elements/lib.d.ts +19 -8
- package/cjs/extensions/payment-card/PaymentCard.js +2 -2
- package/cjs/fragments/drawer-list/DrawerList.js +3 -1
- package/cjs/fragments/drawer-list/style/_drawer-list.scss +1 -1
- package/cjs/fragments/lib.d.ts +8 -1
- package/cjs/fragments/scroll-view/ScrollView.d.ts +14 -7
- package/cjs/fragments/scroll-view/ScrollView.js +29 -99
- package/cjs/icons/add.js +5 -2
- package/cjs/icons/add_circled.js +5 -2
- package/cjs/icons/add_circled_medium.js +5 -2
- package/cjs/icons/add_medium.js +5 -2
- package/cjs/icons/boat.js +10 -3
- package/cjs/icons/boat_medium.js +10 -3
- package/cjs/icons/calculator.js +10 -3
- package/cjs/icons/card.js +4 -2
- package/cjs/icons/card_medium.js +4 -2
- package/cjs/icons/cat_medium.js +10 -3
- package/cjs/icons/chatbot.js +5 -2
- package/cjs/icons/chatbot_medium.js +5 -2
- package/cjs/icons/chip.js +10 -3
- package/cjs/icons/chip_medium.js +10 -3
- package/cjs/icons/cloud_download.js +10 -3
- package/cjs/icons/cloud_download_medium.js +10 -3
- package/cjs/icons/cloud_rain.js +10 -3
- package/cjs/icons/cloud_rain_medium.js +10 -3
- package/cjs/icons/cloud_sync.js +10 -3
- package/cjs/icons/cloud_sync_medium.js +10 -3
- package/cjs/icons/cloud_transfer.js +10 -3
- package/cjs/icons/cloud_transfer_medium.js +10 -3
- package/cjs/icons/cloud_upload.js +10 -3
- package/cjs/icons/cloud_upload_medium.js +10 -3
- package/cjs/icons/cookie.js +10 -3
- package/cjs/icons/cookie_medium.js +10 -3
- package/cjs/icons/diamond.js +10 -3
- package/cjs/icons/dog.js +10 -3
- package/cjs/icons/dog_medium.js +10 -3
- package/cjs/icons/exclamation_circled.js +5 -2
- package/cjs/icons/exclamation_circled_medium.js +5 -2
- package/cjs/icons/file_jpg.d.ts +2 -0
- package/cjs/icons/file_jpg.js +32 -0
- package/cjs/icons/file_jpg_medium.d.ts +2 -0
- package/cjs/icons/file_jpg_medium.js +38 -0
- package/cjs/icons/file_png.d.ts +2 -0
- package/cjs/icons/file_png.js +32 -0
- package/cjs/icons/file_png_medium.d.ts +2 -0
- package/cjs/icons/file_png_medium.js +38 -0
- package/cjs/icons/fish.d.ts +2 -0
- package/cjs/icons/fish.js +40 -0
- package/cjs/icons/fish_medium.d.ts +2 -0
- package/cjs/icons/fish_medium.js +40 -0
- package/cjs/icons/hourglass.js +10 -3
- package/cjs/icons/icons-meta.json +71 -1
- package/cjs/icons/icons-pdf.lock +1098 -968
- package/cjs/icons/icons-svg.lock +1098 -968
- package/cjs/icons/index.d.ts +11 -1
- package/cjs/icons/index.js +80 -0
- package/cjs/icons/instagram.js +10 -3
- package/cjs/icons/linkedin.js +10 -3
- package/cjs/icons/linkedin_medium.js +10 -3
- package/cjs/icons/loupe.js +4 -2
- package/cjs/icons/loupe_medium.js +4 -2
- package/cjs/icons/mastercard_card.js +4 -2
- package/cjs/icons/mastercard_card_medium.js +4 -2
- package/cjs/icons/news.js +10 -3
- package/cjs/icons/news_medium.js +10 -3
- package/cjs/icons/newspaper.d.ts +2 -0
- package/cjs/icons/newspaper.js +35 -0
- package/cjs/icons/newspaper_medium.d.ts +2 -0
- package/cjs/icons/newspaper_medium.js +35 -0
- package/cjs/icons/phone.js +10 -3
- package/cjs/icons/phone_medium.js +10 -3
- package/cjs/icons/photo.js +10 -3
- package/cjs/icons/photo_medium.js +10 -3
- package/cjs/icons/pin.js +10 -3
- package/cjs/icons/pin_medium.js +10 -3
- package/cjs/icons/play.js +10 -3
- package/cjs/icons/savings_account.js +5 -2
- package/cjs/icons/secondary_icons.d.ts +6 -1
- package/cjs/icons/secondary_icons.js +40 -0
- package/cjs/icons/secondary_icons_medium.d.ts +6 -1
- package/cjs/icons/secondary_icons_medium.js +40 -0
- package/cjs/icons/sort.d.ts +2 -0
- package/cjs/icons/sort.js +35 -0
- package/cjs/icons/sort_medium.d.ts +2 -0
- package/cjs/icons/sort_medium.js +35 -0
- package/cjs/icons/subtract.js +5 -2
- package/cjs/icons/subtract_circled.js +5 -2
- package/cjs/icons/subtract_circled_medium.js +5 -2
- package/cjs/icons/subtract_medium.js +5 -2
- package/cjs/icons/tag.js +13 -10
- package/cjs/icons/tag_medium.js +13 -10
- package/cjs/icons/thumbs_down.js +10 -3
- package/cjs/icons/thumbs_up.js +10 -3
- package/cjs/icons/video.js +10 -3
- package/cjs/icons/video_medium.js +10 -3
- package/cjs/icons/wallet_medium.js +4 -2
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +8 -0
- package/cjs/shared/AnimateHeight.d.ts +46 -32
- package/cjs/shared/AnimateHeight.js +104 -66
- package/cjs/shared/Context.d.ts +9 -3
- package/cjs/shared/Eufemia.js +1 -1
- package/cjs/shared/MediaQueryUtils.d.ts +5 -1
- package/cjs/shared/MediaQueryUtils.js +5 -3
- package/cjs/shared/component-helper.d.ts +7 -18
- package/cjs/shared/component-helper.js +55 -260
- package/cjs/shared/helpers/EventEmitter.d.ts +46 -0
- package/cjs/shared/{EventEmitter.js → helpers/EventEmitter.js} +31 -26
- package/cjs/shared/helpers/InteractionInvalidation.d.ts +30 -0
- package/cjs/shared/helpers/InteractionInvalidation.js +256 -0
- package/{shared/hooks/usePropsWithContext.d.ts → cjs/shared/helpers/extendPropsWithContext.d.ts} +2 -3
- package/cjs/shared/{hooks/usePropsWithContext.js → helpers/extendPropsWithContext.js} +36 -15
- package/cjs/shared/helpers/filterValidProps.d.ts +1 -1
- package/cjs/shared/helpers/filterValidProps.js +1 -1
- package/cjs/shared/helpers/getPreviousSibling.d.ts +10 -0
- package/cjs/shared/helpers/getPreviousSibling.js +47 -0
- package/cjs/shared/helpers/useEventEmitter.d.ts +14 -0
- package/cjs/shared/helpers/useEventEmitter.js +92 -0
- package/cjs/shared/helpers.d.ts +2 -0
- package/cjs/shared/interfaces.d.ts +4 -23
- package/cjs/shared/interfaces.js +24 -1
- package/cjs/shared/locales/en-GB.d.ts +3 -0
- package/cjs/shared/locales/en-GB.js +3 -0
- package/cjs/shared/locales/en-US.d.ts +3 -0
- package/cjs/shared/locales/index.d.ts +6 -0
- package/cjs/shared/locales/nb-NO.d.ts +3 -0
- package/cjs/shared/locales/nb-NO.js +3 -0
- package/cjs/shared/types.d.ts +35 -0
- package/cjs/shared/types.js +1 -0
- package/cjs/shared/useMediaQuery.js +19 -12
- package/cjs/style/core/helper-classes/helper-classes.scss +4 -0
- package/cjs/style/dnb-ui-basis.css +3 -0
- package/cjs/style/dnb-ui-basis.min.css +1 -1
- package/cjs/style/dnb-ui-components.css +112 -84
- package/cjs/style/dnb-ui-components.min.css +5 -5
- package/cjs/style/dnb-ui-components.scss +1 -0
- package/cjs/style/dnb-ui-core.css +3 -0
- package/cjs/style/dnb-ui-core.min.css +1 -1
- package/cjs/style/dnb-ui-elements.css +25 -4
- package/cjs/style/dnb-ui-elements.min.css +1 -1
- package/cjs/style/dnb-ui-fragments.css +1 -1
- package/cjs/style/dnb-ui-fragments.min.css +1 -1
- package/cjs/style/dnb-ui-tags.css +50 -8
- package/cjs/style/dnb-ui-tags.min.css +1 -1
- package/cjs/style/elements/lists.scss +27 -5
- package/cjs/style/themes/theme-eiendom/dnb-theme-eiendom.css +129 -112
- package/cjs/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +5 -5
- package/cjs/style/themes/theme-ui/dnb-theme-ui.css +127 -110
- package/cjs/style/themes/theme-ui/dnb-theme-ui.min.css +5 -5
- package/components/HeightAnimation.d.ts +3 -0
- package/components/HeightAnimation.js +3 -0
- package/components/accordion/Accordion.js +3 -3
- package/components/accordion/AccordionHeader.js +2 -2
- package/components/accordion/AccordionProvider.js +3 -2
- package/components/accordion/style/_accordion.scss +14 -15
- package/components/accordion/style/dnb-accordion.css +9 -6
- package/components/accordion/style/dnb-accordion.min.css +1 -1
- package/components/accordion/style/themes/dnb-accordion-theme-ui.css +100 -94
- package/components/accordion/style/themes/dnb-accordion-theme-ui.min.css +3 -3
- package/components/accordion/style/themes/dnb-accordion-theme-ui.scss +36 -39
- package/components/autocomplete/Autocomplete.d.ts +0 -10
- package/components/autocomplete/Autocomplete.js +3 -5
- package/components/autocomplete/style/_autocomplete.scss +2 -2
- package/components/autocomplete/style/dnb-autocomplete.css +46 -46
- package/components/autocomplete/style/dnb-autocomplete.min.css +1 -1
- package/components/avatar/Avatar.d.ts +5 -3
- package/components/avatar/Avatar.js +2 -3
- package/components/avatar/AvatarGroup.d.ts +2 -2
- package/components/avatar/AvatarGroup.js +9 -10
- package/components/avatar/style/themes/dnb-avatar-theme-ui.css +0 -10
- package/components/avatar/style/themes/dnb-avatar-theme-ui.min.css +1 -1
- package/components/avatar/style/themes/dnb-avatar-theme-ui.scss +0 -8
- package/components/badge/Badge.d.ts +3 -3
- package/components/badge/Badge.js +2 -16
- package/components/breadcrumb/Breadcrumb.d.ts +14 -8
- package/components/breadcrumb/Breadcrumb.js +26 -27
- package/components/breadcrumb/BreadcrumbItem.d.ts +2 -0
- package/components/breadcrumb/BreadcrumbItem.js +16 -11
- package/components/breadcrumb/BreadcrumbMultiple.d.ts +10 -0
- package/components/breadcrumb/BreadcrumbMultiple.js +33 -0
- package/components/breadcrumb/style/_breadcrumb.scss +25 -12
- package/components/breadcrumb/style/dnb-breadcrumb.css +933 -17
- package/components/breadcrumb/style/dnb-breadcrumb.min.css +1 -1
- package/components/breadcrumb/style/dnb-breadcrumb.scss +4 -0
- package/components/button/Button.d.ts +7 -9
- package/components/button/Button.js +5 -4
- package/components/button/style/dnb-button.css +14 -14
- package/components/button/style/dnb-button.min.css +1 -1
- package/components/button/style/themes/dnb-button-theme-eiendom.css +2 -2
- package/components/button/style/themes/dnb-button-theme-eiendom.min.css +1 -1
- package/components/button/style/themes/dnb-button-theme-ui.css +2 -2
- package/components/button/style/themes/dnb-button-theme-ui.min.css +1 -1
- package/components/button/style/themes/dnb-button-theme-ui.scss +2 -2
- package/components/checkbox/Checkbox.js +4 -3
- package/components/date-picker/DatePicker.js +4 -3
- package/components/date-picker/style/dnb-date-picker.css +56 -56
- package/components/date-picker/style/dnb-date-picker.min.css +1 -1
- package/components/dialog/Dialog.js +2 -2
- package/components/dialog/parts/DialogBody.d.ts +2 -1
- package/components/dialog/style/_dialog.scss +1 -1
- package/components/dialog/style/dnb-dialog.css +26 -26
- package/components/dialog/style/dnb-dialog.min.css +1 -1
- package/components/drawer/DrawerContent.d.ts +1 -1
- package/components/drawer/DrawerContent.js +2 -4
- package/components/drawer/parts/DrawerBody.d.ts +2 -1
- package/components/drawer/style/dnb-drawer.css +22 -22
- package/components/drawer/style/dnb-drawer.min.css +1 -1
- package/components/dropdown/Dropdown.d.ts +0 -4
- package/components/dropdown/Dropdown.js +4 -3
- package/components/dropdown/style/dnb-dropdown.css +14 -14
- package/components/dropdown/style/dnb-dropdown.min.css +1 -1
- package/components/form-label/FormLabel.js +4 -3
- package/components/form-row/FormRow.js +9 -4
- package/components/form-row/style/_form-row.scss +4 -1
- package/components/form-row/style/dnb-form-row.css +4 -3
- package/components/form-row/style/dnb-form-row.min.css +1 -1
- package/components/form-set/FormSet.js +2 -2
- package/components/form-status/FormStatus.js +4 -3
- package/components/global-error/style/dnb-global-error.css +14 -14
- package/components/global-error/style/dnb-global-error.min.css +1 -1
- package/components/global-status/GlobalStatus.js +4 -4
- package/components/global-status/style/dnb-global-status.css +24 -38
- package/components/global-status/style/dnb-global-status.min.css +1 -1
- package/components/height-animation/HeightAnimation.d.ts +27 -0
- package/components/height-animation/HeightAnimation.js +60 -0
- package/components/height-animation/index.d.ts +3 -0
- package/components/height-animation/index.js +3 -0
- package/components/height-animation/style/_height-animation.scss +12 -0
- package/components/height-animation/style/dnb-height-animation.css +81 -0
- package/components/height-animation/style/dnb-height-animation.min.css +1 -0
- package/components/height-animation/style/dnb-height-animation.scss +12 -0
- package/components/height-animation/style/index.d.ts +1 -0
- package/components/height-animation/style/index.js +1 -0
- package/components/height-animation/style.d.ts +1 -0
- package/components/height-animation/style.js +1 -0
- package/components/height-animation/useHeightAnimation.d.ts +40 -0
- package/components/height-animation/useHeightAnimation.js +196 -0
- package/components/help-button/HelpButton.d.ts +10 -236
- package/components/help-button/HelpButton.js +30 -94
- package/components/help-button/HelpButtonInstance.d.ts +5 -100
- package/components/help-button/HelpButtonInstance.js +56 -101
- package/components/help-button/style/dnb-help-button.css +14 -14
- package/components/help-button/style/dnb-help-button.min.css +1 -1
- package/components/icon/Icon.js +5 -4
- package/components/icon-primary/IconPrimary.js +4 -3
- package/components/index.d.ts +2 -1
- package/components/index.js +2 -1
- package/components/info-card/InfoCard.d.ts +2 -4
- package/components/info-card/InfoCard.js +20 -22
- package/components/input/Input.js +5 -4
- package/components/input/InputPassword.js +4 -3
- package/components/input/style/dnb-input.css +28 -28
- package/components/input/style/dnb-input.min.css +1 -1
- package/components/input-masked/style/dnb-input-masked.css +28 -28
- package/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/components/lib.d.ts +27 -9
- package/components/lib.js +3 -1
- package/components/logo/Logo.d.ts +5 -0
- package/components/logo/Logo.js +8 -4
- package/components/logo/style/_logo.scss +3 -0
- package/components/logo/style/dnb-logo.css +2 -0
- package/components/logo/style/dnb-logo.min.css +1 -1
- package/components/modal/Modal.d.ts +2 -2
- package/components/modal/Modal.js +5 -3
- package/components/modal/ModalRoot.d.ts +1 -1
- package/components/modal/parts/CloseButton.js +2 -2
- package/components/modal/style/_modal.scss +1 -2
- package/components/modal/style/dnb-modal.css +22 -22
- package/components/modal/style/dnb-modal.min.css +1 -1
- package/components/number-format/NumberFormat.js +3 -3
- package/components/number-format/style/dnb-number-format.css +14 -14
- package/components/number-format/style/dnb-number-format.min.css +1 -1
- package/components/number-format/useNumberFormat.js +2 -2
- package/components/pagination/Pagination.d.ts +0 -6
- package/components/pagination/Pagination.js +3 -4
- package/components/pagination/PaginationInfinity.js +0 -26
- package/components/pagination/PaginationProvider.js +11 -5
- package/components/pagination/style/dnb-pagination.css +14 -14
- package/components/pagination/style/dnb-pagination.min.css +1 -1
- package/components/progress-indicator/ProgressIndicator.js +3 -2
- package/components/radio/Radio.js +5 -3
- package/components/radio/RadioGroup.js +3 -2
- package/components/section/Section.d.ts +30 -83
- package/components/section/Section.js +36 -99
- package/components/section/style/_section.scss +8 -25
- package/components/section/style/dnb-section.css +10 -24
- package/components/section/style/dnb-section.min.css +1 -1
- package/components/section/style/themes/dnb-section-theme-ui.scss +1 -5
- package/components/skeleton/Skeleton.js +2 -2
- package/components/slider/Slider.d.ts +2 -3
- package/components/slider/SliderHelpers.d.ts +6 -4
- package/components/slider/SliderHelpers.js +16 -17
- package/components/slider/SliderInstance.js +8 -7
- package/components/slider/SliderProvider.d.ts +2 -2
- package/components/slider/SliderProvider.js +45 -28
- package/components/slider/SliderThumb.js +107 -73
- package/components/slider/SliderTrack.js +10 -12
- package/components/slider/hooks/useSliderEvents.d.ts +1 -3
- package/components/slider/hooks/useSliderEvents.js +19 -36
- package/components/slider/style/_range.scss +6 -0
- package/components/slider/style/_slider.scss +8 -5
- package/components/slider/style/dnb-range.css +10 -0
- package/components/slider/style/dnb-range.scss +6 -0
- package/components/slider/style/dnb-slider.css +211 -21
- package/components/slider/style/dnb-slider.min.css +1 -1
- package/components/slider/style/dnb-slider.scss +1 -0
- package/components/slider/types.d.ts +13 -5
- package/components/space/Space.d.ts +3 -2
- package/components/space/Space.js +18 -23
- package/components/step-indicator/StepIndicatorContext.js +4 -3
- package/components/step-indicator/StepIndicatorSidebar.js +2 -2
- package/components/step-indicator/StepIndicatorTriggerButton.js +2 -2
- package/components/step-indicator/style/dnb-step-indicator.css +14 -14
- package/components/step-indicator/style/dnb-step-indicator.min.css +1 -1
- package/components/switch/Switch.js +4 -3
- package/components/table/Table.d.ts +2 -2
- package/components/table/Table.js +2 -3
- package/components/tabs/Tabs.js +3 -3
- package/components/tabs/TabsContentWrapper.js +1 -1
- package/components/tag/Tag.d.ts +10 -3
- package/components/tag/Tag.js +9 -9
- package/components/tag/TagGroup.d.ts +2 -2
- package/components/tag/TagGroup.js +6 -7
- package/components/tag/style/dnb-tag.css +14 -14
- package/components/tag/style/dnb-tag.min.css +1 -1
- package/components/textarea/Textarea.js +4 -3
- package/components/timeline/Timeline.d.ts +2 -2
- package/components/timeline/Timeline.js +2 -3
- package/components/timeline/TimelineItem.js +2 -2
- package/components/toggle-button/ToggleButton.js +4 -2
- package/components/toggle-button/ToggleButtonGroup.js +3 -2
- package/components/toggle-button/style/dnb-toggle-button.css +14 -14
- package/components/toggle-button/style/dnb-toggle-button.min.css +1 -1
- package/components/tooltip/Tooltip.d.ts +8 -154
- package/components/tooltip/Tooltip.js +63 -150
- package/components/tooltip/TooltipContainer.d.ts +15 -68
- package/components/tooltip/TooltipContainer.js +188 -313
- package/components/tooltip/TooltipHelpers.d.ts +31 -1
- package/components/tooltip/TooltipHelpers.js +67 -1
- package/components/tooltip/TooltipPortal.d.ts +13 -31
- package/components/tooltip/TooltipPortal.js +139 -200
- package/components/tooltip/TooltipWithEvents.d.ts +11 -35
- package/components/tooltip/TooltipWithEvents.js +148 -191
- package/components/tooltip/style/_tooltip.scss +8 -7
- package/components/tooltip/style/dnb-tooltip.css +14 -14
- package/components/tooltip/style/dnb-tooltip.min.css +1 -1
- package/components/tooltip/types.d.ts +28 -0
- package/components/tooltip/types.js +1 -0
- package/components/visually-hidden/VisuallyHidden.d.ts +2 -3
- package/components/visually-hidden/VisuallyHidden.js +2 -17
- package/elements/Anchor.d.ts +5 -3
- package/elements/Anchor.js +4 -5
- package/elements/Dd.d.ts +10 -26
- package/elements/Dd.js +0 -22
- package/elements/Dl.d.ts +16 -26
- package/elements/Dl.js +19 -23
- package/elements/Dt.d.ts +10 -26
- package/elements/Dt.js +0 -22
- package/elements/Element.d.ts +4 -2
- package/elements/Element.js +2 -3
- package/elements/Li.d.ts +6 -26
- package/elements/Li.js +0 -20
- package/elements/Link.d.ts +3 -1
- package/elements/Ol.d.ts +20 -29
- package/elements/Ol.js +0 -28
- package/elements/Ul.d.ts +20 -30
- package/elements/Ul.js +0 -30
- package/elements/lib.d.ts +19 -8
- package/es/components/HeightAnimation.d.ts +3 -0
- package/es/components/HeightAnimation.js +3 -0
- package/es/components/accordion/Accordion.js +3 -3
- package/es/components/accordion/AccordionHeader.js +2 -2
- package/es/components/accordion/AccordionProvider.js +3 -2
- package/es/components/accordion/style/_accordion.scss +14 -15
- package/es/components/accordion/style/dnb-accordion.css +9 -6
- package/es/components/accordion/style/dnb-accordion.min.css +1 -1
- package/es/components/accordion/style/themes/dnb-accordion-theme-ui.css +100 -94
- package/es/components/accordion/style/themes/dnb-accordion-theme-ui.min.css +3 -3
- package/es/components/accordion/style/themes/dnb-accordion-theme-ui.scss +36 -39
- package/es/components/autocomplete/Autocomplete.d.ts +0 -10
- package/es/components/autocomplete/Autocomplete.js +3 -5
- package/es/components/autocomplete/style/_autocomplete.scss +2 -2
- package/es/components/autocomplete/style/dnb-autocomplete.css +46 -46
- package/es/components/autocomplete/style/dnb-autocomplete.min.css +1 -1
- package/es/components/avatar/Avatar.d.ts +5 -3
- package/es/components/avatar/Avatar.js +2 -3
- package/es/components/avatar/AvatarGroup.d.ts +2 -2
- package/es/components/avatar/AvatarGroup.js +4 -5
- package/es/components/avatar/style/themes/dnb-avatar-theme-ui.css +0 -10
- package/es/components/avatar/style/themes/dnb-avatar-theme-ui.min.css +1 -1
- package/es/components/avatar/style/themes/dnb-avatar-theme-ui.scss +0 -8
- package/es/components/badge/Badge.d.ts +3 -3
- package/es/components/badge/Badge.js +2 -9
- package/es/components/breadcrumb/Breadcrumb.d.ts +14 -8
- package/es/components/breadcrumb/Breadcrumb.js +26 -22
- package/es/components/breadcrumb/BreadcrumbItem.d.ts +2 -0
- package/es/components/breadcrumb/BreadcrumbItem.js +12 -7
- package/es/components/breadcrumb/BreadcrumbMultiple.d.ts +10 -0
- package/es/components/breadcrumb/BreadcrumbMultiple.js +31 -0
- package/es/components/breadcrumb/style/_breadcrumb.scss +25 -12
- package/es/components/breadcrumb/style/dnb-breadcrumb.css +933 -17
- package/es/components/breadcrumb/style/dnb-breadcrumb.min.css +1 -1
- package/es/components/breadcrumb/style/dnb-breadcrumb.scss +4 -0
- package/es/components/button/Button.d.ts +7 -9
- package/es/components/button/Button.js +5 -4
- package/es/components/button/style/dnb-button.css +14 -14
- package/es/components/button/style/dnb-button.min.css +1 -1
- package/es/components/button/style/themes/dnb-button-theme-eiendom.css +2 -2
- package/es/components/button/style/themes/dnb-button-theme-eiendom.min.css +1 -1
- package/es/components/button/style/themes/dnb-button-theme-ui.css +2 -2
- package/es/components/button/style/themes/dnb-button-theme-ui.min.css +1 -1
- package/es/components/button/style/themes/dnb-button-theme-ui.scss +2 -2
- package/es/components/checkbox/Checkbox.js +4 -3
- package/es/components/date-picker/DatePicker.js +4 -3
- package/es/components/date-picker/style/dnb-date-picker.css +56 -56
- package/es/components/date-picker/style/dnb-date-picker.min.css +1 -1
- package/es/components/dialog/Dialog.js +2 -2
- package/es/components/dialog/parts/DialogBody.d.ts +2 -1
- package/es/components/dialog/style/_dialog.scss +1 -1
- package/es/components/dialog/style/dnb-dialog.css +26 -26
- package/es/components/dialog/style/dnb-dialog.min.css +1 -1
- package/es/components/drawer/DrawerContent.d.ts +1 -1
- package/es/components/drawer/DrawerContent.js +2 -3
- package/es/components/drawer/parts/DrawerBody.d.ts +2 -1
- package/es/components/drawer/style/dnb-drawer.css +22 -22
- package/es/components/drawer/style/dnb-drawer.min.css +1 -1
- package/es/components/dropdown/Dropdown.d.ts +0 -4
- package/es/components/dropdown/Dropdown.js +4 -3
- package/es/components/dropdown/style/dnb-dropdown.css +14 -14
- package/es/components/dropdown/style/dnb-dropdown.min.css +1 -1
- package/es/components/form-label/FormLabel.js +4 -3
- package/es/components/form-row/FormRow.js +9 -4
- package/es/components/form-row/style/_form-row.scss +4 -1
- package/es/components/form-row/style/dnb-form-row.css +4 -3
- package/es/components/form-row/style/dnb-form-row.min.css +1 -1
- package/es/components/form-set/FormSet.js +2 -2
- package/es/components/form-status/FormStatus.js +4 -3
- package/es/components/global-error/style/dnb-global-error.css +14 -14
- package/es/components/global-error/style/dnb-global-error.min.css +1 -1
- package/es/components/global-status/GlobalStatus.js +4 -4
- package/es/components/global-status/style/dnb-global-status.css +24 -38
- package/es/components/global-status/style/dnb-global-status.min.css +1 -1
- package/es/components/height-animation/HeightAnimation.d.ts +27 -0
- package/es/components/height-animation/HeightAnimation.js +56 -0
- package/es/components/height-animation/index.d.ts +3 -0
- package/es/components/height-animation/index.js +3 -0
- package/es/components/height-animation/style/_height-animation.scss +12 -0
- package/es/components/height-animation/style/dnb-height-animation.css +81 -0
- package/es/components/height-animation/style/dnb-height-animation.min.css +1 -0
- package/es/components/height-animation/style/dnb-height-animation.scss +12 -0
- package/es/components/height-animation/style/index.d.ts +1 -0
- package/es/components/height-animation/style/index.js +1 -0
- package/es/components/height-animation/style.d.ts +1 -0
- package/es/components/height-animation/style.js +1 -0
- package/es/components/height-animation/useHeightAnimation.d.ts +40 -0
- package/es/components/height-animation/useHeightAnimation.js +168 -0
- package/es/components/help-button/HelpButton.d.ts +10 -236
- package/es/components/help-button/HelpButton.js +28 -57
- package/es/components/help-button/HelpButtonInstance.d.ts +5 -100
- package/es/components/help-button/HelpButtonInstance.js +55 -74
- package/es/components/help-button/style/dnb-help-button.css +14 -14
- package/es/components/help-button/style/dnb-help-button.min.css +1 -1
- package/es/components/icon/Icon.js +5 -4
- package/es/components/icon-primary/IconPrimary.js +4 -3
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/info-card/InfoCard.d.ts +2 -4
- package/es/components/info-card/InfoCard.js +6 -8
- package/es/components/input/Input.js +5 -4
- package/es/components/input/InputPassword.js +4 -3
- package/es/components/input/style/dnb-input.css +28 -28
- package/es/components/input/style/dnb-input.min.css +1 -1
- package/es/components/input-masked/style/dnb-input-masked.css +28 -28
- package/es/components/input-masked/style/dnb-input-masked.min.css +1 -1
- package/es/components/lib.d.ts +27 -9
- package/es/components/lib.js +3 -1
- package/es/components/logo/Logo.d.ts +5 -0
- package/es/components/logo/Logo.js +8 -4
- package/es/components/logo/style/_logo.scss +3 -0
- package/es/components/logo/style/dnb-logo.css +2 -0
- package/es/components/logo/style/dnb-logo.min.css +1 -1
- package/es/components/modal/Modal.d.ts +2 -2
- package/es/components/modal/Modal.js +5 -3
- package/es/components/modal/ModalRoot.d.ts +1 -1
- package/es/components/modal/parts/CloseButton.js +2 -2
- package/es/components/modal/style/_modal.scss +1 -2
- package/es/components/modal/style/dnb-modal.css +22 -22
- package/es/components/modal/style/dnb-modal.min.css +1 -1
- package/es/components/number-format/NumberFormat.js +3 -3
- package/es/components/number-format/style/dnb-number-format.css +14 -14
- package/es/components/number-format/style/dnb-number-format.min.css +1 -1
- package/es/components/number-format/useNumberFormat.js +2 -2
- package/es/components/pagination/Pagination.d.ts +0 -6
- package/es/components/pagination/Pagination.js +3 -4
- package/es/components/pagination/PaginationInfinity.js +0 -26
- package/es/components/pagination/PaginationProvider.js +11 -5
- package/es/components/pagination/style/dnb-pagination.css +14 -14
- package/es/components/pagination/style/dnb-pagination.min.css +1 -1
- package/es/components/progress-indicator/ProgressIndicator.js +3 -2
- package/es/components/radio/Radio.js +5 -3
- package/es/components/radio/RadioGroup.js +3 -2
- package/es/components/section/Section.d.ts +30 -83
- package/es/components/section/Section.js +35 -70
- package/es/components/section/style/_section.scss +8 -25
- package/es/components/section/style/dnb-section.css +10 -24
- package/es/components/section/style/dnb-section.min.css +1 -1
- package/es/components/section/style/themes/dnb-section-theme-ui.scss +1 -5
- package/es/components/skeleton/Skeleton.js +2 -2
- package/es/components/slider/Slider.d.ts +2 -3
- package/es/components/slider/SliderHelpers.d.ts +6 -4
- package/es/components/slider/SliderHelpers.js +16 -14
- package/es/components/slider/SliderInstance.js +8 -7
- package/es/components/slider/SliderProvider.d.ts +2 -2
- package/es/components/slider/SliderProvider.js +24 -15
- package/es/components/slider/SliderThumb.js +97 -62
- package/es/components/slider/SliderTrack.js +10 -12
- package/es/components/slider/hooks/useSliderEvents.d.ts +1 -3
- package/es/components/slider/hooks/useSliderEvents.js +19 -32
- package/es/components/slider/style/_range.scss +6 -0
- package/es/components/slider/style/_slider.scss +8 -5
- package/es/components/slider/style/dnb-range.css +10 -0
- package/es/components/slider/style/dnb-range.scss +6 -0
- package/es/components/slider/style/dnb-slider.css +211 -21
- package/es/components/slider/style/dnb-slider.min.css +1 -1
- package/es/components/slider/style/dnb-slider.scss +1 -0
- package/es/components/slider/types.d.ts +13 -5
- package/es/components/space/Space.d.ts +3 -2
- package/es/components/space/Space.js +20 -25
- package/es/components/step-indicator/StepIndicatorContext.js +4 -3
- package/es/components/step-indicator/StepIndicatorSidebar.js +2 -2
- package/es/components/step-indicator/StepIndicatorTriggerButton.js +2 -2
- package/es/components/step-indicator/style/dnb-step-indicator.css +14 -14
- package/es/components/step-indicator/style/dnb-step-indicator.min.css +1 -1
- package/es/components/switch/Switch.js +4 -3
- package/es/components/table/Table.d.ts +2 -2
- package/es/components/table/Table.js +2 -3
- package/es/components/tabs/Tabs.js +3 -3
- package/es/components/tabs/TabsContentWrapper.js +1 -1
- package/es/components/tag/Tag.d.ts +10 -3
- package/es/components/tag/Tag.js +10 -10
- package/es/components/tag/TagGroup.d.ts +2 -2
- package/es/components/tag/TagGroup.js +4 -5
- package/es/components/tag/style/dnb-tag.css +14 -14
- package/es/components/tag/style/dnb-tag.min.css +1 -1
- package/es/components/textarea/Textarea.js +4 -3
- package/es/components/timeline/Timeline.d.ts +2 -2
- package/es/components/timeline/Timeline.js +2 -3
- package/es/components/timeline/TimelineItem.js +2 -2
- package/es/components/toggle-button/ToggleButton.js +4 -2
- package/es/components/toggle-button/ToggleButtonGroup.js +3 -2
- package/es/components/toggle-button/style/dnb-toggle-button.css +14 -14
- package/es/components/toggle-button/style/dnb-toggle-button.min.css +1 -1
- package/es/components/tooltip/Tooltip.d.ts +8 -154
- package/es/components/tooltip/Tooltip.js +57 -122
- package/es/components/tooltip/TooltipContainer.d.ts +15 -68
- package/es/components/tooltip/TooltipContainer.js +162 -262
- package/es/components/tooltip/TooltipHelpers.d.ts +31 -1
- package/es/components/tooltip/TooltipHelpers.js +66 -1
- package/es/components/tooltip/TooltipPortal.d.ts +13 -31
- package/es/components/tooltip/TooltipPortal.js +122 -163
- package/es/components/tooltip/TooltipWithEvents.d.ts +11 -35
- package/es/components/tooltip/TooltipWithEvents.js +126 -150
- package/es/components/tooltip/style/_tooltip.scss +8 -7
- package/es/components/tooltip/style/dnb-tooltip.css +14 -14
- package/es/components/tooltip/style/dnb-tooltip.min.css +1 -1
- package/es/components/tooltip/types.d.ts +28 -0
- package/es/components/tooltip/types.js +1 -0
- package/es/components/visually-hidden/VisuallyHidden.d.ts +2 -3
- package/es/components/visually-hidden/VisuallyHidden.js +2 -10
- package/es/elements/Anchor.d.ts +5 -3
- package/es/elements/Anchor.js +4 -5
- package/es/elements/Dd.d.ts +10 -26
- package/es/elements/Dd.js +0 -15
- package/es/elements/Dl.d.ts +16 -26
- package/es/elements/Dl.js +27 -19
- package/es/elements/Dt.d.ts +10 -26
- package/es/elements/Dt.js +0 -15
- package/es/elements/Element.d.ts +4 -2
- package/es/elements/Element.js +2 -3
- package/es/elements/Li.d.ts +6 -26
- package/es/elements/Li.js +0 -15
- package/es/elements/Link.d.ts +3 -1
- package/es/elements/Ol.d.ts +20 -29
- package/es/elements/Ol.js +0 -21
- package/es/elements/Ul.d.ts +20 -30
- package/es/elements/Ul.js +0 -23
- package/es/elements/lib.d.ts +19 -8
- package/es/extensions/payment-card/PaymentCard.js +3 -3
- package/es/fragments/drawer-list/DrawerList.js +3 -2
- package/es/fragments/drawer-list/style/_drawer-list.scss +1 -1
- package/es/fragments/lib.d.ts +8 -1
- package/es/fragments/scroll-view/ScrollView.d.ts +14 -7
- package/es/fragments/scroll-view/ScrollView.js +30 -52
- package/es/icons/add.js +5 -2
- package/es/icons/add_circled.js +5 -2
- package/es/icons/add_circled_medium.js +5 -2
- package/es/icons/add_medium.js +5 -2
- package/es/icons/boat.js +10 -3
- package/es/icons/boat_medium.js +10 -3
- package/es/icons/calculator.js +10 -3
- package/es/icons/card.js +4 -2
- package/es/icons/card_medium.js +4 -2
- package/es/icons/cat_medium.js +10 -3
- package/es/icons/chatbot.js +5 -2
- package/es/icons/chatbot_medium.js +5 -2
- package/es/icons/chip.js +10 -3
- package/es/icons/chip_medium.js +10 -3
- package/es/icons/cloud_download.js +10 -3
- package/es/icons/cloud_download_medium.js +10 -3
- package/es/icons/cloud_rain.js +10 -3
- package/es/icons/cloud_rain_medium.js +10 -3
- package/es/icons/cloud_sync.js +10 -3
- package/es/icons/cloud_sync_medium.js +10 -3
- package/es/icons/cloud_transfer.js +10 -3
- package/es/icons/cloud_transfer_medium.js +10 -3
- package/es/icons/cloud_upload.js +10 -3
- package/es/icons/cloud_upload_medium.js +10 -3
- package/es/icons/cookie.js +10 -3
- package/es/icons/cookie_medium.js +10 -3
- package/es/icons/diamond.js +10 -3
- package/es/icons/dog.js +10 -3
- package/es/icons/dog_medium.js +10 -3
- package/es/icons/exclamation_circled.js +5 -2
- package/es/icons/exclamation_circled_medium.js +5 -2
- package/es/icons/file_jpg.d.ts +2 -0
- package/es/icons/file_jpg.js +18 -0
- package/es/icons/file_jpg_medium.d.ts +2 -0
- package/es/icons/file_jpg_medium.js +24 -0
- package/es/icons/file_png.d.ts +2 -0
- package/es/icons/file_png.js +18 -0
- package/es/icons/file_png_medium.d.ts +2 -0
- package/es/icons/file_png_medium.js +24 -0
- package/es/icons/fish.d.ts +2 -0
- package/es/icons/fish.js +26 -0
- package/es/icons/fish_medium.d.ts +2 -0
- package/es/icons/fish_medium.js +26 -0
- package/es/icons/hourglass.js +10 -3
- package/es/icons/icons-meta.json +71 -1
- package/es/icons/icons-pdf.lock +1098 -968
- package/es/icons/icons-svg.lock +1098 -968
- package/es/icons/index.d.ts +11 -1
- package/es/icons/index.js +11 -1
- package/es/icons/instagram.js +10 -3
- package/es/icons/linkedin.js +10 -3
- package/es/icons/linkedin_medium.js +10 -3
- package/es/icons/loupe.js +4 -2
- package/es/icons/loupe_medium.js +4 -2
- package/es/icons/mastercard_card.js +4 -2
- package/es/icons/mastercard_card_medium.js +4 -2
- package/es/icons/news.js +10 -3
- package/es/icons/news_medium.js +10 -3
- package/es/icons/newspaper.d.ts +2 -0
- package/es/icons/newspaper.js +21 -0
- package/es/icons/newspaper_medium.d.ts +2 -0
- package/es/icons/newspaper_medium.js +21 -0
- package/es/icons/phone.js +10 -3
- package/es/icons/phone_medium.js +10 -3
- package/es/icons/photo.js +10 -3
- package/es/icons/photo_medium.js +10 -3
- package/es/icons/pin.js +10 -3
- package/es/icons/pin_medium.js +10 -3
- package/es/icons/play.js +10 -3
- package/es/icons/savings_account.js +5 -2
- package/es/icons/secondary_icons.d.ts +6 -1
- package/es/icons/secondary_icons.js +6 -1
- package/es/icons/secondary_icons_medium.d.ts +6 -1
- package/es/icons/secondary_icons_medium.js +6 -1
- package/es/icons/sort.d.ts +2 -0
- package/es/icons/sort.js +21 -0
- package/es/icons/sort_medium.d.ts +2 -0
- package/es/icons/sort_medium.js +21 -0
- package/es/icons/subtract.js +5 -2
- package/es/icons/subtract_circled.js +5 -2
- package/es/icons/subtract_circled_medium.js +5 -2
- package/es/icons/subtract_medium.js +5 -2
- package/es/icons/tag.js +13 -10
- package/es/icons/tag_medium.js +13 -10
- package/es/icons/thumbs_down.js +10 -3
- package/es/icons/thumbs_up.js +10 -3
- package/es/icons/video.js +10 -3
- package/es/icons/video_medium.js +10 -3
- package/es/icons/wallet_medium.js +4 -2
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/shared/AnimateHeight.d.ts +46 -32
- package/es/shared/AnimateHeight.js +68 -38
- package/es/shared/Context.d.ts +9 -3
- package/es/shared/Eufemia.js +1 -1
- package/es/shared/MediaQueryUtils.d.ts +5 -1
- package/es/shared/MediaQueryUtils.js +4 -3
- package/es/shared/component-helper.d.ts +7 -18
- package/es/shared/component-helper.js +7 -167
- package/es/shared/helpers/EventEmitter.d.ts +46 -0
- package/es/shared/{EventEmitter.js → helpers/EventEmitter.js} +27 -21
- package/es/shared/helpers/InteractionInvalidation.d.ts +30 -0
- package/es/shared/helpers/InteractionInvalidation.js +141 -0
- package/{cjs/shared/hooks/usePropsWithContext.d.ts → es/shared/helpers/extendPropsWithContext.d.ts} +2 -3
- package/es/shared/{hooks/usePropsWithContext.js → helpers/extendPropsWithContext.js} +22 -10
- package/es/shared/helpers/filterValidProps.d.ts +1 -1
- package/es/shared/helpers/filterValidProps.js +1 -1
- package/es/shared/helpers/getPreviousSibling.d.ts +10 -0
- package/es/shared/helpers/getPreviousSibling.js +33 -0
- package/es/shared/helpers/useEventEmitter.d.ts +14 -0
- package/es/shared/helpers/useEventEmitter.js +30 -0
- package/es/shared/helpers.d.ts +2 -0
- package/es/shared/interfaces.d.ts +4 -23
- package/es/shared/interfaces.js +1 -1
- package/es/shared/locales/en-GB.d.ts +3 -0
- package/es/shared/locales/en-GB.js +3 -0
- package/es/shared/locales/en-US.d.ts +3 -0
- package/es/shared/locales/index.d.ts +6 -0
- package/es/shared/locales/nb-NO.d.ts +3 -0
- package/es/shared/locales/nb-NO.js +3 -0
- package/es/shared/types.d.ts +35 -0
- package/es/shared/types.js +1 -0
- package/es/shared/useMediaQuery.js +15 -4
- package/es/style/core/helper-classes/helper-classes.scss +4 -0
- package/es/style/dnb-ui-basis.css +3 -0
- package/es/style/dnb-ui-basis.min.css +1 -1
- package/es/style/dnb-ui-components.css +112 -84
- package/es/style/dnb-ui-components.min.css +5 -5
- package/es/style/dnb-ui-components.scss +1 -0
- package/es/style/dnb-ui-core.css +3 -0
- package/es/style/dnb-ui-core.min.css +1 -1
- package/es/style/dnb-ui-elements.css +25 -4
- package/es/style/dnb-ui-elements.min.css +1 -1
- package/es/style/dnb-ui-fragments.css +1 -1
- package/es/style/dnb-ui-fragments.min.css +1 -1
- package/es/style/dnb-ui-tags.css +50 -8
- package/es/style/dnb-ui-tags.min.css +1 -1
- package/es/style/elements/lists.scss +27 -5
- package/es/style/themes/theme-eiendom/dnb-theme-eiendom.css +129 -112
- package/es/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +5 -5
- package/es/style/themes/theme-ui/dnb-theme-ui.css +127 -110
- package/es/style/themes/theme-ui/dnb-theme-ui.min.css +5 -5
- package/esm/dnb-ui-basis.min.mjs +2 -2
- package/esm/dnb-ui-components.min.mjs +3 -3
- package/esm/dnb-ui-elements.min.mjs +4 -4
- 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/extensions/payment-card/PaymentCard.js +3 -3
- package/fragments/drawer-list/DrawerList.js +3 -2
- package/fragments/drawer-list/style/_drawer-list.scss +1 -1
- package/fragments/lib.d.ts +8 -1
- package/fragments/scroll-view/ScrollView.d.ts +14 -7
- package/fragments/scroll-view/ScrollView.js +31 -79
- package/icons/add.js +5 -2
- package/icons/add_circled.js +5 -2
- package/icons/add_circled_medium.js +5 -2
- package/icons/add_medium.js +5 -2
- package/icons/boat.js +10 -3
- package/icons/boat_medium.js +10 -3
- package/icons/calculator.js +10 -3
- package/icons/card.js +4 -2
- package/icons/card_medium.js +4 -2
- package/icons/cat_medium.js +10 -3
- package/icons/chatbot.js +5 -2
- package/icons/chatbot_medium.js +5 -2
- package/icons/chip.js +10 -3
- package/icons/chip_medium.js +10 -3
- package/icons/cloud_download.js +10 -3
- package/icons/cloud_download_medium.js +10 -3
- package/icons/cloud_rain.js +10 -3
- package/icons/cloud_rain_medium.js +10 -3
- package/icons/cloud_sync.js +10 -3
- package/icons/cloud_sync_medium.js +10 -3
- package/icons/cloud_transfer.js +10 -3
- package/icons/cloud_transfer_medium.js +10 -3
- package/icons/cloud_upload.js +10 -3
- package/icons/cloud_upload_medium.js +10 -3
- package/icons/cookie.js +10 -3
- package/icons/cookie_medium.js +10 -3
- package/icons/diamond.js +10 -3
- package/icons/dog.js +10 -3
- package/icons/dog_medium.js +10 -3
- package/icons/exclamation_circled.js +5 -2
- package/icons/exclamation_circled_medium.js +5 -2
- package/icons/file_jpg.d.ts +2 -0
- package/icons/file_jpg.js +20 -0
- package/icons/file_jpg_medium.d.ts +2 -0
- package/icons/file_jpg_medium.js +26 -0
- package/icons/file_png.d.ts +2 -0
- package/icons/file_png.js +20 -0
- package/icons/file_png_medium.d.ts +2 -0
- package/icons/file_png_medium.js +26 -0
- package/icons/fish.d.ts +2 -0
- package/icons/fish.js +28 -0
- package/icons/fish_medium.d.ts +2 -0
- package/icons/fish_medium.js +28 -0
- package/icons/hourglass.js +10 -3
- package/icons/icons-meta.json +71 -1
- package/icons/icons-pdf.lock +1098 -968
- package/icons/icons-svg.lock +1098 -968
- package/icons/index.d.ts +11 -1
- package/icons/index.js +11 -1
- package/icons/instagram.js +10 -3
- package/icons/linkedin.js +10 -3
- package/icons/linkedin_medium.js +10 -3
- package/icons/loupe.js +4 -2
- package/icons/loupe_medium.js +4 -2
- package/icons/mastercard_card.js +4 -2
- package/icons/mastercard_card_medium.js +4 -2
- package/icons/news.js +10 -3
- package/icons/news_medium.js +10 -3
- package/icons/newspaper.d.ts +2 -0
- package/icons/newspaper.js +23 -0
- package/icons/newspaper_medium.d.ts +2 -0
- package/icons/newspaper_medium.js +23 -0
- package/icons/phone.js +10 -3
- package/icons/phone_medium.js +10 -3
- package/icons/photo.js +10 -3
- package/icons/photo_medium.js +10 -3
- package/icons/pin.js +10 -3
- package/icons/pin_medium.js +10 -3
- package/icons/play.js +10 -3
- package/icons/savings_account.js +5 -2
- package/icons/secondary_icons.d.ts +6 -1
- package/icons/secondary_icons.js +6 -1
- package/icons/secondary_icons_medium.d.ts +6 -1
- package/icons/secondary_icons_medium.js +6 -1
- package/icons/sort.d.ts +2 -0
- package/icons/sort.js +23 -0
- package/icons/sort_medium.d.ts +2 -0
- package/icons/sort_medium.js +23 -0
- package/icons/subtract.js +5 -2
- package/icons/subtract_circled.js +5 -2
- package/icons/subtract_circled_medium.js +5 -2
- package/icons/subtract_medium.js +5 -2
- package/icons/tag.js +13 -10
- package/icons/tag_medium.js +13 -10
- package/icons/thumbs_down.js +10 -3
- package/icons/thumbs_up.js +10 -3
- package/icons/video.js +10 -3
- package/icons/video_medium.js +10 -3
- package/icons/wallet_medium.js +4 -2
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/package.json +1 -1
- package/shared/AnimateHeight.d.ts +46 -32
- package/shared/AnimateHeight.js +102 -66
- package/shared/Context.d.ts +9 -3
- package/shared/Eufemia.js +1 -1
- package/shared/MediaQueryUtils.d.ts +5 -1
- package/shared/MediaQueryUtils.js +5 -3
- package/shared/component-helper.d.ts +7 -18
- package/shared/component-helper.js +18 -248
- package/shared/helpers/EventEmitter.d.ts +46 -0
- package/shared/{EventEmitter.js → helpers/EventEmitter.js} +30 -25
- package/shared/helpers/InteractionInvalidation.d.ts +30 -0
- package/shared/helpers/InteractionInvalidation.js +215 -0
- package/{es/shared/hooks/usePropsWithContext.d.ts → shared/helpers/extendPropsWithContext.d.ts} +2 -3
- package/shared/{hooks/usePropsWithContext.js → helpers/extendPropsWithContext.js} +36 -17
- package/shared/helpers/filterValidProps.d.ts +1 -1
- package/shared/helpers/filterValidProps.js +1 -1
- package/shared/helpers/getPreviousSibling.d.ts +10 -0
- package/shared/helpers/getPreviousSibling.js +35 -0
- package/shared/helpers/useEventEmitter.d.ts +14 -0
- package/shared/helpers/useEventEmitter.js +45 -0
- package/shared/helpers.d.ts +2 -0
- package/shared/interfaces.d.ts +4 -23
- package/shared/interfaces.js +1 -1
- package/shared/locales/en-GB.d.ts +3 -0
- package/shared/locales/en-GB.js +3 -0
- package/shared/locales/en-US.d.ts +3 -0
- package/shared/locales/index.d.ts +6 -0
- package/shared/locales/nb-NO.d.ts +3 -0
- package/shared/locales/nb-NO.js +3 -0
- package/shared/types.d.ts +35 -0
- package/shared/types.js +1 -0
- package/shared/useMediaQuery.js +18 -13
- package/style/core/helper-classes/helper-classes.scss +4 -0
- package/style/dnb-ui-basis.css +3 -0
- package/style/dnb-ui-basis.min.css +1 -1
- package/style/dnb-ui-components.css +112 -84
- package/style/dnb-ui-components.min.css +5 -5
- package/style/dnb-ui-components.scss +1 -0
- package/style/dnb-ui-core.css +3 -0
- package/style/dnb-ui-core.min.css +1 -1
- package/style/dnb-ui-elements.css +25 -4
- package/style/dnb-ui-elements.min.css +1 -1
- package/style/dnb-ui-fragments.css +1 -1
- package/style/dnb-ui-fragments.min.css +1 -1
- package/style/dnb-ui-tags.css +50 -8
- package/style/dnb-ui-tags.min.css +1 -1
- package/style/elements/lists.scss +27 -5
- package/style/themes/theme-eiendom/dnb-theme-eiendom.css +129 -112
- package/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +5 -5
- package/style/themes/theme-ui/dnb-theme-ui.css +127 -110
- package/style/themes/theme-ui/dnb-theme-ui.min.css +5 -5
- package/umd/dnb-ui-basis.min.js +3 -3
- package/umd/dnb-ui-components.min.js +4 -4
- 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 +5 -5
- package/umd/dnb-ui-web-components.min.js +5 -5
- package/cjs/shared/EventEmitter.d.ts +0 -27
- package/cjs/shared/hooks/index.d.ts +0 -1
- package/cjs/shared/hooks/index.js +0 -13
- package/es/shared/EventEmitter.d.ts +0 -27
- package/es/shared/hooks/index.d.ts +0 -1
- package/es/shared/hooks/index.js +0 -1
- package/shared/EventEmitter.d.ts +0 -27
- package/shared/hooks/index.d.ts +0 -1
- package/shared/hooks/index.js +0 -1
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.symbol.description.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.object.to-string.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/es.array.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.string.iterator.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
16
|
+
|
|
17
|
+
require("core-js/modules/es.array.slice.js");
|
|
18
|
+
|
|
19
|
+
require("core-js/modules/es.function.name.js");
|
|
20
|
+
|
|
21
|
+
require("core-js/modules/es.array.from.js");
|
|
22
|
+
|
|
23
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
24
|
+
|
|
25
|
+
Object.defineProperty(exports, "__esModule", {
|
|
26
|
+
value: true
|
|
27
|
+
});
|
|
28
|
+
exports.useHeightAnimation = useHeightAnimation;
|
|
29
|
+
|
|
30
|
+
var _react = _interopRequireDefault(require("react"));
|
|
31
|
+
|
|
32
|
+
var _AnimateHeight = _interopRequireDefault(require("../../shared/AnimateHeight"));
|
|
33
|
+
|
|
34
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
39
|
+
|
|
40
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
41
|
+
|
|
42
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
43
|
+
|
|
44
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
function useHeightAnimation(targetRef) {
|
|
49
|
+
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
50
|
+
_ref$open = _ref.open,
|
|
51
|
+
open = _ref$open === void 0 ? null : _ref$open,
|
|
52
|
+
_ref$animate = _ref.animate,
|
|
53
|
+
animate = _ref$animate === void 0 ? true : _ref$animate,
|
|
54
|
+
_ref$children = _ref.children,
|
|
55
|
+
children = _ref$children === void 0 ? null : _ref$children,
|
|
56
|
+
_ref$onInit = _ref.onInit,
|
|
57
|
+
onInit = _ref$onInit === void 0 ? null : _ref$onInit,
|
|
58
|
+
_ref$onOpen = _ref.onOpen,
|
|
59
|
+
onOpen = _ref$onOpen === void 0 ? null : _ref$onOpen,
|
|
60
|
+
_ref$onAnimationEnd = _ref.onAnimationEnd,
|
|
61
|
+
onAnimationEnd = _ref$onAnimationEnd === void 0 ? null : _ref$onAnimationEnd;
|
|
62
|
+
|
|
63
|
+
var animRef = _react.default.useRef(null);
|
|
64
|
+
|
|
65
|
+
var _React$useState = _react.default.useState(open),
|
|
66
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
67
|
+
isOpen = _React$useState2[0],
|
|
68
|
+
setIsOpen = _React$useState2[1];
|
|
69
|
+
|
|
70
|
+
var _React$useState3 = _react.default.useState(false),
|
|
71
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
72
|
+
isVisible = _React$useState4[0],
|
|
73
|
+
setIsVisible = _React$useState4[1];
|
|
74
|
+
|
|
75
|
+
var _React$useState5 = _react.default.useState(false),
|
|
76
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
77
|
+
isAnimating = _React$useState6[0],
|
|
78
|
+
setIsAnimating = _React$useState6[1];
|
|
79
|
+
|
|
80
|
+
var _React$useState7 = _react.default.useState(open),
|
|
81
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
82
|
+
isVisibleParallax = _React$useState8[0],
|
|
83
|
+
setParallax = _React$useState8[1];
|
|
84
|
+
|
|
85
|
+
var _React$useState9 = _react.default.useState(true),
|
|
86
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
87
|
+
isInitialRender = _React$useState10[0],
|
|
88
|
+
setIsMounted = _React$useState10[1];
|
|
89
|
+
|
|
90
|
+
if (typeof global !== 'undefined' && global.IS_TEST) {
|
|
91
|
+
animate = false;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
_react.default.useEffect(function () {
|
|
95
|
+
return setIsMounted(false);
|
|
96
|
+
}, []);
|
|
97
|
+
|
|
98
|
+
_react.default.useLayoutEffect(function () {
|
|
99
|
+
animRef.current = new _AnimateHeight.default({
|
|
100
|
+
animate: animate
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
if (isInitialRender && onInit) {
|
|
104
|
+
onInit(animRef.current);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (isInitialRender && isOpen) {
|
|
108
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen(true);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (animate) {
|
|
112
|
+
animRef.current.onStart(function (state) {
|
|
113
|
+
switch (state) {
|
|
114
|
+
case 'opening':
|
|
115
|
+
setIsVisible(true);
|
|
116
|
+
setParallax(true);
|
|
117
|
+
setIsAnimating(true);
|
|
118
|
+
break;
|
|
119
|
+
|
|
120
|
+
case 'closing':
|
|
121
|
+
setParallax(false);
|
|
122
|
+
setIsAnimating(true);
|
|
123
|
+
break;
|
|
124
|
+
|
|
125
|
+
case 'adjusting':
|
|
126
|
+
setIsAnimating(true);
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
animRef.current.onEnd(function (state) {
|
|
131
|
+
switch (state) {
|
|
132
|
+
case 'opened':
|
|
133
|
+
setIsOpen(true);
|
|
134
|
+
setIsAnimating(false);
|
|
135
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen(true);
|
|
136
|
+
break;
|
|
137
|
+
|
|
138
|
+
case 'closed':
|
|
139
|
+
setIsVisible(false);
|
|
140
|
+
setIsOpen(false);
|
|
141
|
+
setParallax(false);
|
|
142
|
+
setIsAnimating(false);
|
|
143
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen(false);
|
|
144
|
+
break;
|
|
145
|
+
|
|
146
|
+
case 'adjusted':
|
|
147
|
+
setIsAnimating(false);
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
onAnimationEnd === null || onAnimationEnd === void 0 ? void 0 : onAnimationEnd(state);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return function () {
|
|
156
|
+
var _animRef$current;
|
|
157
|
+
|
|
158
|
+
return (_animRef$current = animRef.current) === null || _animRef$current === void 0 ? void 0 : _animRef$current.remove();
|
|
159
|
+
};
|
|
160
|
+
}, [animate]);
|
|
161
|
+
|
|
162
|
+
useOpenClose({
|
|
163
|
+
open: open,
|
|
164
|
+
animRef: animRef,
|
|
165
|
+
targetRef: targetRef,
|
|
166
|
+
isInitialRender: isInitialRender
|
|
167
|
+
});
|
|
168
|
+
useAdjust({
|
|
169
|
+
children: children,
|
|
170
|
+
animRef: animRef,
|
|
171
|
+
isInitialRender: isInitialRender
|
|
172
|
+
});
|
|
173
|
+
return {
|
|
174
|
+
open: open,
|
|
175
|
+
isOpen: isOpen,
|
|
176
|
+
isInDOM: open || isVisible,
|
|
177
|
+
isVisible: isVisible,
|
|
178
|
+
isVisibleParallax: isVisibleParallax,
|
|
179
|
+
isAnimating: isAnimating
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function useOpenClose(_ref2) {
|
|
184
|
+
var open = _ref2.open,
|
|
185
|
+
animRef = _ref2.animRef,
|
|
186
|
+
targetRef = _ref2.targetRef,
|
|
187
|
+
isInitialRender = _ref2.isInitialRender;
|
|
188
|
+
|
|
189
|
+
_react.default.useLayoutEffect(function () {
|
|
190
|
+
if (!targetRef.current) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
var anim = animRef.current;
|
|
195
|
+
anim.setElement(targetRef.current);
|
|
196
|
+
|
|
197
|
+
if (open) {
|
|
198
|
+
anim.open({
|
|
199
|
+
animate: !isInitialRender
|
|
200
|
+
});
|
|
201
|
+
} else if (anim.state === 'init') {
|
|
202
|
+
anim.close({
|
|
203
|
+
animate: false
|
|
204
|
+
});
|
|
205
|
+
} else {
|
|
206
|
+
anim.close();
|
|
207
|
+
}
|
|
208
|
+
}, [open, targetRef, animRef]);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function useAdjust(_ref3) {
|
|
212
|
+
var children = _ref3.children,
|
|
213
|
+
animRef = _ref3.animRef,
|
|
214
|
+
isInitialRender = _ref3.isInitialRender;
|
|
215
|
+
|
|
216
|
+
var fromHeight = _react.default.useRef(0);
|
|
217
|
+
|
|
218
|
+
var shouldAdjust = function shouldAdjust() {
|
|
219
|
+
var _animRef$current2;
|
|
220
|
+
|
|
221
|
+
switch ((_animRef$current2 = animRef.current) === null || _animRef$current2 === void 0 ? void 0 : _animRef$current2.state) {
|
|
222
|
+
case 'opened':
|
|
223
|
+
case 'adjusted':
|
|
224
|
+
case 'adjusting':
|
|
225
|
+
return !isInitialRender;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return false;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
_react.default.useMemo(function () {
|
|
232
|
+
if (shouldAdjust()) {
|
|
233
|
+
var _animRef$current3;
|
|
234
|
+
|
|
235
|
+
fromHeight.current = (_animRef$current3 = animRef.current) === null || _animRef$current3 === void 0 ? void 0 : _animRef$current3.getHeight();
|
|
236
|
+
}
|
|
237
|
+
}, [children]);
|
|
238
|
+
|
|
239
|
+
_react.default.useLayoutEffect(function () {
|
|
240
|
+
if (shouldAdjust()) {
|
|
241
|
+
animRef.current.elem.style.height = '';
|
|
242
|
+
animRef.current.adjustTo(fromHeight.current, animRef.current.getHeight());
|
|
243
|
+
}
|
|
244
|
+
}, [children]);
|
|
245
|
+
}
|
|
@@ -1,238 +1,12 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type HelpButtonText = string | React.ReactNode;
|
|
3
|
-
export type HelpButtonSize = 'default' | 'small' | 'medium' | 'large';
|
|
4
|
-
export type HelpButtonIconSize = string | number;
|
|
5
|
-
export type HelpButtonTooltip =
|
|
6
|
-
| string
|
|
7
|
-
| ((...args: any[]) => any)
|
|
8
|
-
| React.ReactNode;
|
|
9
|
-
export type HelpButtonStatus =
|
|
10
|
-
| string
|
|
11
|
-
| boolean
|
|
12
|
-
| ((...args: any[]) => any)
|
|
13
|
-
| React.ReactNode;
|
|
14
|
-
export type HelpButtonStatusNoAnimation = string | boolean;
|
|
15
|
-
export type HelpButtonTo = string | Object | ((...args: any[]) => any);
|
|
16
|
-
export type HelpButtonWrap = string | boolean;
|
|
17
|
-
export type HelpButtonBounding = string | boolean;
|
|
18
|
-
export type HelpButtonStretch = string | boolean;
|
|
19
|
-
export type HelpButtonSkeleton = string | boolean;
|
|
20
|
-
export type HelpButtonDisabled = string | boolean;
|
|
21
|
-
export type HelpButtonChildren =
|
|
22
|
-
| string
|
|
23
|
-
| ((...args: any[]) => any)
|
|
24
|
-
| React.ReactNode;
|
|
25
|
-
export type HelpButtonElement =
|
|
26
|
-
| ((...args: any[]) => any)
|
|
27
|
-
| Object
|
|
28
|
-
| React.ReactNode;
|
|
29
|
-
export type HelpButtonSpace =
|
|
30
|
-
| string
|
|
31
|
-
| number
|
|
32
|
-
| boolean
|
|
33
|
-
| {
|
|
34
|
-
/**
|
|
35
|
-
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. Will use `margin-top`.
|
|
36
|
-
*/
|
|
37
|
-
top?: string | number | boolean;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-right`.
|
|
41
|
-
*/
|
|
42
|
-
right?: string | number | boolean;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-bottom`.
|
|
46
|
-
*/
|
|
47
|
-
bottom?: string | number | boolean;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-left`.
|
|
51
|
-
*/
|
|
52
|
-
left?: string | number | boolean;
|
|
53
|
-
};
|
|
54
|
-
export type HelpButtonTop = string | number | boolean;
|
|
55
|
-
export type HelpButtonRight = string | number | boolean;
|
|
56
|
-
export type HelpButtonBottom = string | number | boolean;
|
|
57
|
-
export type HelpButtonLeft = string | number | boolean;
|
|
58
|
-
export type HelpButtonOnClick = string | ((...args: any[]) => any);
|
|
59
|
-
export type HelpButtonIcon =
|
|
60
|
-
| string
|
|
61
|
-
| React.ReactNode
|
|
62
|
-
| ((...args: any[]) => any);
|
|
63
|
-
export type HelpButtonIconPosition = 'left' | 'right';
|
|
64
|
-
|
|
65
1
|
/**
|
|
66
|
-
*
|
|
2
|
+
* Web HelpButton Component
|
|
3
|
+
*
|
|
67
4
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
*/
|
|
77
|
-
type?: string;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Title of the button. Optional, but should always be included because of accessibility.
|
|
81
|
-
*/
|
|
82
|
-
title?: React.ReactNode;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Defines the kind of button. Possible values are `primary`, `secondary`, `tertiary` and `signal`. Defaults to `primary`.
|
|
86
|
-
*/
|
|
87
|
-
variant?: any;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* The size of the button. For now there is "medium", "default" and "large".
|
|
91
|
-
*/
|
|
92
|
-
size?: HelpButtonSize;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Define icon width and height. Defaults to 16px
|
|
96
|
-
*/
|
|
97
|
-
icon_size?: HelpButtonIconSize;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Provide a string or a React Element to be shown as the tooltip content.
|
|
101
|
-
*/
|
|
102
|
-
tooltip?: HelpButtonTooltip;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Set it to either `status="error"` or a text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message.
|
|
106
|
-
*/
|
|
107
|
-
status?: HelpButtonStatus;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Defines the state of the status. Currently there are two statuses `[error, info]`. Defaults to `error`.
|
|
111
|
-
*/
|
|
112
|
-
status_state?: string;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Use an object to define additional FormStatus properties.
|
|
116
|
-
*/
|
|
117
|
-
status_props?: Object;
|
|
118
|
-
status_no_animation?: HelpButtonStatusNoAnimation;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* The `status_id` used for the target <a href="/uilib/components/global-status">GlobalStatus</a>.
|
|
122
|
-
*/
|
|
123
|
-
global_status_id?: string;
|
|
124
|
-
id?: string;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Any extra modifying class.
|
|
128
|
-
*/
|
|
129
|
-
class?: string;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* If you want the button to behave as a link. Use with caution! A link should normally visually be a link and not a button.
|
|
133
|
-
*/
|
|
134
|
-
href?: string;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Use this prop only if you are using a router Link component as the `element` that uses the `to` property to declare the navigation url.
|
|
138
|
-
*/
|
|
139
|
-
to?: HelpButtonTo;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* If you need to inject completely custom markup (React Element) into the button component. You have then to handle alignment and styling by yourself.
|
|
143
|
-
*/
|
|
144
|
-
custom_content?: React.ReactNode;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* If set to `true` the button text will wrap in to new lines if the overflow point is reached. Defaults to `false`.
|
|
148
|
-
*/
|
|
149
|
-
wrap?: HelpButtonWrap;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Set it to `true` in order to extend the bounding box (above the visual button background). You may also look into the HTML class `dnb-button__bounding` if it needs some CSS customization in order to get the particular button right for your use-case.
|
|
153
|
-
*/
|
|
154
|
-
bounding?: HelpButtonBounding;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Set it to `true` in order to stretch the button to the available space. Defaults to false.
|
|
158
|
-
*/
|
|
159
|
-
stretch?: HelpButtonStretch;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* If set to `true`, an overlaying skeleton with animation will be shown.
|
|
163
|
-
*/
|
|
164
|
-
skeleton?: HelpButtonSkeleton;
|
|
165
|
-
disabled?: HelpButtonDisabled;
|
|
166
|
-
inner_ref?: Object;
|
|
167
|
-
className?: string;
|
|
168
|
-
innerRef?: Object;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* The content of the button can be a string or a React Element.
|
|
172
|
-
*/
|
|
173
|
-
children?: HelpButtonChildren;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Only meant to be used for special use cases. Defaults to `button` or `a` depending if href is set or not.
|
|
177
|
-
*/
|
|
178
|
-
element?: HelpButtonElement;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Has to be an object with either: `top`, `right`, `bottom` or `left`. Use spacing values like: `small`, `1rem`, `1` or , `16px`.
|
|
182
|
-
*/
|
|
183
|
-
space?: HelpButtonSpace;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. Will use `margin-top`.
|
|
187
|
-
*/
|
|
188
|
-
top?: HelpButtonTop;
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-right`.
|
|
192
|
-
*/
|
|
193
|
-
right?: HelpButtonRight;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-bottom`.
|
|
197
|
-
*/
|
|
198
|
-
bottom?: HelpButtonBottom;
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-left`.
|
|
202
|
-
*/
|
|
203
|
-
left?: HelpButtonLeft;
|
|
204
|
-
custom_element?: Object;
|
|
205
|
-
custom_method?: (...args: any[]) => any;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Will be called on a click event. Returns an object with the native event: `{ event }`.
|
|
209
|
-
*/
|
|
210
|
-
on_click?: HelpButtonOnClick;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* To be included in the button. <a href="/icons/primary">Primary Icons</a> can be set as a string (e.g. `icon="chevron_right"`), other icons should be set as React elements.
|
|
214
|
-
*/
|
|
215
|
-
icon?: HelpButtonIcon;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Position of icon inside the button. Set to `left` or `right`. Tertiary button variant also supports `top`. Defaults to `right` if not set.
|
|
219
|
-
*/
|
|
220
|
-
icon_position?: HelpButtonIconPosition;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* The content which will appear when triggering the modal.
|
|
224
|
-
*/
|
|
225
|
-
modal_content?: React.ReactNode;
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Accepts all <a href="/uilib/components/modal/properties">Modal properties</a> as an object, if `children` is given.
|
|
229
|
-
*/
|
|
230
|
-
modal_props?: Object;
|
|
231
|
-
}
|
|
232
|
-
export default class HelpButton extends React.Component<
|
|
233
|
-
HelpButtonProps,
|
|
234
|
-
any
|
|
235
|
-
> {
|
|
236
|
-
static defaultProps: object;
|
|
237
|
-
render(): JSX.Element;
|
|
238
|
-
}
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { ButtonProps } from '../button/Button';
|
|
7
|
+
import { ModalProps } from '../modal/types';
|
|
8
|
+
export declare type HelpButtonProps = {
|
|
9
|
+
modal_content?: React.ReactNode;
|
|
10
|
+
modal_props?: ModalProps;
|
|
11
|
+
} & ButtonProps;
|
|
12
|
+
export default function HelpButton(localProps: HelpButtonProps): JSX.Element;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.get-prototype-of.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.object.to-string.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.reflect.construct.js");
|
|
10
|
-
|
|
11
3
|
require("core-js/modules/es.object.keys.js");
|
|
12
4
|
|
|
13
5
|
require("core-js/modules/es.array.index-of.js");
|
|
@@ -16,153 +8,68 @@ require("core-js/modules/es.symbol.js");
|
|
|
16
8
|
|
|
17
9
|
require("core-js/modules/es.object.assign.js");
|
|
18
10
|
|
|
19
|
-
require("core-js/modules/es.array.filter.js");
|
|
20
|
-
|
|
21
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
22
|
-
|
|
23
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
24
|
-
|
|
25
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
26
|
-
|
|
27
|
-
require("core-js/modules/es.symbol.description.js");
|
|
28
|
-
|
|
29
|
-
require("core-js/modules/es.symbol.iterator.js");
|
|
30
|
-
|
|
31
|
-
require("core-js/modules/es.array.iterator.js");
|
|
32
|
-
|
|
33
|
-
require("core-js/modules/es.string.iterator.js");
|
|
34
|
-
|
|
35
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
36
|
-
|
|
37
11
|
Object.defineProperty(exports, "__esModule", {
|
|
38
12
|
value: true
|
|
39
13
|
});
|
|
40
|
-
exports.default =
|
|
14
|
+
exports.default = HelpButton;
|
|
41
15
|
|
|
42
16
|
var _react = _interopRequireDefault(require("react"));
|
|
43
17
|
|
|
44
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
45
|
-
|
|
46
|
-
var _componentHelper = require("../../shared/component-helper");
|
|
47
|
-
|
|
48
18
|
var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
49
19
|
|
|
50
20
|
var _Modal = _interopRequireDefault(require("../modal/Modal"));
|
|
51
21
|
|
|
52
22
|
var _HelpButtonInstance = _interopRequireDefault(require("./HelpButtonInstance"));
|
|
53
23
|
|
|
54
|
-
var
|
|
24
|
+
var _componentHelper = require("../../shared/component-helper");
|
|
55
25
|
|
|
56
26
|
var _excluded = ["modal_content", "children", "modal_props"];
|
|
57
27
|
|
|
58
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
59
29
|
|
|
60
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
61
|
-
|
|
62
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
63
|
-
|
|
64
30
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
65
31
|
|
|
66
32
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
67
33
|
|
|
68
34
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
69
35
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
75
|
-
|
|
76
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
77
|
-
|
|
78
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
79
|
-
|
|
80
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
81
|
-
|
|
82
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
83
|
-
|
|
84
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
85
|
-
|
|
86
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
36
|
+
var defaultProps = {
|
|
37
|
+
variant: 'secondary',
|
|
38
|
+
icon_position: 'left'
|
|
39
|
+
};
|
|
87
40
|
|
|
88
|
-
function
|
|
41
|
+
function HelpButton(localProps) {
|
|
42
|
+
var getContent = function getContent(props) {
|
|
43
|
+
if (props.modal_content) {
|
|
44
|
+
return props.modal_content;
|
|
45
|
+
}
|
|
89
46
|
|
|
90
|
-
|
|
47
|
+
return typeof props.children === 'function' ? props.children(props) : props.children;
|
|
48
|
+
};
|
|
91
49
|
|
|
92
|
-
var
|
|
93
|
-
_inherits(HelpButton, _React$PureComponent);
|
|
50
|
+
var context = _react.default.useContext(_Context.default);
|
|
94
51
|
|
|
95
|
-
var
|
|
52
|
+
var props = (0, _componentHelper.extendPropsWithContext)(localProps, defaultProps);
|
|
53
|
+
var content = getContent(props);
|
|
96
54
|
|
|
97
|
-
|
|
98
|
-
|
|
55
|
+
var modal_content = props.modal_content,
|
|
56
|
+
children = props.children,
|
|
57
|
+
modal_props = props.modal_props,
|
|
58
|
+
params = _objectWithoutProperties(props, _excluded);
|
|
99
59
|
|
|
100
|
-
|
|
60
|
+
if (params.icon === null) {
|
|
61
|
+
params.icon = 'question';
|
|
101
62
|
}
|
|
102
63
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var _this$props = this.props,
|
|
107
|
-
modal_content = _this$props.modal_content,
|
|
108
|
-
children = _this$props.children,
|
|
109
|
-
modal_props = _this$props.modal_props,
|
|
110
|
-
params = _objectWithoutProperties(_this$props, _excluded);
|
|
111
|
-
|
|
112
|
-
var content = HelpButton.getContent(this.props);
|
|
113
|
-
|
|
114
|
-
if (params.icon === null) {
|
|
115
|
-
params.icon = 'question';
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (content) {
|
|
119
|
-
if (!params.title) {
|
|
120
|
-
params.title = this.context.getTranslation(this.props).HelpButton.title;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return _react.default.createElement(_Modal.default, _extends({
|
|
124
|
-
trigger_attributes: params
|
|
125
|
-
}, modal_props), content);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return _react.default.createElement(_HelpButtonInstance.default, params);
|
|
129
|
-
}
|
|
130
|
-
}], [{
|
|
131
|
-
key: "enableWebComponent",
|
|
132
|
-
value: function enableWebComponent() {
|
|
133
|
-
(0, _componentHelper.registerElement)(HelpButton === null || HelpButton === void 0 ? void 0 : HelpButton.tagName, HelpButton, HelpButton.defaultProps);
|
|
134
|
-
}
|
|
135
|
-
}, {
|
|
136
|
-
key: "getContent",
|
|
137
|
-
value: function getContent(props) {
|
|
138
|
-
if (props.modal_content) {
|
|
139
|
-
return props.modal_content;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return typeof props.children === 'function' ? props.children(props) : props.children;
|
|
64
|
+
if (content) {
|
|
65
|
+
if (!params.title) {
|
|
66
|
+
params.title = context.getTranslation(props).HelpButton.title;
|
|
143
67
|
}
|
|
144
|
-
}]);
|
|
145
|
-
|
|
146
|
-
return HelpButton;
|
|
147
|
-
}(_react.default.PureComponent);
|
|
148
|
-
|
|
149
|
-
exports.default = HelpButton;
|
|
150
68
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
_defineProperty(HelpButton, "defaultProps", {
|
|
156
|
-
variant: 'secondary',
|
|
157
|
-
icon: null,
|
|
158
|
-
icon_position: 'left',
|
|
159
|
-
modal_content: null,
|
|
160
|
-
modal_props: null
|
|
161
|
-
});
|
|
69
|
+
return _react.default.createElement(_Modal.default, _extends({
|
|
70
|
+
trigger_attributes: params
|
|
71
|
+
}, modal_props), content);
|
|
72
|
+
}
|
|
162
73
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
icon_position: _propTypes.default.oneOf(['left', 'right']),
|
|
166
|
-
modal_content: _propTypes.default.node,
|
|
167
|
-
modal_props: _propTypes.default.object
|
|
168
|
-
}) : void 0;
|
|
74
|
+
return _react.default.createElement(_HelpButtonInstance.default, params);
|
|
75
|
+
}
|