@dnb/eufemia 9.17.2 → 9.18.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 +14 -0
- package/cjs/components/Tag.d.ts +14 -0
- package/cjs/components/Tag.js +52 -0
- package/cjs/components/accordion/Accordion.d.ts +7 -7
- package/cjs/components/autocomplete/Autocomplete.d.ts +13 -13
- package/cjs/components/button/Button.d.ts +7 -7
- package/cjs/components/button/Button.js +6 -4
- package/cjs/components/checkbox/Checkbox.d.ts +3 -3
- package/cjs/components/date-picker/DatePicker.d.ts +14 -14
- package/cjs/components/date-picker/DatePickerAddon.d.ts +1 -1
- package/cjs/components/date-picker/DatePickerCalendar.d.ts +1 -1
- package/cjs/components/date-picker/DatePickerInput.d.ts +1 -1
- package/cjs/components/dropdown/Dropdown.d.ts +9 -9
- package/cjs/components/form-row/FormRow.d.ts +4 -4
- package/cjs/components/form-set/FormSet.d.ts +5 -5
- package/cjs/components/global-error/GlobalError.d.ts +1 -1
- package/cjs/components/global-status/GlobalStatus.d.ts +5 -5
- package/cjs/components/heading/Heading.d.ts +2 -2
- package/cjs/components/heading/HeadingProvider.d.ts +2 -2
- package/cjs/components/icon/Icon.d.ts +1 -1
- package/cjs/components/icon-primary/IconPrimary.d.ts +1 -1
- package/cjs/components/index.d.ts +2 -0
- package/cjs/components/index.js +8 -0
- package/cjs/components/input/Input.d.ts +9 -9
- package/cjs/components/input-masked/InputMasked.d.ts +11 -11
- package/cjs/components/input-masked/InputMasked.js +6 -3
- package/cjs/components/input-masked/InputMaskedHooks.js +26 -34
- package/cjs/components/input-masked/InputMaskedUtils.js +9 -20
- package/cjs/components/lib.js +9 -0
- package/cjs/components/modal/Modal.js +123 -271
- package/cjs/components/modal/ModalContent.js +145 -243
- package/cjs/components/modal/ModalRoot.js +194 -0
- package/cjs/components/modal/components/CloseButton.js +125 -0
- package/cjs/components/modal/components/ModalHeader.js +124 -0
- package/cjs/components/modal/{ModalHeader.js → components/ModalHeaderBar.js} +50 -162
- package/cjs/components/modal/{ModalInner.js → components/ModalInner.js} +11 -19
- package/cjs/components/modal/helpers.js +80 -0
- package/cjs/components/modal/types.js +1 -0
- package/cjs/components/number-format/NumberFormat.d.ts +8 -8
- package/cjs/components/pagination/Pagination.d.ts +30 -30
- package/cjs/components/pagination/PaginationProvider.d.ts +2 -2
- package/cjs/components/radio/Radio.d.ts +4 -4
- package/cjs/components/radio/RadioGroup.d.ts +3 -3
- package/cjs/components/section/Section.d.ts +3 -2
- package/cjs/components/skeleton/Skeleton.d.ts +2 -2
- package/cjs/components/slider/Slider.d.ts +4 -4
- package/cjs/components/step-indicator/StepIndicator.d.ts +5 -5
- package/cjs/components/step-indicator/StepIndicatorContext.d.ts +1 -1
- package/cjs/components/step-indicator/StepIndicatorItem.d.ts +2 -2
- package/cjs/components/step-indicator/StepIndicatorItem.js +1 -0
- package/cjs/components/step-indicator/StepIndicatorSidebar.d.ts +3 -3
- package/cjs/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -1
- package/cjs/components/switch/Switch.d.ts +5 -5
- package/cjs/components/tabs/Tabs.d.ts +4 -4
- package/cjs/components/tabs/TabsContentWrapper.d.ts +1 -1
- package/cjs/components/tag/Tag.js +97 -0
- package/cjs/components/tag/index.d.ts +8 -0
- package/cjs/components/tag/index.js +52 -0
- package/cjs/components/tag/style/_tag.scss +26 -0
- package/cjs/components/tag/style/dnb-tag.css +109 -0
- package/cjs/components/tag/style/dnb-tag.min.css +1 -0
- package/cjs/components/tag/style/dnb-tag.scss +12 -0
- package/cjs/components/tag/style/index.d.ts +6 -0
- package/cjs/components/tag/style/index.js +3 -0
- package/cjs/components/tag/style.js +3 -0
- package/cjs/components/textarea/Textarea.d.ts +4 -4
- package/cjs/components/toggle-button/ToggleButton.d.ts +6 -6
- package/cjs/components/toggle-button/ToggleButtonGroup.d.ts +3 -3
- package/cjs/components/tooltip/Tooltip.d.ts +5 -5
- package/cjs/components/tooltip/TooltipContainer.d.ts +3 -3
- package/cjs/components/tooltip/TooltipPortal.d.ts +1 -1
- package/cjs/components/tooltip/TooltipWithEvents.d.ts +1 -1
- package/cjs/fragments/scroll-view/ScrollView.js +7 -16
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +8 -0
- package/cjs/shared/Context.js +2 -1
- package/cjs/style/core/helper-classes/skip-link.scss +1 -1
- package/cjs/style/dnb-ui-components.css +40 -0
- package/cjs/style/dnb-ui-components.min.css +1 -1
- package/cjs/style/dnb-ui-components.scss +1 -0
- package/components/Tag.d.ts +14 -0
- package/components/Tag.js +3 -0
- package/components/accordion/Accordion.d.ts +7 -7
- package/components/autocomplete/Autocomplete.d.ts +13 -13
- package/components/button/Button.d.ts +7 -7
- package/components/button/Button.js +6 -4
- package/components/checkbox/Checkbox.d.ts +3 -3
- package/components/date-picker/DatePicker.d.ts +14 -14
- package/components/date-picker/DatePickerAddon.d.ts +1 -1
- package/components/date-picker/DatePickerCalendar.d.ts +1 -1
- package/components/date-picker/DatePickerInput.d.ts +1 -1
- package/components/dropdown/Dropdown.d.ts +9 -9
- package/components/form-row/FormRow.d.ts +4 -4
- package/components/form-set/FormSet.d.ts +5 -5
- package/components/global-error/GlobalError.d.ts +1 -1
- package/components/global-status/GlobalStatus.d.ts +5 -5
- package/components/heading/Heading.d.ts +2 -2
- package/components/heading/HeadingProvider.d.ts +2 -2
- package/components/icon/Icon.d.ts +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -1
- package/components/input/Input.d.ts +9 -9
- package/components/input-masked/InputMasked.d.ts +11 -11
- package/components/input-masked/InputMasked.js +6 -4
- package/components/input-masked/InputMaskedHooks.js +24 -28
- package/components/input-masked/InputMaskedUtils.js +9 -20
- package/components/lib.js +3 -1
- package/components/modal/Modal.js +112 -250
- package/components/modal/Modal.tsx +524 -0
- package/components/modal/ModalContent.js +137 -224
- package/components/modal/ModalContent.tsx +515 -0
- package/components/modal/ModalContext.tsx +10 -0
- package/components/modal/ModalRoot.js +145 -0
- package/components/modal/ModalRoot.tsx +131 -0
- package/components/modal/components/CloseButton.js +72 -0
- package/components/modal/components/CloseButton.tsx +56 -0
- package/components/modal/components/ModalHeader.js +70 -0
- package/components/modal/components/ModalHeader.tsx +79 -0
- package/components/modal/components/ModalHeaderBar.js +122 -0
- package/components/modal/components/ModalHeaderBar.tsx +118 -0
- package/components/modal/{ModalInner.js → components/ModalInner.js} +11 -17
- package/components/modal/components/ModalInner.tsx +45 -0
- package/components/modal/helpers.js +64 -0
- package/components/modal/helpers.ts +63 -0
- package/components/modal/types.js +1 -0
- package/{cjs/components/modal/Modal.d.ts → components/modal/types.ts} +124 -182
- package/components/number-format/NumberFormat.d.ts +8 -8
- package/components/pagination/Pagination.d.ts +30 -30
- package/components/pagination/PaginationProvider.d.ts +2 -2
- package/components/radio/Radio.d.ts +4 -4
- package/components/radio/RadioGroup.d.ts +3 -3
- package/components/section/Section.d.ts +3 -1
- package/components/skeleton/Skeleton.d.ts +2 -2
- package/components/slider/Slider.d.ts +4 -4
- package/components/step-indicator/StepIndicator.d.ts +5 -5
- package/components/step-indicator/StepIndicatorContext.d.ts +1 -1
- package/components/step-indicator/StepIndicatorItem.d.ts +2 -2
- package/components/step-indicator/StepIndicatorItem.js +1 -0
- package/components/step-indicator/StepIndicatorSidebar.d.ts +3 -3
- package/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -1
- package/components/switch/Switch.d.ts +5 -5
- package/components/tabs/Tabs.d.ts +4 -4
- package/components/tabs/TabsContentWrapper.d.ts +1 -1
- package/components/tag/Tag.js +63 -0
- package/components/tag/Tag.tsx +95 -0
- package/components/tag/index.d.ts +8 -0
- package/components/tag/index.js +3 -0
- package/components/tag/style/_tag.scss +26 -0
- package/components/tag/style/dnb-tag.css +109 -0
- package/components/tag/style/dnb-tag.min.css +1 -0
- package/components/tag/style/dnb-tag.scss +12 -0
- package/components/tag/style/index.d.ts +6 -0
- package/components/tag/style/index.js +1 -0
- package/components/tag/style.js +1 -0
- package/components/textarea/Textarea.d.ts +4 -4
- package/components/toggle-button/ToggleButton.d.ts +6 -6
- package/components/toggle-button/ToggleButtonGroup.d.ts +3 -3
- package/components/tooltip/Tooltip.d.ts +5 -5
- package/components/tooltip/TooltipContainer.d.ts +3 -3
- package/components/tooltip/TooltipPortal.d.ts +1 -1
- package/components/tooltip/TooltipWithEvents.d.ts +1 -1
- package/es/components/Tag.d.ts +14 -0
- package/es/components/Tag.js +3 -0
- package/es/components/accordion/Accordion.d.ts +7 -7
- package/es/components/autocomplete/Autocomplete.d.ts +13 -13
- package/es/components/button/Button.d.ts +7 -7
- package/es/components/button/Button.js +6 -4
- package/es/components/checkbox/Checkbox.d.ts +3 -3
- package/es/components/date-picker/DatePicker.d.ts +14 -14
- package/es/components/date-picker/DatePickerAddon.d.ts +1 -1
- package/es/components/date-picker/DatePickerCalendar.d.ts +1 -1
- package/es/components/date-picker/DatePickerInput.d.ts +1 -1
- package/es/components/dropdown/Dropdown.d.ts +9 -9
- package/es/components/form-row/FormRow.d.ts +4 -4
- package/es/components/form-set/FormSet.d.ts +5 -5
- package/es/components/global-error/GlobalError.d.ts +1 -1
- package/es/components/global-status/GlobalStatus.d.ts +5 -5
- package/es/components/heading/Heading.d.ts +2 -2
- package/es/components/heading/HeadingProvider.d.ts +2 -2
- package/es/components/icon/Icon.d.ts +1 -1
- package/es/components/icon-primary/IconPrimary.d.ts +1 -1
- package/es/components/index.d.ts +2 -0
- package/es/components/index.js +2 -1
- package/es/components/input/Input.d.ts +9 -9
- package/es/components/input-masked/InputMasked.d.ts +11 -11
- package/es/components/input-masked/InputMasked.js +6 -4
- package/es/components/input-masked/InputMaskedHooks.js +14 -18
- package/es/components/input-masked/InputMaskedUtils.js +7 -18
- package/es/components/lib.js +3 -1
- package/es/components/modal/Modal.js +97 -227
- package/es/components/modal/Modal.tsx +524 -0
- package/es/components/modal/ModalContent.js +95 -186
- package/es/components/modal/ModalContent.tsx +515 -0
- package/es/components/modal/ModalContext.tsx +10 -0
- package/es/components/modal/ModalRoot.js +108 -0
- package/es/components/modal/ModalRoot.tsx +131 -0
- package/es/components/modal/components/CloseButton.js +41 -0
- package/es/components/modal/components/CloseButton.tsx +56 -0
- package/es/components/modal/components/ModalHeader.js +40 -0
- package/es/components/modal/components/ModalHeader.tsx +79 -0
- package/es/components/modal/components/ModalHeaderBar.js +88 -0
- package/es/components/modal/components/ModalHeaderBar.tsx +118 -0
- package/es/components/modal/{ModalInner.js → components/ModalInner.js} +8 -18
- package/es/components/modal/components/ModalInner.tsx +45 -0
- package/es/components/modal/helpers.js +60 -0
- package/es/components/modal/helpers.ts +63 -0
- package/es/components/modal/types.js +1 -0
- package/es/components/modal/{Modal.d.ts → types.ts} +124 -182
- package/es/components/number-format/NumberFormat.d.ts +8 -8
- package/es/components/pagination/Pagination.d.ts +30 -30
- package/es/components/pagination/PaginationProvider.d.ts +2 -2
- package/es/components/radio/Radio.d.ts +4 -4
- package/es/components/radio/RadioGroup.d.ts +3 -3
- package/es/components/section/Section.d.ts +3 -2
- package/es/components/skeleton/Skeleton.d.ts +2 -2
- package/es/components/slider/Slider.d.ts +4 -4
- package/es/components/step-indicator/StepIndicator.d.ts +5 -5
- package/es/components/step-indicator/StepIndicatorContext.d.ts +1 -1
- package/es/components/step-indicator/StepIndicatorItem.d.ts +2 -2
- package/es/components/step-indicator/StepIndicatorItem.js +1 -0
- package/es/components/step-indicator/StepIndicatorSidebar.d.ts +3 -3
- package/es/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -1
- package/es/components/switch/Switch.d.ts +5 -5
- package/es/components/tabs/Tabs.d.ts +4 -4
- package/es/components/tabs/TabsContentWrapper.d.ts +1 -1
- package/es/components/tag/Tag.js +58 -0
- package/es/components/tag/Tag.tsx +95 -0
- package/es/components/tag/index.d.ts +8 -0
- package/es/components/tag/index.js +3 -0
- package/es/components/tag/style/_tag.scss +26 -0
- package/es/components/tag/style/dnb-tag.css +109 -0
- package/es/components/tag/style/dnb-tag.min.css +1 -0
- package/es/components/tag/style/dnb-tag.scss +12 -0
- package/es/components/tag/style/index.d.ts +6 -0
- package/es/components/tag/style/index.js +1 -0
- package/es/components/tag/style.js +1 -0
- package/es/components/textarea/Textarea.d.ts +4 -4
- package/es/components/toggle-button/ToggleButton.d.ts +6 -6
- package/es/components/toggle-button/ToggleButtonGroup.d.ts +3 -3
- package/es/components/tooltip/Tooltip.d.ts +5 -5
- package/es/components/tooltip/TooltipContainer.d.ts +3 -3
- package/es/components/tooltip/TooltipPortal.d.ts +1 -1
- package/es/components/tooltip/TooltipWithEvents.d.ts +1 -1
- package/es/fragments/scroll-view/ScrollView.js +7 -15
- package/es/fragments/scroll-view/ScrollView.tsx +92 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/shared/Context.js +2 -1
- package/es/style/core/helper-classes/skip-link.scss +1 -1
- package/es/style/dnb-ui-components.css +40 -0
- package/es/style/dnb-ui-components.min.css +1 -1
- package/es/style/dnb-ui-components.scss +1 -0
- package/esm/components/Tag.d.ts +14 -0
- package/esm/components/Tag.js +3 -0
- package/esm/components/accordion/Accordion.d.ts +7 -7
- package/esm/components/autocomplete/Autocomplete.d.ts +13 -13
- package/esm/components/button/Button.d.ts +7 -7
- package/esm/components/button/Button.js +6 -4
- package/esm/components/checkbox/Checkbox.d.ts +3 -3
- package/esm/components/date-picker/DatePicker.d.ts +14 -14
- package/esm/components/date-picker/DatePickerAddon.d.ts +1 -1
- package/esm/components/date-picker/DatePickerCalendar.d.ts +1 -1
- package/esm/components/date-picker/DatePickerInput.d.ts +1 -1
- package/esm/components/dropdown/Dropdown.d.ts +9 -9
- package/esm/components/form-row/FormRow.d.ts +4 -4
- package/esm/components/form-set/FormSet.d.ts +5 -5
- package/esm/components/global-error/GlobalError.d.ts +1 -1
- package/esm/components/global-status/GlobalStatus.d.ts +5 -5
- package/esm/components/heading/Heading.d.ts +2 -2
- package/esm/components/heading/HeadingProvider.d.ts +2 -2
- package/esm/components/icon/Icon.d.ts +1 -1
- package/esm/components/index.d.ts +2 -0
- package/esm/components/index.js +2 -1
- package/esm/components/input/Input.d.ts +9 -9
- package/esm/components/input-masked/InputMasked.d.ts +11 -11
- package/esm/components/input-masked/InputMasked.js +6 -4
- package/esm/components/input-masked/InputMaskedHooks.js +24 -28
- package/esm/components/input-masked/InputMaskedUtils.js +9 -20
- package/esm/components/lib.js +3 -1
- package/esm/components/modal/Modal.js +112 -250
- package/esm/components/modal/Modal.tsx +524 -0
- package/esm/components/modal/ModalContent.js +137 -224
- package/esm/components/modal/ModalContent.tsx +515 -0
- package/esm/components/modal/ModalContext.tsx +10 -0
- package/esm/components/modal/ModalRoot.js +145 -0
- package/esm/components/modal/ModalRoot.tsx +131 -0
- package/esm/components/modal/components/CloseButton.js +72 -0
- package/esm/components/modal/components/CloseButton.tsx +56 -0
- package/esm/components/modal/components/ModalHeader.js +70 -0
- package/esm/components/modal/components/ModalHeader.tsx +79 -0
- package/esm/components/modal/components/ModalHeaderBar.js +122 -0
- package/esm/components/modal/components/ModalHeaderBar.tsx +118 -0
- package/esm/components/modal/{ModalInner.js → components/ModalInner.js} +11 -17
- package/esm/components/modal/components/ModalInner.tsx +45 -0
- package/esm/components/modal/helpers.js +64 -0
- package/esm/components/modal/helpers.ts +63 -0
- package/esm/components/modal/types.js +1 -0
- package/esm/components/modal/{Modal.d.ts → types.ts} +124 -182
- package/esm/components/number-format/NumberFormat.d.ts +8 -8
- package/esm/components/pagination/Pagination.d.ts +30 -30
- package/esm/components/pagination/PaginationProvider.d.ts +2 -2
- package/esm/components/radio/Radio.d.ts +4 -4
- package/esm/components/radio/RadioGroup.d.ts +3 -3
- package/esm/components/section/Section.d.ts +3 -1
- package/esm/components/skeleton/Skeleton.d.ts +2 -2
- package/esm/components/slider/Slider.d.ts +4 -4
- package/esm/components/step-indicator/StepIndicator.d.ts +5 -5
- package/esm/components/step-indicator/StepIndicatorContext.d.ts +1 -1
- package/esm/components/step-indicator/StepIndicatorItem.d.ts +2 -2
- package/esm/components/step-indicator/StepIndicatorItem.js +1 -0
- package/esm/components/step-indicator/StepIndicatorSidebar.d.ts +3 -3
- package/esm/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -1
- package/esm/components/switch/Switch.d.ts +5 -5
- package/esm/components/tabs/Tabs.d.ts +4 -4
- package/esm/components/tabs/TabsContentWrapper.d.ts +1 -1
- package/esm/components/tag/Tag.js +63 -0
- package/esm/components/tag/Tag.tsx +95 -0
- package/esm/components/tag/index.d.ts +8 -0
- package/esm/components/tag/index.js +3 -0
- package/esm/components/tag/style/_tag.scss +26 -0
- package/esm/components/tag/style/dnb-tag.css +109 -0
- package/esm/components/tag/style/dnb-tag.min.css +1 -0
- package/esm/components/tag/style/dnb-tag.scss +12 -0
- package/esm/components/tag/style/index.d.ts +6 -0
- package/esm/components/tag/style/index.js +1 -0
- package/esm/components/tag/style.js +1 -0
- package/esm/components/textarea/Textarea.d.ts +4 -4
- package/esm/components/toggle-button/ToggleButton.d.ts +6 -6
- package/esm/components/toggle-button/ToggleButtonGroup.d.ts +3 -3
- package/esm/components/tooltip/Tooltip.d.ts +5 -5
- package/esm/components/tooltip/TooltipContainer.d.ts +3 -3
- package/esm/components/tooltip/TooltipPortal.d.ts +1 -1
- package/esm/components/tooltip/TooltipWithEvents.d.ts +1 -1
- package/esm/dnb-ui-components.min.mjs +1 -1
- package/esm/dnb-ui-elements.min.mjs +1 -1
- package/esm/dnb-ui-extensions.min.mjs +1 -1
- package/esm/dnb-ui-lib.min.mjs +2 -2
- package/esm/dnb-ui-web-components.min.mjs +2 -2
- package/esm/fragments/scroll-view/ScrollView.js +10 -16
- package/esm/fragments/scroll-view/ScrollView.tsx +92 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +2 -1
- package/esm/shared/Context.js +2 -1
- package/esm/style/core/helper-classes/skip-link.scss +1 -1
- package/esm/style/dnb-ui-components.css +40 -0
- package/esm/style/dnb-ui-components.min.css +1 -1
- package/esm/style/dnb-ui-components.scss +1 -0
- package/fragments/scroll-view/ScrollView.js +10 -16
- package/fragments/scroll-view/ScrollView.tsx +92 -0
- package/index.d.ts +2 -0
- package/index.js +2 -1
- package/package.json +1 -1
- package/shared/Context.js +2 -1
- package/style/core/helper-classes/skip-link.scss +1 -1
- package/style/dnb-ui-components.css +40 -0
- package/style/dnb-ui-components.min.css +1 -1
- package/style/dnb-ui-components.scss +1 -0
- package/umd/dnb-ui-components.min.js +5 -5
- package/umd/dnb-ui-elements.min.js +1 -1
- package/umd/dnb-ui-extensions.min.js +1 -1
- package/umd/dnb-ui-lib.min.js +4 -4
- package/umd/dnb-ui-web-components.min.js +2 -2
- package/cjs/components/modal/ModalContent.d.ts +0 -168
- package/cjs/components/modal/ModalHeader.d.ts +0 -73
- package/cjs/components/modal/ModalInner.d.ts +0 -20
- package/cjs/fragments/scroll-view/ScrollView.d.ts +0 -1
- package/components/modal/Modal.d.ts +0 -329
- package/components/modal/ModalContent.d.ts +0 -168
- package/components/modal/ModalHeader.d.ts +0 -73
- package/components/modal/ModalHeader.js +0 -224
- package/components/modal/ModalInner.d.ts +0 -20
- package/es/components/modal/ModalContent.d.ts +0 -168
- package/es/components/modal/ModalHeader.d.ts +0 -73
- package/es/components/modal/ModalHeader.js +0 -166
- package/es/components/modal/ModalInner.d.ts +0 -20
- package/es/fragments/scroll-view/ScrollView.d.ts +0 -1
- package/esm/components/modal/ModalContent.d.ts +0 -168
- package/esm/components/modal/ModalHeader.d.ts +0 -73
- package/esm/components/modal/ModalHeader.js +0 -224
- package/esm/components/modal/ModalInner.d.ts +0 -20
- package/esm/fragments/scroll-view/ScrollView.d.ts +0 -1
- package/fragments/scroll-view/ScrollView.d.ts +0 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.keys.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.array.index-of.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.symbol.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.array.filter.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/es.object.to-string.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
16
|
+
|
|
17
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
18
|
+
|
|
19
|
+
require("core-js/modules/es.object.assign.js");
|
|
20
|
+
|
|
21
|
+
Object.defineProperty(exports, "__esModule", {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
exports.defaultProps = exports.default = void 0;
|
|
25
|
+
|
|
26
|
+
var _react = _interopRequireDefault(require("react"));
|
|
27
|
+
|
|
28
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
29
|
+
|
|
30
|
+
var _SkeletonHelper = require("../skeleton/SkeletonHelper");
|
|
31
|
+
|
|
32
|
+
var _SpacingHelper = require("../space/SpacingHelper");
|
|
33
|
+
|
|
34
|
+
var _IconPrimary = _interopRequireDefault(require("../icon-primary/IconPrimary"));
|
|
35
|
+
|
|
36
|
+
var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
37
|
+
|
|
38
|
+
var _componentHelper = require("../../shared/component-helper");
|
|
39
|
+
|
|
40
|
+
var _excluded = ["className", "skeleton", "children", "icon", "text"];
|
|
41
|
+
|
|
42
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
|
+
|
|
44
|
+
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); }
|
|
45
|
+
|
|
46
|
+
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; }
|
|
47
|
+
|
|
48
|
+
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; }
|
|
49
|
+
|
|
50
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
51
|
+
|
|
52
|
+
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; }
|
|
53
|
+
|
|
54
|
+
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; }
|
|
55
|
+
|
|
56
|
+
var defaultProps = {
|
|
57
|
+
className: null,
|
|
58
|
+
skeleton: false,
|
|
59
|
+
text: null,
|
|
60
|
+
children: null,
|
|
61
|
+
icon: null
|
|
62
|
+
};
|
|
63
|
+
exports.defaultProps = defaultProps;
|
|
64
|
+
|
|
65
|
+
function Tag(localProps) {
|
|
66
|
+
var _context$translation;
|
|
67
|
+
|
|
68
|
+
var context = _react.default.useContext(_Context.default);
|
|
69
|
+
|
|
70
|
+
var _extendPropsWithConte = (0, _componentHelper.extendPropsWithContext)(_objectSpread(_objectSpread({}, defaultProps), localProps), defaultProps, context === null || context === void 0 ? void 0 : (_context$translation = context.translation) === null || _context$translation === void 0 ? void 0 : _context$translation.Tag, context === null || context === void 0 ? void 0 : context.Tag),
|
|
71
|
+
className = _extendPropsWithConte.className,
|
|
72
|
+
skeleton = _extendPropsWithConte.skeleton,
|
|
73
|
+
children = _extendPropsWithConte.children,
|
|
74
|
+
icon = _extendPropsWithConte.icon,
|
|
75
|
+
text = _extendPropsWithConte.text,
|
|
76
|
+
props = _objectWithoutProperties(_extendPropsWithConte, _excluded);
|
|
77
|
+
|
|
78
|
+
var skeletonClasses = (0, _SkeletonHelper.createSkeletonClass)('shape', skeleton, context);
|
|
79
|
+
var spacingClasses = (0, _SpacingHelper.createSpacingClasses)(props);
|
|
80
|
+
var content = text || children;
|
|
81
|
+
return _react.default.createElement("div", _extends({
|
|
82
|
+
className: (0, _classnames.default)('dnb-tag', skeletonClasses, spacingClasses, className),
|
|
83
|
+
"data-testid": "tag"
|
|
84
|
+
}, props), icon && _react.default.createElement("span", {
|
|
85
|
+
"data-testid": "tag-icon",
|
|
86
|
+
className: "dnb-tag__icon"
|
|
87
|
+
}, _react.default.createElement(_IconPrimary.default, {
|
|
88
|
+
icon: icon,
|
|
89
|
+
right: "x-small"
|
|
90
|
+
})), content && _react.default.createElement("span", {
|
|
91
|
+
"data-testid": "tag-text",
|
|
92
|
+
className: "dnb-tag__text"
|
|
93
|
+
}, content));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
var _default = Tag;
|
|
97
|
+
exports.default = _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
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.array.iterator.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.object.to-string.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.string.iterator.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/es.weak-map.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
18
|
+
|
|
19
|
+
require("core-js/modules/es.object.keys.js");
|
|
20
|
+
|
|
21
|
+
require("core-js/modules/es.symbol.js");
|
|
22
|
+
|
|
23
|
+
require("core-js/modules/es.symbol.description.js");
|
|
24
|
+
|
|
25
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
26
|
+
|
|
27
|
+
Object.defineProperty(exports, "__esModule", {
|
|
28
|
+
value: true
|
|
29
|
+
});
|
|
30
|
+
var _exportNames = {};
|
|
31
|
+
exports.default = void 0;
|
|
32
|
+
|
|
33
|
+
var _Tag = _interopRequireWildcard(require("./Tag"));
|
|
34
|
+
|
|
35
|
+
Object.keys(_Tag).forEach(function (key) {
|
|
36
|
+
if (key === "default" || key === "__esModule") return;
|
|
37
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
38
|
+
if (key in exports && exports[key] === _Tag[key]) return;
|
|
39
|
+
Object.defineProperty(exports, key, {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function get() {
|
|
42
|
+
return _Tag[key];
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
48
|
+
|
|
49
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
50
|
+
|
|
51
|
+
var _default = _Tag.default;
|
|
52
|
+
exports.default = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tag component
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--tag-border-radius: 2.5rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.dnb-tag {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
padding: var(--spacing-xx-small) var(--spacing-x-small);
|
|
16
|
+
font-size: var(--font-size-x-small);
|
|
17
|
+
background-color: var(--color-black-8);
|
|
18
|
+
border-radius: var(--tag-border-radius);
|
|
19
|
+
&__icon {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
&__text {
|
|
24
|
+
color: var(--color-black-80);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* DNB Tag
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* This file is only used to make components independent
|
|
7
|
+
* so that they can get imported individually, without the core styles
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
/*
|
|
11
|
+
* Utilities
|
|
12
|
+
*/
|
|
13
|
+
/*
|
|
14
|
+
* Scopes
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
/*
|
|
18
|
+
* Document Reset
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
.dnb-tag {
|
|
22
|
+
font-family: 'DNB', sans-serif;
|
|
23
|
+
font-family: var(--font-family-default);
|
|
24
|
+
font-weight: normal;
|
|
25
|
+
font-weight: var(--font-weight-basis);
|
|
26
|
+
font-size: 1rem;
|
|
27
|
+
font-size: var(--font-size-small);
|
|
28
|
+
font-style: normal;
|
|
29
|
+
line-height: 1.5rem;
|
|
30
|
+
line-height: var(--line-height-basis);
|
|
31
|
+
color: #333;
|
|
32
|
+
color: var(--color-black-80, #333);
|
|
33
|
+
-moz-osx-font-smoothing: grayscale;
|
|
34
|
+
-webkit-font-smoothing: antialiased;
|
|
35
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
36
|
+
/**
|
|
37
|
+
* Ensure consistency and use the same as HTML reset -> html {...}
|
|
38
|
+
* between base and code package
|
|
39
|
+
*/
|
|
40
|
+
-moz-tab-size: 4;
|
|
41
|
+
-o-tab-size: 4;
|
|
42
|
+
tab-size: 4;
|
|
43
|
+
-ms-text-size-adjust: 100%;
|
|
44
|
+
-webkit-text-size-adjust: 100%;
|
|
45
|
+
word-break: break-word;
|
|
46
|
+
/**
|
|
47
|
+
* 1. Remove repeating backgrounds in all browsers (opinionated).
|
|
48
|
+
* 2. Add border box sizing in all browsers (opinionated).
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* 1. Add text decoration inheritance in all browsers (opinionated).
|
|
52
|
+
* 2. Add vertical alignment inheritance in all browsers (opinionated).
|
|
53
|
+
*/
|
|
54
|
+
margin: 0;
|
|
55
|
+
padding: 0; }
|
|
56
|
+
.dnb-tag *,
|
|
57
|
+
.dnb-tag ::before,
|
|
58
|
+
.dnb-tag ::after {
|
|
59
|
+
background-repeat: no-repeat;
|
|
60
|
+
/* 1 */
|
|
61
|
+
-webkit-box-sizing: border-box;
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
/* 2 */ }
|
|
64
|
+
.dnb-tag ::before,
|
|
65
|
+
.dnb-tag ::after {
|
|
66
|
+
text-decoration: inherit;
|
|
67
|
+
/* 1 */
|
|
68
|
+
vertical-align: inherit;
|
|
69
|
+
/* 2 */ }
|
|
70
|
+
|
|
71
|
+
/*
|
|
72
|
+
* Tag component
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
:root {
|
|
76
|
+
--tag-border-radius: 2.5rem; }
|
|
77
|
+
|
|
78
|
+
.dnb-tag {
|
|
79
|
+
display: -webkit-inline-box;
|
|
80
|
+
display: -ms-inline-flexbox;
|
|
81
|
+
display: inline-flex;
|
|
82
|
+
-webkit-box-orient: horizontal;
|
|
83
|
+
-webkit-box-direction: normal;
|
|
84
|
+
-ms-flex-direction: row;
|
|
85
|
+
flex-direction: row;
|
|
86
|
+
-webkit-box-pack: center;
|
|
87
|
+
-ms-flex-pack: center;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
-webkit-box-align: center;
|
|
90
|
+
-ms-flex-align: center;
|
|
91
|
+
align-items: center;
|
|
92
|
+
padding: 0.25rem 0.5rem;
|
|
93
|
+
padding: var(--spacing-xx-small) var(--spacing-x-small);
|
|
94
|
+
font-size: 0.875rem;
|
|
95
|
+
font-size: var(--font-size-x-small);
|
|
96
|
+
background-color: #ebebeb;
|
|
97
|
+
background-color: var(--color-black-8);
|
|
98
|
+
border-radius: 2.5rem;
|
|
99
|
+
border-radius: var(--tag-border-radius); }
|
|
100
|
+
.dnb-tag__icon {
|
|
101
|
+
display: -webkit-box;
|
|
102
|
+
display: -ms-flexbox;
|
|
103
|
+
display: flex;
|
|
104
|
+
-webkit-box-align: center;
|
|
105
|
+
-ms-flex-align: center;
|
|
106
|
+
align-items: center; }
|
|
107
|
+
.dnb-tag__text {
|
|
108
|
+
color: #333;
|
|
109
|
+
color: var(--color-black-80); }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.dnb-tag{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;color:var(--color-black-80,#333);font-family:DNB,sans-serif;font-family:var(--font-family-default);font-size:1rem;font-size:var(--font-size-small);font-style:normal;font-weight:400;font-weight:var(--font-weight-basis);line-height:1.5rem;line-height:var(--line-height-basis);margin:0;padding:0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-break:break-word}.dnb-tag *,.dnb-tag :after,.dnb-tag :before{background-repeat:no-repeat;-webkit-box-sizing:border-box;box-sizing:border-box}.dnb-tag :after,.dnb-tag :before{text-decoration:inherit;vertical-align:inherit}:root{--tag-border-radius:2.5rem}.dnb-tag{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-box-pack:center;-ms-flex-pack:center;background-color:#ebebeb;background-color:var(--color-black-8);border-radius:2.5rem;border-radius:var(--tag-border-radius);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;font-size:.875rem;font-size:var(--font-size-x-small);justify-content:center;padding:.25rem .5rem;padding:var(--spacing-xx-small) var(--spacing-x-small)}.dnb-tag,.dnb-tag__icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dnb-tag__icon{display:-webkit-box;display:-ms-flexbox;display:flex}.dnb-tag__text{color:#333;color:var(--color-black-80)}
|
|
@@ -96,7 +96,7 @@ export interface TextareaProps extends React.HTMLProps<HTMLElement> {
|
|
|
96
96
|
textarea_state?: string;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
* Defines the state of the status. Currently there are two statuses `[error, info]`. Defaults to `error`.
|
|
99
|
+
* Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.
|
|
100
100
|
*/
|
|
101
101
|
status_state?: string;
|
|
102
102
|
|
|
@@ -154,7 +154,7 @@ export interface TextareaProps extends React.HTMLProps<HTMLElement> {
|
|
|
154
154
|
textarea_class?: string;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* Provide the Textarea element with any attributes by using an Object `textarea_attributes={{size:'2'}}` or a JSON Object `textarea_attributes='{"size":"2"}'`. "NB:" Keep in mind, that also every not listed component property will be
|
|
157
|
+
* Provide the Textarea element with any attributes by using an Object `textarea_attributes={{size:'2'}}` or a JSON Object `textarea_attributes='{"size":"2"}'`. "NB:" Keep in mind, that also every not listed component property will be sent along and set as a Textarea element attribute.
|
|
158
158
|
*/
|
|
159
159
|
textarea_attributes?: TextareaTextareaAttributes;
|
|
160
160
|
readOnly?: TextareaReadOnly;
|
|
@@ -162,7 +162,7 @@ export interface TextareaProps extends React.HTMLProps<HTMLElement> {
|
|
|
162
162
|
cols?: TextareaCols;
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
|
-
* By providing a React.ref we can get the
|
|
165
|
+
* By providing a React.ref we can get the internally used Textarea element (DOM). E.g. `inner_ref={myRef}` by using `React.createRef()` or `React.useRef()`.
|
|
166
166
|
*/
|
|
167
167
|
inner_ref?: TextareaInnerRef;
|
|
168
168
|
|
|
@@ -202,7 +202,7 @@ export interface TextareaProps extends React.HTMLProps<HTMLElement> {
|
|
|
202
202
|
on_change?: (...args: any[]) => any;
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
|
-
* Will be called on focus set by the user. Returns `{ value, event }`.
|
|
205
|
+
* Will be called on the focus set by the user. Returns `{ value, event }`.
|
|
206
206
|
*/
|
|
207
207
|
on_focus?: (...args: any[]) => any;
|
|
208
208
|
|
|
@@ -64,12 +64,12 @@ export type ToggleButtonChildren = string | ((...args: any[]) => any);
|
|
|
64
64
|
*/
|
|
65
65
|
export interface ToggleButtonProps extends React.HTMLProps<HTMLElement> {
|
|
66
66
|
/**
|
|
67
|
-
* The text
|
|
67
|
+
* The text shown in the ToggleButton.
|
|
68
68
|
*/
|
|
69
69
|
text?: string;
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* Use either the `label` property or provide custom one.
|
|
72
|
+
* Use either the `label` property or provide a custom one.
|
|
73
73
|
*/
|
|
74
74
|
label?: ToggleButtonLabel;
|
|
75
75
|
label_direction?: ToggleButtonLabelDirection;
|
|
@@ -81,7 +81,7 @@ export interface ToggleButtonProps extends React.HTMLProps<HTMLElement> {
|
|
|
81
81
|
title?: string;
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
* Determine whether the ToggleButton is checked or not.
|
|
84
|
+
* Determine whether the ToggleButton is checked or not. The default will be `false`.
|
|
85
85
|
*/
|
|
86
86
|
checked?: ToggleButtonChecked;
|
|
87
87
|
variant?: ToggleButtonVariant;
|
|
@@ -100,7 +100,7 @@ export interface ToggleButtonProps extends React.HTMLProps<HTMLElement> {
|
|
|
100
100
|
status?: ToggleButtonStatus;
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
* Defines the state of the status. Currently there are two statuses `[error, info]`. Defaults to `error`.
|
|
103
|
+
* Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.
|
|
104
104
|
*/
|
|
105
105
|
status_state?: string;
|
|
106
106
|
|
|
@@ -131,7 +131,7 @@ export interface ToggleButtonProps extends React.HTMLProps<HTMLElement> {
|
|
|
131
131
|
icon?: ToggleButtonIcon;
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
|
-
* Position of icon inside the toggle button. Set to `left` or `right`. Defaults to `right` if not set.
|
|
134
|
+
* Position of the icon inside the toggle button. Set to `left` or `right`. Defaults to `right` if not set.
|
|
135
135
|
*/
|
|
136
136
|
icon_position?: ToggleButtonIconPosition;
|
|
137
137
|
|
|
@@ -173,7 +173,7 @@ export interface ToggleButtonProps extends React.HTMLProps<HTMLElement> {
|
|
|
173
173
|
custom_method?: (...args: any[]) => any;
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
|
-
* Will be called on state changes made by the user. Returns
|
|
176
|
+
* Will be called on state changes made by the user. Returns a boolean and string `{ checked, value, event }`.
|
|
177
177
|
*/
|
|
178
178
|
on_change?: (...args: any[]) => any;
|
|
179
179
|
on_state_update?: (...args: any[]) => any;
|
|
@@ -65,7 +65,7 @@ export type ToggleButtonGroupChildren =
|
|
|
65
65
|
export interface ToggleButtonGroupProps
|
|
66
66
|
extends React.HTMLProps<HTMLElement> {
|
|
67
67
|
/**
|
|
68
|
-
* Use either the `label` property or provide custom one.
|
|
68
|
+
* Use either the `label` property or provide a custom one.
|
|
69
69
|
*/
|
|
70
70
|
label?: ToggleButtonGroupLabel;
|
|
71
71
|
label_direction?: ToggleButtonGroupLabelDirection;
|
|
@@ -94,7 +94,7 @@ export interface ToggleButtonGroupProps
|
|
|
94
94
|
status?: ToggleButtonGroupStatus;
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
|
-
* Defines the state of the status. Currently there are two statuses `[error, info]`. Defaults to `error`.
|
|
97
|
+
* Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.
|
|
98
98
|
*/
|
|
99
99
|
status_state?: string;
|
|
100
100
|
|
|
@@ -158,7 +158,7 @@ export interface ToggleButtonGroupProps
|
|
|
158
158
|
custom_method?: (...args: any[]) => any;
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
|
-
* Will be called on state changes made by the user. Returns
|
|
161
|
+
* Will be called on state changes made by the user. Returns a boolean and string `{ checked, value, event }`.
|
|
162
162
|
*/
|
|
163
163
|
on_change?: (...args: any[]) => any;
|
|
164
164
|
}
|
|
@@ -57,7 +57,7 @@ export interface TooltipProps extends React.HTMLProps<HTMLElement> {
|
|
|
57
57
|
id?: string;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
* If the tooltip should animate from one target to the next, define
|
|
60
|
+
* If the tooltip should animate from one target to the next, define a unique ID.
|
|
61
61
|
*/
|
|
62
62
|
group?: string;
|
|
63
63
|
|
|
@@ -72,7 +72,7 @@ export interface TooltipProps extends React.HTMLProps<HTMLElement> {
|
|
|
72
72
|
active?: TooltipActive;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
* Defines the offset position
|
|
75
|
+
* Defines the offset position to the target element the arrow appears. Can be `top`, `right`, `left` and `bottom`. Defaults to `top`.
|
|
76
76
|
*/
|
|
77
77
|
position?: TooltipPosition;
|
|
78
78
|
|
|
@@ -82,13 +82,13 @@ export interface TooltipProps extends React.HTMLProps<HTMLElement> {
|
|
|
82
82
|
arrow?: TooltipArrow;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* Defines the offset alignment
|
|
85
|
+
* Defines the offset alignment to the target element the arrow appears. Can be `center`, `right` and `left`.Defaults to `center`.
|
|
86
86
|
*/
|
|
87
87
|
align?: TooltipAlign;
|
|
88
88
|
animate_position?: TooltipAnimatePosition;
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* If set to `true`, the Tooltip will be fixed in
|
|
91
|
+
* If set to `true`, the Tooltip will be fixed in its scroll position by using CSS `position: fixed;`. Defaults to `false`.
|
|
92
92
|
*/
|
|
93
93
|
fixed_position?: TooltipFixedPosition;
|
|
94
94
|
|
|
@@ -98,7 +98,7 @@ export interface TooltipProps extends React.HTMLProps<HTMLElement> {
|
|
|
98
98
|
no_animation?: TooltipNoAnimation;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* Define the delay until the tooltip should show up after initial hover / active state.
|
|
101
|
+
* Define the delay until the tooltip should show up after the initial hover / active state.
|
|
102
102
|
*/
|
|
103
103
|
show_delay?: TooltipShowDelay;
|
|
104
104
|
|
|
@@ -28,7 +28,7 @@ export interface TooltipContainerProps
|
|
|
28
28
|
active?: TooltipContainerActive;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Defines the offset position
|
|
31
|
+
* Defines the offset position to the target element the arrow appears. Can be `top`, `right`, `left` and `bottom`. Defaults to `top`.
|
|
32
32
|
*/
|
|
33
33
|
position?: string;
|
|
34
34
|
|
|
@@ -38,13 +38,13 @@ export interface TooltipContainerProps
|
|
|
38
38
|
arrow?: string;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* Defines the offset alignment
|
|
41
|
+
* Defines the offset alignment to the target element the arrow appears. Can be `center`, `right` and `left`.Defaults to `center`.
|
|
42
42
|
*/
|
|
43
43
|
align?: string;
|
|
44
44
|
animate_position?: TooltipContainerAnimatePosition;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* If set to `true`, the Tooltip will be fixed in
|
|
47
|
+
* If set to `true`, the Tooltip will be fixed in its scroll position by using CSS `position: fixed;`. Defaults to `false`.
|
|
48
48
|
*/
|
|
49
49
|
fixed_position?: TooltipContainerFixedPosition;
|
|
50
50
|
|
|
@@ -15,7 +15,7 @@ export interface TooltipPortalProps extends React.HTMLProps<HTMLElement> {
|
|
|
15
15
|
active?: boolean;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* If the tooltip should animate from one target to the next, define
|
|
18
|
+
* If the tooltip should animate from one target to the next, define a unique ID.
|
|
19
19
|
*/
|
|
20
20
|
group?: string;
|
|
21
21
|
|
|
@@ -18,7 +18,7 @@ export interface TooltipWithEventsProps
|
|
|
18
18
|
internal_id?: string;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* Define the delay until the tooltip should show up after initial hover / active state.
|
|
21
|
+
* Define the delay until the tooltip should show up after the initial hover / active state.
|
|
22
22
|
*/
|
|
23
23
|
show_delay?: TooltipWithEventsShowDelay;
|
|
24
24
|
target?: TooltipWithEventsTarget;
|
|
@@ -41,8 +41,6 @@ exports.default = void 0;
|
|
|
41
41
|
|
|
42
42
|
var _react = _interopRequireDefault(require("react"));
|
|
43
43
|
|
|
44
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
45
|
-
|
|
46
44
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
47
45
|
|
|
48
46
|
var _componentHelper = require("../../shared/component-helper");
|
|
@@ -98,6 +96,9 @@ var ScrollView = function (_React$PureComponent) {
|
|
|
98
96
|
_classCallCheck(this, ScrollView);
|
|
99
97
|
|
|
100
98
|
_this = _super.call(this, props);
|
|
99
|
+
|
|
100
|
+
_defineProperty(_assertThisInitialized(_this), "ref", void 0);
|
|
101
|
+
|
|
101
102
|
_this.ref = props.innerRef || _react.default.createRef();
|
|
102
103
|
return _this;
|
|
103
104
|
}
|
|
@@ -107,9 +108,11 @@ var ScrollView = function (_React$PureComponent) {
|
|
|
107
108
|
value: function render() {
|
|
108
109
|
var props = (0, _componentHelper.extendPropsWithContext)(this.props, ScrollView.defaultProps, this.context.FormRow, this.context.ScrollView);
|
|
109
110
|
|
|
110
|
-
var className = props.className,
|
|
111
|
+
var _props$className = props.className,
|
|
112
|
+
className = _props$className === void 0 ? null : _props$className,
|
|
111
113
|
_className = props.class,
|
|
112
|
-
innerRef = props.innerRef,
|
|
114
|
+
_props$innerRef = props.innerRef,
|
|
115
|
+
innerRef = _props$innerRef === void 0 ? null : _props$innerRef,
|
|
113
116
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
114
117
|
|
|
115
118
|
var contentToRender = ScrollView.getContent(props);
|
|
@@ -124,11 +127,6 @@ var ScrollView = function (_React$PureComponent) {
|
|
|
124
127
|
}), contentToRender);
|
|
125
128
|
}
|
|
126
129
|
}], [{
|
|
127
|
-
key: "enableWebComponent",
|
|
128
|
-
value: function enableWebComponent() {
|
|
129
|
-
(0, _componentHelper.registerElement)(ScrollView.tagName, ScrollView, ScrollView.defaultProps);
|
|
130
|
-
}
|
|
131
|
-
}, {
|
|
132
130
|
key: "getContent",
|
|
133
131
|
value: function getContent(props) {
|
|
134
132
|
if (props.text) return props.text;
|
|
@@ -150,13 +148,6 @@ _defineProperty(ScrollView, "defaultProps", {
|
|
|
150
148
|
class: null
|
|
151
149
|
});
|
|
152
150
|
|
|
153
|
-
process.env.NODE_ENV !== "production" ? ScrollView.propTypes = _objectSpread(_objectSpread({}, _SpacingHelper.spacingPropTypes), {}, {
|
|
154
|
-
className: _propTypes.default.string,
|
|
155
|
-
children: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func, _propTypes.default.node]),
|
|
156
|
-
innerRef: _propTypes.default.object,
|
|
157
|
-
class: _propTypes.default.string
|
|
158
|
-
}) : void 0;
|
|
159
|
-
|
|
160
151
|
var _default = _react.default.forwardRef(function ScrollViewRef(props, ref) {
|
|
161
152
|
return _react.default.createElement(ScrollView, _extends({
|
|
162
153
|
innerRef: ref
|
package/cjs/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ import Space from './components/space/Space'
|
|
|
42
42
|
import StepIndicator from './components/step-indicator/StepIndicator'
|
|
43
43
|
import Switch from './components/switch/Switch'
|
|
44
44
|
import Tabs from './components/tabs/Tabs'
|
|
45
|
+
import Tag from './components/tag/Tag'
|
|
45
46
|
import Textarea from './components/textarea/Textarea'
|
|
46
47
|
import ToggleButton from './components/toggle-button/ToggleButton'
|
|
47
48
|
import Tooltip from './components/tooltip/Tooltip'
|
|
@@ -109,6 +110,7 @@ export {
|
|
|
109
110
|
StepIndicator,
|
|
110
111
|
Switch,
|
|
111
112
|
Tabs,
|
|
113
|
+
Tag,
|
|
112
114
|
Textarea,
|
|
113
115
|
ToggleButton,
|
|
114
116
|
Tooltip,
|
package/cjs/index.js
CHANGED
|
@@ -345,6 +345,12 @@ Object.defineProperty(exports, "Tabs", {
|
|
|
345
345
|
return _Tabs.default;
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
|
+
Object.defineProperty(exports, "Tag", {
|
|
349
|
+
enumerable: true,
|
|
350
|
+
get: function get() {
|
|
351
|
+
return _Tag.default;
|
|
352
|
+
}
|
|
353
|
+
});
|
|
348
354
|
Object.defineProperty(exports, "Td", {
|
|
349
355
|
enumerable: true,
|
|
350
356
|
get: function get() {
|
|
@@ -453,6 +459,8 @@ var _Switch = _interopRequireDefault(require("./components/switch/Switch"));
|
|
|
453
459
|
|
|
454
460
|
var _Tabs = _interopRequireDefault(require("./components/tabs/Tabs"));
|
|
455
461
|
|
|
462
|
+
var _Tag = _interopRequireDefault(require("./components/tag/Tag"));
|
|
463
|
+
|
|
456
464
|
var _Textarea = _interopRequireDefault(require("./components/textarea/Textarea"));
|
|
457
465
|
|
|
458
466
|
var _ToggleButton = _interopRequireDefault(require("./components/toggle-button/ToggleButton"));
|
package/cjs/shared/Context.js
CHANGED
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
// How to use the "skip-link"
|
|
86
|
-
// 1. Have this on the top of
|
|
86
|
+
// 1. Have this on the top of your app: <a class="dnb-skip-link dnb-button" href="#dnb-app-content">Skip to content</a>
|
|
87
87
|
// 2. Place this id="dnb-app-content" on Your main content container
|
|
88
88
|
.dnb-skip-link {
|
|
89
89
|
position: absolute;
|