@duetds/components 8.6.1 → 8.6.3

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 (223) hide show
  1. package/hydrate/index.js +87 -29
  2. package/lib/cjs/duet-banner.cjs.entry.js +12 -7
  3. package/lib/cjs/duet-caption_4.cjs.entry.js +6 -3
  4. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-modal.cjs.entry.js +24 -3
  7. package/lib/cjs/duet-page-heading.cjs.entry.js +2 -1
  8. package/lib/cjs/duet-pagination_2.cjs.entry.js +22 -9
  9. package/lib/cjs/duet-popup-menu.cjs.entry.js +1 -0
  10. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  11. package/lib/cjs/duet.cjs.js +1 -1
  12. package/lib/cjs/loader.cjs.js +1 -1
  13. package/lib/collection/components/duet-action-button/duet-action-button.js +2 -2
  14. package/lib/collection/components/duet-alert/duet-alert.js +1 -1
  15. package/lib/collection/components/duet-banner/duet-banner.css +117 -133
  16. package/lib/collection/components/duet-banner/duet-banner.js +12 -7
  17. package/lib/collection/components/duet-button/duet-button.js +5 -5
  18. package/lib/collection/components/duet-caption/duet-caption.js +1 -1
  19. package/lib/collection/components/duet-card/duet-card.js +3 -3
  20. package/lib/collection/components/duet-checkbox/duet-checkbox.css +4 -4
  21. package/lib/collection/components/duet-checkbox/duet-checkbox.js +3 -3
  22. package/lib/collection/components/duet-chip/duet-chip.js +6 -6
  23. package/lib/collection/components/duet-choice/duet-choice.js +3 -3
  24. package/lib/collection/components/duet-collapsible/duet-collapsible.js +3 -3
  25. package/lib/collection/components/duet-combobox/duet-combobox.js +3 -3
  26. package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +1 -1
  27. package/lib/collection/components/duet-date-picker/duet-date-picker.js +4 -4
  28. package/lib/collection/components/duet-divider/duet-divider.js +1 -1
  29. package/lib/collection/components/duet-editable-table/duet-editable-table.js +5 -5
  30. package/lib/collection/components/duet-empty-state/duet-empty-state.js +1 -1
  31. package/lib/collection/components/duet-file-chooser/duet-file-chooser.js +1 -1
  32. package/lib/collection/components/duet-footer/duet-footer.js +7 -7
  33. package/lib/collection/components/duet-grid/duet-grid.js +3 -3
  34. package/lib/collection/components/duet-header/duet-header.js +15 -15
  35. package/lib/collection/components/duet-heading/duet-heading.js +1 -1
  36. package/lib/collection/components/duet-hero/duet-hero.js +5 -5
  37. package/lib/collection/components/duet-icon/duet-icon.css +3 -2
  38. package/lib/collection/components/duet-input/duet-input.js +8 -8
  39. package/lib/collection/components/duet-label/duet-label.js +2 -2
  40. package/lib/collection/components/duet-layout/duet-layout.js +1 -1
  41. package/lib/collection/components/duet-link/duet-link.css +15 -6
  42. package/lib/collection/components/duet-link/duet-link.js +40 -2
  43. package/lib/collection/components/duet-list/duet-list.js +3 -3
  44. package/lib/collection/components/duet-logo/duet-logo.js +1 -1
  45. package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +1 -1
  46. package/lib/collection/components/duet-modal/duet-modal.css +2 -1
  47. package/lib/collection/components/duet-modal/duet-modal.e2e.js +21 -0
  48. package/lib/collection/components/duet-modal/duet-modal.js +59 -10
  49. package/lib/collection/components/duet-multiselect/duet-multiselect.js +5 -5
  50. package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +1 -1
  51. package/lib/collection/components/duet-number-input/duet-number-input.js +4 -4
  52. package/lib/collection/components/duet-overlay/duet-overlay.js +1 -1
  53. package/lib/collection/components/duet-page-heading/duet-page-heading.css +3 -0
  54. package/lib/collection/components/duet-page-heading/duet-page-heading.js +1 -0
  55. package/lib/collection/components/duet-pagination/duet-pagination.js +37 -10
  56. package/lib/collection/components/duet-paragraph/duet-paragraph.js +3 -3
  57. package/lib/collection/components/duet-popup-menu/duet-popup-menu.js +22 -1
  58. package/lib/collection/components/duet-popup-menu-item/duet-popup-menu-item.js +2 -2
  59. package/lib/collection/components/duet-radio/duet-radio.css +4 -4
  60. package/lib/collection/components/duet-radio/duet-radio.js +3 -3
  61. package/lib/collection/components/duet-range-slider/duet-range-slider.js +2 -2
  62. package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +24 -2
  63. package/lib/collection/components/duet-select/duet-select.js +5 -5
  64. package/lib/collection/components/duet-show-more/duet-show-more.js +1 -1
  65. package/lib/collection/components/duet-slideout/duet-slideout.js +1 -1
  66. package/lib/collection/components/duet-spacer/duet-spacer.js +2 -2
  67. package/lib/collection/components/duet-spinner/duet-spinner.js +1 -1
  68. package/lib/collection/components/duet-step/duet-step.js +2 -2
  69. package/lib/collection/components/duet-stepper/duet-stepper.js +1 -1
  70. package/lib/collection/components/duet-tab-group/duet-tab-group.js +5 -5
  71. package/lib/collection/components/duet-textarea/duet-textarea.js +4 -4
  72. package/lib/collection/components/duet-toggle/duet-toggle.js +1 -1
  73. package/lib/collection/components/duet-tooltip/duet-tooltip.js +1 -1
  74. package/lib/collection/components/duet-upload/duet-upload.js +14 -14
  75. package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +4 -0
  76. package/lib/collection/components/duet-upload-item/duet-upload-item.js +6 -2
  77. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  78. package/lib/dist-custom-elements/duet-alert.js +1 -1
  79. package/lib/dist-custom-elements/duet-banner.js +13 -8
  80. package/lib/dist-custom-elements/duet-breadcrumb.js +1 -1
  81. package/lib/dist-custom-elements/duet-button.js +1 -1
  82. package/lib/dist-custom-elements/duet-callout.js +1 -1
  83. package/lib/dist-custom-elements/duet-card.js +1 -1
  84. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  85. package/lib/dist-custom-elements/duet-chip.js +1 -1
  86. package/lib/dist-custom-elements/duet-choice-group.js +3 -3
  87. package/lib/dist-custom-elements/duet-choice.js +1 -1
  88. package/lib/dist-custom-elements/duet-collapsible.js +1 -1
  89. package/lib/dist-custom-elements/duet-combobox.js +6 -6
  90. package/lib/dist-custom-elements/duet-contact-card.js +3 -3
  91. package/lib/dist-custom-elements/duet-cookie-consent.js +2 -2
  92. package/lib/dist-custom-elements/duet-date-picker.js +6 -6
  93. package/lib/dist-custom-elements/duet-editable-table.js +3 -3
  94. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  95. package/lib/dist-custom-elements/duet-footer.js +1 -1
  96. package/lib/dist-custom-elements/duet-header.js +2 -2
  97. package/lib/dist-custom-elements/duet-hero.js +2 -2
  98. package/lib/dist-custom-elements/duet-icon.js +1 -1
  99. package/lib/dist-custom-elements/duet-input.js +1 -1
  100. package/lib/dist-custom-elements/duet-link.js +1 -1
  101. package/lib/dist-custom-elements/duet-menu-bar-button.js +1 -1
  102. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +1 -1
  103. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +1 -1
  104. package/lib/dist-custom-elements/duet-menu-bar-item.js +1 -1
  105. package/lib/dist-custom-elements/duet-menu-bar-link.js +1 -1
  106. package/lib/dist-custom-elements/duet-modal.js +27 -5
  107. package/lib/dist-custom-elements/duet-multiselect.js +4 -4
  108. package/lib/dist-custom-elements/duet-notification-drawer.js +2 -2
  109. package/lib/dist-custom-elements/duet-number-input.js +5 -5
  110. package/lib/dist-custom-elements/duet-page-heading.js +3 -2
  111. package/lib/dist-custom-elements/duet-pagination.js +24 -14
  112. package/lib/dist-custom-elements/duet-popup-menu-item.js +1 -1
  113. package/lib/dist-custom-elements/duet-popup-menu.js +2 -0
  114. package/lib/dist-custom-elements/duet-radio-group.js +3 -3
  115. package/lib/dist-custom-elements/duet-radio.js +1 -1
  116. package/lib/dist-custom-elements/duet-range-stepper.js +8 -3
  117. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  118. package/lib/dist-custom-elements/duet-select.js +1 -1
  119. package/lib/dist-custom-elements/duet-show-more.js +1 -1
  120. package/lib/dist-custom-elements/duet-slideout-lang.js +1 -1
  121. package/lib/dist-custom-elements/duet-slideout-link.js +1 -1
  122. package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +1 -1
  123. package/lib/dist-custom-elements/duet-slideout-panel.js +1 -1
  124. package/lib/dist-custom-elements/duet-slideout.js +1 -1
  125. package/lib/dist-custom-elements/duet-step.js +1 -1
  126. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +1 -1
  127. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +1 -1
  128. package/lib/dist-custom-elements/duet-submenu-bar-item.js +1 -1
  129. package/lib/dist-custom-elements/duet-submenu-bar-link.js +1 -1
  130. package/lib/dist-custom-elements/duet-submenu-bar.js +1 -1
  131. package/lib/dist-custom-elements/duet-tab-group.js +6 -6
  132. package/lib/dist-custom-elements/duet-textarea.js +3 -3
  133. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +1 -1
  134. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +1 -1
  135. package/lib/dist-custom-elements/duet-toolbar-item.js +1 -1
  136. package/lib/dist-custom-elements/duet-toolbar-link.js +1 -1
  137. package/lib/dist-custom-elements/duet-tooltip-popup.js +1 -1
  138. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  139. package/lib/dist-custom-elements/duet-tray.js +1 -1
  140. package/lib/dist-custom-elements/duet-upload-item.js +1 -1
  141. package/lib/dist-custom-elements/duet-upload.js +8 -8
  142. package/lib/dist-custom-elements/{p-68ba7bf1.js → p-01b67752.js} +9 -4
  143. package/lib/dist-custom-elements/{p-cb694530.js → p-0f0e9944.js} +3 -3
  144. package/lib/dist-custom-elements/{p-83231ea8.js → p-4c6021d9.js} +1 -1
  145. package/lib/dist-custom-elements/{p-755dd68f.js → p-531e8a71.js} +1 -1
  146. package/lib/dist-custom-elements/{p-e702eb52.js → p-71814469.js} +3 -3
  147. package/lib/dist-custom-elements/{p-0cee8a12.js → p-7b843aae.js} +1 -1
  148. package/lib/dist-custom-elements/{p-a829df6e.js → p-842a828e.js} +1 -1
  149. package/lib/dist-custom-elements/{p-014c1177.js → p-8f03dae0.js} +4 -4
  150. package/lib/dist-custom-elements/{p-667579b0.js → p-98d17606.js} +1 -1
  151. package/lib/dist-custom-elements/{p-28ec3461.js → p-a38a452e.js} +2 -2
  152. package/lib/dist-custom-elements/{p-a02e62f3.js → p-bb662681.js} +2 -2
  153. package/lib/dist-custom-elements/{p-92a16064.js → p-bc9ebb36.js} +2 -2
  154. package/lib/dist-custom-elements/{p-f4ac6968.js → p-bfcc033c.js} +1 -1
  155. package/lib/dist-custom-elements/{p-d482a2e9.js → p-c76bd205.js} +1 -1
  156. package/lib/dist-custom-elements/{p-6d366100.js → p-cefa037c.js} +3 -3
  157. package/lib/duet/duet.esm.js +1 -1
  158. package/lib/duet/p-08379332.entry.js +4 -0
  159. package/lib/duet/p-21f4713b.system.entry.js +4 -0
  160. package/lib/duet/p-26dbd459.entry.js +4 -0
  161. package/lib/duet/p-30773d74.entry.js +4 -0
  162. package/lib/duet/p-3851808f.system.entry.js +4 -0
  163. package/lib/duet/{p-e0907f29.entry.js → p-5063685a.entry.js} +1 -1
  164. package/lib/duet/p-5a8b2426.entry.js +4 -0
  165. package/lib/duet/p-60bf137e.system.entry.js +4 -0
  166. package/lib/duet/p-6151635f.system.js +1 -1
  167. package/lib/duet/p-62512c7e.system.entry.js +4 -0
  168. package/lib/duet/p-62c34a4d.system.entry.js +4 -0
  169. package/lib/duet/p-77a2e410.system.entry.js +4 -0
  170. package/lib/duet/p-8b4ab364.system.entry.js +4 -0
  171. package/lib/duet/{p-c9370d43.system.entry.js → p-9d0c2f7d.system.entry.js} +1 -1
  172. package/lib/duet/{p-cc9cfdb3.entry.js → p-a64b72f5.entry.js} +1 -1
  173. package/lib/duet/p-c5f48c1c.system.entry.js +4 -0
  174. package/lib/duet/p-e12b461b.entry.js +4 -0
  175. package/lib/duet/p-eceeb9fd.entry.js +4 -0
  176. package/lib/duet/p-fa87de22.entry.js +4 -0
  177. package/lib/esm/duet-banner.entry.js +12 -7
  178. package/lib/esm/duet-caption_4.entry.js +6 -3
  179. package/lib/esm/duet-checkbox.entry.js +1 -1
  180. package/lib/esm/duet-icon.entry.js +1 -1
  181. package/lib/esm/duet-modal.entry.js +24 -3
  182. package/lib/esm/duet-page-heading.entry.js +2 -1
  183. package/lib/esm/duet-pagination_2.entry.js +22 -9
  184. package/lib/esm/duet-popup-menu.entry.js +1 -0
  185. package/lib/esm/duet-radio_2.entry.js +1 -1
  186. package/lib/esm/duet.js +1 -1
  187. package/lib/esm/loader.js +1 -1
  188. package/lib/esm-es5/duet-banner.entry.js +1 -1
  189. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  190. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  191. package/lib/esm-es5/duet-icon.entry.js +1 -1
  192. package/lib/esm-es5/duet-modal.entry.js +1 -1
  193. package/lib/esm-es5/duet-page-heading.entry.js +1 -1
  194. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  195. package/lib/esm-es5/duet-popup-menu.entry.js +1 -1
  196. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  197. package/lib/esm-es5/duet.js +1 -1
  198. package/lib/esm-es5/loader.js +1 -1
  199. package/lib/types/components/duet-banner/duet-banner.d.ts +1 -1
  200. package/lib/types/components/duet-link/duet-link.d.ts +11 -0
  201. package/lib/types/components/duet-modal/duet-modal.d.ts +8 -2
  202. package/lib/types/components/duet-pagination/duet-pagination.d.ts +4 -0
  203. package/lib/types/components/duet-popup-menu/duet-popup-menu.d.ts +4 -0
  204. package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +4 -0
  205. package/lib/types/components/duet-upload-aria-status/duet-upload-aria-status.d.ts +4 -0
  206. package/lib/types/components/duet-upload-item/duet-upload-item.d.ts +4 -0
  207. package/lib/types/components.d.ts +40 -2
  208. package/package.json +2 -2
  209. package/lib/duet/p-061f4be0.system.entry.js +0 -4
  210. package/lib/duet/p-1ef0e5ca.system.entry.js +0 -4
  211. package/lib/duet/p-29491f9f.entry.js +0 -4
  212. package/lib/duet/p-36f031e7.entry.js +0 -4
  213. package/lib/duet/p-46dda347.system.entry.js +0 -4
  214. package/lib/duet/p-8a41bde4.system.entry.js +0 -4
  215. package/lib/duet/p-8ba91848.entry.js +0 -4
  216. package/lib/duet/p-b2fc4b72.system.entry.js +0 -4
  217. package/lib/duet/p-b6f62761.entry.js +0 -4
  218. package/lib/duet/p-c3c12f8d.entry.js +0 -4
  219. package/lib/duet/p-c5cf76db.entry.js +0 -4
  220. package/lib/duet/p-d739e7af.system.entry.js +0 -4
  221. package/lib/duet/p-deb98669.entry.js +0 -4
  222. package/lib/duet/p-e362468f.system.entry.js +0 -4
  223. package/lib/duet/p-e58015e8.system.entry.js +0 -4
