@slotted/angular 0.1.0-beta.35 → 0.1.0-beta.36

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 (73) hide show
  1. package/docs/button.json +10 -7
  2. package/docs/button.md +6 -6
  3. package/docs/command-palette.json +2 -1
  4. package/docs/command-palette.md +1 -1
  5. package/docs/dashboard-grid.json +2 -1
  6. package/docs/dashboard-grid.md +1 -1
  7. package/docs/entity-picker.json +2 -1
  8. package/docs/entity-picker.md +1 -1
  9. package/docs/field-group.json +1 -1
  10. package/docs/field-group.md +1 -1
  11. package/docs/guidelines/index.md +2 -0
  12. package/docs/guidelines/own-elements.md +20 -0
  13. package/docs/index.md +1 -1
  14. package/docs/list.json +2 -1
  15. package/docs/list.md +2 -2
  16. package/docs/page.json +1 -1
  17. package/docs/page.md +1 -1
  18. package/docs/progress-indicator.json +1 -39
  19. package/docs/progress-indicator.md +1 -6
  20. package/docs/radio-group.json +1 -18
  21. package/docs/radio-group.md +1 -3
  22. package/docs/skills/build-own-element/SKILL.md +42 -2
  23. package/docs/sparkline.json +1 -416
  24. package/docs/sparkline.md +2 -186
  25. package/docs/tokens.md +12 -0
  26. package/fesm2022/slotted-angular-button.mjs +48 -40
  27. package/fesm2022/slotted-angular-button.mjs.map +1 -1
  28. package/fesm2022/slotted-angular-chart.mjs +2 -2
  29. package/fesm2022/slotted-angular-chart.mjs.map +1 -1
  30. package/fesm2022/slotted-angular-command-palette.mjs +2 -2
  31. package/fesm2022/slotted-angular-command-palette.mjs.map +1 -1
  32. package/fesm2022/slotted-angular-dashboard-grid.mjs +2 -2
  33. package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
  34. package/fesm2022/slotted-angular-data-list.mjs +2 -2
  35. package/fesm2022/slotted-angular-data-list.mjs.map +1 -1
  36. package/fesm2022/slotted-angular-entity-picker.mjs +2 -2
  37. package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
  38. package/fesm2022/slotted-angular-field-group.mjs +2 -2
  39. package/fesm2022/slotted-angular-field-group.mjs.map +1 -1
  40. package/fesm2022/slotted-angular-list-item.mjs +2 -2
  41. package/fesm2022/slotted-angular-list-item.mjs.map +1 -1
  42. package/fesm2022/slotted-angular-list.mjs +3 -3
  43. package/fesm2022/slotted-angular-list.mjs.map +1 -1
  44. package/fesm2022/slotted-angular-loading-overlay.mjs +2 -2
  45. package/fesm2022/slotted-angular-loading-overlay.mjs.map +1 -1
  46. package/fesm2022/slotted-angular-page.mjs +6 -2
  47. package/fesm2022/slotted-angular-page.mjs.map +1 -1
  48. package/fesm2022/slotted-angular-progress-indicator.mjs +7 -106
  49. package/fesm2022/slotted-angular-progress-indicator.mjs.map +1 -1
  50. package/fesm2022/slotted-angular-radio-group.mjs +12 -45
  51. package/fesm2022/slotted-angular-radio-group.mjs.map +1 -1
  52. package/fesm2022/slotted-angular-sparkline.mjs +4 -295
  53. package/fesm2022/slotted-angular-sparkline.mjs.map +1 -1
  54. package/fesm2022/slotted-angular-split-button.mjs +4 -4
  55. package/fesm2022/slotted-angular-split-button.mjs.map +1 -1
  56. package/fesm2022/slotted-angular-table.mjs +2 -2
  57. package/fesm2022/slotted-angular-table.mjs.map +1 -1
  58. package/fesm2022/slotted-angular-tooltip.mjs +2 -2
  59. package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
  60. package/fesm2022/slotted-angular-upload.mjs +2 -2
  61. package/fesm2022/slotted-angular-upload.mjs.map +1 -1
  62. package/package.json +3 -3
  63. package/types/slotted-angular-button.d.ts +20 -10
  64. package/types/slotted-angular-button.d.ts.map +1 -1
  65. package/types/slotted-angular-list.d.ts +6 -4
  66. package/types/slotted-angular-list.d.ts.map +1 -1
  67. package/types/slotted-angular-page.d.ts.map +1 -1
  68. package/types/slotted-angular-progress-indicator.d.ts +2 -46
  69. package/types/slotted-angular-progress-indicator.d.ts.map +1 -1
  70. package/types/slotted-angular-radio-group.d.ts +4 -22
  71. package/types/slotted-angular-radio-group.d.ts.map +1 -1
  72. package/types/slotted-angular-sparkline.d.ts +4 -86
  73. package/types/slotted-angular-sparkline.d.ts.map +1 -1
