@quartzds/core 1.0.0-beta.13 → 1.0.0-beta.130

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 (444) hide show
  1. package/CHANGELOG.md +2145 -0
  2. package/README.md +23 -23
  3. package/components/index.d.ts +52 -0
  4. package/components/index.js +63 -28
  5. package/components/index.js.map +1 -1
  6. package/components/p-B9xuNEzc.js +438 -0
  7. package/components/p-B9xuNEzc.js.map +1 -0
  8. package/components/p-BHBodFuD.js +200 -0
  9. package/components/p-BHBodFuD.js.map +1 -0
  10. package/components/p-BLA62eFO.js +513 -0
  11. package/components/p-BLA62eFO.js.map +1 -0
  12. package/components/p-Bn9o5Um2.js +91 -0
  13. package/components/p-Bn9o5Um2.js.map +1 -0
  14. package/components/{floating-ui.dom.esm.js → p-Bv2vPjgL.js} +557 -345
  15. package/components/p-Bv2vPjgL.js.map +1 -0
  16. package/components/p-C-pZcrGt.js +357 -0
  17. package/components/p-C-pZcrGt.js.map +1 -0
  18. package/components/p-CZRW1LV_.js +28 -0
  19. package/components/p-CZRW1LV_.js.map +1 -0
  20. package/components/p-Cb4tcewD.js +281 -0
  21. package/components/p-Cb4tcewD.js.map +1 -0
  22. package/components/p-Cb5Tgh-o.js +102 -0
  23. package/components/p-Cb5Tgh-o.js.map +1 -0
  24. package/components/p-D2489VzR.js +2133 -0
  25. package/components/p-D2489VzR.js.map +1 -0
  26. package/components/p-D2BuSQre.js +160 -0
  27. package/components/p-D2BuSQre.js.map +1 -0
  28. package/components/p-DL21f4D7.js +149 -0
  29. package/components/p-DL21f4D7.js.map +1 -0
  30. package/components/p-DOqfdgQA.js +124 -0
  31. package/components/p-DOqfdgQA.js.map +1 -0
  32. package/components/p-Do46q_Gd.js +135 -0
  33. package/components/p-Do46q_Gd.js.map +1 -0
  34. package/components/p-XP2CY_fo.js +105 -0
  35. package/components/p-XP2CY_fo.js.map +1 -0
  36. package/components/p-eUDNu0SE.js +3561 -0
  37. package/components/p-eUDNu0SE.js.map +1 -0
  38. package/components/p-fKK7EmM2.js +256 -0
  39. package/components/p-fKK7EmM2.js.map +1 -0
  40. package/components/qds-action-item.d.ts +11 -0
  41. package/components/qds-action-item.js +204 -0
  42. package/components/qds-action-item.js.map +1 -0
  43. package/components/qds-avatar-media.d.ts +11 -0
  44. package/components/qds-avatar-media.js +14 -0
  45. package/components/qds-avatar-media.js.map +1 -0
  46. package/components/qds-avatar.d.ts +11 -0
  47. package/components/qds-avatar.js +120 -0
  48. package/components/qds-avatar.js.map +1 -0
  49. package/components/qds-badge-counter.d.ts +11 -0
  50. package/components/qds-badge-counter.js +14 -0
  51. package/components/qds-badge-counter.js.map +1 -0
  52. package/components/qds-badge-indicator.d.ts +11 -0
  53. package/components/qds-badge-indicator.js +14 -0
  54. package/components/qds-badge-indicator.js.map +1 -0
  55. package/components/qds-breadcrumb-item.d.ts +11 -0
  56. package/components/qds-breadcrumb-item.js +174 -0
  57. package/components/qds-breadcrumb-item.js.map +1 -0
  58. package/components/qds-button.d.ts +2 -2
  59. package/components/qds-button.js +475 -129
  60. package/components/qds-button.js.map +1 -1
  61. package/components/qds-checkbox.d.ts +2 -2
  62. package/components/qds-checkbox.js +4 -146
  63. package/components/qds-checkbox.js.map +1 -1
  64. package/components/qds-chip.d.ts +11 -0
  65. package/components/qds-chip.js +337 -0
  66. package/components/qds-chip.js.map +1 -0
  67. package/components/qds-dialog.d.ts +2 -2
  68. package/components/qds-dialog.js +179 -93
  69. package/components/qds-dialog.js.map +1 -1
  70. package/components/qds-divider.d.ts +2 -2
  71. package/components/qds-divider.js +4 -39
  72. package/components/qds-divider.js.map +1 -1
  73. package/components/qds-dropdown.d.ts +2 -2
  74. package/components/qds-dropdown.js +4 -249
  75. package/components/qds-dropdown.js.map +1 -1
  76. package/components/qds-form-message.d.ts +2 -2
  77. package/components/qds-form-message.js +106 -50
  78. package/components/qds-form-message.js.map +1 -1
  79. package/components/qds-icon-button.d.ts +11 -0
  80. package/components/qds-icon-button.js +14 -0
  81. package/components/qds-icon-button.js.map +1 -0
  82. package/components/qds-icon-tab.d.ts +11 -0
  83. package/components/qds-icon-tab.js +312 -0
  84. package/components/qds-icon-tab.js.map +1 -0
  85. package/components/qds-icon.d.ts +2 -2
  86. package/components/qds-icon.js +4 -3
  87. package/components/qds-inline-link.d.ts +2 -2
  88. package/components/qds-inline-link.js +173 -74
  89. package/components/qds-inline-link.js.map +1 -1
  90. package/components/qds-input.d.ts +2 -2
  91. package/components/qds-input.js +579 -230
  92. package/components/qds-input.js.map +1 -1
  93. package/components/qds-label.d.ts +2 -2
  94. package/components/qds-label.js +156 -3
  95. package/components/qds-label.js.map +1 -1
  96. package/components/qds-list-item.d.ts +11 -0
  97. package/components/qds-list-item.js +430 -0
  98. package/components/qds-list-item.js.map +1 -0
  99. package/components/qds-loader.d.ts +11 -0
  100. package/components/qds-loader.js +152 -0
  101. package/components/qds-loader.js.map +1 -0
  102. package/components/qds-menu-item.d.ts +11 -0
  103. package/components/qds-menu-item.js +263 -0
  104. package/components/qds-menu-item.js.map +1 -0
  105. package/components/qds-mini-button.d.ts +11 -0
  106. package/components/qds-mini-button.js +14 -0
  107. package/components/qds-mini-button.js.map +1 -0
  108. package/components/qds-progress-bar.d.ts +11 -0
  109. package/components/qds-progress-bar.js +155 -0
  110. package/components/qds-progress-bar.js.map +1 -0
  111. package/components/qds-radio.d.ts +2 -2
  112. package/components/qds-radio.js +4 -99
  113. package/components/qds-radio.js.map +1 -1
  114. package/components/qds-select.d.ts +11 -0
  115. package/components/qds-select.js +377 -0
  116. package/components/qds-select.js.map +1 -0
  117. package/components/qds-standalone-link.d.ts +11 -0
  118. package/components/qds-standalone-link.js +210 -0
  119. package/components/qds-standalone-link.js.map +1 -0
  120. package/components/qds-switch.d.ts +2 -2
  121. package/components/qds-switch.js +257 -105
  122. package/components/qds-switch.js.map +1 -1
  123. package/components/qds-tab.d.ts +11 -0
  124. package/components/qds-tab.js +354 -0
  125. package/components/qds-tab.js.map +1 -0
  126. package/components/qds-tabbar.d.ts +11 -0
  127. package/components/qds-tabbar.js +599 -0
  128. package/components/qds-tabbar.js.map +1 -0
  129. package/components/qds-table-cell.d.ts +11 -0
  130. package/components/qds-table-cell.js +109 -0
  131. package/components/qds-table-cell.js.map +1 -0
  132. package/components/qds-table-head-cell.d.ts +11 -0
  133. package/components/qds-table-head-cell.js +115 -0
  134. package/components/qds-table-head-cell.js.map +1 -0
  135. package/components/qds-table-row.d.ts +11 -0
  136. package/components/qds-table-row.js +48 -0
  137. package/components/qds-table-row.js.map +1 -0
  138. package/components/qds-table.d.ts +11 -0
  139. package/components/qds-table.js +48 -0
  140. package/components/qds-table.js.map +1 -0
  141. package/components/qds-tag.d.ts +11 -0
  142. package/components/qds-tag.js +14 -0
  143. package/components/qds-tag.js.map +1 -0
  144. package/components/qds-textarea.d.ts +2 -2
  145. package/components/qds-textarea.js +352 -193
  146. package/components/qds-textarea.js.map +1 -1
  147. package/components/qds-title.d.ts +2 -2
  148. package/components/qds-title.js +4 -84
  149. package/components/qds-title.js.map +1 -1
  150. package/components/qds-tooltip.d.ts +2 -2
  151. package/components/qds-tooltip.js +4 -315
  152. package/components/qds-tooltip.js.map +1 -1
  153. package/dist/cjs/app-globals-CLoao1by.js +13 -0
  154. package/dist/cjs/app-globals-CLoao1by.js.map +1 -0
  155. package/dist/cjs/controls-DKGeNyr5.js +32 -0
  156. package/dist/cjs/controls-DKGeNyr5.js.map +1 -0
  157. package/dist/cjs/{floating-ui.dom.esm-7f1cac3e.js → floating-ui.dom-Bvzubd50.js} +557 -345
  158. package/dist/cjs/floating-ui.dom-Bvzubd50.js.map +1 -0
  159. package/dist/cjs/helpers-D6srVOLt.js +3584 -0
  160. package/dist/cjs/helpers-D6srVOLt.js.map +1 -0
  161. package/dist/cjs/index-DIY7gpXM.js +2376 -0
  162. package/dist/cjs/index-DIY7gpXM.js.map +1 -0
  163. package/dist/cjs/index.cjs.js +40 -31
  164. package/dist/cjs/index.cjs.js.map +1 -1
  165. package/dist/cjs/library-CeKRI2f2.js +142 -0
  166. package/dist/cjs/library-CeKRI2f2.js.map +1 -0
  167. package/dist/cjs/loader.cjs.js +9 -10
  168. package/dist/cjs/loader.cjs.js.map +1 -1
  169. package/dist/cjs/qds-action-item.cjs.entry.js +165 -0
  170. package/dist/cjs/qds-action-item.entry.cjs.js.map +1 -0
  171. package/dist/cjs/qds-avatar-media.cjs.entry.js +105 -0
  172. package/dist/cjs/qds-avatar-media.entry.cjs.js.map +1 -0
  173. package/dist/cjs/qds-avatar.cjs.entry.js +70 -0
  174. package/dist/cjs/qds-avatar.entry.cjs.js.map +1 -0
  175. package/dist/cjs/qds-badge-counter.qds-badge-indicator.entry.cjs.js.map +1 -0
  176. package/dist/cjs/qds-badge-counter_2.cjs.entry.js +168 -0
  177. package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +134 -0
  178. package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -0
  179. package/dist/cjs/qds-button.cjs.entry.js +402 -93
  180. package/dist/cjs/qds-button.entry.cjs.js.map +1 -0
  181. package/dist/cjs/qds-checkbox.qds-radio.entry.cjs.js.map +1 -0
  182. package/dist/cjs/qds-checkbox_2.cjs.entry.js +456 -0
  183. package/dist/cjs/qds-chip.cjs.entry.js +285 -0
  184. package/dist/cjs/qds-chip.entry.cjs.js.map +1 -0
  185. package/dist/cjs/qds-dialog.cjs.entry.js +124 -77
  186. package/dist/cjs/qds-dialog.entry.cjs.js.map +1 -0
  187. package/dist/cjs/qds-divider.qds-icon-button.entry.cjs.js.map +1 -0
  188. package/dist/cjs/qds-divider_2.cjs.entry.js +291 -0
  189. package/dist/cjs/qds-dropdown.cjs.entry.js +461 -213
  190. package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -0
  191. package/dist/cjs/qds-form-message.cjs.entry.js +80 -27
  192. package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -0
  193. package/dist/cjs/qds-icon-tab.cjs.entry.js +244 -0
  194. package/dist/cjs/qds-icon-tab.entry.cjs.js.map +1 -0
  195. package/dist/cjs/qds-icon.cjs.entry.js +92 -93
  196. package/dist/cjs/qds-icon.entry.cjs.js.map +1 -0
  197. package/dist/cjs/qds-inline-link.cjs.entry.js +139 -49
  198. package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -0
  199. package/dist/cjs/qds-input.cjs.entry.js +503 -188
  200. package/dist/cjs/qds-input.entry.cjs.js.map +1 -0
  201. package/dist/cjs/qds-label.cjs.entry.js +118 -27
  202. package/dist/cjs/qds-label.entry.cjs.js.map +1 -0
  203. package/dist/cjs/qds-list-item.cjs.entry.js +328 -0
  204. package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -0
  205. package/dist/cjs/qds-loader.cjs.entry.js +126 -0
  206. package/dist/cjs/qds-loader.entry.cjs.js.map +1 -0
  207. package/dist/cjs/qds-menu-item.cjs.entry.js +214 -0
  208. package/dist/cjs/qds-menu-item.entry.cjs.js.map +1 -0
  209. package/dist/cjs/qds-mini-button.cjs.entry.js +130 -0
  210. package/dist/cjs/qds-mini-button.entry.cjs.js.map +1 -0
  211. package/dist/cjs/qds-progress-bar.cjs.entry.js +131 -0
  212. package/dist/cjs/qds-progress-bar.entry.cjs.js.map +1 -0
  213. package/dist/cjs/qds-select.cjs.entry.js +331 -0
  214. package/dist/cjs/qds-select.entry.cjs.js.map +1 -0
  215. package/dist/cjs/qds-standalone-link.cjs.entry.js +171 -0
  216. package/dist/cjs/qds-standalone-link.entry.cjs.js.map +1 -0
  217. package/dist/cjs/qds-switch.cjs.entry.js +221 -67
  218. package/dist/cjs/qds-switch.entry.cjs.js.map +1 -0
  219. package/dist/cjs/qds-tab.cjs.entry.js +280 -0
  220. package/dist/cjs/qds-tab.entry.cjs.js.map +1 -0
  221. package/dist/cjs/qds-tabbar.cjs.entry.js +528 -0
  222. package/dist/cjs/qds-tabbar.entry.cjs.js.map +1 -0
  223. package/dist/cjs/qds-table-cell.cjs.entry.js +88 -0
  224. package/dist/cjs/qds-table-cell.entry.cjs.js.map +1 -0
  225. package/dist/cjs/qds-table-head-cell.cjs.entry.js +92 -0
  226. package/dist/cjs/qds-table-head-cell.entry.cjs.js.map +1 -0
  227. package/dist/cjs/qds-table-row.cjs.entry.js +34 -0
  228. package/dist/cjs/qds-table-row.entry.cjs.js.map +1 -0
  229. package/dist/cjs/qds-table.cjs.entry.js +34 -0
  230. package/dist/cjs/qds-table.entry.cjs.js.map +1 -0
  231. package/dist/cjs/qds-tag.cjs.entry.js +110 -0
  232. package/dist/cjs/qds-tag.entry.cjs.js.map +1 -0
  233. package/dist/cjs/qds-textarea.cjs.entry.js +303 -156
  234. package/dist/cjs/qds-textarea.entry.cjs.js.map +1 -0
  235. package/dist/cjs/qds-title.cjs.entry.js +61 -52
  236. package/dist/cjs/qds-title.entry.cjs.js.map +1 -0
  237. package/dist/cjs/qds-tooltip.cjs.entry.js +380 -264
  238. package/dist/cjs/qds-tooltip.entry.cjs.js.map +1 -0
  239. package/dist/cjs/qds.cjs.js +18 -17
  240. package/dist/cjs/qds.cjs.js.map +1 -1
  241. package/dist/custom-elements.json +13254 -2143
  242. package/dist/docs.d.ts +344 -240
  243. package/dist/docs.json +13958 -3308
  244. package/dist/esm/app-globals-WylVyaRG.js +11 -0
  245. package/dist/esm/app-globals-WylVyaRG.js.map +1 -0
  246. package/dist/esm/controls-CZRW1LV_.js +28 -0
  247. package/dist/esm/controls-CZRW1LV_.js.map +1 -0
  248. package/dist/esm/{floating-ui.dom.esm-c2f3e549.js → floating-ui.dom-Bv2vPjgL.js} +557 -345
  249. package/dist/esm/floating-ui.dom-Bv2vPjgL.js.map +1 -0
  250. package/dist/esm/helpers-BIo9VDPx.js +3561 -0
  251. package/dist/esm/helpers-BIo9VDPx.js.map +1 -0
  252. package/dist/esm/index-Hg1Liloy.js +2364 -0
  253. package/dist/esm/index-Hg1Liloy.js.map +1 -0
  254. package/dist/esm/index.js +40 -30
  255. package/dist/esm/index.js.map +1 -1
  256. package/dist/esm/library-CBfntPWH.js +138 -0
  257. package/dist/esm/library-CBfntPWH.js.map +1 -0
  258. package/dist/esm/loader.js +10 -9
  259. package/dist/esm/loader.js.map +1 -1
  260. package/dist/esm/qds-action-item.entry.js +163 -0
  261. package/dist/esm/qds-action-item.entry.js.map +1 -0
  262. package/dist/esm/qds-avatar-media.entry.js +103 -0
  263. package/dist/esm/qds-avatar-media.entry.js.map +1 -0
  264. package/dist/esm/qds-avatar.entry.js +68 -0
  265. package/dist/esm/qds-avatar.entry.js.map +1 -0
  266. package/dist/esm/qds-badge-counter.qds-badge-indicator.entry.js.map +1 -0
  267. package/dist/esm/qds-badge-counter_2.entry.js +165 -0
  268. package/dist/esm/qds-breadcrumb-item.entry.js +132 -0
  269. package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -0
  270. package/dist/esm/qds-button.entry.js +402 -91
  271. package/dist/esm/qds-button.entry.js.map +1 -1
  272. package/dist/esm/qds-checkbox.qds-radio.entry.js.map +1 -0
  273. package/dist/esm/qds-checkbox_2.entry.js +453 -0
  274. package/dist/esm/qds-chip.entry.js +283 -0
  275. package/dist/esm/qds-chip.entry.js.map +1 -0
  276. package/dist/esm/qds-dialog.entry.js +124 -75
  277. package/dist/esm/qds-dialog.entry.js.map +1 -1
  278. package/dist/esm/qds-divider.qds-icon-button.entry.js.map +1 -0
  279. package/dist/esm/qds-divider_2.entry.js +288 -0
  280. package/dist/esm/qds-dropdown.entry.js +461 -211
  281. package/dist/esm/qds-dropdown.entry.js.map +1 -1
  282. package/dist/esm/qds-form-message.entry.js +80 -25
  283. package/dist/esm/qds-form-message.entry.js.map +1 -1
  284. package/dist/esm/qds-icon-tab.entry.js +242 -0
  285. package/dist/esm/qds-icon-tab.entry.js.map +1 -0
  286. package/dist/esm/qds-icon.entry.js +92 -91
  287. package/dist/esm/qds-icon.entry.js.map +1 -1
  288. package/dist/esm/qds-inline-link.entry.js +139 -47
  289. package/dist/esm/qds-inline-link.entry.js.map +1 -1
  290. package/dist/esm/qds-input.entry.js +503 -186
  291. package/dist/esm/qds-input.entry.js.map +1 -1
  292. package/dist/esm/qds-label.entry.js +118 -25
  293. package/dist/esm/qds-label.entry.js.map +1 -1
  294. package/dist/esm/qds-list-item.entry.js +326 -0
  295. package/dist/esm/qds-list-item.entry.js.map +1 -0
  296. package/dist/esm/qds-loader.entry.js +124 -0
  297. package/dist/esm/qds-loader.entry.js.map +1 -0
  298. package/dist/esm/qds-menu-item.entry.js +212 -0
  299. package/dist/esm/qds-menu-item.entry.js.map +1 -0
  300. package/dist/esm/qds-mini-button.entry.js +128 -0
  301. package/dist/esm/qds-mini-button.entry.js.map +1 -0
  302. package/dist/esm/qds-progress-bar.entry.js +129 -0
  303. package/dist/esm/qds-progress-bar.entry.js.map +1 -0
  304. package/dist/esm/qds-select.entry.js +329 -0
  305. package/dist/esm/qds-select.entry.js.map +1 -0
  306. package/dist/esm/qds-standalone-link.entry.js +169 -0
  307. package/dist/esm/qds-standalone-link.entry.js.map +1 -0
  308. package/dist/esm/qds-switch.entry.js +221 -65
  309. package/dist/esm/qds-switch.entry.js.map +1 -1
  310. package/dist/esm/qds-tab.entry.js +278 -0
  311. package/dist/esm/qds-tab.entry.js.map +1 -0
  312. package/dist/esm/qds-tabbar.entry.js +526 -0
  313. package/dist/esm/qds-tabbar.entry.js.map +1 -0
  314. package/dist/esm/qds-table-cell.entry.js +86 -0
  315. package/dist/esm/qds-table-cell.entry.js.map +1 -0
  316. package/dist/esm/qds-table-head-cell.entry.js +90 -0
  317. package/dist/esm/qds-table-head-cell.entry.js.map +1 -0
  318. package/dist/esm/qds-table-row.entry.js +32 -0
  319. package/dist/esm/qds-table-row.entry.js.map +1 -0
  320. package/dist/esm/qds-table.entry.js +32 -0
  321. package/dist/esm/qds-table.entry.js.map +1 -0
  322. package/dist/esm/qds-tag.entry.js +108 -0
  323. package/dist/esm/qds-tag.entry.js.map +1 -0
  324. package/dist/esm/qds-textarea.entry.js +303 -154
  325. package/dist/esm/qds-textarea.entry.js.map +1 -1
  326. package/dist/esm/qds-title.entry.js +61 -50
  327. package/dist/esm/qds-title.entry.js.map +1 -1
  328. package/dist/esm/qds-tooltip.entry.js +380 -262
  329. package/dist/esm/qds-tooltip.entry.js.map +1 -1
  330. package/dist/esm/qds.js +18 -16
  331. package/dist/esm/qds.js.map +1 -1
  332. package/dist/types/components/action-item/action-item.d.ts +70 -0
  333. package/dist/types/components/avatar/avatar.d.ts +61 -0
  334. package/dist/types/components/avatar-media/avatar-media.d.ts +47 -0
  335. package/dist/types/components/badge-counter/badge-counter.d.ts +40 -0
  336. package/dist/types/components/badge-indicator/badge-indicator.d.ts +36 -0
  337. package/dist/types/components/breadcrumb-item/breadcrumb-item.d.ts +178 -0
  338. package/dist/types/components/button/button.d.ts +283 -198
  339. package/dist/types/components/checkbox/checkbox.d.ts +142 -124
  340. package/dist/types/components/chip/chip.d.ts +111 -0
  341. package/dist/types/components/controls.d.ts +4 -1
  342. package/dist/types/components/dialog/dialog.d.ts +32 -41
  343. package/dist/types/components/divider/divider.d.ts +14 -9
  344. package/dist/types/components/dropdown/dropdown.d.ts +117 -125
  345. package/dist/types/components/form-message/form-message.d.ts +35 -25
  346. package/dist/types/components/icon/icon.d.ts +23 -24
  347. package/dist/types/components/icon/library.d.ts +3 -3
  348. package/dist/types/components/icon/request.d.ts +5 -9
  349. package/dist/types/components/icon-button/icon-button.d.ts +122 -0
  350. package/dist/types/components/icon-tab/icon-tab.d.ts +112 -0
  351. package/dist/types/components/inline-link/inline-link.d.ts +209 -191
  352. package/dist/types/components/input/input.d.ts +441 -368
  353. package/dist/types/components/label/label.d.ts +37 -24
  354. package/dist/types/components/list-item/list-item.d.ts +122 -0
  355. package/dist/types/components/loader/loader.d.ts +32 -0
  356. package/dist/types/components/menu-item/menu-item.d.ts +75 -0
  357. package/dist/types/components/mini-button/mini-button.d.ts +82 -0
  358. package/dist/types/components/progress-bar/progress-bar.d.ts +60 -0
  359. package/dist/types/components/radio/radio.d.ts +94 -95
  360. package/dist/types/components/select/select.d.ts +209 -0
  361. package/dist/types/components/shared.d.ts +6 -0
  362. package/dist/types/components/standalone-link/standalone-link.d.ts +234 -0
  363. package/dist/types/components/switch/switch.d.ts +122 -107
  364. package/dist/types/components/tab/tab.d.ts +157 -0
  365. package/dist/types/components/tabbar/tabbar.d.ts +91 -0
  366. package/dist/types/components/table/table.d.ts +14 -0
  367. package/dist/types/components/table-cell/table-cell.d.ts +39 -0
  368. package/dist/types/components/table-head-cell/table-head-cell.d.ts +56 -0
  369. package/dist/types/components/table-row/table-row.d.ts +14 -0
  370. package/dist/types/components/tag/tag.d.ts +55 -0
  371. package/dist/types/components/textarea/textarea.d.ts +295 -300
  372. package/dist/types/components/title/title.d.ts +39 -32
  373. package/dist/types/components/tooltip/tooltip.d.ts +111 -136
  374. package/dist/types/components.d.ts +4590 -929
  375. package/dist/types/helpers.d.ts +46 -19
  376. package/dist/types/index.d.ts +2 -1
  377. package/dist/types/interface-overrides.d.ts +215 -0
  378. package/dist/types/qds-test.d.ts +22 -11
  379. package/dist/types/stencil-public-runtime.d.ts +109 -17
  380. package/dist/types/utils.d.ts +11 -4
  381. package/dist/vscode.html-custom-data.json +2543 -426
  382. package/hydrate/index.d.ts +73 -18
  383. package/hydrate/index.js +32000 -9062
  384. package/hydrate/index.mjs +33081 -0
  385. package/hydrate/package.json +7 -1
  386. package/loader/cdn.js +3 -4
  387. package/loader/index.cjs.js +3 -4
  388. package/loader/index.d.ts +4 -1
  389. package/loader/index.es2017.js +3 -4
  390. package/loader/index.js +3 -4
  391. package/package.json +23 -180
  392. package/styles/core.css +156 -38
  393. package/components/floating-ui.dom.esm.js.map +0 -1
  394. package/components/helpers.js +0 -175
  395. package/components/helpers.js.map +0 -1
  396. package/components/icon.js +0 -185
  397. package/components/icon.js.map +0 -1
  398. package/components/label.js +0 -55
  399. package/components/label.js.map +0 -1
  400. package/dist/cjs/floating-ui.dom.esm-7f1cac3e.js.map +0 -1
  401. package/dist/cjs/helpers-452256e8.js +0 -185
  402. package/dist/cjs/helpers-452256e8.js.map +0 -1
  403. package/dist/cjs/index-d181f952.js +0 -2039
  404. package/dist/cjs/index-d181f952.js.map +0 -1
  405. package/dist/cjs/library-ad8d9466.js +0 -72
  406. package/dist/cjs/library-ad8d9466.js.map +0 -1
  407. package/dist/cjs/qds-button.cjs.entry.js.map +0 -1
  408. package/dist/cjs/qds-checkbox.cjs.entry.js +0 -116
  409. package/dist/cjs/qds-checkbox.cjs.entry.js.map +0 -1
  410. package/dist/cjs/qds-dialog.cjs.entry.js.map +0 -1
  411. package/dist/cjs/qds-divider.cjs.entry.js +0 -33
  412. package/dist/cjs/qds-divider.cjs.entry.js.map +0 -1
  413. package/dist/cjs/qds-dropdown.cjs.entry.js.map +0 -1
  414. package/dist/cjs/qds-form-message.cjs.entry.js.map +0 -1
  415. package/dist/cjs/qds-icon.cjs.entry.js.map +0 -1
  416. package/dist/cjs/qds-inline-link.cjs.entry.js.map +0 -1
  417. package/dist/cjs/qds-input.cjs.entry.js.map +0 -1
  418. package/dist/cjs/qds-label.cjs.entry.js.map +0 -1
  419. package/dist/cjs/qds-radio.cjs.entry.js +0 -74
  420. package/dist/cjs/qds-radio.cjs.entry.js.map +0 -1
  421. package/dist/cjs/qds-switch.cjs.entry.js.map +0 -1
  422. package/dist/cjs/qds-textarea.cjs.entry.js.map +0 -1
  423. package/dist/cjs/qds-title.cjs.entry.js.map +0 -1
  424. package/dist/cjs/qds-tooltip.cjs.entry.js.map +0 -1
  425. package/dist/esm/floating-ui.dom.esm-c2f3e549.js.map +0 -1
  426. package/dist/esm/helpers-76b84f45.js +0 -175
  427. package/dist/esm/helpers-76b84f45.js.map +0 -1
  428. package/dist/esm/index-d7183092.js +0 -2009
  429. package/dist/esm/index-d7183092.js.map +0 -1
  430. package/dist/esm/library-f36d7d09.js +0 -68
  431. package/dist/esm/library-f36d7d09.js.map +0 -1
  432. package/dist/esm/polyfills/core-js.js +0 -11
  433. package/dist/esm/polyfills/dom.js +0 -79
  434. package/dist/esm/polyfills/es5-html-element.js +0 -1
  435. package/dist/esm/polyfills/index.js +0 -34
  436. package/dist/esm/polyfills/system.js +0 -6
  437. package/dist/esm/qds-checkbox.entry.js +0 -112
  438. package/dist/esm/qds-checkbox.entry.js.map +0 -1
  439. package/dist/esm/qds-divider.entry.js +0 -29
  440. package/dist/esm/qds-divider.entry.js.map +0 -1
  441. package/dist/esm/qds-radio.entry.js +0 -70
  442. package/dist/esm/qds-radio.entry.js.map +0 -1
  443. package/dist/types/components/create-story.d.ts +0 -5
  444. package/loader/package.json +0 -11
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qds-icon-tab.entry.js","sources":["src/components/icon-tab/icon-tab.css?tag=qds-icon-tab&encapsulation=shadow","src/components/icon-tab/icon-tab.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2026 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n line-height: 0;\n}\n\n[aria-disabled='true'] {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n:host(:focus-visible) {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n border-radius: var(--qds-focus-border-radius);\n outline-offset: calc(\n -1 * var(--qds-focus-border-width) - var(--qds-focus-border-offset)\n );\n}\n\n.qds-icon-container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.qds-icon {\n flex-shrink: 0;\n}\n\n.qds-icon:hover {\n background-color: transparent;\n}\n\n.qds-selected {\n &:active {\n background-color: var(--qds-theme-interactive-background-selected-pressed);\n }\n}\n\n.qds-icon,\n.qds-text {\n color: var(--qds-theme-title);\n}\n\n.qds-badge-indicator {\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n}\n\n.qds-badge-counter {\n position: absolute;\n inset-block-start: -2px;\n inset-inline-end: -2px;\n}\n\n[data-size='small'] {\n &.qds-icon-tab {\n min-height: var(--qds-nav-element-small-height);\n min-width: var(--qds-nav-element-small-height);\n gap: var(--qds-nav-element-small-gap-internal);\n }\n\n .qds-icon-container {\n height: var(--qds-control-small-height);\n width: var(--qds-control-small-height);\n\n & > .qds-icon {\n height: var(--qds-nav-element-small-icon-size);\n width: var(--qds-nav-element-small-icon-size);\n }\n }\n}\n\n[data-size='standard'] {\n &.qds-icon-tab {\n min-height: var(--qds-nav-element-standard-height);\n min-width: var(--qds-nav-element-standard-height);\n gap: var(--qds-nav-element-standard-gap-internal);\n }\n\n .qds-icon-container {\n height: var(--qds-control-standard-height);\n width: var(--qds-control-standard-height);\n\n & > .qds-icon {\n height: var(--qds-nav-element-standard-icon-size);\n width: var(--qds-nav-element-standard-icon-size);\n }\n }\n}\n\n[data-size='large'] {\n &.qds-icon-tab {\n min-height: var(--qds-nav-element-large-height);\n min-width: var(--qds-nav-element-large-height);\n gap: var(--qds-nav-element-large-gap-internal);\n }\n\n .qds-icon-container {\n height: var(--qds-control-large-height);\n width: var(--qds-control-large-height);\n\n & > .qds-icon {\n height: var(--qds-nav-element-large-icon-size);\n width: var(--qds-nav-element-large-icon-size);\n }\n }\n}\n\n[data-importance='subdued'],\n[data-importance='standard'] {\n &.qds-selected {\n &::after {\n border-radius: var(--qds-signature-line-connection-cap-radius);\n content: '';\n display: block;\n position: absolute;\n }\n\n &.qds-indicator-inline-end::after,\n &.qds-indicator-inline-start::after {\n width: var(--qds-signature-line-connection-width);\n height: 100%;\n }\n\n &.qds-indicator-inline-end::after {\n inset-inline-end: 0;\n }\n\n &.qds-indicator-inline-start::after {\n inset-inline-start: 0;\n }\n\n &.qds-indicator-block-end::after,\n &.qds-indicator-block-start::after {\n width: 100%;\n height: var(--qds-signature-line-connection-width);\n }\n\n &.qds-indicator-block-end::after {\n bottom: 0;\n }\n\n &.qds-indicator-block-start::after {\n top: 0;\n }\n }\n}\n\n[data-importance='standard'] {\n &:hover {\n &::after {\n background-color: var(--qds-theme-signature-color-hover);\n }\n }\n\n &:active {\n &::after {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n }\n\n &.qds-selected {\n &::after {\n background-color: var(--qds-theme-signature-color-default);\n }\n }\n\n .qds-selected .qds-icon {\n color: var(--qds-theme-title);\n }\n}\n\n[data-importance='subdued'] {\n &.qds-selected,\n :active {\n &::after {\n background-color: var(--qds-theme-link-subdued-pressed);\n }\n }\n\n &:hover {\n &::after {\n background-color: var(--qds-theme-link-subdued-hover);\n }\n }\n\n &.qds-selected::after {\n background-color: var(\n --qds-theme-nav-element-selection-indicator-background-subdued\n );\n }\n}\n\n.qds-icon-tab {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n border: none;\n background-color: transparent;\n cursor: pointer;\n text-align: initial;\n\n &:any-link {\n text-decoration: none;\n }\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n\n &:focus-visible {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n border-radius: var(--qds-focus-border-radius);\n outline-offset: calc(\n -1 * var(--qds-focus-border-width) - var(--qds-focus-border-offset)\n );\n }\n}\n\n.qds-hidden {\n display: none;\n}\n","// SPDX-FileCopyrightText: © 2026 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport {\n computeBadgeValue,\n isCounter,\n isIndicator,\n pickFocusEventAttributes,\n resolveTarget,\n} from '../../helpers'\nimport type { Importance, Size } from '../shared'\n\nexport type Placement = 'bottom' | 'left' | 'right' | 'top'\n\nexport type IndicatorPosition =\n | 'block-end'\n | 'block-start'\n | 'inline-end'\n | 'inline-start'\n\nexport type IconTabImportance = Exclude<Importance, 'emphasized'>\n\nlet autoIncrementingId = 1\n\n/**\n * <qds-icon-tab> is a navigational element that is used in different horizontal or vertical navigation bars\n * (Main Navigation, secondary navigation, Tab bar, etc.)\n * as trigger points for opening a menu list or switching content in Tab bar.\n *\n * @see https://quartz.se.com/build/components/icon-tab\n */\n@Component({\n tag: 'qds-icon-tab',\n shadow: true,\n styleUrl: 'icon-tab.css',\n})\nexport class IconTab implements ComponentInterface {\n /**\n * Displays an indicator if `true` or the empty string. Otherwise, displays a\n * counter badge if a number or string representing a number is used.\n */\n @Prop() public readonly badge?: number | string | true\n\n /**\n * The tab's counter importance.\n */\n @Prop()\n public readonly badgeCounterImportance?: HTMLQdsBadgeCounterElement['importance'] =\n 'standard'\n\n /**\n * The indicator or counter badge's accessible text that will be used by\n * screen readers.\n */\n @Prop() public readonly badgeDescription?: string\n\n /**\n * The indicator's status.\n */\n @Prop()\n public readonly badgeIndicatorStatus?: HTMLQdsBadgeIndicatorElement['status'] =\n 'neutral'\n\n /**\n * Prevents the tab from being interacted with: it cannot be\n * selected or focused.\n */\n @Prop() public readonly disabled?: boolean\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\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 tab's importance.\n */\n @Prop() public readonly importance?: IconTabImportance = 'standard'\n\n /**\n * The tab's indicator position.\n */\n @Prop() public readonly indicatorPosition?: IndicatorPosition = 'block-end'\n\n /**\n * The tab panel element associated with this tab. The `panel` specified\n * can be any of the following:\n *\n * - A CSS selector string\n * - A reference to an [`Element`][]\n * - A function returning a reference to an [`Element`][] or a CSS selector\n * string\n *\n * [`Element`]: https://developer.mozilla.org/docs/Web/API/Element\n */\n @Prop() public readonly panel!: Element | string | (() => Element | string)\n\n /**\n * Whether or not the tab is selected.\n */\n @Prop() public selected = false\n\n /**\n * The tab's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * Icon tab's accessible name.\n */\n @Prop() public readonly text?: string\n\n /**\n * When set, the underlying tab will be rendered as an `<a>` with this\n * `href` instead of a `<button>`.\n *\n * This property has no effect if the tab has an `action`.\n *\n * @webnative\n */\n @Prop() public readonly href?: string\n\n /**\n * Emitted when the tab loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the tab gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private tabIndex?: number\n\n @State() private isIndicatorOnTop = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #tab?: HTMLAnchorElement | HTMLDivElement\n\n #panel?: Element\n\n get #computedSize(): Size {\n switch (this.size) {\n case 'standard':\n case 'small':\n case 'large': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedImportance(): IconTabImportance {\n return this.importance ?? 'standard'\n }\n\n get #parentLayer(): string {\n return this.host.closest('qds-tabbar')?.layer ?? 'main'\n }\n\n get #parentLevel(): string {\n return this.host.closest('qds-tabbar')?.level ?? 'root'\n }\n\n get #computedDisabled(): boolean {\n return this.disabled ?? false\n }\n\n get #placement(): Placement {\n switch (this.indicatorPosition) {\n case 'inline-start': {\n return 'left'\n }\n case 'inline-end': {\n return 'right'\n }\n case 'block-start': {\n return 'top'\n }\n default: {\n return 'bottom'\n }\n }\n }\n\n get #isLink(): boolean {\n return this.href !== undefined\n }\n\n @Watch('panel')\n protected panelChanged(): void {\n this.disconnectedCallback()\n\n const panel = resolveTarget(this.panel, 'qds-icon-tab')\n if (!(panel instanceof globalThis.Element)) return\n this.#panel = panel\n\n if (!this.#isLink) this.host.setAttribute('aria-controls', this.#panel.id)\n\n if (this.#panel.role === null) this.#panel.role = 'tabpanel'\n if (this.#panel.getAttribute('aria-labelledby') === null)\n this.#panel.setAttribute('aria-labelledby', this.host.id)\n this.#panel.setAttribute(\n 'tabindex',\n this.#panel.getAttribute('tabindex') ?? '0',\n )\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) event.stopImmediatePropagation()\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n @Watch('text')\n @Watch('badge')\n @Watch('badgeDescription')\n protected ariaLabelChanged(): void {\n this.#syncAriaLabel()\n }\n\n @Watch('href')\n protected hrefChanged(): void {\n this.#defineTab()\n this.#syncAriaLabel()\n }\n\n public componentWillLoad(): void {\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n this.host.id ||= `qds-icon-tab-${autoIncrementingId}`\n autoIncrementingId += 1\n\n this.#defineTab()\n }\n\n public componentWillRender(): void {\n const isPanelRoot =\n this.#parentLayer === 'panel' && this.#parentLevel === 'root'\n const isMainSubsection =\n this.#parentLayer === 'main' && this.#parentLevel === 'subsection'\n\n this.isIndicatorOnTop = isPanelRoot || isMainSubsection\n }\n\n public componentDidLoad(): void {\n this.panelChanged()\n }\n\n public disconnectedCallback(): void {\n if (!this.#panel) return\n\n this.host.removeAttribute('aria-controls')\n\n if (this.#panel.role === 'tabpanel')\n // eslint-disable-next-line unicorn/no-null\n this.#panel.role = null\n if (this.#panel.getAttribute('aria-labelledby') === this.host.id)\n this.#panel.removeAttribute('aria-labelledby')\n this.#panel.removeAttribute('tabindex')\n }\n\n public render() {\n const isLink = this.#isLink\n const Tag = isLink ? 'a' : 'div'\n return (\n <div\n aria-disabled={this.#computedDisabled ? 'true' : undefined}\n class={{\n 'qds-selected': this.selected,\n }}\n data-size={this.#computedSize}\n data-importance={this.#computedImportance}\n >\n <Tag\n aria-disabled={this.#computedDisabled ? 'true' : undefined}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...(isLink ? undefined : { disabled: this.disabled })}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n class={{\n 'qds-icon-tab': true,\n 'qds-selected': this.selected,\n [`qds-indicator-${this.indicatorPosition}`]: true,\n }}\n aria-selected={isLink && this.selected ? 'true' : undefined}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n href={isLink ? this.href : undefined}\n role={isLink ? 'tab' : undefined}\n ref={this.#tabRef}\n >\n <div class=\"qds-icon-container\">\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n {isIndicator(this.badge) && (\n <qds-badge-indicator\n class=\"qds-badge-indicator\"\n status={this.badgeIndicatorStatus}\n description={this.badgeDescription}\n size={this.#computedSize}\n strokeRing\n />\n )}\n {isCounter(this.badge) && (\n <qds-badge-counter\n class=\"qds-badge-counter\"\n description={this.badgeDescription}\n importance={this.badgeCounterImportance}\n size={this.#computedSize}\n strokeRing\n value={this.badge}\n />\n )}\n </div>\n </Tag>\n <qds-tooltip placement={this.#placement} ref={this.#tooltipRef}>\n <qds-title layer=\"accessory\" level=\"root\">\n {this.text}\n </qds-title>\n </qds-tooltip>\n </div>\n )\n }\n\n #syncAriaLabel(): void {\n const ariaLabel =\n this.badge === undefined\n ? // eslint-disable-next-line unicorn/no-null\n (this.text ?? null)\n : computeBadgeValue(this.text, this.badge, this.badgeDescription)\n\n if (this.#isLink) {\n // eslint-disable-next-line unicorn/no-null\n this.internals.ariaLabel = null\n\n if (ariaLabel === null) {\n this.#tab?.removeAttribute('aria-label')\n } else {\n this.#tab?.setAttribute('aria-label', ariaLabel)\n }\n\n return\n }\n\n this.#tab?.removeAttribute('aria-label')\n this.internals.ariaLabel = ariaLabel\n }\n\n readonly #tabRef = (tab?: HTMLAnchorElement | HTMLDivElement): void => {\n this.#tab = tab\n this.#syncAriaLabel()\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.host\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #defineTab = (): void => {\n if (this.#isLink) {\n // eslint-disable-next-line unicorn/no-null\n this.internals.role = null\n this.#defineGetter('tab', () => this.#tab)\n } else {\n this.internals.role = 'tab'\n this.internals.ariaSelected = this.selected ? 'true' : 'false'\n this.#defineGetter('tab', () => this.host)\n }\n\n this.#syncAriaLabel()\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,+8JAA+8J;;ACAl+J;AACA;AACA;;;;;;;;;;;;;;;;;;AAmCA,IAAI,kBAAkB,GAAG,CAAC;MAcb,OAAO,GAAA,MAAA;AALpB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;;AAYE;;AAEG;AAEa,QAAA,IAAsB,CAAA,sBAAA,GACpC,UAAU;AAQZ;;AAEG;AAEa,QAAA,IAAoB,CAAA,oBAAA,GAClC,SAAS;AAQX;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAW,SAAS;AASvD;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAuB,UAAU;AAEnE;;AAEG;AACqB,QAAA,IAAiB,CAAA,iBAAA,GAAuB,WAAW;AAe3E;;AAEG;AACY,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAE/B;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAU,UAAU;AAiC/B,QAAA,IAAgB,CAAA,gBAAA,GAAG,KAAK;QAIzC,YAAyC,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QAEzC,cAAgB,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QA6NP,eAAU,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,GAAwC,KAAU;YACpE,sBAAA,CAAA,IAAI,EAAA,YAAA,EAAQ,GAAG,EAA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iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC;IAErE,IAAI,sBAAA,CAAA,IAAI,EAAQ,kBAAA,EAAA,GAAA,EAAA,mBAAA,CAAA,EAAE;;AAEhB,QAAA,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,IAAI;AAE/B,QAAA,IAAI,SAAS,KAAK,IAAI,EAAE;AACtB,YAAA,sBAAA,CAAA,IAAI,EAAK,YAAA,EAAA,GAAA,CAAA,EAAE,eAAe,CAAC,YAAY,CAAC;;aACnC;AACL,YAAA,sBAAA,CAAA,IAAI,oBAAK,EAAE,YAAY,CAAC,YAAY,EAAE,SAAS,CAAC;;QAGlD;;AAGF,IAAA,sBAAA,CAAA,IAAI,EAAK,YAAA,EAAA,GAAA,CAAA,EAAE,eAAe,CAAC,YAAY,CAAC;AACxC,IAAA,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,SAAS;AACtC,CAAC,EAAA,qBAAA,GAAA,SAAA,qBAAA,CAmCa,CAAc,EAAE,GAAkB,EAAA;AAC9C,IAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAChE,CAAC;;;;;"}
@@ -1,109 +1,110 @@
1
1
  /*!
2
- * SPDX-FileCopyrightText: © 2023 Schneider Electric
2
+ * SPDX-FileCopyrightText: © 2026 Schneider Electric
3
3
  *
4
- * SPDX-License-Identifier: LGPL-2.1-only
4
+ * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { r as registerInstance, c as createEvent, h, a as getElement } from './index-d7183092.js';
7
- import { i as inheritAriaAttributes } from './helpers-76b84f45.js';
8
- import { g as getIconLibrary } from './library-f36d7d09.js';
6
+ import { r as registerInstance, c as createEvent, h } from './index-Hg1Liloy.js';
7
+ import { g as getIconLibrary } from './library-CBfntPWH.js';
9
8
 
10
- // SPDX-FileCopyrightText: © 2023 Schneider Electric
9
+ // SPDX-FileCopyrightText: © 2024 Schneider Electric
11
10
  //
12
- // SPDX-License-Identifier: LGPL-2.1-only
13
- const request = async (source) => {
14
- const response = await fetch(source, { mode: 'cors' });
15
- return {
16
- ok: response.ok,
17
- data: await response.text(),
18
- };
19
- };
11
+ // SPDX-License-Identifier: Apache-2.0
20
12
  const cachedIconRequests = new Map();
21
- const requestIcon = async (url) => {
22
- const cachedIconRequest = cachedIconRequests.get(url);
23
- if (cachedIconRequest)
24
- return cachedIconRequest;
25
- const fileData = await request(url);
26
- const iconFileData = {
27
- ok: fileData.ok,
28
- };
29
- if (fileData.ok) {
30
- const div = document.createElement('div');
31
- div.innerHTML = fileData.data;
32
- const child = div.firstElementChild;
33
- iconFileData.data =
34
- child?.tagName.toLowerCase() === 'svg' ? child.outerHTML : '';
35
- }
36
- cachedIconRequests.set(url, iconFileData);
37
- return iconFileData;
13
+ const requestIcon = (url) => {
14
+ const cachedIconRequest = cachedIconRequests.get(url);
15
+ if (cachedIconRequest)
16
+ return Promise.resolve(cachedIconRequest);
17
+ const iconPromise = fetch(url, { mode: 'cors' }).then(async (response) => {
18
+ const iconResponse = {
19
+ ok: response.ok,
20
+ status: response.status,
21
+ data: await response.text(),
22
+ };
23
+ if (response.ok) {
24
+ const div = document.createElement('div');
25
+ div.innerHTML = iconResponse.data;
26
+ const child = div.firstElementChild;
27
+ iconResponse.data =
28
+ child?.tagName.toLowerCase() === 'svg' ? child.outerHTML : '';
29
+ }
30
+ cachedIconRequests.set(url, iconResponse);
31
+ return iconResponse;
32
+ });
33
+ cachedIconRequests.set(url, iconPromise);
34
+ return iconPromise;
38
35
  };
39
36
 
40
- const iconCss = ":host{box-sizing:border-box}:host([hidden]){display:none !important}:host([hidden]){}:host *,:host *::before,:host *::after{box-sizing:inherit}:host{contain:strict;display:inline-block;height:1em;width:1em}.wrapper{display:contents}svg{display:block;fill:currentcolor;height:100%;width:100%}";
37
+ const iconCss = ":host([hidden]){display:none!important}:host{display:inline-block;height:1em;width:1em}.qds-container{position:relative}.qds-icon-wrapper{display:contents}svg{display:block;fill:currentcolor;height:100%;width:100%}";
41
38
 
42
39
  let parser;
43
40
  const Icon = class {
44
- constructor(hostRef) {
45
- registerInstance(this, hostRef);
46
- this.loadEmitter = createEvent(this, "qdsLoad", 6);
47
- this.errorEmitter = createEvent(this, "qdsError", 6);
48
- this.inheritedAttributes = {};
49
- this.name = undefined;
50
- this.library = 'default';
51
- this.svg = '';
52
- }
53
- async setIcon() {
54
- if (!this.name)
55
- return;
56
- const library = getIconLibrary(this.library);
57
- if (!library)
58
- return;
59
- const url = library.resolver(this.name);
60
- if (!url) {
61
- this.svg = '';
62
- return;
63
- }
64
- try {
65
- const request = await requestIcon(url);
66
- if (!request.ok) {
67
- this.svg = '';
68
- this.errorEmitter.emit();
69
- return;
70
- }
71
- // Create an instance of the DOM parser. We do it here instead of at the
72
- // top-level to support SSR while maintaining a single parser instance
73
- // for optimal performance.
74
- parser || (parser = new DOMParser());
75
- const document = parser.parseFromString(request.data, 'text/html');
76
- const svgElement = document.body.querySelector('svg');
77
- if (svgElement === null) {
41
+ constructor(hostRef) {
42
+ registerInstance(this, hostRef);
43
+ this.loadEmitter = createEvent(this, "qdsLoad", 6);
44
+ this.errorEmitter = createEvent(this, "qdsError", 6);
45
+ if (hostRef.$hostElement$["s-ei"]) {
46
+ this.internals = hostRef.$hostElement$["s-ei"];
47
+ }
48
+ else {
49
+ this.internals = hostRef.$hostElement$.attachInternals();
50
+ hostRef.$hostElement$["s-ei"] = this.internals;
51
+ }
52
+ /**
53
+ * The name of a registered icon library.
54
+ */
55
+ this.library = 'default';
78
56
  this.svg = '';
79
- this.errorEmitter.emit();
80
- }
81
- else {
82
- for (const [key, value] of Object.entries(this.inheritedAttributes))
83
- svgElement.setAttribute(key, value);
84
- this.svg = svgElement.outerHTML;
85
- this.loadEmitter.emit();
86
- }
87
57
  }
