@quartzds/core 1.0.0-beta.121 → 1.0.0-beta.123

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 (240) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/components/index.js +1 -1
  3. package/components/{p-CkyaV9az.js → p-B7s906mS.js} +9 -9
  4. package/components/p-B7s906mS.js.map +1 -0
  5. package/components/p-BZlKeCFb.js +200 -0
  6. package/components/p-BZlKeCFb.js.map +1 -0
  7. package/components/{p-CURs27Ur.js → p-BalM52S_.js} +3 -3
  8. package/components/{p-CURs27Ur.js.map → p-BalM52S_.js.map} +1 -1
  9. package/components/{p-C1c4JVlg.js → p-BoSYRCNp.js} +47 -28
  10. package/components/p-BoSYRCNp.js.map +1 -0
  11. package/components/p-BvRd7jA2.js +102 -0
  12. package/components/p-BvRd7jA2.js.map +1 -0
  13. package/components/{p-B2ZVUvk9.js → p-C93kOEAe.js} +7 -9
  14. package/components/p-C93kOEAe.js.map +1 -0
  15. package/components/{p-DtxwXYGb.js → p-C9R8N06B.js} +5 -31
  16. package/components/p-C9R8N06B.js.map +1 -0
  17. package/components/{p-DR79BVX5.js → p-CKp062X8.js} +6 -6
  18. package/components/p-CKp062X8.js.map +1 -0
  19. package/components/{p-CjVnGhSO.js → p-CVuTVnQo.js} +3 -3
  20. package/components/{p-CjVnGhSO.js.map → p-CVuTVnQo.js.map} +1 -1
  21. package/components/{p-D82sb4oJ.js → p-CbY4T0d2.js} +5 -5
  22. package/components/p-CbY4T0d2.js.map +1 -0
  23. package/components/{p-DNHI4C-W.js → p-CowZ-pDD.js} +58 -22
  24. package/components/p-CowZ-pDD.js.map +1 -0
  25. package/components/{p-CDRwHAIT.js → p-XP2CY_fo.js} +3 -3
  26. package/components/p-XP2CY_fo.js.map +1 -0
  27. package/components/{p-5dwtV5iH.js → p-yb0Kv4Y6.js} +24 -6
  28. package/components/p-yb0Kv4Y6.js.map +1 -0
  29. package/components/qds-action-item.js +4 -4
  30. package/components/qds-action-item.js.map +1 -1
  31. package/components/qds-avatar-media.js +1 -1
  32. package/components/qds-badge-counter.js +1 -1
  33. package/components/qds-breadcrumb-item.js +5 -5
  34. package/components/qds-breadcrumb-item.js.map +1 -1
  35. package/components/qds-button.js +5 -5
  36. package/components/qds-button.js.map +1 -1
  37. package/components/qds-checkbox.js +1 -1
  38. package/components/qds-chip.js +10 -10
  39. package/components/qds-chip.js.map +1 -1
  40. package/components/qds-dialog.js +6 -6
  41. package/components/qds-divider.js +1 -1
  42. package/components/qds-dropdown.js +1 -1
  43. package/components/qds-form-message.js +4 -4
  44. package/components/qds-form-message.js.map +1 -1
  45. package/components/qds-icon-button.js +1 -1
  46. package/components/qds-icon-tab.js +8 -8
  47. package/components/qds-icon.js +1 -1
  48. package/components/qds-inline-link.js +4 -4
  49. package/components/qds-inline-link.js.map +1 -1
  50. package/components/qds-input.js +17 -13
  51. package/components/qds-input.js.map +1 -1
  52. package/components/qds-label.js +153 -1
  53. package/components/qds-label.js.map +1 -1
  54. package/components/qds-list-item.js +25 -29
  55. package/components/qds-list-item.js.map +1 -1
  56. package/components/qds-loader.js +3 -3
  57. package/components/qds-loader.js.map +1 -1
  58. package/components/qds-menu-item.js +6 -6
  59. package/components/qds-mini-button.js +1 -1
  60. package/components/qds-progress-bar.js +2 -2
  61. package/components/qds-radio.js +1 -1
  62. package/components/qds-select.js +6 -6
  63. package/components/qds-select.js.map +1 -1
  64. package/components/qds-standalone-link.js +5 -5
  65. package/components/qds-standalone-link.js.map +1 -1
  66. package/components/qds-switch.js +6 -6
  67. package/components/qds-switch.js.map +1 -1
  68. package/components/qds-tab.js +20 -15
  69. package/components/qds-tab.js.map +1 -1
  70. package/components/qds-tabbar.js +95 -34
  71. package/components/qds-tabbar.js.map +1 -1
  72. package/components/qds-table-cell.js +32 -4
  73. package/components/qds-table-cell.js.map +1 -1
  74. package/components/qds-table-head-cell.js +32 -4
  75. package/components/qds-table-head-cell.js.map +1 -1
  76. package/components/qds-table-row.js +2 -2
  77. package/components/qds-table-row.js.map +1 -1
  78. package/components/qds-table.js +1 -1
  79. package/components/qds-tag.js +1 -1
  80. package/components/qds-textarea.js +4 -4
  81. package/components/qds-textarea.js.map +1 -1
  82. package/components/qds-title.js +1 -1
  83. package/components/qds-tooltip.js +1 -1
  84. package/dist/cjs/loader.cjs.js +1 -1
  85. package/dist/cjs/qds-action-item.cjs.entry.js +1 -1
  86. package/dist/cjs/qds-action-item.entry.cjs.js.map +1 -1
  87. package/dist/cjs/qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map +1 -1
  88. package/dist/cjs/qds-avatar-media_3.cjs.entry.js +144 -41
  89. package/dist/cjs/qds-badge-counter.qds-badge-indicator.entry.cjs.js.map +1 -1
  90. package/dist/cjs/qds-badge-counter_2.cjs.entry.js +1 -1
  91. package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +2 -2
  92. package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -1
  93. package/dist/cjs/qds-button.cjs.entry.js +1 -1
  94. package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
  95. package/dist/cjs/qds-chip.cjs.entry.js +6 -6
  96. package/dist/cjs/qds-chip.entry.cjs.js.map +1 -1
  97. package/dist/cjs/qds-dialog.cjs.entry.js +1 -1
  98. package/dist/cjs/qds-divider.qds-icon-button.entry.cjs.js.map +1 -1
  99. package/dist/cjs/qds-divider_2.cjs.entry.js +4 -4
  100. package/dist/cjs/qds-dropdown.cjs.entry.js +21 -3
  101. package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -1
  102. package/dist/cjs/qds-form-message.cjs.entry.js +2 -2
  103. package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -1
  104. package/dist/cjs/qds-icon-tab.cjs.entry.js +3 -3
  105. package/dist/cjs/qds-icon.cjs.entry.js +9 -29
  106. package/dist/cjs/qds-icon.entry.cjs.js.map +1 -1
  107. package/dist/cjs/qds-inline-link.cjs.entry.js +2 -2
  108. package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -1
  109. package/dist/cjs/qds-input.cjs.entry.js +14 -10
  110. package/dist/cjs/qds-input.entry.cjs.js.map +1 -1
  111. package/dist/cjs/qds-label.cjs.entry.js +2 -2
  112. package/dist/cjs/qds-list-item.cjs.entry.js +6 -4
  113. package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -1
  114. package/dist/cjs/qds-loader.cjs.entry.js +2 -2
  115. package/dist/cjs/qds-loader.entry.cjs.js.map +1 -1
  116. package/dist/cjs/qds-menu-item.cjs.entry.js +2 -2
  117. package/dist/cjs/qds-mini-button.cjs.entry.js +3 -5
  118. package/dist/cjs/qds-mini-button.entry.cjs.js.map +1 -1
  119. package/dist/cjs/qds-progress-bar.cjs.entry.js +2 -2
  120. package/dist/cjs/qds-select.cjs.entry.js +4 -4
  121. package/dist/cjs/qds-select.entry.cjs.js.map +1 -1
  122. package/dist/cjs/qds-standalone-link.cjs.entry.js +3 -3
  123. package/dist/cjs/qds-standalone-link.entry.cjs.js.map +1 -1
  124. package/dist/cjs/qds-switch.cjs.entry.js +4 -4
  125. package/dist/cjs/qds-switch.entry.cjs.js.map +1 -1
  126. package/dist/cjs/qds-tab.cjs.entry.js +15 -10
  127. package/dist/cjs/qds-tab.entry.cjs.js.map +1 -1
  128. package/dist/cjs/qds-tabbar.cjs.entry.js +83 -27
  129. package/dist/cjs/qds-tabbar.entry.cjs.js.map +1 -1
  130. package/dist/cjs/qds-table-cell.cjs.entry.js +30 -3
  131. package/dist/cjs/qds-table-cell.entry.cjs.js.map +1 -1
  132. package/dist/cjs/qds-table-head-cell.cjs.entry.js +30 -3
  133. package/dist/cjs/qds-table-head-cell.entry.cjs.js.map +1 -1
  134. package/dist/cjs/qds-table-row.cjs.entry.js +2 -2
  135. package/dist/cjs/qds-table-row.entry.cjs.js.map +1 -1
  136. package/dist/cjs/qds-table.cjs.entry.js +1 -1
  137. package/dist/cjs/qds-tag.cjs.entry.js +2 -2
  138. package/dist/cjs/qds-tag.entry.cjs.js.map +1 -1
  139. package/dist/cjs/qds-textarea.cjs.entry.js +3 -3
  140. package/dist/cjs/qds-textarea.entry.cjs.js.map +1 -1
  141. package/dist/cjs/qds-title.cjs.entry.js +3 -3
  142. package/dist/cjs/qds-title.entry.cjs.js.map +1 -1
  143. package/dist/cjs/qds-tooltip.cjs.entry.js +2 -2
  144. package/dist/cjs/qds-tooltip.entry.cjs.js.map +1 -1
  145. package/dist/cjs/qds.cjs.js +1 -1
  146. package/dist/custom-elements.json +365 -30
  147. package/dist/docs.json +320 -64
  148. package/dist/esm/{helpers-eFD8hV6J.js → helpers-Fe2AA6uo.js} +3 -3
  149. package/dist/esm/{helpers-eFD8hV6J.js.map → helpers-Fe2AA6uo.js.map} +1 -1
  150. package/dist/esm/loader.js +1 -1
  151. package/dist/esm/qds-action-item.entry.js +2 -2
  152. package/dist/esm/qds-action-item.entry.js.map +1 -1
  153. package/dist/esm/qds-avatar-media.qds-checkbox.qds-radio.entry.js.map +1 -1
  154. package/dist/esm/qds-avatar-media_3.entry.js +146 -43
  155. package/dist/esm/qds-badge-counter.qds-badge-indicator.entry.js.map +1 -1
  156. package/dist/esm/qds-badge-counter_2.entry.js +1 -1
  157. package/dist/esm/qds-breadcrumb-item.entry.js +3 -3
  158. package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
  159. package/dist/esm/qds-button.entry.js +2 -2
  160. package/dist/esm/qds-button.entry.js.map +1 -1
  161. package/dist/esm/qds-chip.entry.js +7 -7
  162. package/dist/esm/qds-chip.entry.js.map +1 -1
  163. package/dist/esm/qds-dialog.entry.js +2 -2
  164. package/dist/esm/qds-divider.qds-icon-button.entry.js.map +1 -1
  165. package/dist/esm/qds-divider_2.entry.js +5 -5
  166. package/dist/esm/qds-dropdown.entry.js +22 -4
  167. package/dist/esm/qds-dropdown.entry.js.map +1 -1
  168. package/dist/esm/qds-form-message.entry.js +3 -3
  169. package/dist/esm/qds-form-message.entry.js.map +1 -1
  170. package/dist/esm/qds-icon-tab.entry.js +4 -4
  171. package/dist/esm/qds-icon.entry.js +10 -30
  172. package/dist/esm/qds-icon.entry.js.map +1 -1
  173. package/dist/esm/qds-inline-link.entry.js +3 -3
  174. package/dist/esm/qds-inline-link.entry.js.map +1 -1
  175. package/dist/esm/qds-input.entry.js +15 -11
  176. package/dist/esm/qds-input.entry.js.map +1 -1
  177. package/dist/esm/qds-label.entry.js +3 -3
  178. package/dist/esm/qds-list-item.entry.js +7 -5
  179. package/dist/esm/qds-list-item.entry.js.map +1 -1
  180. package/dist/esm/qds-loader.entry.js +2 -2
  181. package/dist/esm/qds-loader.entry.js.map +1 -1
  182. package/dist/esm/qds-menu-item.entry.js +3 -3
  183. package/dist/esm/qds-mini-button.entry.js +4 -6
  184. package/dist/esm/qds-mini-button.entry.js.map +1 -1
  185. package/dist/esm/qds-progress-bar.entry.js +2 -2
  186. package/dist/esm/qds-select.entry.js +5 -5
  187. package/dist/esm/qds-select.entry.js.map +1 -1
  188. package/dist/esm/qds-standalone-link.entry.js +4 -4
  189. package/dist/esm/qds-standalone-link.entry.js.map +1 -1
  190. package/dist/esm/qds-switch.entry.js +5 -5
  191. package/dist/esm/qds-switch.entry.js.map +1 -1
  192. package/dist/esm/qds-tab.entry.js +16 -11
  193. package/dist/esm/qds-tab.entry.js.map +1 -1
  194. package/dist/esm/qds-tabbar.entry.js +84 -28
  195. package/dist/esm/qds-tabbar.entry.js.map +1 -1
  196. package/dist/esm/qds-table-cell.entry.js +30 -3
  197. package/dist/esm/qds-table-cell.entry.js.map +1 -1
  198. package/dist/esm/qds-table-head-cell.entry.js +30 -3
  199. package/dist/esm/qds-table-head-cell.entry.js.map +1 -1
  200. package/dist/esm/qds-table-row.entry.js +2 -2
  201. package/dist/esm/qds-table-row.entry.js.map +1 -1
  202. package/dist/esm/qds-table.entry.js +1 -1
  203. package/dist/esm/qds-tag.entry.js +3 -3
  204. package/dist/esm/qds-tag.entry.js.map +1 -1
  205. package/dist/esm/qds-textarea.entry.js +4 -4
  206. package/dist/esm/qds-textarea.entry.js.map +1 -1
  207. package/dist/esm/qds-title.entry.js +3 -3
  208. package/dist/esm/qds-title.entry.js.map +1 -1
  209. package/dist/esm/qds-tooltip.entry.js +3 -3
  210. package/dist/esm/qds-tooltip.entry.js.map +1 -1
  211. package/dist/esm/qds.js +1 -1
  212. package/dist/types/components/avatar-media/avatar-media.d.ts +14 -5
  213. package/dist/types/components/checkbox/checkbox.d.ts +4 -0
  214. package/dist/types/components/icon/icon.d.ts +1 -2
  215. package/dist/types/components/radio/radio.d.ts +4 -0
  216. package/dist/types/components/tab/tab.d.ts +1 -1
  217. package/dist/types/components/tabbar/tabbar.d.ts +27 -1
  218. package/dist/types/components/table-cell/table-cell.d.ts +6 -0
  219. package/dist/types/components/table-head-cell/table-head-cell.d.ts +6 -0
  220. package/dist/types/components.d.ts +72 -15
  221. package/dist/vscode.html-custom-data.json +79 -4
  222. package/hydrate/index.js +969 -741
  223. package/hydrate/index.mjs +969 -741
  224. package/package.json +1 -2
  225. package/styles/core.css +24 -22
  226. package/components/p-5dwtV5iH.js.map +0 -1
  227. package/components/p-B2ZVUvk9.js.map +0 -1
  228. package/components/p-C1c4JVlg.js.map +0 -1
  229. package/components/p-CDRwHAIT.js.map +0 -1
  230. package/components/p-CkUTS1aU.js +0 -102
  231. package/components/p-CkUTS1aU.js.map +0 -1
  232. package/components/p-CkyaV9az.js.map +0 -1
  233. package/components/p-D82sb4oJ.js.map +0 -1
  234. package/components/p-D9pW936J.js +0 -164
  235. package/components/p-D9pW936J.js.map +0 -1
  236. package/components/p-DNHI4C-W.js.map +0 -1
  237. package/components/p-DR79BVX5.js.map +0 -1
  238. package/components/p-DtxwXYGb.js.map +0 -1
  239. package/components/p-laE-pGH7.js +0 -163
  240. package/components/p-laE-pGH7.js.map +0 -1
