Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(FormStatus): remove deprecated status property #1914

Merged
merged 1 commit into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1921,7 +1921,7 @@ class AutocompleteInstance extends React.PureComponent {
label={label}
text_id={id + '-status'} // used for "aria-describedby"
text={status}
status={status_state}
state={status_state}
no_animation={status_no_animation}
skeleton={skeleton}
{...status_props}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
size="default"
skeleton="skeleton"
state="error"
status="error"
stretch={null}
text="status"
text_id="autocomplete-id-status"
Expand Down Expand Up @@ -552,7 +551,6 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
size="default"
skeleton="skeleton"
state="error"
status="error"
stretch={null}
text="error"
text_id="autocomplete-id-status"
Expand Down Expand Up @@ -803,7 +801,6 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="autocomplete-id-submit-button-status"
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export default class Button extends React.PureComponent {
global_status_id={global_status_id}
label={text}
text={status}
status={status_state}
state={status_state}
text_id={this._id + '-status'} // used for "aria-describedby"
no_animation={status_no_animation}
skeleton={skeleton}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,7 @@ exports[`Button component have to match default button snapshot 1`] = `
show={null}
size="default"
skeleton="skeleton"
state="error"
status="status_state"
state="status_state"
stretch={null}
text={null}
text_id="button-status"
Expand Down Expand Up @@ -850,8 +849,7 @@ exports[`Button component have to match href="..." snapshot 1`] = `
show={null}
size="default"
skeleton="skeleton"
state="error"
status="status_state"
state="status_state"
stretch={null}
text={null}
text_id="button-status"
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export default class Checkbox extends React.PureComponent {
text_id={id + '-status'} // used for "aria-describedby"
width_selector={id + ', ' + id + '-label'}
text={status}
status={status_state}
state={status_state}
no_animation={status_no_animation}
skeleton={skeleton}
{...status_props}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ exports[`Checkbox component have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="checkbox-status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ export default class DatePicker extends React.PureComponent {
text_id={id + '-status'} // used for "aria-describedby"
width_selector={id + '-shell'}
text={status}
status={status_state}
state={status_state}
no_animation={status_no_animation}
skeleton={skeleton}
{...status_props}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ exports[`DatePicker component have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text="status"
text_id="date-picker-id-status"
Expand Down Expand Up @@ -524,7 +523,6 @@ exports[`DatePicker component have to match snapshot 1`] = `
size="default"
skeleton={false}
state="error"
status="error"
stretch={null}
text="error"
text_id="date-picker-id__input-status"
Expand Down Expand Up @@ -1676,7 +1674,6 @@ exports[`DatePicker component have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text="error"
text_id="date-picker-id-status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ exports[`Dialog component snapshot should match component snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="dialog_id-status"
Expand Down Expand Up @@ -1288,7 +1287,6 @@ exports[`Dialog component snapshot should match component snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ exports[`Drawer component snapshot should match component snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="drawer_id-status"
Expand Down Expand Up @@ -1302,7 +1301,6 @@ exports[`Drawer component snapshot should match component snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ class DropdownInstance extends React.PureComponent {
label={label}
text_id={id + '-status'} // used for "aria-describedby"
text={status}
status={status_state}
state={status_state}
no_animation={status_no_animation}
skeleton={skeleton}
{...status_props}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ exports[`Dropdown markup have to match snapshot 1`] = `
size="default"
skeleton="skeleton"
state="error"
status="error"
stretch={null}
text="status"
text_id="dropdown-id-status"
Expand Down Expand Up @@ -683,7 +682,6 @@ exports[`Dropdown markup have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="dropdown-id-status"
Expand Down
10 changes: 1 addition & 9 deletions packages/dnb-eufemia/src/components/form-status/FormStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ export default class FormStatus extends React.PureComponent {
]),
variant: PropTypes.oneOf(['flat', 'outlined']),
size: PropTypes.oneOf(['default', 'large']),
// status is Deprecated
status: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.string,
PropTypes.oneOf(['error', 'warn', 'info']),
]),
global_status_id: PropTypes.string,
attributes: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
text_id: PropTypes.string,
Expand Down Expand Up @@ -94,7 +88,6 @@ export default class FormStatus extends React.PureComponent {
size: 'default',
variant: null,
state: 'error',
status: null, // Deprecated
global_status_id: null,
attributes: null,
text_id: null,
Expand Down Expand Up @@ -356,7 +349,6 @@ export default class FormStatus extends React.PureComponent {
const {
show, // eslint-disable-line
title,
status: rawStatus,
state: rawState,
size,
variant,
Expand All @@ -379,7 +371,7 @@ export default class FormStatus extends React.PureComponent {
...rest
} = props

const state = FormStatus.correctStatus(rawStatus || rawState)
const state = FormStatus.correctStatus(rawState)
const iconToRender = FormStatus.getIcon({
state,
icon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ exports[`FormStatus component have to match snapshot 1`] = `
"size": "'default'",
"skeleton": "skeleton",
"state": true,
"status": true,
"stretch": "stretch",
"text": "text",
"text_id": "text_id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,6 @@ exports[`GlobalError snapshot have to match component snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,6 @@ exports[`GlobalStatus snapshot have to match component snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down Expand Up @@ -1477,7 +1476,6 @@ exports[`GlobalStatus snapshot have to match linked components snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down Expand Up @@ -1624,7 +1622,6 @@ exports[`GlobalStatus snapshot have to match linked components snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text="error-message"
text_id="switch-status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ exports[`InputMasked component have to match type="text" snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="input-masked-status"
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ export default class Input extends React.PureComponent {
global_status_id={global_status_id}
label={label}
text={status}
status={status_state}
state={status_state}
text_id={id + '-status'} // used for "aria-describedby"
no_animation={status_no_animation}
skeleton={skeleton}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ exports[`Input component have to match type="search" snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="input-status"
Expand Down Expand Up @@ -488,7 +487,6 @@ exports[`Input component have to match type="search" snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="input-submit-button-status"
Expand Down Expand Up @@ -683,7 +681,6 @@ exports[`Input component have to match type="text" snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="input-status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ exports[`InputPassword component have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="input-status"
Expand Down Expand Up @@ -425,7 +424,6 @@ exports[`InputPassword component have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="input-submit-button-status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ exports[`Modal component have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="modal_id-status"
Expand Down Expand Up @@ -1280,7 +1279,6 @@ exports[`Modal component have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,6 @@ exports[`Pagination bar have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down Expand Up @@ -1066,7 +1065,6 @@ exports[`Pagination bar have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down Expand Up @@ -1192,7 +1190,6 @@ exports[`Pagination bar have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down Expand Up @@ -1315,7 +1312,6 @@ exports[`Pagination bar have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down Expand Up @@ -1437,7 +1433,6 @@ exports[`Pagination bar have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down Expand Up @@ -1559,7 +1554,6 @@ exports[`Pagination bar have to match snapshot 1`] = `
size="default"
skeleton={null}
state="error"
status="error"
stretch={null}
text={null}
text_id="null-status"
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/radio/Radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ export default class Radio extends React.PureComponent {
text_id={id + '-status'} // used for "aria-describedby"
width_selector={id + ', ' + id + '-label'}
text={status}
status={status_state}
state={status_state}
no_animation={status_no_animation}
skeleton={skeleton}
{...status_props}
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/radio/RadioGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export default class RadioGroup extends React.PureComponent {
global_status_id={global_status_id}
label={label}
text={status}
status={status_state}
state={status_state}
text_id={id + '-status'} // used for "aria-describedby"
width_selector={id + ', ' + id + '-label'}
no_animation={status_no_animation}
Expand Down
Loading