@quartzds/core 1.0.0-beta.113 → 1.0.0-beta.115

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 (209) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/components/index.d.ts +2 -2
  3. package/components/index.js +2 -2
  4. package/components/{p-CB1GgGmx.js → p--vOFwWP9.js} +4 -4
  5. package/components/{p-CB1GgGmx.js.map → p--vOFwWP9.js.map} +1 -1
  6. package/{dist/esm/helpers-CDZIefsI.js → components/p-Bs-thw7N.js} +24 -8
  7. package/components/{p-CzJQDr3N.js.map → p-Bs-thw7N.js.map} +1 -1
  8. package/components/{p-9fm05BrQ.js → p-D6kEwmWw.js} +16 -9
  9. package/components/p-D6kEwmWw.js.map +1 -0
  10. package/components/{p-jzP-octC.js → p-DG13nyez.js} +13 -13
  11. package/components/p-DG13nyez.js.map +1 -0
  12. package/components/{p-oYV2Vg_F.js → p-DHsQa63F.js} +6 -6
  13. package/components/{p-oYV2Vg_F.js.map → p-DHsQa63F.js.map} +1 -1
  14. package/components/{p-GGIVf4ry.js → p-DQ0iArwG.js} +12 -12
  15. package/components/p-DQ0iArwG.js.map +1 -0
  16. package/components/{p-Cin_uEzc.js → p-DRvYbv4e.js} +6 -6
  17. package/components/{p-Cin_uEzc.js.map → p-DRvYbv4e.js.map} +1 -1
  18. package/components/p-DabDNFFa.js +112 -0
  19. package/components/p-DabDNFFa.js.map +1 -0
  20. package/components/{p-CPvTGxdE.js → p-DeLdhUte.js} +9 -9
  21. package/components/p-DeLdhUte.js.map +1 -0
  22. package/components/{p-CK_Yxg3A.js → p-Df4zqimN.js} +11 -9
  23. package/components/p-Df4zqimN.js.map +1 -0
  24. package/components/{p-Dqnx5weA.js → p-Dmky30vp.js} +3 -3
  25. package/components/{p-Dqnx5weA.js.map → p-Dmky30vp.js.map} +1 -1
  26. package/components/{p-CSR3ZAEX.js → p-I5PkZmy8.js} +4 -4
  27. package/components/{p-CSR3ZAEX.js.map → p-I5PkZmy8.js.map} +1 -1
  28. package/components/qds-action-item.js +7 -7
  29. package/components/qds-action-item.js.map +1 -1
  30. package/components/{qds-nav-list-item.d.ts → qds-avatar-media.d.ts} +4 -4
  31. package/components/qds-avatar-media.js +14 -0
  32. package/components/qds-avatar-media.js.map +1 -0
  33. package/components/qds-breadcrumb-item.js +7 -7
  34. package/components/qds-breadcrumb-item.js.map +1 -1
  35. package/components/qds-button.js +1 -1
  36. package/components/qds-checkbox.js +1 -1
  37. package/components/qds-chip.js +11 -11
  38. package/components/qds-chip.js.map +1 -1
  39. package/components/qds-dialog.js +26 -7
  40. package/components/qds-dialog.js.map +1 -1
  41. package/components/qds-dropdown.js +1 -1
  42. package/components/qds-form-message.js +5 -5
  43. package/components/qds-form-message.js.map +1 -1
  44. package/components/qds-icon-button.js +10 -8
  45. package/components/qds-icon-button.js.map +1 -1
  46. package/components/qds-icon.js +1 -1
  47. package/components/qds-inline-link.js +43 -13
  48. package/components/qds-inline-link.js.map +1 -1
  49. package/components/qds-input.js +6 -6
  50. package/components/qds-label.js +1 -1
  51. package/components/qds-list-item.js +22 -16
  52. package/components/qds-list-item.js.map +1 -1
  53. package/components/qds-loader.js +3 -3
  54. package/components/qds-loader.js.map +1 -1
  55. package/components/qds-menu-item.js +9 -9
  56. package/components/qds-menu-item.js.map +1 -1
  57. package/components/qds-mini-button.js +1 -1
  58. package/components/qds-progress-bar.js +1 -1
  59. package/components/qds-radio.js +1 -1
  60. package/components/qds-select.js +5 -5
  61. package/components/qds-standalone-link.js +43 -13
  62. package/components/qds-standalone-link.js.map +1 -1
  63. package/components/qds-switch.js +5 -5
  64. package/components/qds-tab.js +11 -11
  65. package/components/qds-tab.js.map +1 -1
  66. package/components/qds-tabbar.js +8 -8
  67. package/components/qds-table-cell.js +2 -2
  68. package/components/qds-table-head-cell.js +2 -2
  69. package/components/qds-table-row.js +1 -1
  70. package/components/qds-table.js +1 -1
  71. package/components/qds-tag.js +1 -1
  72. package/components/qds-textarea.js +3 -3
  73. package/components/qds-title.js +1 -1
  74. package/components/qds-tooltip.js +1 -1
  75. package/dist/cjs/{helpers-D--0PcCT.js → helpers-BH_NFaV-.js} +24 -8
  76. package/dist/cjs/helpers-BH_NFaV-.js.map +1 -0
  77. package/dist/cjs/index.cjs.js +1 -1
  78. package/dist/cjs/{library-CF8K3bIq.js → library-C_NJJiFI.js} +15 -8
  79. package/dist/cjs/library-C_NJJiFI.js.map +1 -0
  80. package/dist/cjs/loader.cjs.js +1 -1
  81. package/dist/cjs/qds-action-item.cjs.entry.js +5 -5
  82. package/dist/cjs/qds-action-item.entry.cjs.js.map +1 -1
  83. package/dist/cjs/qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map +1 -0
  84. package/dist/cjs/{qds-checkbox_2.cjs.entry.js → qds-avatar-media_3.cjs.entry.js} +79 -8
  85. package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +5 -5
  86. package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -1
  87. package/dist/cjs/qds-button.cjs.entry.js +8 -8
  88. package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
  89. package/dist/cjs/qds-chip.cjs.entry.js +8 -8
  90. package/dist/cjs/qds-chip.entry.cjs.js.map +1 -1
  91. package/dist/cjs/qds-dialog.cjs.entry.js +23 -4
  92. package/dist/cjs/qds-dialog.entry.cjs.js.map +1 -1
  93. package/dist/cjs/qds-dropdown.cjs.entry.js +1 -1
  94. package/dist/cjs/qds-form-message.cjs.entry.js +4 -4
  95. package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -1
  96. package/dist/cjs/qds-icon-button.cjs.entry.js +8 -6
  97. package/dist/cjs/qds-icon-button.entry.cjs.js.map +1 -1
  98. package/dist/cjs/qds-icon.cjs.entry.js +2 -2
  99. package/dist/cjs/qds-inline-link.cjs.entry.js +39 -8
  100. package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -1
  101. package/dist/cjs/qds-input.cjs.entry.js +4 -4
  102. package/dist/cjs/qds-label.cjs.entry.js +9 -9
  103. package/dist/cjs/qds-label.entry.cjs.js.map +1 -1
  104. package/dist/cjs/qds-list-item.cjs.entry.js +10 -10
  105. package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -1
  106. package/dist/cjs/qds-loader.cjs.entry.js +2 -2
  107. package/dist/cjs/qds-loader.entry.cjs.js.map +1 -1
  108. package/dist/cjs/qds-menu-item.cjs.entry.js +6 -6
  109. package/dist/cjs/qds-menu-item.entry.cjs.js.map +1 -1
  110. package/dist/cjs/qds-mini-button.cjs.entry.js +1 -1
  111. package/dist/cjs/qds-progress-bar.cjs.entry.js +1 -1
  112. package/dist/cjs/qds-select.cjs.entry.js +4 -4
  113. package/dist/cjs/qds-standalone-link.cjs.entry.js +39 -8
  114. package/dist/cjs/qds-standalone-link.entry.cjs.js.map +1 -1
  115. package/dist/cjs/qds-switch.cjs.entry.js +4 -4
  116. package/dist/cjs/qds-tab.cjs.entry.js +7 -7
  117. package/dist/cjs/qds-tab.entry.cjs.js.map +1 -1
  118. package/dist/cjs/qds-tabbar.cjs.entry.js +5 -5
  119. package/dist/cjs/qds-table-cell.cjs.entry.js +2 -2
  120. package/dist/cjs/qds-table-head-cell.cjs.entry.js +2 -2
  121. package/dist/cjs/qds-table-row.cjs.entry.js +1 -1
  122. package/dist/cjs/qds-table.cjs.entry.js +1 -1
  123. package/dist/cjs/qds-tag_2.cjs.entry.js +6 -6
  124. package/dist/cjs/qds-textarea.cjs.entry.js +3 -3
  125. package/dist/cjs/qds-tooltip.cjs.entry.js +2 -2
  126. package/dist/cjs/qds.cjs.js +1 -1
  127. package/dist/custom-elements.json +311 -367
  128. package/dist/docs.json +223 -331
  129. package/{components/p-CzJQDr3N.js → dist/esm/helpers-t9FQ7Vl_.js} +24 -8
  130. package/dist/esm/helpers-t9FQ7Vl_.js.map +1 -0
  131. package/dist/esm/index.js +1 -1
  132. package/dist/esm/{library-B2PJ_ZJB.js → library-C7n28y3j.js} +15 -8
  133. package/dist/esm/library-C7n28y3j.js.map +1 -0
  134. package/dist/esm/loader.js +1 -1
  135. package/dist/esm/qds-action-item.entry.js +5 -5
  136. package/dist/esm/qds-action-item.entry.js.map +1 -1
  137. package/dist/esm/qds-avatar-media.qds-checkbox.qds-radio.entry.js.map +1 -0
  138. package/dist/esm/{qds-checkbox_2.entry.js → qds-avatar-media_3.entry.js} +79 -9
  139. package/dist/esm/qds-breadcrumb-item.entry.js +5 -5
  140. package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
  141. package/dist/esm/qds-button.entry.js +8 -8
  142. package/dist/esm/qds-button.entry.js.map +1 -1
  143. package/dist/esm/qds-chip.entry.js +8 -8
  144. package/dist/esm/qds-chip.entry.js.map +1 -1
  145. package/dist/esm/qds-dialog.entry.js +23 -4
  146. package/dist/esm/qds-dialog.entry.js.map +1 -1
  147. package/dist/esm/qds-dropdown.entry.js +1 -1
  148. package/dist/esm/qds-form-message.entry.js +4 -4
  149. package/dist/esm/qds-form-message.entry.js.map +1 -1
  150. package/dist/esm/qds-icon-button.entry.js +8 -6
  151. package/dist/esm/qds-icon-button.entry.js.map +1 -1
  152. package/dist/esm/qds-icon.entry.js +2 -2
  153. package/dist/esm/qds-inline-link.entry.js +39 -8
  154. package/dist/esm/qds-inline-link.entry.js.map +1 -1
  155. package/dist/esm/qds-input.entry.js +4 -4
  156. package/dist/esm/qds-label.entry.js +9 -9
  157. package/dist/esm/qds-label.entry.js.map +1 -1
  158. package/dist/esm/qds-list-item.entry.js +10 -10
  159. package/dist/esm/qds-list-item.entry.js.map +1 -1
  160. package/dist/esm/qds-loader.entry.js +2 -2
  161. package/dist/esm/qds-loader.entry.js.map +1 -1
  162. package/dist/esm/qds-menu-item.entry.js +6 -6
  163. package/dist/esm/qds-menu-item.entry.js.map +1 -1
  164. package/dist/esm/qds-mini-button.entry.js +1 -1
  165. package/dist/esm/qds-progress-bar.entry.js +1 -1
  166. package/dist/esm/qds-select.entry.js +4 -4
  167. package/dist/esm/qds-standalone-link.entry.js +39 -8
  168. package/dist/esm/qds-standalone-link.entry.js.map +1 -1
  169. package/dist/esm/qds-switch.entry.js +4 -4
  170. package/dist/esm/qds-tab.entry.js +7 -7
  171. package/dist/esm/qds-tab.entry.js.map +1 -1
  172. package/dist/esm/qds-tabbar.entry.js +5 -5
  173. package/dist/esm/qds-table-cell.entry.js +2 -2
  174. package/dist/esm/qds-table-head-cell.entry.js +2 -2
  175. package/dist/esm/qds-table-row.entry.js +1 -1
  176. package/dist/esm/qds-table.entry.js +1 -1
  177. package/dist/esm/qds-tag_2.entry.js +6 -6
  178. package/dist/esm/qds-textarea.entry.js +3 -3
  179. package/dist/esm/qds-tooltip.entry.js +2 -2
  180. package/dist/esm/qds.js +1 -1
  181. package/dist/types/components/avatar-media/avatar-media.d.ts +39 -0
  182. package/dist/types/components/icon-button/icon-button.d.ts +1 -1
  183. package/dist/types/components/inline-link/inline-link.d.ts +1 -1
  184. package/dist/types/components/label/label.d.ts +1 -1
  185. package/dist/types/components/standalone-link/standalone-link.d.ts +1 -1
  186. package/dist/types/components.d.ts +94 -125
  187. package/dist/types/helpers.d.ts +3 -3
  188. package/dist/vscode.html-custom-data.json +29 -52
  189. package/hydrate/index.js +694 -632
  190. package/hydrate/index.mjs +694 -632
  191. package/package.json +1 -1
  192. package/components/p-9fm05BrQ.js.map +0 -1
  193. package/components/p-CK_Yxg3A.js.map +0 -1
  194. package/components/p-CPvTGxdE.js.map +0 -1
  195. package/components/p-GGIVf4ry.js.map +0 -1
  196. package/components/p-jzP-octC.js.map +0 -1
  197. package/components/qds-nav-list-item.js +0 -164
  198. package/components/qds-nav-list-item.js.map +0 -1
  199. package/dist/cjs/helpers-D--0PcCT.js.map +0 -1
  200. package/dist/cjs/library-CF8K3bIq.js.map +0 -1
  201. package/dist/cjs/qds-checkbox.qds-radio.entry.cjs.js.map +0 -1
  202. package/dist/cjs/qds-nav-list-item.cjs.entry.js +0 -120
  203. package/dist/cjs/qds-nav-list-item.entry.cjs.js.map +0 -1
  204. package/dist/esm/helpers-CDZIefsI.js.map +0 -1
  205. package/dist/esm/library-B2PJ_ZJB.js.map +0 -1
  206. package/dist/esm/qds-checkbox.qds-radio.entry.js.map +0 -1
  207. package/dist/esm/qds-nav-list-item.entry.js +0 -118
  208. package/dist/esm/qds-nav-list-item.entry.js.map +0 -1
  209. package/dist/types/components/nav-list-item/nav-list-item.d.ts +0 -67
