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

Audit and refactor the input and button components #580

Merged
merged 21 commits into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
73b6dff
refactor: remove unused input modifier and start initial README doc
sebnitu May 10, 2021
03560e5
refactor: update variable names and add min-height var for textarea
sebnitu May 12, 2021
f96d280
docs: initial docs setup
sebnitu May 13, 2021
b606b88
refactor: minor refactor of input with vars and state modifiers
sebnitu May 13, 2021
b63df08
docs: update state modifier copy for notice component
sebnitu May 23, 2021
3cb8456
docs: initial modifier documentation
sebnitu May 24, 2021
c1c0ff8
refactor: move mad-width to base input component
sebnitu May 24, 2021
93faf08
docs: initial form example for testing
sebnitu May 24, 2021
6f85327
docs: add form examples
sebnitu May 25, 2021
1199e0c
docs: update button size copy
sebnitu May 25, 2021
e8993e1
docs: write docs for input modifiers
sebnitu May 25, 2021
3e9d2bf
refactor: add height styles to match button component
sebnitu May 25, 2021
6b2c700
refactor: add background color to state mod and remove transitions
sebnitu May 25, 2021
164b1ba
feat: add calc-padding mixin for setting the padding property minus b…
sebnitu May 25, 2021
44bc790
feat: use calc-padding to output padding property
sebnitu May 25, 2021
b0b0318
refactor: use separate vars for border styles and update box shadow s…
sebnitu May 25, 2021
74034e2
docs: add missing input type modifier
sebnitu May 25, 2021
dc5587d
refactor: rename size variable to height for accuracy
sebnitu May 25, 2021
6d74f08
refactor: add more consistent styles to disabled input and hover state
sebnitu May 26, 2021
4418c1c
fix: correctly use the component color var
sebnitu May 26, 2021
6cbb3e4
docs: add var table to docs
sebnitu May 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 21 additions & 12 deletions docs/_packages/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ Buttons can also have a loading state by adding the `is-loading` state class. Th

{% include demo_open.html %}
<div class="level">
<button class="is-loading button">Button</button>
<button class="is-loading button button_color_subtle">Button</button>
<button class="is-loading button button_color_primary">Button</button>
<button class="is-loading button button_color_secondary">Button</button>
<button class="is-loading button" disabled>Button</button>
<button class="is-loading button button_color_subtle" disabled>Button</button>
<button class="is-loading button button_color_primary" disabled>Button</button>
<button class="is-loading button button_color_secondary" disabled>Button</button>
</div>
{% include demo_switch.html %}
```html
Expand Down Expand Up @@ -264,8 +264,7 @@ Outline styles usually have a more subtle appearance compared to [`button_color_

## button_size_[value]

Adjust the size of a button by increasing or decreasing its padding and font-size. By default, the button scale will provide a button height of 30px (`button_size_sm`), 40px (default) and 50px (`button_size_lg`).

Adjust the size of a button by increasing or decreasing its padding and font-size. By default, the button scale will provide a button height of 30px (small `button_size_sm`), 40px (default) and 50px (large `button_size_lg`).

{% include demo_open.html %}
<div class="level">
Expand Down Expand Up @@ -348,23 +347,33 @@ Adjust the size of a button by increasing or decreasing its padding and font-siz
<td data-mobile-label="Desc">The default horizontal gap spacing for elements inside the button component.</td>
</tr>
<tr>
<td data-mobile-label="Var"><code class="code text-nowrap">$border</code></td>
<td data-mobile-label="Default"><code class="code color-secondary text-nowrap">none</code></td>
<td data-mobile-label="Desc">Sets the border property.</td>
<td data-mobile-label="Var"><code class="code text-nowrap">$border-width</code></td>
<td data-mobile-label="Default"><code class="code color-secondary text-nowrap">core.$border-width</code></td>
<td data-mobile-label="Desc">Sets the border-width property.</td>
</tr>
<tr>
<td data-mobile-label="Var"><code class="code text-nowrap">$border-style</code></td>
<td data-mobile-label="Default"><code class="code color-secondary text-nowrap">core.$border-style</code></td>
<td data-mobile-label="Desc">Sets the border-style property.</td>
</tr>
<tr>
<td data-mobile-label="Var"><code class="code text-nowrap">$border-color</code></td>
<td data-mobile-label="Default"><code class="code color-secondary text-nowrap">core.$border-color</code></td>
<td data-mobile-label="Desc">Sets the border-color property.</td>
</tr>
<tr>
<td data-mobile-label="Var"><code class="code text-nowrap">$border-color-hover</code></td>
<td data-mobile-label="Default"><code class="code color-secondary text-nowrap">null</code></td>
<td data-mobile-label="Default"><code class="code color-secondary text-nowrap">core.$border-color-dark</code></td>
<td data-mobile-label="Desc">Sets the border-color property on <code class="code">:hover</code> state.</td>
</tr>
<tr>
<td data-mobile-label="Var"><code class="code text-nowrap">$border-color-focus</code></td>
<td data-mobile-label="Default"><code class="code color-secondary text-nowrap">null</code></td>
<td data-mobile-label="Default"><code class="code color-secondary text-nowrap">core.$border-color-dark</code></td>
<td data-mobile-label="Desc">Sets the border-color property on <code class="code">:focus</code> state.</td>
</tr>
<tr>
<td data-mobile-label="Var"><code class="code text-nowrap">$border-color-active</code></td>
<td data-mobile-label="Default"><code class="code color-secondary text-nowrap">null</code></td>
<td data-mobile-label="Default"><code class="code color-secondary text-nowrap">core.$border-color-darker</code></td>
<td data-mobile-label="Desc">Sets the border-color property on <code class="code">:active</code> state.</td>
</tr>
<tr>
Expand Down