Skip to content
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
4 changes: 2 additions & 2 deletions src/components/Alert/Alert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ export const Alert = ({

Alert.defaultProps = {
color: 'note',
icon: null,
icon: undefined,
id: undefined,
onClose: null,
onClose: undefined,
};

Alert.propTypes = {
Expand Down
10 changes: 5 additions & 5 deletions src/components/Button/Button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,18 @@ export const Button = React.forwardRef((props, ref) => {
});

Button.defaultProps = {
afterLabel: null,
beforeLabel: null,
afterLabel: undefined,
beforeLabel: undefined,
block: false,
color: 'primary',
disabled: false,
endCorner: null,
feedbackIcon: null,
endCorner: undefined,
feedbackIcon: undefined,
id: undefined,
labelVisibility: 'xs',
priority: 'filled',
size: 'medium',
startCorner: null,
startCorner: undefined,
type: 'button',
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/ButtonGroup/ButtonGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const ButtonGroup = ({

ButtonGroup.defaultProps = {
block: false,
children: null,
children: undefined,
disabled: false,
priority: 'filled',
size: 'medium',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Card/CardFooter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const CardFooter = ({
};

CardFooter.defaultProps = {
children: null,
children: undefined,
};

CardFooter.propTypes = {
Expand Down
6 changes: 3 additions & 3 deletions src/components/CheckboxField/CheckboxField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ export const CheckboxField = React.forwardRef((props, ref) => {

CheckboxField.defaultProps = {
disabled: false,
helpText: null,
helpText: undefined,
id: undefined,
isLabelVisible: true,
labelPosition: 'after',
renderAsRequired: false,
required: false,
validationState: null,
validationText: null,
validationState: undefined,
validationText: undefined,
};

CheckboxField.propTypes = {
Expand Down
6 changes: 3 additions & 3 deletions src/components/FileInputField/FileInputField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,14 @@ export const FileInputField = React.forwardRef((props, ref) => {
FileInputField.defaultProps = {
disabled: false,
fullWidth: false,
helpText: null,
helpText: undefined,
isLabelVisible: true,
layout: 'vertical',
multiple: false,
required: false,
size: 'medium',
validationState: null,
validationText: null,
validationState: undefined,
validationText: undefined,
};

FileInputField.propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/FormLayout/FormLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const FormLayout = ({

FormLayout.defaultProps = {
autoWidth: false,
children: null,
children: undefined,
fieldLayout: 'vertical',
labelWidth: 'default',
};
Expand Down
8 changes: 4 additions & 4 deletions src/components/FormLayout/FormLayoutCustomField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ export const FormLayoutCustomField = ({
};

FormLayoutCustomField.defaultProps = {
children: null,
children: undefined,
disabled: false,
fullWidth: false,
id: undefined,
innerFieldSize: null,
label: null,
innerFieldSize: undefined,
label: undefined,
labelForId: undefined,
required: false,
validationState: null,
validationState: undefined,
};

FormLayoutCustomField.propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Grid/Grid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Grid.defaultProps = {
alignContent: undefined,
alignItems: undefined,
autoFlow: undefined,
children: null,
children: undefined,
columnGap: 4,
columns: '1fr',
justifyContent: undefined,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Grid/GridSpan.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const GridSpan = ({
/* eslint-disable sort-keys */

GridSpan.defaultProps = {
children: null,
children: undefined,
columns: 1,
rows: 1,
tag: 'div',
Expand Down
4 changes: 2 additions & 2 deletions src/components/InputGroup/InputGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ export const InputGroup = ({
};

InputGroup.defaultProps = {
children: null,
children: undefined,
disabled: false,
id: undefined,
isLabelVisible: true,
layout: 'vertical',
required: false,
size: 'medium',
validationTexts: null,
validationTexts: undefined,
};

InputGroup.propTypes = {
Expand Down
12 changes: 6 additions & 6 deletions src/components/Modal/Modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const Modal = ({
onMouseDown,
};

if (portalId === null) {
if (portalId === undefined) {
return preRender(
children,
color,
Expand Down Expand Up @@ -152,14 +152,14 @@ Modal.defaultProps = {
allowCloseOnEscapeKey: true,
allowPrimaryActionOnEnterKey: true,
autoFocus: true,
children: null,
closeButtonRef: null,
children: undefined,
closeButtonRef: undefined,
color: undefined,
dialogRef: null,
portalId: null,
dialogRef: undefined,
portalId: undefined,
position: 'center',
preventScrollUnderneath: window.document.body,
primaryButtonRef: null,
primaryButtonRef: undefined,
size: 'medium',
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/ModalBody.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const ModalBody = ({
};

ModalBody.defaultProps = {
children: null,
children: undefined,
scrolling: 'auto',
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/ModalContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const ModalContent = ({
};

ModalContent.defaultProps = {
children: null,
children: undefined,
};

ModalContent.propTypes = {
Expand Down
10 changes: 5 additions & 5 deletions src/components/Popover/Popover.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ export const Popover = React.forwardRef((props, ref) => {
getRootAlignmentClassName(placement, styles),
)}
ref={ref}
style={placementStyle ? cleanPlacementStyle(placementStyle) : null}
style={placementStyle ? cleanPlacementStyle(placementStyle) : undefined}
>
{children}
<span className={styles.arrow} />
</div>
</>
);

if (portalId === null) {
if (portalId === undefined) {
return PopoverEl;
}

Expand All @@ -60,9 +60,9 @@ export const Popover = React.forwardRef((props, ref) => {

Popover.defaultProps = {
placement: 'bottom',
placementStyle: null,
popoverTargetId: null,
portalId: null,
placementStyle: undefined,
popoverTargetId: undefined,
portalId: undefined,
};

Popover.propTypes = {
Expand Down
6 changes: 3 additions & 3 deletions src/components/Radio/Radio.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ export const Radio = ({

Radio.defaultProps = {
disabled: false,
helpText: null,
helpText: undefined,
id: undefined,
isLabelVisible: true,
layout: 'vertical',
renderAsRequired: false,
required: false,
validationState: null,
validationText: null,
validationState: undefined,
validationText: undefined,
value: undefined,
};

Expand Down
6 changes: 3 additions & 3 deletions src/components/ScrollView/ScrollView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,18 +297,18 @@ ScrollView.defaultProps = {
arrows: false,
arrowsScrollStep: 200,
autoScroll: 'off',
children: null,
children: undefined,
debounce: 50,
direction: 'vertical',
endShadowBackground: 'linear-gradient(var(--rui-local-end-shadow-direction), rgba(255 255 255 / 1), rgba(255 255 255 / 0))',
endShadowInitialOffset: '-1rem',
endShadowSize: '2em',
id: undefined,
nextArrowColor: undefined,
nextArrowElement: null,
nextArrowElement: undefined,
nextArrowInitialOffset: '-0.5rem',
prevArrowColor: undefined,
prevArrowElement: null,
prevArrowElement: undefined,
prevArrowInitialOffset: '-0.5rem',
scrollbar: true,
shadows: true,
Expand Down
6 changes: 3 additions & 3 deletions src/components/SelectField/SelectField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ export const SelectField = React.forwardRef((props, ref) => {
SelectField.defaultProps = {
disabled: false,
fullWidth: false,
helpText: null,
helpText: undefined,
id: undefined,
isLabelVisible: true,
layout: 'vertical',
renderAsRequired: false,
required: false,
size: 'medium',
validationState: null,
validationText: null,
validationState: undefined,
validationText: undefined,
variant: 'outline',
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const Table = ({

Table.defaultProps = {
id: undefined,
sort: null,
sort: undefined,
};

Table.propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TableBodyCell.defaultProps = {
format: undefined,
id: undefined,
isSortingActive: false,
value: null,
value: undefined,
};

TableBodyCell.propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const TableHeaderCell = ({

TableHeaderCell.defaultProps = {
id: undefined,
sort: null,
sort: undefined,
};

TableHeaderCell.propTypes = {
Expand Down
6 changes: 3 additions & 3 deletions src/components/Tabs/TabsItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export const TabsItem = ({
);

TabsItem.defaultProps = {
afterLabel: null,
beforeLabel: null,
afterLabel: undefined,
beforeLabel: undefined,
id: undefined,
isActive: false,
onClick: null,
onClick: undefined,
};

TabsItem.propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Text/Text.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const Text = ({

Text.defaultProps = {
blockLevel: false,
children: null,
children: undefined,
hyphens: 'none',
lines: undefined,
wordWrapping: 'normal',
Expand Down
6 changes: 3 additions & 3 deletions src/components/TextArea/TextArea.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ export const TextArea = React.forwardRef((props, ref) => {
TextArea.defaultProps = {
disabled: false,
fullWidth: false,
helpText: null,
helpText: undefined,
id: undefined,
isLabelVisible: true,
layout: 'vertical',
required: false,
size: 'medium',
validationState: null,
validationText: null,
validationState: undefined,
validationText: undefined,
variant: 'outline',
};

Expand Down
10 changes: 5 additions & 5 deletions src/components/TextField/TextField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const TextField = React.forwardRef((props, ref) => {
} = props;
const formLayoutContext = useContext(FormLayoutContext);
const inputGroupContext = useContext(InputGroupContext);
const hasSmallInput = (inputSize !== null) && (inputSize <= SMALL_INPUT_SIZE);
const hasSmallInput = (inputSize !== undefined) && (inputSize <= SMALL_INPUT_SIZE);

return (
<label
Expand Down Expand Up @@ -108,16 +108,16 @@ export const TextField = React.forwardRef((props, ref) => {
TextField.defaultProps = {
disabled: false,
fullWidth: false,
helpText: null,
helpText: undefined,
id: undefined,
inputSize: null,
inputSize: undefined,
isLabelVisible: true,
layout: 'vertical',
required: false,
size: 'medium',
type: 'text',
validationState: null,
validationText: null,
validationState: undefined,
validationText: undefined,
variant: 'outline',
};

Expand Down
Loading