@getflip/swirl-components 0.228.0 → 0.230.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.
Files changed (128) hide show
  1. package/components.json +76 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/swirl-action-list_3.cjs.entry.js +1 -1
  4. package/dist/cjs/swirl-app-layout_5.cjs.entry.js +3 -2
  5. package/dist/cjs/swirl-autocomplete.cjs.entry.js +1 -1
  6. package/dist/cjs/swirl-banner.cjs.entry.js +1 -1
  7. package/dist/cjs/swirl-button.cjs.entry.js +1 -1
  8. package/dist/cjs/swirl-carousel.cjs.entry.js +1 -1
  9. package/dist/cjs/swirl-chip.cjs.entry.js +1 -1
  10. package/dist/cjs/swirl-components.cjs.js +1 -1
  11. package/dist/cjs/swirl-console-layout.cjs.entry.js +1 -1
  12. package/dist/cjs/swirl-date-input.cjs.entry.js +1 -1
  13. package/dist/cjs/swirl-date-picker_2.cjs.entry.js +1 -1
  14. package/dist/cjs/swirl-file-viewer_8.cjs.entry.js +1 -1
  15. package/dist/cjs/swirl-form-control.cjs.entry.js +1 -1
  16. package/dist/cjs/swirl-icon-check-small_3.cjs.entry.js +1 -1
  17. package/dist/cjs/swirl-icon-error_3.cjs.entry.js +1 -1
  18. package/dist/cjs/swirl-inline-status.cjs.entry.js +1 -1
  19. package/dist/cjs/swirl-lightbox.cjs.entry.js +1 -1
  20. package/dist/cjs/swirl-menu-item.cjs.entry.js +1 -1
  21. package/dist/cjs/swirl-menu.cjs.entry.js +1 -1
  22. package/dist/cjs/swirl-option-list_2.cjs.entry.js +1 -1
  23. package/dist/cjs/swirl-pagination.cjs.entry.js +1 -1
  24. package/dist/cjs/swirl-pdf-reader.cjs.entry.js +1 -1
  25. package/dist/cjs/swirl-popover_2.cjs.entry.js +1 -1
  26. package/dist/cjs/swirl-resource-list-file-item.cjs.entry.js +1 -1
  27. package/dist/cjs/swirl-search.cjs.entry.js +1 -1
  28. package/dist/cjs/swirl-select.cjs.entry.js +1 -1
  29. package/dist/cjs/swirl-shell-layout.cjs.entry.js +25 -14
  30. package/dist/cjs/swirl-table-column.cjs.entry.js +1 -1
  31. package/dist/cjs/swirl-table-row.cjs.entry.js +1 -1
  32. package/dist/cjs/swirl-table.cjs.entry.js +1 -1
  33. package/dist/cjs/swirl-text-input.cjs.entry.js +1 -1
  34. package/dist/cjs/swirl-time-input.cjs.entry.js +1 -1
  35. package/dist/cjs/swirl-toast.cjs.entry.js +1 -1
  36. package/dist/cjs/swirl-toolbar.cjs.entry.js +1 -1
  37. package/dist/cjs/{utils-c82e5573.js → utils-3ff36fc3.js} +4 -0
  38. package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
  39. package/dist/collection/components/swirl-resource-list/swirl-resource-list.js +26 -1
  40. package/dist/collection/components/swirl-resource-list/swirl-resource-list.spec.js +1 -1
  41. package/dist/collection/components/swirl-shell-layout/swirl-shell-layout.js +33 -15
  42. package/dist/collection/components/swirl-text/swirl-text.spec.js +2 -2
  43. package/dist/collection/utils.js +3 -0
  44. package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
  45. package/dist/components/swirl-app-layout2.js +1 -1
  46. package/dist/components/swirl-file-viewer-pdf2.js +1 -1
  47. package/dist/components/swirl-resource-list2.js +3 -1
  48. package/dist/components/swirl-shell-layout.js +27 -15
  49. package/dist/components/utils.js +4 -1
  50. package/dist/esm/loader.js +1 -1
  51. package/dist/esm/swirl-action-list_3.entry.js +1 -1
  52. package/dist/esm/swirl-app-layout_5.entry.js +3 -2
  53. package/dist/esm/swirl-autocomplete.entry.js +1 -1
  54. package/dist/esm/swirl-banner.entry.js +1 -1
  55. package/dist/esm/swirl-button.entry.js +1 -1
  56. package/dist/esm/swirl-carousel.entry.js +1 -1
  57. package/dist/esm/swirl-chip.entry.js +1 -1
  58. package/dist/esm/swirl-components.js +1 -1
  59. package/dist/esm/swirl-console-layout.entry.js +1 -1
  60. package/dist/esm/swirl-date-input.entry.js +1 -1
  61. package/dist/esm/swirl-date-picker_2.entry.js +1 -1
  62. package/dist/esm/swirl-file-viewer_8.entry.js +1 -1
  63. package/dist/esm/swirl-form-control.entry.js +1 -1
  64. package/dist/esm/swirl-icon-check-small_3.entry.js +1 -1
  65. package/dist/esm/swirl-icon-error_3.entry.js +1 -1
  66. package/dist/esm/swirl-inline-status.entry.js +1 -1
  67. package/dist/esm/swirl-lightbox.entry.js +1 -1
  68. package/dist/esm/swirl-menu-item.entry.js +1 -1
  69. package/dist/esm/swirl-menu.entry.js +1 -1
  70. package/dist/esm/swirl-option-list_2.entry.js +1 -1
  71. package/dist/esm/swirl-pagination.entry.js +1 -1
  72. package/dist/esm/swirl-pdf-reader.entry.js +1 -1
  73. package/dist/esm/swirl-popover_2.entry.js +1 -1
  74. package/dist/esm/swirl-resource-list-file-item.entry.js +1 -1
  75. package/dist/esm/swirl-search.entry.js +1 -1
  76. package/dist/esm/swirl-select.entry.js +1 -1
  77. package/dist/esm/swirl-shell-layout.entry.js +25 -14
  78. package/dist/esm/swirl-table-column.entry.js +1 -1
  79. package/dist/esm/swirl-table-row.entry.js +1 -1
  80. package/dist/esm/swirl-table.entry.js +1 -1
  81. package/dist/esm/swirl-text-input.entry.js +1 -1
  82. package/dist/esm/swirl-time-input.entry.js +1 -1
  83. package/dist/esm/swirl-toast.entry.js +1 -1
  84. package/dist/esm/swirl-toolbar.entry.js +1 -1
  85. package/dist/esm/{utils-9b747dd7.js → utils-c16952ba.js} +4 -1
  86. package/dist/swirl-components/{p-e1ff83d8.entry.js → p-08f5f1d3.entry.js} +1 -1
  87. package/dist/swirl-components/{p-f6d1648e.entry.js → p-1392a4a9.entry.js} +1 -1
  88. package/dist/swirl-components/{p-f7e43e2f.entry.js → p-13d34640.entry.js} +1 -1
  89. package/dist/swirl-components/{p-847592fc.entry.js → p-1cf1875d.entry.js} +1 -1
  90. package/dist/swirl-components/{p-b2548187.entry.js → p-1e97bdac.entry.js} +1 -1
  91. package/dist/swirl-components/{p-f313bf01.entry.js → p-2140f5ba.entry.js} +1 -1
  92. package/dist/swirl-components/{p-b6cc6b81.entry.js → p-27a1ed04.entry.js} +1 -1
  93. package/dist/swirl-components/{p-6fea6759.entry.js → p-2ce35652.entry.js} +1 -1
  94. package/dist/swirl-components/{p-4ec4c3e3.entry.js → p-2f081c81.entry.js} +1 -1
  95. package/dist/swirl-components/{p-7102e187.entry.js → p-35be11a9.entry.js} +1 -1
  96. package/dist/swirl-components/{p-ee32dd8b.entry.js → p-35da654d.entry.js} +1 -1
  97. package/dist/swirl-components/{p-763c5694.entry.js → p-46d2b252.entry.js} +1 -1
  98. package/dist/swirl-components/{p-18c4f321.entry.js → p-4beb9f23.entry.js} +1 -1
  99. package/dist/swirl-components/{p-64af1828.entry.js → p-52e3cd23.entry.js} +1 -1
  100. package/dist/swirl-components/{p-100d3b2a.entry.js → p-552c6e85.entry.js} +1 -1
  101. package/dist/swirl-components/p-5848d900.js +1 -0
  102. package/dist/swirl-components/{p-c497d897.entry.js → p-64a31581.entry.js} +1 -1
  103. package/dist/swirl-components/{p-2901eccf.entry.js → p-75b1b381.entry.js} +1 -1
  104. package/dist/swirl-components/{p-b3472679.entry.js → p-7be8ab02.entry.js} +1 -1
  105. package/dist/swirl-components/{p-3c991c18.entry.js → p-8944f95b.entry.js} +1 -1
  106. package/dist/swirl-components/{p-68ed6dcc.entry.js → p-90cad481.entry.js} +1 -1
  107. package/dist/swirl-components/{p-2824cfca.entry.js → p-a281dbe3.entry.js} +1 -1
  108. package/dist/swirl-components/{p-85103dcc.entry.js → p-a7dfc194.entry.js} +1 -1
  109. package/dist/swirl-components/{p-5b251b1e.entry.js → p-aa18cff2.entry.js} +1 -1
  110. package/dist/swirl-components/{p-0d0d3ded.entry.js → p-bfabb88e.entry.js} +1 -1
  111. package/dist/swirl-components/{p-30e79248.entry.js → p-c4671da2.entry.js} +1 -1
  112. package/dist/swirl-components/{p-9c02b88b.entry.js → p-d168a8bb.entry.js} +1 -1
  113. package/dist/swirl-components/{p-740d9751.entry.js → p-d5f023e1.entry.js} +1 -1
  114. package/dist/swirl-components/{p-5625da01.entry.js → p-e4353c3d.entry.js} +1 -1
  115. package/dist/swirl-components/{p-63f3198d.entry.js → p-ea02636d.entry.js} +1 -1
  116. package/dist/swirl-components/p-eb502f57.entry.js +1 -0
  117. package/dist/swirl-components/{p-7dfa4feb.entry.js → p-f058ae20.entry.js} +1 -1
  118. package/dist/swirl-components/{p-9d546f10.entry.js → p-f74eae56.entry.js} +1 -1
  119. package/dist/swirl-components/{p-6e36dd88.entry.js → p-ff56c492.entry.js} +1 -1
  120. package/dist/swirl-components/swirl-components.esm.js +1 -1
  121. package/dist/types/components/swirl-resource-list/swirl-resource-list.d.ts +2 -0
  122. package/dist/types/components/swirl-shell-layout/swirl-shell-layout.d.ts +2 -0
  123. package/dist/types/components.d.ts +8 -4
  124. package/dist/types/utils.d.ts +1 -0
  125. package/package.json +1 -1
  126. package/vscode-data.json +39 -0
  127. package/dist/swirl-components/p-0ac5f986.entry.js +0 -1
  128. package/dist/swirl-components/p-58abf3c6.js +0 -1
