@vector-im/compound-web 8.2.5 → 8.3.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/dist/components/ActivityMarker/Pill.module.css.cjs +1 -1
- package/dist/components/ActivityMarker/Pill.module.css.js +1 -1
- package/dist/components/ActivityMarker/Unread.module.css.cjs +1 -1
- package/dist/components/ActivityMarker/Unread.module.css.js +1 -1
- package/dist/components/ActivityMarker/UnreadCounter.module.css.cjs +1 -1
- package/dist/components/ActivityMarker/UnreadCounter.module.css.js +1 -1
- package/dist/components/Avatar/Avatar.module.css.cjs +5 -5
- package/dist/components/Avatar/Avatar.module.css.js +5 -5
- package/dist/components/Badge/Badge.module.css.cjs +1 -1
- package/dist/components/Badge/Badge.module.css.js +1 -1
- package/dist/components/Button/Button.module.css.cjs +4 -4
- package/dist/components/Button/Button.module.css.js +4 -4
- package/dist/components/Form/Controls/Checkbox/Checkbox.module.css.cjs +3 -3
- package/dist/components/Form/Controls/Checkbox/Checkbox.module.css.js +3 -3
- package/dist/components/Form/Controls/Radio/Radio.module.css.cjs +3 -3
- package/dist/components/Form/Controls/Radio/Radio.module.css.js +3 -3
- package/dist/components/Form/Controls/Toggle/Toggle.module.css.cjs +3 -3
- package/dist/components/Form/Controls/Toggle/Toggle.module.css.js +3 -3
- package/dist/components/Icon/BigIcon/BigIcon.module.css.cjs +3 -3
- package/dist/components/Icon/BigIcon/BigIcon.module.css.js +3 -3
- package/dist/components/Icon/IndicatorIcon/IndicatorIcon.module.css.cjs +1 -1
- package/dist/components/Icon/IndicatorIcon/IndicatorIcon.module.css.js +1 -1
- package/dist/components/Nav/Nav.module.css.cjs +4 -4
- package/dist/components/Nav/Nav.module.css.js +4 -4
- package/dist/components/Progress/Progress.module.css.cjs +4 -4
- package/dist/components/Progress/Progress.module.css.js +4 -4
- package/dist/components/ReleaseAnnouncement/ReleaseAnnouncement.module.css.cjs +5 -5
- package/dist/components/ReleaseAnnouncement/ReleaseAnnouncement.module.css.js +5 -5
- package/dist/components/Separator/Separator.module.css.cjs +1 -1
- package/dist/components/Separator/Separator.module.css.js +1 -1
- package/dist/components/Toast/Toast.module.css.cjs +1 -1
- package/dist/components/Toast/Toast.module.css.js +1 -1
- package/dist/components/Tooltip/Tooltip.module.css.cjs +4 -4
- package/dist/components/Tooltip/Tooltip.module.css.js +4 -4
- package/dist/components/VisualList/VisualList.module.css.cjs +1 -1
- package/dist/components/VisualList/VisualList.module.css.js +1 -1
- package/dist/components/VisualList/VisualListItem.module.css.cjs +4 -4
- package/dist/components/VisualList/VisualListItem.module.css.js +4 -4
- package/dist/style.css +318 -193
- package/package.json +10 -10
- package/src/components/ActivityMarker/Pill.module.css +6 -0
- package/src/components/ActivityMarker/Unread.module.css +6 -0
- package/src/components/ActivityMarker/UnreadCounter.module.css +6 -0
- package/src/components/Avatar/Avatar.module.css +6 -1
- package/src/components/Badge/Badge.module.css +7 -0
- package/src/components/Button/Button.module.css +6 -0
- package/src/components/Form/Controls/Checkbox/Checkbox.module.css +12 -6
- package/src/components/Form/Controls/Radio/Radio.module.css +12 -0
- package/src/components/Form/Controls/Toggle/Toggle.module.css +13 -6
- package/src/components/Icon/BigIcon/BigIcon.module.css +6 -0
- package/src/components/Icon/IndicatorIcon/IndicatorIcon.module.css +13 -3
- package/src/components/Nav/Nav.module.css +6 -0
- package/src/components/Progress/Progress.module.css +6 -0
- package/src/components/ReleaseAnnouncement/ReleaseAnnouncement.module.css +6 -0
- package/src/components/Separator/Separator.module.css +6 -0
- package/src/components/Toast/Toast.module.css +6 -0
- package/src/components/Tooltip/Tooltip.module.css +6 -0
- package/src/components/VisualList/VisualList.module.css +6 -0
- package/src/components/VisualList/VisualListItem.module.css +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vector-im/compound-web",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
4
4
|
"description": "Compound components for the Web",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"@fontsource/inconsolata": "^5.0.8",
|
|
56
56
|
"@fontsource/inter": "^5.0.8",
|
|
57
57
|
"@playwright/test": "^1.41.1",
|
|
58
|
-
"@storybook/addon-a11y": "^
|
|
59
|
-
"@storybook/addon-designs": "
|
|
60
|
-
"@storybook/addon-docs": "^
|
|
61
|
-
"@storybook/addon-links": "^
|
|
62
|
-
"@storybook/addon-themes": "^
|
|
63
|
-
"@storybook/react-vite": "^
|
|
58
|
+
"@storybook/addon-a11y": "^10.0.0",
|
|
59
|
+
"@storybook/addon-designs": "11.0.1",
|
|
60
|
+
"@storybook/addon-docs": "^10.0.0",
|
|
61
|
+
"@storybook/addon-links": "^10.0.0",
|
|
62
|
+
"@storybook/addon-themes": "^10.0.0",
|
|
63
|
+
"@storybook/react-vite": "^10.0.0",
|
|
64
64
|
"@testing-library/dom": "^10.3.2",
|
|
65
65
|
"@testing-library/jest-dom": "^6.1.3",
|
|
66
66
|
"@testing-library/react": "^16.0.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@tsconfig/node20": "^20.1.4",
|
|
69
69
|
"@tsconfig/vite-react": "^7.0.0",
|
|
70
70
|
"@types/eslint": "^9.0.0",
|
|
71
|
-
"@types/node": "^
|
|
71
|
+
"@types/node": "^24.0.0",
|
|
72
72
|
"@types/react": "^19.0.0",
|
|
73
73
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
74
74
|
"@typescript-eslint/parser": "^8.0.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"eslint-plugin-matrix-org": "^3.0.0",
|
|
82
82
|
"eslint-plugin-prettier": "^5.0.0",
|
|
83
83
|
"eslint-plugin-react": "^7.33.2",
|
|
84
|
-
"eslint-plugin-storybook": "^
|
|
84
|
+
"eslint-plugin-storybook": "^10.0.0",
|
|
85
85
|
"jsdom": "^27.0.0",
|
|
86
86
|
"prettier": "3.6.2",
|
|
87
87
|
"react": "^19.1.0",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"resize-observer-polyfill": "^1.5.1",
|
|
90
90
|
"rimraf": "^6.0.0",
|
|
91
91
|
"serve": "^14.2.1",
|
|
92
|
-
"storybook": "^
|
|
92
|
+
"storybook": "^10.0.0",
|
|
93
93
|
"stylelint": "^16.13.2",
|
|
94
94
|
"stylelint-config-standard": "^39.0.0",
|
|
95
95
|
"stylelint-plugin-defensive-css": "^1.0.0",
|
|
@@ -8,7 +8,9 @@ Please see LICENSE files in the repository root for full details.
|
|
|
8
8
|
.avatar {
|
|
9
9
|
display: inline-block;
|
|
10
10
|
box-sizing: border-box;
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
/* -2px to account for the border styling below */
|
|
13
|
+
line-height: calc(var(--cpd-avatar-size) - 2px);
|
|
12
14
|
text-align: center;
|
|
13
15
|
font-size: min(calc(var(--cpd-avatar-size) * 0.5625), 60px);
|
|
14
16
|
text-transform: uppercase;
|
|
@@ -55,6 +57,9 @@ button.avatar:disabled {
|
|
|
55
57
|
but this is currently not supported in all browsers */
|
|
56
58
|
background: var(--cpd-avatar-bg);
|
|
57
59
|
color: var(--cpd-avatar-color);
|
|
60
|
+
|
|
61
|
+
/* Additional style to ensure visibility in contrast-mode */
|
|
62
|
+
border: 1px solid var(--cpd-avatar-bg);
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
.avatar[data-color] {
|
|
@@ -15,6 +15,7 @@ Please see LICENSE files in the repository root for full details.
|
|
|
15
15
|
|
|
16
16
|
.badge[data-kind="default"] {
|
|
17
17
|
border: 1px solid var(--cpd-color-alpha-gray-400);
|
|
18
|
+
outline: none;
|
|
18
19
|
color: var(--cpd-color-gray-1100);
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -42,3 +43,9 @@ Please see LICENSE files in the repository root for full details.
|
|
|
42
43
|
background: var(--cpd-color-alpha-red-300);
|
|
43
44
|
color: var(--cpd-color-red-1100);
|
|
44
45
|
}
|
|
46
|
+
|
|
47
|
+
@media (forced-colors: active) {
|
|
48
|
+
.badge {
|
|
49
|
+
outline: 1px solid transparent;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -210,3 +210,9 @@ a.button {
|
|
|
210
210
|
.button[data-kind="tertiary"].destructive[aria-expanded="true"] {
|
|
211
211
|
background: var(--cpd-color-bg-critical-subtle-hovered);
|
|
212
212
|
}
|
|
213
|
+
|
|
214
|
+
@media (forced-colors: active) {
|
|
215
|
+
.button[data-kind="primary"] {
|
|
216
|
+
outline: 1px solid transparent;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
@@ -34,9 +34,6 @@ Please see LICENSE files in the repository root for full details.
|
|
|
34
34
|
border-radius: 4px; /* TODO: Ought to be a token */
|
|
35
35
|
border: 1px solid;
|
|
36
36
|
border-color: var(--cpd-color-border-interactive-primary);
|
|
37
|
-
|
|
38
|
-
/** Default, rest state */
|
|
39
|
-
color: transparent;
|
|
40
37
|
}
|
|
41
38
|
|
|
42
39
|
.ui svg {
|
|
@@ -45,14 +42,20 @@ Please see LICENSE files in the repository root for full details.
|
|
|
45
42
|
|
|
46
43
|
/* compensate for the parent border */
|
|
47
44
|
margin: -1px;
|
|
45
|
+
|
|
46
|
+
/** Default, rest state */
|
|
47
|
+
color: transparent;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.input:checked + .ui {
|
|
51
|
-
color: var(--cpd-color-icon-on-solid-primary);
|
|
52
51
|
background-color: var(--cpd-color-bg-accent-rest);
|
|
53
52
|
border-color: var(--cpd-color-bg-accent-rest);
|
|
54
53
|
}
|
|
55
54
|
|
|
55
|
+
.input:checked + .ui svg {
|
|
56
|
+
color: var(--cpd-color-icon-on-solid-primary);
|
|
57
|
+
}
|
|
58
|
+
|
|
56
59
|
.input:focus-visible + .ui {
|
|
57
60
|
outline: 2px solid var(--cpd-color-border-focused);
|
|
58
61
|
outline-offset: 1px;
|
|
@@ -77,19 +80,22 @@ Please see LICENSE files in the repository root for full details.
|
|
|
77
80
|
background: var(--cpd-color-bg-action-primary-disabled);
|
|
78
81
|
}
|
|
79
82
|
|
|
80
|
-
.input[readonly]:checked + .ui {
|
|
83
|
+
.input[readonly]:checked + .ui svg {
|
|
81
84
|
color: var(--cpd-color-icon-secondary);
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
@media (hover) {
|
|
85
88
|
.input:not([disabled], [readonly], :checked):hover + .ui {
|
|
86
|
-
color: var(--cpd-color-icon-quaternary);
|
|
87
89
|
border-color: var(--cpd-color-bg-accent-hovered);
|
|
88
90
|
|
|
89
91
|
/** TODO: have the shadow in the design tokens */
|
|
90
92
|
box-shadow: 0 1.2px 2.4px 0 rgb(0 0 0 / 15%);
|
|
91
93
|
}
|
|
92
94
|
|
|
95
|
+
.input:not([disabled], [readonly], :checked):hover + .ui svg {
|
|
96
|
+
color: var(--cpd-color-icon-quaternary);
|
|
97
|
+
}
|
|
98
|
+
|
|
93
99
|
.input:not([disabled], [readonly]):checked:hover + .ui {
|
|
94
100
|
border-color: var(--cpd-color-bg-accent-hovered);
|
|
95
101
|
background: var(--cpd-color-bg-accent-hovered);
|
|
@@ -47,15 +47,23 @@ Please see LICENSE files in the repository root for full details.
|
|
|
47
47
|
block-size: 6px;
|
|
48
48
|
border-radius: 50%;
|
|
49
49
|
background: transparent;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
|
|
52
|
+
/* Additional style to ensure visibility in contrast-mode */
|
|
53
|
+
border: 1px solid transparent;
|
|
54
|
+
color: transparent;
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
.input:checked + .ui {
|
|
53
58
|
background-color: var(--cpd-color-bg-accent-rest);
|
|
54
59
|
border-color: var(--cpd-color-bg-accent-rest);
|
|
60
|
+
color: unset;
|
|
55
61
|
}
|
|
56
62
|
|
|
57
63
|
.input:checked + .ui::after {
|
|
58
64
|
background: var(--cpd-color-icon-on-solid-primary);
|
|
65
|
+
border-color: var(--cpd-color-icon-on-solid-primary);
|
|
66
|
+
color: unset;
|
|
59
67
|
}
|
|
60
68
|
|
|
61
69
|
.input:focus-visible + .ui {
|
|
@@ -84,6 +92,8 @@ Please see LICENSE files in the repository root for full details.
|
|
|
84
92
|
|
|
85
93
|
.input[readonly]:checked + .ui::after {
|
|
86
94
|
background-color: var(--cpd-color-icon-secondary);
|
|
95
|
+
border-color: var(--cpd-color-icon-secondary);
|
|
96
|
+
color: unset;
|
|
87
97
|
}
|
|
88
98
|
|
|
89
99
|
@media (hover) {
|
|
@@ -96,6 +106,8 @@ Please see LICENSE files in the repository root for full details.
|
|
|
96
106
|
|
|
97
107
|
.input:not([disabled], [readonly], :checked):hover + .ui::after {
|
|
98
108
|
background: var(--cpd-color-icon-quaternary);
|
|
109
|
+
border-color: var(--cpd-color-icon-quaternary);
|
|
110
|
+
color: unset;
|
|
99
111
|
}
|
|
100
112
|
|
|
101
113
|
.input:not([disabled], [readonly]):checked:hover + .ui {
|
|
@@ -49,12 +49,18 @@ Please see LICENSE files in the repository root for full details.
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.ui::after {
|
|
52
|
+
--dot-color: var(--cpd-color-icon-secondary);
|
|
53
|
+
|
|
52
54
|
content: "";
|
|
53
55
|
display: block;
|
|
54
56
|
block-size: 100%;
|
|
55
57
|
aspect-ratio: 1 / 1;
|
|
56
58
|
border-radius: 50%;
|
|
57
|
-
background: var(--
|
|
59
|
+
background: var(--dot-color);
|
|
60
|
+
|
|
61
|
+
/* Additional style to ensure visibility in contrast-mode */
|
|
62
|
+
border: 1px solid var(--dot-color);
|
|
63
|
+
box-sizing: border-box;
|
|
58
64
|
transform: translateX(0);
|
|
59
65
|
transition-duration: 0.2s;
|
|
60
66
|
transition-timing-function: ease-in-out;
|
|
@@ -69,8 +75,9 @@ ring after a simple click */
|
|
|
69
75
|
}
|
|
70
76
|
|
|
71
77
|
:checked + .ui::after {
|
|
78
|
+
--dot-color: var(--cpd-color-icon-on-solid-primary);
|
|
79
|
+
|
|
72
80
|
transform: translateX(100%);
|
|
73
|
-
background: var(--cpd-color-icon-on-solid-primary);
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
@media (hover) {
|
|
@@ -95,7 +102,7 @@ ring after a simple click */
|
|
|
95
102
|
}
|
|
96
103
|
|
|
97
104
|
.input[readonly] + .ui::after {
|
|
98
|
-
|
|
105
|
+
--dot-color: var(--cpd-color-icon-secondary);
|
|
99
106
|
}
|
|
100
107
|
|
|
101
108
|
.input[disabled] + .ui {
|
|
@@ -104,7 +111,7 @@ ring after a simple click */
|
|
|
104
111
|
}
|
|
105
112
|
|
|
106
113
|
.input[disabled] + .ui::after {
|
|
107
|
-
|
|
114
|
+
--dot-color: var(--cpd-color-bg-action-primary-disabled);
|
|
108
115
|
}
|
|
109
116
|
|
|
110
117
|
.input[readonly]:checked + .ui {
|
|
@@ -113,7 +120,7 @@ ring after a simple click */
|
|
|
113
120
|
}
|
|
114
121
|
|
|
115
122
|
.input[readonly]:checked + .ui::after {
|
|
116
|
-
|
|
123
|
+
--dot-color: var(--cpd-color-icon-on-solid-primary);
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
.input[disabled]:checked + .ui {
|
|
@@ -122,7 +129,7 @@ ring after a simple click */
|
|
|
122
129
|
}
|
|
123
130
|
|
|
124
131
|
.input[disabled]:checked + .ui::after {
|
|
125
|
-
|
|
132
|
+
--dot-color: var(--cpd-color-icon-on-solid-primary);
|
|
126
133
|
}
|
|
127
134
|
|
|
128
135
|
@media (hover) {
|
|
@@ -40,3 +40,9 @@ Please see LICENSE files in the repository root for full details.
|
|
|
40
40
|
background-color: var(--cpd-color-bg-success-subtle);
|
|
41
41
|
color: var(--cpd-color-icon-success-primary);
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
@media (forced-colors: active) {
|
|
45
|
+
.content {
|
|
46
|
+
outline: 1px solid transparent;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -47,13 +47,23 @@ Please see LICENSE files in the repository root for full details.
|
|
|
47
47
|
inline-size: 33.3333%;
|
|
48
48
|
block-size: 33.333%;
|
|
49
49
|
border-radius: 50%;
|
|
50
|
-
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
|
|
52
|
+
--background-color: var(--cpd-color-icon-primary);
|
|
53
|
+
|
|
54
|
+
background-color: var(--background-color);
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
.indicator-icon[data-indicator="success"]::before {
|
|
54
|
-
background: var(--cpd-color-icon-success-primary);
|
|
58
|
+
--background-color: var(--cpd-color-icon-success-primary);
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
.indicator-icon[data-indicator="critical"]::before {
|
|
58
|
-
background: var(--cpd-color-icon-critical-primary);
|
|
62
|
+
--background-color: var(--cpd-color-icon-critical-primary);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (forced-colors: active) {
|
|
66
|
+
.indicator-icon[data-indicator]::before {
|
|
67
|
+
border: 1px solid var(--background-color);
|
|
68
|
+
}
|
|
59
69
|
}
|
|
@@ -76,3 +76,9 @@ Please see LICENSE files in the repository root for full details.
|
|
|
76
76
|
/* sqrt(number of stripes * 2 * (stripe width)^2) = sqrt(4 * 2 * 2^2) = sqrt(32) */
|
|
77
77
|
background-size: 5.6569px 5.6569px;
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
@media (forced-colors: active) {
|
|
81
|
+
.progress-bar-indicator {
|
|
82
|
+
outline: 1px solid transparent;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -13,3 +13,9 @@ Please see LICENSE files in the repository root for full details.
|
|
|
13
13
|
font-size: var(--cpd-font-body-sm-medium);
|
|
14
14
|
padding: var(--cpd-space-2x) var(--cpd-space-4x);
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
@media (forced-colors: active) {
|
|
18
|
+
.toast-container {
|
|
19
|
+
outline: 1px solid transparent;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -34,3 +34,9 @@ Please see LICENSE files in the repository root for full details.
|
|
|
34
34
|
/* same color as the tooltip background */
|
|
35
35
|
fill: var(--cpd-color-alpha-gray-1400);
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
@media (forced-colors: active) {
|
|
39
|
+
.tooltip:not(.invisible) {
|
|
40
|
+
outline: 1px solid transparent;
|
|
41
|
+
}
|
|
42
|
+
}
|