ngwr 9.1.0 → 10.1.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 (276) hide show
  1. package/README.md +23 -8
  2. package/action-sheet/styles/_index.scss +6 -1
  3. package/badge/styles/_index.scss +17 -7
  4. package/badge/styles/_tag.scss +12 -3
  5. package/border-glow/styles/_index.scss +5 -0
  6. package/button/styles/_index.scss +48 -1
  7. package/calendar/styles/_index.scss +9 -1
  8. package/circular-text/styles/_index.scss +6 -1
  9. package/density/styles/_index.scss +3 -1
  10. package/dialog/styles/_index.scss +66 -2
  11. package/drag-drop/styles/_index.scss +20 -7
  12. package/drawer/styles/_index.scss +61 -1
  13. package/event-calendar/styles/_index.scss +284 -0
  14. package/falling-text/styles/_index.scss +5 -0
  15. package/fesm2022/ngwr-action-sheet.mjs +1 -1
  16. package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
  17. package/fesm2022/ngwr-alert.mjs +8 -3
  18. package/fesm2022/ngwr-alert.mjs.map +1 -1
  19. package/fesm2022/ngwr-back-top.mjs +6 -4
  20. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  21. package/fesm2022/ngwr-border-glow.mjs +12 -9
  22. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  23. package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
  24. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  25. package/fesm2022/ngwr-calendar.mjs +5 -3
  26. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  27. package/fesm2022/ngwr-card.mjs +2 -2
  28. package/fesm2022/ngwr-card.mjs.map +1 -1
  29. package/fesm2022/ngwr-carousel.mjs +17 -4
  30. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  31. package/fesm2022/ngwr-cascader.mjs +35 -7
  32. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  33. package/fesm2022/ngwr-checkbox.mjs +12 -3
  34. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  35. package/fesm2022/ngwr-circular-text.mjs +2 -2
  36. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  37. package/fesm2022/ngwr-color-picker.mjs +6 -5
  38. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  39. package/fesm2022/ngwr-command-palette.mjs +7 -3
  40. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  41. package/fesm2022/ngwr-context-menu.mjs +7 -7
  42. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  43. package/fesm2022/ngwr-counter.mjs +9 -1
  44. package/fesm2022/ngwr-counter.mjs.map +1 -1
  45. package/fesm2022/ngwr-date-picker.mjs +37 -15
  46. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  47. package/fesm2022/ngwr-density.mjs +10 -2
  48. package/fesm2022/ngwr-density.mjs.map +1 -1
  49. package/fesm2022/ngwr-descriptions.mjs +5 -4
  50. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  51. package/fesm2022/ngwr-dialog.mjs +10 -1
  52. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  53. package/fesm2022/ngwr-drag-drop.mjs +2 -2
  54. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  55. package/fesm2022/ngwr-drawer.mjs +37 -16
  56. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  57. package/fesm2022/ngwr-dropdown.mjs +8 -3
  58. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  59. package/fesm2022/ngwr-event-calendar.mjs +723 -0
  60. package/fesm2022/ngwr-event-calendar.mjs.map +1 -0
  61. package/fesm2022/ngwr-falling-text.mjs +2 -2
  62. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  63. package/fesm2022/ngwr-file-upload.mjs +2 -2
  64. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  65. package/fesm2022/ngwr-form.mjs +258 -42
  66. package/fesm2022/ngwr-form.mjs.map +1 -1
  67. package/fesm2022/ngwr-fuzzy-text.mjs +15 -1
  68. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  69. package/fesm2022/ngwr-gauge.mjs +8 -3
  70. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  71. package/fesm2022/ngwr-glitch-text.mjs +2 -2
  72. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  73. package/fesm2022/ngwr-gradient-text.mjs +2 -2
  74. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  75. package/fesm2022/ngwr-i18n-en.mjs +89 -5
  76. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  77. package/fesm2022/ngwr-i18n-ru.mjs +90 -5
  78. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  79. package/fesm2022/ngwr-i18n.mjs +94 -3
  80. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  81. package/fesm2022/ngwr-icon.mjs +79 -35
  82. package/fesm2022/ngwr-icon.mjs.map +1 -1
  83. package/fesm2022/ngwr-input-number.mjs +19 -3
  84. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  85. package/fesm2022/ngwr-input.mjs +48 -6
  86. package/fesm2022/ngwr-input.mjs.map +1 -1
  87. package/fesm2022/ngwr-knob.mjs +8 -3
  88. package/fesm2022/ngwr-knob.mjs.map +1 -1
  89. package/fesm2022/ngwr-lightbox.mjs +32 -3
  90. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  91. package/fesm2022/ngwr-line-chart.mjs +3 -3
  92. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  93. package/fesm2022/ngwr-list.mjs +2 -2
  94. package/fesm2022/ngwr-list.mjs.map +1 -1
  95. package/fesm2022/ngwr-loading-bar.mjs +2 -2
  96. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  97. package/fesm2022/ngwr-marquee.mjs +2 -2
  98. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  99. package/fesm2022/ngwr-media.mjs +3 -0
  100. package/fesm2022/ngwr-media.mjs.map +1 -1
  101. package/fesm2022/ngwr-mention.mjs +166 -10
  102. package/fesm2022/ngwr-mention.mjs.map +1 -1
  103. package/fesm2022/ngwr-meter-group.mjs +14 -3
  104. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  105. package/fesm2022/ngwr-overlay.mjs +173 -3
  106. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  107. package/fesm2022/ngwr-page-header.mjs +2 -2
  108. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  109. package/fesm2022/ngwr-pagination.mjs +17 -4
  110. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  111. package/fesm2022/ngwr-popconfirm.mjs +4 -3
  112. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  113. package/fesm2022/ngwr-popover.mjs +10 -3
  114. package/fesm2022/ngwr-popover.mjs.map +1 -1
  115. package/fesm2022/ngwr-progress.mjs +8 -2
  116. package/fesm2022/ngwr-progress.mjs.map +1 -1
  117. package/fesm2022/ngwr-qr.mjs.map +1 -1
  118. package/fesm2022/ngwr-rating.mjs +6 -4
  119. package/fesm2022/ngwr-rating.mjs.map +1 -1
  120. package/fesm2022/ngwr-result.mjs +19 -12
  121. package/fesm2022/ngwr-result.mjs.map +1 -1
  122. package/fesm2022/ngwr-segmented.mjs +2 -2
  123. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  124. package/fesm2022/ngwr-select.mjs +40 -13
  125. package/fesm2022/ngwr-select.mjs.map +1 -1
  126. package/fesm2022/ngwr-shiny-text.mjs +4 -6
  127. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  128. package/fesm2022/ngwr-speed-dial.mjs +11 -3
  129. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  130. package/fesm2022/ngwr-spotlight-card.mjs +2 -2
  131. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  132. package/fesm2022/ngwr-squircle.mjs +1 -1
  133. package/fesm2022/ngwr-squircle.mjs.map +1 -1
  134. package/fesm2022/ngwr-star-border.mjs +2 -2
  135. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  136. package/fesm2022/ngwr-switch.mjs +10 -3
  137. package/fesm2022/ngwr-switch.mjs.map +1 -1
  138. package/fesm2022/ngwr-table.mjs +233 -19
  139. package/fesm2022/ngwr-table.mjs.map +1 -1
  140. package/fesm2022/ngwr-tabs.mjs +21 -4
  141. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  142. package/fesm2022/ngwr-textarea.mjs +20 -4
  143. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  144. package/fesm2022/ngwr-theme.mjs +13 -3
  145. package/fesm2022/ngwr-theme.mjs.map +1 -1
  146. package/fesm2022/ngwr-tilt-card.mjs +2 -2
  147. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  148. package/fesm2022/ngwr-toolbar.mjs +2 -2
  149. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  150. package/fesm2022/ngwr-tour.mjs +264 -0
  151. package/fesm2022/ngwr-tour.mjs.map +1 -0
  152. package/fesm2022/ngwr-transfer.mjs +184 -0
  153. package/fesm2022/ngwr-transfer.mjs.map +1 -0
  154. package/fesm2022/ngwr-tree.mjs +27 -9
  155. package/fesm2022/ngwr-tree.mjs.map +1 -1
  156. package/fesm2022/ngwr-typewriter.mjs +2 -2
  157. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  158. package/fesm2022/ngwr-validators.mjs +118 -2
  159. package/fesm2022/ngwr-validators.mjs.map +1 -1
  160. package/fesm2022/ngwr-version.mjs +2 -2
  161. package/fesm2022/ngwr-version.mjs.map +1 -1
  162. package/fesm2022/ngwr-virtual-scroll.mjs +2 -2
  163. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  164. package/fesm2022/ngwr-waves.mjs +25 -3
  165. package/fesm2022/ngwr-waves.mjs.map +1 -1
  166. package/form/styles/_index.scss +8 -4
  167. package/glitch-text/styles/_index.scss +5 -0
  168. package/gradient-text/styles/_index.scss +5 -0
  169. package/i18n/en.json +233 -0
  170. package/i18n/ru.json +233 -0
  171. package/icon/styles/_index.scss +15 -1
  172. package/input/styles/_index.scss +16 -0
  173. package/input-number/styles/_index.scss +8 -1
  174. package/keyboard/styles/_index.scss +15 -3
  175. package/llms-full.txt +124 -63
  176. package/llms.txt +29 -8
  177. package/loading-bar/styles/_index.scss +5 -0
  178. package/marquee/styles/_index.scss +7 -2
  179. package/mention/styles/_index.scss +23 -0
  180. package/overlay/styles/_index.scss +5 -0
  181. package/package.json +15 -1
  182. package/pagination/styles/_index.scss +12 -0
  183. package/popover/styles/_index.scss +165 -45
  184. package/pull-to-refresh/styles/_index.scss +5 -0
  185. package/result/styles/_index.scss +3 -3
  186. package/schematics/icon-set/index.js +80 -34
  187. package/schematics/icon-set/schema.json +8 -3
  188. package/schematics/ng-add/index.js +23 -6
  189. package/schematics/package.json +3 -0
  190. package/schematics/page/templates.js +17 -21
  191. package/schematics/provider/index.js +31 -13
  192. package/schematics/provider/schema.json +40 -24
  193. package/schematics/use/index.js +5 -1
  194. package/schematics/use/schema.json +8 -3
  195. package/schematics/use/symbol-map.json +7 -176
  196. package/segmented/styles/_index.scss +1 -1
  197. package/select/styles/_index.scss +20 -3
  198. package/shiny-text/styles/_index.scss +5 -0
  199. package/speed-dial/styles/_index.scss +12 -1
  200. package/splitter/styles/_index.scss +7 -1
  201. package/spotlight-card/styles/_index.scss +5 -0
  202. package/squircle/styles/_index.scss +5 -0
  203. package/star-border/styles/_index.scss +5 -0
  204. package/statistic/styles/_index.scss +2 -2
  205. package/styles/_animations.scss +6 -0
  206. package/styles.scss +3 -0
  207. package/table/styles/_index.scss +128 -12
  208. package/theme/styles/_box-model.scss +29 -0
  209. package/theme/styles/_colors.scss +116 -15
  210. package/theme/styles/_dark.scss +65 -7
  211. package/theme/styles/_focus.scss +2 -8
  212. package/theme/styles/_index.scss +1 -0
  213. package/tilt-card/styles/_index.scss +5 -0
  214. package/toast/styles/_index.scss +6 -3
  215. package/tour/styles/_index.scss +63 -0
  216. package/transfer/styles/_index.scss +105 -0
  217. package/types/ngwr-alert.d.ts +4 -1
  218. package/types/ngwr-avatar.d.ts +1 -1
  219. package/types/ngwr-back-top.d.ts +3 -2
  220. package/types/ngwr-badge.d.ts +1 -1
  221. package/types/ngwr-border-glow.d.ts +0 -1
  222. package/types/ngwr-carousel.d.ts +10 -1
  223. package/types/ngwr-cascader.d.ts +13 -1
  224. package/types/ngwr-checkbox.d.ts +9 -1
  225. package/types/ngwr-color-picker.d.ts +1 -0
  226. package/types/ngwr-command-palette.d.ts +4 -1
  227. package/types/ngwr-context-menu.d.ts +1 -0
  228. package/types/ngwr-date-picker.d.ts +14 -4
  229. package/types/ngwr-density.d.ts +9 -2
  230. package/types/ngwr-dialog.d.ts +9 -0
  231. package/types/ngwr-divider.d.ts +1 -1
  232. package/types/ngwr-drawer.d.ts +20 -4
  233. package/types/ngwr-dropdown.d.ts +1 -0
  234. package/types/ngwr-event-calendar.d.ts +358 -0
  235. package/types/ngwr-form.d.ts +177 -20
  236. package/types/ngwr-fuzzy-text.d.ts +8 -0
  237. package/types/ngwr-gauge.d.ts +4 -1
  238. package/types/ngwr-i18n.d.ts +80 -2
  239. package/types/ngwr-icon.d.ts +11 -19
  240. package/types/ngwr-input-number.d.ts +8 -1
  241. package/types/ngwr-input.d.ts +50 -20
  242. package/types/ngwr-knob.d.ts +4 -1
  243. package/types/ngwr-lightbox.d.ts +7 -1
  244. package/types/ngwr-line-chart.d.ts +1 -1
  245. package/types/ngwr-media.d.ts +1 -1
  246. package/types/ngwr-mention.d.ts +45 -1
  247. package/types/ngwr-meter-group.d.ts +9 -1
  248. package/types/ngwr-overlay.d.ts +80 -2
  249. package/types/ngwr-page-header.d.ts +2 -2
  250. package/types/ngwr-pagination.d.ts +15 -2
  251. package/types/ngwr-popconfirm.d.ts +1 -0
  252. package/types/ngwr-popover.d.ts +1 -0
  253. package/types/ngwr-progress.d.ts +4 -1
  254. package/types/ngwr-rating.d.ts +3 -2
  255. package/types/ngwr-result.d.ts +12 -6
  256. package/types/ngwr-segmented.d.ts +6 -0
  257. package/types/ngwr-select.d.ts +19 -7
  258. package/types/ngwr-shiny-text.d.ts +2 -4
  259. package/types/ngwr-speed-dial.d.ts +7 -1
  260. package/types/ngwr-squircle.d.ts +1 -1
  261. package/types/ngwr-switch.d.ts +7 -1
  262. package/types/ngwr-table.d.ts +126 -6
  263. package/types/ngwr-tabs.d.ts +1 -4
  264. package/types/ngwr-textarea.d.ts +8 -1
  265. package/types/ngwr-theme.d.ts +8 -1
  266. package/types/ngwr-toolbar.d.ts +2 -2
  267. package/types/ngwr-tour.d.ts +132 -0
  268. package/types/ngwr-transfer.d.ts +118 -0
  269. package/types/ngwr-tree.d.ts +11 -2
  270. package/types/ngwr-validators.d.ts +62 -2
  271. package/types/ngwr-version.d.ts +2 -2
  272. package/types/ngwr-waves.d.ts +10 -0
  273. package/typewriter/styles/_index.scss +5 -0
  274. package/typography/styles/_index.scss +3 -3
  275. package/virtual-scroll/styles/_index.scss +6 -1
  276. package/waves/styles/_index.scss +26 -0
