ngwr 10.0.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 (233) hide show
  1. package/README.md +9 -8
  2. package/action-sheet/styles/_index.scss +6 -1
  3. package/badge/styles/_index.scss +1 -1
  4. package/badge/styles/_tag.scss +2 -2
  5. package/border-glow/styles/_index.scss +5 -0
  6. package/button/styles/_index.scss +6 -6
  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 +1 -2
  11. package/drag-drop/styles/_index.scss +20 -7
  12. package/event-calendar/styles/_index.scss +284 -0
  13. package/falling-text/styles/_index.scss +5 -0
  14. package/fesm2022/ngwr-alert.mjs +8 -3
  15. package/fesm2022/ngwr-alert.mjs.map +1 -1
  16. package/fesm2022/ngwr-back-top.mjs +6 -4
  17. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  18. package/fesm2022/ngwr-border-glow.mjs +12 -9
  19. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  20. package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
  21. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  22. package/fesm2022/ngwr-calendar.mjs +5 -3
  23. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  24. package/fesm2022/ngwr-card.mjs +2 -2
  25. package/fesm2022/ngwr-card.mjs.map +1 -1
  26. package/fesm2022/ngwr-carousel.mjs +17 -4
  27. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  28. package/fesm2022/ngwr-cascader.mjs +31 -4
  29. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  30. package/fesm2022/ngwr-checkbox.mjs +12 -3
  31. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  32. package/fesm2022/ngwr-circular-text.mjs +2 -2
  33. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  34. package/fesm2022/ngwr-command-palette.mjs +7 -3
  35. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  36. package/fesm2022/ngwr-counter.mjs +9 -1
  37. package/fesm2022/ngwr-counter.mjs.map +1 -1
  38. package/fesm2022/ngwr-date-picker.mjs +23 -6
  39. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  40. package/fesm2022/ngwr-descriptions.mjs +5 -4
  41. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  42. package/fesm2022/ngwr-drag-drop.mjs +2 -2
  43. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  44. package/fesm2022/ngwr-dropdown.mjs +4 -0
  45. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  46. package/fesm2022/ngwr-event-calendar.mjs +723 -0
  47. package/fesm2022/ngwr-event-calendar.mjs.map +1 -0
  48. package/fesm2022/ngwr-falling-text.mjs +2 -2
  49. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  50. package/fesm2022/ngwr-file-upload.mjs +2 -2
  51. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  52. package/fesm2022/ngwr-form.mjs +258 -42
  53. package/fesm2022/ngwr-form.mjs.map +1 -1
  54. package/fesm2022/ngwr-fuzzy-text.mjs +15 -1
  55. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  56. package/fesm2022/ngwr-gauge.mjs +8 -3
  57. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  58. package/fesm2022/ngwr-glitch-text.mjs +2 -2
  59. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  60. package/fesm2022/ngwr-gradient-text.mjs +2 -2
  61. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  62. package/fesm2022/ngwr-i18n-en.mjs +73 -5
  63. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  64. package/fesm2022/ngwr-i18n-ru.mjs +73 -5
  65. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  66. package/fesm2022/ngwr-i18n.mjs +20 -2
  67. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  68. package/fesm2022/ngwr-icon.mjs +5 -0
  69. package/fesm2022/ngwr-icon.mjs.map +1 -1
  70. package/fesm2022/ngwr-input-number.mjs +19 -3
  71. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  72. package/fesm2022/ngwr-input.mjs +48 -6
  73. package/fesm2022/ngwr-input.mjs.map +1 -1
  74. package/fesm2022/ngwr-knob.mjs +8 -3
  75. package/fesm2022/ngwr-knob.mjs.map +1 -1
  76. package/fesm2022/ngwr-lightbox.mjs +32 -3
  77. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  78. package/fesm2022/ngwr-line-chart.mjs +3 -3
  79. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  80. package/fesm2022/ngwr-list.mjs +2 -2
  81. package/fesm2022/ngwr-list.mjs.map +1 -1
  82. package/fesm2022/ngwr-loading-bar.mjs +2 -2
  83. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  84. package/fesm2022/ngwr-marquee.mjs +2 -2
  85. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  86. package/fesm2022/ngwr-media.mjs +3 -0
  87. package/fesm2022/ngwr-media.mjs.map +1 -1
  88. package/fesm2022/ngwr-meter-group.mjs +14 -3
  89. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  90. package/fesm2022/ngwr-page-header.mjs +2 -2
  91. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  92. package/fesm2022/ngwr-pagination.mjs +1 -1
  93. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  94. package/fesm2022/ngwr-progress.mjs +8 -2
  95. package/fesm2022/ngwr-progress.mjs.map +1 -1
  96. package/fesm2022/ngwr-qr.mjs.map +1 -1
  97. package/fesm2022/ngwr-rating.mjs +6 -4
  98. package/fesm2022/ngwr-rating.mjs.map +1 -1
  99. package/fesm2022/ngwr-result.mjs +19 -12
  100. package/fesm2022/ngwr-result.mjs.map +1 -1
  101. package/fesm2022/ngwr-segmented.mjs +2 -2
  102. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  103. package/fesm2022/ngwr-select.mjs +28 -8
  104. package/fesm2022/ngwr-select.mjs.map +1 -1
  105. package/fesm2022/ngwr-shiny-text.mjs +4 -6
  106. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  107. package/fesm2022/ngwr-speed-dial.mjs +11 -3
  108. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  109. package/fesm2022/ngwr-spotlight-card.mjs +2 -2
  110. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  111. package/fesm2022/ngwr-squircle.mjs +1 -1
  112. package/fesm2022/ngwr-squircle.mjs.map +1 -1
  113. package/fesm2022/ngwr-star-border.mjs +2 -2
  114. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  115. package/fesm2022/ngwr-switch.mjs +10 -3
  116. package/fesm2022/ngwr-switch.mjs.map +1 -1
  117. package/fesm2022/ngwr-table.mjs +233 -19
  118. package/fesm2022/ngwr-table.mjs.map +1 -1
  119. package/fesm2022/ngwr-tabs.mjs +21 -4
  120. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  121. package/fesm2022/ngwr-textarea.mjs +20 -4
  122. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  123. package/fesm2022/ngwr-tilt-card.mjs +2 -2
  124. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  125. package/fesm2022/ngwr-toolbar.mjs +2 -2
  126. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  127. package/fesm2022/ngwr-tour.mjs +264 -0
  128. package/fesm2022/ngwr-tour.mjs.map +1 -0
  129. package/fesm2022/ngwr-transfer.mjs +184 -0
  130. package/fesm2022/ngwr-transfer.mjs.map +1 -0
  131. package/fesm2022/ngwr-tree.mjs +23 -6
  132. package/fesm2022/ngwr-tree.mjs.map +1 -1
  133. package/fesm2022/ngwr-typewriter.mjs +2 -2
  134. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  135. package/fesm2022/ngwr-validators.mjs +118 -2
  136. package/fesm2022/ngwr-validators.mjs.map +1 -1
  137. package/fesm2022/ngwr-version.mjs +2 -2
  138. package/fesm2022/ngwr-version.mjs.map +1 -1
  139. package/fesm2022/ngwr-virtual-scroll.mjs +2 -2
  140. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  141. package/fesm2022/ngwr-waves.mjs +2 -2
  142. package/fesm2022/ngwr-waves.mjs.map +1 -1
  143. package/form/styles/_index.scss +8 -4
  144. package/glitch-text/styles/_index.scss +5 -0
  145. package/gradient-text/styles/_index.scss +5 -0
  146. package/i18n/en.json +74 -6
  147. package/i18n/ru.json +74 -6
  148. package/icon/styles/_index.scss +5 -0
  149. package/keyboard/styles/_index.scss +5 -0
  150. package/llms-full.txt +123 -62
  151. package/llms.txt +29 -8
  152. package/loading-bar/styles/_index.scss +5 -0
  153. package/marquee/styles/_index.scss +7 -2
  154. package/overlay/styles/_index.scss +5 -0
  155. package/package.json +13 -1
  156. package/popover/styles/_index.scss +48 -12
  157. package/pull-to-refresh/styles/_index.scss +5 -0
  158. package/result/styles/_index.scss +3 -3
  159. package/schematics/icon-set/index.js +80 -34
  160. package/schematics/icon-set/schema.json +8 -3
  161. package/schematics/ng-add/index.js +5 -2
  162. package/schematics/page/templates.js +17 -21
  163. package/schematics/provider/index.js +31 -13
  164. package/schematics/provider/schema.json +40 -24
  165. package/schematics/use/index.js +5 -1
  166. package/schematics/use/schema.json +8 -3
  167. package/schematics/use/symbol-map.json +6 -177
  168. package/segmented/styles/_index.scss +1 -1
  169. package/select/styles/_index.scss +7 -3
  170. package/shiny-text/styles/_index.scss +5 -0
  171. package/speed-dial/styles/_index.scss +12 -1
  172. package/spotlight-card/styles/_index.scss +5 -0
  173. package/squircle/styles/_index.scss +5 -0
  174. package/star-border/styles/_index.scss +5 -0
  175. package/statistic/styles/_index.scss +2 -2
  176. package/styles/_animations.scss +6 -0
  177. package/styles.scss +3 -0
  178. package/table/styles/_index.scss +100 -2
  179. package/theme/styles/_colors.scss +43 -1
  180. package/theme/styles/_dark.scss +18 -6
  181. package/theme/styles/_focus.scss +2 -8
  182. package/tilt-card/styles/_index.scss +5 -0
  183. package/toast/styles/_index.scss +6 -3
  184. package/tour/styles/_index.scss +63 -0
  185. package/transfer/styles/_index.scss +105 -0
  186. package/types/ngwr-alert.d.ts +4 -1
  187. package/types/ngwr-avatar.d.ts +1 -1
  188. package/types/ngwr-back-top.d.ts +3 -2
  189. package/types/ngwr-badge.d.ts +1 -1
  190. package/types/ngwr-border-glow.d.ts +0 -1
  191. package/types/ngwr-carousel.d.ts +10 -1
  192. package/types/ngwr-cascader.d.ts +12 -1
  193. package/types/ngwr-checkbox.d.ts +9 -1
  194. package/types/ngwr-command-palette.d.ts +4 -1
  195. package/types/ngwr-date-picker.d.ts +9 -1
  196. package/types/ngwr-density.d.ts +1 -1
  197. package/types/ngwr-divider.d.ts +1 -1
  198. package/types/ngwr-event-calendar.d.ts +358 -0
  199. package/types/ngwr-form.d.ts +177 -20
  200. package/types/ngwr-fuzzy-text.d.ts +8 -0
  201. package/types/ngwr-gauge.d.ts +4 -1
  202. package/types/ngwr-i18n.d.ts +15 -0
  203. package/types/ngwr-input-number.d.ts +8 -1
  204. package/types/ngwr-input.d.ts +50 -20
  205. package/types/ngwr-knob.d.ts +4 -1
  206. package/types/ngwr-lightbox.d.ts +7 -1
  207. package/types/ngwr-line-chart.d.ts +1 -1
  208. package/types/ngwr-media.d.ts +1 -1
  209. package/types/ngwr-meter-group.d.ts +9 -1
  210. package/types/ngwr-page-header.d.ts +2 -2
  211. package/types/ngwr-pagination.d.ts +1 -1
  212. package/types/ngwr-progress.d.ts +4 -1
  213. package/types/ngwr-rating.d.ts +3 -2
  214. package/types/ngwr-result.d.ts +12 -6
  215. package/types/ngwr-segmented.d.ts +6 -0
  216. package/types/ngwr-select.d.ts +13 -7
  217. package/types/ngwr-shiny-text.d.ts +2 -4
  218. package/types/ngwr-speed-dial.d.ts +7 -1
  219. package/types/ngwr-squircle.d.ts +1 -1
  220. package/types/ngwr-switch.d.ts +7 -1
  221. package/types/ngwr-table.d.ts +126 -6
  222. package/types/ngwr-tabs.d.ts +1 -4
  223. package/types/ngwr-textarea.d.ts +8 -1
  224. package/types/ngwr-toolbar.d.ts +2 -2
  225. package/types/ngwr-tour.d.ts +132 -0
  226. package/types/ngwr-transfer.d.ts +118 -0
  227. package/types/ngwr-tree.d.ts +10 -2
  228. package/types/ngwr-validators.d.ts +62 -2
  229. package/types/ngwr-version.d.ts +2 -2
  230. package/typewriter/styles/_index.scss +5 -0
  231. package/typography/styles/_index.scss +3 -3
  232. package/virtual-scroll/styles/_index.scss +6 -1
  233. package/waves/styles/_index.scss +5 -0
@@ -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 = "10.0.0";
19
+ declare const NGWR_VERSION = "10.1.0";
20
20
 
21
21
  /**
22
22
  * @license
@@ -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,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
  // 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.