@@ -4,9 +4,9 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { r as registerInstance, h, g as getElement } from './index-D8Hb0u1k.js';
7
- import { b as inheritAriaAttributes } from './helpers-CDZIefsI.js';
7
+ import { b as inheritAriaAttributes } from './helpers-t9FQ7Vl_.js';
8
8
 
9
- const formMessageCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-form-message{color:var(--qds-theme-control-text-standard);display:inline-flex;gap:var(--qds-text-icon-gap)}.qds-icon-background,.qds-icon-container{align-items:center;display:flex}.qds-icon-background{border-radius:var(--qds-control-rounded-border-radius)}.qds-icon{color:var(--qds-theme-feedback-action-destructive-contrast)}.qds-sr-only{clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}[data-size=small]{font:var(--qds-form-small-text)}.qds-icon-container[data-size=small]{height:var(--qds-control-small-icon-crop-height)}.qds-icon[data-size=small]{height:var(--qds-form-small-icon-size);width:var(--qds-form-small-icon-size)}.qds-inline[data-size=small]{min-height:var(--qds-form-input-small-height)}[data-size=standard]{font:var(--qds-form-standard-text)}.qds-icon-container[data-size=standard]{height:var(--qds-control-standard-icon-crop-height)}.qds-icon[data-size=standard]{height:var(--qds-form-standard-icon-size);width:var(--qds-form-standard-icon-size)}.qds-inline[data-size=standard]{min-height:var(--qds-form-input-standard-height)}[data-size=large]{font:var(--qds-form-large-text)}.qds-icon-container[data-size=large]{height:var(--qds-control-large-icon-crop-height)}.qds-icon[data-size=large]{height:var(--qds-form-large-icon-size);width:var(--qds-form-large-icon-size)}.qds-inline[data-size=large]{min-height:var(--qds-form-input-large-height)}.qds-icon-background[data-status=error]{background-color:var(--qds-theme-feedback-result-failure)}.qds-text[data-status=error]{color:var(--qds-theme-feedback-result-failure)}[data-status=info].qds-icon-background{background-color:var(--qds-theme-feedback-message-informational)}.qds-icon-background[data-status=success]{background-color:var(--qds-theme-feedback-result-success)}.qds-text[data-status=success]{color:var(--qds-theme-feedback-result-success)}[data-status=warning].qds-icon-background{background-color:var(--qds-theme-feedback-result-partial-success)}[data-status=neutral]{color:var(--qds-theme-text-subdued)}";
9
+ const formMessageCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-form-message{color:var(--qds-theme-control-text-standard);display:inline-flex;gap:var(--qds-text-icon-gap)}.qds-icon-background,.qds-icon-container{align-items:center;display:flex}.qds-icon-background{background-color:var(--qds-theme-feedback-action-destructive-contrast);border-radius:var(--qds-control-rounded-border-radius)}.qds-sr-only{clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}[data-size=small]{font:var(--qds-form-small-text)}.qds-icon-container[data-size=small]{height:var(--qds-control-small-icon-crop-height)}.qds-icon[data-size=small]{height:var(--qds-form-small-icon-size);width:var(--qds-form-small-icon-size)}.qds-inline[data-size=small]{min-height:var(--qds-form-input-small-height)}[data-size=standard]{font:var(--qds-form-standard-text)}.qds-icon-container[data-size=standard]{height:var(--qds-control-standard-icon-crop-height)}.qds-icon[data-size=standard]{height:var(--qds-form-standard-icon-size);width:var(--qds-form-standard-icon-size)}.qds-inline[data-size=standard]{min-height:var(--qds-form-input-standard-height)}[data-size=large]{font:var(--qds-form-large-text)}.qds-icon-container[data-size=large]{height:var(--qds-control-large-icon-crop-height)}.qds-icon[data-size=large]{height:var(--qds-form-large-icon-size);width:var(--qds-form-large-icon-size)}.qds-inline[data-size=large]{min-height:var(--qds-form-input-large-height)}.qds-icon[data-status=error],.qds-text[data-status=error]{color:var(--qds-theme-feedback-result-failure)}[data-status=info].qds-icon{color:var(--qds-theme-feedback-message-informational)}.qds-icon[data-status=success],.qds-text[data-status=success]{color:var(--qds-theme-feedback-result-success)}[data-status=warning].qds-icon{color:var(--qds-theme-feedback-result-partial-success)}[data-status=neutral]{color:var(--qds-theme-text-subdued)}";
10
10
 
11
11
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
12
12
  //
@@ -53,10 +53,10 @@ const FormMessage = class {
53
53
  __classPrivateFieldSet(this, _FormMessage_inheritedAttributes, inheritAriaAttributes(this.host), "f");
54
54
  }
55
55
  render() {
56
- return (h("span", { key: '1ef4fb81a0e720706465482e33aa3215ef1826d6', class: {
56
+ return (h("span", { key: '0a8cbc3d4d61b9dbf49f33e3d68b789bc549c9f7', class: {
57
57
  'qds-form-message': true,
58
58
  'qds-inline': this.inline,
59
- }, "data-size": __classPrivateFieldGet(this, _FormMessage_instances, "a", _FormMessage_computedSize_get), ...__classPrivateFieldGet(this, _FormMessage_inheritedAttributes, "f") }, this.status !== 'neutral' && (h("div", { key: '68329e92a949636e3697601893ffec0374228495', class: "qds-icon-container", "data-size": __classPrivateFieldGet(this, _FormMessage_instances, "a", _FormMessage_computedSize_get) }, h("div", { key: '7fe038245c70221f912a4cba401c0026721bc19b', class: "qds-icon-background", "data-size": __classPrivateFieldGet(this, _FormMessage_instances, "a", _FormMessage_computedSize_get), "data-status": this.status }, h("qds-icon", { key: 'ae2d30439a724f2bb34855a79bfadb0cee20e3eb', "aria-hidden": "true", class: "qds-icon", "data-size": __classPrivateFieldGet(this, _FormMessage_instances, "a", _FormMessage_computedSize_get), name: `status-${this.status}`, library: "core" }), h("span", { key: '968c7f450fd577fe356e0a000918383587dd8871', class: "qds-sr-only" }, this.statusDescription)))), h("span", { key: '3d4f73c09093115c43069c8d5fcc5e659813ed43', class: "qds-text", "data-status": __classPrivateFieldGet(this, _FormMessage_instances, "a", _FormMessage_computedStatus_get) }, this.text)));
59
+ }, "data-size": __classPrivateFieldGet(this, _FormMessage_instances, "a", _FormMessage_computedSize_get), ...__classPrivateFieldGet(this, _FormMessage_inheritedAttributes, "f") }, this.status !== 'neutral' && (h("div", { key: '02884cdb957599f46d249bb98801f3c160250937', class: "qds-icon-container", "data-size": __classPrivateFieldGet(this, _FormMessage_instances, "a", _FormMessage_computedSize_get) }, h("div", { key: '0a644f9370c393343e13e540fdff08d00173aa38', class: "qds-icon-background", "data-size": __classPrivateFieldGet(this, _FormMessage_instances, "a", _FormMessage_computedSize_get), "data-status": this.status }, h("qds-icon", { key: '9e5155876baa893f97c1c075ac45c7456cf14a7c', "aria-hidden": "true", class: "qds-icon", "data-size": __classPrivateFieldGet(this, _FormMessage_instances, "a", _FormMessage_computedSize_get), "data-status": this.status, name: `status-${this.status}-solid`, library: "core" }), h("span", { key: '39ed92c28a4fabb5d88e1e3994ce2223fce3c152', class: "qds-sr-only" }, this.statusDescription)))), h("span", { key: 'b9a972b25f786706b6b080599e1249cc8d7f6b4a', class: "qds-text", "data-status": __classPrivateFieldGet(this, _FormMessage_instances, "a", _FormMessage_computedStatus_get) }, this.text)));
60
60
  }
61
61
  get host() { return getElement(this); }
62
62
  };
