@dnb/eufemia 10.71.2 → 10.72.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 +7 -0
- package/cjs/components/anchor/Anchor.js +1 -0
- package/cjs/components/anchor/Anchor.js.map +1 -1
- package/cjs/components/card/CardDocs.js +1 -1
- package/cjs/components/card/CardDocs.js.map +1 -1
- package/cjs/components/help-button/HelpButtonInline.js +1 -1
- package/cjs/components/help-button/HelpButtonInline.js.map +1 -1
- package/cjs/components/section/Section.d.ts +2 -1
- package/cjs/components/section/Section.js +2 -2
- package/cjs/components/section/Section.js.map +1 -1
- package/cjs/components/section/style/dnb-section.css +4 -0
- package/cjs/components/section/style/dnb-section.min.css +1 -1
- package/cjs/components/section/style/dnb-section.scss +5 -0
- package/cjs/components/step-indicator/StepIndicator.d.ts +23 -5
- package/cjs/components/step-indicator/StepIndicator.js +66 -21
- package/cjs/components/step-indicator/StepIndicator.js.map +1 -1
- package/cjs/components/step-indicator/StepIndicatorContext.d.ts +2 -14
- package/cjs/components/step-indicator/StepIndicatorContext.js +9 -56
- package/cjs/components/step-indicator/StepIndicatorContext.js.map +1 -1
- package/cjs/components/step-indicator/StepIndicatorDocs.d.ts +5 -0
- package/cjs/components/step-indicator/StepIndicatorDocs.js +145 -0
- package/cjs/components/step-indicator/StepIndicatorDocs.js.map +1 -0
- package/cjs/components/step-indicator/StepIndicatorItem.d.ts +10 -10
- package/cjs/components/step-indicator/StepIndicatorItem.js +89 -98
- package/cjs/components/step-indicator/StepIndicatorItem.js.map +1 -1
- package/cjs/components/step-indicator/StepIndicatorList.js +33 -36
- package/cjs/components/step-indicator/StepIndicatorList.js.map +1 -1
- package/cjs/components/step-indicator/StepIndicatorProps.js +2 -1
- package/cjs/components/step-indicator/StepIndicatorProps.js.map +1 -1
- package/cjs/components/step-indicator/StepIndicatorSidebar.d.ts +8 -8
- package/cjs/components/step-indicator/StepIndicatorSidebar.js +6 -63
- package/cjs/components/step-indicator/StepIndicatorSidebar.js.map +1 -1
- package/cjs/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -7
- package/cjs/components/step-indicator/StepIndicatorTriggerButton.js +70 -38
- package/cjs/components/step-indicator/StepIndicatorTriggerButton.js.map +1 -1
- package/cjs/components/step-indicator/style/dnb-step-indicator.css +99 -56
- package/cjs/components/step-indicator/style/dnb-step-indicator.min.css +1 -1
- package/cjs/components/step-indicator/style/dnb-step-indicator.scss +112 -67
- package/cjs/components/step-indicator/style/themes/dnb-step-indicator-theme-sbanken.css +5 -62
- package/cjs/components/step-indicator/style/themes/dnb-step-indicator-theme-sbanken.min.css +1 -1
- package/cjs/components/step-indicator/style/themes/dnb-step-indicator-theme-sbanken.scss +5 -89
- package/cjs/components/step-indicator/style/themes/dnb-step-indicator-theme-ui.css +1 -65
- package/cjs/components/step-indicator/style/themes/dnb-step-indicator-theme-ui.min.css +0 -1
- package/cjs/components/step-indicator/style/themes/dnb-step-indicator-theme-ui.scss +0 -91
- package/cjs/elements/Element.d.ts +16 -2
- package/cjs/elements/Element.js +1 -1
- package/cjs/elements/Element.js.map +1 -1
- package/cjs/elements/lib.d.ts +1 -1
- package/cjs/extensions/forms/Wizard/Container/DisplaySteps.d.ts +3 -3
- package/cjs/extensions/forms/Wizard/Container/DisplaySteps.js +14 -10
- package/cjs/extensions/forms/Wizard/Container/DisplaySteps.js.map +1 -1
- package/cjs/extensions/forms/Wizard/Container/WizardContainer.d.ts +12 -0
- package/cjs/extensions/forms/Wizard/Container/WizardContainer.js +24 -13
- package/cjs/extensions/forms/Wizard/Container/WizardContainer.js.map +1 -1
- package/cjs/extensions/forms/Wizard/Container/WizardContainerDocs.js +21 -11
- package/cjs/extensions/forms/Wizard/Container/WizardContainerDocs.js.map +1 -1
- package/cjs/extensions/forms/Wizard/style/dnb-wizard-layout.css +2 -14
- package/cjs/extensions/forms/Wizard/style/dnb-wizard-layout.min.css +1 -1
- package/cjs/extensions/forms/Wizard/style/dnb-wizard-layout.scss +3 -18
- package/cjs/extensions/forms/style/dnb-forms.css +2 -13
- package/cjs/extensions/forms/style/dnb-forms.min.css +1 -1
- package/cjs/shared/Eufemia.d.ts +1 -1
- package/cjs/shared/Eufemia.js +2 -2
- package/cjs/shared/Eufemia.js.map +1 -1
- package/cjs/shared/locales/en-GB.d.ts +0 -1
- package/cjs/shared/locales/en-GB.js +1 -2
- package/cjs/shared/locales/en-GB.js.map +1 -1
- package/cjs/shared/locales/en-US.d.ts +0 -1
- package/cjs/shared/locales/index.d.ts +0 -2
- package/cjs/shared/locales/nb-NO.d.ts +0 -1
- package/cjs/shared/locales/nb-NO.js +1 -2
- package/cjs/shared/locales/nb-NO.js.map +1 -1
- package/cjs/shared/locales/sv-SE.d.ts +0 -1
- package/cjs/shared/locales/sv-SE.js +0 -1
- package/cjs/shared/locales/sv-SE.js.map +1 -1
- package/cjs/style/core/scopes.scss +1 -1
- package/cjs/style/dnb-ui-basis.css +1 -1
- package/cjs/style/dnb-ui-basis.min.css +1 -1
- package/cjs/style/dnb-ui-body.css +1 -1
- package/cjs/style/dnb-ui-body.min.css +1 -1
- package/cjs/style/dnb-ui-components.css +101 -65
- package/cjs/style/dnb-ui-components.min.css +3 -3
- package/cjs/style/dnb-ui-core.css +1 -1
- package/cjs/style/dnb-ui-core.min.css +1 -1
- package/cjs/style/dnb-ui-extensions.css +2 -13
- package/cjs/style/dnb-ui-extensions.min.css +1 -1
- package/cjs/style/dnb-ui-forms.css +2 -13
- package/cjs/style/dnb-ui-forms.min.css +1 -1
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.css +102 -142
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.min.css +4 -4
- package/cjs/style/themes/theme-eiendom/eiendom-theme-extensions.css +2 -13
- package/cjs/style/themes/theme-eiendom/eiendom-theme-extensions.min.css +1 -1
- package/cjs/style/themes/theme-eiendom/eiendom-theme-forms.css +2 -13
- package/cjs/style/themes/theme-eiendom/eiendom-theme-forms.min.css +1 -1
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.css +107 -139
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.min.css +4 -4
- package/cjs/style/themes/theme-sbanken/sbanken-theme-extensions.css +2 -13
- package/cjs/style/themes/theme-sbanken/sbanken-theme-extensions.min.css +1 -1
- package/cjs/style/themes/theme-sbanken/sbanken-theme-forms.css +2 -13
- package/cjs/style/themes/theme-sbanken/sbanken-theme-forms.min.css +1 -1
- package/cjs/style/themes/theme-ui/ui-theme-components.css +102 -142
- package/cjs/style/themes/theme-ui/ui-theme-components.min.css +4 -4
- package/cjs/style/themes/theme-ui/ui-theme-extensions.css +2 -13
- package/cjs/style/themes/theme-ui/ui-theme-extensions.min.css +1 -1
- package/cjs/style/themes/theme-ui/ui-theme-forms.css +2 -13
- package/cjs/style/themes/theme-ui/ui-theme-forms.min.css +1 -1
- package/components/anchor/Anchor.js +1 -0
- package/components/anchor/Anchor.js.map +1 -1
- package/components/card/CardDocs.js +1 -1
- package/components/card/CardDocs.js.map +1 -1
- package/components/help-button/HelpButtonInline.js +1 -1
- package/components/help-button/HelpButtonInline.js.map +1 -1
- package/components/section/Section.d.ts +2 -1
- package/components/section/Section.js +2 -2
- package/components/section/Section.js.map +1 -1
- package/components/section/style/dnb-section.css +4 -0
- package/components/section/style/dnb-section.min.css +1 -1
- package/components/section/style/dnb-section.scss +5 -0
- package/components/step-indicator/StepIndicator.d.ts +23 -5
- package/components/step-indicator/StepIndicator.js +64 -21
- package/components/step-indicator/StepIndicator.js.map +1 -1
- package/components/step-indicator/StepIndicatorContext.d.ts +2 -14
- package/components/step-indicator/StepIndicatorContext.js +9 -53
- package/components/step-indicator/StepIndicatorContext.js.map +1 -1
- package/components/step-indicator/StepIndicatorDocs.d.ts +5 -0
- package/components/step-indicator/StepIndicatorDocs.js +139 -0
- package/components/step-indicator/StepIndicatorDocs.js.map +1 -0
- package/components/step-indicator/StepIndicatorItem.d.ts +10 -10
- package/components/step-indicator/StepIndicatorItem.js +90 -99
- package/components/step-indicator/StepIndicatorItem.js.map +1 -1
- package/components/step-indicator/StepIndicatorList.js +33 -35
- package/components/step-indicator/StepIndicatorList.js.map +1 -1
- package/components/step-indicator/StepIndicatorProps.js +2 -1
- package/components/step-indicator/StepIndicatorProps.js.map +1 -1
- package/components/step-indicator/StepIndicatorSidebar.d.ts +8 -8
- package/components/step-indicator/StepIndicatorSidebar.js +6 -59
- package/components/step-indicator/StepIndicatorSidebar.js.map +1 -1
- package/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -7
- package/components/step-indicator/StepIndicatorTriggerButton.js +71 -39
- package/components/step-indicator/StepIndicatorTriggerButton.js.map +1 -1
- package/components/step-indicator/style/dnb-step-indicator.css +99 -56
- package/components/step-indicator/style/dnb-step-indicator.min.css +1 -1
- package/components/step-indicator/style/dnb-step-indicator.scss +112 -67
- package/components/step-indicator/style/themes/dnb-step-indicator-theme-sbanken.css +5 -62
- package/components/step-indicator/style/themes/dnb-step-indicator-theme-sbanken.min.css +1 -1
- package/components/step-indicator/style/themes/dnb-step-indicator-theme-sbanken.scss +5 -89
- package/components/step-indicator/style/themes/dnb-step-indicator-theme-ui.css +1 -65
- package/components/step-indicator/style/themes/dnb-step-indicator-theme-ui.min.css +0 -1
- package/components/step-indicator/style/themes/dnb-step-indicator-theme-ui.scss +0 -91
- package/elements/Element.d.ts +16 -2
- package/elements/Element.js +1 -1
- package/elements/Element.js.map +1 -1
- package/elements/lib.d.ts +1 -1
- package/es/components/anchor/Anchor.js +1 -0
- package/es/components/anchor/Anchor.js.map +1 -1
- package/es/components/card/CardDocs.js +1 -1
- package/es/components/card/CardDocs.js.map +1 -1
- package/es/components/help-button/HelpButtonInline.js +1 -1
- package/es/components/help-button/HelpButtonInline.js.map +1 -1
- package/es/components/section/Section.d.ts +2 -1
- package/es/components/section/Section.js +2 -2
- package/es/components/section/Section.js.map +1 -1
- package/es/components/section/style/dnb-section.css +4 -0
- package/es/components/section/style/dnb-section.min.css +1 -1
- package/es/components/section/style/dnb-section.scss +5 -0
- package/es/components/step-indicator/StepIndicator.d.ts +23 -5
- package/es/components/step-indicator/StepIndicator.js +63 -21
- package/es/components/step-indicator/StepIndicator.js.map +1 -1
- package/es/components/step-indicator/StepIndicatorContext.d.ts +2 -14
- package/es/components/step-indicator/StepIndicatorContext.js +5 -49
- package/es/components/step-indicator/StepIndicatorContext.js.map +1 -1
- package/es/components/step-indicator/StepIndicatorDocs.d.ts +5 -0
- package/es/components/step-indicator/StepIndicatorDocs.js +139 -0
- package/es/components/step-indicator/StepIndicatorDocs.js.map +1 -0
- package/es/components/step-indicator/StepIndicatorItem.d.ts +10 -10
- package/es/components/step-indicator/StepIndicatorItem.js +82 -88
- package/es/components/step-indicator/StepIndicatorItem.js.map +1 -1
- package/es/components/step-indicator/StepIndicatorList.js +33 -35
- package/es/components/step-indicator/StepIndicatorList.js.map +1 -1
- package/es/components/step-indicator/StepIndicatorProps.js +2 -1
- package/es/components/step-indicator/StepIndicatorProps.js.map +1 -1
- package/es/components/step-indicator/StepIndicatorSidebar.d.ts +8 -8
- package/es/components/step-indicator/StepIndicatorSidebar.js +6 -58
- package/es/components/step-indicator/StepIndicatorSidebar.js.map +1 -1
- package/es/components/step-indicator/StepIndicatorTriggerButton.d.ts +1 -7
- package/es/components/step-indicator/StepIndicatorTriggerButton.js +71 -39
- package/es/components/step-indicator/StepIndicatorTriggerButton.js.map +1 -1
- package/es/components/step-indicator/style/dnb-step-indicator.css +99 -56
- package/es/components/step-indicator/style/dnb-step-indicator.min.css +1 -1
- package/es/components/step-indicator/style/dnb-step-indicator.scss +112 -67
- package/es/components/step-indicator/style/themes/dnb-step-indicator-theme-sbanken.css +5 -62
- package/es/components/step-indicator/style/themes/dnb-step-indicator-theme-sbanken.min.css +1 -1
- package/es/components/step-indicator/style/themes/dnb-step-indicator-theme-sbanken.scss +5 -89
- package/es/components/step-indicator/style/themes/dnb-step-indicator-theme-ui.css +1 -65
- package/es/components/step-indicator/style/themes/dnb-step-indicator-theme-ui.min.css +0 -1
- package/es/components/step-indicator/style/themes/dnb-step-indicator-theme-ui.scss +0 -91
- package/es/elements/Element.d.ts +16 -2
- package/es/elements/Element.js +1 -1
- package/es/elements/Element.js.map +1 -1
- package/es/elements/lib.d.ts +1 -1
- package/es/extensions/forms/Wizard/Container/DisplaySteps.d.ts +3 -3
- package/es/extensions/forms/Wizard/Container/DisplaySteps.js +14 -10
- package/es/extensions/forms/Wizard/Container/DisplaySteps.js.map +1 -1
- package/es/extensions/forms/Wizard/Container/WizardContainer.d.ts +12 -0
- package/es/extensions/forms/Wizard/Container/WizardContainer.js +24 -13
- package/es/extensions/forms/Wizard/Container/WizardContainer.js.map +1 -1
- package/es/extensions/forms/Wizard/Container/WizardContainerDocs.js +21 -11
- package/es/extensions/forms/Wizard/Container/WizardContainerDocs.js.map +1 -1
- package/es/extensions/forms/Wizard/style/dnb-wizard-layout.css +2 -14
- package/es/extensions/forms/Wizard/style/dnb-wizard-layout.min.css +1 -1
- package/es/extensions/forms/Wizard/style/dnb-wizard-layout.scss +3 -18
- package/es/extensions/forms/style/dnb-forms.css +2 -13
- package/es/extensions/forms/style/dnb-forms.min.css +1 -1
- package/es/shared/Eufemia.d.ts +1 -1
- package/es/shared/Eufemia.js +2 -2
- package/es/shared/Eufemia.js.map +1 -1
- package/es/shared/locales/en-GB.d.ts +0 -1
- package/es/shared/locales/en-GB.js +1 -2
- package/es/shared/locales/en-GB.js.map +1 -1
- package/es/shared/locales/en-US.d.ts +0 -1
- package/es/shared/locales/index.d.ts +0 -2
- package/es/shared/locales/nb-NO.d.ts +0 -1
- package/es/shared/locales/nb-NO.js +1 -2
- package/es/shared/locales/nb-NO.js.map +1 -1
- package/es/shared/locales/sv-SE.d.ts +0 -1
- package/es/shared/locales/sv-SE.js +0 -1
- package/es/shared/locales/sv-SE.js.map +1 -1
- package/es/style/core/scopes.scss +1 -1
- package/es/style/dnb-ui-basis.css +1 -1
- package/es/style/dnb-ui-basis.min.css +1 -1
- package/es/style/dnb-ui-body.css +1 -1
- package/es/style/dnb-ui-body.min.css +1 -1
- package/es/style/dnb-ui-components.css +101 -65
- package/es/style/dnb-ui-components.min.css +3 -3
- package/es/style/dnb-ui-core.css +1 -1
- package/es/style/dnb-ui-core.min.css +1 -1
- package/es/style/dnb-ui-extensions.css +2 -13
- package/es/style/dnb-ui-extensions.min.css +1 -1
- package/es/style/dnb-ui-forms.css +2 -13
- package/es/style/dnb-ui-forms.min.css +1 -1
- package/es/style/themes/theme-eiendom/eiendom-theme-components.css +102 -142
- package/es/style/themes/theme-eiendom/eiendom-theme-components.min.css +4 -4
- package/es/style/themes/theme-eiendom/eiendom-theme-extensions.css +2 -13
- package/es/style/themes/theme-eiendom/eiendom-theme-extensions.min.css +1 -1
- package/es/style/themes/theme-eiendom/eiendom-theme-forms.css +2 -13
- package/es/style/themes/theme-eiendom/eiendom-theme-forms.min.css +1 -1
- package/es/style/themes/theme-sbanken/sbanken-theme-components.css +107 -139
- package/es/style/themes/theme-sbanken/sbanken-theme-components.min.css +4 -4
- package/es/style/themes/theme-sbanken/sbanken-theme-extensions.css +2 -13
- package/es/style/themes/theme-sbanken/sbanken-theme-extensions.min.css +1 -1
- package/es/style/themes/theme-sbanken/sbanken-theme-forms.css +2 -13
- package/es/style/themes/theme-sbanken/sbanken-theme-forms.min.css +1 -1
- package/es/style/themes/theme-ui/ui-theme-components.css +102 -142
- package/es/style/themes/theme-ui/ui-theme-components.min.css +4 -4
- package/es/style/themes/theme-ui/ui-theme-extensions.css +2 -13
- package/es/style/themes/theme-ui/ui-theme-extensions.min.css +1 -1
- package/es/style/themes/theme-ui/ui-theme-forms.css +2 -13
- package/es/style/themes/theme-ui/ui-theme-forms.min.css +1 -1
- package/esm/dnb-ui-basis.min.mjs +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 +1 -1
- package/extensions/forms/Wizard/Container/DisplaySteps.d.ts +3 -3
- package/extensions/forms/Wizard/Container/DisplaySteps.js +14 -10
- package/extensions/forms/Wizard/Container/DisplaySteps.js.map +1 -1
- package/extensions/forms/Wizard/Container/WizardContainer.d.ts +12 -0
- package/extensions/forms/Wizard/Container/WizardContainer.js +24 -13
- package/extensions/forms/Wizard/Container/WizardContainer.js.map +1 -1
- package/extensions/forms/Wizard/Container/WizardContainerDocs.js +21 -11
- package/extensions/forms/Wizard/Container/WizardContainerDocs.js.map +1 -1
- package/extensions/forms/Wizard/style/dnb-wizard-layout.css +2 -14
- package/extensions/forms/Wizard/style/dnb-wizard-layout.min.css +1 -1
- package/extensions/forms/Wizard/style/dnb-wizard-layout.scss +3 -18
- package/extensions/forms/style/dnb-forms.css +2 -13
- package/extensions/forms/style/dnb-forms.min.css +1 -1
- package/package.json +1 -1
- package/shared/Eufemia.d.ts +1 -1
- package/shared/Eufemia.js +2 -2
- package/shared/Eufemia.js.map +1 -1
- package/shared/locales/en-GB.d.ts +0 -1
- package/shared/locales/en-GB.js +1 -2
- package/shared/locales/en-GB.js.map +1 -1
- package/shared/locales/en-US.d.ts +0 -1
- package/shared/locales/index.d.ts +0 -2
- package/shared/locales/nb-NO.d.ts +0 -1
- package/shared/locales/nb-NO.js +1 -2
- package/shared/locales/nb-NO.js.map +1 -1
- package/shared/locales/sv-SE.d.ts +0 -1
- package/shared/locales/sv-SE.js +0 -1
- package/shared/locales/sv-SE.js.map +1 -1
- package/style/core/scopes.scss +1 -1
- package/style/dnb-ui-basis.css +1 -1
- package/style/dnb-ui-basis.min.css +1 -1
- package/style/dnb-ui-body.css +1 -1
- package/style/dnb-ui-body.min.css +1 -1
- package/style/dnb-ui-components.css +101 -65
- package/style/dnb-ui-components.min.css +3 -3
- package/style/dnb-ui-core.css +1 -1
- package/style/dnb-ui-core.min.css +1 -1
- package/style/dnb-ui-extensions.css +2 -13
- package/style/dnb-ui-extensions.min.css +1 -1
- package/style/dnb-ui-forms.css +2 -13
- package/style/dnb-ui-forms.min.css +1 -1
- package/style/themes/theme-eiendom/eiendom-theme-components.css +102 -142
- package/style/themes/theme-eiendom/eiendom-theme-components.min.css +4 -4
- package/style/themes/theme-eiendom/eiendom-theme-extensions.css +2 -13
- package/style/themes/theme-eiendom/eiendom-theme-extensions.min.css +1 -1
- package/style/themes/theme-eiendom/eiendom-theme-forms.css +2 -13
- package/style/themes/theme-eiendom/eiendom-theme-forms.min.css +1 -1
- package/style/themes/theme-sbanken/sbanken-theme-components.css +107 -139
- package/style/themes/theme-sbanken/sbanken-theme-components.min.css +4 -4
- package/style/themes/theme-sbanken/sbanken-theme-extensions.css +2 -13
- package/style/themes/theme-sbanken/sbanken-theme-extensions.min.css +1 -1
- package/style/themes/theme-sbanken/sbanken-theme-forms.css +2 -13
- package/style/themes/theme-sbanken/sbanken-theme-forms.min.css +1 -1
- package/style/themes/theme-ui/ui-theme-components.css +102 -142
- package/style/themes/theme-ui/ui-theme-components.min.css +4 -4
- package/style/themes/theme-ui/ui-theme-extensions.css +2 -13
- package/style/themes/theme-ui/ui-theme-extensions.min.css +1 -1
- package/style/themes/theme-ui/ui-theme-forms.css +2 -13
- package/style/themes/theme-ui/ui-theme-forms.min.css +1 -1
- package/umd/dnb-ui-basis.min.js +1 -1
- package/umd/dnb-ui-components.min.js +1 -1
- 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 +1 -1
- package/cjs/components/step-indicator/StepIndicatorModal.d.ts +0 -6
- package/cjs/components/step-indicator/StepIndicatorModal.js +0 -62
- package/cjs/components/step-indicator/StepIndicatorModal.js.map +0 -1
- package/components/step-indicator/StepIndicatorModal.d.ts +0 -6
- package/components/step-indicator/StepIndicatorModal.js +0 -54
- package/components/step-indicator/StepIndicatorModal.js.map +0 -1
- package/es/components/step-indicator/StepIndicatorModal.d.ts +0 -6
- package/es/components/step-indicator/StepIndicatorModal.js +0 -53
- package/es/components/step-indicator/StepIndicatorModal.js.map +0 -1
|
@@ -6,15 +6,10 @@ import React from 'react';
|
|
|
6
6
|
import { ContextProps } from '../../shared/Context';
|
|
7
7
|
import { StepIndicatorData, StepIndicatorMode, StepIndicatorProps } from './StepIndicator';
|
|
8
8
|
import { StepIndicatorItemProps } from './StepIndicatorItem';
|
|
9
|
-
import { StepIndicatorTriggerButtonProps } from './StepIndicatorTriggerButton';
|
|
10
9
|
export type StepIndicatorContextValues = StepIndicatorProviderProps & StepIndicatorProviderStates & ContextProps;
|
|
11
10
|
declare const StepIndicatorContext: React.Context<StepIndicatorContextValues>;
|
|
12
11
|
export default StepIndicatorContext;
|
|
13
|
-
export type StepIndicatorProviderProps = Omit<StepIndicatorProps, 'mode' | 'data'> & {
|
|
14
|
-
/**
|
|
15
|
-
* <em>(required)</em> 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.
|
|
16
|
-
*/
|
|
17
|
-
sidebar_id: string;
|
|
12
|
+
export type StepIndicatorProviderProps = Omit<StepIndicatorProps, 'mode' | 'data' | 'sidebar_id' | 'step_title_extended'> & {
|
|
18
13
|
/**
|
|
19
14
|
* <em>(required)</em> defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See parameters and the example above.
|
|
20
15
|
*/
|
|
@@ -24,24 +19,17 @@ export type StepIndicatorProviderProps = Omit<StepIndicatorProps, 'mode' | 'data
|
|
|
24
19
|
*/
|
|
25
20
|
mode?: StepIndicatorMode;
|
|
26
21
|
children: React.ReactNode;
|
|
27
|
-
isSidebar?: boolean;
|
|
28
|
-
triggerButtonProps?: StepIndicatorTriggerButtonProps;
|
|
29
22
|
};
|
|
30
23
|
export type StepIndicatorProviderStates = {
|
|
31
24
|
data: (string | StepIndicatorItemProps)[];
|
|
32
|
-
hasSidebar: boolean;
|
|
33
|
-
hideSidebar: boolean;
|
|
34
25
|
activeStep: number;
|
|
35
26
|
openState: boolean;
|
|
36
27
|
listOfReachedSteps: number[];
|
|
37
28
|
countSteps: number;
|
|
38
29
|
stepsLabel: string;
|
|
39
|
-
stepsLabelExtended: string;
|
|
40
30
|
filterAttributes: string[];
|
|
41
31
|
setActiveStep: React.Dispatch<React.SetStateAction<number>>;
|
|
42
|
-
sidebarIsVisible: boolean;
|
|
43
|
-
onChangeState: () => void;
|
|
44
32
|
openHandler: () => void;
|
|
45
33
|
closeHandler: () => void;
|
|
46
34
|
};
|
|
47
|
-
export declare function StepIndicatorProvider(
|
|
35
|
+
export declare function StepIndicatorProvider(props: StepIndicatorProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,42 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
const _excluded = ["isSidebar"];
|
|
6
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
3
|
import React, { useCallback, useContext, useEffect, useMemo, useReducer, useRef, useState } from 'react';
|
|
9
4
|
import Context from '../../shared/Context';
|
|
10
5
|
import { stepIndicatorDefaultProps } from './StepIndicatorProps';
|
|
11
6
|
import { extendPropsWithContext } from '../../shared/component-helper';
|
|
12
|
-
import { onMediaQueryChange } from '../../shared/MediaQueryUtils';
|
|
13
7
|
const filterAttributes = Object.keys(stepIndicatorDefaultProps).filter(item => {
|
|
14
8
|
return !['class', 'className'].includes(item);
|
|
15
|
-
}).concat(['internalId', '
|
|
9
|
+
}).concat(['internalId', 'mainTitle', 'stepsLabel', 'listOfReachedSteps', 'setActiveStep', 'activeStep', 'countSteps', 'openState', 'openHandler', 'closeHandler', 'innerRef', 'hasSkeletonData', 'filterAttributes']);
|
|
16
10
|
const StepIndicatorContext = React.createContext(null);
|
|
17
11
|
export default StepIndicatorContext;
|
|
18
|
-
export function StepIndicatorProvider(
|
|
19
|
-
let {
|
|
20
|
-
isSidebar = false
|
|
21
|
-
} = _ref,
|
|
22
|
-
restOfProps = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
-
const props = useMemo(() => {
|
|
24
|
-
return _objectSpread({
|
|
25
|
-
isSidebar
|
|
26
|
-
}, restOfProps);
|
|
27
|
-
}, [isSidebar, restOfProps]);
|
|
12
|
+
export function StepIndicatorProvider(props) {
|
|
28
13
|
const data = useMemo(() => {
|
|
29
14
|
if (typeof props.data === 'string') {
|
|
30
15
|
return props.data[0] === '[' ? JSON.parse(props.data) : [];
|
|
31
16
|
}
|
|
32
17
|
return props.data || [];
|
|
33
18
|
}, [props]);
|
|
34
|
-
const [
|
|
35
|
-
const [hideSidebar, setHideSidebar] = useState(false);
|
|
36
|
-
const [openState, setOpenState] = useState(false);
|
|
37
|
-
const onChangeState = useCallback(() => {
|
|
38
|
-
setOpenState(false);
|
|
39
|
-
}, []);
|
|
19
|
+
const [openState, setOpenState] = useState(props.expandedInitially);
|
|
40
20
|
const openHandler = useCallback(() => {
|
|
41
21
|
setOpenState(true);
|
|
42
22
|
}, []);
|
|
@@ -59,7 +39,6 @@ export function StepIndicatorProvider(_ref) {
|
|
|
59
39
|
forceUpdate();
|
|
60
40
|
}, []);
|
|
61
41
|
const listOfReachedSteps = useRef([activeStepRef.current].filter(Boolean)).current;
|
|
62
|
-
const mediaQueryListener = useRef(null);
|
|
63
42
|
const context = useContext(Context);
|
|
64
43
|
const updateStepTitle = useCallback(title => {
|
|
65
44
|
return title === null || title === void 0 ? void 0 : title.replace('%step', String((activeStepRef.current || 0) + 1)).replace('%count', String((data === null || data === void 0 ? void 0 : data.length) || 1));
|
|
@@ -74,43 +53,20 @@ export function StepIndicatorProvider(_ref) {
|
|
|
74
53
|
defaultProps: stepIndicatorDefaultProps,
|
|
75
54
|
props
|
|
76
55
|
}, {
|
|
77
|
-
hasSidebar,
|
|
78
|
-
hideSidebar,
|
|
79
56
|
activeStep: activeStepRef.current,
|
|
80
57
|
openState,
|
|
81
58
|
listOfReachedSteps,
|
|
82
59
|
data,
|
|
83
60
|
countSteps,
|
|
84
|
-
stepsLabel: updateStepTitle(globalContext.step_title)
|
|
85
|
-
stepsLabelExtended: updateStepTitle(globalContext.step_title_extended)
|
|
61
|
+
stepsLabel: updateStepTitle(globalContext.step_title)
|
|
86
62
|
}, {
|
|
87
63
|
setActiveStep,
|
|
88
|
-
onChangeState,
|
|
89
64
|
openHandler,
|
|
90
65
|
closeHandler
|
|
91
66
|
});
|
|
92
|
-
value.sidebarIsVisible = value.hasSidebar && !value.hideSidebar;
|
|
93
67
|
return value;
|
|
94
|
-
}, [closeHandler, context, countSteps, data,
|
|
68
|
+
}, [closeHandler, context, countSteps, data, listOfReachedSteps, openHandler, openState, props, setActiveStep, updateStepTitle]);
|
|
95
69
|
const contextValue = makeContextValue();
|
|
96
|
-
useEffect(() => {
|
|
97
|
-
var _document;
|
|
98
|
-
const container = (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById('sidebar__' + props.sidebar_id);
|
|
99
|
-
setHasSidebar(Boolean(container));
|
|
100
|
-
mediaQueryListener.current = onMediaQueryChange({
|
|
101
|
-
min: '0',
|
|
102
|
-
max: 'medium'
|
|
103
|
-
}, hideSidebar => {
|
|
104
|
-
setHideSidebar(hideSidebar);
|
|
105
|
-
}, {
|
|
106
|
-
runOnInit: true
|
|
107
|
-
});
|
|
108
|
-
return () => {
|
|
109
|
-
if (mediaQueryListener.current) {
|
|
110
|
-
mediaQueryListener.current();
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
}, [props.sidebar_id]);
|
|
114
70
|
useEffect(() => {
|
|
115
71
|
const currentStepFromProps = getActiveStepFromProps();
|
|
116
72
|
if (currentStepFromProps !== activeStepRef.current) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepIndicatorContext.js","names":["React","useCallback","useContext","useEffect","useMemo","useReducer","useRef","useState","Context","stepIndicatorDefaultProps","extendPropsWithContext","onMediaQueryChange","filterAttributes","Object","keys","filter","item","includes","concat","StepIndicatorContext","createContext","StepIndicatorProvider","_ref","isSidebar","restOfProps","_objectWithoutProperties","_excluded","props","_objectSpread","data","JSON","parse","hasSidebar","setHasSidebar","hideSidebar","setHideSidebar","openState","setOpenState","onChangeState","openHandler","closeHandler","getActiveStepFromProps","current_step","dataWithItems","itemWithCurrentStep","find","is_current","indexOf","countSteps","length","activeStepRef","forceUpdate","setActiveStep","step","current","listOfReachedSteps","Boolean","mediaQueryListener","context","updateStepTitle","title","replace","String","makeContextValue","globalContext","skeleton","getTranslation","StepIndicator","value","extendSafe","defaultProps","activeStep","stepsLabel","step_title","stepsLabelExtended","step_title_extended","sidebarIsVisible","contextValue","_document","container","document","getElementById","sidebar_id","min","max","runOnInit","currentStepFromProps","push","window","forEach","key","startsWith","createElement","Provider","children","objects","obj","itm","entries","reduce","acc","k","v"],"sources":["../../../../src/components/step-indicator/StepIndicatorContext.tsx"],"sourcesContent":["/**\n * Web StepIndicator Context\n *\n */\n\nimport React, {\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n} from 'react'\nimport Context, { ContextProps } from '../../shared/Context'\nimport { stepIndicatorDefaultProps } from './StepIndicatorProps'\nimport { extendPropsWithContext } from '../../shared/component-helper'\nimport { onMediaQueryChange } from '../../shared/MediaQueryUtils'\nimport {\n StepIndicatorData,\n StepIndicatorDataItem,\n StepIndicatorMode,\n StepIndicatorProps,\n} from './StepIndicator'\nimport { StepIndicatorItemProps } from './StepIndicatorItem'\nimport { StepIndicatorTriggerButtonProps } from './StepIndicatorTriggerButton'\n\n// We use this array to filter out unwanted properties\nconst filterAttributes = Object.keys(stepIndicatorDefaultProps)\n .filter((item) => {\n return !['class', 'className'].includes(item)\n })\n .concat([\n 'internalId',\n 'isSidebar',\n 'hasSidebar',\n 'hideSidebar',\n 'sidebarIsVisible',\n 'mainTitle',\n 'stepsLabel',\n 'stepsLabelExtended',\n 'listOfReachedSteps',\n 'setActiveStep',\n 'activeStep',\n 'countSteps',\n 'openState',\n 'onChangeState',\n 'openHandler',\n 'closeHandler',\n 'innerRef',\n 'hasSkeletonData',\n 'filterAttributes',\n 'onChangeState',\n ])\n\nexport type StepIndicatorContextValues = StepIndicatorProviderProps &\n StepIndicatorProviderStates &\n ContextProps\n\nconst StepIndicatorContext =\n React.createContext<StepIndicatorContextValues>(null)\n\nexport default StepIndicatorContext\n\nexport type StepIndicatorProviderProps = Omit<\n StepIndicatorProps,\n 'mode' | 'data'\n> & {\n /**\n * <em>(required)</em> 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.\n */\n sidebar_id: string\n /**\n * <em>(required)</em> defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See parameters and the example above.\n */\n data?: StepIndicatorData\n /**\n * <em>(required)</em> defines how the StepIndicator should work. Use `static` for non-interactive steps. Use `strict` for a chronological step order, also, the user can navigate between visited steps. Use `loose` if the user should be able to navigate freely.\n */\n mode?: StepIndicatorMode\n children: React.ReactNode\n isSidebar?: boolean\n triggerButtonProps?: StepIndicatorTriggerButtonProps\n}\n\nexport type StepIndicatorProviderStates = {\n data: (string | StepIndicatorItemProps)[]\n hasSidebar: boolean\n hideSidebar: boolean\n activeStep: number\n openState: boolean\n listOfReachedSteps: number[]\n countSteps: number\n stepsLabel: string\n stepsLabelExtended: string\n filterAttributes: string[]\n setActiveStep: React.Dispatch<React.SetStateAction<number>>\n sidebarIsVisible: boolean\n onChangeState: () => void\n openHandler: () => void\n closeHandler: () => void\n}\n\nexport function StepIndicatorProvider({\n isSidebar = false,\n ...restOfProps\n}: StepIndicatorProviderProps) {\n const props = useMemo(() => {\n return { isSidebar, ...restOfProps }\n }, [isSidebar, restOfProps])\n\n const data = useMemo(() => {\n if (typeof props.data === 'string') {\n return props.data[0] === '[' ? JSON.parse(props.data) : []\n }\n\n return props.data || []\n }, [props])\n\n const [hasSidebar, setHasSidebar] = useState<boolean>(true)\n const [hideSidebar, setHideSidebar] = useState<boolean>(false)\n const [openState, setOpenState] = useState<boolean>(false)\n\n const onChangeState = useCallback(() => {\n setOpenState(false)\n }, [])\n\n const openHandler = useCallback(() => {\n setOpenState(true)\n }, [])\n\n const closeHandler = useCallback(() => {\n setOpenState(false)\n }, [])\n\n const getActiveStepFromProps = useCallback(() => {\n if (typeof data[0] === 'string') {\n return props.current_step\n }\n\n const dataWithItems = data as StepIndicatorDataItem[]\n\n const itemWithCurrentStep = dataWithItems.find(\n (item) => item.is_current\n )\n // Is current on data item has precedence(?) over current_step prop\n return itemWithCurrentStep\n ? dataWithItems.indexOf(itemWithCurrentStep)\n : props.current_step\n }, [data, props.current_step])\n\n const countSteps = data.length\n const activeStepRef = useRef<number>(getActiveStepFromProps())\n const [, forceUpdate] = useReducer(() => ({}), {})\n const setActiveStep = useCallback((step: number) => {\n activeStepRef.current = step\n forceUpdate()\n }, [])\n const listOfReachedSteps = useRef(\n [activeStepRef.current].filter(Boolean)\n ).current\n const mediaQueryListener = useRef(null)\n const context = useContext(Context)\n\n const updateStepTitle = useCallback(\n (title: string) => {\n return title\n ?.replace('%step', String((activeStepRef.current || 0) + 1))\n .replace('%count', String(data?.length || 1))\n },\n [data?.length]\n )\n\n const makeContextValue = useCallback(() => {\n const globalContext = extendPropsWithContext(\n props,\n stepIndicatorDefaultProps,\n { skeleton: context?.skeleton },\n context.getTranslation(context).StepIndicator,\n context.StepIndicator\n )\n\n const value = extendSafe(\n { filterAttributes },\n globalContext,\n // Props\n {\n defaultProps: stepIndicatorDefaultProps,\n props,\n },\n // State\n {\n hasSidebar,\n hideSidebar,\n activeStep: activeStepRef.current,\n openState,\n listOfReachedSteps,\n data,\n countSteps,\n stepsLabel: updateStepTitle(globalContext.step_title),\n stepsLabelExtended: updateStepTitle(\n globalContext.step_title_extended\n ),\n },\n // Functions\n {\n setActiveStep,\n onChangeState,\n openHandler,\n closeHandler,\n }\n ) as StepIndicatorContextValues\n\n value.sidebarIsVisible = value.hasSidebar && !value.hideSidebar\n\n return value\n }, [\n closeHandler,\n context,\n countSteps,\n data,\n hasSidebar,\n hideSidebar,\n listOfReachedSteps,\n onChangeState,\n openHandler,\n openState,\n props,\n setActiveStep,\n updateStepTitle,\n ])\n\n const contextValue = makeContextValue() as StepIndicatorContextValues\n\n // Mount and dismount\n useEffect(() => {\n const container = document?.getElementById(\n 'sidebar__' + props.sidebar_id\n )\n\n setHasSidebar(Boolean(container))\n\n mediaQueryListener.current = onMediaQueryChange(\n {\n min: '0',\n max: 'medium',\n },\n (hideSidebar) => {\n setHideSidebar(hideSidebar)\n },\n { runOnInit: true }\n )\n\n return () => {\n if (mediaQueryListener.current) {\n mediaQueryListener.current()\n }\n }\n }, [props.sidebar_id])\n\n // Keeps the activeStep state updated with changes to the current_step and data props\n useEffect(() => {\n const currentStepFromProps = getActiveStepFromProps()\n\n if (currentStepFromProps !== activeStepRef.current) {\n setActiveStep(currentStepFromProps)\n }\n }, [props.current_step, data, getActiveStepFromProps, setActiveStep])\n\n // Keeps the listOfReachedSteps state up to date with the activeStep state\n const activeStep = activeStepRef.current\n useEffect(() => {\n if (!listOfReachedSteps.includes(activeStep)) {\n listOfReachedSteps.push(activeStep)\n }\n }, [activeStep, listOfReachedSteps])\n\n if (typeof window !== 'undefined' && window['IS_TEST']) {\n contextValue['no_animation'] = true\n }\n\n // Filter out unwanted HTML attributes\n Object.keys(contextValue).forEach((key) => {\n if (key.startsWith('_')) {\n delete contextValue[key]\n }\n })\n\n return (\n <StepIndicatorContext.Provider value={contextValue}>\n {props.children}\n </StepIndicatorContext.Provider>\n )\n}\n\n/**\n * Like \"Object.assign\" – but safe\n * A new falsy value will not be used, if it exists already\n *\n * @param {...object} objects\n * @returns object\n */\nfunction extendSafe(...objects): Record<string, unknown> {\n const obj = {}\n\n objects.forEach((itm) => {\n if (itm.defaultProps && itm.props) {\n itm = Object.entries(itm.props).reduce((acc, [k, v]) => {\n if (itm.defaultProps[k] !== v) {\n acc[k] = v\n }\n return acc\n }, {})\n }\n\n Object.entries(itm).forEach(([k, v]) => {\n if (!obj[k] || (obj[k] && v)) {\n obj[k] = v\n }\n })\n })\n\n return obj\n}\n"],"mappings":";;;;;;;AAKA,OAAOA,KAAK,IACVC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,UAAU,EACVC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,OAAOC,OAAO,MAAwB,sBAAsB;AAC5D,SAASC,yBAAyB,QAAQ,sBAAsB;AAChE,SAASC,sBAAsB,QAAQ,+BAA+B;AACtE,SAASC,kBAAkB,QAAQ,8BAA8B;AAWjE,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,IAAI,CAACL,yBAAyB,CAAC,CAC5DM,MAAM,CAAEC,IAAI,IAAK;EAChB,OAAO,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAACC,QAAQ,CAACD,IAAI,CAAC;AAC/C,CAAC,CAAC,CACDE,MAAM,CAAC,CACN,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,aAAa,EACb,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,CAChB,CAAC;AAMJ,MAAMC,oBAAoB,GACxBnB,KAAK,CA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CAAC;MACZ;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAON,GAAG;AACZ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"StepIndicatorContext.js","names":["React","useCallback","useContext","useEffect","useMemo","useReducer","useRef","useState","Context","stepIndicatorDefaultProps","extendPropsWithContext","filterAttributes","Object","keys","filter","item","includes","concat","StepIndicatorContext","createContext","StepIndicatorProvider","props","data","JSON","parse","openState","setOpenState","expandedInitially","openHandler","closeHandler","getActiveStepFromProps","current_step","dataWithItems","itemWithCurrentStep","find","is_current","indexOf","countSteps","length","activeStepRef","forceUpdate","setActiveStep","step","current","listOfReachedSteps","Boolean","context","updateStepTitle","title","replace","String","makeContextValue","globalContext","skeleton","getTranslation","StepIndicator","value","extendSafe","defaultProps","activeStep","stepsLabel","step_title","contextValue","currentStepFromProps","push","window","forEach","key","startsWith","createElement","Provider","children","objects","obj","itm","entries","reduce","acc","k","v"],"sources":["../../../../src/components/step-indicator/StepIndicatorContext.tsx"],"sourcesContent":["/**\n * Web StepIndicator Context\n *\n */\n\nimport React, {\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n} from 'react'\nimport Context, { ContextProps } from '../../shared/Context'\nimport { stepIndicatorDefaultProps } from './StepIndicatorProps'\nimport { extendPropsWithContext } from '../../shared/component-helper'\nimport {\n StepIndicatorData,\n StepIndicatorDataItem,\n StepIndicatorMode,\n StepIndicatorProps,\n} from './StepIndicator'\nimport { StepIndicatorItemProps } from './StepIndicatorItem'\n\n// We use this array to filter out unwanted properties\nconst filterAttributes = Object.keys(stepIndicatorDefaultProps)\n .filter((item) => {\n return !['class', 'className'].includes(item)\n })\n .concat([\n 'internalId',\n 'mainTitle',\n 'stepsLabel',\n 'listOfReachedSteps',\n 'setActiveStep',\n 'activeStep',\n 'countSteps',\n 'openState',\n 'openHandler',\n 'closeHandler',\n 'innerRef',\n 'hasSkeletonData',\n 'filterAttributes',\n ])\n\nexport type StepIndicatorContextValues = StepIndicatorProviderProps &\n StepIndicatorProviderStates &\n ContextProps\n\nconst StepIndicatorContext =\n React.createContext<StepIndicatorContextValues>(null)\n\nexport default StepIndicatorContext\n\nexport type StepIndicatorProviderProps = Omit<\n StepIndicatorProps,\n 'mode' | 'data' | 'sidebar_id' | 'step_title_extended'\n> & {\n /**\n * <em>(required)</em> defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See parameters and the example above.\n */\n data?: StepIndicatorData\n /**\n * <em>(required)</em> defines how the StepIndicator should work. Use `static` for non-interactive steps. Use `strict` for a chronological step order, also, the user can navigate between visited steps. Use `loose` if the user should be able to navigate freely.\n */\n mode?: StepIndicatorMode\n children: React.ReactNode\n}\n\nexport type StepIndicatorProviderStates = {\n data: (string | StepIndicatorItemProps)[]\n activeStep: number\n openState: boolean\n listOfReachedSteps: number[]\n countSteps: number\n stepsLabel: string\n filterAttributes: string[]\n setActiveStep: React.Dispatch<React.SetStateAction<number>>\n openHandler: () => void\n closeHandler: () => void\n}\n\nexport function StepIndicatorProvider(props: StepIndicatorProviderProps) {\n const data = useMemo(() => {\n if (typeof props.data === 'string') {\n return props.data[0] === '[' ? JSON.parse(props.data) : []\n }\n\n return props.data || []\n }, [props])\n\n const [openState, setOpenState] = useState<boolean>(\n props.expandedInitially\n )\n\n const openHandler = useCallback(() => {\n setOpenState(true)\n }, [])\n\n const closeHandler = useCallback(() => {\n setOpenState(false)\n }, [])\n\n const getActiveStepFromProps = useCallback(() => {\n if (typeof data[0] === 'string') {\n return props.current_step\n }\n\n const dataWithItems = data as StepIndicatorDataItem[]\n\n const itemWithCurrentStep = dataWithItems.find(\n (item) => item.is_current\n )\n // Is current on data item has precedence(?) over current_step prop\n return itemWithCurrentStep\n ? dataWithItems.indexOf(itemWithCurrentStep)\n : props.current_step\n }, [data, props.current_step])\n\n const countSteps = data.length\n const activeStepRef = useRef<number>(getActiveStepFromProps())\n const [, forceUpdate] = useReducer(() => ({}), {})\n const setActiveStep = useCallback((step: number) => {\n activeStepRef.current = step\n forceUpdate()\n }, [])\n const listOfReachedSteps = useRef(\n [activeStepRef.current].filter(Boolean)\n ).current\n const context = useContext(Context)\n\n const updateStepTitle = useCallback(\n (title: string) => {\n return title\n ?.replace('%step', String((activeStepRef.current || 0) + 1))\n .replace('%count', String(data?.length || 1))\n },\n [data?.length]\n )\n\n const makeContextValue = useCallback(() => {\n const globalContext = extendPropsWithContext(\n props,\n stepIndicatorDefaultProps,\n { skeleton: context?.skeleton },\n context.getTranslation(context).StepIndicator,\n context.StepIndicator\n )\n\n const value = extendSafe(\n { filterAttributes },\n globalContext,\n // Props\n {\n defaultProps: stepIndicatorDefaultProps,\n props,\n },\n // State\n {\n activeStep: activeStepRef.current,\n openState,\n listOfReachedSteps,\n data,\n countSteps,\n stepsLabel: updateStepTitle(globalContext.step_title),\n },\n // Functions\n {\n setActiveStep,\n openHandler,\n closeHandler,\n }\n ) as StepIndicatorContextValues\n\n return value\n }, [\n closeHandler,\n context,\n countSteps,\n data,\n listOfReachedSteps,\n openHandler,\n openState,\n props,\n setActiveStep,\n updateStepTitle,\n ])\n\n const contextValue = makeContextValue() as StepIndicatorContextValues\n\n // Keeps the activeStep state updated with changes to the current_step and data props\n useEffect(() => {\n const currentStepFromProps = getActiveStepFromProps()\n\n if (currentStepFromProps !== activeStepRef.current) {\n setActiveStep(currentStepFromProps)\n }\n }, [props.current_step, data, getActiveStepFromProps, setActiveStep])\n\n // Keeps the listOfReachedSteps state up to date with the activeStep state\n const activeStep = activeStepRef.current\n useEffect(() => {\n if (!listOfReachedSteps.includes(activeStep)) {\n listOfReachedSteps.push(activeStep)\n }\n }, [activeStep, listOfReachedSteps])\n\n if (typeof window !== 'undefined' && window['IS_TEST']) {\n contextValue['no_animation'] = true\n }\n\n // Filter out unwanted HTML attributes\n Object.keys(contextValue).forEach((key) => {\n if (key.startsWith('_')) {\n delete contextValue[key]\n }\n })\n\n return (\n <StepIndicatorContext.Provider value={contextValue}>\n {props.children}\n </StepIndicatorContext.Provider>\n )\n}\n\n/**\n * Like \"Object.assign\" – but safe\n * A new falsy value will not be used, if it exists already\n *\n * @param {...object} objects\n * @returns object\n */\nfunction extendSafe(...objects): Record<string, unknown> {\n const obj = {}\n\n objects.forEach((itm) => {\n if (itm.defaultProps && itm.props) {\n itm = Object.entries(itm.props).reduce((acc, [k, v]) => {\n if (itm.defaultProps[k] !== v) {\n acc[k] = v\n }\n return acc\n }, {})\n }\n\n Object.entries(itm).forEach(([k, v]) => {\n if (!obj[k] || (obj[k] && v)) {\n obj[k] = v\n }\n })\n })\n\n return obj\n}\n"],"mappings":";;AAKA,OAAOA,KAAK,IACVC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,UAAU,EACVC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,OAAOC,OAAO,MAAwB,sBAAsB;AAC5D,SAASC,yBAAyB,QAAQ,sBAAsB;AAChE,SAASC,sBAAsB,QAAQ,+BAA+B;AAUtE,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,IAAI,CAACJ,yBAAyB,CAAC,CAC5DK,MAAM,CAAEC,IAAI,IAAK;EAChB,OAAO,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAACC,QAAQ,CAACD,IAAI,CAAC;AAC/C,CAAC,CAAC,CACDE,MAAM,CAAC,CACN,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,kBAAkB,CACnB,CAAC;AAMJ,MAAMC,oBAAoB,GACxBlB,KAAK,CAACmB,aAAa,CAA6B,IAAI,CAAC;AAEvD,eAAeD,oBAAoB;AA8BnC,OAAO,SAASE,qBAAqBA,CAACC,KAAiC,EAAE;EACvE,MAAMC,IAAI,GAAGlB,OAAO,CAAC,MAAM;IACzB,IAAI,OAAOiB,KAAK,CAACC,IAAI,KAAK,QAAQ,EAAE;MA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AAK,EAAEM;EAAa,GAChDzC,KAAK,CAACkD,QACsB,CAAC;AAEpC;AASA,SAASd,UAAUA,CAAC,GAAGe,OAAO,EAA2B;EACvD,MAAMC,GAAG,GAAG,CAAC,CAAC;EAEdD,OAAO,CAACN,OAAO,CAAEQ,GAAG,IAAK;IACvB,IAAIA,GAAG,CAAChB,YAAY,IAAIgB,GAAG,CAACrD,KAAK,EAAE;MACjCqD,GAAG,GAAG9D,MAAM,CAAC+D,OAAO,CAACD,GAAG,CAACrD,KAAK,CAAC,CAACuD,MAAM,CAAC,CAACC,GAAG,EAAE,CAACC,CAAC,EAAEC,CAAC,CAAC,KAAK;QACtD,IAAIL,GAAG,CAAChB,YAAY,CAACoB,CAAC,CAAC,KAAKC,CAAC,EAAE;UAC7BF,GAAG,CAACC,CAAC,CAAC,GAAGC,CAAC;QACZ;QACA,OAAOF,GAAG;MACZ,CAAC,EAAE,CAAC,CAAC,CAAC;IACR;IAEAjE,MAAM,CAAC+D,OAAO,CAACD,GAAG,CAAC,CAACR,OAAO,CAAC,CAAC,CAACY,CAAC,EAAEC,CAAC,CAAC,KAAK;MACtC,IAAI,CAACN,GAAG,CAACK,CAAC,CAAC,IAAKL,GAAG,CAACK,CAAC,CAAC,IAAIC,CAAE,EAAE;QAC5BN,GAAG,CAACK,CAAC,CAAC,GAAGC,CAAC;MACZ;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAON,GAAG;AACZ","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PropertiesTableProps } from '../../shared/types';
|
|
2
|
+
export declare const StepIndicatorProperties: PropertiesTableProps;
|
|
3
|
+
export declare const StepIndicatorEvents: PropertiesTableProps;
|
|
4
|
+
export declare const StepIndicatorStepProperties: PropertiesTableProps;
|
|
5
|
+
export declare const StepIndicatorStepEvents: PropertiesTableProps;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export const StepIndicatorProperties = {
|
|
2
|
+
mode: {
|
|
3
|
+
doc: 'Defines how the StepIndicator should work. Use `static` for non-interactive steps. Use `strict` for a chronological step order, also, the user can navigate between visited steps. Use `loose` if the user should be able to navigate freely.',
|
|
4
|
+
type: [`'static'`, `'strict'`, `'loose'`],
|
|
5
|
+
status: 'required'
|
|
6
|
+
},
|
|
7
|
+
data: {
|
|
8
|
+
doc: 'Defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See below for properties of `STEP_DATA`.',
|
|
9
|
+
type: ['[Step Item](#step-item-properties)[]', 'string[]'],
|
|
10
|
+
status: 'required'
|
|
11
|
+
},
|
|
12
|
+
current_step: {
|
|
13
|
+
doc: 'Defines the initial step starting from 0. Also defines the furthest step visited when `mode="strict"`. Will update to the new step if changed (but will not trigger the `on_change` event). Defaults to `0`.',
|
|
14
|
+
type: 'number',
|
|
15
|
+
status: 'optional'
|
|
16
|
+
},
|
|
17
|
+
overview_title: {
|
|
18
|
+
doc: 'The title shown inside the `<StepIndicatorModal />` supplemental screen reader text for the `<StepIndicatorTriggerButton />`. Defaults to `Steps Overview`.',
|
|
19
|
+
type: 'string',
|
|
20
|
+
status: 'optional'
|
|
21
|
+
},
|
|
22
|
+
step_title: {
|
|
23
|
+
doc: 'Label for `<StepIndicatorTriggerButton />` and screen reader text for `<StepIndicatorItem />`. Must contain `%step` and `%count` to interpolate `current_step` and `stepCount` into the text. Defaults to `Step %step of %count`.',
|
|
24
|
+
type: 'string',
|
|
25
|
+
status: 'optional'
|
|
26
|
+
},
|
|
27
|
+
hide_numbers: {
|
|
28
|
+
doc: 'Define whether to show automatically counted numbers or not. Defaults to `false`.',
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
status: 'optional'
|
|
31
|
+
},
|
|
32
|
+
no_animation: {
|
|
33
|
+
doc: 'If set to `true`, the height animation on step change and list expansion will be omitted. Defaults to `false`.',
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
status: 'optional'
|
|
36
|
+
},
|
|
37
|
+
expandedInitially: {
|
|
38
|
+
doc: 'Set to `true` to have the list be expanded initially. Defaults to `false`.',
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
status: 'optional'
|
|
41
|
+
},
|
|
42
|
+
outset: {
|
|
43
|
+
doc: 'Same as `outset` in [Card](/uilib/components/card/properties). Defaults to `false`',
|
|
44
|
+
type: 'boolean',
|
|
45
|
+
status: 'optional'
|
|
46
|
+
},
|
|
47
|
+
status: {
|
|
48
|
+
doc: 'Text for status shown below the step indicator when it is not expanded. Defaults to `undefined`',
|
|
49
|
+
type: 'string',
|
|
50
|
+
status: 'optional'
|
|
51
|
+
},
|
|
52
|
+
status_state: {
|
|
53
|
+
doc: 'The type of status shown when the `status` prop is set. Defaults to `warn`.',
|
|
54
|
+
type: `['warn', 'info', 'error']`,
|
|
55
|
+
status: 'optional'
|
|
56
|
+
},
|
|
57
|
+
skeleton: {
|
|
58
|
+
doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
status: 'optional'
|
|
61
|
+
},
|
|
62
|
+
'[Space](/uilib/layout/space/properties)': {
|
|
63
|
+
doc: 'Spacing properties like `top` or `bottom` are supported.',
|
|
64
|
+
type: ['string', 'object'],
|
|
65
|
+
status: 'optional'
|
|
66
|
+
},
|
|
67
|
+
sidebar_id: {
|
|
68
|
+
doc: '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.',
|
|
69
|
+
type: 'string',
|
|
70
|
+
status: 'deprecated'
|
|
71
|
+
},
|
|
72
|
+
step_title_extended: {
|
|
73
|
+
doc: 'Descriptive label for `<StepIndicatorModal />`. Must contain `%step` and `%count` to interpolate `current_step` and `stepCount` into the text. Defaults to `You are on step %step of %count`.',
|
|
74
|
+
type: 'string',
|
|
75
|
+
status: 'deprecated'
|
|
76
|
+
},
|
|
77
|
+
on_item_render: {
|
|
78
|
+
doc: 'Deprecated, just use step item `title`. Callback function whose return is rendered inside each step instead of the default render. Has to return a React Node. Receives parameter `{ StepItem, element, attributes, props, context }`, where `props` also includes all props from the step object (like `title` or `status`) and the `<StepItem>` is a component that can be used to wrap your returned content.',
|
|
79
|
+
type: 'function',
|
|
80
|
+
status: 'deprecated'
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
export const StepIndicatorEvents = {
|
|
84
|
+
on_click: {
|
|
85
|
+
doc: 'Will be called when the user clicks on any clickable step in the list. Is called right before `on_change`. Receives parameter `{ event, item, current_step, currentStep }`',
|
|
86
|
+
type: 'function',
|
|
87
|
+
status: 'optional'
|
|
88
|
+
},
|
|
89
|
+
on_change: {
|
|
90
|
+
doc: 'Will be called when the user changes step by clicking in the steps list (changing the `current_step` prop does not trigger the event). Receives parameter `{ event, item, current_step, currentStep }`',
|
|
91
|
+
type: 'function',
|
|
92
|
+
status: 'optional'
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
export const StepIndicatorStepProperties = {
|
|
96
|
+
title: {
|
|
97
|
+
doc: 'The title of the step.',
|
|
98
|
+
type: ['string', 'React.ReactNode'],
|
|
99
|
+
status: 'required'
|
|
100
|
+
},
|
|
101
|
+
is_current: {
|
|
102
|
+
doc: 'If set to `true`, this item step will be set as the current selected step. This can be used instead of `current_step` on the main component.',
|
|
103
|
+
type: 'boolean',
|
|
104
|
+
status: 'optional'
|
|
105
|
+
},
|
|
106
|
+
inactive: {
|
|
107
|
+
doc: 'If set to `true`, this item step will be handled as an inactive step and will not be clickable. Defaults to `false`.',
|
|
108
|
+
type: 'boolean',
|
|
109
|
+
status: 'optional'
|
|
110
|
+
},
|
|
111
|
+
disabled: {
|
|
112
|
+
doc: 'If set to `true`, this step will be handled the same as `inactive` as well as getting a disabled mouseover and `aria-disabled="true`. Defaults to `false`.',
|
|
113
|
+
type: 'boolean',
|
|
114
|
+
status: 'optional'
|
|
115
|
+
},
|
|
116
|
+
status: {
|
|
117
|
+
doc: 'Is used to set the status text.',
|
|
118
|
+
type: ['string', 'React.ReactNode'],
|
|
119
|
+
status: 'optional'
|
|
120
|
+
},
|
|
121
|
+
status_state: {
|
|
122
|
+
doc: 'In case the status state should be `info` or `error`. Defaults to `warn`.',
|
|
123
|
+
type: [`'warn'`, `'info'`, `'error'`],
|
|
124
|
+
status: 'optional'
|
|
125
|
+
},
|
|
126
|
+
on_render: {
|
|
127
|
+
doc: 'Deprecated, just use `title`. Callback function whose return is rendered inside the step instead of the default render (or `on_item_render`). Has to return a React Node. <br/> Receives parameter `{ StepItem, element, attributes, props, context }`, where `props` also includes all props in the step object (like `title` or `status`) and the `<StepItem>` is a component that can be used to wrap your returned content.',
|
|
128
|
+
type: 'function',
|
|
129
|
+
status: 'deprecated'
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
export const StepIndicatorStepEvents = {
|
|
133
|
+
on_click: {
|
|
134
|
+
doc: "Called when user clicks the step. Is called right before the main component's `on_click`. Receives parameter `{ event, item, current_step, currentStep }`",
|
|
135
|
+
type: 'function',
|
|
136
|
+
status: 'optional'
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
//# sourceMappingURL=StepIndicatorDocs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepIndicatorDocs.js","names":["StepIndicatorProperties","mode","doc","type","status","data","current_step","overview_title","step_title","hide_numbers","no_animation","expandedInitially","outset","status_state","skeleton","sidebar_id","step_title_extended","on_item_render","StepIndicatorEvents","on_click","on_change","StepIndicatorStepProperties","title","is_current","inactive","disabled","on_render","StepIndicatorStepEvents"],"sources":["../../../../src/components/step-indicator/StepIndicatorDocs.ts"],"sourcesContent":["import { PropertiesTableProps } from '../../shared/types'\n\nexport const StepIndicatorProperties: PropertiesTableProps = {\n mode: {\n doc: 'Defines how the StepIndicator should work. Use `static` for non-interactive steps. Use `strict` for a chronological step order, also, the user can navigate between visited steps. Use `loose` if the user should be able to navigate freely.',\n type: [`'static'`, `'strict'`, `'loose'`],\n status: 'required',\n },\n data: {\n doc: 'Defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See below for properties of `STEP_DATA`.',\n type: ['[Step Item](#step-item-properties)[]', 'string[]'],\n status: 'required',\n },\n current_step: {\n doc: 'Defines the initial step starting from 0. Also defines the furthest step visited when `mode=\"strict\"`. Will update to the new step if changed (but will not trigger the `on_change` event). Defaults to `0`.',\n type: 'number',\n status: 'optional',\n },\n overview_title: {\n doc: 'The title shown inside the `<StepIndicatorModal />` supplemental screen reader text for the `<StepIndicatorTriggerButton />`. Defaults to `Steps Overview`.',\n type: 'string',\n status: 'optional',\n },\n step_title: {\n doc: 'Label for `<StepIndicatorTriggerButton />` and screen reader text for `<StepIndicatorItem />`. Must contain `%step` and `%count` to interpolate `current_step` and `stepCount` into the text. Defaults to `Step %step of %count`.',\n type: 'string',\n status: 'optional',\n },\n hide_numbers: {\n doc: 'Define whether to show automatically counted numbers or not. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n no_animation: {\n doc: 'If set to `true`, the height animation on step change and list expansion will be omitted. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n expandedInitially: {\n doc: 'Set to `true` to have the list be expanded initially. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n outset: {\n doc: 'Same as `outset` in [Card](/uilib/components/card/properties). Defaults to `false`',\n type: 'boolean',\n status: 'optional',\n },\n status: {\n doc: 'Text for status shown below the step indicator when it is not expanded. Defaults to `undefined`',\n type: 'string',\n status: 'optional',\n },\n status_state: {\n doc: 'The type of status shown when the `status` prop is set. Defaults to `warn`.',\n type: `['warn', 'info', 'error']`,\n status: 'optional',\n },\n skeleton: {\n doc: 'If set to `true`, an overlaying skeleton with animation will be shown.',\n type: 'boolean',\n status: 'optional',\n },\n '[Space](/uilib/layout/space/properties)': {\n doc: 'Spacing properties like `top` or `bottom` are supported.',\n type: ['string', 'object'],\n status: 'optional',\n },\n sidebar_id: {\n doc: '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.',\n type: 'string',\n status: 'deprecated',\n },\n step_title_extended: {\n doc: 'Descriptive label for `<StepIndicatorModal />`. Must contain `%step` and `%count` to interpolate `current_step` and `stepCount` into the text. Defaults to `You are on step %step of %count`.',\n type: 'string',\n status: 'deprecated',\n },\n on_item_render: {\n doc: 'Deprecated, just use step item `title`. Callback function whose return is rendered inside each step instead of the default render. Has to return a React Node. Receives parameter `{ StepItem, element, attributes, props, context }`, where `props` also includes all props from the step object (like `title` or `status`) and the `<StepItem>` is a component that can be used to wrap your returned content.',\n type: 'function',\n status: 'deprecated',\n },\n}\n\nexport const StepIndicatorEvents: PropertiesTableProps = {\n on_click: {\n doc: 'Will be called when the user clicks on any clickable step in the list. Is called right before `on_change`. Receives parameter `{ event, item, current_step, currentStep }`',\n type: 'function',\n status: 'optional',\n },\n on_change: {\n doc: 'Will be called when the user changes step by clicking in the steps list (changing the `current_step` prop does not trigger the event). Receives parameter `{ event, item, current_step, currentStep }`',\n type: 'function',\n status: 'optional',\n },\n}\n\nexport const StepIndicatorStepProperties: PropertiesTableProps = {\n title: {\n doc: 'The title of the step.',\n type: ['string', 'React.ReactNode'],\n status: 'required',\n },\n is_current: {\n doc: 'If set to `true`, this item step will be set as the current selected step. This can be used instead of `current_step` on the main component.',\n type: 'boolean',\n status: 'optional',\n },\n inactive: {\n doc: 'If set to `true`, this item step will be handled as an inactive step and will not be clickable. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n disabled: {\n doc: 'If set to `true`, this step will be handled the same as `inactive` as well as getting a disabled mouseover and `aria-disabled=\"true`. Defaults to `false`.',\n type: 'boolean',\n status: 'optional',\n },\n status: {\n doc: 'Is used to set the status text.',\n type: ['string', 'React.ReactNode'],\n status: 'optional',\n },\n status_state: {\n doc: 'In case the status state should be `info` or `error`. Defaults to `warn`.',\n type: [`'warn'`, `'info'`, `'error'`],\n status: 'optional',\n },\n on_render: {\n doc: 'Deprecated, just use `title`. Callback function whose return is rendered inside the step instead of the default render (or `on_item_render`). Has to return a React Node. <br/> Receives parameter `{ StepItem, element, attributes, props, context }`, where `props` also includes all props in the step object (like `title` or `status`) and the `<StepItem>` is a component that can be used to wrap your returned content.',\n type: 'function',\n status: 'deprecated',\n },\n}\n\nexport const StepIndicatorStepEvents: PropertiesTableProps = {\n on_click: {\n doc: \"Called when user clicks the step. Is called right before the main component's `on_click`. Receives parameter `{ event, item, current_step, currentStep }`\",\n type: 'function',\n status: 'optional',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,uBAA6C,GAAG;EAC3DC,IAAI,EAAE;IACJC,GAAG,EAAE,+OAA+O;IACpPC,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;IACzCC,MAAM,EAAE;EACV,CAAC;EACDC,IAAI,EAAE;IACJH,GAAG,EAAE,8IAA8I;IACnJC,IAAI,EAAE,CAAC,sCAAsC,EAAE,UAAU,CAAC;IAC1DC,MAAM,EAAE;EACV,CAAC;EACDE,YAAY,EAAE;IACZJ,GAAG,EAAE,8MAA8M;IACnNC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDG,cAAc,EAAE;IACdL,GAAG,EAAE,6JAA6J;IAClKC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDI,UAAU,EAAE;IACVN,GAAG,EAAE,mOAAmO;IACxOC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE;EACV,CAAC;EACDK,YAAY,EAAE;IACZP,GAAG,EAAE,mFAAmF;IACxFC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDM,YAAY,EAAE;IACZR,GAAG,EAAE,gHAAgH;IACrHC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDO,iBAAiB,EAAE;IACjBT,GAAG,EAAE,4EAA4E;IACjFC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDQ,MAAM,EAAE;IACNV,GAAG,EAAE,oFAAoF;IACzFC,IAAI,E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E,8IAA8I;IACnJC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDoB,QAAQ,EAAE;IACRtB,GAAG,EAAE,sHAAsH;IAC3HC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDqB,QAAQ,EAAE;IACRvB,GAAG,EAAE,4JAA4J;IACjKC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE;EACV,CAAC;EACDA,MAAM,EAAE;IACNF,GAAG,EAAE,iCAAiC;IACtCC,IAAI,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACnCC,MAAM,EAAE;EACV,CAAC;EACDS,YAAY,EAAE;IACZX,GAAG,EAAE,2EAA2E;IAChFC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC;IACrCC,MAAM,EAAE;EACV,CAAC;EACDsB,SAAS,EAAE;IACTxB,GAAG,EAAE,iaAAia;IACtaC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC;AAED,OAAO,MAAMuB,uBAA6C,GAAG;EAC3DR,QAAQ,EAAE;IACRjB,GAAG,EAAE,2JAA2J;IAChKC,IAAI,EAAE,UAAU;IAChBC,MAAM,EAAE;EACV;AACF,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { AnchorAllProps } from '../anchor/Anchor';
|
|
7
7
|
import { StepIndicatorMouseEvent, StepIndicatorRenderCallback } from './StepIndicator';
|
|
8
8
|
export type StepIndicatorStatusState = 'warn' | 'info' | 'error';
|
|
9
9
|
export type StepIndicatorItemProps = Omit<React.HTMLProps<HTMLElement>, 'title' | 'data'> & {
|
|
@@ -18,7 +18,7 @@ export type StepIndicatorItemProps = Omit<React.HTMLProps<HTMLElement>, 'title'
|
|
|
18
18
|
*/
|
|
19
19
|
inactive?: boolean;
|
|
20
20
|
/**
|
|
21
|
-
* If set to true, this item step will be
|
|
21
|
+
* If set to true, this item step will not be clickable. Same as `inactive`, but will also add the `aria-disabled="true"` .
|
|
22
22
|
* Defaults to false.
|
|
23
23
|
*/
|
|
24
24
|
disabled?: boolean;
|
|
@@ -33,6 +33,7 @@ export type StepIndicatorItemProps = Omit<React.HTMLProps<HTMLElement>, 'title'
|
|
|
33
33
|
status_state?: StepIndicatorStatusState;
|
|
34
34
|
/**
|
|
35
35
|
* Callback function to manipulate or wrap the step item. Has to return a React Node. You receive an object `{ StepItem, element, attributes, props, context }`.
|
|
36
|
+
* @deprecated no longer does anything other than the `title` prop
|
|
36
37
|
*/
|
|
37
38
|
on_render?: ({ StepItem, element, attributes, props, context, }: StepIndicatorRenderCallback) => React.ReactNode;
|
|
38
39
|
/**
|
|
@@ -42,18 +43,17 @@ export type StepIndicatorItemProps = Omit<React.HTMLProps<HTMLElement>, 'title'
|
|
|
42
43
|
currentItemNum: number;
|
|
43
44
|
};
|
|
44
45
|
declare function StepIndicatorItem({ status_state: status_state_default, inactive: inactive_default, disabled: disabled_default, ...restOfProps }: StepIndicatorItemProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
-
export type StepItemButtonProps =
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
export declare function StepItemButton({ children, className, status, status_state, inner_ref, ...props }: StepItemButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export type StepItemButtonProps = AnchorAllProps & Pick<StepIndicatorItemProps, 'status' | 'status_state'>;
|
|
47
|
+
export declare function StepItemButton({ children, className, status, status_state, innerRef, ...props }: StepItemButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
49
48
|
export type StepItemWrapperProps = React.HTMLProps<HTMLElement> & {
|
|
49
|
+
/** Content inside the step button */
|
|
50
50
|
children?: React.ReactNode;
|
|
51
|
+
/** @deprecated can only change the render of content inside the button */
|
|
51
52
|
number?: number;
|
|
52
|
-
/**
|
|
53
|
-
* Define whether to show automatically counted numbers or not. Defaults to `false`.
|
|
54
|
-
*/
|
|
53
|
+
/** @deprecated can only hide numbers in main component */
|
|
55
54
|
hide_numbers?: boolean;
|
|
55
|
+
/** @deprecated can only change the render of content inside the button */
|
|
56
56
|
status?: string | React.ReactNode;
|
|
57
57
|
};
|
|
58
|
-
export declare function StepItemWrapper({ children
|
|
58
|
+
export declare function StepItemWrapper({ children }: StepItemWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
59
59
|
export default StepIndicatorItem;
|