Skip to content

Commit

Permalink
FormControl + Autocomplete component updates (#2075)
Browse files Browse the repository at this point in the history
* setup new tokens

* layout

* label positioning

* cleanup

* states

* cleanup

* convert label to use grid for caption text (start)

* begin checkbox/radio custom styles

* fix input grid (mostly)

* refactor + cleanup

* consolidate styles, start custom checkbox

* cleanup

* lint

* add disabled state to actionlist-item

* adjust trailing action grid

* Stylelint auto-fixes

* remove docs

* add indeterminate checkbox styles

* Create empty-drinks-report.md

Co-authored-by: Actions Auto Build <actions@github.com>
  • Loading branch information
langermank and actions-user committed May 26, 2022
1 parent 46fb49c commit 9f576a3
Show file tree
Hide file tree
Showing 6 changed files with 413 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-drinks-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

FormControl + Autocomplete component updates
2 changes: 0 additions & 2 deletions docs/src/@primer/gatsby-theme-doctocat/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
children:
- title: Alerts
url: /components/alerts
- title: Autocomplete
url: /components/autocomplete
- title: Avatars
url: /components/avatars
- title: Blankslate
Expand Down
21 changes: 21 additions & 0 deletions src/actionlist/action-list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,27 @@
}
}

// disabled
&[aria-disabled='true'] {
.ActionList-item-content {
.ActionList-item-label,
.ActionList-item-description {
color: var(--color-primer-fg-disabled);
}

.ActionList-item-visual {
fill: var(--color-primer-fg-disabled);
}

@media (hover: hover) {
&:hover {
cursor: not-allowed;
background-color: transparent;
}
}
}
}

// variants

// danger
Expand Down
3 changes: 3 additions & 0 deletions src/autocomplete/autocomplete.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This file can be deprecated when AutoComplete is upstreamed to PVC + rolled out to dotcom https://github.com/github/primer/issues/796
// AutoComplete relies on FormControl, Overlay and ActionList CSS

// Stacked label (default)
.autocomplete-label-stacked {
display: block;
Expand Down

0 comments on commit 9f576a3

Please sign in to comment.