@@ -1 +1 @@
1
- {"version":3,"file":"qds-form-message.entry.js","sources":["src/components/form-message/form-message.css?tag=qds-form-message&encapsulation=shadow","src/components/form-message/form-message.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n line-height: 0;\n}\n\n.qds-form-message {\n color: var(--qds-theme-control-text-standard);\n display: inline-flex;\n gap: var(--qds-text-icon-gap);\n}\n\n.qds-icon-container,\n.qds-icon-background {\n display: flex;\n align-items: center;\n}\n\n.qds-icon-background {\n border-radius: var(--qds-control-rounded-border-radius);\n}\n\n.qds-icon {\n color: var(--qds-theme-feedback-action-destructive-contrast);\n}\n\n.qds-sr-only {\n clip: rect(0 0 0 0);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n}\n\n[data-size='small'] {\n font: var(--qds-form-small-text);\n\n &.qds-icon-container {\n height: var(--qds-control-small-icon-crop-height);\n }\n\n &.qds-icon {\n width: var(--qds-form-small-icon-size);\n height: var(--qds-form-small-icon-size);\n }\n\n &.qds-inline {\n min-height: var(--qds-form-input-small-height);\n }\n}\n\n[data-size='standard'] {\n font: var(--qds-form-standard-text);\n\n &.qds-icon-container {\n height: var(--qds-control-standard-icon-crop-height);\n }\n\n &.qds-icon {\n width: var(--qds-form-standard-icon-size);\n height: var(--qds-form-standard-icon-size);\n }\n\n &.qds-inline {\n min-height: var(--qds-form-input-standard-height);\n }\n}\n\n[data-size='large'] {\n font: var(--qds-form-large-text);\n\n &.qds-icon-container {\n height: var(--qds-control-large-icon-crop-height);\n }\n\n &.qds-icon {\n width: var(--qds-form-large-icon-size);\n height: var(--qds-form-large-icon-size);\n }\n\n &.qds-inline {\n min-height: var(--qds-form-input-large-height);\n }\n}\n\n[data-status='error'] {\n &.qds-icon-background {\n background-color: var(--qds-theme-feedback-result-failure);\n }\n\n &.qds-text {\n color: var(--qds-theme-feedback-result-failure);\n }\n}\n\n[data-status='info'].qds-icon-background {\n background-color: var(--qds-theme-feedback-message-informational);\n}\n\n[data-status='success'] {\n &.qds-icon-background {\n background-color: var(--qds-theme-feedback-result-success);\n }\n\n &.qds-text {\n color: var(--qds-theme-feedback-result-success);\n }\n}\n\n[data-status='warning'].qds-icon-background {\n background-color: var(--qds-theme-feedback-result-partial-success);\n}\n\n[data-status='neutral'] {\n color: var(--qds-theme-text-subdued);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, Element, h, Prop } from '@stencil/core'\n\nimport type { Attributes } from '../../helpers'\nimport { inheritAriaAttributes } from '../../helpers'\nimport type { Size, Status } from '../shared'\n\nexport type FormMessageStatus = Status | 'neutral'\n\n/**\n * `<qds-form-message>` elements represent messages for a form field in a user\n * interface.\n *\n * @see https://quartz.se.com/build/components/form-message\n */\n@Component({\n tag: 'qds-form-message',\n shadow: true,\n styleUrl: 'form-message.css',\n})\nexport class FormMessage implements ComponentInterface {\n /**\n * Adds vertical margin to the form message for alignment.\n *\n * This is useful when creating inline layouts so that the first lines have\n * the correct vertical centering.\n */\n @Prop() public readonly inline: boolean = false\n\n /**\n * The form message's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The form message's status.\n */\n @Prop() public readonly status?: FormMessageStatus = 'error'\n\n /**\n * Adds accessible text to the icon's form message that will be used by screen readers.\n *\n * @example\n * <qds-form-message status-description=\"Error\" text=\"Password is required.\"></qds-form-message>\n * // This form message will be read by screen readers as \"Error Password is required.\"\n */\n @Prop() public readonly statusDescription?: string\n\n /**\n * The form message's text.\n */\n @Prop() public readonly text?: string\n\n @Element() private readonly host!: HTMLElement\n\n #inheritedAttributes: Attributes = {}\n\n get #computedSize(): Size {\n switch (this.size) {\n case 'standard':\n case 'small':\n case 'large': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedStatus(): FormMessageStatus {\n return this.status ?? 'error'\n }\n\n public componentWillLoad(): void {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n }\n\n public render() {\n return (\n <span\n class={{\n 'qds-form-message': true,\n 'qds-inline': this.inline,\n }}\n data-size={this.#computedSize}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n >\n {this.status !== 'neutral' && (\n <div class=\"qds-icon-container\" data-size={this.#computedSize}>\n <div\n class=\"qds-icon-background\"\n data-size={this.#computedSize}\n data-status={this.status}\n >\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n data-size={this.#computedSize}\n name={`status-${this.status}`}\n library=\"core\"\n />\n <span class=\"qds-sr-only\">{this.statusDescription}</span>\n </div>\n </div>\n )}\n <span class=\"qds-text\" data-status={this.#computedStat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,EAAA,6BAAA,CAAA,EAAA,aAAA,EAChB,IAAI,CAAC,MAAM,EAAA,EAExB,CACc,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,aAAA,EAAA,MAAM,EAClB,KAAK,EAAC,UAAU,EACL,WAAA,EAAA,sBAAA,CAAA,IAAI,EAAc,sBAAA,EAAA,GAAA,EAAA,6BAAA,CAAA,EAC7B,IAAI,EAAE,CAAU,OAAA,EAAA,IAAI,CAAC,MAAM,CAAA,CAAE,EAC7B,OAAO,EAAC,MAAM,EACd,CAAA,EACF,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAE,EAAA,IAAI,CAAC,iBAAiB,CAAQ,CACrD,CACF,CACP,EACD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,UAAU,EAAA,aAAA,EAAc,uBAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,EAAA,+BAAA,CAAgB,EACrD,EAAA,IAAI,CAAC,IAAI,CACL,CACF;;;;;AApDT,IAAA,QAAQ,IAAI,CAAC,IAAI;AACf,QAAA,KAAK,UAAU;AACf,QAAA,KAAK,OAAO;QACZ,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI;;QAElB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC,EAAA,+BAAA,GAAA,SAAA,+BAAA,GAAA;AAGC,IAAA,OAAO,IAAI,CAAC,MAAM,IAAI,OAAO;AAC/B,CAAC;;;;;"}
1
+ {"version":3,"file":"qds-form-message.entry.js","sources":["src/components/form-message/form-message.css?tag=qds-form-message&encapsulation=shadow","src/components/form-message/form-message.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n line-height: 0;\n}\n\n.qds-form-message {\n color: var(--qds-theme-control-text-standard);\n display: inline-flex;\n gap: var(--qds-text-icon-gap);\n}\n\n.qds-icon-container,\n.qds-icon-background {\n display: flex;\n align-items: center;\n}\n\n.qds-icon-background {\n border-radius: var(--qds-control-rounded-border-radius);\n background-color: var(--qds-theme-feedback-action-destructive-contrast);\n}\n\n.qds-sr-only {\n clip: rect(0 0 0 0);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n}\n\n[data-size='small'] {\n font: var(--qds-form-small-text);\n\n &.qds-icon-container {\n height: var(--qds-control-small-icon-crop-height);\n }\n\n &.qds-icon {\n width: var(--qds-form-small-icon-size);\n height: var(--qds-form-small-icon-size);\n }\n\n &.qds-inline {\n min-height: var(--qds-form-input-small-height);\n }\n}\n\n[data-size='standard'] {\n font: var(--qds-form-standard-text);\n\n &.qds-icon-container {\n height: var(--qds-control-standard-icon-crop-height);\n }\n\n &.qds-icon {\n width: var(--qds-form-standard-icon-size);\n height: var(--qds-form-standard-icon-size);\n }\n\n &.qds-inline {\n min-height: var(--qds-form-input-standard-height);\n }\n}\n\n[data-size='large'] {\n font: var(--qds-form-large-text);\n\n &.qds-icon-container {\n height: var(--qds-control-large-icon-crop-height);\n }\n\n &.qds-icon {\n width: var(--qds-form-large-icon-size);\n height: var(--qds-form-large-icon-size);\n }\n\n &.qds-inline {\n min-height: var(--qds-form-input-large-height);\n }\n}\n\n[data-status='error'] {\n &.qds-icon {\n color: var(--qds-theme-feedback-result-failure);\n }\n\n &.qds-text {\n color: var(--qds-theme-feedback-result-failure);\n }\n}\n\n[data-status='info'].qds-icon {\n color: var(--qds-theme-feedback-message-informational);\n}\n\n[data-status='success'] {\n &.qds-icon {\n color: var(--qds-theme-feedback-result-success);\n }\n\n &.qds-text {\n color: var(--qds-theme-feedback-result-success);\n }\n}\n\n[data-status='warning'].qds-icon {\n color: var(--qds-theme-feedback-result-partial-success);\n}\n\n[data-status='neutral'] {\n color: var(--qds-theme-text-subdued);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, Element, h, Prop } from '@stencil/core'\n\nimport type { Attributes } from '../../helpers'\nimport { inheritAriaAttributes } from '../../helpers'\nimport type { Size, Status } from '../shared'\n\nexport type FormMessageStatus = Status | 'neutral'\n\n/**\n * `<qds-form-message>` elements represent messages for a form field in a user\n * interface.\n *\n * @see https://quartz.se.com/build/components/form-message\n */\n@Component({\n tag: 'qds-form-message',\n shadow: true,\n styleUrl: 'form-message.css',\n})\nexport class FormMessage implements ComponentInterface {\n /**\n * Adds vertical margin to the form message for alignment.\n *\n * This is useful when creating inline layouts so that the first lines have\n * the correct vertical centering.\n */\n @Prop() public readonly inline: boolean = false\n\n /**\n * The form message's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The form message's status.\n */\n @Prop() public readonly status?: FormMessageStatus = 'error'\n\n /**\n * Adds accessible text to the icon's form message that will be used by screen readers.\n *\n * @example\n * <qds-form-message status-description=\"Error\" text=\"Password is required.\"></qds-form-message>\n * // This form message will be read by screen readers as \"Error Password is required.\"\n */\n @Prop() public readonly statusDescription?: string\n\n /**\n * The form message's text.\n */\n @Prop() public readonly text?: string\n\n @Element() private readonly host!: HTMLElement\n\n #inheritedAttributes: Attributes = {}\n\n get #computedSize(): Size {\n switch (this.size) {\n case 'standard':\n case 'small':\n case 'large': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedStatus(): FormMessageStatus {\n return this.status ?? 'error'\n }\n\n public componentWillLoad(): void {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n }\n\n public render() {\n return (\n <span\n class={{\n 'qds-form-message': true,\n 'qds-inline': this.inline,\n }}\n data-size={this.#computedSize}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n >\n {this.status !== 'neutral' && (\n <div class=\"qds-icon-container\" data-size={this.#computedSize}>\n <div\n class=\"qds-icon-background\"\n data-size={this.#computedSize}\n data-status={this.status}\n >\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n data-size={this.#computedSize}\n data-status={this.status}\n name={`status-${this.status}-solid`}\n library=\"core\"\n />\n <span class=\"qds-sr-only\">{this.statusDescription}</span>\n </div>\n </div>\n )}\n <span class=\"qds-text\" data-status={this.#computedStatus}>\n {this.text}\n </span>\n </span>\n )\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,k6DAAk6D;;ACAz7D;AACA;AACA;;;;;;;;;;;;;;;;;;MAsBa,WAAW,GAAA,MAAA;AALxB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAME;;;;;AAKG;AACqB,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAE/C;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAU,UAAU;AAEhD;;AAEG;AACqB,QAAA,IAAM,CAAA,MAAA,GAAuB,OAAO;AAkB5D,QAAA,gCAAA,CAAA,GAAA,CAAA,IAAA,EAAmC,EAAE,CAAA;AA2DtC;IAxCQ,iBAAiB,GAAA;AACtB,QAAA,sBAAA,CAAA,IAAI,oCAAwB,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA,GAAA,CAAA;;IAGvD,MAAM,GAAA;QACX,QACE,CACE,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;gBACxB,YAAY,EAAE,IAAI,CAAC,MAAM;aAC1B,EAAA,WAAA,EACU,uBAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,EAAA,6BAAA,CAAc,EAEzB,GAAA,sBAAA,CAAA,IAAI,EAAqB,gCAAA,EAAA,GAAA,CAAA,EAAA,EAE5B,IAAI,CAAC,MAAM,KAAK,SAAS,KACxB,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,K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CAAC;;;;;"}
@@ -4,9 +4,9 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-D8Hb0u1k.js';
7
- import { p as pickFocusEventAttributes } from './helpers-CDZIefsI.js';
7
+ import { p as pickFocusEventAttributes } from './helpers-t9FQ7Vl_.js';
8
8
 
9
- const iconButtonCss = ":host{display:block}:host(:focus-visible){border-radius:var(--qds-focus-border-radius);outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-icon-button{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:none;border-radius:var(--qds-control-border-radius);box-sizing:border-box;color:var(--qds-theme-control-text-standard);cursor:pointer;display:flex;justify-content:center;line-height:normal;min-width:0;padding-inline:0;position:relative;-webkit-user-select:none;user-select:none}.qds-icon-button:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-icon-button:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-icon{flex-shrink:0}.qds-indicator{inset-block-start:0;inset-inline-end:0;position:absolute;transform:translate(50%,-50%)}[data-size=small]{min-height:var(--qds-control-small-height);width:var(--qds-control-small-height)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size);min-height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}[data-size=standard]{min-height:var(--qds-control-standard-height);width:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size);min-height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}[data-size=large]{min-height:var(--qds-control-large-height);width:var(--qds-control-large-height)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size);min-height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}[data-size=hero]{border-radius:var(--qds-control-hero-border-radius);min-height:var(--qds-control-hero-height);width:var(--qds-control-hero-height)}.qds-icon[data-size=hero]{font-size:var(--qds-control-hero-icon-size);min-height:var(--qds-control-hero-icon-size);width:var(--qds-control-hero-icon-size)}[data-importance=subdued]{color:var(--qds-theme-control-text-standard)}[data-importance=subdued]:hover{background-color:var(--qds-theme-interactive-background-hover)}[data-importance=subdued]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=standard]{border:var(--qds-control-border-width) solid var(--qds-theme-control-border);color:var(--qds-theme-control-text-standard)}[data-importance=standard]:hover{background-color:var(--qds-theme-interactive-background-hover)}[data-importance=standard]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=emphasized]{background-color:var(--qds-theme-signature-color-default);color:var(--qds-theme-signature-color-contrast)}[data-importance=emphasized]:hover{background-color:var(--qds-theme-signature-color-hover)}[data-importance=emphasized]:active{background-color:var(--qds-theme-signature-color-pressed)}[data-importance=destructive]{background-color:var(--qds-theme-feedback-action-destructive-default);color:var(--qds-theme-feedback-action-destructive-contrast)}[data-importance=destructive]:hover{background-color:var(--qds-theme-feedback-action-destructive-hover)}[data-importance=destructive]:active{background-color:var(--qds-theme-feedback-action-destructive-pressed)}[data-importance=subdued-destructive]{border:none;color:var(--qds-theme-feedback-action-destructive-default)}[data-importance=subdued-destructive]:hover{background-color:var(--qds-theme-interactive-background-hover);color:var(--qds-theme-feedback-action-destructive-default)}[data-importance=subdued-destructive]:active{background-color:var(--qds-theme-interactive-background-pressed);color:var(--qds-theme-feedback-action-destructive-default)}";
9
+ const iconButtonCss = ":host{display:block}:host(:focus-visible){border-radius:var(--qds-focus-border-radius);outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-icon-button{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:none;border-radius:var(--qds-control-border-radius);box-sizing:border-box;color:var(--qds-theme-control-text-standard);cursor:pointer;display:flex;justify-content:center;line-height:normal;min-width:0;padding-inline:0;position:relative;-webkit-user-select:none;user-select:none}.qds-icon-button:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-icon-button:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-icon{flex-shrink:0}.qds-indicator{inset-block-start:0;inset-inline-end:0;position:absolute;transform:translate(50%,-50%)}[data-size=small]{min-height:var(--qds-control-small-height);width:var(--qds-control-small-height)}.qds-icon[data-size=small]{min-height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}[data-size=standard]{min-height:var(--qds-control-standard-height);width:var(--qds-control-standard-height)}.qds-icon[data-size=standard]{min-height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}[data-size=large]{min-height:var(--qds-control-large-height);width:var(--qds-control-large-height)}.qds-icon[data-size=large]{min-height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}[data-size=hero]{border-radius:var(--qds-control-hero-border-radius);min-height:var(--qds-control-hero-height);width:var(--qds-control-hero-height)}.qds-icon[data-size=hero]{min-height:var(--qds-control-hero-icon-size);width:var(--qds-control-hero-icon-size)}[data-importance=subdued]{color:var(--qds-theme-control-text-standard)}[data-importance=subdued]:hover{background-color:var(--qds-theme-interactive-background-hover)}[data-importance=subdued]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=standard]{border:var(--qds-control-border-width) solid var(--qds-theme-control-border);color:var(--qds-theme-control-text-standard)}[data-importance=standard]:hover{background-color:var(--qds-theme-interactive-background-hover)}[data-importance=standard]:active{background-color:var(--qds-theme-interactive-background-pressed)}[data-importance=emphasized]{background-color:var(--qds-theme-signature-color-default);color:var(--qds-theme-signature-color-contrast)}[data-importance=emphasized]:hover{background-color:var(--qds-theme-signature-color-hover)}[data-importance=emphasized]:active{background-color:var(--qds-theme-signature-color-pressed)}[data-importance=destructive]{background-color:var(--qds-theme-feedback-action-destructive-default);color:var(--qds-theme-feedback-action-destructive-contrast)}[data-importance=destructive]:hover{background-color:var(--qds-theme-feedback-action-destructive-hover)}[data-importance=destructive]:active{background-color:var(--qds-theme-feedback-action-destructive-pressed)}[data-importance=subdued-destructive]{border:none;color:var(--qds-theme-feedback-action-destructive-default)}[data-importance=subdued-destructive]:hover{background-color:var(--qds-theme-interactive-background-hover);color:var(--qds-theme-feedback-action-destructive-default)}[data-importance=subdued-destructive]:active{background-color:var(--qds-theme-interactive-background-pressed);color:var(--qds-theme-feedback-action-destructive-default)}";
10
10
 
11
11
  // SPDX-FileCopyrightText: © 2025 Schneider Electric
12
12
  //
@@ -27,7 +27,7 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
27
27
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
28
28
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
29
29
  };
30
- var _IconButton_instances, _IconButton_savedTabIndex, _IconButton_button, _IconButton_tooltip, _IconButton_computedSize_get, _IconButton_computedImportance_get, _IconButton_computedDisabled_get, _IconButton_updateAriaLabel, _IconButton_ref, _IconButton_tooltipRef;
30
+ var _IconButton_instances, _IconButton_savedTabIndex, _IconButton_button, _IconButton_tooltip, _IconButton_computedSize_get, _IconButton_computedImportance_get, _IconButton_computedDisabled_get, _IconButton_hasText_get, _IconButton_updateAriaLabel, _IconButton_ref, _IconButton_tooltipRef;
31
31
  const isCounter = (value) => typeof value === 'string'
32
32
  ? !Number.isNaN(Number.parseFloat(value))
33
33
  : typeof value === 'number';
@@ -148,10 +148,10 @@ const IconButton = class {
148
148
  }
149
149
  render() {
150
150
  const Tag = this.href === undefined ? 'button' : 'a';
151
- return (h("div", { key: 'e421dfabe73ae890b76b43f634a34332e86443fa' }, h(Tag, { key: '1a3dc911e0baacd7d248cd763f20cd24a5ad8b80', type: Tag === 'a' ? undefined : 'button', class: {
151
+ return (h("div", { key: 'f887464f7354fb81f4910422d97542feabc9f61b' }, h(Tag, { key: 'de3fc7375ca2165c93ef889f0d80a475d712befa', type: Tag === 'a' ? undefined : 'button', class: {
152
152
  'qds-icon-button': true,
153
153
  'qds-disabled': __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedDisabled_get),
154
- }, href: Tag === 'a' ? this.href : undefined, rel: Tag === 'a' ? this.rel : undefined, ref: __classPrivateFieldGet(this, _IconButton_ref, "f"), disabled: Tag === 'a' ? undefined : __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedDisabled_get), download: Tag === 'a' ? this.download : undefined, "aria-hidden": "true", "data-size": __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedSize_get), "data-importance": __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedImportance_get), onKeyDown: preventDefault, onKeyUp: preventDefault, onKeyPress: preventDefault, tabIndex: -1 }, h("qds-icon", { key: 'dc98998834d20c1f94a8fd028c6fad87ec9b578b', class: "qds-icon", "data-size": __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedSize_get), library: this.iconLibrary, name: this.iconName }), isIndicator(this.badge) && (h("qds-badge-indicator", { key: '5b93f5e41e0ad25b77f65f56d84595354918da71', class: "qds-indicator", status: this.badgeIndicatorStatus, description: this.badgeDescription, size: __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedSize_get), strokeRing: true })), isCounter(this.badge) && (h("qds-badge-counter", { key: 'eb5c530efa72d98a12aca7a6090a11d46e9ce363', class: "qds-indicator", description: this.badgeDescription, importance: __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedImportance_get), size: __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedSize_get), strokeRing: true, value: this.badge }))), this.text && (h("qds-tooltip", { key: 'ceeb97574b8e59279c15c0b6c50dc0183f6ddc72', ref: __classPrivateFieldGet(this, _IconButton_tooltipRef, "f") }, this.text))));
154
+ }, href: Tag === 'a' ? this.href : undefined, rel: Tag === 'a' ? this.rel : undefined, ref: __classPrivateFieldGet(this, _IconButton_ref, "f"), disabled: Tag === 'a' ? undefined : __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedDisabled_get), download: Tag === 'a' ? this.download : undefined, "aria-hidden": "true", "data-size": __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedSize_get), "data-importance": __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedImportance_get), onKeyDown: preventDefault, onKeyUp: preventDefault, onKeyPress: preventDefault, tabIndex: -1 }, h("qds-icon", { key: 'e0f8ec1005afb570848847a679574721dfa8985a', class: "qds-icon", "data-size": __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedSize_get), library: this.iconLibrary, name: this.iconName }), isIndicator(this.badge) && (h("qds-badge-indicator", { key: '2ef9b5e34e55ab5d80365e943672cbcab08a7b19', class: "qds-indicator", status: this.badgeIndicatorStatus, description: this.badgeDescription, size: __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedSize_get), strokeRing: true })), isCounter(this.badge) && (h("qds-badge-counter", { key: '486d743e6e949715d8ab7611de6af7175f01f1fa', class: "qds-indicator", description: this.badgeDescription, importance: __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedImportance_get), size: __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_computedSize_get), strokeRing: true, value: this.badge }))), __classPrivateFieldGet(this, _IconButton_instances, "a", _IconButton_hasText_get) && (h("qds-tooltip", { key: 'a23e25841c3b91d9529294ea6d69fd28e1c9daf6', ref: __classPrivateFieldGet(this, _IconButton_tooltipRef, "f") }, this.text))));
155
155
  }
