semmet-angular 0.4.0 → 0.5.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.
Files changed (279) hide show
  1. package/README.md +43 -3
  2. package/package.json +1 -1
  3. package/src/alert/files/__name@dasherize__/__name@dasherize__.css.template +43 -0
  4. package/src/alert/files/__name@dasherize__/__name@dasherize__.html.template +7 -0
  5. package/src/alert/files/__name@dasherize__/__name@dasherize__.ts.template +18 -0
  6. package/src/alert/index.d.ts +1 -0
  7. package/src/alert/index.js +6 -0
  8. package/src/alert/index.js.map +1 -0
  9. package/src/alert/index.ts +3 -0
  10. package/src/alert/schema.d.ts +1 -0
  11. package/src/alert/schema.js +3 -0
  12. package/src/alert/schema.js.map +1 -0
  13. package/src/alert/schema.json +29 -0
  14. package/src/alert/schema.ts +1 -0
  15. package/src/alert-dialog/files/__name@dasherize__/__name@dasherize__.css.template +82 -0
  16. package/src/alert-dialog/files/__name@dasherize__/__name@dasherize__.html.template +20 -0
  17. package/src/alert-dialog/files/__name@dasherize__/__name@dasherize__.ts.template +75 -0
  18. package/src/alert-dialog/index.d.ts +1 -0
  19. package/src/alert-dialog/index.js +6 -0
  20. package/src/alert-dialog/index.js.map +1 -0
  21. package/src/alert-dialog/index.ts +3 -0
  22. package/src/alert-dialog/schema.d.ts +1 -0
  23. package/src/alert-dialog/schema.js +3 -0
  24. package/src/alert-dialog/schema.js.map +1 -0
  25. package/src/alert-dialog/schema.json +29 -0
  26. package/src/alert-dialog/schema.ts +1 -0
  27. package/src/breadcrumb/files/__name@dasherize__/__name@dasherize__.css.template +52 -0
  28. package/src/breadcrumb/files/__name@dasherize__/__name@dasherize__.html.template +9 -0
  29. package/src/breadcrumb/files/__name@dasherize__/__name@dasherize__.ts.template +20 -0
  30. package/src/breadcrumb/index.d.ts +1 -0
  31. package/src/breadcrumb/index.js +6 -0
  32. package/src/breadcrumb/index.js.map +1 -0
  33. package/src/breadcrumb/index.ts +3 -0
  34. package/src/breadcrumb/schema.d.ts +1 -0
  35. package/src/breadcrumb/schema.js +3 -0
  36. package/src/breadcrumb/schema.js.map +1 -0
  37. package/src/breadcrumb/schema.json +29 -0
  38. package/src/breadcrumb/schema.ts +1 -0
  39. package/src/card/files/__name@dasherize__/__name@dasherize__.css.template +49 -0
  40. package/src/card/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
  41. package/src/card/files/__name@dasherize__/__name@dasherize__.ts.template +13 -0
  42. package/src/card/index.d.ts +1 -0
  43. package/src/card/index.js +6 -0
  44. package/src/card/index.js.map +1 -0
  45. package/src/card/index.ts +3 -0
  46. package/src/card/schema.d.ts +1 -0
  47. package/src/card/schema.js +3 -0
  48. package/src/card/schema.js.map +1 -0
  49. package/src/card/schema.json +29 -0
  50. package/src/card/schema.ts +1 -0
  51. package/src/carousel/files/__name@dasherize__/__name@dasherize__.css.template +58 -0
  52. package/src/carousel/files/__name@dasherize__/__name@dasherize__.html.template +10 -0
  53. package/src/carousel/files/__name@dasherize__/__name@dasherize__.ts.template +35 -0
  54. package/src/carousel/index.d.ts +1 -0
  55. package/src/carousel/index.js +6 -0
  56. package/src/carousel/index.js.map +1 -0
  57. package/src/carousel/index.ts +3 -0
  58. package/src/carousel/schema.d.ts +1 -0
  59. package/src/carousel/schema.js +3 -0
  60. package/src/carousel/schema.js.map +1 -0
  61. package/src/carousel/schema.json +29 -0
  62. package/src/carousel/schema.ts +1 -0
  63. package/src/checkbox/files/__name@dasherize__/__name@dasherize__.css.template +62 -0
  64. package/src/checkbox/files/__name@dasherize__/__name@dasherize__.html.template +11 -0
  65. package/src/checkbox/files/__name@dasherize__/__name@dasherize__.ts.template +25 -0
  66. package/src/checkbox/index.d.ts +1 -0
  67. package/src/checkbox/index.js +6 -0
  68. package/src/checkbox/index.js.map +1 -0
  69. package/src/checkbox/index.ts +3 -0
  70. package/src/checkbox/schema.d.ts +1 -0
  71. package/src/checkbox/schema.js +3 -0
  72. package/src/checkbox/schema.js.map +1 -0
  73. package/src/checkbox/schema.json +29 -0
  74. package/src/checkbox/schema.ts +1 -0
  75. package/src/collection.json +115 -0
  76. package/src/combobox/files/__name@dasherize__/__name@dasherize__.css.template +75 -0
  77. package/src/combobox/files/__name@dasherize__/__name@dasherize__.html.template +33 -0
  78. package/src/combobox/files/__name@dasherize__/__name@dasherize__.ts.template +93 -0
  79. package/src/combobox/index.d.ts +1 -0
  80. package/src/combobox/index.js +6 -0
  81. package/src/combobox/index.js.map +1 -0
  82. package/src/combobox/index.ts +3 -0
  83. package/src/combobox/schema.d.ts +1 -0
  84. package/src/combobox/schema.js +3 -0
  85. package/src/combobox/schema.js.map +1 -0
  86. package/src/combobox/schema.json +29 -0
  87. package/src/combobox/schema.ts +1 -0
  88. package/src/landmarks/files/__name@dasherize__/__name@dasherize__.css.template +61 -0
  89. package/src/landmarks/files/__name@dasherize__/__name@dasherize__.html.template +17 -0
  90. package/src/landmarks/files/__name@dasherize__/__name@dasherize__.ts.template +9 -0
  91. package/src/landmarks/index.d.ts +1 -0
  92. package/src/landmarks/index.js +6 -0
  93. package/src/landmarks/index.js.map +1 -0
  94. package/src/landmarks/index.ts +3 -0
  95. package/src/landmarks/schema.d.ts +1 -0
  96. package/src/landmarks/schema.js +3 -0
  97. package/src/landmarks/schema.js.map +1 -0
  98. package/src/landmarks/schema.json +29 -0
  99. package/src/landmarks/schema.ts +1 -0
  100. package/src/listbox/files/__name@dasherize__/__name@dasherize__.css.template +52 -0
  101. package/src/listbox/files/__name@dasherize__/__name@dasherize__.html.template +20 -0
  102. package/src/listbox/files/__name@dasherize__/__name@dasherize__.ts.template +54 -0
  103. package/src/listbox/index.d.ts +1 -0
  104. package/src/listbox/index.js +6 -0
  105. package/src/listbox/index.js.map +1 -0
  106. package/src/listbox/index.ts +3 -0
  107. package/src/listbox/schema.d.ts +1 -0
  108. package/src/listbox/schema.js +3 -0
  109. package/src/listbox/schema.js.map +1 -0
  110. package/src/listbox/schema.json +29 -0
  111. package/src/listbox/schema.ts +1 -0
  112. package/src/menu-button/files/__name@dasherize__/__name@dasherize__.css.template +82 -0
  113. package/src/menu-button/files/__name@dasherize__/__name@dasherize__.html.template +34 -0
  114. package/src/menu-button/files/__name@dasherize__/__name@dasherize__.ts.template +104 -0
  115. package/src/menu-button/index.d.ts +1 -0
  116. package/src/menu-button/index.js +6 -0
  117. package/src/menu-button/index.js.map +1 -0
  118. package/src/menu-button/index.ts +3 -0
  119. package/src/menu-button/schema.d.ts +1 -0
  120. package/src/menu-button/schema.js +3 -0
  121. package/src/menu-button/schema.js.map +1 -0
  122. package/src/menu-button/schema.json +29 -0
  123. package/src/menu-button/schema.ts +1 -0
  124. package/src/meter/files/__name@dasherize__/__name@dasherize__.css.template +22 -0
  125. package/src/meter/files/__name@dasherize__/__name@dasherize__.html.template +5 -0
  126. package/src/meter/files/__name@dasherize__/__name@dasherize__.ts.template +14 -0
  127. package/src/meter/index.d.ts +1 -0
  128. package/src/meter/index.js +6 -0
  129. package/src/meter/index.js.map +1 -0
  130. package/src/meter/index.ts +3 -0
  131. package/src/meter/schema.d.ts +1 -0
  132. package/src/meter/schema.js +3 -0
  133. package/src/meter/schema.js.map +1 -0
  134. package/src/meter/schema.json +29 -0
  135. package/src/meter/schema.ts +1 -0
  136. package/src/navigation-menu/files/__name@dasherize__/__name@dasherize__.css.template +88 -0
  137. package/src/navigation-menu/files/__name@dasherize__/__name@dasherize__.html.template +22 -0
  138. package/src/navigation-menu/files/__name@dasherize__/__name@dasherize__.ts.template +18 -0
  139. package/src/navigation-menu/index.d.ts +1 -0
  140. package/src/navigation-menu/index.js +6 -0
  141. package/src/navigation-menu/index.js.map +1 -0
  142. package/src/navigation-menu/index.ts +3 -0
  143. package/src/navigation-menu/schema.d.ts +1 -0
  144. package/src/navigation-menu/schema.js +3 -0
  145. package/src/navigation-menu/schema.js.map +1 -0
  146. package/src/navigation-menu/schema.json +29 -0
  147. package/src/navigation-menu/schema.ts +1 -0
  148. package/src/pagination/files/__name@dasherize__/__name@dasherize__.css.template +63 -0
  149. package/src/pagination/files/__name@dasherize__/__name@dasherize__.html.template +26 -0
  150. package/src/pagination/files/__name@dasherize__/__name@dasherize__.ts.template +31 -0
  151. package/src/pagination/index.d.ts +1 -0
  152. package/src/pagination/index.js +6 -0
  153. package/src/pagination/index.js.map +1 -0
  154. package/src/pagination/index.ts +3 -0
  155. package/src/pagination/schema.d.ts +1 -0
  156. package/src/pagination/schema.js +3 -0
  157. package/src/pagination/schema.js.map +1 -0
  158. package/src/pagination/schema.json +29 -0
  159. package/src/pagination/schema.ts +1 -0
  160. package/src/progress-bar/files/__name@dasherize__/__name@dasherize__.css.template +53 -0
  161. package/src/progress-bar/files/__name@dasherize__/__name@dasherize__.html.template +6 -0
  162. package/src/progress-bar/files/__name@dasherize__/__name@dasherize__.ts.template +19 -0
  163. package/src/progress-bar/index.d.ts +1 -0
  164. package/src/progress-bar/index.js +6 -0
  165. package/src/progress-bar/index.js.map +1 -0
  166. package/src/progress-bar/index.ts +3 -0
  167. package/src/progress-bar/schema.d.ts +1 -0
  168. package/src/progress-bar/schema.js +3 -0
  169. package/src/progress-bar/schema.js.map +1 -0
  170. package/src/progress-bar/schema.json +29 -0
  171. package/src/progress-bar/schema.ts +1 -0
  172. package/src/radio-group/files/__name@dasherize__/__name@dasherize__.css.template +66 -0
  173. package/src/radio-group/files/__name@dasherize__/__name@dasherize__.html.template +16 -0
  174. package/src/radio-group/files/__name@dasherize__/__name@dasherize__.ts.template +62 -0
  175. package/src/radio-group/index.d.ts +1 -0
  176. package/src/radio-group/index.js +6 -0
  177. package/src/radio-group/index.js.map +1 -0
  178. package/src/radio-group/index.ts +3 -0
  179. package/src/radio-group/schema.d.ts +1 -0
  180. package/src/radio-group/schema.js +3 -0
  181. package/src/radio-group/schema.js.map +1 -0
  182. package/src/radio-group/schema.json +29 -0
  183. package/src/radio-group/schema.ts +1 -0
  184. package/src/skip-link/files/__name@dasherize__/__name@dasherize__.css.template +30 -0
  185. package/src/skip-link/files/__name@dasherize__/__name@dasherize__.html.template +3 -0
  186. package/src/skip-link/files/__name@dasherize__/__name@dasherize__.ts.template +9 -0
  187. package/src/skip-link/index.d.ts +1 -0
  188. package/src/skip-link/index.js +6 -0
  189. package/src/skip-link/index.js.map +1 -0
  190. package/src/skip-link/index.ts +3 -0
  191. package/src/skip-link/schema.d.ts +1 -0
  192. package/src/skip-link/schema.js +3 -0
  193. package/src/skip-link/schema.js.map +1 -0
  194. package/src/skip-link/schema.json +29 -0
  195. package/src/skip-link/schema.ts +1 -0
  196. package/src/slider/files/__name@dasherize__/__name@dasherize__.css.template +54 -0
  197. package/src/slider/files/__name@dasherize__/__name@dasherize__.html.template +16 -0
  198. package/src/slider/files/__name@dasherize__/__name@dasherize__.ts.template +79 -0
  199. package/src/slider/index.d.ts +1 -0
  200. package/src/slider/index.js +6 -0
  201. package/src/slider/index.js.map +1 -0
  202. package/src/slider/index.ts +3 -0
  203. package/src/slider/schema.d.ts +1 -0
  204. package/src/slider/schema.js +3 -0
  205. package/src/slider/schema.js.map +1 -0
  206. package/src/slider/schema.json +29 -0
  207. package/src/slider/schema.ts +1 -0
  208. package/src/spinbutton/files/__name@dasherize__/__name@dasherize__.css.template +64 -0
  209. package/src/spinbutton/files/__name@dasherize__/__name@dasherize__.html.template +19 -0
  210. package/src/spinbutton/files/__name@dasherize__/__name@dasherize__.ts.template +59 -0
  211. package/src/spinbutton/index.d.ts +1 -0
  212. package/src/spinbutton/index.js +6 -0
  213. package/src/spinbutton/index.js.map +1 -0
  214. package/src/spinbutton/index.ts +3 -0
  215. package/src/spinbutton/schema.d.ts +1 -0
  216. package/src/spinbutton/schema.js +3 -0
  217. package/src/spinbutton/schema.js.map +1 -0
  218. package/src/spinbutton/schema.json +29 -0
  219. package/src/spinbutton/schema.ts +1 -0
  220. package/src/switch/files/__name@dasherize__/__name@dasherize__.css.template +68 -0
  221. package/src/switch/files/__name@dasherize__/__name@dasherize__.html.template +4 -0
  222. package/src/switch/files/__name@dasherize__/__name@dasherize__.ts.template +18 -0
  223. package/src/switch/index.d.ts +1 -0
  224. package/src/switch/index.js +6 -0
  225. package/src/switch/index.js.map +1 -0
  226. package/src/switch/index.ts +3 -0
  227. package/src/switch/schema.d.ts +1 -0
  228. package/src/switch/schema.js +3 -0
  229. package/src/switch/schema.js.map +1 -0
  230. package/src/switch/schema.json +29 -0
  231. package/src/switch/schema.ts +1 -0
  232. package/src/table/files/__name@dasherize__/__name@dasherize__.css.template +40 -0
  233. package/src/table/files/__name@dasherize__/__name@dasherize__.html.template +18 -0
  234. package/src/table/files/__name@dasherize__/__name@dasherize__.ts.template +19 -0
  235. package/src/table/index.d.ts +1 -0
  236. package/src/table/index.js +6 -0
  237. package/src/table/index.js.map +1 -0
  238. package/src/table/index.ts +3 -0
  239. package/src/table/schema.d.ts +1 -0
  240. package/src/table/schema.js +3 -0
  241. package/src/table/schema.js.map +1 -0
  242. package/src/table/schema.json +29 -0
  243. package/src/table/schema.ts +1 -0
  244. package/src/toast/files/__name@dasherize__/__name@dasherize__.css.template +56 -0
  245. package/src/toast/files/__name@dasherize__/__name@dasherize__.html.template +9 -0
  246. package/src/toast/files/__name@dasherize__/__name@dasherize__.ts.template +33 -0
  247. package/src/toast/index.d.ts +1 -0
  248. package/src/toast/index.js +6 -0
  249. package/src/toast/index.js.map +1 -0
  250. package/src/toast/index.ts +3 -0
  251. package/src/toast/schema.d.ts +1 -0
  252. package/src/toast/schema.js +3 -0
  253. package/src/toast/schema.js.map +1 -0
  254. package/src/toast/schema.json +29 -0
  255. package/src/toast/schema.ts +1 -0
  256. package/src/toolbar/files/__name@dasherize__/__name@dasherize__.css.template +48 -0
  257. package/src/toolbar/files/__name@dasherize__/__name@dasherize__.html.template +15 -0
  258. package/src/toolbar/files/__name@dasherize__/__name@dasherize__.ts.template +71 -0
  259. package/src/toolbar/index.d.ts +1 -0
  260. package/src/toolbar/index.js +6 -0
  261. package/src/toolbar/index.js.map +1 -0
  262. package/src/toolbar/index.ts +3 -0
  263. package/src/toolbar/schema.d.ts +1 -0
  264. package/src/toolbar/schema.js +3 -0
  265. package/src/toolbar/schema.js.map +1 -0
  266. package/src/toolbar/schema.json +29 -0
  267. package/src/toolbar/schema.ts +1 -0
  268. package/src/tree-view/files/__name@dasherize__/__name@dasherize__.css.template +57 -0
  269. package/src/tree-view/files/__name@dasherize__/__name@dasherize__.html.template +30 -0
  270. package/src/tree-view/files/__name@dasherize__/__name@dasherize__.ts.template +140 -0
  271. package/src/tree-view/index.d.ts +1 -0
  272. package/src/tree-view/index.js +6 -0
  273. package/src/tree-view/index.js.map +1 -0
  274. package/src/tree-view/index.ts +3 -0
  275. package/src/tree-view/schema.d.ts +1 -0
  276. package/src/tree-view/schema.js +3 -0
  277. package/src/tree-view/schema.js.map +1 -0
  278. package/src/tree-view/schema.json +29 -0
  279. package/src/tree-view/schema.ts +1 -0