@@ -9,7 +9,7 @@ var index = require('./index-DIY7gpXM.js');
9
9
  var helpers = require('./helpers-Qs3cpKiI.js');
10
10
  var controls = require('./controls-DKGeNyr5.js');
11
11
 
12
- const avatarMediaCss = ":host([hidden]){display:none!important}:host{display:block}.qds-container{align-items:center;align-self:stretch;background:var(--qds-theme-display-background);border:var(--qds-display-border-width) solid var(--qds-theme-display-background-contrast);border-radius:var(--qds-display-rounded-border-radius);display:flex;height:inherit;justify-content:center;width:inherit}.qds-container .qds-picture{border-radius:inherit;flex-shrink:0;height:100%;object-fit:cover;width:100%}.qds-container .qds-icon,.qds-container .qds-text{color:var(--qds-theme-display-background-contrast)}.qds-container .qds-icon{flex-shrink:0;height:60%;width:60%}.qds-container .qds-text{font:var(--qds-display-standard);text-align:center}";
12
+ const avatarMediaCss = ":host([hidden]){display:none!important}:host{display:block}.qds-container{align-items:center;align-self:stretch;background:var(--qds-theme-display-background);border:var(--qds-display-border-width) solid var(--qds-theme-display-background-contrast);border-radius:var(--qds-display-rounded-border-radius);display:flex;height:inherit;justify-content:center;width:inherit}.qds-picture{border-radius:inherit;flex-shrink:0;height:100%;object-fit:cover;width:100%}.qds-icon,.qds-text{color:var(--qds-theme-display-background-contrast)}.qds-text{font:var(--qds-display-standard);text-align:center}.qds-sr-only{clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
13
13
 
14
14
  // SPDX-FileCopyrightText: © 2025 Schneider Electric
15
15
  //
@@ -21,41 +21,45 @@ var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) |
21
21
  throw new TypeError("Cannot read private member from an object whose class did not declare it");
22
22
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
23
23
  };
