@lilydesignsystem/alpine-headless 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/components/color-radio-group.html +18 -0
- package/components/color-radio-input.html +19 -0
- package/components/emoji-character-radio-group.html +18 -0
- package/components/emoji-character-radio-input.html +18 -0
- package/components/five-face-rating-radio-group.html +18 -0
- package/components/five-face-rating-radio-input.html +18 -0
- package/components/five-star-rating-radio-group.html +18 -0
- package/components/five-star-rating-radio-input.html +18 -0
- package/components/international-patient-summary-section.html +32 -0
- package/components/international-patient-summary.html +100 -0
- package/components/net-promoter-score-radio-group.html +18 -0
- package/components/net-promoter-score-radio-input.html +18 -0
- package/components/red-amber-green-radio-group.html +18 -0
- package/components/red-amber-green-radio-input.html +18 -0
- package/components/red-orange-yellow-green-blue-radio-group.html +18 -0
- package/components/red-orange-yellow-green-blue-radio-input.html +18 -0
- package/index.md +2 -2
- package/lily-alpine.js +0 -57
- package/package.json +1 -1
- package/components/color-picker-button.html +0 -19
- package/components/color-picker.html +0 -19
- package/components/emoji-character-picker.html +0 -18
- package/components/five-face-rating-picker-button.html +0 -20
- package/components/five-face-rating-picker.html +0 -69
- package/components/five-star-rating-picker-button.html +0 -20
- package/components/five-star-rating-picker.html +0 -69
- package/components/net-promoter-score-picker-button.html +0 -20
- package/components/net-promoter-score-picker.html +0 -129
- package/components/red-amber-green-picker-button.html +0 -20
- package/components/red-amber-green-picker.html +0 -49
- package/components/red-orange-yellow-green-blue-picker-button.html +0 -20
- package/components/red-orange-yellow-green-blue-picker.html +0 -69
package/README.md
CHANGED
|
@@ -38,8 +38,8 @@ The snippet fixes the element, the base class (first, as in every Lily catalog)
|
|
|
38
38
|
- _Selection:_ `listbox` (`lilyListbox`), `segment-group` (`lilySegmentGroup`), `combobox` (`lilyCombobox`), `command` (`lilyCommand`); the five rating and status pickers are native radios and `<select>` bound with `x-model`.
|
|
39
39
|
- _Trees:_ `tree-nav`, `tree-menu`, `file-tree` (`lilyTree`), `tree-select` (`lilyTreeSelect`), `cascader` (`lilyCascader`).
|
|
40
40
|
- _Text and form inputs:_ `character-counter`, `text-area-input-with-character-counter`, `password-input-or-text-input-div`, `pin-input-div`, `tag-input-div`, `currency-input`, `text-input-with-search`, `mentions-input`, `editable`, `editable-form`, `data-filter-form`, `newsletter-signup`, `date-time-now-input`, `time-picker-input`.
|
|
41
|
-
- _Value controls and guided widgets:_ `slider`, `dial`, `color-
|
|
42
|
-
- _Container-only (role and name, no behaviour):_ `calendar-range-picker`, `emoji-character-
|
|
41
|
+
- _Value controls and guided widgets:_ `slider`, `dial`, `color-radio-group`, `splitter`, `resizable`, `scroll-area`, `carousel`, `tour`, `coachmark`, `file-upload`.
|
|
42
|
+
- _Container-only (role and name, no behaviour):_ `calendar-range-picker`, `emoji-character-radio-group`, `image-cropper`, `signature-pad`, `file-manager`, `float-button`, `toast`, `sonner`, `timer`.
|
|
43
43
|
|
|
44
44
|
## Develop
|
|
45
45
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- color-radio-group.html -->
|
|
2
|
+
<!-- ColorRadioGroup component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a fieldset radio group for selecting a color swatch
|
|
5
|
+
HTML tag: <fieldset>
|
|
6
|
+
CSS class: color-radio-group
|
|
7
|
+
Keyboard: None (passive element)
|
|
8
|
+
Accessibility: role="radiogroup", aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<fieldset
|
|
13
|
+
class="color-radio-group"
|
|
14
|
+
role="radiogroup"
|
|
15
|
+
aria-label=""
|
|
16
|
+
>
|
|
17
|
+
<!-- Consumer provides content -->
|
|
18
|
+
</fieldset>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- color-radio-input.html -->
|
|
2
|
+
<!-- ColorRadioInput component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a radio input for one choice of a color swatch <input type="radio">
|
|
5
|
+
HTML tag: <input>
|
|
6
|
+
CSS class: color-radio-input
|
|
7
|
+
Keyboard: Tab to focus, standard input keyboard interactions
|
|
8
|
+
Accessibility: Implicit input role, aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<input
|
|
13
|
+
class="color-radio-input"
|
|
14
|
+
type="radio"
|
|
15
|
+
aria-label=""
|
|
16
|
+
value=""
|
|
17
|
+
data-color=""
|
|
18
|
+
style="--color-radio-input-color: "
|
|
19
|
+
/>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- emoji-character-radio-group.html -->
|
|
2
|
+
<!-- EmojiCharacterRadioGroup component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a fieldset radio group for selecting an emoji character
|
|
5
|
+
HTML tag: <fieldset>
|
|
6
|
+
CSS class: emoji-character-radio-group
|
|
7
|
+
Keyboard: None (passive element)
|
|
8
|
+
Accessibility: role="radiogroup", aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<fieldset
|
|
13
|
+
class="emoji-character-radio-group"
|
|
14
|
+
role="radiogroup"
|
|
15
|
+
aria-label=""
|
|
16
|
+
>
|
|
17
|
+
<!-- Consumer provides content -->
|
|
18
|
+
</fieldset>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- emoji-character-radio-input.html -->
|
|
2
|
+
<!-- EmojiCharacterRadioInput component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a radio input for one choice of an emoji character <input type="radio">
|
|
5
|
+
HTML tag: <input>
|
|
6
|
+
CSS class: emoji-character-radio-input
|
|
7
|
+
Keyboard: Tab to focus, standard input keyboard interactions
|
|
8
|
+
Accessibility: Implicit input role, aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<input
|
|
13
|
+
class="emoji-character-radio-input"
|
|
14
|
+
type="radio"
|
|
15
|
+
aria-label=""
|
|
16
|
+
value=""
|
|
17
|
+
data-value=""
|
|
18
|
+
/>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- five-face-rating-radio-group.html -->
|
|
2
|
+
<!-- FiveFaceRatingRadioGroup component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a fieldset radio group for selecting a 1-5 satisfaction rating using face labels
|
|
5
|
+
HTML tag: <fieldset>
|
|
6
|
+
CSS class: five-face-rating-radio-group
|
|
7
|
+
Keyboard: None (passive element)
|
|
8
|
+
Accessibility: role="radiogroup", aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<fieldset
|
|
13
|
+
class="five-face-rating-radio-group"
|
|
14
|
+
role="radiogroup"
|
|
15
|
+
aria-label=""
|
|
16
|
+
>
|
|
17
|
+
<!-- Consumer provides content -->
|
|
18
|
+
</fieldset>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- five-face-rating-radio-input.html -->
|
|
2
|
+
<!-- FiveFaceRatingRadioInput component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a radio input for one choice of a 1-5 satisfaction rating <input type="radio">
|
|
5
|
+
HTML tag: <input>
|
|
6
|
+
CSS class: five-face-rating-radio-input
|
|
7
|
+
Keyboard: Tab to focus, standard input keyboard interactions
|
|
8
|
+
Accessibility: Implicit input role, aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<input
|
|
13
|
+
class="five-face-rating-radio-input"
|
|
14
|
+
type="radio"
|
|
15
|
+
aria-label=""
|
|
16
|
+
value=""
|
|
17
|
+
data-value=""
|
|
18
|
+
/>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- five-star-rating-radio-group.html -->
|
|
2
|
+
<!-- FiveStarRatingRadioGroup component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a fieldset radio group for selecting a 1-5 star rating
|
|
5
|
+
HTML tag: <fieldset>
|
|
6
|
+
CSS class: five-star-rating-radio-group
|
|
7
|
+
Keyboard: None (passive element)
|
|
8
|
+
Accessibility: role="radiogroup", aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<fieldset
|
|
13
|
+
class="five-star-rating-radio-group"
|
|
14
|
+
role="radiogroup"
|
|
15
|
+
aria-label=""
|
|
16
|
+
>
|
|
17
|
+
<!-- Consumer provides content -->
|
|
18
|
+
</fieldset>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- five-star-rating-radio-input.html -->
|
|
2
|
+
<!-- FiveStarRatingRadioInput component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a radio input for one choice of a 1-5 star rating <input type="radio">
|
|
5
|
+
HTML tag: <input>
|
|
6
|
+
CSS class: five-star-rating-radio-input
|
|
7
|
+
Keyboard: Tab to focus, standard input keyboard interactions
|
|
8
|
+
Accessibility: Implicit input role, aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<input
|
|
13
|
+
class="five-star-rating-radio-input"
|
|
14
|
+
type="radio"
|
|
15
|
+
aria-label=""
|
|
16
|
+
value=""
|
|
17
|
+
data-value=""
|
|
18
|
+
/>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!-- international-patient-summary-section.html -->
|
|
2
|
+
<!-- InternationalPatientSummarySection component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: one section of an International Patient Summary, with its LOINC code and a status that is never blank
|
|
5
|
+
HTML tag: <section>
|
|
6
|
+
CSS class: international-patient-summary-section
|
|
7
|
+
Keyboard:
|
|
8
|
+
Accessibility:
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<section
|
|
13
|
+
class="international-patient-summary-section"
|
|
14
|
+
id="international-patient-summary-problems"
|
|
15
|
+
aria-labelledby="international-patient-summary-problems-heading"
|
|
16
|
+
data-section="problems"
|
|
17
|
+
data-code="11450-4"
|
|
18
|
+
data-status="not-recorded"
|
|
19
|
+
data-required="true"
|
|
20
|
+
>
|
|
21
|
+
<h2
|
|
22
|
+
id="international-patient-summary-problems-heading"
|
|
23
|
+
class="international-patient-summary-section-heading"
|
|
24
|
+
>
|
|
25
|
+
Problem list
|
|
26
|
+
</h2>
|
|
27
|
+
<p class="international-patient-summary-section-status">Not recorded</p>
|
|
28
|
+
<details class="international-patient-summary-section-narrative">
|
|
29
|
+
<summary>Narrative from the document</summary>
|
|
30
|
+
<p>No problems were recorded at discharge.</p>
|
|
31
|
+
</details>
|
|
32
|
+
</section>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<!-- international-patient-summary.html -->
|
|
2
|
+
<!-- InternationalPatientSummary component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: an International Patient Summary (HL7 FHIR IPS) laid out for a clinician: patient banner, contents, sections and document details, never silently missing a required section
|
|
5
|
+
HTML tag: <article>
|
|
6
|
+
CSS class: international-patient-summary
|
|
7
|
+
Keyboard:
|
|
8
|
+
Accessibility:
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<article
|
|
13
|
+
class="international-patient-summary"
|
|
14
|
+
aria-label="Patient summary"
|
|
15
|
+
>
|
|
16
|
+
<div class="international-patient-summary-banner">
|
|
17
|
+
<!-- the patient banner pattern -->
|
|
18
|
+
</div>
|
|
19
|
+
<nav
|
|
20
|
+
class="international-patient-summary-contents"
|
|
21
|
+
aria-label="Contents"
|
|
22
|
+
>
|
|
23
|
+
<ol>
|
|
24
|
+
<li
|
|
25
|
+
data-section="allergies"
|
|
26
|
+
data-status="known"
|
|
27
|
+
>
|
|
28
|
+
<a href="#international-patient-summary-allergies">Allergies and intolerances</a>
|
|
29
|
+
</li>
|
|
30
|
+
<li
|
|
31
|
+
data-section="problems"
|
|
32
|
+
data-status="none-known"
|
|
33
|
+
>
|
|
34
|
+
<a href="#international-patient-summary-problems">Problem list</a>
|
|
35
|
+
</li>
|
|
36
|
+
<li
|
|
37
|
+
data-section="medications"
|
|
38
|
+
data-status="omitted"
|
|
39
|
+
>
|
|
40
|
+
<a href="#international-patient-summary-medications">Medication summary</a>
|
|
41
|
+
</li>
|
|
42
|
+
</ol>
|
|
43
|
+
</nav>
|
|
44
|
+
<div class="international-patient-summary-sections">
|
|
45
|
+
<section
|
|
46
|
+
class="international-patient-summary-section"
|
|
47
|
+
id="international-patient-summary-allergies"
|
|
48
|
+
aria-labelledby="international-patient-summary-allergies-heading"
|
|
49
|
+
data-section="allergies"
|
|
50
|
+
data-code="48765-2"
|
|
51
|
+
data-status="known"
|
|
52
|
+
data-required="true"
|
|
53
|
+
>
|
|
54
|
+
<h2
|
|
55
|
+
id="international-patient-summary-allergies-heading"
|
|
56
|
+
class="international-patient-summary-section-heading"
|
|
57
|
+
>
|
|
58
|
+
Allergies and intolerances
|
|
59
|
+
</h2>
|
|
60
|
+
<!-- the section's entries: allergy-record-list -->
|
|
61
|
+
</section>
|
|
62
|
+
<section
|
|
63
|
+
class="international-patient-summary-section"
|
|
64
|
+
id="international-patient-summary-problems"
|
|
65
|
+
aria-labelledby="international-patient-summary-problems-heading"
|
|
66
|
+
data-section="problems"
|
|
67
|
+
data-code="11450-4"
|
|
68
|
+
data-status="none-known"
|
|
69
|
+
data-required="true"
|
|
70
|
+
>
|
|
71
|
+
<h2
|
|
72
|
+
id="international-patient-summary-problems-heading"
|
|
73
|
+
class="international-patient-summary-section-heading"
|
|
74
|
+
>
|
|
75
|
+
Problem list
|
|
76
|
+
</h2>
|
|
77
|
+
<p class="international-patient-summary-section-status">No known problems</p>
|
|
78
|
+
</section>
|
|
79
|
+
<section
|
|
80
|
+
class="international-patient-summary-section"
|
|
81
|
+
id="international-patient-summary-medications"
|
|
82
|
+
aria-labelledby="international-patient-summary-medications-heading"
|
|
83
|
+
data-section="medications"
|
|
84
|
+
data-code="10160-0"
|
|
85
|
+
data-status="omitted"
|
|
86
|
+
data-required="true"
|
|
87
|
+
>
|
|
88
|
+
<h2
|
|
89
|
+
id="international-patient-summary-medications-heading"
|
|
90
|
+
class="international-patient-summary-section-heading"
|
|
91
|
+
>
|
|
92
|
+
Medication summary
|
|
93
|
+
</h2>
|
|
94
|
+
<p class="international-patient-summary-section-status">Section missing from document</p>
|
|
95
|
+
</section>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="international-patient-summary-details">
|
|
98
|
+
<!-- the document's details: title, date, authors, custodian, IPS version -->
|
|
99
|
+
</div>
|
|
100
|
+
</article>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- net-promoter-score-radio-group.html -->
|
|
2
|
+
<!-- NetPromoterScoreRadioGroup component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a fieldset radio group for selecting a 0-10 Net Promoter Score
|
|
5
|
+
HTML tag: <fieldset>
|
|
6
|
+
CSS class: net-promoter-score-radio-group
|
|
7
|
+
Keyboard: None (passive element)
|
|
8
|
+
Accessibility: role="radiogroup", aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<fieldset
|
|
13
|
+
class="net-promoter-score-radio-group"
|
|
14
|
+
role="radiogroup"
|
|
15
|
+
aria-label=""
|
|
16
|
+
>
|
|
17
|
+
<!-- Consumer provides content -->
|
|
18
|
+
</fieldset>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- net-promoter-score-radio-input.html -->
|
|
2
|
+
<!-- NetPromoterScoreRadioInput component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a radio input for one choice of a 0-10 Net Promoter Score <input type="radio">
|
|
5
|
+
HTML tag: <input>
|
|
6
|
+
CSS class: net-promoter-score-radio-input
|
|
7
|
+
Keyboard: Tab to focus, standard input keyboard interactions
|
|
8
|
+
Accessibility: Implicit input role, aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<input
|
|
13
|
+
class="net-promoter-score-radio-input"
|
|
14
|
+
type="radio"
|
|
15
|
+
aria-label=""
|
|
16
|
+
value=""
|
|
17
|
+
data-value=""
|
|
18
|
+
/>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- red-amber-green-radio-group.html -->
|
|
2
|
+
<!-- RedAmberGreenRadioGroup component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a fieldset radio group for selecting a red/amber/green status
|
|
5
|
+
HTML tag: <fieldset>
|
|
6
|
+
CSS class: red-amber-green-radio-group
|
|
7
|
+
Keyboard: None (passive element)
|
|
8
|
+
Accessibility: role="radiogroup", aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<fieldset
|
|
13
|
+
class="red-amber-green-radio-group"
|
|
14
|
+
role="radiogroup"
|
|
15
|
+
aria-label=""
|
|
16
|
+
>
|
|
17
|
+
<!-- Consumer provides content -->
|
|
18
|
+
</fieldset>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- red-amber-green-radio-input.html -->
|
|
2
|
+
<!-- RedAmberGreenRadioInput component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a radio input for one choice of a red/amber/green status <input type="radio">
|
|
5
|
+
HTML tag: <input>
|
|
6
|
+
CSS class: red-amber-green-radio-input
|
|
7
|
+
Keyboard: Tab to focus, standard input keyboard interactions
|
|
8
|
+
Accessibility: Implicit input role, aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<input
|
|
13
|
+
class="red-amber-green-radio-input"
|
|
14
|
+
type="radio"
|
|
15
|
+
aria-label=""
|
|
16
|
+
value=""
|
|
17
|
+
data-value=""
|
|
18
|
+
/>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- red-orange-yellow-green-blue-radio-group.html -->
|
|
2
|
+
<!-- RedOrangeYellowGreenBlueRadioGroup component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a fieldset radio group for selecting a five-level color status
|
|
5
|
+
HTML tag: <fieldset>
|
|
6
|
+
CSS class: red-orange-yellow-green-blue-radio-group
|
|
7
|
+
Keyboard: None (passive element)
|
|
8
|
+
Accessibility: role="radiogroup", aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<fieldset
|
|
13
|
+
class="red-orange-yellow-green-blue-radio-group"
|
|
14
|
+
role="radiogroup"
|
|
15
|
+
aria-label=""
|
|
16
|
+
>
|
|
17
|
+
<!-- Consumer provides content -->
|
|
18
|
+
</fieldset>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- red-orange-yellow-green-blue-radio-input.html -->
|
|
2
|
+
<!-- RedOrangeYellowGreenBlueRadioInput component (Alpine.js) -->
|
|
3
|
+
<!--
|
|
4
|
+
Description: a radio input for one choice of a five-level color status <input type="radio">
|
|
5
|
+
HTML tag: <input>
|
|
6
|
+
CSS class: red-orange-yellow-green-blue-radio-input
|
|
7
|
+
Keyboard: Tab to focus, standard input keyboard interactions
|
|
8
|
+
Accessibility: Implicit input role, aria-label for accessible name
|
|
9
|
+
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<input
|
|
13
|
+
class="red-orange-yellow-green-blue-radio-input"
|
|
14
|
+
type="radio"
|
|
15
|
+
aria-label=""
|
|
16
|
+
value=""
|
|
17
|
+
data-value=""
|
|
18
|
+
/>
|
package/index.md
CHANGED
|
@@ -38,8 +38,8 @@ The snippet fixes the element, the base class (first, as in every Lily catalog)
|
|
|
38
38
|
- _Selection:_ `listbox` (`lilyListbox`), `segment-group` (`lilySegmentGroup`), `combobox` (`lilyCombobox`), `command` (`lilyCommand`); the five rating and status pickers are native radios and `<select>` bound with `x-model`.
|
|
39
39
|
- _Trees:_ `tree-nav`, `tree-menu`, `file-tree` (`lilyTree`), `tree-select` (`lilyTreeSelect`), `cascader` (`lilyCascader`).
|
|
40
40
|
- _Text and form inputs:_ `character-counter`, `text-area-input-with-character-counter`, `password-input-or-text-input-div`, `pin-input-div`, `tag-input-div`, `currency-input`, `text-input-with-search`, `mentions-input`, `editable`, `editable-form`, `data-filter-form`, `newsletter-signup`, `date-time-now-input`, `time-picker-input`.
|
|
41
|
-
- _Value controls and guided widgets:_ `slider`, `dial`, `color-
|
|
42
|
-
- _Container-only (role and name, no behaviour):_ `calendar-range-picker`, `emoji-character-
|
|
41
|
+
- _Value controls and guided widgets:_ `slider`, `dial`, `color-radio-group`, `splitter`, `resizable`, `scroll-area`, `carousel`, `tour`, `coachmark`, `file-upload`.
|
|
42
|
+
- _Container-only (role and name, no behaviour):_ `calendar-range-picker`, `emoji-character-radio-group`, `image-cropper`, `signature-pad`, `file-manager`, `float-button`, `toast`, `sonner`, `timer`.
|
|
43
43
|
|
|
44
44
|
## Develop
|
|
45
45
|
|
package/lily-alpine.js
CHANGED
|
@@ -2459,63 +2459,6 @@ export default function lily(Alpine) {
|
|
|
2459
2459
|
},
|
|
2460
2460
|
}));
|
|
2461
2461
|
|
|
2462
|
-
// ColorPicker: a two-axis role="slider" over a 0–100 square. aria-valuenow
|
|
2463
|
-
// is x; data-x and data-y position the cursor. Up lowers y, Down raises it.
|
|
2464
|
-
Alpine.data("lilyColorPicker", (x = 0, y = 0, disabled = false) => ({
|
|
2465
|
-
x,
|
|
2466
|
-
y,
|
|
2467
|
-
disabled,
|
|
2468
|
-
area: {
|
|
2469
|
-
role: "slider",
|
|
2470
|
-
":tabindex"() {
|
|
2471
|
-
return this.disabled ? "-1" : "0";
|
|
2472
|
-
},
|
|
2473
|
-
"aria-valuemin": "0",
|
|
2474
|
-
"aria-valuemax": "100",
|
|
2475
|
-
":aria-valuenow"() {
|
|
2476
|
-
return String(this.x);
|
|
2477
|
-
},
|
|
2478
|
-
":aria-disabled"() {
|
|
2479
|
-
return this.disabled ? "true" : null;
|
|
2480
|
-
},
|
|
2481
|
-
":data-x"() {
|
|
2482
|
-
return String(this.x);
|
|
2483
|
-
},
|
|
2484
|
-
":data-y"() {
|
|
2485
|
-
return String(this.y);
|
|
2486
|
-
},
|
|
2487
|
-
"@keydown"(event) {
|
|
2488
|
-
if (this.disabled) return;
|
|
2489
|
-
const big = event.shiftKey ? 10 : 1;
|
|
2490
|
-
const clamp = (n) => Math.min(100, Math.max(0, n));
|
|
2491
|
-
const move = {
|
|
2492
|
-
ArrowRight: () => {
|
|
2493
|
-
this.x = clamp(this.x + big);
|
|
2494
|
-
},
|
|
2495
|
-
ArrowLeft: () => {
|
|
2496
|
-
this.x = clamp(this.x - big);
|
|
2497
|
-
},
|
|
2498
|
-
ArrowUp: () => {
|
|
2499
|
-
this.y = clamp(this.y - big);
|
|
2500
|
-
},
|
|
2501
|
-
ArrowDown: () => {
|
|
2502
|
-
this.y = clamp(this.y + big);
|
|
2503
|
-
},
|
|
2504
|
-
Home: () => {
|
|
2505
|
-
this.x = 0;
|
|
2506
|
-
},
|
|
2507
|
-
End: () => {
|
|
2508
|
-
this.x = 100;
|
|
2509
|
-
},
|
|
2510
|
-
}[event.key];
|
|
2511
|
-
if (!move) return;
|
|
2512
|
-
event.preventDefault();
|
|
2513
|
-
move();
|
|
2514
|
-
this.$dispatch("lily:change", { x: this.x, y: this.y });
|
|
2515
|
-
},
|
|
2516
|
-
},
|
|
2517
|
-
}));
|
|
2518
|
-
|
|
2519
2462
|
// Splitter: a focusable role="separator" with a 0–100 position. The keys
|
|
2520
2463
|
// that move it follow the orientation (Left/Right when the panes sit side by
|
|
2521
2464
|
// side, Up/Down when stacked); Shift moves ten steps; Home/End jump to the
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<!-- color-picker-button.html -->
|
|
2
|
-
<!-- ColorPickerButton component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a button showing a color swatch in a color picker
|
|
5
|
-
HTML tag: <button>
|
|
6
|
-
CSS class: color-picker-button
|
|
7
|
-
Keyboard: Tab to focus, Enter or Space to activate
|
|
8
|
-
Accessibility: role="radio", Implicit button role, aria-label for accessible name
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<button
|
|
13
|
-
class="color-picker-button"
|
|
14
|
-
role="radio"
|
|
15
|
-
aria-checked="false"
|
|
16
|
-
aria-label=""
|
|
17
|
-
>
|
|
18
|
-
<!-- Consumer provides button content -->
|
|
19
|
-
</button>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<!-- color-picker.html -->
|
|
2
|
-
<!-- ColorPicker component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a two-dimensional board for picking colors by hue and saturation
|
|
5
|
-
HTML tag: <div>
|
|
6
|
-
CSS class: color-picker
|
|
7
|
-
Keyboard: Right/Left change x, Up/Down change y, Shift moves ten, Home/End set x to 0 / 100
|
|
8
|
-
Accessibility: role="slider" with aria-label and aria-valuenow (x) between 0 and 100; data-x and data-y position the cursor
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<div
|
|
13
|
-
class="color-picker"
|
|
14
|
-
aria-label=""
|
|
15
|
-
x-data="lilyColorPicker(0, 0)"
|
|
16
|
-
x-bind="area"
|
|
17
|
-
>
|
|
18
|
-
<!-- Consumer provides the colour area and cursor -->
|
|
19
|
-
</div>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!-- emoji-character-picker.html -->
|
|
2
|
-
<!-- EmojiCharacterPicker component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker for browsing and selecting emoji characters
|
|
5
|
-
HTML tag: <div>
|
|
6
|
-
CSS class: emoji-character-picker
|
|
7
|
-
Keyboard: None (passive element)
|
|
8
|
-
Accessibility: role="group" with aria-label naming the emoji picker
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<div
|
|
13
|
-
class="emoji-character-picker"
|
|
14
|
-
role="group"
|
|
15
|
-
aria-label=""
|
|
16
|
-
>
|
|
17
|
-
<!-- Consumer provides the emoji buttons, one per character, and any category filtering -->
|
|
18
|
-
</div>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!-- five-face-rating-picker-button.html -->
|
|
2
|
-
<!-- FiveFaceRatingPickerButton component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker button for selecting a 1-5 satisfaction rating using face labels
|
|
5
|
-
HTML tag: <button>
|
|
6
|
-
CSS class: five-face-rating-picker-button
|
|
7
|
-
Keyboard: Tab to focus, Enter or Space to activate
|
|
8
|
-
Accessibility: role="radio", Implicit button role, aria-label for accessible name
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<button
|
|
13
|
-
class="five-face-rating-picker-button"
|
|
14
|
-
data-value="3"
|
|
15
|
-
role="radio"
|
|
16
|
-
aria-checked="false"
|
|
17
|
-
aria-label=""
|
|
18
|
-
>
|
|
19
|
-
<!-- Consumer provides button content -->
|
|
20
|
-
</button>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!-- five-face-rating-picker.html -->
|
|
2
|
-
<!-- FiveFaceRatingPicker component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker for selecting a 1-5 satisfaction rating using face labels
|
|
5
|
-
HTML tag: <fieldset>
|
|
6
|
-
CSS class: five-face-rating-picker
|
|
7
|
-
Keyboard: Tab focuses the selected radio; arrows move between radios; Space selects
|
|
8
|
-
Accessibility: fieldset with role="radiogroup" and aria-label; native radios share a name; x-model keeps the chosen value in data-value
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<fieldset
|
|
13
|
-
class="five-face-rating-picker"
|
|
14
|
-
role="radiogroup"
|
|
15
|
-
aria-label=""
|
|
16
|
-
x-data="{ value: '' }"
|
|
17
|
-
:data-value="value"
|
|
18
|
-
>
|
|
19
|
-
<label class="five-face-rating-picker-button"
|
|
20
|
-
><input
|
|
21
|
-
type="radio"
|
|
22
|
-
name="satisfaction"
|
|
23
|
-
value="1"
|
|
24
|
-
aria-label="1"
|
|
25
|
-
x-model="value"
|
|
26
|
-
/>
|
|
27
|
-
1</label
|
|
28
|
-
>
|
|
29
|
-
<label class="five-face-rating-picker-button"
|
|
30
|
-
><input
|
|
31
|
-
type="radio"
|
|
32
|
-
name="satisfaction"
|
|
33
|
-
value="2"
|
|
34
|
-
aria-label="2"
|
|
35
|
-
x-model="value"
|
|
36
|
-
/>
|
|
37
|
-
2</label
|
|
38
|
-
>
|
|
39
|
-
<label class="five-face-rating-picker-button"
|
|
40
|
-
><input
|
|
41
|
-
type="radio"
|
|
42
|
-
name="satisfaction"
|
|
43
|
-
value="3"
|
|
44
|
-
aria-label="3"
|
|
45
|
-
x-model="value"
|
|
46
|
-
/>
|
|
47
|
-
3</label
|
|
48
|
-
>
|
|
49
|
-
<label class="five-face-rating-picker-button"
|
|
50
|
-
><input
|
|
51
|
-
type="radio"
|
|
52
|
-
name="satisfaction"
|
|
53
|
-
value="4"
|
|
54
|
-
aria-label="4"
|
|
55
|
-
x-model="value"
|
|
56
|
-
/>
|
|
57
|
-
4</label
|
|
58
|
-
>
|
|
59
|
-
<label class="five-face-rating-picker-button"
|
|
60
|
-
><input
|
|
61
|
-
type="radio"
|
|
62
|
-
name="satisfaction"
|
|
63
|
-
value="5"
|
|
64
|
-
aria-label="5"
|
|
65
|
-
x-model="value"
|
|
66
|
-
/>
|
|
67
|
-
5</label
|
|
68
|
-
>
|
|
69
|
-
</fieldset>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!-- five-star-rating-picker-button.html -->
|
|
2
|
-
<!-- FiveStarRatingPickerButton component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker button for selecting a 1-5 star rating using radio buttons
|
|
5
|
-
HTML tag: <button>
|
|
6
|
-
CSS class: five-star-rating-picker-button
|
|
7
|
-
Keyboard: Tab to focus, Enter or Space to activate
|
|
8
|
-
Accessibility: role="radio", Implicit button role, aria-label for accessible name
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<button
|
|
13
|
-
class="five-star-rating-picker-button"
|
|
14
|
-
data-value="3"
|
|
15
|
-
role="radio"
|
|
16
|
-
aria-checked="false"
|
|
17
|
-
aria-label=""
|
|
18
|
-
>
|
|
19
|
-
<!-- Consumer provides button content -->
|
|
20
|
-
</button>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!-- five-star-rating-picker.html -->
|
|
2
|
-
<!-- FiveStarRatingPicker component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker for selecting a 1-5 star rating using radio buttons
|
|
5
|
-
HTML tag: <fieldset>
|
|
6
|
-
CSS class: five-star-rating-picker
|
|
7
|
-
Keyboard: Tab focuses the selected radio; arrows move between radios; Space selects
|
|
8
|
-
Accessibility: fieldset with role="radiogroup" and aria-label; native radios share a name; x-model keeps the chosen value in data-value
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<fieldset
|
|
13
|
-
class="five-star-rating-picker"
|
|
14
|
-
role="radiogroup"
|
|
15
|
-
aria-label=""
|
|
16
|
-
x-data="{ value: '' }"
|
|
17
|
-
:data-value="value"
|
|
18
|
-
>
|
|
19
|
-
<label class="five-star-rating-picker-button"
|
|
20
|
-
><input
|
|
21
|
-
type="radio"
|
|
22
|
-
name="rating"
|
|
23
|
-
value="1"
|
|
24
|
-
aria-label="1"
|
|
25
|
-
x-model="value"
|
|
26
|
-
/>
|
|
27
|
-
1</label
|
|
28
|
-
>
|
|
29
|
-
<label class="five-star-rating-picker-button"
|
|
30
|
-
><input
|
|
31
|
-
type="radio"
|
|
32
|
-
name="rating"
|
|
33
|
-
value="2"
|
|
34
|
-
aria-label="2"
|
|
35
|
-
x-model="value"
|
|
36
|
-
/>
|
|
37
|
-
2</label
|
|
38
|
-
>
|
|
39
|
-
<label class="five-star-rating-picker-button"
|
|
40
|
-
><input
|
|
41
|
-
type="radio"
|
|
42
|
-
name="rating"
|
|
43
|
-
value="3"
|
|
44
|
-
aria-label="3"
|
|
45
|
-
x-model="value"
|
|
46
|
-
/>
|
|
47
|
-
3</label
|
|
48
|
-
>
|
|
49
|
-
<label class="five-star-rating-picker-button"
|
|
50
|
-
><input
|
|
51
|
-
type="radio"
|
|
52
|
-
name="rating"
|
|
53
|
-
value="4"
|
|
54
|
-
aria-label="4"
|
|
55
|
-
x-model="value"
|
|
56
|
-
/>
|
|
57
|
-
4</label
|
|
58
|
-
>
|
|
59
|
-
<label class="five-star-rating-picker-button"
|
|
60
|
-
><input
|
|
61
|
-
type="radio"
|
|
62
|
-
name="rating"
|
|
63
|
-
value="5"
|
|
64
|
-
aria-label="5"
|
|
65
|
-
x-model="value"
|
|
66
|
-
/>
|
|
67
|
-
5</label
|
|
68
|
-
>
|
|
69
|
-
</fieldset>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!-- net-promoter-score-picker-button.html -->
|
|
2
|
-
<!-- NetPromoterScorePickerButton component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker button for selecting a 0-10 Net Promoter Score
|
|
5
|
-
HTML tag: <button>
|
|
6
|
-
CSS class: net-promoter-score-picker-button
|
|
7
|
-
Keyboard: Tab to focus, Enter or Space to activate
|
|
8
|
-
Accessibility: role="radio", Implicit button role, aria-label for accessible name
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<button
|
|
13
|
-
class="net-promoter-score-picker-button"
|
|
14
|
-
data-value="8"
|
|
15
|
-
role="radio"
|
|
16
|
-
aria-checked="false"
|
|
17
|
-
aria-label=""
|
|
18
|
-
>
|
|
19
|
-
<!-- Consumer provides button content -->
|
|
20
|
-
</button>
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
<!-- net-promoter-score-picker.html -->
|
|
2
|
-
<!-- NetPromoterScorePicker component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker for selecting a 0-10 Net Promoter Score
|
|
5
|
-
HTML tag: <fieldset>
|
|
6
|
-
CSS class: net-promoter-score-picker
|
|
7
|
-
Keyboard: arrows move between radios (native radio group); Space selects; Tab leaves the group
|
|
8
|
-
Accessibility: fieldset with role="radiogroup" and aria-label; native radios share a name; x-model keeps the chosen value in data-value
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<fieldset
|
|
13
|
-
class="net-promoter-score-picker"
|
|
14
|
-
role="radiogroup"
|
|
15
|
-
aria-label=""
|
|
16
|
-
x-data="{ value: '' }"
|
|
17
|
-
:data-value="value"
|
|
18
|
-
>
|
|
19
|
-
<label class="net-promoter-score-picker-button"
|
|
20
|
-
><input
|
|
21
|
-
type="radio"
|
|
22
|
-
name="nps"
|
|
23
|
-
value="0"
|
|
24
|
-
aria-label="0"
|
|
25
|
-
x-model="value"
|
|
26
|
-
/>
|
|
27
|
-
0</label
|
|
28
|
-
>
|
|
29
|
-
<label class="net-promoter-score-picker-button"
|
|
30
|
-
><input
|
|
31
|
-
type="radio"
|
|
32
|
-
name="nps"
|
|
33
|
-
value="1"
|
|
34
|
-
aria-label="1"
|
|
35
|
-
x-model="value"
|
|
36
|
-
/>
|
|
37
|
-
1</label
|
|
38
|
-
>
|
|
39
|
-
<label class="net-promoter-score-picker-button"
|
|
40
|
-
><input
|
|
41
|
-
type="radio"
|
|
42
|
-
name="nps"
|
|
43
|
-
value="2"
|
|
44
|
-
aria-label="2"
|
|
45
|
-
x-model="value"
|
|
46
|
-
/>
|
|
47
|
-
2</label
|
|
48
|
-
>
|
|
49
|
-
<label class="net-promoter-score-picker-button"
|
|
50
|
-
><input
|
|
51
|
-
type="radio"
|
|
52
|
-
name="nps"
|
|
53
|
-
value="3"
|
|
54
|
-
aria-label="3"
|
|
55
|
-
x-model="value"
|
|
56
|
-
/>
|
|
57
|
-
3</label
|
|
58
|
-
>
|
|
59
|
-
<label class="net-promoter-score-picker-button"
|
|
60
|
-
><input
|
|
61
|
-
type="radio"
|
|
62
|
-
name="nps"
|
|
63
|
-
value="4"
|
|
64
|
-
aria-label="4"
|
|
65
|
-
x-model="value"
|
|
66
|
-
/>
|
|
67
|
-
4</label
|
|
68
|
-
>
|
|
69
|
-
<label class="net-promoter-score-picker-button"
|
|
70
|
-
><input
|
|
71
|
-
type="radio"
|
|
72
|
-
name="nps"
|
|
73
|
-
value="5"
|
|
74
|
-
aria-label="5"
|
|
75
|
-
x-model="value"
|
|
76
|
-
/>
|
|
77
|
-
5</label
|
|
78
|
-
>
|
|
79
|
-
<label class="net-promoter-score-picker-button"
|
|
80
|
-
><input
|
|
81
|
-
type="radio"
|
|
82
|
-
name="nps"
|
|
83
|
-
value="6"
|
|
84
|
-
aria-label="6"
|
|
85
|
-
x-model="value"
|
|
86
|
-
/>
|
|
87
|
-
6</label
|
|
88
|
-
>
|
|
89
|
-
<label class="net-promoter-score-picker-button"
|
|
90
|
-
><input
|
|
91
|
-
type="radio"
|
|
92
|
-
name="nps"
|
|
93
|
-
value="7"
|
|
94
|
-
aria-label="7"
|
|
95
|
-
x-model="value"
|
|
96
|
-
/>
|
|
97
|
-
7</label
|
|
98
|
-
>
|
|
99
|
-
<label class="net-promoter-score-picker-button"
|
|
100
|
-
><input
|
|
101
|
-
type="radio"
|
|
102
|
-
name="nps"
|
|
103
|
-
value="8"
|
|
104
|
-
aria-label="8"
|
|
105
|
-
x-model="value"
|
|
106
|
-
/>
|
|
107
|
-
8</label
|
|
108
|
-
>
|
|
109
|
-
<label class="net-promoter-score-picker-button"
|
|
110
|
-
><input
|
|
111
|
-
type="radio"
|
|
112
|
-
name="nps"
|
|
113
|
-
value="9"
|
|
114
|
-
aria-label="9"
|
|
115
|
-
x-model="value"
|
|
116
|
-
/>
|
|
117
|
-
9</label
|
|
118
|
-
>
|
|
119
|
-
<label class="net-promoter-score-picker-button"
|
|
120
|
-
><input
|
|
121
|
-
type="radio"
|
|
122
|
-
name="nps"
|
|
123
|
-
value="10"
|
|
124
|
-
aria-label="10"
|
|
125
|
-
x-model="value"
|
|
126
|
-
/>
|
|
127
|
-
10</label
|
|
128
|
-
>
|
|
129
|
-
</fieldset>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!-- red-amber-green-picker-button.html -->
|
|
2
|
-
<!-- RedAmberGreenPickerButton component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker button for selecting a red/amber/green status
|
|
5
|
-
HTML tag: <button>
|
|
6
|
-
CSS class: red-amber-green-picker-button
|
|
7
|
-
Keyboard: Tab to focus, Enter or Space to activate
|
|
8
|
-
Accessibility: role="radio", Implicit button role, aria-label for accessible name
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<button
|
|
13
|
-
class="red-amber-green-picker-button"
|
|
14
|
-
data-value="green"
|
|
15
|
-
role="radio"
|
|
16
|
-
aria-checked="false"
|
|
17
|
-
aria-label=""
|
|
18
|
-
>
|
|
19
|
-
<!-- Consumer provides button content -->
|
|
20
|
-
</button>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<!-- red-amber-green-picker.html -->
|
|
2
|
-
<!-- RedAmberGreenPicker component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker for selecting a red/amber/green status
|
|
5
|
-
HTML tag: <fieldset>
|
|
6
|
-
CSS class: red-amber-green-picker
|
|
7
|
-
Keyboard: Tab focuses the selected radio; arrows move between radios; Space selects
|
|
8
|
-
Accessibility: fieldset with role="radiogroup" and aria-label; native radios share a name; x-model keeps the chosen value in data-value
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<fieldset
|
|
13
|
-
class="red-amber-green-picker"
|
|
14
|
-
role="radiogroup"
|
|
15
|
-
aria-label=""
|
|
16
|
-
x-data="{ value: '' }"
|
|
17
|
-
:data-value="value"
|
|
18
|
-
>
|
|
19
|
-
<label class="red-amber-green-picker-button"
|
|
20
|
-
><input
|
|
21
|
-
type="radio"
|
|
22
|
-
name="status"
|
|
23
|
-
value="red"
|
|
24
|
-
aria-label="red"
|
|
25
|
-
x-model="value"
|
|
26
|
-
/>
|
|
27
|
-
red</label
|
|
28
|
-
>
|
|
29
|
-
<label class="red-amber-green-picker-button"
|
|
30
|
-
><input
|
|
31
|
-
type="radio"
|
|
32
|
-
name="status"
|
|
33
|
-
value="amber"
|
|
34
|
-
aria-label="amber"
|
|
35
|
-
x-model="value"
|
|
36
|
-
/>
|
|
37
|
-
amber</label
|
|
38
|
-
>
|
|
39
|
-
<label class="red-amber-green-picker-button"
|
|
40
|
-
><input
|
|
41
|
-
type="radio"
|
|
42
|
-
name="status"
|
|
43
|
-
value="green"
|
|
44
|
-
aria-label="green"
|
|
45
|
-
x-model="value"
|
|
46
|
-
/>
|
|
47
|
-
green</label
|
|
48
|
-
>
|
|
49
|
-
</fieldset>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!-- red-orange-yellow-green-blue-picker-button.html -->
|
|
2
|
-
<!-- RedOrangeYellowGreenBluePickerButton component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker button for selecting a five-level color status
|
|
5
|
-
HTML tag: <button>
|
|
6
|
-
CSS class: red-orange-yellow-green-blue-picker-button
|
|
7
|
-
Keyboard: Tab to focus, Enter or Space to activate
|
|
8
|
-
Accessibility: role="radio", Implicit button role, aria-label for accessible name
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<button
|
|
13
|
-
class="red-orange-yellow-green-blue-picker-button"
|
|
14
|
-
data-value="green"
|
|
15
|
-
role="radio"
|
|
16
|
-
aria-checked="false"
|
|
17
|
-
aria-label=""
|
|
18
|
-
>
|
|
19
|
-
<!-- Consumer provides button content -->
|
|
20
|
-
</button>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!-- red-orange-yellow-green-blue-picker.html -->
|
|
2
|
-
<!-- RedOrangeYellowGreenBluePicker component (Alpine.js) -->
|
|
3
|
-
<!--
|
|
4
|
-
Description: a picker for selecting a five-level color status
|
|
5
|
-
HTML tag: <fieldset>
|
|
6
|
-
CSS class: red-orange-yellow-green-blue-picker
|
|
7
|
-
Keyboard: Tab focuses the selected radio; arrows move between radios; Space selects
|
|
8
|
-
Accessibility: fieldset with role="radiogroup" and aria-label; native radios share a name; x-model keeps the chosen value in data-value
|
|
9
|
-
Requires: Alpine.js with the Lily plugin (lily-alpine.js)
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<fieldset
|
|
13
|
-
class="red-orange-yellow-green-blue-picker"
|
|
14
|
-
role="radiogroup"
|
|
15
|
-
aria-label=""
|
|
16
|
-
x-data="{ value: '' }"
|
|
17
|
-
:data-value="value"
|
|
18
|
-
>
|
|
19
|
-
<label class="red-orange-yellow-green-blue-picker-button"
|
|
20
|
-
><input
|
|
21
|
-
type="radio"
|
|
22
|
-
name="status"
|
|
23
|
-
value="red"
|
|
24
|
-
aria-label="red"
|
|
25
|
-
x-model="value"
|
|
26
|
-
/>
|
|
27
|
-
red</label
|
|
28
|
-
>
|
|
29
|
-
<label class="red-orange-yellow-green-blue-picker-button"
|
|
30
|
-
><input
|
|
31
|
-
type="radio"
|
|
32
|
-
name="status"
|
|
33
|
-
value="orange"
|
|
34
|
-
aria-label="orange"
|
|
35
|
-
x-model="value"
|
|
36
|
-
/>
|
|
37
|
-
orange</label
|
|
38
|
-
>
|
|
39
|
-
<label class="red-orange-yellow-green-blue-picker-button"
|
|
40
|
-
><input
|
|
41
|
-
type="radio"
|
|
42
|
-
name="status"
|
|
43
|
-
value="yellow"
|
|
44
|
-
aria-label="yellow"
|
|
45
|
-
x-model="value"
|
|
46
|
-
/>
|
|
47
|
-
yellow</label
|
|
48
|
-
>
|
|
49
|
-
<label class="red-orange-yellow-green-blue-picker-button"
|
|
50
|
-
><input
|
|
51
|
-
type="radio"
|
|
52
|
-
name="status"
|
|
53
|
-
value="green"
|
|
54
|
-
aria-label="green"
|
|
55
|
-
x-model="value"
|
|
56
|
-
/>
|
|
57
|
-
green</label
|
|
58
|
-
>
|
|
59
|
-
<label class="red-orange-yellow-green-blue-picker-button"
|
|
60
|
-
><input
|
|
61
|
-
type="radio"
|
|
62
|
-
name="status"
|
|
63
|
-
value="blue"
|
|
64
|
-
aria-label="blue"
|
|
65
|
-
x-model="value"
|
|
66
|
-
/>
|
|
67
|
-
blue</label
|
|
68
|
-
>
|
|
69
|
-
</fieldset>
|