@@ -0,0 +1,49 @@
1
+ :host {
2
+ --semmet-color-primary: #0d7a72;
3
+ --semmet-color-surface: #ffffff;
4
+ --semmet-color-outline: #d7dedd;
5
+ --semmet-color-on-surface: #1b201f;
6
+ --semmet-color-on-surface-variant: #576260;
7
+ --semmet-radius-md: 12px;
8
+ --semmet-elevation-1: 0 1px 2px rgba(20, 24, 23, 0.1), 0 1px 1px rgba(20, 24, 23, 0.06);
9
+
10
+ display: block;
11
+ font-family: Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif;
12
+ font-size: 0.9375rem;
13
+ }
14
+
15
+ article {
16
+ padding: 1.25rem;
17
+ background: var(--semmet-color-surface);
18
+ border: 1px solid var(--semmet-color-outline);
19
+ border-radius: var(--semmet-radius-md);
20
+ box-shadow: var(--semmet-elevation-1);
21
+ }
22
+
23
+ h3 {
24
+ margin: 0 0 0.5rem;
25
+ font-size: 1.0625rem;
26
+ font-weight: 500;
27
+ color: var(--semmet-color-on-surface);
28
+ }
29
+
30
+ p {
31
+ margin: 0 0 1rem;
32
+ color: var(--semmet-color-on-surface-variant);
33
+ }
34
+
35
+ a {
36
+ color: var(--semmet-color-primary);
37
+ font-weight: 500;
38
+ text-decoration: none;
39
+ border-radius: 4px;
40
+ }
41
+
42
+ a:hover {
43
+ text-decoration: underline;
44
+ }
45
+
46
+ a:focus-visible {
47
+ outline: 2px solid var(--semmet-color-primary);
48
+ outline-offset: 2px;
49
+ }
@@ -0,0 +1,6 @@
1
+ <!-- Semmet Angular: Card — https://www.w3.org/WAI/tutorials/page-structure/headings/ -->
2
+ <article [attr.aria-labelledby]="instanceId + '-title'">
3
+ <h3 [id]="instanceId + '-title'">Card title</h3>
4
+ <p>Card description text.</p>
5
+ <a href="#">Learn more</a>
6
+ </article>
@@ -0,0 +1,13 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ let nextId = 0;
4
+
5
+ @Component({
6
+ selector: '<%= selector %>',
7
+ imports: [],
8
+ templateUrl: './<%= dasherize(name) %>.html',
9
+ styleUrl: './<%= dasherize(name) %>.css',
10
+ })
11
+ export class <%= classify(name) %> {
12
+ protected readonly instanceId = `<%= dasherize(name) %>-${nextId++}`;
13
+ }
@@ -0,0 +1 @@
1
+ export declare const card: (options: import("./schema").Schema) => import("@angular-devkit/schematics").Rule;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.card = void 0;
4
+ const generate_component_1 = require("../utils/generate-component");
5
+ exports.card = (0, generate_component_1.createAriaComponentSchematic)();
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,oEAA2E;AAE9D,QAAA,IAAI,GAAG,IAAA,iDAA4B,GAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createAriaComponentSchematic } from '../utils/generate-component';
2
+
3
+ export const card = createAriaComponentSchematic();
@@ -0,0 +1 @@
1
+ export { ComponentSchematicOptions as Schema } from '../utils/schema-types';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "SemmetAngularCard",
4
+ "title": "Semmet Angular Card Options Schema",
5
+ "type": "object",
6
+ "description": "Generates a standalone Angular Card component (semantic article + heading structure).",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "name": {
10
+ "type": "string",
11
+ "description": "The name for the new component. Used to derive the class name, selector, and file names.",
12
+ "$default": { "$source": "argv", "index": 0 },
13
+ "x-prompt": "What name would you like to use for the card component?"
14
+ },
15
+ "path": {
16
+ "type": "string",
17
+ "format": "path",
18
+ "$default": { "$source": "workingDirectory" },
19
+ "description": "The path where the component files should be created, relative to the workspace root. Defaults to the project's source root.",
20
+ "visible": false
21
+ },
22
+ "project": {
23
+ "type": "string",
24
+ "description": "The name of the project to add the component to.",
25
+ "$default": { "$source": "projectName" }
26
+ }
27
+ },
28
+ "required": ["name", "project"]
29
+ }
@@ -0,0 +1 @@
1
+ export { ComponentSchematicOptions as Schema } from '../utils/schema-types';
@@ -0,0 +1,58 @@
1
+ :host {
2
+ --semmet-color-primary: #0d7a72;
3
+ --semmet-color-on-primary: #ffffff;
4
+ --semmet-color-surface: #ffffff;
5
+ --semmet-color-outline: #d7dedd;
6
+ --semmet-color-on-surface: #1b201f;
7
+ --semmet-radius-md: 12px;
8
+ --semmet-elevation-1: 0 1px 2px rgba(20, 24, 23, 0.1), 0 1px 1px rgba(20, 24, 23, 0.06);
9
+ --semmet-motion: 160ms cubic-bezier(0.2, 0, 0, 1);
10
+
11
+ display: block;
12
+ font-family: Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif;
13
+ font-size: 0.9375rem;
14
+ }
15
+
16
+ section {
17
+ position: relative;
18
+ display: flex;
19
+ align-items: center;
20
+ gap: 0.75rem;
21
+ }
22
+
23
+ [aria-live] {
24
+ flex: 1;
25
+ min-height: 8rem;
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ padding: 1.5rem;
30
+ color: var(--semmet-color-on-surface);
31
+ background: var(--semmet-color-surface);
32
+ border: 1px solid var(--semmet-color-outline);
33
+ border-radius: var(--semmet-radius-md);
34
+ box-shadow: var(--semmet-elevation-1);
35
+ text-align: center;
36
+ }
37
+
38
+ button {
39
+ flex-shrink: 0;
40
+ width: 2.25rem;
41
+ height: 2.25rem;
42
+ font-size: 1.25rem;
43
+ color: var(--semmet-color-on-primary);
44
+ background: var(--semmet-color-primary);
45
+ border: none;
46
+ border-radius: 50%;
47
+ cursor: pointer;
48
+ transition: background-color var(--semmet-motion);
49
+ }
50
+
51
+ button:hover {
52
+ background: color-mix(in srgb, var(--semmet-color-primary) 88%, black);
53
+ }
54
+
55
+ button:focus-visible {
56
+ outline: 2px solid var(--semmet-color-primary);
57
+ outline-offset: 2px;
58
+ }
@@ -0,0 +1,10 @@
1
+ <!-- Semmet Angular: Carousel — https://www.w3.org/WAI/ARIA/apg/patterns/carousel/ -->
2
+ <section aria-roledescription="carousel" aria-label="Featured items">
3
+ <div aria-live="polite">
4
+ <div aria-roledescription="slide" [attr.aria-label]="slideLabel()">
5
+ {{ activeSlide().content }}
6
+ </div>
7
+ </div>
8
+ <button type="button" (click)="previous()" aria-label="Previous slide">‹</button>
9
+ <button type="button" (click)="next()" aria-label="Next slide">›</button>
10
+ </section>
@@ -0,0 +1,35 @@
1
+ import { Component, computed, signal } from '@angular/core';
2
+
3
+ interface <%= classify(name) %>Slide {
4
+ id: number;
5
+ content: string;
6
+ }
7
+
8
+ let nextId = 0;
9
+
10
+ @Component({
11
+ selector: '<%= selector %>',
12
+ imports: [],
13
+ templateUrl: './<%= dasherize(name) %>.html',
14
+ styleUrl: './<%= dasherize(name) %>.css',
15
+ })
16
+ export class <%= classify(name) %> {
17
+ protected readonly instanceId = `<%= dasherize(name) %>-${nextId++}`;
18
+ protected readonly slides: <%= classify(name) %>Slide[] = [
19
+ { id: 1, content: 'First slide content' },
20
+ { id: 2, content: 'Second slide content' },
21
+ ];
22
+
23
+ protected readonly activeIndex = signal(0);
24
+
25
+ protected readonly activeSlide = computed(() => this.slides[this.activeIndex()]);
26
+ protected readonly slideLabel = computed(() => `${this.activeIndex() + 1} of ${this.slides.length}`);
27
+
28
+ protected previous(): void {
29
+ this.activeIndex.update((index) => (index - 1 + this.slides.length) % this.slides.length);
30
+ }
31
+
32
+ protected next(): void {
33
+ this.activeIndex.update((index) => (index + 1) % this.slides.length);
34
+ }
35
+ }
@@ -0,0 +1 @@
1
+ export declare const carousel: (options: import("./schema").Schema) => import("@angular-devkit/schematics").Rule;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.carousel = void 0;
4
+ const generate_component_1 = require("../utils/generate-component");
5
+ exports.carousel = (0, generate_component_1.createAriaComponentSchematic)();
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,oEAA2E;AAE9D,QAAA,QAAQ,GAAG,IAAA,iDAA4B,GAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createAriaComponentSchematic } from '../utils/generate-component';
2
+
3
+ export const carousel = createAriaComponentSchematic();
@@ -0,0 +1 @@
1
+ export { ComponentSchematicOptions as Schema } from '../utils/schema-types';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "SemmetAngularCarousel",
4
+ "title": "Semmet Angular Carousel Options Schema",
5
+ "type": "object",
6
+ "description": "Generates a standalone Angular Carousel component (signal-based slide state) following the W3C ARIA Authoring Practices Guide.",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "name": {
10
+ "type": "string",
11
+ "description": "The name for the new component. Used to derive the class name, selector, and file names.",
12
+ "$default": { "$source": "argv", "index": 0 },
13
+ "x-prompt": "What name would you like to use for the carousel component?"
14
+ },
15
+ "path": {
16
+ "type": "string",
17
+ "format": "path",
18
+ "$default": { "$source": "workingDirectory" },
19
+ "description": "The path where the component files should be created, relative to the workspace root. Defaults to the project's source root.",
20
+ "visible": false
21
+ },
22
+ "project": {
23
+ "type": "string",
24
+ "description": "The name of the project to add the component to.",
25
+ "$default": { "$source": "projectName" }
26
+ }
27
+ },
28
+ "required": ["name", "project"]
29
+ }
@@ -0,0 +1 @@
1
+ export { ComponentSchematicOptions as Schema } from '../utils/schema-types';
@@ -0,0 +1,62 @@
1
+ :host {
2
+ --semmet-color-primary: #0d7a72;
3
+ --semmet-color-on-primary: #ffffff;
4
+ --semmet-color-outline: #8a9793;
5
+ --semmet-color-on-surface: #1b201f;
6
+ --semmet-motion: 160ms cubic-bezier(0.2, 0, 0, 1);
7
+
8
+ display: inline-block;
9
+ font-family: Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif;
10
+ font-size: 0.9375rem;
11
+ }
12
+
13
+ [role='checkbox'] {
14
+ position: relative;
15
+ display: inline-flex;
16
+ align-items: center;
17
+ padding-left: 1.625rem;
18
+ min-height: 1.125rem;
19
+ color: var(--semmet-color-on-surface);
20
+ cursor: pointer;
21
+ user-select: none;
22
+ }
23
+
24
+ [role='checkbox']::before {
25
+ content: '';
26
+ position: absolute;
27
+ left: 0;
28
+ width: 1.125rem;
29
+ height: 1.125rem;
30
+ box-sizing: border-box;
31
+ border: 2px solid var(--semmet-color-outline);
32
+ border-radius: 4px;
33
+ background: transparent;
34
+ transition: background-color var(--semmet-motion), border-color var(--semmet-motion);
35
+ }
36
+
37
+ [role='checkbox'][aria-checked='true']::before {
38
+ background: var(--semmet-color-primary);
39
+ border-color: var(--semmet-color-primary);
40
+ }
41
+
42
+ [role='checkbox']::after {
43
+ content: '';
44
+ position: absolute;
45
+ left: 0.3rem;
46
+ top: 0.1rem;
47
+ width: 0.4rem;
48
+ height: 0.65rem;
49
+ border-right: 2px solid transparent;
50
+ border-bottom: 2px solid transparent;
51
+ transform: rotate(45deg);
52
+ }
53
+
54
+ [role='checkbox'][aria-checked='true']::after {
55
+ border-color: var(--semmet-color-on-primary);
56
+ }
57
+
58
+ [role='checkbox']:focus-visible {
59
+ outline: 2px solid var(--semmet-color-primary);
60
+ outline-offset: 2px;
61
+ border-radius: 4px;
62
+ }
@@ -0,0 +1,11 @@
1
+ <!-- Semmet Angular: Checkbox — https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/ -->
2
+ <div
3
+ role="checkbox"
4
+ [attr.aria-checked]="checked()"
5
+ tabindex="0"
6
+ [id]="instanceId"
7
+ (click)="toggle()"
8
+ (keydown)="handleKeydown($event)"
9
+ >
10
+ Subscribe to newsletter
11
+ </div>
@@ -0,0 +1,25 @@
1
+ import { Component, signal } from '@angular/core';
2
+
3
+ let nextId = 0;
4
+
5
+ @Component({
6
+ selector: '<%= selector %>',
7
+ imports: [],
8
+ templateUrl: './<%= dasherize(name) %>.html',
9
+ styleUrl: './<%= dasherize(name) %>.css',
10
+ })
11
+ export class <%= classify(name) %> {
12
+ protected readonly instanceId = `<%= dasherize(name) %>-${nextId++}`;
13
+ protected readonly checked = signal(false);
14
+
15
+ protected toggle(): void {
16
+ this.checked.update((value) => !value);
17
+ }
18
+
19
+ protected handleKeydown(event: KeyboardEvent): void {
20
+ if (event.key === ' ' || event.key === 'Enter') {
21
+ event.preventDefault();
22
+ this.toggle();
23
+ }
24
+ }
25
+ }
@@ -0,0 +1 @@
1
+ export declare const checkbox: (options: import("./schema").Schema) => import("@angular-devkit/schematics").Rule;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkbox = void 0;
4
+ const generate_component_1 = require("../utils/generate-component");
5
+ exports.checkbox = (0, generate_component_1.createAriaComponentSchematic)();
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,oEAA2E;AAE9D,QAAA,QAAQ,GAAG,IAAA,iDAA4B,GAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createAriaComponentSchematic } from '../utils/generate-component';
2
+
3
+ export const checkbox = createAriaComponentSchematic();
@@ -0,0 +1 @@
1
+ export { ComponentSchematicOptions as Schema } from '../utils/schema-types';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "SemmetAngularCheckbox",
4
+ "title": "Semmet Angular Checkbox Options Schema",
5
+ "type": "object",
6
+ "description": "Generates a standalone Angular Checkbox component (custom widget, signal-based state) following the W3C ARIA Authoring Practices Guide.",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "name": {
10
+ "type": "string",
11
+ "description": "The name for the new component. Used to derive the class name, selector, and file names.",
12
+ "$default": { "$source": "argv", "index": 0 },
13
+ "x-prompt": "What name would you like to use for the checkbox component?"
14
+ },
15
+ "path": {
16
+ "type": "string",
17
+ "format": "path",
18
+ "$default": { "$source": "workingDirectory" },
19
+ "description": "The path where the component files should be created, relative to the workspace root. Defaults to the project's source root.",
20
+ "visible": false
21
+ },
22
+ "project": {
23
+ "type": "string",
24
+ "description": "The name of the project to add the component to.",
25
+ "$default": { "$source": "projectName" }
26
+ }
27
+ },
28
+ "required": ["name", "project"]
29
+ }
@@ -0,0 +1 @@
1
+ export { ComponentSchematicOptions as Schema } from '../utils/schema-types';
@@ -16,6 +16,11 @@
16
16
  "factory": "./dialog/index#dialog",
