-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: counter group added with counter refactor, docs, and validation #…
- Loading branch information
Showing
29 changed files
with
595 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<auro-counter> | ||
Short label | ||
</auro-counter> | ||
<br> | ||
<hr> | ||
<br> | ||
<auro-counter> | ||
This is an example of the wrapping behavior for a long label | ||
</auro-counter> | ||
<auro-counter-group> | ||
<auro-counter> | ||
Short label | ||
</auro-counter> | ||
<auro-counter> | ||
This is an example of the wrapping behavior for a long label | ||
</auro-counter> | ||
</auro-counter-group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<auro-counter-group> | ||
<auro-counter> | ||
Short label | ||
<span slot="description" | ||
>This is an example of a long sub label wrapping behavior</span | ||
> | ||
</auro-counter> | ||
<auro-counter> | ||
This is an example of the wrapping behavior for a long label | ||
<span slot="description">with short sub label text</span> | ||
</auro-counter> | ||
<auro-counter> | ||
This is an example of the wrapping behavior for a long label | ||
<span slot="description" | ||
>Combined with an example of a long sub label wrapping behavior</span | ||
> | ||
</auro-counter> | ||
</auro-counter-group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
<auro-counter disabled> | ||
Short label | ||
</auro-counter> | ||
<br> | ||
<hr> | ||
<br> | ||
<auro-counter disabled> | ||
This is an example of the wrapping behavior for a long label | ||
<span slot="subLabel">with short sub label text</span> | ||
</auro-counter> | ||
<auro-counter-group> | ||
<auro-counter disabled> | ||
Short label | ||
</auro-counter> | ||
<auro-counter disabled> | ||
This is an example of the wrapping behavior for a long label | ||
<span slot="description">with short sub label text</span> | ||
</auro-counter> | ||
</auro-counter-group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div style="width: 300px;"> | ||
<auro-dropdown common chevron> | ||
<div slot="trigger">Trigger</div> | ||
<auro-counter-group style="padding: 1em; width: 400px; max-height: 400px; overflow: scroll;"> | ||
<auro-counter> | ||
Short label | ||
<span slot="description">This is an example of a long sub label wrapping behavior</span> | ||
</auro-counter> | ||
<auro-counter> | ||
This is an example of the wrapping behavior for a long label | ||
<span slot="description">with short sub label text</span> | ||
</auro-counter> | ||
<auro-counter> | ||
This is an example of the wrapping behavior for a long label | ||
<span slot="description">Combined with an example of a long sub label wrapping behavior</span> | ||
</auro-counter> | ||
</auro-counter-group> | ||
</auro-dropdown> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<auro-counter-group max="12" min="0"> | ||
<auro-counter max="5"> | ||
This counter has a max value of 5 | ||
</auro-counter> | ||
<auro-counter max="8"> | ||
This counter has a max value of 8 | ||
</auro-counter> | ||
</auro-counter-group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<auro-counter-group max="12" min="0"> | ||
<auro-counter> | ||
Short label | ||
</auro-counter> | ||
<auro-counter> | ||
This is an example of the wrapping behavior for a long label | ||
</auro-counter> | ||
</auro-counter-group> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,42 @@ | ||
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/api.md) --> | ||
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/api.md) --> | ||
<!-- AURO-GENERATED-CONTENT:END --> | ||
|
||
## API Examples | ||
|
||
### Basic | ||
### Group Max/Min | ||
|
||
The most basic, simple version of `auro-counter`. | ||
The group counter max or min property sets the value for all counters in the group. If a counter has a max value set, the group max attribute will override it. All increment buttons as a result will be disabled to prevent the group of counters from exceeding the group max. | ||
|
||
**Example has group max set to 12** | ||
|
||
<div class="exampleWrapper"> | ||
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) --> | ||
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/group-max.html) --> | ||
<!-- AURO-GENERATED-CONTENT:END --> | ||
</div> | ||
|
||
<auro-accordion alignRight> | ||
<span slot="trigger">See code</span> | ||
|
||
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) --> | ||
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/group-max.html) --> | ||
<!-- AURO-GENERATED-CONTENT:END --> | ||
|
||
</auro-accordion> | ||
|
||
### Counter Max/Min | ||
|
||
You can also individually set the max or min value for each counter in a group. | ||
|
||
**Example has group max set to 12** | ||
|
||
<div class="exampleWrapper"> | ||
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/group-counter-max.html) --> | ||
<!-- AURO-GENERATED-CONTENT:END --> | ||
</div> | ||
|
||
<auro-accordion alignRight> | ||
<span slot="trigger">See code</span> | ||
|
||
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/group-counter-max.html) --> | ||
<!-- AURO-GENERATED-CONTENT:END --> | ||
|
||
</auro-accordion> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
The `auro-counter` component is a ui element that enables a way to increment or decrement a single digit value. Common use case such as adding passengers to a flight. | ||
The `auro-counter` component is a ui element that enables a way to increment or decrement a single digit value. Common use case is inside the `auro-counter-group` to facilitate a collection of counters to add passenger types to a flight. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { writeDepVersionFile } from '@auro-formkit/build-tools/formVersionWriter'; | ||
|
||
await writeDepVersionFile('@aurodesignsystem/auro-icon'); | ||
await writeDepVersionFile('@aurodesignsystem/auro-icon'); | ||
await writeDepVersionFile('@aurodesignsystem/auro-dropdown'); |
4 changes: 1 addition & 3 deletions
4
...nents/counter/scripts/wca/auro-counter.js → ...s/counter/scripts/wca/001-auro-counter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
import { AuroCounterGroup } from '../../src/auro-counter-group.js'; | ||
|
||
class AuroCounterGroupWCA extends AuroCounterGroup {}; | ||
|
||
if (!customElements.get("auro-counter-group")) { | ||
customElements.define("auro-counter-group", AuroCounterGroupWCA); | ||
} |
Oops, something went wrong.