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

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 (264) hide show
  1. package/components/index.js +2 -2
  2. package/components/{p-7b04d43e.js → p-002e77af.js} +656 -328
  3. package/components/p-002e77af.js.map +1 -0
  4. package/components/{p-9df62f97.js → p-065d722e.js} +18 -7
  5. package/components/{p-9df62f97.js.map → p-065d722e.js.map} +1 -1
  6. package/components/{p-7f6e797a.js → p-252b0946.js} +17 -12
  7. package/components/p-252b0946.js.map +1 -0
  8. package/components/{p-d279ae53.js → p-2e88c3cc.js} +11 -3
  9. package/components/p-2e88c3cc.js.map +1 -0
  10. package/components/{p-698edde1.js → p-786e2b51.js} +79 -44
  11. package/components/p-786e2b51.js.map +1 -0
  12. package/components/{p-b82bac0a.js → p-84aae53b.js} +20 -11
  13. package/components/p-84aae53b.js.map +1 -0
  14. package/components/{p-028b9d2e.js → p-86a0fdf3.js} +11 -4
  15. package/components/p-86a0fdf3.js.map +1 -0
  16. package/components/{p-82461767.js → p-9a9561a8.js} +8 -80
  17. package/components/p-9a9561a8.js.map +1 -0
  18. package/components/{p-f5ba28ff.js → p-ae6eda4e.js} +41 -30
  19. package/components/p-ae6eda4e.js.map +1 -0
  20. package/components/{p-f85b490c.js → p-ed500f42.js} +72 -28
  21. package/components/p-ed500f42.js.map +1 -0
  22. package/components/{p-355efdb1.js → p-ee2621aa.js} +11 -5
  23. package/components/p-ee2621aa.js.map +1 -0
  24. package/components/{p-4141d6ed.js → p-efdb8fa2.js} +2 -2
  25. package/components/p-efdb8fa2.js.map +1 -0
  26. package/components/qds-badge-counter.js +1 -1
  27. package/components/qds-badge-indicator.js +1 -1
  28. package/components/qds-breadcrumb-item.js +65 -15
  29. package/components/qds-breadcrumb-item.js.map +1 -1
  30. package/components/qds-button.js +1 -1
  31. package/components/qds-checkbox.js +1 -1
  32. package/components/qds-chip.js +46 -25
  33. package/components/qds-chip.js.map +1 -1
  34. package/components/qds-dialog.js +9 -4
  35. package/components/qds-dialog.js.map +1 -1
  36. package/components/qds-divider.js +1 -1
  37. package/components/qds-dropdown.js +25 -18
  38. package/components/qds-dropdown.js.map +1 -1
  39. package/components/qds-form-message.js +18 -8
  40. package/components/qds-form-message.js.map +1 -1
  41. package/components/qds-icon.js +1 -1
  42. package/components/qds-inline-link.js +18 -17
  43. package/components/qds-inline-link.js.map +1 -1
  44. package/components/qds-input.js +117 -54
  45. package/components/qds-input.js.map +1 -1
  46. package/components/qds-label.js +1 -1
  47. package/components/qds-list-item.js +21 -22
  48. package/components/qds-list-item.js.map +1 -1
  49. package/components/qds-loader.js +5 -3
  50. package/components/qds-loader.js.map +1 -1
  51. package/components/qds-nav-list-item.js +32 -16
  52. package/components/qds-nav-list-item.js.map +1 -1
  53. package/components/qds-progress-bar.js +25 -7
  54. package/components/qds-progress-bar.js.map +1 -1
  55. package/components/qds-radio.js +25 -24
  56. package/components/qds-radio.js.map +1 -1
  57. package/components/qds-select.js +119 -31
  58. package/components/qds-select.js.map +1 -1
  59. package/components/qds-standalone-link.js +26 -19
  60. package/components/qds-standalone-link.js.map +1 -1
  61. package/components/qds-switch.js +70 -21
  62. package/components/qds-switch.js.map +1 -1
  63. package/components/qds-tab.js +71 -45
  64. package/components/qds-tab.js.map +1 -1
  65. package/components/qds-tabbar.js +34 -27
  66. package/components/qds-tabbar.js.map +1 -1
  67. package/components/qds-table-body.js +3 -3
  68. package/components/qds-table-body.js.map +1 -1
  69. package/components/qds-table-cell.js +3 -5
  70. package/components/qds-table-cell.js.map +1 -1
  71. package/components/qds-table-head-cell.js +3 -7
  72. package/components/qds-table-head-cell.js.map +1 -1
  73. package/components/qds-table-head.js +3 -3
  74. package/components/qds-table-head.js.map +1 -1
  75. package/components/qds-table-row.js +3 -3
  76. package/components/qds-table-row.js.map +1 -1
  77. package/components/qds-table.js +3 -3
  78. package/components/qds-table.js.map +1 -1
  79. package/components/qds-tag.js +1 -1
  80. package/components/qds-textarea.js +94 -39
  81. package/components/qds-textarea.js.map +1 -1
  82. package/components/qds-title.js +1 -1
  83. package/components/qds-tooltip.js +1 -1
  84. package/dist/cjs/helpers-cdd65bd0.js.map +1 -1
  85. package/dist/cjs/{index-a9985af0.js → index-644fe556.js} +720 -273
  86. package/dist/cjs/index-644fe556.js.map +1 -0
  87. package/dist/cjs/index.cjs.js +2 -2
  88. package/dist/cjs/{library-57845012.js → library-1fda56bc.js} +2 -2
  89. package/dist/cjs/{library-57845012.js.map → library-1fda56bc.js.map} +1 -1
  90. package/dist/cjs/loader.cjs.js +2 -2
  91. package/dist/cjs/qds-badge-counter_2.cjs.entry.js +151 -0
  92. package/dist/cjs/qds-badge-counter_2.cjs.entry.js.map +1 -0
  93. package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +53 -12
  94. package/dist/cjs/qds-breadcrumb-item.cjs.entry.js.map +1 -1
  95. package/dist/cjs/qds-button.cjs.entry.js +73 -38
  96. package/dist/cjs/qds-button.cjs.entry.js.map +1 -1
  97. package/dist/cjs/qds-checkbox.cjs.entry.js +67 -22
  98. package/dist/cjs/qds-checkbox.cjs.entry.js.map +1 -1
  99. package/dist/cjs/qds-chip.cjs.entry.js +43 -21
  100. package/dist/cjs/qds-chip.cjs.entry.js.map +1 -1
  101. package/dist/cjs/qds-dialog.cjs.entry.js +8 -3
  102. package/dist/cjs/qds-dialog.cjs.entry.js.map +1 -1
  103. package/dist/cjs/qds-divider.cjs.entry.js +9 -3
  104. package/dist/cjs/qds-divider.cjs.entry.js.map +1 -1
  105. package/dist/cjs/qds-dropdown.cjs.entry.js +24 -17
  106. package/dist/cjs/qds-dropdown.cjs.entry.js.map +1 -1
  107. package/dist/cjs/qds-form-message.cjs.entry.js +16 -6
  108. package/dist/cjs/qds-form-message.cjs.entry.js.map +1 -1
  109. package/dist/cjs/qds-icon.cjs.entry.js +7 -5
  110. package/dist/cjs/qds-icon.cjs.entry.js.map +1 -1
  111. package/dist/cjs/qds-inline-link.cjs.entry.js +16 -15
  112. package/dist/cjs/qds-inline-link.cjs.entry.js.map +1 -1
  113. package/dist/cjs/qds-input.cjs.entry.js +110 -43
  114. package/dist/cjs/qds-input.cjs.entry.js.map +1 -1
  115. package/dist/cjs/qds-label.cjs.entry.js +16 -5
  116. package/dist/cjs/qds-label.cjs.entry.js.map +1 -1
  117. package/dist/cjs/qds-list-item.cjs.entry.js +17 -18
  118. package/dist/cjs/qds-list-item.cjs.entry.js.map +1 -1
  119. package/dist/cjs/qds-loader.cjs.entry.js +4 -2
  120. package/dist/cjs/qds-loader.cjs.entry.js.map +1 -1
  121. package/dist/cjs/qds-nav-list-item.cjs.entry.js +29 -13
  122. package/dist/cjs/qds-nav-list-item.cjs.entry.js.map +1 -1
  123. package/dist/cjs/qds-progress-bar.cjs.entry.js +25 -7
  124. package/dist/cjs/qds-progress-bar.cjs.entry.js.map +1 -1
  125. package/dist/cjs/qds-radio.cjs.entry.js +22 -21
  126. package/dist/cjs/qds-radio.cjs.entry.js.map +1 -1
  127. package/dist/cjs/qds-select.cjs.entry.js +116 -26
  128. package/dist/cjs/qds-select.cjs.entry.js.map +1 -1
  129. package/dist/cjs/qds-standalone-link.cjs.entry.js +24 -17
  130. package/dist/cjs/qds-standalone-link.cjs.entry.js.map +1 -1
  131. package/dist/cjs/qds-switch.cjs.entry.js +68 -18
  132. package/dist/cjs/qds-switch.cjs.entry.js.map +1 -1
  133. package/dist/cjs/qds-tab.cjs.entry.js +64 -38
  134. package/dist/cjs/qds-tab.cjs.entry.js.map +1 -1
  135. package/dist/cjs/qds-tabbar.cjs.entry.js +27 -20
  136. package/dist/cjs/qds-tabbar.cjs.entry.js.map +1 -1
  137. package/dist/cjs/qds-table-body.cjs.entry.js +2 -2
  138. package/dist/cjs/qds-table-body.cjs.entry.js.map +1 -1
  139. package/dist/cjs/qds-table-cell.cjs.entry.js +2 -4
  140. package/dist/cjs/qds-table-cell.cjs.entry.js.map +1 -1
  141. package/dist/cjs/qds-table-head-cell.cjs.entry.js +2 -6
  142. package/dist/cjs/qds-table-head-cell.cjs.entry.js.map +1 -1
  143. package/dist/cjs/qds-table-head.cjs.entry.js +2 -2
  144. package/dist/cjs/qds-table-head.cjs.entry.js.map +1 -1
  145. package/dist/cjs/qds-table-row.cjs.entry.js +2 -2
  146. package/dist/cjs/qds-table-row.cjs.entry.js.map +1 -1
  147. package/dist/cjs/qds-table.cjs.entry.js +2 -2
  148. package/dist/cjs/qds-table.cjs.entry.js.map +1 -1
  149. package/dist/cjs/qds-tag_2.cjs.entry.js +30 -16
  150. package/dist/cjs/qds-tag_2.cjs.entry.js.map +1 -1
  151. package/dist/cjs/qds-textarea.cjs.entry.js +92 -33
  152. package/dist/cjs/qds-textarea.cjs.entry.js.map +1 -1
  153. package/dist/cjs/{qds-badge-counter_3.cjs.entry.js → qds-tooltip.cjs.entry.js} +40 -152
  154. package/dist/cjs/qds-tooltip.cjs.entry.js.map +1 -0
  155. package/dist/cjs/qds.cjs.js +3 -3
  156. package/dist/cjs/qds.cjs.js.map +1 -1
  157. package/dist/custom-elements.json +103 -229
  158. package/dist/docs.d.ts +8 -0
  159. package/dist/docs.json +870 -630
  160. package/dist/esm/{helpers-4eb4fa44.js → helpers-d08540f8.js} +2 -2
  161. package/dist/esm/helpers-d08540f8.js.map +1 -0
  162. package/dist/esm/{index-5291e8ff.js → index-be1284b6.js} +720 -273
  163. package/dist/esm/index-be1284b6.js.map +1 -0
  164. package/dist/esm/index.js +2 -2
  165. package/dist/esm/{library-9edbe354.js → library-a92b7d9e.js} +2 -2
  166. package/dist/esm/{library-9edbe354.js.map → library-a92b7d9e.js.map} +1 -1
  167. package/dist/esm/loader.js +3 -3
  168. package/dist/esm/qds-badge-counter_2.entry.js +146 -0
  169. package/dist/esm/qds-badge-counter_2.entry.js.map +1 -0
  170. package/dist/esm/qds-breadcrumb-item.entry.js +54 -13
  171. package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
  172. package/dist/esm/qds-button.entry.js +74 -39
  173. package/dist/esm/qds-button.entry.js.map +1 -1
  174. package/dist/esm/qds-checkbox.entry.js +69 -24
  175. package/dist/esm/qds-checkbox.entry.js.map +1 -1
  176. package/dist/esm/qds-chip.entry.js +44 -22
  177. package/dist/esm/qds-chip.entry.js.map +1 -1
  178. package/dist/esm/qds-dialog.entry.js +9 -4
  179. package/dist/esm/qds-dialog.entry.js.map +1 -1
  180. package/dist/esm/qds-divider.entry.js +10 -4
  181. package/dist/esm/qds-divider.entry.js.map +1 -1
  182. package/dist/esm/qds-dropdown.entry.js +25 -18
  183. package/dist/esm/qds-dropdown.entry.js.map +1 -1
  184. package/dist/esm/qds-form-message.entry.js +17 -7
  185. package/dist/esm/qds-form-message.entry.js.map +1 -1
  186. package/dist/esm/qds-icon.entry.js +8 -6
  187. package/dist/esm/qds-icon.entry.js.map +1 -1
  188. package/dist/esm/qds-inline-link.entry.js +17 -16
  189. package/dist/esm/qds-inline-link.entry.js.map +1 -1
  190. package/dist/esm/qds-input.entry.js +112 -45
  191. package/dist/esm/qds-input.entry.js.map +1 -1
  192. package/dist/esm/qds-label.entry.js +17 -6
  193. package/dist/esm/qds-label.entry.js.map +1 -1
  194. package/dist/esm/qds-list-item.entry.js +18 -19
  195. package/dist/esm/qds-list-item.entry.js.map +1 -1
  196. package/dist/esm/qds-loader.entry.js +4 -2
  197. package/dist/esm/qds-loader.entry.js.map +1 -1
  198. package/dist/esm/qds-nav-list-item.entry.js +30 -14
  199. package/dist/esm/qds-nav-list-item.entry.js.map +1 -1
  200. package/dist/esm/qds-progress-bar.entry.js +25 -7
  201. package/dist/esm/qds-progress-bar.entry.js.map +1 -1
  202. package/dist/esm/qds-radio.entry.js +23 -22
  203. package/dist/esm/qds-radio.entry.js.map +1 -1
  204. package/dist/esm/qds-select.entry.js +118 -28
  205. package/dist/esm/qds-select.entry.js.map +1 -1
  206. package/dist/esm/qds-standalone-link.entry.js +25 -18
  207. package/dist/esm/qds-standalone-link.entry.js.map +1 -1
  208. package/dist/esm/qds-switch.entry.js +70 -20
  209. package/dist/esm/qds-switch.entry.js.map +1 -1
  210. package/dist/esm/qds-tab.entry.js +65 -39
  211. package/dist/esm/qds-tab.entry.js.map +1 -1
  212. package/dist/esm/qds-tabbar.entry.js +28 -21
  213. package/dist/esm/qds-tabbar.entry.js.map +1 -1
  214. package/dist/esm/qds-table-body.entry.js +3 -3
  215. package/dist/esm/qds-table-body.entry.js.map +1 -1
  216. package/dist/esm/qds-table-cell.entry.js +3 -5
  217. package/dist/esm/qds-table-cell.entry.js.map +1 -1
  218. package/dist/esm/qds-table-head-cell.entry.js +3 -7
  219. package/dist/esm/qds-table-head-cell.entry.js.map +1 -1
  220. package/dist/esm/qds-table-head.entry.js +3 -3
  221. package/dist/esm/qds-table-head.entry.js.map +1 -1
  222. package/dist/esm/qds-table-row.entry.js +3 -3
  223. package/dist/esm/qds-table-row.entry.js.map +1 -1
  224. package/dist/esm/qds-table.entry.js +3 -3
  225. package/dist/esm/qds-table.entry.js.map +1 -1
  226. package/dist/esm/qds-tag_2.entry.js +31 -17
  227. package/dist/esm/qds-tag_2.entry.js.map +1 -1
  228. package/dist/esm/qds-textarea.entry.js +94 -35
  229. package/dist/esm/qds-textarea.entry.js.map +1 -1
  230. package/dist/esm/{qds-badge-counter_3.entry.js → qds-tooltip.entry.js} +42 -152
  231. package/dist/esm/qds-tooltip.entry.js.map +1 -0
  232. package/dist/esm/qds.js +4 -4
  233. package/dist/esm/qds.js.map +1 -1
  234. package/dist/types/components/breadcrumb-item/breadcrumb-item.d.ts +4 -0
  235. package/dist/types/components/checkbox/checkbox.d.ts +0 -6
  236. package/dist/types/components/chip/chip.d.ts +0 -6
  237. package/dist/types/components/input/input.d.ts +1 -30
  238. package/dist/types/components/select/select.d.ts +1 -8
  239. package/dist/types/components/switch/switch.d.ts +0 -6
  240. package/dist/types/components/tag/tag.d.ts +1 -1
  241. package/dist/types/components/textarea/textarea.d.ts +1 -29
  242. package/dist/types/components.d.ts +623 -91
  243. package/dist/types/stencil-public-runtime.d.ts +6 -0
  244. package/dist/vscode.html-custom-data.json +0 -80
  245. package/hydrate/index.d.ts +28 -5
  246. package/hydrate/index.js +2753 -1052
  247. package/hydrate/index.mjs +2753 -1052
  248. package/package.json +3 -3
  249. package/components/p-028b9d2e.js.map +0 -1
  250. package/components/p-355efdb1.js.map +0 -1
  251. package/components/p-4141d6ed.js.map +0 -1
  252. package/components/p-698edde1.js.map +0 -1
  253. package/components/p-7b04d43e.js.map +0 -1
  254. package/components/p-7f6e797a.js.map +0 -1
  255. package/components/p-82461767.js.map +0 -1
  256. package/components/p-b82bac0a.js.map +0 -1
  257. package/components/p-d279ae53.js.map +0 -1
  258. package/components/p-f5ba28ff.js.map +0 -1
  259. package/components/p-f85b490c.js.map +0 -1
  260. package/dist/cjs/index-a9985af0.js.map +0 -1
  261. package/dist/cjs/qds-badge-counter_3.cjs.entry.js.map +0 -1
  262. package/dist/esm/helpers-4eb4fa44.js.map +0 -1
  263. package/dist/esm/index-5291e8ff.js.map +0 -1
  264. package/dist/esm/qds-badge-counter_3.entry.js.map +0 -1
