Skip to content

Commit efc6149

Browse files
authored
Update @vector-im/compound-design-tokens & @vector-im/compound-web (#29307)
* chore: update `@vector-im/compound-design-tokens` & `@vector-im/compound-web` to last version * chore: use `error-solid` icon instead of `error` * chore: update jest snapshot * fix: `AccessibleButton` lint
1 parent 8ef8434 commit efc6149

File tree

99 files changed

+1498
-1513
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1498
-1513
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@
9191
"@sentry/browser": "^9.0.0",
9292
"@types/png-chunks-extract": "^1.0.2",
9393
"@types/react-virtualized": "^9.21.30",
94-
"@vector-im/compound-design-tokens": "^3.0.0",
95-
"@vector-im/compound-web": "^7.6.1",
94+
"@vector-im/compound-design-tokens": "^4.0.0",
95+
"@vector-im/compound-web": "^7.6.4",
9696
"@vector-im/matrix-wysiwyg": "2.38.0",
9797
"@zxcvbn-ts/core": "^3.0.4",
9898
"@zxcvbn-ts/language-common": "^3.0.4",

res/css/structures/_SpaceHierarchy.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Please see LICENSE files in the repository root for full details.
7777
height: 16px;
7878
width: 16px;
7979
left: 0;
80-
background-image: url("@vector-im/compound-design-tokens/icons/error.svg");
80+
background-image: url("@vector-im/compound-design-tokens/icons/error-solid.svg");
8181
background-size: cover;
8282
background-repeat: no-repeat;
8383
}

res/css/views/context_menus/_MessageContextMenu.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Please see LICENSE files in the repository root for full details.
2929
}
3030

3131
.mx_MessageContextMenu_iconReport::before {
32-
mask-image: url("@vector-im/compound-design-tokens/icons/error.svg");
32+
mask-image: url("@vector-im/compound-design-tokens/icons/error-solid.svg");
3333
}
3434

3535
.mx_MessageContextMenu_iconLink::before {

res/css/views/dialogs/security/_AccessSecretStorageDialog.pcss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Please see LICENSE files in the repository root for full details.
2121

2222
&.mx_AccessSecretStorageDialog_resetBadge::before {
2323
/* The image isn't capable of masking, so we use a background instead. */
24-
background-image: url("@vector-im/compound-design-tokens/icons/error.svg");
24+
background-image: url("@vector-im/compound-design-tokens/icons/error-solid.svg");
2525
background-size: 24px;
2626
background-color: transparent;
2727
}
@@ -120,7 +120,7 @@ Please see LICENSE files in the repository root for full details.
120120
width: 16px;
121121
left: 0;
122122
top: 2px; /* alignment */
123-
background-image: url("@vector-im/compound-design-tokens/icons/error.svg");
123+
background-image: url("@vector-im/compound-design-tokens/icons/error-solid.svg");
124124
background-size: contain;
125125
}
126126

res/css/views/elements/_InfoTooltip.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ Please see LICENSE files in the repository root for full details.
2929
}
3030

3131
.mx_InfoTooltip_icon_warning::before {
32-
mask-image: url("@vector-im/compound-design-tokens/icons/error.svg");
32+
mask-image: url("@vector-im/compound-design-tokens/icons/error-solid.svg");
3333
}

src/components/views/auth/LoginWithQRFlow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import React, { createRef, type ReactNode } from "react";
1010
import { ClientRendezvousFailureReason, MSC4108FailureReason } from "matrix-js-sdk/src/rendezvous";
1111
import ChevronLeftIcon from "@vector-im/compound-design-tokens/assets/web/icons/chevron-left";
1212
import CheckCircleSolidIcon from "@vector-im/compound-design-tokens/assets/web/icons/check-circle-solid";
13-
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error";
13+
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error-solid";
1414
import { Heading, MFAInput, Text } from "@vector-im/compound-web";
1515
import classNames from "classnames";
1616
import { QrCodeIcon } from "@vector-im/compound-design-tokens/assets/web/icons";

