Skip to content

Commit

Permalink
feat(theme): update styles to support themeing
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-capsule42 committed Jul 17, 2024
1 parent 2b8f8a2 commit 7d5ae74
Show file tree
Hide file tree
Showing 26 changed files with 1,259 additions and 425 deletions.
14 changes: 0 additions & 14 deletions .eslintrc

This file was deleted.

7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"cSpell.words": [
"noncomponent",
"ondark",
"WCSS"
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/usage/bundleUseModBrowsers.md) -->

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.3.1/dist/tokens/CSSCustomProperties.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.9.0/dist/tokens/CSSCustomProperties.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.0/dist/bundled/essentials.css" />
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@3.6.1-beta.1/dist/auro-hyperlink__bundled.js" type="module"></script>
```
Expand Down
2 changes: 2 additions & 0 deletions apiExamples/basic-ondark.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<auro-hyperlink ondark>No href supplied</auro-hyperlink><br>
Welcome to <auro-hyperlink ondark href="https://www.alaskaair.com">Alaska Airlines</auro-hyperlink>.
11 changes: 11 additions & 0 deletions apiExamples/cta-ondark.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<auro-hyperlink type="cta" ondark href="https://www.alaskaair.com">CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark href="https://www.alaskaair.com" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>

<auro-hyperlink type="cta" ondark secondary href="https://www.alaskaair.com">CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark secondary href="https://www.alaskaair.com" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark secondary href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>

<auro-hyperlink type="cta" ondark tertiary href="https://www.alaskaair.com">CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark tertiary href="https://www.alaskaair.com" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark tertiary href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>
18 changes: 18 additions & 0 deletions apiExamples/external-ondark.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Example link with
<auro-hyperlink
ondark
target="_blank"
href="https://www.alaskaair.com">
external target
</auro-hyperlink>
but same domain

<br>
Example link with
<auro-hyperlink
ondark
target="_blank"
href="https://www.portseattle.org/sea-tac">
external target
</auro-hyperlink>
with external domain
9 changes: 9 additions & 0 deletions apiExamples/external-referrer-ondark.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Example link with
<auro-hyperlink
ondark
target="_blank"
referrerpolicy
href="https://www.portseattle.org/sea-tac">
external target
</auro-hyperlink>
, external domain with referrerpolicy attribute
9 changes: 9 additions & 0 deletions apiExamples/navPattern-ondark.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<auro-hyperlink ondark href="/last" type="nav">
<auro-icon ondark category="interface" name="chevron-left" customColor style="line-height: 1"></auro-icon>
Click here to go back
</auro-hyperlink>

<auro-hyperlink ondark href="/next" type="nav">
Click here to go forward
<auro-icon ondark category="interface" name="chevron-right" customColor style="line-height: 1"></auro-icon>
</auro-hyperlink>
6 changes: 6 additions & 0 deletions apiExamples/navStyle-ondark.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<auro-hyperlink
ondark
type="nav"
href="https://www.alaskaair.com">
Navigation style link
</auro-hyperlink>
1 change: 1 addition & 0 deletions apiExamples/roleButton-ondark.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<auro-hyperlink ondark href="http://www.alaskaair.com" role="button" id="roleButton-ondark">Cancel button</auro-hyperlink>
7 changes: 7 additions & 0 deletions apiExamples/roleButton.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
export function roleButtonExample() {
const roleButton = document.getElementById('roleButton');
const roleButtonOndark = document.getElementById('roleButton-ondark');

roleButton.addEventListener('click', () => {
alert(`You clicked the role button!`);
});

roleButton.addEventListener('keydown', handleKeyPress);

roleButtonOndark.addEventListener('click', () => {
alert(`You clicked the role button!`);
});

roleButtonOndark.addEventListener('keydown', handleKeyPress);
}

function handleKeyPress(event) {
Expand Down
5 changes: 5 additions & 0 deletions demo/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/tokens/CSSCustomProperties.css">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
<style>
.exampleWrapper--ondark {
color: var(--ds-color-text-primary-inverse);
}
</style>
</head>
<body class="auro-markdown">
<main></main>
Expand Down
143 changes: 143 additions & 0 deletions demo/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@
Welcome to <auro-hyperlink href="https://www.alaskaair.com">Alaska Airlines</auro-hyperlink>.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/basic-ondark.html) -->
<!-- The below content is automatically added from ./../../apiExamples/basic-ondark.html -->
<auro-hyperlink ondark>No href supplied</auro-hyperlink><br>
Welcome to <auro-hyperlink ondark href="https://www.alaskaair.com">Alaska Airlines</auro-hyperlink>.
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/basic.html) -->
Expand All @@ -51,6 +58,14 @@
<auro-hyperlink>No href supplied</auro-hyperlink><br>
Welcome to <auro-hyperlink href="https://www.alaskaair.com">Alaska Airlines</auro-hyperlink>.
```
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/basic-ondark.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/basic-ondark.html -->