package/docs/sparkline.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <!-- index: ./index.md -->
2
2
  # sparkline
3
3
 
4
- `data-ui="sparkline"` · Word-sized graphics: a trend, a position, a comparison.
4
+ `data-ui="sparkline"` · Word-sized graphics: a trend in a line or bars.
5
5
 
6
6
  ## Import
7
7
 
@@ -11,18 +11,6 @@ import { SlSparkline, provideSparklineDefaults } from '@slotted/angular/sparklin
11
11
 
12
12
  Selector: `[slSparkline]` · exportAs: `slSparkline`
13
13
 
14
- ```ts
15
- import { SlPositionStrip } from '@slotted/angular/sparkline';
16
- ```
17
-
18
- Selector: `[slPositionStrip]` · exportAs: `slPositionStrip`
19
-
20
- ```ts
21
- import { SlBarCompare } from '@slotted/angular/sparkline';
22
- ```
23
-
24
- Selector: `[slBarCompare]` · exportAs: `slBarCompare`
25
-
26
14
  ## Minimal example
27
15
 
28
16
  Excerpt — not a complete module
@@ -33,8 +21,6 @@ Excerpt — not a complete module
33
21
 
34
22
  ## Anatomy
35
23
 
36
- ### sparkline
37
-
38
24
  | Part | Element | Required |
39
25
  | --- | --- | --- |
40
26
  | `root` | span | yes |
@@ -46,37 +32,8 @@ Excerpt — not a complete module
46
32
  | `ring` | path | no |
47
33
  | `marker` | path | no |
48
34
 
49
- ### positionStrip
50
-
51
- | Part | Element | Required |
52
- | --- | --- | --- |
53
- | `root` | span | yes |
54
- | `track` | span | yes |
55
- | `band` | span | no |
56
- | `dot` | span | no |
57
- | `value` | span | no |
58
- | `reference` | span | no |
59
- | `zero` | span | no |
60
- | `start` | span | yes |
61
- | `end` | span | yes |
62
-
63
- ### barCompare
64
-
65
- | Part | Element | Required |
66
- | --- | --- | --- |
67
- | `root` | span | yes |
68
- | `row` | span | yes |
69
- | `label` | span | yes |
70
- | `track` | span | yes |
71
- | `bar` | span | yes |
72
- | `value` | span | yes |
73
- | `zero` | span | no |
74
- | `tick` | span | no |
75
-
76
35
  ## Props
77
36
 
78
- ### sparkline
79
-
80
37
  | Name | Type | Default | Applies to | Description |
81
38
  | --- | --- | --- | --- | --- |
82
39
  | `data` | `(number \| null)[]` | — | Sparkline | The series, oldest first. null is a gap: the line breaks, the bar is not drawn, the summary ignores it |
@@ -102,38 +59,6 @@ Excerpt — not a complete module
102
59
  | `--slotted-sparkline-color` | `custom property` | — | a container | What a sparkline with no tone and no series is drawn in. stat-card writes it on its trend from the delta’s tone |
103
60
  | `provideSparklineDefaults` | `SparklineDefaults` | — | Application | Sets curve, area, marker and formatOptions once, in a route or the application config; an input still wins |
104
61
 
105
- ### positionStrip
106
-
107
- | Name | Type | Default | Applies to | Description |
108
- | --- | --- | --- | --- | --- |
109
- | `value` | `number \| null` | — | slPositionStrip | The current value |
110
- | `values` | `(number \| null)[]` | — | slPositionStrip | The periods, oldest first; null is a gap |
111
- | `reference` | `number` | — | slPositionStrip | A dashed tick, which widens the extent |
112
- | `min` | `number` | — | slPositionStrip | Widens the extent, for rows that line up |
113
- | `max` | `number` | — | slPositionStrip | Widens the extent, for rows that line up |
114
- | `hideValue` | `boolean` | false | slPositionStrip | Leaves the value dot out, and says so |
115
- | `size` | `'sm' \| 'md' \| 'lg'` | md | slPositionStrip | The height of the track |
116
- | `label` | `string` | — | slPositionStrip | What the strip is, said first in the name |
117
- | `formatOptions` | `Intl.NumberFormatOptions` | — | slPositionStrip | How a number is written, on the page and in the name |
118
- | `valueFormatter` | `(value: number) => string` | — | slPositionStrip | Writes a number instead |
119
- | `locale` | `string` | — | slPositionStrip | The locale; the language in force when absent |
120
- | `description` | `string` | — | slPositionStrip | The whole accessible name |
121
- | `tone` | `'neutral' \| 'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | — | slPositionStrip | How the value is doing |
122
-
123
- ### barCompare
124
-
125
- | Name | Type | Default | Applies to | Description |
126
- | --- | --- | --- | --- | --- |
127
- | `data` | `{ label: string; value: number; texture?: boolean }[]` | — | slBarCompare | One row per value |
128
- | `min` | `number` | — | slBarCompare | The low end of the domain; zero and the data widen it |
129
- | `max` | `number` | — | slBarCompare | The high end of the domain; zero and the data widen it |
130
- | `step` | `number` | — | slBarCompare | The distance between two ticks |
131
- | `formatOptions` | `Intl.NumberFormatOptions` | — | slBarCompare | How a number is written, on the page and in the name |
132
- | `valueFormatter` | `(value: number) => string` | — | slBarCompare | Writes a number instead |
133
- | `locale` | `string` | — | slBarCompare | The locale; the language in force when absent |
134
- | `description` | `string` | — | slBarCompare | The whole accessible name |
135
- | `tone` | `'neutral' \| 'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | — | slBarCompare | How the value is doing |
136
-
137
62
  ## Axes and defaults