src/components/views/elements/AccessibleButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ type Props<T extends ElementType = "div"> = {
8080
/**
8181
* The tooltip to show on hover or focus.
8282
*/
83-
title?: TooltipProps["label"];
83+
title?: string;
8484
/**
8585
* The caption is a secondary text displayed under the `title` of the tooltip.
8686
* Only valid when used in conjunction with `title`.

src/components/views/right_panel/RoomSummaryCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import PinIcon from "@vector-im/compound-design-tokens/assets/web/icons/pin";
3535
import LockIcon from "@vector-im/compound-design-tokens/assets/web/icons/lock-solid";
3636
import LockOffIcon from "@vector-im/compound-design-tokens/assets/web/icons/lock-off";
3737
import PublicIcon from "@vector-im/compound-design-tokens/assets/web/icons/public";
38-
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error";
38+
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error-solid";
3939
import ChevronDownIcon from "@vector-im/compound-design-tokens/assets/web/icons/chevron-down";
4040
import { EventType, JoinRule, type Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
4141

src/components/views/rooms/MemberList/tiles/common/E2EIconView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
88
import React from "react";
99
import { Tooltip } from "@vector-im/compound-web";
1010
import VerifiedIcon from "@vector-im/compound-design-tokens/assets/web/icons/verified";
11-
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error";
11+
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error-solid";
1212

1313
import { _t } from "../../../../../../languageHandler";
1414
import { E2EStatus } from "../../../../../../utils/ShieldUtils";

src/components/views/rooms/RoomHeader/RoomHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import ThreadsIcon from "@vector-im/compound-design-tokens/assets/web/icons/thre
1515
import RoomInfoIcon from "@vector-im/compound-design-tokens/assets/web/icons/info-solid";
1616
import NotificationsIcon from "@vector-im/compound-design-tokens/assets/web/icons/notifications-solid";
1717
import VerifiedIcon from "@vector-im/compound-design-tokens/assets/web/icons/verified";
18-
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error";
18+
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error-solid";
1919
import PublicIcon from "@vector-im/compound-design-tokens/assets/web/icons/public";
2020
import { JoinRule, type Room } from "matrix-js-sdk/src/matrix";
2121
import { type ViewRoomOpts } from "@matrix-org/react-sdk-module-api/lib/lifecycles/RoomViewLifecycle";

src/components/views/settings/SettingsSubheader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import React, { type JSX } from "react";
99
import CheckCircleIcon from "@vector-im/compound-design-tokens/assets/web/icons/check-circle-solid";
10-
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error";
10+
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error-solid";
1111
import classNames from "classnames";
1212

1313
interface SettingsSubheaderProps {

src/components/views/settings/encryption/ResetIdentityPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { Breadcrumb, Button, VisualList, VisualListItem } from "@vector-im/compound-web";
99
import CheckIcon from "@vector-im/compound-design-tokens/assets/web/icons/check";
1010
import InfoIcon from "@vector-im/compound-design-tokens/assets/web/icons/info";
11-
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error";
11+
import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error-solid";
1212
import React, { type MouseEventHandler } from "react";
1313

1414
import { _t } from "../../../../languageHandler";

test/unit-tests/async-components/structures/__snapshots__/ErrorView-test.tsx.snap

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ exports[`<ErrorView /> should match snapshot 1`] = `
1515
class="mx_ErrorView_container"
1616
>
1717
<h1
18-
class="_typography_yh5dq_162 _font-heading-md-semibold_yh5dq_121"
18+
class="_typography_6v6n8_153 _font-heading-md-semibold_6v6n8_112"
1919
>
2020
TITLE
2121
</h1>
2222
<p
23-
class="_typography_yh5dq_162 _font-body-lg-regular_yh5dq_78"
23+
class="_typography_6v6n8_153 _font-body-lg-regular_6v6n8_69"
2424
>
2525
MSG1
2626
</p>
2727
<p
28-
class="_typography_yh5dq_162 _font-body-lg-regular_yh5dq_78"
28+
class="_typography_6v6n8_153 _font-body-lg-regular_6v6n8_69"
2929
>
3030
MSG2
3131
</p>
@@ -49,17 +49,17 @@ exports[`<UnsupportedBrowserView /> should match snapshot 1`] = `
4949
class="mx_ErrorView_container"
5050
>
5151
<h1
52-
class="_typography_yh5dq_162 _font-heading-md-semibold_yh5dq_121"
52+
class="_typography_6v6n8_153 _font-heading-md-semibold_6v6n8_112"
5353
>
5454
Element does not support this browser
5555
</h1>
5656
<p
57-
class="_typography_yh5dq_162 _font-body-lg-regular_yh5dq_78"
57+
class="_typography_6v6n8_153 _font-body-lg-regular_6v6n8_69"
5858
>
5959
Element uses some browser features which are not available in your current browser. Try updating this browser if you're not using the latest version and try again.
6060
</p>
6161
<p
62-
class="_typography_yh5dq_162 _font-body-lg-regular_yh5dq_78"
62+
class="_typography_6v6n8_153 _font-body-lg-regular_6v6n8_69"
6363
>
6464
<span>
6565
For the best experience, use
@@ -102,7 +102,7 @@ exports[`<UnsupportedBrowserView /> should match snapshot 1`] = `
102102
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-4x);"
103103
>
104104
<button
105-
class="_button_i91xf_17 _has-icon_i91xf_66"
105+
class="_button_vczzf_8 _has-icon_vczzf_57"
106106
data-kind="secondary"
107107
data-size="sm"
108108
role="button"
@@ -117,24 +117,24 @@ exports[`<UnsupportedBrowserView /> should match snapshot 1`] = `
117117
xmlns="http://www.w3.org/2000/svg"
118118
>
119119
<path
120-
d="M5 3h6a1 1 0 1 1 0 2H5v14h14v-6a1 1 0 1 1 2 0v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z"
120+
d="M5 3h6a1 1 0 1 1 0 2H5v14h14v-6a1 1 0 1 1 2 0v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2"
121121
/>
122122
<path
123-
d="M15 3h5a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L17.586 5H15a1 1 0 1 1 0-2Z"
123+
d="M15 3h5a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L17.586 5H15a1 1 0 1 1 0-2"
124124
/>
125125
</svg>
126126
Learn more
127127
</button>
128128
</div>
129129
</div>
130130
<div
131-
class="_separator_144s5_17"
131+
class="_separator_7ckbw_8"
132132
data-kind="primary"
133133
data-orientation="horizontal"
134134
role="separator"
135135
/>
136136
<h2
137-
class="_typography_yh5dq_162 _font-heading-sm-semibold_yh5dq_102"
137+
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93"
138138
>
139139
Use Element Desktop instead
140140
</h2>
@@ -143,7 +143,7 @@ exports[`<UnsupportedBrowserView /> should match snapshot 1`] = `
143143
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-4x);"
144144
>
145145
<a
146-
class="_button_i91xf_17 _has-icon_i91xf_66"
146+
class="_button_vczzf_8 _has-icon_vczzf_57"
147147
data-kind="secondary"
148148
data-size="lg"
149149
href="https://packages.element.io/desktop/install/macos/Element.dmg"
@@ -158,7 +158,7 @@ exports[`<UnsupportedBrowserView /> should match snapshot 1`] = `
158158
Mac
159159
</a>
160160
<a
161-
class="_button_i91xf_17 _has-icon_i91xf_66"
161+
class="_button_vczzf_8 _has-icon_vczzf_57"
162162
data-kind="secondary"
163163
data-size="lg"
164164
href="https://packages.element.io/desktop/install/win32/x64/Element%20Setup.exe"
@@ -173,7 +173,7 @@ exports[`<UnsupportedBrowserView /> should match snapshot 1`] = `
173173
Windows (64-bit)
174174
</a>
175175
<a
176-
class="_button_i91xf_17 _has-icon_i91xf_66"
176+
class="_button_vczzf_8 _has-icon_vczzf_57"
177177
data-kind="secondary"
178178
data-size="lg"
179179
href="https://packages.element.io/desktop/install/win32/arm64/Element%20Setup.exe"
@@ -188,7 +188,7 @@ exports[`<UnsupportedBrowserView /> should match snapshot 1`] = `
188188
Windows (ARM 64-bit)
189189
</a>
190190
<a
191-
class="_button_i91xf_17 _has-icon_i91xf_66"
191+
class="_button_vczzf_8 _has-icon_vczzf_57"
192192
data-kind="secondary"
193193
data-size="lg"
194194
href="https://element.io/download#linux"
@@ -204,7 +204,7 @@ exports[`<UnsupportedBrowserView /> should match snapshot 1`] = `
204204
</a>
205205
</div>
206206
<h2
207-
class="_typography_yh5dq_162 _font-heading-sm-semibold_yh5dq_102"
207+
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93"
208208
>
209209
Or use our mobile app
210210
</h2>

test/unit-tests/components/structures/__snapshots__/FilePanel-test.tsx.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ exports[`FilePanel renders empty state 1`] = `
1212
class="mx_BaseCard_header_title"
1313
>
1414
<p
15-
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 mx_BaseCard_header_title_heading"
15+
class="_typography_6v6n8_153 _font-body-md-medium_6v6n8_60 mx_BaseCard_header_title_heading"
1616
role="heading"
1717
>
1818
Files
1919
</p>
2020
</div>
2121
<button
2222
aria-labelledby=":r0:"
23-
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
23+
class="_icon-button_m2erp_8 _subtle-bg_m2erp_29"
2424
data-testid="base-card-close-button"
2525
role="button"
2626
style="--cpd-icon-button-size: 28px;"
2727
tabindex="0"
2828
>
2929
<div
30-
class="_indicator-icon_133tf_26"
30+
class="_indicator-icon_zr2a0_17"
3131
style="--cpd-icon-button-size: 100%;"
3232
>
3333
<svg
@@ -38,7 +38,7 @@ exports[`FilePanel renders empty state 1`] = `
3838
xmlns="http://www.w3.org/2000/svg"
3939
>
4040
<path
41-
d="M6.293 6.293a1 1 0 0 1 1.414 0L12 10.586l4.293-4.293a1 1 0 1 1 1.414 1.414L13.414 12l4.293 4.293a1 1 0 0 1-1.414 1.414L12 13.414l-4.293 4.293a1 1 0 0 1-1.414-1.414L10.586 12 6.293 7.707a1 1 0 0 1 0-1.414Z"
41+
d="M6.293 6.293a1 1 0 0 1 1.414 0L12 10.586l4.293-4.293a1 1 0 1 1 1.414 1.414L13.414 12l4.293 4.293a1 1 0 0 1-1.414 1.414L12 13.414l-4.293 4.293a1 1 0 0 1-1.414-1.414L10.586 12 6.293 7.707a1 1 0 0 1 0-1.414"
4242
/>
4343
</svg>
4444
</div>
@@ -62,16 +62,16 @@ exports[`FilePanel renders empty state 1`] = `
6262
xmlns="http://www.w3.org/2000/svg"
6363
>
6464
<path
65-
d="M6 22c-.55 0-1.02-.196-1.412-.587A1.926 1.926 0 0 1 4 20V4c0-.55.196-1.02.588-1.413A1.926 1.926 0 0 1 6 2h7.175a1.975 1.975 0 0 1 1.4.575l4.85 4.85a1.975 1.975 0 0 1 .575 1.4V20c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0 1 18 22H6Zm7-14V4H6v16h12V9h-4a.968.968 0 0 1-.713-.287A.967.967 0 0 1 13 8Z"
65+
d="M6 22q-.824 0-1.412-.587A1.93 1.93 0 0 1 4 20V4q0-.824.588-1.412A1.93 1.93 0 0 1 6 2h7.175a1.98 1.98 0 0 1 1.4.575l4.85 4.85q.275.275.425.638.15.361.15.762V20q0 .824-.587 1.413A1.93 1.93 0 0 1 18 22zm7-14V4H6v16h12V9h-4a.97.97 0 0 1-.713-.287A.97.97 0 0 1 13 8"
6666
/>
6767
</svg>
6868
<p
69-
class="_typography_yh5dq_162 _font-body-lg-semibold_yh5dq_83"
69+
class="_typography_6v6n8_153 _font-body-lg-semibold_6v6n8_74"
7070
>
7171
No files visible in this room
7272
</p>
7373
<p
74-
class="_typography_yh5dq_162 _font-body-md-regular_yh5dq_59"
74+
class="_typography_6v6n8_153 _font-body-md-regular_6v6n8_50"
7575
>
7676
Attach files from chat or just drag and drop them anywhere in a room.
7777
</p>

test/unit-tests/components/structures/__snapshots__/MessagePanel-test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ exports[`MessagePanel should handle lots of membership events quickly 1`] = `
9494
class="mx_GenericEventListSummary_avatars"
9595
>
9696
<span
97-
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
97+
class="_avatar_1qbcf_8 mx_BaseAvatar _avatar-imageless_1qbcf_52"
9898
data-color="1"
9999
data-testid="avatar-img"
100100
data-type="round"

0 commit comments

Comments
 (0)