24
- var _AvatarMedia_renderContent, _AvatarMedia_handleImageError;
24
+ var _AvatarMedia_renderContent, _AvatarMedia_handleImageError, _AvatarMedia_handleImageLoad;
25
25
  const AvatarMedia = class {
26
26
  constructor(hostRef) {
27
27
  index.registerInstance(this, hostRef);
28
+ this.loadEmitter = index.createEvent(this, "qdsLoad", 6);
28
29
  this.errorEmitter = index.createEvent(this, "qdsError", 6);
30
+ if (hostRef.$hostElement$["s-ei"]) {
31
+ this.internals = hostRef.$hostElement$["s-ei"];
32
+ }
33
+ else {
34
+ this.internals = hostRef.$hostElement$.attachInternals();
35
+ hostRef.$hostElement$["s-ei"] = this.internals;
36
+ }
29
37
  /**
30
- * The alt text for the avatar-media's image.
31
- * @webnative
32
- */
33
- this.alt = '';
34
- /**
35
- * The avatar-media's icon library.
38
+ * The name of a registered icon library.
36
39
  */
37
40
  this.iconLibrary = 'default';
38
41
  this.hasImageError = false;
39
42
  _AvatarMedia_renderContent.set(this, () => {
40
- if (this.src !== undefined && this.src !== '' && !this.hasImageError) {
41
- return (index.h("img", { class: "qds-picture", src: this.src, alt: this.alt, onError: __classPrivateFieldGet$2(this, _AvatarMedia_handleImageError, "f"), onLoad: () => {
42
- this.hasImageError = false;
43
- } }));
44
- }
45
- if (this.text !== undefined && this.text !== '') {
46
- return index.h("span", { class: "qds-text" }, this.initials);
47
- }
48
- if (this.iconName !== undefined && this.iconName !== '') {
43
+ if (this.src !== undefined && this.src !== '' && !this.hasImageError)
44
+ return (index.h("img", { "aria-hidden": "true", class: "qds-picture", src: this.src, alt: this.alt, onError: __classPrivateFieldGet$2(this, _AvatarMedia_handleImageError, "f"), onLoad: __classPrivateFieldGet$2(this, _AvatarMedia_handleImageLoad, "f") }));
45
+ if (this.text !== undefined && this.text !== '')
46
+ return (index.h(index.Fragment, null, index.h("span", { "aria-hidden": "true", class: "qds-text" }, this.initials), index.h("span", { class: "qds-sr-only" }, this.text)));
47
+ if (this.iconName !== undefined && this.iconName !== '')
49
48
  return (index.h("qds-icon", { class: "qds-icon", name: this.iconName, library: this.iconLibrary }));
50
- }
51
49
  return index.h("qds-icon", { class: "qds-icon", name: "user", library: "core" });
52
50
  });
53
51
  _AvatarMedia_handleImageError.set(this, () => {
54
52
  this.hasImageError = true;
53
+ this.roleChanged();
55
54
  this.errorEmitter.emit();
56
55
  });
56
+ _AvatarMedia_handleImageLoad.set(this, () => {
57
+ this.hasImageError = false;
58
+ this.roleChanged();
59
+ this.loadEmitter.emit();
60
+ });
57
61
  }
58
- handleTextChange() {
62
+ textChanged() {
59
63
  if (this.text === undefined || this.text === '') {
60
64
  this.initials = undefined;
61
65
  return;
@@ -64,20 +68,39 @@ const AvatarMedia = class {
64
68
  const [first = '', second = ''] = words.filter(Boolean);
65
69
  this.initials = (first.charAt(0) + (second.charAt(0) || '')).toLocaleUpperCase();
66
70
  }
71
+ labelChanged() {
72
+ this.internals.ariaLabel =
73
+ this.alt !== undefined && this.alt !== ''
74
+ ? this.alt
75
+ : // eslint-disable-next-line unicorn/no-null
76
+ null;
77
+ }
78
+ roleChanged() {
79
+ if (this.src !== undefined && this.src !== '' && !this.hasImageError)
80
+ this.internals.role = 'img';
81
+ else if (this.text !== undefined && this.text !== '')
82
+ this.internals.role = 'generic';
83
+ else
84
+ this.internals.role = 'presentation';
85
+ }
67
86
  componentWillLoad() {
68
- this.handleTextChange();
87
+ this.textChanged();
88
+ this.labelChanged();
89
+ this.roleChanged();
69
90
  }
70
91
  render() {
71
- return index.h("div", { key: '2a4d92d823206e950959201c8c2c1b420379ceb1', class: "qds-container" }, __classPrivateFieldGet$2(this, _AvatarMedia_renderContent, "f").call(this));
92
+ return index.h("div", { key: '52d3dd3165ee17dd49f8cdbf901af5c1c613246c', class: "qds-container" }, __classPrivateFieldGet$2(this, _AvatarMedia_renderContent, "f").call(this));
72
93
  }
73
94
  static get watchers() { return {
74
- "text": ["handleTextChange"]
95
+ "text": ["textChanged", "roleChanged"],
96
+ "alt": ["labelChanged"],
97
+ "src": ["roleChanged"]
75
98
  }; }
76
99
  };
77
- _AvatarMedia_renderContent = new WeakMap(), _AvatarMedia_handleImageError = new WeakMap();
100
+ _AvatarMedia_renderContent = new WeakMap(), _AvatarMedia_handleImageError = new WeakMap(), _AvatarMedia_handleImageLoad = new WeakMap();
78
101
  AvatarMedia.style = avatarMediaCss;
79
102
 
80
- const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-checkbox,.qds-icon{grid-area:c;place-self:center}.qds-icon{color:var(--qds-theme-signature-color-contrast);display:none;pointer-events:none}.qds-container{display:grid;grid-template-areas:\"c\"}.qds-label{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label:has(.qds-checkbox:focus-visible){box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner{flex:1 1 auto;min-width:0;width:100%}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:none}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-control-background-contrast);border-color:#0000}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}[data-size=small]{--qds-form-small-text:var(--qds-control-small-text)}.qds-checkbox[data-size=small]{border-radius:var(--qds-control-toggle-small-knob-border-radius);height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height);padding:var(--qds-control-small-padding-auto-height) var(--qds-control-toggle-small-padding-horizontal)}[data-size=standard]{--qds-form-standard-text:var(--qds-control-standard-text)}.qds-checkbox[data-size=standard]{border-radius:var(--qds-control-toggle-standard-knob-border-radius);height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}[data-size=large]{--qds-form-large-text:var(--qds-control-large-text)}.qds-checkbox[data-size=large]{border-radius:var(--qds-control-toggle-large-knob-border-radius);height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height);padding:var(--qds-control-large-padding-auto-height) var(--qds-control-toggle-large-padding-horizontal)}";
103
+ const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-checkbox,.qds-icon{grid-area:c;place-self:center}.qds-icon{color:var(--qds-theme-signature-color-contrast);display:none;pointer-events:none}.qds-container{display:grid;grid-template-areas:\"c\"}.qds-label{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label:has(.qds-checkbox:focus-visible){box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner{color:var(--qds-theme-control-text-standard);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;width:100%}.qds-required{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}.qds-tooltip{line-height:normal}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:none}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-control-background-contrast);border-color:#0000}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-checkbox[data-size=small]{border-radius:var(--qds-control-toggle-small-knob-border-radius);height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-toggle-small-box-size)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-label-inner[data-size=small]{font:var(--qds-control-small-text)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height);padding:var(--qds-control-small-padding-auto-height) var(--qds-control-toggle-small-padding-horizontal)}.qds-checkbox[data-size=standard]{border-radius:var(--qds-control-toggle-standard-knob-border-radius);height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-toggle-standard-box-size)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-label-inner[data-size=standard]{font:var(--qds-control-standard-text)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-checkbox[data-size=large]{border-radius:var(--qds-control-toggle-large-knob-border-radius);height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-toggle-large-box-size)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-label-inner[data-size=large]{font:var(--qds-control-large-text)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height);padding:var(--qds-control-large-padding-auto-height) var(--qds-control-toggle-large-padding-horizontal)}";
81
104
 
82
105
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
83
106
  //
@@ -98,7 +121,7 @@ var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) |
98
121
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
99
122
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
100
123
  };
101
- var _Checkbox_instances, _Checkbox_inheritedAttributes, _Checkbox_computedChecked_get, _Checkbox_computedDisabled_get, _Checkbox_computedIndeterminate_get, _Checkbox_computedSize_get, _Checkbox_computedValue_get, _Checkbox_hasText_get, _Checkbox_onBlur, _Checkbox_onFocus, _Checkbox_defineGetter;
124
+ var _Checkbox_instances, _Checkbox_inheritedAttributes, _Checkbox_ro, _Checkbox_span, _Checkbox_tooltip, _Checkbox_computedChecked_get, _Checkbox_computedDisabled_get, _Checkbox_computedIndeterminate_get, _Checkbox_computedSize_get, _Checkbox_computedValue_get, _Checkbox_hasText_get, _Checkbox_onBlur, _Checkbox_onFocus, _Checkbox_spanRef, _Checkbox_tooltipRef, _Checkbox_defineGetter;
102
125
  const Checkbox = class {
103
126
  constructor(hostRef) {
104
127
  index.registerInstance(this, hostRef);
@@ -177,7 +200,11 @@ const Checkbox = class {
177
200
  * Whether or not the text is displayed.
178
201
  */
179
202
  this.checkboxOnly = false;
203
+ this.tooltip = false;
180
204
  _Checkbox_inheritedAttributes.set(this, {});
205
+ _Checkbox_ro.set(this, void 0);
206
+ _Checkbox_span.set(this, void 0);
207
+ _Checkbox_tooltip.set(this, void 0);
181
208
  this.checkValidity = () => this.internals.checkValidity();
182
209
  this.reportValidity = () => this.internals.reportValidity();
183
210
  this.setCustomValidity = (error) => {
@@ -188,9 +215,23 @@ const Checkbox = class {
188
215
  };
189
216
  _Checkbox_onBlur.set(this, (event) => {
190
217
  this.blurEmitter.emit(helpers.pickFocusEventAttributes(event));
218
+ if (__classPrivateFieldGet$1(this, _Checkbox_tooltip, "f"))
219
+ helpers.ignorePromise(__classPrivateFieldGet$1(this, _Checkbox_tooltip, "f").close());
191
220
  });
192
221
  _Checkbox_onFocus.set(this, (event) => {
193
222
  this.focusEmitter.emit(helpers.pickFocusEventAttributes(event));
223
+ if (__classPrivateFieldGet$1(this, _Checkbox_tooltip, "f"))
224
+ helpers.ignorePromise(__classPrivateFieldGet$1(this, _Checkbox_tooltip, "f").show());
225
+ });
226
+ _Checkbox_spanRef.set(this, (span) => {
227
+ __classPrivateFieldSet$1(this, _Checkbox_span, span, "f");
228
+ });
229
+ _Checkbox_tooltipRef.set(this, (tooltip) => {
230
+ if (tooltip) {
231
+ // eslint-disable-next-line no-param-reassign
232
+ tooltip.target = this.host;
233
+ __classPrivateFieldSet$1(this, _Checkbox_tooltip, tooltip, "f");
234
+ }
194
235
  });
195
236
  }
196
237
  onClick(event) {
@@ -221,6 +262,20 @@ const Checkbox = class {
221
262
  this.tabIndex =
222
263
  parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
223
264
  }
265
+ textChanged() {
266
+ if (__classPrivateFieldGet$1(this, _Checkbox_ro, "f"))
267
+ __classPrivateFieldGet$1(this, _Checkbox_ro, "f").disconnect();
268
+ if (!__classPrivateFieldGet$1(this, _Checkbox_span, "f"))
269
+ return;
270
+ const span = __classPrivateFieldGet$1(this, _Checkbox_span, "f");
271
+ index.readTask(() => {
272
+ this.tooltip = helpers.isEllipsisActive(span);
273
+ });
274
+ __classPrivateFieldSet$1(this, _Checkbox_ro, new ResizeObserver(([spanEntry]) => {
275
+ this.tooltip = helpers.isEllipsisActive(spanEntry.target);
276
+ }), "f");
277
+ __classPrivateFieldGet$1(this, _Checkbox_ro, "f").observe(__classPrivateFieldGet$1(this, _Checkbox_span, "f"));
278
+ }
224
279
  valueChanged() {
225
280
  if (__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get) && !__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get))
226
281
  this.internals.setFormValue(__classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedValue_get));
@@ -234,21 +289,28 @@ const Checkbox = class {
234
289
  __classPrivateFieldSet$1(this, _Checkbox_inheritedAttributes, helpers.inheritAriaAttributes(this.host), "f");
235
290
  this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
236
291
  }
292
+ componentDidLoad() {
293
+ this.textChanged();
294
+ }
295
+ disconnectedCallback() {
296
+ if (__classPrivateFieldGet$1(this, _Checkbox_ro, "f"))
297
+ __classPrivateFieldGet$1(this, _Checkbox_ro, "f").disconnect();
298
+ }
237
299
  render() {
238
300
  return (
239
301
  // eslint-disable-next-line jsx-a11y/label-has-associated-control
240
- index.h("label", { key: 'eee46a1d52fdce13a48944878461a64b4010ac2b', "aria-disabled": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? 'true' : undefined, class: {
302
+ index.h("label", { key: 'ff46801768016168ffb89acd3148a796dd94765f', "aria-disabled": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? 'true' : undefined, class: {
241
303
  'qds-inline': this.inline,
242
304
  'qds-label': true,
243
- }, "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }, index.h("div", { key: 'b22d88f6b62e988057db205e8b493a31cb9eabdc', class: "qds-container" }, index.h("input", { key: 'c1510dc602adc3cf9470edbc6fa95af12f701b9a',
305
+ }, "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }, index.h("div", { key: 'f4761b84afd3a10bff6367b2b22628cbf22d01d6', class: "qds-container" }, index.h("input", { key: 'e29721f3efccdcbf3ca70e733c8932b69d134b5c',
244
306
  // eslint-disable-next-line jsx-a11y/no-autofocus
245
- autoFocus: this.host.autofocus, checked: __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get) ? false : this.checked, class: "qds-checkbox", "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), disabled: __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get), indeterminate: this.indeterminate, onBlur: __classPrivateFieldGet$1(this, _Checkbox_onBlur, "f"), onFocus: __classPrivateFieldGet$1(this, _Checkbox_onFocus, "f"), required: this.required, tabIndex: __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? undefined : this.tabIndex, type: "checkbox", "aria-label": this.checkboxOnly ? this.text : undefined, ...__classPrivateFieldGet$1(this, _Checkbox_inheritedAttributes, "f") }), index.h("qds-icon", { key: '7fd98e670537e117298a45d854b34fb9060a8850', "aria-hidden": "true", class: {
307
+ autoFocus: this.host.autofocus, checked: __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get) ? false : this.checked, class: "qds-checkbox", "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), disabled: __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get), indeterminate: this.indeterminate, onBlur: __classPrivateFieldGet$1(this, _Checkbox_onBlur, "f"), onFocus: __classPrivateFieldGet$1(this, _Checkbox_onFocus, "f"), required: this.required, tabIndex: __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? undefined : this.tabIndex, type: "checkbox", "aria-label": this.checkboxOnly ? this.text : undefined, ...__classPrivateFieldGet$1(this, _Checkbox_inheritedAttributes, "f") }), index.h("qds-icon", { key: '83ec6c6752f5c0138d3adb3fa4f1e04dd78e83ea', class: {
246
308
  'qds-icon': true,
247
309
  'qds-checked': true,
248
- }, "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "checked" }), index.h("qds-icon", { key: '7d5266124a946507ee7384a7086af51e6f5a1d66', "aria-hidden": "true", class: {
310
+ }, "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "checked" }), index.h("qds-icon", { key: 'dfbbe3c44f7ee900706fbda544e4c9c709895608', class: {
249
311
  'qds-icon': true,
250
312
  'qds-indeterminate': true,
251
- }, "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "indeterminate" })), __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_hasText_get) && (index.h("qds-label", { key: '2abb3aa9fe38db5b754d65024d907fe7e6c05ed0', class: "qds-label-inner", required: this.required, size: this.size, text: this.text, tabindex: -1, tooltipTarget: this.host }))));
313
+ }, "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "indeterminate" })), __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_hasText_get) && (index.h("span", { key: 'cdb7452d5230c202e957a1c1223549f4e1a8131b', class: "qds-label-inner", "data-size": __classPrivateFieldGet$1(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), ref: __classPrivateFieldGet$1(this, _Checkbox_spanRef, "f") }, this.required === true && index.h("span", { key: 'bfcda68d1914a4942ab46cc4b421a7918f89ac6d', class: "qds-required" }, "*"), this.text)), this.tooltip && (index.h("qds-tooltip", { key: '314e615f55bd825269f44513ab50b5059755e6f3', "aria-hidden": "true", class: "qds-tooltip", ref: __classPrivateFieldGet$1(this, _Checkbox_tooltipRef, "f") }, this.text))));
252
314
  }
253
315
  static get delegatesFocus() { return true; }
254
316
  static get formAssociated() { return true; }
@@ -257,10 +319,11 @@ const Checkbox = class {
257
319
  "checked": ["checkedChanged"],
258
320
  "disabled": ["disabledChanged"],
259
321
  "tabindex": ["tabindexChanged"],
322
+ "text": ["textChanged"],
260
323
  "value": ["valueChanged"]
261
324
  }; }
262
325
  };
263
- _Checkbox_inheritedAttributes = new WeakMap(), _Checkbox_onBlur = new WeakMap(), _Checkbox_onFocus = new WeakMap(), _Checkbox_instances = new WeakSet(), _Checkbox_computedChecked_get = function _Checkbox_computedChecked_get() {
326
+ _Checkbox_inheritedAttributes = new WeakMap(), _Checkbox_ro = new WeakMap(), _Checkbox_span = new WeakMap(), _Checkbox_tooltip = new WeakMap(), _Checkbox_onBlur = new WeakMap(), _Checkbox_onFocus = new WeakMap(), _Checkbox_spanRef = new WeakMap(), _Checkbox_tooltipRef = new WeakMap(), _Checkbox_instances = new WeakSet(), _Checkbox_computedChecked_get = function _Checkbox_computedChecked_get() {
264
327
  return this.checked ?? false;
265
328
  }, _Checkbox_computedDisabled_get = function _Checkbox_computedDisabled_get() {
266
329
  return ((this.host.matches(':disabled') || (this.disabled ?? false)) &&
@@ -288,7 +351,7 @@ _Checkbox_inheritedAttributes = new WeakMap(), _Checkbox_onBlur = new WeakMap(),
288
351
  };
289
352
  Checkbox.style = checkboxCss;
290
353
 
291
- const radioCss = "[hidden].sc-qds-radio-h{display:none!important}.sc-qds-radio-h{display:inline-block;line-height:0}.qds-icon.sc-qds-radio,.qds-radio.sc-qds-radio{grid-area:i;place-self:center}.qds-icon.sc-qds-radio{display:none;pointer-events:none}.qds-container.sc-qds-radio{display:grid;grid-template-areas:\"i\"}.qds-label.sc-qds-radio{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label.sc-qds-radio:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label.sc-qds-radio:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label.sc-qds-radio:has(.qds-radio:focus-visible){box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner.sc-qds-radio{flex:1 1 auto;min-width:0;width:100%}.qds-radio.sc-qds-radio{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-rounded-border-radius);cursor:pointer;margin:0;padding:var(--qds-control-toggle-padding);-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-radio.sc-qds-radio:focus-visible{outline:none}.qds-radio.sc-qds-radio:checked~.qds-icon.sc-qds-radio{color:var(--qds-theme-control-background-contrast);display:block}[aria-disabled=true].sc-qds-radio{opacity:var(--qds-theme-disabled);pointer-events:none}[data-size=small].sc-qds-radio{--qds-form-small-text:var(--qds-control-small-text)}.qds-radio[data-size=small].sc-qds-radio{height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small].sc-qds-radio{font-size:var(--qds-control-small-icon-size)}.qds-label[data-size=small].sc-qds-radio{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-inline[data-size=small].sc-qds-radio{min-height:var(--qds-control-small-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}[data-size=standard].sc-qds-radio{--qds-form-standard-text:var(--qds-control-standard-text)}.qds-radio[data-size=standard].sc-qds-radio{height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard].sc-qds-radio{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}.qds-label[data-size=standard].sc-qds-radio{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-inline[data-size=standard].sc-qds-radio{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}[data-size=large].sc-qds-radio{--qds-form-large-text:var(--qds-control-large-text)}.qds-radio[data-size=large].sc-qds-radio{height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large].sc-qds-radio{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}.qds-label[data-size=large].sc-qds-radio{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-inline[data-size=large].sc-qds-radio{min-height:var(--qds-control-large-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}";
354
+ const radioCss = "[hidden].sc-qds-radio-h{display:none!important}.sc-qds-radio-h{display:inline-block;line-height:0}.qds-icon.sc-qds-radio,.qds-radio.sc-qds-radio{grid-area:f;place-self:center}.qds-icon.sc-qds-radio{display:none;pointer-events:none}.qds-container.sc-qds-radio{display:grid;grid-template-areas:\"f\"}.qds-label.sc-qds-radio{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label.sc-qds-radio:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label.sc-qds-radio:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label.sc-qds-radio:has(.qds-radio:focus-visible){box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner.sc-qds-radio{color:var(--qds-theme-control-text-standard);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;width:100%}.qds-required.sc-qds-radio{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}.qds-tooltip.sc-qds-radio{line-height:normal}.qds-radio.sc-qds-radio{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-rounded-border-radius);cursor:pointer;margin:0;padding:var(--qds-control-toggle-padding);-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-radio.sc-qds-radio:focus-visible{outline:none}.qds-radio.sc-qds-radio:checked~.qds-icon.sc-qds-radio{color:var(--qds-theme-control-background-contrast);display:block}[aria-disabled=true].sc-qds-radio{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-radio[data-size=small].sc-qds-radio{height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small].sc-qds-radio{font-size:var(--qds-control-toggle-small-box-size)}.qds-label[data-size=small].sc-qds-radio{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-label-inner[data-size=small].sc-qds-radio{font:var(--qds-control-small-text)}.qds-inline[data-size=small].sc-qds-radio{min-height:var(--qds-control-small-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-radio[data-size=standard].sc-qds-radio{height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard].sc-qds-radio{font-size:var(--qds-control-toggle-standard-box-size)}.qds-label[data-size=standard].sc-qds-radio{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-label-inner[data-size=standard].sc-qds-radio{font:var(--qds-control-standard-text)}.qds-inline[data-size=standard].sc-qds-radio{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-radio[data-size=large].sc-qds-radio{height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large].sc-qds-radio{font-size:var(--qds-control-toggle-large-box-size)}.qds-label[data-size=large].sc-qds-radio{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-label-inner[data-size=large].sc-qds-radio{font:var(--qds-control-large-text)}.qds-inline[data-size=large].sc-qds-radio{min-height:var(--qds-control-large-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}";
292
355
 
293
356
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
294
357
  //
@@ -309,7 +372,7 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
309
372
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
310
373
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
311
374
  };
312
- var _Radio_instances, _Radio_inheritedAttributes, _Radio_input, _Radio_computedDisabled_get, _Radio_computedSize_get, _Radio_hasText_get, _Radio_ref, _Radio_onBlur, _Radio_onChange, _Radio_onFocus;
375
+ var _Radio_instances, _Radio_inheritedAttributes, _Radio_input, _Radio_ro, _Radio_span, _Radio_tooltip, _Radio_computedDisabled_get, _Radio_computedSize_get, _Radio_hasText_get, _Radio_ref, _Radio_onBlur, _Radio_onFocus, _Radio_spanRef, _Radio_tooltipRef, _Radio_onChange;
313
376
  const Radio = class {
314
377
  constructor(hostRef) {
315
378
  index.registerInstance(this, hostRef);
@@ -328,19 +391,37 @@ const Radio = class {
328
391
  * The radio button's size.
329
392
  */
330
393
  this.size = 'standard';
394
+ this.tooltip = false;
331
395
  _Radio_inheritedAttributes.set(this, {});
332
396
  _Radio_input.set(this, void 0);
397
+ _Radio_ro.set(this, void 0);
398
+ _Radio_span.set(this, void 0);
399
+ _Radio_tooltip.set(this, void 0);
333
400
  _Radio_ref.set(this, (input) => {
334
401
  __classPrivateFieldSet(this, _Radio_input, input, "f");
335
402
  });
336
403
  _Radio_onBlur.set(this, (event) => {
337
404
  this.blurEmitter.emit(helpers.pickFocusEventAttributes(event));
338
- });
339
- _Radio_onChange.set(this, () => {
340
- this.changeEmitter.emit();
405
+ if (__classPrivateFieldGet(this, _Radio_tooltip, "f"))
406
+ helpers.ignorePromise(__classPrivateFieldGet(this, _Radio_tooltip, "f").close());
341
407
  });
342
408
  _Radio_onFocus.set(this, (event) => {
343
409
  this.focusEmitter.emit(helpers.pickFocusEventAttributes(event));
410
+ if (__classPrivateFieldGet(this, _Radio_tooltip, "f"))
411
+ helpers.ignorePromise(__classPrivateFieldGet(this, _Radio_tooltip, "f").show());
412
+ });
413
+ _Radio_spanRef.set(this, (span) => {
414
+ __classPrivateFieldSet(this, _Radio_span, span, "f");
415
+ });
416
+ _Radio_tooltipRef.set(this, (tooltip) => {
417
+ if (tooltip) {
418
+ // eslint-disable-next-line no-param-reassign
419
+ tooltip.target = this.host;
420
+ __classPrivateFieldSet(this, _Radio_tooltip, tooltip, "f");
421
+ }
422
+ });
423
+ _Radio_onChange.set(this, () => {
424
+ this.changeEmitter.emit();
344
425
  });
345
426
  }
346
427
  onClick(event) {
@@ -356,26 +437,48 @@ const Radio = class {
356
437
  this.tabIndex =
357
438
  parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
358
439
  }
440
+ textChanged() {
441
+ if (__classPrivateFieldGet(this, _Radio_ro, "f"))
442
+ __classPrivateFieldGet(this, _Radio_ro, "f").disconnect();
443
+ if (!__classPrivateFieldGet(this, _Radio_span, "f"))
444
+ return;
445
+ const span = __classPrivateFieldGet(this, _Radio_span, "f");
446
+ index.readTask(() => {
447
+ this.tooltip = helpers.isEllipsisActive(span);
448
+ });
449
+ __classPrivateFieldSet(this, _Radio_ro, new ResizeObserver(([spanEntry]) => {
450
+ this.tooltip = helpers.isEllipsisActive(spanEntry.target);
451
+ }), "f");
452
+ __classPrivateFieldGet(this, _Radio_ro, "f").observe(__classPrivateFieldGet(this, _Radio_span, "f"));
453
+ }
359
454
  componentWillLoad() {
360
455
  __classPrivateFieldSet(this, _Radio_inheritedAttributes, helpers.inheritAriaAttributes(this.host), "f");
361
456
  this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
362
457
  }
458
+ componentDidLoad() {
459
+ this.textChanged();
460
+ }
461
+ disconnectedCallback() {
462
+ if (__classPrivateFieldGet(this, _Radio_ro, "f"))
463
+ __classPrivateFieldGet(this, _Radio_ro, "f").disconnect();
464
+ }
363
465
  render() {
364
466
  return (
365
467
  // eslint-disable-next-line jsx-a11y/label-has-associated-control
366
- index.h("label", { key: 'd0c73be3ff0a081eb00a0857c8d4c44757b6db2b', "aria-disabled": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? 'true' : undefined, class: {
468
+ index.h("label", { key: '62bb3624c0b808bd128e2377215d63ed03f03c9f', "aria-disabled": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? 'true' : undefined, class: {
367
469
  'qds-inline': this.inline,
368
470
  'qds-label': true,
369
- }, "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get) }, index.h("div", { key: '1018adbd92399c84791fed4bd449220431f8525f', class: "qds-container" }, index.h("input", { key: 'f7d1a5bdaf8cc9689b7b4d2257cb360377d8a4b6',
471
+ }, "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get) }, index.h("div", { key: '0162d9e7c109e914c2450ea0ecbeeb17e228d106', class: "qds-container" }, index.h("input", { key: '076c5b110f38044837431b6d1d43196700ec97b2',
370
472
  // eslint-disable-next-line jsx-a11y/no-autofocus
371
- autoFocus: this.host.autofocus, checked: this.checked, class: "qds-radio", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), disabled: this.disabled, form: this.form, name: this.name, onBlur: __classPrivateFieldGet(this, _Radio_onBlur, "f"), onChange: __classPrivateFieldGet(this, _Radio_onChange, "f"), onFocus: __classPrivateFieldGet(this, _Radio_onFocus, "f"), ref: __classPrivateFieldGet(this, _Radio_ref, "f"), required: this.required, tabIndex: __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? undefined : this.tabIndex, type: "radio", value: this.value ?? undefined, ...__classPrivateFieldGet(this, _Radio_inheritedAttributes, "f") }), index.h("qds-icon", { key: '5d216956b9bc9a9d673f79ef81302f8a085a4f01', "aria-hidden": "true", class: "qds-icon", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), library: "core", name: "checked-radio" })), __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_hasText_get) && (index.h("qds-label", { key: '023e5f403ff3299ff37153eb7ee96941f485b308', class: "qds-label-inner", size: __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), text: this.text }))));
473
+ autoFocus: this.host.autofocus, checked: this.checked, class: "qds-radio", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), disabled: this.disabled, form: this.form, name: this.name, onBlur: __classPrivateFieldGet(this, _Radio_onBlur, "f"), onChange: __classPrivateFieldGet(this, _Radio_onChange, "f"), onFocus: __classPrivateFieldGet(this, _Radio_onFocus, "f"), ref: __classPrivateFieldGet(this, _Radio_ref, "f"), required: this.required, tabIndex: __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? undefined : this.tabIndex, type: "radio", value: this.value ?? undefined, ...__classPrivateFieldGet(this, _Radio_inheritedAttributes, "f") }), index.h("qds-icon", { key: '668a2d22e68b6f1d49cb5b9798b99dbd6d5a05a5', class: "qds-icon", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), library: "core", name: "checked-radio" })), __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_hasText_get) && (index.h("span", { key: 'f1205a0e975d4e59a907239a0371fe8864e5adfd', class: "qds-label-inner", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), ref: __classPrivateFieldGet(this, _Radio_spanRef, "f") }, this.required === true && index.h("span", { key: '77c767cab283f45e4f5d4d23caab06ddd200c214', class: "qds-required" }, "*"), this.text)), this.tooltip && (index.h("qds-tooltip", { key: '905dbef82ca3a3803e536bceca43c1bee35eb195', "aria-hidden": "true", class: "qds-tooltip", ref: __classPrivateFieldGet(this, _Radio_tooltipRef, "f") }, this.text))));
372
474
  }