156
156
  static get formAssociated() { return true; }
157
157
  get host() { return getElement(this); }
@@ -187,6 +187,8 @@ _IconButton_savedTabIndex = new WeakMap(), _IconButton_button = new WeakMap(), _
187
187
  }
188
188
  }, _IconButton_computedDisabled_get = function _IconButton_computedDisabled_get() {
189
189
  return this.disabled;
190
+ }, _IconButton_hasText_get = function _IconButton_hasText_get() {
191
+ return this.text !== undefined && this.text !== '';
190
192
  }, _IconButton_updateAriaLabel = function _IconButton_updateAriaLabel() {
191
193
  if (this.badge !== undefined && this.badgeDescription !== undefined) {
192
194
  this.internals.ariaLabel = `${this.text} ${isIndicator(this.badge) ? '' : this.badge} ${this.badgeDescription}`;
@@ -198,7 +200,7 @@ _IconButton_savedTabIndex = new WeakMap(), _IconButton_button = new WeakMap(), _
198
200
  this.internals.ariaLabel = `${this.text} Opens in a new tab`;
199
201
  return;
200
202
  }
201
- this.internals.ariaLabel = this.text;
203
+ this.internals.ariaLabel = this.text ?? '';
202
204
  };
203
205
  IconButton.style = iconButtonCss;
204
206
 
