Skip to content

Commit

Permalink
perf: update to use restructured WCA doc build
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanjones243 authored and jason-capsule42 committed Nov 13, 2024
1 parent ec5b33f commit 2600537
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 4 deletions.
6 changes: 6 additions & 0 deletions demo/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
| | Default slot for the menu content. |
| [helpText](#helpText) | Defines the content of the helpText. |
| [label](#label) | Defines the content of the label. |

## CSS Shadow Parts

| Part | Description |
|------------|-----------------------------|
| [helpText](#helpText) | Apply CSS to the help text. |
<!-- AURO-GENERATED-CONTENT:END -->

## API Examples
Expand Down
4 changes: 3 additions & 1 deletion demo/api.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -3322,6 +3322,7 @@ var tokensCss$1 = i$5`:host{--ds-auro-select-placeholder-text-color: var(--ds-co
* @event auroSelect-ready - Notifies that the component has finished initializing.
* @event auroSelect-valueSet - Notifies that the component has a new value set.
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
* @csspart helpText - Apply CSS to the help text.
*/

// build the component class
Expand Down Expand Up @@ -3838,7 +3839,8 @@ class AuroSelect extends r {
?error="${this.validity !== undefined && this.validity !== 'valid'}"
common
matchWidth
chevron>
chevron
part="dropdown">
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
${this.value ? this.displayValue : u`<span class="placeholder">${this.placeholder}</span>`}
</span>
Expand Down
4 changes: 3 additions & 1 deletion demo/index.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -3270,6 +3270,7 @@ var tokensCss$1 = i$5`:host{--ds-auro-select-placeholder-text-color: var(--ds-co
* @event auroSelect-ready - Notifies that the component has finished initializing.
* @event auroSelect-valueSet - Notifies that the component has a new value set.
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
* @csspart helpText - Apply CSS to the help text.
*/

// build the component class
Expand Down Expand Up @@ -3786,7 +3787,8 @@ class AuroSelect extends r {
?error="${this.validity !== undefined && this.validity !== 'valid'}"
common
matchWidth
chevron>
chevron
part="dropdown">
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
${this.value ? this.displayValue : u`<span class="placeholder">${this.placeholder}</span>`}
</span>
Expand Down
6 changes: 6 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
| | Default slot for the menu content. |
| `helpText` | Defines the content of the helpText. |
| `label` | Defines the content of the label. |

## CSS Shadow Parts

| Part | Description |
|------------|-----------------------------|
| `helpText` | Apply CSS to the help text. |
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"build:test": "npm-run-all test linters",
"build:release": "npm-run-all build build:test build:api build:docs bundler postinstall",
"build:ci": "npm-run-all sweep build:release",
"build:api": "wca analyze 'src/auro-select.js' --outFiles docs/api.md",
"build:api": "wca 'scripts/wca/*' 'src/auro-select-*.js' --outFiles docs/api.md",
"build:dev:assets": "npm-run-all build:sass:component postCss:component sass:render build:docs",
"build:docs": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/generateDocs.mjs",
"build:sass": "npm-run-all build:sass:component postCss:component sass:render",
Expand Down
10 changes: 10 additions & 0 deletions scripts/wca/auro-select.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { AuroSelect } from '../../src/auro-select.js';

/**
* The auro-select element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
*/
class AuroSelectWCA extends AuroSelect {}

if (!customElements.get("auro-select")) {
customElements.define("auro-select", AuroSelectWCA);
}
4 changes: 3 additions & 1 deletion src/auro-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import tokensCss from "./tokens-css.js";
* @event auroSelect-ready - Notifies that the component has finished initializing.
* @event auroSelect-valueSet - Notifies that the component has a new value set.
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
* @csspart helpText - Apply CSS to the help text.
*/

// build the component class
Expand Down Expand Up @@ -559,7 +560,8 @@ export class AuroSelect extends LitElement {
?error="${this.validity !== undefined && this.validity !== 'valid'}"
common
matchWidth
chevron>
chevron
part="dropdown">
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
${this.value ? this.displayValue : html`<span class="placeholder">${this.placeholder}</span>`}
</span>
Expand Down

0 comments on commit 2600537

Please sign in to comment.