88
- catch {
89
- this.errorEmitter.emit();
58
+ async setIcon() {
59
+ if (!this.name)
60
+ return;
61
+ const library = getIconLibrary(this.library);
62
+ if (!library)
63
+ return;
64
+ const url = library.resolver(this.name);
65
+ if (!url) {
66
+ this.svg = '';
67
+ return;
68
+ }
69
+ try {
70
+ const request = await requestIcon(url);
71
+ if (!request.ok) {
72
+ this.svg = '';
73
+ this.errorEmitter.emit();
74
+ return;
75
+ }
76
+ // Create an instance of the DOM parser. We do it here instead of at the
77
+ // top-level to support SSR while maintaining a single parser instance
78
+ // for optimal performance.
79
+ parser || (parser = new DOMParser());
80
+ const document = parser.parseFromString(request.data, 'text/html');
81
+ const svgElement = document.body.querySelector('svg');
82
+ if (svgElement === null) {
83
+ this.svg = '';
84
+ this.errorEmitter.emit();
85
+ }
86
+ else {
87
+ this.svg = svgElement.outerHTML;
88
+ this.loadEmitter.emit();
89
+ }
90
+ }
91
+ catch {
92
+ this.errorEmitter.emit();
93
+ }
90
94
  }
91
- }
92
- async componentWillLoad() {
93
- this.inheritedAttributes = inheritAriaAttributes(this.element);
94
- await this.setIcon();
95
- }
96
- render() {
97
- return h("span", { class: "wrapper", innerHTML: this.svg });
98
- }
99
- get element() { return getElement(this); }
100
- static get watchers() { return {
101
- "name": ["setIcon"],
102
- "library": ["setIcon"]
103
- }; }
95
+ async componentWillLoad() {
96
+ this.internals.role = 'presentation';
97
+ await this.setIcon();
98
+ }
99
+ render() {
100
+ return (h("div", { key: '679545e776f70c30bc7843c107e115d2dd3501a1', class: "qds-container", "aria-hidden": "true" }, h("span", { key: 'dd410b390eca7c4db0dc258d635eeb32b9ed7639', class: "qds-icon-wrapper", innerHTML: this.svg })));
101
+ }
102
+ static get watchers() { return {
103
+ "name": ["setIcon"],
104
+ "library": ["setIcon"]
105
+ }; }
104
106
  };
