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

Address color theming issues #264

Merged
merged 5 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

./node_modules/.bin/npm-run-all preCommit linters test
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NOTICE

.github/
.gitignore
.eslintrc
eslint.config.mjs
.stylelintrc

coverage/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ 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.0/dist/tokens/CSSCustomProperties.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.0.8/dist/bundled/essentials.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.9.2/dist/tokens/CSSCustomProperties.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@7.3.0/dist/auro-button__bundled.js" type="module"></script>
```

Expand Down
16 changes: 8 additions & 8 deletions demo/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,15 +563,15 @@ The component may be restyled using the following code sample and changing the v
<!-- The below code snippet is automatically added from ./../../src/tokens.scss -->

```scss
@import "./../node_modules/@aurodesignsystem/design-tokens/dist/tokens/SCSSVariables";

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

// 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-border-color: var(--ds-color-container-ui-primary-default-default, #{$ds-color-container-ui-primary-default-default});
--ds-auro-button-border-inset-color: var(--ds-color-border-emphasis-inverse, #{$ds-color-border-emphasis-inverse});
--ds-auro-button-container-color: var(--ds-color-container-ui-primary-default-default, #{$ds-color-container-ui-primary-default-default});
--ds-auro-button-container-image: var(--ds-color-container-ui-primary-default-default, #{$ds-color-container-ui-primary-default-default});
--ds-auro-button-loader-color: var(--ds-color-utility-navy-default, #{$ds-color-utility-navy-default});
--ds-auro-button-text-color: var(--ds-color-text-primary-inverse, #{$ds-color-text-primary-inverse});
--ds-auro-button-tap-color: transparent;
}
```
Expand Down
6 changes: 5 additions & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
});
</script>
<script type="module" data-demo-script="true">
import { registerComponent } from '../index.js';
import { AuroButton } from '../src/auro-button.js';
import * as RuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';

RuntimeUtils.default.prototype.registerComponent('custom-button', AuroButton);

import { initExamples } from './index.min.js';

registerComponent('custom-button');
Expand Down
6 changes: 4 additions & 2 deletions demo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ There are two important parts of every Auro component. The <a href="https://deve
To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our `registerComponent(name)` method and pass in a unique name.

```js
import './node_modules/@aurodesignsystem/auro-button';
registerComponent('custom-button');
import { AuroButton } from './src/auro-button.js';
import * as RuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';

RuntimeUtils.default.prototype.registerComponent('custom-button', AuroButton);
```

This will create a new custom element that you can use in your HTML that will function identically to the `<auro-button>` element.
Expand Down
6 changes: 4 additions & 2 deletions docs/partials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ There are two important parts of every Auro component. The <a href="https://deve
To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our `registerComponent(name)` method and pass in a unique name.

```js
import './node_modules/@aurodesignsystem/auro-button';
registerComponent('custom-button');
import { AuroButton } from './src/auro-button.js';
import * as RuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';

RuntimeUtils.default.prototype.registerComponent('custom-button', AuroButton);
jordanjones243 marked this conversation as resolved.
Show resolved Hide resolved
```

This will create a new custom element that you can use in your HTML that will function identically to the `<auro-button>` element.
Expand Down
13 changes: 2 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
import { AuroButton } from './src/auro-button.js';
import * as RuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';

/**
* Register Custom Element.
* @param {Object} name - Name to use for custom element.
* @returns {void}
*/
export function registerComponent(name) {
// alias definition
if (!customElements.get(name)) {
customElements.define(name, class extends AuroButton {});
}
}
RuntimeUtils.default.prototype.registerComponent('custom-button', AuroButton);
jordanjones243 marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading