@vector-im/compound-web 8.3.0 → 8.3.1
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const avatar = "
|
|
4
|
-
const image = "
|
|
3
|
+
const avatar = "_avatar_zysgz_8";
|
|
4
|
+
const image = "_image_zysgz_43";
|
|
5
5
|
const styles = {
|
|
6
6
|
avatar,
|
|
7
7
|
image,
|
|
8
|
-
"avatar-imageless": "_avatar-
|
|
9
|
-
"stacked-avatars": "_stacked-
|
|
10
|
-
"clip-path": "_clip-
|
|
8
|
+
"avatar-imageless": "_avatar-imageless_zysgz_55",
|
|
9
|
+
"stacked-avatars": "_stacked-avatars_zysgz_109",
|
|
10
|
+
"clip-path": "_clip-path_zysgz_128"
|
|
11
11
|
};
|
|
12
12
|
exports.avatar = avatar;
|
|
13
13
|
exports.default = styles;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const avatar = "
|
|
2
|
-
const image = "
|
|
1
|
+
const avatar = "_avatar_zysgz_8";
|
|
2
|
+
const image = "_image_zysgz_43";
|
|
3
3
|
const styles = {
|
|
4
4
|
avatar,
|
|
5
5
|
image,
|
|
6
|
-
"avatar-imageless": "_avatar-
|
|
7
|
-
"stacked-avatars": "_stacked-
|
|
8
|
-
"clip-path": "_clip-
|
|
6
|
+
"avatar-imageless": "_avatar-imageless_zysgz_55",
|
|
7
|
+
"stacked-avatars": "_stacked-avatars_zysgz_109",
|
|
8
|
+
"clip-path": "_clip-path_zysgz_128"
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
11
|
avatar,
|
package/dist/style.css
CHANGED
|
@@ -463,7 +463,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
|
463
463
|
Please see LICENSE files in the repository root for full details.
|
|
464
464
|
*/
|
|
465
465
|
|
|
466
|
-
.
|
|
466
|
+
._avatar_zysgz_8 {
|
|
467
467
|
display: inline-block;
|
|
468
468
|
box-sizing: border-box;
|
|
469
469
|
|
|
@@ -483,7 +483,7 @@ Please see LICENSE files in the repository root for full details.
|
|
|
483
483
|
background: var(--cpd-color-bg-canvas-default);
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
-
button.
|
|
486
|
+
button._avatar_zysgz_8 {
|
|
487
487
|
/**
|
|
488
488
|
* The avatar can be a button element, we need to reset its style
|
|
489
489
|
*/
|
|
@@ -493,23 +493,25 @@ button._avatar_1jp1e_8 {
|
|
|
493
493
|
cursor: pointer;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
button.
|
|
496
|
+
button._avatar_zysgz_8:disabled {
|
|
497
497
|
cursor: not-allowed;
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
-
.
|
|
501
|
-
.
|
|
500
|
+
._avatar_zysgz_8,
|
|
501
|
+
._image_zysgz_43 {
|
|
502
502
|
aspect-ratio: 1 / 1;
|
|
503
503
|
inline-size: var(--cpd-avatar-size);
|
|
504
504
|
border-radius: var(--cpd-avatar-radius);
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
-
.
|
|
507
|
+
._image_zysgz_43 {
|
|
508
508
|
object-fit: cover;
|
|
509
509
|
overflow: hidden;
|
|
510
510
|
}
|
|
511
511
|
|
|
512
|
-
.
|
|
512
|
+
/* Additional selector for button to raise selector above button.avatar */
|
|
513
|
+
button._avatar-imageless_zysgz_55,
|
|
514
|
+
._avatar-imageless_zysgz_55 {
|
|
513
515
|
/* In the future we'd prefer to pass the HEX code as the data attr
|
|
514
516
|
and use `attr(data-color)` to avoid the style declaration from below
|
|
515
517
|
but this is currently not supported in all browsers */
|
|
@@ -520,41 +522,41 @@ button._avatar_1jp1e_8:disabled {
|
|
|
520
522
|
border: 1px solid var(--cpd-avatar-bg);
|
|
521
523
|
}
|
|
522
524
|
|
|
523
|
-
.
|
|
525
|
+
._avatar_zysgz_8[data-color] {
|
|
524
526
|
--cpd-avatar-bg: var(--cpd-color-bg-decorative-1);
|
|
525
527
|
--cpd-avatar-color: var(--cpd-color-text-decorative-1);
|
|
526
528
|
}
|
|
527
529
|
|
|
528
|
-
.
|
|
530
|
+
._avatar_zysgz_8[data-color="2"] {
|
|
529
531
|
--cpd-avatar-bg: var(--cpd-color-bg-decorative-2);
|
|
530
532
|
--cpd-avatar-color: var(--cpd-color-text-decorative-2);
|
|
531
533
|
}
|
|
532
534
|
|
|
533
|
-
.
|
|
535
|
+
._avatar_zysgz_8[data-color="3"] {
|
|
534
536
|
--cpd-avatar-bg: var(--cpd-color-bg-decorative-3);
|
|
535
537
|
--cpd-avatar-color: var(--cpd-color-text-decorative-3);
|
|
536
538
|
}
|
|
537
539
|
|
|
538
|
-
.
|
|
540
|
+
._avatar_zysgz_8[data-color="4"] {
|
|
539
541
|
--cpd-avatar-bg: var(--cpd-color-bg-decorative-4);
|
|
540
542
|
--cpd-avatar-color: var(--cpd-color-text-decorative-4);
|
|
541
543
|
}
|
|
542
544
|
|
|
543
|
-
.
|
|
545
|
+
._avatar_zysgz_8[data-color="5"] {
|
|
544
546
|
--cpd-avatar-bg: var(--cpd-color-bg-decorative-5);
|
|
545
547
|
--cpd-avatar-color: var(--cpd-color-text-decorative-5);
|
|
546
548
|
}
|
|
547
549
|
|
|
548
|
-
.
|
|
550
|
+
._avatar_zysgz_8[data-color="6"] {
|
|
549
551
|
--cpd-avatar-bg: var(--cpd-color-bg-decorative-6);
|
|
550
552
|
--cpd-avatar-color: var(--cpd-color-text-decorative-6);
|
|
551
553
|
}
|
|
552
554
|
|
|
553
|
-
.
|
|
555
|
+
._avatar_zysgz_8[data-type="round"] {
|
|
554
556
|
--cpd-avatar-radius: 50%;
|
|
555
557
|
}
|
|
556
558
|
|
|
557
|
-
.
|
|
559
|
+
._avatar_zysgz_8[data-type="square"] {
|
|
558
560
|
--cpd-avatar-radius: 25%;
|
|
559
561
|
}
|
|
560
562
|
|
|
@@ -562,26 +564,26 @@ button._avatar_1jp1e_8:disabled {
|
|
|
562
564
|
* Stacked avatars
|
|
563
565
|
*/
|
|
564
566
|
|
|
565
|
-
._stacked-
|
|
567
|
+
._stacked-avatars_zysgz_109::after {
|
|
566
568
|
content: "";
|
|
567
569
|
display: table;
|
|
568
570
|
clear: both;
|
|
569
571
|
}
|
|
570
572
|
|
|
571
|
-
._stacked-
|
|
573
|
+
._stacked-avatars_zysgz_109 ._avatar_zysgz_8 {
|
|
572
574
|
float: inline-start;
|
|
573
575
|
}
|
|
574
576
|
|
|
575
|
-
._stacked-
|
|
577
|
+
._stacked-avatars_zysgz_109 ._avatar_zysgz_8:not(:last-child) {
|
|
576
578
|
/* injected in the document from AvatarStack.tsx */
|
|
577
579
|
clip-path: url("#cpdAvatarClip");
|
|
578
580
|
}
|
|
579
581
|
|
|
580
|
-
._stacked-
|
|
582
|
+
._stacked-avatars_zysgz_109 > *:not(:first-child) {
|
|
581
583
|
margin-inline-start: calc(var(--cpd-avatar-size) * -0.2);
|
|
582
584
|
}
|
|
583
585
|
|
|
584
|
-
._clip-
|
|
586
|
+
._clip-path_zysgz_128 {
|
|
585
587
|
/* In theory the SVG is invisible, but we still need to ensure it doesn't
|
|
586
588
|
affect the page's layout or otherwise make an appearance */
|
|
587
589
|
position: fixed;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vector-im/compound-web",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.1",
|
|
4
4
|
"description": "Compound components for the Web",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@typescript-eslint/parser": "^8.0.0",
|
|
75
75
|
"@vector-im/compound-design-tokens": "^6.0.0",
|
|
76
76
|
"@vitejs/plugin-react": "^5.0.0",
|
|
77
|
-
"@vitest/coverage-v8": "^
|
|
77
|
+
"@vitest/coverage-v8": "^4.0.0",
|
|
78
78
|
"browserslist-to-esbuild": "^2.0.0",
|
|
79
79
|
"eslint": "^8.49.0",
|
|
80
80
|
"eslint-config-prettier": "^10.0.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"typescript": "^5.2.2",
|
|
99
99
|
"vite": "^7.0.3",
|
|
100
100
|
"vite-plugin-dts": "^4.5.4",
|
|
101
|
-
"vitest": "^
|
|
101
|
+
"vitest": "^4.0.0"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"@floating-ui/react": "^0.27.0",
|
|
@@ -51,6 +51,8 @@ button.avatar:disabled {
|
|
|
51
51
|
overflow: hidden;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/* Additional selector for button to raise selector above button.avatar */
|
|
55
|
+
button.avatar-imageless,
|
|
54
56
|
.avatar-imageless {
|
|
55
57
|
/* In the future we'd prefer to pass the HEX code as the data attr
|
|
56
58
|
and use `attr(data-color)` to avoid the style declaration from below
|