Skip to content

Commit 9f576a3

Browse files
FormControl + Autocomplete component updates (#2075)
* 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 <[email protected]>
1 parent 46fb49c commit 9f576a3

File tree

6 files changed

+413
-2
lines changed

6 files changed

+413
-2
lines changed

.changeset/empty-drinks-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/css": patch
3+
---
4+
5+
FormControl + Autocomplete component updates

docs/src/@primer/gatsby-theme-doctocat/nav.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
children:
4747
- title: Alerts
4848
url: /components/alerts
49-
- title: Autocomplete
50-
url: /components/autocomplete
5149
- title: Avatars
5250
url: /components/avatars
5351
- title: Blankslate

src/actionlist/action-list-item.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,27 @@
235235
}
236236
}
237237

238+
// disabled
239+
&[aria-disabled='true'] {
240+
.ActionList-item-content {
241+
.ActionList-item-label,
242+
.ActionList-item-description {
243+
color: var(--color-primer-fg-disabled);
244+
}
245+
246+
.ActionList-item-visual {
247+
fill: var(--color-primer-fg-disabled);
248+
}
249+
250+
@media (hover: hover) {
251+
&:hover {
252+
cursor: not-allowed;
253+
background-color: transparent;
254+
}
255+
}
256+
}
257+
}
258+
238259
// variants
239260

240261
// danger

src/autocomplete/autocomplete.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// This file can be deprecated when AutoComplete is upstreamed to PVC + rolled out to dotcom https://github.com/github/primer/issues/796
2+
// AutoComplete relies on FormControl, Overlay and ActionList CSS
3+
14
// Stacked label (default)
25
.autocomplete-label-stacked {
36
display: block;

0 commit comments

Comments
 (0)