ngwr 14.7.0 → 14.8.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 (152) hide show
  1. package/bar-chart/styles/_index.scss +1 -0
  2. package/calendar-heatmap/styles/_index.scss +1 -0
  3. package/cascader/styles/_rules.scss +86 -14
  4. package/date-picker/styles/_index.scss +30 -0
  5. package/density/styles/_index.scss +4 -2
  6. package/donut-chart/styles/_index.scss +10 -0
  7. package/dropdown/styles/_index.scss +67 -5
  8. package/event-calendar/styles/_index.scss +209 -35
  9. package/fesm2022/ngwr-bar-chart.mjs +29 -4
  10. package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
  11. package/fesm2022/ngwr-calendar-heatmap.mjs +59 -4
  12. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  13. package/fesm2022/ngwr-cascader.mjs +2 -2
  14. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  15. package/fesm2022/ngwr-checkbox.mjs +12 -2
  16. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  17. package/fesm2022/ngwr-date-picker.mjs +705 -46
  18. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  19. package/fesm2022/ngwr-donut-chart.mjs +46 -4
  20. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  21. package/fesm2022/ngwr-dropdown.mjs +166 -17
  22. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  23. package/fesm2022/ngwr-event-calendar.mjs +9 -2
  24. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  25. package/fesm2022/ngwr-form.mjs +52 -1
  26. package/fesm2022/ngwr-form.mjs.map +1 -1
  27. package/fesm2022/ngwr-gauge.mjs +33 -4
  28. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  29. package/fesm2022/ngwr-i18n-ar.mjs +2 -0
  30. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  31. package/fesm2022/ngwr-i18n-cs.mjs +2 -0
  32. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  33. package/fesm2022/ngwr-i18n-de.mjs +2 -0
  34. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  35. package/fesm2022/ngwr-i18n-en.mjs +5 -0
  36. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  37. package/fesm2022/ngwr-i18n-es.mjs +2 -0
  38. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  39. package/fesm2022/ngwr-i18n-fr.mjs +2 -0
  40. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  41. package/fesm2022/ngwr-i18n-he.mjs +2 -0
  42. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  43. package/fesm2022/ngwr-i18n-hi.mjs +2 -0
  44. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  45. package/fesm2022/ngwr-i18n-id.mjs +2 -0
  46. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  47. package/fesm2022/ngwr-i18n-it.mjs +2 -0
  48. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  49. package/fesm2022/ngwr-i18n-ja.mjs +2 -0
  50. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  51. package/fesm2022/ngwr-i18n-ko.mjs +2 -0
  52. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  53. package/fesm2022/ngwr-i18n-nl.mjs +2 -0
  54. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  55. package/fesm2022/ngwr-i18n-pl.mjs +2 -0
  56. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  57. package/fesm2022/ngwr-i18n-pt.mjs +2 -0
  58. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  59. package/fesm2022/ngwr-i18n-ru.mjs +2 -0
  60. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  61. package/fesm2022/ngwr-i18n-sv.mjs +2 -0
  62. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  63. package/fesm2022/ngwr-i18n-tr.mjs +2 -0
  64. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  65. package/fesm2022/ngwr-i18n-uk.mjs +2 -0
  66. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  67. package/fesm2022/ngwr-i18n-vi.mjs +2 -0
  68. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  69. package/fesm2022/ngwr-i18n-zh-TW.mjs +2 -0
  70. package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -1
  71. package/fesm2022/ngwr-i18n-zh.mjs +2 -0
  72. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  73. package/fesm2022/ngwr-input-number.mjs +12 -0
  74. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  75. package/fesm2022/ngwr-line-chart.mjs +16 -5
  76. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  77. package/fesm2022/ngwr-meter-group-testing.mjs +7 -3
  78. package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -1
  79. package/fesm2022/ngwr-meter-group.mjs +24 -4
  80. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  81. package/fesm2022/ngwr-page-header.mjs +10 -2
  82. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  83. package/fesm2022/ngwr-popover.mjs +569 -7
  84. package/fesm2022/ngwr-popover.mjs.map +1 -1
  85. package/fesm2022/ngwr-sidebar.mjs +7 -0
  86. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  87. package/fesm2022/ngwr-sparkline.mjs +82 -8
  88. package/fesm2022/ngwr-sparkline.mjs.map +1 -1
  89. package/fesm2022/ngwr-table.mjs +1 -1
  90. package/fesm2022/ngwr-table.mjs.map +1 -1
  91. package/fesm2022/ngwr-toolbar.mjs +7 -0
  92. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  93. package/fesm2022/ngwr-version.mjs +1 -1
  94. package/fesm2022/ngwr-version.mjs.map +1 -1
  95. package/form/styles/_index.scss +11 -1
  96. package/gauge/styles/_index.scss +1 -0
  97. package/i18n/ar.json +3 -1
  98. package/i18n/cs.json +3 -1
  99. package/i18n/de.json +3 -1
  100. package/i18n/en.json +3 -1
  101. package/i18n/es.json +3 -1
  102. package/i18n/fr.json +3 -1
  103. package/i18n/he.json +3 -1
  104. package/i18n/hi.json +3 -1
  105. package/i18n/id.json +3 -1
  106. package/i18n/it.json +3 -1
  107. package/i18n/ja.json +3 -1
  108. package/i18n/ko.json +3 -1
  109. package/i18n/nl.json +3 -1
  110. package/i18n/pl.json +3 -1
  111. package/i18n/pt.json +3 -1
  112. package/i18n/ru.json +3 -1
  113. package/i18n/sv.json +3 -1
  114. package/i18n/tr.json +3 -1
  115. package/i18n/uk.json +3 -1
  116. package/i18n/vi.json +3 -1
  117. package/i18n/zh-TW.json +3 -1
  118. package/i18n/zh.json +3 -1
  119. package/input/styles/_index.scss +19 -0
  120. package/input-number/styles/_index.scss +69 -0
  121. package/line-chart/styles/_index.scss +30 -2
  122. package/llms-full.txt +3 -3
  123. package/meter-group/styles/_index.scss +1 -0
  124. package/overlay/styles/_arrow.scss +27 -2
  125. package/package.json +1 -1
  126. package/page-header/styles/_index.scss +37 -1
  127. package/pagination/styles/_index.scss +9 -5
  128. package/popover/styles/_index.scss +73 -5
  129. package/select/styles/_index.scss +48 -9
  130. package/sidebar/styles/_index.scss +34 -2
  131. package/sparkline/styles/_index.scss +19 -0
  132. package/toolbar/styles/_index.scss +35 -1
  133. package/tree/styles/_index.scss +45 -6
  134. package/types/ngwr-bar-chart.d.ts +19 -1
  135. package/types/ngwr-calendar-heatmap.d.ts +29 -1
  136. package/types/ngwr-checkbox.d.ts +2 -0
  137. package/types/ngwr-date-picker.d.ts +308 -43
  138. package/types/ngwr-donut-chart.d.ts +24 -1
  139. package/types/ngwr-dropdown.d.ts +22 -2
  140. package/types/ngwr-event-calendar.d.ts +8 -0
  141. package/types/ngwr-form.d.ts +35 -5
  142. package/types/ngwr-gauge.d.ts +20 -1
  143. package/types/ngwr-input-number.d.ts +7 -0
  144. package/types/ngwr-line-chart.d.ts +9 -1
  145. package/types/ngwr-meter-group-testing.d.ts +3 -2
  146. package/types/ngwr-meter-group.d.ts +14 -1
  147. package/types/ngwr-page-header.d.ts +10 -2
  148. package/types/ngwr-popover.d.ts +154 -3
  149. package/types/ngwr-sidebar.d.ts +7 -0
  150. package/types/ngwr-sparkline.d.ts +43 -1
  151. package/types/ngwr-toolbar.d.ts +7 -0
  152. package/types/ngwr-version.d.ts +1 -1