@@ -24,6 +24,8 @@ export class DuetLink {
24
24
  this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
25
25
  this.accessibleLabelDownloadDefaults = DuetStringsDownloadLinkDefaults;
26
26
  this.accessibleLabelDownload = getLocaleString(this.accessibleLabelDownloadDefaults);
27
+ this.accessibleExpanded = undefined;
28
+ this.accessiblePopup = "false";
27
29
  this.identifier = undefined;
28
30
  this.theme = "";
29
31
  this.url = "#";
@@ -123,7 +125,7 @@ export class DuetLink {
123
125
  const iconWrapStyle = {
124
126
  "background-color": getColorByName(this.iconBackground, this.theme),
125
127
  };
126
- return (h(Fragment, null, h("span", { class: "icon-wrap", style: iconWrapStyle }, h("duet-icon", { size: this.isMediumScreen ? "small" : "medium", name: this.icon, margin: "none", color: this.iconColor })), h("span", { class: "duet-link-content", part: "duet-link-content" }, h("slot", null)), h("duet-icon", { class: "block__chevron-icon", icon: this.external ? newWindowIconLarge.svg : chevronIcon.svg, size: "x-small", margin: "none", color: "primary-dark" })));
128
+ return (h(Fragment, null, h("span", { class: "icon-wrap", style: iconWrapStyle }, h("duet-icon", { size: !this.iconBackground || this.isMediumScreen ? "small" : "medium", name: this.icon, margin: "none", color: this.iconColor })), h("span", { class: "duet-link-content", part: "duet-link-content" }, h("slot", null)), h("duet-icon", { class: "block__chevron-icon", icon: this.external ? newWindowIconLarge.svg : chevronIcon.svg, size: "x-small", margin: "none", color: "primary-dark" })));
127
129
  }
128
130
  renderContent() {
129
131
  switch (this.variation) {
@@ -141,6 +143,7 @@ export class DuetLink {
141
143
  */
142
144
  render() {
143
145
  const Tag = !this.url ? "button" : "a";
146
+ const isButton = Tag === "button";
144
147
  return (h(Host, { class: {
145
148
  [`duet-link-${this.variation}`]: true,
146
149
  "duet-m-0": this.margin === "none",
@@ -155,7 +158,7 @@ export class DuetLink {
155
158
  "duet-p-0": this.padding === "none",
156
159
  [this.padding]: true,
157
160
  [this.variation]: true,
158
- }, target: this.download || !this.url ? null : this.external ? "_blank" : "_self", download: this.resolvedDownload, "aria-label": this.getAccessibleLabel(), id: this.identifier, ref: el => (this.nativeLink = el), part: "duet-link", rel: this.external ? "noopener" : undefined }, this.renderContent())));
161
+ }, target: this.download || !this.url ? null : this.external ? "_blank" : "_self", download: this.resolvedDownload, "aria-label": this.getAccessibleLabel(), "aria-expanded": this.accessibleExpanded != null && isButton ? this.accessibleExpanded.toString() : undefined, "aria-haspopup": this.accessiblePopup != null && isButton ? this.accessiblePopup.toString() : undefined, id: this.identifier, ref: el => (this.nativeLink = el), part: "duet-link", rel: this.external ? "noopener" : undefined }, this.renderContent())));
159
162
  }
