@primer/view-components 0.21.1 → 0.22.0-rc.41b884a7
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.
@@ -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",
|
package/static/info_arch.json
CHANGED
@@ -9141,7 +9141,33 @@
|
|
9141
9141
|
{
|
9142
9142
|
"preview_path": "primer/alpha/underline_panels/default",
|
9143
9143
|
"name": "default",
|
9144
|
-
"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",
|
9145
9171
|
"skip_rules": {
|
9146
9172
|
"wont_fix": [
|
9147
9173
|
"region"
|
package/static/previews.json
CHANGED
@@ -7072,7 +7072,33 @@
|
|
7072
7072
|
{
|
7073
7073
|
"preview_path": "primer/alpha/underline_panels/default",
|
7074
7074
|
"name": "default",
|
7075
|
-
"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",
|
7076
7102
|
"skip_rules": {
|
7077
7103
|
"wont_fix": [
|
7078
7104
|
"region"
|