105
107
  Icon.style = iconCss;
106
108
 
107
109
  export { Icon as qds_icon };
108
-
109
- //# sourceMappingURL=qds-icon.entry.js.map
110
+ //# sourceMappingURL=qds-icon.entry.js.map
@@ -1 +1 @@
1
- {"file":"qds-icon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IAAI,EAAE,CAAA;KACzB;GACF;EAEM,MAAM,iBAAiB;IAC5B,IAAI,CAAC,mBAAmB,GAAG,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC9D,MAAM,IAAI,CAAC,OAAO,EAAE,CAAA;GACrB;EAEM,MAAM;IACX,OAAO,YAAM,KAAK,EAAC,SAAS,EAAC,SAAS,EAAE,IAAI,CAAC,GAAG,GAAI,CAAA;GACrD;;;;;;;;;;;","names":[],"sources":["src/components/icon/request.ts","src/components/icon/icon.css?tag=qds-icon&encapsulation=shadow","src/components/icon/icon.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\n\ninterface Request {\n ok: boolean\n data: string\n}\n\ninterface IconRequestOk {\n ok: true\n data: string\n}\n\ninterface IconRequestError {\n ok: false\n data: undefined\n}\n\ntype IconRequest = IconRequestError | IconRequestOk\n\ninterface IconRequestUnknown {\n ok: boolean\n data?: string\n}\n\nconst request = async (source: string): Promise<Request> => {\n const response = await fetch(source, { mode: 'cors' })\n return {\n ok: response.ok,\n data: await response.text(),\n }\n}\n\nconst cachedIconRequests = new Map<string, IconRequest>()\n\nconst requestIcon = async (url: string): Promise<IconRequest> => {\n const cachedIconRequest = cachedIconRequests.get(url)\n if (cachedIconRequest) return cachedIconRequest\n\n const fileData = await request(url)\n const iconFileData: IconRequestUnknown = {\n ok: fileData.ok,\n }\n if (fileData.ok) {\n const div = document.createElement('div')\n div.innerHTML = fileData.data\n const child = div.firstElementChild\n iconFileData.data =\n child?.tagName.toLowerCase() === 'svg' ? child.outerHTML : ''\n }\n\n cachedIconRequests.set(url, iconFileData as IconRequest)\n return iconFileData as IconRequest\n}\n\nexport default requestIcon\n","/*\n * SPDX-FileCopyrightText: © 2023 Schneider Electric\n *\n * SPDX-License-Identifier: LGPL-2.1-only\n */\n\n@import url('../shared.css');\n\n:host {\n contain: strict;\n display: inline-block;\n height: 1em;\n width: 1em;\n}\n\n.wrapper {\n display: contents;\n}\n\nsvg {\n display: block;\n fill: currentcolor;\n height: 100%;\n width: 100%;\n}\n","// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport { Component, Element, Event, h, Prop, State, Watch } from '@stencil/core'\n\nimport type { Attributes } from '../../helpers'\nimport { inheritAriaAttributes } from '../../helpers'\nimport { getIconLibrary } from './library'\nimport requestIcon from './request'\n\nlet parser: DOMParser | undefined\n\n/**\n * @experimental\n */\n@Component({\n tag: 'qds-icon',\n shadow: true,\n styleUrl: 'icon.css',\n})\nexport class Icon implements ComponentInterface {\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop({ reflect: true }) public readonly name!: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop({ reflect: true }) public readonly library: string = 'default'\n\n /**\n * Emitted when the icon has loaded.\n */\n @Event({ eventName: 'qdsLoad', cancelable: false })\n private readonly loadEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the icon fails to load due to an error.\n */\n @Event({ eventName: 'qdsError', cancelable: false })\n private readonly errorEmitter!: EventEmitter<void>\n\n @Element() private readonly element!: HTMLQdsIconElement\n\n @State() private svg = ''\n\n private inheritedAttributes: Attributes = {}\n\n @Watch('name')\n @Watch('library')\n private async setIcon(): Promise<void> {\n if (!this.name) return\n\n const library = getIconLibrary(this.library)\n if (!library) return\n\n const url = library.resolver(this.name)\n if (!url) {\n this.svg = ''\n return\n }\n\n try {\n const request = await requestIcon(url)\n if (!request.ok) {\n this.svg = ''\n this.errorEmitter.emit()\n return\n }\n\n // Create an instance of the DOM parser. We do it here instead of at the\n // top-level to support SSR while maintaining a single parser instance\n // for optimal performance.\n parser ||= new DOMParser()\n const document = parser.parseFromString(request.data, 'text/html')\n const svgElement = document.body.querySelector('svg')\n if (svgElement === null) {\n this.svg = ''\n this.errorEmitter.emit()\n } else {\n for (const [key, value] of Object.entries(this.inheritedAttributes))\n svgElement.setAttribute(key, value)\n this.svg = svgElement.outerHTML\n this.loadEmitter.emit()\n }\n } catch {\n this.errorEmitter.emit()\n }\n }\n\n public async componentWillLoad(): Promise<void> {\n this.inheritedAttributes = inheritAriaAttributes(this.element)\n await this.setIcon()\n }\n\n public render() {\n return <span class=\"wrapper\" innerHTML={this.svg} />\n }\n}\n"],"version":3}
1
+ {"version":3,"file":"qds-icon.entry.js","sources":["src/components/icon/request.ts","src/components/icon/icon.css?tag=qds-icon&encapsulation=shadow","src/components/icon/icon.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\ninterface IconResponse {\n ok: boolean\n status: number\n data: string\n}\n\nconst cachedIconRequests = new Map<\n string,\n IconResponse | Promise<IconResponse>\n>()\n\nconst requestIcon = (url: string): Promise<IconResponse> => {\n const cachedIconRequest = cachedIconRequests.get(url)\n if (cachedIconRequest) return Promise.resolve(cachedIconRequest)\n\n const iconPromise = fetch(url, { mode: 'cors' }).then(async (response) => {\n const iconResponse: IconResponse = {\n ok: response.ok,\n status: response.status,\n data: await response.text(),\n }\n if (response.ok) {\n const div = document.createElement('div')\n div.innerHTML = iconResponse.data\n const child = div.firstElementChild\n iconResponse.data =\n child?.tagName.toLowerCase() === 'svg' ? child.outerHTML : ''\n }\n\n cachedIconRequests.set(url, iconResponse)\n return iconResponse\n })\n cachedIconRequests.set(url, iconPromise)\n return iconPromise\n}\n\nexport default requestIcon\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 height: 1em;\n width: 1em;\n}\n\n.qds-container {\n position: relative;\n}\n\n.qds-icon-wrapper {\n display: contents;\n}\n\nsvg {\n display: block;\n fill: currentcolor;\n height: 100%;\n width: 100%;\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Event,\n h,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport { getIconLibrary } from './library'\nimport requestIcon from './request'\n\nlet parser: DOMParser | undefined\n\n/**\n * @experimental\n */\n@Component({\n tag: 'qds-icon',\n shadow: true,\n styleUrl: 'icon.css',\n})\nexport class Icon implements ComponentInterface {\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 name!: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly library: string = 'default'\n\n /**\n * Emitted when the icon has loaded.\n */\n @Event({ eventName: 'qdsLoad', cancelable: false })\n private readonly loadEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the icon fails to load due to an error.\n */\n @Event({ eventName: 'qdsError', cancelable: false })\n private readonly errorEmitter!: EventEmitter<void>\n\n @State() private svg = ''\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n @Watch('name')\n @Watch('library')\n private async setIcon(): Promise<void> {\n if (!this.name) return\n\n const library = getIconLibrary(this.library)\n if (!library) return\n\n const url = library.resolver(this.name)\n if (!url) {\n this.svg = ''\n return\n }\n\n try {\n const request = await requestIcon(url)\n if (!request.ok) {\n this.svg = ''\n this.errorEmitter.emit()\n return\n }\n\n // Create an instance of the DOM parser. We do it here instead of at the\n // top-level to support SSR while maintaining a single parser instance\n // for optimal performance.\n parser ||= new DOMParser()\n const document = parser.parseFromString(request.data, 'text/html')\n const svgElement = document.body.querySelector('svg')\n if (svgElement === null) {\n this.svg = ''\n this.errorEmitter.emit()\n } else {\n this.svg = svgElement.outerHTML\n this.loadEmitter.emit()\n }\n } catch {\n this.errorEmitter.emit()\n }\n }\n\n public async componentWillLoad(): Promise<void> {\n this.internals.role = 'presentation'\n\n await this.setIcon()\n }\n\n public render() {\n return (\n <div class=\"qds-container\" aria-hidden=\"true\">\n <span class=\"qds-icon-wrapper\" innerHT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AAIrB,IAAA,MAAM,iBAAiB,GAAA;AAC5B,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,cAAc;AAEpC,QAAA,MAAM,IAAI,CAAC,OAAO,EAAE;;IAGf,MAAM,GAAA;AACX,QAAA,QACE,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,iBAAa,MAAM,EAAA,EAC3C,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,kBAAkB,EAAC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAA,CAAI,CAClD;;;;;;;;;;;"}
@@ -1,57 +1,149 @@
1
1
  /*!
2
- * SPDX-FileCopyrightText: © 2023 Schneider Electric
2
+ * SPDX-FileCopyrightText: © 2026 Schneider Electric
3
3
  *
4
- * SPDX-License-Identifier: LGPL-2.1-only
4
+ * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { r as registerInstance, c as createEvent, h, a as getElement } from './index-d7183092.js';
7
- import { p as pickFocusEventAttributes, i as inheritAriaAttributes, b as inheritAttributes } from './helpers-76b84f45.js';
6
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-Hg1Liloy.js';
7
+ import { p as pickFocusEventAttributes, a as invariant, h as determineLinkIcon } from './helpers-BIo9VDPx.js';
8
8
 
9
- const inlineLinkCss = ":host{box-sizing:border-box}:host([hidden]){display:none !important}:host([hidden]){}:host *,:host *::before,:host *::after{box-sizing:inherit}:host{display:inline-block}.external{display:none;height:1.25em;-webkit-margin-start:var(--qds-text-icon-gap);margin-inline-start:var(--qds-text-icon-gap);vertical-align:text-top;width:1.25em}.inline-link{border-radius:var(--qds-focus-border-radius);color:var(--qds-theme-link-default)}.inline-link[rel~='external']>.external{display:inline-block}.inline-link:focus-visible{outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width)}.inline-link:visited{color:var(--qds-theme-link-visited)}[aria-disabled='true']{opacity:var(--qds-theme-disabled);pointer-events:none}";
9
+ const inlineLinkCss = ":host([hidden]){display:none!important}:host{display:inline-block}:host(:focus-visible){border-radius:var(--qds-control-border-radius);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-icon{height:var(--qds-control-hero-icon-size);transform:scaleX(var(--qds-direction-factor,1));width:var(--qds-control-hero-icon-size)}.qds-inline-link{align-items:center;display:flex;gap:var(--qds-text-icon-gap)}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}[data-importance=subdued]{color:var(--qds-theme-link-subdued-default)}[data-importance=subdued]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=subdued]:hover{color:var(--qds-theme-link-subdued-hover)}[data-importance=subdued]:active{color:var(--qds-theme-link-subdued-pressed)}[data-importance=subdued]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=subdued]:visited:active{color:var(--qds-theme-link-visited-pressed)}[data-importance=standard]{color:var(--qds-theme-link-standard-default)}[data-importance=standard]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=standard]:hover{color:var(--qds-theme-link-standard-hover)}[data-importance=standard]:active{color:var(--qds-theme-link-standard-pressed)}[data-importance=standard]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=standard]:visited:active{color:var(--qds-theme-link-visited-pressed)}[data-importance=emphasized]{color:var(--qds-theme-link-emphasized-default)}[data-importance=emphasized]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=emphasized]:hover{color:var(--qds-theme-link-emphasized-hover)}[data-importance=emphasized]:active{color:var(--qds-theme-link-emphasized-pressed)}[data-importance=emphasized]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=emphasized]:visited:active{color:var(--qds-theme-link-visited-pressed)}";
10
10
 
11
+ // SPDX-FileCopyrightText: © 2024 Schneider Electric
12
+ //
13
+ // SPDX-License-Identifier: Apache-2.0
14
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15
+ if (kind === "a" && !f)
16
+ throw new TypeError("Private accessor was defined without a getter");
17
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
18
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
19
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
20
+ };
21
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
22
+ if (kind === "m")
23
+ throw new TypeError("Private method is not writable");
24
+ if (kind === "a" && !f)
25
+ throw new TypeError("Private accessor was defined without a setter");
26
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
27
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
28
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
29
+ };
30
+ var _InlineLink_instances, _InlineLink_savedTabIndex, _InlineLink_link, _InlineLink_computedImportance_get, _InlineLink_openInNewTab_get, _InlineLink_linkRef, _InlineLink_onBlur, _InlineLink_onFocus, _InlineLink_updateAriaLabelElements, _InlineLink_onSlotchange;
11
31
  const InlineLink = class {
12
- constructor(hostRef) {
13
- registerInstance(this, hostRef);
14
- this.blurEmitter = createEvent(this, "qdsBlur", 2);
15
- this.focusEmitter = createEvent(this, "qdsFocus", 2);
16
- this.inheritedAttributes = {};
17
- this.onBlur = (event) => {
18
- this.blurEmitter.emit(pickFocusEventAttributes(event));
19
- };
20
- this.onFocus = (event) => {
21
- this.focusEmitter.emit(pickFocusEventAttributes(event));
22
- };
23
- this.disabled = false;
24
- this.download = undefined;
25
- this.href = undefined;
26
- this.hreflang = undefined;
27
- this.referrerPolicy = undefined;
28
- this.rel = undefined;
29
- this.target = '_self';
30
- }
31
- get computedTabIndex() {
32
- const parsedValue = Number.parseInt(this.inheritedAttributes.tabindex, 10);
33
- return Number.isNaN(parsedValue) ? 0 : parsedValue;
34
- }
35
- onClick(event) {
36
- if (this.disabled) {
37
- event.preventDefault();
38
- event.stopPropagation();
39
- }
40
- }
41
- componentWillLoad() {
42
- this.inheritedAttributes = {
43
- ...inheritAriaAttributes(this.element),
44
- ...inheritAttributes(this.element, ['tabindex']),
45
- };
46
- }
47
- render() {
48
- return (h("a", { "aria-disabled": this.disabled ? 'true' : 'false', class: "inline-link", download: this.download, href: this.href, hrefLang: this.hreflang, onBlur: this.onBlur, onFocus: this.onFocus, referrerPolicy: this.referrerPolicy, rel: this.rel, target: this.target, ...this.inheritedAttributes, tabIndex: this.disabled ? -1 : this.computedTabIndex }, h("slot", null), h("qds-icon", { class: "external", library: "core", name: "external-link" })));
49
- }
50
- static get delegatesFocus() { return true; }
51
- get element() { return getElement(this); }
32
+ constructor(hostRef) {
33
+ registerInstance(this, hostRef);
34
+ this.blurEmitter = createEvent(this, "qdsBlur", 2);
35
+ this.focusEmitter = createEvent(this, "qdsFocus", 2);
36
+ if (hostRef.$hostElement$["s-ei"]) {
37
+ this.internals = hostRef.$hostElement$["s-ei"];
38
+ }
39
+ else {
40
+ this.internals = hostRef.$hostElement$.attachInternals();
41
+ hostRef.$hostElement$["s-ei"] = this.internals;
42
+ }
43
+ _InlineLink_instances.add(this);
44
+ /**
45
+ * Prevents the inline link from being interacted with: it cannot be pressed
46
+ * or focused.
47
+ */
48
+ this.disabled = false;
49
+ /**
50
+ * The name of a registered icon library.
51
+ */
52
+ this.iconLibrary = 'default';
53
+ /**
54
+ * The inline link's importance.
55
+ */
56
+ this.importance = 'standard';
57
+ _InlineLink_savedTabIndex.set(this, 0);
58
+ _InlineLink_link.set(this, void 0);
59
+ _InlineLink_linkRef.set(this, (link) => {
60
+ __classPrivateFieldSet(this, _InlineLink_link, link, "f");
61
+ });
62
+ _InlineLink_onBlur.set(this, (event) => {
63
+ this.blurEmitter.emit(pickFocusEventAttributes(event));
64
+ });
65
+ _InlineLink_onFocus.set(this, (event) => {
66
+ this.focusEmitter.emit(pickFocusEventAttributes(event));
67
+ });
68
+ _InlineLink_updateAriaLabelElements.set(this, () => {
69
+ this.internals.ariaLabel = `${this.host.textContent} ${__classPrivateFieldGet(this, _InlineLink_instances, "a", _InlineLink_openInNewTab_get) ? 'Opens in a new tab' : ''}`.trim();
70
+ });
71
+ _InlineLink_onSlotchange.set(this, () => {
72
+ __classPrivateFieldGet(this, _InlineLink_updateAriaLabelElements, "f").call(this);
73
+ });
74
+ }
75
+ onClick(event) {
76
+ if (this.disabled)
77
+ event.stopImmediatePropagation();
78
+ invariant(__classPrivateFieldGet(this, _InlineLink_link, "f"));
79
+ __classPrivateFieldGet(this, _InlineLink_link, "f").click();
80
+ }
81
+ onKeydown(event) {
82
+ invariant(__classPrivateFieldGet(this, _InlineLink_link, "f"));
83
+ if (this.disabled)
84
+ return;
85
+ if (event.key === 'Enter')
86
+ __classPrivateFieldGet(this, _InlineLink_link, "f").click();
87
+ }
88
+ disabledChanged() {
89
+ this.internals.ariaDisabled = this.disabled.toString();
90
+ if (this.disabled)
91
+ this.host.removeAttribute('tabindex');
92
+ else
93
+ this.host.tabIndex = __classPrivateFieldGet(this, _InlineLink_savedTabIndex, "f");
94
+ }
95
+ tabindexChanged(newValue) {
96
+ const parsedValue = Number.parseInt(newValue, 10);
97
+ // FIXME: `undefined` instead of `0` causes `qdsFocus/qdsBlur` E2E tests
98
+ // to fail, but it's not clear why this is the case since it works for
99
+ // other components.
100
+ __classPrivateFieldSet(this, _InlineLink_savedTabIndex, Number.isNaN(parsedValue) ? 0 : parsedValue, "f");
101
+ if (this.disabled)
102
+ this.host.removeAttribute('tabindex');
103
+ else
104
+ this.host.tabIndex = __classPrivateFieldGet(this, _InlineLink_savedTabIndex, "f");
105
+ }
106
+ hrefTargetChanged() {
107
+ this.linkIcon = determineLinkIcon(this.target, this.rel);
108
+ __classPrivateFieldGet(this, _InlineLink_updateAriaLabelElements, "f").call(this);
109
+ }
110
+ componentWillLoad() {
111
+ this.internals.role = 'link';
112
+ this.disabledChanged();
113
+ this.hrefTargetChanged();
114
+ this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
115
+ }
116
+ componentDidLoad() {
117
+ __classPrivateFieldGet(this, _InlineLink_updateAriaLabelElements, "f").call(this);
118
+ }
119
+ render() {
120
+ return (h("a", { key: 'eb9ecbdb51f5e0efbcb222db48d86d441e985997', "aria-hidden": "true", class: {
121
+ 'qds-inline-link': true,
122
+ 'qds-disabled': this.disabled,
123
+ }, "data-importance": __classPrivateFieldGet(this, _InlineLink_instances, "a", _InlineLink_computedImportance_get), download: this.download, href: this.href?.toString(), hrefLang: this.hreflang, onBlur: __classPrivateFieldGet(this, _InlineLink_onBlur, "f"), onFocus: __classPrivateFieldGet(this, _InlineLink_onFocus, "f"), referrerPolicy: this.referrerPolicy, rel: this.rel, tabIndex: -1, target: this.target, ref: __classPrivateFieldGet(this, _InlineLink_linkRef, "f") }, this.iconName !== undefined && this.iconName !== '' && (h("qds-icon", { key: 'cdabcabf6756f1bf3d94dbd4a43374fbec373af5', class: "qds-icon", library: this.iconLibrary, name: this.iconName })), h("span", { key: '12f71997301c6519d9d64b751e93d752d2d76986' }, h("slot", { key: '9fe5d4ca71fa4fd5c9a33e1c0609fa54c0b868e7', onSlotchange: __classPrivateFieldGet(this, _InlineLink_onSlotchange, "f") })), this.linkIcon && (h("qds-icon", { key: 'ccd889e22420b10336ba29cae3d788eb64383c9c', class: "qds-icon", library: "core", name: this.linkIcon }))));
124
+ }
125
+ get host() { return getElement(this); }
126
+ static get watchers() { return {
127
+ "disabled": ["disabledChanged"],
128
+ "tabindex": ["tabindexChanged"],
129
+ "rel": ["hrefTargetChanged"],
130
+ "target": ["hrefTargetChanged"]
131
+ }; }
132
+ };
133
+ _InlineLink_savedTabIndex = new WeakMap(), _InlineLink_link = new WeakMap(), _InlineLink_linkRef = new WeakMap(), _InlineLink_onBlur = new WeakMap(), _InlineLink_onFocus = new WeakMap(), _InlineLink_updateAriaLabelElements = new WeakMap(), _InlineLink_onSlotchange = new WeakMap(), _InlineLink_instances = new WeakSet(), _InlineLink_computedImportance_get = function _InlineLink_computedImportance_get() {
134
+ switch (this.importance) {
135
+ case 'subdued':
136
+ case 'emphasized': {
137
+ return this.importance;
138
+ }
139
+ default: {
140
+ return 'standard';
141
+ }
142
+ }
143
+ }, _InlineLink_openInNewTab_get = function _InlineLink_openInNewTab_get() {
144
+ return this.target === '_blank';
52
145
  };