```html
<auro-hyperlink ondark>No href supplied</auro-hyperlink><br>
Welcome to <auro-hyperlink ondark href="https://www.alaskaair.com">Alaska Airlines</auro-hyperlink>.
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

Expand Down Expand Up @@ -81,6 +96,29 @@ For link security purposes, when using the `target="_blank"` attribute, this imp
with external domain
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/external-ondark.html) -->
<!-- The below content is automatically added from ./../../apiExamples/external-ondark.html -->
Example link with
<auro-hyperlink
ondark
target="_blank"
href="https://www.alaskaair.com">
external target
</auro-hyperlink>
but same domain

<br>
Example link with
<auro-hyperlink
ondark
target="_blank"
href="https://www.portseattle.org/sea-tac">
external target
</auro-hyperlink>
with external domain
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/external.html) -->
Expand All @@ -104,6 +142,30 @@ Example link with
</auro-hyperlink>
with external domain
```
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/external-ondark.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/external-ondark.html -->

```html
Example link with
<auro-hyperlink
ondark
target="_blank"
href="https://www.alaskaair.com">
external target
</auro-hyperlink>
but same domain

<br>
Example link with
<auro-hyperlink
ondark
target="_blank"
href="https://www.portseattle.org/sea-tac">
external target
</auro-hyperlink>
with external domain
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

Expand All @@ -128,6 +190,20 @@ Example link with
, external domain with referrerpolicy attribute
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/external-referrer-ondark.html) -->
<!-- The below content is automatically added from ./../../apiExamples/external-referrer-ondark.html -->
Example link with
<auro-hyperlink
ondark
target="_blank"
referrerpolicy
href="https://www.portseattle.org/sea-tac">
external target
</auro-hyperlink>
, external domain with referrerpolicy attribute
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/external-referrer.html) -->
Expand All @@ -143,6 +219,21 @@ Example link with
</auro-hyperlink>
, external domain with referrerpolicy attribute
```
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/external-referrer-ondark.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/external-referrer-ondark.html -->

```html
Example link with
<auro-hyperlink
ondark
target="_blank"
referrerpolicy
href="https://www.portseattle.org/sea-tac">
external target
</auro-hyperlink>
, external domain with referrerpolicy attribute
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

Expand All @@ -160,6 +251,17 @@ When using `auro-hyperlink` as a navigation style, use `type="nav"` for the alte
</auro-hyperlink>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/navStyle-ondark.html) -->
<!-- The below content is automatically added from ./../../apiExamples/navStyle-ondark.html -->
<auro-hyperlink
ondark
type="nav"
href="https://www.alaskaair.com">
Navigation style link
</auro-hyperlink>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/navStyle.html) -->
Expand All @@ -172,6 +274,18 @@ When using `auro-hyperlink` as a navigation style, use `type="nav"` for the alte
Navigation style link
</auro-hyperlink>
```
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/navStyle-ondark.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/navStyle-ondark.html -->

```html
<auro-hyperlink
ondark
type="nav"
href="https://www.alaskaair.com">
Navigation style link
</auro-hyperlink>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

Expand Down Expand Up @@ -294,6 +408,20 @@ CTA buttons share the same icon support as the standard hyperlink for targets th
<auro-hyperlink type="cta" tertiary href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/cta-ondark.html) -->
<!-- The below content is automatically added from ./../../apiExamples/cta-ondark.html -->
<auro-hyperlink type="cta" ondark href="https://www.alaskaair.com">CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark href="https://www.alaskaair.com" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark secondary href="https://www.alaskaair.com">CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark secondary href="https://www.alaskaair.com" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark secondary href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark tertiary href="https://www.alaskaair.com">CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark tertiary href="https://www.alaskaair.com" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark tertiary href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/cta.html) -->
Expand All @@ -310,6 +438,21 @@ CTA buttons share the same icon support as the standard hyperlink for targets th
<auro-hyperlink type="cta" tertiary href="https://www.alaskaair.com" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" tertiary href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>
```
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/cta-ondark.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/cta-ondark.html -->

```html
<auro-hyperlink type="cta" ondark href="https://www.alaskaair.com">CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark href="https://www.alaskaair.com" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark secondary href="https://www.alaskaair.com">CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark secondary href="https://www.alaskaair.com" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark secondary href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark tertiary href="https://www.alaskaair.com">CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark tertiary href="https://www.alaskaair.com" target="_blank" >CTA Button</auro-hyperlink>
<auro-hyperlink type="cta" ondark tertiary href="https://www.portseattle.org/sea-tac" target="_blank" >CTA Button</auro-hyperlink>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>

Expand Down
1 change: 0 additions & 1 deletion demo/api.min.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
function initHyperlinkApiExamples(initCount) {
}

export { initHyperlinkApiExamples };
5 changes: 5 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/tokens/CSSCustomProperties.css">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
<style>
.exampleWrapper--ondark {
color: var(--ds-color-text-primary-inverse);
}
</style>
</head>
<body class="auro-markdown">
<main></main>
Expand Down
Loading

0 comments on commit 7d5ae74

Please sign in to comment.