@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
|
@@ -83,12 +83,12 @@ export interface PaginationProps extends React.HTMLProps<HTMLElement> {
|
|
|
83
83
|
debug?: boolean;
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* The page
|
|
86
|
+
* The page shown in the very beginning. If `current_page` is set, then it may not make too much sense to set this as well.
|
|
87
87
|
*/
|
|
88
88
|
startup_page?: PaginationStartupPage;
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* The page
|
|
91
|
+
* The page shown at the moment the component renders. Defaults to `1`.
|
|
92
92
|
*/
|
|
93
93
|
current_page?: PaginationCurrentPage;
|
|
94
94
|
|
|
@@ -98,17 +98,17 @@ export interface PaginationProps extends React.HTMLProps<HTMLElement> {
|
|
|
98
98
|
page_count?: PaginationPageCount;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* Defines how many `infinity` pages should be loaded /
|
|
101
|
+
* Defines how many `infinity` pages should be loaded / shown on the first render. Defaults to `1`.
|
|
102
102
|
*/
|
|
103
103
|
startup_count?: PaginationStartupCount;
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
|
-
* Defines how many `infinity` pages should be loaded /
|
|
106
|
+
* Defines how many `infinity` pages should be loaded / shown once the user scrolls down. Defaults to `1`.
|
|
107
107
|
*/
|
|
108
108
|
parallel_load_count?: PaginationParallelLoadCount;
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
|
-
* If set to `true`, the infinity marker will be placed before the content (on top off). This could potentially have negative side
|
|
111
|
+
* If set to `true`, the infinity marker will be placed before the content (on top off). This could potentially have negative side effects. But it depends really on the content if this would make more sense to use instead. Defaults to `false`.
|
|
112
112
|
*/
|
|
113
113
|
place_maker_before_content?: PaginationPlaceMakerBeforeContent;
|
|
114
114
|
|
|
@@ -164,7 +164,7 @@ export interface PaginationProps extends React.HTMLProps<HTMLElement> {
|
|
|
164
164
|
end_infinity_handler?: PaginationEndInfinityHandler;
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
|
-
* By default a `<div>` is used. Set it to
|
|
167
|
+
* By default a `<div>` is used. Set it to any element you have to use. Adds also a class: `dnb-pagination__page` shown.
|
|
168
168
|
*/
|
|
169
169
|
page_element?: PaginationPageElement;
|
|
170
170
|
|
|
@@ -184,7 +184,7 @@ export interface PaginationProps extends React.HTMLProps<HTMLElement> {
|
|
|
184
184
|
indicator_element?: PaginationIndicatorElement;
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
|
-
* Define the
|
|
187
|
+
* Define the alignment of the pagination button bar. Can be `center`, `left` or `right`. Defaults to `left`.
|
|
188
188
|
*/
|
|
189
189
|
align?: string;
|
|
190
190
|
|
|
@@ -251,17 +251,17 @@ export interface PaginationProps extends React.HTMLProps<HTMLElement> {
|
|
|
251
251
|
children?: PaginationChildren;
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
|
-
* Will be called for every page change, regardless if the mode is `mode="infinity"` or not. Returns an object with number of useful properties and methods.
|
|
254
|
+
* Will be called for every page change, regardless if the mode is `mode="infinity"` or not. Returns an object with number of useful properties and methods. See below for more details.
|
|
255
255
|
*/
|
|
256
256
|
on_change?: (...args: any[]) => any;
|
|
257
257
|
|
|
258
258
|
/**
|
|
259
|
-
* Only on "infinity" mode. Will be called once the component is ready for interaction. Returns an object with number of useful properties and methods.
|
|
259
|
+
* Only on "infinity" mode. Will be called once the component is ready for interaction. Returns an object with number of useful properties and methods. See below for more details. "NB:" Will be called again as soon as we reset the content by calling `resetContent()`.
|
|
260
260
|
*/
|
|
261
261
|
on_startup?: (...args: any[]) => any;
|
|
262
262
|
|
|
263
263
|
/**
|
|
264
|
-
* Only on "infinity" mode. Will be called on every page interaction, also on the very first interaction. Returns an object with number of useful properties and methods.
|
|
264
|
+
* Only on "infinity" mode. Will be called on every page interaction, also on the very first interaction. Returns an object with number of useful properties and methods. See below for more details.
|
|
265
265
|
*/
|
|
266
266
|
on_load?: (...args: any[]) => any;
|
|
267
267
|
|
|
@@ -361,12 +361,12 @@ export interface PaginationInstanceProps {
|
|
|
361
361
|
debug?: boolean;
|
|
362
362
|
|
|
363
363
|
/**
|
|
364
|
-
* The page
|
|
364
|
+
* The page shown in the very beginning. If `current_page` is set, then it may not make too much sense to set this as well.
|
|
365
365
|
*/
|
|
366
366
|
startup_page?: PaginationInstanceStartupPage;
|
|
367
367
|
|
|
368
368
|
/**
|
|
369
|
-
* The page
|
|
369
|
+
* The page shown at the moment the component renders. Defaults to `1`.
|
|
370
370
|
*/
|
|
371
371
|
current_page?: PaginationInstanceCurrentPage;
|
|
372
372
|
|
|
@@ -376,17 +376,17 @@ export interface PaginationInstanceProps {
|
|
|
376
376
|
page_count?: PaginationInstancePageCount;
|
|
377
377
|
|
|
378
378
|
/**
|
|
379
|
-
* Defines how many `infinity` pages should be loaded /
|
|
379
|
+
* Defines how many `infinity` pages should be loaded / shown on the first render. Defaults to `1`.
|
|
380
380
|
*/
|
|
381
381
|
startup_count?: PaginationInstanceStartupCount;
|
|
382
382
|
|
|
383
383
|
/**
|
|
384
|
-
* Defines how many `infinity` pages should be loaded /
|
|
384
|
+
* Defines how many `infinity` pages should be loaded / shown once the user scrolls down. Defaults to `1`.
|
|
385
385
|
*/
|
|
386
386
|
parallel_load_count?: PaginationInstanceParallelLoadCount;
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
|
-
* If set to `true`, the infinity marker will be placed before the content (on top off). This could potentially have negative side
|
|
389
|
+
* If set to `true`, the infinity marker will be placed before the content (on top off). This could potentially have negative side effects. But it depends really on the content if this would make more sense to use instead. Defaults to `false`.
|
|
390
390
|
*/
|
|
391
391
|
place_maker_before_content?: PaginationInstancePlaceMakerBeforeContent;
|
|
392
392
|
|
|
@@ -442,7 +442,7 @@ export interface PaginationInstanceProps {
|
|
|
442
442
|
end_infinity_handler?: PaginationInstanceEndInfinityHandler;
|
|
443
443
|
|
|
444
444
|
/**
|
|
445
|
-
* By default a `<div>` is used. Set it to
|
|
445
|
+
* By default a `<div>` is used. Set it to any element you have to use. Adds also a class: `dnb-pagination__page` shown.
|
|
446
446
|
*/
|
|
447
447
|
page_element?: PaginationInstancePageElement;
|
|
448
448
|
|
|
@@ -462,7 +462,7 @@ export interface PaginationInstanceProps {
|
|
|
462
462
|
indicator_element?: PaginationInstanceIndicatorElement;
|
|
463
463
|
|
|
464
464
|
/**
|
|
465
|
-
* Define the
|
|
465
|
+
* Define the alignment of the pagination button bar. Can be `center`, `left` or `right`. Defaults to `left`.
|
|
466
466
|
*/
|
|
467
467
|
align?: string;
|
|
468
468
|
|
|
@@ -529,17 +529,17 @@ export interface PaginationInstanceProps {
|
|
|
529
529
|
children?: PaginationInstanceChildren;
|
|
530
530
|
|
|
531
531
|
/**
|
|
532
|
-
* Will be called for every page change, regardless if the mode is `mode="infinity"` or not. Returns an object with number of useful properties and methods.
|
|
532
|
+
* Will be called for every page change, regardless if the mode is `mode="infinity"` or not. Returns an object with number of useful properties and methods. See below for more details.
|
|
533
533
|
*/
|
|
534
534
|
on_change?: (...args: any[]) => any;
|
|
535
535
|
|
|
536
536
|
/**
|
|
537
|
-
* Only on "infinity" mode. Will be called once the component is ready for interaction. Returns an object with number of useful properties and methods.
|
|
537
|
+
* Only on "infinity" mode. Will be called once the component is ready for interaction. Returns an object with number of useful properties and methods. See below for more details. "NB:" Will be called again as soon as we reset the content by calling `resetContent()`.
|
|
538
538
|
*/
|
|
539
539
|
on_startup?: (...args: any[]) => any;
|
|
540
540
|
|
|
541
541
|
/**
|
|
542
|
-
* Only on "infinity" mode. Will be called on every page interaction, also on the very first interaction. Returns an object with number of useful properties and methods.
|
|
542
|
+
* Only on "infinity" mode. Will be called on every page interaction, also on the very first interaction. Returns an object with number of useful properties and methods. See below for more details.
|
|
543
543
|
*/
|
|
544
544
|
on_load?: (...args: any[]) => any;
|
|
545
545
|
|
|
@@ -641,12 +641,12 @@ export interface InfinityMarkerProps {
|
|
|
641
641
|
debug?: boolean;
|
|
642
642
|
|
|
643
643
|
/**
|
|
644
|
-
* The page
|
|
644
|
+
* The page shown in the very beginning. If `current_page` is set, then it may not make too much sense to set this as well.
|
|
645
645
|
*/
|
|
646
646
|
startup_page?: InfinityMarkerStartupPage;
|
|
647
647
|
|
|
648
648
|
/**
|
|
649
|
-
* The page
|
|
649
|
+
* The page shown at the moment the component renders. Defaults to `1`.
|
|
650
650
|
*/
|
|
651
651
|
current_page?: InfinityMarkerCurrentPage;
|
|
652
652
|
|
|
@@ -656,17 +656,17 @@ export interface InfinityMarkerProps {
|
|
|
656
656
|
page_count?: InfinityMarkerPageCount;
|
|
657
657
|
|
|
658
658
|
/**
|
|
659
|
-
* Defines how many `infinity` pages should be loaded /
|
|
659
|
+
* Defines how many `infinity` pages should be loaded / shown on the first render. Defaults to `1`.
|
|
660
660
|
*/
|
|
661
661
|
startup_count?: InfinityMarkerStartupCount;
|
|
662
662
|
|
|
663
663
|
/**
|
|
664
|
-
* Defines how many `infinity` pages should be loaded /
|
|
664
|
+
* Defines how many `infinity` pages should be loaded / shown once the user scrolls down. Defaults to `1`.
|
|
665
665
|
*/
|
|
666
666
|
parallel_load_count?: InfinityMarkerParallelLoadCount;
|
|
667
667
|
|
|
668
668
|
/**
|
|
669
|
-
* If set to `true`, the infinity marker will be placed before the content (on top off). This could potentially have negative side
|
|
669
|
+
* If set to `true`, the infinity marker will be placed before the content (on top off). This could potentially have negative side effects. But it depends really on the content if this would make more sense to use instead. Defaults to `false`.
|
|
670
670
|
*/
|
|
671
671
|
place_maker_before_content?: InfinityMarkerPlaceMakerBeforeContent;
|
|
672
672
|
|
|
@@ -722,7 +722,7 @@ export interface InfinityMarkerProps {
|
|
|
722
722
|
end_infinity_handler?: InfinityMarkerEndInfinityHandler;
|
|
723
723
|
|
|
724
724
|
/**
|
|
725
|
-
* By default a `<div>` is used. Set it to
|
|
725
|
+
* By default a `<div>` is used. Set it to any element you have to use. Adds also a class: `dnb-pagination__page` shown.
|
|
726
726
|
*/
|
|
727
727
|
page_element?: InfinityMarkerPageElement;
|
|
728
728
|
|
|
@@ -742,7 +742,7 @@ export interface InfinityMarkerProps {
|
|
|
742
742
|
indicator_element?: InfinityMarkerIndicatorElement;
|
|
743
743
|
|
|
744
744
|
/**
|
|
745
|
-
* Define the
|
|
745
|
+
* Define the alignment of the pagination button bar. Can be `center`, `left` or `right`. Defaults to `left`.
|
|
746
746
|
*/
|
|
747
747
|
align?: string;
|
|
748
748
|
|
|
@@ -809,17 +809,17 @@ export interface InfinityMarkerProps {
|
|
|
809
809
|
children?: InfinityMarkerChildren;
|
|
810
810
|
|
|
811
811
|
/**
|
|
812
|
-
* Will be called for every page change, regardless if the mode is `mode="infinity"` or not. Returns an object with number of useful properties and methods.
|
|
812
|
+
* Will be called for every page change, regardless if the mode is `mode="infinity"` or not. Returns an object with number of useful properties and methods. See below for more details.
|
|
813
813
|
*/
|
|
814
814
|
on_change?: (...args: any[]) => any;
|
|
815
815
|
|
|
816
816
|
/**
|
|
817
|
-
* Only on "infinity" mode. Will be called once the component is ready for interaction. Returns an object with number of useful properties and methods.
|
|
817
|
+
* Only on "infinity" mode. Will be called once the component is ready for interaction. Returns an object with number of useful properties and methods. See below for more details. "NB:" Will be called again as soon as we reset the content by calling `resetContent()`.
|
|
818
818
|
*/
|
|
819
819
|
on_startup?: (...args: any[]) => any;
|
|
820
820
|
|
|
821
821
|
/**
|
|
822
|
-
* Only on "infinity" mode. Will be called on every page interaction, also on the very first interaction. Returns an object with number of useful properties and methods.
|
|
822
|
+
* Only on "infinity" mode. Will be called on every page interaction, also on the very first interaction. Returns an object with number of useful properties and methods. See below for more details.
|
|
823
823
|
*/
|
|
824
824
|
on_load?: (...args: any[]) => any;
|
|
825
825
|
|
|
@@ -35,12 +35,12 @@ export type PaginationProviderChildren =
|
|
|
35
35
|
export interface PaginationProviderProps
|
|
36
36
|
extends React.HTMLProps<HTMLElement> {
|
|
37
37
|
/**
|
|
38
|
-
* The page
|
|
38
|
+
* The page shown in the very beginning. If `current_page` is set, then it may not make too much sense to set this as well.
|
|
39
39
|
*/
|
|
40
40
|
startup_page?: PaginationProviderStartupPage;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* The page
|
|
43
|
+
* The page shown at the moment the component renders. Defaults to `1`.
|
|
44
44
|
*/
|
|
45
45
|
current_page?: PaginationProviderCurrentPage;
|
|
46
46
|
|
|
@@ -43,7 +43,7 @@ export type RadioChildren = string | ((...args: any[]) => any);
|
|
|
43
43
|
*/
|
|
44
44
|
export interface RadioProps extends React.HTMLProps<HTMLElement> {
|
|
45
45
|
/**
|
|
46
|
-
* Use either the `label` property or provide custom one.
|
|
46
|
+
* Use either the `label` property or provide a custom one.
|
|
47
47
|
*/
|
|
48
48
|
label?: RadioLabel;
|
|
49
49
|
label_sr_only?: RadioLabelSrOnly;
|
|
@@ -62,7 +62,7 @@ export interface RadioProps extends React.HTMLProps<HTMLElement> {
|
|
|
62
62
|
element?: React.ReactNode;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* Use a unique group identifier to define the Radio buttons
|
|
65
|
+
* Use a unique group identifier to define the Radio buttons that belongs together.
|
|
66
66
|
*/
|
|
67
67
|
group?: string;
|
|
68
68
|
|
|
@@ -77,7 +77,7 @@ export interface RadioProps extends React.HTMLProps<HTMLElement> {
|
|
|
77
77
|
status?: RadioStatus;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* Defines the state of the status. Currently there are two statuses `[error, info]`. Defaults to `error`.
|
|
80
|
+
* Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.
|
|
81
81
|
*/
|
|
82
82
|
status_state?: string;
|
|
83
83
|
|
|
@@ -112,7 +112,7 @@ export interface RadioProps extends React.HTMLProps<HTMLElement> {
|
|
|
112
112
|
custom_method?: (...args: any[]) => any;
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
* Will be called on state changes made by the user. Returns
|
|
115
|
+
* Will be called on state changes made by the user. Returns a boolean and string `{ checked, value, event }`.
|
|
116
116
|
*/
|
|
117
117
|
on_change?: (...args: any[]) => any;
|
|
118
118
|
on_state_update?: (...args: any[]) => any;
|
|
@@ -47,7 +47,7 @@ export type RadioGroupChildren =
|
|
|
47
47
|
*/
|
|
48
48
|
export interface RadioGroupProps extends React.HTMLProps<HTMLElement> {
|
|
49
49
|
/**
|
|
50
|
-
* Use either the `label` property or provide custom one.
|
|
50
|
+
* Use either the `label` property or provide a custom one.
|
|
51
51
|
*/
|
|
52
52
|
label?: RadioGroupLabel;
|
|
53
53
|
label_direction?: RadioGroupLabelDirection;
|
|
@@ -75,7 +75,7 @@ export interface RadioGroupProps extends React.HTMLProps<HTMLElement> {
|
|
|
75
75
|
status?: RadioGroupStatus;
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
|
-
* Defines the state of the status. Currently there are two statuses `[error, info]`. Defaults to `error`.
|
|
78
|
+
* Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.
|
|
79
79
|
*/
|
|
80
80
|
status_state?: string;
|
|
81
81
|
|
|
@@ -110,7 +110,7 @@ export interface RadioGroupProps extends React.HTMLProps<HTMLElement> {
|
|
|
110
110
|
custom_method?: (...args: any[]) => any;
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
* Will be called on state changes made by the user. Returns
|
|
113
|
+
* Will be called on state changes made by the user. Returns a boolean and string `{ checked, value, event }`.
|
|
114
114
|
*/
|
|
115
115
|
on_change?: (...args: any[]) => any;
|
|
116
116
|
}
|
|
@@ -33,10 +33,10 @@ export type SectionChildren =
|
|
|
33
33
|
| string
|
|
34
34
|
| ((...args: any[]) => any)
|
|
35
35
|
| React.ReactNode;
|
|
36
|
-
|
|
37
36
|
/**
|
|
38
37
|
* NB: Do not change the docs (comments) in here. The docs are updated during build time by "generateTypes.js" and "fetchPropertiesFromDocs.js".
|
|
39
38
|
*/
|
|
39
|
+
|
|
40
40
|
export interface SectionProps extends React.HTMLProps<HTMLElement> {
|
|
41
41
|
/**
|
|
42
42
|
* To define the style of the visual helper. Use and `Style ID` from below. Defaults to `mint-green-12`.
|
|
@@ -52,7 +52,7 @@ export interface SectionProps extends React.HTMLProps<HTMLElement> {
|
|
|
52
52
|
* Define what HTML element should be used. Defaults to `<section>`.
|
|
53
53
|
*/
|
|
54
54
|
element?: string;
|
|
55
|
-
inner_ref?:
|
|
55
|
+
inner_ref?: React.RefObject<any>;
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* Has to be an object with either: `top`, `right`, `bottom` or `left`. Use spacing values like: `small`, `1rem`, `1` or , `16px`.
|
|
@@ -81,6 +81,7 @@ export interface SectionProps extends React.HTMLProps<HTMLElement> {
|
|
|
81
81
|
class?: string;
|
|
82
82
|
className?: string;
|
|
83
83
|
children?: SectionChildren;
|
|
84
|
+
[x: string]: any;
|
|
84
85
|
}
|
|
85
86
|
export default class Section extends React.Component<SectionProps, any> {
|
|
86
87
|
static defaultProps: object;
|
|
@@ -45,7 +45,7 @@ export type SkeletonChildren =
|
|
|
45
45
|
*/
|
|
46
46
|
export interface SkeletonProps extends React.HTMLProps<HTMLElement> {
|
|
47
47
|
/**
|
|
48
|
-
* Use `true` to enable/show the skeleton for
|
|
48
|
+
* Use `true` to enable/show the skeleton for the component used inside. Defaults to `false`.
|
|
49
49
|
*/
|
|
50
50
|
show?: SkeletonShow;
|
|
51
51
|
|
|
@@ -65,7 +65,7 @@ export interface SkeletonProps extends React.HTMLProps<HTMLElement> {
|
|
|
65
65
|
figure?: SkeletonFigure;
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* Set
|
|
68
|
+
* Set any HTML element type you have to use. A couple of aria attributes will be set on this element while active. Defaults to `div`
|
|
69
69
|
*/
|
|
70
70
|
element?: React.ReactNode;
|
|
71
71
|
|
|
@@ -85,7 +85,7 @@ export interface SliderProps extends React.HTMLProps<HTMLElement> {
|
|
|
85
85
|
status?: SliderStatus;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* Defines the state of the status. Currently there are two statuses `[error, info]`. Defaults to `error`.
|
|
88
|
+
* Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.
|
|
89
89
|
*/
|
|
90
90
|
status_state?: string;
|
|
91
91
|
|
|
@@ -106,17 +106,17 @@ export interface SliderProps extends React.HTMLProps<HTMLElement> {
|
|
|
106
106
|
suffix?: SliderSuffix;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* Give the slider thump button a title for accessibility
|
|
109
|
+
* Give the slider thump button a title for accessibility reasons. Defaults to `null`.
|
|
110
110
|
*/
|
|
111
111
|
thump_title?: string;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* Give the add button a title for accessibility
|
|
114
|
+
* Give the add button a title for accessibility reasons. Defaults to `+`.
|
|
115
115
|
*/
|
|
116
116
|
add_title?: string;
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
* Give the subtract button a title for accessibility
|
|
119
|
+
* Give the subtract button a title for accessibility reasons. Defaults to `−`.
|
|
120
120
|
*/
|
|
121
121
|
subtract_title?: string;
|
|
122
122
|
|
|
@@ -13,7 +13,7 @@ export type StepIndicatorData =
|
|
|
13
13
|
status_state?: 'warn' | 'info' | 'error';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* Will be called once the
|
|
16
|
+
* Will be called once the user clicks on the current or another step. Will be emitted on every click. Returns an object `{ event, item, current_step }`.
|
|
17
17
|
*/
|
|
18
18
|
on_click?: (...args: any[]) => any;
|
|
19
19
|
on_render?: (...args: any[]) => any;
|
|
@@ -70,7 +70,7 @@ export type StepIndicatorChildren =
|
|
|
70
70
|
*/
|
|
71
71
|
export interface StepIndicatorProps extends React.HTMLProps<HTMLElement> {
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* A unique string-based ID in order to bind together the main component and the sidebar (`<StepIndicator.Sidebar />`). Both have to get the same ID.
|
|
74
74
|
*/
|
|
75
75
|
sidebar_id?: string;
|
|
76
76
|
|
|
@@ -80,7 +80,7 @@ export interface StepIndicatorProps extends React.HTMLProps<HTMLElement> {
|
|
|
80
80
|
mode?: StepIndicatorMode;
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
|
-
* Defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See parameters and example above.
|
|
83
|
+
* Defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See parameters and the example above.
|
|
84
84
|
*/
|
|
85
85
|
data?: StepIndicatorData;
|
|
86
86
|
title: StepIndicatorTitle;
|
|
@@ -91,7 +91,7 @@ export interface StepIndicatorProps extends React.HTMLProps<HTMLElement> {
|
|
|
91
91
|
status_state?: StepIndicatorStatusState;
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* Will be called once the
|
|
94
|
+
* Will be called once the user clicks on the current or another step. Will be emitted on every click. Returns an object `{ event, item, current_step }`.
|
|
95
95
|
*/
|
|
96
96
|
on_click?: (...args: any[]) => any;
|
|
97
97
|
on_render?: (...args: any[]) => any;
|
|
@@ -156,7 +156,7 @@ export interface StepIndicatorProps extends React.HTMLProps<HTMLElement> {
|
|
|
156
156
|
children?: StepIndicatorChildren;
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
|
-
* Will be called once the
|
|
159
|
+
* Will be called once the user visits actively a new step. Will be emitted only once. Returns an object `{ event, item, current_step }`.
|
|
160
160
|
*/
|
|
161
161
|
on_change?: (...args: any[]) => any;
|
|
162
162
|
}
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
*/
|
|
6
6
|
export interface StepIndicatorProviderProps {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* A unique string-based ID in order to bind together the main component and the sidebar (`<StepIndicator.Sidebar />`). Both have to get the same ID.
|
|
9
9
|
*/
|
|
10
10
|
sidebar_id: string;
|
|
11
11
|
children: React.ReactNode;
|
|
@@ -29,13 +29,13 @@ export interface StepIndicatorItemProps
|
|
|
29
29
|
on_item_render?: (...args: any[]) => any;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Will be called once the
|
|
32
|
+
* Will be called once the user visits actively a new step. Will be emitted only once. Returns an object `{ event, item, current_step }`.
|
|
33
33
|
*/
|
|
34
34
|
on_change?: (...args: any[]) => any;
|
|
35
35
|
on_render?: (...args: any[]) => any;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* Will be called once the
|
|
38
|
+
* Will be called once the user clicks on the current or another step. Will be emitted on every click. Returns an object `{ event, item, current_step }`.
|
|
39
39
|
*/
|
|
40
40
|
on_click?: (...args: any[]) => any;
|
|
41
41
|
is_current?: boolean;
|
|
@@ -13,7 +13,7 @@ export type StepIndicatorSidebarData =
|
|
|
13
13
|
status_state?: 'warn' | 'info' | 'error';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* Will be called once the
|
|
16
|
+
* Will be called once the user clicks on the current or another step. Will be emitted on every click. Returns an object `{ event, item, current_step }`.
|
|
17
17
|
*/
|
|
18
18
|
on_click?: (...args: any[]) => any;
|
|
19
19
|
on_render?: (...args: any[]) => any;
|
|
@@ -29,7 +29,7 @@ export type StepIndicatorSidebarData =
|
|
|
29
29
|
export interface StepIndicatorSidebarProps
|
|
30
30
|
extends React.HTMLProps<HTMLElement> {
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* A unique string-based ID in order to bind together the main component and the sidebar (`<StepIndicator.Sidebar />`). Both have to get the same ID.
|
|
33
33
|
*/
|
|
34
34
|
sidebar_id: string;
|
|
35
35
|
|
|
@@ -44,7 +44,7 @@ export interface StepIndicatorSidebarProps
|
|
|
44
44
|
current_step?: StepIndicatorSidebarCurrentStep;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* Defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See parameters and example above.
|
|
47
|
+
* Defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See parameters and the example above.
|
|
48
48
|
*/
|
|
49
49
|
data?: StepIndicatorSidebarData;
|
|
50
50
|
internalId?: string;
|
|
@@ -6,7 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
export interface StepIndicatorTriggerButtonProps
|
|
7
7
|
extends React.HTMLProps<HTMLElement> {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* A unique string-based ID in order to bind together the main component and the sidebar (`<StepIndicator.Sidebar />`). Both have to get the same ID.
|
|
10
10
|
*/
|
|
11
11
|
sidebar_id?: string;
|
|
12
12
|
className?: string;
|
|
@@ -57,7 +57,7 @@ export type SwitchChildren = string | ((...args: any[]) => any);
|
|
|
57
57
|
*/
|
|
58
58
|
export interface SwitchProps extends React.HTMLProps<HTMLElement> {
|
|
59
59
|
/**
|
|
60
|
-
* Use either the `label` property or provide custom one.
|
|
60
|
+
* Use either the `label` property or provide a custom one.
|
|
61
61
|
*/
|
|
62
62
|
label?: SwitchLabel;
|
|
63
63
|
|
|
@@ -73,7 +73,7 @@ export interface SwitchProps extends React.HTMLProps<HTMLElement> {
|
|
|
73
73
|
default_state?: SwitchDefaultState;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* Determine whether the switch is checked or not.
|
|
76
|
+
* Determine whether the switch is checked or not. The default will be `false`.
|
|
77
77
|
*/
|
|
78
78
|
checked?: SwitchChecked;
|
|
79
79
|
disabled?: SwitchDisabled;
|
|
@@ -90,7 +90,7 @@ export interface SwitchProps extends React.HTMLProps<HTMLElement> {
|
|
|
90
90
|
status?: SwitchStatus;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
* Defines the state of the status. Currently there are two statuses `[error, info]`. Defaults to `error`.
|
|
93
|
+
* Defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`.
|
|
94
94
|
*/
|
|
95
95
|
status_state?: string;
|
|
96
96
|
|
|
@@ -149,12 +149,12 @@ export interface SwitchProps extends React.HTMLProps<HTMLElement> {
|
|
|
149
149
|
custom_method?: (...args: any[]) => any;
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
|
-
* Will be called on state changes made by the user. Returns
|
|
152
|
+
* Will be called on state changes made by the user. Returns a boolean `{ checked, event }`.
|
|
153
153
|
*/
|
|
154
154
|
on_change?: (...args: any[]) => any;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* Will be called on state changes made by the user, but with a delay. This way the
|
|
157
|
+
* Will be called on state changes made by the user, but with a delay. This way the user sees the animation before e.g. an error will be removed. Returns a boolean `{ checked, event }`.
|
|
158
158
|
*/
|
|
159
159
|
on_change_end?: (...args: any[]) => any;
|
|
160
160
|
on_state_update?: (...args: any[]) => any;
|
|
@@ -81,7 +81,7 @@ export interface TabsProps extends React.HTMLProps<HTMLElement> {
|
|
|
81
81
|
content_style?: string;
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
* To modify the `spacing`
|
|
84
|
+
* To modify the `spacing` onto the content wrapper. Use a supported modifier from the <a href="/uilib/components/section/properties">Section component</a>. Defaults to `true`.
|
|
85
85
|
*/
|
|
86
86
|
content_spacing?: TabsContentSpacing;
|
|
87
87
|
label?: string;
|
|
@@ -107,7 +107,7 @@ export interface TabsProps extends React.HTMLProps<HTMLElement> {
|
|
|
107
107
|
tabs_style?: string;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
* To modify the `spacing` inside the
|
|
110
|
+
* To modify the `spacing` inside the tab list. Use a supported modifier from the <a href="/uilib/components/section/properties">Section component</a>. Defaults to `false`.
|
|
111
111
|
*/
|
|
112
112
|
tabs_spacing?: TabsTabsSpacing;
|
|
113
113
|
use_hash?: TabsUseHash;
|
|
@@ -118,7 +118,7 @@ export interface TabsProps extends React.HTMLProps<HTMLElement> {
|
|
|
118
118
|
prerender?: TabsPrerender;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* If set to `true`, the Tabs content will stay in the DOM. The visibility will be handled by using the `hidden` and `aria-hidden` HTML attributes. Similar to `prerender`, but in contrast, the content will render once the
|
|
121
|
+
* If set to `true`, the Tabs content will stay in the DOM. The visibility will be handled by using the `hidden` and `aria-hidden` HTML attributes. Similar to `prerender`, but in contrast, the content will render once the user is activating a tab. Defaults to `false`.
|
|
122
122
|
*/
|
|
123
123
|
prevent_rerender?: TabsPreventRerender;
|
|
124
124
|
|
|
@@ -172,7 +172,7 @@ export interface TabsProps extends React.HTMLProps<HTMLElement> {
|
|
|
172
172
|
on_change?: (...args: any[]) => any;
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
* This event gets triggered once the
|
|
175
|
+
* This event gets triggered once the user's mouse enters a tab (hover). Returns `{ key, selected_key, focus_key, event }`.
|
|
176
176
|
*/
|
|
177
177
|
on_mouse_enter?: (...args: any[]) => any;
|
|
178
178
|
|
|
@@ -22,7 +22,7 @@ export interface ContentWrapperProps extends React.HTMLProps<HTMLElement> {
|
|
|
22
22
|
content_style?: string;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* To modify the `spacing`
|
|
25
|
+
* To modify the `spacing` onto the content wrapper. Use a supported modifier from the <a href="/uilib/components/section/properties">Section component</a>. Defaults to `true`.
|
|
26
26
|
*/
|
|
27
27
|
content_spacing?: ContentWrapperContentSpacing;
|
|
28
28
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
const _excluded = ["className", "skeleton", "children", "icon", "text"];
|
|
5
|
+
|
|
6
|
+
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; }
|
|
7
|
+
|
|
8
|
+
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; }
|
|
9
|
+
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import classnames from 'classnames';
|
|
12
|
+
import { createSkeletonClass } from '../skeleton/SkeletonHelper';
|
|
13
|
+
import { createSpacingClasses } from '../space/SpacingHelper';
|
|
14
|
+
import Icon from '../icon-primary/IconPrimary';
|
|
15
|
+
import Context from '../../shared/Context';
|
|
16
|
+
import { extendPropsWithContext } from '../../shared/component-helper';
|
|
17
|
+
export const defaultProps = {
|
|
18
|
+
className: null,
|
|
19
|
+
skeleton: false,
|
|
20
|
+
text: null,
|
|
21
|
+
children: null,
|
|
22
|
+
icon: null
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function Tag(localProps) {
|
|
26
|
+
var _context$translation;
|
|
27
|
+
|
|
28
|
+
const context = React.useContext(Context);
|
|
29
|
+
|
|
30
|
+
const _extendPropsWithConte = 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),
|
|
31
|
+
{
|
|
32
|
+
className,
|
|
33
|
+
skeleton,
|
|
34
|
+
children,
|
|
35
|
+
icon,
|
|
36
|
+
text
|
|
37
|
+
} = _extendPropsWithConte,
|
|
38
|
+
props = _objectWithoutProperties(_extendPropsWithConte, _excluded);
|
|
39
|
+
|
|
40
|
+
const skeletonClasses = createSkeletonClass('shape', skeleton, context);
|
|
41
|
+
const spacingClasses = createSpacingClasses(props);
|
|
42
|
+
const content = text || children;
|
|
43
|
+
return React.createElement("div", _extends({
|
|
44
|
+
className: classnames('dnb-tag', skeletonClasses, spacingClasses, className),
|
|
45
|
+
"data-testid": "tag"
|
|
46
|
+
}, props), icon && React.createElement("span", {
|
|
47
|
+
"data-testid": "tag-icon",
|
|
48
|
+
className: "dnb-tag__icon"
|
|
49
|
+
}, React.createElement(Icon, {
|
|
50
|
+
icon: icon,
|
|
51
|
+
right: "x-small"
|
|
52
|
+
})), content && React.createElement("span", {
|
|
53
|
+
"data-testid": "tag-text",
|
|
54
|
+
className: "dnb-tag__text"
|
|
55
|
+
}, content));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default Tag;
|