@@ -3,13 +3,13 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { p as proxyCustomElement, H, c as createEvent, h } from './p-7b04d43e.js';
7
- import { p as pickFocusEventAttributes, i as inheritAriaAttributes } from './p-4141d6ed.js';
8
- import { C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS, V as VALID_STATE } from './p-d107c90c.js';
9
- import { d as defineCustomElement$2 } from './p-82461767.js';
10
- import { d as defineCustomElement$1 } from './p-9df62f97.js';
6
+ import { p as proxyCustomElement, H, c as createEvent, h } from './p-002e77af.js';
7
+ import { p as pickFocusEventAttributes, i as inheritAriaAttributes } from './p-efdb8fa2.js';
8
+ import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './p-d107c90c.js';
9
+ import { d as defineCustomElement$2 } from './p-9a9561a8.js';
10
+ import { d as defineCustomElement$1 } from './p-065d722e.js';
11
11
 
12
- const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-box,.qds-checkbox,.qds-icon{grid-area:b;place-self:center}.qds-box,.qds-icon{display:none;pointer-events:none}.qds-box{border-radius:var(--qds-control-toggle-indicator-border-radius)}.qds-container{align-self:flex-start;display:grid;grid-template-areas:\"b\"}.qds-icon{color:var(--qds-theme-signature-color-contrast)}.qds-label{cursor:pointer;display:inline-flex}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-control-input-background);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-checkbox:active~.qds-box,.qds-checkbox:hover~.qds-box{display:block}.qds-checkbox:hover~.qds-box{background-color:var(--qds-theme-signature-color-hover)}.qds-checkbox:active~.qds-box{background-color:var(--qds-theme-signature-color-pressed)}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-signature-color-default);border-color:#0000}.qds-checkbox:checked:hover,.qds-checkbox:indeterminate:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-checkbox:checked:active,.qds-checkbox:indeterminate:active{background-color:var(--qds-theme-signature-color-pressed)}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-checkbox[data-size=small]{height:var(--qds-control-toggle-box-small-size);width:var(--qds-control-toggle-box-small-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}.qds-box[data-size=small]{height:var(--qds-control-toggle-indicator-small-size);width:var(--qds-control-toggle-indicator-small-size)}.qds-inline[data-size=small]{margin-block:var(--qds-control-small-padding-auto-height)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related)}.qds-checkbox[data-size=standard]{height:var(--qds-control-toggle-box-standard-size);width:var(--qds-control-toggle-box-standard-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}.qds-box[data-size=standard]{height:var(--qds-control-toggle-indicator-standard-size);width:var(--qds-control-toggle-indicator-standard-size)}.qds-inline[data-size=standard]{margin-block:var(--qds-control-standard-padding-auto-height)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related)}.qds-checkbox[data-size=large]{height:var(--qds-control-toggle-box-large-size);width:var(--qds-control-toggle-box-large-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}.qds-box[data-size=large]{height:var(--qds-control-toggle-indicator-large-size);width:var(--qds-control-toggle-indicator-large-size)}.qds-inline[data-size=large]{margin-block:var(--qds-control-large-padding-auto-height)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related)}";
12
+ const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-box,.qds-checkbox,.qds-icon{grid-area:a;place-self:center}.qds-box,.qds-icon{display:none;pointer-events:none}.qds-box{border-radius:var(--qds-control-toggle-indicator-border-radius)}.qds-container{align-self:flex-start;display:grid;grid-template-areas:\"a\"}.qds-icon{color:var(--qds-theme-signature-color-contrast)}.qds-label{cursor:pointer;display:inline-flex}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-control-input-background);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-border-radius);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:var(--qds-focus-border-offset)}.qds-checkbox:active~.qds-box,.qds-checkbox:hover~.qds-box{display:block}.qds-checkbox:hover~.qds-box{background-color:var(--qds-theme-signature-color-hover)}.qds-checkbox:active~.qds-box{background-color:var(--qds-theme-signature-color-pressed)}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-signature-color-default);border-color:#0000}.qds-checkbox:checked:hover,.qds-checkbox:indeterminate:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-checkbox:checked:active,.qds-checkbox:indeterminate:active{background-color:var(--qds-theme-signature-color-pressed)}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-checkbox[data-size=small]{height:var(--qds-control-toggle-box-small-size);width:var(--qds-control-toggle-box-small-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}.qds-box[data-size=small]{height:var(--qds-control-toggle-indicator-small-size);width:var(--qds-control-toggle-indicator-small-size)}.qds-inline[data-size=small]{margin-block:var(--qds-control-small-padding-auto-height)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related)}.qds-checkbox[data-size=standard]{height:var(--qds-control-toggle-box-standard-size);width:var(--qds-control-toggle-box-standard-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}.qds-box[data-size=standard]{height:var(--qds-control-toggle-indicator-standard-size);width:var(--qds-control-toggle-indicator-standard-size)}.qds-inline[data-size=standard]{margin-block:var(--qds-control-standard-padding-auto-height)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related)}.qds-checkbox[data-size=large]{height:var(--qds-control-toggle-box-large-size);width:var(--qds-control-toggle-box-large-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}.qds-box[data-size=large]{height:var(--qds-control-toggle-indicator-large-size);width:var(--qds-control-toggle-indicator-large-size)}.qds-inline[data-size=large]{margin-block:var(--qds-control-large-padding-auto-height)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related)}";
13
13
  const QdsCheckboxStyle0 = checkboxCss;
14
14
 
15
15
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
@@ -42,6 +42,66 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
42
42
  this.focusEmitter = createEvent(this, "qdsFocus", 2);
43
43
  this.internals = this.attachInternals();
44
44
  _Checkbox_instances.add(this);
45
+ /**
46
+ * Adds vertical margin to the checkbox for alignment.
47
+ *
48
+ * This is useful when creating inline layouts so that the first lines have
49
+ * the correct vertical centering.
50
+ */
51
+ this.inline = false;
52
+ /**
53
+ * The checkbox's size.
54
+ */
55
+ this.size = 'standard';
56
+ /**
57
+ * The [`<form>`][] element to associate the checkbox with (its form owner).
58
+ *
59
+ * The value of this attribute must be the id of a `<form>` in the same
60
+ * document. If this attribute is not set, the `<qds-checkbox>` is associated
61
+ * with its ancestor `<form>` element, if any.
62
+ *
63
+ * This attribute lets you associate `<qds-checkbox>` elements to `<form>`s
64
+ * anywhere in the document, not just inside a `<form>`. It can also override
65
+ * an ancestor `<form>` element.
66
+ *
67
+ * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form
68
+ *
69
+ * @readonly
70
+ * @webnative
71
+ */
72
+ // eslint-disable-next-line unicorn/no-null
73
+ this.form = null;
74
+ /**
75
+ * The error message that would be shown to the user if the `<qds-checkbox>`
76
+ * was to be checked for validity.
77
+ *
78
+ * @readonly
79
+ * @webnative
80
+ */
81
+ this.validationMessage = '';
82
+ /**
83
+ * The [`ValidityState`][] object for this `<qds-checkbox>`.
84
+ *
85
+ * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState
86
+ *
87
+ * @readonly
88
+ * @webnative
89
+ */
90
+ this.validity = VALID_STATE;
91
+ /**
92
+ * The value of the checkbox, submitted as a name/value pair with form data.
93
+ *
94
+ * @webnative
95
+ */
96
+ this.value = 'on';
97
+ /**
98
+ * True if `<qds-checkbox>` will be validated when the form is submitted;
99
+ * false otherwise.
100
+ *
101
+ * @readonly
102
+ * @webnative
103
+ */
104
+ this.willValidate = false;
45
105
  _Checkbox_inheritedAttributes.set(this, {});
46
106
  this.checkValidity = () => this.internals.checkValidity();
47
107
  this.reportValidity = () => this.internals.reportValidity();
@@ -57,21 +117,6 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
57
117
  _Checkbox_onFocus.set(this, (event) => {
58
118
  this.focusEmitter.emit(pickFocusEventAttributes(event));
59
119
  });
60
- this.inline = false;
61
- this.size = 'standard';
62
- this.text = undefined;
63
- this.autoFocus = undefined;
64
- this.checked = undefined;
65
- this.disabled = undefined;
66
- this.form = null;
67
- this.indeterminate = undefined;
68
- this.name = undefined;
69
- this.required = undefined;
70
- this.validationMessage = '';
71
- this.validity = VALID_STATE;
72
- this.value = 'on';
73
- this.willValidate = false;
74
- this.tabIndex = undefined;
75
120
  }
76
121
  onClick(event) {
77
122
  if (__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get)) {
@@ -117,18 +162,18 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
117
162
  render() {
118
163
  return (
119
164
  // eslint-disable-next-line jsx-a11y/label-has-associated-control
120
- h("label", { key: '54d43435266eb85193dc6d298b64c51315af2f0c', "aria-disabled": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? 'true' : undefined, class: {
165
+ h("label", { key: '15ceed36f1cab0a68c0a156ef3324943658bd6c0', "aria-disabled": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? 'true' : undefined, class: {
121
166
  'qds-inline': this.inline,
122
167
  'qds-label': true,
123
- }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }, h("div", { key: 'fbf3187e7a68634fdedaba2934b9f247f07dba91', class: "qds-container" }, h("input", { key: 'b30840dabf81571f715fec823f1249cf4c42a7f9',
168
+ }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }, h("div", { key: 'f08682656e01bba90296e992e60e10d2b6a5d6a9', class: "qds-container" }, h("input", { key: '505e5c9fa829f82c7d4cd3a6d9fd9ef32b7c2706',
124
169
  // eslint-disable-next-line jsx-a11y/no-autofocus
125
- autoFocus: this.autoFocus, checked: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get) ? false : this.checked, class: "qds-checkbox", "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), disabled: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get), indeterminate: this.indeterminate, onBlur: __classPrivateFieldGet(this, _Checkbox_onBlur, "f"), onFocus: __classPrivateFieldGet(this, _Checkbox_onFocus, "f"), required: this.required, tabIndex: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? undefined : this.tabIndex, type: "checkbox", ...__classPrivateFieldGet(this, _Checkbox_inheritedAttributes, "f") }), h("qds-icon", { key: '25f8273080511d22f6e535419531948b1d1636e7', "aria-hidden": "true", class: {
170
+ autoFocus: this.host.autofocus, checked: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedIndeterminate_get) ? false : this.checked, class: "qds-checkbox", "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), disabled: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get), indeterminate: this.indeterminate, onBlur: __classPrivateFieldGet(this, _Checkbox_onBlur, "f"), onFocus: __classPrivateFieldGet(this, _Checkbox_onFocus, "f"), required: this.required, tabIndex: __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? undefined : this.tabIndex, type: "checkbox", ...__classPrivateFieldGet(this, _Checkbox_inheritedAttributes, "f") }), h("qds-icon", { key: 'f6b89a9aa715138e08867252d899da135a2be4d1', "aria-hidden": "true", class: {
126
171
  'qds-icon': true,
127
172
  'qds-checked': true,
128
- }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "checked" }), h("div", { key: 'e5f55eb35247780a8c0eaeff2f1e5c78623cd8c1', class: "qds-box", "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }), h("qds-icon", { key: '662fc37400a5d118e4bdf047e7a0e7a0029ebef2', "aria-hidden": "true", class: {
173
+ }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "checked" }), h("div", { key: 'ea3bf1f7c463e0503072df69504b3d36400964c2', class: "qds-box", "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }), h("qds-icon", { key: '4ec05ce461af2c4e1d17a2536aa392c6c99c5996', "aria-hidden": "true", class: {
129
174
  'qds-icon': true,
130
175
  'qds-indeterminate': true,
131
- }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "indeterminate" })), __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_hasText_get) && (h("qds-label", { key: '97ae1511d052b5c27b6192314b5379d2238be082', required: this.required, size: this.size, text: this.text }))));
176
+ }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "indeterminate" })), __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_hasText_get) && (h("qds-label", { key: 'b147b3d0e47395032217b52763adef01ed70e144', required: this.required, size: this.size, text: this.text }))));
132
177
  }
