diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/Examples.js b/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/Examples.js
index 1ddb25a587a..ed520d3c936 100644
--- a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/Examples.js
+++ b/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/Examples.js
@@ -311,59 +311,3 @@ render()
}
)
-
-export const StepIndicatorUrls = () =>
- typeof document ===
- 'undefined' ? null /* because of createBrowserHistory */ : (
-
- {
- /* jsx */ `
-const history = createBrowserHistory()
-const StepIndicatorWithUrl = () => {
- const [activeUrl, setActiveUrl] = React.useState(history.location.search)
- React.useState(() => {
- const unlisten = history.listen(({ search }) => {
- setActiveUrl(search)
- })
- return () => unlisten()
- }, [])
- return ( {
- try {
- event.preventDefault()
- history.push(item.url)
- } catch (e) {
- //
- }
- }}
- data={[
- {
- title: 'Om din nye bolig',
- url: '?a'
- },
- {
- title: 'Ditt lån og egenkapital',
- url: '?b'
- },
- {
- title: 'Oppsummering',
- url: '?c',
- url_future: ''
- }
- ]}
- />)
-}
-render(<>
-
- Navigate to B
->)
-`
- }
-
- )
diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/demos-v1.md b/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/demos-v1.md
deleted file mode 100644
index a4d019dcb3b..00000000000
--- a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/demos-v1.md
+++ /dev/null
@@ -1,45 +0,0 @@
----
-showTabs: true
-draft: true
----
-
-import {
-StepIndicatorV1WithNavigation,
-StepIndicatorV1Customized,
-StepIndicatorV1Urls,
-StepIndicatorV1NoNavigation,
-StepIndicatorV1StringsOnly,
-StepIndicatorV1CustomRenderer,
-} from 'Docs/uilib/components/step-indicator/v1/Examples'
-
-## Demos v1
-
-### StepIndicator with navigation
-
-Every visited step can be clicked.
-
-
-
-### StepIndicator customized
-
-Completely customized step indicator.
-
-
-
-### StepIndicator with urls
-
-Using urls for visited steps only.
-
-
-
-### Default StepIndicator with no navigation
-
-
-
-### Default StepIndicator with strings only
-
-
-
-### StepIndicator with custom renderer.
-
-
diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/demos.md b/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/demos.md
index 3d59f28017c..435a195990c 100644
--- a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/demos.md
+++ b/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/demos.md
@@ -7,7 +7,6 @@ StepIndicatorStatic,
StepIndicatorStrict,
StepIndicatorLoose,
StepIndicatorCustomized,
-StepIndicatorUrls,
StepIndicatorSidebar,
StepIndicatorTextOnly,
StepIndicatorCustomRenderer,
@@ -61,11 +60,3 @@ Completely customized step indicator.
### StepIndicator with a custom renderer.
-
-### StepIndicator with urls
-
-**NB:** The URL support is deprecated. You have to handle this kind of logic internally in your application from v10 of `@dnb/eufemia`.
-
-You find more [v1 demos here](/uilib/components/step-indicator/demos-v1).
-
-
diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/info.md b/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/info.md
index 927891e9dbf..5a01427d4b3 100644
--- a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/info.md
+++ b/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/info.md
@@ -110,6 +110,3 @@ The API has been simplified and some properties have to be changed by the next m
- Add a property called `mode="strict"` (choose your mode)
- Add a property called `sidebar_id` with an unique ID.
- Optional, place `` in your layout.
-- URL handling is deprecated and will be removed in v10
-
-The documentation is updated and every property name that will be deprecated is clearly marked with a strike-through line. You will get a console warning during development when you use outdated properties.
diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/properties.md b/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/properties.md
index 3939d63f0d6..3b9584f4caa 100644
--- a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/properties.md
+++ b/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/properties.md
@@ -4,36 +4,29 @@ showTabs: true
## Component Properties
-| Properties | Description |
-| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Properties | Description |
+| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mode` | _(required)_ 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. |
-| `data` | _(required)_ defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See parameters and the example above. |
-| `sidebar_id` | _(required)_ a unique string-based ID in order to bind together the main component and the sidebar (``). Both have to get the same ID. |
-| `current_step` | _(optional)_ defines the active number marked step starting by 0. Defaults to `0`. |
-| `hide_numbers` | _(optional)_ define whether to show automatically counted numbers or not. Defaults to `false`. |
-| `no_animation` | _(optional)_ if set to `true`, the height animation on the step items and the drawer button will be omitted. Defaults to false. |
-| `on_item_render` | _(optional)_ callback function to manipulate or wrap every item. Has to return a React Node. You receive an object you can use in your custom HOC `{ StepItem, element, attributes, props, context }`. |
-| ~~`use_navigation`~~ | _(deprecated)_ use `mode="static"` instead – if set to true, every achieved step (and the current step) has an item with a [Button](/uilib/components/button) so the user can navigate back and forth. |
-| ~~`active_item`~~ | _(deprecated)_ defines the active number marked step starting by 0. Defaults to `0`. |
-| ~~`active_url`~~ | _(deprecated)_ defines the active url marked step. |
-| [Space](/uilib/components/space/properties) | _(optional)_ spacing properties like `top` or `bottom` are supported. |
+| `data` | _(required)_ defines the data/steps showing up in a JavaScript Array or JSON format like `[{title,is_current}]`. See parameters and the example above. |
+| `sidebar_id` | _(required)_ a unique string-based ID in order to bind together the main component and the sidebar (``). Both have to get the same ID. |
+| `current_step` | _(optional)_ defines the active number marked step starting by 0. Defaults to `0`. |
+| `hide_numbers` | _(optional)_ define whether to show automatically counted numbers or not. Defaults to `false`. |
+| `no_animation` | _(optional)_ if set to `true`, the height animation on the step items and the drawer button will be omitted. Defaults to false. |
+| `on_item_render` | _(optional)_ callback function to manipulate or wrap every item. Has to return a React Node. You receive an object you can use in your custom HOC `{ StepItem, element, attributes, props, context }`. |
+| [Space](/uilib/components/space/properties) | _(optional)_ spacing properties like `top` or `bottom` are supported. |
## Steps Parameters
-| Parameters | Description |
-| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `title` | _(required)_ the title as a string or React element. |
-| `is_current` | _(optional)_ if set to `true`, this item step will be set as the current current selected step. This can be used instead of `current_step` on the component itself. |
-| `inactive` | _(optional)_ if set to `true`, this item step will be handled as an inactive step and will not be clickable. Defaults to false. |
-| `disabled` | _(optional)_ if set to `true`, this item step will be visible as an disabled button and will not be clickable. Defaults to false. |
-| `status` | _(optional)_ a status text. |
-| `status_state` | _(optional)_ In case the status state should be `info` or `error`. Defaults to `warn`. |
-| `on_render` | _(optional)_ callback function to manipulate or wrap a certain item. Has to return a React Node. |
-| `on_click` | _(optional)_ event function that gets invoked once the users clicks on the active item. |
-| ~~`is_active`~~ | _(deprecated)_ if set to `is_active`: true, this item step will be handled as an active (activated) step and may be clickable . |
-| ~~`url`~~ | _(deprecated)_ sets the url, showing on every step, if not `url_future` is set. |
-| ~~`url_future`~~ | _(deprecated)_ sets the url, showing only on the future steps. Can be used to _reset_ the future steps individually. |
-| ~~`url_passed`~~ | _(deprecated)_ sets the url, showing only on the passed steps. Can be used to _reset_ the passed steps individually. |
+| Parameters | Description |
+| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --- |
+| `title` | _(required)_ the title as a string or React element. |
+| `is_current` | _(optional)_ if set to `true`, this item step will be set as the current current selected step. This can be used instead of `current_step` on the component itself. |
+| `inactive` | _(optional)_ if set to `true`, this item step will be handled as an inactive step and will not be clickable. Defaults to false. |
+| `disabled` | _(optional)_ if set to `true`, this item step will be visible as an disabled button and will not be clickable. Defaults to false. |
+| `status` | _(optional)_ a status text. |
+| `status_state` | _(optional)_ In case the status state should be `info` or `error`. Defaults to `warn`. |
+| `on_render` | _(optional)_ callback function to manipulate or wrap a certain item. Has to return a React Node. |
+| `on_click` | _(optional)_ event function that gets invoked once the users clicks on the active item. | | |
## Steps example
diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/v1/Examples.js b/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/v1/Examples.js
deleted file mode 100644
index 63ed274cb6c..00000000000
--- a/packages/dnb-design-system-portal/src/docs/uilib/components/step-indicator/v1/Examples.js
+++ /dev/null
@@ -1,226 +0,0 @@
-/**
- * UI lib Component Example
- *
- */
-
-import React from 'react'
-import ComponentBox from 'dnb-design-system-portal/src/shared/tags/ComponentBox'
-import { createBrowserHistory } from 'history'
-
-export const StepIndicatorV1WithNavigation = () => (
-
- {`
- {
- console.log('on_change', currentItem)
- }}
- data={[
- {
- title: 'Om din nye bolig',
- },
- {
- title: 'Ditt lån og egenkapital',
- on_click: ({ currentItem }) =>
- console.log(currentItem)
- },
- {
- title: 'Oppsummering',
- }
- ]}
-/>
- `}
-
-)
-
-export const StepIndicatorV1Customized = () => (
-
- {`
-function CustomStepIndicator({ children, ...props }) {
- const [step, setStep] = React.useState(0)
- return (
- <>
- setStep(currentItem)}
- {...props}
- />
-
- {children(step)}
-
- >
- )
-}
-render(
- {(step) => {
- switch (step) {
- case 0:
- return <>Step One>
- case 1:
- return <>Step Two>
- default:
- return <>Fallback>
- }
- }}
-)
- `}
-
-)
-
-export const StepIndicatorV1Urls = () =>
- typeof document ===
- 'undefined' ? null /* because of createBrowserHistory */ : (
-
- {`
-const history = createBrowserHistory()
-const StepIndicatorWithUrl = () => {
- const [activeUrl, setActiveUrl] = React.useState(history.location.search)
- React.useState(() => {
- const unlisten = history.listen(({ search }) => {
- setActiveUrl(search)
- })
- return () => unlisten()
- }, [])
- return ( {
- try {
- e.event.preventDefault()
- history.push(e.item.url)
- } catch (e) {
- //
- }
- }}
- data={[
- {
- title: 'Om din nye bolig',
- url: '?a'
- },
- {
- title: 'Ditt lån og egenkapital',
- url: '?b'
- },
- {
- title: 'Oppsummering',
- url: '?c',
- url_future: ''
- }
- ]}
- />)
-}
-render(<>
-
- Navigate to B
->)
- `}
-
- )
-
-export const StepIndicatorV1NoNavigation = () => (
-
- {
- /* @jsx */ `
-
- `
- }
-
-)
-
-export const StepIndicatorV1StringsOnly = () => (
-
- {
- /* @jsx */ `
-
- `
- }
-
-)
-
-export const StepIndicatorV1CustomRenderer = () => (
-
- {`
- {
- console.log('on_change', currentItem)
- }}
- on_item_render={({ StepItem }) => {
- return (
- console.log(e)}
- />
- )
- }}
- data={[
- {
- title: 'Om din nye bolig',
- },
- {
- title: 'Ditt lån og egenkapital',
- on_click: ({ currentItem }) =>
- console.log(currentItem),
- on_render: ({ StepItem, props, params }) => (
- console.log(e)}
- />
- )
- },
- {
- title: 'Oppsummering',
- /*
- We can also overwrite the states
- is_active: true
- is_current: true
- */
- }
- ]}
-/>
- `}
-
-)
diff --git a/packages/dnb-design-system-portal/src/docs/uilib/demos/eufemia-demo/form-demo-01.js b/packages/dnb-design-system-portal/src/docs/uilib/demos/eufemia-demo/form-demo-01.js
index 3a6659123bc..7c52f501f33 100644
--- a/packages/dnb-design-system-portal/src/docs/uilib/demos/eufemia-demo/form-demo-01.js
+++ b/packages/dnb-design-system-portal/src/docs/uilib/demos/eufemia-demo/form-demo-01.js
@@ -26,13 +26,13 @@ import {
Input,
Textarea,
Section,
- StepIndicator,
ToggleButton,
Icon,
Button,
Switch,
Space,
GlobalStatus,
+ Tabs,
} from '@dnb/eufemia/src/components'
import {
save as SaveIcon,
@@ -61,21 +61,14 @@ const Header = () => (
Card complaint
-
- {
- console.log('StepIndicator.on_change', e)
- }}
/>
diff --git a/packages/dnb-eufemia/src/components/step-indicator/StepIndicator.js b/packages/dnb-eufemia/src/components/step-indicator/StepIndicator.js
index cb17ebe2986..4ff020ec955 100644
--- a/packages/dnb-eufemia/src/components/step-indicator/StepIndicator.js
+++ b/packages/dnb-eufemia/src/components/step-indicator/StepIndicator.js
@@ -13,7 +13,6 @@ import {
import StepIndicatorSidebar from './StepIndicatorSidebar'
import StepIndicatorModal from './StepIndicatorModal'
-import StepIndicatorList from './StepIndicatorList'
import { StepIndicatorProvider } from './StepIndicatorContext'
import {
stepIndicatorPropTypes,
@@ -43,66 +42,15 @@ export default class StepIndicator extends React.PureComponent {
)
}
- // Deprecated warning
- canWarn = () =>
- typeof process !== 'undefined' &&
- process.env.NODE_ENV === 'development'
-
constructor(props) {
super(props)
this.state = {
- // deprecated
- isV1: !props.mode,
sidebar_id: props.internalId || props.sidebar_id || makeUniqueId(),
}
-
- if (this.canWarn()) {
- // deprecated warning
- if (props.active_item !== null) {
- warn(
- 'StepIndicator: `active_item` is deprecated. Use `current_step` instead.'
- )
- }
- // deprecated warning
- if (props.use_navigation !== null) {
- warn(
- 'StepIndicator: `use_navigation` is deprecated. Use `mode="strict"` or `mode="loose"` instead.'
- )
- }
- // deprecated warning
- if (props.active_url !== null) {
- warn(
- 'StepIndicator: The usage of `active_url` is deprecated. You will have to handle your URLs by yourself in the next major version.'
- )
- }
- }
-
- const sn = 'show_numbers'
- if (typeof props[sn] !== 'undefined') {
- warn(
- 'StepIndicator: `show_numbers` is deprecated. Use `hide_numbers` instead.'
- )
- }
}
render() {
- // deprecated
- if (this.state.isV1) {
- return (
-
-
-
-
-
- )
- }
-
if (!this.props.sidebar_id && this.props.mode) {
warn(
'StepIndicator needs an unique "sidebar_id" property, also on the '
@@ -113,9 +61,8 @@ export default class StepIndicator extends React.PureComponent {
-