@fusion.dev/helix 0.20.2 → 0.22.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.
- package/custom-elements.json +12 -7
- package/dist/badge/root/badge-root.css.js +20 -0
- package/dist/badge/root/badge-root.d.ts +13 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +52 -4
- package/types/vue.d.ts +13 -1
package/custom-elements.json
CHANGED
|
@@ -4101,9 +4101,9 @@
|
|
|
4101
4101
|
"kind": "field",
|
|
4102
4102
|
"name": "tone",
|
|
4103
4103
|
"type": {
|
|
4104
|
-
"text": "'danger' | 'neutral' | undefined"
|
|
4104
|
+
"text": "'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning' | undefined"
|
|
4105
4105
|
},
|
|
4106
|
-
"description": "What the mark means, not how loudly it is drawn: the stylesheet picks a fill\nfrom what the count *is
|
|
4106
|
+
"description": "What the mark means, not how loudly it is drawn: the stylesheet picks a fill\nfrom what the count *is*.\n\n**`Tag`'s vocabulary, because a badge is the same kind of thing.** Both are\na small mark carrying a meaning beside something else, and the two had\ndifferent sets for no reason anybody decided: a tag could say `success` and\na badge could not, so a page marking a build green wrote one word on the\nchip and had no word for the count beside it. Every fill these name already\nexists and every one carries `foreground-on-accent`, so this costs a rule\napiece and no new color.\n\n**`primary` is sayable as well as the default**, which is the reason\n`Announcement` gives for its own neutral: a generated page should be able to\nsay what it means rather than express it by leaving an attribute off.",
|
|
4107
4107
|
"attribute": "tone",
|
|
4108
4108
|
"reflects": true
|
|
4109
4109
|
},
|
|
@@ -4368,9 +4368,9 @@
|
|
|
4368
4368
|
{
|
|
4369
4369
|
"name": "tone",
|
|
4370
4370
|
"type": {
|
|
4371
|
-
"text": "'danger' | 'neutral' | undefined"
|
|
4371
|
+
"text": "'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning' | undefined"
|
|
4372
4372
|
},
|
|
4373
|
-
"description": "What the mark means, not how loudly it is drawn: the stylesheet picks a fill\nfrom what the count *is
|
|
4373
|
+
"description": "What the mark means, not how loudly it is drawn: the stylesheet picks a fill\nfrom what the count *is*.\n\n**`Tag`'s vocabulary, because a badge is the same kind of thing.** Both are\na small mark carrying a meaning beside something else, and the two had\ndifferent sets for no reason anybody decided: a tag could say `success` and\na badge could not, so a page marking a build green wrote one word on the\nchip and had no word for the count beside it. Every fill these name already\nexists and every one carries `foreground-on-accent`, so this costs a rule\napiece and no new color.\n\n**`primary` is sayable as well as the default**, which is the reason\n`Announcement` gives for its own neutral: a generated page should be able to\nsay what it means rather than express it by leaving an attribute off.",
|
|
4374
4374
|
"fieldName": "tone"
|
|
4375
4375
|
},
|
|
4376
4376
|
{
|
|
@@ -4446,6 +4446,11 @@
|
|
|
4446
4446
|
{
|
|
4447
4447
|
"description": "A mark with no number, for unread rather than how many.",
|
|
4448
4448
|
"slug": "dot"
|
|
4449
|
+
},
|
|
4450
|
+
{
|
|
4451
|
+
"description": "What the count means, across the vocabulary a tag already speaks.",
|
|
4452
|
+
"min": 520,
|
|
4453
|
+
"slug": "tones"
|
|
4449
4454
|
}
|
|
4450
4455
|
],
|
|
4451
4456
|
"source": "helix/styled/src/badge"
|
|
@@ -6131,7 +6136,7 @@
|
|
|
6131
6136
|
}
|
|
6132
6137
|
},
|
|
6133
6138
|
{
|
|
6134
|
-
"description": "After
|
|
6139
|
+
"description": "After the label and outside the link, so it may be a control: this is where a switcher's menu trigger goes. A count or a mark is equally at home here and is no longer read into the link's accessible name.",
|
|
6135
6140
|
"name": "end",
|
|
6136
6141
|
"inheritedFrom": {
|
|
6137
6142
|
"name": "HelixHeadlessBreadcrumb",
|
|
@@ -6771,8 +6776,8 @@
|
|
|
6771
6776
|
"slug": "overflow"
|
|
6772
6777
|
},
|
|
6773
6778
|
{
|
|
6774
|
-
"description": "A crumb that
|
|
6775
|
-
"min":
|
|
6779
|
+
"description": "A crumb that is both a link and a switch: the word goes to its page, the chevron opens the siblings.",
|
|
6780
|
+
"min": 380,
|
|
6776
6781
|
"slug": "switcher"
|
|
6777
6782
|
}
|
|
6778
6783
|
],
|
|
@@ -62,6 +62,26 @@ opacity var(--helix-duration-fast) var(--helix-easing-standard),
|
|
|
62
62
|
scale var(--helix-duration-fast) var(--helix-easing-accelerate);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
:host([tone="primary"]) [part="indicator"] {
|
|
66
|
+
background-color: var(--badge-background-color, var(--helix-color-primary-surface));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host([tone="accent"]) [part="indicator"] {
|
|
70
|
+
background-color: var(--badge-background-color, var(--helix-color-accent-surface));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host([tone="info"]) [part="indicator"] {
|
|
74
|
+
background-color: var(--badge-background-color, var(--helix-color-info-surface));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host([tone="success"]) [part="indicator"] {
|
|
78
|
+
background-color: var(--badge-background-color, var(--helix-color-success-surface));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([tone="warning"]) [part="indicator"] {
|
|
82
|
+
background-color: var(--badge-background-color, var(--helix-color-warning-surface));
|
|
83
|
+
}
|
|
84
|
+
|
|
65
85
|
:host([tone="danger"]) [part="indicator"] {
|
|
66
86
|
background-color: var(--badge-background-color, var(--helix-color-danger-surface));
|
|
67
87
|
}
|
|
@@ -22,8 +22,20 @@ export declare class HelixBadge extends HelixHeadlessBadge {
|
|
|
22
22
|
/**
|
|
23
23
|
* What the mark means, not how loudly it is drawn: the stylesheet picks a fill
|
|
24
24
|
* from what the count *is*.
|
|
25
|
+
*
|
|
26
|
+
* **`Tag`'s vocabulary, because a badge is the same kind of thing.** Both are
|
|
27
|
+
* a small mark carrying a meaning beside something else, and the two had
|
|
28
|
+
* different sets for no reason anybody decided: a tag could say `success` and
|
|
29
|
+
* a badge could not, so a page marking a build green wrote one word on the
|
|
30
|
+
* chip and had no word for the count beside it. Every fill these name already
|
|
31
|
+
* exists and every one carries `foreground-on-accent`, so this costs a rule
|
|
32
|
+
* apiece and no new color.
|
|
33
|
+
*
|
|
34
|
+
* **`primary` is sayable as well as the default**, which is the reason
|
|
35
|
+
* `Announcement` gives for its own neutral: a generated page should be able to
|
|
36
|
+
* say what it means rather than express it by leaving an attribute off.
|
|
25
37
|
*/
|
|
26
|
-
tone?: 'danger' | 'neutral';
|
|
38
|
+
tone?: 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
|
|
27
39
|
static styles: CSSResultGroup;
|
|
28
40
|
}
|
|
29
41
|
declare global {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix",
|
|
3
3
|
"description": "Styled component tier. Extends the headless tier with token-driven presentation.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.22.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@fusion.dev/helix-core": "0.
|
|
50
|
-
"@fusion.dev/helix-headless": "0.
|
|
51
|
-
"@fusion.dev/helix-styles": "0.
|
|
49
|
+
"@fusion.dev/helix-core": "0.22.0",
|
|
50
|
+
"@fusion.dev/helix-headless": "0.22.0",
|
|
51
|
+
"@fusion.dev/helix-styles": "0.22.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
55
|
-
"@fusion.dev/helix-cem": "0.
|
|
56
|
-
"@fusion.dev/helix-testing": "0.
|
|
55
|
+
"@fusion.dev/helix-cem": "0.22.0",
|
|
56
|
+
"@fusion.dev/helix-testing": "0.22.0",
|
|
57
57
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
58
58
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
59
59
|
"@lit-labs/ssr": "^3.3.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -1145,7 +1145,19 @@ Falls back to the slot, or to initials, if it fails. */
|
|
|
1145
1145
|
|
|
1146
1146
|
export type HelixBadgeProps = {
|
|
1147
1147
|
/** What the mark means, not how loudly it is drawn: the stylesheet picks a fill
|
|
1148
|
-
from what the count *is*.
|
|
1148
|
+
from what the count *is*.
|
|
1149
|
+
|
|
1150
|
+
**`Tag`'s vocabulary, because a badge is the same kind of thing.** Both are
|
|
1151
|
+
a small mark carrying a meaning beside something else, and the two had
|
|
1152
|
+
different sets for no reason anybody decided: a tag could say `success` and
|
|
1153
|
+
a badge could not, so a page marking a build green wrote one word on the
|
|
1154
|
+
chip and had no word for the count beside it. Every fill these name already
|
|
1155
|
+
exists and every one carries `foreground-on-accent`, so this costs a rule
|
|
1156
|
+
apiece and no new color.
|
|
1157
|
+
|
|
1158
|
+
**`primary` is sayable as well as the default**, which is the reason
|
|
1159
|
+
`Announcement` gives for its own neutral: a generated page should be able to
|
|
1160
|
+
say what it means rather than express it by leaving an attribute off. */
|
|
1149
1161
|
tone?: (HelixBadge["tone"]) | undefined;
|
|
1150
1162
|
/** Accessible name.
|
|
1151
1163
|
|
|
@@ -1173,7 +1185,19 @@ is showing a count must not lose the count for being handed one. */
|
|
|
1173
1185
|
|
|
1174
1186
|
export type HelixBadgeSolidJsProps = {
|
|
1175
1187
|
/** What the mark means, not how loudly it is drawn: the stylesheet picks a fill
|
|
1176
|
-
from what the count *is*.
|
|
1188
|
+
from what the count *is*.
|
|
1189
|
+
|
|
1190
|
+
**`Tag`'s vocabulary, because a badge is the same kind of thing.** Both are
|
|
1191
|
+
a small mark carrying a meaning beside something else, and the two had
|
|
1192
|
+
different sets for no reason anybody decided: a tag could say `success` and
|
|
1193
|
+
a badge could not, so a page marking a build green wrote one word on the
|
|
1194
|
+
chip and had no word for the count beside it. Every fill these name already
|
|
1195
|
+
exists and every one carries `foreground-on-accent`, so this costs a rule
|
|
1196
|
+
apiece and no new color.
|
|
1197
|
+
|
|
1198
|
+
**`primary` is sayable as well as the default**, which is the reason
|
|
1199
|
+
`Announcement` gives for its own neutral: a generated page should be able to
|
|
1200
|
+
say what it means rather than express it by leaving an attribute off. */
|
|
1177
1201
|
"prop:tone"?: (HelixBadge["tone"]) | undefined;
|
|
1178
1202
|
/** Accessible name.
|
|
1179
1203
|
|
|
@@ -18990,6 +19014,18 @@ export type CustomElements = {
|
|
|
18990
19014
|
*
|
|
18991
19015
|
* - `tone`: What the mark means, not how loudly it is drawn: the stylesheet picks a fill
|
|
18992
19016
|
* from what the count *is*.
|
|
19017
|
+
*
|
|
19018
|
+
* **`Tag`'s vocabulary, because a badge is the same kind of thing.** Both are
|
|
19019
|
+
* a small mark carrying a meaning beside something else, and the two had
|
|
19020
|
+
* different sets for no reason anybody decided: a tag could say `success` and
|
|
19021
|
+
* a badge could not, so a page marking a build green wrote one word on the
|
|
19022
|
+
* chip and had no word for the count beside it. Every fill these name already
|
|
19023
|
+
* exists and every one carries `foreground-on-accent`, so this costs a rule
|
|
19024
|
+
* apiece and no new color.
|
|
19025
|
+
*
|
|
19026
|
+
* **`primary` is sayable as well as the default**, which is the reason
|
|
19027
|
+
* `Announcement` gives for its own neutral: a generated page should be able to
|
|
19028
|
+
* say what it means rather than express it by leaving an attribute off.
|
|
18993
19029
|
* - `label`: Accessible name.
|
|
18994
19030
|
*
|
|
18995
19031
|
* Required for a dot, which has no text to read.
|
|
@@ -19431,7 +19467,7 @@ export type CustomElements = {
|
|
|
19431
19467
|
*
|
|
19432
19468
|
* - `(default)`: The step: a link, or the text of the current page.
|
|
19433
19469
|
* - `separator`: Replaces the chevron shown before this item.
|
|
19434
|
-
* - `end`: After
|
|
19470
|
+
* - `end`: After the label and outside the link, so it may be a control: this is where a switcher's menu trigger goes. A count or a mark is equally at home here and is no longer read into the link's accessible name.
|
|
19435
19471
|
* - `start`: Before the label, for an icon.
|
|
19436
19472
|
*
|
|
19437
19473
|
* ## CSS Custom Properties
|
|
@@ -34954,6 +34990,18 @@ export type CustomElementsSolidJs = {
|
|
|
34954
34990
|
*
|
|
34955
34991
|
* - `tone`: What the mark means, not how loudly it is drawn: the stylesheet picks a fill
|
|
34956
34992
|
* from what the count *is*.
|
|
34993
|
+
*
|
|
34994
|
+
* **`Tag`'s vocabulary, because a badge is the same kind of thing.** Both are
|
|
34995
|
+
* a small mark carrying a meaning beside something else, and the two had
|
|
34996
|
+
* different sets for no reason anybody decided: a tag could say `success` and
|
|
34997
|
+
* a badge could not, so a page marking a build green wrote one word on the
|
|
34998
|
+
* chip and had no word for the count beside it. Every fill these name already
|
|
34999
|
+
* exists and every one carries `foreground-on-accent`, so this costs a rule
|
|
35000
|
+
* apiece and no new color.
|
|
35001
|
+
*
|
|
35002
|
+
* **`primary` is sayable as well as the default**, which is the reason
|
|
35003
|
+
* `Announcement` gives for its own neutral: a generated page should be able to
|
|
35004
|
+
* say what it means rather than express it by leaving an attribute off.
|
|
34957
35005
|
* - `label`: Accessible name.
|
|
34958
35006
|
*
|
|
34959
35007
|
* Required for a dot, which has no text to read.
|
|
@@ -35406,7 +35454,7 @@ export type CustomElementsSolidJs = {
|
|
|
35406
35454
|
*
|
|
35407
35455
|
* - `(default)`: The step: a link, or the text of the current page.
|
|
35408
35456
|
* - `separator`: Replaces the chevron shown before this item.
|
|
35409
|
-
* - `end`: After
|
|
35457
|
+
* - `end`: After the label and outside the link, so it may be a control: this is where a switcher's menu trigger goes. A count or a mark is equally at home here and is no longer read into the link's accessible name.
|
|
35410
35458
|
* - `start`: Before the label, for an icon.
|
|
35411
35459
|
*
|
|
35412
35460
|
* ## CSS Custom Properties
|
package/types/vue.d.ts
CHANGED
|
@@ -599,7 +599,19 @@ export type HelixAvatarVueEvents = {
|
|
|
599
599
|
|
|
600
600
|
export type HelixBadgeVueProps = {
|
|
601
601
|
/** What the mark means, not how loudly it is drawn: the stylesheet picks a fill
|
|
602
|
-
from what the count *is*.
|
|
602
|
+
from what the count *is*.
|
|
603
|
+
|
|
604
|
+
**`Tag`'s vocabulary, because a badge is the same kind of thing.** Both are
|
|
605
|
+
a small mark carrying a meaning beside something else, and the two had
|
|
606
|
+
different sets for no reason anybody decided: a tag could say `success` and
|
|
607
|
+
a badge could not, so a page marking a build green wrote one word on the
|
|
608
|
+
chip and had no word for the count beside it. Every fill these name already
|
|
609
|
+
exists and every one carries `foreground-on-accent`, so this costs a rule
|
|
610
|
+
apiece and no new color.
|
|
611
|
+
|
|
612
|
+
**`primary` is sayable as well as the default**, which is the reason
|
|
613
|
+
`Announcement` gives for its own neutral: a generated page should be able to
|
|
614
|
+
say what it means rather than express it by leaving an attribute off. */
|
|
603
615
|
tone?: (HelixBadge["tone"]) | undefined;
|
|
604
616
|
/** Accessible name.
|
|
605
617
|
|