semmet-angular 0.12.0 → 0.13.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/package.json +1 -1
- package/src/alert/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/alert-dialog/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/badge/files/__name@dasherize__/__name@dasherize__.html.template +7 -0
- package/src/breadcrumb/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/button/files/__name@dasherize__/__name@dasherize__.html.template +7 -0
- package/src/button-group/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/card/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/checkbox/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/close-button/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/combobox/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/dialog/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/form/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/input/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/input-group/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/landmarks/files/__name@dasherize__/__name@dasherize__.html.template +12 -0
- package/src/list-group/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/listbox/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/menu-button/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/meter/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/navbar/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/navigation-menu/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/offcanvas/files/__name@dasherize__/__name@dasherize__.html.template +8 -0
- package/src/pagination/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/popover/files/__name@dasherize__/__name@dasherize__.html.template +8 -0
- package/src/progress-bar/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/radio-group/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/select/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/skeleton/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/skip-link/files/__name@dasherize__/__name@dasherize__.html.template +7 -0
- package/src/slider/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/spinbutton/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/spinner/files/__name@dasherize__/__name@dasherize__.html.template +7 -0
- package/src/switch/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/table/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/textarea/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/toast/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/toolbar/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/tooltip/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
- package/src/tree-view/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semmet-angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Angular schematics that generate real, ARIA-conformant standalone components (Accordion, Tabs, Dialog, Disclosure, Tooltip...) with signals-based state and keyboard interaction built in.",
|
|
5
5
|
"publisher": "danilodevsilva",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Alert — https://www.w3.org/WAI/ARIA/apg/patterns/alert/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
@if (visible()) {
|
|
3
9
|
<div role="alert" [id]="instanceId">
|
|
4
10
|
<span>Your changes have been saved.</span>
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Alert Dialog — https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<button type="button" (click)="open($event)">Delete item</button>
|
|
3
9
|
|
|
4
10
|
@if (isOpen()) {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<!-- Semmet Angular: Badge - compact text metadata, status labels, or counters. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> label="New" variant="success" />
|
|
7
|
+
<<%= selector %> label="7" accessibleLabel="7 unread notifications" />
|
|
8
|
+
-->
|
|
2
9
|
<span
|
|
3
10
|
[id]="instanceId"
|
|
4
11
|
[class]="badgeClasses()"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Breadcrumb — https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<nav aria-label="Breadcrumb">
|
|
3
9
|
<ol>
|
|
4
10
|
@for (item of items; track item.id) {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<!-- Semmet Angular: Button - native <button> keeps form, focus, and keyboard semantics. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> label="Save changes" variant="primary" (click)="save()" />
|
|
7
|
+
<<%= selector %> label="Saving" [busy]="isSaving()" />
|
|
8
|
+
-->
|
|
2
9
|
<button
|
|
3
10
|
type="button"
|
|
4
11
|
[id]="instanceId"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Button Group - grouped native buttons with optional toggle state. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> label="View options" />
|
|
7
|
+
-->
|
|
2
8
|
<div
|
|
3
9
|
[id]="instanceId"
|
|
4
10
|
[class]="groupClasses()"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Card — https://www.w3.org/WAI/tutorials/page-structure/headings/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<article [attr.aria-labelledby]="instanceId + '-title'">
|
|
3
9
|
<h3 [id]="instanceId + '-title'">Card title</h3>
|
|
4
10
|
<p>Card description text.</p>
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Checkbox — https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<div
|
|
3
9
|
role="checkbox"
|
|
4
10
|
[attr.aria-checked]="checked()"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Close Button - native button with a required accessible name. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> label="Close dialog" (click)="close()" />
|
|
7
|
+
-->
|
|
2
8
|
<button
|
|
3
9
|
type="button"
|
|
4
10
|
[id]="instanceId"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Combobox — https://www.w3.org/WAI/ARIA/apg/patterns/combobox/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<label [id]="instanceId + '-label'" [for]="instanceId + '-input'">Choose a fruit</label>
|
|
3
9
|
<input
|
|
4
10
|
type="text"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Dialog (Modal) — https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<button type="button" (click)="open($event)">Open dialog</button>
|
|
3
9
|
|
|
4
10
|
@if (isOpen()) {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Form - native form with labels, inline validation, and status messaging. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<form [attr.aria-labelledby]="instanceId + '-title'" (submit)="submit($event)" novalidate>
|
|
3
9
|
<h2 [id]="instanceId + '-title'">Contact form</h2>
|
|
4
10
|
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Input - native <input> with label, hint, and validation wiring. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> label="Email address" [(value)]="email" [required]="true" />
|
|
7
|
+
-->
|
|
2
8
|
<div class="semmet-field">
|
|
3
9
|
<label [for]="controlId()">
|
|
4
10
|
{{ label() }}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Input Group - native input with addon text announced through aria-describedby. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> label="Website" prefix="https://" suffix=".com" [(value)]="website" />
|
|
7
|
+
-->
|
|
2
8
|
<label class="semmet-input-group__label" [for]="instanceId">
|
|
3
9
|
{{ label() }}
|
|
4
10
|
@if (required()) {
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
<!-- Semmet Angular: Landmarks (Page Skeleton) — https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %>>
|
|
7
|
+
<h1 header>Dashboard</h1>
|
|
8
|
+
<a nav routerLink="/reports">Reports</a>
|
|
9
|
+
<section>Primary page content</section>
|
|
10
|
+
<aside aside>Related actions</aside>
|
|
11
|
+
<small footer>Copyright 2026</small>
|
|
12
|
+
</<%= selector %>>
|
|
13
|
+
-->
|
|
2
14
|
<!-- Project content into a region with the matching attribute, e.g. <div header>...</div>. Unmatched content goes to <main>. -->
|
|
3
15
|
<header>
|
|
4
16
|
<ng-content select="[header]"></ng-content>
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: List Group - semantic list with optional action and active states. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> label="Settings sections" />
|
|
7
|
+
-->
|
|
2
8
|
<ul [id]="instanceId" [class]="listClasses()" [attr.aria-label]="label()">
|
|
3
9
|
@for (item of items(); track item.id) {
|
|
4
10
|
<li class="semmet-list-group__item">
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Listbox — https://www.w3.org/WAI/ARIA/apg/patterns/listbox/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<span [id]="instanceId + '-label'">Choose an option</span>
|
|
3
9
|
<ul
|
|
4
10
|
role="listbox"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Menu Button — https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<button
|
|
3
9
|
#menuButton
|
|
4
10
|
type="button"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Meter — https://www.w3.org/TR/wai-aria-1.2/#meter -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<label [for]="instanceId">Disk usage</label>
|
|
3
9
|
<meter [id]="instanceId" min="0" max="100" [value]="value()" low="50" high="90" optimum="0">
|
|
4
10
|
{{ value() }}%
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Navbar - semantic navigation with responsive disclosure behavior. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> brand="Acme" brandHref="/" />
|
|
7
|
+
-->
|
|
2
8
|
<!-- Deliberately avoids role="menu"; regular site navigation should stay as nav/list/link semantics. -->
|
|
3
9
|
<nav class="semmet-navbar" [attr.aria-label]="label()">
|
|
4
10
|
<a class="semmet-navbar__brand" [href]="brandHref()">{{ brand() }}</a>
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Navigation Menu (Disclosure) — https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<!-- Deliberately avoids the ARIA menu/menuitem roles — APG reserves those for app-style menus. -->
|
|
3
9
|
<nav aria-label="Main">
|
|
4
10
|
<ul>
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
<!-- Semmet Angular: Offcanvas - modal drawer with dialog semantics and focus management. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> triggerLabel="Open filters" title="Filters">
|
|
7
|
+
<app-filter-panel />
|
|
8
|
+
</<%= selector %>>
|
|
9
|
+
-->
|
|
2
10
|
<button
|
|
3
11
|
type="button"
|
|
4
12
|
class="semmet-offcanvas__trigger"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Pagination — https://www.w3.org/TR/wai-aria-1.2/#aria-current -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<nav aria-label="Pagination">
|
|
3
9
|
<ul>
|
|
4
10
|
<li>
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
<!-- Semmet Angular: Popover - disclosure trigger for short, contextual non-modal content. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> triggerLabel="More information" title="Helpful context">
|
|
7
|
+
<a routerLink="/help">Read the guide</a>
|
|
8
|
+
</<%= selector %>>
|
|
9
|
+
-->
|
|
2
10
|
<button
|
|
3
11
|
type="button"
|
|
4
12
|
class="semmet-popover__trigger"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Progress Bar — https://www.w3.org/TR/wai-aria-1.2/#progressbar -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<label [for]="instanceId">Uploading file</label>
|
|
3
9
|
<progress [id]="instanceId" [value]="value()" max="100">{{ value() }}%</progress>
|
|
4
10
|
<button type="button" (click)="advance()" [disabled]="isComplete()">
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Radio Group — https://www.w3.org/WAI/ARIA/apg/patterns/radio/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<div role="radiogroup" [attr.aria-labelledby]="instanceId + '-label'">
|
|
3
9
|
<span [id]="instanceId + '-label'">Choose a plan</span>
|
|
4
10
|
@for (option of options; track option.id; let i = $index) {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Select - native select keeps platform semantics and form behavior. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> label="Category" [(value)]="category" [required]="true" />
|
|
7
|
+
-->
|
|
2
8
|
<label class="semmet-select" [for]="instanceId">
|
|
3
9
|
<span class="semmet-select__label">
|
|
4
10
|
{{ label() }}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Skeleton Loading - decorative placeholder for pending content. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> [lines]="3" label="Loading profile" />
|
|
7
|
+
-->
|
|
2
8
|
@if (variant() === 'text') {
|
|
3
9
|
<span
|
|
4
10
|
[id]="instanceId"
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Skip Link — https://www.w3.org/WAI/WCAG21/Techniques/general/G1 -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
<main id="main-content">Main content</main>
|
|
8
|
+
-->
|
|
2
9
|
<a class="skip-link" href="#main-content">Skip to main content</a>
|
|
3
10
|
<!-- Add id="main-content" to your <main> element -->
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Slider — https://www.w3.org/WAI/ARIA/apg/patterns/slider/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<label [id]="instanceId + '-label'">Volume</label>
|
|
3
9
|
<div #track class="track" (pointerdown)="handlePointerDown($event)" (pointermove)="handlePointerMove($event)">
|
|
4
10
|
<div class="fill" [style.width.%]="value()"></div>
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Spinbutton — https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<label [id]="instanceId + '-label'" [for]="instanceId + '-input'">Quantity</label>
|
|
3
9
|
<div class="stepper">
|
|
4
10
|
<button type="button" (click)="decrement()" aria-label="Decrease quantity">−</button>
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<!-- Semmet Angular: Spinner - use decorative=true when another element already announces loading. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> label="Loading results" />
|
|
7
|
+
<<%= selector %> [decorative]="true" />
|
|
8
|
+
-->
|
|
2
9
|
<span
|
|
3
10
|
[id]="instanceId"
|
|
4
11
|
[class]="spinnerClasses()"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Switch — https://www.w3.org/WAI/ARIA/apg/patterns/switch/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<button type="button" role="switch" [attr.aria-checked]="checked()" [id]="instanceId" (click)="toggle()">
|
|
3
9
|
Enable notifications
|
|
4
10
|
</button>
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Table — https://www.w3.org/WAI/ARIA/apg/patterns/table/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<table>
|
|
3
9
|
<caption>Quarterly results</caption>
|
|
4
10
|
<thead>
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Textarea - native <textarea> with label, hint, counter, and validation wiring. -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> label="Message" [(value)]="message" [required]="true" />
|
|
7
|
+
-->
|
|
2
8
|
<div class="semmet-field">
|
|
3
9
|
<label [for]="controlId()">
|
|
4
10
|
{{ label() }}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Toast / Notification — https://www.w3.org/TR/wai-aria-1.2/#status -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<button type="button" (click)="show()">Save</button>
|
|
3
9
|
|
|
4
10
|
@if (visible()) {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Toolbar — https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<div role="toolbar" aria-label="Text formatting">
|
|
3
9
|
@for (action of actions; track action.id; let i = $index) {
|
|
4
10
|
<button
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Tooltip — https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<button
|
|
3
9
|
type="button"
|
|
4
10
|
[attr.aria-describedby]="instanceId"
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<!-- Semmet Angular: Tree View — https://www.w3.org/WAI/ARIA/apg/patterns/treeview/ -->
|
|
2
|
+
<!--
|
|
3
|
+
Usage from a parent component template:
|
|
4
|
+
Import <%= classify(name) %> in that parent component.
|
|
5
|
+
|
|
6
|
+
<<%= selector %> />
|
|
7
|
+
-->
|
|
2
8
|
<ul role="tree" aria-label="Files">
|
|
3
9
|
@for (root of tree; track root.id) {
|
|
4
10
|
<li
|