@@ -1,3 +1,4 @@
1
+ import * as ngwr_popover from 'ngwr/popover';
1
2
  import * as _angular_core from '@angular/core';
2
3
 
3
4
  /**
@@ -33,6 +34,12 @@ declare class WrGauge {
33
34
  /** Show the value text in the center. @default true */
34
35
  readonly showValue: _angular_core.InputSignalWithTransform<boolean, any>;
35
36
  readonly suffix: _angular_core.InputSignal<string>;
37
+ /**
38
+ * Show a tooltip with the reading on hover, named by `ariaLabel` when one is
39
+ * given. Pointer only — the meter announces the same reading. @default true
40
+ */
41
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, any>;
42
+ private readonly surface;
36
43
  protected readonly cx = 50;
37
44
  protected readonly cy = 50;
38
45
  protected readonly radius: _angular_core.Signal<number>;
@@ -47,8 +54,20 @@ declare class WrGauge {
47
54
  protected readonly trackPath: _angular_core.Signal<string>;
48
55
  protected readonly valuePath: _angular_core.Signal<string>;
49
56
  protected readonly viewBox = "0 0 100 56";
57
+ /**
58
+ * The reading as the meter announces it — `aria-valuetext`, the number plus the
59
+ * suffix — so the tooltip, the printed value and a screen reader all say one
60
+ * thing.
61
+ */
62
+ protected readonly valueText: _angular_core.Signal<string>;
63
+ /**
64
+ * One tooltip, pointing at the top of the dial. The whole gauge is one section.
65
+ * The label is the `ariaLabel` input and not the catalog fallback, which names
66
+ * the kind of widget rather than the reading.
67
+ */
68
+ protected readonly tip: ngwr_popover.WrChartTooltip;
50
69
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrGauge, never>;
51
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrGauge, "wr-gauge", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "trackColor": { "alias": "trackColor"; "required": false; "isSignal": true; }; "valueColor": { "alias": "valueColor"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
70
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrGauge, "wr-gauge", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "trackColor": { "alias": "trackColor"; "required": false; "isSignal": true; }; "valueColor": { "alias": "valueColor"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
52
71
  }
53
72
 
54
73
  export { WrGauge };
@@ -124,6 +124,13 @@ declare class WrInputNumber implements FormValueControl<number | null> {
124
124
  protected readonly interactive: _angular_core.Signal<boolean>;
125
125
  protected readonly atMin: _angular_core.Signal<boolean>;
126
126
  protected readonly atMax: _angular_core.Signal<boolean>;
127
+ /**
128
+ * The size and pill modifiers mirror what is bound down to the chrome, because
129
+ * the stepper column belongs to neither half of it: the field carries
130
+ * `wr-input--<size>`, the column is its SIBLING, and the group carries no size
131
+ * at all. Without a modifier of its own the column drew one 10x6 chevron at
132
+ * every size and ran its dividers into a pill's rounded end.
133
+ */
127
134
  protected readonly classes: _angular_core.Signal<string>;
128
135
  /**
129
136
  * Fraction digits the stepper rounds its arithmetic to when `decimals` says
@@ -44,6 +44,12 @@ declare class WrLineChart {
44
44
  readonly showLegend: _angular_core.InputSignalWithTransform<boolean, any>;
45
45
  /** Show dots at each data point. @default true */
46
46
  readonly showDots: _angular_core.InputSignalWithTransform<boolean, any>;
47
+ /**
48
+ * Show the hover readout: the crosshair, the point markers and the tooltip. Off
49
+ * drops all three, since a crosshair with no values beside it points at nothing.
50
+ * @default true
51
+ */
52
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, any>;
47
53
  protected readonly vbW = 600;
48
54
  protected readonly vbH = 300;
49
55
  protected readonly padding: {
@@ -55,6 +61,8 @@ declare class WrLineChart {
55
61
  private readonly host;
56
62
  /** Hovered point index (across all series) — null when no hover. */
57
63
  protected readonly hoveredIndex: _angular_core.WritableSignal<number | null>;
64
+ /** The hovered index while the readout is on, so turning `tooltip` off mid-hover clears it. */
65
+ protected readonly activeIndex: _angular_core.Signal<number | null>;
58
66
  /**
59
67
  * A dash pattern per series, so the lines are told apart by SHAPE and not
60
68
  * only by hue.
@@ -140,7 +148,7 @@ declare class WrLineChart {
140
148
  protected readonly viewBox: _angular_core.Signal<string>;
141
149
  protected readonly hostEl: HTMLElement;
142
150
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrLineChart, never>;
143
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrLineChart, "wr-line-chart", never, { "series": { "alias": "series"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "xLabels": { "alias": "xLabels"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "showGrid": { "alias": "showGrid"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "showDots": { "alias": "showDots"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
151
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrLineChart, "wr-line-chart", never, { "series": { "alias": "series"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "xLabels": { "alias": "xLabels"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "showGrid": { "alias": "showGrid"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "showDots": { "alias": "showDots"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
144
152
  }
145
153
 
146
154
  export { WrLineChart };
@@ -33,8 +33,9 @@ interface WrMeterGroupSlice {
33
33
  * Test harness for `<wr-meter-group>` — one bar divided into labelled bands.
34
34
  *
35
35
  * **The bar is a single `progressbar`, and its value is the TOTAL.** The bands
36
- * themselves announce nothing: they carry a `title` for a mouse and their share as an
37
- * inline width, and the legend is where their labels and values are readable. So a
36
+ * themselves announce nothing: they carry a hover tooltip (or, with `tooltip` off, a
37
+ * `title`) for a mouse and their share as an inline width, and the legend is where
38
+ * their labels and values are readable. So a
38
39
  * spec that wants "how much of each" reads {@link getSlices} for the shares or
39
40
  * {@link getLegendLabels} / {@link getLegendValues} for what is printed, and one that
40
41
  * wants "how full" reads {@link getValue}.
@@ -1,3 +1,4 @@
1
+ import * as ngwr_popover from 'ngwr/popover';
1
2
  import * as _angular_core from '@angular/core';
2
3
 
3
4
  /**
@@ -45,6 +46,13 @@ declare class WrMeterGroup {
45
46
  readonly showLegend: _angular_core.InputSignalWithTransform<boolean, any>;
46
47
  /** Show each segment's value in the legend, next to its label. @default true */
47
48
  readonly showValues: _angular_core.InputSignalWithTransform<boolean, any>;
49
+ /**
50
+ * Show a tooltip with the segment's label and value on hover. It replaces the
51
+ * band's `title`, which is written only while this is off — or the browser would
52
+ * open a second copy a moment later. @default true
53
+ */
54
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, any>;
55
+ private readonly sliceEls;
48
56
  /**
49
57
  * A segment's contribution, floored at `0` and with anything non-finite read
50
58
  * as `0`. One `NaN` used to poison the whole bar: the sum is `NaN` as soon as
@@ -67,8 +75,13 @@ declare class WrMeterGroup {
67
75
  color: string;
68
76
  percent: number;
69
77
  }[]>;
78
+ /**
79
+ * One tooltip for the whole bar, pointing at the hovered band, with the value as
80
+ * the legend prints it.
81
+ */
82
+ protected readonly tip: ngwr_popover.WrChartTooltip;
70
83
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrMeterGroup, never>;
71
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrMeterGroup, "wr-meter-group", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "segments": { "alias": "segments"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "showValues": { "alias": "showValues"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
84
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrMeterGroup, "wr-meter-group", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "segments": { "alias": "segments"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "showValues": { "alias": "showValues"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
72
85
  }
73
86
 
74
87
  export { WrMeterGroup };
@@ -6,6 +6,14 @@ import * as _angular_core from '@angular/core';
6
6
  * side), `[wrPageHeaderExtra]` (bottom row of tags / metadata). Title +
7
7
  * subtitle come from inputs.
8
8
  *
9
+ * A bare `<div>` wrapper in the actions slot, one with no `class` and no
10
+ * `style`, is laid out as a wrapping row with the actions region's own gap, so
11
+ * the buttons inside it are spaced exactly like buttons projected one by one.
12
+ * The gap follows `--wr-density-gap`. Give the wrapper a class or a style and
13
+ * its layout is yours: the header sets nothing on it. The extra row spaces its
14
+ * own children and leaves a wrapper alone, since that is where metadata prose
15
+ * goes, so project tags through an `<ng-container>` as below.
16
+ *
9
17
  * @example
10
18
  * ```html
11
19
  * <wr-page-header title="Settings" subtitle="Manage your workspace">
@@ -14,10 +22,10 @@ import * as _angular_core from '@angular/core';
14
22
  * <button wr-btn>Invite</button>
15
23
  * <button wr-btn color="primary">Save</button>
16
24
  * </div>
17
- * <div wrPageHeaderExtra>
25
+ * <ng-container wrPageHeaderExtra>
18
26
  * <wr-tag>v2.4</wr-tag>
19
27
  * <wr-tag color="success">Stable</wr-tag>
20
- * </div>
28
+ * </ng-container>
21
29
  * </wr-page-header>
22
30
  * ```
23
31
  *
@@ -1,7 +1,79 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { TemplateRef } from '@angular/core';
2
+ import { Signal, TemplateRef } from '@angular/core';
3
3
  import { BooleanInput } from '@angular/cdk/coercion';
4
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
+
12
+ /**
13
+ * What a chart's hover tooltip says about one section.
14
+ *
15
+ * @internal
16
+ */
17
+ interface WrChartTooltipDatum {
18
+ /** The series or category name. Omitted where `value` is already a whole sentence. */
19
+ readonly label?: string;
20
+ /** The value, formatted the way the chart already prints it. */
21
+ readonly value: string;
22
+ /** The section's own paint, drawn as a swatch. Omitted where colour says nothing. */
23
+ readonly color?: string;
24
+ }
25
+ /**
26
+ * Where the tooltip for one section points, and what it says.
27
+ *
28
+ * @internal
29
+ */
30
+ interface WrChartTooltipTarget {
31
+ readonly datum: WrChartTooltipDatum;
32
+ /**
33
+ * What the chip points at: an element, or a box in viewport pixels for a section
34
+ * that is not one — a zero-size point on a donut's arc. The chip sits on `side` of
35
+ * it with its arrow on the middle of that edge, and flips for room. Point at the
36
+ * section itself, not at something near it: the arrow is what tells a reader which
37
+ * of forty squares the chip is about. `null` while the element is not rendered —
38
+ * the tooltip stays closed rather than pointing at nothing.
39
+ */
40
+ readonly anchor: Element | {
41
+ readonly x: number;
42
+ readonly y: number;
43
+ readonly width?: number;
44
+ readonly height?: number;
45
+ } | null;
46
+ /**
47
+ * Which PHYSICAL side of the anchor the chip goes, before a flip for room — the
48
+ * side the section faces. A chart's geometry does not mirror with `direction`, so
49
+ * neither does this: `right` is the right in RTL too. `top` and `bottom` flip to
50
+ * each other; `left` and `right` try above and below rather than the far side,
51
+ * which is the chart itself. @default 'top'
52
+ */
53
+ readonly side?: 'top' | 'bottom' | 'left' | 'right';
54
+ }
55
+ /**
56
+ * The handle {@link useChartTooltip} returns to a chart.
57
+ *
58
+ * @internal
59
+ */
60
+ interface WrChartTooltip {
61
+ /** The section the tooltip is showing, or `null`. Always `null` while the chart opted out. */
62
+ readonly active: Signal<number | null>;
63
+ /**
64
+ * The pointer is over section `index`. Switches straight to it when another is up —
65
+ * unless the pointer is between that one's anchor and its chip, on its way onto the
66
+ * chip, where the switch waits out the same grace as `leave`.
67
+ */
68
+ enter(index: number): void;
69
+ /**
70
+ * The pointer left the sections. Hides after a short grace period, so a pointer
71
+ * can cross the gap onto the tooltip — WCAG 1.4.13 (Hoverable) — and so moving
72
+ * between two sections through a gap does not blink it.
73
+ */
74
+ leave(event?: MouseEvent): void;
75
+ }
76
+
5
77
  /**
6
78
  * @license
7
79
  *
@@ -11,6 +83,85 @@ import { BooleanInput } from '@angular/cdk/coercion';
11
83
 
12
84
  type WrPopoverPosition = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
13
85
 
86
+ /**
87
+ * @license
88
+ *
89
+ * Use of this source code is governed by an MIT-style license that can be
90
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
91
+ */
92
+
93
+ /**
94
+ * A hover tooltip for a chart's sections, with ONE overlay per chart.
95
+ *
96
+ * **Why not `[wrPopover] mode="tooltip"` on every section.** It fits the look
97
+ * and not the shape. A year of `wr-calendar-heatmap` is 371 days, and a directive
98
+ * per day is 371 focus monitors and 371 overlays-in-waiting for a tooltip only
99
+ * one of them can show; and most sections are not an element a directive could
100
+ * point at — a donut's slice is a `<path>` whose box is most of the ring, a
101
+ * sparkline's point is a coordinate. So the chart says which section is under
102
+ * the pointer and where to point, and this owns the single overlay, the timers
103
+ * and the teardown. What IS shared with the directive is everything a reader
104
+ * sees: the `.wr-tooltip` chip, its arrow, the placements with their flip, and
105
+ * Escape.
106
+ *
107
+ * **The chip points AT the section it describes**, with its arrow on the anchor:
108
+ * above a heatmap's day, above a bar's top edge, off the outside of a donut's arc.
109
+ * The arrow is placed from a measurement rather than centred, because the chip is
110
+ * not always centred on its anchor — `withPush` slides it along the viewport edge
111
+ * for the first and last week of a year — and an arrow at the chip's middle would
112
+ * then point at a neighbour. The measurement is written to
113
+ * `--wr-chart-tooltip-arrow` on the chip, and the stylesheet puts the arrow there.
114
+ *
115
+ * **A chip at its section sits over the sections beside it**, and it is hoverable
116
+ * (below), so the way onto it can cross another section: straight up from a heatmap
117
+ * day runs through the day above. Switching the moment that day reported itself
118
+ * would move the chip away from a pointer on its way to it — WCAG 1.4.13 with extra
119
+ * steps. So the strip between the anchor and the chip is a bridge: another section
120
+ * reported from inside it waits out the same grace a leave does, a pointer still
121
+ * closing in on the chip starts that grace again however slowly it moves, and
122
+ * landing on the chip cancels the switch. Anywhere else a new section switches at
123
+ * once, so scanning a row of days does not lag. The cost is in the other direction: a
124
+ * pointer that keeps on going up a heatmap's column is moving onto the chip, so it
125
+ * passes over it and the days under it read out only once it comes out the far side.
126
+ *
127
+ * **Why an overlay and not a positioned child, the way `wr-line-chart` draws its
128
+ * own.** A child is clipped by every `overflow` between it and the page, and a
129
+ * chart sits inside those constantly: `wr-calendar-heatmap` IS a scroll
130
+ * container, and a sparkline in a `wr-table` cell sits under two more.
131
+ *
132
+ * **Pointer only, deliberately.** No section of any chart is a tab stop, and
133
+ * this does not make one — a year of days in the tab order would be the defect.
134
+ * The pane is `aria-hidden`: every value it shows is already the section's
135
+ * accessible name or the chart's own, and an orphan tooltip nothing describes
136
+ * reads as a stray line at the end of the document. It is never the only way to
137
+ * a value.
138
+ *
139
+ * SSR-safe: nothing here touches the DOM until a pointer event has moved a
140
+ * section, and the render effect that opens the overlay never runs on a server.
141
+ *
142
+ * Call from an injection context — a chart's field initialiser.
143
+ *
144
+ * @param enabled The chart's `tooltip` input. Turning it off closes an open tooltip.
145
+ * @param resolve What to show for section `index`, and where. It runs after
146
+ * render, so it may read the DOM the section just drew; the signals it reads
147
+ * are tracked, so a data change under an open tooltip re-reads it, and a
148
+ * section that no longer exists (`null`) closes it. It runs again whenever the
149
+ * chart may have moved under an open chip — a scroll anywhere, a viewport
150
+ * resize, the chart or its anchor element changing size.
151
+ * @param sectionAt For a chart whose sections are chosen by POSITION rather than by
152
+ * element — a sparkline picks the point nearest the pointer's x, anywhere over the
153
+ * drawing — the section at a viewport point, or `null` off the drawing. The chip
154
+ * points at the point from inside the drawing, so without this a pointer scrubbing
155
+ * above the line lands on the chip and the chart stops hearing it: measured in
156
+ * Chromium, a scrub along the top of a sparkline showed 9 of its 12 values. Asked on
157
+ * every pointer event while a chip is up, wherever the pointer is over the chart or its
158
+ * own chip; straight up from a point onto its chip stays on that point, so the chip is
159
+ * still hoverable. Anywhere else the chip closes after the usual grace.
160
+ *
161
+ * @internal
162
+ */
163
+ declare function useChartTooltip(enabled: Signal<boolean>, resolve: (index: number) => WrChartTooltipTarget | null, sectionAt?: (x: number, y: number) => number | null): WrChartTooltip;
164
+
14
165
  declare class WrPopover {
15
166
  /**
16
167
  * Content to render inside the panel.
@@ -150,5 +301,5 @@ declare class WrPopover {
150
301
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WrPopover, "[wrPopover]", ["wrPopover"], { "content": { "alias": "wrPopover"; "required": true; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "showDelay": { "alias": "showDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "hideDelay"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
151
302
  }
152
303
 
153
- export { WrPopover };
154
- export type { WrPopoverPosition };
304
+ export { WrPopover, useChartTooltip };
305
+ export type { WrChartTooltip, WrChartTooltipDatum, WrChartTooltipTarget, WrPopoverPosition };
@@ -36,6 +36,13 @@ declare function isGroup(entry: WrSidebarEntry): entry is WrSidebarGroup;
36
36
  * `WrSidebarItem`s (direct links) or `WrSidebarGroup`s (expand to reveal
37
37
  * child items). Active route auto-expands its containing group.
38
38
  *
39
+ * The host pads its rows by `--wr-sidebar-padding` (`0.5rem`), so a hovered or
40
+ * active row's tint stays off the edge of whatever holds the nav, a bordered
41
+ * card or a `<wr-layout-sider>`, which pads nothing itself. Where the container
42
+ * already supplies the inset, set the hook to `0` on the sidebar, not on the
43
+ * container: the host declares its own default, which shadows an inherited one
44
+ * (`.my-panel .wr-sidebar { --wr-sidebar-padding: 0 }`, or inline).
45
+ *
39
46
  * @example
40
47
  * ```html
41
48
  * <wr-sidebar [entries]="[
@@ -1,3 +1,4 @@
1
+ import * as ngwr_popover from 'ngwr/popover';
1
2
  import * as _angular_core from '@angular/core';
2
3
 
3
4
  /**
@@ -36,9 +37,24 @@ declare class WrSparkline {
36
37
  readonly width: _angular_core.InputSignal<string>;
37
38
  /** CSS height. @default '2rem' */
38
39
  readonly height: _angular_core.InputSignal<string>;
40
+ /**
41
+ * Show a tooltip with the value of the point nearest the pointer, marking that
42
+ * point, and named by `ariaLabel` when one is given. Pointer only. @default true
43
+ */
44
+ readonly tooltip: _angular_core.InputSignalWithTransform<boolean, any>;
45
+ private readonly svg;
46
+ private readonly marker;
39
47
  private readonly vbW;
40
48
  private readonly vbH;
41
49
  private readonly padding;
50
+ /**
51
+ * The data as drawn. Non-finite values are dropped rather than scaled: every
52
+ * `min`/`max` comparison against a NaN is false, so it survived into the scale and
53
+ * `toFixed(2)` wrote the literal text `NaN` into the path `d` — invalid geometry,
54
+ * and the line vanishes. The tooltip reads this list too, so the value it shows is
55
+ * the one under the point it marks.
56
+ */
57
+ private readonly values;
42
58
  /** Mapped `{ x, y }` points for the path. */
43
59
  protected readonly points: _angular_core.Signal<readonly {
44
60
  x: number;
@@ -51,8 +67,34 @@ declare class WrSparkline {
51
67
  y: number;
52
68
  } | null>;
53
69
  protected readonly viewBox: string;
70
+ /**
71
+ * One tooltip, pointing at the hovered point: above its marker, below it when there
72
+ * is no room. The marker is the anchor element itself, drawn for the point the
73
+ * tooltip reads — it renders before this runs, since both follow `tip.active()`.
74
+ *
75
+ * The chip sits INSIDE the drawing, over the stretch of line above the marker, so the
76
+ * helper is also told which point any spot over the drawing reads: a pointer scrubbing
77
+ * along the top of a sparkline would otherwise land on the chip and stop there.
78
+ */
79
+ protected readonly tip: ngwr_popover.WrChartTooltip;
80
+ /**
81
+ * The marker's place, as percentages of the box the drawing stretches to. An
82
+ * element rather than a `<circle>`: the drawing stretches to any box with
83
+ * `preserveAspectRatio="none"`, which would squash a circle into an ellipse.
84
+ */
85
+ protected readonly markerAt: _angular_core.Signal<{
86
+ x: number;
87
+ y: number;
88
+ } | null>;
89
+ protected onPointerMove(event: MouseEvent): void;
90
+ /**
91
+ * The point nearest the pointer, along x only — the points are evenly spaced, so
92
+ * that is a rounding rather than a search. A box with no width (nothing laid out
93
+ * yet) answers nothing rather than a NaN index.
94
+ */
95
+ private indexAt;
54
96
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrSparkline, never>;
55
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrSparkline, "wr-sparkline", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "showArea": { "alias": "showArea"; "required": false; "isSignal": true; }; "showTip": { "alias": "showTip"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
97
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrSparkline, "wr-sparkline", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "showArea": { "alias": "showArea"; "required": false; "isSignal": true; }; "showTip": { "alias": "showTip"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
56
98
  }
57
99
 
58
100
  export { WrSparkline };
@@ -4,6 +4,13 @@ import * as i0 from '@angular/core';
4
4
  * Action bar with three named zones — `[wrToolbarStart]`,
5
5
  * `[wrToolbarCenter]`, `[wrToolbarEnd]`. Use any one or all three.
6
6
  *
7
+ * A bare `<div>` wrapper in a zone, one with no `class` and no `style`, is laid
8
+ * out as a wrapping row with the zone's own gap, so the controls inside it are
9
+ * spaced exactly like controls projected one by one. The gap follows
10
+ * `--wr-density-gap`. Give the wrapper a class or a style and its layout is
11
+ * yours: the toolbar sets nothing on it. Put running text in a `<span>` or a
12
+ * `<p>`, which stay in inline flow.
13
+ *
7
14
  * @example
8
15
  * ```html
9
16
  * <wr-toolbar>
@@ -16,7 +16,7 @@ import { InjectionToken } from '@angular/core';
16
16
  * Distinct from `Version` exported by `@angular/core`, which reports the
17
17
  * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.
18
18
  */
19
- declare const NGWR_VERSION = "14.7.0";
19
+ declare const NGWR_VERSION = "14.8.0";
20
20
 
21
21
  /**
22
22
  * @license