@@ -83,6 +83,7 @@ export class SwirlResourceList {
83
83
  this.assistiveTextItemMoved = "Item moved. New position:";
84
84
  this.controllingElement = undefined;
85
85
  this.label = undefined;
86
+ this.spacing = "0";
86
87
  this.assistiveText = undefined;
87
88
  this.listId = uuid();
88
89
  }
@@ -232,7 +233,7 @@ export class SwirlResourceList {
232
233
  this.assistiveText = `${this.assistiveTextItemMoving} ${this.getItemIndex(this.dragging) + 1}`;
233
234
  }
234
235
  render() {
235
- return (h(Host, { key: 'f3c37985d20f44b2f9deb155368363ba7d05cd59', onKeyDown: this.onKeyDown }, h("swirl-visually-hidden", { key: '314fdad8583092d3fa5a60ccad16e9fec64c7b16', role: "alert" }, this.assistiveText), h("swirl-box", { key: 'd707c513e411b84366b06bcfc929549464bb73db', paddingInlineEnd: "8", paddingInlineStart: "8" }, h("swirl-stack", { key: '29cd8d3aebd05446097e71785f30c6e17096def1', "aria-label": this.label, class: "resource-list", id: this.listId, ref: (el) => (this.gridEl = el), role: "grid" }, h("slot", { key: 'dfd96cd9d8bc64b99e169f8d17ce5a2e7fa2c22d' })))));
236
+ return (h(Host, { key: '5275305a537d6591f88aca3e719eb625a81af46e', onKeyDown: this.onKeyDown }, h("swirl-visually-hidden", { key: '2bfd1debd362806e9f66b9f0ced478eceba8b4ee', role: "alert" }, this.assistiveText), h("swirl-box", { key: 'b473aac22f978d47aa2d7734ac1c0228efb11210', paddingInlineEnd: "8", paddingInlineStart: "8" }, h("swirl-stack", { key: '757cc4a34325eb8298437a43b3f2aeeb895fb74a', "aria-label": this.label, class: "resource-list", id: this.listId, ref: (el) => (this.gridEl = el), role: "grid", spacing: this.spacing }, h("slot", { key: '833d2dace730d044e9f65f95e874c118a70ae25e' })))));
236
237
  }
