Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Skaiir committed Sep 12, 2024
1 parent b7ae83f commit 7272cfe
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
9 changes: 4 additions & 5 deletions packages/form-js-carbon-styles/src/carbon-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@ const READONLY_STYLES = css`
}
}
&.fjs-checked .fjs-input[type='checkbox'],
.fjs-form-field-label.fjs-checked .fjs-input[type='checkbox'] {
&.fjs-checked .fjs-input[type='checkbox'] {
&:before {
border: 1px solid var(--cds-icon-disabled);
background: transparent;
Expand Down Expand Up @@ -418,8 +417,8 @@ const LABEL_DESCRIPTION_ERROR_STYLES = css`
margin-bottom: var(--cds-spacing-03);
}
.fjs-form-field.fjs-form-field-radio .fjs-form-field-label:not(:first-of-type),
.fjs-form-field.fjs-form-field-checklist .fjs-form-field-label:not(:first-of-type) {
.fjs-form-field.fjs-form-field-radio .fjs-inline-label:not(:first-of-type),
.fjs-form-field.fjs-form-field-checklist .fjs-inline-label:not(:first-of-type) {
margin: 0;
margin-bottom: 0.1875rem;
}
Expand Down Expand Up @@ -515,7 +514,7 @@ const CHECKBOX_STYLES = css`
}
.fjs-form-field.fjs-checked .fjs-input[type='checkbox'],
.fjs-form-field .fjs-form-field-label.fjs-checked .fjs-input[type='checkbox'] {
.fjs-form-field .fjs-inline-label.fjs-checked .fjs-input[type='checkbox'] {
&:before {
border: none;
border-width: 1px;
Expand Down
9 changes: 4 additions & 5 deletions packages/form-js-carbon-styles/src/carbon-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,7 @@
}
}

&.fjs-checked .fjs-input[type='checkbox'],
.fjs-form-field-label.fjs-checked .fjs-input[type='checkbox'] {
&.fjs-checked .fjs-input[type='checkbox'] {
&:before {
border: 1px solid var(--cds-icon-disabled);
background: transparent;
Expand Down Expand Up @@ -535,8 +534,8 @@
margin-bottom: var(--cds-spacing-03);
}

.fjs-form-field.fjs-form-field-radio .fjs-form-field-label:not(:first-of-type),
.fjs-form-field.fjs-form-field-checklist .fjs-form-field-label:not(:first-of-type) {
.fjs-form-field.fjs-form-field-radio .fjs-inline-label:not(:first-of-type),
.fjs-form-field.fjs-form-field-checklist .fjs-inline-label:not(:first-of-type) {
margin: 0;
margin-bottom: 0.1875rem;
}
Expand Down Expand Up @@ -632,7 +631,7 @@
}

.fjs-form-field.fjs-checked .fjs-input[type='checkbox'],
.fjs-form-field .fjs-form-field-label.fjs-checked .fjs-input[type='checkbox'] {
.fjs-form-field .fjs-inline-label.fjs-checked .fjs-input[type='checkbox'] {
&:before {
border: none;
border-width: 1px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ export function Checklist(props) {
const isChecked = hasEqualValue(option.value, values);

return (
<div className="fjs-inline-label" key={option.value}>
<div
className={classNames('fjs-inline-label', {
'fjs-checked': isChecked,
})}
key={option.value}>
<input
checked={isChecked}
class="fjs-input"
Expand All @@ -88,14 +92,7 @@ export function Checklist(props) {
aria-invalid={errors.length > 0}
aria-describedby={[descriptionId, errorMessageId].join(' ')}
/>
<Label
htmlFor={itemDomId}
label={option.label}
class={classNames({
'fjs-checked': isChecked,
})}
required={false}
/>
<Label htmlFor={itemDomId} label={option.label} required={false} />
</div>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ export function Radio(props) {
const isChecked = isEqual(option.value, value);

return (
<div className="fjs-inline-label" key={option.value}>
<div
className={classNames('fjs-inline-label', {
'fjs-checked': isChecked,
})}
key={option.value}>
<input
checked={isChecked}
class="fjs-input"
Expand Down

0 comments on commit 7272cfe

Please sign in to comment.