138
63
 
139
64
  | Axis | Values | Default |
@@ -152,16 +77,10 @@ Excerpt — not a complete module
152
77
  - Color never carries the reading alone: the direction is in the description, the current bar is the last one by position as well as by color, and a tone is a second encoding on top of the shape.
153
78
  - Under forced colors the data scale and the tones map to CanvasText, the wash is withdrawn, earlier bars take GrayText and the current one CanvasText, so a series still reads as one.
154
79
  - The eight slots of the data scale were chosen by measurement: adjacent slots separate by at least ΔE 16.8 under simulated protanopia and deuteranopia in every scheme, and every slot clears 3:1 against every surface.
155
- - The root carries role="img" and a name built from the value, the smallest and largest period and the reference, because those are the numbers the strip exists to compare.
156
- - Every mark is hidden from the tree by being inside the image: nothing is focusable and nothing answers a key, as for a sparkline.
157
- - The value is told apart by size and a ring as well as by color, and the reference by its dash; under forced colors the dots and the band take GrayText and the value CanvasText.
158
- - The root carries role="img" named by every row’s label and value, in order: the comparison is read as the list of numbers it draws.
159
- - A negative value is written with its sign and drawn left of the zero line; the sign never depends on the color.
160
- - texture tells a reference from the subject without color, and forced colors draw it as CanvasText stripes over Canvas.
161
80
 
162
81
  ## Tokens
163
82
 
164
- `--slotted-border-strong`, `--slotted-border-width-medium`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-data-1`, `--slotted-data-2`, `--slotted-data-3`, `--slotted-data-4`, `--slotted-data-5`, `--slotted-data-6`, `--slotted-data-7`, `--slotted-data-8`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-font-size-xs`, `--slotted-line-height-sm`, `--slotted-radius-full`, `--slotted-space-11`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-7`, `--slotted-space-9`, `--slotted-sparkline-area-opacity`, `--slotted-sparkline-bar-share`, `--slotted-sparkline-bar-thickness`, `--slotted-sparkline-block-size`, `--slotted-sparkline-block-size-lg`, `--slotted-sparkline-block-size-sm`, `--slotted-sparkline-color`, `--slotted-sparkline-end-size`, `--slotted-sparkline-label-size`, `--slotted-sparkline-line-width`, `--slotted-sparkline-line-width-sm`, `--slotted-sparkline-marker-size`, `--slotted-sparkline-marker-size-lg`, `--slotted-sparkline-marker-size-sm`, `--slotted-sparkline-min-inline-size`, `--slotted-sparkline-reference-color`, `--slotted-sparkline-ring-color`, `--slotted-sparkline-ring-width`, `--slotted-sparkline-ring-width-sm`, `--slotted-sparkline-value-size`, `--slotted-surface`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-info-text`, `--slotted-tone-secondary-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`
83
+ `--slotted-border-strong`, `--slotted-border-width-medium`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-data-1`, `--slotted-data-2`, `--slotted-data-3`, `--slotted-data-4`, `--slotted-data-5`, `--slotted-data-6`, `--slotted-data-7`, `--slotted-data-8`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-space-11`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-7`, `--slotted-space-9`, `--slotted-sparkline-area-opacity`, `--slotted-sparkline-bar-share`, `--slotted-sparkline-block-size`, `--slotted-sparkline-block-size-lg`, `--slotted-sparkline-block-size-sm`, `--slotted-sparkline-color`, `--slotted-sparkline-line-width`, `--slotted-sparkline-line-width-sm`, `--slotted-sparkline-marker-size`, `--slotted-sparkline-marker-size-lg`, `--slotted-sparkline-marker-size-sm`, `--slotted-sparkline-min-inline-size`, `--slotted-sparkline-reference-color`, `--slotted-sparkline-ring-color`, `--slotted-sparkline-ring-width`, `--slotted-sparkline-ring-width-sm`, `--slotted-surface-raised`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-info-text`, `--slotted-tone-secondary-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`
165
84
 
