-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Form Inputs: Normalize disabled forms styles #5063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
176 commits
Select commit
Hold shift + click to select a range
5187a92
Add disabled styles for usa-input and prefix/suffix
mahoneycm a0c0928
Add disable previews for prefix/suffix
mahoneycm 27f837f
Update disabled suffix ID
mahoneycm 83f5d39
Fix disabled input ID
mahoneycm 123d806
Add quotes to disabled color
mahoneycm cb46d4b
Add disabled style to .usa-textarea:disabled
mahoneycm b2e66b9
Removed textarea style updates that are beyond scope of this work
mahoneycm 312c981
Merge branch 'develop' of github.com:uswds/uswds into cm-prefix-suffi…
mahoneycm a0f03c5
Adds disabled styles to text-area and usa-select
mahoneycm b3a0e77
Update disabled input & prefix styles
mahoneycm 6abf1e6
Add combo-box disabled styles
mahoneycm 28a888e
Update file input disabled styles
mahoneycm a218bb9
Create range slide disabled styles
mahoneycm ac463d3
Merge branch 'develop' of github.com:uswds/uswds into cm-disabled-for…
mahoneycm cf18972
Update date picker disabled cursor
mahoneycm 11908f8
Character Count: Add disabled form control
mahoneycm 9586aa6
Memorable Date: Create dynamic disabled styling
mahoneycm e9ec6ba
Select: Override disabled opacity
mahoneycm 309d0fd
Include aria-disabled styles & example
mahoneycm 07b8a68
Fix aria-disabled ID's
mahoneycm f62c579
Fix label for aria-disabled inputs
mahoneycm 392016b
Merge branch 'cm-prefix-suffix-disable' of github.com:uswds/uswds int…
mahoneycm 259ea94
Include aria-disabled in disabled styles
mahoneycm f03da8a
Normalize disabled and aria-disabled options in storybook
mahoneycm 58c7b57
Date Picker: Update disabled & aria-disabled controls to be similar t…
mahoneycm 664e73c
Memorable date: normalize disabled storybook controls
mahoneycm 3d46e95
Time Picker: Add disabled example
mahoneycm 547b1eb
Create and test disabled mixin on usa-input
mahoneycm 8b78b05
Move disabled settings into mixin
mahoneycm b1ca9f0
Consolidate character count controls
9f13406
Update checkbox stories
a41689a
Simplify aria_disabled check
9eb9e5b
Combo box fix formatting
71ee066
Combobox disable controls
4770bca
Range remove duplicate selector
6758d68
Select add comment for browser style
c662f50
Select simplify templates
49fc09f
Update import on disabled mixin
310d54a
Run prettier SCSS
4601bf3
Simplify controls in memorable date and time picker
060f707
Run prettier on component stories
12c3713
Replace prefix/suffix disabled styles with u-disabled mixin
mahoneycm 6e9498e
Alphabetize core module exports
mahoneycm 50f287c
Normalize usa-range disabled options
mahoneycm e99927e
Move disabled styles into mixin to match #5051
mahoneycm b5b7a02
Enables combo box to initialize with aria-disabled
mahoneycm c31da3d
Enabled time picker disabled initialization
mahoneycm 6523f92
File input: Seperate disabled and aria-disabled logic
mahoneycm 042a559
File input: move disabled and aria-disabled stories into radio controls
mahoneycm 3f40ef7
Date Picker: Adjust calendar button opacity when disabled
mahoneycm 3ed2001
File input: Adjust disabled text color
mahoneycm 2fc2412
Checkbox & Radio: Adjust disabled text opacity for better color contrast
mahoneycm d08583e
Radio: Switch disabled storybook controls from boolean to radio buttons
mahoneycm d57db05
Checkbox: Update disabled storybook controls from boolean to radio bu…
mahoneycm d3511dc
Character count: Switch disable controls to radio buttons
mahoneycm d7ea78f
Combo Box: Switch disable controls to radio buttons
mahoneycm a88ec03
Date Picker: Check for aria-disabled on initialization
mahoneycm e6aedc3
Date Picker: Move disable controls to radio buttons
mahoneycm 95c9dfc
Date Picker: Update default values for disabled stories
mahoneycm 57692e1
Input Mask: Switch disabled controls to radio buttons
mahoneycm d23d70c
Memorable Date: Switch disable controls to radio buttons
mahoneycm 6688411
Time Picker: Switch disabled controls to radio
mahoneycm f96691b
Select: Switch disabled controls to radio buttons
mahoneycm 9a3db9f
Select: Switch disabled text color to compliant contrast
mahoneycm e98fd24
Text Input: Clean up story and state controls
mahoneycm 7d01f03
Prefix Suffix: Clean up story and state controls
mahoneycm d959f4c
Text Input: Update input template
mahoneycm 7abdf55
Normalize disabled stories
mahoneycm ac850d8
Set default args for disabled combo-box and file input to fix CircleC…
mahoneycm 687156b
Prefix/Suffix: Remove error example and add disabled stories
mahoneycm fd7c14a
Date Picker: Fix closing tag alignment
mahoneycm e464b8d
Prefix: Remove extra space inside label
mahoneycm 2afdb02
Radio: Increase readability of input tags
mahoneycm e68015d
Merge branch 'cm-disabled-forms-styles' of github.com:uswds/uswds int…
mahoneycm a753027
Range Slider: Replace duplicated styles with disabled mixin
mahoneycm 5a1db56
Select: Adjust disabled opacity for compliance across browsers
mahoneycm 0e828b0
Memorable Date: Add dynamic aria-disabled attributes and update template
mahoneycm 3a2f797
Input: Add disabled stories
mahoneycm 42be337
File input: Disabled styles improvements
mahoneycm f818d8a
Disabled mixin: Remove important flag to fix disabled button
mahoneycm 67af58c
Button: Replace disabled styles with mixin
mahoneycm 2200fd4
Create disabled forms pattern
mahoneycm a326260
Remove references to usa-button--disabled
mahoneycm 8992c33
Removes file-input--disabled class and references
mahoneycm 72f9178
Run prettier
mahoneycm 4cc1c36
Normalize stories args
mahoneycm 1466e8f
Normalize storybook arg controls
mahoneycm 32253bd
Select: override disabled text color
mahoneycm 0d72db4
File input: Override file input link color for color compliance
mahoneycm 449f01e
Change aria_disabled to aria-disabled in all stories
mahoneycm fbf16cf
Memorable Date: Update disabled var names to follow existing patterns
mahoneycm da03960
Remove outline-disabled class references
mahoneycm 0fa5b03
Added dynamic aria-disabled rules to match disabled attribute
mahoneycm ce16187
Switch prefix/suffix to absolute positioning and replace disabled class
mahoneycm 7f95a35
Resolve padding issues due to absolute positioning
mahoneycm fe1cc75
Restore file-input--disabled class and settings
mahoneycm ed403d6
Add missing semi-colon
mahoneycm 08e58b8
File input: Remove aria-disabled attribute from parent div
mahoneycm 8d81793
Lower case variable names
mahoneycm 4b020e3
Remove +1 input padding on prefix/suffix inputs
mahoneycm 5581cdd
Remove references to disabled class
mahoneycm 7963934
Add color utility note to disabled mixin
mahoneycm 1820ddc
Replace focus js with css
mahoneycm bbb5ba2
Replace outline offset with var
mahoneycm 3b9d228
Remove spec test
mahoneycm 5db72ab
Use padding variable
mahoneycm c364ce6
Update packages/usa-input-prefix-suffix/src/styles/_usa-input-prefix-…
mahoneycm 300a391
Minro CSS cleanup
mahoneycm 180e117
Merge branch 'develop' of github.com:uswds/uswds into cm-disabled-for…
mahoneycm 9f85c95
Input Mask: Small disabled story book controls fix
mahoneycm 25f1950
Add note to disabled mixin
mahoneycm c2dd784
Merge branch 'cm-prefix-suffix-disable' of github.com:uswds/uswds int…
mahoneycm 8841e3c
Merge branch 'cm-remove-disabled-classes' of github.com:uswds/uswds i…
mahoneycm c5b3685
Radio/Checkbox: Adjust disabled tile border color
mahoneycm ac3005f
Combobox: Adjusted input button separator to be visible in disabled s…
mahoneycm af556c1
File input: Minor scss cleanup
mahoneycm b2f77a1
Merge branch 'develop' of github.com:uswds/uswds into cm-disabled-for…
mahoneycm 8541b86
Removed unused form examples from disabled forms
mahoneycm c7af4c1
Memorable date: Remove dynamic disabled styles
mahoneycm 8c0c8b6
Button: Include aria-disabled in show all button states
mahoneycm 88469de
Button: Update disabled button styles to be color contrast compliant
mahoneycm 0ab76bf
Button Group: Fix button group disabled display
mahoneycm fbdad41
Remove important flags and establish disabled text variables (temporary)
mahoneycm 33a7fb1
Button: Use set-text-from-bg to set text color for disabled variants
mahoneycm 5ccfc5a
Create and use -text-disabled variables
f4ec744
Remove -text variables; declare text color on disabled
1118e66
Remove set-text-from-bg from button-disabled
6845ddb
Darken disabled checked color; update none normal bg-blue 31 bold no-…
cf6c71a
Change naming from -text-disabled to -color-disabled-text-text-disabl…
6e28e0e
Add disabled controls to usa-form disabled story
433656d
Add args to u-disabled
78153d0
Use u-disabled args in usa-button--outline disabled; remove unnecessa…
5e167d0
Update usa-combo-box__input-button-separator height and disabled color
b1b0590
Remove hover/active/focus styles from button-disabled
f776981
Rub prettier
9637c06
Restore checkbox test
5af8162
Fix test and tile stories for usa-checkbox
d7bd6dd
Remove defaultValue: none
3ffa73a
Remove usa-input-group--disabled from templates
d8915a6
Standardize disabled controls on input prefix/suffix
ff2928b
Make .usa-combo-box__input-button-separator color consistent
d96e612
Move styling for usa-date-picker__button out of JS
1aee744
Update variable names for input-prefix-suffix
b8a3b33
Code formatting for usa-range
0e15e5f
Remove important on usa-file-input__box
91c81b8
Remove unused @use
d73395c
Remove unused -disabled-alpha vars in checkbox/radio scss
ef31f3b
Restore input prefix error state
4139677
Update input prefix id to prevent test failure
a448409
Template formatting
0f13706
Undo formatting
e301a4c
Move usa-form into test-patterns
0780e50
Merge branch 'develop' of https://github.com/uswds/uswds into al-disa…
0b39e60
Restore usa-form.stories.js to /src; prefix usa-form.twig with 'test'
9cbaa85
Merge pull request #5167 from uswds/al-disabled-forms-styles
mahoneycm c00f390
Select & Combobox: Update disabled opacity and placeholder color to e…
mahoneycm 75b3bc8
Select: remove child option selector that was irrelevent
mahoneycm 370b23f
Date Picker: Fix safari default date text color
mahoneycm 38ab836
Move safari text fill fix out of date-picker and into combobox and input
mahoneycm fa97c53
Include standard opacity in disabled mixin to normalize form elements…
mahoneycm fc6dde1
Range slider: Override opacity for mobile disabled styles
mahoneycm 35c1c63
Combobox: Replace toggle-list/clear-input disabled mixin with cursor:…
mahoneycm 8359062
Fix typo
mahoneycm 6919151
Run prettier scss
mahoneycm e61302c
Update component names on disabled forms test story
9996c3d
Run prettier
13673e4
Merge branch 'develop' of https://github.com/uswds/uswds into cm-disa…
a26115a
Input: Remove storybook controls from showcase
mahoneycm 79e0a5d
Move button demo setting to story
82d6958
Remove disabled check in prefix error state example
fff820d
Remove duplicate ID from text input
686fdd4
Disabled mixin: Remove usa-button hover & active classes from mixin
mahoneycm e7c7f10
Button Disabled: Include hover and active classes in mixin
mahoneycm 52f16cf
Merge branch 'develop' of github.com:uswds/uswds into cm-disabled-for…
mahoneycm 726d43a
[prettier] Fix whitespace
thisisdano 799076c
[prettier] Remove trailing comma
thisisdano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| { | ||
| "modifier": "usa-button--accent-cool", | ||
| "text": "Accent cool", | ||
| "is_demo": true, | ||
| "aria_disabled": false | ||
| "text": "Accent cool" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| { | ||
| "modifier": "usa-button--accent-warm", | ||
| "text": "Accent warm", | ||
| "is_demo": true, | ||
| "aria_disabled": false | ||
| "text": "Accent warm" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| { | ||
| "modifier": "usa-button--base", | ||
| "text": "Base", | ||
| "is_demo": true, | ||
| "aria_disabled": false | ||
| "text": "Base" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| { | ||
| "modifier": "usa-button--big", | ||
| "text": "Big button", | ||
| "is_demo": true, | ||
| "aria_disabled": false | ||
| "text": "Big button" | ||
| } |
4 changes: 1 addition & 3 deletions
4
packages/usa-button/src/content/usa-button~outline-inverse.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| { | ||
| "modifier": "usa-button--outline usa-button--inverse", | ||
| "text": "Outline inverse", | ||
| "is_demo": true, | ||
| "aria_disabled": false | ||
| "text": "Outline inverse" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| { | ||
| "modifier": "usa-button--outline", | ||
| "text": "Outline", | ||
| "is_demo": true, | ||
| "aria_disabled": false | ||
| "text": "Outline" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| { | ||
| "modifier": "usa-button--secondary", | ||
| "text": "Secondary", | ||
| "is_demo": true, | ||
| "aria_disabled": false | ||
| "text": "Secondary" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| { | ||
| "modifier": "usa-button--unstyled", | ||
| "text": "Unstyled button", | ||
| "is_demo": true, | ||
| "aria_disabled": false | ||
| "text": "Unstyled button" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,49 @@ | ||
| import Component from "./usa-checkbox.twig"; | ||
| import Tile from "./usa-checkbox--tile.twig"; | ||
| import TileComponent from "./usa-checkbox--tile.twig"; | ||
| import TestComponent from "./test/test-patterns/test-usa-checkbox.twig"; | ||
|
|
||
| export default { | ||
| title: "Components/Form Inputs/Checkbox", | ||
| argTypes: { | ||
| aria_disabled: { | ||
| control: { type: "boolean" }, | ||
| defaultValue: false, | ||
| name: "aria-disabled", | ||
| disabled_state: { | ||
| name: "Disabled state", | ||
| control: { type: "radio" }, | ||
| options: ["none", "disabled", "aria-disabled"], | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| const Template = (args) => Component(args); | ||
| const TileTemplate = (args) => Tile(args); | ||
| const TileTemplate = (args) => TileComponent(args); | ||
| const TestTemplate = (args) => TestComponent(args); | ||
|
|
||
| export const Default = Template.bind({}); | ||
| export const CheckboxTile = TileTemplate.bind({}); | ||
|
|
||
| export const Disabled = Template.bind({}); | ||
| Disabled.args = { | ||
| disabled_state: "disabled", | ||
| }; | ||
|
|
||
| export const AriaDisabled = Template.bind({}); | ||
| AriaDisabled.args = { | ||
| disabled_state: "aria-disabled", | ||
| }; | ||
|
|
||
| export const Tile = TileTemplate.bind({}); | ||
|
|
||
| export const DisabledTile = TileTemplate.bind({}); | ||
| DisabledTile.args = { | ||
| disabled_state: "disabled", | ||
| }; | ||
|
|
||
| export const AriaDisabledTile = TileTemplate.bind({}); | ||
| AriaDisabledTile.args = { | ||
| disabled_state: "aria-disabled", | ||
| }; | ||
|
|
||
| export const Test = TestTemplate.bind({}); | ||
| Test.argTypes = { | ||
| aria_disabled: { | ||
| disabled_state: { | ||
| table: { disable: true }, | ||
| }, | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.