OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Buttons
Oliver Günther7ca9c4884695
diff --git a/frontend/src/global_styles/content/_buttons.lsg b/frontend/src/global_styles/content/_buttons.lsgdeleted file mode 100644index 645601d6c18..00000000000--- a/frontend/src/global_styles/content/_buttons.lsg+++ /dev/null@@ -1,150 +0,0 @@-# Buttons--## Default buttons--```-<button class="***button***"><i class="button--icon icon-watched"></i><span class="button--text">Watch</span></button>-<button class="***button***"><i class="button--icon icon-watched"></i></button>-<button class="***button***">Watch</button>-<button class="***button***" disabled>- <i class="button--icon icon-watched"></i><span class="button--text">Watch</span>-</button>-<br>--<a href="#" class="***button*** -with-icon icon-watched">Watch</a>-<a href="#" class="***button***">Click to watch</a>--<input type="submit" class="***button***" value="Submit to watch"/>-<input type="submit" class="***button***" value="Do not watch" disabled />-```--## Highlight buttons--```-<button class="button ***-highlight***"><i class="button--icon icon-checkmark"></i><span class="button--text">Apply</span></button>-<button class="button ***-highlight***"><i class="button--icon icon-checkmark"></i></button>-<button class="button ***-highlight***">Apply</button>-<button class="button ***-highlight***" disabled>- <i class="button--icon icon-checkmark"></i><span class="button--text">Apply</span>-</button>-<br>--<a href="#" class="button ***-highlight*** -with-icon icon-checkmark">Apply</a>-<a href="#" class="button ***-highlight***">Click to apply</a>--<input type="submit" class="button ***-highlight***" value="Submit to apply"/>-<input type="submit" class="button ***-highlight***" value="Do not apply" disabled />-```---## Alternative highlight buttons--```-<button class="button ***-alt-highlight***"><i class="button--icon icon-add"></i><span class="button--text">Create</span></button>-<button class="button ***-alt-highlight***"><i class="button--icon icon-add"></i></button>-<button class="button ***-alt-highlight***">Create</button>-<button class="button ***-alt-highlight***" disabled>- <i class="button--icon icon-add"></i><span class="button--text">Create</span>-</button>-<br>--<a href="#" class="button ***-alt-highlight*** -with-icon icon-add">Create</a>-<a href="#" class="button ***-alt-highlight***">Click to create</a>--<input type="submit" class="button ***-alt-highlight***" value="Submit to create"/>-<input type="submit" class="button ***-alt-highlight***" value="Do not create" disabled />-```--## Danger zone buttons--```-<button class="button ***-danger***"><i class="button--icon icon-delete"></i><span class="button--text">Delete</span></button>-```---## Active (depressed) buttons--```-<button class="button ***-active***"><i class="button--icon icon-upload"></i><span class="button--text">Connect</span></button>-<button class="button ***-active***"><i class="button--icon icon-upload"></i></button>-<button class="button ***-active***">Connect</button>-<button class="button ***-active***" disabled>- <i class="button--icon icon-upload"></i><span class="button--text">Connect</span>-</button>-<br>--<a href="#" class="button ***-active*** -with-icon icon-upload">Connect</a>-<a href="#" class="button ***-active***">Click to connect</a>--<input type="submit" class="button ***-active***" value="Submit to connect"/>-<input type="submit" class="button ***-active***" value="Do not connect" disabled />-```--## Transparent buttons--```-<button class="button ***-transparent***"><i class="button--icon icon-forums"></i><span class="button--text">Comment</span></button>-<button class="button ***-transparent***"><i class="button--icon icon-forums"></i></button>-<button class="button ***-transparent***">Comment</button>-<button class="button ***-transparent***" disabled>- <i class="button--icon icon-forums"></i><span class="button--text">Comment</span>-</button>-<br>--<a href="#" class="button ***-transparent*** -with-icon icon-forums">Comment</a>-<a href="#" class="button ***-transparent***">Click to comment</a>--<input type="submit" class="button ***-transparent***" value="Submit to comment"/>-<input type="submit" class="button ***-transparent***" value="Do not comment" disabled />-```--## Button sizes--```-<button class="button ***-tiny***"><i class="button--icon icon-star"></i></button>-<button class="button ***-tiny***"><i class="button--icon icon-star"></i><span class="button--text">Tiny</span></button>-<button class="button ***-tiny***">Tiny</button>-<button class="button ***-tiny*** -with-icon icon-star">Tiny</button>-```--```-<button class="button ***-small***"><i class="button--icon icon-star"></i></button>-<button class="button ***-small***"><i class="button--icon icon-star"></i><span class="button--text">Small</span></button>-<button class="button ***-small***">Small</button>-<button class="button ***-small*** -with-icon icon-star">Small</button>-```--```-<button class="***button***"><i class="button--icon icon-star"></i></button>-<button class="***button***"><i class="button--icon icon-star"></i><span class="button--text">Default</span></button>-<button class="***button***">Default</button>-<button class="***button*** -with-icon icon-star">Default</button>-```--```-<button class="button ***-large***"><i class="button--icon icon-star"></i></button>-<button class="button ***-large***"><i class="button--icon icon-star"></i><span class="button--text">Large</span></button>-<button class="button ***-large***">Large</button>-<button class="button ***-large*** -with-icon icon-star">Large</button>-```--## Expanded buttons--```-<button class="button ***-expand***">Expanded button</button>-<a href="#" class="button ***-expand***">Expanded button as link</a>-```--## Rounded buttons--```-<button class="button ***-round***">Rounded button</button>-<a href="#" class="button ***-round***">Rounded button as link</a>-```--## Link-like buttons--```-<button class="***button--link***">Link-like button</button>-<button class="***button--link***" disabled>Disabled link-like button</button>-```diff --git a/spec/components/previews/buttons_preview.rb b/spec/components/previews/buttons_preview.rbnew file mode 100644index 00000000000..e602f0298e3--- /dev/null+++ b/spec/components/previews/buttons_preview.rb@@ -0,0 +1,18 @@+# @logical_path OpenProject+class ButtonsPreview < Lookbook::Preview+ def default; end++ def highlight; end++ def alternative_highlight; end++ def danger; end++ def active; end++ def transparent; end++ def sizes; end++ def link_like; end+enddiff --git a/spec/components/previews/buttons_preview/active.html.erb b/spec/components/previews/buttons_preview/active.html.erbnew file mode 100644index 00000000000..f2700bc51ef--- /dev/null+++ b/spec/components/previews/buttons_preview/active.html.erb@@ -0,0 +1,13 @@+<button class="button -active"><i class="button--icon icon-upload"></i><span class="button--text">Connect</span></button>+<button class="button -active"><i class="button--icon icon-upload"></i></button>+<button class="button -active">Connect</button>+<button class="button -active" disabled>+ <i class="button--icon icon-upload"></i><span class="button--text">Connect</span>+</button>+<br>++<a href="#" class="button -active -with-icon icon-upload">Connect</a>+<a href="#" class="button -active">Click to connect</a>++<input type="submit" class="button -active" value="Submit to connect"/>+<input type="submit" class="button -active" value="Do not connect" disabled />diff --git a/spec/components/previews/buttons_preview/alternative_highlight.html.erb b/spec/components/previews/buttons_preview/alternative_highlight.html.erbnew file mode 100644index 00000000000..29259cc844c--- /dev/null+++ b/spec/components/previews/buttons_preview/alternative_highlight.html.erb@@ -0,0 +1,13 @@+<button class="button -alt-highlight"><i class="button--icon icon-add"></i><span class="button--text">Create</span></button>+<button class="button -alt-highlight"><i class="button--icon icon-add"></i></button>+<button class="button -alt-highlight">Create</button>+<button class="button -alt-highlight" disabled>+ <i class="button--icon icon-add"></i><span class="button--text">Create</span>+</button>+<br>++<a href="#" class="button -alt-highlight -with-icon icon-add">Create</a>+<a href="#" class="button -alt-highlight">Click to create</a>++<input type="submit" class="button -alt-highlight" value="Submit to create"/>+<input type="submit" class="button -alt-highlight" value="Do not create" disabled />diff --git a/spec/components/previews/buttons_preview/danger.html.erb b/spec/components/previews/buttons_preview/danger.html.erbnew file mode 100644index 00000000000..54b12e973e1--- /dev/null+++ b/spec/components/previews/buttons_preview/danger.html.erb@@ -0,0 +1 @@+<button class="button -danger"><i class="button--icon icon-delete"></i><span class="button--text">Delete</span></button>diff --git a/spec/components/previews/buttons_preview/default.html.erb b/spec/components/previews/buttons_preview/default.html.erbnew file mode 100644index 00000000000..2c4efdbfc4e--- /dev/null+++ b/spec/components/previews/buttons_preview/default.html.erb@@ -0,0 +1,13 @@+<button class="button"><i class="button--icon icon-watched"></i><span class="button--text">Watch</span></button>+<button class="button"><i class="button--icon icon-watched"></i></button>+<button class="button">Watch</button>+<button class="button" disabled>+ <i class="button--icon icon-watched"></i><span class="button--text">Watch</span>+</button>+<br>++<a href="#" class="button -with-icon icon-watched">Watch</a>+<a href="#" class="button">Click to watch</a>++<input type="submit" class="button" value="Submit to watch"/>+<input type="submit" class="button" value="Do not watch" disabled />diff --git a/spec/components/previews/buttons_preview/highlight.html.erb b/spec/components/previews/buttons_preview/highlight.html.erbnew file mode 100644index 00000000000..5e2df80c1b6--- /dev/null+++ b/spec/components/previews/buttons_preview/highlight.html.erb@@ -0,0 +1,13 @@+<button class="button -highlight"><i class="button--icon icon-checkmark"></i><span class="button--text">Apply</span></button>+<button class="button -highlight"><i class="button--icon icon-checkmark"></i></button>+<button class="button -highlight">Apply</button>+<button class="button -highlight" disabled>+ <i class="button--icon icon-checkmark"></i><span class="button--text">Apply</span>+</button>+<br>++<a href="#" class="button -highlight -with-icon icon-checkmark">Apply</a>+<a href="#" class="button -highlight">Click to apply</a>++<input type="submit" class="button -highlight" value="Submit to apply"/>+<input type="submit" class="button -highlight" value="Do not apply" disabled />diff --git a/spec/components/previews/buttons_preview/link_like.html.erb b/spec/components/previews/buttons_preview/link_like.html.erbnew file mode 100644index 00000000000..4dfe3c3e0ae--- /dev/null+++ b/spec/components/previews/buttons_preview/link_like.html.erb@@ -0,0 +1,2 @@+<button class="button--link">Link-like button</button>+<button class="button--link" disabled>Disabled link-like button</button>diff --git a/spec/components/previews/buttons_preview/sizes.html.erb b/spec/components/previews/buttons_preview/sizes.html.erbnew file mode 100644index 00000000000..bb22f601bfd--- /dev/null+++ b/spec/components/previews/buttons_preview/sizes.html.erb@@ -0,0 +1,27 @@+<h3>Tiny</h3>++<button class="button -tiny"><i class="button--icon icon-star"></i></button>+<button class="button -tiny"><i class="button--icon icon-star"></i><span class="button--text">Tiny</span></button>+<button class="button -tiny">Tiny</button>+<button class="button -tiny -with-icon icon-star">Tiny</button>++<h3>Small</h3>++<button class="button -small"><i class="button--icon icon-star"></i></button>+<button class="button -small"><i class="button--icon icon-star"></i><span class="button--text">Small</span></button>+<button class="button -small">Small</button>+<button class="button -small -with-icon icon-star">Small</button>++<h3>Default</h3>++<button class="button"><i class="button--icon icon-star"></i></button>+<button class="button"><i class="button--icon icon-star"></i><span class="button--text">Default</span></button>+<button class="button">Default</button>+<button class="button -with-icon icon-star">Default</button>++<h3>Large</h3>++<button class="button -large"><i class="button--icon icon-star"></i></button>+<button class="button -large"><i class="button--icon icon-star"></i><span class="button--text">Large</span></button>+<button class="button -large">Large</button>+<button class="button -large -with-icon icon-star">Large</button>diff --git a/spec/components/previews/buttons_preview/transparent.html.erb b/spec/components/previews/buttons_preview/transparent.html.erbnew file mode 100644index 00000000000..8b9c9cdaa3c--- /dev/null+++ b/spec/components/previews/buttons_preview/transparent.html.erb@@ -0,0 +1,13 @@+<button class="button -transparent"><i class="button--icon icon-forums"></i><span class="button--text">Comment</span></button>+<button class="button -transparent"><i class="button--icon icon-forums"></i></button>+<button class="button -transparent">Comment</button>+<button class="button -transparent" disabled>+ <i class="button--icon icon-forums"></i><span class="button--text">Comment</span>+</button>+<br>++<a href="#" class="button -transparent -with-icon icon-forums">Comment</a>+<a href="#" class="button -transparent">Click to comment</a>++<input type="submit" class="button -transparent" value="Submit to comment"/>+<input type="submit" class="button -transparent" value="Do not comment" disabled />