166
85
  ## Examples
167
86
 
@@ -285,106 +204,3 @@ Excerpt — not a complete module
285
204
  label="Fill rate"
286
205
  ></span>
287
206
  ```
288
-
289
- ### Playground
290
-
291
- This month’s savings against the eight months before it: each small dot is a month, the band their span, the large dot this month, the dashed tick their mean.
292
-
293
- Excerpt — not a complete module
294
-
295
- ```html
296
- <span slPositionStrip label="Savings" [reference]="1200" [value]="800" [values]="periods"></span>
297
- ```
298
-
299
- ### Rows that line up
300
-
301
- In a table, a value column writes the number and the strip shows where it stands. Every row states one min and max, so the rows write the same ends and their tracks line up.
302
-
303
- Excerpt — not a complete module
304
-
305
- ```html
306
- <span
307
- slPositionStrip
308
- label="Savings"
309
- [max]="3000"
310
- [min]="-1000"
311
- [value]="800"
312
- [values]="savings"
313
- ></span>
314
- <span
315
- slPositionStrip
316
- label="Debt service"
317
- [max]="3000"
318
- [min]="-1000"
319
- [value]="2200"
320
- [values]="debt"
321
- ></span>
322
- ```
323
-
324
- ### A value not known yet
325
-
326
- hideValue leaves the value dot out while the period is incomplete, and the name says the value is pending rather than reading the last one.
327
-
328
- Excerpt — not a complete module
329
-
330
- ```html
331
- <span slPositionStrip hideValue label="Savings" [values]="periods"></span>
332
- ```
333
-
334
- ### What a reader hears
335
-
336
- The root is an image named “Savings: R$800.00, against a range of -R$500.00 to R$2,500.00, reference R$1,200.00”, every number in the locale and format given.
337
-
338
- Excerpt — not a complete module
339
-
340
- ```html
341
- <span
342
- slPositionStrip
343
- label="Savings"
344
- [formatOptions]="currency"
345
- [reference]="1200"
346
- [value]="800"
347
- [values]="periods"
348
- ></span>
349
- ```
350
-
351
- ### Playground
352
-
353
- A result against a benchmark on one signed axis: the negative result hangs left of the zero line and each value is written at its bar’s end.
354
-
355
- Excerpt — not a complete module
356
-
357
- ```html
358
- <span slBarCompare [data]="pair"></span>
359
- ```
360
-
361
- ### One axis across sections
362
-
363
- Roots that state the same min, max and step draw the same axis and the same ticks, so pairs in separate sections compare at a glance.
364
-
365
- Excerpt — not a complete module
366
-
367
- ```html
368
- <span slBarCompare [data]="march" [max]="800" [min]="-1600" [step]="800"></span>
369
- <span slBarCompare [data]="april" [max]="800" [min]="-1600" [step]="800"></span>
370
- ```
371
-
372
- ### A reference told apart without color
373
-
374
- texture hatches a row’s fill, so the reference reads as a reference in grayscale, in print and under forced colors.
375
-
376
- Excerpt — not a complete module
377
-
378
- ```html
379
- <span slBarCompare [data]="withIndex"></span>
380
- ```
381
-
382
- ### What a reader hears
383
-
384
- The root is an image named by every row: “Result: -1,000; Benchmark: 33”, each value in the locale and format given; description replaces it.
385
-
386
- Excerpt — not a complete module
387
-
388
- ```html
389
- <span slBarCompare [data]="pair" [formatOptions]="currency"></span>
390
- ```
package/docs/tokens.md CHANGED
@@ -438,6 +438,18 @@ How strong the band behind a matched span is.
438
438
  | --- | --- | --- |
439
439
  | `--slotted-highlight-tint-opacity` | The share of `--slotted-tone-accent-text` in the band behind a matched span. | 0.075 |
440
440
 
441
+ ## mark
442
+
443
+ How the track, the dot and the ring of a small data mark are drawn.
444
+
445
+ | Token | Meaning | Default value |
446
+ | --- | --- | --- |
447
+ | `--slotted-mark-track-thickness` | The thickness of the track a mark is placed on. | 0.25rem |
448
+ | `--slotted-mark-dot-size` | The diameter of a dot that stands for one value. | 0.375rem |
449
+ | `--slotted-mark-ring-width` | The width of the ring that separates the current value's dot from what it covers. | 2px |
450
+ | `--slotted-mark-track-color` | The color of the track, quieter than any mark on it. | by scheme |
451
+ | `--slotted-mark-ring-color` | The color of that ring: the ground a mark stands on. | by scheme |
452
+
441
453
  ## current
442
454
 
443
455
  How the place the reader is on is marked.