Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
robphoenix committed Dec 12, 2024
1 parent 75d158b commit 3229e87
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react/src/components/Checkbox/Checkbox.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
.uw-Checkbox {
cursor: pointer;

* {
cursor: pointer;
}

.uw-Checkbox-CheckboxBase {
&:where(:focus-visible) {
--checkbox-outline-color: var(--checkbox-outline-color-focus);
}
}

/* we do this so that the gap between the checkbox & label is clickable */
.uw-Checkbox-Label {
position: relative;

&::before {
content: '';
position: absolute;
Expand Down
7 changes: 7 additions & 0 deletions packages/react/src/components/CheckboxBase/CheckboxBase.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
width: 24px;
border: none;
border-radius: 50%;

--checkbox-color: var(--color-cyan1000);
--checkbox-color-disabled: var(--color-grey400);
--checkbox-background-color-unchecked: white;
Expand All @@ -29,6 +30,7 @@
--checkbox-border-color-checked-disabled: var(--color-grey150);
--checkbox-outline-color: transparent;
--checkbox-outline-color-focus: var(--color-cyan700);

color: var(--checkbox-color);
background-color: var(--checkbox-background-color);
outline: 'none';
Expand All @@ -50,23 +52,28 @@
--checkbox-border-color-disabled: var(--checkbox-border-color-unchecked-disabled);
--checkbox-background-color-disabled: var(--checkbox-background-color-unchecked-disabled);
}

&:where([data-state='checked']) {
--checkbox-background-color: var(--checkbox-background-color-checked);
--checkbox-border-color: var(--checkbox-border-color-checked);
--checkbox-border-color-disabled: var(--checkbox-border-color-checked-disabled);
--checkbox-background-color-disabled: var(--checkbox-background-color-checked-disabled);
}

@media (hover: hover) {
&:where(:hover:enabled) {
box-shadow: 0 0 0 8px var(--color-cyan75);

--checkbox-border-color: var(--checkbox-border-color-hover);
}
}

&:where([data-disabled], [data-disabled] &) {
--checkbox-color: var(--checkbox-color-disabled);
--checkbox-border-color: var(--checkbox-border-color-disabled);
--checkbox-background-color: var(--checkbox-background-color-disabled);
}

&:where(:focus-visible) {
--checkbox-border-color: var(--checkbox-border-color-focus);
}
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/components/CheckboxGroup/CheckboxGroup.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.uw-CheckboxGroupRoot {
min-width: fit-content;
flex-wrap: wrap;

&:where([data-orientation='horizontal']) {
flex-direction: row;
}

&:where([data-orientation='vertical']) {
flex-direction: column;
}
Expand Down
9 changes: 9 additions & 0 deletions packages/react/src/components/CheckboxTile/CheckboxTile.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,36 @@
gap: var(--space-100);
padding: var(--space-200);
border-radius: 8px;

--checkbox-tile-border-width: 2px;
--checkbox-tile-border-color: var(--color-grey400);
--checkbox-tile-border-color-hover: var(--color-cyan500);
--checkbox-tile-border-color-focus: var(--color-cyan500);
--checkbox-tile-border-color-disabled: var(--color-grey300);

box-shadow: inset 0 0 0 var(--checkbox-tile-border-width) var(--checkbox-tile-border-color);

&:where(:has(:focus-visible)) {
background-color: var(--color-cyan75);
outline: 4px solid var(--color-cyan700);

--checkbox-tile-border-color: var(--checkbox-tile-border-color-focus);
}

@media (hover: hover) {
&:where(:hover:not([data-disabled], [data-disabled] &)) {
background-color: var(--color-cyan75);

--checkbox-tile-border-color: var(--checkbox-tile-border-color-hover);
}
}

&:where([data-disabled], [data-disabled] &) {
--checkbox-tile-border-color: var(--checkbox-tile-border-color-disabled);
}

cursor: pointer;

* {
cursor: pointer;
}
Expand Down

0 comments on commit 3229e87

Please sign in to comment.