@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.
- package/docs/button.json +10 -7
- package/docs/button.md +6 -6
- package/docs/command-palette.json +2 -1
- package/docs/command-palette.md +1 -1
- package/docs/dashboard-grid.json +2 -1
- package/docs/dashboard-grid.md +1 -1
- package/docs/entity-picker.json +2 -1
- package/docs/entity-picker.md +1 -1
- package/docs/field-group.json +1 -1
- package/docs/field-group.md +1 -1
- package/docs/guidelines/index.md +2 -0
- package/docs/guidelines/own-elements.md +20 -0
- package/docs/index.md +1 -1
- package/docs/list.json +2 -1
- package/docs/list.md +2 -2
- package/docs/page.json +1 -1
- package/docs/page.md +1 -1
- package/docs/progress-indicator.json +1 -39
- package/docs/progress-indicator.md +1 -6
- package/docs/radio-group.json +1 -18
- package/docs/radio-group.md +1 -3
- package/docs/skills/build-own-element/SKILL.md +42 -2
- package/docs/sparkline.json +1 -416
- package/docs/sparkline.md +2 -186
- package/docs/tokens.md +12 -0
- package/fesm2022/slotted-angular-button.mjs +48 -40
- package/fesm2022/slotted-angular-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +2 -2
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-command-palette.mjs +2 -2
- package/fesm2022/slotted-angular-command-palette.mjs.map +1 -1
- package/fesm2022/slotted-angular-dashboard-grid.mjs +2 -2
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-list.mjs +2 -2
- package/fesm2022/slotted-angular-data-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +2 -2
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-field-group.mjs +2 -2
- package/fesm2022/slotted-angular-field-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-list-item.mjs +2 -2
- package/fesm2022/slotted-angular-list-item.mjs.map +1 -1
- package/fesm2022/slotted-angular-list.mjs +3 -3
- package/fesm2022/slotted-angular-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-loading-overlay.mjs +2 -2
- package/fesm2022/slotted-angular-loading-overlay.mjs.map +1 -1
- package/fesm2022/slotted-angular-page.mjs +6 -2
- package/fesm2022/slotted-angular-page.mjs.map +1 -1
- package/fesm2022/slotted-angular-progress-indicator.mjs +7 -106
- package/fesm2022/slotted-angular-progress-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-radio-group.mjs +12 -45
- package/fesm2022/slotted-angular-radio-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-sparkline.mjs +4 -295
- package/fesm2022/slotted-angular-sparkline.mjs.map +1 -1
- package/fesm2022/slotted-angular-split-button.mjs +4 -4
- package/fesm2022/slotted-angular-split-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-table.mjs +2 -2
- package/fesm2022/slotted-angular-table.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +2 -2
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/fesm2022/slotted-angular-upload.mjs +2 -2
- package/fesm2022/slotted-angular-upload.mjs.map +1 -1
- package/package.json +3 -3
- package/types/slotted-angular-button.d.ts +20 -10
- package/types/slotted-angular-button.d.ts.map +1 -1
- package/types/slotted-angular-list.d.ts +6 -4
- package/types/slotted-angular-list.d.ts.map +1 -1
- package/types/slotted-angular-page.d.ts.map +1 -1
- package/types/slotted-angular-progress-indicator.d.ts +2 -46
- package/types/slotted-angular-progress-indicator.d.ts.map +1 -1
- package/types/slotted-angular-radio-group.d.ts +4 -22
- package/types/slotted-angular-radio-group.d.ts.map +1 -1
- package/types/slotted-angular-sparkline.d.ts +4 -86
- package/types/slotted-angular-sparkline.d.ts.map +1 -1
|
@@ -62,7 +62,47 @@ A new appearance is a new combination of tokens, never a new value.
|
|
|
62
62
|
A decision no group names is written as a literal beside a comment that says
|
|
63
63
|
why no token covers it (CP-05).
|
|
64
64
|
|
|
65
|
-
## 4.
|
|
65
|
+
## 4. A word-sized comparison
|
|
66
|
+
|
|
67
|
+
A comparison bar, a position strip and a split bar are elements of the
|
|
68
|
+
application's own: each depends on its screen — a scale shared with blocks
|
|
69
|
+
outside it, inks that carry meaning, labels placed on the mark. They start from
|
|
70
|
+
these primitives:
|
|
71
|
+
|
|
72
|
+
- `linearScale` from `@slotted/core/sparkline` takes a min, a max, the values
|
|
73
|
+
and whether zero stays inside the domain. Its at method returns a value's
|
|
74
|
+
share of the domain from 0 to 1; its zero is the share of zero, or null when
|
|
75
|
+
the domain does not cross it; its ticks method lists a tick at each multiple
|
|
76
|
+
of a step. Marks that state the same min and max draw the same axis.
|
|
77
|
+
- A share is written as a custom property of the mark and read as a
|
|
78
|
+
percentage of its track (`inset-inline-start: calc(var(--at) * 100%)`), so
|
|
79
|
+
the mark needs no measuring.
|
|
80
|
+
- A track takes `--slotted-mark-track-thickness` in
|
|
81
|
+
`--slotted-mark-track-color`. A dot takes `--slotted-mark-dot-size`, and the
|
|
82
|
+
current value's ring `--slotted-mark-ring-width` in
|
|
83
|
+
`--slotted-mark-ring-color`. A reference or zero line takes
|
|
84
|
+
`--slotted-border-strong`.
|
|
85
|
+
- The inks come from the `data` and `tone` groups; a neutral part takes
|
|
86
|
+
`--slotted-text-muted`. Under forced colors, a filled mark takes the
|
|
87
|
+
CanvasText system color and a dimmed one GrayText, with
|
|
88
|
+
`forced-color-adjust: none`.
|
|
89
|
+
- The mark is an image named by its numbers; a focusable part takes the focus
|
|
90
|
+
ring of section 6.
|
|
91
|
+
|
|
92
|
+
## 5. A gallery of illustrated choices
|
|
93
|
+
|
|
94
|
+
A choice told apart by pictures belongs to its screen's identity: its frame,
|
|
95
|
+
its chosen state and the motion of its illustration are the application's own.
|
|
96
|
+
`radio-group` draws a choice in words (CP-04). The gallery starts from:
|
|
97
|
+
|
|
98
|
+
- one native radio input per tile, visually hidden, all with one `name`, the
|
|
99
|
+
tile being its label. The platform gives one tab stop, the arrows across
|
|
100
|
+
every section that shares the name, and Enter that submits.
|
|
101
|
+
- `createRovingRadio` from `@slotted/core/focus` when the tile is a button that
|
|
102
|
+
carries the radio role, its `name` and its `value`: it gives the same
|
|
103
|
+
keyboard and reports each choice; the application writes the checked state.
|
|
104
|
+
|
|
105
|
+
## 6. Write it
|
|
66
106
|
|
|
67
107
|
1. Give each interactive part the native element that carries its role: a
|
|
68
108
|
button for an action, a link for a destination, an input for a value. Add
|
|
@@ -82,7 +122,7 @@ why no token covers it (CP-05).
|
|
|
82
122
|
step (OE-10).
|
|
83
123
|
6. Text that stands alone takes its size from the `typography` family (CP-02).
|
|
84
124
|
|
|
85
|
-
##
|
|
125
|
+
## 7. Done
|
|
86
126
|
|
|
87
127
|
1. Each `Check` of `../../guidelines/own-elements.md` passes.
|
|
88
128
|
2. The element's CSS holds no color or length literal without its comment.
|
package/docs/sparkline.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"binding": "angular",
|
|
5
5
|
"catalog": {
|
|
6
6
|
"group": "Data display",
|
|
7
|
-
"summary": "Word-sized graphics: a trend
|
|
7
|
+
"summary": "Word-sized graphics: a trend in a line or bars."
|
|
8
8
|
},
|
|
9
9
|
"axes": {
|
|
10
10
|
"type": [
|
|
@@ -69,55 +69,6 @@
|
|
|
69
69
|
"ring",
|
|
70
70
|
"marker"
|
|
71
71
|
]
|
|
72
|
-
},
|
|
73
|
-
"positionStrip": {
|
|
74
|
-
"nativeElement": "span",
|
|
75
|
-
"defaults": {
|
|
76
|
-
"size": "md",
|
|
77
|
-
"hideValue": false
|
|
78
|
-
},
|
|
79
|
-
"capabilities": [
|
|
80
|
-
"appearance",
|
|
81
|
-
"size",
|
|
82
|
-
"measurement",
|
|
83
|
-
"content"
|
|
84
|
-
],
|
|
85
|
-
"states": [
|
|
86
|
-
"default"
|
|
87
|
-
],
|
|
88
|
-
"parts": [
|
|
89
|
-
"root",
|
|
90
|
-
"track",
|
|
91
|
-
"band",
|
|
92
|
-
"dot",
|
|
93
|
-
"value",
|
|
94
|
-
"reference",
|
|
95
|
-
"zero",
|
|
96
|
-
"start",
|
|
97
|
-
"end"
|
|
98
|
-
]
|
|
99
|
-
},
|
|
100
|
-
"barCompare": {
|
|
101
|
-
"nativeElement": "span",
|
|
102
|
-
"defaults": {},
|
|
103
|
-
"capabilities": [
|
|
104
|
-
"appearance",
|
|
105
|
-
"measurement",
|
|
106
|
-
"content"
|
|
107
|
-
],
|
|
108
|
-
"states": [
|
|
109
|
-
"default"
|
|
110
|
-
],
|
|
111
|
-
"parts": [
|
|
112
|
-
"root",
|
|
113
|
-
"row",
|
|
114
|
-
"label",
|
|
115
|
-
"track",
|
|
116
|
-
"bar",
|
|
117
|
-
"value",
|
|
118
|
-
"zero",
|
|
119
|
-
"tick"
|
|
120
|
-
]
|
|
121
72
|
}
|
|
122
73
|
},
|
|
123
74
|
"docs": {
|
|
@@ -344,298 +295,6 @@
|
|
|
344
295
|
"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.",
|
|
345
296
|
"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."
|
|
346
297
|
]
|
|
347
|
-
},
|
|
348
|
-
"positionStrip": {
|
|
349
|
-
"imports": {
|
|
350
|
-
"source": "import { SlPositionStrip } from '@slotted/angular/sparkline';",
|
|
351
|
-
"selector": "[slPositionStrip]",
|
|
352
|
-
"exportAs": "slPositionStrip"
|
|
353
|
-
},
|
|
354
|
-
"anatomy": [
|
|
355
|
-
{
|
|
356
|
-
"part": "root",
|
|
357
|
-
"element": "span",
|
|
358
|
-
"required": true,
|
|
359
|
-
"purpose": "role=\"img\", data-type=\"strip\", named by the value, the span of the periods and the reference. Three columns: the two ends, each as wide as its text, and the track between them."
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
"part": "track",
|
|
363
|
-
"element": "span",
|
|
364
|
-
"required": true,
|
|
365
|
-
"purpose": "The axis every mark is placed on."
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
"part": "band",
|
|
369
|
-
"element": "span",
|
|
370
|
-
"required": false,
|
|
371
|
-
"purpose": "The span of the periods, smallest to largest, in a wash of the series color."
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
"part": "dot",
|
|
375
|
-
"element": "span",
|
|
376
|
-
"required": false,
|
|
377
|
-
"purpose": "One period, in the dimmed color."
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
"part": "value",
|
|
381
|
-
"element": "span",
|
|
382
|
-
"required": false,
|
|
383
|
-
"purpose": "The current value, larger and ringed in the ground. Absent under hideValue."
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
"part": "reference",
|
|
387
|
-
"element": "span",
|
|
388
|
-
"required": false,
|
|
389
|
-
"purpose": "A dashed tick at the reference: it is the one mark that is not data."
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
"part": "zero",
|
|
393
|
-
"element": "span",
|
|
394
|
-
"required": false,
|
|
395
|
-
"purpose": "A solid tick at zero, present when the extent crosses it."
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
"part": "start",
|
|
399
|
-
"element": "span",
|
|
400
|
-
"required": true,
|
|
401
|
-
"purpose": "The low end of the extent, written."
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
"part": "end",
|
|
405
|
-
"element": "span",
|
|
406
|
-
"required": true,
|
|
407
|
-
"purpose": "The high end of the extent, written."
|
|
408
|
-
}
|
|
409
|
-
],
|
|
410
|
-
"api": [
|
|
411
|
-
{
|
|
412
|
-
"name": "value",
|
|
413
|
-
"type": "number | null",
|
|
414
|
-
"defaultValue": "—",
|
|
415
|
-
"appliesTo": "slPositionStrip",
|
|
416
|
-
"description": "The current value"
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
"name": "values",
|
|
420
|
-
"type": "(number | null)[]",
|
|
421
|
-
"defaultValue": "—",
|
|
422
|
-
"appliesTo": "slPositionStrip",
|
|
423
|
-
"description": "The periods, oldest first; null is a gap"
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
"name": "reference",
|
|
427
|
-
"type": "number",
|
|
428
|
-
"defaultValue": "—",
|
|
429
|
-
"appliesTo": "slPositionStrip",
|
|
430
|
-
"description": "A dashed tick, which widens the extent"
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
"name": "min",
|
|
434
|
-
"type": "number",
|
|
435
|
-
"defaultValue": "—",
|
|
436
|
-
"appliesTo": "slPositionStrip",
|
|
437
|
-
"description": "Widens the extent, for rows that line up"
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
"name": "max",
|
|
441
|
-
"type": "number",
|
|
442
|
-
"defaultValue": "—",
|
|
443
|
-
"appliesTo": "slPositionStrip",
|
|
444
|
-
"description": "Widens the extent, for rows that line up"
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
"name": "hideValue",
|
|
448
|
-
"type": "boolean",
|
|
449
|
-
"defaultValue": "false",
|
|
450
|
-
"appliesTo": "slPositionStrip",
|
|
451
|
-
"description": "Leaves the value dot out, and says so"
|
|
452
|
-
},
|
|
453
|
-
{
|
|
454
|
-
"name": "size",
|
|
455
|
-
"type": "'sm' | 'md' | 'lg'",
|
|
456
|
-
"defaultValue": "md",
|
|
457
|
-
"appliesTo": "slPositionStrip",
|
|
458
|
-
"description": "The height of the track"
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"name": "label",
|
|
462
|
-
"type": "string",
|
|
463
|
-
"defaultValue": "—",
|
|
464
|
-
"appliesTo": "slPositionStrip",
|
|
465
|
-
"description": "What the strip is, said first in the name"
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
"name": "formatOptions",
|
|
469
|
-
"type": "Intl.NumberFormatOptions",
|
|
470
|
-
"defaultValue": "—",
|
|
471
|
-
"appliesTo": "slPositionStrip",
|
|
472
|
-
"description": "How a number is written, on the page and in the name"
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
"name": "valueFormatter",
|
|
476
|
-
"type": "(value: number) => string",
|
|
477
|
-
"defaultValue": "—",
|
|
478
|
-
"appliesTo": "slPositionStrip",
|
|
479
|
-
"description": "Writes a number instead"
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
"name": "locale",
|
|
483
|
-
"type": "string",
|
|
484
|
-
"defaultValue": "—",
|
|
485
|
-
"appliesTo": "slPositionStrip",
|
|
486
|
-
"description": "The locale; the language in force when absent"
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
"name": "description",
|
|
490
|
-
"type": "string",
|
|
491
|
-
"defaultValue": "—",
|
|
492
|
-
"appliesTo": "slPositionStrip",
|
|
493
|
-
"description": "The whole accessible name"
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
"name": "tone",
|
|
497
|
-
"type": "'neutral' | 'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger'",
|
|
498
|
-
"defaultValue": "—",
|
|
499
|
-
"appliesTo": "slPositionStrip",
|
|
500
|
-
"description": "How the value is doing"
|
|
501
|
-
}
|
|
502
|
-
],
|
|
503
|
-
"composition": [],
|
|
504
|
-
"events": [],
|
|
505
|
-
"accessibility": [
|
|
506
|
-
"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.",
|
|
507
|
-
"Every mark is hidden from the tree by being inside the image: nothing is focusable and nothing answers a key, as for a sparkline.",
|
|
508
|
-
"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."
|
|
509
|
-
]
|
|
510
|
-
},
|
|
511
|
-
"barCompare": {
|
|
512
|
-
"imports": {
|
|
513
|
-
"source": "import { SlBarCompare } from '@slotted/angular/sparkline';",
|
|
514
|
-
"selector": "[slBarCompare]",
|
|
515
|
-
"exportAs": "slBarCompare"
|
|
516
|
-
},
|
|
517
|
-
"anatomy": [
|
|
518
|
-
{
|
|
519
|
-
"part": "root",
|
|
520
|
-
"element": "span",
|
|
521
|
-
"required": true,
|
|
522
|
-
"purpose": "role=\"img\", data-type=\"compare\", named by every row’s label and value. Two columns: the labels, then the axis."
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
"part": "row",
|
|
526
|
-
"element": "span",
|
|
527
|
-
"required": true,
|
|
528
|
-
"purpose": "One value. data-negative below zero, data-texture with a hatched fill. Rows touch, so the zero line and the ticks run unbroken."
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
"part": "label",
|
|
532
|
-
"element": "span",
|
|
533
|
-
"required": true,
|
|
534
|
-
"purpose": "What the value is."
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
"part": "track",
|
|
538
|
-
"element": "span",
|
|
539
|
-
"required": true,
|
|
540
|
-
"purpose": "The axis, with room on both sides for the value written past a bar."
|
|
541
|
-
},
|
|
542
|
-
{
|
|
543
|
-
"part": "bar",
|
|
544
|
-
"element": "span",
|
|
545
|
-
"required": true,
|
|
546
|
-
"purpose": "From zero to the value, in the series color or hatched."
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
"part": "value",
|
|
550
|
-
"element": "span",
|
|
551
|
-
"required": true,
|
|
552
|
-
"purpose": "The value, written past the bar’s far end: after a positive bar, before a negative one."
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
"part": "zero",
|
|
556
|
-
"element": "span",
|
|
557
|
-
"required": false,
|
|
558
|
-
"purpose": "The zero line, present when the domain crosses it."
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
"part": "tick",
|
|
562
|
-
"element": "span",
|
|
563
|
-
"required": false,
|
|
564
|
-
"purpose": "A faint line at each step."
|
|
565
|
-
}
|
|
566
|
-
],
|
|
567
|
-
"api": [
|
|
568
|
-
{
|
|
569
|
-
"name": "data",
|
|
570
|
-
"type": "{ label: string; value: number; texture?: boolean }[]",
|
|
571
|
-
"defaultValue": "—",
|
|
572
|
-
"appliesTo": "slBarCompare",
|
|
573
|
-
"description": "One row per value"
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
"name": "min",
|
|
577
|
-
"type": "number",
|
|
578
|
-
"defaultValue": "—",
|
|
579
|
-
"appliesTo": "slBarCompare",
|
|
580
|
-
"description": "The low end of the domain; zero and the data widen it"
|
|
581
|
-
},
|
|
582
|
-
{
|
|
583
|
-
"name": "max",
|
|
584
|
-
"type": "number",
|
|
585
|
-
"defaultValue": "—",
|
|
586
|
-
"appliesTo": "slBarCompare",
|
|
587
|
-
"description": "The high end of the domain; zero and the data widen it"
|
|
588
|
-
},
|
|
589
|
-
{
|
|
590
|
-
"name": "step",
|
|
591
|
-
"type": "number",
|
|
592
|
-
"defaultValue": "—",
|
|
593
|
-
"appliesTo": "slBarCompare",
|
|
594
|
-
"description": "The distance between two ticks"
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
"name": "formatOptions",
|
|
598
|
-
"type": "Intl.NumberFormatOptions",
|
|
599
|
-
"defaultValue": "—",
|
|
600
|
-
"appliesTo": "slBarCompare",
|
|
601
|
-
"description": "How a number is written, on the page and in the name"
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
"name": "valueFormatter",
|
|
605
|
-
"type": "(value: number) => string",
|
|
606
|
-
"defaultValue": "—",
|
|
607
|
-
"appliesTo": "slBarCompare",
|
|
608
|
-
"description": "Writes a number instead"
|
|
609
|
-
},
|
|
610
|
-
{
|
|
611
|
-
"name": "locale",
|
|
612
|
-
"type": "string",
|
|
613
|
-
"defaultValue": "—",
|
|
614
|
-
"appliesTo": "slBarCompare",
|
|
615
|
-
"description": "The locale; the language in force when absent"
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
"name": "description",
|
|
619
|
-
"type": "string",
|
|
620
|
-
"defaultValue": "—",
|
|
621
|
-
"appliesTo": "slBarCompare",
|
|
622
|
-
"description": "The whole accessible name"
|
|
623
|
-
},
|
|
624
|
-
{
|
|
625
|
-
"name": "tone",
|
|
626
|
-
"type": "'neutral' | 'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger'",
|
|
627
|
-
"defaultValue": "—",
|
|
628
|
-
"appliesTo": "slBarCompare",
|
|
629
|
-
"description": "How the value is doing"
|
|
630
|
-
}
|
|
631
|
-
],
|
|
632
|
-
"composition": [],
|
|
633
|
-
"events": [],
|
|
634
|
-
"accessibility": [
|
|
635
|
-
"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.",
|
|
636
|
-
"A negative value is written with its sign and drawn left of the zero line; the sign never depends on the color.",
|
|
637
|
-
"texture tells a reference from the subject without color, and forced colors draw it as CanvasText stripes over Canvas."
|
|
638
|
-
]
|
|
639
298
|
}
|
|
640
299
|
},
|
|
641
300
|
"tokens": [
|
|
@@ -654,25 +313,18 @@
|
|
|
654
313
|
"--slotted-duration-medium",
|
|
655
314
|
"--slotted-duration-short",
|
|
656
315
|
"--slotted-easing-standard",
|
|
657
|
-
"--slotted-font-size-xs",
|
|
658
|
-
"--slotted-line-height-sm",
|
|
659
|
-
"--slotted-radius-full",
|
|
660
316
|
"--slotted-space-11",
|
|
661
317
|
"--slotted-space-2",
|
|
662
318
|
"--slotted-space-3",
|
|
663
319
|
"--slotted-space-4",
|
|
664
|
-
"--slotted-space-5",
|
|
665
320
|
"--slotted-space-7",
|
|
666
321
|
"--slotted-space-9",
|
|
667
322
|
"--slotted-sparkline-area-opacity",
|
|
668
323
|
"--slotted-sparkline-bar-share",
|
|
669
|
-
"--slotted-sparkline-bar-thickness",
|
|
670
324
|
"--slotted-sparkline-block-size",
|
|
671
325
|
"--slotted-sparkline-block-size-lg",
|
|
672
326
|
"--slotted-sparkline-block-size-sm",
|
|
673
327
|
"--slotted-sparkline-color",
|
|
674
|
-
"--slotted-sparkline-end-size",
|
|
675
|
-
"--slotted-sparkline-label-size",
|
|
676
328
|
"--slotted-sparkline-line-width",
|
|
677
329
|
"--slotted-sparkline-line-width-sm",
|
|
678
330
|
"--slotted-sparkline-marker-size",
|
|
@@ -683,10 +335,7 @@
|
|
|
683
335
|
"--slotted-sparkline-ring-color",
|
|
684
336
|
"--slotted-sparkline-ring-width",
|
|
685
337
|
"--slotted-sparkline-ring-width-sm",
|
|
686
|
-
"--slotted-sparkline-value-size",
|
|
687
|
-
"--slotted-surface",
|
|
688
338
|
"--slotted-surface-raised",
|
|
689
|
-
"--slotted-text",
|
|
690
339
|
"--slotted-text-muted",
|
|
691
340
|
"--slotted-tone-accent-text",
|
|
692
341
|
"--slotted-tone-danger-text",
|
|
@@ -775,70 +424,6 @@
|
|
|
775
424
|
"language": "html",
|
|
776
425
|
"source": "<span\n slSparkline\n [data]=\"fillRate\"\n [formatOptions]=\"{ style: 'percent', maximumFractionDigits: 1 }\"\n label=\"Fill rate\"\n></span>\n",
|
|
777
426
|
"verdict": "excerpt"
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
"id": "playground",
|
|
781
|
-
"title": "Playground",
|
|
782
|
-
"note": "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.",
|
|
783
|
-
"language": "html",
|
|
784
|
-
"source": "<span slPositionStrip label=\"Savings\" [reference]=\"1200\" [value]=\"800\" [values]=\"periods\"></span>\n",
|
|
785
|
-
"verdict": "excerpt"
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
"id": "stacked",
|
|
789
|
-
"title": "Rows that line up",
|
|
790
|
-
"note": "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.",
|
|
791
|
-
"language": "html",
|
|
792
|
-
"source": "<span\n slPositionStrip\n label=\"Savings\"\n [max]=\"3000\"\n [min]=\"-1000\"\n [value]=\"800\"\n [values]=\"savings\"\n></span>\n<span\n slPositionStrip\n label=\"Debt service\"\n [max]=\"3000\"\n [min]=\"-1000\"\n [value]=\"2200\"\n [values]=\"debt\"\n></span>\n",
|
|
793
|
-
"verdict": "excerpt"
|
|
794
|
-
},
|
|
795
|
-
{
|
|
796
|
-
"id": "pending",
|
|
797
|
-
"title": "A value not known yet",
|
|
798
|
-
"note": "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.",
|
|
799
|
-
"language": "html",
|
|
800
|
-
"source": "<span slPositionStrip hideValue label=\"Savings\" [values]=\"periods\"></span>\n",
|
|
801
|
-
"verdict": "excerpt"
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
"id": "accessibility",
|
|
805
|
-
"title": "What a reader hears",
|
|
806
|
-
"note": "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.",
|
|
807
|
-
"language": "html",
|
|
808
|
-
"source": "<span\n slPositionStrip\n label=\"Savings\"\n [formatOptions]=\"currency\"\n [reference]=\"1200\"\n [value]=\"800\"\n [values]=\"periods\"\n></span>\n",
|
|
809
|
-
"verdict": "excerpt"
|
|
810
|
-
},
|
|
811
|
-
{
|
|
812
|
-
"id": "playground",
|
|
813
|
-
"title": "Playground",
|
|
814
|
-
"note": "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.",
|
|
815
|
-
"language": "html",
|
|
816
|
-
"source": "<span slBarCompare [data]=\"pair\"></span>\n",
|
|
817
|
-
"verdict": "excerpt"
|
|
818
|
-
},
|
|
819
|
-
{
|
|
820
|
-
"id": "shared-domain",
|
|
821
|
-
"title": "One axis across sections",
|
|
822
|
-
"note": "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.",
|
|
823
|
-
"language": "html",
|
|
824
|
-
"source": "<span slBarCompare [data]=\"march\" [max]=\"800\" [min]=\"-1600\" [step]=\"800\"></span>\n<span slBarCompare [data]=\"april\" [max]=\"800\" [min]=\"-1600\" [step]=\"800\"></span>\n",
|
|
825
|
-
"verdict": "excerpt"
|
|
826
|
-
},
|
|
827
|
-
{
|
|
828
|
-
"id": "texture",
|
|
829
|
-
"title": "A reference told apart without color",
|
|
830
|
-
"note": "texture hatches a row’s fill, so the reference reads as a reference in grayscale, in print and under forced colors.",
|
|
831
|
-
"language": "html",
|
|
832
|
-
"source": "<span slBarCompare [data]=\"withIndex\"></span>\n",
|
|
833
|
-
"verdict": "excerpt"
|
|
834
|
-
},
|
|
835
|
-
{
|
|
836
|
-
"id": "accessibility",
|
|
837
|
-
"title": "What a reader hears",
|
|
838
|
-
"note": "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.",
|
|
839
|
-
"language": "html",
|
|
840
|
-
"source": "<span slBarCompare [data]=\"pair\" [formatOptions]=\"currency\"></span>\n",
|
|
841
|
-
"verdict": "excerpt"
|
|
842
427
|
}
|
|
843
428
|
]
|
|
844
429
|
}
|