@@ -8,14 +8,14 @@ import * as i0 from '@angular/core';
8
8
  * ```html
9
9
  * <wr-toolbar>
10
10
  * <div wrToolbarStart>
11
- * <button wrButton>Back</button>
11
+ * <button wr-btn>Back</button>
12
12
  * <strong>Items</strong>
13
13
  * </div>
14
14
  * <div wrToolbarCenter>
15
15
  * <wr-segmented [(value)]="view" [options]="['grid', 'list']" />
16
16
  * </div>
17
17
  * <div wrToolbarEnd>
18
- * <button wrButton color="primary">New</button>
18
+ * <button wr-btn color="primary">New</button>
19
19
  * </div>
20
20
  * </wr-toolbar>
21
21
  * ```
@@ -0,0 +1,132 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import * as ngwr_i18n from 'ngwr/i18n';
3
+
4
+ /**
5
+ * @license
6
+ *
7
+ * Use of this source code is governed by an MIT-style license that can be
8
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
9
+ */
10
+ /** Where the step popup sits relative to its target. */
11
+ type WrTourPlacement = 'top' | 'bottom' | 'left' | 'right';
12
+ /** One stop on a tour. */
13
+ interface WrTourStep {
14
+ /**
15
+ * What to spotlight — a CSS selector resolved when the step opens, or the
16
+ * element itself. A step whose selector matches nothing is SKIPPED rather than
17
+ * shown floating: a tour that points at a control the user cannot see is worse
18
+ * than one that is a step shorter.
19
+ */
20
+ readonly target: string | HTMLElement;
21
+ /** Heading above the copy. */
22
+ readonly title?: string;
23
+ /** The step's body text. */
24
+ readonly content: string;
25
+ /** Preferred side. The overlay falls back to the opposite side near an edge. @default 'bottom' */
26
+ readonly placement?: WrTourPlacement;
27
+ }
28
+
29
+ /**
30
+ * Guided product tour: a spotlight over one element at a time plus a popup
31
+ * explaining it.
32
+ *
33
+ * Steps are data, not markup — call `start()` with an array and the service owns
34
+ * the overlay, the cut-out, focus and the keyboard. A step whose target is not
35
+ * on the page is skipped rather than shown floating, so a tour survives a
36
+ * feature being hidden behind a flag or a permission.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * private readonly tour = inject(WrTour);
41
+ *
42
+ * showMeAround(): void {
43
+ * this.tour.start([
44
+ * { target: '[data-tour="search"]', title: 'Search', content: 'Find anything by name.' },
45
+ * { target: '[data-tour="filters"]', content: 'Narrow the list down.', placement: 'right' },
46
+ * ]);
47
+ * }
48
+ * ```
49
+ *
50
+ * @see https://ngwr.dev/reference/services/tour
51
+ */
52
+ declare class WrTour {
53
+ private readonly overlay;
54
+ private readonly scrollStrategies;
55
+ private readonly injector;
56
+ private readonly focusTrapFactory;
57
+ private readonly document;
58
+ private readonly isBrowser;
59
+ private readonly steps;
60
+ private readonly cursor;
61
+ private overlayRef;
62
+ private spotlight;
63
+ private detachKeydown;
64
+ private detachReposition;
65
+ private restoreFocus;
66
+ /** Whether a tour is running. */
67
+ readonly active: _angular_core.Signal<boolean>;
68
+ /** Zero-based index of the current step, `-1` when idle. */
69
+ readonly index: _angular_core.Signal<number>;
70
+ /** How many steps this tour has. */
71
+ readonly total: _angular_core.Signal<number>;
72
+ /** The step being shown, or `null` when idle. */
73
+ readonly step: _angular_core.Signal<WrTourStep | null>;
74
+ /**
75
+ * Begin a tour. Restarts if one is already running. A no-op under SSR — a
76
+ * tour is a client-side affordance and there is nothing to spotlight on the
77
+ * server.
78
+ */
79
+ start(steps: readonly WrTourStep[]): void;
80
+ /** Advance; finishes the tour past the last step. */
81
+ next(): void;
82
+ /** Go back; stays put on the first step. */
83
+ prev(): void;
84
+ /** End the tour and return focus where it was. */
85
+ stop(): void;
86
+ /**
87
+ * Move to `index`, skipping steps whose target is not in the DOM. `direction`
88
+ * says which way to keep skipping, so a missing step never traps the tour
89
+ * between two dead ends.
90
+ */
91
+ private goTo;
92
+ private resolve;
93
+ private openStep;
94
+ private placeSpotlight;
95
+ private teardownStep;
96
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrTour, never>;
97
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<WrTour>;
98
+ }
99
+
100
+ /** What the popup needs from the running tour, without importing the service (cycle). */
101
+ interface WrTourController {
102
+ readonly index: () => number;
103
+ readonly total: () => number;
104
+ readonly step: () => WrTourStep | null;
105
+ next(): void;
106
+ prev(): void;
107
+ stop(): void;
108
+ }
109
+ /**
110
+ * The card a tour shows next to the spotlit element. Rendered by `WrTour` into
111
+ * a CDK overlay — not something you place yourself.
112
+ *
113
+ * @see https://ngwr.dev/reference/services/tour
114
+ */
115
+ declare class WrTourPopup {
116
+ protected readonly tour: WrTourController;
117
+ protected readonly nextLabel: string;
118
+ protected readonly backLabel: string;
119
+ protected readonly doneLabel: string;
120
+ protected readonly skipLabel: string;
121
+ /** `Step {{current}} of {{total}}` — also the dialog's accessible name. */
122
+ protected readonly progress: (params?: ngwr_i18n.WrI18nParams) => string;
123
+ protected readonly isLast: _angular_core.Signal<boolean>;
124
+ protected readonly isFirst: _angular_core.Signal<boolean>;
125
+ protected readonly progressText: _angular_core.Signal<string>;
126
+ protected readonly ariaLabel: _angular_core.Signal<string>;
127
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrTourPopup, never>;
128
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTourPopup, "wr-tour-popup", never, {}, {}, never, never, true, never>;
129
+ }
130
+
131
+ export { WrTour, WrTourPopup };
132
+ export type { WrTourPlacement, WrTourStep };
@@ -0,0 +1,118 @@
1
+ import * as ngwr_i18n from 'ngwr/i18n';
2
+ import * as _angular_core from '@angular/core';
3
+ import { FormValueControl } from '@angular/forms/signals';
4
+
5
+ /**
6
+ * @license
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
10
+ */
11
+ /** One row in either pane of a `<wr-transfer>`. */
12
+ interface WrTransferItem<TValue = unknown> {
13
+ /** Identity — what `[(value)]` carries, compared with SameValueZero. */
14
+ readonly value: TValue;
15
+ /** Text shown in the pane and matched by the search box. */
16
+ readonly label: string;
17
+ /** Greyed out and never moved by the bulk buttons. */
18
+ readonly disabled?: boolean;
19
+ }
20
+
21
+ /** A pane's rows plus the header state derived from them. */
22
+ interface PaneState {
23
+ readonly rows: readonly WrTransferItem[];
24
+ readonly checkedCount: number;
25
+ readonly allChecked: boolean;
26
+ readonly someChecked: boolean;
27
+ }
28
+ /**
29
+ * Dual-listbox picker: two panes and the buttons that move rows between them.
30
+ *
31
+ * The full item set is `[items]` and the RIGHT pane is the value — `[(value)]`
32
+ * holds the chosen `WrTransferItem['value']`s, everything else stays left. The
33
+ * checked state inside each pane is transient staging, deliberately not part of
34
+ * the value: what a form cares about is which rows ended up on the right.
35
+ *
36
+ * A signal-forms native control (`FormValueControl<readonly unknown[]>`), so
37
+ * `[formField]` binds straight to `value`; `[(ngModel)]` and reactive forms keep
38
+ * working through Angular's bridge, and `[(value)]` is the standalone shape.
39
+ *
40
+ * @example
41
+ * ```html
42
+ * <!-- Standalone -->
43
+ * <wr-transfer [items]="permissions" [(value)]="granted" />
44
+ *
45
+ * <!-- Searchable, with pane titles -->
46
+ * <wr-transfer
47
+ * searchable
48
+ * sourceTitle="Available"
49
+ * targetTitle="Granted"
50
+ * [items]="permissions"
51
+ * [formField]="form.granted"
52
+ * />
53
+ * ```
54
+ *
55
+ * @see https://ngwr.dev/reference/components/transfer
56
+ */
57
+ declare class WrTransfer implements FormValueControl<readonly unknown[]> {
58
+ /** Every row, in either pane. Membership of the right pane is `value`. */
59
+ readonly items: _angular_core.InputSignal<readonly WrTransferItem<unknown>[]>;
60
+ /**
61
+ * Values currently in the RIGHT pane. Two-way bindable; bound automatically
62
+ * by `[formField]` / `[(ngModel)]`.
63
+ */
64
+ readonly value: _angular_core.ModelSignal<readonly unknown[]>;
65
+ /** Emitted on blur / commit so a bound field marks itself touched. */
66
+ readonly touch: _angular_core.OutputEmitterRef<void>;
67
+ /** Disable the whole control. @default false */
68
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, any>;
69
+ /** Show a filter box above each pane. @default false */
70
+ readonly searchable: _angular_core.InputSignalWithTransform<boolean, any>;
71
+ /** Heading above the left pane. Falls back to `transfer.source`. */
72
+ readonly sourceTitle: _angular_core.InputSignal<string | null>;
73
+ /** Heading above the right pane. Falls back to `transfer.target`. */
74
+ readonly targetTitle: _angular_core.InputSignal<string | null>;
75
+ /** Placeholder in both filter boxes. Falls back to `transfer.search`. */
76
+ readonly searchPlaceholder: _angular_core.InputSignal<string | null>;
77
+ /** Shown in a pane with no rows. Falls back to `transfer.empty`. */
78
+ readonly emptyText: _angular_core.InputSignal<string | null>;
79
+ /** Accessible name of the move-right button. Falls back to `transfer.toTarget`. */
80
+ readonly toTargetLabel: _angular_core.InputSignal<string | null>;
81
+ /** Accessible name of the move-left button. Falls back to `transfer.toSource`. */
82
+ readonly toSourceLabel: _angular_core.InputSignal<string | null>;
83
+ protected readonly resolvedSourceTitle: _angular_core.Signal<string>;
84
+ protected readonly resolvedTargetTitle: _angular_core.Signal<string>;
85
+ protected readonly resolvedSearch: _angular_core.Signal<string>;
86
+ protected readonly resolvedEmpty: _angular_core.Signal<string>;
87
+ protected readonly resolvedToTarget: _angular_core.Signal<string>;
88
+ protected readonly resolvedToSource: _angular_core.Signal<string>;
89
+ /** `{{checked}} / {{total}}` under each heading. @internal */
90
+ protected readonly countLabel: (params?: ngwr_i18n.WrI18nParams) => string;
91
+ /** Pane order — the template iterates it so both panes share one block. */
92
+ protected readonly panes: readonly ["source", "target"];
93
+ private readonly sourceQuery;
94
+ private readonly targetQuery;
95
+ /** Staged rows, per pane. Cleared as soon as a move commits them. */
96
+ private readonly sourceChecked;
97
+ private readonly targetChecked;
98
+ private readonly valueSet;
99
+ protected readonly source: _angular_core.Signal<PaneState>;
100
+ protected readonly target: _angular_core.Signal<PaneState>;
101
+ protected readonly canMoveRight: _angular_core.Signal<boolean>;
102
+ protected readonly canMoveLeft: _angular_core.Signal<boolean>;
103
+ protected readonly classes: _angular_core.Signal<string>;
104
+ protected isChecked(pane: 'source' | 'target', item: WrTransferItem): boolean;
105
+ protected toggle(pane: 'source' | 'target', item: WrTransferItem, checked: boolean): void;
106
+ /** Header checkbox — stages or clears every enabled row the filter shows. */
107
+ protected toggleAll(pane: 'source' | 'target', checked: boolean): void;
108
+ protected onSearch(pane: 'source' | 'target', event: Event): void;
109
+ protected moveRight(): void;
110
+ protected moveLeft(): void;
111
+ /** Filter, then derive the header state from what survived. */
112
+ private pane;
113
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrTransfer, never>;
114
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTransfer, "wr-transfer", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "sourceTitle": { "alias": "sourceTitle"; "required": false; "isSignal": true; }; "targetTitle": { "alias": "targetTitle"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "toTargetLabel": { "alias": "toTargetLabel"; "required": false; "isSignal": true; }; "toSourceLabel": { "alias": "toSourceLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
115
+ }
116
+
117
+ export { WrTransfer };
118
+ export type { WrTransferItem };
@@ -93,6 +93,14 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
93
93
  readonly openOn: _angular_core.InputSignal<"inline" | "overlay">;
94
94
  /** Placeholder shown on the trigger when no node is selected. */
95
95
  readonly placeholder: _angular_core.InputSignal<string>;
96
+ /**
97
+ * Accessible name of the overlay trigger. Falls back to the placeholder, then
98
+ * to `select.label` — a `role="combobox"` with nothing selected and no
99
+ * placeholder otherwise has no name at all.
100
+ */
101
+ readonly ariaLabel: _angular_core.InputSignal<string | null>;
102
+ private readonly labelText;
103
+ protected readonly resolvedAriaLabel: _angular_core.Signal<string>;
96
104
  /** Show a clear-all (×) button on the trigger when at least one node is selected. @default true */
97
105
  readonly clearable: _angular_core.InputSignalWithTransform<boolean, any>;
98
106
  /**
@@ -138,13 +146,14 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
138
146
  readonly touch: _angular_core.OutputEmitterRef<void>;
139
147
  private readonly host;
140
148
  private readonly overlay;
149
+ private readonly outsideClick;
141
150
  private readonly vcr;
142
151
  private readonly scrollStrategies;
143
152
  private readonly destroyRef;
144
153
  private readonly platformId;
145
154
  /** Currently focused row's index in the flattened visible list. */
146
155
  protected readonly focusedIndex: _angular_core.WritableSignal<number>;
147
- /** Resolved ARIA labels — pick up live locale changes via re-render. */
156
+ /** Resolved ARIA labels — resolved once at construction, so a runtime locale switch needs a re-create. */
148
157
  protected readonly clearLabel: string;
149
158
  protected readonly expandLabel: string;
150
159
  protected readonly collapseLabel: string;
@@ -224,7 +233,7 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
224
233
  private openOverlay;
225
234
  private closeOverlay;
226
235
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrTree<any>, never>;
227
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTree<any>, "wr-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "openOn": { "alias": "openOn"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "maxTagCount": { "alias": "maxTagCount"; "required": false; "isSignal": true; }; "defaultExpandAll": { "alias": "defaultExpandAll"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; "overscan": { "alias": "overscan"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; "expanded": "expandedChange"; "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
236
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTree<any>, "wr-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "openOn": { "alias": "openOn"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "maxTagCount": { "alias": "maxTagCount"; "required": false; "isSignal": true; }; "defaultExpandAll": { "alias": "defaultExpandAll"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; "overscan": { "alias": "overscan"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; "expanded": "expandedChange"; "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
228
237
  }
229
238
 
230
239
  export { WrTree };
@@ -8,8 +8,11 @@ import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
8
8
  */
9
9
 
10
10
  /**
11
- * Bundled `ValidatorFn`s — pure functions, no DOM, no DI. Mirrors the
12
- * API shape of Angular's built-in `Validators` so it composes cleanly:
11
+ * Bundled `ValidatorFn`s — pure functions, no DOM, no DI. (`matchFields` keeps
12
+ * one bit of per-instance state, a latch so its dev-mode misconfiguration
13
+ * warning fires once rather than on every validation run; it is never read as
14
+ * part of the result.) Mirrors the API shape of Angular's built-in
15
+ * `Validators` so it composes cleanly:
13
16
  *
14
17
  * ```ts
15
18
  * import { Validators } from '@angular/forms';
@@ -59,8 +62,65 @@ declare const WrValidators: {
59
62
  * Value must equal a sibling control's value (e.g. confirm-password).
60
63
  * The target lookup uses `control.parent.get(name)`, so it works
61
64
  * inside `FormGroup` and nested groups.
65
+ *
66
+ * **It cannot report a mismatch until something revalidates the control.**
67
+ * Angular runs a control's validators inside the control's own constructor,
68
+ * before the control has a parent — so the lookup finds nothing and this
69
+ * returns `null`, and attaching the control to a group does not re-run it.
70
+ *
71
+ * `formControlName` revalidates when it binds, so a group rendered through
72
+ * the reactive-forms directives corrects itself on its first change
73
+ * detection. The window is open for everything that reads validity BEFORE
74
+ * that: a route guard or resolver checking `form.valid`, a form built and
75
+ * submitted from a service, a unit test. Such a group reports itself valid
76
+ * with two values that plainly disagree.
77
+ *
78
+ * Put {@link WrValidators.matchFields} on the group to close it, and keep
79
+ * this one on the child for the per-field message. They do not conflict —
80
+ * different error keys, different hosts.
81
+ *
82
+ * @see WrValidators.matchFields
62
83
  */
63
84
  match: (targetName: string) => ValidatorFn;
85
+ /**
86
+ * Every named control must hold the same value — the group-level counterpart
87
+ * to {@link WrValidators.match}. Attach it to the group that OWNS the fields,
88
+ * not to one of its children.
89
+ *
90
+ * Unlike `match` this has no ordering hole: Angular attaches the children and
91
+ * aggregates their values BEFORE it runs the group's own validators, so a
92
+ * group built from a record whose fields already disagree is invalid the
93
+ * moment it exists — no revalidation step, and nothing that depends on the
94
+ * form having been rendered.
95
+ *
96
+ * Names are `AbstractControl.get()` paths, so `'billing.zip'` reaches into a
97
+ * nested group. `null`, `undefined` and `''` all count as the same empty
98
+ * value; everything else is compared with `===`, so two equal `Date`s are NOT
99
+ * equal — compare a derived primitive instead. **Disabled controls are
100
+ * skipped**, which makes the rule compare exactly what `group.value`
101
+ * contains, and the error names only the controls it actually compared.
102
+ *
103
+ * A name that resolves to nothing, or to a group or an array rather than a
104
+ * leaf control, turns the whole check off and warns once per validator
105
+ * instance in dev — never a partial comparison of the names that did
106
+ * resolve, and never an error the user has no way to satisfy.
107
+ *
108
+ * The error lands on the GROUP, and `<wr-form-field>` only reads the one
109
+ * control projected into it — so pair this with `match` for a per-field
110
+ * message, or render it yourself from `form.hasError('matchFields')`.
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * new FormGroup(
115
+ * {
116
+ * password: new FormControl(''),
117
+ * confirm: new FormControl('', [WrValidators.match('password')]),
118
+ * },
119
+ * { validators: [WrValidators.matchFields('password', 'confirm')] },
120
+ * );
121
+ * ```
122
+ */
123
+ matchFields: (first: string, second: string, ...rest: readonly string[]) => ValidatorFn;
64
124
  /** Value must be one of the allowed entries (strict equality). */
65
125
  oneOf: <T>(allowed: readonly T[]) => ValidatorFn;
66
126
  /** Value (Date | parseable) must be ≥ `min`. */
@@ -14,9 +14,9 @@ import { InjectionToken } from '@angular/core';
14
14
  * import or `require`, neither of which tree-shakes well in Angular builds.
15
15
  *
16
16
  * Distinct from `Version` exported by `@angular/core`, which reports the
17
- * loaded Angular runtime version (e.g. `'21.2.13'`), not ngwr's.
17
+ * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.
18
18
  */
19
- declare const NGWR_VERSION = "9.1.0";
19
+ declare const NGWR_VERSION = "10.1.0";
20
20
 
21
21
  /**
22
22
  * @license
@@ -53,6 +53,16 @@ declare class WrWaves {
53
53
  private bounding;
54
54
  private readonly mouse;
55
55
  private rafId;
56
+ /**
57
+ * Flips once the canvas has drawn, which retires the CSS stand-in grid.
58
+ *
59
+ * A canvas cannot be prerendered, so on an SSR'd or prerendered page this
60
+ * element is simply blank until the bundle has loaded and hydration has run —
61
+ * measured at ~2.8s on ngwr.dev's own home page. The stylesheet paints a static
62
+ * grid of the same colour and pitch in the meantime, straight from the
63
+ * prerendered HTML, and this hands over to the real thing.
64
+ */
65
+ protected readonly painted: _angular_core.WritableSignal<boolean>;
56
66
  constructor();
57
67
  private boot;
58
68
  private setSize;
@@ -1,3 +1,8 @@
1
+ // Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
2
+ // design token this stylesheet references. Sass deduplicates `@use` per
3
+ // compilation, so the umbrella sheet still emits the theme only once.
4
+ @use '../../theme/styles' as theme;
5
+
1
6
  .wr-typewriter {
2
7
  --wr-typewriter-cursor-blink: 0.5s;
3
8
 
@@ -174,13 +174,13 @@
174
174
  color: var(--wr-color-primary);
175
175
  }
176
176
  &--tone-success {
177
- color: var(--wr-color-success);
177
+ color: var(--wr-color-success-ink);
178
178
  }
179
179
  &--tone-warning {
180
- color: var(--wr-color-warning);
180
+ color: var(--wr-color-warning-ink);
181
181
  }
182
182
  &--tone-danger {
183
- color: var(--wr-color-danger);
183
+ color: var(--wr-color-danger-ink);
184
184
  }
185
185
 
186
186
  // Modifiers
@@ -1,3 +1,8 @@
1
+ // Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
2
+ // design token this stylesheet references. Sass deduplicates `@use` per
3
+ // compilation, so the umbrella sheet still emits the theme only once.
4
+ @use '../../theme/styles' as theme;
5
+
1
6
  // Fixed-size virtual scroll wrapper. Most of the layout work is done by
2
7
  // CDK's `<cdk-virtual-scroll-viewport>`; this stylesheet just makes the
3
8
  // host a block-level container and tames default overflow behaviour.
@@ -11,7 +16,7 @@
11
16
  width: 100%;
12
17
  height: 100%;
13
18
  // CDK already sets `overflow: auto`; just add a discreet scrollbar
14
- // skin via the platform defaults — no custom thumb so we match the
19
+ // skin via the platform defaults — a discreet custom thumb that still matches the
15
20
  // host application's chrome.
16
21
  scrollbar-width: thin;
17
22
 
@@ -1,9 +1,17 @@
1
+ // Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
2
+ // design token this stylesheet references. Sass deduplicates `@use` per
3
+ // compilation, so the umbrella sheet still emits the theme only once.
4
+ @use '../../theme/styles' as theme;
5
+
1
6
  // Wave-field background (reactbits port). The host fills its nearest
2
7
  // positioned ancestor; the line colour is theme-aware via
3
8
  // `--wr-waves-line-color` unless `[lineColor]` overrides it.
4
9
 
5
10
  .wr-waves {
6
11
  --wr-waves-line-color: rgba(var(--wr-color-on-surface-rgb), 0.12);
12
+ // Mirrors the `xGap` input; the component publishes it so the stand-in below
13
+ // lands on the same pitch as the real grid.
14
+ --wr-waves-x-gap: 10px;
7
15
 
8
16
  position: absolute;
9
17
  inset: 0;
@@ -12,6 +20,24 @@
12
20
  padding: 0;
13
21
  overflow: hidden;
14
22
 
23
+ // Stand-in grid, shown until the canvas has painted.
24
+ //
25
+ // A canvas cannot be prerendered, so on an SSR'd or prerendered page this
26
+ // element is blank until the JS bundle has loaded and hydrated — measured at
27
+ // ~2.8s on ngwr.dev's own home page, where it reads as the background hanging
28
+ // and then popping in. These are straight lines rather than the drifting
29
+ // curves, at the same colour and pitch, so the handover reads as the grid
30
+ // coming alive rather than as content appearing.
31
+ background-image: repeating-linear-gradient(
32
+ to right,
33
+ var(--wr-waves-line-color) 0 1px,
34
+ transparent 1px var(--wr-waves-x-gap)
35
+ );
36
+
37
+ &--painted {
38
+ background-image: none;
39
+ }
40
+
15
41
  &__canvas {
16
42
  display: block;
17
43
  width: 100%;