373
475
  get host() { return index.getElement(this); }
374
476
  static get watchers() { return {
375
- "tabindex": ["tabindexChanged"]
477
+ "tabindex": ["tabindexChanged"],
478
+ "text": ["textChanged"]
376
479
  }; }
377
480
  };
378
- _Radio_inheritedAttributes = new WeakMap(), _Radio_input = new WeakMap(), _Radio_ref = new WeakMap(), _Radio_onBlur = new WeakMap(), _Radio_onChange = new WeakMap(), _Radio_onFocus = new WeakMap(), _Radio_instances = new WeakSet(), _Radio_computedDisabled_get = function _Radio_computedDisabled_get() {
481
+ _Radio_inheritedAttributes = new WeakMap(), _Radio_input = new WeakMap(), _Radio_ro = new WeakMap(), _Radio_span = new WeakMap(), _Radio_tooltip = new WeakMap(), _Radio_ref = new WeakMap(), _Radio_onBlur = new WeakMap(), _Radio_onFocus = new WeakMap(), _Radio_spanRef = new WeakMap(), _Radio_tooltipRef = new WeakMap(), _Radio_onChange = new WeakMap(), _Radio_instances = new WeakSet(), _Radio_computedDisabled_get = function _Radio_computedDisabled_get() {
379
482
  return this.disabled ?? false;
380
483
  }, _Radio_computedSize_get = function _Radio_computedSize_get() {
381
484
  switch (this.size) {
@@ -1 +1 @@
1
- {"version":3,"file":"qds-badge-counter.qds-badge-indicator.entry.cjs.js","sources":["src/components/badge-counter/badge-counter.css?tag=qds-badge-counter&encapsulation=shadow","src/components/badge-counter/badge-counter.tsx","src/components/badge-indicator/badge-indicator.css?tag=qds-badge-indicator&encapsulation=shadow","src/components/badge-indicator/badge-indicator.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-badge-counter {\n align-items: center;\n background-color: var(--qds-theme-feedback-message-neutral);\n border-radius: var(--qds-feedback-rounded-border-radius);\n color: var(--qds-theme-feedback-message-neutral-contrast);\n display: flex;\n font: var(--qds-feedback-badge-counter-standard-text);\n height: var(--qds-feedback-badge-counter-standard-height);\n justify-content: center;\n margin: 0;\n padding-inline: var(--qds-feedback-badge-counter-standard-padding-horizontal);\n text-align: center;\n}\n\n.qds-stroke-ring {\n border: var(--qds-feedback-badge-border-width) solid\n var(--qds-theme-feedback-message-neutral-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-importance='emphasized'] {\n background-color: var(--qds-theme-signature-color-contrast);\n color: var(--qds-theme-signature-color-default);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-signature-color-default);\n }\n}\n\n[data-importance='subdued'] {\n background-color: var(--qds-theme-feedback-message-informational);\n color: var(--qds-theme-feedback-message-informational-contrast);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-informational-contrast);\n }\n}\n\n[data-importance='destructive'] {\n background-color: var(--qds-theme-feedback-message-critical-contrast);\n color: var(--qds-theme-feedback-message-critical);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-critical);\n }\n}\n\n[data-importance='subdued-destructive'] {\n color: var(--qds-theme-feedback-message-critical-contrast);\n background-color: var(--qds-theme-feedback-message-critical);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-critical-contrast);\n }\n}\n\n[data-size='small'] {\n font: var(--qds-feedback-badge-counter-small-text);\n height: var(--qds-feedback-badge-counter-small-height);\n padding-inline: var(--qds-feedback-badge-counter-small-padding-horizontal);\n}\n\n[data-size='large'] {\n font: var(--qds-feedback-badge-counter-large-text);\n height: var(--qds-feedback-badge-counter-large-height);\n padding-inline: var(--qds-feedback-badge-counter-large-padding-horizontal);\n}\n\n[data-size='hero'] {\n font: var(--qds-feedback-badge-counter-hero-text);\n height: var(--qds-feedback-badge-counter-hero-height);\n padding-inline: var(--qds-feedback-badge-counter-hero-padding-horizontal);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, h, Prop } from '@stencil/core'\n\nimport type { Importance, Size } from '../shared'\n\nexport type BadgeCounterImportance =\n | Importance\n | 'destructive'\n | 'subdued-destructive'\nexport type BadgeCounterSize = Size | 'hero'\n\n/**\n * The `<qds-badge-counter>` element is a small, rounded UI element used to\n * display numerical values or counts. It is designed to draw the user's eye to\n * important or dynamic content by providing a visual cue that a countable\n * event or item has occurred or is waiting to be addressed.\n */\n@Component({\n tag: 'qds-badge-counter',\n shadow: true,\n styleUrl: 'badge-counter.css',\n})\nexport class BadgeCounter implements ComponentInterface {\n /**\n * Adds accessible text to the qds-badge-counter that will be used by screen\n * readers.\n *\n * @example\n * <qds-badge-counter value={2} description=\"new notifications\"></qds-badge-counter>\n * // This qds-badge-counter will be read by screen readers as \"two new notifications\"\n */\n @Prop() public readonly description?: string\n\n /**\n * The badge counter's importance.\n */\n @Prop() public readonly importance?: BadgeCounterImportance = 'standard'\n\n /**\n * The badge counter's size.\n */\n @Prop() public readonly size?: BadgeCounterSize = 'standard'\n\n /**\n * Shows a stroke ring around the component for better visibility\n */\n @Prop() public readonly strokeRing: boolean = false\n\n /**\n * The badge-counter's value.\n */\n @Prop() public readonly value!: number | string\n\n get #computedValue(): string {\n const value =\n typeof this.value === 'string'\n ? Number.parseInt(this.value, 10)\n : // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n (this.value ?? Number.NaN)\n if (Number.isNaN(value) || value < 0) return ''\n\n return value < 100 ? value.toString() : '99+'\n }\n\n get #computedImportance(): BadgeCounterImportance {\n switch (this.importance) {\n case 'subdued':\n case 'destructive':\n case 'subdued-destructive':\n case 'emphasized': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedSize(): BadgeCounterSize {\n switch (this.size) {\n case 'hero':\n case 'large':\n case 'small': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n public render() {\n return (\n <span\n class={{\n 'qds-badge-counter': true,\n 'qds-stroke-ring': this.strokeRing,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n >\n {this.#computedValue}\n <span class=\"qds-sr-only\">{this.description}</span>\n </span>\n )\n }\n}\n","/*\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-badge-indicator {\n align-items: center;\n background-color: var(--qds-theme-feedback-message-neutral);\n border-radius: var(--qds-feedback-rounded-border-radius);\n display: flex;\n height: var(--qds-badge-indicator-standard-height);\n justify-content: center;\n width: var(--qds-badge-indicator-standard-height);\n}\n\n.qds-stroke-ring {\n border: var(--qds-feedback-badge-border-width) solid\n var(--qds-theme-feedback-message-neutral-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-status='error'] {\n background-color: var(--qds-theme-feedback-message-critical);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='info'] {\n background-color: var(--qds-theme-feedback-message-informational);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='neutral'] {\n background-color: var(--qds-theme-feedback-message-neutral);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='success'] {\n background-color: var(--qds-theme-signature-color-default);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='warning'] {\n background-color: var(--qds-theme-feedback-message-important);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-size='small'] {\n height: var(--qds-feedback-badge-indicator-small-size);\n width: var(--qds-feedback-badge-indicator-small-size);\n}\n\n[data-size='standard'] {\n height: var(--qds-feedback-badge-indicator-standard-size);\n width: var(--qds-feedback-badge-indicator-standard-size);\n}\n\n[data-size='large'] {\n height: var(--qds-feedback-badge-indicator-large-size);\n width: var(--qds-feedback-badge-indicator-large-size);\n}\n\n[data-size='hero'] {\n height: var(--qds-feedback-badge-indicator-hero-size);\n width: var(--qds-feedback-badge-indicator-hero-size);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, h, Prop } from '@stencil/core'\n\nimport type { Size, Status } from '../shared'\n\nexport type BadgeIndicatorSize = Size | 'hero'\nexport type BadgeIndicatorStatus = Status | 'neutral'\n\n/**\n * The `<qds-badge-indicator>` element is a small, rounded UI element used to\n * display status indicators. It is designed to draw the user's eye to\n * important or dynamic content by providing a visual cue that an event has\n * occurred or is waiting to be addressed.\n */\n@Component({\n tag: 'qds-badge-indicator',\n shadow: true,\n styleUrl: 'badge-indicator.css',\n})\nexport class BadgeIndicator implements ComponentInterface {\n /**\n * Adds accessible text to the qds-badge-indicator that will be used by\n * screen readers.\n *\n * @example\n * <qds-badge-indicator description=\"success\"></qds-badge-indicator>\n * // This qds-badge-indicator will be read by screen readers as \"success\"\n */\n @Prop() public readonly description?: string\n\n /**\n * The badge indicator's size.\n */\n @Prop() public readonly size?: BadgeIndicatorSize = 'standard'\n\n /**\n * The badge indicator's status.\n */\n @Prop() public readonly status?: BadgeIndicatorStatus = 'neutral'\n\n /**\n * Shows a stroke ring around the badge indicator for better visibility.\n */\n @Prop() public readonly strokeRing: boolean = false\n\n get #computedStatus(): BadgeIndicatorStatus {\n switch (this.status) {\n case 'error':\n case 'info':\n case 'success':\n case 'warning': {\n return this.status\n }\n default: {\n return 'neutral'\n }\n }\n }\n\n get #computedSize(): BadgeIndicatorSize {\n switch (this.size) {\n case 'hero':\n case 'large':\n case 'small': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n public render() {\n return (\n <div\n class={{\n 'qds-badge-indicator': true,\n 'qds-stroke-ring': this.strokeRing,\n }}\n data-size={this.#computedSize}\n data-status={this.#computedStatus}\n >\n <span class=\"qds-sr-only\">{this.description}</span>\n </div>\n )\n }\n}\n"],"names":["h","__classPrivateFieldGet"],"mappings":";;;;;;;;;AAAA,MAAM,eAAe,GAAG,i1EAAi1E;;ACAz2E;AACA;AACA;;;;;;;;;MAwBa,YAAY,GAAA,MAAA;AALzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAgBE;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAA4B,UAAU;AAExE;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAsB,UAAU;AAE5D;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AA4DpD;IAfQ,MAAM,GAAA;QACX,QACEA,OACE,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE;AACL,gBAAA,mBAAmB,EAAE,IAAI;gBACzB,iBAAiB,EAAE,IAAI,CAAC,UAAU;aACnC,EAAA,iB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":"qds-badge-counter.qds-badge-indicator.entry.cjs.js","sources":["src/components/badge-counter/badge-counter.css?tag=qds-badge-counter&encapsulation=shadow","src/components/badge-counter/badge-counter.tsx","src/components/badge-indicator/badge-indicator.css?tag=qds-badge-indicator&encapsulation=shadow","src/components/badge-indicator/badge-indicator.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-badge-counter {\n align-items: center;\n background-color: var(--qds-theme-feedback-message-neutral);\n border-radius: var(--qds-feedback-rounded-border-radius);\n color: var(--qds-theme-feedback-message-neutral-contrast);\n display: flex;\n font: var(--qds-feedback-badge-counter-standard-text);\n height: var(--qds-feedback-badge-counter-standard-height);\n min-width: var(--qds-feedback-badge-counter-standard-min-width);\n justify-content: center;\n margin: 0;\n padding-inline: var(--qds-feedback-badge-counter-standard-padding-horizontal);\n text-align: center;\n}\n\n.qds-stroke-ring {\n border: var(--qds-feedback-badge-border-width) solid\n var(--qds-theme-feedback-message-neutral-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-importance='emphasized'] {\n background-color: var(--qds-theme-signature-color-contrast);\n color: var(--qds-theme-signature-color-default);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-signature-color-default);\n }\n}\n\n[data-importance='subdued'] {\n background-color: var(--qds-theme-feedback-message-informational);\n color: var(--qds-theme-feedback-message-informational-contrast);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-informational-contrast);\n }\n}\n\n[data-importance='destructive'] {\n background-color: var(--qds-theme-feedback-message-critical-contrast);\n color: var(--qds-theme-feedback-message-critical);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-critical);\n }\n}\n\n[data-importance='subdued-destructive'] {\n color: var(--qds-theme-feedback-message-critical-contrast);\n background-color: var(--qds-theme-feedback-message-critical);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-critical-contrast);\n }\n}\n\n[data-size='small'] {\n font: var(--qds-feedback-badge-counter-small-text);\n height: var(--qds-feedback-badge-counter-small-height);\n min-width: var(--qds-feedback-badge-counter-small-min-width);\n padding-inline: var(--qds-feedback-badge-counter-small-padding-horizontal);\n}\n\n[data-size='large'] {\n font: var(--qds-feedback-badge-counter-large-text);\n height: var(--qds-feedback-badge-counter-large-height);\n min-width: var(--qds-feedback-badge-counter-large-min-width);\n padding-inline: var(--qds-feedback-badge-counter-large-padding-horizontal);\n}\n\n[data-size='hero'] {\n font: var(--qds-feedback-badge-counter-hero-text);\n height: var(--qds-feedback-badge-counter-hero-height);\n padding-inline: var(--qds-feedback-badge-counter-hero-padding-horizontal);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, h, Prop } from '@stencil/core'\n\nimport type { Importance, Size } from '../shared'\n\nexport type BadgeCounterImportance =\n | Importance\n | 'destructive'\n | 'subdued-destructive'\nexport type BadgeCounterSize = Size | 'hero'\n\n/**\n * The `<qds-badge-counter>` element is a small, rounded UI element used to\n * display numerical values or counts. It is designed to draw the user's eye to\n * important or dynamic content by providing a visual cue that a countable\n * event or item has occurred or is waiting to be addressed.\n */\n@Component({\n tag: 'qds-badge-counter',\n shadow: true,\n styleUrl: 'badge-counter.css',\n})\nexport class BadgeCounter implements ComponentInterface {\n /**\n * Adds accessible text to the qds-badge-counter that will be used by screen\n * readers.\n *\n * @example\n * <qds-badge-counter value={2} description=\"new notifications\"></qds-badge-counter>\n * // This qds-badge-counter will be read by screen readers as \"two new notifications\"\n */\n @Prop() public readonly description?: string\n\n /**\n * The badge counter's importance.\n */\n @Prop() public readonly importance?: BadgeCounterImportance = 'standard'\n\n /**\n * The badge counter's size.\n */\n @Prop() public readonly size?: BadgeCounterSize = 'standard'\n\n /**\n * Shows a stroke ring around the component for better visibility\n */\n @Prop() public readonly strokeRing: boolean = false\n\n /**\n * The badge-counter's value.\n */\n @Prop() public readonly value!: number | string\n\n get #computedValue(): string {\n const value =\n typeof this.value === 'string'\n ? Number.parseInt(this.value, 10)\n : // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n (this.value ?? Number.NaN)\n if (Number.isNaN(value) || value < 0) return ''\n\n return value < 100 ? value.toString() : '99+'\n }\n\n get #computedImportance(): BadgeCounterImportance {\n switch (this.importance) {\n case 'subdued':\n case 'destructive':\n case 'subdued-destructive':\n case 'emphasized': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedSize(): BadgeCounterSize {\n switch (this.size) {\n case 'hero':\n case 'large':\n case 'small': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n public render() {\n return (\n <span\n class={{\n 'qds-badge-counter': true,\n 'qds-stroke-ring': this.strokeRing,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n >\n {this.#computedValue}\n <span class=\"qds-sr-only\">{this.description}</span>\n </span>\n )\n }\n}\n","/*\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-badge-indicator {\n align-items: center;\n background-color: var(--qds-theme-feedback-message-neutral);\n border-radius: var(--qds-feedback-rounded-border-radius);\n display: flex;\n height: var(--qds-badge-indicator-standard-height);\n justify-content: center;\n width: var(--qds-badge-indicator-standard-height);\n}\n\n.qds-stroke-ring {\n border: var(--qds-feedback-badge-border-width) solid\n var(--qds-theme-feedback-message-neutral-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-status='error'] {\n background-color: var(--qds-theme-feedback-message-critical);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='info'] {\n background-color: var(--qds-theme-feedback-message-informational);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='neutral'] {\n background-color: var(--qds-theme-feedback-message-neutral);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='success'] {\n background-color: var(--qds-theme-signature-color-default);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-status='warning'] {\n background-color: var(--qds-theme-feedback-message-important);\n\n &.qds-stroke-ring {\n border-color: var(--qds-theme-feedback-message-neutral-contrast);\n }\n}\n\n[data-size='small'] {\n height: var(--qds-feedback-badge-indicator-small-size);\n width: var(--qds-feedback-badge-indicator-small-size);\n}\n\n[data-size='standard'] {\n height: var(--qds-feedback-badge-indicator-standard-size);\n width: var(--qds-feedback-badge-indicator-standard-size);\n}\n\n[data-size='large'] {\n height: var(--qds-feedback-badge-indicator-large-size);\n width: var(--qds-feedback-badge-indicator-large-size);\n}\n\n[data-size='hero'] {\n height: var(--qds-feedback-badge-indicator-hero-size);\n width: var(--qds-feedback-badge-indicator-hero-size);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, h, Prop } from '@stencil/core'\n\nimport type { Size, Status } from '../shared'\n\nexport type BadgeIndicatorSize = Size | 'hero'\nexport type BadgeIndicatorStatus = Status | 'neutral'\n\n/**\n * The `<qds-badge-indicator>` element is a small, rounded UI element used to\n * display status indicators. It is designed to draw the user's eye to\n * important or dynamic content by providing a visual cue that an event has\n * occurred or is waiting to be addressed.\n */\n@Component({\n tag: 'qds-badge-indicator',\n shadow: true,\n styleUrl: 'badge-indicator.css',\n})\nexport class BadgeIndicator implements ComponentInterface {\n /**\n * Adds accessible text to the qds-badge-indicator that will be used by\n * screen readers.\n *\n * @example\n * <qds-badge-indicator description=\"success\"></qds-badge-indicator>\n * // This qds-badge-indicator will be read by screen readers as \"success\"\n */\n @Prop() public readonly description?: string\n\n /**\n * The badge indicator's size.\n */\n @Prop() public readonly size?: BadgeIndicatorSize = 'standard'\n\n /**\n * The badge indicator's status.\n */\n @Prop() public readonly status?: BadgeIndicatorStatus = 'neutral'\n\n /**\n * Shows a stroke ring around the badge indicator for better visibility.\n */\n @Prop() public readonly strokeRing: boolean = false\n\n get #computedStatus(): BadgeIndicatorStatus {\n switch (this.status) {\n case 'error':\n case 'info':\n case 'success':\n case 'warning': {\n return this.status\n }\n default: {\n return 'neutral'\n }\n }\n }\n\n get #computedSize(): BadgeIndicatorSize {\n switch (this.size) {\n case 'hero':\n case 'large':\n case 'small': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n public render() {\n return (\n <div\n class={{\n 'qds-badge-indicator': true,\n 'qds-stroke-ring': this.strokeRing,\n }}\n data-size={this.#computedSize}\n data-status={this.#computedStatus}\n >\n <span class=\"qds-sr-only\">{this.description}</span>\n </div>\n )\n }\n}\n"],"names":["h","__classPrivateFieldGet"],"mappings":";;;;;;;;;AAAA,MAAM,eAAe,GAAG,wgFAAwgF;;ACAhiF;AACA;AACA;;;;;;;;;MAwBa,YAAY,GAAA,MAAA;AALzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAgBE;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAA4B,UAAU;AAExE;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAsB,UAAU;AAE5D;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AA4DpD;IAfQ,MAAM,GAAA;QACX,QACEA,OACE,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE;AACL,gBAAA,mBAAmB,EAAE,IAAI;gBAC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AAO,UAAU;;;AAGvB,CAAC;;;;;;"}
@@ -7,7 +7,7 @@
7
7
 
8
8
  var index = require('./index-DIY7gpXM.js');
9
9
 
10
- const badgeCounterCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-badge-counter{align-items:center;background-color:var(--qds-theme-feedback-message-neutral);border-radius:var(--qds-feedback-rounded-border-radius);color:var(--qds-theme-feedback-message-neutral-contrast);display:flex;font:var(--qds-feedback-badge-counter-standard-text);height:var(--qds-feedback-badge-counter-standard-height);justify-content:center;margin:0;padding-inline:var(--qds-feedback-badge-counter-standard-padding-horizontal);text-align:center}.qds-stroke-ring{border:var(--qds-feedback-badge-border-width) solid var(--qds-theme-feedback-message-neutral-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-importance=emphasized]{background-color:var(--qds-theme-signature-color-contrast);color:var(--qds-theme-signature-color-default)}.qds-stroke-ring[data-importance=emphasized]{border-color:var(--qds-theme-signature-color-default)}[data-importance=subdued]{background-color:var(--qds-theme-feedback-message-informational);color:var(--qds-theme-feedback-message-informational-contrast)}.qds-stroke-ring[data-importance=subdued]{border-color:var(--qds-theme-feedback-message-informational-contrast)}[data-importance=destructive]{background-color:var(--qds-theme-feedback-message-critical-contrast);color:var(--qds-theme-feedback-message-critical)}.qds-stroke-ring[data-importance=destructive]{border-color:var(--qds-theme-feedback-message-critical)}[data-importance=subdued-destructive]{background-color:var(--qds-theme-feedback-message-critical);color:var(--qds-theme-feedback-message-critical-contrast)}.qds-stroke-ring[data-importance=subdued-destructive]{border-color:var(--qds-theme-feedback-message-critical-contrast)}[data-size=small]{font:var(--qds-feedback-badge-counter-small-text);height:var(--qds-feedback-badge-counter-small-height);padding-inline:var(--qds-feedback-badge-counter-small-padding-horizontal)}[data-size=large]{font:var(--qds-feedback-badge-counter-large-text);height:var(--qds-feedback-badge-counter-large-height);padding-inline:var(--qds-feedback-badge-counter-large-padding-horizontal)}[data-size=hero]{font:var(--qds-feedback-badge-counter-hero-text);height:var(--qds-feedback-badge-counter-hero-height);padding-inline:var(--qds-feedback-badge-counter-hero-padding-horizontal)}";
10
+ const badgeCounterCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-badge-counter{align-items:center;background-color:var(--qds-theme-feedback-message-neutral);border-radius:var(--qds-feedback-rounded-border-radius);color:var(--qds-theme-feedback-message-neutral-contrast);display:flex;font:var(--qds-feedback-badge-counter-standard-text);height:var(--qds-feedback-badge-counter-standard-height);justify-content:center;margin:0;min-width:var(--qds-feedback-badge-counter-standard-min-width);padding-inline:var(--qds-feedback-badge-counter-standard-padding-horizontal);text-align:center}.qds-stroke-ring{border:var(--qds-feedback-badge-border-width) solid var(--qds-theme-feedback-message-neutral-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-importance=emphasized]{background-color:var(--qds-theme-signature-color-contrast);color:var(--qds-theme-signature-color-default)}.qds-stroke-ring[data-importance=emphasized]{border-color:var(--qds-theme-signature-color-default)}[data-importance=subdued]{background-color:var(--qds-theme-feedback-message-informational);color:var(--qds-theme-feedback-message-informational-contrast)}.qds-stroke-ring[data-importance=subdued]{border-color:var(--qds-theme-feedback-message-informational-contrast)}[data-importance=destructive]{background-color:var(--qds-theme-feedback-message-critical-contrast);color:var(--qds-theme-feedback-message-critical)}.qds-stroke-ring[data-importance=destructive]{border-color:var(--qds-theme-feedback-message-critical)}[data-importance=subdued-destructive]{background-color:var(--qds-theme-feedback-message-critical);color:var(--qds-theme-feedback-message-critical-contrast)}.qds-stroke-ring[data-importance=subdued-destructive]{border-color:var(--qds-theme-feedback-message-critical-contrast)}[data-size=small]{font:var(--qds-feedback-badge-counter-small-text);height:var(--qds-feedback-badge-counter-small-height);min-width:var(--qds-feedback-badge-counter-small-min-width);padding-inline:var(--qds-feedback-badge-counter-small-padding-horizontal)}[data-size=large]{font:var(--qds-feedback-badge-counter-large-text);height:var(--qds-feedback-badge-counter-large-height);min-width:var(--qds-feedback-badge-counter-large-min-width);padding-inline:var(--qds-feedback-badge-counter-large-padding-horizontal)}[data-size=hero]{font:var(--qds-feedback-badge-counter-hero-text);height:var(--qds-feedback-badge-counter-hero-height);padding-inline:var(--qds-feedback-badge-counter-hero-padding-horizontal)}";
11
11
 
12
12
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
13
13
  //
@@ -102,9 +102,9 @@ const QdsBreadcrumbItem = class {
102
102
  return (index.h("div", { key: '98651d2afead065d1dc9955fecbba5a3c56b9c99', class: {
103
103
  'qds-breadcrumb-item': true,
104
104
  'qds-disabled': __classPrivateFieldGet(this, _QdsBreadcrumbItem_instances, "a", _QdsBreadcrumbItem_computedDisabled_get),
105
- }, ref: this.href === undefined ? __classPrivateFieldGet(this, _QdsBreadcrumbItem_breadcrumbItemRef, "f") : undefined, tabIndex: this.tooltip && this.href === undefined ? 0 : undefined }, this.iconName !== undefined && this.iconName !== '' && (index.h("qds-icon", { key: '148c315f31e52b9766689d8f0bed862cf1d96e28', "aria-hidden": "true", class: "qds-icon", library: this.iconLibrary, name: this.iconName })), this.href === undefined || __classPrivateFieldGet(this, _QdsBreadcrumbItem_instances, "a", _QdsBreadcrumbItem_isCurrentPage_get)
105
+ }, ref: this.href === undefined ? __classPrivateFieldGet(this, _QdsBreadcrumbItem_breadcrumbItemRef, "f") : undefined, tabIndex: this.tooltip && this.href === undefined ? 0 : undefined }, this.iconName !== undefined && this.iconName !== '' && (index.h("qds-icon", { key: '9126433ac3532b3716d5821568d65a74b45c7145', class: "qds-icon", library: this.iconLibrary, name: this.iconName })), this.href === undefined || __classPrivateFieldGet(this, _QdsBreadcrumbItem_instances, "a", _QdsBreadcrumbItem_isCurrentPage_get)
106
106
  ? __classPrivateFieldGet(this, _QdsBreadcrumbItem_instances, "m", _QdsBreadcrumbItem_renderText).call(this)
107
- : __classPrivateFieldGet(this, _QdsBreadcrumbItem_instances, "m", _QdsBreadcrumbItem_renderAnchor).call(this), this.tooltip && (index.h("qds-tooltip", { key: 'b17a3515b3f6c786bfdd16f4e01e951c477c1c66', "aria-hidden": "true", ref: __classPrivateFieldGet(this, _QdsBreadcrumbItem_tooltipRef, "f") }, this.text))));
107
+ : __classPrivateFieldGet(this, _QdsBreadcrumbItem_instances, "m", _QdsBreadcrumbItem_renderAnchor).call(this), this.tooltip && (index.h("qds-tooltip", { key: '8db1c84dea739706bb39ebbfe3824b4adbe2765c', "aria-hidden": "true", ref: __classPrivateFieldGet(this, _QdsBreadcrumbItem_tooltipRef, "f") }, this.text))));
108
108
  }
109
109
  static get delegatesFocus() { return true; }
110
110
  static get watchers() { return {
@@ -1 +1 @@
1
- {"version":3,"file":"qds-breadcrumb-item.entry.cjs.js","sources":["src/components/breadcrumb-item/breadcrumb-item.css?tag=qds-breadcrumb-item&encapsulation=shadow","src/components/breadcrumb-item/breadcrumb-item.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-breadcrumb-item {\n align-items: center;\n display: inline-flex;\n font: var(--qds-control-standard-text);\n gap: var(--qds-control-standard-gap-siblings-related);\n min-height: var(--qds-control-standard-height);\n width: inherit;\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 height: var(--qds-control-standard-icon-size);\n width: var(--qds-control-standard-icon-size);\n}\n\n.qds-divider {\n margin-inline: auto;\n}\n\n.qds-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.qds-anchor {\n font: var(--qds-control-standard-link);\n}\n\n.qds-anchor,\n.qds-breadcrumb-item {\n color: var(--qds-theme-control-text-standard);\n\n &:focus-visible {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n border-radius: var(--qds-control-border-radius);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, JSX } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Fragment,\n h,\n Listen,\n Prop,\n readTask,\n State,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport { isCurrentPage, isEllipsisActive } from '../../helpers'\n\nexport type BreadcrumbTarget = '_blank' | '_parent' | '_self' | '_top'\n\n/**\n * The `<qds-breadcrumb-item>` element is used as a navigational aid that is\n * typically placed between a site's header and the main content, displaying\n * either a hierarchy of the current page in relation to the site's structure,\n * from top level to current page, or a list of the links the user followed to\n * get to the current page, in the order visited.\n *\n * @see https://quartz.se.com/build/components/breadcrumb\n */\n@Component({\n tag: 'qds-breadcrumb-item',\n styleUrl: 'breadcrumb-item.css',\n shadow: { delegatesFocus: true },\n})\nexport class QdsBreadcrumbItem implements ComponentInterface {\n /**\n * The breadcrumb item's text.\n */\n @Prop() public readonly text!: string\n\n /**\n * Prevents the breadcrumb item 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 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 * - 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?: 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<BreadcrumbTarget, string>\n\n @State() private tooltip = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #breadcrumbItem?: HTMLAnchorElement | HTMLDivElement\n\n #ro?: ResizeObserver\n\n #span?: HTMLSpanElement\n\n get #computedDisabled(): boolean {\n return this.disabled\n }\n\n get #isCurrentPage(): boolean {\n if (this.href === undefined) return false\n return isCurrentPage(this.href)\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) event.stopImmediatePropagation()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.disabled.toString()\n }\n\n @Watch('text')\n protected textChanged(): void {\n if (this.#ro) this.#ro.disconnect()\n\n if (!this.#span) return\n\n const span = this.#span\n readTask(() => {\n this.tooltip = isEllipsisActive(span)\n })\n this.#ro = new ResizeObserver(([spanEntry]) => {\n this.tooltip = isEllipsisActive(spanEntry.target as HTMLSpanElement)\n })\n this.#ro.observe(this.#span)\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'listitem'\n this.disabledChanged()\n }\n\n public componentDidLoad(): void {\n this.textChanged()\n }\n\n public disconnectedCallback(): void {\n if (this.#ro) this.#ro.disconnect()\n }\n\n public render() {\n return (\n <div\n class={{\n 'qds-breadcrumb-item': true,\n 'qds-disabled': this.#computedDisabled,\n }}\n ref={this.href === undefined ? this.#breadcrumbItemRef : undefined}\n tabIndex={this.tooltip && this.href === undefined ? 0 : undefined}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n {this.href === undefined || this.#isCurrentPage\n ? this.#renderText()\n : this.#renderAnchor()}\n {this.tooltip && (\n <qds-tooltip aria-hidden=\"true\" ref={this.#tooltipRef}>\n {this.text}\n </qds-tooltip>\n )}\n </div>\n )\n }\n\n #renderAnchor(): JSX.Element {\n return (\n <>\n <span class=\"qds-overflow\" ref={this.#spanRef}>\n <a\n class=\"qds-anchor\"\n href={this.href}\n hrefLang={this.hreflang}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n ref={this.href === undefined ? undefined : this.#breadcrumbItemRef}\n target={this.target}\n >\n {this.text}\n </a>\n </span>\n <span aria-hidden=\"true\" class=\"qds-divider\">\n /\n </span>\n </>\n )\n }\n\n #renderText(): JSX.Element {\n return (\n <span class=\"qds-overflow\" ref={this.#spanRef}>\n {this.text}\n </span>\n )\n }\n\n readonly #breadcrumbItemRef = (\n breadcrumbItem?: HTMLAnchorElement | HTMLDivElement,\n ): void => {\n this.#breadcrumbItem = breadcrumbItem\n }\n\n readonly #spanRef = (span?: HTMLSpanElement): void => {\n this.#span = span\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.#breadcrumbItem\n }\n}\n"],"names":["readTask","isEllipsisActive","h","isCurrentPage","Fragment"],"mappings":";;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,69BAA69B;;ACAv/B;AACA;AACA;;;;;;;;;;;;;;;;;;MAkCa,iBAAiB,GAAA,MAAA;AAL9B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;AAWE;;;AAGG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AASjD;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAW,SAAS;AA8ItC,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;QAIhC,iCAAoD,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QAEpD,qBAAoB,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QAEpB,uBAAuB,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QA+Gd,oCAAqB,CAAA,GAAA,CAAA,IAAA,EAAA,CAC5B,cAAmD,KAC3C;YACR,sBAAA,CAAA,IAAI,EAAA,iCAAA,EAAmB,cAAc,EAAA,GAAA,CAAA;AACvC,SAAC,CAAA;QAEQ,0BAAW,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,IAAsB,KAAU;YACnD,sBAAA,CAAA,IAAI,EAAA,uBAAA,EAAS,IAAI,EAAA,GAAA,CAAA;AACnB,SAAC,CAAA;QAEQ,6BAAc,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,OAA+B,KAAU;AAC/D,YAAA,IAAI,OAAO;;gBAET,OAAO,CAAC,MAAM,GAAG,sBAAA,CAAA,IAAI,yCAAgB;AACzC,SAAC,CAAA;AACF;AAlHW,IAAA,OAAO,CAAC,KAAiB,EAAA;QACjC,IAAI,sBAAA,CAAA,IAAI,EAAkB,4BAAA,EAAA,GAAA,EAAA,uCAAA,CAAA;YAAE,KAAK,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,CAAC;AACjC,CAAC,EAAA,+BAAA,GAAA,SAAA,+BAAA,GAAA;IAwEC,QACED,OAAA,CAAAE,cAAA,EAAA,IAAA,EACEF,OAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,cAAc,EAAC,GAAG,EAAE,sBAAA,CAAA,IAAI,EAAS,0BAAA,EAAA,GAAA,CAAA,EAAA,EAC3CA,OACE,CAAA,GAAA,EAAA,EAAA,KAAK,EAAC,YAAY,EAClB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS,GAAG,SAAS,GAAG,sBAAA,CAAA,IAAI,EAAmB,oCAAA,EAAA,GAAA,CAAA,EAClE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAA,EAElB,IAAI,CAAC,IAAI,CACR,CACC,EACPA,OAAkB,CAAA,MAAA,EAAA,EAAA,aAAA,EAAA,MAAM,EAAC,KAAK,EAAC,aAAa,EAErC,EAAA,GAAA,CAAA,CACN;AAEP,CAAC,EAAA,6BAAA,GAAA,SAAA,6BAAA,GAAA;IAGC,QACEA,OAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,cAAc,EAAC,GAAG,EAAE,sBAAA,CAAA,IAAI,kCAAS,EAC1C,EAAA,IAAI,CAAC,IAAI,CACL;AAEX,CAAC;;;;;"}
1
+ {"version":3,"file":"qds-breadcrumb-item.entry.cjs.js","sources":["src/components/breadcrumb-item/breadcrumb-item.css?tag=qds-breadcrumb-item&encapsulation=shadow","src/components/breadcrumb-item/breadcrumb-item.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-breadcrumb-item {\n align-items: center;\n display: inline-flex;\n font: var(--qds-control-standard-text);\n gap: var(--qds-control-standard-gap-siblings-related);\n min-height: var(--qds-control-standard-height);\n width: inherit;\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 height: var(--qds-control-standard-icon-size);\n width: var(--qds-control-standard-icon-size);\n}\n\n.qds-divider {\n margin-inline: auto;\n}\n\n.qds-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.qds-anchor {\n font: var(--qds-control-standard-link);\n}\n\n.qds-anchor,\n.qds-breadcrumb-item {\n color: var(--qds-theme-control-text-standard);\n\n &:focus-visible {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n border-radius: var(--qds-control-border-radius);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, JSX } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Fragment,\n h,\n Listen,\n Prop,\n readTask,\n State,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport { isCurrentPage, isEllipsisActive } from '../../helpers'\n\nexport type BreadcrumbTarget = '_blank' | '_parent' | '_self' | '_top'\n\n/**\n * The `<qds-breadcrumb-item>` element is used as a navigational aid that is\n * typically placed between a site's header and the main content, displaying\n * either a hierarchy of the current page in relation to the site's structure,\n * from top level to current page, or a list of the links the user followed to\n * get to the current page, in the order visited.\n *\n * @see https://quartz.se.com/build/components/breadcrumb\n */\n@Component({\n tag: 'qds-breadcrumb-item',\n styleUrl: 'breadcrumb-item.css',\n shadow: { delegatesFocus: true },\n})\nexport class QdsBreadcrumbItem implements ComponentInterface {\n /**\n * The breadcrumb item's text.\n */\n @Prop() public readonly text!: string\n\n /**\n * Prevents the breadcrumb item 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 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 * - 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?: 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<BreadcrumbTarget, string>\n\n @State() private tooltip = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #breadcrumbItem?: HTMLAnchorElement | HTMLDivElement\n\n #ro?: ResizeObserver\n\n #span?: HTMLSpanElement\n\n get #computedDisabled(): boolean {\n return this.disabled\n }\n\n get #isCurrentPage(): boolean {\n if (this.href === undefined) return false\n return isCurrentPage(this.href)\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) event.stopImmediatePropagation()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.disabled.toString()\n }\n\n @Watch('text')\n protected textChanged(): void {\n if (this.#ro) this.#ro.disconnect()\n\n if (!this.#span) return\n\n const span = this.#span\n readTask(() => {\n this.tooltip = isEllipsisActive(span)\n })\n this.#ro = new ResizeObserver(([spanEntry]) => {\n this.tooltip = isEllipsisActive(spanEntry.target as HTMLSpanElement)\n })\n this.#ro.observe(this.#span)\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'listitem'\n this.disabledChanged()\n }\n\n public componentDidLoad(): void {\n this.textChanged()\n }\n\n public disconnectedCallback(): void {\n if (this.#ro) this.#ro.disconnect()\n }\n\n public render() {\n return (\n <div\n class={{\n 'qds-breadcrumb-item': true,\n 'qds-disabled': this.#computedDisabled,\n }}\n ref={this.href === undefined ? this.#breadcrumbItemRef : undefined}\n tabIndex={this.tooltip && this.href === undefined ? 0 : undefined}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n {this.href === undefined || this.#isCurrentPage\n ? this.#renderText()\n : this.#renderAnchor()}\n {this.tooltip && (\n <qds-tooltip aria-hidden=\"true\" ref={this.#tooltipRef}>\n {this.text}\n </qds-tooltip>\n )}\n </div>\n )\n }\n\n #renderAnchor(): JSX.Element {\n return (\n <>\n <span class=\"qds-overflow\" ref={this.#spanRef}>\n <a\n class=\"qds-anchor\"\n href={this.href}\n hrefLang={this.hreflang}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n ref={this.href === undefined ? undefined : this.#breadcrumbItemRef}\n target={this.target}\n >\n {this.text}\n </a>\n </span>\n <span aria-hidden=\"true\" class=\"qds-divider\">\n /\n </span>\n </>\n )\n }\n\n #renderText(): JSX.Element {\n return (\n <span class=\"qds-overflow\" ref={this.#spanRef}>\n {this.text}\n </span>\n )\n }\n\n readonly #breadcrumbItemRef = (\n breadcrumbItem?: HTMLAnchorElement | HTMLDivElement,\n ): void => {\n this.#breadcrumbItem = breadcrumbItem\n }\n\n readonly #spanRef = (span?: HTMLSpanElement): void => {\n this.#span = span\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.#breadcrumbItem\n }\n}\n"],"names":["readTask","isEllipsisActive","h","isCurrentPage","Fragment"],"mappings":";;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,69BAA69B;;ACAv/B;AACA;AACA;;;;;;;;;;;;;;;;;;MAkCa,iBAAiB,GAAA,MAAA;AAL9B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;AAWE;;;AAGG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AASjD;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAW,SAAS;AA8ItC,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;QAIhC,iCAAoD,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QAEpD,qBAAoB,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QAEpB,uBAAuB,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QA8Gd,oCAAqB,CAAA,GAAA,CAAA,IAAA,EAAA,CAC5B,cAAmD,KAC3C;YACR,sBAAA,CAAA,IAAI,EAAA,iCAAA,EAA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