@primer/view-components 0.36.0-rc.96b239f2 → 0.36.0-rc.b090de00

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.
@@ -47,6 +47,13 @@ let ActionBarElement = class ActionBarElement extends HTMLElement {
47
47
  _ActionBarElement_focusZoneAbortController.set(this, null);
48
48
  }
49
49
  connectedCallback() {
50
+ // Calculate the width of all the items before hiding anything
51
+ for (const item of this.items) {
52
+ const width = item.getBoundingClientRect().width;
53
+ const marginLeft = parseInt(window.getComputedStyle(item)?.marginLeft, 10);
54
+ const marginRight = parseInt(window.getComputedStyle(item)?.marginRight, 10);
55
+ item.setAttribute('data-offset-width', `${width + marginLeft + marginRight}`);
56
+ }
50
57
  resizeObserver.observe(this);
51
58
  instersectionObserver.observe(this);
52
59
  requestAnimationFrame(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/view-components",
3
- "version": "0.36.0-rc.96b239f2",
3
+ "version": "0.36.0-rc.b090de00",
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",
@@ -68,7 +68,7 @@
68
68
  "@github/markdownlint-github": "^0.6.0",
69
69
  "@github/prettier-config": "0.0.6",
70
70
  "@playwright/test": "^1.35.1",
71
- "@primer/css": "21.5.1",
71
+ "@primer/css": "21.5.0",
72
72
  "@primer/stylelint-config": "^13.1.1",
73
73
  "@rollup/plugin-node-resolve": "^15.2.3",
74
74
  "@rollup/plugin-typescript": "^8.3.3",