diff --git a/packages/dnb-design-system-portal/src/docs/uilib/about-the-lib/releases/eufemia/v10-info.md b/packages/dnb-design-system-portal/src/docs/uilib/about-the-lib/releases/eufemia/v10-info.md
index e1e39e81465..c885cf0d3ca 100644
--- a/packages/dnb-design-system-portal/src/docs/uilib/about-the-lib/releases/eufemia/v10-info.md
+++ b/packages/dnb-design-system-portal/src/docs/uilib/about-the-lib/releases/eufemia/v10-info.md
@@ -139,6 +139,10 @@ When you convert from `` to `` – follow these steps:
1. In v10, InputMasked **allows leading zeros**. To prevent that behaviour, the property `allowLeadingZeroes` has changed to `disallowLeadingZeroes`.
+### [FormRow](/uilib/components/form-row)
+
+1. The FormRow properties `indent` and `indent_offset` were removed.
+
### Removal of `data-testid` in components
- [InfoCard](/uilib/components/info-card).
diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/Examples.js b/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/Examples.tsx
similarity index 51%
rename from packages/dnb-design-system-portal/src/docs/uilib/components/form-row/Examples.js
rename to packages/dnb-design-system-portal/src/docs/uilib/components/form-row/Examples.tsx
index dd08f80ad73..59e782c1d03 100644
--- a/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/Examples.js
+++ b/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/Examples.tsx
@@ -25,6 +25,7 @@ import {
FormSet,
FormRow,
} from '@dnb/eufemia/src/components'
+import { Ingress } from '@dnb/eufemia/src/elements'
const TestStyles = styled.div`
/* make sure our input gets an explicit width, because of mac/linux rendering differences */
@@ -70,35 +71,17 @@ const Box = styled(Space)`
export const FormRowVerticalAlignedLabels = () => (
- {
- /* jsx */ `
-
- Custom legend:
-
- }
- label_direction="vertical"
->
-
-
-
-`
- }
-
-
-)
-
-export const FormRowLegendIndentUsage = () => (
-
-
- {
- /* jsx */ `
-
-
-
-`
- }
+
+ Custom legend:
+
+ }
+ label_direction="vertical"
+ >
+
+
+
)
@@ -106,77 +89,53 @@ export const FormRowLegendIndentUsage = () => (
export const FormRowSectionStyle = () => (
- {
- /* jsx */ `
-
-
-
-`
- }
+
+
+
)
export const FormRowCombineVerticalAndHorizontal = () => (
-
- {
- /* jsx */ `
-// 1. In the nested FormRow we reset the layout to not be vertical
-// 2. So we can use a different direction ("label_direction")
-render(
-
- Custom vertical legend:
-
- }
- vertical
- >
-
-
-
-
-
-
-
-
-)
-`
- }
-
-
-)
-
-export const FormRowCustomIndentLayout = () => (
-
-
- {
- /* jsx */ `
-const CustomRow = styled(FormRow)\`
- align-items: flex-end;
- > .dnb-form-label {
- max-width: 12rem;
- background: var(--color-white);
- color: var(--color-fire-red);
- }
-\`
-render(
-
-
-
-)
-`
- }
+
+ {() => {
+ // 1. In the nested FormRow we reset the layout to not be vertical
+ // 2. So we can use a different direction ("label_direction")
+ return (
+
+ Custom vertical legend:
+
+ }
+ vertical
+ >
+
+
+
+
+
+
+
+
+ )
+ }}
)
@@ -184,13 +143,12 @@ render(
export const FormRowDefault = () => (
- {
- /* jsx */ `
-
-
-
-`
- }
+
+
+
)
@@ -198,43 +156,51 @@ export const FormRowDefault = () => (
export const FormRowVertical = () => (
- {
- /* jsx */ `
-
-
-
-
-`
- }
+
+
+
+
)
export const FormRowVerticalDirection = () => (
-
- {
- /* jsx */ `
-const CustomRow = styled(FormRow)\`
- .dnb-form-row__content .dnb-button {
- align-self: flex-end;
- transform: translateY(0.25rem); /* 4px down */
- }
-\`
-render(
-Legend }
- label_direction="vertical"
->
-
-
-
-)
-`
- }
+
+ {() => {
+ const CustomRow = styled(FormRow)`
+ .dnb-form-row__content .dnb-button {
+ align-self: flex-end;
+ transform: translateY(0.25rem); /* 4px down */
+ }
+ `
+ return (
+
+ Legend
+
+ }
+ label_direction="vertical"
+ >
+
+
+
+ )
+ }}
)
@@ -242,19 +208,13 @@ render(
export const FormRowNoWrap = () => (
- {
- /* jsx */ `
-
-
-
-
-`
- }
+
+
+
+
)
@@ -262,21 +222,15 @@ export const FormRowNoWrap = () => (
export const FormRowWrap = () => (
- {
- /* jsx */ `
-
-
-
-
-
-`
- }
+
+
+
+
+
)
@@ -284,19 +238,22 @@ export const FormRowWrap = () => (
export const FormRowLegendUsage = () => (
- {
- /* jsx */ `
-
-
-
-
-
-
-
-
-
-`
- }
+
+
+
+
+
+
+
+
+
)
@@ -304,180 +261,190 @@ export const FormRowLegendUsage = () => (
export const FormRowInheritContext = () => (
- {
- /* jsx */ `
-
-
-
-
-`
- }
+
+
+
+
)
export const FormRowDifferentDirections = () => (
-
- {
- /* jsx */ `
-const PhoneRow = styled(FormRow)\`
-.dnb-dropdown__shell,
-.dnb-dropdown__list {
- width: auto;
- min-width: 6rem;
-}
-@media screen and (max-width: 40em) {
- .dnb-dropdown {
- margin-bottom: 0.5rem;
- }
-\`
-render(
-
-
-
-
-
-
-
-)
-`
- }
+
+ {() => {
+ const PhoneRow = styled(FormRow)`
+ .dnb-dropdown__shell,
+ .dnb-dropdown__list {
+ width: auto;
+ min-width: 6rem;
+ }
+ @media screen and (max-width: 40em) {
+ .dnb-dropdown {
+ margin-bottom: 0.5rem;
+ }
+ }
+ `
+ return (
+
+
+
+
+
+
+
+ )
+ }}
)
-export default class FormRowVisualTests extends React.PureComponent {
- render() {
- if (!global.IS_TEST) {
- return null
- }
- return (
-
-
-
- {
- /* jsx */ `
+const VisualTestHorizontalDirection = () => (
+
+ {
+ /* jsx */ `
`
- }
-
-
- {
- /* jsx */ `
+ }
+
+)
+
+const VisualTestVerticalDirection = () => (
+
+ {
+ /* jsx */ `
`
- }
-
-
- {
- /* jsx */ `
+ }
+
+)
+
+const VisualTestVerticalEverything = () => (
+
+ {
+ /* jsx */ `
`
- }
-
-
- {
- /* jsx */ `
+ }
+
+)
+
+const VisualTestLabelDirection = () => (
+
+ {
+ /* jsx */ `
`
- }
-
-
- {
- /* jsx */ `
+ }
+
+)
+
+const VisualTestVerticalLabelDirectionNoLabels = () => (
+
+ {
+ /* jsx */ `
`
- }
-
-
- {
- /* jsx */ `
+ }
+
+)
+
+const VisualTestAllStretch = () => (
+
+ {
+ /* jsx */ `
`
- }
-
-
- {
- /* jsx */ `
+ }
+
+)
+
+const VisualTestHorizontalCentered = () => (
+
+ {
+ /* jsx */ `
`
- }
-
-
- )
+ }
+
+)
+
+export default function FormRowVisualTests() {
+ if (!global.IS_TEST) {
+ return null
}
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ )
}
export const AllComponents = ({
@@ -490,7 +457,7 @@ export const AllComponents = ({
left: horizontal ? 'small' : null,
top: !horizontal || vertical ? 'small' : null,
}
- let labels = {
+ let labels: Record = {
datePicker: 'DatePicker:',
dropdown: 'Dropdown:',
autocomplete: 'Autocomplete:',
diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/demos.md b/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/demos.md
index 24b33aa13c2..7661f147f60 100644
--- a/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/demos.md
+++ b/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/demos.md
@@ -4,10 +4,8 @@ showTabs: true
import FormRowVisualTests, {
FormRowVerticalAlignedLabels,
-FormRowLegendIndentUsage,
FormRowSectionStyle,
FormRowCombineVerticalAndHorizontal,
-FormRowCustomIndentLayout,
FormRowDefault,
FormRowVertical,
FormRowVerticalDirection,
@@ -56,10 +54,6 @@ Vertical label direction in combination with a button
-### Legend and indent usage
-
-
-
### Inherit context
@@ -74,10 +68,4 @@ The `label` property can be used to set a row label as well as the `section_styl
-### Custom indent layout
-
-Customize the `.dnb-form-row` styles. Instead of using the built in `indent` property.
-
-
-
diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/properties.md b/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/properties.md
index 7b0a7a12353..60aef9b3c37 100644
--- a/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/properties.md
+++ b/packages/dnb-design-system-portal/src/docs/uilib/components/form-row/properties.md
@@ -4,23 +4,21 @@ showTabs: true
## Properties
-| Properties | Description |
-| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `label` | _(optional)_ use either the `label` property or provide a custom one. |
-| `label_direction` | _(optional)_ use `label_direction="vertical"` to change the label/legend layout direction. Defaults to `horizontal`. |
-| `label_sr_only` | _(optional)_ use `true` to make the label only readable by screen readers. |
-| `direction` | _(optional)_ to define the layout direction on how the next component should be placed on. Can be either `vertical` or `horizontal`. Defaults to `horizontal`. |
-| `vertical` | _(optional)_ will force both `direction` and `label_direction` to be **vertical** if set to `true`. |
-| `centered` | _(optional)_ will center all children vertically as long as the screen does not hit a mobile width. |
-| `indent` | _(optional)_ indents the FormRow legend if the `direction` is `horizontal`. ~~Use `small`, `medium` and `large`~~. Defaults to `false`. If set to `true`, then `medium` is used. |
-| `indent_offset` | _(optional)_ in case the `direction` is `horizontal` and there is a label/legend, the content of the FormRow has to be moved up to be at the label/legend position. Depending on the components used inside, it has to be moved up based on the height. Sizes available: `xsmall`, `small`, `medium`, `m-large` (2.5rem), `x-large` and `xx-large` . Defaults to `medium`. |
-| `wrap` | _(optional)_ forces the content of a FormRow to wrap. Make sure you always define spacing as `right="..."` and not `left`, this way components will align left once they wrap. Defaults to `false`. |
-| `responsive` | _(optional)_ to force responsiveness on form components (like [Input](/uilib/components/input) and their labels ([FormLabel](/uilib/components/form-label)), set the prop to `true`. Defaults to `false`. |
-| `section_style` | _(optional)_ to enable the visual helper `.dnb-section` class. Use a supported modifier from the [Section component](/uilib/components/section/properties). Defaults to null. |
-| `section_spacing` | _(optional)_ to modify the `spacing`. Use a supported modifier from the [Section component](/uilib/components/section/properties). Defaults to null. |
-| `no_fieldset` | _(optional)_ if set to `true`, then the internal `legend` element will be a `label` instead, and no `
-
+
Vertical FormLabel for a Checkbox component Sapien rhoncus
sagittis pharetra ornare platea feugiat cras senectus viverra:
diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/DatePicker.test.js.snap b/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/DatePicker.test.js.snap
index 061e4dc4073..f631cb713f4 100644
--- a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/DatePicker.test.js.snap
+++ b/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/DatePicker.test.js.snap
@@ -4755,9 +4755,6 @@ html[data-whatinput=keyboard] .dnb-radio__focus {
order: 2;
padding-left: 0.5rem;
}
-.dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] .dnb-radio .dnb-form-label {
- margin-top: 0;
-}
:not(.dnb-radio-group) > .dnb-form-label + .dnb-radio {
vertical-align: top;
}
diff --git a/packages/dnb-eufemia/src/components/form-row/FormRow.js b/packages/dnb-eufemia/src/components/form-row/FormRow.js
index 19eb3c7a2c1..3c359965301 100644
--- a/packages/dnb-eufemia/src/components/form-row/FormRow.js
+++ b/packages/dnb-eufemia/src/components/form-row/FormRow.js
@@ -37,12 +37,10 @@ export const formRowPropTypes = {
no_label: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
no_fieldset: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
locale: PropTypes.string,
- indent: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
wrap: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
direction: PropTypes.oneOf(['vertical', 'horizontal']),
vertical: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
centered: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
- indent_offset: PropTypes.string,
section_style: PropTypes.string,
section_spacing: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
global_status_id: PropTypes.string,
@@ -73,12 +71,10 @@ export const formRowDefaultProps = {
no_label: false,
no_fieldset: null,
locale: null,
- indent: null,
wrap: null,
direction: null,
vertical: null,
centered: null,
- indent_offset: null,
section_style: null,
section_spacing: null,
global_status_id: null,
@@ -149,11 +145,9 @@ export default class FormRow extends React.PureComponent {
no_fieldset,
no_label,
locale,
- indent,
direction,
vertical,
centered,
- indent_offset,
section_style,
section_spacing,
global_status_id,
@@ -196,13 +190,6 @@ export default class FormRow extends React.PureComponent {
`dnb-form-row--${
isTrue(vertical) ? 'vertical' : label_direction
}-label`, // <-- has label
- indent &&
- !(
- isNested &&
- this.context.FormRow.hasLabel &&
- this.context.FormRow.indent
- ) &&
- `dnb-form-row__indent--${isTrue(indent) ? 'default' : indent}`,
centered && 'dnb-form-row--centered',
isNested && 'dnb-form-row--nested',
createSpacingClasses(props),
@@ -228,7 +215,6 @@ export default class FormRow extends React.PureComponent {
},
itsMeAgain: true,
hasLabel,
- indent,
global_status_id,
direction,
vertical,
@@ -280,10 +266,7 @@ export default class FormRow extends React.PureComponent {
className={classnames(
'dnb-form-row__content',
isTrue(wrap) && 'dnb-form-row__content--wrap',
- label &&
- !isTrue(vertical) &&
- direction !== 'vertical' &&
- `dnb-form-row__content--${indent_offset || 'default'}`,
+ label && !isTrue(vertical) && direction !== 'vertical',
responsive && 'dnb-responsive-component'
)}
>
diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.screenshot.test.ts b/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.screenshot.test.ts
index 81a9654b13b..d9f503f7981 100644
--- a/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.screenshot.test.ts
+++ b/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.screenshot.test.ts
@@ -18,13 +18,6 @@ describe('FormRow', () => {
url: '/uilib/components/form-row/demos',
})
- it('have to match default form-row', async () => {
- const screenshot = await makeScreenshot({
- selector: '[data-visual-test="form-row-default"]',
- })
- expect(screenshot).toMatchImageSnapshot()
- })
-
it('have to match vertical form-row label', async () => {
const screenshot = await makeScreenshot({
selector: '[data-visual-test="form-row-vertical-label"]',
@@ -62,8 +55,8 @@ describe('FormRow', () => {
it('have to match horizontal wrap', async () => {
const screenshot = await makeScreenshot({
- wrapperStyle: {
- width: '80rem',
+ style: {
+ width: '50rem',
},
selector: '[data-visual-test="form-row-horizontal-wrap"]',
})
diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.test.js b/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.test.js
index e8c72f5a25b..1634479557f 100644
--- a/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.test.js
+++ b/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.test.js
@@ -38,15 +38,6 @@ describe('FormRow component', () => {
).toBe(true)
})
- it('should have correct indent class', () => {
- const Comp = mount()
- expect(
- Comp.find('.dnb-form-row')
- .last()
- .hasClass('dnb-form-row__indent--large')
- ).toBe(true)
- })
-
it('should have an isolated state on nested FormRows', () => {
const Comp = mount(
diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-default-form-row.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-default-form-row.snap.png
deleted file mode 100644
index 999a8f75af0..00000000000
Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-default-form-row.snap.png and /dev/null differ
diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-form-row.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-form-row.snap.png
index a2ca09b2962..3b92302b452 100644
Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-form-row.snap.png and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-form-row.snap.png differ
diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-wrap.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-wrap.snap.png
index 9cb958df95f..9cd2694ff73 100644
Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-wrap.snap.png and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-wrap.snap.png differ
diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/FormRow.test.js.snap b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/FormRow.test.js.snap
index 91848910627..0c0254fb37b 100644
--- a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/FormRow.test.js.snap
+++ b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/FormRow.test.js.snap
@@ -9,8 +9,6 @@ exports[`FormRow component have to match snapshot 1`] = `
disabled="disabled"
global_status_id="main"
id="form-row"
- indent="indent"
- indent_offset="indent_offset"
label="label"
label_class="label_class"
label_direction="horizontal"
@@ -35,13 +33,13 @@ exports[`FormRow component have to match snapshot 1`] = `
className="dnb-form-row__fieldset"
>
children
@@ -90,16 +88,7 @@ exports[`FormRow scss have to match default theme snapshot 1`] = `
"/*
* FormRow theme
*
- */
-.dnb-form-row:not(.dnb-form-row--vertical).dnb-form-row__indent--default > .dnb-form-label, .dnb-form-row:not(.dnb-form-row--vertical).dnb-form-row__indent--medium > .dnb-form-label {
- width: 30vw;
- max-width: 20rem;
-}
-@media screen and (max-width: 40em) {
- .dnb-form-row:not(.dnb-form-row--vertical).dnb-form-row__indent--default > .dnb-form-label, .dnb-form-row:not(.dnb-form-row--vertical).dnb-form-row__indent--medium > .dnb-form-label {
- width: auto;
- }
-}"
+ */"
`;
exports[`FormRow scss have to match snapshot 1`] = `
@@ -145,64 +134,6 @@ exports[`FormRow scss have to match snapshot 1`] = `
.dnb-form-row:not(.dnb-form-row--vertical) > .dnb-form-row__content--wrap {
display: block;
}
-.dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] {
- display: grid;
- grid-template-columns: [column1-start] var(--form-row-column1-start) [column1-end column2-start] var(--form-row-column2-start) [column2-end];
- grid-template-rows: [row1-start] var(--form-row-row1-start) [row1-end row2-start] var(--form-row-row2-start) [row2-end];
-}
-.dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-row__content {
- grid-column: column2-start/column2-end;
- grid-row: row2-start/row2-end;
-}
-@media screen and (min-width: 40em) {
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-row__content--default {
- margin-top: -1.5rem;
- }
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-row__content--x-small {
- margin-top: calc(-0.5rem + var(--form-bounding-height));
- }
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-row__content--small {
- margin-top: calc(-1rem + var(--form-bounding-height));
- }
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-row__content--medium {
- margin-top: calc(-1.5rem + var(--form-bounding-height));
- }
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-row__content--large {
- margin-top: calc(-2rem + var(--form-bounding-height));
- }
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-row__content--m-large {
- margin-top: -1.875rem;
- }
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-row__content--x-large {
- margin-top: calc(-3rem + var(--form-bounding-height));
- }
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-row__content--xx-large {
- margin-top: calc(-3.5rem + var(--form-bounding-height));
- }
-}
-@media screen and (max-width: 40em) {
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-row__content {
- margin-top: 0.5rem !important;
- }
-}
-.dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-label {
- grid-column: column1-start/column1-end;
- grid-row: row1-start/row1-end;
- margin-right: 1rem;
-}
-@media screen and (min-width: 40em) {
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] > .dnb-form-label {
- text-align: right;
- }
-}
-@media screen and (max-width: 40em) {
- .dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] {
- display: block;
- }
-}
-.dnb-form-row:not(.dnb-form-row--vertical)[class*=__indent] .dnb-form-row__label-dummy {
- margin-top: 0;
-}
@media screen and (max-width: 40em) {
.dnb-form-row:not(.dnb-form-row--vertical) {
flex-direction: column;
diff --git a/packages/dnb-eufemia/src/components/form-row/stories/FormRow.stories.js b/packages/dnb-eufemia/src/components/form-row/stories/FormRow.stories.js
index 65cd2b3b421..8643c8afe92 100644
--- a/packages/dnb-eufemia/src/components/form-row/stories/FormRow.stories.js
+++ b/packages/dnb-eufemia/src/components/form-row/stories/FormRow.stories.js
@@ -14,7 +14,7 @@ import { H2, H3 } from '../../../elements'
// } from 'dnb-design-system-portal/src/docs/uilib/components/form-row/Examples'
// import Provider from '../../../shared/Provider'
-import { Checkbox, Radio, Input, FormLabel, FormRow } from '../../'
+import { Input, FormRow } from '../../'
export default {
title: 'Eufemia/Components/FormRow',
@@ -89,49 +89,6 @@ export const FormRowSandbox = () => (
-
-
-
- A long horizontal FormLabel with a lot of informative text and
- a default indent:
-
-
-
-
-
-
-
-
- A long horizontal FormLabel with a lot of informative text and
- a default indent:
-
- {
- console.log('on_change', value)
- }}
- value="first"
- // disabled
- // name="MyGroup" // The Group Name
- >
-
-
-
-
-
-
-
Combine vertical and horizontal
(
.dnb-form-row__content {
- grid-column: column2-start / column2-end;
- grid-row: row2-start / row2-end;
-
- // if not mobile
- @include allAbove(small) {
- &--default {
- margin-top: -1.5rem;
- }
- &--x-small {
- margin-top: calc(-0.5rem + var(--form-bounding-height));
- }
- &--small {
- margin-top: calc(-1rem + var(--form-bounding-height));
- }
- &--medium {
- margin-top: calc(-1.5rem + var(--form-bounding-height));
- }
- &--large {
- margin-top: calc(-2rem + var(--form-bounding-height));
- }
- &--m-large {
- margin-top: calc(-2.5rem + 0.625rem);
- }
- &--x-large {
- margin-top: calc(-3rem + var(--form-bounding-height));
- }
- &--xx-large {
- margin-top: calc(-3.5rem + var(--form-bounding-height));
- }
- }
-
- // if mobile
- @media screen and (max-width: 40em) {
- // use important, sice we want to overwrite the inline style "marginTop" set by "setLabelOffset"
- margin-top: 0.5rem !important;
- }
- }
-
- & > .dnb-form-label {
- // put the label in the first column
- grid-column: column1-start / column1-end;
- grid-row: row1-start / row1-end;
-
- margin-right: 1rem;
-
- @include allAbove(small) {
- text-align: right;
- }
- }
-
- // overwrite display to be block on small screens
- @media screen and (max-width: 40em) {
- display: block;
- }
-
- .dnb-form-row__label-dummy {
- margin-top: 0;
- }
- }
-
@media screen and (max-width: 40em) {
flex-direction: column;
align-items: flex-start;
diff --git a/packages/dnb-eufemia/src/components/form-row/style/themes/dnb-form-row-theme-ui.scss b/packages/dnb-eufemia/src/components/form-row/style/themes/dnb-form-row-theme-ui.scss
index c065cc6f7ef..de4a4a12118 100644
--- a/packages/dnb-eufemia/src/components/form-row/style/themes/dnb-form-row-theme-ui.scss
+++ b/packages/dnb-eufemia/src/components/form-row/style/themes/dnb-form-row-theme-ui.scss
@@ -2,35 +2,3 @@
* FormRow theme
*
*/
-
-.dnb-form-row {
- // TODO: indent has to be defined
- // the width of label
- &:not(#{&}--vertical)#{&}__indent {
- // &--small {
- // > .dnb-form-label {
- // width: 10rem;
- // }
- // }
- &--default,
- &--medium {
- > .dnb-form-label {
- // because the browser screen is different
- width: 30vw; // 30vw is very close to 20rem if the wrapper is 60rem
- max-width: 20rem;
-
- // a fixed with is not the best solution
- // width: 20rem;
-
- @media screen and (max-width: 40em) {
- width: auto;
- }
- }
- }
- // &--large {
- // > .dnb-form-label {
- // width: 30rem;
- // }
- // }
- }
-}
diff --git a/packages/dnb-eufemia/src/components/form-set/__tests__/FormSet.test.js b/packages/dnb-eufemia/src/components/form-set/__tests__/FormSet.test.js
index 6f6b4c58099..5cb3c4fce8f 100644
--- a/packages/dnb-eufemia/src/components/form-set/__tests__/FormSet.test.js
+++ b/packages/dnb-eufemia/src/components/form-set/__tests__/FormSet.test.js
@@ -77,19 +77,6 @@ describe('FormSet component', () => {
).toBe(false)
})
- it('should have working provider have correct indent classes on form-row', () => {
- const Comp = mount(
-
-
-
- )
- expect(
- Comp.find('.dnb-form-row')
- .last()
- .hasClass('dnb-form-row__indent--large')
- ).toBe(true)
- })
-
it('should support locale context forwarding', () => {
const Comp = mount(
diff --git a/packages/dnb-eufemia/src/components/form-set/__tests__/__image_snapshots__/formset-have-to-match-default-form-set.snap.png b/packages/dnb-eufemia/src/components/form-set/__tests__/__image_snapshots__/formset-have-to-match-default-form-set.snap.png
index df62d7964e2..0d0ff09f754 100644
Binary files a/packages/dnb-eufemia/src/components/form-set/__tests__/__image_snapshots__/formset-have-to-match-default-form-set.snap.png and b/packages/dnb-eufemia/src/components/form-set/__tests__/__image_snapshots__/formset-have-to-match-default-form-set.snap.png differ
diff --git a/packages/dnb-eufemia/src/components/form-set/stories/FormSet.stories.js b/packages/dnb-eufemia/src/components/form-set/stories/FormSet.stories.js
index 2f4fb112a10..42092fe62e5 100644
--- a/packages/dnb-eufemia/src/components/form-set/stories/FormSet.stories.js
+++ b/packages/dnb-eufemia/src/components/form-set/stories/FormSet.stories.js
@@ -39,12 +39,8 @@ export const FormSetSandbox = () => {
setDisabled((s) => !s)}>
ToggleButton
-
-
+
+
A h2 in a FormRow without a label
@@ -59,14 +55,13 @@ export const FormSetSandbox = () => {
-
+
diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-stretched-input-with-status.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-stretched-input-with-status.snap.png
index 0bf8548733d..70cce022033 100644
Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-stretched-input-with-status.snap.png and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-stretched-input-with-status.snap.png differ
diff --git a/packages/dnb-eufemia/src/components/input/stories/Input.stories.js b/packages/dnb-eufemia/src/components/input/stories/Input.stories.js
index 8707e6ebe34..99a2d626982 100644
--- a/packages/dnb-eufemia/src/components/input/stories/Input.stories.js
+++ b/packages/dnb-eufemia/src/components/input/stories/Input.stories.js
@@ -117,8 +117,6 @@ export const InputSandbox = () => {
diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/Radio.test.js.snap b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/Radio.test.js.snap
index ec984e0e6d0..7434e2f58c9 100644
--- a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/Radio.test.js.snap
+++ b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/Radio.test.js.snap
@@ -245,8 +245,6 @@ exports[`Radio group component have to match group snapshot 1`] = `
disabled={null}
global_status_id={null}
id="group"
- indent={null}
- indent_offset={null}
label="Label"
label_class={null}
label_direction={null}
@@ -311,7 +309,7 @@ exports[`Radio group component have to match group snapshot 1`] = `
.dnb-form-label + .dnb-radio {
vertical-align: top;
}
diff --git a/packages/dnb-eufemia/src/components/radio/stories/Radio.stories.js b/packages/dnb-eufemia/src/components/radio/stories/Radio.stories.js
index b7225d0b22b..ac441cc5612 100644
--- a/packages/dnb-eufemia/src/components/radio/stories/Radio.stories.js
+++ b/packages/dnb-eufemia/src/components/radio/stories/Radio.stories.js
@@ -114,13 +114,10 @@ export const RadioButtonSandbox = () => (
-
+
A h2 in a FormRow without a label
-
+
(
-
+
.dnb-form-label + & {
diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/ToggleButton.test.js.snap b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/ToggleButton.test.js.snap
index 6563e033300..6c94283735b 100644
--- a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/ToggleButton.test.js.snap
+++ b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/ToggleButton.test.js.snap
@@ -513,8 +513,6 @@ exports[`ToggleButton group component have to match group snapshot 1`] = `
disabled={null}
global_status_id={null}
id="group"
- indent={null}
- indent_offset={null}
label="Label"
label_class={null}
label_direction={null}
@@ -578,7 +576,7 @@ exports[`ToggleButton group component have to match group snapshot 1`] = `
.dnb-form-label + .dnb-radio {
vertical-align: top;
}
diff --git a/packages/dnb-eufemia/src/components/toggle-button/stories/ToggleButton.stories.js b/packages/dnb-eufemia/src/components/toggle-button/stories/ToggleButton.stories.js
index 01e57484628..2f954029127 100644
--- a/packages/dnb-eufemia/src/components/toggle-button/stories/ToggleButton.stories.js
+++ b/packages/dnb-eufemia/src/components/toggle-button/stories/ToggleButton.stories.js
@@ -127,11 +127,7 @@ export const ToggleButtonSandbox = () => (
-
+
@@ -228,14 +224,10 @@ export const ToggleButtonSandbox = () => (
-
+
A h2 in a FormRow without a label
-
+
(
-
+
{
console.log('on_change', value)