Skip to content

Commit 3a39134

Browse files
authored
fix: remove FormRow context support from components not using FormRow (#2103)
1 parent fb89114 commit 3a39134

File tree

14 files changed

+8
-35
lines changed

14 files changed

+8
-35
lines changed

packages/dnb-design-system-portal/src/docs/uilib/components/autocomplete/demos.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ const data = [
8686

8787
<AutocompleteCustomWidth />
8888

89-
<AutocompleteOpened />
90-
91-
<AutocompleteDisabledExample />
92-
9389
### Autocomplete with status message
9490

9591
<AutocompleteStatusExample />
92+
93+
<AutocompleteOpened />
94+
95+
<AutocompleteDisabledExample />

packages/dnb-eufemia/src/components/accordion/AccordionProvider.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
accordionPropTypes,
2020
accordionDefaultProps,
2121
} from './AccordionPropTypes'
22-
import { includeValidProps } from '../form-row/FormRowHelpers'
2322

2423
import Context from '../../shared/Context'
2524
import AccordionGroupContext from './AccordionProviderContext'
@@ -71,7 +70,6 @@ export default class AccordionGroup extends React.PureComponent {
7170
const props = extendPropsWithContextInClassComponent(
7271
this.props,
7372
AccordionGroup.defaultProps,
74-
includeValidProps(this.context.FormRow),
7573
this.context.Accordion,
7674
this.context.getTranslation(this.props).Accordion
7775
)

packages/dnb-eufemia/src/components/button/Button.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import {
2626
skeletonDOMAttributes,
2727
createSkeletonClass,
2828
} from '../skeleton/SkeletonHelper'
29-
import { includeValidProps } from '../form-row/FormRowHelpers'
3029
import IconPrimary from '../icon-primary/IconPrimary'
3130
import { launch, launch_medium } from '../../icons'
3231
import FormStatus from '../form-status/FormStatus'
@@ -98,7 +97,6 @@ export default class Button extends React.PureComponent {
9897
this.props,
9998
Button.defaultProps,
10099
{ skeleton: this.context?.skeleton },
101-
includeValidProps(this.context.FormRow),
102100
this.context.Button
103101
)
104102

packages/dnb-eufemia/src/components/help-button/HelpButtonInstance.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
extendPropsWithContext,
1111
} from '../../shared/component-helper'
1212
import Context from '../../shared/Context'
13-
import { includeValidProps } from '../form-row/FormRowHelpers'
1413
import { createSpacingClasses } from '../space/SpacingHelper'
1514
import Button, { ButtonProps } from '../button/Button'
1615

@@ -26,7 +25,6 @@ export default function HelpButtonInstance(localProps: ButtonProps) {
2625
const props = extendPropsWithContext(
2726
localProps,
2827
defaultProps,
29-
includeValidProps(context.FormRow),
3028
context.HelpButton
3129
)
3230

packages/dnb-eufemia/src/components/icon-primary/IconPrimary.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import React from 'react'
88
import PropTypes from 'prop-types' // Is needed because of ts types
99
import Context from '../../shared/Context'
1010
import { extendPropsWithContextInClassComponent } from '../../shared/component-helper'
11-
import { includeValidProps } from '../form-row/FormRowHelpers'
1211
import DefaultIcon, {
1312
iconPropTypes,
1413
DefaultIconSize,
@@ -50,7 +49,6 @@ export default class IconPrimary extends React.PureComponent {
5049
this.props,
5150
IconPrimary.defaultProps,
5251
{ skeleton: this.context?.skeleton },
53-
includeValidProps(this.context.FormRow),
5452
this.context.Icon,
5553
this.context.IconPrimary
5654
)

packages/dnb-eufemia/src/components/icon/Icon.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
import { createSkeletonClass } from '../skeleton/SkeletonHelper'
2222
import Context from '../../shared/Context'
2323
import { iconCase } from './IconHelpers'
24-
import { includeValidProps } from '../form-row/FormRowHelpers'
2524

2625
export const DefaultIconSize = 16
2726
export const DefaultIconSizes = {
@@ -126,7 +125,6 @@ export default class Icon extends React.PureComponent {
126125
this.props,
127126
Icon.defaultProps,
128127
{ skeleton: this.context?.skeleton },
129-
includeValidProps(this.context.FormRow),
130128
this.context.Icon
131129
)
132130

packages/dnb-eufemia/src/components/logo/Logo.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
registerElement,
1313
extendPropsWithContextInClassComponent,
1414
} from '../../shared/component-helper'
15-
import { includeValidProps } from '../form-row/FormRowHelpers'
1615
import {
1716
spacingPropTypes,
1817
createSpacingClasses,
@@ -59,7 +58,6 @@ export default class Logo extends React.PureComponent {
5958
this.props,
6059
Logo.defaultProps,
6160
this.context.getTranslation(this.props).Logo,
62-
includeValidProps(this.context.FormRow),
6361
this.context.Logo
6462
)
6563

packages/dnb-eufemia/src/components/modal/Modal.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import {
3333
ToCamelCasePartial,
3434
} from '../../shared/helpers/withCamelCaseProps'
3535
import { ButtonProps } from '../button/Button'
36-
import { includeValidProps } from '../form-row/FormRowHelpers'
3736

3837
export const ANIMATION_DURATION = 300
3938

@@ -410,7 +409,6 @@ class Modal extends React.PureComponent<
410409
this.props,
411410
Modal.defaultProps,
412411
this.context.getTranslation(this.props).Modal,
413-
includeValidProps(this.context.FormRow),
414412
this.context.Modal
415413
)
416414

packages/dnb-eufemia/src/components/pagination/Pagination.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
validateDOMAttributes,
1414
extendPropsWithContextInClassComponent,
1515
} from '../../shared/component-helper'
16-
import { includeValidProps } from '../form-row/FormRowHelpers'
1716
import {
1817
spacingPropTypes,
1918
createSpacingClasses,
@@ -185,7 +184,6 @@ class PaginationInstance extends React.PureComponent {
185184
this.props,
186185
paginationDefaultProps,
187186
this.context.getTranslation(this.props).Pagination,
188-
includeValidProps(this.context.FormRow),
189187
this.context.Pagination
190188
)
191189

0 commit comments

Comments
 (0)