Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3e4e674
chore: label correction
mfranzke Sep 8, 2022
c91e9ed
refactor: primary becomes secondary inverted
mfranzke Sep 8, 2022
36d270c
refactor: tertiary plain becomes ghost
mfranzke Sep 8, 2022
7728cf4
refactor: secondary solid becomes tertiary
mfranzke Sep 8, 2022
f7b0144
refactor: secondary outline becomes secondary
mfranzke Sep 8, 2022
0c4f69d
refactor: brand primary becomes the regular primary button
mfranzke Sep 8, 2022
d89637e
refactor: corrected the order
mfranzke Sep 8, 2022
aff7fcb
refactor: the button are all supposed to be styled in bold font-weight
mfranzke Sep 8, 2022
baf9e15
chore: we've removed this in total
mfranzke Sep 8, 2022
5a6ff02
refactor: enabling dark backgrounds for the styleguide
mfranzke Sep 8, 2022
d0516f5
chore: adding missing default additions
mfranzke Sep 8, 2022
2d2275e
chore: adapted the correct styles
mfranzke Sep 8, 2022
bfb737c
refactor: adapted styles
mfranzke Sep 8, 2022
7021f79
refactor: adapted the disabled state
mfranzke Sep 8, 2022
79b1ee3
refactor: removed those obsolete variants
mfranzke Sep 8, 2022
85429b1
refactor: renaming regular size to medium
mfranzke Sep 8, 2022
7b6709a
refactor: added xsmall size and other size related aspects out of the…
mfranzke Sep 8, 2022
01ea42c
docs: reordered
mfranzke Sep 8, 2022
5ac4b1a
docs: reordered
mfranzke Sep 8, 2022
9202b21
refactor: added button width
mfranzke Sep 8, 2022
3382b33
Merge branch 'main' into refactor-guidelines-3.0-button-style
mfranzke Sep 8, 2022
a6c1514
Merge branch 'main' into refactor-guidelines-3.0-button-style
mfranzke Sep 8, 2022
cf6288f
docs: added missing SCSS placeholders
mfranzke Sep 8, 2022
cd269e1
refactor: checked all of the hover and active background-colors again
mfranzke Sep 8, 2022
35c752f
refactor: background-color should change on hover hover with a transi…
mfranzke Sep 8, 2022
5297d94
feat: added new sizes and let smallest buttons include 16px icon sizes
mfranzke Sep 21, 2022
4ea8449
refactor: using DB UI Base variable
mfranzke Sep 28, 2022
6106646
Merge branch 'v3' into refactor-guidelines-3.0-button-style
mfranzke Sep 28, 2022
b3e81b2
Merge branch 'v3' into refactor-guidelines-3.0-button-style
mfranzke Sep 29, 2022
617d18d
Merge branch 'v3' into refactor-guidelines-3.0-button-style
mfranzke Sep 29, 2022
0e28db7
refactor: transition declaration
mfranzke Sep 29, 2022
2893f82
chore: slightly increased the paragraphs width
mfranzke Sep 29, 2022
74b111b
Merge branch 'v3' into refactor-guidelines-3.0-button-style
mfranzke Sep 29, 2022
5f89e50
refactor: added those dirty hacks for the small icon sizes
mfranzke Sep 29, 2022
d02b655
Merge branch 'refactor-guidelines-3.0-button-style' of https://github…
mfranzke Sep 29, 2022
996c6e5
refactor: simplified the testcases
mfranzke Sep 30, 2022
2ab37d4
feat: added loading state
mfranzke Sep 30, 2022
1c8aaaa
Update button.scss
mfranzke Oct 12, 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
10 changes: 5 additions & 5 deletions .pa11yci
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@
"http://127.0.0.1:8080/patterns/base-type-highlight-colors-neutral/base-type-highlight-colors-neutral.rendered.html",
"http://127.0.0.1:8080/patterns/base-type-highlight-colors-positive/base-type-highlight-colors-positive.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-00-button/elements-buttons-00-button.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-01-button-brand-primary/elements-buttons-01-button-brand-primary.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-03-button-primary/elements-buttons-03-button-primary.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-04-button-secondary-outline/elements-buttons-04-button-secondary-outline.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-05-button-secondary-solid/elements-buttons-05-button-secondary-solid.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-06-button-tertiary-plain/elements-buttons-06-button-tertiary-plain.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-01-button-primary/elements-buttons-01-button-primary.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-03-button-secondary-inverted/elements-buttons-03-button-secondary-inverted.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-04-button-secondary/elements-buttons-04-button-secondary.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-05-button-tertiary/elements-buttons-05-button-tertiary.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-06-button-ghost/elements-buttons-06-button-ghost.rendered.html",
"http://127.0.0.1:8080/patterns/elements-buttons-09-button-sizes/elements-buttons-09-button-sizes.rendered.html",
"http://127.0.0.1:8080/patterns/elements-checkbox-checkbox-checked/elements-checkbox-checkbox-checked.rendered.html",
"http://127.0.0.1:8080/patterns/elements-checkbox-checkbox-disabled-checked/elements-checkbox-checkbox-disabled-checked.rendered.html",
Expand Down
4 changes: 4 additions & 0 deletions enterprise.patternlab-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@
"after": []
}
}
},
"plugin-node-wrappable": {
"enabled": true,
"initialized": false
}
}
}
14 changes: 13 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"license": "Apache-2.0",
"dependencies": {
"@csstools/normalize.css": "^12.0.0",
"@db-ui/base": "^0.17.0"
"@db-ui/base": "^0.17.0",
"plugin-node-wrappable": "^1.1.0"
},
"devDependencies": {
"@babel/cli": "^7.19.3",
Expand Down
7 changes: 7 additions & 0 deletions source/_patterns/00-base/_init.demonstration.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
body.styleguide {
display: initial;
}

.sg-wrapper-dark-background {
background-color: $db-color-cool-gray-700;

margin: -1rem -0.5rem;
padding: 1rem 0.5rem;
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{{!-- TODO: let's not use those modifier classes, but inherit their meaning via CSS correctly and introduce sample classes for the styleguide --}}
<p>
{{> elements-button variant='primary' value='Primary' icon='add' }}
{{> elements-button variant='primary' value='Primary (disabled)' disabled='true' icon='add' }}
{{> elements-button variant='primary' value='Primary' }}
{{> elements-button variant='primary' value='Primary (disabled)' disabled='true' }}
</p>
<p>
{{> elements-button variant='primary' value='Primary with icon' icon-after='add'}}
{{> elements-button variant='primary' value='Primary with icon (disabled)' disabled='true' icon-after='add' }}
</p>
<p>
{{> elements-button variant='primary' value='Primary without icon' }}
{{> elements-button variant='primary' value='Primary without icon (disabled)' disabled='true' }}
{{> elements-button variant='primary' value='Primary' icon='add'}}
{{> elements-button variant='primary' value='Primary' disabled='true' icon='add' }}
</p>
<p>
{{> elements-button variant='primary' title='Check' value='Primary displaying only the icon' icon='done' styleModifier='is-icon-text-replace' }}
{{> elements-button variant='primary' title='Check' value='Primary displaying only the icon' disabled='true' icon='done' styleModifier='is-icon-text-replace' }}
</p>
<p>
{{> elements-button variant='primary' title='Check' value='loading' state='loading' }}
</p>
15 changes: 15 additions & 0 deletions source/_patterns/01-elements/buttons/02-button-secondary.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<p>
{{> elements-button variant='secondary' value='Secondary' }}
{{> elements-button variant='secondary' value='Secondary (disabled)' disabled='true' }}
</p>
<p>
{{> elements-button variant='secondary' value='Secondary' icon='add' }}
{{> elements-button variant='secondary' value='Secondary (disabled)' disabled='true' icon='add' }}
</p>
<p>
{{> elements-button variant='secondary' title='Check' value='Secondary displaying only the icon' icon='done' styleModifier='is-icon-text-replace' }}
{{> elements-button variant='secondary' title='Check' value='Secondary displaying only the icon' disabled='true' icon='done' styleModifier='is-icon-text-replace' }}
</p>
<p>
{{> elements-button variant='secondary' title='Check' value='loading' state='loading' }}
</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<p>
{{> elements-button variant='secondary-inverted' value='Secondary inverted' }}
{{> elements-button variant='secondary-inverted' value='Secondary inverted (disabled)' disabled='true' }}
</p>
<p>
{{> elements-button variant='secondary-inverted' value='Secondary inverted' icon='add' }}
{{> elements-button variant='secondary-inverted' value='Secondary inverted (disabled)' disabled='true' icon='add' }}
</p>
<p>
{{> elements-button variant='secondary-inverted' title='Check' value='Secondary inverted displaying only the icon' icon='done' styleModifier='is-icon-text-replace' }}
{{> elements-button variant='secondary-inverted' title='Check' value='Secondary inverted displaying only the icon' disabled='true' icon='done' styleModifier='is-icon-text-replace' }}
</p>
<p>
{{> elements-button variant='secondary-inverted' title='Check' value='loading' state='loading' }}
</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Button secondary inverted
wrap_in: dark-background
---

This file was deleted.

This file was deleted.

15 changes: 15 additions & 0 deletions source/_patterns/01-elements/buttons/05-button-tertiary.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<p>
{{> elements-button variant='tertiary' value='Tertiary' }}
{{> elements-button variant='tertiary' value='Tertiary (disabled)' disabled='true' }}
</p>
<p>
{{> elements-button variant='tertiary' value='Tertiary' icon='add' }}
{{> elements-button variant='tertiary' value='Tertiary (disabled)' disabled='true' icon='add' }}
</p>
<p>
{{> elements-button variant='tertiary' title='Check' value='Tertiary displaying only the icon' icon='done' styleModifier='is-icon-text-replace' }}
{{> elements-button variant='tertiary' title='Check' value='Tertiary displaying only the icon' disabled='true' icon='done' styleModifier='is-icon-text-replace' }}
</p>
<p>
{{> elements-button variant='tertiary' title='Check' value='loading' state='loading' }}
</p>
15 changes: 15 additions & 0 deletions source/_patterns/01-elements/buttons/06-button-ghost.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<p>
{{> elements-button variant='ghost' value='Ghost' }}
{{> elements-button variant='ghost' value='Ghost (disabled)' disabled='true' }}
</p>
<p>
{{> elements-button variant='ghost' value='Ghost' }}
{{> elements-button variant='ghost' value='Ghost' disabled='true' }}
</p>
<p>
{{> elements-button variant='ghost' title='Check' value='Ghost displaying only the icon' icon='done' styleModifier='is-icon-text-replace' }}
{{> elements-button variant='ghost' title='Check' value='Ghost displaying only the icon' disabled='true' icon='done' styleModifier='is-icon-text-replace' }}
</p>
<p>
{{> elements-button variant='ghost' title='Check' value='loading' state='loading' }}
</p>

This file was deleted.

16 changes: 6 additions & 10 deletions source/_patterns/01-elements/buttons/09-button-sizes.hbs
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{{#each sizes }}
<h2>{{ label }}</h2>
<p>
{{> elements-button variant='brand-primary' value='Brand Primary' icon='add' size=size }}
{{> elements-button variant='brand-primary' value='Brand Primary (disabled)' disabled='true' icon='add' size=size }}
{{> elements-button variant='primary' value='Primary' size=size }}
{{> elements-button variant='primary' value='Primary (disabled)' disabled='true' size=size }}
</p>
<p>
{{> elements-button variant='brand-primary' value='Brand Primary with right icon' icon-after='add' size=size }}
{{> elements-button variant='brand-primary' value='Brand Primary with right icon(disabled)' disabled='true' icon-after='add' size=size }}
{{> elements-button variant='primary' value='Primary' icon='add' size=size }}
{{> elements-button variant='primary' value='Primary (disabled)' disabled='true' icon='add' size=size }}
</p>
<p>
{{> elements-button variant='brand-primary' value='Brand Primary without icon' size=size }}
{{> elements-button variant='brand-primary' value='Brand Primary without icon (disabled)' disabled='true' size=size }}
</p>
<p>
{{> elements-button variant='brand-primary' title='Done' value='Brand Primary displaying only the icon' icon='done' styleModifier='is-icon-text-replace' size=size }}
{{> elements-button variant='brand-primary' title='Done' value='Brand Primary displaying only the icon' disabled='true' icon='done' styleModifier='is-icon-text-replace' size=size }}
{{> elements-button variant='primary' title='Done' value='Primary displaying only the icon' icon='done' styleModifier='is-icon-text-replace' size=size }}
{{> elements-button variant='primary' title='Done' value='Primary displaying only the icon' disabled='true' icon='done' styleModifier='is-icon-text-replace' size=size }}
</p>
{{/each }}
16 changes: 14 additions & 2 deletions source/_patterns/01-elements/buttons/09-button-sizes.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
{
"sizes": [
{
"size": "xxsmall",
"label": "XXSmall"
},
{
"size": "xsmall",
"label": "XSmall"
},
{
"size": "small",
"label": "Small"
},
{
"size": "regular",
"label": "Regular (default, data-size attribute is optional)"
"size": "medium",
"label": "Medium (default, data-size attribute is optional)"
},
{
"size": "large",
"label": "Large"
},
{
"size": "xlarge",
"label": "XLarge"
}
]
}
12 changes: 12 additions & 0 deletions source/_patterns/01-elements/buttons/10-button-width.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{#each width }}
<h2>{{ label }}</h2>
<p>
{{> elements-button variant='primary' value='Primary' width=width }}
</p>
<p>
{{> elements-button variant='primary' value='Primary' icon='add' width=width }}
</p>
<p>
{{> elements-button variant='primary' title='Done' value='Primary displaying only the icon' icon='done' styleModifier='is-icon-text-replace' width=width }}
</p>
{{/each }}
8 changes: 8 additions & 0 deletions source/_patterns/01-elements/buttons/10-button-width.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"width": [
{
"width": "full",
"label": "FullWidth"
}
]
}
4 changes: 4 additions & 0 deletions source/_patterns/01-elements/buttons/10-button-width.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Button width
wrap_in: full-width-Button
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.sg-wrapper-full-width-Button {
p {
width: 300px;
}
}
41 changes: 25 additions & 16 deletions source/_patterns/01-elements/buttons/_button.variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,35 @@
$button---color: #fff !default;

$button---minHeight: to-rem(
$pxValue: 44
$pxValue: 40
) !default;

// Background colors
$button-brand-primary--backgroundColor: $db-color-red-500 !default;
$button-brand-primary-hover-backgroundColor: #db0016;
$button-primary--backgroundColor: $db-color-red-500 !default;
$button-primary-hover-backgroundColor: #cf0013 !default;
$button-primary-active-backgroundColor: #b30010 !default;

$button-primary--backgroundColor: $db-color-cool-gray-700 !default;
$button-primary-hover-backgroundColor: #2f3541;
$button-secondaryInverted--backgroundColor: transparent !default;
$button-secondaryInverted-hover-backgroundColor: rgba(
255,
255,
255,
0.08
) !default;
$button-secondaryInverted-active-backgroundColor: rgba(
255,
255,
255,
0.16
) !default;

$button-secondarySolid--backgroundColor: $db-color-cool-gray-200 !default;
$button-secondarySolid-hover-backgroundColor: #cdd4da !default;
$button-secondarySolid-active-backgroundColor: #c5ccd3 !default;
$button-tertiary--backgroundColor: rgba(0, 0, 0, 0.04) !default;
$button-tertiary-hover-backgroundColor: rgba(0, 0, 0, 0.12) !default;
$button-tertiary-active-backgroundColor: rgba(0, 0, 0, 0.24) !default;

$button-secondaryOutline-hover-backgroundColor: rgba(
$db-color-cool-gray-700,
0.03
) !default;
$button-secondary--backgroundColor: transparent !default;
$button-secondary-hover-backgroundColor: rgba(0, 0, 0, 0.12) !default;
$button-secondary-active-backgroundColor: rgba(0, 0, 0, 0.24) !default;

$button-secondaryOutline-active-backgroundColor: rgba(
$db-color-cool-gray-700,
0.06
) !default;
$button-ghost-hover-backgroundColor: rgba(0, 0, 0, 0.08) !default;
$button-ghost-active-backgroundColor: rgba(0, 0, 0, 0.16) !default;
Loading