@primer/view-components 0.21.1 → 0.22.0-rc.7b21c876

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 label = el.querySelector('.ActionListItem-label');
38
- if (!label)
39
- return;
40
- const tooltip = el.querySelector('.ActionListItem-truncationTooltip');
41
- if (!tooltip)
42
- return;
43
- const isTruncated = label.scrollWidth > label.clientWidth;
44
- if (isTruncated) {
45
- tooltip.style.display = '';
46
- }
47
- else {
48
- tooltip.style.display = 'none';
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
  }
@@ -132,7 +132,7 @@ class ToolTipElement extends HTMLElement {
132
132
  display: block;
133
133
  right: 0;
134
134
  left: 0;
135
- height: 12px;
135
+ height: var(--overlay-offset, 0.25rem);
136
136
  content: "";
137
137
  }
138
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/view-components",
3
- "version": "0.21.1",
3
+ "version": "0.22.0-rc.7b21c876",
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",
@@ -9141,7 +9141,33 @@
9141
9141
  {
9142
9142
  "preview_path": "primer/alpha/underline_panels/default",
9143
9143
  "name": "default",
9144
- "snapshot": "false",
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"
@@ -7072,7 +7072,33 @@
7072
7072
  {
7073
7073
  "preview_path": "primer/alpha/underline_panels/default",
7074
7074
  "name": "default",
7075
- "snapshot": "false",
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"