@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
@@ -1,66 +0,0 @@
1
- /*!
2
- * SPDX-FileCopyrightText: © 2023 Schneider Electric
3
- *
4
- * SPDX-License-Identifier: LGPL-2.1-only
5
- */
6
- 'use strict';
7
-
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
- const index = require('./index-d181f952.js');
11
- const helpers = require('./helpers-452256e8.js');
12
-
13
- const titleCss = ":host{box-sizing:border-box}:host([hidden]){display:none !important}:host([hidden]){}:host *,:host *::before,:host *::after{box-sizing:inherit}:host{display:block}.titles,.title{display:flex}.titles{flex-direction:column}.title,.subtitle,.kicker{margin-block:0}.icon{flex-shrink:0}.title{font-weight:normal;font-weight:initial;font-size:medium;font-size:initial;color:var(--qds-theme-title)}.subtitle{color:var(--qds-theme-subtitle)}.kicker{color:var(--qds-theme-kicker);order:-1}.subtitle,.kicker{word-wrap:break-word}.main.section.titles,.main.section.title{gap:var(--qds-main-section-titles-gap)}.main.section.title{font:var(--qds-main-section-title)}.main.section.title .icon{--qds-main-section-title-line-height:2rem;width:var(--qds-main-section-titles-icon-size);height:2rem;height:var(--qds-main-section-title-line-height)}.main.section.subtitle{font:var(--qds-main-section-subtitle)}.main.section.kicker{font:var(--qds-main-section-kicker)}.main.section.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-main-section-titles-icon-size, 0px) +\n var(--qds-main-section-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-main-section-titles-icon-size, 0px) +\n var(--qds-main-section-titles-gap, 0px)\n )}.main.section.has-icon-end{-webkit-padding-end:calc(\n 0px +\n 0px\n );padding-inline-end:calc(\n 0px +\n 0px\n );-webkit-padding-end:calc(\n var(--qds-main-section-titles-icon-size, 0px) +\n var(--qds-main-section-titles-gap, 0px)\n );padding-inline-end:calc(\n var(--qds-main-section-titles-icon-size, 0px) +\n var(--qds-main-section-titles-gap, 0px)\n )}.main.subsection.titles,.main.subsection.title{gap:var(--qds-main-subsection-titles-gap)}.main.subsection.title{font:var(--qds-main-subsection-title)}.main.subsection.title .icon{--qds-main-subsection-title-line-height:1.5rem;width:var(--qds-main-subsection-titles-icon-size);height:1.5rem;height:var(--qds-main-subsection-title-line-height)}.main.subsection.subtitle{font:var(--qds-main-subsection-subtitle)}.main.subsection.kicker{font:var(--qds-main-subsection-kicker)}.main.subsection.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-main-subsection-titles-icon-size, 0px) +\n var(--qds-main-subsection-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-main-subsection-titles-icon-size, 0px) +\n var(--qds-main-subsection-titles-gap, 0px)\n )}.panel.root.titles,.panel.root.title{gap:var(--qds-panel-titles-gap)}.panel.root.title{font:var(--qds-panel-title)}.panel.root.title .icon{--qds-panel-title-line-height:2rem;width:var(--qds-panel-titles-icon-size);height:2rem;height:var(--qds-panel-title-line-height)}.panel.root.subtitle{font:var(--qds-panel-subtitle)}.panel.root.kicker{font:var(--qds-panel-kicker)}.panel.root.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-panel-titles-icon-size, 0px) +\n var(--qds-panel-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-panel-titles-icon-size, 0px) +\n var(--qds-panel-titles-gap, 0px)\n )}.panel.section.titles,.panel.section.title{gap:var(--qds-panel-section-titles-gap)}.panel.section.title{font:var(--qds-panel-section-title)}.panel.section.title .icon{--qds-panel-section-title-line-height:1.5rem;width:var(--qds-panel-section-titles-icon-size);height:1.5rem;height:var(--qds-panel-section-title-line-height)}.panel.section.subtitle{font:var(--qds-panel-section-subtitle)}.panel.section.kicker{font:var(--qds-panel-section-kicker)}.panel.section.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-panel-section-titles-icon-size, 0px) +\n var(--qds-panel-section-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-panel-section-titles-icon-size, 0px) +\n var(--qds-panel-section-titles-gap, 0px)\n )}.panel.subsection.titles,.panel.subsection.title{gap:var(--qds-panel-subsection-titles-gap)}.panel.subsection.title{font:var(--qds-panel-subsection-title)}.panel.subsection.title .icon{--qds-panel-subsection-title-line-height:1.25rem;width:var(--qds-panel-subsection-titles-icon-size);height:1.25rem;height:var(--qds-panel-subsection-title-line-height)}.panel.subsection.subtitle{font:var(--qds-panel-subsection-subtitle)}.panel.subsection.kicker{font:var(--qds-panel-subsection-kicker)}.panel.subsection.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-panel-subsection-titles-icon-size, 0px) +\n var(--qds-panel-subsection-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-panel-subsection-titles-icon-size, 0px) +\n var(--qds-panel-subsection-titles-gap, 0px)\n )}.navigation.section.titles,.navigation.section.title{gap:var(--qds-navigation-section-titles-gap)}.navigation.section.title{font:var(--qds-navigation-section-title)}.navigation.section.title .icon{--qds-navigation-section-title-line-height:1.5rem;width:var(--qds-navigation-section-titles-icon-size);height:1.5rem;height:var(--qds-navigation-section-title-line-height)}.navigation.section.subtitle{font:var(--qds-navigation-section-subtitle)}.navigation.section.kicker{font:var(--qds-navigation-section-kicker)}.navigation.section.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-navigation-section-titles-icon-size, 0px) +\n var(--qds-navigation-section-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-navigation-section-titles-icon-size, 0px) +\n var(--qds-navigation-section-titles-gap, 0px)\n )}.navigation.subsection.titles,.navigation.subsection.title{gap:var(--qds-navigation-subsection-titles-gap)}.navigation.subsection.title{font:var(--qds-navigation-subsection-title)}.navigation.subsection.title .icon{--qds-navigation-subsection-title-line-height:1.25rem;width:var(--qds-navigation-subsection-titles-icon-size);height:1.25rem;height:var(--qds-navigation-subsection-title-line-height)}.navigation.subsection.subtitle{font:var(--qds-navigation-subsection-subtitle)}.navigation.subsection.kicker{font:var(--qds-navigation-subsection-kicker)}.navigation.subsection.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-navigation-subsection-titles-icon-size, 0px) +\n var(--qds-navigation-subsection-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-navigation-subsection-titles-icon-size, 0px) +\n var(--qds-navigation-subsection-titles-gap, 0px)\n )}.popup.root.titles,.popup.root.title{gap:var(--qds-popup-titles-gap)}.popup.root.title{font:var(--qds-popup-title)}.popup.root.title .icon{--qds-popup-title-line-height:1.75rem;width:var(--qds-popup-titles-icon-size);height:1.75rem;height:var(--qds-popup-title-line-height)}.popup.root.subtitle{font:var(--qds-popup-subtitle)}.popup.root.kicker{font:var(--qds-popup-kicker)}.popup.root.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-popup-titles-icon-size, 0px) +\n var(--qds-popup-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-popup-titles-icon-size, 0px) +\n var(--qds-popup-titles-gap, 0px)\n )}.popup.section.titles,.popup.section.title{gap:var(--qds-popup-section-titles-gap)}.popup.section.title{font:var(--qds-popup-section-title)}.popup.section.title .icon{--qds-popup-section-title-line-height:1.5rem;width:var(--qds-popup-section-titles-icon-size);height:1.5rem;height:var(--qds-popup-section-title-line-height)}.popup.section.subtitle{font:var(--qds-popup-section-subtitle)}.popup.section.kicker{font:var(--qds-popup-section-kicker)}.popup.section.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-popup-section-titles-icon-size, 0px) +\n var(--qds-popup-section-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-popup-section-titles-icon-size, 0px) +\n var(--qds-popup-section-titles-gap, 0px)\n )}.popup.subsection.titles,.popup.subsection.title{gap:var(--qds-popup-subsection-titles-gap)}.popup.subsection.title{font:var(--qds-popup-subsection-title)}.popup.subsection.title .icon{--qds-popup-subsection-title-line-height:1.25rem;width:var(--qds-popup-subsection-titles-icon-size);height:1.25rem;height:var(--qds-popup-subsection-title-line-height)}.popup.subsection.subtitle{font:var(--qds-popup-subsection-subtitle)}.popup.subsection.kicker{font:var(--qds-popup-subsection-kicker)}.popup.subsection.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-popup-subsection-titles-icon-size, 0px) +\n var(--qds-popup-subsection-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-popup-subsection-titles-icon-size, 0px) +\n var(--qds-popup-subsection-titles-gap, 0px)\n )}.accessory.root.titles,.accessory.root.title{gap:var(--qds-accessory-titles-gap)}.accessory.root.title{font:var(--qds-accessory-title)}.accessory.root.title .icon{--qds-accessory-title-line-height:1.5rem;width:var(--qds-accessory-titles-icon-size);height:1.5rem;height:var(--qds-accessory-title-line-height)}.accessory.root.subtitle{font:var(--qds-accessory-subtitle)}.accessory.root.kicker{font:var(--qds-accessory-kicker)}.accessory.root.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-accessory-titles-icon-size, 0px) +\n var(--qds-accessory-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-accessory-titles-icon-size, 0px) +\n var(--qds-accessory-titles-gap, 0px)\n )}.accessory.section.titles,.accessory.section.title{gap:var(--qds-accessory-section-titles-gap)}.accessory.section.title{font:var(--qds-accessory-section-title)}.accessory.section.title .icon{--qds-accessory-section-title-line-height:1.25rem;width:var(--qds-accessory-section-titles-icon-size);height:1.25rem;height:var(--qds-accessory-section-title-line-height)}.accessory.section.subtitle{font:var(--qds-accessory-section-subtitle)}.accessory.section.kicker{font:var(--qds-accessory-section-kicker)}.accessory.section.has-icon{-webkit-padding-start:calc(\n 0px +\n 0px\n );padding-inline-start:calc(\n 0px +\n 0px\n );-webkit-padding-start:calc(\n var(--qds-accessory-section-titles-icon-size, 0px) +\n var(--qds-accessory-section-titles-gap, 0px)\n );padding-inline-start:calc(\n var(--qds-accessory-section-titles-icon-size, 0px) +\n var(--qds-accessory-section-titles-gap, 0px)\n )}";
14
-
15
- const Title = class {
16
- constructor(hostRef) {
17
- index.registerInstance(this, hostRef);
18
- this.inheritedAttributes = {};
19
- this.iconName = undefined;
20
- this.iconLibrary = 'default';
21
- this.kicker = undefined;
22
- this.layer = 'panel';
23
- this.level = 'section';
24
- this.subtitle = undefined;
25
- this.tag = 'h2';
26
- }
27
- get hasSubtitle() {
28
- return this.subtitle !== undefined && this.subtitle !== '';
29
- }
30
- get hasKicker() {
31
- return this.kicker !== undefined && this.kicker !== '';
32
- }
33
- get hasIcon() {
34
- return this.iconName !== undefined && this.iconName !== '';
35
- }
36
- componentWillLoad() {
37
- this.inheritedAttributes = helpers.inheritAriaAttributes(this.element);
38
- }
39
- render() {
40
- return (index.h("hgroup", { class: {
41
- [this.layer]: true,
42
- [this.level ?? 'root']: true,
43
- titles: true,
44
- }, ...this.inheritedAttributes }, index.h(this.tag, { class: {
45
- [this.layer]: true,
46
- [this.level ?? 'root']: true,
47
- title: true,
48
- } }, this.iconName !== undefined && this.iconName !== '' && (index.h("qds-icon", { class: "icon", name: this.iconName, library: this.iconLibrary })), index.h("div", null, index.h("slot", null))), this.hasSubtitle && (index.h("p", { class: {
49
- [this.layer]: true,
50
- [this.level ?? 'root']: true,
51
- subtitle: true,
52
- 'has-icon': this.hasIcon,
53
- } }, this.subtitle)), this.hasKicker && (index.h("p", { class: {
54
- [this.layer]: true,
55
- [this.level ?? 'root']: true,
56
- kicker: true,
57
- 'has-icon': this.hasIcon,
58
- } }, this.kicker))));
59
- }
60
- get element() { return index.getElement(this); }
61
- };
62
- Title.style = titleCss;
63
-
64
- exports.qds_title = Title;
65
-
66
- //# sourceMappingURL=qds-title.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"qds-title.entry.cjs.js","mappings":";;;;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,qnXAAqnX;;MCuBznX,KAAK;;;IAkCR,wBAAmB,GAAe,EAAE,CAAA;;uBAvBmB,SAAS;;iBAOjC,OAAO;iBAEN,SAAS;;eAUd,IAAI;;EAMvC,IAAY,WAAW;IACrB,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE,CAAA;GAC3D;EAED,IAAY,SAAS;IACnB,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE,CAAA;GACvD;EAED,IAAY,OAAO;IACjB,OAAO,I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AI,CAAC,MAAM,CACV,CACL,CACM,EACV;GACF;;;;;;;","names":["inheritAriaAttributes","h"],"sources":["src/components/title/title.css?tag=qds-title&encapsulation=shadow","src/components/title/title.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: block;\n}\n\n.titles,\n.title {\n display: flex;\n}\n\n.titles {\n flex-direction: column;\n}\n\n.title,\n.subtitle,\n.kicker {\n margin-block: 0;\n}\n\n.icon {\n flex-shrink: 0;\n}\n\n.title {\n font-weight: initial;\n font-size: initial;\n color: var(--qds-theme-title);\n}\n\n.subtitle {\n color: var(--qds-theme-subtitle);\n}\n\n.kicker {\n color: var(--qds-theme-kicker);\n order: -1;\n}\n\n.subtitle,\n.kicker {\n overflow-wrap: break-word;\n}\n\n.main {\n &.section {\n &.titles,\n &.title {\n gap: var(--qds-main-section-titles-gap);\n }\n\n &.title {\n font: var(--qds-main-section-title);\n\n & .icon {\n --qds-main-section-title-line-height: 2rem;\n\n width: var(--qds-main-section-titles-icon-size);\n height: var(--qds-main-section-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-main-section-subtitle);\n }\n\n &.kicker {\n font: var(--qds-main-section-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-main-section-titles-icon-size, 0px) +\n var(--qds-main-section-titles-gap, 0px)\n );\n }\n\n &.has-icon-end {\n padding-inline-end: calc(\n var(--qds-main-section-titles-icon-size, 0px) +\n var(--qds-main-section-titles-gap, 0px)\n );\n }\n }\n\n &.subsection {\n &.titles,\n &.title {\n gap: var(--qds-main-subsection-titles-gap);\n }\n\n &.title {\n font: var(--qds-main-subsection-title);\n\n & .icon {\n --qds-main-subsection-title-line-height: 1.5rem;\n\n width: var(--qds-main-subsection-titles-icon-size);\n height: var(--qds-main-subsection-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-main-subsection-subtitle);\n }\n\n &.kicker {\n font: var(--qds-main-subsection-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-main-subsection-titles-icon-size, 0px) +\n var(--qds-main-subsection-titles-gap, 0px)\n );\n }\n }\n}\n\n.panel {\n &.root {\n &.titles,\n &.title {\n gap: var(--qds-panel-titles-gap);\n }\n\n &.title {\n font: var(--qds-panel-title);\n\n & .icon {\n --qds-panel-title-line-height: 2rem;\n\n width: var(--qds-panel-titles-icon-size);\n height: var(--qds-panel-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-panel-subtitle);\n }\n\n &.kicker {\n font: var(--qds-panel-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-panel-titles-icon-size, 0px) +\n var(--qds-panel-titles-gap, 0px)\n );\n }\n }\n\n &.section {\n &.titles,\n &.title {\n gap: var(--qds-panel-section-titles-gap);\n }\n\n &.title {\n font: var(--qds-panel-section-title);\n\n & .icon {\n --qds-panel-section-title-line-height: 1.5rem;\n\n width: var(--qds-panel-section-titles-icon-size);\n height: var(--qds-panel-section-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-panel-section-subtitle);\n }\n\n &.kicker {\n font: var(--qds-panel-section-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-panel-section-titles-icon-size, 0px) +\n var(--qds-panel-section-titles-gap, 0px)\n );\n }\n }\n\n &.subsection {\n &.titles,\n &.title {\n gap: var(--qds-panel-subsection-titles-gap);\n }\n\n &.title {\n font: var(--qds-panel-subsection-title);\n\n & .icon {\n --qds-panel-subsection-title-line-height: 1.25rem;\n\n width: var(--qds-panel-subsection-titles-icon-size);\n height: var(--qds-panel-subsection-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-panel-subsection-subtitle);\n }\n\n &.kicker {\n font: var(--qds-panel-subsection-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-panel-subsection-titles-icon-size, 0px) +\n var(--qds-panel-subsection-titles-gap, 0px)\n );\n }\n }\n}\n\n.navigation {\n &.section {\n &.titles,\n &.title {\n gap: var(--qds-navigation-section-titles-gap);\n }\n\n &.title {\n font: var(--qds-navigation-section-title);\n\n & .icon {\n --qds-navigation-section-title-line-height: 1.5rem;\n\n width: var(--qds-navigation-section-titles-icon-size);\n height: var(--qds-navigation-section-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-navigation-section-subtitle);\n }\n\n &.kicker {\n font: var(--qds-navigation-section-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-navigation-section-titles-icon-size, 0px) +\n var(--qds-navigation-section-titles-gap, 0px)\n );\n }\n }\n\n &.subsection {\n &.titles,\n &.title {\n gap: var(--qds-navigation-subsection-titles-gap);\n }\n\n &.title {\n font: var(--qds-navigation-subsection-title);\n\n & .icon {\n --qds-navigation-subsection-title-line-height: 1.25rem;\n\n width: var(--qds-navigation-subsection-titles-icon-size);\n height: var(--qds-navigation-subsection-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-navigation-subsection-subtitle);\n }\n\n &.kicker {\n font: var(--qds-navigation-subsection-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-navigation-subsection-titles-icon-size, 0px) +\n var(--qds-navigation-subsection-titles-gap, 0px)\n );\n }\n }\n}\n\n.popup {\n &.root {\n &.titles,\n &.title {\n gap: var(--qds-popup-titles-gap);\n }\n\n &.title {\n font: var(--qds-popup-title);\n\n & .icon {\n --qds-popup-title-line-height: 1.75rem;\n\n width: var(--qds-popup-titles-icon-size);\n height: var(--qds-popup-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-popup-subtitle);\n }\n\n &.kicker {\n font: var(--qds-popup-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-popup-titles-icon-size, 0px) +\n var(--qds-popup-titles-gap, 0px)\n );\n }\n }\n\n &.section {\n &.titles,\n &.title {\n gap: var(--qds-popup-section-titles-gap);\n }\n\n &.title {\n font: var(--qds-popup-section-title);\n\n & .icon {\n --qds-popup-section-title-line-height: 1.5rem;\n\n width: var(--qds-popup-section-titles-icon-size);\n height: var(--qds-popup-section-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-popup-section-subtitle);\n }\n\n &.kicker {\n font: var(--qds-popup-section-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-popup-section-titles-icon-size, 0px) +\n var(--qds-popup-section-titles-gap, 0px)\n );\n }\n }\n\n &.subsection {\n &.titles,\n &.title {\n gap: var(--qds-popup-subsection-titles-gap);\n }\n\n &.title {\n font: var(--qds-popup-subsection-title);\n\n & .icon {\n --qds-popup-subsection-title-line-height: 1.25rem;\n\n width: var(--qds-popup-subsection-titles-icon-size);\n height: var(--qds-popup-subsection-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-popup-subsection-subtitle);\n }\n\n &.kicker {\n font: var(--qds-popup-subsection-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-popup-subsection-titles-icon-size, 0px) +\n var(--qds-popup-subsection-titles-gap, 0px)\n );\n }\n }\n}\n\n.accessory {\n &.root {\n &.titles,\n &.title {\n gap: var(--qds-accessory-titles-gap);\n }\n\n &.title {\n font: var(--qds-accessory-title);\n\n & .icon {\n --qds-accessory-title-line-height: 1.5rem;\n\n width: var(--qds-accessory-titles-icon-size);\n height: var(--qds-accessory-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-accessory-subtitle);\n }\n\n &.kicker {\n font: var(--qds-accessory-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-accessory-titles-icon-size, 0px) +\n var(--qds-accessory-titles-gap, 0px)\n );\n }\n }\n\n &.section {\n &.titles,\n &.title {\n gap: var(--qds-accessory-section-titles-gap);\n }\n\n &.title {\n font: var(--qds-accessory-section-title);\n\n & .icon {\n --qds-accessory-section-title-line-height: 1.25rem;\n\n width: var(--qds-accessory-section-titles-icon-size);\n height: var(--qds-accessory-section-title-line-height);\n }\n }\n\n &.subtitle {\n font: var(--qds-accessory-section-subtitle);\n }\n\n &.kicker {\n font: var(--qds-accessory-section-kicker);\n }\n\n &.has-icon {\n padding-inline-start: calc(\n var(--qds-accessory-section-titles-icon-size, 0px) +\n var(--qds-accessory-section-titles-gap, 0px)\n );\n }\n }\n}\n","// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\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'\n\nexport type Layer = 'accessory' | 'main' | 'navigation' | 'panel' | 'popup'\nexport type Level = 'section' | 'subsection'\nexport type Tag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n\n/**\n * @slot Content to display for the title.\n * @see https://quartz.se.com/build/components/title\n */\n@Component({\n tag: 'qds-title',\n shadow: true,\n styleUrl: 'title.css',\n})\nexport class Title 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 iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop({ reflect: true }) public readonly iconLibrary: string = 'default'\n\n /**\n * Text to display for the kicker.\n */\n @Prop() public readonly kicker?: string\n\n @Prop() public readonly layer: Layer = 'panel'\n\n @Prop() public readonly level?: Level = 'section'\n\n /**\n * Text to display for the subtitle.\n */\n @Prop() public readonly subtitle?: string\n\n /**\n * HTML tag to use to render the title.\n */\n @Prop() public readonly tag: Tag = 'h2'\n\n @Element() private readonly element!: HTMLQdsTitleElement\n\n private inheritedAttributes: Attributes = {}\n\n private get hasSubtitle(): boolean {\n return this.subtitle !== undefined && this.subtitle !== ''\n }\n\n private get hasKicker(): boolean {\n return this.kicker !== undefined && this.kicker !== ''\n }\n\n private get hasIcon(): boolean {\n return this.iconName !== undefined && this.iconName !== ''\n }\n\n public componentWillLoad(): void {\n this.inheritedAttributes = inheritAriaAttributes(this.element)\n }\n\n public render() {\n return (\n <hgroup\n class={{\n [this.layer]: true,\n [this.level ?? 'root']: true,\n titles: true,\n }}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.inheritedAttributes}\n >\n <this.tag\n class={{\n [this.layer]: true,\n [this.level ?? 'root']: true,\n title: true,\n }}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"icon\"\n name={this.iconName}\n library={this.iconLibrary}\n />\n )}\n <div>\n <slot />\n </div>\n </this.tag>\n {this.hasSubtitle && (\n <p\n class={{\n [this.layer]: true,\n [this.level ?? 'root']: true,\n subtitle: true,\n 'has-icon': this.hasIcon,\n }}\n >\n {this.subtitle}\n </p>\n )}\n {this.hasKicker && (\n <p\n class={{\n [this.layer]: true,\n [this.level ?? 'root']: true,\n kicker: true,\n 'has-icon': this.hasIcon,\n }}\n >\n {this.kicker}\n </p>\n )}\n </hgroup>\n )\n }\n}\n"],"version":3}
@@ -1,284 +0,0 @@
1
- /*!
2
- * SPDX-FileCopyrightText: © 2023 Schneider Electric
3
- *
4
- * SPDX-License-Identifier: LGPL-2.1-only
5
- */
6
- 'use strict';
7
-
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
- const index = require('./index-d181f952.js');
11
- const floatingUi_dom_esm = require('./floating-ui.dom.esm-71fa96af.js');
12
- const helpers = require('./helpers-452256e8.js');
13
-
14
- const tooltipCss = ":host{box-sizing:border-box}:host([hidden]){display:none !important}:host([hidden]){}:host *,:host *::before,:host *::after{box-sizing:inherit}:host{align-items:flex-start;background-color:var(--qds-theme-accessory-background);border-radius:var(--qds-accessory-border-radius);box-shadow:var(--qds-theme-accessory-elevation);color:var(--qds-theme-text-standard);display:flex;flex-direction:column;gap:var(--qds-accessory-gap-children-unrelated);left:0;padding:var(--qds-accessory-padding);top:0}:host([aria-hidden='true']){display:none}:host::before{content:'';height:100%;left:0;position:absolute;top:0;width:100%}::slotted(blockquote),::slotted(button),::slotted(dd),::slotted(dl),::slotted(fieldset),::slotted(figure),::slotted(h1),::slotted(h2),::slotted(h3),::slotted(h4),::slotted(h5),::slotted(h6),::slotted(hr),::slotted(input),::slotted(menu),::slotted(ol),::slotted(p),::slotted(pre),::slotted(select),::slotted(textarea),::slotted(ul){margin:0}:host([data-side='top'])::before,:host([data-side='bottom'])::before{height:calc(\n 0px +\n 0px\n );height:calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );top:100%}:host([data-side='bottom'])::before{top:calc(\n -1 * (0px +\n 0px)\n );top:calc(\n -1 * (var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px))\n )}:host([data-side='left'])::before,:host([data-side='right'])::before{width:calc(\n 0px +\n 0px\n );width:calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );left:100%}:host([data-side='right'])::before{left:calc(\n -1 * (0px +\n 0px)\n );left:calc(\n -1 * (var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px))\n )}.arrow-container{height:var(--qds-signature-triangle-pointer-size-width);position:absolute;width:var(--qds-signature-triangle-pointer-size-width)}.arrow-container[data-side='bottom']{bottom:100%;transform:rotate(180deg)}.arrow-container[data-side='left']{left:100%;transform:rotate(-90deg)}.arrow-container[data-side='right']{right:100%;transform:rotate(90deg)}.arrow-container[data-side='top']{top:100%}.arrow{fill:var(--qds-theme-accessory-background)}";
15
-
16
- let autoIncrementingId = 1;
17
- const Tooltip = class {
18
- constructor(hostRef) {
19
- index.registerInstance(this, hostRef);
20
- this.closeEmitter = index.createEvent(this, "qdsClose", 2);
21
- this.clickedTooltip = false;
22
- this.isTouchDevice = false;
23
- this.arrowContainerRef = (svg) => {
24
- this.arrowContainerElement = svg;
25
- };
26
- this.boundTooltipMouseDown = () => {
27
- this.clickedTooltip = true;
28
- };
29
- this.boundFocus = () => {
30
- helpers.ignorePromise(this.handleFocus());
31
- };
32
- this.boundMouseEnter = () => {
33
- helpers.ignorePromise(this.handleMouseEnter());
34
- };
35
- this.boundMouseLeave = (event) => {
36
- helpers.ignorePromise(this.handleMouseLeave(event));
37
- };
38
- this.boundFocusout = (event) => {
39
- helpers.ignorePromise(this.handleFocusOut(event));
40
- };
41
- this.boundReferenceClick = () => {
42
- helpers.ignorePromise(this.handleReferenceClick());
43
- };
44
- this.autoUpdateOptions = undefined;
45
- this.disabled = false;
46
- this.flipOptions = undefined;
47
- this.noFlip = false;
48
- this.noShift = false;
49
- this.offsetOptions = undefined;
50
- this.placement = 'top';
51
- this.shiftOptions = undefined;
52
- this.strategy = undefined;
53
- this.target = undefined;
54
- this.hostPosition = undefined;
55
- this.hostTransform = undefined;
56
- this.open = false;
57
- this.middleware = undefined;
58
- this.aDisplay = undefined;
59
- this.side = 'top';
60
- this.aShape = '';
61
- this.aViewbox = '';
62
- this.aHeight = 0;
63
- this.aWidth = 0;
64
- this.aGap = 0;
65
- this.aX = '';
66
- this.aY = '';
67
- }
68
- /**
69
- * Show the tooltip.
70
- */
71
- async show() {
72
- if (this.open)
73
- return;
74
- if (this.referenceElement instanceof globalThis.Element)
75
- this.referenceElement.addEventListener('focusout', this.boundFocusout);
76
- this.open = true;
77
- this.element.setAttribute('aria-hidden', 'false');
78
- this.startAutoUpdate();
79
- }
80
- /**
81
- * Close the tooltip.
82
- */
83
- async close() {
84
- if (!this.open)
85
- return;
86
- this.closeEmitter.emit();
87
- if (this.referenceElement instanceof globalThis.Element)
88
- this.referenceElement.removeEventListener('focusout', this.boundFocusout);
89
- this.open = false;
90
- this.clickedTooltip = false;
91
- this.element.setAttribute('aria-hidden', 'true');
92
- if (this.cleanup)
93
- this.cleanup();
94
- }
95
- /**
96
- * Update the tooltip's arrow.
97
- *
98
- * This method should typically be called when the Quartz platform was
99
- * changed.
100
- */
101
- async updateArrow() {
102
- this.aGap = helpers.propertyToPx(this.element, '--qds-accessory-gap-floating') ?? 0;
103
- this.aHeight =
104
- helpers.propertyToPx(this.element, `--qds-signature-triangle-pointer-size-height`) ?? 0;
105
- this.aWidth =
106
- helpers.propertyToPx(this.element, `--qds-signature-triangle-pointer-size-width`) ?? 0;
107
- this.aViewbox = `0 0 ${this.aWidth} ${Math.max(this.aHeight, this.aWidth)}`;
108
- const aTipRadius = helpers.propertyToPx(this.element, `--qds-signature-triangle-pointer-tip-radius`) ?? 0;
109
- const svgX = (this.aWidth / 2) * (aTipRadius / -8 + 1);
110
- const svgY = ((this.aHeight / 2) * aTipRadius) / 4;
111
- this.aShape =
112
- 'M0,0' +
113
- ` H${this.aWidth}` +
114
- ` L${this.aWidth - svgX},${this.aHeight - svgY}` +
115
- ` Q${this.aWidth / 2},${this.aHeight} ${svgX},${this.aHeight - svgY}` +
116
- ' Z';
117
- }
118
- async handleMouseDown(event) {
119
- const composedPath = event.composedPath();
120
- const withinBounds = composedPath.includes(this.element) ||
121
- (this.referenceElement instanceof globalThis.Element &&
122
- composedPath.includes(this.referenceElement));
123
- if (!withinBounds)
124
- await this.close();
125
- }
126
- async updateMiddleware() {
127
- helpers.invariant(this.arrowContainerElement);
128
- this.middleware = [
129
- floatingUi_dom_esm.offset({
130
- ...this.offsetOptions,
131
- mainAxis: this.aGap + this.aHeight,
132
- }),
133
- !this.noFlip &&
134
- floatingUi_dom_esm.flip({
135
- crossAxis: this.noShift,
136
- ...this.flipOptions,
137
- }),
138
- !this.noShift &&
139
- floatingUi_dom_esm.shift({
140
- limiter: floatingUi_dom_esm.limitShift(),
141
- ...this.shiftOptions,
142
- }),
143
- floatingUi_dom_esm.arrow({
144
- element: this.arrowContainerElement,
145
- }),
146
- ].filter((middleware) => middleware !== false);
147
- }
148
- async updateReferenceElement() {
149
- var _a;
150
- this.disconnectReferenceElement();
151
- const resolvedTarget = typeof this.target === 'function' ? this.target() : this.target;
152
- if (typeof resolvedTarget === 'string') {
153
- const element = document.querySelector(resolvedTarget);
154
- if (element === null)
155
- throw new Error('String `target` must resolve to an Element.');
156
- this.referenceElement = element;
157
- }
158
- else
159
- this.referenceElement = resolvedTarget;
160
- if (!(this.referenceElement instanceof globalThis.Element))
161
- return;
162
- if (this.isTouchDevice)
163
- this.referenceElement.addEventListener('click', this.boundReferenceClick);
164
- this.referenceElement.addEventListener('focus', this.boundFocus);
165
- this.referenceElement.addEventListener('mouseenter', this.boundMouseEnter);
166
- this.referenceElement.addEventListener('mouseleave', this.boundMouseLeave);
167
- (_a = this.element).id || (_a.id = `qds-tooltip-${autoIncrementingId}`);
168
- this.referenceElement.setAttribute('aria-describedby', this.element.id);
169
- }
170
- async updatePosition() {
171
- helpers.invariant(this.referenceElement);
172
- const { x, y, middlewareData, placement, strategy } = await floatingUi_dom_esm.computePosition(this.referenceElement, this.element, {
173
- middleware: this.middleware,
174
- placement: this.placement,
175
- strategy: this.strategy,
176
- });
177
- this.hostPosition = strategy;
178
- this.hostTransform = `translate(${helpers.roundByDPR(x)}px,${helpers.roundByDPR(y)}px)`;
179
- if (!middlewareData.arrow)
180
- return;
181
- helpers.invariant(this.arrowContainerElement);
182
- if (middlewareData.arrow.centerOffset !== 0) {
183
- this.aDisplay = 'none';
184
- return;
185
- }
186
- this.aDisplay = undefined;
187
- const [side] = placement.split('-');
188
- this.side = side;
189
- const { x: aX, y: aY } = middlewareData.arrow;
190
- this.aX = aX === undefined ? '' : `${aX}px`;
191
- this.aY = aY === undefined ? '' : `${aY}px`;
192
- }
193
- startAutoUpdate() {
194
- helpers.invariant(this.referenceElement);
195
- if (this.cleanup)
196
- this.cleanup();
197
- this.cleanup = floatingUi_dom_esm.autoUpdate(this.referenceElement, this.element, () => {
198
- helpers.ignorePromise(this.updatePosition());
199
- }, this.autoUpdateOptions);
200
- }
201
- async componentWillLoad() {
202
- this.isTouchDevice = helpers.isTouchDevice();
203
- this.element.setAttribute('aria-hidden', 'true');
204
- await this.updateReferenceElement();
205
- autoIncrementingId += 1;
206
- }
207
- async componentDidLoad() {
208
- await this.updateArrow();
209
- }
210
- disconnectedCallback() {
211
- this.disconnectReferenceElement();
212
- }
213
- render() {
214
- return (index.h(index.Host, { "data-side": this.side, onFocusout: this.boundFocusout, onMouseDown: this.boundTooltipMouseDown, onMouseLeave: this.boundMouseLeave, role: this.element.role ?? 'tooltip', style: {
215
- position: this.hostPosition,
216
- transform: this.hostTransform,
217
- } }, index.h("slot", null), index.h("svg", { "aria-hidden": true, "data-side": this.side, class: "arrow-container", ref: this.arrowContainerRef, viewBox: this.aViewbox, style: {
218
- left: this.aX,
219
- top: this.aY,
220
- display: this.aDisplay,
221
- } }, index.h("path", { class: "arrow", d: this.aShape }))));
222
- }
223
- async handleFocus() {
224
- if (!this.disabled)
225
- await this.show();
226
- }
227
- async handleMouseEnter() {
228
- if (!this.disabled)
229
- await this.show();
230
- }
231
- async handleMouseLeave(event) {
232
- if (!this.clickedTooltip &&
233
- document.activeElement !== this.referenceElement &&
234
- document.activeElement?.closest('qds-tooltip') !== this.element &&
235
- event instanceof MouseEvent &&
236
- event.relatedTarget !== this.referenceElement &&
237
- event.relatedTarget !== this.element)
238
- await this.close();
239
- }
240
- async handleFocusOut(event) {
241
- if (!(event instanceof FocusEvent))
242
- return;
243
- const { relatedTarget } = event;
244
- if (relatedTarget instanceof globalThis.Element &&
245
- !this.element.contains(relatedTarget) &&
246
- this.referenceElement !== relatedTarget)
247
- await this.close();
248
- }
249
- async handleReferenceClick() {
250
- if (!this.disabled)
251
- await (this.open ? this.close() : this.show());
252
- }
253
- disconnectReferenceElement() {
254
- if (!(this.referenceElement instanceof globalThis.Element))
255
- return;
256
- if (this.isTouchDevice)
257
- this.referenceElement.removeEventListener('click', this.boundReferenceClick);
258
- this.referenceElement.removeEventListener('focus', this.boundFocus);
259
- this.referenceElement.removeEventListener('focusout', this.boundFocusout);
260
- this.referenceElement.removeEventListener('mouseenter', this.boundMouseEnter);
261
- this.referenceElement.removeEventListener('mouseleave', this.boundMouseLeave);
262
- this.referenceElement.removeAttribute('aria-describedby');
263
- }
264
- get element() { return index.getElement(this); }
265
- static get watchers() { return {
266
- "aGap": ["updateMiddleware"],
267
- "aHeight": ["updateMiddleware"],
268
- "flipOptions": ["updateMiddleware"],
269
- "noFlip": ["updateMiddleware"],
270
- "noShift": ["updateMiddleware"],
271
- "offsetOptions": ["updateMiddleware"],
272
- "shiftOptions": ["updateMiddleware"],
273
- "target": ["updateReferenceElement"],
274
- "middleware": ["updatePosition"],
275
- "placement": ["updatePosition"],
276
- "strategy": ["updatePosition"],
277
- "autoUpdateOptions": ["startAutoUpdate"]
278
- }; }
279
- };
280
- Tooltip.style = tooltipCss;
281
-
282
- exports.qds_tooltip = Tooltip;
283
-
284
- //# sourceMappingURL=qds-tooltip.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"qds-tooltip.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,UAAU,GAAG,8xEAA8xE;;AC+CjzE,IAAI,kBAAkB,GAAG,CAAC,CAAA;MAYb,OAAO;;;;IAoIV,mBAAc,GAAG,KAAK,CAAA;IAEtB,kBAAa,GAAG,KAAK,CAAA;IAiPZ,sBAAiB,GAAG,CAAC,GAAgB;MACpD,IAAI,CAAC,qBAAqB,GAAG,GAAG,CAAA;KACjC,CAAA;IAEgB,0BAAqB,GAAG;MACvC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAA;KAC3B,CAAA;IAMgB,eAAU,GAAG;MAC5BA,qBAAa,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAA;KAClC,CAAA;IAMgB,oBAAe,GAAG;MACjCA,qBAAa,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAA;KACvC,CAAA;IAcgB,oBAAe,GAAG,CAAC,KAAY;MAC9CA,qBAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAA;KAC5C,CAAA;IAcgB,kBAAa,GAAG,CAAC,KAAY;MAC5CA,qBAAa,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAA;KAC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CAAA;GAC1D;;;;;;;;;;;;;;;;;;;;;","names":["ignorePromise","propertyToPx","invariant","offset","flip","shift","limitShift","arrow","computePosition","roundByDPR","autoUpdate","isTouchDevice","h","Host"],"sources":["src/components/tooltip/tooltip.css?tag=qds-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.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 align-items: flex-start;\n background-color: var(--qds-theme-accessory-background);\n border-radius: var(--qds-accessory-border-radius);\n box-shadow: var(--qds-theme-accessory-elevation);\n color: var(--qds-theme-text-standard);\n display: flex;\n flex-direction: column;\n gap: var(--qds-accessory-gap-children-unrelated);\n left: 0;\n padding: var(--qds-accessory-padding);\n top: 0;\n}\n\n:host([aria-hidden='true']) {\n display: none;\n}\n\n:host::before {\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n}\n\n::slotted(blockquote),\n::slotted(button),\n::slotted(dd),\n::slotted(dl),\n::slotted(fieldset),\n::slotted(figure),\n::slotted(h1),\n::slotted(h2),\n::slotted(h3),\n::slotted(h4),\n::slotted(h5),\n::slotted(h6),\n::slotted(hr),\n::slotted(input),\n::slotted(menu),\n::slotted(ol),\n::slotted(p),\n::slotted(pre),\n::slotted(select),\n::slotted(textarea),\n::slotted(ul) {\n margin: 0;\n}\n\n:host([data-side='top'])::before,\n:host([data-side='bottom'])::before {\n height: calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );\n top: 100%;\n}\n\n:host([data-side='bottom'])::before {\n top: calc(\n -1 * (var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px))\n );\n}\n\n:host([data-side='left'])::before,\n:host([data-side='right'])::before {\n width: calc(\n var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px)\n );\n left: 100%;\n}\n\n:host([data-side='right'])::before {\n left: calc(\n -1 * (var(--qds-accessory-gap-floating, 0px) +\n var(--qds-signature-triangle-pointer-size-height, 0px))\n );\n}\n\n.arrow-container {\n height: var(--qds-signature-triangle-pointer-size-width);\n position: absolute;\n width: var(--qds-signature-triangle-pointer-size-width);\n\n &[data-side='bottom'] {\n bottom: 100%;\n transform: rotate(180deg);\n }\n\n &[data-side='left'] {\n left: 100%;\n transform: rotate(-90deg);\n }\n\n &[data-side='right'] {\n right: 100%;\n transform: rotate(90deg);\n }\n\n &[data-side='top'] {\n top: 100%;\n }\n}\n\n.arrow {\n fill: var(--qds-theme-accessory-background);\n}\n","// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\n\nimport type {\n AutoUpdateOptions,\n DetectOverflowOptions,\n FlipOptions,\n Middleware,\n Placement,\n ReferenceElement,\n ShiftOptions,\n Side,\n Strategy,\n} from '@floating-ui/dom'\nimport {\n arrow,\n autoUpdate,\n computePosition,\n flip,\n limitShift,\n offset,\n shift,\n} from '@floating-ui/dom'\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n Component,\n Element,\n Event,\n h,\n Host,\n Listen,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { OffsetOptions } from '../../helpers'\nimport {\n ignorePromise,\n invariant,\n isTouchDevice,\n propertyToPx,\n roundByDPR,\n} from '../../helpers'\n\nlet autoIncrementingId = 1\n\n/**\n * @experimental\n * @slot Content to display in the dropdown.\n * @see https://quartz.se.com/build/components/tooltip\n */\n@Component({\n tag: 'qds-tooltip',\n shadow: true,\n styleUrl: 'tooltip.css',\n})\nexport class Tooltip implements ComponentInterface {\n /**\n * Options to pass to Floating UI's\n * [`autoUpdate()` function](https://floating-ui.com/docs/autoUpdate).\n *\n * @see https://floating-ui.com/docs/autoupdate#options\n */\n @Prop() public readonly autoUpdateOptions?: AutoUpdateOptions\n\n /**\n * Prevents the tooltip from being shown by user interaction. The tooltip can\n * still be displayed by calling the `show()` method.\n */\n @Prop({ mutable: true }) public disabled = false\n\n /**\n * Options to pass to Floating UI's\n * [`flip` middleware](https://floating-ui.com/docs/flip).\n *\n * The [`crossAxis` option](https://floating-ui.com/docs/flip#crossaxis) is\n * set to the value of the `noShift` property by default for interoperability\n * with the [`shift` middleware](https://floating-ui.com/docs/shift).\n *\n * @see https://floating-ui.com/docs/flip#options\n */\n @Prop() public readonly flipOptions?: Partial<\n DetectOverflowOptions & FlipOptions\n >\n\n /**\n * Disable Floating UI's\n * [`flip` middleware](https://floating-ui.com/docs/flip).\n */\n @Prop() public readonly noFlip: boolean = false\n\n /**\n * Disable Floating UI's\n * [`shift` middleware](https://floating-ui.com/docs/shift).\n */\n @Prop() public readonly noShift: boolean = false\n\n /**\n * Options to pass to Floating UI's\n * [`offset` middleware](https://floating-ui.com/docs/offset).\n *\n * The [`mainAxis` option](https://floating-ui.com/docs/offset#mainaxis) is\n * not supported.\n *\n * @see https://floating-ui.com/docs/offset#options\n */\n @Prop() public readonly offsetOptions?: OffsetOptions\n\n /**\n * Where to place the tooltip relative to the `target`.\n *\n * @see https://floating-ui.com/docs/tutorial#placements\n */\n @Prop() public readonly placement: Placement = 'top'\n\n /**\n * Options to pass to Floating UI's\n * [`shift` middleware](https://floating-ui.com/docs/shift).\n *\n * @see https://floating-ui.com/docs/shift#options\n */\n @Prop() public readonly shiftOptions?: Partial<\n DetectOverflowOptions & ShiftOptions\n >\n\n /**\n * The CSS position strategy to use.\n *\n * @see https://floating-ui.com/docs/computeposition#strategy\n */\n @Prop() public readonly strategy?: Strategy\n\n /**\n * The trigger element that will trigger the tooltip. The target specified\n * can be any of the follow:\n *\n * - A CSS selector string\n * - A reference to an\n * [`Element`](https://developer.mozilla.org/docs/Web/API/Element) or\n * [Virtual Element](https://floating-ui.com/docs/virtual-elements)\n * - A function returning a reference to an\n * [`Element`](https://developer.mozilla.org/docs/Web/API/Element),\n * [Virtual Element](https://floating-ui.com/docs/virtual-elements),\n * or a CSS selector string\n */\n @Prop() public readonly target!:\n | ReferenceElement\n | string\n | (() => ReferenceElement | string)\n\n /**\n * Emitted when the tooltip is closed.\n */\n @Event({ eventName: 'qdsClose', bubbles: false, cancelable: false })\n private readonly closeEmitter!: EventEmitter<void>\n\n @Element() private readonly element!: HTMLQdsTooltipElement\n\n @State() private hostPosition?: string\n\n @State() private hostTransform?: string\n\n @State() private open = false\n\n @State() private middleware?: Middleware[]\n\n @State() private aDisplay?: string\n\n @State() private side: Side = 'top'\n\n @State() private aShape = ''\n\n @State() private aViewbox = ''\n\n @State() private aHeight = 0\n\n @State() private aWidth = 0\n\n @State() private aGap = 0\n\n @State() private aX = ''\n\n @State() private aY = ''\n\n private arrowContainerElement?: SVGElement\n\n private cleanup?: () => void\n\n private clickedTooltip = false\n\n private isTouchDevice = false\n\n private referenceElement?: ReferenceElement\n\n /**\n * Show the tooltip.\n */\n @Method()\n public async show(): Promise<void> {\n if (this.open) return\n\n if (this.referenceElement instanceof globalThis.Element)\n this.referenceElement.addEventListener('focusout', this.boundFocusout)\n\n this.open = true\n this.element.setAttribute('aria-hidden', 'false')\n this.startAutoUpdate()\n }\n\n /**\n * Close the tooltip.\n */\n @Method()\n public async close(): Promise<void> {\n if (!this.open) return\n\n this.closeEmitter.emit()\n if (this.referenceElement instanceof globalThis.Element)\n this.referenceElement.removeEventListener('focusout', this.boundFocusout)\n\n this.open = false\n this.clickedTooltip = false\n this.element.setAttribute('aria-hidden', 'true')\n if (this.cleanup) this.cleanup()\n }\n\n /**\n * Update the tooltip's arrow.\n *\n * This method should typically be called when the Quartz platform was\n * changed.\n */\n @Method()\n public async updateArrow(): Promise<void> {\n this.aGap = propertyToPx(this.element, '--qds-accessory-gap-floating') ?? 0\n\n this.aHeight =\n propertyToPx(\n this.element,\n `--qds-signature-triangle-pointer-size-height`,\n ) ?? 0\n\n this.aWidth =\n propertyToPx(\n this.element,\n `--qds-signature-triangle-pointer-size-width`,\n ) ?? 0\n\n this.aViewbox = `0 0 ${this.aWidth} ${Math.max(this.aHeight, this.aWidth)}`\n\n const aTipRadius =\n propertyToPx(\n this.element,\n `--qds-signature-triangle-pointer-tip-radius`,\n ) ?? 0\n\n const svgX = (this.aWidth / 2) * (aTipRadius / -8 + 1)\n const svgY = ((this.aHeight / 2) * aTipRadius) / 4\n\n this.aShape =\n 'M0,0' +\n ` H${this.aWidth}` +\n ` L${this.aWidth - svgX},${this.aHeight - svgY}` +\n ` Q${this.aWidth / 2},${this.aHeight} ${svgX},${this.aHeight - svgY}` +\n ' Z'\n }\n\n @Listen('mousedown', { target: 'document' })\n protected async handleMouseDown(event: MouseEvent): Promise<void> {\n const composedPath = event.composedPath()\n const withinBounds =\n composedPath.includes(this.element) ||\n (this.referenceElement instanceof globalThis.Element &&\n composedPath.includes(this.referenceElement))\n if (!withinBounds) await this.close()\n }\n\n @Watch('aGap')\n @Watch('aHeight')\n @Watch('flipOptions')\n @Watch('noFlip')\n @Watch('noShift')\n @Watch('offsetOptions')\n @Watch('shiftOptions')\n protected async updateMiddleware(): Promise<void> {\n invariant(this.arrowContainerElement)\n\n this.middleware = [\n offset({\n ...this.offsetOptions,\n mainAxis: this.aGap + this.aHeight,\n }),\n !this.noFlip &&\n flip({\n crossAxis: this.noShift,\n ...this.flipOptions,\n }),\n !this.noShift &&\n shift({\n limiter: limitShift(),\n ...this.shiftOptions,\n }),\n arrow({\n element: this.arrowContainerElement,\n }),\n ].filter((middleware): middleware is Middleware => middleware !== false)\n }\n\n @Watch('target')\n private async updateReferenceElement(): Promise<void> {\n this.disconnectReferenceElement()\n\n const resolvedTarget =\n typeof this.target === 'function' ? this.target() : this.target\n if (typeof resolvedTarget === 'string') {\n const element = document.querySelector(resolvedTarget)\n if (element === null)\n throw new Error('String `target` must resolve to an Element.')\n this.referenceElement = element\n } else this.referenceElement = resolvedTarget\n\n if (!(this.referenceElement instanceof globalThis.Element)) return\n\n if (this.isTouchDevice)\n this.referenceElement.addEventListener('click', this.boundReferenceClick)\n this.referenceElement.addEventListener('focus', this.boundFocus)\n this.referenceElement.addEventListener('mouseenter', this.boundMouseEnter)\n this.referenceElement.addEventListener('mouseleave', this.boundMouseLeave)\n this.element.id ||= `qds-tooltip-${autoIncrementingId}`\n this.referenceElement.setAttribute('aria-describedby', this.element.id)\n }\n\n @Watch('middleware')\n @Watch('placement')\n @Watch('strategy')\n private async updatePosition(): Promise<void> {\n invariant(this.referenceElement)\n\n const { x, y, middlewareData, placement, strategy } = await computePosition(\n this.referenceElement,\n this.element,\n {\n middleware: this.middleware,\n placement: this.placement,\n strategy: this.strategy,\n },\n )\n this.hostPosition = strategy\n this.hostTransform = `translate(${roundByDPR(x)}px,${roundByDPR(y)}px)`\n\n if (!middlewareData.arrow) return\n\n invariant(this.arrowContainerElement)\n\n if (middlewareData.arrow.centerOffset !== 0) {\n this.aDisplay = 'none'\n return\n }\n this.aDisplay = undefined\n\n const [side] = placement.split('-') as [Side]\n this.side = side\n\n const { x: aX, y: aY } = middlewareData.arrow\n\n this.aX = aX === undefined ? '' : `${aX}px`\n this.aY = aY === undefined ? '' : `${aY}px`\n }\n\n @Watch('autoUpdateOptions')\n private startAutoUpdate(): void {\n invariant(this.referenceElement)\n\n if (this.cleanup) this.cleanup()\n this.cleanup = autoUpdate(\n this.referenceElement,\n this.element,\n () => {\n ignorePromise(this.updatePosition())\n },\n this.autoUpdateOptions,\n )\n }\n\n public async componentWillLoad(): Promise<void> {\n this.isTouchDevice = isTouchDevice()\n this.element.setAttribute('aria-hidden', 'true')\n await this.updateReferenceElement()\n autoIncrementingId += 1\n }\n\n public async componentDidLoad(): Promise<void> {\n await this.updateArrow()\n }\n\n public disconnectedCallback(): void {\n this.disconnectReferenceElement()\n }\n\n public render() {\n return (\n <Host\n data-side={this.side}\n onFocusout={this.boundFocusout}\n onMouseDown={this.boundTooltipMouseDown}\n onMouseLeave={this.boundMouseLeave}\n role={this.element.role ?? 'tooltip'}\n style={{\n position: this.hostPosition,\n transform: this.hostTransform,\n }}\n >\n <slot />\n <svg\n aria-hidden\n data-side={this.side}\n class=\"arrow-container\"\n ref={this.arrowContainerRef}\n viewBox={this.aViewbox}\n style={{\n left: this.aX,\n top: this.aY,\n display: this.aDisplay,\n }}\n >\n <path class=\"arrow\" d={this.aShape} />\n </svg>\n </Host>\n )\n }\n\n private readonly arrowContainerRef = (svg?: SVGElement): void => {\n this.arrowContainerElement = svg\n }\n\n private readonly boundTooltipMouseDown = (): void => {\n this.clickedTooltip = true\n }\n\n private async handleFocus(): Promise<void> {\n if (!this.disabled) await this.show()\n }\n\n private readonly boundFocus = (): void => {\n ignorePromise(this.handleFocus())\n }\n\n private async handleMouseEnter(): Promise<void> {\n if (!this.disabled) await this.show()\n }\n\n private readonly boundMouseEnter = (): void => {\n ignorePromise(this.handleMouseEnter())\n }\n\n private async handleMouseLeave(event: Event): Promise<void> {\n if (\n !this.clickedTooltip &&\n document.activeElement !== this.referenceElement &&\n document.activeElement?.closest('qds-tooltip') !== this.element &&\n event instanceof MouseEvent &&\n event.relatedTarget !== this.referenceElement &&\n event.relatedTarget !== this.element\n )\n await this.close()\n }\n\n private readonly boundMouseLeave = (event: Event): void => {\n ignorePromise(this.handleMouseLeave(event))\n }\n\n private async handleFocusOut(event: Event): Promise<void> {\n if (!(event instanceof FocusEvent)) return\n const { relatedTarget } = event\n\n if (\n relatedTarget instanceof globalThis.Element &&\n !this.element.contains(relatedTarget) &&\n this.referenceElement !== relatedTarget\n )\n await this.close()\n }\n\n private readonly boundFocusout = (event: Event): void => {\n ignorePromise(this.handleFocusOut(event))\n }\n\n private async handleReferenceClick(): Promise<void> {\n if (!this.disabled) await (this.open ? this.close() : this.show())\n }\n\n private readonly boundReferenceClick = (): void => {\n ignorePromise(this.handleReferenceClick())\n }\n\n private disconnectReferenceElement(): void {\n if (!(this.referenceElement instanceof globalThis.Element)) return\n\n if (this.isTouchDevice)\n this.referenceElement.removeEventListener(\n 'click',\n this.boundReferenceClick,\n )\n this.referenceElement.removeEventListener('focus', this.boundFocus)\n this.referenceElement.removeEventListener('focusout', this.boundFocusout)\n this.referenceElement.removeEventListener(\n 'mouseenter',\n this.boundMouseEnter,\n )\n this.referenceElement.removeEventListener(\n 'mouseleave',\n this.boundMouseLeave,\n )\n this.referenceElement.removeAttribute('aria-describedby')\n }\n}\n"],"version":3}