Skip to content
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

Fluid form #3356

Merged
merged 23 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1954431
Modal accessibility content and images (#3303)
mbgower Dec 20, 2022
add1f1f
Compressed Images (#3321)
github-actions[bot] Jan 3, 2023
2d503e0
Compressed Images (#3323)
github-actions[bot] Jan 3, 2023
c6dc314
typo fix (#3324)
jeanservaas Jan 3, 2023
c4eea1d
typo fix (#3325)
jeanservaas Jan 3, 2023
764e01b
Update tooltip accessibility.mdx (#3318)
mbgower Jan 3, 2023
aa4790b
Tooltip accessibility update (#3330)
mbgower Jan 4, 2023
5ca4ef4
update usage image (#3331)
laurenmrice Jan 5, 2023
da42bee
added fourth accessibility tab to toggletip (#3319)
mbgower Jan 5, 2023
c5214a4
chore(release): update carbon deps (#3335)
carbon-automation[bot] Jan 6, 2023
454d19d
chore(deps): bump json5 from 1.0.1 to 1.0.2 (#3338)
dependabot[bot] Jan 6, 2023
2f02240
Compressed Images (#3340)
github-actions[bot] Jan 9, 2023
df1b868
update .mdx (#3337)
laurenmrice Jan 12, 2023
feaee4e
docs: tooltip a11y tab update (#3336)
laurenmrice Jan 12, 2023
8b82fdb
Compressed Images (#3349)
github-actions[bot] Jan 17, 2023
a6bdc38
updating the color tokens on the color page (#3345)
thyhmdo Jan 17, 2023
6864782
chore(release): update carbon deps (#3350)
carbon-automation[bot] Jan 18, 2023
ec444b4
docs(fluid): form
aagonzales Jan 19, 2023
2c41501
Update usage.mdx
aagonzales Jan 20, 2023
b648634
updated-style-tab
aagonzales Jan 20, 2023
39512e6
Merge branch 'fluid-inputs' into fluid-form
aagonzales Jan 20, 2023
496134b
Apply suggestions from design review
aagonzales Jan 24, 2023
7741abd
image-updates
aagonzales Jan 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
"dependencies": {
"@babel/core": "^7.15.8",
"@carbon/charts-react": "0.55.0",
"@carbon/elements": "^11.16.0",
"@carbon/icons-react": "^11.13.0",
"@carbon/pictograms": "^12.10.0",
"@carbon/pictograms-react": "^11.36.0",
"@carbon/react": "^1.19.0",
"@carbon/elements": "^11.18.0-rc.0",
"@carbon/icons-react": "^11.15.0-rc.0",
"@carbon/pictograms": "^12.11.0",
"@carbon/pictograms-react": "^11.37.0",
"@carbon/react": "^1.21.0-rc.0",
"@loadable/component": "^5.15.2",
"@slack/web-api": "^5.11.0",
"babel-preset-env": "^1.7.0",
Expand Down
40 changes: 20 additions & 20 deletions src/data/guidelines/color-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,19 @@ const colorTokens = {
value: {
white: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g10: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g90: {
name: 'Gray 80 hover',
hex: '#4c4c4c',
hex: '#474747',
},
g100: {
name: 'Gray 90 hover',
hex: '#353535',
hex: '#333333',
},
},
},
Expand All @@ -263,19 +263,19 @@ const colorTokens = {
value: {
white: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g10: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g90: {
name: 'Gray 70 hover',
hex: '#656565',
hex: '#636363',
},
g100: {
name: 'Gray 80 hover',
hex: '#4c4c4c',
hex: '#474747',
},
},
},
Expand All @@ -284,19 +284,19 @@ const colorTokens = {
value: {
white: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g10: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g90: {
name: 'Gray 60 hover',
hex: '#5e5e5e',
},
g100: {
name: 'Gray 70 hover',
hex: '#656565',
hex: '#636363',
},
},
},
Expand Down Expand Up @@ -792,19 +792,19 @@ const colorTokens = {
value: {
white: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g10: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g90: {
name: 'Gray 80 hover',
hex: '#4c4c4c',
hex: '#474747',
},
g100: {
name: 'Gray 90 hover',
hex: '#353535',
hex: '#333333',
},
},
},
Expand All @@ -813,11 +813,11 @@ const colorTokens = {
value: {
white: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g10: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g90: {
name: 'Gray 70 hover',
Expand All @@ -834,11 +834,11 @@ const colorTokens = {
value: {
white: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g10: {
name: 'Gray 10 hover',
hex: '#e5e5e5',
hex: '#e8e8e8',
},
g90: {
name: 'Gray 60 hover',
Expand Down Expand Up @@ -2266,4 +2266,4 @@ const colorTokens = {
},
};

export default colorTokens;
export default colorTokens;
Binary file modified src/pages/components/button/images/button_usage_27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/pages/components/form/images/form-style-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/pages/components/form/images/form-usage-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/pages/components/form/images/form-usage-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/pages/components/form/images/form-usage-4.png
Binary file not shown.
Binary file modified src/pages/components/form/images/form-usage-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/pages/components/form/images/form-usage-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/pages/components/form/images/form-usage-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/pages/components/form/images/form-usage-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/pages/components/form/images/form-usage-optional.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/pages/components/form/images/form-usage-required.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 14 additions & 10 deletions src/pages/components/form/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ for specific typography details on each component.

</div>

<Caption>
Example of light fields with $field-02 (left) and the default version with
$field-01 (right)
</Caption>

## Typography

Form headings and labels should be set in sentence case with the first letter of
Expand All @@ -47,20 +42,20 @@ for specific typography details on each component.

Forms are made up of several different components. The order in which these
elements are arranged is flexible and by default the vertical spacing between
elements should follow the guidelines below. The vertical spacing in a form can
elements follow the guidelines below. The vertical spacing in a fixed form can
be adjusted to be smaller than the default depending on the use case or layout.

Forms can be one column or two. The width of each column varies based on the
content and layout of the design. On mobile, forms can only have one column.

### Recommended
### Recommended for fixed forms

| Element | Property | px / rem | Spacing token |
| -------------------- | ------------- | -------- | ------------- |
| Form items | margin-bottom | 32 / 2 | `$spacing-07` |
| Title area | margin-bottom | 32 / 2 | `$spacing-07` |
| Title area | margin-bottom | 40 / 2.5 | `$spacing-08` |
| Gutter between items | – | 32 / 2 | `$spacing-07` |
| Buttons | margin-top | 32 / 2 | `$spacing-07` |
| Buttons | margin-top | 48 / 3 | `$spacing-09` |

<div className="image--fixed">

Expand All @@ -72,9 +67,18 @@ content and layout of the design. On mobile, forms can only have one column.
Structure and spacing measurements for a double column form | px / rem
</Caption>

### Recommended for fluid forms

| Element | Property | px / rem | Spacing token |
| -------------------- | ------------- | -------- | ------------- |
| Form items | margin-bottom | 0 px | – |
| Title area | margin-bottom | 40 / 2.5 | `$spacing-08` |
| Gutter between items | – | 1 px | – |
| Buttons | margin-top | 48 / 3 | `$spacing-09` |

<div className="image--fixed">

![Structure and spacing measurements for a single column form](images/form-style-2.png)
![Structure and spacing measurements for a single column form](images/form-style-4.png)

</div>

Expand Down
Loading