@quartzds/core 1.0.0-beta.8 → 1.0.0-beta.81

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 (387) hide show
  1. package/README.md +5 -5
  2. package/components/index.d.ts +50 -0
  3. package/components/index.js +49 -27
  4. package/components/index.js.map +1 -1
  5. package/components/p-028b9d2e.js +96 -0
  6. package/components/p-028b9d2e.js.map +1 -0
  7. package/components/p-355efdb1.js +83 -0
  8. package/components/p-355efdb1.js.map +1 -0
  9. package/components/p-4141d6ed.js +204 -0
  10. package/components/p-4141d6ed.js.map +1 -0
  11. package/components/p-698edde1.js +321 -0
  12. package/components/p-698edde1.js.map +1 -0
  13. package/components/p-7b04d43e.js +1556 -0
  14. package/components/p-7b04d43e.js.map +1 -0
  15. package/components/p-7f6e797a.js +108 -0
  16. package/components/p-7f6e797a.js.map +1 -0
  17. package/components/p-82461767.js +328 -0
  18. package/components/p-82461767.js.map +1 -0
  19. package/components/p-9df62f97.js +89 -0
  20. package/components/p-9df62f97.js.map +1 -0
  21. package/components/p-b82bac0a.js +121 -0
  22. package/components/p-b82bac0a.js.map +1 -0
  23. package/components/p-d107c90c.js +27 -0
  24. package/components/p-d107c90c.js.map +1 -0
  25. package/components/p-d279ae53.js +86 -0
  26. package/components/p-d279ae53.js.map +1 -0
  27. package/components/p-f5ba28ff.js +372 -0
  28. package/components/p-f5ba28ff.js.map +1 -0
  29. package/components/p-f85b490c.js +217 -0
  30. package/components/p-f85b490c.js.map +1 -0
  31. package/components/{floating-ui.dom.esm.js → p-fdd0abae.js} +468 -416
  32. package/components/p-fdd0abae.js.map +1 -0
  33. package/components/qds-badge-counter.d.ts +11 -0
  34. package/components/qds-badge-counter.js +13 -0
  35. package/components/qds-badge-counter.js.map +1 -0
  36. package/components/qds-badge-indicator.d.ts +11 -0
  37. package/components/qds-badge-indicator.js +13 -0
  38. package/components/qds-badge-indicator.js.map +1 -0
  39. package/components/qds-breadcrumb-item.d.ts +11 -0
  40. package/components/qds-breadcrumb-item.js +76 -0
  41. package/components/qds-breadcrumb-item.js.map +1 -0
  42. package/components/qds-button.d.ts +2 -2
  43. package/components/qds-button.js +3 -138
  44. package/components/qds-button.js.map +1 -1
  45. package/components/qds-checkbox.d.ts +2 -2
  46. package/components/qds-checkbox.js +3 -146
  47. package/components/qds-checkbox.js.map +1 -1
  48. package/components/qds-chip.d.ts +11 -0
  49. package/components/qds-chip.js +271 -0
  50. package/components/qds-chip.js.map +1 -0
  51. package/components/qds-dialog.d.ts +11 -0
  52. package/components/qds-dialog.js +121 -0
  53. package/components/qds-dialog.js.map +1 -0
  54. package/components/qds-divider.d.ts +11 -0
  55. package/components/qds-divider.js +13 -0
  56. package/components/qds-divider.js.map +1 -0
  57. package/components/qds-dropdown.d.ts +2 -2
  58. package/components/qds-dropdown.js +266 -239
  59. package/components/qds-dropdown.js.map +1 -1
  60. package/components/qds-form-message.d.ts +11 -0
  61. package/components/qds-form-message.js +102 -0
  62. package/components/qds-form-message.js.map +1 -0
  63. package/components/qds-icon.d.ts +2 -2
  64. package/components/qds-icon.js +3 -3
  65. package/components/qds-inline-link.d.ts +2 -2
  66. package/components/qds-inline-link.js +135 -73
  67. package/components/qds-inline-link.js.map +1 -1
  68. package/components/qds-input.d.ts +2 -2
  69. package/components/qds-input.js +426 -230
  70. package/components/qds-input.js.map +1 -1
  71. package/components/qds-label.d.ts +2 -2
  72. package/components/qds-label.js +3 -3
  73. package/components/qds-list-item.d.ts +11 -0
  74. package/components/qds-list-item.js +207 -0
  75. package/components/qds-list-item.js.map +1 -0
  76. package/components/qds-loader.d.ts +11 -0
  77. package/components/qds-loader.js +111 -0
  78. package/components/qds-loader.js.map +1 -0
  79. package/components/qds-nav-list-item.d.ts +11 -0
  80. package/components/qds-nav-list-item.js +146 -0
  81. package/components/qds-nav-list-item.js.map +1 -0
  82. package/components/qds-progress-bar.d.ts +11 -0
  83. package/components/qds-progress-bar.js +135 -0
  84. package/components/qds-progress-bar.js.map +1 -0
  85. package/components/qds-radio.d.ts +2 -2
  86. package/components/qds-radio.js +140 -93
  87. package/components/qds-radio.js.map +1 -1
  88. package/components/qds-select.d.ts +11 -0
  89. package/components/qds-select.js +273 -0
  90. package/components/qds-select.js.map +1 -0
  91. package/components/qds-standalone-link.d.ts +11 -0
  92. package/components/qds-standalone-link.js +167 -0
  93. package/components/qds-standalone-link.js.map +1 -0
  94. package/components/qds-switch.d.ts +2 -2
  95. package/components/qds-switch.js +172 -105
  96. package/components/qds-switch.js.map +1 -1
  97. package/components/qds-tab.d.ts +11 -0
  98. package/components/qds-tab.js +339 -0
  99. package/components/qds-tab.js.map +1 -0
  100. package/components/qds-tabbar.d.ts +11 -0
  101. package/components/qds-tabbar.js +384 -0
  102. package/components/qds-tabbar.js.map +1 -0
  103. package/components/qds-table-body.d.ts +11 -0
  104. package/components/qds-table-body.js +68 -0
  105. package/components/qds-table-body.js.map +1 -0
  106. package/components/qds-table-cell.d.ts +11 -0
  107. package/components/qds-table-cell.js +73 -0
  108. package/components/qds-table-cell.js.map +1 -0
  109. package/components/qds-table-head-cell.d.ts +11 -0
  110. package/components/qds-table-head-cell.js +77 -0
  111. package/components/qds-table-head-cell.js.map +1 -0
  112. package/components/qds-table-head.d.ts +11 -0
  113. package/components/qds-table-head.js +68 -0
  114. package/components/qds-table-head.js.map +1 -0
  115. package/components/qds-table-row.d.ts +11 -0
  116. package/components/qds-table-row.js +68 -0
  117. package/components/qds-table-row.js.map +1 -0
  118. package/components/qds-table.d.ts +11 -0
  119. package/components/qds-table.js +68 -0
  120. package/components/qds-table.js.map +1 -0
  121. package/components/qds-tag.d.ts +11 -0
  122. package/components/qds-tag.js +13 -0
  123. package/components/qds-tag.js.map +1 -0
  124. package/components/qds-textarea.d.ts +2 -2
  125. package/components/qds-textarea.js +276 -193
  126. package/components/qds-textarea.js.map +1 -1
  127. package/components/qds-title.d.ts +2 -2
  128. package/components/qds-title.js +3 -84
  129. package/components/qds-title.js.map +1 -1
  130. package/components/qds-tooltip.d.ts +2 -2
  131. package/components/qds-tooltip.js +3 -315
  132. package/components/qds-tooltip.js.map +1 -1
  133. package/dist/cjs/app-globals-c4cf08df.js +12 -0
  134. package/dist/cjs/app-globals-c4cf08df.js.map +1 -0
  135. package/dist/cjs/controls-ee3d2ec8.js +31 -0
  136. package/dist/cjs/controls-ee3d2ec8.js.map +1 -0
  137. package/dist/cjs/{floating-ui.dom.esm-71fa96af.js → floating-ui.dom.esm-19b2b933.js} +468 -416
  138. package/dist/cjs/floating-ui.dom.esm-19b2b933.js.map +1 -0
  139. package/dist/cjs/helpers-cdd65bd0.js +217 -0
  140. package/dist/cjs/helpers-cdd65bd0.js.map +1 -0
  141. package/dist/cjs/index-a9985af0.js +1699 -0
  142. package/dist/cjs/index-a9985af0.js.map +1 -0
  143. package/dist/cjs/index.cjs.js +27 -27
  144. package/dist/cjs/index.cjs.js.map +1 -1
  145. package/dist/cjs/library-57845012.js +117 -0
  146. package/dist/cjs/library-57845012.js.map +1 -0
  147. package/dist/cjs/loader.cjs.js +8 -6
  148. package/dist/cjs/loader.cjs.js.map +1 -1
  149. package/dist/cjs/qds-badge-counter_3.cjs.entry.js +445 -0
  150. package/dist/cjs/qds-badge-counter_3.cjs.entry.js.map +1 -0
  151. package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +55 -0
  152. package/dist/cjs/qds-breadcrumb-item.cjs.entry.js.map +1 -0
  153. package/dist/cjs/qds-button.cjs.entry.js +234 -87
  154. package/dist/cjs/qds-button.cjs.entry.js.map +1 -1
  155. package/dist/cjs/qds-checkbox.cjs.entry.js +162 -99
  156. package/dist/cjs/qds-checkbox.cjs.entry.js.map +1 -1
  157. package/dist/cjs/qds-chip.cjs.entry.js +231 -0
  158. package/dist/cjs/qds-chip.cjs.entry.js.map +1 -0
  159. package/dist/cjs/qds-dialog.cjs.entry.js +103 -0
  160. package/dist/cjs/qds-dialog.cjs.entry.js.map +1 -0
  161. package/dist/cjs/qds-divider.cjs.entry.js +69 -0
  162. package/dist/cjs/qds-divider.cjs.entry.js.map +1 -0
  163. package/dist/cjs/qds-dropdown.cjs.entry.js +225 -206
  164. package/dist/cjs/qds-dropdown.cjs.entry.js.map +1 -1
  165. package/dist/cjs/qds-form-message.cjs.entry.js +76 -0
  166. package/dist/cjs/qds-form-message.cjs.entry.js.map +1 -0
  167. package/dist/cjs/qds-icon.cjs.entry.js +111 -90
  168. package/dist/cjs/qds-icon.cjs.entry.js.map +1 -1
  169. package/dist/cjs/qds-inline-link.cjs.entry.js +98 -46
  170. package/dist/cjs/qds-inline-link.cjs.entry.js.map +1 -1
  171. package/dist/cjs/qds-input.cjs.entry.js +337 -185
  172. package/dist/cjs/qds-input.cjs.entry.js.map +1 -1
  173. package/dist/cjs/qds-label.cjs.entry.js +58 -24
  174. package/dist/cjs/qds-label.cjs.entry.js.map +1 -1
  175. package/dist/cjs/qds-list-item.cjs.entry.js +158 -0
  176. package/dist/cjs/qds-list-item.cjs.entry.js.map +1 -0
  177. package/dist/cjs/qds-loader.cjs.entry.js +92 -0
  178. package/dist/cjs/qds-loader.cjs.entry.js.map +1 -0
  179. package/dist/cjs/qds-nav-list-item.cjs.entry.js +108 -0
  180. package/dist/cjs/qds-nav-list-item.cjs.entry.js.map +1 -0
  181. package/dist/cjs/qds-progress-bar.cjs.entry.js +117 -0
  182. package/dist/cjs/qds-progress-bar.cjs.entry.js.map +1 -0
  183. package/dist/cjs/qds-radio.cjs.entry.js +101 -57
  184. package/dist/cjs/qds-radio.cjs.entry.js.map +1 -1
  185. package/dist/cjs/qds-select.cjs.entry.js +233 -0
  186. package/dist/cjs/qds-select.cjs.entry.js.map +1 -0
  187. package/dist/cjs/qds-standalone-link.cjs.entry.js +127 -0
  188. package/dist/cjs/qds-standalone-link.cjs.entry.js.map +1 -0
  189. package/dist/cjs/qds-switch.cjs.entry.js +143 -64
  190. package/dist/cjs/qds-switch.cjs.entry.js.map +1 -1
  191. package/dist/cjs/qds-tab.cjs.entry.js +260 -0
  192. package/dist/cjs/qds-tab.cjs.entry.js.map +1 -0
  193. package/dist/cjs/qds-tabbar.cjs.entry.js +326 -0
  194. package/dist/cjs/qds-tabbar.cjs.entry.js.map +1 -0
  195. package/dist/cjs/qds-table-body.cjs.entry.js +54 -0
  196. package/dist/cjs/qds-table-body.cjs.entry.js.map +1 -0
  197. package/dist/cjs/qds-table-cell.cjs.entry.js +56 -0
  198. package/dist/cjs/qds-table-cell.cjs.entry.js.map +1 -0
  199. package/dist/cjs/qds-table-head-cell.cjs.entry.js +58 -0
  200. package/dist/cjs/qds-table-head-cell.cjs.entry.js.map +1 -0
  201. package/dist/cjs/qds-table-head.cjs.entry.js +54 -0
  202. package/dist/cjs/qds-table-head.cjs.entry.js.map +1 -0
  203. package/dist/cjs/qds-table-row.cjs.entry.js +54 -0
  204. package/dist/cjs/qds-table-row.cjs.entry.js.map +1 -0
  205. package/dist/cjs/qds-table.cjs.entry.js +54 -0
  206. package/dist/cjs/qds-table.cjs.entry.js.map +1 -0
  207. package/dist/cjs/qds-tag_2.cjs.entry.js +163 -0
  208. package/dist/cjs/qds-tag_2.cjs.entry.js.map +1 -0
  209. package/dist/cjs/qds-textarea.cjs.entry.js +229 -153
  210. package/dist/cjs/qds-textarea.cjs.entry.js.map +1 -1
  211. package/dist/cjs/qds.cjs.js +15 -13
  212. package/dist/cjs/qds.cjs.js.map +1 -1
  213. package/dist/custom-elements.json +8403 -1931
  214. package/dist/docs.d.ts +336 -240
  215. package/dist/docs.json +8819 -2762
  216. package/dist/esm/app-globals-8ced3a41.js +10 -0
  217. package/dist/esm/app-globals-8ced3a41.js.map +1 -0
  218. package/dist/esm/controls-a4768aaf.js +27 -0
  219. package/dist/esm/controls-a4768aaf.js.map +1 -0
  220. package/dist/esm/{floating-ui.dom.esm-f96ac766.js → floating-ui.dom.esm-61986f35.js} +468 -416
  221. package/dist/esm/floating-ui.dom.esm-61986f35.js.map +1 -0
  222. package/dist/esm/helpers-4eb4fa44.js +204 -0
  223. package/dist/esm/helpers-4eb4fa44.js.map +1 -0
  224. package/dist/esm/index-5291e8ff.js +1668 -0
  225. package/dist/esm/index-5291e8ff.js.map +1 -0
  226. package/dist/esm/index.js +27 -27
  227. package/dist/esm/index.js.map +1 -1
  228. package/dist/esm/library-9edbe354.js +113 -0
  229. package/dist/esm/library-9edbe354.js.map +1 -0
  230. package/dist/esm/loader.js +9 -7
  231. package/dist/esm/loader.js.map +1 -1
  232. package/dist/esm/qds-badge-counter_3.entry.js +439 -0
  233. package/dist/esm/qds-badge-counter_3.entry.js.map +1 -0
  234. package/dist/esm/qds-breadcrumb-item.entry.js +51 -0
  235. package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -0
  236. package/dist/esm/qds-button.entry.js +234 -87
  237. package/dist/esm/qds-button.entry.js.map +1 -1
  238. package/dist/esm/qds-checkbox.entry.js +162 -99
  239. package/dist/esm/qds-checkbox.entry.js.map +1 -1
  240. package/dist/esm/qds-chip.entry.js +227 -0
  241. package/dist/esm/qds-chip.entry.js.map +1 -0
  242. package/dist/esm/qds-dialog.entry.js +99 -0
  243. package/dist/esm/qds-dialog.entry.js.map +1 -0
  244. package/dist/esm/qds-divider.entry.js +65 -0
  245. package/dist/esm/qds-divider.entry.js.map +1 -0
  246. package/dist/esm/qds-dropdown.entry.js +225 -206
  247. package/dist/esm/qds-dropdown.entry.js.map +1 -1
  248. package/dist/esm/qds-form-message.entry.js +72 -0
  249. package/dist/esm/qds-form-message.entry.js.map +1 -0
  250. package/dist/esm/qds-icon.entry.js +111 -90
  251. package/dist/esm/qds-icon.entry.js.map +1 -1
  252. package/dist/esm/qds-inline-link.entry.js +98 -46
  253. package/dist/esm/qds-inline-link.entry.js.map +1 -1
  254. package/dist/esm/qds-input.entry.js +337 -185
  255. package/dist/esm/qds-input.entry.js.map +1 -1
  256. package/dist/esm/qds-label.entry.js +58 -24
  257. package/dist/esm/qds-label.entry.js.map +1 -1
  258. package/dist/esm/qds-list-item.entry.js +154 -0
  259. package/dist/esm/qds-list-item.entry.js.map +1 -0
  260. package/dist/esm/qds-loader.entry.js +88 -0
  261. package/dist/esm/qds-loader.entry.js.map +1 -0
  262. package/dist/esm/qds-nav-list-item.entry.js +104 -0
  263. package/dist/esm/qds-nav-list-item.entry.js.map +1 -0
  264. package/dist/esm/qds-progress-bar.entry.js +113 -0
  265. package/dist/esm/qds-progress-bar.entry.js.map +1 -0
  266. package/dist/esm/qds-radio.entry.js +101 -57
  267. package/dist/esm/qds-radio.entry.js.map +1 -1
  268. package/dist/esm/qds-select.entry.js +229 -0
  269. package/dist/esm/qds-select.entry.js.map +1 -0
  270. package/dist/esm/qds-standalone-link.entry.js +123 -0
  271. package/dist/esm/qds-standalone-link.entry.js.map +1 -0
  272. package/dist/esm/qds-switch.entry.js +143 -64
  273. package/dist/esm/qds-switch.entry.js.map +1 -1
  274. package/dist/esm/qds-tab.entry.js +256 -0
  275. package/dist/esm/qds-tab.entry.js.map +1 -0
  276. package/dist/esm/qds-tabbar.entry.js +322 -0
  277. package/dist/esm/qds-tabbar.entry.js.map +1 -0
  278. package/dist/esm/qds-table-body.entry.js +50 -0
  279. package/dist/esm/qds-table-body.entry.js.map +1 -0
  280. package/dist/esm/qds-table-cell.entry.js +52 -0
  281. package/dist/esm/qds-table-cell.entry.js.map +1 -0
  282. package/dist/esm/qds-table-head-cell.entry.js +54 -0
  283. package/dist/esm/qds-table-head-cell.entry.js.map +1 -0
  284. package/dist/esm/qds-table-head.entry.js +50 -0
  285. package/dist/esm/qds-table-head.entry.js.map +1 -0
  286. package/dist/esm/qds-table-row.entry.js +50 -0
  287. package/dist/esm/qds-table-row.entry.js.map +1 -0
  288. package/dist/esm/qds-table.entry.js +50 -0
  289. package/dist/esm/qds-table.entry.js.map +1 -0
  290. package/dist/esm/qds-tag_2.entry.js +158 -0
  291. package/dist/esm/qds-tag_2.entry.js.map +1 -0
  292. package/dist/esm/qds-textarea.entry.js +229 -153
  293. package/dist/esm/qds-textarea.entry.js.map +1 -1
  294. package/dist/esm/qds.js +16 -14
  295. package/dist/esm/qds.js.map +1 -1
  296. package/dist/types/components/badge-counter/badge-counter.d.ts +40 -0
  297. package/dist/types/components/badge-indicator/badge-indicator.d.ts +36 -0
  298. package/dist/types/components/breadcrumb-item/breadcrumb-item.d.ts +156 -0
  299. package/dist/types/components/button/button.d.ts +232 -194
  300. package/dist/types/components/checkbox/checkbox.d.ts +136 -124
  301. package/dist/types/components/chip/chip.d.ts +114 -0
  302. package/dist/types/components/controls.d.ts +4 -1
  303. package/dist/types/components/dialog/dialog.d.ts +35 -0
  304. package/dist/types/components/divider/divider.d.ts +26 -0
  305. package/dist/types/components/dropdown/dropdown.d.ts +107 -125
  306. package/dist/types/components/form-message/form-message.d.ts +42 -0
  307. package/dist/types/components/icon/icon.d.ts +24 -24
  308. package/dist/types/components/icon/library.d.ts +3 -3
  309. package/dist/types/components/icon/request.d.ts +5 -9
  310. package/dist/types/components/inline-link/inline-link.d.ts +208 -191
  311. package/dist/types/components/input/input.d.ts +444 -368
  312. package/dist/types/components/label/label.d.ts +24 -24
  313. package/dist/types/components/list-item/list-item.d.ts +100 -0
  314. package/dist/types/components/loader/loader.d.ts +27 -0
  315. package/dist/types/components/nav-list-item/nav-list-item.d.ts +67 -0
  316. package/dist/types/components/progress-bar/progress-bar.d.ts +60 -0
  317. package/dist/types/components/radio/radio.d.ts +90 -95
  318. package/dist/types/components/select/select.d.ts +210 -0
  319. package/dist/types/components/shared.d.ts +6 -0
  320. package/dist/types/components/standalone-link/standalone-link.d.ts +233 -0
  321. package/dist/types/components/switch/switch.d.ts +120 -107
  322. package/dist/types/components/tab/tab.d.ts +158 -0
  323. package/dist/types/components/tabbar/tabbar.d.ts +46 -0
  324. package/dist/types/components/table/table.d.ts +15 -0
  325. package/dist/types/components/table-body/table-body.d.ts +15 -0
  326. package/dist/types/components/table-cell/table-cell.d.ts +32 -0
  327. package/dist/types/components/table-head/table-head.d.ts +15 -0
  328. package/dist/types/components/table-head-cell/table-head-cell.d.ts +56 -0
  329. package/dist/types/components/table-row/table-row.d.ts +15 -0
  330. package/dist/types/components/tag/tag.d.ts +46 -0
  331. package/dist/types/components/textarea/textarea.d.ts +313 -300
  332. package/dist/types/components/title/title.d.ts +39 -32
  333. package/dist/types/components/tooltip/tooltip.d.ts +121 -137
  334. package/dist/types/components.d.ts +3320 -783
  335. package/dist/types/helpers.d.ts +15 -16
  336. package/dist/types/index.d.ts +1 -0
  337. package/dist/types/interface-overrides.d.ts +211 -0
  338. package/dist/types/qds-test.d.ts +22 -11
  339. package/dist/types/stencil-public-runtime.d.ts +49 -15
  340. package/dist/types/utils.d.ts +4 -4
  341. package/dist/vscode.html-custom-data.json +1580 -167
  342. package/hydrate/index.d.ts +36 -18
  343. package/hydrate/index.js +24050 -9160
  344. package/hydrate/index.mjs +24769 -0
  345. package/hydrate/package.json +7 -1
  346. package/loader/cdn.js +3 -4
  347. package/loader/index.cjs.js +3 -4
  348. package/loader/index.d.ts +4 -1
  349. package/loader/index.es2017.js +3 -4
  350. package/loader/index.js +3 -4
  351. package/package.json +53 -89
  352. package/styles/core.css +137 -14
  353. package/components/floating-ui.dom.esm.js.map +0 -1
  354. package/components/helpers.js +0 -175
  355. package/components/helpers.js.map +0 -1
  356. package/components/icon.js +0 -175
  357. package/components/icon.js.map +0 -1
  358. package/components/label.js +0 -55
  359. package/components/label.js.map +0 -1
  360. package/dist/cjs/floating-ui.dom.esm-71fa96af.js.map +0 -1
  361. package/dist/cjs/helpers-452256e8.js +0 -185
  362. package/dist/cjs/helpers-452256e8.js.map +0 -1
  363. package/dist/cjs/index-d181f952.js +0 -2039
  364. package/dist/cjs/index-d181f952.js.map +0 -1
  365. package/dist/cjs/library-0a619eeb.js +0 -62
  366. package/dist/cjs/library-0a619eeb.js.map +0 -1
  367. package/dist/cjs/qds-title.cjs.entry.js +0 -66
  368. package/dist/cjs/qds-title.cjs.entry.js.map +0 -1
  369. package/dist/cjs/qds-tooltip.cjs.entry.js +0 -284
  370. package/dist/cjs/qds-tooltip.cjs.entry.js.map +0 -1
  371. package/dist/esm/floating-ui.dom.esm-f96ac766.js.map +0 -1
  372. package/dist/esm/helpers-76b84f45.js +0 -175
  373. package/dist/esm/helpers-76b84f45.js.map +0 -1
  374. package/dist/esm/index-d7183092.js +0 -2009
  375. package/dist/esm/index-d7183092.js.map +0 -1
  376. package/dist/esm/library-021aca11.js +0 -58
  377. package/dist/esm/library-021aca11.js.map +0 -1
  378. package/dist/esm/polyfills/core-js.js +0 -11
  379. package/dist/esm/polyfills/dom.js +0 -79
  380. package/dist/esm/polyfills/es5-html-element.js +0 -1
  381. package/dist/esm/polyfills/index.js +0 -34
  382. package/dist/esm/polyfills/system.js +0 -6
  383. package/dist/esm/qds-title.entry.js +0 -62
  384. package/dist/esm/qds-title.entry.js.map +0 -1
  385. package/dist/esm/qds-tooltip.entry.js +0 -280
  386. package/dist/esm/qds-tooltip.entry.js.map +0 -1
  387. package/dist/types/components/create-story.d.ts +0 -5