@@ -1 +1 @@
1
- {"version":3,"file":"qds-icon-button.entry.js","sources":["src/components/icon-button/icon-button.css?tag=qds-icon-button&encapsulation=shadow","src/components/icon-button/icon-button.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2025 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n:host {\n display: block;\n}\n\n:host(:focus-visible) {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n border-radius: var(--qds-focus-border-radius);\n}\n\n.qds-icon-button {\n display: flex;\n position: relative;\n\n /* Avoid automatic minimum size on flex element: https://www.w3.org/TR/css-flexbox-1/#min-size-auto */\n min-width: 0;\n align-items: center;\n justify-content: center;\n border-radius: var(--qds-control-border-radius);\n border: none;\n appearance: none;\n user-select: none;\n cursor: pointer;\n box-sizing: border-box;\n background-color: initial;\n color: var(--qds-theme-control-text-standard);\n padding-inline: 0;\n line-height: normal;\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n}\n\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n.qds-icon {\n flex-shrink: 0;\n}\n\n.qds-indicator {\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n transform: translate(50%, -50%);\n}\n\n[data-size='small'] {\n min-height: var(--qds-control-small-height);\n width: var(--qds-control-small-height);\n\n &.qds-icon {\n min-height: var(--qds-control-small-icon-size);\n width: var(--qds-control-small-icon-size);\n font-size: var(--qds-control-small-icon-size);\n }\n}\n\n[data-size='standard'] {\n min-height: var(--qds-control-standard-height);\n width: var(--qds-control-standard-height);\n\n &.qds-icon {\n min-height: var(--qds-control-standard-icon-size);\n width: var(--qds-control-standard-icon-size);\n font-size: var(--qds-control-standard-icon-size);\n }\n}\n\n[data-size='large'] {\n min-height: var(--qds-control-large-height);\n width: var(--qds-control-large-height);\n\n &.qds-icon {\n min-height: var(--qds-control-large-icon-size);\n width: var(--qds-control-large-icon-size);\n font-size: var(--qds-control-large-icon-size);\n }\n}\n\n[data-size='hero'] {\n min-height: var(--qds-control-hero-height);\n width: var(--qds-control-hero-height);\n border-radius: var(--qds-control-hero-border-radius);\n\n &.qds-icon {\n font-size: var(--qds-control-hero-icon-size);\n min-height: var(--qds-control-hero-icon-size);\n width: var(--qds-control-hero-icon-size);\n }\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-control-text-standard);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-control-text-standard);\n border: var(--qds-control-border-width) solid var(--qds-theme-control-border);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n}\n\n[data-importance='emphasized'] {\n background-color: var(--qds-theme-signature-color-default);\n color: var(--qds-theme-signature-color-contrast);\n\n &:hover {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n}\n\n[data-importance='destructive'] {\n background-color: var(--qds-theme-feedback-action-destructive-default);\n color: var(--qds-theme-feedback-action-destructive-contrast);\n\n &:hover {\n background-color: var(--qds-theme-feedback-action-destructive-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-feedback-action-destructive-pressed);\n }\n}\n\n[data-importance='subdued-destructive'] {\n color: var(--qds-theme-feedback-action-destructive-default);\n border: none;\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n}\n","// SPDX-FileCopyrightText: © 2025 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport { pickFocusEventAttributes } from '../../helpers'\nimport type { ButtonTarget } from '../button/button'\nimport type { Importance, Size } from '../shared'\n\nexport type IconButtonSize = Size | 'hero'\nexport type IconButtonImportance =\n | Importance\n | 'destructive'\n | 'subdued-destructive'\n\nconst isCounter = (value: unknown): value is number =>\n typeof value === 'string'\n ? !Number.isNaN(Number.parseFloat(value))\n : typeof value === 'number'\n\nconst isIndicator = (value: unknown): value is '' | true =>\n value === '' || value === true\n\nconst preventDefault = (event: KeyboardEvent | MouseEvent): void => {\n event.preventDefault()\n}\n/**\n * The `<qds-icon-button>` is an interactive element activated by a user\n * with a mouse, keyboard, finger, voice command, or other assistive technology.\n * Once activated, it performs a programmable action, such as submitting a\n * [form](https://developer.mozilla.org/docs/Learn/Forms)\n * or opening a dialog.\n *\n * @see https://quartz.se.com/build/components/icon-button\n */\n@Component({\n tag: 'qds-icon-button',\n formAssociated: true,\n styleUrl: 'icon-button.css',\n shadow: true,\n})\nexport class IconButton implements ComponentInterface {\n /**\n * Prevents the icon button from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop()\n public readonly disabled: boolean = false\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName!: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * The icon button's size.\n */\n @Prop() public readonly size?: Size | 'hero' = 'standard'\n\n /**\n * The icon button's importance.\n */\n @Prop() public readonly importance?: IconButtonImportance = 'standard'\n\n /**\n * Displays an indicator if `true` or the empty string. Otherwise, displays a\n * counter badge if a number or string representing a number is used.\n *\n * @webnative\n */\n @Prop() public readonly badge?: number | string | true\n\n /**\n * The indicator or counter badge's accessible text that will be used by\n * screen readers.\n */\n @Prop() public readonly badgeDescription?: string\n\n /**\n * The indicator's status.\n */\n @Prop()\n public readonly badgeIndicatorStatus?: HTMLQdsBadgeIndicatorElement['status'] =\n 'neutral'\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<ButtonTarget, string>\n\n /**\n * When set, the underlying button will be rendered as an `<a>` with this\n * `href` instead of a `<button>`.\n *\n * @webnative\n */\n @Prop() public readonly href?: string\n\n /**\n * When href is define and the button act as a link (`<a>`), the `rel` will be added to the element.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string = 'noopener'\n\n /**\n * Tells the browser to download the linked file as this filename. Only used\n * when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly download?: string\n\n /**\n * The icon button's accessible name.\n */\n @Prop() public readonly text!: string\n\n /**\n * Emitted when the icon button loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the icon button gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #savedTabIndex = 0\n\n #button?: HTMLAnchorElement | HTMLButtonElement\n\n #tooltip?: HTMLQdsTooltipElement\n\n get #computedSize(): IconButtonSize {\n switch (this.size) {\n case 'small':\n case 'large':\n case 'hero': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedImportance(): IconButtonImportance {\n switch (this.importance) {\n case 'emphasized':\n case 'subdued':\n case 'destructive':\n case 'subdued-destructive': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedDisabled(): boolean {\n return this.disabled\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.#computedDisabled.toString()\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('href')\n protected hrefChanged(): void {\n this.internals.role = this.href === undefined ? 'button' : 'link'\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string | null): void {\n if (newValue !== null) {\n const parsedValue = Number.parseInt(newValue, 10)\n this.#savedTabIndex =\n Number.isNaN(parsedValue) || !Number.isFinite(parsedValue)\n ? 0\n : parsedValue\n }\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('text')\n protected textChanged(): void {\n this.#updateAriaLabel()\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) event.stopImmediatePropagation()\n }\n\n @Listen('blur')\n protected async onBlur(event: FocusEvent): Promise<void> {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n if (this.#tooltip) {\n await this.#tooltip.close()\n }\n }\n\n @Listen('focus')\n protected async onFocus(event: FocusEvent): Promise<void> {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n if (this.#tooltip) {\n await this.#tooltip.show()\n }\n }\n\n @Listen('keydown')\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter') this.host.click()\n }\n\n @Listen('keyup')\n protected onKeyup(event: KeyboardEvent): void {\n if (event.key === ' ') this.host.click()\n }\n\n public componentWillLoad(): void {\n this.hrefChanged()\n this.textChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n this.disabledChanged()\n }\n\n public render() {\n const Tag = this.href === undefined ? 'button' : 'a'\n return (\n <div>\n <Tag\n type={Tag === 'a' ? undefined : 'button'}\n class={{\n 'qds-icon-button': true,\n 'qds-disabled': this.#computedDisabled,\n }}\n href={Tag === 'a' ? this.href : undefined}\n rel={Tag === 'a' ? this.rel : undefined}\n ref={this.#ref}\n disabled={Tag === 'a' ? undefined : this.#computedDisabled}\n download={Tag === 'a' ? this.download : undefined}\n aria-hidden=\"true\"\n data-size={this.#computedSize}\n data-importance={this.#computedImportance}\n onKeyDown={preventDefault}\n onKeyUp={preventDefault}\n onKeyPress={preventDefault}\n tabIndex={-1}\n >\n <qds-icon\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library={this.iconLibrary}\n name={this.iconName}\n />\n {isIndicator(this.badge) && (\n <qds-badge-indicator\n class=\"qds-indicator\"\n status={this.badgeIndicatorStatus}\n description={this.badgeDescription}\n size={this.#computedSize}\n strokeRing\n />\n )}\n {isCounter(this.badge) && (\n <qds-badge-counter\n class=\"qds-indicator\"\n description={this.badgeDescription}\n importance={this.#computedImportance}\n size={this.#computedSize}\n strokeRing\n value={this.badge}\n />\n )}\n </Tag>\n {this.text && (\n <qds-tooltip ref={this.#tooltipRef}>{this.text}</qds-tooltip>\n )}\n </div>\n )\n }\n\n #updateAriaLabel(): void {\n if (this.badge !== undefined && this.badgeDescription !== undefined) {\n this.internals.ariaLabel = `${this.text} ${\n isIndicator(this.badge) ? '' : this.badge\n } ${this.badgeDescription}`\n return\n }\n\n if (\n this.target !== undefined &&\n this.target === '_blank' &&\n this.href !== undefined\n ) {\n this.internals.ariaLabel = `${this.text} Opens in a new tab`\n return\n }\n\n this.internals.ariaLabel = this.text\n }\n\n readonly #ref = (button?: HTMLAnchorElement | HTMLButtonElement): void => {\n this.#button = button\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip) {\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.#button\n this.#tooltip = tooltip\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,6tHAA6tH;;ACAnvH;AACA;AACA;;;;;;;;;;;;;;;;;;AA0BA,MAAM,SAAS,GAAG,CAAC,KAAc,KAC/B,OAAO,KAAK,KAAK;AACf,MAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;AACxC,MAAE,OAAO,KAAK,KAAK,QAAQ;AAE/B,MAAM,WAAW,GAAG,CAAC,KAAc,KACjC,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI;AAEhC,MAAM,cAAc,GAAG,CAAC,KAAiC,KAAU;IACjE,KAAK,CAAC,cAAc,EAAE;AACxB,CAAC;MAgBY,UAAU,GAAA,MAAA;AANvB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;;AAOE;;;;;AAKG;AAEa,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AASzC;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAW,SAAS;AAEvD;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAmB,UAAU;AAEzD;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAA0B,UAAU;AAgBtE;;AAEG;AAEa,QAAA,IAAoB,CAAA,oBAAA,GAClC,SAAS;AA4BX;;;;AAIG;AACqB,QAAA,IAAG,CAAA,GAAA,GAAY,UAAU;AA+BjD,QAAA,yBAAA,CAAA,GAAA,CAAA,IAAA,EAAiB,CAAC,CAAA;QAElB,kBAA+C,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QAE/C,mBAAgC,CAAA,GAAA,CA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components/icon-button/icon-button.css?tag=qds-icon-button&encapsulation=shadow","src/components/icon-button/icon-button.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2025 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n:host {\n display: block;\n}\n\n:host(:focus-visible) {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n border-radius: var(--qds-focus-border-radius);\n}\n\n.qds-icon-button {\n display: flex;\n position: relative;\n\n /* Avoid automatic minimum size on flex element: https://www.w3.org/TR/css-flexbox-1/#min-size-auto */\n min-width: 0;\n align-items: center;\n justify-content: center;\n border-radius: var(--qds-control-border-radius);\n border: none;\n appearance: none;\n user-select: none;\n cursor: pointer;\n box-sizing: border-box;\n background-color: initial;\n color: var(--qds-theme-control-text-standard);\n padding-inline: 0;\n line-height: normal;\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n}\n\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n.qds-icon {\n flex-shrink: 0;\n}\n\n.qds-indicator {\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n transform: translate(50%, -50%);\n}\n\n[data-size='small'] {\n min-height: var(--qds-control-small-height);\n width: var(--qds-control-small-height);\n\n &.qds-icon {\n min-height: var(--qds-control-small-icon-size);\n width: var(--qds-control-small-icon-size);\n }\n}\n\n[data-size='standard'] {\n min-height: var(--qds-control-standard-height);\n width: var(--qds-control-standard-height);\n\n &.qds-icon {\n min-height: var(--qds-control-standard-icon-size);\n width: var(--qds-control-standard-icon-size);\n }\n}\n\n[data-size='large'] {\n min-height: var(--qds-control-large-height);\n width: var(--qds-control-large-height);\n\n &.qds-icon {\n min-height: var(--qds-control-large-icon-size);\n width: var(--qds-control-large-icon-size);\n }\n}\n\n[data-size='hero'] {\n min-height: var(--qds-control-hero-height);\n width: var(--qds-control-hero-height);\n border-radius: var(--qds-control-hero-border-radius);\n\n &.qds-icon {\n min-height: var(--qds-control-hero-icon-size);\n width: var(--qds-control-hero-icon-size);\n }\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-control-text-standard);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-control-text-standard);\n border: var(--qds-control-border-width) solid var(--qds-theme-control-border);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n}\n\n[data-importance='emphasized'] {\n background-color: var(--qds-theme-signature-color-default);\n color: var(--qds-theme-signature-color-contrast);\n\n &:hover {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n}\n\n[data-importance='destructive'] {\n background-color: var(--qds-theme-feedback-action-destructive-default);\n color: var(--qds-theme-feedback-action-destructive-contrast);\n\n &:hover {\n background-color: var(--qds-theme-feedback-action-destructive-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-feedback-action-destructive-pressed);\n }\n}\n\n[data-importance='subdued-destructive'] {\n color: var(--qds-theme-feedback-action-destructive-default);\n border: none;\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n}\n","// SPDX-FileCopyrightText: © 2025 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport { pickFocusEventAttributes } from '../../helpers'\nimport type { ButtonTarget } from '../button/button'\nimport type { Importance, Size } from '../shared'\n\nexport type IconButtonSize = Size | 'hero'\nexport type IconButtonImportance =\n | Importance\n | 'destructive'\n | 'subdued-destructive'\n\nconst isCounter = (value: unknown): value is number =>\n typeof value === 'string'\n ? !Number.isNaN(Number.parseFloat(value))\n : typeof value === 'number'\n\nconst isIndicator = (value: unknown): value is '' | true =>\n value === '' || value === true\n\nconst preventDefault = (event: KeyboardEvent | MouseEvent): void => {\n event.preventDefault()\n}\n/**\n * The `<qds-icon-button>` is an interactive element activated by a user\n * with a mouse, keyboard, finger, voice command, or other assistive technology.\n * Once activated, it performs a programmable action, such as submitting a\n * [form](https://developer.mozilla.org/docs/Learn/Forms)\n * or opening a dialog.\n *\n * @see https://quartz.se.com/build/components/icon-button\n */\n@Component({\n tag: 'qds-icon-button',\n formAssociated: true,\n styleUrl: 'icon-button.css',\n shadow: true,\n})\nexport class IconButton implements ComponentInterface {\n /**\n * Prevents the icon button from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop()\n public readonly disabled: boolean = false\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName!: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * The icon button's size.\n */\n @Prop() public readonly size?: Size | 'hero' = 'standard'\n\n /**\n * The icon button's importance.\n */\n @Prop() public readonly importance?: IconButtonImportance = 'standard'\n\n /**\n * Displays an indicator if `true` or the empty string. Otherwise, displays a\n * counter badge if a number or string representing a number is used.\n *\n * @webnative\n */\n @Prop() public readonly badge?: number | string | true\n\n /**\n * The indicator or counter badge's accessible text that will be used by\n * screen readers.\n */\n @Prop() public readonly badgeDescription?: string\n\n /**\n * The indicator's status.\n */\n @Prop()\n public readonly badgeIndicatorStatus?: HTMLQdsBadgeIndicatorElement['status'] =\n 'neutral'\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<ButtonTarget, string>\n\n /**\n * When set, the underlying button will be rendered as an `<a>` with this\n * `href` instead of a `<button>`.\n *\n * @webnative\n */\n @Prop() public readonly href?: string\n\n /**\n * When href is define and the button act as a link (`<a>`), the `rel` will be added to the element.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string = 'noopener'\n\n /**\n * Tells the browser to download the linked file as this filename. Only used\n * when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly download?: string\n\n /**\n * The icon button's accessible name.\n */\n @Prop() public readonly text?: string\n\n /**\n * Emitted when the icon button loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the icon button gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #savedTabIndex = 0\n\n #button?: HTMLAnchorElement | HTMLButtonElement\n\n #tooltip?: HTMLQdsTooltipElement\n\n get #computedSize(): IconButtonSize {\n switch (this.size) {\n case 'small':\n case 'large':\n case 'hero': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedImportance(): IconButtonImportance {\n switch (this.importance) {\n case 'emphasized':\n case 'subdued':\n case 'destructive':\n case 'subdued-destructive': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedDisabled(): boolean {\n return this.disabled\n }\n\n get #hasText(): boolean {\n return this.text !== undefined && this.text !== ''\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.#computedDisabled.toString()\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('href')\n protected hrefChanged(): void {\n this.internals.role = this.href === undefined ? 'button' : 'link'\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string | null): void {\n if (newValue !== null) {\n const parsedValue = Number.parseInt(newValue, 10)\n this.#savedTabIndex =\n Number.isNaN(parsedValue) || !Number.isFinite(parsedValue)\n ? 0\n : parsedValue\n }\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('text')\n protected textChanged(): void {\n this.#updateAriaLabel()\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) event.stopImmediatePropagation()\n }\n\n @Listen('blur')\n protected async onBlur(event: FocusEvent): Promise<void> {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n if (this.#tooltip) {\n await this.#tooltip.close()\n }\n }\n\n @Listen('focus')\n protected async onFocus(event: FocusEvent): Promise<void> {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n if (this.#tooltip) {\n await this.#tooltip.show()\n }\n }\n\n @Listen('keydown')\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter') this.host.click()\n }\n\n @Listen('keyup')\n protected onKeyup(event: KeyboardEvent): void {\n if (event.key === ' ') this.host.click()\n }\n\n public componentWillLoad(): void {\n this.hrefChanged()\n this.textChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n this.disabledChanged()\n }\n\n public render() {\n const Tag = this.href === undefined ? 'button' : 'a'\n return (\n <div>\n <Tag\n type={Tag === 'a' ? undefined : 'button'}\n class={{\n 'qds-icon-button': true,\n 'qds-disabled': this.#computedDisabled,\n }}\n href={Tag === 'a' ? this.href : undefined}\n rel={Tag === 'a' ? this.rel : undefined}\n ref={this.#ref}\n disabled={Tag === 'a' ? undefined : this.#computedDisabled}\n download={Tag === 'a' ? this.download : undefined}\n aria-hidden=\"true\"\n data-size={this.#computedSize}\n data-importance={this.#computedImportance}\n onKeyDown={preventDefault}\n onKeyUp={preventDefault}\n onKeyPress={preventDefault}\n tabIndex={-1}\n >\n <qds-icon\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library={this.iconLibrary}\n name={this.iconName}\n />\n {isIndicator(this.badge) && (\n <qds-badge-indicator\n class=\"qds-indicator\"\n status={this.badgeIndicatorStatus}\n description={this.badgeDescription}\n size={this.#computedSize}\n strokeRing\n />\n )}\n {isCounter(this.badge) && (\n <qds-badge-counter\n class=\"qds-indicator\"\n description={this.badgeDescription}\n importance={this.#computedImportance}\n size={this.#computedSize}\n strokeRing\n value={this.badge}\n />\n )}\n </Tag>\n {this.#hasText && (\n <qds-tooltip ref={this.#tooltipRef}>{this.text}</qds-tooltip>\n )}\n </div>\n )\n }\n\n #updateAriaLabel(): void {\n if (this.badge !== undefined && this.badgeDescription !== undefined) {\n this.internals.ariaLabel = `${this.text} ${\n isIndicator(this.badge) ? '' : this.badge\n } ${this.badgeDescription}`\n return\n }\n\n if (\n this.target !== undefined &&\n this.target === '_blank' &&\n this.href !== undefined\n ) {\n this.internals.ariaLabel = `${this.text} Opens in a new tab`\n return\n }\n this.internals.ariaLabel = this.text ?? ''\n }\n\n readonly #ref = (button?: HTMLAnchorElement | HTMLButtonElement): void => {\n this.#button = button\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip) {\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.#button\n this.#tooltip = tooltip\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,uiHAAuiH;;ACA7jH;AACA;AACA;;;;;;;;;;;;;;;;;;AA0BA,MAAM,SAAS,GAAG,CAAC,KAAc,KAC/B,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,KAAK,SAAS;AACd,QAAA,KAAK,aAAa;QAClB,KAAK,qBAAqB,EAAE;YAC1B,OAAO,IAAI,CAAC,UAAU;;QAExB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC,EAAA,gCAAA,GAAA,SAAA,gCAAA,GAAA;IAGC,OAAO,IAAI,CAAC,QAAQ;AACtB,CAAC,EAAA,uBAAA,GAAA,SAAA,uBAAA,GAAA;IAGC,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE;AACpD,CAAC,EAAA,2BAAA,GAAA,SAAA,2BAAA,GAAA;AA+HC,IAAA,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE;AACnE,QAAA,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,CAAA,EAAG,IAAI,CAAC,IAAI,CAAA,CAAA,EACrC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,KACtC,CAAI,CAAA,EAAA,IAAI,CAAC,gBAAgB,EAAE;QAC3B;;AAGF,IAAA,IACE,IAAI,CAAC,MAAM,KAAK,SAAS;QACzB,IAAI,CAAC,MAAM,KAAK,QAAQ;AACxB,QAAA,IAAI,CAAC,IAAI,KAAK,SAAS,EACvB;QACA,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,GAAG,IAAI,CAAC,IAAI,CAAA,mBAAA,CAAqB;QAC5D;;IAEF,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE;AAC5C,CAAC;;;;;"}
@@ -4,8 +4,8 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-D8Hb0u1k.js';
7
- import { b as inheritAriaAttributes } from './helpers-CDZIefsI.js';
8
- import { g as getIconLibrary } from './library-B2PJ_ZJB.js';
7
+ import { b as inheritAriaAttributes } from './helpers-t9FQ7Vl_.js';
8
+ import { g as getIconLibrary } from './library-C7n28y3j.js';
9
9
 
10
10
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
11
11
  //
@@ -4,9 +4,9 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-D8Hb0u1k.js';
7
- import { p as pickFocusEventAttributes, d as determineLinkIcon } from './helpers-CDZIefsI.js';
7
+ import { p as pickFocusEventAttributes, i as invariant, d as determineLinkIcon } from './helpers-t9FQ7Vl_.js';
8
8
 
9
- const inlineLinkCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-icon{height:1.25em;padding-left:var(--qds-text-icon-gap);vertical-align:middle}.qds-inline-link{border-radius:var(--qds-focus-border-radius);display:inline-block}.qds-inline-link:focus-visible{outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}[data-importance=subdued]{color:var(--qds-theme-link-subdued-default)}[data-importance=subdued]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=subdued]:hover{color:var(--qds-theme-link-subdued-hover)}[data-importance=subdued]:active{color:var(--qds-theme-link-subdued-pressed)}[data-importance=subdued]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=subdued]:visited:active{color:var(--qds-theme-link-visited-pressed)}[data-importance=standard]{color:var(--qds-theme-link-standard-default)}[data-importance=standard]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=standard]:hover{color:var(--qds-theme-link-standard-hover)}[data-importance=standard]:active{color:var(--qds-theme-link-standard-pressed)}[data-importance=standard]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=standard]:visited:active{color:var(--qds-theme-link-visited-pressed)}[data-importance=emphasized]{color:var(--qds-theme-link-emphasized-default)}[data-importance=emphasized]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=emphasized]:hover{color:var(--qds-theme-link-emphasized-hover)}[data-importance=emphasized]:active{color:var(--qds-theme-link-emphasized-pressed)}[data-importance=emphasized]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=emphasized]:visited:active{color:var(--qds-theme-link-visited-pressed)}";
9
+ const inlineLinkCss = ":host([hidden]){display:none!important}:host{border-radius:var(--qds-focus-border-radius);display:inline-block}:host(:focus-visible){outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-icon{height:var(--qds-control-hero-icon-size);width:var(--qds-control-hero-icon-size)}.qds-inline-link{align-items:center;display:flex;gap:var(--qds-text-icon-gap)}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}[data-importance=subdued]{color:var(--qds-theme-link-subdued-default)}[data-importance=subdued]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=subdued]:hover{color:var(--qds-theme-link-subdued-hover)}[data-importance=subdued]:active{color:var(--qds-theme-link-subdued-pressed)}[data-importance=subdued]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=subdued]:visited:active{color:var(--qds-theme-link-visited-pressed)}[data-importance=standard]{color:var(--qds-theme-link-standard-default)}[data-importance=standard]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=standard]:hover{color:var(--qds-theme-link-standard-hover)}[data-importance=standard]:active{color:var(--qds-theme-link-standard-pressed)}[data-importance=standard]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=standard]:visited:active{color:var(--qds-theme-link-visited-pressed)}[data-importance=emphasized]{color:var(--qds-theme-link-emphasized-default)}[data-importance=emphasized]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=emphasized]:hover{color:var(--qds-theme-link-emphasized-hover)}[data-importance=emphasized]:active{color:var(--qds-theme-link-emphasized-pressed)}[data-importance=emphasized]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=emphasized]:visited:active{color:var(--qds-theme-link-visited-pressed)}";
10
10
 
