@gitlab/ui 97.1.0 → 97.2.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [97.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v97.1.0...v97.2.0) (2024-10-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlIcon:** Add iconOpticallyAligned prop ([041e211](https://gitlab.com/gitlab-org/gitlab-ui/commit/041e211a5133562787064cb143dd1280876c5785))
|
|
7
|
+
|
|
1
8
|
# [97.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v97.0.0...v97.1.0) (2024-10-16)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -39,6 +39,14 @@ var script = {
|
|
|
39
39
|
default: 'md',
|
|
40
40
|
validator: value => Object.keys(badgeIconSizeOptions).includes(value),
|
|
41
41
|
required: false
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Optically aligns circular icons with the badge.
|
|
45
|
+
*/
|
|
46
|
+
iconOpticallyAligned: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false,
|
|
49
|
+
required: false
|
|
42
50
|
}
|
|
43
51
|
},
|
|
44
52
|
computed: {
|
|
@@ -47,7 +55,7 @@ var script = {
|
|
|
47
55
|
return Boolean(this.icon && Object.keys(this.$slots).length === 0);
|
|
48
56
|
},
|
|
49
57
|
isCircularIcon() {
|
|
50
|
-
return ['issue-open-m', 'issue-close'].includes(this.icon);
|
|
58
|
+
return this.iconOpticallyAligned || ['issue-open-m', 'issue-close'].includes(this.icon);
|
|
51
59
|
},
|
|
52
60
|
role() {
|
|
53
61
|
return this.hasIconOnly ? 'img' : undefined;
|
package/package.json
CHANGED
|
@@ -40,6 +40,14 @@ export default {
|
|
|
40
40
|
validator: (value) => Object.keys(badgeIconSizeOptions).includes(value),
|
|
41
41
|
required: false,
|
|
42
42
|
},
|
|
43
|
+
/**
|
|
44
|
+
* Optically aligns circular icons with the badge.
|
|
45
|
+
*/
|
|
46
|
+
iconOpticallyAligned: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false,
|
|
49
|
+
required: false,
|
|
50
|
+
},
|
|
43
51
|
},
|
|
44
52
|
computed: {
|
|
45
53
|
hasIconOnly() {
|
|
@@ -47,7 +55,7 @@ export default {
|
|
|
47
55
|
return Boolean(this.icon && Object.keys(this.$slots).length === 0);
|
|
48
56
|
},
|
|
49
57
|
isCircularIcon() {
|
|
50
|
-
return ['issue-open-m', 'issue-close'].includes(this.icon);
|
|
58
|
+
return this.iconOpticallyAligned || ['issue-open-m', 'issue-close'].includes(this.icon);
|
|
51
59
|
},
|
|
52
60
|
role() {
|
|
53
61
|
return this.hasIconOnly ? 'img' : undefined;
|