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

Global Forms #743

Merged
merged 116 commits into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from 112 commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
78db2ac
basic partials architecture
Heydon May 4, 2022
20ac21e
error and error icon
Heydon May 5, 2022
2076f97
select template
Heydon May 5, 2022
22001ac
textarea
Heydon May 5, 2022
86624eb
template hierarchy, logo, and BEM
Heydon May 6, 2022
6c0745c
classes named after component
Heydon May 6, 2022
d8c2cdb
renaming and reorganization of partials
Heydon May 6, 2022
8a503cc
checkbox input and improved structure
Heydon May 9, 2022
0172a8e
basic file upload
Heydon May 9, 2022
32ef2f4
basic colors
Heydon May 9, 2022
7fe58ee
basic style settings using tokens where applicable
Heydon May 9, 2022
f970968
legend allowing headings
Heydon May 9, 2022
0df4400
initial styling (text inputs)
Heydon May 9, 2022
0a2ae35
select and radio styling
Heydon May 11, 2022
a9f93e1
adds component tokens build step
May 11, 2022
3b7d7f5
adds default brand global component tokens build step
May 11, 2022
7d3f87e
adds new aliases
May 11, 2022
a42f265
adds default footer tokens
May 11, 2022
79ef9de
updates generated aliases
May 11, 2022
4594502
adds forms default sass files
May 11, 2022
b8c7769
global icons and radio secreted fields
Heydon May 11, 2022
00a1e6f
adds more borders
May 11, 2022
3d25034
adds indent to forms
May 11, 2022
f0c8b70
updates package json to do all global component brands
May 11, 2022
282d3c7
updates alias compiled sass files
May 11, 2022
f8ae023
global forms default styles
May 11, 2022
8cccf4d
missing global brand variant generators
May 11, 2022
001d91f
fixes if else statement for comment generation in sass files
May 12, 2022
84121e7
checkboxes
Heydon May 12, 2022
5424d49
updates global brands build scripts
May 12, 2022
447729e
updates brands components build scripts
May 12, 2022
e9570d5
updates npm scripts
May 12, 2022
3428227
recreated Sass variables
May 12, 2022
18ffb33
generated global form default sass
May 12, 2022
783e4a3
adds SN typography to default
May 12, 2022
4948316
html/prose field
Heydon May 16, 2022
559a8e8
textareas (rows and columns)
Heydon May 16, 2022
de4f90b
fixes the naming so file headers get printed out
May 16, 2022
58b25c9
makes one build script for all brands on global components
May 16, 2022
e959106
updates npm scripts
May 16, 2022
c818a97
deletes old global component scripts
May 16, 2022
9c702c9
compiled Sass
May 16, 2022
18c8028
adds default typography
May 16, 2022
dd97e2b
tidies up package json
May 16, 2022
fefc430
tidies up brand components build script
May 16, 2022
db8a85d
compiled Sass tokens
May 16, 2022
8b18e6b
more tidying
May 16, 2022
9b45a92
adds absolute and relative qualifiers for spacing and sizing
May 16, 2022
05f7c40
updates spacing references to include new qualifiers
May 16, 2022
03eeec9
updates spacing references to include new qualifiers
May 16, 2022
51d0ebe
all the recompiled Sass
May 16, 2022
d77145c
error summary
Heydon May 16, 2022
b306df8
better tokenage
Heydon May 17, 2022
6700dd4
Merge branch 'enhancement/tokens-and-form-tokens' into form-templates
Heydon May 18, 2022
c95158c
converting global-forms to use tokens
Heydon May 18, 2022
13e8046
Merge branch 'master' into form-templates
Heydon May 18, 2022
8910c3a
continued
Heydon May 19, 2022
f2bfd67
continued tokenization
Heydon May 19, 2022
863820e
tokenization continued
Heydon May 19, 2022
fe17f08
changes a few things around and creates alias colour tokens
May 19, 2022
0e65fcf
changes so font weight is now compiled to Sass variables
May 19, 2022
98ae6db
updates forms tokens json
May 19, 2022
479f7c3
adds new compiled brand context sass variables from tokens
May 19, 2022
21ef59f
adds new compiled brand context sass variables from tokens
May 19, 2022
8dc80d5
compiled form variables
May 19, 2022
0a98a84
small changes to _forms.scss that need checking
May 19, 2022
feec192
pluralises(?) form to forms for sass variable
May 31, 2022
e52d1c5
demo file created
May 31, 2022
ffd52a2
rejigging after tokens integration
Heydon Jun 1, 2022
568d4c7
Merge branch 'master' into form-templates
sturobson Jun 6, 2022
82c9599
Merge branch 'master' into form-templates
sturobson Jun 27, 2022
df06983
README and versioning
Heydon Jun 27, 2022
c0c19d9
buttons field
Heydon Jun 28, 2022
3d2f143
Merge branch 'master' into form-templates
Heydon Jun 28, 2022
6cfb833
Merge branch 'master' into form-templates
Heydon Jun 28, 2022
ec355aa
rebuilt tokens
Heydon Jun 28, 2022
395066f
updates tokens to abstract named colors in alias from new numerically…
Jun 28, 2022
9f6a436
all the compiled Sass
Jun 28, 2022
d41e2e1
changes it so component output uses CSS values
Jun 28, 2022
28d8c75
compiled tokens
Jun 28, 2022
2a566ff
token regeneration and textarea whitespace removal
Heydon Jun 28, 2022
f50cc31
optional text inputs and label for connection
Heydon Jun 29, 2022
929d01c
novalidate
Heydon Jun 29, 2022
48931a5
optional property
Heydon Jun 29, 2022
032d823
improved usage example
Heydon Jun 29, 2022
8c01639
file input in demo
Heydon Jun 29, 2022
61e9e14
updated to latest brand-context dependency
Heydon Jun 29, 2022
f892b36
new generated Sass variables from Design Tokens
Jun 29, 2022
03f7d5c
grey hint color
Heydon Jun 29, 2022
b5ff14a
Merge branch 'form-templates' of github.com:springernature/frontend-t…
Heydon Jun 29, 2022
bca5a74
id correction
Heydon Jun 30, 2022
227a922
upgraded brand context dep
Heydon Jun 30, 2022
28a4434
IE11 selector rollback
Heydon Jun 30, 2022
bea81fc
reverted logical property temporarily
Heydon Jun 30, 2022
4080e47
radio name tersity
Heydon Jun 30, 2022
630fbaa
tokens audit
Heydon Jun 30, 2022
a267c79
springernature and nature brand tweaks
Heydon Jul 1, 2022
56b0cf0
radio spacing
Heydon Jul 1, 2022
9c9cee4
copy change for clarity over select[multiple]
Heydon Jul 1, 2022
d7a7085
classes note
Heydon Jul 1, 2022
4750107
revert class stuff
Heydon Jul 1, 2022
446464c
remove legend heading margin, use stacking
Heydon Jul 1, 2022
911b007
stronger legend avice
Heydon Jul 1, 2022
9a99dd9
'type' terminology to 'template'
Heydon Jul 1, 2022
22c3024
versioning
Heydon Jul 1, 2022
18bc17b
README warning
Heydon Jul 1, 2022
94b24cb
chore: add missing trailing semicolon
Heydon Jul 1, 2022
f5fd593
colors to three digits
Heydon Jul 1, 2022
5404871
fieldset reference -> fieldsets
Heydon Jul 4, 2022
6054ce4
qualified code syntax
Heydon Jul 4, 2022
47da5df
update sass-lint config to allow for long form hex codes
alexkilgour Jul 4, 2022
eb52f4c
Merge branch 'master' into form-templates
aliuk2012 Jul 4, 2022
0ab79c1
docs changes, thanks Amy
Heydon Jul 4, 2022
5132d88
Merge branch 'form-templates' of github.com:springernature/frontend-t…
Heydon Jul 5, 2022
29017c0
AMy second pass
Heydon Jul 5, 2022
b7ca29b
arbitrary attributes support
Heydon Jul 5, 2022
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
9 changes: 9 additions & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
options:
config-file: ./node_modules/@springernature/sasslint-config/config/.sass-lint.yml
rules:
# Design tokens need to be in long form for design tool integration
# Allow both styles to fit with existing formatting
hex-length:
- 2
-
style: off
4 changes: 4 additions & 0 deletions context/brand-context/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# History
## 25.0.0 (2022-06-29)
* UDPATES:
* updates generated Sass from Design Tokens
* Long form hex codes for Design Tokens - allows design tool integration
## 24.1.0 (2022-06-29)
* UPDATES:
* Normalizer from v5 to v8 inline with our own IE support matrix.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--background-page: #f8f8f8;
$tokens--background-container: #ffffff;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--border-color-primary: #222222;
$tokens--border-color-input: #555555;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--breakpoints-xs: 320px; // mobile
$tokens--breakpoints-sm: 580px; // small tablet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--button-background-primary-resting: #01324b;
$tokens--button-background-primary-hover: #ffffff;
Expand Down
33 changes: 33 additions & 0 deletions context/brand-context/default/scss/00-tokens/_color.variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