237
238
  static get is() { return "swirl-resource-list"; }
238
239
  static get encapsulation() { return "scoped"; }
@@ -355,6 +356,30 @@ export class SwirlResourceList {
355
356
  },
356
357
  "attribute": "label",
357
358
  "reflect": false
359
+ },
360
+ "spacing": {
361
+ "type": "string",
362
+ "mutable": false,
363
+ "complexType": {
364
+ "original": "SwirlStackSpacing",
365
+ "resolved": "\"0\" | \"12\" | \"16\" | \"2\" | \"24\" | \"32\" | \"4\" | \"40\" | \"48\" | \"64\" | \"8\"",
366
+ "references": {
367
+ "SwirlStackSpacing": {
368
+ "location": "import",
369
+ "path": "../swirl-stack/swirl-stack",
370
+ "id": "src/components/swirl-stack/swirl-stack.tsx::SwirlStackSpacing"
371
+ }
372
+ }
373
+ },
374
+ "required": false,
375
+ "optional": true,
376
+ "docs": {
377
+ "tags": [],
378
+ "text": ""
379
+ },
380
+ "attribute": "spacing",
381
+ "reflect": false,
382
+ "defaultValue": "\"0\""
358
383
  }
359
384
  };
360
385
  }
@@ -48,7 +48,7 @@ describe("swirl-resource-list", () => {
48
48
  <swirl-resource-list label="Label">
49
49
  <swirl-visually-hidden role="alert"></swirl-visually-hidden>
50
50
  <swirl-box paddinginlineend="8" paddinginlinestart="8">
51
- <swirl-stack aria-label="Label" class="resource-list" id="${id}" role="grid">
51
+ <swirl-stack aria-label="Label" class="resource-list" id="${id}" role="grid" spacing="0">
52
52
  <swirl-resource-list-item description="With a description" label="This is a resource item" media="<swirl-avatar label=&quot;John Doe&quot; src=&quot;https://picsum.photos/id/433/144/144&quot;></swirl-avatar>"></swirl-resource-list-item>
53
53
  <swirl-resource-list-item description="With a description" label="This is a resource item" media="<swirl-avatar label=&quot;John Doe&quot; src=&quot;https://picsum.photos/id/103/144/144&quot;></swirl-avatar>"></swirl-resource-list-item>
54
54
  </swirl-stack>
@@ -1,6 +1,7 @@
1
1
  import { h, Host, } from "@stencil/core";
2
2
  import classnames from "classnames";
3
3
  import * as focusTrap from "focus-trap";
4
+ import { isDesktopViewport } from "../../utils";
4
5
  const SECONDARY_NAVIGATION_COLLAPSE_STORAGE_KEY = "SWIRL_SHELL_SECONDARY_NAVIGATION_COLLAPSE_STATE";
5
6
  const SECONDARY_NAVIGATION_VIEW_STORAGE_KEY = "SWIRL_SHELL_SECONDARY_NAVIGATION_VIEW_STATE";
6
7
  const NAVIGATION_COLLAPSE_STORAGE_KEY = "SWIRL_SHELL_NAVIGATION_COLLAPSE_STATE";
@@ -23,6 +24,7 @@ export class SwirlShellLayout {
23
24
  this.mainNavItems = Array.from(this.el.querySelectorAll("swirl-shell-navigation-item[slot='nav'], [slot='nav'] swirl-shell-navigation-item"));
24
25
  this.secondaryNavItems = Array.from(this.el.querySelectorAll("swirl-shell-navigation-item[slot='secondary-nav'], [slot='secondary-nav'] swirl-shell-navigation-item"));
25
26
  this.toggleNavItemLabels();
27
+ this.setSecondaryNavItemsTiled();
26
28
  };
27
29
  this.toggleSecondaryNavView = (event) => {
28
30
  event.stopPropagation();
@@ -67,8 +69,10 @@ export class SwirlShellLayout {
67
69
  this.navigationCollapsed = undefined;
68
70
  this.secondaryNavCollapsed = undefined;
69
71
  this.secondaryNavView = "list";
72
+ this.isDesktopViewport = true;
70
73
  }
71
74
  componentWillLoad() {
75
+ this.isDesktopViewport = isDesktopViewport();
72
76
  this.collectNavItems();
73
77
  const restoredSidebarState = localStorage.getItem(SIDEBAR_STORAGE_KEY) === "true";
74
78
  this.sidebarActive =
@@ -88,8 +92,7 @@ export class SwirlShellLayout {
88
92
  },
89
93
  },
90
94
  });
91
- this.toggleNavItemLabels();
92
- this.setSecondaryNavItemsTiled();
95
+ this.collectNavItems();
93
96
  this.navMutationObserver = new MutationObserver(() => {
94
97
  this.collectNavItems();
95
98
  this.setSecondaryNavItemsTiled();
@@ -132,29 +135,37 @@ export class SwirlShellLayout {
132
135
  watchSidebarActive() {
133
136
  localStorage.setItem(SIDEBAR_STORAGE_KEY, String(this.sidebarActive));
134
137
  }
138
+ onWindowResize() {
139
+ if (this.isDesktopViewport !== isDesktopViewport()) {
140
+ this.isDesktopViewport = isDesktopViewport();
141
+ this.collectNavItems();
142
+ }
143
+ }
135
144
  /**
136
145
  * Opens the mobile navigation.
137
146
  */
138
147
  async showMobileNavigation() {
139
148
  this.mobileNavigationActive = true;
149
+ this.collectNavItems();
140
150
  }
141
151
  /**
142
152
  * Hides the mobile navigation.
143
153
  */
144
154
  async hideMobileNavigation() {
145
155
  this.mobileNavigationActive = false;
156
+ this.toggleNavItemLabels();
146
157
  }
147
158
  toggleNavItemLabels() {
148
159
  [...this.secondaryNavItems, ...this.mainNavItems].forEach((item) => {
149
- item.hideLabel =
150
- !!(this.enableSecondaryNavGridLayout && this.navigationCollapsed) ||
151
- (!this.enableSecondaryNavGridLayout && this.navigationCollapsed);
160
+ item.hideLabel = this.navigationCollapsed && this.isDesktopViewport;
152
161
  });
153
162
  }
154
163
  setSecondaryNavItemsTiled() {
155
164
  this.secondaryNavItems.forEach((item) => {
156
165
  item.tiled =
157
- this.enableSecondaryNavGridLayout && this.secondaryNavView === "grid";
166
+ this.enableSecondaryNavGridLayout &&
167
+ (this.secondaryNavView === "grid" ||
168
+ (this.navigationCollapsed && this.isDesktopViewport));
158
169
  });
159
170
  }
160
171
  restoreSecondaryNavState() {
@@ -169,31 +180,31 @@ export class SwirlShellLayout {
169
180
  }
170
181
  render() {
171
182
  const hasSidebarToggleBadgeWithLabel = this.sidebarToggleBadge !== true && this.sidebarToggleBadge !== "true";
183
+ const mainNavCollapsed = this.navigationCollapsed && this.isDesktopViewport;
172
184
  const hasSecondaryNav = Boolean(this.el.querySelector("[slot='secondary-nav']"));
173
185
  const className = classnames("shell-layout", {
174
186
  "shell-layout--branded-header": this.brandedHeader,
175
187
  "shell-layout--secondary-nav-collapsed": this.secondaryNavCollapsed,
176
188
  "shell-layout--has-secondary-nav": hasSecondaryNav,
177
189
  "shell-layout--mobile-navigation-active": this.mobileNavigationActive,
178
- "shell-layout--navigation-collapsed": this.navigationCollapsed,
190
+ "shell-layout--navigation-collapsed": mainNavCollapsed,
179
191
  "shell-layout--sidebar-active": this.sidebarActive,
180
192
  });
181
- return (h(Host, { key: '2a08e1ff3c834400f2b1bdbe0ce6f2b4ab6752d4' }, h("div", { key: 'af7cfc344e31d70ea8c80335e7012cdf0ecd0ffb', class: className }, h("header", { key: '4740f8e74978c9765e1c26ce25baabcc9faedf4f', class: "shell-layout__header", "data-tauri-drag-region": "true" }, h("button", { key: 'ac69feea364da93f5529adee08d52b6bbd0783f1', class: "shell-layout__skip-link", onClick: this.skipLinkClick.emit, type: "button" }, this.skipLinkLabel), h("div", { key: 'b346cfcef2f12bd64c880b4df1abd2363300d47d', class: "shell-layout__header-left" }, h("button", { key: 'df98eec8ca1b01219c798af47735cef5295fd1e1', class: "shell-layout__header-tool", onClick: this.onNavigationToggleClick, type: "button" }, h("swirl-icon-dock-left", { key: '9e40c0d95b4f57ca7838b5e16507e0cac995c59c', size: 20 }), h("swirl-visually-hidden", { key: '912ff1edf6806b234146c01cc5d8777ddaef0b19' }, this.navigationToggleLabel)), h("a", { key: 'e3e6ccb5b48c531aa9bf449439b196ca7f61f3f2', class: "shell-layout__header-tool", href: "javascript:history.back()" }, h("swirl-icon-arrow-back", { key: 'c47f9cd28090c073dcf2508d7630dad6b42468b4', size: 20 }), h("swirl-visually-hidden", { key: 'ca8a1448431bdda7b145682ec192b2e47f929985' }, this.browserBackButtonLabel)), h("a", { key: 'bdceb890d81359edc542770bd04a3d3d2ade8a28', class: "shell-layout__header-tool", href: "javascript:history.forward()" }, h("swirl-icon-arrow-forward", { key: '867cde99d76414ec66a3994e887de23985fcbe82', size: 20 }), h("swirl-visually-hidden", { key: '36ef417bbbd6027eb8b021671d9abaf471d37087' }, this.browserForwardButtonLabel)), h("slot", { key: 'f360f6ba553a877a453161d0d81f650d536338c7', name: "left-header-tools" })), h("div", { key: '6771b4339bcfb8a3fdd7b011facb27ceb98e1843', class: "shell-layout__logo" }, h("slot", { key: 'a0a6f1ccc356dba5d92369f0d4923f628cf01ca2', name: "logo" })), h("div", { key: 'ad42f72e731aa0d5b12f8f46635432963c608818', class: "shell-layout__header-right" }, h("slot", { key: '2151c95079396c8bf70447e56b572ae8e660453b', name: "right-header-tools" }), h("button", { key: 'd1b07b8363746a2d52d40ff99351b2985ac48e6c', class: "shell-layout__header-tool shell-layout__sidebar-toggle", onClick: this.sidebarToggleClick.emit, type: "button" }, h("swirl-icon", { key: 'aa11582771f2147813a2fa5ca56d0dc56d9600eb', glyph: this.sidebarToggleIcon, size: 20 }), h("swirl-visually-hidden", { key: '673cb8b03399ed8bca293f9b7ae0a5995e52c2d8' }, this.sidebarToggleLabel), this.sidebarToggleBadge && (h("swirl-badge", { key: '4b58b910efe4d4f60d88b559ff1f8448d953ba28', "aria-label": this.sidebarToggleBadgeAriaLabel, label: !hasSidebarToggleBadgeWithLabel
193
+ return (h(Host, { key: '5c12250de3323c6e489f3e91807fce226378a364' }, h("div", { key: '20efbc31458693f8f880e15bdef8732a979e7723', class: className }, h("header", { key: '93645e7bf08d24544267a9a35de0887ebdcac9e9', class: "shell-layout__header", "data-tauri-drag-region": "true" }, h("button", { key: '20361c417ab828b5cf9bef5710012cd48d73540b', class: "shell-layout__skip-link", onClick: this.skipLinkClick.emit, type: "button" }, this.skipLinkLabel), h("div", { key: '6c76237a92f7758630f947d174eca682df9813f7', class: "shell-layout__header-left" }, h("button", { key: '1282daa50168b50b57e057f050fdcd43339060ab', class: "shell-layout__header-tool", onClick: this.onNavigationToggleClick, type: "button" }, h("swirl-icon-dock-left", { key: '16891b597aad29f8cf8a3641db6208db46a84b47', size: 20 }), h("swirl-visually-hidden", { key: '1294f46b1faefca7a122c494b861d25272ea2cb4' }, this.navigationToggleLabel)), h("a", { key: 'f7ed1b921d55faf287752be5d4ad9d8c3155653a', class: "shell-layout__header-tool", href: "javascript:history.back()" }, h("swirl-icon-arrow-back", { key: '5b03132e0e5be62efe2f5f217aa064942c5b78fb', size: 20 }), h("swirl-visually-hidden", { key: 'bb26c2d22fe311fc899b022fd5e3fc1bdd2333d6' }, this.browserBackButtonLabel)), h("a", { key: '111fe00b6d8f0aa4a1739ed7f11e27b4de82af4f', class: "shell-layout__header-tool", href: "javascript:history.forward()" }, h("swirl-icon-arrow-forward", { key: '0cbc2913813e5a60a59151ef70f87123c38636d7', size: 20 }), h("swirl-visually-hidden", { key: '3c143db049267b6f7b9040cd8efa4b6767b31c71' }, this.browserForwardButtonLabel)), h("slot", { key: 'd0e00ad4b9424c3713be1cbdc4173cca7e175f60', name: "left-header-tools" })), h("div", { key: '9053b2428a73b52f2657138a2018c3bb8df9b942', class: "shell-layout__logo" }, h("slot", { key: '46fb16906c4940ac2226a23c60ca4e2b700c1f2b', name: "logo" })), h("div", { key: '35825b726163fca399fcccd8f92c511e951a4f6d', class: "shell-layout__header-right" }, h("slot", { key: '7a16ab917f4031730f0915658325ab663b46abdc', name: "right-header-tools" }), h("button", { key: '0828fa4d0969f4ebe05036455de31c1c921b7ae9', class: "shell-layout__header-tool shell-layout__sidebar-toggle", onClick: this.sidebarToggleClick.emit, type: "button" }, h("swirl-icon", { key: 'd39c7c329648a3798b6424558ce7f7de34b765f9', glyph: this.sidebarToggleIcon, size: 20 }), h("swirl-visually-hidden", { key: '51889052fb865b555db470634e69adfcb7e9a433' }, this.sidebarToggleLabel), this.sidebarToggleBadge && (h("swirl-badge", { key: '4cc79f7e073afc1f6e609e54480b468f4e5f028e', "aria-label": this.sidebarToggleBadgeAriaLabel, label: !hasSidebarToggleBadgeWithLabel
182
194
  ? this.sidebarToggleBadgeAriaLabel
183
- : String(this.sidebarToggleBadge), size: "xs", variant: !hasSidebarToggleBadgeWithLabel ? "dot" : "default" }))), h("slot", { key: '95e6abbce7dee1b9d53cdb0af7d852172c0ecda0', name: "avatar" }))), h("div", { key: '46ab18c480eb5ff275a8af9dbf94f08772508a0c', class: "shell-layout__mobile-nav-backdrop", onClick: this.onNavigationClick }), h("nav", { key: '356d67f7fd3e99731cddf139dd54957e1cff4158', "aria-labelledby": "main-navigation-label", class: "shell-layout__nav", onClick: this.onNavigationClick, ref: (el) => (this.navElement = el) }, h("div", { key: 'a23f2504292957b212b99930399a947484b847b2', class: "shell-layout__mobile-header" }, h("slot", { key: '31f1fe99e8a55c4521e4591ac5d368665cb067fe', name: "mobile-logo" }), h("div", { key: 'f1b8bfcbb2532a2ab50394b2e4fc27bfe6b6069e', class: "shell-layout__mobile-header-tools" }, h("slot", { key: 'bbde50cb773426ddd9c13ad9ed8255f63a2bcd2f', name: "mobile-header-tools" }), h("button", { key: '8d10f23b745bcb81ff9c7251a7f7fe7c6c3012db', class: "shell-layout__header-tool", type: "button" }, h("swirl-icon-double-arrow-left", { key: '9cdd84cefb55d1623dbb716dce7e35f866342018', size: 20 }), h("swirl-visually-hidden", { key: '4621fa1a7acf0a403c2e3e4da7210b770d13b051' }, this.hideMobileNavigationButtonLabel)))), h("div", { key: '99bd9a3cfcc7859c26d1995847574df1875ca511', class: "shell-layout__nav-body" }, h("swirl-visually-hidden", { key: '908ab720d24a8d1b976f84c9e22e0f1fc8ac6c74' }, h("span", { key: '0f8c25ecd451c3ba2cbdc737466ffaf78cbc373d', id: "main-navigation-label" }, this.navigationLabel)), h("slot", { key: 'c3444ebf80551ab97887c34ca0859545e0809c11', name: "nav", onSlotchange: this.collectNavItems }), h("div", { key: '298f337e2c97bba06e6eeab3cc925ae683f244f3', class: "shell-layout__secondary-nav" }, h("swirl-separator", { key: '3b73e0be030ce4b22bd13953181897d1b65638b3', borderColor: "strong", spacing: "16" }), this.enableSecondaryNavGridLayout && (h("swirl-box", { key: '96ec376bd6c3fa514cabde7b8d42d9d9eda4c3e3', paddingBlockEnd: "16" }, h("swirl-stack", { key: 'ce9778f2a08bb1a0b89d8a99a4625778a0cc308c', justify: this.navigationCollapsed ? "center" : "space-between", orientation: "horizontal" }, h("swirl-button", { key: '4d3198c29d0d3a6c650194786cecfef48bf42650', hideLabel: this.navigationCollapsed, icon: this.secondaryNavCollapsed
195
+ : String(this.sidebarToggleBadge), size: "xs", variant: !hasSidebarToggleBadgeWithLabel ? "dot" : "default" }))), h("slot", { key: '8119e763ed4ec0c4934317ac5fa2bb5ae56413a3', name: "avatar" }))), h("div", { key: '618249da25d9a510e3b850d68389e52d4c5b64ed', class: "shell-layout__mobile-nav-backdrop", onClick: this.onNavigationClick }), h("nav", { key: 'a1689720c5f62cf1572ee80ed1b82ee5676cd406', "aria-labelledby": "main-navigation-label", class: "shell-layout__nav", onClick: this.onNavigationClick, ref: (el) => (this.navElement = el) }, h("div", { key: 'b4500a5a6f0f4a32ce4ee1f8c90c40896aabb5c8', class: "shell-layout__mobile-header" }, h("slot", { key: 'f22761f5011f27f19628d415840c90e8dbffd306', name: "mobile-logo" }), h("div", { key: '9761126f496e42f861a474722ee12b908efc2108', class: "shell-layout__mobile-header-tools" }, h("slot", { key: '3dac3d5358433559971ba3e2aa60428daf72d6fd', name: "mobile-header-tools" }), h("button", { key: '8df62c780226b37da61106c09759c0f83827172e', class: "shell-layout__header-tool", type: "button" }, h("swirl-icon-double-arrow-left", { key: 'd0ee691f631be0ecfad427dd9640e1d9563083b1', size: 20 }), h("swirl-visually-hidden", { key: '3e028b5919a3967cd725ee7601d2569fe5378b7b' }, this.hideMobileNavigationButtonLabel)))), h("div", { key: 'a6478a52bfedf7c080244b13aa3ecfaadb8afaec', class: "shell-layout__nav-body" }, h("swirl-visually-hidden", { key: '71fb758c944603cbc0eca1a70f57cab4d81d3ea6' }, h("span", { key: '8fcb34cde559b2192caead914d558df4581b23ec', id: "main-navigation-label" }, this.navigationLabel)), h("slot", { key: '4bc9baa3d12381678981e84c3727ee79a127fea2', name: "nav", onSlotchange: this.collectNavItems }), h("div", { key: 'c555bc66bceed44d1ee9f9599cb6a66b3fa484a2', class: "shell-layout__secondary-nav" }, h("swirl-separator", { key: 'cba186e98e42a5f7644c4dfabf773f7e49587f3c', borderColor: "strong", spacing: "16" }), this.enableSecondaryNavGridLayout && (h("swirl-box", { key: 'b5393c61be683dcbdbfef248763ca5d388aba4d4', paddingBlockEnd: "16" }, h("swirl-stack", { key: '3238deda1ae4b70aaf1fcbf0a0f3091d35b3ebaf', justify: mainNavCollapsed ? "center" : "space-between", orientation: "horizontal" }, h("swirl-button", { key: '10a3251a25367af6d85368f3497eda2eaaf8b154', hideLabel: mainNavCollapsed, icon: this.secondaryNavCollapsed
184
196
  ? "<swirl-icon-expand-more></swirl-icon-expand-more>"
185
197
  : "<swirl-icon-expand-less></swirl-icon-expand-less>", label: this.secondaryNavCollapsed
186
198
  ? this.secondaryNavExpandLabel
187
- : this.secondaryNavCollapseLabel, onClick: this.toggleSecondaryNavCollapse, variant: "plain" }), !this.navigationCollapsed &&
188
- !this.secondaryNavCollapsed && (h("swirl-button", { key: '9c43584ccb0e91ecc7143c1f4671c664515db04c', icon: this.secondaryNavView === "grid"
199
+ : this.secondaryNavCollapseLabel, onClick: this.toggleSecondaryNavCollapse, variant: "plain" }), !mainNavCollapsed && !this.secondaryNavCollapsed && (h("swirl-button", { key: 'df1df6b2a06c721a6b4df20dac8f9de908708021', icon: this.secondaryNavView === "grid"
189
200
  ? "<swirl-icon-menu></swirl-icon-menu>"
190
201
  : "<swirl-icon-hamburger-menu></swirl-icon-hamburger-menu>", iconPosition: "end", label: this.secondaryNavView === "grid"
191
202
  ? this.gridNavLayoutToggleLabel
192
- : this.listNavLayoutToggleLabel, onClick: this.toggleSecondaryNavView, variant: "plain" }))))), h("div", { key: '01ac89f493e0c1105c8335a28dd854429d30bb7b', class: {
203
+ : this.listNavLayoutToggleLabel, onClick: this.toggleSecondaryNavView, variant: "plain" }))))), h("div", { key: '69a481958c06725c99888a4dbb70807ab424c2ac', class: {
193
204
  "shell-layout__secondary-nav-items": true,
194
205
  "shell-layout__secondary-nav-items--grid-view": this.enableSecondaryNavGridLayout &&
195
- this.secondaryNavView === "grid",
196
- } }, h("slot", { key: '4739e0f330868683ab55f86544d704a6824739fe', name: "secondary-nav", onSlotchange: this.collectNavItems }))))), h("main", { key: 'b6a57c3022e231f7b2c4217150863e7db9d5b6cd', class: "shell-layout__main", id: "main-content" }, h("slot", { key: '2a30c9408e9fdb3f7b6a0e4d14f73c0134970da1' })), h("aside", { key: 'cc5ebd6001cf2f5ea5c0f24ff419591a325860c0', class: "shell-layout__sidebar", inert: this.sidebarActive ? undefined : true }, h("div", { key: 'cdddc210d0b8e0b9550ff1f3741278252d79fc73', class: "shell-layout__sidebar-body" }, h("div", { key: 'a8ebbdd90a49101ddaceeec6945e2d402f8271d4', class: "shell-layout__sidebar-app-bar" }, h("slot", { key: '7918198bf32dd5fd2da628c0583da1519ec6a1df', name: "sidebar-app-bar" })), h("div", { key: '98437c94ee53ad2b948b06212f72b351f1a770a5', class: "shell-layout__sidebar-content" }, h("slot", { key: 'd656f8edfe29979c906e05ab326741c69713e621', name: "sidebar" })))))));
206
+ (this.secondaryNavView === "grid" || mainNavCollapsed),
207
+ } }, h("slot", { key: '7054faefe6f13c25a071498e9b556d9f7990cc5a', name: "secondary-nav", onSlotchange: this.collectNavItems }))))), h("main", { key: 'eee310fc015240bf09e44f52e1273f7d86dec913', class: "shell-layout__main", id: "main-content" }, h("slot", { key: '2564cd4717d18a74cee4ed6da1533e2148b0ded8' })), h("aside", { key: '9e906480ee9b8e4625107e1382a0ab71edbebd07', class: "shell-layout__sidebar", inert: this.sidebarActive ? undefined : true }, h("div", { key: '900e544ddbef42702dd3507d3163ba208ed6e5ca', class: "shell-layout__sidebar-body" }, h("div", { key: '0fbcf8cd5a0e158e7923cf851cc474b570ec886a', class: "shell-layout__sidebar-app-bar" }, h("slot", { key: '1904105bcb39ba4bf04b93fe6f97fa1feece49d1', name: "sidebar-app-bar" })), h("div", { key: 'f391fde20115bcab8952fc7b66fd74c64e27520f', class: "shell-layout__sidebar-content" }, h("slot", { key: '5f7b34ddda70f186199eeda95b119463e7b82cb0', name: "sidebar" })))))));
197
208
  }
198
209
  static get is() { return "swirl-shell-layout"; }
199
210
  static get encapsulation() { return "scoped"; }
@@ -518,7 +529,8 @@ export class SwirlShellLayout {
518
529
  "mobileNavigationActive": {},
519
530
  "navigationCollapsed": {},
520
531
  "secondaryNavCollapsed": {},
521
- "secondaryNavView": {}
532
+ "secondaryNavView": {},
533
+ "isDesktopViewport": {}
522
534
  };
523
535
  }
524
536
  static get events() {
@@ -625,6 +637,12 @@ export class SwirlShellLayout {
625
637
  "target": "window",
626
638
  "capture": false,
627
639
  "passive": false
640
+ }, {
641
+ "name": "resize",
642
+ "method": "onWindowResize",
643
+ "target": "window",
644
+ "capture": false,
645
+ "passive": true
628
646
  }];
629
647
  }
630
648
  }
@@ -16,7 +16,7 @@ describe("swirl-text", () => {
16
16
  });
17
17
  expect(page.root).toEqualHtml(`
18
18
  <swirl-text align="center" color="critical" font-style="italic" size="lg" weight="medium">
19
- <p class="text text--align-center text--color-critical text--font-family-text text--font-style-italic text--size-lg text--truncate-direction-end text--weight-medium" style="white-space: normal;">
19
+ <p class="text text--align-center text--color-critical text--font-family-text text--font-style-italic text--responsive text--size-lg text--truncate-direction-end text--weight-medium" style="white-space: normal;">
20
20
  Est, odio dis scelerisque risus sagittis lorem rhoncus. Vivamus tristique habitant vitae cursus nisl. Sed adipiscing proin suspendisse aliquam maecenas faucibus mauris purus. Tortor ut habitant erat adipiscing nulla pretium, cursus tortor. Amet viverra et platea lacus, nec molestie tincidunt.
21
21
  </p>
22
22
  </swirl-text>
@@ -37,7 +37,7 @@ describe("swirl-text", () => {
37
37
  });
38
38
  expect(page.root).toEqualHtml(`
39
39
  <swirl-text as="span">
40
- <span class="text text--align-start text--color-default text--font-family-text text--font-style-normal text--size-base text--truncate-direction-end text--weight-normal" style="white-space: normal;">
40
+ <span class="text text--align-start text--color-default text--font-family-text text--font-style-normal text--responsive text--size-base text--truncate-direction-end text--weight-normal" style="white-space: normal;">
41
41
  Est, odio dis scelerisque risus sagittis lorem rhoncus. Vivamus tristique habitant vitae cursus nisl. Sed adipiscing proin suspendisse aliquam maecenas faucibus mauris purus. Tortor ut habitant erat adipiscing nulla pretium, cursus tortor. Amet viverra et platea lacus, nec molestie tincidunt.
42
42
  </span>
43
43
  </swirl-text>
@@ -136,6 +136,9 @@ export function getVisibleHeight(element, container) {
136
136
  export function isMobileViewport() {
137
137
  return !window.matchMedia("(min-width: 768px)").matches;
138
138
  }
139
+ export function isDesktopViewport() {
140
+ return window.matchMedia("(min-width: 992px)").matches;
141
+ }
139
142
  export function prefersReducedMotion() {
140
143
  return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
141
144
  }