@@ -0,0 +1 @@
1
+ {"file":"qds-form-message.entry.cjs.js","mappings":";;;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,4lEAA4lE,CAAC;AACpnE,6BAAe,cAAc;;ACD7B;AACA;AACA;;;;;;;;;;;;;;;;;;MAoBa,WAAW;;;;QAmCtB,2CAAmC,EAAE,EAAA;sBA5BK,KAAK;oBAKT,UAAU;sBAKN,OAAO;;;;IAqC1C,iBAAiB;QACtB,uBAAA,IAAI,oCAAwBA,6BAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAA;KAC7D;IAEM,MAAM;QACX,QACEC,mEACE,KAAK,EAAE;gBACL,kBAAkB,EAAE,IAAI;gBACxB,YAAY,EAAE,IAAI,CAAC,MAAM;aAC1B,eACU,uBAAA,IAAI,6DAAc,KAEzB,uBAAA,IAAI,wCAAqB,IAE7BA,kEAAK,KAAK,EAAC,oBAAoB,eAAY,uBAAA,IAAI,6DAAc,IAC3DA,kEACE,KAAK,EAAC,qBAAqB,eAChB,uBAAA,IAAI,6DAAc,iBAChB,IAAI,CAAC,MAAM,IAExBA,sFACc,MAAM,EAClB,KAAK,EAAC,UAAU,eACL,uBAAA,IAAI,6DAAc,EAC7B,IAAI,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE,EAC7B,OAAO,EAAC,MAAM,GACd,EACFA,mEAAM,KAAK,EAAC,aAAa,IAAE,IAAI,CAAC,iBAAiB,CAAQ,CACrD,CACF,EACNA,mEAAM,KAAK,EAAC,UAAU,iBAAc,uBAAA,IAAI,+DAAgB,IACrD,IAAI,CAAC,IAAI,CACL,CACF,EACR;KACF;;;;IApDC,QAAQ,IAAI,CAAC,IAAI;QACf,KAAK,UAAU,CAAC;QAChB,KAAK,OAAO,CAAC;QACb,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI,CAAA;SACjB;QACD,SAAS;YACP,OAAO,UAAU,CAAA;SAClB;KACF;AACH,CAAC;IAGC,OAAO,IAAI,CAAC,MAAM,IAAI,OAAO,CAAA;AAC/B,CAAC;;;;;","names":["inheritAriaAttributes","h"],"sources":["src/components/form-message/form-message.css?tag=qds-form-message&encapsulation=shadow","src/components/form-message/form-message.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n line-height: 0;\n}\n\n.qds-form-message {\n color: var(--qds-theme-control-text-standard);\n display: inline-flex;\n gap: var(--qds-text-icon-gap);\n}\n\n.qds-icon-container,\n.qds-icon-background {\n display: flex;\n align-items: center;\n}\n\n.qds-icon-background {\n border-radius: var(--qds-control-rounded-border-radius);\n}\n\n.qds-icon {\n color: var(--qds-theme-feedback-action-destructive-contrast);\n}\n\n.qds-sr-only {\n clip: rect(0 0 0 0);\n height: 1px;\n width: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n}\n\n[data-size='small'] {\n font: var(--qds-control-small-text);\n\n &.qds-icon-container {\n height: var(--qds-control-small-icon-crop-height);\n }\n\n &.qds-icon {\n width: var(--qds-control-small-icon-size);\n height: var(--qds-control-small-icon-size);\n }\n\n &.qds-inline {\n margin-block: var(--qds-control-small-padding-auto-height);\n }\n}\n\n[data-size='standard'] {\n font: var(--qds-control-standard-text);\n\n &.qds-icon-container {\n height: var(--qds-control-standard-icon-crop-height);\n }\n\n &.qds-icon {\n width: var(--qds-control-standard-icon-size);\n height: var(--qds-control-standard-icon-size);\n }\n\n &.qds-inline {\n margin-block: var(--qds-control-standard-padding-auto-height);\n }\n}\n\n[data-size='large'] {\n font: var(--qds-control-large-text);\n\n &.qds-icon-container {\n height: var(--qds-control-large-icon-crop-height);\n }\n\n &.qds-icon {\n width: var(--qds-control-large-icon-size);\n height: var(--qds-control-large-icon-size);\n }\n\n &.qds-inline {\n margin-block: var(--qds-control-large-padding-auto-height);\n }\n}\n\n[data-status='error'] {\n &.qds-icon-background {\n background-color: var(--qds-theme-feedback-result-failure);\n }\n\n &.qds-text {\n color: var(--qds-theme-feedback-result-failure);\n }\n}\n\n[data-status='info'].qds-icon-background {\n background-color: var(--qds-theme-feedback-message-informational);\n}\n\n[data-status='success'] {\n &.qds-icon-background {\n background-color: var(--qds-theme-feedback-result-success);\n }\n\n &.qds-text {\n color: var(--qds-theme-feedback-result-success);\n }\n}\n\n[data-status='warning'].qds-icon-background {\n background-color: var(--qds-theme-feedback-result-partial-success);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, Element, h, Prop } from '@stencil/core'\n\nimport type { Attributes } from '../../helpers'\nimport { inheritAriaAttributes } from '../../helpers'\nimport type { Size, Status } from '../shared'\n\n/**\n * `<qds-form-message>` elements represent messages for a form field in a user\n * interface.\n *\n * @see https://quartz.se.com/build/components/form-message\n */\n@Component({\n tag: 'qds-form-message',\n shadow: true,\n styleUrl: 'form-message.css',\n})\nexport class FormMessage implements ComponentInterface {\n /**\n * Adds vertical margin to the form message for alignment.\n *\n * This is useful when creating inline layouts so that the first lines have\n * the correct vertical centering.\n */\n @Prop() public readonly inline: boolean = false\n\n /**\n * The form message's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The form message's status.\n */\n @Prop() public readonly status?: Status = 'error'\n\n /**\n * Adds accessible text to the icon's form message that will be used by screen readers.\n *\n * @example\n * <qds-form-message status-description=\"Error\" text=\"Password is required.\"></qds-form-message>\n * // This form message will be read by screen readers as \"Error Password is required.\"\n */\n @Prop() public readonly statusDescription?: string\n\n /**\n * The form message's text.\n */\n @Prop() public readonly text?: string\n\n @Element() private readonly host!: HTMLQdsFormMessageElement\n\n #inheritedAttributes: Attributes = {}\n\n get #computedSize(): Size {\n switch (this.size) {\n case 'standard':\n case 'small':\n case 'large': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedStatus(): Status {\n return this.status ?? 'error'\n }\n\n public componentWillLoad(): void {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n }\n\n public render() {\n return (\n <span\n class={{\n 'qds-form-message': true,\n 'qds-inline': this.inline,\n }}\n data-size={this.#computedSize}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n >\n <div class=\"qds-icon-container\" data-size={this.#computedSize}>\n <div\n class=\"qds-icon-background\"\n data-size={this.#computedSize}\n data-status={this.status}\n >\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n data-size={this.#computedSize}\n name={`status-${this.status}`}\n library=\"core\"\n />\n <span class=\"qds-sr-only\">{this.statusDescription}</span>\n </div>\n </div>\n <span class=\"qds-text\" data-status={this.#computedStatus}>\n {this.text}\n </span>\n </span>\n )\n }\n}\n"],"version":3}
@@ -1,112 +1,133 @@
1
1
  /*!
2
- * SPDX-FileCopyrightText: © 2023 Schneider Electric
2
+ * SPDX-FileCopyrightText: © 2025 Schneider Electric
3
3
  *
4
- * SPDX-License-Identifier: LGPL-2.1-only
4
+ * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const index = require('./index-d181f952.js');
11
- const helpers = require('./helpers-452256e8.js');
12
- const library = require('./library-0a619eeb.js');
10
+ const index = require('./index-a9985af0.js');
11
+ const helpers = require('./helpers-cdd65bd0.js');
12
+ const library = require('./library-57845012.js');
13
13
 
14
- // SPDX-FileCopyrightText: © 2023 Schneider Electric
14
+ // SPDX-FileCopyrightText: © 2024 Schneider Electric
15
15
  //
16
- // SPDX-License-Identifier: LGPL-2.1-only
17
- const request = async (source) => {
18
- const response = await fetch(source, { mode: 'cors' });
19
- return {
20
- ok: response.ok,
21
- data: await response.text(),
22
- };
23
- };
16
+ // SPDX-License-Identifier: Apache-2.0
24
17
  const cachedIconRequests = new Map();
25
- const requestIcon = async (url) => {
26
- const cachedIconRequest = cachedIconRequests.get(url);
27
- if (cachedIconRequest)
28
- return cachedIconRequest;
29
- const fileData = await request(url);
30
- const iconFileData = {
31
- ok: fileData.ok,
32
- };
33
- if (fileData.ok) {
34
- const div = document.createElement('div');
35
- div.innerHTML = fileData.data;
36
- const child = div.firstElementChild;
37
- iconFileData.data =
38
- child?.tagName.toLowerCase() === 'svg' ? child.outerHTML : '';
39
- }
40
- cachedIconRequests.set(url, iconFileData);
41
- return iconFileData;
18
+ const requestIcon = (url) => {
19
+ const cachedIconRequest = cachedIconRequests.get(url);
20
+ if (cachedIconRequest)
21
+ return Promise.resolve(cachedIconRequest);
22
+ const iconPromise = fetch(url, { mode: 'cors' }).then(async (response) => {
23
+ const iconResponse = {
24
+ ok: response.ok,
25
+ status: response.status,
26
+ data: await response.text(),
27
+ };
28
+ if (response.ok) {
29
+ const div = document.createElement('div');
30
+ div.innerHTML = iconResponse.data;
31
+ const child = div.firstElementChild;
32
+ iconResponse.data =
33
+ child?.tagName.toLowerCase() === 'svg' ? child.outerHTML : '';
34
+ }
35
+ cachedIconRequests.set(url, iconResponse);
36
+ return iconResponse;
37
+ });
38
+ cachedIconRequests.set(url, iconPromise);
39
+ return iconPromise;
42
40
  };
43
41
 
44
- 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%}";
42
+ 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%}.qds-click-target{height:var(--qds-experimental-icon-click-target-size);left:calc((var(--qds-experimental-icon-click-target-size) - 100%)*-1/2);position:absolute;top:calc((var(--qds-experimental-icon-click-target-size) - 100%)*-1/2);width:var(--qds-experimental-icon-click-target-size)}";
43
+ const QdsIconStyle0 = iconCss;
45
44
 
45
+ // SPDX-FileCopyrightText: © 2024 Schneider Electric
46
+ //
47
+ // SPDX-License-Identifier: Apache-2.0
48
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
49
+ if (kind === "a" && !f)
50
+ throw new TypeError("Private accessor was defined without a getter");
51
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
52
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
53
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
54
+ };
55
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
56
+ if (kind === "m")
57
+ throw new TypeError("Private method is not writable");
58
+ if (kind === "a" && !f)
59
+ throw new TypeError("Private accessor was defined without a setter");
60
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
61
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
62
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
63
+ };
64
+ var _Icon_inheritedAttributes;
46
65
  let parser;
47
66
  const Icon = class {
48
- constructor(hostRef) {
49
- index.registerInstance(this, hostRef);
50
- this.loadEmitter = index.createEvent(this, "qdsLoad", 6);
51
- this.errorEmitter = index.createEvent(this, "qdsError", 6);
52
- this.inheritedAttributes = {};
53
- this.name = undefined;
54
- this.library = 'default';
55
- this.svg = '';
56
- }
57
- async setIcon() {
58
- if (!this.name)
59
- return;
60
- const library$1 = library.getIconLibrary(this.library);
61
- if (!library$1)
62
- return;
63
- const url = library$1.resolver(this.name);
64
- if (!url) {
65
- this.svg = '';
66
- return;
67
- }
68
- try {
69
- const request = await requestIcon(url);
70
- if (!request.ok) {
71
- this.svg = '';
72
- this.errorEmitter.emit();
73
- return;
74
- }
75
- // Create an instance of the DOM parser. We do it here instead of at the
76
- // top-level to support SSR while maintaining a single parser instance
77
- // for optimal performance.
78
- parser || (parser = new DOMParser());
79
- const document = parser.parseFromString(request.data, 'text/html');
80
- const svgElement = document.body.querySelector('svg');
81
- if (svgElement === null) {
67
+ constructor(hostRef) {
68
+ index.registerInstance(this, hostRef);
69
+ this.loadEmitter = index.createEvent(this, "qdsLoad", 6);
70
+ this.errorEmitter = index.createEvent(this, "qdsError", 6);
71
+ _Icon_inheritedAttributes.set(this, {});
72
+ this.name = undefined;
73
+ this.library = 'default';
82
74
  this.svg = '';
83
- this.errorEmitter.emit();
84
- }
85
- else {
86
- for (const [key, value] of Object.entries(this.inheritedAttributes))
87
- svgElement.setAttribute(key, value);
88
- this.svg = svgElement.outerHTML;
89
- this.loadEmitter.emit();
90
- }
91
75
  }
92
- catch {
93
- this.errorEmitter.emit();
76
+ async setIcon() {
77
+ if (!this.name)
78
+ return;
79
+ const library$1 = library.getIconLibrary(this.library);
80
+ if (!library$1)
81
+ return;
82
+ const url = library$1.resolver(this.name);
83
+ if (!url) {
84
+ this.svg = '';
85
+ return;
86
+ }
87
+ try {
88
+ const request = await requestIcon(url);
89
+ if (!request.ok) {
90
+ this.svg = '';
91
+ this.errorEmitter.emit();
92
+ return;
93
+ }
94
+ // Create an instance of the DOM parser. We do it here instead of at the
95
+ // top-level to support SSR while maintaining a single parser instance
96
+ // for optimal performance.
97
+ parser || (parser = new DOMParser());
98
+ const document = parser.parseFromString(request.data, 'text/html');
99
+ const svgElement = document.body.querySelector('svg');
100
+ if (svgElement === null) {
101
+ this.svg = '';
102
+ this.errorEmitter.emit();
103
+ }
104
+ else {
105
+ for (const [key, value] of Object.entries(__classPrivateFieldGet(this, _Icon_inheritedAttributes, "f")))
106
+ if (value !== undefined)
107
+ svgElement.setAttribute(key, value);
108
+ this.svg = svgElement.outerHTML;
109
+ this.loadEmitter.emit();
110
+ }
111
+ }
112
+ catch {
113
+ this.errorEmitter.emit();
114
+ }
115
+ }
116
+ async componentWillLoad() {
117
+ __classPrivateFieldSet(this, _Icon_inheritedAttributes, helpers.inheritAriaAttributes(this.host), "f");
118
+ await this.setIcon();
119
+ }
120
+ render() {
121
+ return (index.h("div", { key: '2316258a42f9cf304d91a3e041a3b85e8647f655', class: "qds-container" }, index.h("span", { key: '1a6649113e3d32c43e852b4e2acc07f51edf6e50', class: "qds-icon-wrapper", innerHTML: this.svg }), index.h("div", { key: 'd750af6e1818c5d30f809f669ef83b2426f6f291', class: "qds-click-target" })));
94
122
  }
95
- }
96
- async componentWillLoad() {
97
- this.inheritedAttributes = helpers.inheritAriaAttributes(this.element);
98
- await this.setIcon();
99
- }
100
- render() {
101
- return index.h("span", { class: "wrapper", innerHTML: this.svg });
102
- }
103
- get element() { return index.getElement(this); }
104
- static get watchers() { return {
105
- "name": ["setIcon"],
106
- "library": ["setIcon"]
107
- }; }
123
+ get host() { return index.getElement(this); }
124
+ static get watchers() { return {
125
+ "name": ["setIcon"],
126
+ "library": ["setIcon"]
127
+ }; }
108
128
  };
109
- Icon.style = iconCss;
129
+ _Icon_inheritedAttributes = new WeakMap();
130
+ Icon.style = QdsIconStyle0;
110
131
 
111
132
  exports.qds_icon = Icon;
112
133
 
@@ -1 +1 @@
1
- {"file":"qds-icon.entry.cjs.js","mappings":"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","names":["library","getIconLibrary","inheritAriaAttributes","h"],"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
+ {"file":"qds-icon.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AAQA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAG/B,CAAA;AAEH,MAAM,WAAW,GAAG,CAAC,GAAW;IAC9B,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACrD,IAAI,iBAAiB;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAEhE,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,QAAQ;QACnE,MAAM,YAAY,GAAiB;YACjC,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,IAAI,EAAE,MAAM,QAAQ,CAAC,IAAI,EAAE;SAC5B,CAAA;QACD,IAAI,QAAQ,CAAC,EAAE,EAAE;YACf,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;YACzC,GAAG,CAAC,SAAS,GAAG,YAAY,CAAC,IAAI,CAAA;YACjC,MAAM,KAAK,GAAG,GAAG,CAAC,iBAAiB,CAAA;YACnC,YAAY,CAAC,IAAI;gBACf,KAAK,EAAE,OAAO,CAAC,WAAW,EAAE,KAAK,KAAK,GAAG,KAAK,CAAC,SAAS,GAAG,EAAE,CAAA;SAChE;QAED,kBAAkB,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAA;QACzC,OAAO,YAAY,CAAA;KACpB,CAAC,CAAA;IACF,kBAAkB,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;IACxC,OAAO,WAAW,CAAA;AACpB,CAAC;;ACtCD,MAAM,OAAO,GAAG,sfAAsf,CAAC;AACvgB,sBAAe,OAAO;;ACDtB;AACA;AACA;;;;;;;;;;;;;;;;;;AAUA,IAAI,MAA6B,CAAA;MAUpB,IAAI;;;;;QA6Bf,oCAAmC,EAAE,EAAA;;uBAlBK,SAAS;mBAgB5B,EAAE;;IAMjB,MAAM,OAAO;QACnB,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAM;QAEtB,MAAMA,SAAO,GAAGC,sBAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC5C,IAAI,CAACD,SAAO;YAAE,OAAM;QAEpB,MAAM,GAAG,GAAGA,SAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACvC,IAAI,CAAC,GAAG,EAAE;YACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;YACb,OAAM;SACP;QAED,IAAI;YACF,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,GAAG,CAAC,CAAA;YACtC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE;gBACf,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;gBACb,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;gBACxB,OAAM;aACP;;;;YAKD,MAAM,KAAN,MAAM,GAAK,IAAI,SAAS,EAAE,EAAA;YAC1B,MAAM,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;YAClE,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;YACrD,IAAI,UAAU,KAAK,IAAI,EAAE;gBACvB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;gBACb,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;aACzB;iBAAM;gBACL,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,uBAAA,IAAI,iCAAqB,CAAC;oBAClE,IAAI,KAAK,KAAK,SAAS;wBAAE,UAAU,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;gBAC9D,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,SAAS,CAAA;gBAC/B,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAA;aACxB;SACF;QAAC,MAAM;YACN,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;SACzB;KACF;IAEM,MAAM,iBAAiB;QAC5B,uBAAA,IAAI,6BAAwBE,6BAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAA;QAC5D,MAAM,IAAI,CAAC,OAAO,EAAE,CAAA;KACrB;IAEM,MAAM;QACX,QACEC,kEAAK,KAAK,EAAC,eAAe,IACxBA,mEAAM,KAAK,EAAC,kBAAkB,EAAC,SAAS,EAAE,IAAI,CAAC,GAAG,GAAI,EACtDA,kEAAK,KAAK,EAAC,kBAAkB,GAAG,CAC5B,EACP;KACF;;;;;;;;;;;;","names":["library","getIconLibrary","inheritAriaAttributes","h"],"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\n.qds-click-target {\n height: var(--qds-experimental-icon-click-target-size);\n left: calc(-1 * (var(--qds-experimental-icon-click-target-size) - 100%) / 2);\n position: absolute;\n top: calc(-1 * (var(--qds-experimental-icon-click-target-size) - 100%) / 2);\n width: var(--qds-experimental-icon-click-target-size);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\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() 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 @Element() private readonly host!: HTMLQdsIconElement\n\n @State() private svg = ''\n\n #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 if (value !== undefined) 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.host)\n await this.setIcon()\n }\n\n public render() {\n return (\n <div class=\"qds-container\">\n <span class=\"qds-icon-wrapper\" innerHTML={this.svg} />\n <div class=\"qds-click-target\" />\n </div>\n )\n }\n}\n"],"version":3}
@@ -1,60 +1,112 @@
1
1
  /*!
2
- * SPDX-FileCopyrightText: © 2023 Schneider Electric
2
+ * SPDX-FileCopyrightText: © 2025 Schneider Electric
3
3
  *
4
- * SPDX-License-Identifier: LGPL-2.1-only
4
+ * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const index = require('./index-d181f952.js');
11
- const helpers = require('./helpers-452256e8.js');
10
+ const index = require('./index-a9985af0.js');
11
+ const helpers = require('./helpers-cdd65bd0.js');
12
12
 
13
- 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}";
13
+ const inlineLinkCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-start-icon{margin-inline-end:var(--qds-text-icon-gap)}.qds-icon{height:1.25em;vertical-align:text-top;width:1.25em}.qds-end-icon{margin-inline-start:var(--qds-text-icon-gap)}.qds-inline-link{border-radius:var(--qds-focus-border-radius);display:inline-block}.qds-inline-link:focus-visible{outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}[data-importance=subdued]{color:var(--qds-theme-link-subdued-default)}[data-importance=subdued]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=subdued]:hover{color:var(--qds-theme-link-subdued-hover)}[data-importance=subdued]:active{color:var(--qds-theme-link-subdued-pressed)}[data-importance=subdued]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=subdued]:visited:active{color:var(--qds-theme-link-visited-pressed)}[data-importance=standard]{color:var(--qds-theme-link-standard-default)}[data-importance=standard]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=standard]:hover{color:var(--qds-theme-link-standard-hover)}[data-importance=standard]:active{color:var(--qds-theme-link-standard-pressed)}[data-importance=standard]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=standard]:visited:active{color:var(--qds-theme-link-visited-pressed)}[data-importance=emphasized]{color:var(--qds-theme-link-emphasized-default)}[data-importance=emphasized]:visited{color:var(--qds-theme-link-visited-default)}[data-importance=emphasized]:hover{color:var(--qds-theme-link-emphasized-hover)}[data-importance=emphasized]:active{color:var(--qds-theme-link-emphasized-pressed)}[data-importance=emphasized]:visited:hover{color:var(--qds-theme-link-visited-hover)}[data-importance=emphasized]:visited:active{color:var(--qds-theme-link-visited-pressed)}";
14
+ const QdsInlineLinkStyle0 = inlineLinkCss;
14
15
 
16
+ // SPDX-FileCopyrightText: © 2024 Schneider Electric
17
+ //
18
+ // SPDX-License-Identifier: Apache-2.0
19
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
20
+ if (kind === "a" && !f)
21
+ throw new TypeError("Private accessor was defined without a getter");
22
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
23
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
24
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
25
+ };
26
+ var _InlineLink_instances, _InlineLink_internals, _InlineLink_computedImportance_get, _InlineLink_onBlur, _InlineLink_onFocus, _InlineLink_onSlotchange;
15
27
  const InlineLink = class {
16
- constructor(hostRef) {
17
- index.registerInstance(this, hostRef);
18
- this.blurEmitter = index.createEvent(this, "qdsBlur", 2);
19
- this.focusEmitter = index.createEvent(this, "qdsFocus", 2);
20
- this.inheritedAttributes = {};
21
- this.onBlur = (event) => {
22
- this.blurEmitter.emit(helpers.pickFocusEventAttributes(event));
23
- };
24
- this.onFocus = (event) => {
25
- this.focusEmitter.emit(helpers.pickFocusEventAttributes(event));
26
- };
27
- this.disabled = false;
28
- this.download = undefined;
29
- this.href = undefined;
30
- this.hreflang = undefined;
31
- this.referrerPolicy = undefined;
32
- this.rel = undefined;
33
- this.target = '_self';
34
- }
35
- get computedTabIndex() {
36
- const parsedValue = Number.parseInt(this.inheritedAttributes.tabindex, 10);
37
- return Number.isNaN(parsedValue) ? 0 : parsedValue;
38
- }
39
- onClick(event) {
40
- if (this.disabled) {
41
- event.preventDefault();
42
- event.stopPropagation();
43
- }
44
- }
45
- componentWillLoad() {
46
- this.inheritedAttributes = {
47
- ...helpers.inheritAriaAttributes(this.element),
48
- ...helpers.inheritAttributes(this.element, ['tabindex']),
49
- };
50
- }
51
- render() {
52
- return (index.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 }, index.h("slot", null), index.h("qds-icon", { class: "external", library: "core", name: "external-link" })));
53
- }
54
- static get delegatesFocus() { return true; }
55
- get element() { return index.getElement(this); }
28
+ constructor(hostRef) {
29
+ index.registerInstance(this, hostRef);
30
+ this.blurEmitter = index.createEvent(this, "qdsBlur", 2);
31
+ this.focusEmitter = index.createEvent(this, "qdsFocus", 2);
32
+ _InlineLink_instances.add(this);
33
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
34
+ _InlineLink_internals.set(this, helpers.attachInternals.call(this));
35
+ _InlineLink_onBlur.set(this, (event) => {
36
+ this.blurEmitter.emit(helpers.pickFocusEventAttributes(event));
37
+ });
38
+ _InlineLink_onFocus.set(this, (event) => {
39
+ this.focusEmitter.emit(helpers.pickFocusEventAttributes(event));
40
+ });
41
+ _InlineLink_onSlotchange.set(this, () => {
42
+ __classPrivateFieldGet(this, _InlineLink_internals, "f").ariaLabel = this.host.textContent;
43
+ });
44
+ this.disabled = false;
45
+ this.iconName = undefined;
46
+ this.iconLibrary = 'default';
47
+ this.importance = 'standard';
48
+ this.download = undefined;
49
+ this.href = undefined;
50
+ this.hreflang = undefined;
51
+ this.referrerPolicy = undefined;
52
+ this.rel = undefined;
53
+ this.target = undefined;
54
+ this.linkIcon = undefined;
55
+ this.tabIndex = undefined;
56
+ }
57
+ onClick(event) {
58
+ if (this.disabled)
59
+ event.stopImmediatePropagation();
60
+ }
61
+ disabledChanged() {
62
+ __classPrivateFieldGet(this, _InlineLink_internals, "f").ariaDisabled = this.disabled.toString();
63
+ }
64
+ tabindexChanged(newValue) {
65
+ const parsedValue = Number.parseInt(newValue, 10);
66
+ // FIXME: `undefined` instead of `0` causes `qdsFocus/qdsBlur` E2E tests
67
+ // to fail, but it's not clear why this is the case since it works for
68
+ // other components.
69
+ this.tabIndex = Number.isNaN(parsedValue) ? 0 : parsedValue;
70
+ }
71
+ hrefTargetChanged() {
72
+ this.linkIcon = helpers.determineLinkIcon(this.href, this.target);
73
+ }
74
+ componentWillLoad() {
75
+ __classPrivateFieldGet(this, _InlineLink_internals, "f").role = 'link';
76
+ this.disabledChanged();
77
+ this.hrefTargetChanged();
78
+ this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
79
+ }
80
+ componentDidLoad() {
81
+ __classPrivateFieldGet(this, _InlineLink_internals, "f").ariaLabel = this.host.textContent;
82
+ }
83
+ render() {
84
+ return (index.h("a", { key: '6b7e095ff5960db131864d0dc477da7e0b55d7c5', "aria-hidden": "true", class: {
85
+ 'qds-inline-link': true,
86
+ 'qds-disabled': this.disabled,
87
+ }, "data-importance": __classPrivateFieldGet(this, _InlineLink_instances, "a", _InlineLink_computedImportance_get), download: this.download, href: this.href?.toString(), hrefLang: this.hreflang, onBlur: __classPrivateFieldGet(this, _InlineLink_onBlur, "f"), onFocus: __classPrivateFieldGet(this, _InlineLink_onFocus, "f"), referrerPolicy: this.referrerPolicy, rel: this.rel, tabIndex: this.disabled ? -1 : this.tabIndex, target: this.target }, this.iconName !== undefined && this.iconName !== '' && (index.h("qds-icon", { key: '2b59cc54c55e39bcb87ddc8f4b7580cc57d2479e', class: "qds-icon qds-start-icon", library: this.iconLibrary, name: this.iconName })), index.h("slot", { key: 'b0b14cb7a3c163861af34352b5c90c5cb2d85780', onSlotchange: __classPrivateFieldGet(this, _InlineLink_onSlotchange, "f") }), this.linkIcon && (index.h("qds-icon", { key: '143786864dfdf28b3223d96b4681c9b437446baa', class: "qds-icon qds-end-icon", library: "core", name: this.linkIcon }))));
88
+ }
89
+ static get delegatesFocus() { return true; }
90
+ get host() { return index.getElement(this); }
91
+ static get watchers() { return {
92
+ "disabled": ["disabledChanged"],
93
+ "tabindex": ["tabindexChanged"],
94
+ "href": ["hrefTargetChanged"],
95
+ "target": ["hrefTargetChanged"]
96
+ }; }
97
+ };
98
+ _InlineLink_internals = new WeakMap(), _InlineLink_onBlur = new WeakMap(), _InlineLink_onFocus = new WeakMap(), _InlineLink_onSlotchange = new WeakMap(), _InlineLink_instances = new WeakSet(), _InlineLink_computedImportance_get = function _InlineLink_computedImportance_get() {
99
+ switch (this.importance) {
100
+ case 'subdued':
101
+ case 'emphasized': {
102
+ return this.importance;
103
+ }
104
+ default: {
105
+ return 'standard';
106
+ }
107
+ }
56
108
  };
57
- InlineLink.style = inlineLinkCss;
109
+ InlineLink.style = QdsInlineLinkStyle0;
58
110
 
59
111
  exports.qds_inline_link = InlineLink;
60
112
 
@@ -1 +1 @@
1
- {"file":"qds-inline-link.entry.cjs.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,CAACA,gCAAwB,CAAC,KAAK,CAAC,CAAC,CAAA;KACvD,CAAA;IAEgB,YAAO,GAAG,CAAC,KAAiB;MAC3C,IAAI,CAAC,YAAY,CAAC,IAAI,CAACA,gCAAwB,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,GAAGC,6BAAqB,CAAC,IAAI,CAAC,OAAO,CAAC;MACtC,GAAGC,yBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC;KACjD,CAAA;GACF;EAEM,MAAM;IACX,QACEC,gCACiB,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,IAEpDA,qBAAQ,EACRA,sBAAU,KAAK,EAAC,UAAU,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,eAAe,GAAG,CAC/D,EACL;GACF;;;;;;;;","names":["pickFocusEventAttributes","inheritAriaAttributes","inheritAttributes","h"],"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
+ {"file":"qds-inline-link.entry.cjs.js","mappings":"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","names":["attachInternals","pickFocusEventAttributes","determineLinkIcon","h"],"sources":["src/components/inline-link/inline-link.css?tag=qds-inline-link&encapsulation=shadow","src/components/inline-link/inline-link.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n}\n\n.qds-start-icon {\n margin-inline-end: var(--qds-text-icon-gap);\n}\n\n.qds-icon {\n height: 1.25em;\n vertical-align: text-top;\n width: 1.25em;\n}\n\n.qds-end-icon {\n margin-inline-start: var(--qds-text-icon-gap);\n}\n\n.qds-inline-link {\n border-radius: var(--qds-focus-border-radius);\n display: inline-block;\n\n &:focus-visible {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n }\n}\n\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-link-subdued-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-subdued-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-subdued-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-link-standard-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-standard-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-standard-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n\n[data-importance='emphasized'] {\n color: var(--qds-theme-link-emphasized-default);\n\n &:visited {\n color: var(--qds-theme-link-visited-default);\n }\n\n &:hover {\n color: var(--qds-theme-link-emphasized-hover);\n }\n\n &:active {\n color: var(--qds-theme-link-emphasized-pressed);\n }\n\n &:visited:hover {\n color: var(--qds-theme-link-visited-hover);\n }\n\n &:visited:active {\n color: var(--qds-theme-link-visited-pressed);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n 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 attachInternals,\n determineLinkIcon,\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: { delegatesFocus: true },\n styleUrl: 'inline-link.css',\n})\nexport class InlineLink implements ComponentInterface {\n /**\n * Prevents the inline link from being interacted with: it cannot be pressed\n * or focused.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * The inline link's importance.\n */\n @Prop() public readonly importance?: Importance = 'standard'\n\n /**\n * Causes the browser to treat the linked URL as a download. Can be used with\n * or without a `filename` value:\n *\n * - Without a value, the browser will suggest a filename/extension,\n * generated from various sources:\n *\n * - The\n * [`Content-Disposition`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Disposition)\n * HTTP header\n * - The final segment in the URL\n * [path](https://developer.mozilla.org/docs/Web/API/URL/pathname)\n * - The\n * [media type](https://developer.mozilla.org/docs/Glossary/MIME_type)\n * (from the\n * [`Content-Type`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type)\n * header, the start of a\n * [`data:` URL](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URLs),\n * or\n * [`Blob.type`](https://developer.mozilla.org/docs/Web/API/Blob/type)\n * for a\n * [`blob:` URL](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL))\n * - `filename`: defining a value suggests it as the filename. `/` and `\\`\n * characters are converted to underscores (`_`). Filesystems may forbid\n * other characters in filenames, so browsers will adjust the suggested name\n * if necessary.\n *\n * @webnative\n */\n @Prop() public readonly download?: boolean | string\n\n /**\n * The URL that the inline link points to. Inline links are not restricted to\n * HTTP-based URLs — they can use any URL scheme supported by browsers:\n *\n * - Sections of a page with document fragments\n * - Specific text portions with\n * [text fragments](https://developer.mozilla.org/docs/Web/Text_fragments)\n * - Pieces of media files with media fragments\n * - Telephone numbers with `tel:` URLs\n * - Email addresses with `mailto:` URLs\n * - While web browsers may not support other URL schemes, websites can with\n * [`registerProtocolHandler()`](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)\n *\n * @webnative\n */\n @Prop() public readonly href?: URL | string\n\n /**\n * Hints at the human language of the linked URL. No built-in functionality.\n * Allowed values are the same as\n * [the global `lang` attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang).\n *\n * @webnative\n */\n @Prop() public readonly hreflang?: string\n\n /**\n * How much of the\n * [referrer](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * to send when following the inline link.\n *\n * - `no-referrer`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent.\n * - `no-referrer-when-downgrade`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent to\n * [origin](https://developer.mozilla.org/docs/Glossary/Origin)s\n * without [TLS](https://developer.mozilla.org/docs/Glossary/TLS)\n * ([HTTPS](https://developer.mozilla.org/docs/Glossary/HTTPS)).\n * - `origin`: The sent referrer will be limited to the origin of the\n * referring page: its\n * [scheme](https://developer.mozilla.org/docs/Learn/Common_questions/What_is_a_URL),\n * [host](https://developer.mozilla.org/docs/Glossary/Host), and\n * [port](https://developer.mozilla.org/docs/Glossary/Port).\n * - `origin-when-cross-origin`: The referrer sent to other origins will be\n * limited to the scheme, the host, and the port. Navigations on the same\n * origin will still include the path.\n * - `same-origin`: A referrer will be sent for\n * [same origin](https://developer.mozilla.org/docs/Glossary/Same-origin_policy),\n * but cross-origin requests will contain no referrer information.\n * - `strict-origin`: Only send the origin of the document as the referrer\n * when the protocol security level stays the same (HTTPS→HTTPS), but don't\n * send it to a less secure destination (HTTPS→HTTP).\n * - `strict-origin-when-cross-origin` (default): Send a full URL when\n * performing a same-origin request, only send the origin when the protocol\n * security level stays the same (HTTPS→HTTPS), and send no header to a less\n * secure destination (HTTPS→HTTP).\n * - `unsafe-url`: The referrer will include the origin and the path (but not the\n * [fragment](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash),\n * [password](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password),\n * or [username](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)).\n * **This value is unsafe** because it leaks origins and paths from\n * TLS-protected resources to insecure origins.\n *\n * @webnative\n */\n @Prop({ attribute: 'referrerpolicy' })\n public readonly referrerPolicy?: ReferrerPolicy\n\n /**\n * The relationship of the linked URL as space-separated\n * [link types](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel).\n *\n * The following list includes some of the most important existing keywords.\n * Every keyword within a space-separated value should be unique within that\n * value.\n *\n * - [`alternate`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-alternate):\n * Alternate representations of the current document.\n * - [`author`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-author):\n * Author of the current document or article.\n * - [`bookmark`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-bookmark):\n * Permalink for the nearest ancestor section.\n * - [`external`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-external):\n * The referenced document is not part of the same site as the current\n * document. An icon will be rendered next to the text if this value is\n * specified.\n * - [`help`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-help):\n * Link to context-sensitive help.\n * - [`license`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-license):\n * Indicates that the main content of the current document is covered by the\n * copyright license described by the referenced document.\n * - [`me`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me):\n * Indicates that the current document represents the person who owns the\n * linked content.\n * - [`next`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-next):\n * Indicates that the current document is a part of a series and that the\n * next document in the series is the referenced document.\n * - [`nofollow`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-nofollow):\n * Indicates that the current document's original author or publisher does\n * not endorse the referenced document.\n * - [`noopener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/noopener):\n * Creates a top-level browsing context that is not an auxiliary browsing\n * context if the hyperlink would create either of those, to begin with (i.e.,\n * has an appropriate `target` attribute value).\n * - [`noreferrer`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-noreferrer):\n * No `Referer` header will be included. Additionally, has the same effect as\n * `noopener`.\n * - [`opener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-opener):\n * Creates an auxiliary browsing context if the hyperlink would otherwise\n * create a top-level browsing context that is not an auxiliary browsing\n * context (i.e., has \"`_blank`\" as `target` attribute value).\n * - [`prev`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-prev):\n * Indicates that the current document is a part of a series and that the\n * previous document in the series is the referenced document.\n * - [`search`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-search):\n * Gives a link to a resource that can be used to search through the current\n * document and its related pages.\n * - [`tag`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-tag):\n * Gives a tag (identified by the given address) that applies to the current\n * document.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<Target, string>\n\n /**\n * Emitted when the inline link loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the inline link gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLQdsInlineLinkElement\n\n @State() private linkIcon?: LinkIcon\n\n @State() private tabIndex?: number\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n readonly #internals: ElementInternals = attachInternals.call(this)\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 @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.disabled) event.stopImmediatePropagation()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.#internals.ariaDisabled = this.disabled.toString()\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n // FIXME: `undefined` instead of `0` causes `qdsFocus/qdsBlur` E2E tests\n // to fail, but it's not clear why this is the case since it works for\n // other components.\n this.tabIndex = Number.isNaN(parsedValue) ? 0 : parsedValue\n }\n\n @Watch('href')\n @Watch('target')\n protected hrefTargetChanged(): void {\n this.linkIcon = determineLinkIcon(this.href, this.target)\n }\n\n public componentWillLoad(): void {\n this.#internals.role = 'link'\n\n this.disabledChanged()\n this.hrefTargetChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public componentDidLoad(): void {\n this.#internals.ariaLabel = this.host.textContent\n }\n\n public render() {\n return (\n <a\n aria-hidden=\"true\"\n class={{\n 'qds-inline-link': true,\n 'qds-disabled': this.disabled,\n }}\n data-importance={this.#computedImportance}\n download={this.download}\n href={this.href?.toString()}\n hrefLang={this.hreflang}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n tabIndex={this.disabled ? -1 : this.tabIndex}\n target={this.target}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon qds-start-icon\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n <slot onSlotchange={this.#onSlotchange} />\n {this.linkIcon && (\n <qds-icon\n class=\"qds-icon qds-end-icon\"\n library=\"core\"\n name={this.linkIcon}\n />\n )}\n </a>\n )\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onSlotchange = (): void => {\n this.#internals.ariaLabel = this.host.textContent\n }\n}\n"],"version":3}