53
146
  InlineLink.style = inlineLinkCss;
54
147
 
55
148
  export { InlineLink as qds_inline_link };
56
-
57
- //# sourceMappingURL=qds-inline-link.entry.js.map
149
+ //# sourceMappingURL=qds-inline-link.entry.js.map
@@ -1 +1 @@
1
- {"file":"qds-inline-link.entry.js","mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,utBAAutB;;MCkChuB,UAAU;;;;;IAqMb,wBAAmB,GAAe,EAAE,CAAA;IA6C3B,WAAM,GAAG,CAAC,KAAiB;MAC1C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAA;KACvD,CAAA;IAEgB,YAAO,GAAG,CAAC,KAAiB;MAC3C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAA;KACxD,CAAA;oBAnPyD,KAAK;;;;;;kBAgLA,OAAO;;EAkBtE,IAAY,gBAAgB;IAC1B,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IAC1E,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAA;GACnD;EAGS,OAAO,CAAC,KAAiB;IACjC,IAAI,IAAI,CAAC,QAAQ,EAAE;MACjB,KAAK,CAAC,cAAc,EAAE,CAAA;MACtB,KAAK,CAAC,eAAe,EAAE,CAAA;KACxB;GACF;EAEM,iBAAiB;IACtB,IAAI,CAAC,mBAAmB,GAAG;MACzB,GAAG,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC;MACtC,GAAG,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC;KACjD,CAAA;GACF;EAEM,MAAM;IACX,QACE,0BACiB,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,EAC/C,KAAK,EAAC,aAAa,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,MAAM,EAAE,IAAI,CAAC,MAAM,KAEf,IAAI,CAAC,mBAAmB,EAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,gBAAgB,IAEpD,eAAQ,EACR,gBAAU,KAAK,EAAC,UAAU,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,eAAe,GAAG,CAC/D,EACL;GACF;;;;;;;;","names":[],"sources":["src/components/inline-link/inline-link.css?tag=qds-inline-link&encapsulation=shadow","src/components/inline-link/inline-link.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2023 Schneider Electric\n *\n * SPDX-License-Identifier: LGPL-2.1-only\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n}\n\n.external {\n display: none;\n height: 1.25em;\n margin-inline-start: var(--qds-text-icon-gap);\n vertical-align: text-top;\n width: 1.25em;\n}\n\n.inline-link {\n border-radius: var(--qds-focus-border-radius);\n color: var(--qds-theme-link-default);\n\n &[rel~='external'] > .external {\n display: inline-block;\n }\n\n &:focus-visible {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n }\n\n &:visited {\n color: var(--qds-theme-link-visited);\n }\n}\n\n[aria-disabled='true'] {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n","// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport { Component, Element, Event, h, Listen, Prop } from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { Attributes, QdsFocusEventDetail } from '../../helpers'\nimport {\n inheritAriaAttributes,\n inheritAttributes,\n pickFocusEventAttributes,\n} from '../../helpers'\n\nexport type Target = '_blank' | '_parent' | '_self' | '_top'\n\n/**\n * `<qds-inline-link>` elements, with their `href` property, create a hyperlink\n * to web pages, files, email addresses, locations in the same page, or\n * anything else a URL can address.\n *\n * Content within each `<qds-inline-link>` *should* indicate the inline link's\n * destination. If the `href` property is present, pressing the enter key while\n * focused on the `<qds-inline-link>` element will activate it.\n *\n * @slot Content to display for the inline link.\n * @see https://quartz.se.com/build/components/inline-link\n */\n@Component({\n tag: 'qds-inline-link',\n shadow: { delegatesFocus: true },\n styleUrl: 'inline-link.css',\n})\nexport class InlineLink implements ComponentInterface {\n /**\n * Prevents the inline link from being interacted with: it cannot be pressed\n * or focused.\n */\n @Prop({ mutable: true, reflect: true }) public disabled = false\n\n /**\n * Causes the browser to treat the linked URL as a download. Can be used with\n * or without a `filename` value:\n *\n * - Without a value, the browser will suggest a filename/extension,\n * generated from various sources:\n *\n * - The\n * [`Content-Disposition`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Disposition)\n * HTTP header\n * - The final segment in the URL\n * [path](https://developer.mozilla.org/docs/Web/API/URL/pathname)\n * - The\n * [media type](https://developer.mozilla.org/docs/Glossary/MIME_type)\n * (from the\n * [`Content-Type`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type)\n * header, the start of a\n * [`data:` URL](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URLs),\n * or\n * [`Blob.type`](https://developer.mozilla.org/docs/Web/API/Blob/type)\n * for a\n * [`blob:` URL](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL))\n * - `filename`: defining a value suggests it as the filename. `/` and `\\`\n * characters are converted to underscores (`_`). Filesystems may forbid\n * other characters in filenames, so browsers will adjust the suggested name\n * if necessary.\n *\n * @webnative\n */\n @Prop() public readonly download?: boolean | string\n\n /**\n * The URL that the inline link points to. Inline links are not restricted to\n * HTTP-based URLs — they can use any URL scheme supported by browsers:\n *\n * - Sections of a page with document fragments\n * - Specific text portions with\n * [text fragments](https://developer.mozilla.org/docs/Web/Text_fragments)\n * - Pieces of media files with media fragments\n * - Telephone numbers with `tel:` URLs\n * - Email addresses with `mailto:` URLs\n * - While web browsers may not support other URL schemes, websites can with\n * [`registerProtocolHandler()`](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)\n *\n * @webnative\n */\n @Prop() public readonly href?: string\n\n /**\n * Hints at the human language of the linked URL. No built-in functionality.\n * Allowed values are the same as\n * [the global `lang` attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang).\n *\n * @webnative\n */\n @Prop() public readonly hreflang?: string\n\n /**\n * How much of the\n * [referrer](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * to send when following the inline link.\n *\n * - `no-referrer`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent.\n * - `no-referrer-when-downgrade`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent to\n * [origin](https://developer.mozilla.org/docs/Glossary/Origin)s\n * without [TLS](https://developer.mozilla.org/docs/Glossary/TLS)\n * ([HTTPS](https://developer.mozilla.org/docs/Glossary/HTTPS)).\n * - `origin`: The sent referrer will be limited to the origin of the\n * referring page: its\n * [scheme](https://developer.mozilla.org/docs/Learn/Common_questions/What_is_a_URL),\n * [host](https://developer.mozilla.org/docs/Glossary/Host), and\n * [port](https://developer.mozilla.org/docs/Glossary/Port).\n * - `origin-when-cross-origin`: The referrer sent to other origins will be\n * limited to the scheme, the host, and the port. Navigations on the same\n * origin will still include the path.\n * - `same-origin`: A referrer will be sent for\n * [same origin](https://developer.mozilla.org/docs/Glossary/Same-origin_policy),\n * but cross-origin requests will contain no referrer information.\n * - `strict-origin`: Only send the origin of the document as the referrer\n * when the protocol security level stays the same (HTTPS→HTTPS), but don't\n * send it to a less secure destination (HTTPS→HTTP).\n * - `strict-origin-when-cross-origin` (default): Send a full URL when\n * performing a same-origin request, only send the origin when the protocol\n * security level stays the same (HTTPS→HTTPS), and send no header to a less\n * secure destination (HTTPS→HTTP).\n * - `unsafe-url`: The referrer will include the origin and the path (but not the\n * [fragment](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash),\n * [password](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password),\n * or [username](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)).\n * **This value is unsafe** because it leaks origins and paths from\n * TLS-protected resources to insecure origins.\n *\n * @webnative\n */\n @Prop({ attribute: 'referrerpolicy' })\n public readonly referrerPolicy?: ReferrerPolicy\n\n /**\n * The relationship of the linked URL as space-separated\n * [link types](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel).\n *\n * The following list includes some of the most important existing keywords.\n * Every keyword within a space-separated value should be unique within that\n * value.\n *\n * - [`alternate`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-alternate):\n * Alternate representations of the current document.\n * - [`author`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-author):\n * Author of the current document or article.\n * - [`bookmark`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-bookmark):\n * Permalink for the nearest ancestor section.\n * - [`external`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-external):\n * The referenced document is not part of the same site as the current\n * document. An icon will be rendered next to the text if this value is\n * specified.\n * - [`help`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-help):\n * Link to context-sensitive help.\n * - [`license`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-license):\n * Indicates that the main content of the current document is covered by the\n * copyright license described by the referenced document.\n * - [`me`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me):\n * Indicates that the current document represents the person who owns the\n * linked content.\n * - [`next`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-next):\n * Indicates that the current document is a part of a series and that the\n * next document in the series is the referenced document.\n * - [`nofollow`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-nofollow):\n * Indicates that the current document's original author or publisher does\n * not endorse the referenced document.\n * - [`noopener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/noopener):\n * Creates a top-level browsing context that is not an auxiliary browsing\n * context if the hyperlink would create either of those, to begin with (i.e.,\n * has an appropriate `target` attribute value).\n * - [`noreferrer`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-noreferrer):\n * No `Referer` header will be included. Additionally, has the same effect as\n * `noopener`.\n * - [`opener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-opener):\n * Creates an auxiliary browsing context if the hyperlink would otherwise\n * create a top-level browsing context that is not an auxiliary browsing\n * context (i.e., has \"`_blank`\" as `target` attribute value).\n * - [`prev`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-prev):\n * Indicates that the current document is a part of a series and that the\n * previous document in the series is the referenced document.\n * - [`search`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-search):\n * Gives a link to a resource that can be used to search through the current\n * document and its related pages.\n * - [`tag`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-tag):\n * Gives a tag (identified by the given address) that applies to the current\n * document.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target: LiteralUnion<Target, string> = '_self'\n\n /**\n * Emitted when the inline link loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the inline link gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly element!: HTMLQdsInlineLinkElement\n\n private inheritedAttributes: Attributes = {}\n\n private get computedTabIndex(): number {\n const parsedValue = Number.parseInt(this.inheritedAttributes.tabindex, 10)\n return Number.isNaN(parsedValue) ? 0 : parsedValue\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.disabled) {\n event.preventDefault()\n event.stopPropagation()\n }\n }\n\n public componentWillLoad(): void {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.element),\n ...inheritAttributes(this.element, ['tabindex']),\n }\n }\n\n public render() {\n return (\n <a\n aria-disabled={this.disabled ? 'true' : 'false'}\n class=\"inline-link\"\n download={this.download}\n href={this.href}\n hrefLang={this.hreflang}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n target={this.target}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.inheritedAttributes}\n tabIndex={this.disabled ? -1 : this.computedTabIndex}\n >\n <slot />\n <qds-icon class=\"external\" library=\"core\" name=\"external-link\" />\n </a>\n )\n }\n\n private readonly onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n private readonly onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n}\n"],"version":3}
1
+ {"version":3,"file":"qds-inline-link.entry.js","sources":["src/components/inline-link/inline-link.css?tag=qds-inline-link&encapsulation=shadow","src/components/inline-link/inline-link.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n}\n\n:host(: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.qds-icon {\n height: var(--qds-control-hero-icon-size);\n width: var(--qds-control-hero-icon-size);\n transform: scaleX(var(--qds-direction-factor, 1));\n}\n\n.qds-inline-link {\n display: flex;\n gap: var(--qds-text-icon-gap);\n align-items: center;\n}\n\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-link-subdued-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-subdued-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-subdued-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-link-standard-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-standard-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-standard-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='emphasized'] {\n color: var(--qds-theme-link-emphasized-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-emphasized-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-emphasized-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport {\n determineLinkIcon,\n invariant,\n pickFocusEventAttributes,\n} from '../../helpers'\nimport type { Importance, LinkIcon, Target } from '../shared'\n\n/**\n * `<qds-inline-link>` elements, with their `href` property, create a hyperlink\n * to web pages, files, email addresses, locations in the same page, or\n * anything else a URL can address.\n *\n * Content within each `<qds-inline-link>` *should* indicate the inline link's\n * destination. If the `href` property is present, pressing the enter key while\n * focused on the `<qds-inline-link>` element will activate it.\n *\n * @slot Content to display for the inline link.\n * @see https://quartz.se.com/build/components/inline-link\n */\n@Component({\n tag: 'qds-inline-link',\n shadow: true,\n styleUrl: 'inline-link.css',\n})\nexport class InlineLink implements ComponentInterface {\n /**\n * Prevents the inline link from being interacted with: it cannot be pressed\n * or focused.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * The inline link's importance.\n */\n @Prop() public readonly importance?: Importance = 'standard'\n\n /**\n * Causes the browser to treat the linked URL as a download. Can be used with\n * or without a `filename` value:\n *\n * - Without a value, the browser will suggest a filename/extension,\n * generated from various sources:\n *\n * - The\n * [`Content-Disposition`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Disposition)\n * HTTP header\n * - The final segment in the URL\n * [path](https://developer.mozilla.org/docs/Web/API/URL/pathname)\n * - The\n * [media type](https://developer.mozilla.org/docs/Glossary/MIME_type)\n * (from the\n * [`Content-Type`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type)\n * header, the start of a\n * [`data:` URL](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URLs),\n * or\n * [`Blob.type`](https://developer.mozilla.org/docs/Web/API/Blob/type)\n * for a\n * [`blob:` URL](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL))\n * - `filename`: defining a value suggests it as the filename. `/` and `\\`\n * characters are converted to underscores (`_`). Filesystems may forbid\n * other characters in filenames, so browsers will adjust the suggested name\n * if necessary.\n *\n * @webnative\n */\n @Prop() public readonly download?: boolean | string\n\n /**\n * The URL that the inline link points to. Inline links are not restricted to\n * HTTP-based URLs — they can use any URL scheme supported by browsers:\n *\n * - Sections of a page with document fragments\n * - Specific text portions with\n * [text fragments](https://developer.mozilla.org/docs/Web/Text_fragments)\n * - Pieces of media files with media fragments\n * - Telephone numbers with `tel:` URLs\n * - Email addresses with `mailto:` URLs\n * - While web browsers may not support other URL schemes, websites can with\n * [`registerProtocolHandler()`](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)\n *\n * @webnative\n */\n @Prop() public readonly href?: URL | string\n\n /**\n * Hints at the human language of the linked URL. No built-in functionality.\n * Allowed values are the same as\n * [the global `lang` attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang).\n *\n * @webnative\n */\n @Prop() public readonly hreflang?: string\n\n /**\n * How much of the\n * [referrer](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * to send when following the inline link.\n *\n * - `no-referrer`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent.\n * - `no-referrer-when-downgrade`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent to\n * [origin](https://developer.mozilla.org/docs/Glossary/Origin)s\n * without [TLS](https://developer.mozilla.org/docs/Glossary/TLS)\n * ([HTTPS](https://developer.mozilla.org/docs/Glossary/HTTPS)).\n * - `origin`: The sent referrer will be limited to the origin of the\n * referring page: its\n * [scheme](https://developer.mozilla.org/docs/Learn/Common_questions/What_is_a_URL),\n * [host](https://developer.mozilla.org/docs/Glossary/Host), and\n * [port](https://developer.mozilla.org/docs/Glossary/Port).\n * - `origin-when-cross-origin`: The referrer sent to other origins will be\n * limited to the scheme, the host, and the port. Navigations on the same\n * origin will still include the path.\n * - `same-origin`: A referrer will be sent for\n * [same origin](https://developer.mozilla.org/docs/Glossary/Same-origin_policy),\n * but cross-origin requests will contain no referrer information.\n * - `strict-origin`: Only send the origin of the document as the referrer\n * when the protocol security level stays the same (HTTPS→HTTPS), but don't\n * send it to a less secure destination (HTTPS→HTTP).\n * - `strict-origin-when-cross-origin` (default): Send a full URL when\n * performing a same-origin request, only send the origin when the protocol\n * security level stays the same (HTTPS→HTTPS), and send no header to a less\n * secure destination (HTTPS→HTTP).\n * - `unsafe-url`: The referrer will include the origin and the path (but not the\n * [fragment](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash),\n * [password](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password),\n * or [username](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)).\n * **This value is unsafe** because it leaks origins and paths from\n * TLS-protected resources to insecure origins.\n *\n * @webnative\n */\n @Prop({ attribute: 'referrerpolicy' })\n public readonly referrerPolicy?: ReferrerPolicy\n\n /**\n * The relationship of the linked URL as space-separated\n * [link types](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel).\n *\n * The following list includes some of the most important existing keywords.\n * Every keyword within a space-separated value should be unique within that\n * value.\n *\n * - [`alternate`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-alternate):\n * Alternate representations of the current document.\n * - [`author`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-author):\n * Author of the current document or article.\n * - [`bookmark`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-bookmark):\n * Permalink for the nearest ancestor section.\n * - [`external`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-external):\n * The referenced document is not part of the same site as the current\n * document. An icon will be rendered next to the text if this value is\n * specified.\n * - [`help`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-help):\n * Link to context-sensitive help.\n * - [`license`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-license):\n * Indicates that the main content of the current document is covered by the\n * copyright license described by the referenced document.\n * - [`me`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me):\n * Indicates that the current document represents the person who owns the\n * linked content.\n * - [`next`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-next):\n * Indicates that the current document is a part of a series and that the\n * next document in the series is the referenced document.\n * - [`nofollow`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-nofollow):\n * Indicates that the current document's original author or publisher does\n * not endorse the referenced document.\n * - [`noopener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/noopener):\n * Creates a top-level browsing context that is not an auxiliary browsing\n * context if the hyperlink would create either of those, to begin with (i.e.,\n * has an appropriate `target` attribute value).\n * - [`noreferrer`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-noreferrer):\n * No `Referer` header will be included. Additionally, has the same effect as\n * `noopener`.\n * - [`opener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-opener):\n * Creates an auxiliary browsing context if the hyperlink would otherwise\n * create a top-level browsing context that is not an auxiliary browsing\n * context (i.e., has \"`_blank`\" as `target` attribute value).\n * - [`prev`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-prev):\n * Indicates that the current document is a part of a series and that the\n * previous document in the series is the referenced document.\n * - [`search`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-search):\n * Gives a link to a resource that can be used to search through the current\n * document and its related pages.\n * - [`tag`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-tag):\n * Gives a tag (identified by the given address) that applies to the current\n * document.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<Target, string>\n\n /**\n * Emitted when the inline link loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the inline link gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private linkIcon?: LinkIcon\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #savedTabIndex = 0\n\n #link?: HTMLAnchorElement\n\n get #computedImportance(): Importance {\n switch (this.importance) {\n case 'subdued':\n case 'emphasized': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #openInNewTab(): boolean {\n return this.target === '_blank'\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.disabled) event.stopImmediatePropagation()\n invariant(this.#link)\n this.#link.click()\n }\n\n @Listen('keydown')\n protected onKeydown(event: KeyboardEvent): void {\n invariant(this.#link)\n if (this.disabled) return\n if (event.key === 'Enter') this.#link.click()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.disabled.toString()\n if (this.disabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n // FIXME: `undefined` instead of `0` causes `qdsFocus/qdsBlur` E2E tests\n // to fail, but it's not clear why this is the case since it works for\n // other components.\n this.#savedTabIndex = Number.isNaN(parsedValue) ? 0 : parsedValue\n if (this.disabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('rel')\n @Watch('target')\n protected hrefTargetChanged(): void {\n this.linkIcon = determineLinkIcon(this.target, this.rel)\n this.#updateAriaLabelElements()\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'link'\n this.disabledChanged()\n this.hrefTargetChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public componentDidLoad(): void {\n this.#updateAriaLabelElements()\n }\n\n public render() {\n return (\n <a\n aria-hidden=\"true\"\n class={{\n 'qds-inline-link': true,\n 'qds-disabled': this.disabled,\n }}\n data-importance={this.#computedImportance}\n download={this.download}\n href={this.href?.toString()}\n hrefLang={this.hreflang}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n tabIndex={-1}\n target={this.target}\n ref={this.#linkRef}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n <span>\n <slot onSlotchange={this.#onSlotchange} />\n </span>\n {this.linkIcon && (\n <qds-icon class=\"qds-icon\" library=\"core\" name={this.linkIcon} />\n )}\n </a>\n )\n }\n\n readonly #linkRef = (link?: HTMLAnchorElement): void => {\n this.#link = link\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #updateAriaLabelElements = (): void => {\n this.internals.ariaLabel = `${this.host.textContent} ${\n this.#openInN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