Skip to content

Commit

Permalink
feat(themes): update styles to support component themes #243
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-capsule42 committed Sep 10, 2024
1 parent f2aa39a commit acc481e
Show file tree
Hide file tree
Showing 11 changed files with 2,142 additions and 1,907 deletions.
1 change: 0 additions & 1 deletion apiExamples/basic.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<auro-button>Primary</auro-button>
<auro-button variant="secondary">Secondary</auro-button>
<auro-button variant="tertiary">Tertiary</auro-button>

2 changes: 1 addition & 1 deletion apiExamples/passFunction.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<auro-button onclick="alert('YOU CLICKED ME!');">Primary</auro-button>
<auro-button disabled onclick="alert('YOU CLICKED ME!');">Primary</auro-button>
<auro-button loading onclick="alert('YOU CLICKED ME!');">Primary</auro-button
<auro-button loading onclick="alert('YOU CLICKED ME!');">Primary</auro-button>
76 changes: 59 additions & 17 deletions demo/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<auro-button variant="tertiary">Tertiary</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/basic.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/basic.html -->
Expand All @@ -78,6 +78,26 @@
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>
<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/onDark.html) -->
<!-- The below content is automatically added from ./../../apiExamples/onDark.html -->
<auro-button ondark>Primary</auro-button>
<auro-button variant="secondary" ondark>Secondary</auro-button>
<auro-button variant="tertiary" ondark>Tertiary</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/onDark.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/onDark.html -->

```html
<auro-button ondark>Primary</auro-button>
<auro-button variant="secondary" ondark>Secondary</auro-button>
<auro-button variant="tertiary" ondark>Tertiary</auro-button>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

## Disabled

Expand All @@ -91,7 +111,7 @@ This example demonstrates `auro-button` in it's `disabled` state.
<auro-button variant="tertiary" disabled>Tertiary</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/disabled.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/disabled.html -->
Expand All @@ -103,15 +123,15 @@ This example demonstrates `auro-button` in it's `disabled` state.
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>
<div class="exampleWrapper">
<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/disabledOnDark.html) -->
<!-- The below content is automatically added from ./../../apiExamples/disabledOnDark.html -->
<auro-button disabled ondark>Primary</auro-button>
<auro-button variant="secondary" disabled ondark>Secondary</auro-button>
<auro-button variant="tertiary" disabled ondark>Tertiary</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/disabledOnDark.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/disabledOnDark.html -->
Expand All @@ -136,7 +156,7 @@ Use the `slim` attribute with the `auro-button` element for a slim style with le
<auro-button slim variant="tertiary">Tertiary</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/slim.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/slim.html -->
Expand Down Expand Up @@ -174,7 +194,7 @@ Be sure to use the customColor attribute on the `auro-icon` component to allow c
</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/icon.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/icon.html -->
Expand Down Expand Up @@ -218,7 +238,7 @@ Be sure to use the `customColor` attribute on the `auro-icon` component to allow
</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/iconOnly.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/iconOnly.html -->
Expand Down Expand Up @@ -257,7 +277,7 @@ Be sure to use the `customColor` and `customSize` attributes on the `auro-icon`
</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/iconOnlySlim.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/iconOnlySlim.html -->
Expand Down Expand Up @@ -292,7 +312,7 @@ Use the `rounded` attribute in conjunction with the `iconOnly` attribute for an
</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/rounded.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/rounded.html -->
Expand All @@ -318,7 +338,7 @@ This example demonstrates a `rounded` `auro-button` with text and an `auro-icon`
</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/roundedTextWithIcon.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/roundedTextWithIcon.html -->
Expand All @@ -344,7 +364,7 @@ A `rounded` `auro-button` with text only.
</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/roundedTextOnly.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/roundedTextOnly.html -->
Expand All @@ -370,7 +390,7 @@ The `rounded` attribute supports the ability to hide/show the text of the `auro-
</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/toggledText.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/toggledText.html -->
Expand Down Expand Up @@ -424,7 +444,7 @@ This example shows a `rounded` `auro-button` that is right-aligned, demonstratin
</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/roundedRightAlign.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/roundedRightAlign.html -->
Expand Down Expand Up @@ -477,7 +497,7 @@ In the following example see how the `fluid` attributes alters the shape of the
<auro-button variant="tertiary" fluid>Tertiary</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/fluid.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/fluid.html -->
Expand All @@ -502,7 +522,7 @@ Use the `loading` attribute to alter the content to teh shimmering dots to alert
<auro-button variant="tertiary" loading>Tertiary</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/loading.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/loading.html -->
Expand All @@ -514,15 +534,15 @@ Use the `loading` attribute to alter the content to teh shimmering dots to alert
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>
<div class="exampleWrapper">
<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/loadingOnDark.html) -->
<!-- The below content is automatically added from ./../../apiExamples/loadingOnDark.html -->
<auro-button ondark loading>Primary</auro-button>
<auro-button variant="secondary" ondark loading>Secondary</auro-button>
<auro-button variant="tertiary" ondark loading>Tertiary</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alightRight>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/loadingOnDark.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/loadingOnDark.html -->
Expand All @@ -534,3 +554,25 @@ Use the `loading` attribute to alter the content to teh shimmering dots to alert
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

## Theme Support

The component may be restyled using the following code sample and changing the values of the following token(s).

<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../src/tokens.scss) -->
<!-- The below code snippet is automatically added from ./../../src/tokens.scss -->

```scss
:host {
--ds-auro-button-text-color: var(--ds-color-text-primary-inverse, $ds-color-text-primary-inverse);
--ds-auro-button-container-color: var(--ds-color-ui-default-default, $ds-color-ui-default-default);
--ds-auro-button-container-image: var(--ds-color-ui-default-default, $ds-color-ui-default-default);
--ds-auro-button-border-color: var(--ds-color-ui-default-default, $ds-color-ui-default-default);

// THE BELOW TOKEN SEEMS WRONG - WAITING FOR RESPONSE FROM JUNE
--ds-auro-button-border-inset-color: var(--ds-color-border-emphasis-inverse, $ds-color-border-emphasis-inverse);
--ds-auro-button-loader-color: var(--ds-color-background-darkest, $ds-color-background-darkest);
--ds-auro-button-tap-color: transparent;
}
```
<!-- AURO-GENERATED-CONTENT:END -->
6 changes: 3 additions & 3 deletions demo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ These examples illustrate a common use case where a user will want to pass a fun
<!-- The below content is automatically added from ./../../apiExamples/passFunction.html -->
<auro-button onclick="alert('YOU CLICKED ME!');">Primary</auro-button>
<auro-button disabled onclick="alert('YOU CLICKED ME!');">Primary</auro-button>
<auro-button loading onclick="alert('YOU CLICKED ME!');">Primary</auro-button
<auro-button loading onclick="alert('YOU CLICKED ME!');">Primary</auro-button>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
Expand All @@ -185,8 +185,8 @@ These examples illustrate a common use case where a user will want to pass a fun
```html
<auro-button onclick="alert('YOU CLICKED ME!');">Primary</auro-button>
<auro-button disabled onclick="alert('YOU CLICKED ME!');">Primary</auro-button>
<auro-button loading onclick="alert('YOU CLICKED ME!');">Primary</auro-button
```
<auro-button loading onclick="alert('YOU CLICKED ME!');">Primary</auro-button>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

Expand Down
Loading

0 comments on commit acc481e

Please sign in to comment.