// Do not edit directly
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--color-white: #ffffff;
$tokens--color-black: #000000;
$tokens--color-grayscale-200: #f8f8f8;
$tokens--color-grayscale-300: #f3f3f3;
$tokens--color-grayscale-400: #dadada;
$tokens--color-grayscale-500: #999999;
$tokens--color-grayscale-600: #666666;
$tokens--color-grayscale-700: #555555;
$tokens--color-grayscale-800: #222222;
$tokens--color-blue-100: #ebf1f5;
$tokens--color-blue-200: #cedbe0;
$tokens--color-blue-300: #0088cc;
$tokens--color-blue-400: #025e8d;
$tokens--color-blue-700: #003f8d;
$tokens--color-blue-900: #01324b;
$tokens--color-primary-universal-dark-blue: #01324b;
$tokens--color-primary-medium-blue: #025e8d;
$tokens--color-primary-bright-blue: #0088cc;
$tokens--color-primary-grey-blue-light-1: #ebf1f5;
$tokens--color-primary-grey-blue-light-2: #cedbe0;
$tokens--color-primary-black: #000000;
$tokens--color-primary-white: #ffffff;
$tokens--color-information-red: #c40606;
$tokens--color-information-orange: #f58220;
$tokens--color-information-blue: #000000;
$tokens--color-information-green: #00a69d;
$tokens--color-interaction-hover: #025e8d;
$tokens--color-interaction-visited: #a345c9;
$tokens--color-interaction-focus: #ffcc00;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