11
11
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
12
12
  //
@@ -18,7 +18,16 @@ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) ||
18
18
  throw new TypeError("Cannot read private member from an object whose class did not declare it");
19
19
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
20
20
  };
21
- var _InlineLink_instances, _InlineLink_computedImportance_get, _InlineLink_openInNewTab_get, _InlineLink_onBlur, _InlineLink_onFocus, _InlineLink_updateAriaLabelElements, _InlineLink_onSlotchange;
21
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
22
+ if (kind === "m")
23
+ throw new TypeError("Private method is not writable");
24
+ if (kind === "a" && !f)
25
+ throw new TypeError("Private accessor was defined without a setter");
26
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
27
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
28
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
29
+ };
30
+ var _InlineLink_instances, _InlineLink_savedTabIndex, _InlineLink_link, _InlineLink_computedImportance_get, _InlineLink_openInNewTab_get, _InlineLink_linkRef, _InlineLink_onBlur, _InlineLink_onFocus, _InlineLink_updateAriaLabelElements, _InlineLink_onSlotchange;
22
31
  const InlineLink = class {
23
32
  constructor(hostRef) {
24
33
  registerInstance(this, hostRef);
@@ -45,6 +54,11 @@ const InlineLink = class {
45
54
  * The inline link's importance.
46
55
  */
47
56
  this.importance = 'standard';
57
+ _InlineLink_savedTabIndex.set(this, 0);
58
+ _InlineLink_link.set(this, void 0);
59
+ _InlineLink_linkRef.set(this, (link) => {
60
+ __classPrivateFieldSet(this, _InlineLink_link, link, "f");
61
+ });
48
62
  _InlineLink_onBlur.set(this, (event) => {
49
63
  this.blurEmitter.emit(pickFocusEventAttributes(event));
50
64
  });
@@ -59,18 +73,36 @@ const InlineLink = class {
59
73
  });
60
74
  }
61
75
  onClick(event) {
76
+ invariant(__classPrivateFieldGet(this, _InlineLink_link, "f"));
62
77
  if (this.disabled)
63
78
  event.stopImmediatePropagation();
79
+ else
80
+ __classPrivateFieldGet(this, _InlineLink_link, "f").click();
81
+ }
82
+ onKeydown(event) {
83
+ invariant(__classPrivateFieldGet(this, _InlineLink_link, "f"));
84
+ if (this.disabled)
85
+ return;
86
+ if (event.key === 'Enter')
87
+ __classPrivateFieldGet(this, _InlineLink_link, "f").click();
64
88
  }
65
89
  disabledChanged() {
66
90
  this.internals.ariaDisabled = this.disabled.toString();
91
+ if (this.disabled)
92
+ this.host.removeAttribute('tabindex');
93
+ else
94
+ this.host.tabIndex = __classPrivateFieldGet(this, _InlineLink_savedTabIndex, "f");
67
95
  }
68
96
  tabindexChanged(newValue) {
69
97
  const parsedValue = Number.parseInt(newValue, 10);
70
98
  // FIXME: `undefined` instead of `0` causes `qdsFocus/qdsBlur` E2E tests
71
99
  // to fail, but it's not clear why this is the case since it works for
72
100
  // other components.
73
- this.tabIndex = Number.isNaN(parsedValue) ? 0 : parsedValue;
101
+ __classPrivateFieldSet(this, _InlineLink_savedTabIndex, Number.isNaN(parsedValue) ? 0 : parsedValue, "f");
102
+ if (this.disabled)
103
+ this.host.removeAttribute('tabindex');
104
+ else
105
+ this.host.tabIndex = __classPrivateFieldGet(this, _InlineLink_savedTabIndex, "f");
74
106
  }
75
107
  hrefTargetChanged() {
76
108
  this.linkIcon = determineLinkIcon(this.target, this.rel);
@@ -86,12 +118,11 @@ const InlineLink = class {
86
118
  __classPrivateFieldGet(this, _InlineLink_updateAriaLabelElements, "f").call(this);
87
119
  }
88
120
  render() {
89
- return (h("a", { key: 'e28f1f42042525033e2245067089b57f925650c1', "aria-hidden": "true", class: {
121
+ return (h("a", { key: '672a1dba75b5d541748a335f988f9419262d5160', "aria-hidden": "true", class: {
90
122
  'qds-inline-link': true,
91
123
  'qds-disabled': this.disabled,
92
- }, "data-importance": __classPrivateFieldGet(this, _InlineLink_instances, "a", _InlineLink_computedImportance_get), download: this.download, href: this.href?.toString(), hrefLang: this.hreflang, onBlur: __classPrivateFieldGet(this, _InlineLink_onBlur, "f"), onFocus: __classPrivateFieldGet(this, _InlineLink_onFocus, "f"), referrerPolicy: this.referrerPolicy, rel: this.rel, tabIndex: this.disabled ? -1 : this.tabIndex, target: this.target }, this.iconName !== undefined && this.iconName !== '' && (h("qds-icon", { key: '0e83380687b16e6082a431bc3dee5e6f13f5266d', class: "qds-icon", "aria-hidden": "true", library: this.iconLibrary, name: this.iconName })), h("slot", { key: '44d534fa1e6a50d5946588a1432d9b0f172a3bd1', onSlotchange: __classPrivateFieldGet(this, _InlineLink_onSlotchange, "f") }), this.linkIcon && (h("qds-icon", { key: '8478dbc51dad80bde22af3861d6f10cd83322920', "aria-hidden": "true", class: "qds-icon", library: "core", name: this.linkIcon }))));
124
+ }, "data-importance": __classPrivateFieldGet(this, _InlineLink_instances, "a", _InlineLink_computedImportance_get), download: this.download, href: this.href?.toString(), hrefLang: this.hreflang, onBlur: __classPrivateFieldGet(this, _InlineLink_onBlur, "f"), onFocus: __classPrivateFieldGet(this, _InlineLink_onFocus, "f"), referrerPolicy: this.referrerPolicy, rel: this.rel, tabIndex: -1, target: this.target, ref: __classPrivateFieldGet(this, _InlineLink_linkRef, "f") }, this.iconName !== undefined && this.iconName !== '' && (h("qds-icon", { key: '72fd0b235cf06199dec6dadb0456022e6235d00c', class: "qds-icon", "aria-hidden": "true", library: this.iconLibrary, name: this.iconName })), h("slot", { key: '13422afd67807a27d4fa46529501e95a3aa58090', onSlotchange: __classPrivateFieldGet(this, _InlineLink_onSlotchange, "f") }), this.linkIcon && (h("qds-icon", { key: '84ddddd854369f3f32088b39e867fc6491c36cd4', "aria-hidden": "true", class: "qds-icon", library: "core", name: this.linkIcon }))));
93
125
  }
94
- static get delegatesFocus() { return true; }
95
126
  get host() { return getElement(this); }
96
127
  static get watchers() { return {
97
128
  "disabled": ["disabledChanged"],
@@ -100,7 +131,7 @@ const InlineLink = class {
100
131
  "target": ["hrefTargetChanged"]
101
132
  }; }
102
133
  };
103
- _InlineLink_onBlur = new WeakMap(), _InlineLink_onFocus = new WeakMap(), _InlineLink_updateAriaLabelElements = new WeakMap(), _InlineLink_onSlotchange = new WeakMap(), _InlineLink_instances = new WeakSet(), _InlineLink_computedImportance_get = function _InlineLink_computedImportance_get() {
134
+ _InlineLink_savedTabIndex = new WeakMap(), _InlineLink_link = new WeakMap(), _InlineLink_linkRef = new WeakMap(), _InlineLink_onBlur = new WeakMap(), _InlineLink_onFocus = new WeakMap(), _InlineLink_updateAriaLabelElements = new WeakMap(), _InlineLink_onSlotchange = new WeakMap(), _InlineLink_instances = new WeakSet(), _InlineLink_computedImportance_get = function _InlineLink_computedImportance_get() {
104
135
  switch (this.importance) {
105
136
  case 'subdued':
106
137
  case 'emphasized': {
@@ -1 +1 @@
1
- {"version":3,"file":"qds-inline-link.entry.js","sources":["src/components/inline-link/inline-link.css?tag=qds-inline-link&encapsulation=shadow","src/components/inline-link/inline-link.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n}\n\n.qds-icon {\n height: 1.25em;\n padding-left: var(--qds-text-icon-gap);\n vertical-align: middle;\n}\n\n.qds-inline-link {\n border-radius: var(--qds-focus-border-radius);\n display: inline-block;\n\n &:focus-visible {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n }\n}\n\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-link-subdued-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-subdued-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-subdued-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-link-standard-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-standard-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-standard-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='emphasized'] {\n color: var(--qds-theme-link-emphasized-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-emphasized-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-emphasized-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport { determineLinkIcon, pickFocusEventAttributes } from '../../helpers'\nimport type { Importance, LinkIcon, Target } from '../shared'\n\n/**\n * `<qds-inline-link>` elements, with their `href` property, create a hyperlink\n * to web pages, files, email addresses, locations in the same page, or\n * anything else a URL can address.\n *\n * Content within each `<qds-inline-link>` *should* indicate the inline link's\n * destination. If the `href` property is present, pressing the enter key while\n * focused on the `<qds-inline-link>` element will activate it.\n *\n * @slot Content to display for the inline link.\n * @see https://quartz.se.com/build/components/inline-link\n */\n@Component({\n tag: 'qds-inline-link',\n shadow: { delegatesFocus: true },\n styleUrl: 'inline-link.css',\n})\nexport class InlineLink implements ComponentInterface {\n /**\n * Prevents the inline link from being interacted with: it cannot be pressed\n * or focused.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * The inline link's importance.\n */\n @Prop() public readonly importance?: Importance = 'standard'\n\n /**\n * Causes the browser to treat the linked URL as a download. Can be used with\n * or without a `filename` value:\n *\n * - Without a value, the browser will suggest a filename/extension,\n * generated from various sources:\n *\n * - The\n * [`Content-Disposition`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Disposition)\n * HTTP header\n * - The final segment in the URL\n * [path](https://developer.mozilla.org/docs/Web/API/URL/pathname)\n * - The\n * [media type](https://developer.mozilla.org/docs/Glossary/MIME_type)\n * (from the\n * [`Content-Type`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type)\n * header, the start of a\n * [`data:` URL](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URLs),\n * or\n * [`Blob.type`](https://developer.mozilla.org/docs/Web/API/Blob/type)\n * for a\n * [`blob:` URL](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL))\n * - `filename`: defining a value suggests it as the filename. `/` and `\\`\n * characters are converted to underscores (`_`). Filesystems may forbid\n * other characters in filenames, so browsers will adjust the suggested name\n * if necessary.\n *\n * @webnative\n */\n @Prop() public readonly download?: boolean | string\n\n /**\n * The URL that the inline link points to. Inline links are not restricted to\n * HTTP-based URLs — they can use any URL scheme supported by browsers:\n *\n * - Sections of a page with document fragments\n * - Specific text portions with\n * [text fragments](https://developer.mozilla.org/docs/Web/Text_fragments)\n * - Pieces of media files with media fragments\n * - Telephone numbers with `tel:` URLs\n * - Email addresses with `mailto:` URLs\n * - While web browsers may not support other URL schemes, websites can with\n * [`registerProtocolHandler()`](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)\n *\n * @webnative\n */\n @Prop() public readonly href?: URL | string\n\n /**\n * Hints at the human language of the linked URL. No built-in functionality.\n * Allowed values are the same as\n * [the global `lang` attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang).\n *\n * @webnative\n */\n @Prop() public readonly hreflang?: string\n\n /**\n * How much of the\n * [referrer](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * to send when following the inline link.\n *\n * - `no-referrer`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent.\n * - `no-referrer-when-downgrade`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent to\n * [origin](https://developer.mozilla.org/docs/Glossary/Origin)s\n * without [TLS](https://developer.mozilla.org/docs/Glossary/TLS)\n * ([HTTPS](https://developer.mozilla.org/docs/Glossary/HTTPS)).\n * - `origin`: The sent referrer will be limited to the origin of the\n * referring page: its\n * [scheme](https://developer.mozilla.org/docs/Learn/Common_questions/What_is_a_URL),\n * [host](https://developer.mozilla.org/docs/Glossary/Host), and\n * [port](https://developer.mozilla.org/docs/Glossary/Port).\n * - `origin-when-cross-origin`: The referrer sent to other origins will be\n * limited to the scheme, the host, and the port. Navigations on the same\n * origin will still include the path.\n * - `same-origin`: A referrer will be sent for\n * [same origin](https://developer.mozilla.org/docs/Glossary/Same-origin_policy),\n * but cross-origin requests will contain no referrer information.\n * - `strict-origin`: Only send the origin of the document as the referrer\n * when the protocol security level stays the same (HTTPS→HTTPS), but don't\n * send it to a less secure destination (HTTPS→HTTP).\n * - `strict-origin-when-cross-origin` (default): Send a full URL when\n * performing a same-origin request, only send the origin when the protocol\n * security level stays the same (HTTPS→HTTPS), and send no header to a less\n * secure destination (HTTPS→HTTP).\n * - `unsafe-url`: The referrer will include the origin and the path (but not the\n * [fragment](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash),\n * [password](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password),\n * or [username](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)).\n * **This value is unsafe** because it leaks origins and paths from\n * TLS-protected resources to insecure origins.\n *\n * @webnative\n */\n @Prop({ attribute: 'referrerpolicy' })\n public readonly referrerPolicy?: ReferrerPolicy\n\n /**\n * The relationship of the linked URL as space-separated\n * [link types](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel).\n *\n * The following list includes some of the most important existing keywords.\n * Every keyword within a space-separated value should be unique within that\n * value.\n *\n * - [`alternate`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-alternate):\n * Alternate representations of the current document.\n * - [`author`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-author):\n * Author of the current document or article.\n * - [`bookmark`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-bookmark):\n * Permalink for the nearest ancestor section.\n * - [`external`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-external):\n * The referenced document is not part of the same site as the current\n * document. An icon will be rendered next to the text if this value is\n * specified.\n * - [`help`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-help):\n * Link to context-sensitive help.\n * - [`license`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-license):\n * Indicates that the main content of the current document is covered by the\n * copyright license described by the referenced document.\n * - [`me`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me):\n * Indicates that the current document represents the person who owns the\n * linked content.\n * - [`next`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-next):\n * Indicates that the current document is a part of a series and that the\n * next document in the series is the referenced document.\n * - [`nofollow`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-nofollow):\n * Indicates that the current document's original author or publisher does\n * not endorse the referenced document.\n * - [`noopener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/noopener):\n * Creates a top-level browsing context that is not an auxiliary browsing\n * context if the hyperlink would create either of those, to begin with (i.e.,\n * has an appropriate `target` attribute value).\n * - [`noreferrer`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-noreferrer):\n * No `Referer` header will be included. Additionally, has the same effect as\n * `noopener`.\n * - [`opener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-opener):\n * Creates an auxiliary browsing context if the hyperlink would otherwise\n * create a top-level browsing context that is not an auxiliary browsing\n * context (i.e., has \"`_blank`\" as `target` attribute value).\n * - [`prev`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-prev):\n * Indicates that the current document is a part of a series and that the\n * previous document in the series is the referenced document.\n * - [`search`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-search):\n * Gives a link to a resource that can be used to search through the current\n * document and its related pages.\n * - [`tag`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-tag):\n * Gives a tag (identified by the given address) that applies to the current\n * document.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<Target, string>\n\n /**\n * Emitted when the inline link loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the inline link gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private linkIcon?: LinkIcon\n\n @State() private tabIndex?: number\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n get #computedImportance(): Importance {\n switch (this.importance) {\n case 'subdued':\n case 'emphasized': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #openInNewTab(): boolean {\n return this.target === '_blank'\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.disabled) event.stopImmediatePropagation()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.disabled.toString()\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n // FIXME: `undefined` instead of `0` causes `qdsFocus/qdsBlur` E2E tests\n // to fail, but it's not clear why this is the case since it works for\n // other components.\n this.tabIndex = Number.isNaN(parsedValue) ? 0 : parsedValue\n }\n\n @Watch('rel')\n @Watch('target')\n protected hrefTargetChanged(): void {\n this.linkIcon = determineLinkIcon(this.target, this.rel)\n this.#updateAriaLabelElements()\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'link'\n\n this.disabledChanged()\n this.hrefTargetChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public componentDidLoad(): void {\n this.#updateAriaLabelElements()\n }\n\n public render() {\n return (\n <a\n aria-hidden=\"true\"\n class={{\n 'qds-inline-link': true,\n 'qds-disabled': this.disabled,\n }}\n data-importance={this.#computedImportance}\n download={this.download}\n href={this.href?.toString()}\n hrefLang={this.hreflang}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n tabIndex={this.disabled ? -1 : this.tabIndex}\n target={this.target}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon\"\n aria-hidden=\"true\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n <slot onSlotchange={this.#onSlotchange} />\n {this.linkIcon && (\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n library=\"core\"\n name={this.linkIcon}\n />\n )}\n </a>\n )\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #updateAriaLabelElements = (): void => {\n this.internals.ariaLabel = `${this.host.textContent} ${\n this.#openInNewTab ? 'Opens in a new tab' : ''\n }`.trim()\n }\n\n readonly #onSlotchange = (): void => {\n this.#updateAriaLabelElements()\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,g2DAAg2D;;ACAt3D;AACA;AACA;;;;;;;;;MAqCa,UAAU,GAAA,MAAA;AALvB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;;AAME;;;AAGG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AASjD;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAW,SAAS;AAEvD;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAgB,UAAU;QAoSnD,kBAAU,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,KAAiB,KAAU;YAC7C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AACxD,SAAC,CAAA;QAEQ,mBAAW,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,KAAiB,KAAU;YAC9C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AACzD,SAAC,CAAA;AAEQ,QAAA,mCAAA,CAAA,GAAA,CAAA,IAAA,EAA2B,MAAW;AAC7C,YAAA,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,CAAG,EAAA,IAAI,CAAC,IAAI,CAAC,WAAW,CAAA,CAAA,EACjD,sBAAA,CAAA,IAAI,EAAA,qBAAA,EAAA,GAAA,EAAA,4BAAA,CAAc,GAAG,oBAAoB,GAAG,EAC9C,CAAA,CAAE,CAAC,IAAI,EAAE;AACX,SAAC,CAAA;AAEQ,QAAA,wBAAA,CAAA,GAAA,CAAA,IAAA,EAAgB,MAAW;AAClC,YAAA,sBAAA,CAAA,I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EAAE;YACjB,OAAO,IAAI,CAAC,UAAU;;QAExB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC,EAAA,4BAAA,GAAA,SAAA,4BAAA,GAAA;AAGC,IAAA,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;AACjC,CAAC;;;;;"}
1
+ {"version":3,"file":"qds-inline-link.entry.js","sources":["src/components/inline-link/inline-link.css?tag=qds-inline-link&encapsulation=shadow","src/components/inline-link/inline-link.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n border-radius: var(--qds-focus-border-radius);\n}\n\n:host(:focus-visible) {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n}\n\n.qds-icon {\n height: var(--qds-control-hero-icon-size);\n width: var(--qds-control-hero-icon-size);\n}\n\n.qds-inline-link {\n display: flex;\n gap: var(--qds-text-icon-gap);\n align-items: center;\n}\n\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-link-subdued-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-subdued-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-subdued-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-link-standard-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-standard-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-standard-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='emphasized'] {\n color: var(--qds-theme-link-emphasized-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-emphasized-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-emphasized-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport {\n determineLinkIcon,\n invariant,\n pickFocusEventAttributes,\n} from '../../helpers'\nimport type { Importance, LinkIcon, Target } from '../shared'\n\n/**\n * `<qds-inline-link>` elements, with their `href` property, create a hyperlink\n * to web pages, files, email addresses, locations in the same page, or\n * anything else a URL can address.\n *\n * Content within each `<qds-inline-link>` *should* indicate the inline link's\n * destination. If the `href` property is present, pressing the enter key while\n * focused on the `<qds-inline-link>` element will activate it.\n *\n * @slot Content to display for the inline link.\n * @see https://quartz.se.com/build/components/inline-link\n */\n@Component({\n tag: 'qds-inline-link',\n shadow: true,\n styleUrl: 'inline-link.css',\n})\nexport class InlineLink implements ComponentInterface {\n /**\n * Prevents the inline link from being interacted with: it cannot be pressed\n * or focused.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * The inline link's importance.\n */\n @Prop() public readonly importance?: Importance = 'standard'\n\n /**\n * Causes the browser to treat the linked URL as a download. Can be used with\n * or without a `filename` value:\n *\n * - Without a value, the browser will suggest a filename/extension,\n * generated from various sources:\n *\n * - The\n * [`Content-Disposition`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Disposition)\n * HTTP header\n * - The final segment in the URL\n * [path](https://developer.mozilla.org/docs/Web/API/URL/pathname)\n * - The\n * [media type](https://developer.mozilla.org/docs/Glossary/MIME_type)\n * (from the\n * [`Content-Type`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type)\n * header, the start of a\n * [`data:` URL](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URLs),\n * or\n * [`Blob.type`](https://developer.mozilla.org/docs/Web/API/Blob/type)\n * for a\n * [`blob:` URL](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL))\n * - `filename`: defining a value suggests it as the filename. `/` and `\\`\n * characters are converted to underscores (`_`). Filesystems may forbid\n * other characters in filenames, so browsers will adjust the suggested name\n * if necessary.\n *\n * @webnative\n */\n @Prop() public readonly download?: boolean | string\n\n /**\n * The URL that the inline link points to. Inline links are not restricted to\n * HTTP-based URLs — they can use any URL scheme supported by browsers:\n *\n * - Sections of a page with document fragments\n * - Specific text portions with\n * [text fragments](https://developer.mozilla.org/docs/Web/Text_fragments)\n * - Pieces of media files with media fragments\n * - Telephone numbers with `tel:` URLs\n * - Email addresses with `mailto:` URLs\n * - While web browsers may not support other URL schemes, websites can with\n * [`registerProtocolHandler()`](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)\n *\n * @webnative\n */\n @Prop() public readonly href?: URL | string\n\n /**\n * Hints at the human language of the linked URL. No built-in functionality.\n * Allowed values are the same as\n * [the global `lang` attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang).\n *\n * @webnative\n */\n @Prop() public readonly hreflang?: string\n\n /**\n * How much of the\n * [referrer](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * to send when following the inline link.\n *\n * - `no-referrer`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent.\n * - `no-referrer-when-downgrade`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent to\n * [origin](https://developer.mozilla.org/docs/Glossary/Origin)s\n * without [TLS](https://developer.mozilla.org/docs/Glossary/TLS)\n * ([HTTPS](https://developer.mozilla.org/docs/Glossary/HTTPS)).\n * - `origin`: The sent referrer will be limited to the origin of the\n * referring page: its\n * [scheme](https://developer.mozilla.org/docs/Learn/Common_questions/What_is_a_URL),\n * [host](https://developer.mozilla.org/docs/Glossary/Host), and\n * [port](https://developer.mozilla.org/docs/Glossary/Port).\n * - `origin-when-cross-origin`: The referrer sent to other origins will be\n * limited to the scheme, the host, and the port. Navigations on the same\n * origin will still include the path.\n * - `same-origin`: A referrer will be sent for\n * [same origin](https://developer.mozilla.org/docs/Glossary/Same-origin_policy),\n * but cross-origin requests will contain no referrer information.\n * - `strict-origin`: Only send the origin of the document as the referrer\n * when the protocol security level stays the same (HTTPS→HTTPS), but don't\n * send it to a less secure destination (HTTPS→HTTP).\n * - `strict-origin-when-cross-origin` (default): Send a full URL when\n * performing a same-origin request, only send the origin when the protocol\n * security level stays the same (HTTPS→HTTPS), and send no header to a less\n * secure destination (HTTPS→HTTP).\n * - `unsafe-url`: The referrer will include the origin and the path (but not the\n * [fragment](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash),\n * [password](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password),\n * or [username](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)).\n * **This value is unsafe** because it leaks origins and paths from\n * TLS-protected resources to insecure origins.\n *\n * @webnative\n */\n @Prop({ attribute: 'referrerpolicy' })\n public readonly referrerPolicy?: ReferrerPolicy\n\n /**\n * The relationship of the linked URL as space-separated\n * [link types](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel).\n *\n * The following list includes some of the most important existing keywords.\n * Every keyword within a space-separated value should be unique within that\n * value.\n *\n * - [`alternate`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-alternate):\n * Alternate representations of the current document.\n * - [`author`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-author):\n * Author of the current document or article.\n * - [`bookmark`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-bookmark):\n * Permalink for the nearest ancestor section.\n * - [`external`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-external):\n * The referenced document is not part of the same site as the current\n * document. An icon will be rendered next to the text if this value is\n * specified.\n * - [`help`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-help):\n * Link to context-sensitive help.\n * - [`license`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-license):\n * Indicates that the main content of the current document is covered by the\n * copyright license described by the referenced document.\n * - [`me`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me):\n * Indicates that the current document represents the person who owns the\n * linked content.\n * - [`next`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-next):\n * Indicates that the current document is a part of a series and that the\n * next document in the series is the referenced document.\n * - [`nofollow`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-nofollow):\n * Indicates that the current document's original author or publisher does\n * not endorse the referenced document.\n * - [`noopener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/noopener):\n * Creates a top-level browsing context that is not an auxiliary browsing\n * context if the hyperlink would create either of those, to begin with (i.e.,\n * has an appropriate `target` attribute value).\n * - [`noreferrer`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-noreferrer):\n * No `Referer` header will be included. Additionally, has the same effect as\n * `noopener`.\n * - [`opener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-opener):\n * Creates an auxiliary browsing context if the hyperlink would otherwise\n * create a top-level browsing context that is not an auxiliary browsing\n * context (i.e., has \"`_blank`\" as `target` attribute value).\n * - [`prev`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-prev):\n * Indicates that the current document is a part of a series and that the\n * previous document in the series is the referenced document.\n * - [`search`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-search):\n * Gives a link to a resource that can be used to search through the current\n * document and its related pages.\n * - [`tag`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-tag):\n * Gives a tag (identified by the given address) that applies to the current\n * document.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<Target, string>\n\n /**\n * Emitted when the inline link loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the inline link gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private linkIcon?: LinkIcon\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #savedTabIndex = 0\n\n #link?: HTMLAnchorElement\n\n get #computedImportance(): Importance {\n switch (this.importance) {\n case 'subdued':\n case 'emphasized': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #openInNewTab(): boolean {\n return this.target === '_blank'\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n invariant(this.#link)\n if (this.disabled) event.stopImmediatePropagation()\n else this.#link.click()\n }\n\n @Listen('keydown')\n protected onKeydown(event: KeyboardEvent): void {\n invariant(this.#link)\n if (this.disabled) return\n if (event.key === 'Enter') this.#link.click()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.disabled.toString()\n if (this.disabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n // FIXME: `undefined` instead of `0` causes `qdsFocus/qdsBlur` E2E tests\n // to fail, but it's not clear why this is the case since it works for\n // other components.\n this.#savedTabIndex = Number.isNaN(parsedValue) ? 0 : parsedValue\n if (this.disabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('rel')\n @Watch('target')\n protected hrefTargetChanged(): void {\n this.linkIcon = determineLinkIcon(this.target, this.rel)\n this.#updateAriaLabelElements()\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'link'\n this.disabledChanged()\n this.hrefTargetChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public componentDidLoad(): void {\n this.#updateAriaLabelElements()\n }\n\n public render() {\n return (\n <a\n aria-hidden=\"true\"\n class={{\n 'qds-inline-link': true,\n 'qds-disabled': this.disabled,\n }}\n data-importance={this.#computedImportance}\n download={this.download}\n href={this.href?.toString()}\n hrefLang={this.hreflang}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n tabIndex={-1}\n target={this.target}\n ref={this.#linkRef}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon\"\n aria-hidden=\"true\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n <slot onSlotchange={this.#onSlotchange} />\n {this.linkIcon && (\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n library=\"core\"\n name={this.linkIcon}\n />\n )}\n </a>\n )\n }\n\n readonly #linkRef = (link?: HTMLAnchorElement): void => {\n this.#link = link\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #updateAriaLabelElements = (): void => {\n this.internals.ariaLabel = `${this.host.textContent} ${\n this.#openInNewTab ? 'Opens in a new tab' : ''\n }`.trim()\n }\n\n readonly #onSlotchange = (): void => {\n this.#updateAriaLabelElements()\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,s4DAAs4D;;ACA55D;AACA;AACA;;;;;;;;;;;;;;;;;;MAyCa,UAAU,GAAA,MAAA;AALvB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;;AAME;;;AAGG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AASjD;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAW,SAAS;AAEvD;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAgB,UAAU;AAoM5D,QAAA,yBAAA,CAAA,GAAA,CAAA,IAAA,EAAiB,CAAC,CAAA;QAElB,gBAAyB,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QA6GhB,mBAAW,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,IAAwB,KAAU;YACrD,sBAAA,CAAA,IAAI,EAAA,gBAAA,EAAS,IAAI,EAAA,GAAA,CAAA;AACnB,SAAC,CAAA;QAEQ,kBAAU,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,KAAiB,KAAU;YAC7C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AACxD,SAAC,CAAA;QAEQ,mBAAW,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,KAAiB,KAAU;YAC9C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AACzD,SAAC,CAAA;AAEQ,QAAA,mCAAA,CAAA,GAAA,CAAA,IAAA,EAA2B,MAAW;AAC7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C,IAAA,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;AACjC,CAAC;;;;;"}
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-D8Hb0u1k.js';
7
- import { i as invariant, p as pickFocusEventAttributes, c as pickInputEventAttributes, b as inheritAriaAttributes } from './helpers-CDZIefsI.js';
7
+ import { i as invariant, p as pickFocusEventAttributes, c as pickInputEventAttributes, b as inheritAriaAttributes } from './helpers-t9FQ7Vl_.js';
8
8
  import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './controls-DQLjJn7-.js';
9
9
 
10
10
  const inputCss = ":host([hidden]){display:none!important}:host{display:inline-block}@-moz-document url-prefix(){[type=date]~.qds-icon-container,[type=datetime-local]~.qds-icon-container,[type=month]~.qds-icon-container,[type=time]~.qds-icon-container,[type=week]~.qds-icon-container{display:none}}input[type=password]::-ms-reveal{display:none}.qds-container,.qds-input{max-width:inherit;width:inherit}.qds-container{align-content:flex-start;align-items:center;box-sizing:border-box;display:grid;grid-template-areas:\"c\"}.qds-icon-container,.qds-input{grid-area:c}.qds-icon-container{align-items:center;display:flex;justify-content:center;justify-self:end;padding-inline-end:var(--qds-control-input-padding-horizontal)}.qds-icon-container.no-padding{padding-inline-end:0}.qds-focus-ring{border-radius:max(1px,var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-top-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n )) max(1px,var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n ));grid-area:c;height:calc(100% + var(--qds-control-border-width) - var(--qds-control-border-width-block-end, var(--qds-control-border-width)));isolation:isolate;outline:var(--qds-control-input-focus-border-width) solid var(--qds-theme-control-input-focus-border);pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-control-border-width) - var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n ))}[data-size=small]{font:var(--qds-control-small-text);height:var(--qds-control-small-height)}.qds-password-padding[data-size=small],[data-size=small][type=date],[data-size=small][type=datetime-local],[data-size=small][type=month],[data-size=small][type=time],[data-size=small][type=week]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-input-padding-horizontal) + var(--qds-control-small-height))}[data-size=small][type=file]::file-selector-button{font:var(--qds-control-small-text);height:var(--qds-control-small-height);margin-inline-end:var(--qds-control-small-gap-siblings-related);padding-inline:var(--qds-control-button-small-padding-horizontal)}[data-size=small][type=search]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-small-height) + var(--qds-control-mini-button-standard-size) + var(--qds-control-input-padding-horizontal) + var(--qds-control-small-gap-internal))}[data-size=small][type=search]~.qds-icon-container{gap:var(--qds-control-small-gap-internal)}[data-size=standard]{font:var(--qds-control-standard-text);height:var(--qds-control-standard-height)}.qds-password-padding[data-size=standard],[data-size=standard][type=date],[data-size=standard][type=datetime-local],[data-size=standard][type=month],[data-size=standard][type=time],[data-size=standard][type=week]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-input-padding-horizontal) + var(--qds-control-standard-height))}[data-size=standard][type=file]::file-selector-button{font:var(--qds-control-standard-text);height:var(--qds-control-standard-height);margin-inline-end:var(--qds-control-standard-gap-siblings-related);padding-inline:var(--qds-control-button-standard-padding-horizontal)}[data-size=standard][type=search]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-small-height) + var(--qds-control-mini-button-standard-size) + var(--qds-control-input-padding-horizontal) + var(--qds-control-standard-gap-internal))}[data-size=standard][type=search]~.qds-icon-container{gap:var(--qds-control-standard-gap-internal)}[data-size=large]{font:var(--qds-control-large-text);height:var(--qds-control-large-height)}.qds-password-padding[data-size=large],[data-size=large][type=date],[data-size=large][type=datetime-local],[data-size=large][type=month],[data-size=large][type=time],[data-size=large][type=week]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-input-padding-horizontal) + var(--qds-control-large-height))}[data-size=large][type=file]::file-selector-button{font:var(--qds-control-large-text);height:var(--qds-control-large-height);margin-inline-end:var(--qds-control-large-gap-siblings-related);padding-inline:var(--qds-control-button-large-padding-horizontal)}[data-size=large][type=search]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-small-height) + var(--qds-control-mini-button-standard-size) + var(--qds-control-input-padding-horizontal) + var(--qds-control-large-gap-internal))}[data-size=large][type=search]~.qds-icon-container{gap:var(--qds-control-large-gap-internal)}.qds-input{-webkit-appearance:textfield;appearance:textfield;background-color:var(--qds-theme-control-input-background);border-color:var(--qds-theme-control-border);border-radius:var(\n --qds-control-border-radius-top-left,var(--qds-control-border-radius)\n ) var(--qds-control-border-radius-top-right,var(--qds-control-border-radius)) var(\n --qds-control-border-radius-bottom-right,var(--qds-control-border-radius)\n ) var(\n --qds-control-border-radius-bottom-left,var(--qds-control-border-radius)\n );border-style:solid;border-width:var(--qds-control-border-width) var(--qds-control-border-width-inline-end,var(--qds-control-border-width)) var(--qds-control-border-width-block-end,var(--qds-control-border-width)) var(--qds-control-border-width);box-sizing:border-box;color:var(--qds-theme-control-text-standard);grid-area:c;padding-block:0;padding-inline:var(--qds-control-input-padding-horizontal)}.qds-input.qds-hide~.qds-icon-container{display:none}.qds-input:disabled,.qds-input:disabled~.qds-icon-container{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-input:focus-visible{outline:none}.qds-input:focus-visible~.qds-focus-ring{visibility:visible}.qds-input:placeholder-shown{color:var(--qds-theme-control-text-placeholder)}.qds-input:not(:focus):user-invalid{border-color:var(--qds-theme-feedback-result-failure)}.qds-input::-webkit-search-cancel-button,.qds-input:is([type=date],[type=datetime-local],[type=month],[type=time],[type=week])::-webkit-calendar-picker-indicator{display:none}.qds-input[type=file]{padding-block:var(--qds-control-input-padding-horizontal)}.qds-input[type=file]::file-selector-button{background-color:initial;border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius);color:var(--qds-theme-control-text-standard)}.qds-input[type=file]::file-selector-button:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-input[type=file]::file-selector-button:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-input[type=color],.qds-input[type=number]{padding-inline:var(--qds-control-input-padding-horizontal)}.qds-input[type=color]{-webkit-appearance:none;appearance:none;cursor:pointer;min-width:50px;padding-block:var(--qds-control-input-padding-horizontal)}.qds-input[type=color]::-webkit-color-swatch-wrapper{padding:0}.qds-input[type=color]::-webkit-color-swatch{border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius)}.qds-input[type=color]::-moz-color-swatch{border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius)}.qds-input[type=color]:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-input[type=color]:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-input.qds-search-padding[data-size=large],.qds-input.qds-search-padding[data-size=small],.qds-input.qds-search-padding[data-size=standard]{padding-inline:var(--qds-control-input-padding-horizontal) calc(var(--qds-control-small-height) + var(--qds-control-input-padding-horizontal))}.qds-input[data-size=large][type=file],.qds-input[data-size=small][type=file],.qds-input[data-size=standard][type=file]{height:auto}.qds-input.qds-padding[data-size=large],.qds-input.qds-padding[data-size=small],.qds-input.qds-padding[data-size=standard]{padding-inline:var(--qds-control-input-padding-horizontal)}.qds-input[data-size=large],.qds-input[data-size=small],.qds-input[data-size=standard]{@-moz-document url-prefix(){&[type=date],&[type=datetime-local],&[type=month],&[type=time],&[type=week]{padding-inline-end:var(--qds-control-input-padding-horizontal)}}}.qds-input{@-moz-document url-prefix(){&[type=number]{appearance:none}}}";
@@ -370,7 +370,7 @@ const Input = class {
370
370
  const shouldShowSearchButton = isSearchType && this.noIcon === false;
371
371
  const shouldHideIcon = !isSearchType && this.noIcon === true;
372
372
  const shouldRemoveSearchPadding = isSearchType && this.noIcon === true;
373
- return (h("div", { key: 'cb4bafd4d94cee6fa42b66d08063c0f04e11b662', class: "qds-container" }, h("input", { key: '9504f60c9789e57fd636a0ad662e92ff27c60d21', accept: this.accept, autoCapitalize: this.host.autocapitalize, autoComplete: this.autoComplete,
373
+ return (h("div", { key: '0c081010a5ec6cf8c04d7d1dd649075b16bddd7c', class: "qds-container" }, h("input", { key: '2716262c8cee8b5de80cce4801d94de3e1e64931', accept: this.accept, autoCapitalize: this.host.autocapitalize, autoComplete: this.autoComplete,
374
374
  // eslint-disable-next-line jsx-a11y/no-autofocus
375
375
  autoFocus: this.host.autofocus, capture: this.capture, class: {
376
376
  'qds-search-padding': shouldRemoveSearchPadding,
@@ -379,10 +379,10 @@ const Input = class {
379
379
  'qds-padding': shouldHideIcon,
380
380
  'qds-password-padding': this.type === 'password' ||
381
381
  (this.isPasswordVisible && this.type === 'text'),
382
- }, "data-size": __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedSize_get), disabled: this.disabled, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, max: this.max, maxLength: this.maxLength, min: this.min, minLength: this.minLength, multiple: this.multiple, onBlur: __classPrivateFieldGet(this, _Input_onBlur, "f"), onChange: __classPrivateFieldGet(this, _Input_onChange, "f"), onFocus: __classPrivateFieldGet(this, _Input_onFocus, "f"), onInput: __classPrivateFieldGet(this, _Input_onInput, "f"), placeholder: this.placeholder, ref: __classPrivateFieldGet(this, _Input_ref, "f"), spellcheck: this.host.spellcheck, step: this.step, tabIndex: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get) ? undefined : this.tabIndex, type: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedType_get), ...__classPrivateFieldGet(this, _Input_inheritedAttributes, "f") }), h("div", { key: '20c669985aa226c0c43d5fd34441fe529175185b', class: "qds-focus-ring" }), __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get) && (h("div", { key: '09ad45966afc1ac622987f9f1b1a8d0c66f8bf90', class: {
382
+ }, "data-size": __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedSize_get), disabled: this.disabled, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, max: this.max, maxLength: this.maxLength, min: this.min, minLength: this.minLength, multiple: this.multiple, onBlur: __classPrivateFieldGet(this, _Input_onBlur, "f"), onChange: __classPrivateFieldGet(this, _Input_onChange, "f"), onFocus: __classPrivateFieldGet(this, _Input_onFocus, "f"), onInput: __classPrivateFieldGet(this, _Input_onInput, "f"), placeholder: this.placeholder, ref: __classPrivateFieldGet(this, _Input_ref, "f"), spellcheck: this.host.spellcheck, step: this.step, tabIndex: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedDisabled_get) ? undefined : this.tabIndex, type: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedType_get), ...__classPrivateFieldGet(this, _Input_inheritedAttributes, "f") }), h("div", { key: '1ced5059ea467ce205d76c9bc85b26fde42329ab', class: "qds-focus-ring" }), __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get) && (h("div", { key: '7761afacfb1101f0e15a1a5eae2e0119c6820a5c', class: {
383
383
  'qds-icon-container': true,
384
384
  'no-padding': shouldRemoveSearchPadding,
385
- } }, shouldShowClearButton && (h("qds-mini-button", { key: '04031525906e3064aca5c4053aae5e68f83dec8f', class: "qds-hide", text: "clear input", library: "core", name: "clear", disabled: this.disabled, onClick: __classPrivateFieldGet(this, _Input_onClear, "f"), tabindex: -1, onQdsFocus: stopImmediatePropagation })), __classPrivateFieldGet(this, _Input_instances, "a", _Input_hasInteractiveIcon_get) && (h("qds-mini-button", { key: '6f9338cfe7d7a1b19cdb4ca8651909ad7a546fd5', disabled: this.disabled, onClick: __classPrivateFieldGet(this, _Input_instances, "a", _Input_iconClickHandler_get), text: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedInteractiveIconAriaLabel_get), library: "core", name: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get), tabindex: -1, onQdsFocus: stopImmediatePropagation })), shouldShowSearchButton ? (h("qds-mini-button", { text: "search", library: "core", name: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get), disabled: this.disabled, onClick: __classPrivateFieldGet(this, _Input_onSearch, "f"), tabindex: -1, onQdsFocus: stopImmediatePropagation })) : (h("div", null))))));
385
+ } }, shouldShowClearButton && (h("qds-mini-button", { key: 'f208406b016ce83602cf6532d742699568f52e7c', class: "qds-hide", text: "clear input", library: "core", name: "clear", disabled: this.disabled, onClick: __classPrivateFieldGet(this, _Input_onClear, "f"), tabindex: -1, onQdsFocus: stopImmediatePropagation })), __classPrivateFieldGet(this, _Input_instances, "a", _Input_hasInteractiveIcon_get) && (h("qds-mini-button", { key: 'a33c82673216d84620eee4bc9e08f2e4ca080eaf', disabled: this.disabled, onClick: __classPrivateFieldGet(this, _Input_instances, "a", _Input_iconClickHandler_get), text: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedInteractiveIconAriaLabel_get), library: "core", name: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get), tabindex: -1, onQdsFocus: stopImmediatePropagation })), shouldShowSearchButton ? (h("qds-mini-button", { text: "search", library: "core", name: __classPrivateFieldGet(this, _Input_instances, "a", _Input_computedIconName_get), disabled: this.disabled, onClick: __classPrivateFieldGet(this, _Input_onSearch, "f"), tabindex: -1, onQdsFocus: stopImmediatePropagation })) : (h("div", null))))));
386
386
  }
387
387
  static get delegatesFocus() { return true; }
388
388
  static get formAssociated() { return true; }