133
178
  static get delegatesFocus() { return true; }
134
179
  static get formAssociated() { return true; }
@@ -144,7 +189,6 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
144
189
  "inline": [4],
145
190
  "size": [1],
146
191
  "text": [1],
147
- "autoFocus": [4, "autofocus"],
148
192
  "checked": [1028],
149
193
  "disabled": [4],
150
194
  "form": [1],
@@ -214,4 +258,4 @@ function defineCustomElement() {
214
258
 
215
259
  export { Checkbox as C, defineCustomElement as d };
216
260
 
217
- //# sourceMappingURL=p-f85b490c.js.map
261
+ //# sourceMappingURL=p-ed500f42.js.map
@@ -0,0 +1 @@
1
+ {"file":"p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AAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE,KAAK,IAAI,CAAC,QAAQ,KAAK,IAAI,EACxE;AACH,CAAC,2DA8Ia,CAAc,EAAE,GAAkB;IAC9C,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;AAChE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/checkbox/checkbox.css?tag=qds-checkbox&encapsulation=shadow","src/components/checkbox/checkbox.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-checkbox,\n.qds-box,\n.qds-icon {\n grid-area: checkbox;\n place-self: center;\n}\n\n.qds-icon,\n.qds-box {\n display: none;\n pointer-events: none;\n}\n\n.qds-box {\n border-radius: var(--qds-control-toggle-indicator-border-radius);\n}\n\n.qds-container {\n display: grid;\n align-self: flex-start;\n grid-template-areas: 'checkbox';\n}\n\n.qds-icon {\n color: var(--qds-theme-signature-color-contrast);\n}\n\n.qds-label {\n cursor: pointer;\n display: inline-flex;\n}\n\n.qds-checkbox {\n appearance: none;\n background-color: var(--qds-theme-control-input-background);\n border-radius: var(--qds-control-border-radius);\n border: var(--qds-control-border-width) solid var(--qds-theme-control-border);\n cursor: pointer;\n margin: 0;\n print-color-adjust: exact;\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 &:hover ~ .qds-box,\n &:active ~ .qds-box {\n display: block;\n }\n\n &:hover ~ .qds-box {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active ~ .qds-box {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n\n &:checked ~ .qds-checked,\n &:indeterminate ~ .qds-indeterminate {\n display: block;\n }\n\n &:checked,\n &:indeterminate {\n background-color: var(--qds-theme-signature-color-default);\n border-color: transparent;\n\n &:hover {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n }\n}\n\n[aria-disabled='true'] {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-size='small'] {\n &.qds-checkbox {\n width: var(--qds-control-toggle-box-small-size);\n height: var(--qds-control-toggle-box-small-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-small-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-indicator-small-size);\n height: var(--qds-control-toggle-indicator-small-size);\n }\n\n &.qds-inline {\n margin-block: var(--qds-control-small-padding-auto-height);\n }\n\n &.qds-label {\n gap: var(--qds-control-small-gap-siblings-related);\n }\n}\n\n[data-size='standard'] {\n &.qds-checkbox {\n width: var(--qds-control-toggle-box-standard-size);\n height: var(--qds-control-toggle-box-standard-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-standard-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-indicator-standard-size);\n height: var(--qds-control-toggle-indicator-standard-size);\n }\n\n &.qds-inline {\n margin-block: var(--qds-control-standard-padding-auto-height);\n }\n\n &.qds-label {\n gap: var(--qds-control-standard-gap-siblings-related);\n }\n}\n\n[data-size='large'] {\n &.qds-checkbox {\n width: var(--qds-control-toggle-box-large-size);\n height: var(--qds-control-toggle-box-large-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-large-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-indicator-large-size);\n height: var(--qds-control-toggle-indicator-large-size);\n }\n\n &.qds-inline {\n margin-block: var(--qds-control-large-padding-auto-height);\n }\n\n &.qds-label {\n gap: var(--qds-control-large-gap-siblings-related);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { Attributes, QdsFocusEventDetail } from '../../helpers'\nimport { inheritAriaAttributes, pickFocusEventAttributes } from '../../helpers'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Size } from '../shared'\n\nexport type CheckboxValue = number | string | null\n\n/**\n * `<qds-checkbox>` elements are rendered as boxes that are checked (ticked)\n * when activated, like you might see in an official government paper form. A\n * checkbox allows you to select single values for submission in a form (or not).\n *\n * @see https://quartz.se.com/build/components/checkbox\n */\n@Component({\n tag: 'qds-checkbox',\n formAssociated: true,\n shadow: { delegatesFocus: true },\n styleUrl: 'checkbox.css',\n})\nexport class Checkbox implements ComponentInterface {\n /**\n * Adds vertical margin to the checkbox 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 checkbox's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The checkbox's text.\n */\n @Prop() public readonly text?: string\n\n /**\n * Sets the checkbox's state.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public checked?: boolean\n\n /**\n * Prevents the checkbox from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop() public readonly disabled?: boolean\n\n /**\n * The [`<form>`][] element to associate the checkbox with (its form owner).\n *\n * The value of this attribute must be the id of a `<form>` in the same\n * document. If this attribute is not set, the `<qds-checkbox>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-checkbox>` elements to `<form>`s\n * anywhere in the document, not just inside a `<form>`. It can also override\n * an ancestor `<form>` element.\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n *\n * @readonly\n * @webnative\n */\n // eslint-disable-next-line unicorn/no-null\n @Prop() public readonly form: ElementInternals['form'] | string = null\n\n /**\n * Sets the checkbox to an indeterminate state. This is usually applied to\n * checkboxes that represent a \"select all/none\" behavior when associated\n * checkboxes have a mix of checked and unchecked states.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public indeterminate?: boolean\n\n /**\n * The name of the checkbox, which is submitted with the form data.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * A value must be specified for the checkbox before the owning form can be\n * submitted.\n *\n * See\n * [Client-side validation](https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation)\n * and the\n * [HTML attribute: `required`](https://developer.mozilla.org/docs/Web/HTML/Attributes/required)\n * for more information.\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The error message that would be shown to the user if the `<qds-checkbox>`\n * was to be checked for validity.\n *\n * @readonly\n * @webnative\n */\n @Prop()\n public readonly validationMessage: ElementInternals['validationMessage'] = ''\n\n /**\n * The [`ValidityState`][] object for this `<qds-checkbox>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * The value of the checkbox, submitted as a name/value pair with form data.\n *\n * @webnative\n */\n @Prop() public readonly value?: CheckboxValue = 'on'\n\n /**\n * True if `<qds-checkbox>` will be validated when the form is submitted;\n * false otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when a change to the checkbox's state is committed by the user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the checkbox gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private tabIndex?: number\n\n #inheritedAttributes: Attributes = {}\n\n get #computedChecked(): boolean {\n return this.checked ?? false\n }\n\n get #computedDisabled(): boolean {\n return (\n (this.host.matches(':disabled') || (this.disabled ?? false)) &&\n this.host.getAttribute('disabled') !== 'false'\n )\n }\n\n get #computedIndeterminate(): boolean {\n return this.indeterminate ?? false\n }\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 #computedValue(): string | null {\n // eslint-disable-next-line unicorn/no-null\n return this.value == null ? null : this.value.toString()\n }\n\n get #hasText(): boolean {\n return (\n (this.text !== undefined && this.text !== '') || this.required === true\n )\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) {\n event.stopImmediatePropagation()\n return\n }\n\n event.preventDefault()\n\n this.checked = this.#computedIndeterminate ? true : !this.#computedChecked\n this.changeEmitter.emit()\n this.indeterminate = false\n }\n\n @Watch('checked')\n protected checkedChanged(): void {\n this.internals.setFormValue(\n this.#computedChecked && !this.#computedDisabled\n ? this.#computedValue\n : // eslint-disable-next-line unicorn/no-null\n null,\n )\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n if (this.#computedChecked && !this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\n // eslint-disable-next-line unicorn/no-null\n else this.internals.setFormValue(null)\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n @Watch('value')\n protected valueChanged(): void {\n if (this.#computedChecked && !this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\n }\n\n public componentWillLoad(): void {\n this.valueChanged()\n\n this.#defineGetter('form', () => this.internals.form)\n this.#defineGetter('willValidate', () => this.internals.willValidate)\n this.#defineGetter('validity', () => this.internals.validity)\n this.#defineGetter(\n 'validationMessage',\n () => this.internals.validationMessage,\n )\n\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public render() {\n return (\n // eslint-disable-next-line jsx-a11y/label-has-associated-control\n <label\n aria-disabled={this.#computedDisabled ? 'true' : undefined}\n class={{\n 'qds-inline': this.inline,\n 'qds-label': true,\n }}\n data-size={this.#computedSize}\n >\n <div class=\"qds-container\">\n <input\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.host.autofocus}\n checked={this.#computedIndeterminate ? false : this.checked}\n class=\"qds-checkbox\"\n data-size={this.#computedSize}\n disabled={this.#computedDisabled}\n indeterminate={this.indeterminate}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n required={this.required}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n type=\"checkbox\"\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n <qds-icon\n aria-hidden=\"true\"\n class={{\n 'qds-icon': true,\n 'qds-checked': true,\n }}\n data-size={this.#computedSize}\n library=\"core\"\n name=\"checked\"\n />\n <div class=\"qds-box\" data-size={this.#computedSize} />\n <qds-icon\n aria-hidden=\"true\"\n class={{\n 'qds-icon': true,\n 'qds-indeterminate': true,\n }}\n data-size={this.#computedSize}\n library=\"core\"\n name=\"indeterminate\"\n />\n </div>\n {this.#hasText && (\n <qds-label\n required={this.required}\n size={this.size}\n text={this.text}\n />\n )}\n </label>\n )\n }\n\n public checkValidity: ElementInternals['checkValidity'] = () =>\n this.internals.checkValidity()\n\n public reportValidity: ElementInternals['reportValidity'] = () =>\n this.internals.reportValidity()\n\n public setCustomValidity: HTMLInputElement['setCustomValidity'] = (error) => {\n if (error) this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.host)\n else this.internals.setValidity(NO_ERROR_FLAGS)\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 #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { p as proxyCustomElement, H, h } from './p-7b04d43e.js';
7
- import { i as inheritAriaAttributes } from './p-4141d6ed.js';
6
+ import { p as proxyCustomElement, H, h } from './p-002e77af.js';
7
+ import { i as inheritAriaAttributes } from './p-efdb8fa2.js';
8
8
 
9
9
  const dividerCss = ":host([hidden]){display:none!important}:host{display:block}.qds-divider{border:none;height:var(--qds-control-border-width);margin:0;width:100%}.qds-vertical{height:100%;width:var(--qds-control-border-width)}[data-importance=standard]{background-color:var(--qds-theme-divider-standard)}[data-importance=emphasized]{background-color:var(--qds-theme-divider-emphasized)}";
10
10
  const QdsDividerStyle0 = dividerCss;
@@ -35,15 +35,21 @@ const Divider = /*@__PURE__*/ proxyCustomElement(class Divider extends H {
35
35
  this.__registerHost();
36
36
  this.__attachShadow();
37
37
  _Divider_instances.add(this);
38
- _Divider_inheritedAttributes.set(this, {});
38
+ /**
39
+ * The divider's importance.
40
+ */
39
41
  this.importance = 'standard';
42
+ /**
43
+ * Display the divider in vertical orientation.
44
+ */
40
45
  this.vertical = false;
46
+ _Divider_inheritedAttributes.set(this, {});
41
47
  }
42
48
  componentWillLoad() {
43
49
  __classPrivateFieldSet(this, _Divider_inheritedAttributes, inheritAriaAttributes(this.host), "f");
44
50
  }
45
51
  render() {
46
- return (h("hr", { key: '0938dbe1161907192145b4eae41a35edac555da8', class: {
52
+ return (h("hr", { key: 'be7c201f7bd758be4b9a66f3ed2665633805a412', class: {
47
53
  'qds-divider': true,
48
54
  'qds-vertical': this.vertical,
49
55
  }, "aria-hidden": "true", "data-importance": __classPrivateFieldGet(this, _Divider_instances, "a", _Divider_computedImportance_get), ...__classPrivateFieldGet(this, _Divider_inheritedAttributes, "f") }));
@@ -80,4 +86,4 @@ function defineCustomElement() {
80
86
 
81
87
  export { Divider as D, defineCustomElement as d };
82
88
 
83
- //# sourceMappingURL=p-355efdb1.js.map
89
+ //# sourceMappingURL=p-ee2621aa.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-ee2621aa.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,iXAAiX,CAAC;AACrY,yBAAe,UAAU;;ACDzB;AACA;AACA;;;;;;;;;;;;;;;;;;MAuBa,OAAO;IALpB;;;;;;;;QAS0B,eAAU,GAChC,UAAU,CAAA;;;;QAKY,aAAQ,GAAY,KAAK,CAAA;QAIjD,uCAAmC,EAAE,EAAA;KA+BtC;IAlBQ,iBAAiB;QACtB,uBAAA,IAAI,gCAAwB,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAA;KAC7D;IAEM,MAAM;QACX,QACE,2DACE,KAAK,EAAE;gBACL,aAAa,EAAE,IAAI;gBACnB,cAAc,EAAE,IAAI,CAAC,QAAQ;aAC9B,iBACW,MAAM,qBACD,uBAAA,IAAI,2DAAoB,KAErC,uBAAA,IAAI,oCAAqB,GAC7B,EACH;KACF;;;;;;;;IA3BC,QAAQ,IAAI,CAAC,UAAU;QACrB,KAAK,YAAY,EAAE;YACjB,OAAO,IAAI,CAAC,UAAU,CAAA;SACvB;QACD,SAAS;YACP,OAAO,UAAU,CAAA;SAClB;KACF;AACH,CAAC;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/divider/divider.css?tag=qds-divider&encapsulation=shadow","src/components/divider/divider.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: block;\n}\n\n.qds-divider {\n border: none;\n height: var(--qds-control-border-width);\n margin: 0;\n width: 100%;\n}\n\n.qds-vertical {\n height: 100%;\n width: var(--qds-control-border-width);\n}\n\n[data-importance='standard'] {\n background-color: var(--qds-theme-divider-standard);\n}\n\n[data-importance='emphasized'] {\n background-color: var(--qds-theme-divider-emphasized);\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 { Importance } from '../shared'\n\n/**\n * The `<qds-divider>` element a thematic break between paragraph-level\n * elements: for example, a change of scene in a story, or a shift of topic\n * within a section.\n *\n * Dividers can also be used to group menu items in `<qds-dropdown>` elements.\n *\n * @see https://quartz.se.com/build/components/divider\n */\n@Component({\n tag: 'qds-divider',\n shadow: true,\n styleUrl: 'divider.css',\n})\nexport class Divider implements ComponentInterface {\n /**\n * The divider's importance.\n */\n @Prop() public readonly importance?: Exclude<Importance, 'subdued'> =\n 'standard'\n\n /**\n * Display the divider in vertical orientation.\n */\n @Prop() public readonly vertical: boolean = false\n\n @Element() private readonly host!: HTMLElement\n\n #inheritedAttributes: Attributes = {}\n\n get #computedImportance(): Importance {\n switch (this.importance) {\n case 'emphasized': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n public componentWillLoad(): void {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n }\n\n public render() {\n return (\n <hr\n class={{\n 'qds-divider': true,\n 'qds-vertical': this.vertical,\n }}\n aria-hidden=\"true\"\n data-importance={this.#computedImportance}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n )\n }\n}\n"],"version":3}
@@ -199,6 +199,6 @@ const resolveTarget = (target) => {
199
199
  return element;
200
200
  };
201
201
 
202
- export { attachInternals as a, invariant as b, isOverflowing as c, propertyToPx as d, roundByDPR as e, ignorePromise as f, determineLinkIcon as g, pickInputEventAttributes as h, inheritAriaAttributes as i, isTouchDevice as j, pickFocusEventAttributes as p, resolveTarget as r };
202
+ export { attachInternals as a, isOverflowing as b, invariant as c, propertyToPx as d, roundByDPR as e, ignorePromise as f, determineLinkIcon as g, pickInputEventAttributes as h, inheritAriaAttributes as i, isTouchDevice as j, pickFocusEventAttributes as p, resolveTarget as r };
203
203
 
204
- //# sourceMappingURL=p-4141d6ed.js.map
204
+ //# sourceMappingURL=p-efdb8fa2.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-efdb8fa2.js","mappings":";;;;;AAAA;AACA;AACA;AAaA,MAAM,iBAAiB,GAAG,CACxB,OAAgB,EAChB,aAAuB,EAAE;IAEzB,MAAM,eAAe,GAAe,EAAE;IAEtC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC;QAC7C,IAAI,KAAK,KAAK,IAAI,EAAE;YAClB,eAAe,CAAC,SAAS,CAAC,GAAG,KAAK;YAClC,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC;;;IAItC,OAAO,eAAe;AACxB,CAAC;AAmBD,MAAM,cAAc,GAAoB;IACtC,uBAAuB;IACvB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,6BAA6B;IAC7B,WAAW;IACX,cAAc;IACd,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,mBAAmB;IACnB,eAAe;IACf,aAAa;IACb,eAAe;IACf,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,sBAAsB;IACtB,kBAAkB;IAClB,WAAW;IACX,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,eAAe;IACf,eAAe;IACf,sBAAsB;IACtB,eAAe;IACf,eAAe;IACf,mBAAmB;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,WAAW;AACjE;MAEa,iBAAiB,GAAG,CAC/B,IAAmB,EACnB,MAAe;IAEf,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS;IAExC,IAAI,IAAI;IACR,IAAI;QACF,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;;IAC9C,MAAM;QACN,OAAO,SAAS;;IAElB,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC,QAAQ,CAAC,MAAM;IACjE,MAAM,aAAa,GAAG,MAAM,KAAK,QAAQ;IAEzC,IAAI,cAAc;QAChB,OAAO,aAAa,GAAG,uBAAuB,GAAG,eAAe;IAClE,OAAO,aAAa,GAAG,cAAc,GAAG,SAAS;AACnD;SAEgB,eAAe;;;;;IAK7B,OAAO,IAAI,CAAC,eAAe,EAAE;AAC/B;MAEa,aAAa,GAAG,CAC3B,MAAsE;IAEtE,MAAM,cAAc,GAAG,OAAO,MAAM,KAAK,UAAU,GAAG,MAAM,EAAE,GAAG,MAAM;IACvE,IAAI,OAAO,cAAc,KAAK,QAAQ;QAAE,OAAO,cAAc;IAE7D,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,CAAC;IACtD,IAAI,OAAO,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC;IAC3E,OAAO,OAAO;AAChB;;;;","names":[],"sources":["src/helpers.ts"],"sourcesContent":["// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n MiddlewareState,\n OffsetOptions as LibraryOffsetOptions,\n ReferenceElement,\n} from '@floating-ui/dom'\nimport type { Except, Replace } from 'type-fest'\n\nimport type { LinkIcon } from './components/shared'\n\nexport type Attributes = Record<string, string | undefined>\n\nconst inheritAttributes = (\n element: Element,\n attributes: string[] = [],\n): Attributes => {\n const attributeObject: Attributes = {}\n\n for (const attribute of attributes) {\n const value = element.getAttribute(attribute)\n if (value !== null) {\n attributeObject[attribute] = value\n element.removeAttribute(attribute)\n }\n }\n\n return attributeObject\n}\n\ntype ARIAAttribute =\n | Replace<Lowercase<keyof ARIAMixin>, 'aria', 'aria-'>\n | 'aria-activedescendant'\n | 'aria-braillelabel'\n | 'aria-brailleroledescription'\n | 'aria-colindextext'\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-description'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-flowto'\n | 'aria-labelledby'\n | 'aria-owns'\n | 'aria-relevant'\n | 'aria-rowindextext'\n\nconst ariaAttributes: ARIAAttribute[] = [\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n 'role',\n]\n\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n *\n * @param element The element that the attributes should be copied from.\n */\nexport const inheritAriaAttributes = (\n element: Element,\n): ReturnType<typeof inheritAttributes> =>\n inheritAttributes(element, ariaAttributes)\n\nconst isProduction = process.env.NODE_ENV === 'production'\nconst prefix = 'Invariant failed'\n\n/**\n * Throws an error if the value is falsy.\n *\n * @param value Value to test.\n * @param message Optional message to display in development builds.\n */\nexport function invariant(value: unknown, message?: string): asserts value {\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (value) return\n if (isProduction) throw new Error(prefix)\n\n const error = message === undefined ? prefix : `${prefix}: ${message}`\n throw new Error(error)\n}\n\n/**\n * From an object pick a set of keys.\n *\n * @param object Object to pick from.\n * @param keys They keys to pick.\n * @returns New object with only the picked keys.\n */\nexport const pick = <T, K extends keyof T>(\n object: T,\n ...keys: K[]\n): Pick<T, K> => {\n const returnValue: Partial<Pick<T, K>> = {}\n for (const key of keys) returnValue[key] = object[key]\n return returnValue as Pick<T, K>\n}\n\nexport type QdsFocusEventDetail = Pick<FocusEvent, 'relatedTarget'>\nexport type QdsInputEventDetail = Pick<\n InputEvent,\n 'data' | 'inputType' | 'isComposing'\n>\nexport const pickFocusEventAttributes = (\n event: FocusEvent,\n): QdsFocusEventDetail => pick(event, 'relatedTarget')\nexport const pickInputEventAttributes = (\n event: InputEvent,\n): QdsInputEventDetail => pick(event, 'data', 'inputType', 'isComposing')\n\nconst getConversionFactor = (\n element: Element,\n unit: string,\n): number | undefined => {\n switch (unit) {\n case 'cm': {\n return 96 / 2.54\n }\n case 'em': {\n return Number.parseFloat(\n globalThis.getComputedStyle(\n element.parentElement ?? document.documentElement,\n ).fontSize,\n )\n }\n case 'in': {\n return 96\n }\n case 'mm': {\n return 96 / 25.4\n }\n case 'pc': {\n return 16\n }\n case 'pt': {\n return 96 / 72\n }\n case 'px': {\n return 1\n }\n case 'rem': {\n return Number.parseFloat(\n globalThis.getComputedStyle(document.documentElement).fontSize,\n )\n }\n default: {\n return undefined\n }\n }\n}\n\nexport const propertyToPx = (\n element: Element,\n property: string,\n): number | undefined => {\n const value = globalThis.getComputedStyle(element).getPropertyValue(property)\n const number = Number.parseFloat(value)\n if (Number.isNaN(number)) return undefined\n const unit = /\\s*[\\d+.-]*\\s*(.*)/.exec(value)?.[1] ?? ''\n\n const conversionFactor = getConversionFactor(element, unit) ?? 1\n return number * conversionFactor\n}\n\nexport const ignorePromise = <T>(promise: Promise<T>): void => {\n promise.catch(() => {\n invariant(false)\n })\n}\n\nexport const isTouchDevice = (): boolean =>\n 'ontouchstart' in globalThis ||\n ('maxTouchPoints' in globalThis && globalThis.navigator.maxTouchPoints > 0)\n\nexport const roundByDPR = (value: number): number => {\n const dpr = devicePixelRatio || 1\n return Math.round(value * dpr) / dpr\n}\n\n/**\n * Checks if an element's content is overflowing.\n *\n * @param element The element to check.\n * @returns `true` if overflowing, `false` otherwise.\n */\nexport const isOverflowing = (element: Element): boolean => {\n const { clientHeight, clientWidth, scrollHeight, scrollWidth } = element\n return scrollHeight > clientHeight || scrollWidth > clientWidth\n}\n\nexport const determineLinkIcon = (\n href?: URL | string,\n target?: string,\n): LinkIcon | undefined => {\n if (href === undefined) return undefined\n\n let link\n try {\n link = new URL(href, globalThis.location.href)\n } catch {\n return undefined\n }\n const isExternalLink = link.origin !== globalThis.location.origin\n const opensInNewTab = target === '_blank'\n\n if (isExternalLink)\n return opensInNewTab ? 'external-new-tab-link' : 'external-link'\n return opensInNewTab ? 'new-tab-link' : undefined\n}\n\nexport function attachInternals(this: unknown): ElementInternals {\n // @ts-expect-error: This is very unsafe but it's not possible to do this in\n // Stencil.js without creating a form-associated custom\n // element.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return\n return this.attachInternals()\n}\n\nexport const resolveTarget = (\n target?: ReferenceElement | string | (() => ReferenceElement | string),\n): ReferenceElement | undefined => {\n const resolvedTarget = typeof target === 'function' ? target() : target\n if (typeof resolvedTarget !== 'string') return resolvedTarget\n\n const element = document.querySelector(resolvedTarget)\n if (element === null) throw new Error('String must resolve to an Element.')\n return element\n}\n\nexport type OffsetValue = Except<\n Exclude<\n LibraryOffsetOptions,\n // eslint-disable-next-line @typescript-eslint/ban-types\n Function | number\n >,\n 'mainAxis'\n>\nexport type OffsetFunction = (state: MiddlewareState) => OffsetValue\nexport type OffsetOptions = OffsetFunction | OffsetValue\n"],"version":3}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { B as BadgeCounter, d as defineCustomElement$1 } from './p-028b9d2e.js';
6
+ import { B as BadgeCounter, d as defineCustomElement$1 } from './p-86a0fdf3.js';
7
7
 
8
8
  const QdsBadgeCounter = BadgeCounter;
9
9
  const defineCustomElement = defineCustomElement$1;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { B as BadgeIndicator, d as defineCustomElement$1 } from './p-d279ae53.js';
6
+ import { B as BadgeIndicator, d as defineCustomElement$1 } from './p-2e88c3cc.js';
7
7
 
8
8
  const QdsBadgeIndicator = BadgeIndicator;
9
9
  const defineCustomElement = defineCustomElement$1;
@@ -3,10 +3,11 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { p as proxyCustomElement, H, h, F as Fragment } from './p-7b04d43e.js';
7
- import { a as attachInternals } from './p-4141d6ed.js';
6
+ import { p as proxyCustomElement, H, h, F as Fragment } from './p-002e77af.js';
7
+ import { a as attachInternals, b as isOverflowing } from './p-efdb8fa2.js';
8
+ import { d as defineCustomElement$2 } from './p-ae6eda4e.js';
8
9
 
9
- const breadcrumbItemCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-anchor,.qds-breadcrumb-item{color:var(--qds-theme-control-text-standard)}.qds-breadcrumb-item{align-items:center;display:inline-flex;flex-shrink:0;font:var(--qds-control-standard-text);gap:var(--qds-control-standard-gap-siblings-related);height:var(--qds-control-standard-height);list-style:none}.qds-anchor{-webkit-text-decoration:none;text-decoration:none}.qds-anchor:hover{-webkit-text-decoration:underline;text-decoration:underline}.qds-anchor:focus-visible{border-radius:var(--qds-focus-border-radius);outline:var(--qds-focus-border-width) solid var(--qds-theme-focus-border);outline-offset:var(--qds-focus-border-offset)}";
10
+ const breadcrumbItemCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-anchor{-webkit-text-decoration:none;text-decoration:none}.qds-anchor:hover{-webkit-text-decoration:underline;text-decoration:underline}.qds-breadcrumb-item{align-items:center;display:inline-flex;font:var(--qds-control-standard-text);gap:var(--qds-control-standard-gap-siblings-related);height:var(--qds-control-standard-height);width:inherit}.qds-divider{margin-inline:auto}.qds-overflow{line-height:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-anchor,.qds-breadcrumb-item{color:var(--qds-theme-control-text-standard)}.qds-anchor:focus-visible,.qds-breadcrumb-item:focus-visible{border-radius:var(--qds-focus-border-radius);outline:var(--qds-focus-border-width) solid var(--qds-theme-focus-border);outline-offset:var(--qds-focus-border-offset)}";
10
11
  const QdsBreadcrumbItemStyle0 = breadcrumbItemCss;
11
12
 
12
13
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
@@ -19,29 +20,68 @@ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) ||
19
20
  throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
21
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
22
  };
22
- var _QdsBreadcrumbItem_instances, _QdsBreadcrumbItem_internals, _QdsBreadcrumbItem_renderAnchor;
23
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
24
+ if (kind === "m")
25
+ throw new TypeError("Private method is not writable");
26
+ if (kind === "a" && !f)
27
+ throw new TypeError("Private accessor was defined without a setter");
28
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
29
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
30
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
31
+ };
32
+ var _QdsBreadcrumbItem_instances, _QdsBreadcrumbItem_internals, _QdsBreadcrumbItem_breadcrumbItem, _QdsBreadcrumbItem_ro, _QdsBreadcrumbItem_span, _QdsBreadcrumbItem_renderAnchor, _QdsBreadcrumbItem_renderText, _QdsBreadcrumbItem_breadcrumbItemRef, _QdsBreadcrumbItem_spanRef, _QdsBreadcrumbItem_tooltipRef;
23
33
  const QdsBreadcrumbItem$1 = /*@__PURE__*/ proxyCustomElement(class QdsBreadcrumbItem extends H {
24
34
  constructor() {
25
35
  super();
26
36
  this.__registerHost();
27
37
  this.__attachShadow();
28
38
  _QdsBreadcrumbItem_instances.add(this);
39
+ this.tooltip = false;
29
40
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
30
41
  _QdsBreadcrumbItem_internals.set(this, attachInternals.call(this));
31
- this.text = undefined;
32
- this.href = undefined;
33
- this.hreflang = undefined;
34
- this.referrerPolicy = undefined;
35
- this.rel = undefined;
36
- this.target = undefined;
42
+ _QdsBreadcrumbItem_breadcrumbItem.set(this, void 0);
43
+ _QdsBreadcrumbItem_ro.set(this, void 0);
44
+ _QdsBreadcrumbItem_span.set(this, void 0);
45
+ _QdsBreadcrumbItem_breadcrumbItemRef.set(this, (breadcrumbItem) => {
46
+ __classPrivateFieldSet(this, _QdsBreadcrumbItem_breadcrumbItem, breadcrumbItem, "f");
47
+ });
48
+ _QdsBreadcrumbItem_spanRef.set(this, (span) => {
49
+ __classPrivateFieldSet(this, _QdsBreadcrumbItem_span, span, "f");
50
+ });
51
+ _QdsBreadcrumbItem_tooltipRef.set(this, (tooltip) => {
52
+ if (tooltip)
53
+ // eslint-disable-next-line no-param-reassign
54
+ tooltip.target = __classPrivateFieldGet(this, _QdsBreadcrumbItem_breadcrumbItem, "f");
55
+ });
56
+ }
57
+ textChanged() {
58
+ if (__classPrivateFieldGet(this, _QdsBreadcrumbItem_ro, "f"))
59
+ __classPrivateFieldGet(this, _QdsBreadcrumbItem_ro, "f").disconnect();
60
+ if (!__classPrivateFieldGet(this, _QdsBreadcrumbItem_span, "f"))
61
+ return;
62
+ this.tooltip = isOverflowing(__classPrivateFieldGet(this, _QdsBreadcrumbItem_span, "f"));
63
+ __classPrivateFieldSet(this, _QdsBreadcrumbItem_ro, new ResizeObserver(([spanEntry]) => {
64
+ this.tooltip = isOverflowing(spanEntry.target);
65
+ }), "f");
66
+ __classPrivateFieldGet(this, _QdsBreadcrumbItem_ro, "f").observe(__classPrivateFieldGet(this, _QdsBreadcrumbItem_span, "f"));
37
67
  }
38
68
  componentWillLoad() {
39
69
  __classPrivateFieldGet(this, _QdsBreadcrumbItem_internals, "f").role = 'listitem';
40
70
  }
71
+ componentDidLoad() {
72
+ this.textChanged();
73
+ }
74
+ disconnectedCallback() {
75
+ if (__classPrivateFieldGet(this, _QdsBreadcrumbItem_ro, "f"))
76
+ __classPrivateFieldGet(this, _QdsBreadcrumbItem_ro, "f").disconnect();
77
+ }
41
78
  render() {
42
- return (h("div", { key: '6f3468e1964f21e9cce8268c5633e1b4d537a1b8', class: "qds-breadcrumb-item" }, this.href === undefined ? this.text : __classPrivateFieldGet(this, _QdsBreadcrumbItem_instances, "m", _QdsBreadcrumbItem_renderAnchor).call(this)));
79
+ return (h("div", { key: '7640d08e7afe853363af70eae0e9ea3b3ec4a1f3', class: "qds-breadcrumb-item", ref: this.href === undefined ? __classPrivateFieldGet(this, _QdsBreadcrumbItem_breadcrumbItemRef, "f") : undefined, tabIndex: this.tooltip && this.href === undefined ? 0 : undefined }, this.href === undefined ? __classPrivateFieldGet(this, _QdsBreadcrumbItem_instances, "m", _QdsBreadcrumbItem_renderText).call(this) : __classPrivateFieldGet(this, _QdsBreadcrumbItem_instances, "m", _QdsBreadcrumbItem_renderAnchor).call(this), this.tooltip && (h("qds-tooltip", { key: 'feb66781c919e1139bb92b6174bada2f59e3bb45', "aria-hidden": "true", ref: __classPrivateFieldGet(this, _QdsBreadcrumbItem_tooltipRef, "f") }, this.text))));
43
80
  }
44
81
  static get delegatesFocus() { return true; }
82
+ static get watchers() { return {
83
+ "text": ["textChanged"]
84
+ }; }
45
85
  static get style() { return QdsBreadcrumbItemStyle0; }
46
86
  }, [17, "qds-breadcrumb-item", {
47
87
  "text": [1],
@@ -49,22 +89,32 @@ const QdsBreadcrumbItem$1 = /*@__PURE__*/ proxyCustomElement(class QdsBreadcrumb
49
89
  "hreflang": [1],
50
90
  "referrerPolicy": [1, "referrerpolicy"],
51
91
  "rel": [1],
52
- "target": [1]
92
+ "target": [1],
93
+ "tooltip": [32]
94
+ }, undefined, {
95
+ "text": ["textChanged"]
53
96
  }]);
54
- _QdsBreadcrumbItem_internals = new WeakMap(), _QdsBreadcrumbItem_instances = new WeakSet(), _QdsBreadcrumbItem_renderAnchor = function _QdsBreadcrumbItem_renderAnchor() {
55
- return (h(Fragment, null, h("a", { class: "qds-anchor", href: this.href, hrefLang: this.hreflang, referrerPolicy: this.referrerPolicy, rel: this.rel, target: this.target }, this.text), h("span", { "aria-hidden": "true" }, "/")));
97
+ _QdsBreadcrumbItem_internals = new WeakMap(), _QdsBreadcrumbItem_breadcrumbItem = new WeakMap(), _QdsBreadcrumbItem_ro = new WeakMap(), _QdsBreadcrumbItem_span = new WeakMap(), _QdsBreadcrumbItem_breadcrumbItemRef = new WeakMap(), _QdsBreadcrumbItem_spanRef = new WeakMap(), _QdsBreadcrumbItem_tooltipRef = new WeakMap(), _QdsBreadcrumbItem_instances = new WeakSet(), _QdsBreadcrumbItem_renderAnchor = function _QdsBreadcrumbItem_renderAnchor() {
98
+ return (h(Fragment, null, h("span", { class: "qds-overflow", ref: __classPrivateFieldGet(this, _QdsBreadcrumbItem_spanRef, "f") }, h("a", { class: "qds-anchor", href: this.href, hrefLang: this.hreflang, referrerPolicy: this.referrerPolicy, rel: this.rel, ref: this.href === undefined ? undefined : __classPrivateFieldGet(this, _QdsBreadcrumbItem_breadcrumbItemRef, "f"), target: this.target }, this.text)), h("span", { "aria-hidden": "true", class: "qds-divider" }, "/")));
99
+ }, _QdsBreadcrumbItem_renderText = function _QdsBreadcrumbItem_renderText() {
100
+ return (h("span", { class: "qds-overflow", ref: __classPrivateFieldGet(this, _QdsBreadcrumbItem_spanRef, "f") }, this.text));
56
101
  };
57
102
  function defineCustomElement$1() {
58
103
  if (typeof customElements === "undefined") {
59
104
  return;
60
105
  }
61
- const components = ["qds-breadcrumb-item"];
106
+ const components = ["qds-breadcrumb-item", "qds-tooltip"];
62
107
  components.forEach(tagName => { switch (tagName) {
63
108
  case "qds-breadcrumb-item":
64
109
  if (!customElements.get(tagName)) {
65
110
  customElements.define(tagName, QdsBreadcrumbItem$1);
66
111
  }
67
112
  break;
113
+ case "qds-tooltip":
114
+ if (!customElements.get(tagName)) {
115
+ defineCustomElement$2();
116
+ }
117
+ break;
68
118
  } });
69
119
  }
70
120
 
@@ -1 +1 @@
1
- {"file":"qds-breadcrumb-item.js","mappings":";;;;;;;;AAAA,MAAM,iBAAiB,GAAG,4rBAA4rB,CAAC;AACvtB,gCAAe,iBAAiB;;ACDhC;AACA;AACA;;;;;;;;;MAwBaA,mBAAiB;;;;;;;QAmJnB,uCAA+B,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA;;;;;;;;IAE3D,iBAAiB;QACtB,uBAAA,IAAI,oCAAW,CAAC,IAAI,GAAG,UAAU,CAAA;KAClC;IAEM,MAAM;QACX,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC7B,IAAI,CAAC,IAAI,KAAK,SAAS,GAAG,IAAI,CAAC,IAAI,GAAG,uBAAA,IAAI,qEAAc,MAAlB,IAAI,CAAgB,CACvD,EACP;KACF;;;;;;;;;;;;IAGC,QACE,kBACE,SACE,KAAK,EAAC,YAAY,EAClB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,MAAM,EAAE,IAAI,CAAC,MAAM,IAElB,IAAI,CAAC,IAAI,CACR,EACJ,2BAAkB,MAAM,QAAS,CAChC,EACJ;AACH,CAAC;;;;;;;;;;;;;;;;;;;;","names":["QdsBreadcrumbItem"],"sources":["src/components/breadcrumb-item/breadcrumb-item.css?tag=qds-breadcrumb-item&encapsulation=shadow","src/components/breadcrumb-item/breadcrumb-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n}\n\n.qds-anchor,\n.qds-breadcrumb-item {\n color: var(--qds-theme-control-text-standard);\n}\n\n.qds-breadcrumb-item {\n font: var(--qds-control-standard-text);\n display: inline-flex;\n height: var(--qds-control-standard-height);\n align-items: center;\n gap: var(--qds-control-standard-gap-siblings-related);\n flex-shrink: 0;\n list-style: none;\n}\n\n.qds-anchor {\n text-decoration: none;\n\n &:hover {\n text-decoration: underline;\n }\n\n &:focus-visible {\n outline: var(--qds-focus-border-width) solid var(--qds-theme-focus-border);\n outline-offset: var(--qds-focus-border-offset);\n border-radius: var(--qds-focus-border-radius);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, JSX } from '@stencil/core'\nimport { Component, Fragment, h, Prop } from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport { attachInternals } from '../../helpers'\n\nexport type BreadcrumbTarget = '_blank' | '_parent' | '_self' | '_top'\n\n/**\n * The `<qds-breadcrumb-item>` element is used as a navigational aid that is\n * typically placed between a site's header and the main content, displaying\n * either a hierarchy of the current page in relation to the site's structure,\n * from top level to current page, or a list of the links the user followed to\n * get to the current page, in the order visited.\n *\n * @see https://quartz.se.com/build/components/breadcrumb\n */\n@Component({\n tag: 'qds-breadcrumb-item',\n styleUrl: 'breadcrumb-item.css',\n shadow: { delegatesFocus: true },\n})\nexport class QdsBreadcrumbItem implements ComponentInterface {\n /**\n * The breadcrumb item's text.\n */\n @Prop() public readonly text!: string\n\n /**\n * The URL that the inline link points to. Inline links are not restricted to\n * HTTP-based URLs — they can use any URL scheme supported by browsers:\n *\n * - Sections of a page with document fragments\n * - While web browsers may not support other URL schemes, websites can with\n * [`registerProtocolHandler()`](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)\n *\n * @webnative\n */\n @Prop() public readonly href?: string\n\n /**\n * Hints at the human language of the linked URL. No built-in functionality.\n * Allowed values are the same as\n * [the global `lang` attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang).\n *\n * @webnative\n */\n @Prop() public readonly hreflang?: string\n\n /**\n * How much of the\n * [referrer](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * to send when following the inline link.\n *\n * - `no-referrer`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent.\n * - `no-referrer-when-downgrade`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent to\n * [origin](https://developer.mozilla.org/docs/Glossary/Origin)s\n * without [TLS](https://developer.mozilla.org/docs/Glossary/TLS)\n * ([HTTPS](https://developer.mozilla.org/docs/Glossary/HTTPS)).\n * - `origin`: The sent referrer will be limited to the origin of the\n * referring page: its\n * [scheme](https://developer.mozilla.org/docs/Learn/Common_questions/What_is_a_URL),\n * [host](https://developer.mozilla.org/docs/Glossary/Host), and\n * [port](https://developer.mozilla.org/docs/Glossary/Port).\n * - `origin-when-cross-origin`: The referrer sent to other origins will be\n * limited to the scheme, the host, and the port. Navigations on the same\n * origin will still include the path.\n * - `same-origin`: A referrer will be sent for\n * [same origin](https://developer.mozilla.org/docs/Glossary/Same-origin_policy),\n * but cross-origin requests will contain no referrer information.\n * - `strict-origin`: Only send the origin of the document as the referrer\n * when the protocol security level stays the same (HTTPS→HTTPS), but don't\n * send it to a less secure destination (HTTPS→HTTP).\n * - `strict-origin-when-cross-origin` (default): Send a full URL when\n * performing a same-origin request, only send the origin when the protocol\n * security level stays the same (HTTPS→HTTPS), and send no header to a less\n * secure destination (HTTPS→HTTP).\n * - `unsafe-url`: The referrer will include the origin and the path (but not the\n * [fragment](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash),\n * [password](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password),\n * or [username](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)).\n * **This value is unsafe** because it leaks origins and paths from\n * TLS-protected resources to insecure origins.\n *\n * @webnative\n */\n @Prop({ attribute: 'referrerpolicy' })\n public readonly referrerPolicy?: ReferrerPolicy\n\n /**\n * The relationship of the linked URL as space-separated\n * [link types](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel).\n *\n * The following list includes some of the most important existing keywords.\n * Every keyword within a space-separated value should be unique within that\n * value.\n *\n * - [`alternate`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-alternate):\n * Alternate representations of the current document.\n * - [`author`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-author):\n * Author of the current document or article.\n * - [`bookmark`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-bookmark):\n * Permalink for the nearest ancestor section.\n * - [`external`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-external):\n * The referenced document is not part of the same site as the current\n * document. An icon will be rendered next to the text if this value is\n * specified.\n * - [`help`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-help):\n * Link to context-sensitive help.\n * - [`license`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-license):\n * Indicates that the main content of the current document is covered by the\n * copyright license described by the referenced document.\n * - [`me`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me):\n * Indicates that the current document represents the person who owns the\n * linked content.\n * - [`next`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-next):\n * Indicates that the current document is a part of a series and that the\n * next document in the series is the referenced document.\n * - [`nofollow`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-nofollow):\n * Indicates that the current document's original author or publisher does\n * not endorse the referenced document.\n * - [`noopener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/noopener):\n * Creates a top-level browsing context that is not an auxiliary browsing\n * context if the hyperlink would create either of those, to begin with (i.e.,\n * has an appropriate `target` attribute value).\n * - [`noreferrer`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-noreferrer):\n * No `Referer` header will be included. Additionally, has the same effect as\n * `noopener`.\n * - [`opener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-opener):\n * Creates an auxiliary browsing context if the hyperlink would otherwise\n * create a top-level browsing context that is not an auxiliary browsing\n * context (i.e., has \"`_blank`\" as `target` attribute value).\n * - [`prev`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-prev):\n * Indicates that the current document is a part of a series and that the\n * previous document in the series is the referenced document.\n * - [`search`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-search):\n * Gives a link to a resource that can be used to search through the current\n * document and its related pages.\n * - [`tag`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-tag):\n * Gives a tag (identified by the given address) that applies to the current\n * document.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<BreadcrumbTarget, string>\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n readonly #internals: ElementInternals = attachInternals.call(this)\n\n public componentWillLoad(): void {\n this.#internals.role = 'listitem'\n }\n\n public render() {\n return (\n <div class=\"qds-breadcrumb-item\">\n {this.href === undefined ? this.text : this.#renderAnchor()}\n </div>\n )\n }\n\n #renderAnchor(): JSX.Element {\n return (\n <>\n <a\n class=\"qds-anchor\"\n href={this.href}\n hrefLang={this.hreflang}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n target={this.target}\n >\n {this.text}\n </a>\n <span aria-hidden=\"true\">/</span>\n </>\n )\n }\n}\n"],"version":3}
1
+ {"file":"qds-breadcrumb-item.js","mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,00BAA00B,CAAC;AACr2B,gCAAe,iBAAiB;;ACDhC;AACA;AACA;;;;;;;;;;;;;;;;;;MAwBaA,mBAAiB;IAL9B;;;;;QAuJmB,YAAO,GAAG,KAAK,CAAA;;QAGvB,uCAA+B,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA;QAElE,oDAAoD;QAEpD,wCAAoB;QAEpB,0CAAuB;QA2Ed,+CAAqB,CAC5B,cAAmD;YAEnD,uBAAA,IAAI,qCAAmB,cAAc,MAAA,CAAA;SACtC,EAAA;QAEQ,qCAAW,CAAC,IAAsB;YACzC,uBAAA,IAAI,2BAAS,IAAI,MAAA,CAAA;SAClB,EAAA;QAEQ,wCAAc,CAAC,OAA+B;YACrD,IAAI,OAAO;;gBAET,OAAO,CAAC,MAAM,GAAG,uBAAA,IAAI,yCAAgB,CAAA;SACxC,EAAA;KACF;IAvFW,WAAW;QACnB,IAAI,uBAAA,IAAI,6BAAI;YAAE,uBAAA,IAAI,6BAAI,CAAC,UAAU,EAAE,CAAA;QAEnC,IAAI,CAAC,uBAAA,IAAI,+BAAM;YAAE,OAAM;QAEvB,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC,uBAAA,IAAI,+BAAM,CAAC,CAAA;QACxC,uBAAA,IAAI,yBAAO,IAAI,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;YACxC,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;SAC/C,CAAC,MAAA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CAAC,IAAI,CACR,CACC,EACP,2BAAkB,MAAM,EAAC,KAAK,EAAC,aAAa,QAErC,CACN,EACJ;AACH,CAAC;IAGC,QACE,YAAM,KAAK,EAAC,cAAc,EAAC,GAAG,EAAE,uBAAA,IAAI,kCAAS,IAC1C,IAAI,CAAC,IAAI,CACL,EACR;AACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;","names":["QdsBreadcrumbItem"],"sources":["src/components/breadcrumb-item/breadcrumb-item.css?tag=qds-breadcrumb-item&encapsulation=shadow","src/components/breadcrumb-item/breadcrumb-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n}\n\n.qds-anchor {\n text-decoration: none;\n\n &:hover {\n text-decoration: underline;\n }\n}\n\n.qds-breadcrumb-item {\n align-items: center;\n display: inline-flex;\n font: var(--qds-control-standard-text);\n gap: var(--qds-control-standard-gap-siblings-related);\n height: var(--qds-control-standard-height);\n width: inherit;\n}\n\n.qds-divider {\n margin-inline: auto;\n}\n\n.qds-overflow {\n line-height: normal;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.qds-anchor,\n.qds-breadcrumb-item {\n color: var(--qds-theme-control-text-standard);\n\n &:focus-visible {\n outline: var(--qds-focus-border-width) solid var(--qds-theme-focus-border);\n outline-offset: var(--qds-focus-border-offset);\n border-radius: var(--qds-focus-border-radius);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, JSX } from '@stencil/core'\nimport { Component, Fragment, h, Prop, State, Watch } from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport { attachInternals, isOverflowing } from '../../helpers'\n\nexport type BreadcrumbTarget = '_blank' | '_parent' | '_self' | '_top'\n\n/**\n * The `<qds-breadcrumb-item>` element is used as a navigational aid that is\n * typically placed between a site's header and the main content, displaying\n * either a hierarchy of the current page in relation to the site's structure,\n * from top level to current page, or a list of the links the user followed to\n * get to the current page, in the order visited.\n *\n * @see https://quartz.se.com/build/components/breadcrumb\n */\n@Component({\n tag: 'qds-breadcrumb-item',\n styleUrl: 'breadcrumb-item.css',\n shadow: { delegatesFocus: true },\n})\nexport class QdsBreadcrumbItem implements ComponentInterface {\n /**\n * The breadcrumb item's text.\n */\n @Prop() public readonly text!: string\n\n /**\n * The URL that the inline link points to. Inline links are not restricted to\n * HTTP-based URLs — they can use any URL scheme supported by browsers:\n *\n * - Sections of a page with document fragments\n * - While web browsers may not support other URL schemes, websites can with\n * [`registerProtocolHandler()`](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)\n *\n * @webnative\n */\n @Prop() public readonly href?: string\n\n /**\n * Hints at the human language of the linked URL. No built-in functionality.\n * Allowed values are the same as\n * [the global `lang` attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang).\n *\n * @webnative\n */\n @Prop() public readonly hreflang?: string\n\n /**\n * How much of the\n * [referrer](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * to send when following the inline link.\n *\n * - `no-referrer`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent.\n * - `no-referrer-when-downgrade`: The\n * [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)\n * header will not be sent to\n * [origin](https://developer.mozilla.org/docs/Glossary/Origin)s\n * without [TLS](https://developer.mozilla.org/docs/Glossary/TLS)\n * ([HTTPS](https://developer.mozilla.org/docs/Glossary/HTTPS)).\n * - `origin`: The sent referrer will be limited to the origin of the\n * referring page: its\n * [scheme](https://developer.mozilla.org/docs/Learn/Common_questions/What_is_a_URL),\n * [host](https://developer.mozilla.org/docs/Glossary/Host), and\n * [port](https://developer.mozilla.org/docs/Glossary/Port).\n * - `origin-when-cross-origin`: The referrer sent to other origins will be\n * limited to the scheme, the host, and the port. Navigations on the same\n * origin will still include the path.\n * - `same-origin`: A referrer will be sent for\n * [same origin](https://developer.mozilla.org/docs/Glossary/Same-origin_policy),\n * but cross-origin requests will contain no referrer information.\n * - `strict-origin`: Only send the origin of the document as the referrer\n * when the protocol security level stays the same (HTTPS→HTTPS), but don't\n * send it to a less secure destination (HTTPS→HTTP).\n * - `strict-origin-when-cross-origin` (default): Send a full URL when\n * performing a same-origin request, only send the origin when the protocol\n * security level stays the same (HTTPS→HTTPS), and send no header to a less\n * secure destination (HTTPS→HTTP).\n * - `unsafe-url`: The referrer will include the origin and the path (but not the\n * [fragment](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash),\n * [password](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password),\n * or [username](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)).\n * **This value is unsafe** because it leaks origins and paths from\n * TLS-protected resources to insecure origins.\n *\n * @webnative\n */\n @Prop({ attribute: 'referrerpolicy' })\n public readonly referrerPolicy?: ReferrerPolicy\n\n /**\n * The relationship of the linked URL as space-separated\n * [link types](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel).\n *\n * The following list includes some of the most important existing keywords.\n * Every keyword within a space-separated value should be unique within that\n * value.\n *\n * - [`alternate`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-alternate):\n * Alternate representations of the current document.\n * - [`author`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-author):\n * Author of the current document or article.\n * - [`bookmark`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-bookmark):\n * Permalink for the nearest ancestor section.\n * - [`external`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-external):\n * The referenced document is not part of the same site as the current\n * document. An icon will be rendered next to the text if this value is\n * specified.\n * - [`help`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-help):\n * Link to context-sensitive help.\n * - [`license`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-license):\n * Indicates that the main content of the current document is covered by the\n * copyright license described by the referenced document.\n * - [`me`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me):\n * Indicates that the current document represents the person who owns the\n * linked content.\n * - [`next`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-next):\n * Indicates that the current document is a part of a series and that the\n * next document in the series is the referenced document.\n * - [`nofollow`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-nofollow):\n * Indicates that the current document's original author or publisher does\n * not endorse the referenced document.\n * - [`noopener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/noopener):\n * Creates a top-level browsing context that is not an auxiliary browsing\n * context if the hyperlink would create either of those, to begin with (i.e.,\n * has an appropriate `target` attribute value).\n * - [`noreferrer`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-noreferrer):\n * No `Referer` header will be included. Additionally, has the same effect as\n * `noopener`.\n * - [`opener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-opener):\n * Creates an auxiliary browsing context if the hyperlink would otherwise\n * create a top-level browsing context that is not an auxiliary browsing\n * context (i.e., has \"`_blank`\" as `target` attribute value).\n * - [`prev`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-prev):\n * Indicates that the current document is a part of a series and that the\n * previous document in the series is the referenced document.\n * - [`search`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-search):\n * Gives a link to a resource that can be used to search through the current\n * document and its related pages.\n * - [`tag`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-tag):\n * Gives a tag (identified by the given address) that applies to the current\n * document.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<BreadcrumbTarget, string>\n\n @State() private tooltip = false\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n readonly #internals: ElementInternals = attachInternals.call(this)\n\n #breadcrumbItem?: HTMLAnchorElement | HTMLDivElement\n\n #ro?: ResizeObserver\n\n #span?: HTMLSpanElement\n\n @Watch('text')\n protected textChanged(): void {\n if (this.#ro) this.#ro.disconnect()\n\n if (!this.#span) return\n\n this.tooltip = isOverflowing(this.#span)\n this.#ro = new ResizeObserver(([spanEntry]) => {\n this.tooltip = isOverflowing(spanEntry.target)\n })\n this.#ro.observe(this.#span)\n }\n\n public componentWillLoad(): void {\n this.#internals.role = 'listitem'\n }\n\n public componentDidLoad(): void {\n this.textChanged()\n }\n\n public disconnectedCallback(): void {\n if (this.#ro) this.#ro.disconnect()\n }\n\n public render() {\n return (\n <div\n class=\"qds-breadcrumb-item\"\n ref={this.href === undefined ? this.#breadcrumbItemRef : undefined}\n tabIndex={this.tooltip && this.href === undefined ? 0 : undefined}\n >\n {this.href === undefined ? this.#renderText() : this.#renderAnchor()}\n {this.tooltip && (\n <qds-tooltip aria-hidden=\"true\" ref={this.#tooltipRef}>\n {this.text}\n </qds-tooltip>\n )}\n </div>\n )\n }\n\n #renderAnchor(): JSX.Element {\n return (\n <>\n <span class=\"qds-overflow\" ref={this.#spanRef}>\n <a\n class=\"qds-anchor\"\n href={this.href}\n hrefLang={this.hreflang}\n referrerPolicy={this.referrerPolicy}\n rel={this.rel}\n ref={this.href === undefined ? undefined : this.#breadcrumbItemRef}\n target={this.target}\n >\n {this.text}\n </a>\n </span>\n <span aria-hidden=\"true\" class=\"qds-divider\">\n /\n </span>\n </>\n )\n }\n\n #renderText(): JSX.Element {\n return (\n <span class=\"qds-overflow\" ref={this.#spanRef}>\n {this.text}\n </span>\n )\n }\n\n readonly #breadcrumbItemRef = (\n breadcrumbItem?: HTMLAnchorElement | HTMLDivElement,\n ): void => {\n this.#breadcrumbItem = breadcrumbItem\n }\n\n readonly #spanRef = (span?: HTMLSpanElement): void => {\n this.#span = span\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.#breadcrumbItem\n }\n}\n"],"version":3}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { B as Button, d as defineCustomElement$1 } from './p-698edde1.js';
6
+ import { B as Button, d as defineCustomElement$1 } from './p-786e2b51.js';
7
7
 
8
8
  const QdsButton = Button;
9
9
  const defineCustomElement = defineCustomElement$1;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { C as Checkbox, d as defineCustomElement$1 } from './p-f85b490c.js';
6
+ import { C as Checkbox, d as defineCustomElement$1 } from './p-ed500f42.js';
7
7
 
8
8
  const QdsCheckbox = Checkbox;
9
9
  const defineCustomElement = defineCustomElement$1;