// Do not edit directly
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--font-weight-light: 300; // normal
$tokens--font-weight-normal: 400; // The normal, or ‘regular’, font weight.
$tokens--font-weight-regular: 400; // The normal, or ‘regular’, font weight.
$tokens--font-weight-bold: 700; // The bold font weight.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

// Do not edit directly
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--icon-checkbox-checked-stroke: #ffffff;
$tokens--icon-checkbox-checked-fill: #01324b;
$tokens--icon-select-stroke: #000000;
7 changes: 6 additions & 1 deletion context/brand-context/default/scss/00-tokens/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
@import '_border.variables.scss';
@import '_breakpoints.variables.scss';
@import '_button.variables.scss';
@import '_color.variables.scss';
@import '_font-weight.variables.scss';
@import '_icon.variables.scss';
@import '_link.variables.scss';
@import '_sizing.variables.scss';
@import '_spacing.variables.scss';
@import '_state.variables.scss';
@import '_text.variables.scss';
@import '_text.variables.scss';
@import '_typography.variables.scss';
@import '_ui.variables.scss';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--link-color: #025e8d;
$tokens--link-hover: #01324b;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--sizing-relative-0: 0; // no spacing, zero.
$tokens--sizing-relative-25: .0625; // .0625rem, 1px
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--spacing-relative-0: 0; // no spacing, zero.
$tokens--spacing-relative-100: .25rem; // .25rem, 4px.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--state-focus: #0088cc;
$tokens--state-focus: #ffcc00;
$tokens--state-error: #c40606;
$tokens--state-warning: #f58220;
$tokens--state-success: #00a69d;
$tokens--state-information: #003f8d;
$tokens--state-information: #000000;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--text-primary: #000000;
$tokens--text-secondary: #666666;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

// Do not edit directly
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--typography-heading-font-family: serif;
$tokens--typography-heading-letter-spacing: 0.2rem;
$tokens--typography-heading-line-height: 1.2;
$tokens--typography-heading-level-1-default-font-size: 2.5rem;
$tokens--typography-heading-level-1-default-font-weight: 400;
$tokens--typography-heading-level-1-fluid-font-size: clamp(1.875rem, 4vw, 2.5rem);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the fallback for browsers not supporting clamp()? Browser default styles or do we have some sensible defaults?

