@primer/view-components 0.21.1-rc.e895ac79 → 0.22.0-rc.41b884a7
Sign up to get free protection for your applications and to get access to all the features.
@@ -34,18 +34,21 @@ export class ActionListTruncationObserver {
|
|
34
34
|
this.resizeObserver.unobserve(el);
|
35
35
|
}
|
36
36
|
update(el) {
|
37
|
-
const
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
37
|
+
const items = el.querySelectorAll('li');
|
38
|
+
for (const item of items) {
|
39
|
+
const label = item.querySelector('.ActionListItem-label');
|
40
|
+
if (!label)
|
41
|
+
continue;
|
42
|
+
const tooltip = item.querySelector('.ActionListItem-truncationTooltip');
|
43
|
+
if (!tooltip)
|
44
|
+
continue;
|
45
|
+
const isTruncated = label.scrollWidth > label.clientWidth;
|
46
|
+
if (isTruncated) {
|
47
|
+
tooltip.style.display = '';
|
48
|
+
}
|
49
|
+
else {
|
50
|
+
tooltip.style.display = 'none';
|
51
|
+
}
|
49
52
|
}
|
50
53
|
}
|
51
54
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.22.0-rc.41b884a7",
|
4
4
|
"description": "ViewComponents for the Primer Design System",
|
5
5
|
"main": "app/assets/javascripts/primer_view_components.js",
|
6
6
|
"module": "app/components/primer/primer.js",
|
@@ -63,7 +63,7 @@
|
|
63
63
|
"@github/prettier-config": "0.0.6",
|
64
64
|
"@playwright/test": "^1.35.1",
|
65
65
|
"@primer/css": "21.2.2",
|
66
|
-
"@primer/primitives": "7.15.
|
66
|
+
"@primer/primitives": "7.15.14",
|
67
67
|
"@primer/stylelint-config": "^12.7.2",
|
68
68
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
69
69
|
"@rollup/plugin-typescript": "^8.3.3",
|
package/static/info_arch.json
CHANGED
@@ -3440,6 +3440,19 @@
|
|
3440
3440
|
"color-contrast"
|
3441
3441
|
]
|
3442
3442
|
}
|
3443
|
+
},
|
3444
|
+
{
|
3445
|
+
"preview_path": "primer/alpha/dialog/initally_open",
|
3446
|
+
"name": "initally_open",
|
3447
|
+
"snapshot": "interactive",
|
3448
|
+
"skip_rules": {
|
3449
|
+
"wont_fix": [
|
3450
|
+
"region"
|
3451
|
+
],
|
3452
|
+
"will_fix": [
|
3453
|
+
"color-contrast"
|
3454
|
+
]
|
3455
|
+
}
|
3443
3456
|
}
|
3444
3457
|
],
|
3445
3458
|
"subcomponents": [
|
@@ -9128,7 +9141,33 @@
|
|
9128
9141
|
{
|
9129
9142
|
"preview_path": "primer/alpha/underline_panels/default",
|
9130
9143
|
"name": "default",
|
9131
|
-
"snapshot": "
|
9144
|
+
"snapshot": "true",
|
9145
|
+
"skip_rules": {
|
9146
|
+
"wont_fix": [
|
9147
|
+
"region"
|
9148
|
+
],
|
9149
|
+
"will_fix": [
|
9150
|
+
"color-contrast"
|
9151
|
+
]
|
9152
|
+
}
|
9153
|
+
},
|
9154
|
+
{
|
9155
|
+
"preview_path": "primer/alpha/underline_panels/with_icons_and_counters",
|
9156
|
+
"name": "with_icons_and_counters",
|
9157
|
+
"snapshot": "true",
|
9158
|
+
"skip_rules": {
|
9159
|
+
"wont_fix": [
|
9160
|
+
"region"
|
9161
|
+
],
|
9162
|
+
"will_fix": [
|
9163
|
+
"color-contrast"
|
9164
|
+
]
|
9165
|
+
}
|
9166
|
+
},
|
9167
|
+
{
|
9168
|
+
"preview_path": "primer/alpha/underline_panels/with_actions",
|
9169
|
+
"name": "with_actions",
|
9170
|
+
"snapshot": "true",
|
9132
9171
|
"skip_rules": {
|
9133
9172
|
"wont_fix": [
|
9134
9173
|
"region"
|
package/static/previews.json
CHANGED
@@ -3217,6 +3217,19 @@
|
|
3217
3217
|
"color-contrast"
|
3218
3218
|
]
|
3219
3219
|
}
|
3220
|
+
},
|
3221
|
+
{
|
3222
|
+
"preview_path": "primer/alpha/dialog/initally_open",
|
3223
|
+
"name": "initally_open",
|
3224
|
+
"snapshot": "interactive",
|
3225
|
+
"skip_rules": {
|
3226
|
+
"wont_fix": [
|
3227
|
+
"region"
|
3228
|
+
],
|
3229
|
+
"will_fix": [
|
3230
|
+
"color-contrast"
|
3231
|
+
]
|
3232
|
+
}
|
3220
3233
|
}
|
3221
3234
|
]
|
3222
3235
|
},
|
@@ -7059,7 +7072,33 @@
|
|
7059
7072
|
{
|
7060
7073
|
"preview_path": "primer/alpha/underline_panels/default",
|
7061
7074
|
"name": "default",
|
7062
|
-
"snapshot": "
|
7075
|
+
"snapshot": "true",
|
7076
|
+
"skip_rules": {
|
7077
|
+
"wont_fix": [
|
7078
|
+
"region"
|
7079
|
+
],
|
7080
|
+
"will_fix": [
|
7081
|
+
"color-contrast"
|
7082
|
+
]
|
7083
|
+
}
|
7084
|
+
},
|
7085
|
+
{
|
7086
|
+
"preview_path": "primer/alpha/underline_panels/with_icons_and_counters",
|
7087
|
+
"name": "with_icons_and_counters",
|
7088
|
+
"snapshot": "true",
|
7089
|
+
"skip_rules": {
|
7090
|
+
"wont_fix": [
|
7091
|
+
"region"
|
7092
|
+
],
|
7093
|
+
"will_fix": [
|
7094
|
+
"color-contrast"
|
7095
|
+
]
|
7096
|
+
}
|
7097
|
+
},
|
7098
|
+
{
|
7099
|
+
"preview_path": "primer/alpha/underline_panels/with_actions",
|
7100
|
+
"name": "with_actions",
|
7101
|
+
"snapshot": "true",
|
7063
7102
|
"skip_rules": {
|
7064
7103
|
"wont_fix": [
|
7065
7104
|
"region"
|