160
163
  static get is() { return "duet-link"; }
161
164
  static get encapsulation() { return "shadow"; }
@@ -339,6 +342,41 @@ export class DuetLink {
339
342
  "reflect": false,
340
343
  "defaultValue": "getLocaleString(this.accessibleLabelDownloadDefaults)"
341
344
  },
345
+ "accessibleExpanded": {
346
+ "type": "boolean",
347
+ "mutable": true,
348
+ "complexType": {
349
+ "original": "boolean",
350
+ "resolved": "boolean",
351
+ "references": {}
352
+ },
353
+ "required": false,
354
+ "optional": false,
355
+ "docs": {
356
+ "tags": [],
357
+ "text": "If a button expands or collapses adjacent content, then use the ariaExpanded\nprop to add the aria-expanded attribute to the button. Set the value to convey\nthe current expanded (true) or collapsed (false) state of the content.\nOnly works with empty url."
358
+ },
359
+ "attribute": "accessible-expanded",
360
+ "reflect": true
361
+ },
362
+ "accessiblePopup": {
363
+ "type": "string",
364
+ "mutable": true,
365
+ "complexType": {
366
+ "original": "string",
367
+ "resolved": "string",
368
+ "references": {}
369
+ },
370
+ "required": false,
371
+ "optional": false,
372
+ "docs": {
373
+ "tags": [],
374
+ "text": "Use this property to add an aria-haspopup attribute to a button. Only works with empty url."
375
+ },
376
+ "attribute": "accessible-popup",
377
+ "reflect": true,
378
+ "defaultValue": "\"false\""
379
+ },
342
380
  "identifier": {
343
381
  "type": "string",
344
382
  "mutable": false,
@@ -169,7 +169,7 @@ export class DuetList {
169
169
  "references": {
170
170
  "DuetListMobileAlignment": {
171
171
  "location": "local",
172
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-list/duet-list.tsx",
172
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-list/duet-list.tsx",
173
173
  "id": "src/components/duet-list/duet-list.tsx::DuetListMobileAlignment"
174
174
  }
175
175
  }
@@ -217,7 +217,7 @@ export class DuetList {
217
217
  "references": {
218
218
  "DuetListVariation": {
219
219
  "location": "local",
220
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-list/duet-list.tsx",
220
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-list/duet-list.tsx",
221
221
  "id": "src/components/duet-list/duet-list.tsx::DuetListVariation"
222
222
  }
223
223
  }
@@ -241,7 +241,7 @@ export class DuetList {
241
241
  "references": {
242
242
  "DuetListLabelWidth": {
243
243
  "location": "local",
244
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-list/duet-list.tsx",
244
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-list/duet-list.tsx",
245
245
  "id": "src/components/duet-list/duet-list.tsx::DuetListLabelWidth"
246
246
  }
247
247
  }
@@ -176,7 +176,7 @@ export class DuetLogo {
176
176
  "references": {
177
177
  "DuetLogoSize": {
178
178
  "location": "local",
179
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-logo/duet-logo.tsx",
179
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-logo/duet-logo.tsx",
180
180
  "id": "src/components/duet-logo/duet-logo.tsx::DuetLogoSize"
181
181
  }
182
182
  }
@@ -251,7 +251,7 @@ export class DuetMenuBar {
251
251
  "references": {
252
252
  "DuetMenuBarChangeEvent": {
253
253
  "location": "local",
254
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-menu-bar/duet-menu-bar.tsx",
254
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-menu-bar/duet-menu-bar.tsx",
255
255
  "id": "src/components/duet-menu-bar/duet-menu-bar.tsx::DuetMenuBarChangeEvent"
256
256
  }
257
257
  }
@@ -186,6 +186,7 @@
186
186
  .duet-modal.slide-up {
187
187
  top: 100vh;
188
188
  margin: 0;
189
+ overflow: auto;
189
190
  border-radius: 4px 4px 0 0;
190
191
  opacity: 1;
191
192
  transition: top 600ms ease;
@@ -282,7 +283,7 @@
282
283
  .duet-modal-sticky-header {
283
284
  position: sticky;
284
285
  top: 0;
285
- z-index: 200;
286
+ z-index: 300;
286
287
  display: block;
287
288
  padding-bottom: 12px;
288
289
  text-align: left;
@@ -59,6 +59,27 @@ describe("duet-modal", () => {
59
59
  const element = await page.find("duet-modal >>> .duet-modal-container");
60
60
  expect(element).toHaveClass("duet-modal-active");
61
61
  });
62
+ it("should provide a method to scroll content to top", async () => {
63
+ const loremIpsumArray = new Array(20).fill("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam quis nostrud.");
64
+ const page = await createPage(`
65
+ <duet-modal variation="slide-up" active>
66
+ <div slot="sticky-header"><duet-heading level="h3">Etsi lorem ipsum</duet-heading></div>
67
+ <duet-button class="top">Top</duet-button>
68
+ ${loremIpsumArray.map(i => `<duet-paragarph>${i}</duet-paragraph>`)}
69
+ <duet-button class="bottom">Bottom</duet-button>
70
+ </duet-modal>`);
71
+ const modal = await page.find("duet-modal");
72
+ const top = await page.find("duet-button.top");
73
+ const bottom = await page.find("duet-button.bottom");
74
+ expect(await top.isIntersectingViewport()).toBeTruthy();
75
+ expect(await bottom.isIntersectingViewport()).toBeFalsy();
76
+ bottom.click();
77
+ expect(await top.isIntersectingViewport()).toBeFalsy();
78
+ expect(await bottom.isIntersectingViewport()).toBeTruthy();
79
+ await modal.callMethod("scrollToTop", false); // call with false for immediate scroll
80
+ expect(await top.isIntersectingViewport()).toBeTruthy();
81
+ expect(await bottom.isIntersectingViewport()).toBeFalsy();
82
+ });
62
83
  it.skip("closes on blur", async () => {
63
84
  const page = await createPage(`
64
85
  <duet-modal
@@ -183,12 +183,33 @@ export class DuetModal {
183
183
  async hide() {
184
184
  this.open = false;
185
185
  }
186
+ /**
187
+ * Scolls the top of the modal's content into view
188
+ *
189
+ * @param smooth Set to false for instant scrolling
190
+ */
191
+ async scrollToTop(smooth = true) {
192
+ var _a;
193
+ const behavior = smooth ? "smooth" : "auto";
194
+ if (this.variation === "slide-up") {
195
+ const stickyHeaderHeight = ((_a = this.modalEl.querySelector(".duet-modal-sticky-header")) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0;
196
+ const modalBodyPadding = this.modalEl
197
+ .querySelector(".duet-modal-body")
198
+ .computedStyleMap()
199
+ .get("padding-top");
200
+ this.slotContainerEl.style.scrollMarginTop = `${stickyHeaderHeight + modalBodyPadding.value}px`;
201
+ this.slotContainerEl.scrollIntoView({ behavior });
202
+ }
203
+ else {
204
+ this.modalEl.querySelector(".duet-modal-body").scrollIntoView({ behavior });
205
+ }
206
+ }
186
207
  /**
187
208
  * Adds a message to the modal dialog using animation and annoucing it to screen readers.
188
209
  * Primarily for use with the loader variation.
189
210
  *
190
- * @param message - The message to be added to the modal dialog.
191
- * @param visible - set to false if you want to add a non-visual message.
211
+ * @param message The message to be added to the modal dialog.
212
+ * @param visible Set to false if you want to add a non-visual message.
192
213
  */
193
214
  async addMessage(message, visible = true) {
194
215
  const el = document.createElement(visible ? "duet-paragraph" : "duet-visually-hidden");
@@ -355,7 +376,7 @@ export class DuetModal {
355
376
  "references": {
356
377
  "DuetModalSize": {
357
378
  "location": "local",
358
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-modal/duet-modal.tsx",
379
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-modal/duet-modal.tsx",
359
380
  "id": "src/components/duet-modal/duet-modal.tsx::DuetModalSize"
360
381
  }
361
382
  }
@@ -466,7 +487,7 @@ export class DuetModal {
466
487
  "references": {
467
488
  "DuetModalVariation": {
468
489
  "location": "local",
469
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-modal/duet-modal.tsx",
490
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-modal/duet-modal.tsx",
470
491
  "id": "src/components/duet-modal/duet-modal.tsx::DuetModalVariation"
471
492
  }
472
493
  }
@@ -490,7 +511,7 @@ export class DuetModal {
490
511
  "references": {
491
512
  "DuetModalSize": {
492
513
  "location": "local",
493
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-modal/duet-modal.tsx",
514
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-modal/duet-modal.tsx",
494
515
  "id": "src/components/duet-modal/duet-modal.tsx::DuetModalSize"
495
516
  }
496
517
  }
@@ -732,7 +753,7 @@ export class DuetModal {
732
753
  "references": {
733
754
  "DuetModalCloseEvent": {
734
755
  "location": "local",
735
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-modal/duet-modal.tsx",
756
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-modal/duet-modal.tsx",
736
757
  "id": "src/components/duet-modal/duet-modal.tsx::DuetModalCloseEvent"
737
758
  }
738
759
  }
@@ -775,17 +796,45 @@ export class DuetModal {
775
796
  "tags": []
776
797
  }
777
798
  },
799
+ "scrollToTop": {
800
+ "complexType": {
801
+ "signature": "(smooth?: boolean) => Promise<void>",
802
+ "parameters": [{
803
+ "name": "smooth",
804
+ "type": "boolean",
805
+ "docs": "Set to false for instant scrolling"
806
+ }],
807
+ "references": {
808
+ "Promise": {
809
+ "location": "global",
810
+ "id": "global::Promise"
811
+ },
812
+ "CSSUnitValue": {
813
+ "location": "global",
814
+ "id": "global::CSSUnitValue"
815
+ }
816
+ },
817
+ "return": "Promise<void>"
818
+ },
819
+ "docs": {
820
+ "text": "Scolls the top of the modal's content into view",
821
+ "tags": [{
822
+ "name": "param",
823
+ "text": "smooth Set to false for instant scrolling"
824
+ }]
825
+ }
826
+ },
778
827
  "addMessage": {
779
828
  "complexType": {
780
829
  "signature": "(message: string, visible?: boolean) => Promise<void>",
781
830
  "parameters": [{
782
831
  "name": "message",
783
832
  "type": "string",
784
- "docs": "- The message to be added to the modal dialog."
833
+ "docs": "The message to be added to the modal dialog."
785
834
  }, {
786
835
  "name": "visible",
787
836
  "type": "boolean",
788
- "docs": "- set to false if you want to add a non-visual message."
837
+ "docs": "Set to false if you want to add a non-visual message."
789
838
  }],
790
839
  "references": {
791
840
  "Promise": {
@@ -799,10 +848,10 @@ export class DuetModal {
799
848
  "text": "Adds a message to the modal dialog using animation and annoucing it to screen readers.\nPrimarily for use with the loader variation.",
800
849
  "tags": [{
801
850
  "name": "param",
802
- "text": "message - The message to be added to the modal dialog."
851
+ "text": "message The message to be added to the modal dialog."
803
852
  }, {
804
853
  "name": "param",
805
- "text": "visible - set to false if you want to add a non-visual message."
854
+ "text": "visible Set to false if you want to add a non-visual message."
806
855
  }]
807
856
  }
808
857
  }
@@ -318,7 +318,7 @@ export class DuetMultiselect {
318
318
  "references": {
319
319
  "DuetMultiselectItem": {
320
320
  "location": "local",
321
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-multiselect/duet-multiselect.tsx",
321
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-multiselect/duet-multiselect.tsx",
322
322
  "id": "src/components/duet-multiselect/duet-multiselect.tsx::DuetMultiselectItem"
323
323
  }
324
324
  }
@@ -453,7 +453,7 @@ export class DuetMultiselect {
453
453
  "references": {
454
454
  "DuetMultiselectItem": {
455
455
  "location": "local",
456
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-multiselect/duet-multiselect.tsx",
456
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-multiselect/duet-multiselect.tsx",
457
457
  "id": "src/components/duet-multiselect/duet-multiselect.tsx::DuetMultiselectItem"
458
458
  }
459
459
  }
@@ -629,7 +629,7 @@ export class DuetMultiselect {
629
629
  "references": {
630
630
  "DuetMultiselectEvent": {
631
631
  "location": "local",
632
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-multiselect/duet-multiselect.tsx",
632
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-multiselect/duet-multiselect.tsx",
633
633
  "id": "src/components/duet-multiselect/duet-multiselect.tsx::DuetMultiselectEvent"
634
634
  }
635
635
  }
@@ -650,7 +650,7 @@ export class DuetMultiselect {
650
650
  "references": {
651
651
  "DuetMultiselectEvent": {
652
652
  "location": "local",
653
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-multiselect/duet-multiselect.tsx",
653
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-multiselect/duet-multiselect.tsx",
654
654
  "id": "src/components/duet-multiselect/duet-multiselect.tsx::DuetMultiselectEvent"
655
655
  }
656
656
  }
@@ -671,7 +671,7 @@ export class DuetMultiselect {
671
671
  "references": {
672
672
  "DuetMultiselectEvent": {
673
673
  "location": "local",
674
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-multiselect/duet-multiselect.tsx",
674
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-multiselect/duet-multiselect.tsx",
675
675
  "id": "src/components/duet-multiselect/duet-multiselect.tsx::DuetMultiselectEvent"
676
676
  }
677
677
  }
@@ -285,7 +285,7 @@ export class DuetNotificationDrawer {
285
285
  "references": {
286
286
  "DuetNotificationDrawerDirection": {
287
287
  "location": "local",
288
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-notification-drawer/duet-notification-drawer.tsx",
288
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-notification-drawer/duet-notification-drawer.tsx",
289
289
  "id": "src/components/duet-notification-drawer/duet-notification-drawer.tsx::DuetNotificationDrawerDirection"
290
290
  }
291
291
  }
@@ -1032,7 +1032,7 @@ export class DuetNumberInput {
1032
1032
  "references": {
1033
1033
  "DuetNumberInputEvent": {
1034
1034
  "location": "local",
1035
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-number-input/duet-number-input.tsx",
1035
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-number-input/duet-number-input.tsx",
1036
1036
  "id": "src/components/duet-number-input/duet-number-input.tsx::DuetNumberInputEvent"
1037
1037
  }
1038
1038
  }
@@ -1053,7 +1053,7 @@ export class DuetNumberInput {
1053
1053
  "references": {
1054
1054
  "DuetNumberInputEvent": {
1055
1055
  "location": "local",
1056
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-number-input/duet-number-input.tsx",
1056
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-number-input/duet-number-input.tsx",
1057
1057
  "id": "src/components/duet-number-input/duet-number-input.tsx::DuetNumberInputEvent"
1058
1058
  }
1059
1059
  }
@@ -1074,7 +1074,7 @@ export class DuetNumberInput {
1074
1074
  "references": {
1075
1075
  "DuetNumberInputEvent": {
1076
1076
  "location": "local",
1077
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-number-input/duet-number-input.tsx",
1077
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-number-input/duet-number-input.tsx",
1078
1078
  "id": "src/components/duet-number-input/duet-number-input.tsx::DuetNumberInputEvent"
1079
1079
  }
1080
1080
  }
@@ -1095,7 +1095,7 @@ export class DuetNumberInput {
1095
1095
  "references": {
1096
1096
  "DuetNumberInputEvent": {
1097
1097
  "location": "local",
1098
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-number-input/duet-number-input.tsx",
1098
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-number-input/duet-number-input.tsx",
1099
1099
  "id": "src/components/duet-number-input/duet-number-input.tsx::DuetNumberInputEvent"
1100
1100
  }
1101
1101
  }
@@ -150,7 +150,7 @@ export class DuetOverlay {
150
150
  "references": {
151
151
  "OverlayDisplayDevice": {
152
152
  "location": "local",
153
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-overlay/duet-overlay.tsx",
153
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-overlay/duet-overlay.tsx",
154
154
  "id": "src/components/duet-overlay/duet-overlay.tsx::OverlayDisplayDevice"
155
155
  }
156
156
  }
@@ -80,6 +80,9 @@
80
80
  padding: 72px 150px 40px 0;
81
81
  }
82
82
  }
83
+ .duet-page-heading:not(.has-icon) .heading {
84
+ padding-right: 0;
85
+ }
83
86
  .duet-page-heading .background {
84
87
  position: absolute;
85
88
  top: 0;
@@ -26,6 +26,7 @@ export class DuetPageHeading {
26
26
  return (h("div", { class: {
27
27
  "duet-page-heading": true,
28
28
  "duet-theme-turva": this.theme === "turva",
29
+ "has-icon": !!this.icon,
29
30
  [this.layout]: true,
30
31
  } }, h("div", { class: "background" }, this.theme === "turva" && h("div", { class: "background-mask" }), this.theme !== "turva" && h("div", { class: "brand-shape" }), this.theme !== "turva" && h("div", { class: "brand-shape second-shape" }), this.icon && (h("div", { class: "brand-shaped-icon" }, h("duet-icon", { background: "none", name: this.icon, margin: "none", size: "auto", responsive: false })))), h("div", { class: "heading" }, h("slot", { name: "heading" }))));
31
32
  }
@@ -75,6 +75,7 @@ export class DuetPagination {
75
75
  this.totalPages = 10;
76
76
  this.internalSectionIndex = 0;
77
77
  this.theme = "";
78
+ this.disabled = false;
78
79
  this.variation = "default";
79
80
  this.accessibleDescribedBy = undefined;
80
81
  this.accessibleDetails = undefined;
@@ -191,6 +192,9 @@ export class DuetPagination {
191
192
  }
192
193
  //set update current when mouse click on page number
193
194
  async onMouseHandler(e, dir) {
195
+ if (this.disabled) {
196
+ return;
197
+ }
194
198
  if (!this.processedPageLinks) {
195
199
  e.preventDefault();
196
200
  e.stopPropagation();
@@ -200,6 +204,9 @@ export class DuetPagination {
200
204
  }
201
205
  //handle a11y keyboard navigation events
202
206
  async onKeyboardDown(e) {
207
+ if (this.disabled) {
208
+ return;
209
+ }
203
210
  let next = this.current;
204
211
  // handle a11y based keyboard navigation for left/right/up/down
205
212
  if (isArrowLeftKey(e) || isArrowUpKey(e)) {
@@ -287,7 +294,7 @@ export class DuetPagination {
287
294
  this.emitPageEvent(e);
288
295
  }
289
296
  renderPageButton(pageNumber) {
290
- return (h("duet-button", { class: {
297
+ return (h("duet-button", { disabled: this.disabled, class: {
291
298
  "duet-pagination-link": true,
292
299
  }, id: `page-${pageNumber}-button`, color: pageNumber !== this.current
293
300
  ? this.theme !== "turva"
@@ -321,7 +328,7 @@ export class DuetPagination {
321
328
  label: i.toString(),
322
329
  });
323
330
  }
324
- const select = (h("duet-select", { theme: this.theme, class: "duet-pagination-select", variation: "compact", items: JSON.stringify(items), value: this.current.toString(), label: this.accessibleLabels.select_label.replace("{0}", `${this.totalPages}`), labelHidden: true, onDuetChange: e => this.selectClickHandler(e) }));
331
+ const select = (h("duet-select", { disabled: this.disabled, theme: this.theme, class: "duet-pagination-select", variation: "compact", items: JSON.stringify(items), value: this.current.toString(), label: this.accessibleLabels.select_label.replace("{0}", `${this.totalPages}`), labelHidden: true, onDuetChange: e => this.selectClickHandler(e) }));
325
332
  return (h("li", null, select, h("span", { class: "duet-pagination-total-pages", "aria-hidden": "true" }, "/ ", this.totalPages)));
326
333
  }
327
334
  shouldDisplayNavigation() {
@@ -344,23 +351,25 @@ export class DuetPagination {
344
351
  }, role: "menubar", "aria-label": this.accessibleLabels.pagination_label, "aria-description": this.accessibleLabels.description }, (this.variation === "compact" || this.matchesCompactBreakpoint) && (h("li", { class: {
345
352
  "duet-pagination-page-button": true,
346
353
  "duet-pagination-button-first": true,
347
- }, role: "menuitem", part: "navigation-arrow" }, h("duet-action-button", { disabled: this.internalSectionIndex === 0 && this.current <= 1, "data-direction": "back", accessibleLabel: this.accessibleLabels.first_page, title: this.accessibleLabels.first_page, onClick: e => this.jumpToStart(e), "icon-name": "action-move-to-first", theme: this.theme, url: this.processedPageLinks ? this.processedPageLinks[0] : undefined }))), h("li", { class: {
354
+ }, role: "menuitem", part: "navigation-arrow" }, h("duet-action-button", { disabled: (this.internalSectionIndex === 0 && this.current <= 1) || this.disabled, "data-direction": "back", accessibleLabel: this.accessibleLabels.first_page, title: this.accessibleLabels.first_page, onClick: e => this.jumpToStart(e), "icon-name": "action-move-to-first", theme: this.theme, url: this.processedPageLinks ? this.processedPageLinks[0] : undefined }))), h("li", { class: {
348
355
  "duet-pagination-page-button": true,
349
356
  "duet-pagination-button-first": true,
350
357
  }, role: "menuitem", part: "navigation-arrow" }, h("duet-action-button", { disabled: !!((this.internalSectionIndex === 0 && this.current <= 1) ||
351
- (this.current <= 1 && this.processedPageLinks)), "data-direction": "back", onClick: e => this.onMouseHandler(e, -1), "accessible-label": this.accessibleLabels.previous_page, title: this.accessibleLabels.previous_page, "icon-name": "action-arrow-left-small", theme: this.theme, url: this.processedPageLinks ? this.processedPageLinks[this.current - 2] : undefined })), this.internalSectionIndex !== 0 && this.shouldDisplayNavigation() && (h(Fragment, null, h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" }, h("duet-button", { class: "duet-pagination-link duet-pagination-link-jump-back", "center-text": "true", variation: "plain", color: this.theme !== "turva" ? "secondary" : "secondary-turva", margin: "none", accessibleLabel: this.accessibleLabels.first_page, onClick: e => this.jumpToStart(e), theme: this.theme, url: this.processedPageLinks ? this.processedPageLinks[0] : undefined }, h("div", { class: "duet-pagination-page-number" }, "1"))), h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" }, h("duet-button", { class: "duet-pagination-link duet-pagination-link-dots-back", "center-text": "true", color: this.theme !== "turva" ? "secondary" : "secondary-turva", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.prev_section.replace("{0}", `${this.visibleItems}`), onClick: e => this.sectionClickHandler(e, -1), theme: this.theme }, h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "\u2026"))))), (this.shouldDisplayNavigation() && this.renderPageNumbers()) || this.renderSelect(), (this.internalSectionIndex + 1) * this.visibleItems < this.totalPages &&
352
- this.shouldDisplayNavigation() && (h(Fragment, null, (this.internalSectionIndex + 1) * this.visibleItems !== this.totalPages - 1 && (h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" }, h("duet-button", { class: "duet-pagination-link duet-pagination-link-dots-forward", "center-text": "true", color: this.theme !== "turva" ? "secondary" : "secondary-turva", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.next_section.replace("{0}", `${this.visibleItems}`), onClick: e => this.sectionClickHandler(e, 1), theme: this.theme }, h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "\u2026")))), h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" }, h("duet-button", { class: "duet-pagination-link duet-pagination-link-jump-forward", "center-text": "true", color: this.theme !== "turva" ? "secondary" : "secondary-turva", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.last_page, onClick: e => this.jumpToEnd(e), theme: this.theme, url: this.processedPageLinks
358
+ (this.current <= 1 && this.processedPageLinks) ||
359
+ this.disabled), "data-direction": "back", onClick: e => this.onMouseHandler(e, -1), "accessible-label": this.accessibleLabels.previous_page, title: this.accessibleLabels.previous_page, "icon-name": "action-arrow-left-small", theme: this.theme, url: this.processedPageLinks ? this.processedPageLinks[this.current - 2] : undefined })), this.internalSectionIndex !== 0 && this.shouldDisplayNavigation() && (h(Fragment, null, h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" }, h("duet-button", { disabled: this.disabled, class: "duet-pagination-link duet-pagination-link-jump-back", "center-text": "true", variation: "plain", color: this.theme !== "turva" ? "secondary" : "secondary-turva", margin: "none", accessibleLabel: this.accessibleLabels.first_page, onClick: e => this.jumpToStart(e), theme: this.theme, url: this.processedPageLinks ? this.processedPageLinks[0] : undefined }, h("div", { class: "duet-pagination-page-number" }, "1"))), h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" }, h("duet-button", { disabled: this.disabled, class: "duet-pagination-link duet-pagination-link-dots-back", "center-text": "true", color: this.theme !== "turva" ? "secondary" : "secondary-turva", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.prev_section.replace("{0}", `${this.visibleItems}`), onClick: e => this.sectionClickHandler(e, -1), theme: this.theme }, h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "\u2026"))))), (this.shouldDisplayNavigation() && this.renderPageNumbers()) || this.renderSelect(), (this.internalSectionIndex + 1) * this.visibleItems < this.totalPages &&
360
+ this.shouldDisplayNavigation() && (h(Fragment, null, (this.internalSectionIndex + 1) * this.visibleItems !== this.totalPages - 1 && (h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" }, h("duet-button", { disabled: this.disabled, class: "duet-pagination-link duet-pagination-link-dots-forward", "center-text": "true", color: this.theme !== "turva" ? "secondary" : "secondary-turva", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.next_section.replace("{0}", `${this.visibleItems}`), onClick: e => this.sectionClickHandler(e, 1), theme: this.theme }, h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "\u2026")))), h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" }, h("duet-button", { disabled: this.disabled, class: "duet-pagination-link duet-pagination-link-jump-forward", "center-text": "true", color: this.theme !== "turva" ? "secondary" : "secondary-turva", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.last_page, onClick: e => this.jumpToEnd(e), theme: this.theme, url: this.processedPageLinks
353
361
  ? this.processedPageLinks[this.processedPageLinks.length - 1]
354
362
  : undefined }, h("div", { class: "duet-pagination-page-number" }, this.totalPages))))), h("li", { class: {
355
363
  "duet-pagination-page-button": true,
356
364
  "duet-pagination-button-last": true,
357
365
  }, role: "menuitem", part: "navigation-arrow" }, h("duet-action-button", { disabled: !!((this.current === this.totalPages &&
358
366
  this.internalSectionIndex === Math.ceil(this.totalPages / this.visibleItems) - 1) ||
359
- (this.current === this.totalPages && this.processedPageLinks)), class: "duet-date-dialog-next", "accessible-label": this.accessibleLabels.next_page, title: this.accessibleLabels.next_page, onClick: e => this.onMouseHandler(e, 1), "icon-name": "action-move-to-next", theme: this.theme, url: this.processedPageLinks ? this.processedPageLinks[this.current] : undefined })), (this.variation === "compact" || this.matchesCompactBreakpoint) && (h("li", { class: {
367
+ (this.current === this.totalPages && this.processedPageLinks)) || this.disabled, class: "duet-date-dialog-next", "accessible-label": this.accessibleLabels.next_page, title: this.accessibleLabels.next_page, onClick: e => this.onMouseHandler(e, 1), "icon-name": "action-move-to-next", theme: this.theme, url: this.processedPageLinks ? this.processedPageLinks[this.current] : undefined })), (this.variation === "compact" || this.matchesCompactBreakpoint) && (h("li", { class: {
360
368
  "duet-pagination-page-button": true,
361
369
  "duet-pagination-button-last": true,
362
- }, role: "menuitem", part: "navigation-arrow" }, h("duet-action-button", { disabled: this.current === this.totalPages &&
363
- this.internalSectionIndex === Math.ceil(this.totalPages / this.visibleItems) - 1, accessibleLabel: this.accessibleLabels.last_page, title: this.accessibleLabels.last_page, onClick: e => this.jumpToEnd(e), "icon-name": "action-move-to-last", theme: this.theme, url: this.processedPageLinks ? this.processedPageLinks[this.totalPages - 1] : undefined })))))));
370
+ }, role: "menuitem", part: "navigation-arrow" }, h("duet-action-button", { disabled: (this.current === this.totalPages &&
371
+ this.internalSectionIndex === Math.ceil(this.totalPages / this.visibleItems) - 1) ||
372
+ this.disabled, accessibleLabel: this.accessibleLabels.last_page, title: this.accessibleLabels.last_page, onClick: e => this.jumpToEnd(e), "icon-name": "action-move-to-last", theme: this.theme, url: this.processedPageLinks ? this.processedPageLinks[this.totalPages - 1] : undefined })))))));
364
373
  }
365
374
  static get is() { return "duet-pagination"; }
366
375
  static get encapsulation() { return "shadow"; }
@@ -400,6 +409,24 @@ export class DuetPagination {
400
409
  "reflect": false,
401
410
  "defaultValue": "\"\""
402
411
  },
412
+ "disabled": {
413
+ "type": "boolean",
414
+ "mutable": false,
415
+ "complexType": {
416
+ "original": "boolean",
417
+ "resolved": "boolean",
418
+ "references": {}
419
+ },
420
+ "required": false,
421
+ "optional": false,
422
+ "docs": {
423
+ "tags": [],
424
+ "text": "Makes the controls of pagination component disabled."
425
+ },
426
+ "attribute": "disabled",
427
+ "reflect": true,
428
+ "defaultValue": "false"
429
+ },
403
430
  "variation": {
404
431
  "type": "string",
405
432
  "mutable": false,
@@ -409,7 +436,7 @@ export class DuetPagination {
409
436
  "references": {
410
437
  "DuetPaginationVariation": {
411
438
  "location": "local",
412
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-pagination/duet-pagination.tsx",
439
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-pagination/duet-pagination.tsx",
413
440
  "id": "src/components/duet-pagination/duet-pagination.tsx::DuetPaginationVariation"
414
441
  }
415
442
  }
@@ -698,7 +725,7 @@ export class DuetPagination {
698
725
  "references": {
699
726
  "DuetPaginationPageEvent": {
700
727
  "location": "local",
701
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-pagination/duet-pagination.tsx",
728
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-pagination/duet-pagination.tsx",
702
729
  "id": "src/components/duet-pagination/duet-pagination.tsx::DuetPaginationPageEvent"
703
730
  }
704
731
  }
@@ -109,7 +109,7 @@ export class DuetParagraph {
109
109
  "references": {
110
110
  "DuetParagraphSize": {
111
111
  "location": "local",
112
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-paragraph/duet-paragraph.tsx",
112
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-paragraph/duet-paragraph.tsx",
113
113
  "id": "src/components/duet-paragraph/duet-paragraph.tsx::DuetParagraphSize"
114
114
  }
115
115
  }
@@ -133,7 +133,7 @@ export class DuetParagraph {
133
133
  "references": {
134
134
  "DuetParagraphWeight": {
135
135
  "location": "local",
136
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-paragraph/duet-paragraph.tsx",
136
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-paragraph/duet-paragraph.tsx",
137
137
  "id": "src/components/duet-paragraph/duet-paragraph.tsx::DuetParagraphWeight"
138
138
  }
139
139
  }
@@ -157,7 +157,7 @@ export class DuetParagraph {
157
157
  "references": {
158
158
  "DuetParagraphVariation": {
159
159
  "location": "local",
160
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-paragraph/duet-paragraph.tsx",
160
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-paragraph/duet-paragraph.tsx",
161
161
  "id": "src/components/duet-paragraph/duet-paragraph.tsx::DuetParagraphVariation"
162
162
  }
163
163
  }