17
17
  "schema": "./dialog/schema.json"
18
18
  },
19
+ "alert-dialog": {
20
+ "description": "Generates a standalone Angular Alert Dialog component following the W3C ARIA Authoring Practices Guide.",
21
+ "factory": "./alert-dialog/index#alertDialog",
22
+ "schema": "./alert-dialog/schema.json"
23
+ },
19
24
  "disclosure": {
20
25
  "description": "Generates a standalone Angular Disclosure component following the W3C ARIA Authoring Practices Guide.",
21
26
  "factory": "./disclosure/index#disclosure",
@@ -25,6 +30,116 @@
25
30
  "description": "Generates a standalone Angular Tooltip component following the W3C ARIA Authoring Practices Guide.",
26
31
  "factory": "./tooltip/index#tooltip",
27
32
  "schema": "./tooltip/schema.json"
33
+ },
34
+ "menu-button": {
35
+ "description": "Generates a standalone Angular Menu Button (dropdown) component following the W3C ARIA Authoring Practices Guide.",
36
+ "factory": "./menu-button/index#menuButton",
37
+ "schema": "./menu-button/schema.json"
38
+ },
39
+ "combobox": {
40
+ "description": "Generates a standalone Angular Combobox component following the W3C ARIA Authoring Practices Guide.",
41
+ "factory": "./combobox/index#combobox",
42
+ "schema": "./combobox/schema.json"
43
+ },
44
+ "breadcrumb": {
45
+ "description": "Generates a standalone Angular Breadcrumb component following the W3C ARIA Authoring Practices Guide.",
46
+ "factory": "./breadcrumb/index#breadcrumb",
47
+ "schema": "./breadcrumb/schema.json"
48
+ },
49
+ "navigation-menu": {
50
+ "description": "Generates a standalone Angular disclosure-style navigation menu component following the W3C ARIA Authoring Practices Guide.",
51
+ "factory": "./navigation-menu/index#navigationMenu",
52
+ "schema": "./navigation-menu/schema.json"
53
+ },
54
+ "pagination": {
55
+ "description": "Generates a standalone Angular Pagination component with working page state.",
56
+ "factory": "./pagination/index#pagination",
57
+ "schema": "./pagination/schema.json"
58
+ },
59
+ "skip-link": {
60
+ "description": "Generates a standalone Angular Skip Link component per WCAG Technique G1.",
61
+ "factory": "./skip-link/index#skipLink",
62
+ "schema": "./skip-link/schema.json"
63
+ },
64
+ "landmarks": {
65
+ "description": "Generates a standalone Angular page-skeleton layout component with landmark regions and content projection.",
66
+ "factory": "./landmarks/index#landmarks",
67
+ "schema": "./landmarks/schema.json"
68
+ },
69
+ "tree-view": {
70
+ "description": "Generates a standalone Angular Tree View component following the W3C ARIA Authoring Practices Guide.",
71
+ "factory": "./tree-view/index#treeView",
72
+ "schema": "./tree-view/schema.json"
73
+ },
74
+ "toolbar": {
75
+ "description": "Generates a standalone Angular Toolbar component following the W3C ARIA Authoring Practices Guide.",
76
+ "factory": "./toolbar/index#toolbar",
77
+ "schema": "./toolbar/schema.json"
78
+ },
79
+ "card": {
80
+ "description": "Generates a standalone Angular Card component (semantic article + heading structure).",
81
+ "factory": "./card/index#card",
82
+ "schema": "./card/schema.json"
83
+ },
84
+ "table": {
85
+ "description": "Generates a standalone Angular accessible data table component following the W3C ARIA Authoring Practices Guide.",
86
+ "factory": "./table/index#table",
87
+ "schema": "./table/schema.json"
88
+ },
89
+ "checkbox": {
90
+ "description": "Generates a standalone Angular Checkbox component following the W3C ARIA Authoring Practices Guide.",
91
+ "factory": "./checkbox/index#checkbox",
92
+ "schema": "./checkbox/schema.json"
93
+ },
94
+ "radio-group": {
95
+ "description": "Generates a standalone Angular Radio Group component following the W3C ARIA Authoring Practices Guide.",
96
+ "factory": "./radio-group/index#radioGroup",
97
+ "schema": "./radio-group/schema.json"
98
+ },
99
+ "switch": {
100
+ "description": "Generates a standalone Angular Switch component following the W3C ARIA Authoring Practices Guide.",
101
+ "factory": "./switch/index#switchSchematic",
102
+ "schema": "./switch/schema.json"
103
+ },
104
+ "listbox": {
105
+ "description": "Generates a standalone Angular Listbox component following the W3C ARIA Authoring Practices Guide.",
106
+ "factory": "./listbox/index#listbox",
107
+ "schema": "./listbox/schema.json"
108
+ },
109
+ "slider": {
110
+ "description": "Generates a standalone Angular Slider component following the W3C ARIA Authoring Practices Guide.",
111
+ "factory": "./slider/index#slider",
112
+ "schema": "./slider/schema.json"
113
+ },
114
+ "spinbutton": {
115
+ "description": "Generates a standalone Angular Spinbutton component following the W3C ARIA Authoring Practices Guide.",
116
+ "factory": "./spinbutton/index#spinbutton",
117
+ "schema": "./spinbutton/schema.json"
118
+ },
119
+ "meter": {
120
+ "description": "Generates a standalone Angular Meter component (native <meter> gauge).",
121
+ "factory": "./meter/index#meter",
122
+ "schema": "./meter/schema.json"
123
+ },
124
+ "progress-bar": {
125
+ "description": "Generates a standalone Angular Progress Bar component (native <progress>).",
126
+ "factory": "./progress-bar/index#progressBar",
127
+ "schema": "./progress-bar/schema.json"
128
+ },
129
+ "alert": {
130
+ "description": "Generates a standalone Angular Alert component following the W3C ARIA Authoring Practices Guide.",
131
+ "factory": "./alert/index#alert",
132
+ "schema": "./alert/schema.json"
133
+ },
134
+ "toast": {
135
+ "description": "Generates a standalone Angular Toast/Notification component.",
136
+ "factory": "./toast/index#toast",
137
+ "schema": "./toast/schema.json"
138
+ },
139
+ "carousel": {
140
+ "description": "Generates a standalone Angular Carousel component following the W3C ARIA Authoring Practices Guide.",
141
+ "factory": "./carousel/index#carousel",
142
+ "schema": "./carousel/schema.json"
28
143
  }
29
144
  }
30
145
  }