Skip to content

Commit

Permalink
fix: fix spacing issue with --zero and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Aug 7, 2019
1 parent fcbc7a1 commit 6ccfd06
Show file tree
Hide file tree
Showing 18 changed files with 173 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ exports[`Checkbox component have to match snapshot 1`] = `
value={null}
>
<span
className="dnb-checkbox dnb-checkbox--label-position-left dnb-space__readOnly--zero"
className="dnb-checkbox dnb-checkbox--label-position-left"
>
<span
className="dnb-checkbox__order"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ exports[`DatePicker component have to match snapshot 1`] = `
sync={true}
>
<span
className="dnb-date-picker dnb-date-picker__status--error dnb-date-picker--hidden dnb-date-picker--show-input dnb-date-picker--show-footer dnb-space__hide_navigation--zero dnb-space__hide_navigation_buttons--zero dnb-space__hide_days--zero dnb-space__only_month--zero dnb-space__link--zero dnb-space__opened--zero dnb-space__no_animation--zero"
className="dnb-date-picker dnb-date-picker__status--error dnb-date-picker--hidden dnb-date-picker--show-input dnb-date-picker--show-footer"
>
<span
aria-hidden={true}
Expand Down Expand Up @@ -167,7 +167,7 @@ exports[`DatePicker component have to match snapshot 1`] = `
value={null}
>
<span
className="dnb-input dnb-input--text dnb-input--has-submit-button dnb-input__status--error dnb-space__disabled--zero dnb-space__readOnly--zero"
className="dnb-input dnb-input--text dnb-input--has-submit-button dnb-input__status--error"
>
<span
className="dnb-input__inner"
Expand Down Expand Up @@ -670,7 +670,7 @@ exports[`DatePicker component have to match snapshot 1`] = `
>
<button
aria-expanded={false}
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-right dnb-button--has-icon dnb-space__aria-expanded--zero dnb-space__bounding--zero dnb-input__submit-button__button"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-right dnb-button--has-icon dnb-input__submit-button__button"
id="date-picker-id"
onBlur={[Function]}
onClick={[Function]}
Expand Down Expand Up @@ -725,7 +725,7 @@ exports[`DatePicker component have to match snapshot 1`] = `
alt="calendar"
aria-hidden={false}
aria-label="calendar"
className="dnb-icon dnb-space__aria-hidden--zero dnb-button__icon"
className="dnb-icon dnb-button__icon"
role="img"
>
<calendar>
Expand Down Expand Up @@ -771,7 +771,7 @@ exports[`DatePicker component have to match snapshot 1`] = `
>
<span
aria-live="assertive"
className="dnb-form-status dnb-form-status--error dnb-form-status--has-content dnb-space__hidden--zero"
className="dnb-form-status dnb-form-status--error dnb-form-status--has-content"
hidden={false}
>
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ exports[`Dropdown component have to match snapshot 1`] = `
aria-haspopup="listbox"
aria-label="title"
aria-labelledby="dropdown-dropdown-id-value"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-space__aria-expanded--zero dnb-space__bounding--zero dnb-dropdown__trigger"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-dropdown__trigger"
id="dropdown-id"
onBlur={[Function]}
onClick={[Function]}
Expand Down Expand Up @@ -273,7 +273,7 @@ exports[`Dropdown component have to match snapshot 1`] = `
>
<span
aria-live="assertive"
className="dnb-form-status dnb-form-status--error dnb-form-status--status_animation dnb-form-status--has-content dnb-space__hidden--zero"
className="dnb-form-status dnb-form-status--error dnb-form-status--status_animation dnb-form-status--has-content"
hidden={false}
>
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ exports[`FormRow component have to match snapshot 1`] = `
vertical={null}
>
<Element
className="dnb-form-label dnb-form-label--horizontal dnb-space__disabled--zero dnb-form-row__label label_class"
className="dnb-form-label dnb-form-label--horizontal dnb-form-row__label label_class"
id="label_id-label"
is="legend"
>
<legend
className="dnb-form-label dnb-form-label--horizontal dnb-space__disabled--zero dnb-form-row__label label_class"
className="dnb-form-label dnb-form-label--horizontal dnb-form-row__label label_class"
id="label_id-label"
>
label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`FormStatus component have to match snapshot 1`] = `
>
<span
aria-live="assertive"
className="dnb-form-status dnb-form-status--error dnb-form-status--animation dnb-form-status--has-content dnb-space__hidden--zero className class"
className="dnb-form-status dnb-form-status--error dnb-form-status--animation dnb-form-status--has-content className class"
hidden={false}
title="title"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ exports[`InputMasked component have to match type="text" snapshot 1`] = `
value="test"
>
<span
className="dnb-input dnb-input--text dnb-space__disabled--zero dnb-space__readOnly--zero dnb-input-masked"
className="dnb-input dnb-input--text dnb-input-masked"
>
<span
className="dnb-input__inner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ exports[`Input component have to match type="search" snapshot 1`] = `
value="test"
>
<span
className="dnb-input dnb-input--search dnb-input--has-submit-button dnb-space__disabled--zero dnb-space__readOnly--zero"
className="dnb-input dnb-input--search dnb-input--has-submit-button"
>
<span
className="dnb-input__inner"
Expand Down Expand Up @@ -237,7 +237,7 @@ exports[`Input component have to match type="search" snapshot 1`] = `
variant="secondary"
>
<button
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-right dnb-button--has-icon dnb-space__bounding--zero dnb-input__submit-button__button"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-right dnb-button--has-icon dnb-input__submit-button__button"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
Expand Down Expand Up @@ -290,7 +290,7 @@ exports[`Input component have to match type="search" snapshot 1`] = `
alt="search"
aria-hidden={false}
aria-label="search"
className="dnb-icon dnb-space__aria-hidden--zero dnb-button__icon"
className="dnb-icon dnb-button__icon"
role="img"
>
<search>
Expand Down Expand Up @@ -437,7 +437,7 @@ exports[`Input component have to match type="text" snapshot 1`] = `
value="test"
>
<span
className="dnb-input dnb-input--text dnb-space__disabled--zero dnb-space__readOnly--zero"
className="dnb-input dnb-input--text"
>
<span
className="dnb-input__inner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ exports[`Modal component have to match snapshot 1`] = `
>
<button
aria-label="Modal"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-left dnb-button--has-icon dnb-space__disabled--zero dnb-space__bounding--zero dnb-modal__trigger"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-left dnb-button--has-icon dnb-modal__trigger"
id="modal_id"
onClick={[Function]}
onMouseOut={[Function]}
Expand Down Expand Up @@ -177,7 +177,7 @@ exports[`Modal component have to match snapshot 1`] = `
alt="Modal"
aria-hidden={false}
aria-label="Modal"
className="dnb-icon dnb-icon--default dnb-space__aria-hidden--zero dnb-button__icon"
className="dnb-icon dnb-icon--default dnb-button__icon"
role="img"
>
<question>
Expand Down Expand Up @@ -430,7 +430,7 @@ exports[`Modal component have to match snapshot 1`] = `
>
<button
aria-label="close_title"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-right dnb-button--has-icon dnb-space__bounding--zero dnb-modal__close-button"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-right dnb-button--has-icon dnb-modal__close-button"
onClick={[Function]}
onMouseOut={[Function]}
title="close_title"
Expand Down Expand Up @@ -478,7 +478,7 @@ exports[`Modal component have to match snapshot 1`] = `
alt="close_title"
aria-hidden={false}
aria-label="close_title"
className="dnb-icon dnb-icon--medium dnb-space__aria-hidden--zero dnb-button__icon"
className="dnb-icon dnb-icon--medium dnb-button__icon"
role="img"
>
<close_medium>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exports[`Circular ProgressIndicator component have to match snapshot 1`] = `
visible={true}
>
<div
className="dnb-progress-indicator dnb-progress-indicator--visible dnb-space__no_animation--zero"
className="dnb-progress-indicator dnb-progress-indicator--visible"
>
<ProgressIndicatorCircular
callOnCompleteHandler={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`Radio component have to match snapshot 1`] = `
value="value"
>
<span
className="dnb-radio dnb-radio--label-position-left dnb-space__readOnly--zero className class"
className="dnb-radio dnb-radio--label-position-left className class"
>
<span
className="dnb-radio__order"
Expand All @@ -46,14 +46,14 @@ exports[`Radio component have to match snapshot 1`] = `
>
<Element
aria-hidden={false}
className="dnb-form-label dnb-space__aria-hidden--zero"
className="dnb-form-label"
htmlFor="radio"
id="radio-label"
is="label"
>
<label
aria-hidden={false}
className="dnb-form-label dnb-space__aria-hidden--zero"
className="dnb-form-label"
htmlFor="radio"
id="radio-label"
>
Expand Down Expand Up @@ -165,7 +165,7 @@ exports[`Radio group component have to match group snapshot 1`] = `
className="dnb-form-row__fieldset"
>
<div
className="dnb-form-row dnb-space__no_label--zero"
className="dnb-form-row"
>
<FormLabel
class={null}
Expand All @@ -182,13 +182,13 @@ exports[`Radio group component have to match group snapshot 1`] = `
vertical={null}
>
<Element
className="dnb-form-label dnb-space__disabled--zero dnb-form-row__label"
className="dnb-form-label dnb-form-row__label"
htmlFor="group"
id="group-label"
is="label"
>
<label
className="dnb-form-label dnb-space__disabled--zero dnb-form-row__label"
className="dnb-form-label dnb-form-row__label"
htmlFor="group"
id="group-label"
>
Expand Down Expand Up @@ -227,7 +227,7 @@ exports[`Radio group component have to match group snapshot 1`] = `
value=""
>
<span
className="dnb-radio dnb-radio--label-position-right dnb-space__disabled--zero dnb-space__readOnly--zero"
className="dnb-radio dnb-radio--label-position-right"
>
<span
className="dnb-radio__order"
Expand All @@ -249,14 +249,14 @@ exports[`Radio group component have to match group snapshot 1`] = `
>
<Element
aria-hidden={true}
className="dnb-form-label dnb-space__disabled--zero"
className="dnb-form-label"
htmlFor="radio-1"
id="radio-1-label"
is="label"
>
<label
aria-hidden={true}
className="dnb-form-label dnb-space__disabled--zero"
className="dnb-form-label"
htmlFor="radio-1"
id="radio-1-label"
>
Expand Down Expand Up @@ -331,7 +331,7 @@ exports[`Radio group component have to match group snapshot 1`] = `
value=""
>
<span
className="dnb-radio dnb-radio--label-position-right dnb-space__disabled--zero dnb-space__readOnly--zero"
className="dnb-radio dnb-radio--label-position-right"
>
<span
className="dnb-radio__order"
Expand All @@ -353,14 +353,14 @@ exports[`Radio group component have to match group snapshot 1`] = `
>
<Element
aria-hidden={true}
className="dnb-form-label dnb-space__disabled--zero"
className="dnb-form-label"
htmlFor="radio-2"
id="radio-2-label"
is="label"
>
<label
aria-hidden={true}
className="dnb-form-label dnb-space__disabled--zero"
className="dnb-form-label"
htmlFor="radio-2"
id="radio-2-label"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`Slider component have to match snapshot 1`] = `
vertical="vertical"
>
<span
className="dnb-slider dnb-slider__label--horizontal dnb-space__min--zero className class"
className="dnb-slider dnb-slider__label--horizontal className class"
>
<FormLabel
class={null}
Expand All @@ -46,13 +46,13 @@ exports[`Slider component have to match snapshot 1`] = `
vertical={null}
>
<Element
className="dnb-form-label dnb-space__disabled--zero"
className="dnb-form-label"
htmlFor="id"
id="id-label"
is="label"
>
<label
className="dnb-form-label dnb-space__disabled--zero"
className="dnb-form-label"
htmlFor="id"
id="id-label"
>
Expand Down Expand Up @@ -89,7 +89,7 @@ exports[`Slider component have to match snapshot 1`] = `
>
<button
aria-label="subtract_title"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-right dnb-button--has-icon dnb-space__bounding--zero dnb-slider__button dnb-slider__button--subtract"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-right dnb-button--has-icon dnb-slider__button dnb-slider__button--subtract"
onClick={[Function]}
onMouseOut={[Function]}
title="subtract_title"
Expand Down Expand Up @@ -137,7 +137,7 @@ exports[`Slider component have to match snapshot 1`] = `
alt="subtract_title"
aria-hidden={false}
aria-label="subtract_title"
className="dnb-icon dnb-icon--default dnb-space__aria-hidden--zero dnb-button__icon"
className="dnb-icon dnb-icon--default dnb-button__icon"
role="img"
>
<subtract>
Expand Down Expand Up @@ -209,7 +209,7 @@ exports[`Slider component have to match snapshot 1`] = `
>
<button
aria-label="thump_title"
className="dnb-button dnb-button--secondary dnb-space__bounding--zero"
className="dnb-button dnb-button--secondary"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
Expand Down Expand Up @@ -288,7 +288,7 @@ exports[`Slider component have to match snapshot 1`] = `
>
<button
aria-label="add_title"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-right dnb-button--has-icon dnb-space__bounding--zero dnb-slider__button dnb-slider__button--add"
className="dnb-button dnb-button--secondary dnb-button--size-medium dnb-button--icon-position-right dnb-button--has-icon dnb-slider__button dnb-slider__button--add"
onClick={[Function]}
onMouseOut={[Function]}
title="add_title"
Expand Down Expand Up @@ -336,7 +336,7 @@ exports[`Slider component have to match snapshot 1`] = `
alt="add_title"
aria-hidden={false}
aria-label="add_title"
className="dnb-icon dnb-icon--default dnb-space__aria-hidden--zero dnb-button__icon"
className="dnb-icon dnb-icon--default dnb-button__icon"
role="img"
>
<add>
Expand Down
Loading

0 comments on commit 6ccfd06

Please sign in to comment.