Copy link
Contributor

@sturobson sturobson Jun 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't really part of this PR, as the design tokens were merged some time ago …

however, the expectation is that these values are implemented (kind of) like they are for Nature (although, I'd suggest not as a variable in a placeholder that's used in a mixin, that's a bit Sass overkill).

I guess the fallback would be [similar to that in Springer Nature where with no fallback provided … a non-supporting browser would (presumably) default to the user agent.

This is why there is the default value and the fluid value - so there's a fallback.

I'll try and work out how to document this to be more explicit (getting Tokens documentation genearated as part of the documentation on the Elements site would help)

$tokens--typography-heading-level-2-default-font-size: 1.875rem;
$tokens--typography-heading-level-2-default-font-weight: 400;
$tokens--typography-heading-level-2-fluid-font-size: clamp(1.5rem, 4vw, 1.875rem);
$tokens--typography-heading-level-3-default-font-size: 1.5rem;
$tokens--typography-heading-level-3-fluid-font-size: clamp(1.25rem, 4vw, 1.5rem);
$tokens--typography-heading-level-4-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
$tokens--typography-heading-level-4-default-font-size: 1.25rem;
$tokens--typography-heading-level-4-fluid-font-size: clamp(1.125rem, 4vw, 1.25rem);
$tokens--typography-heading-level-4-font-weight: 700;
$tokens--typography-heading-level-5-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
$tokens--typography-heading-level-5-font-size: 1.125rem;
$tokens--typography-heading-level-5-font-weight: 700;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

// Do not edit directly
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--ui-font-size: 1rem;
$tokens--ui-focus-outline-color: #025e8d;
$tokens--ui-content-width: 70ch;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--illustration-background-001: #29303C;
$tokens--illustration-background-002: #536179;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:22 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--typography-heading-font-family: serif;
$tokens--typography-heading-letter-spacing: 0.2rem;
Expand Down
2 changes: 1 addition & 1 deletion context/brand-context/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@springernature/brand-context",
"version": "24.1.0",
"version": "25.0.0",
"license": "MIT",
"description": "Bootstrapping for all components and products",
"keywords": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--typography-heading-font-family: serif;
$tokens--typography-heading-letter-spacing: 0.2rem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--breakpoints-tablet-width: 480px; // tablet-width
$tokens--breakpoints-tablet-wide-width: 768px; // tablet-wide-width
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 28 Jun 2022 10:44:21 GMT
// Generated on Fri, 01 Jul 2022 16:01:55 GMT

$tokens--typography-heading-font-family: serif;
sturobson marked this conversation as resolved.
Show resolved Hide resolved
$tokens--typography-heading-letter-spacing: 0.2rem;
Expand Down
52 changes: 52 additions & 0 deletions context/design-tokens/alias/default/color/color.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"color": {
"primary": {
"universal-dark-blue": {
"value": "{color.blue.900}"
},
"medium-blue": {
"value": "{color.blue.400}"
},
"bright-blue": {
"value": "{color.blue.300}"
},
"grey-blue-light-1": {
"value": "{color.blue.100}"
},
"grey-blue-light-2": {
"value": "{color.blue.200}"
},
"black": {
"value": "{color.black}"
},
"white": {
"value": "{color.white}"
}
},
"information": {
"red": {
"value": "#C40606"
},
"orange": {
"value": "#F58220"
},
"blue": {
"value": "{color.blue.700"
},
"green": {
"value": "#00A69D"
}
},
"interaction": {
"hover": {
"value": "{color.blue.400}"
},
"visited": {
"value": "#A345C9"
},
"focus": {
"value": "#FFCC00"
}
}
}
}
19 changes: 19 additions & 0 deletions context/design-tokens/alias/default/icon/icon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"icon": {
"checkbox": {
"checked": {
"stroke": {
"value": "{color.white}"
},
"fill": {
"value": "{color.primary.universal-dark-blue}"
}
}
},
"select": {
"stroke": {
"value": "{color.black}"
}
}
}
}
Loading