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

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 (230) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/components/index.js +1 -1
  3. package/components/{p-CURs27Ur.js → p-BalM52S_.js} +3 -3
  4. package/components/{p-CURs27Ur.js.map → p-BalM52S_.js.map} +1 -1
  5. package/components/{p-CkyaV9az.js → p-C0VgKX4J.js} +9 -9
  6. package/components/p-C0VgKX4J.js.map +1 -0
  7. package/components/{p-DtxwXYGb.js → p-C9R8N06B.js} +5 -31
  8. package/components/p-C9R8N06B.js.map +1 -0
  9. package/components/{p-DR79BVX5.js → p-CKp062X8.js} +6 -6
  10. package/components/p-CKp062X8.js.map +1 -0
  11. package/components/{p-CjVnGhSO.js → p-CVuTVnQo.js} +3 -3
  12. package/components/{p-CjVnGhSO.js.map → p-CVuTVnQo.js.map} +1 -1
  13. package/components/{p-CkUTS1aU.js → p-Ck9w5WIb.js} +6 -6
  14. package/components/p-Ck9w5WIb.js.map +1 -0
  15. package/components/p-DCAlWquR.js +200 -0
  16. package/components/p-DCAlWquR.js.map +1 -0
  17. package/components/{p-DNHI4C-W.js → p-DRcxeXWE.js} +58 -22
  18. package/components/p-DRcxeXWE.js.map +1 -0
  19. package/components/{p-B2ZVUvk9.js → p-DgYrfIr_.js} +5 -5
  20. package/components/{p-B2ZVUvk9.js.map → p-DgYrfIr_.js.map} +1 -1
  21. package/components/{p-CDRwHAIT.js → p-XP2CY_fo.js} +3 -3
  22. package/components/p-XP2CY_fo.js.map +1 -0
  23. package/components/{p-C1c4JVlg.js → p-io1iVgY1.js} +47 -28
  24. package/components/p-io1iVgY1.js.map +1 -0
  25. package/components/{p-D82sb4oJ.js → p-oqmnh-8P.js} +4 -4
  26. package/components/{p-D82sb4oJ.js.map → p-oqmnh-8P.js.map} +1 -1
  27. package/components/{p-5dwtV5iH.js → p-yb0Kv4Y6.js} +24 -6
  28. package/components/p-yb0Kv4Y6.js.map +1 -0
  29. package/components/qds-action-item.js +4 -4
  30. package/components/qds-action-item.js.map +1 -1
  31. package/components/qds-avatar-media.js +1 -1
  32. package/components/qds-badge-counter.js +1 -1
  33. package/components/qds-breadcrumb-item.js +5 -5
  34. package/components/qds-breadcrumb-item.js.map +1 -1
  35. package/components/qds-button.js +5 -5
  36. package/components/qds-button.js.map +1 -1
  37. package/components/qds-checkbox.js +1 -1
  38. package/components/qds-chip.js +9 -9
  39. package/components/qds-chip.js.map +1 -1
  40. package/components/qds-dialog.js +6 -6
  41. package/components/qds-divider.js +1 -1
  42. package/components/qds-dropdown.js +1 -1
  43. package/components/qds-form-message.js +4 -4
  44. package/components/qds-form-message.js.map +1 -1
  45. package/components/qds-icon-button.js +1 -1
  46. package/components/qds-icon-tab.js +8 -8
  47. package/components/qds-icon.js +1 -1
  48. package/components/qds-inline-link.js +4 -4
  49. package/components/qds-inline-link.js.map +1 -1
  50. package/components/qds-input.js +17 -13
  51. package/components/qds-input.js.map +1 -1
  52. package/components/qds-label.js +153 -1
  53. package/components/qds-label.js.map +1 -1
  54. package/components/qds-list-item.js +25 -29
  55. package/components/qds-list-item.js.map +1 -1
  56. package/components/qds-loader.js +2 -2
  57. package/components/qds-loader.js.map +1 -1
  58. package/components/qds-menu-item.js +6 -6
  59. package/components/qds-mini-button.js +1 -1
  60. package/components/qds-progress-bar.js +1 -1
  61. package/components/qds-radio.js +1 -1
  62. package/components/qds-select.js +6 -6
  63. package/components/qds-select.js.map +1 -1
  64. package/components/qds-standalone-link.js +5 -5
  65. package/components/qds-standalone-link.js.map +1 -1
  66. package/components/qds-switch.js +5 -5
  67. package/components/qds-tab.js +20 -15
  68. package/components/qds-tab.js.map +1 -1
  69. package/components/qds-tabbar.js +95 -34
  70. package/components/qds-tabbar.js.map +1 -1
  71. package/components/qds-table-cell.js +32 -4
  72. package/components/qds-table-cell.js.map +1 -1
  73. package/components/qds-table-head-cell.js +32 -4
  74. package/components/qds-table-head-cell.js.map +1 -1
  75. package/components/qds-table-row.js +2 -2
  76. package/components/qds-table-row.js.map +1 -1
  77. package/components/qds-table.js +1 -1
  78. package/components/qds-tag.js +1 -1
  79. package/components/qds-textarea.js +4 -4
  80. package/components/qds-textarea.js.map +1 -1
  81. package/components/qds-title.js +1 -1
  82. package/components/qds-tooltip.js +1 -1
  83. package/dist/cjs/loader.cjs.js +1 -1
  84. package/dist/cjs/qds-action-item.cjs.entry.js +1 -1
  85. package/dist/cjs/qds-action-item.entry.cjs.js.map +1 -1
  86. package/dist/cjs/qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map +1 -1
  87. package/dist/cjs/qds-avatar-media_3.cjs.entry.js +144 -41
  88. package/dist/cjs/qds-badge-counter.qds-badge-indicator.entry.cjs.js.map +1 -1
  89. package/dist/cjs/qds-badge-counter_2.cjs.entry.js +1 -1
  90. package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +2 -2
  91. package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -1
  92. package/dist/cjs/qds-button.cjs.entry.js +1 -1
  93. package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
  94. package/dist/cjs/qds-chip.cjs.entry.js +5 -5
  95. package/dist/cjs/qds-chip.entry.cjs.js.map +1 -1
  96. package/dist/cjs/qds-dialog.cjs.entry.js +1 -1
  97. package/dist/cjs/qds-divider.qds-icon-button.entry.cjs.js.map +1 -1
  98. package/dist/cjs/qds-divider_2.cjs.entry.js +4 -4
  99. package/dist/cjs/qds-dropdown.cjs.entry.js +21 -3
  100. package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -1
  101. package/dist/cjs/qds-form-message.cjs.entry.js +2 -2
  102. package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -1
  103. package/dist/cjs/qds-icon-tab.cjs.entry.js +3 -3
  104. package/dist/cjs/qds-icon.cjs.entry.js +9 -29
  105. package/dist/cjs/qds-icon.entry.cjs.js.map +1 -1
  106. package/dist/cjs/qds-inline-link.cjs.entry.js +2 -2
  107. package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -1
  108. package/dist/cjs/qds-input.cjs.entry.js +14 -10
  109. package/dist/cjs/qds-input.entry.cjs.js.map +1 -1
  110. package/dist/cjs/qds-label.cjs.entry.js +2 -2
  111. package/dist/cjs/qds-list-item.cjs.entry.js +6 -4
  112. package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -1
  113. package/dist/cjs/qds-loader.cjs.entry.js +1 -1
  114. package/dist/cjs/qds-loader.entry.cjs.js.map +1 -1
  115. package/dist/cjs/qds-menu-item.cjs.entry.js +2 -2
  116. package/dist/cjs/qds-mini-button.cjs.entry.js +1 -1
  117. package/dist/cjs/qds-progress-bar.cjs.entry.js +1 -1
  118. package/dist/cjs/qds-select.cjs.entry.js +4 -4
  119. package/dist/cjs/qds-select.entry.cjs.js.map +1 -1
  120. package/dist/cjs/qds-standalone-link.cjs.entry.js +3 -3
  121. package/dist/cjs/qds-standalone-link.entry.cjs.js.map +1 -1
  122. package/dist/cjs/qds-switch.cjs.entry.js +3 -3
  123. package/dist/cjs/qds-tab.cjs.entry.js +15 -10
  124. package/dist/cjs/qds-tab.entry.cjs.js.map +1 -1
  125. package/dist/cjs/qds-tabbar.cjs.entry.js +83 -27
  126. package/dist/cjs/qds-tabbar.entry.cjs.js.map +1 -1
  127. package/dist/cjs/qds-table-cell.cjs.entry.js +30 -3
  128. package/dist/cjs/qds-table-cell.entry.cjs.js.map +1 -1
  129. package/dist/cjs/qds-table-head-cell.cjs.entry.js +30 -3
  130. package/dist/cjs/qds-table-head-cell.entry.cjs.js.map +1 -1
  131. package/dist/cjs/qds-table-row.cjs.entry.js +2 -2
  132. package/dist/cjs/qds-table-row.entry.cjs.js.map +1 -1
  133. package/dist/cjs/qds-table.cjs.entry.js +1 -1
  134. package/dist/cjs/qds-tag.cjs.entry.js +2 -2
  135. package/dist/cjs/qds-tag.entry.cjs.js.map +1 -1
  136. package/dist/cjs/qds-textarea.cjs.entry.js +3 -3
  137. package/dist/cjs/qds-textarea.entry.cjs.js.map +1 -1
  138. package/dist/cjs/qds-title.cjs.entry.js +3 -3
  139. package/dist/cjs/qds-title.entry.cjs.js.map +1 -1
  140. package/dist/cjs/qds-tooltip.cjs.entry.js +1 -1
  141. package/dist/cjs/qds.cjs.js +1 -1
  142. package/dist/custom-elements.json +365 -30
  143. package/dist/docs.json +319 -63
  144. package/dist/esm/{helpers-eFD8hV6J.js → helpers-Fe2AA6uo.js} +3 -3
  145. package/dist/esm/{helpers-eFD8hV6J.js.map → helpers-Fe2AA6uo.js.map} +1 -1
  146. package/dist/esm/loader.js +1 -1
  147. package/dist/esm/qds-action-item.entry.js +2 -2
  148. package/dist/esm/qds-action-item.entry.js.map +1 -1
  149. package/dist/esm/qds-avatar-media.qds-checkbox.qds-radio.entry.js.map +1 -1
  150. package/dist/esm/qds-avatar-media_3.entry.js +146 -43
  151. package/dist/esm/qds-badge-counter.qds-badge-indicator.entry.js.map +1 -1
  152. package/dist/esm/qds-badge-counter_2.entry.js +1 -1
  153. package/dist/esm/qds-breadcrumb-item.entry.js +3 -3
  154. package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
  155. package/dist/esm/qds-button.entry.js +2 -2
  156. package/dist/esm/qds-button.entry.js.map +1 -1
  157. package/dist/esm/qds-chip.entry.js +6 -6
  158. package/dist/esm/qds-chip.entry.js.map +1 -1
  159. package/dist/esm/qds-dialog.entry.js +2 -2
  160. package/dist/esm/qds-divider.qds-icon-button.entry.js.map +1 -1
  161. package/dist/esm/qds-divider_2.entry.js +5 -5
  162. package/dist/esm/qds-dropdown.entry.js +22 -4
  163. package/dist/esm/qds-dropdown.entry.js.map +1 -1
  164. package/dist/esm/qds-form-message.entry.js +3 -3
  165. package/dist/esm/qds-form-message.entry.js.map +1 -1
  166. package/dist/esm/qds-icon-tab.entry.js +4 -4
  167. package/dist/esm/qds-icon.entry.js +10 -30
  168. package/dist/esm/qds-icon.entry.js.map +1 -1
  169. package/dist/esm/qds-inline-link.entry.js +3 -3
  170. package/dist/esm/qds-inline-link.entry.js.map +1 -1
  171. package/dist/esm/qds-input.entry.js +15 -11
  172. package/dist/esm/qds-input.entry.js.map +1 -1
  173. package/dist/esm/qds-label.entry.js +3 -3
  174. package/dist/esm/qds-list-item.entry.js +7 -5
  175. package/dist/esm/qds-list-item.entry.js.map +1 -1
  176. package/dist/esm/qds-loader.entry.js +1 -1
  177. package/dist/esm/qds-loader.entry.js.map +1 -1
  178. package/dist/esm/qds-menu-item.entry.js +3 -3
  179. package/dist/esm/qds-mini-button.entry.js +2 -2
  180. package/dist/esm/qds-progress-bar.entry.js +1 -1
  181. package/dist/esm/qds-select.entry.js +5 -5
  182. package/dist/esm/qds-select.entry.js.map +1 -1
  183. package/dist/esm/qds-standalone-link.entry.js +4 -4
  184. package/dist/esm/qds-standalone-link.entry.js.map +1 -1
  185. package/dist/esm/qds-switch.entry.js +4 -4
  186. package/dist/esm/qds-tab.entry.js +16 -11
  187. package/dist/esm/qds-tab.entry.js.map +1 -1
  188. package/dist/esm/qds-tabbar.entry.js +84 -28
  189. package/dist/esm/qds-tabbar.entry.js.map +1 -1
  190. package/dist/esm/qds-table-cell.entry.js +30 -3
  191. package/dist/esm/qds-table-cell.entry.js.map +1 -1
  192. package/dist/esm/qds-table-head-cell.entry.js +30 -3
  193. package/dist/esm/qds-table-head-cell.entry.js.map +1 -1
  194. package/dist/esm/qds-table-row.entry.js +2 -2
  195. package/dist/esm/qds-table-row.entry.js.map +1 -1
  196. package/dist/esm/qds-table.entry.js +1 -1
  197. package/dist/esm/qds-tag.entry.js +3 -3
  198. package/dist/esm/qds-tag.entry.js.map +1 -1
  199. package/dist/esm/qds-textarea.entry.js +4 -4
  200. package/dist/esm/qds-textarea.entry.js.map +1 -1
  201. package/dist/esm/qds-title.entry.js +3 -3
  202. package/dist/esm/qds-title.entry.js.map +1 -1
  203. package/dist/esm/qds-tooltip.entry.js +2 -2
  204. package/dist/esm/qds.js +1 -1
  205. package/dist/types/components/avatar-media/avatar-media.d.ts +14 -5
  206. package/dist/types/components/checkbox/checkbox.d.ts +4 -0
  207. package/dist/types/components/icon/icon.d.ts +1 -2
  208. package/dist/types/components/radio/radio.d.ts +4 -0
  209. package/dist/types/components/tab/tab.d.ts +1 -1
  210. package/dist/types/components/tabbar/tabbar.d.ts +27 -1
  211. package/dist/types/components/table-cell/table-cell.d.ts +6 -0
  212. package/dist/types/components/table-head-cell/table-head-cell.d.ts +6 -0
  213. package/dist/types/components.d.ts +72 -15
  214. package/dist/vscode.html-custom-data.json +79 -4
  215. package/hydrate/index.js +962 -732
  216. package/hydrate/index.mjs +962 -732
  217. package/package.json +1 -1
  218. package/styles/core.css +24 -22
  219. package/components/p-5dwtV5iH.js.map +0 -1
  220. package/components/p-C1c4JVlg.js.map +0 -1
  221. package/components/p-CDRwHAIT.js.map +0 -1
  222. package/components/p-CkUTS1aU.js.map +0 -1
  223. package/components/p-CkyaV9az.js.map +0 -1
  224. package/components/p-D9pW936J.js +0 -164
  225. package/components/p-D9pW936J.js.map +0 -1
  226. package/components/p-DNHI4C-W.js.map +0 -1
  227. package/components/p-DR79BVX5.js.map +0 -1
  228. package/components/p-DtxwXYGb.js.map +0 -1
  229. package/components/p-laE-pGH7.js +0 -163
  230. package/components/p-laE-pGH7.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"p-CjVnGhSO.js","mappings":";;;;;;;AAAA,MAAM,UAAU,GAAG,6bAA6b;;ACAhd;AACA;AACA;;;;;;;;;MAqBa,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;AALpB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;AAME;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAgB,UAAU;AAE5D;;AAEG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAwClD;IAvBW,eAAe,GAAA;AACvB,QAAA,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,YAAY;;IAGrE,iBAAiB,GAAA;AACtB,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,WAAW;AACjC,QAAA,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,MAAM;QAElC,IAAI,CAAC,eAAe,EAAE;;IAGjB,MAAM,GAAA;QACX,QACE,CACE,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE;AACL,gBAAA,aAAa,EAAE,IAAI;gBACnB,cAAc,EAAE,IAAI,CAAC,QAAQ;AAC9B,aAAA,EAAA,aAAA,EACW,MAAM,EACD,iBAAA,EAAA,sBAAA,CAAA,IAAI,EAAoB,kBAAA,EAAA,GAAA,EAAA,+BAAA,CAAA,EAAA,CACzC;;;;;;;;;;;;;AAhCJ,IAAA,QAAQ,IAAI,CAAC,UAAU;AACrB,QAAA,KAAK,YAAY;QACjB,KAAK,SAAS,EAAE;YACd,OAAO,IAAI,CAAC,UAAU;;QAExB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"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\n[data-importance='subdued'] {\n background-color: var(--qds-theme-divider-subdued);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { AttachInternals, Component, h, Prop, Watch } from '@stencil/core'\n\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?: Importance = 'standard'\n\n /**\n * Display the divider in vertical orientation.\n */\n @Prop() public readonly vertical: boolean = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n get #computedImportance(): Importance {\n switch (this.importance) {\n case 'emphasized':\n case 'subdued': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n @Watch('vertical')\n protected verticalChanged(): void {\n this.internals.ariaOrientation = this.vertical ? 'vertical' : 'horizontal'\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'separator'\n this.internals.ariaHidden = 'true'\n\n this.verticalChanged()\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 />\n )\n }\n}\n"],"version":3}
1
+ {"file":"p-CVuTVnQo.js","mappings":";;;;;;;AAAA,MAAM,UAAU,GAAG,6bAA6b;;ACAhd;AACA;AACA;;;;;;;;;MAqBa,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;AALpB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;AAME;;AAEG;AACqB,QAAA,IAAU,CAAA,UAAA,GAAgB,UAAU;AAE5D;;AAEG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAwClD;IAvBW,eAAe,GAAA;AACvB,QAAA,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,YAAY;;IAGrE,iBAAiB,GAAA;AACtB,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,WAAW;AACjC,QAAA,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,MAAM;QAElC,IAAI,CAAC,eAAe,EAAE;;IAGjB,MAAM,GAAA;QACX,QACE,CACE,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE;AACL,gBAAA,aAAa,EAAE,IAAI;gBACnB,cAAc,EAAE,IAAI,CAAC,QAAQ;AAC9B,aAAA,EAAA,aAAA,EACW,MAAM,EACD,iBAAA,EAAA,sBAAA,CAAA,IAAI,EAAoB,kBAAA,EAAA,GAAA,EAAA,+BAAA,CAAA,EAAA,CACzC;;;;;;;;;;;;;AAhCJ,IAAA,QAAQ,IAAI,CAAC,UAAU;AACrB,QAAA,KAAK,YAAY;QACjB,KAAK,SAAS,EAAE;YACd,OAAO,IAAI,CAAC,UAAU;;QAExB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"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\n[data-importance='subdued'] {\n background-color: var(--qds-theme-divider-subdued);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { AttachInternals, Component, h, Prop, Watch } from '@stencil/core'\n\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?: Importance = 'standard'\n\n /**\n * Display the divider in vertical orientation.\n */\n @Prop() public readonly vertical: boolean = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n get #computedImportance(): Importance {\n switch (this.importance) {\n case 'emphasized':\n case 'subdued': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n @Watch('vertical')\n protected verticalChanged(): void {\n this.internals.ariaOrientation = this.vertical ? 'vertical' : 'horizontal'\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'separator'\n this.internals.ariaHidden = 'true'\n\n this.verticalChanged()\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 />\n )\n }\n}\n"],"version":3}
@@ -4,9 +4,9 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { p as proxyCustomElement, H, h } from './p-D2489VzR.js';
7
- import { d as defineCustomElement$1 } from './p-DtxwXYGb.js';
7
+ import { d as defineCustomElement$1 } from './p-C9R8N06B.js';
8
8
 
9
- const titleCss = ":host([hidden]){display:none!important}:host{display:block}.qds-titles{display:grid;grid-template-areas:\"e\"}.qds-titles.qds-has-kicker{grid-template-areas:\"f\" \"e\"}.qds-titles.qds-has-subtitle{grid-template-areas:\"e\" \"g\"}.qds-titles.qds-has-kicker.qds-has-subtitle{grid-template-areas:\"f\" \"e\" \"g\"}.qds-has-icon{grid-template-areas:\"h e\";grid-template-columns:auto 1fr}.qds-has-icon.qds-has-kicker{grid-template-areas:\". f\" \"h e\"}.qds-has-icon.qds-has-subtitle{grid-template-areas:\"h e\" \". g\"}.qds-has-icon.qds-has-kicker.qds-has-subtitle{grid-template-areas:\". f\" \"h e\" \". g\"}.qds-title,.qds-titles{hyphens:inherit}.qds-kicker,.qds-subtitle{hyphens:manual}.qds-kicker,.qds-subtitle,.qds-title{margin-block:0}.qds-title{color:var(--qds-theme-title);grid-area:e}.qds-subtitle{color:var(--qds-theme-subtitle);grid-area:g}.qds-kicker{color:var(--qds-theme-kicker);grid-area:f}.qds-icon{align-content:center;color:var(--qds-theme-text-standard);grid-area:h}.qds-main.qds-section.qds-titles{gap:var(--qds-main-section-titles-gap)}.qds-main.qds-section.qds-has-icon{gap:var(--qds-main-section-titles-gap) var(--qds-main-section-titles-icon-gap)}.qds-main.qds-section .qds-title{font:var(--qds-main-section-title)}.qds-main.qds-section .qds-subtitle{font:var(--qds-main-section-subtitle)}.qds-main.qds-section .qds-kicker{font:var(--qds-main-section-kicker)}.qds-main.qds-section .qds-icon{height:var(--qds-main-section-titles-icon-crop-height);width:var(--qds-main-section-titles-icon-size)}.qds-main.qds-subsection.qds-titles{gap:var(--qds-main-subsection-titles-gap)}.qds-main.qds-subsection.qds-has-icon{gap:var(--qds-main-subsection-titles-gap) var(--qds-main-subsection-titles-icon-gap)}.qds-main.qds-subsection .qds-title{font:var(--qds-main-subsection-title)}.qds-main.qds-subsection .qds-subtitle{font:var(--qds-main-subsection-subtitle)}.qds-main.qds-subsection .qds-kicker{font:var(--qds-main-subsection-kicker)}.qds-main.qds-subsection .qds-icon{height:var(--qds-main-subsection-titles-icon-crop-height);width:var(--qds-main-subsection-titles-icon-size)}.qds-panel.qds-root.qds-titles{gap:var(--qds-panel-titles-gap)}.qds-panel.qds-root.qds-has-icon{gap:var(--qds-panel-titles-gap) var(--qds-panel-titles-icon-gap)}.qds-panel.qds-root .qds-title{font:var(--qds-panel-title)}.qds-panel.qds-root .qds-subtitle{font:var(--qds-panel-subtitle)}.qds-panel.qds-root .qds-kicker{font:var(--qds-panel-kicker)}.qds-panel.qds-root .qds-icon{height:var(--qds-panel-titles-icon-crop-height);width:var(--qds-panel-titles-icon-size)}.qds-panel.qds-section.qds-titles{gap:var(--qds-panel-section-titles-gap)}.qds-panel.qds-section.qds-has-icon{gap:var(--qds-panel-section-titles-gap) var(--qds-panel-section-titles-icon-gap)}.qds-panel.qds-section .qds-title{font:var(--qds-panel-section-title)}.qds-panel.qds-section .qds-subtitle{font:var(--qds-panel-section-subtitle)}.qds-panel.qds-section .qds-kicker{font:var(--qds-panel-section-kicker)}.qds-panel.qds-section .qds-icon{height:var(--qds-panel-section-titles-icon-crop-height);width:var(--qds-panel-section-titles-icon-size)}.qds-panel.qds-subsection.qds-titles{gap:var(--qds-panel-subsection-titles-gap)}.qds-panel.qds-subsection.qds-has-icon{gap:var(--qds-panel-subsection-titles-gap) var(--qds-panel-subsection-titles-icon-gap)}.qds-panel.qds-subsection .qds-title{font:var(--qds-panel-subsection-title)}.qds-panel.qds-subsection .qds-subtitle{font:var(--qds-panel-subsection-subtitle)}.qds-panel.qds-subsection .qds-kicker{font:var(--qds-panel-subsection-kicker)}.qds-panel.qds-subsection .qds-icon{height:var(--qds-panel-subsection-titles-icon-crop-height);width:var(--qds-panel-subsection-titles-icon-size)}.qds-navigation.qds-section.qds-titles{gap:var(--qds-navigation-section-titles-gap)}.qds-navigation.qds-section.qds-has-icon{gap:var(--qds-navigation-section-titles-gap) var(--qds-navigation-section-titles-icon-gap)}.qds-navigation.qds-section .qds-title{font:var(--qds-navigation-section-title)}.qds-navigation.qds-section .qds-subtitle{font:var(--qds-navigation-section-subtitle)}.qds-navigation.qds-section .qds-kicker{font:var(--qds-navigation-section-kicker)}.qds-navigation.qds-section .qds-icon{height:var(--qds-navigation-section-titles-icon-crop-height);width:var(--qds-navigation-section-titles-icon-size)}.qds-navigation.qds-subsection.qds-titles{gap:var(--qds-navigation-subsection-titles-gap)}.qds-navigation.qds-subsection.qds-has-icon{gap:var(--qds-navigation-subsection-titles-gap) var(--qds-navigation-subsection-titles-icon-gap)}.qds-navigation.qds-subsection .qds-title{font:var(--qds-navigation-subsection-title)}.qds-navigation.qds-subsection .qds-subtitle{font:var(--qds-navigation-subsection-subtitle)}.qds-navigation.qds-subsection .qds-kicker{font:var(--qds-navigation-subsection-kicker)}.qds-navigation.qds-subsection .qds-icon{height:var(--qds-navigation-subsection-titles-icon-crop-height);width:var(--qds-navigation-subsection-titles-icon-size)}.qds-popup.qds-root.qds-titles{gap:var(--qds-popup-titles-gap)}.qds-popup.qds-root.qds-has-icon{gap:var(--qds-popup-titles-gap) var(--qds-popup-titles-icon-gap)}.qds-popup.qds-root .qds-title{font:var(--qds-popup-title)}.qds-popup.qds-root .qds-subtitle{font:var(--qds-popup-subtitle)}.qds-popup.qds-root .qds-kicker{font:var(--qds-popup-kicker)}.qds-popup.qds-root .qds-icon{height:var(--qds-popup-titles-icon-crop-height);width:var(--qds-popup-titles-icon-size)}.qds-popup.qds-section.qds-titles{gap:var(--qds-popup-section-titles-gap)}.qds-popup.qds-section.qds-has-icon{gap:var(--qds-popup-section-titles-gap) var(--qds-popup-section-titles-icon-gap)}.qds-popup.qds-section .qds-title{font:var(--qds-popup-section-title)}.qds-popup.qds-section .qds-subtitle{font:var(--qds-popup-section-subtitle)}.qds-popup.qds-section .qds-kicker{font:var(--qds-popup-section-kicker)}.qds-popup.qds-section .qds-icon{height:var(--qds-popup-section-titles-icon-crop-height);width:var(--qds-popup-section-titles-icon-size)}.qds-popup.qds-subsection.qds-titles{gap:var(--qds-popup-subsection-titles-gap)}.qds-popup.qds-subsection.qds-has-icon{gap:var(--qds-popup-subsection-titles-gap) var(--qds-popup-subsection-titles-icon-gap)}.qds-popup.qds-subsection .qds-title{font:var(--qds-popup-subsection-title)}.qds-popup.qds-subsection .qds-subtitle{font:var(--qds-popup-subsection-subtitle)}.qds-popup.qds-subsection .qds-kicker{font:var(--qds-popup-subsection-kicker)}.qds-popup.qds-subsection .qds-icon{height:var(--qds-popup-subsection-titles-icon-crop-height);width:var(--qds-popup-subsection-titles-icon-size)}.qds-accessory.qds-root.qds-titles{gap:var(--qds-accessory-titles-gap)}.qds-accessory.qds-root.qds-has-icon{gap:var(--qds-accessory-titles-gap) var(--qds-accessory-titles-icon-gap)}.qds-accessory.qds-root .qds-title{font:var(--qds-accessory-title)}.qds-accessory.qds-root .qds-subtitle{font:var(--qds-accessory-subtitle)}.qds-accessory.qds-root .qds-kicker{font:var(--qds-accessory-kicker)}.qds-accessory.qds-root .qds-icon{height:var(--qds-accessory-titles-icon-crop-height);width:var(--qds-accessory-titles-icon-size)}.qds-accessory.qds-section.qds-titles{gap:var(--qds-accessory-section-titles-gap)}.qds-accessory.qds-section.qds-has-icon{gap:var(--qds-accessory-section-titles-gap) var(--qds-accessory-section-titles-icon-gap)}.qds-accessory.qds-section .qds-title{font:var(--qds-accessory-section-title)}.qds-accessory.qds-section .qds-subtitle{font:var(--qds-accessory-section-subtitle)}.qds-accessory.qds-section .qds-kicker{font:var(--qds-accessory-section-kicker)}.qds-accessory.qds-section .qds-icon{height:var(--qds-accessory-section-titles-icon-crop-height);width:var(--qds-accessory-section-titles-icon-size)}.qds-titles[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-promo-titles-gap);margin:auto}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-promo-title)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-subtitle{font:var(--qds-main-section-promo-subtitle)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-kicker{font:var(--qds-main-section-promo-kicker)}.qds-has-icon[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-promo-titles-gap) var(--qds-main-section-promo-titles-icon-gap)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-icon{height:var(--qds-main-section-promo-titles-icon-crop-height);width:var(--qds-main-section-promo-titles-icon-size)}[data-alignment=start]{text-align:start}[data-alignment=center]{text-align:center}[data-alignment=end]{text-align:end}.qds-titles[data-variant=web-main-section-display]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-display-titles-gap)}[data-variant=web-main-section-display]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-display-title)}.qds-titles[data-variant=web-main-subsection-card]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-subsection-card-titles-gap)}[data-variant=web-main-subsection-card]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-subsection-card-standard-title)}.qds-titles[data-variant=web-main-section-hero]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-hero-titles-gap)}[data-variant=web-main-section-hero]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-hero-title)}";
9
+ const titleCss = ":host([hidden]){display:none!important}:host{display:block}.qds-titles{display:grid;grid-template-areas:\"g\"}.qds-titles.qds-has-kicker{grid-template-areas:\"h\" \"g\"}.qds-titles.qds-has-subtitle{grid-template-areas:\"g\" \"i\"}.qds-titles.qds-has-kicker.qds-has-subtitle{grid-template-areas:\"h\" \"g\" \"i\"}.qds-has-icon{grid-template-areas:\"j g\";grid-template-columns:auto 1fr}.qds-has-icon.qds-has-kicker{grid-template-areas:\". h\" \"j g\"}.qds-has-icon.qds-has-subtitle{grid-template-areas:\"j g\" \". i\"}.qds-has-icon.qds-has-kicker.qds-has-subtitle{grid-template-areas:\". h\" \"j g\" \". i\"}.qds-title,.qds-titles{hyphens:inherit}.qds-kicker,.qds-subtitle{hyphens:manual}.qds-kicker,.qds-subtitle,.qds-title{margin-block:0}.qds-title{color:var(--qds-theme-title);grid-area:g}.qds-subtitle{color:var(--qds-theme-subtitle);grid-area:i}.qds-kicker{color:var(--qds-theme-kicker);grid-area:h}.qds-icon{align-content:center;color:var(--qds-theme-text-standard);grid-area:j}.qds-main.qds-section.qds-titles{gap:var(--qds-main-section-titles-gap)}.qds-main.qds-section.qds-has-icon{gap:var(--qds-main-section-titles-gap) var(--qds-main-section-titles-icon-gap)}.qds-main.qds-section .qds-title{font:var(--qds-main-section-title)}.qds-main.qds-section .qds-subtitle{font:var(--qds-main-section-subtitle)}.qds-main.qds-section .qds-kicker{font:var(--qds-main-section-kicker)}.qds-main.qds-section .qds-icon{height:var(--qds-main-section-titles-icon-crop-height);width:var(--qds-main-section-titles-icon-size)}.qds-main.qds-subsection.qds-titles{gap:var(--qds-main-subsection-titles-gap)}.qds-main.qds-subsection.qds-has-icon{gap:var(--qds-main-subsection-titles-gap) var(--qds-main-subsection-titles-icon-gap)}.qds-main.qds-subsection .qds-title{font:var(--qds-main-subsection-title)}.qds-main.qds-subsection .qds-subtitle{font:var(--qds-main-subsection-subtitle)}.qds-main.qds-subsection .qds-kicker{font:var(--qds-main-subsection-kicker)}.qds-main.qds-subsection .qds-icon{height:var(--qds-main-subsection-titles-icon-crop-height);width:var(--qds-main-subsection-titles-icon-size)}.qds-panel.qds-root.qds-titles{gap:var(--qds-panel-titles-gap)}.qds-panel.qds-root.qds-has-icon{gap:var(--qds-panel-titles-gap) var(--qds-panel-titles-icon-gap)}.qds-panel.qds-root .qds-title{font:var(--qds-panel-title)}.qds-panel.qds-root .qds-subtitle{font:var(--qds-panel-subtitle)}.qds-panel.qds-root .qds-kicker{font:var(--qds-panel-kicker)}.qds-panel.qds-root .qds-icon{height:var(--qds-panel-titles-icon-crop-height);width:var(--qds-panel-titles-icon-size)}.qds-panel.qds-section.qds-titles{gap:var(--qds-panel-section-titles-gap)}.qds-panel.qds-section.qds-has-icon{gap:var(--qds-panel-section-titles-gap) var(--qds-panel-section-titles-icon-gap)}.qds-panel.qds-section .qds-title{font:var(--qds-panel-section-title)}.qds-panel.qds-section .qds-subtitle{font:var(--qds-panel-section-subtitle)}.qds-panel.qds-section .qds-kicker{font:var(--qds-panel-section-kicker)}.qds-panel.qds-section .qds-icon{height:var(--qds-panel-section-titles-icon-crop-height);width:var(--qds-panel-section-titles-icon-size)}.qds-panel.qds-subsection.qds-titles{gap:var(--qds-panel-subsection-titles-gap)}.qds-panel.qds-subsection.qds-has-icon{gap:var(--qds-panel-subsection-titles-gap) var(--qds-panel-subsection-titles-icon-gap)}.qds-panel.qds-subsection .qds-title{font:var(--qds-panel-subsection-title)}.qds-panel.qds-subsection .qds-subtitle{font:var(--qds-panel-subsection-subtitle)}.qds-panel.qds-subsection .qds-kicker{font:var(--qds-panel-subsection-kicker)}.qds-panel.qds-subsection .qds-icon{height:var(--qds-panel-subsection-titles-icon-crop-height);width:var(--qds-panel-subsection-titles-icon-size)}.qds-navigation.qds-section.qds-titles{gap:var(--qds-navigation-section-titles-gap)}.qds-navigation.qds-section.qds-has-icon{gap:var(--qds-navigation-section-titles-gap) var(--qds-navigation-section-titles-icon-gap)}.qds-navigation.qds-section .qds-title{font:var(--qds-navigation-section-title)}.qds-navigation.qds-section .qds-subtitle{font:var(--qds-navigation-section-subtitle)}.qds-navigation.qds-section .qds-kicker{font:var(--qds-navigation-section-kicker)}.qds-navigation.qds-section .qds-icon{height:var(--qds-navigation-section-titles-icon-crop-height);width:var(--qds-navigation-section-titles-icon-size)}.qds-navigation.qds-subsection.qds-titles{gap:var(--qds-navigation-subsection-titles-gap)}.qds-navigation.qds-subsection.qds-has-icon{gap:var(--qds-navigation-subsection-titles-gap) var(--qds-navigation-subsection-titles-icon-gap)}.qds-navigation.qds-subsection .qds-title{font:var(--qds-navigation-subsection-title)}.qds-navigation.qds-subsection .qds-subtitle{font:var(--qds-navigation-subsection-subtitle)}.qds-navigation.qds-subsection .qds-kicker{font:var(--qds-navigation-subsection-kicker)}.qds-navigation.qds-subsection .qds-icon{height:var(--qds-navigation-subsection-titles-icon-crop-height);width:var(--qds-navigation-subsection-titles-icon-size)}.qds-popup.qds-root.qds-titles{gap:var(--qds-popup-titles-gap)}.qds-popup.qds-root.qds-has-icon{gap:var(--qds-popup-titles-gap) var(--qds-popup-titles-icon-gap)}.qds-popup.qds-root .qds-title{font:var(--qds-popup-title)}.qds-popup.qds-root .qds-subtitle{font:var(--qds-popup-subtitle)}.qds-popup.qds-root .qds-kicker{font:var(--qds-popup-kicker)}.qds-popup.qds-root .qds-icon{height:var(--qds-popup-titles-icon-crop-height);width:var(--qds-popup-titles-icon-size)}.qds-popup.qds-section.qds-titles{gap:var(--qds-popup-section-titles-gap)}.qds-popup.qds-section.qds-has-icon{gap:var(--qds-popup-section-titles-gap) var(--qds-popup-section-titles-icon-gap)}.qds-popup.qds-section .qds-title{font:var(--qds-popup-section-title)}.qds-popup.qds-section .qds-subtitle{font:var(--qds-popup-section-subtitle)}.qds-popup.qds-section .qds-kicker{font:var(--qds-popup-section-kicker)}.qds-popup.qds-section .qds-icon{height:var(--qds-popup-section-titles-icon-crop-height);width:var(--qds-popup-section-titles-icon-size)}.qds-popup.qds-subsection.qds-titles{gap:var(--qds-popup-subsection-titles-gap)}.qds-popup.qds-subsection.qds-has-icon{gap:var(--qds-popup-subsection-titles-gap) var(--qds-popup-subsection-titles-icon-gap)}.qds-popup.qds-subsection .qds-title{font:var(--qds-popup-subsection-title)}.qds-popup.qds-subsection .qds-subtitle{font:var(--qds-popup-subsection-subtitle)}.qds-popup.qds-subsection .qds-kicker{font:var(--qds-popup-subsection-kicker)}.qds-popup.qds-subsection .qds-icon{height:var(--qds-popup-subsection-titles-icon-crop-height);width:var(--qds-popup-subsection-titles-icon-size)}.qds-accessory.qds-root.qds-titles{gap:var(--qds-accessory-titles-gap)}.qds-accessory.qds-root.qds-has-icon{gap:var(--qds-accessory-titles-gap) var(--qds-accessory-titles-icon-gap)}.qds-accessory.qds-root .qds-title{font:var(--qds-accessory-title)}.qds-accessory.qds-root .qds-subtitle{font:var(--qds-accessory-subtitle)}.qds-accessory.qds-root .qds-kicker{font:var(--qds-accessory-kicker)}.qds-accessory.qds-root .qds-icon{height:var(--qds-accessory-titles-icon-crop-height);width:var(--qds-accessory-titles-icon-size)}.qds-accessory.qds-section.qds-titles{gap:var(--qds-accessory-section-titles-gap)}.qds-accessory.qds-section.qds-has-icon{gap:var(--qds-accessory-section-titles-gap) var(--qds-accessory-section-titles-icon-gap)}.qds-accessory.qds-section .qds-title{font:var(--qds-accessory-section-title)}.qds-accessory.qds-section .qds-subtitle{font:var(--qds-accessory-section-subtitle)}.qds-accessory.qds-section .qds-kicker{font:var(--qds-accessory-section-kicker)}.qds-accessory.qds-section .qds-icon{height:var(--qds-accessory-section-titles-icon-crop-height);width:var(--qds-accessory-section-titles-icon-size)}.qds-titles[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-promo-titles-gap);margin:auto}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-promo-title)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-subtitle{font:var(--qds-main-section-promo-subtitle)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-kicker{font:var(--qds-main-section-promo-kicker)}.qds-has-icon[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-promo-titles-gap) var(--qds-main-section-promo-titles-icon-gap)}[data-variant=web-main-section-promo]:is(.qds-root,.qds-section,.qds-subsection) .qds-icon{height:var(--qds-main-section-promo-titles-icon-crop-height);width:var(--qds-main-section-promo-titles-icon-size)}[data-alignment=start]{text-align:start}[data-alignment=center]{text-align:center}[data-alignment=end]{text-align:end}.qds-titles[data-variant=web-main-section-display]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-display-titles-gap)}[data-variant=web-main-section-display]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-display-title)}.qds-titles[data-variant=web-main-subsection-card]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-subsection-card-titles-gap)}[data-variant=web-main-subsection-card]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-subsection-card-standard-title)}.qds-titles[data-variant=web-main-section-hero]:is(.qds-root,.qds-section,.qds-subsection){gap:var(--qds-main-section-hero-titles-gap)}[data-variant=web-main-section-hero]:is(.qds-root,.qds-section,.qds-subsection) .qds-title{font:var(--qds-main-section-hero-title)}";
10
10
 
11
11
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
12
12
  //
@@ -51,14 +51,14 @@ const Title = /*@__PURE__*/ proxyCustomElement(class Title extends H {
51
51
  const level = `qds-${this.level ?? 'section'}`;
52
52
  const Tag = this.tag ?? 'h2';
53
53
  const hasIcon = this.iconName !== undefined && this.iconName !== '';
54
- return (h("hgroup", { key: '7c189575dd8ed51097af980d98291820f37624c4', "data-alignment": this.alignment ?? 'start', "data-variant": this.variant, class: {
54
+ return (h("hgroup", { key: 'ed0b1522df1d04ac5d4a19bfd4d801bac51aba5a', "data-alignment": this.alignment ?? 'start', "data-variant": this.variant, class: {
55
55
  [layer]: true,
56
56
  [level]: true,
57
57
  'qds-titles': true,
58
58
  'qds-has-icon': hasIcon,
59
59
  'qds-has-kicker': __classPrivateFieldGet(this, _Title_instances, "a", _Title_hasKicker_get),
60
60
  'qds-has-subtitle': __classPrivateFieldGet(this, _Title_instances, "a", _Title_hasSubtitle_get),
61
- }, role: "none" }, h(Tag, { key: '3f25e1c50fdb35604f43241aa510110b67965167', class: "qds-title", "data-variant": this.variant }, h("slot", { key: 'dde713ba933ac2664020cc41f3c10468eb65e607' })), __classPrivateFieldGet(this, _Title_instances, "a", _Title_hasKicker_get) && h("p", { key: '8c273bdb0967542e8c8e2c1d8ae1127830d98069', class: "qds-kicker" }, this.kicker), __classPrivateFieldGet(this, _Title_instances, "a", _Title_hasSubtitle_get) && h("p", { key: '1625372d50d0e15b68c776daa124ae07c3f5c569', class: "qds-subtitle" }, this.subtitle), hasIcon && (h("qds-icon", { key: 'b9819207b05b1de4a8a1461fd88bc1c7d90c3773', "aria-hidden": "true", class: "qds-icon", name: this.iconName, library: this.iconLibrary }))));
61
+ }, role: "none" }, h(Tag, { key: '9159ae4127d5be822227a6edd25d1297857686d7', class: "qds-title", "data-variant": this.variant }, h("slot", { key: '266cb1ded9c3d64320bd71d13393832f6e280a85' })), __classPrivateFieldGet(this, _Title_instances, "a", _Title_hasKicker_get) && h("p", { key: '5672a80281144196dc75fd811b5889afd997cf98', class: "qds-kicker" }, this.kicker), __classPrivateFieldGet(this, _Title_instances, "a", _Title_hasSubtitle_get) && h("p", { key: '499d0d4b792e9edba768472043c42b2fb08e3c62', class: "qds-subtitle" }, this.subtitle), hasIcon && (h("qds-icon", { key: 'f49f82e51dbfdefb3a1316372ee7d48ab2079e47', class: "qds-icon", name: this.iconName, library: this.iconLibrary }))));
62
62
  }
63
63
  static get style() { return titleCss; }
64
64
  }, [257, "qds-title", {
@@ -97,6 +97,6 @@ function defineCustomElement() {
97
97
  }
98
98
 
99
99
  export { Title as T, defineCustomElement as d };
100
- //# sourceMappingURL=p-CkUTS1aU.js.map
100
+ //# sourceMappingURL=p-Ck9w5WIb.js.map
101
101
 
102
- //# sourceMappingURL=p-CkUTS1aU.js.map
102
+ //# sourceMappingURL=p-Ck9w5WIb.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-Ck9w5WIb.js","mappings":";;;;;;;;AAAA,MAAM,QAAQ,GAAG,02SAA02S;;ACA33S;AACA;AACA;;;;;;;;;MAyBa,KAAK,iBAAAA,kBAAA,CAAA,MAAA,KAAA,SAAAC,CAAA,CAAA;AALlB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;AAME;;AAEG;AACqB,QAAA,IAAS,CAAA,SAAA,GAAe,OAAO;AASvD;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAW,SAAS;AAO/B,QAAA,IAAK,CAAA,KAAA,GAAW,MAAM;AAEtB,QAAA,IAA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AA,EAAA,oBAAA,CAAA,IAAI,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,YAAY,EAAE,EAAA,IAAI,CAAC,MAAM,CAAK,EAC1D,sBAAA,CAAA,IAAI,EAAa,gBAAA,EAAA,GAAA,EAAA,sBAAA,CAAA,IAAI,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,cAAc,EAAE,EAAA,IAAI,CAAC,QAAQ,CAAK,EAChE,OAAO,KACN,CACE,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,UAAU,EAChB,IAAI,EAAE,IAAI,CAAC,QAAQ,EACnB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,CAAA,CACH,CACM;;;;;;;;;;;;;;;IA3CX,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE;AAC5D,CAAC,EAAA,oBAAA,GAAA,SAAA,oBAAA,GAAA;IAGC,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE;AACxD,CAAC;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/title/title.css?tag=qds-title&encapsulation=shadow","src/components/title/title.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-titles {\n display: grid;\n grid-template-areas: 'title';\n\n &.qds-has-kicker {\n grid-template-areas:\n 'kicker'\n 'title';\n }\n\n &.qds-has-subtitle {\n grid-template-areas:\n 'title'\n 'subtitle';\n }\n\n &.qds-has-kicker.qds-has-subtitle {\n grid-template-areas:\n 'kicker'\n 'title'\n 'subtitle';\n }\n}\n\n.qds-has-icon {\n grid-template-columns: auto 1fr;\n grid-template-areas: 'icon title';\n\n &.qds-has-kicker {\n grid-template-areas:\n '. kicker'\n 'icon title';\n }\n\n &.qds-has-subtitle {\n grid-template-areas:\n 'icon title'\n '. subtitle';\n }\n\n &.qds-has-kicker.qds-has-subtitle {\n grid-template-areas:\n '. kicker'\n 'icon title'\n '. subtitle';\n }\n}\n\n.qds-titles,\n.qds-title {\n hyphens: inherit;\n}\n\n.qds-subtitle,\n.qds-kicker {\n hyphens: initial;\n}\n\n.qds-title,\n.qds-subtitle,\n.qds-kicker {\n margin-block: 0;\n}\n\n.qds-title {\n grid-area: title;\n color: var(--qds-theme-title);\n}\n\n.qds-subtitle {\n grid-area: subtitle;\n color: var(--qds-theme-subtitle);\n}\n\n.qds-kicker {\n grid-area: kicker;\n color: var(--qds-theme-kicker);\n}\n\n.qds-icon {\n grid-area: icon;\n align-content: center;\n color: var(--qds-theme-text-standard);\n}\n\n.qds-main {\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-main-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-section-titles-gap)\n var(--qds-main-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-main-section-titles-icon-size);\n height: var(--qds-main-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-main-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-subsection-titles-gap)\n var(--qds-main-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-main-subsection-titles-icon-size);\n height: var(--qds-main-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-panel {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-panel-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-titles-gap) var(--qds-panel-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-titles-icon-size);\n height: var(--qds-panel-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-panel-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-section-titles-gap)\n var(--qds-panel-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-section-titles-icon-size);\n height: var(--qds-panel-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-panel-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-panel-subsection-titles-gap)\n var(--qds-panel-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-panel-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-panel-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-panel-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-panel-subsection-titles-icon-size);\n height: var(--qds-panel-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-navigation {\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-navigation-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-navigation-section-titles-gap)\n var(--qds-navigation-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-navigation-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-navigation-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-navigation-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-navigation-section-titles-icon-size);\n height: var(--qds-navigation-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-navigation-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-navigation-subsection-titles-gap)\n var(--qds-navigation-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-navigation-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-navigation-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-navigation-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-navigation-subsection-titles-icon-size);\n height: var(--qds-navigation-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-popup {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-popup-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-titles-gap) var(--qds-popup-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-titles-icon-size);\n height: var(--qds-popup-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-popup-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-section-titles-gap)\n var(--qds-popup-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-section-titles-icon-size);\n height: var(--qds-popup-section-titles-icon-crop-height);\n }\n }\n\n &.qds-subsection {\n &.qds-titles {\n gap: var(--qds-popup-subsection-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-popup-subsection-titles-gap)\n var(--qds-popup-subsection-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-popup-subsection-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-popup-subsection-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-popup-subsection-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-popup-subsection-titles-icon-size);\n height: var(--qds-popup-subsection-titles-icon-crop-height);\n }\n }\n}\n\n.qds-accessory {\n &.qds-root {\n &.qds-titles {\n gap: var(--qds-accessory-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-accessory-titles-gap) var(--qds-accessory-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-accessory-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-accessory-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-accessory-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-accessory-titles-icon-size);\n height: var(--qds-accessory-titles-icon-crop-height);\n }\n }\n\n &.qds-section {\n &.qds-titles {\n gap: var(--qds-accessory-section-titles-gap);\n }\n\n &.qds-has-icon {\n gap: var(--qds-accessory-section-titles-gap)\n var(--qds-accessory-section-titles-icon-gap);\n }\n\n & .qds-title {\n font: var(--qds-accessory-section-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-accessory-section-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-accessory-section-kicker);\n }\n\n & .qds-icon {\n width: var(--qds-accessory-section-titles-icon-size);\n height: var(--qds-accessory-section-titles-icon-crop-height);\n }\n }\n}\n\n[data-variant='web-main-section-promo'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-promo-titles-gap);\n margin: auto;\n }\n\n & .qds-title {\n font: var(--qds-main-section-promo-title);\n }\n\n & .qds-subtitle {\n font: var(--qds-main-section-promo-subtitle);\n }\n\n & .qds-kicker {\n font: var(--qds-main-section-promo-kicker);\n }\n\n &.qds-has-icon {\n gap: var(--qds-main-section-promo-titles-gap)\n var(--qds-main-section-promo-titles-icon-gap);\n }\n\n & .qds-icon {\n width: var(--qds-main-section-promo-titles-icon-size);\n height: var(--qds-main-section-promo-titles-icon-crop-height);\n }\n }\n}\n\n[data-alignment='start'] {\n text-align: start;\n}\n\n[data-alignment='center'] {\n text-align: center;\n}\n\n[data-alignment='end'] {\n text-align: end;\n}\n\n[data-variant='web-main-section-display'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-display-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-display-title);\n }\n }\n}\n\n[data-variant='web-main-subsection-card'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-subsection-card-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-subsection-card-standard-title);\n }\n }\n}\n\n[data-variant='web-main-section-hero'] {\n &:is(.qds-root, .qds-section, .qds-subsection) {\n &.qds-titles {\n gap: var(--qds-main-section-hero-titles-gap);\n }\n\n & .qds-title {\n font: var(--qds-main-section-hero-title);\n }\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { AttachInternals, Component, h, Prop } from '@stencil/core'\n\nexport type Layer = 'accessory' | 'main' | 'navigation' | 'panel' | 'popup'\nexport type Level = 'root' | 'section' | 'subsection'\nexport type Tag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\nexport type TitleVariant =\n | 'web-main-section-display'\n | 'web-main-section-hero'\n | 'web-main-section-promo'\n | 'web-main-subsection-card'\n\nexport type Alignment = 'center' | 'end' | 'start'\n\n/**\n * @slot Content to display for the title.\n * @see https://quartz.se.com/build/components/title\n */\n@Component({\n tag: 'qds-title',\n shadow: true,\n styleUrl: 'title.css',\n})\nexport class Title implements ComponentInterface {\n /**\n * The alignment of the title.\n */\n @Prop() public readonly alignment?: Alignment = 'start'\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * Text to display for the kicker.\n */\n @Prop() public readonly kicker?: string\n\n @Prop() public readonly layer?: Layer = 'main'\n\n @Prop() public readonly level?: Level = 'section'\n\n /**\n * Text to display for the subtitle.\n */\n @Prop() public readonly subtitle?: string\n\n /**\n * HTML tag to use to render the title.\n */\n @Prop() public readonly tag?: Tag = 'h2'\n\n /**\n * The title's variant.\n */\n @Prop() public readonly variant?: TitleVariant\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n get #hasSubtitle(): boolean {\n return this.subtitle !== undefined && this.subtitle !== ''\n }\n\n get #hasKicker(): boolean {\n return this.kicker !== undefined && this.kicker !== ''\n }\n\n public componentWillLoad(): void {\n this.internals.role = 'group'\n }\n\n public render() {\n const layer = `qds-${this.layer ?? 'main'}`\n const level = `qds-${this.level ?? 'section'}`\n const Tag = this.tag ?? 'h2'\n const hasIcon = this.iconName !== undefined && this.iconName !== ''\n\n return (\n <hgroup\n data-alignment={this.alignment ?? 'start'}\n data-variant={this.variant}\n class={{\n [layer]: true,\n [level]: true,\n 'qds-titles': true,\n 'qds-has-icon': hasIcon,\n 'qds-has-kicker': this.#hasKicker,\n 'qds-has-subtitle': this.#hasSubtitle,\n }}\n role=\"none\"\n >\n <Tag class=\"qds-title\" data-variant={this.variant}>\n <slot />\n </Tag>\n {this.#hasKicker && <p class=\"qds-kicker\">{this.kicker}</p>}\n {this.#hasSubtitle && <p class=\"qds-subtitle\">{this.subtitle}</p>}\n {hasIcon && (\n <qds-icon\n class=\"qds-icon\"\n name={this.iconName}\n library={this.iconLibrary}\n />\n )}\n </hgroup>\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,200 @@
1
+ /*!
2
+ * SPDX-FileCopyrightText: © 2026 Schneider Electric
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { p as proxyCustomElement, H, c as createEvent, d as readTask, h } from './p-D2489VzR.js';
7
+ import { p as pickFocusEventAttributes, f as ignorePromise, i as invariant, a as isEllipsisActive, c as inheritAriaAttributes } from './p-BalM52S_.js';
8
+ import { d as defineCustomElement$2 } from './p-C9R8N06B.js';
9
+ import { d as defineCustomElement$1 } from './p-oqmnh-8P.js';
10
+
11
+ const radioCss = "[hidden].sc-qds-radio-h{display:none!important}.sc-qds-radio-h{display:inline-block;line-height:0}.qds-icon.sc-qds-radio,.qds-radio.sc-qds-radio{grid-area:e;place-self:center}.qds-icon.sc-qds-radio{display:none;pointer-events:none}.qds-container.sc-qds-radio{display:grid;grid-template-areas:\"e\"}.qds-label.sc-qds-radio{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label.sc-qds-radio:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label.sc-qds-radio:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label.sc-qds-radio:has(.qds-radio:focus-visible){box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner.sc-qds-radio{color:var(--qds-theme-control-text-standard);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;width:100%}.qds-required.sc-qds-radio{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}.qds-tooltip.sc-qds-radio{line-height:normal}.qds-radio.sc-qds-radio{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-rounded-border-radius);cursor:pointer;margin:0;padding:var(--qds-control-toggle-padding);-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-radio.sc-qds-radio:focus-visible{outline:none}.qds-radio.sc-qds-radio:checked~.qds-icon.sc-qds-radio{color:var(--qds-theme-control-background-contrast);display:block}[aria-disabled=true].sc-qds-radio{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-radio[data-size=small].sc-qds-radio{height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small].sc-qds-radio{font-size:var(--qds-control-toggle-small-box-size)}.qds-label[data-size=small].sc-qds-radio{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-label-inner[data-size=small].sc-qds-radio{font:var(--qds-control-small-text)}.qds-inline[data-size=small].sc-qds-radio{min-height:var(--qds-control-small-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-radio[data-size=standard].sc-qds-radio{height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard].sc-qds-radio{font-size:var(--qds-control-toggle-standard-box-size)}.qds-label[data-size=standard].sc-qds-radio{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-label-inner[data-size=standard].sc-qds-radio{font:var(--qds-control-standard-text)}.qds-inline[data-size=standard].sc-qds-radio{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-radio[data-size=large].sc-qds-radio{height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large].sc-qds-radio{font-size:var(--qds-control-toggle-large-box-size)}.qds-label[data-size=large].sc-qds-radio{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-label-inner[data-size=large].sc-qds-radio{font:var(--qds-control-large-text)}.qds-inline[data-size=large].sc-qds-radio{min-height:var(--qds-control-large-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}";
12
+
13
+ // SPDX-FileCopyrightText: © 2024 Schneider Electric
14
+ //
15
+ // SPDX-License-Identifier: Apache-2.0
16
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
17
+ if (kind === "a" && !f)
18
+ throw new TypeError("Private accessor was defined without a getter");
19
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
20
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
21
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
22
+ };
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 _Radio_instances, _Radio_inheritedAttributes, _Radio_input, _Radio_ro, _Radio_span, _Radio_tooltip, _Radio_computedDisabled_get, _Radio_computedSize_get, _Radio_hasText_get, _Radio_ref, _Radio_onBlur, _Radio_onFocus, _Radio_spanRef, _Radio_tooltipRef, _Radio_onChange;
33
+ const Radio = /*@__PURE__*/ proxyCustomElement(class Radio extends H {
34
+ constructor(registerHost) {
35
+ super();
36
+ if (registerHost !== false) {
37
+ this.__registerHost();
38
+ }
39
+ this.blurEmitter = createEvent(this, "qdsBlur", 2);
40
+ this.changeEmitter = createEvent(this, "qdsChange", 6);
41
+ this.focusEmitter = createEvent(this, "qdsFocus", 2);
42
+ _Radio_instances.add(this);
43
+ /**
44
+ * Adds vertical margin to the radio for alignment.
45
+ *
46
+ * This is useful when creating inline layouts so that the first lines have
47
+ * the correct vertical centering.
48
+ */
49
+ this.inline = false;
50
+ /**
51
+ * The radio button's size.
52
+ */
53
+ this.size = 'standard';
54
+ this.tooltip = false;
55
+ _Radio_inheritedAttributes.set(this, {});
56
+ _Radio_input.set(this, void 0);
57
+ _Radio_ro.set(this, void 0);
58
+ _Radio_span.set(this, void 0);
59
+ _Radio_tooltip.set(this, void 0);
60
+ _Radio_ref.set(this, (input) => {
61
+ __classPrivateFieldSet(this, _Radio_input, input, "f");
62
+ });
63
+ _Radio_onBlur.set(this, (event) => {
64
+ this.blurEmitter.emit(pickFocusEventAttributes(event));
65
+ if (__classPrivateFieldGet(this, _Radio_tooltip, "f"))
66
+ ignorePromise(__classPrivateFieldGet(this, _Radio_tooltip, "f").close());
67
+ });
68
+ _Radio_onFocus.set(this, (event) => {
69
+ this.focusEmitter.emit(pickFocusEventAttributes(event));
70
+ if (__classPrivateFieldGet(this, _Radio_tooltip, "f"))
71
+ ignorePromise(__classPrivateFieldGet(this, _Radio_tooltip, "f").show());
72
+ });
73
+ _Radio_spanRef.set(this, (span) => {
74
+ __classPrivateFieldSet(this, _Radio_span, span, "f");
75
+ });
76
+ _Radio_tooltipRef.set(this, (tooltip) => {
77
+ if (tooltip) {
78
+ // eslint-disable-next-line no-param-reassign
79
+ tooltip.target = this.host;
80
+ __classPrivateFieldSet(this, _Radio_tooltip, tooltip, "f");
81
+ }
82
+ });
83
+ _Radio_onChange.set(this, () => {
84
+ this.changeEmitter.emit();
85
+ });
86
+ }
87
+ onClick(event) {
88
+ if (__classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get)) {
89
+ event.stopImmediatePropagation();
90
+ return;
91
+ }
92
+ invariant(__classPrivateFieldGet(this, _Radio_input, "f"));
93
+ this.checked = __classPrivateFieldGet(this, _Radio_input, "f").checked;
94
+ }
95
+ tabindexChanged(newValue) {
96
+ const parsedValue = Number.parseInt(newValue, 10);
97
+ this.tabIndex =
98
+ parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
99
+ }
100
+ textChanged() {
101
+ if (__classPrivateFieldGet(this, _Radio_ro, "f"))
102
+ __classPrivateFieldGet(this, _Radio_ro, "f").disconnect();
103
+ if (!__classPrivateFieldGet(this, _Radio_span, "f"))
104
+ return;
105
+ const span = __classPrivateFieldGet(this, _Radio_span, "f");
106
+ readTask(() => {
107
+ this.tooltip = isEllipsisActive(span);
108
+ });
109
+ __classPrivateFieldSet(this, _Radio_ro, new ResizeObserver(([spanEntry]) => {
110
+ this.tooltip = isEllipsisActive(spanEntry.target);
111
+ }), "f");
112
+ __classPrivateFieldGet(this, _Radio_ro, "f").observe(__classPrivateFieldGet(this, _Radio_span, "f"));
113
+ }
114
+ componentWillLoad() {
115
+ __classPrivateFieldSet(this, _Radio_inheritedAttributes, inheritAriaAttributes(this.host), "f");
116
+ this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
117
+ }
118
+ componentDidLoad() {
119
+ this.textChanged();
120
+ }
121
+ disconnectedCallback() {
122
+ if (__classPrivateFieldGet(this, _Radio_ro, "f"))
123
+ __classPrivateFieldGet(this, _Radio_ro, "f").disconnect();
124
+ }
125
+ render() {
126
+ return (
127
+ // eslint-disable-next-line jsx-a11y/label-has-associated-control
128
+ h("label", { key: '62bb3624c0b808bd128e2377215d63ed03f03c9f', "aria-disabled": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? 'true' : undefined, class: {
129
+ 'qds-inline': this.inline,
130
+ 'qds-label': true,
131
+ }, "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get) }, h("div", { key: '0162d9e7c109e914c2450ea0ecbeeb17e228d106', class: "qds-container" }, h("input", { key: '076c5b110f38044837431b6d1d43196700ec97b2',
132
+ // eslint-disable-next-line jsx-a11y/no-autofocus
133
+ autoFocus: this.host.autofocus, checked: this.checked, class: "qds-radio", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), disabled: this.disabled, form: this.form, name: this.name, onBlur: __classPrivateFieldGet(this, _Radio_onBlur, "f"), onChange: __classPrivateFieldGet(this, _Radio_onChange, "f"), onFocus: __classPrivateFieldGet(this, _Radio_onFocus, "f"), ref: __classPrivateFieldGet(this, _Radio_ref, "f"), required: this.required, tabIndex: __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? undefined : this.tabIndex, type: "radio", value: this.value ?? undefined, ...__classPrivateFieldGet(this, _Radio_inheritedAttributes, "f") }), h("qds-icon", { key: '668a2d22e68b6f1d49cb5b9798b99dbd6d5a05a5', class: "qds-icon", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), library: "core", name: "checked-radio" })), __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_hasText_get) && (h("span", { key: 'f1205a0e975d4e59a907239a0371fe8864e5adfd', class: "qds-label-inner", "data-size": __classPrivateFieldGet(this, _Radio_instances, "a", _Radio_computedSize_get), ref: __classPrivateFieldGet(this, _Radio_spanRef, "f") }, this.required === true && h("span", { key: '77c767cab283f45e4f5d4d23caab06ddd200c214', class: "qds-required" }, "*"), this.text)), this.tooltip && (h("qds-tooltip", { key: '905dbef82ca3a3803e536bceca43c1bee35eb195', "aria-hidden": "true", class: "qds-tooltip", ref: __classPrivateFieldGet(this, _Radio_tooltipRef, "f") }, this.text))));
134
+ }
135
+ get host() { return this; }
136
+ static get watchers() { return {
137
+ "tabindex": ["tabindexChanged"],
138
+ "text": ["textChanged"]
139
+ }; }
140
+ static get style() { return radioCss; }
141
+ }, [258, "qds-radio", {
142
+ "inline": [4],
143
+ "size": [1],
144
+ "text": [1],
145
+ "checked": [1028],
146
+ "disabled": [4],
147
+ "form": [1],
148
+ "name": [1],
149
+ "required": [4],
150
+ "value": [1032],
151
+ "tabIndex": [32],
152
+ "tooltip": [32]
153
+ }, [[0, "click", "onClick"]], {
154
+ "tabindex": ["tabindexChanged"],
155
+ "text": ["textChanged"]
156
+ }]);
157
+ _Radio_inheritedAttributes = new WeakMap(), _Radio_input = new WeakMap(), _Radio_ro = new WeakMap(), _Radio_span = new WeakMap(), _Radio_tooltip = new WeakMap(), _Radio_ref = new WeakMap(), _Radio_onBlur = new WeakMap(), _Radio_onFocus = new WeakMap(), _Radio_spanRef = new WeakMap(), _Radio_tooltipRef = new WeakMap(), _Radio_onChange = new WeakMap(), _Radio_instances = new WeakSet(), _Radio_computedDisabled_get = function _Radio_computedDisabled_get() {
158
+ return this.disabled ?? false;
159
+ }, _Radio_computedSize_get = function _Radio_computedSize_get() {
160
+ switch (this.size) {
161
+ case 'standard':
162
+ case 'small':
163
+ case 'large': {
164
+ return this.size;
165
+ }
166
+ default: {
167
+ return 'standard';
168
+ }
169
+ }
170
+ }, _Radio_hasText_get = function _Radio_hasText_get() {
171
+ return this.text !== undefined && this.text !== '';
172
+ };
173
+ function defineCustomElement() {
174
+ if (typeof customElements === "undefined") {
175
+ return;
176
+ }
177
+ const components = ["qds-radio", "qds-icon", "qds-tooltip"];
178
+ components.forEach(tagName => { switch (tagName) {
179
+ case "qds-radio":
180
+ if (!customElements.get(tagName)) {
181
+ customElements.define(tagName, Radio);
182
+ }
183
+ break;
184
+ case "qds-icon":
185
+ if (!customElements.get(tagName)) {
186
+ defineCustomElement$2();
187
+ }
188
+ break;
189
+ case "qds-tooltip":
190
+ if (!customElements.get(tagName)) {
191
+ defineCustomElement$1();
192
+ }
193
+ break;
194
+ } });
195
+ }
196
+
197
+ export { Radio as R, defineCustomElement as d };
198
+ //# sourceMappingURL=p-DCAlWquR.js.map
199
+
200
+ //# sourceMappingURL=p-DCAlWquR.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-DCAlWquR.js","mappings":";;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,wrIAAwrI;;ACAzsI;AACA;AACA;;;;;;;;;;;;;;;;;;MAyCa,KAAK,iBAAAA,kBAAA,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,CAAC,EAAA,kBAAA,GAAA,SAAA,kBAAA,GAAA;IAGC,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE;AACpD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/radio/radio.css?tag=qds-radio&encapsulation=scoped","src/components/radio/radio.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-radio,\n.qds-icon {\n grid-area: radio;\n place-self: center;\n}\n\n.qds-icon {\n display: none;\n pointer-events: none;\n}\n\n.qds-container {\n display: grid;\n grid-template-areas: 'radio';\n}\n\n.qds-label {\n cursor: pointer;\n display: inline-flex;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n width: inherit;\n border-radius: var(--qds-control-border-radius);\n background-color: var(--qds-theme-interactive-background-default);\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n }\n\n &:has(.qds-radio:focus-visible) {\n /* inner ring */\n outline: var(--qds-theme-focus-border-contrast) solid\n var(--qds-focus-light-border-width);\n outline-offset: 0;\n\n /* outer ring */\n box-shadow: 0 0 0 var(--qds-focus-heavy-border-width)\n var(--qds-theme-focus-border);\n }\n}\n\n.qds-label-inner {\n color: var(--qds-theme-control-text-standard);\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n width: 100%;\n}\n\n.qds-required {\n color: var(--qds-theme-feedback-field-required);\n user-select: none;\n}\n\n.qds-tooltip {\n line-height: initial;\n}\n\n.qds-radio {\n appearance: none;\n background-color: var(--qds-theme-interactive-background-default);\n border-radius: var(--qds-control-rounded-border-radius);\n border: var(--qds-control-border-width) solid var(--qds-theme-control-border);\n cursor: pointer;\n margin: 0;\n padding: var(--qds-control-toggle-padding);\n print-color-adjust: exact;\n\n &:focus-visible {\n outline: none;\n }\n\n &:checked {\n & ~ .qds-icon {\n display: block;\n color: var(--qds-theme-control-background-contrast);\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-radio {\n width: var(--qds-control-toggle-small-box-size);\n height: var(--qds-control-toggle-small-box-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-toggle-small-box-size);\n }\n\n &.qds-label {\n gap: var(--qds-control-small-gap-siblings-related);\n min-height: var(--qds-control-toggle-small-height);\n padding-block: var(--qds-control-no-inline-small-padding-vertical);\n min-width: var(--qds-control-toggle-small-width);\n }\n\n &.qds-label-inner {\n font: var(--qds-control-small-text);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-small-height);\n padding: var(--qds-control-standard-padding-auto-height)\n var(--qds-control-toggle-standard-padding-horizontal);\n }\n}\n\n[data-size='standard'] {\n &.qds-radio {\n width: var(--qds-control-toggle-standard-box-size);\n height: var(--qds-control-toggle-standard-box-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-toggle-standard-box-size);\n }\n\n &.qds-label {\n gap: var(--qds-control-standard-gap-siblings-related);\n min-height: var(--qds-control-toggle-standard-height);\n padding-block: var(--qds-control-no-inline-standard-padding-vertical);\n min-width: var(--qds-control-toggle-standard-width);\n }\n\n &.qds-label-inner {\n font: var(--qds-control-standard-text);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-standard-height);\n padding: var(--qds-control-standard-padding-auto-height)\n var(--qds-control-toggle-standard-padding-horizontal);\n }\n}\n\n[data-size='large'] {\n &.qds-radio {\n width: var(--qds-control-toggle-large-box-size);\n height: var(--qds-control-toggle-large-box-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-toggle-large-box-size);\n }\n\n &.qds-label {\n gap: var(--qds-control-large-gap-siblings-related);\n min-height: var(--qds-control-toggle-large-height);\n padding-block: var(--qds-control-no-inline-large-padding-vertical);\n min-width: var(--qds-control-toggle-large-width);\n }\n\n &.qds-label-inner {\n font: var(--qds-control-large-text);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-large-height);\n padding: var(--qds-control-standard-padding-auto-height)\n var(--qds-control-toggle-standard-padding-horizontal);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n readTask,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { Attributes, QdsFocusEventDetail } from '../../helpers'\nimport {\n ignorePromise,\n inheritAriaAttributes,\n invariant,\n isEllipsisActive,\n pickFocusEventAttributes,\n} from '../../helpers'\nimport type { Value } from '../controls'\nimport type { Size } from '../shared'\n\n/**\n * `<qds-radio>` elements are rendered as circles that are filled when\n * selected. They are generally used in **radio groups** — collections of radio\n * buttons describing a set of related options.\n *\n * Only one radio button in a given radio group can be selected at the same\n * time.\n *\n * @see https://quartz.se.com/build/components/radio\n */\n@Component({\n tag: 'qds-radio',\n scoped: true,\n styleUrl: 'radio.css',\n})\nexport class Radio implements ComponentInterface {\n /**\n * Adds vertical margin to the radio 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 radio button's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The radio button's text.\n */\n @Prop() public readonly text?: string\n\n /**\n * Sets the radio button's state.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public checked?: boolean\n\n /**\n * Prevents the radio button from being interacted with: it cannot be pressed\n * or focused.\n *\n * @webnative\n */\n @Prop() public readonly disabled?: boolean\n\n /**\n * The [`<form>`](https://developer.mozilla.org/docs/Web/HTML/Element/form)\n * element to associate the radio button with (its form owner).\n *\n * The value of this property must be the id of a `<form>` in the same\n * document. If this property is not set, the `<qds-radio>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This property lets you associate `<qds-radio>` 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 * @webnative\n */\n @Prop() public readonly form?: string\n\n /**\n * Specify the radio group this radio button belongs to.\n *\n * Once a radio group is established, selecting any radio button in that\n * group automatically deselects any currently-selected radio button in the\n * same group.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * Specify the group the radio button belongs to as required.\n *\n * If any radio button in a same-named group of radio buttons has the\n * `required` attribute, a radio button in that group must be checked,\n * although it doesn't have to be the one with the attribute applied.\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The value of the radio button, submitted as a name/value pair with form\n * data.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public value?: Value\n\n /**\n * Emitted when the radio button loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the radio button is checked by the user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the radio button gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private tabIndex?: number\n\n @State() private tooltip = false\n\n #inheritedAttributes: Attributes = {}\n\n #input?: HTMLInputElement\n\n #ro?: ResizeObserver\n\n #span?: HTMLSpanElement\n\n #tooltip?: HTMLQdsTooltipElement\n\n get #computedDisabled(): boolean {\n return this.disabled ?? 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 #hasText(): boolean {\n return this.text !== undefined && this.text !== ''\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) {\n event.stopImmediatePropagation()\n return\n }\n\n invariant(this.#input)\n\n this.checked = this.#input.checked\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n @Watch('text')\n protected textChanged(): void {\n if (this.#ro) this.#ro.disconnect()\n\n if (!this.#span) return\n\n const span = this.#span\n readTask(() => {\n this.tooltip = isEllipsisActive(span)\n })\n this.#ro = new ResizeObserver(([spanEntry]) => {\n this.tooltip = isEllipsisActive(spanEntry.target as HTMLSpanElement)\n })\n this.#ro.observe(this.#span)\n }\n\n public componentWillLoad(): void {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\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 // 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.checked}\n class=\"qds-radio\"\n data-size={this.#computedSize}\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n onBlur={this.#onBlur}\n onChange={this.#onChange}\n onFocus={this.#onFocus}\n ref={this.#ref}\n required={this.required}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n type=\"radio\"\n value={this.value ?? undefined}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n <qds-icon\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library=\"core\"\n name=\"checked-radio\"\n />\n </div>\n {this.#hasText && (\n <span\n class=\"qds-label-inner\"\n data-size={this.#computedSize}\n ref={this.#spanRef}\n >\n {this.required === true && <span class=\"qds-required\">*</span>}\n {this.text}\n </span>\n )}\n {this.tooltip && (\n <qds-tooltip\n aria-hidden=\"true\"\n class=\"qds-tooltip\"\n ref={this.#tooltipRef}\n >\n {this.text}\n </qds-tooltip>\n )}\n </label>\n )\n }\n\n readonly #ref = (input?: HTMLInputElement): void => {\n this.#input = input\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n if (this.#tooltip) ignorePromise(this.#tooltip.close())\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n if (this.#tooltip) ignorePromise(this.#tooltip.show())\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.host\n this.#tooltip = tooltip\n }\n }\n\n readonly #onChange = (): void => {\n this.changeEmitter.emit()\n }\n}\n"],"version":3}
@@ -3,14 +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-D2489VzR.js';
7
- import { p as pickFocusEventAttributes, c as inheritAriaAttributes } from './p-CURs27Ur.js';
6
+ import { p as proxyCustomElement, H, c as createEvent, d as readTask, h } from './p-D2489VzR.js';
7
+ import { p as pickFocusEventAttributes, f as ignorePromise, a as isEllipsisActive, c as inheritAriaAttributes } from './p-BalM52S_.js';
8
8
  import { V as VALID_STATE, C as CUSTOM_ERROR_FLAGS, N as NO_ERROR_FLAGS } from './p-CZRW1LV_.js';
9
- import { d as defineCustomElement$3 } from './p-DtxwXYGb.js';
10
- import { d as defineCustomElement$2 } from './p-laE-pGH7.js';
11
- import { d as defineCustomElement$1 } from './p-D82sb4oJ.js';
9
+ import { d as defineCustomElement$2 } from './p-C9R8N06B.js';
10
+ import { d as defineCustomElement$1 } from './p-oqmnh-8P.js';
12
11
 
13
- const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-checkbox,.qds-icon{grid-area:c;place-self:center}.qds-icon{color:var(--qds-theme-signature-color-contrast);display:none;pointer-events:none}.qds-container{display:grid;grid-template-areas:\"c\"}.qds-label{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label:has(.qds-checkbox:focus-visible){box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner{flex:1 1 auto;min-width:0;width:100%}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:none}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-control-background-contrast);border-color:#0000}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}[data-size=small]{--qds-form-small-text:var(--qds-control-small-text)}.qds-checkbox[data-size=small]{border-radius:var(--qds-control-toggle-small-knob-border-radius);height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-small-icon-size)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height);padding:var(--qds-control-small-padding-auto-height) var(--qds-control-toggle-small-padding-horizontal)}[data-size=standard]{--qds-form-standard-text:var(--qds-control-standard-text)}.qds-checkbox[data-size=standard]{border-radius:var(--qds-control-toggle-standard-knob-border-radius);height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-standard-icon-size)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}[data-size=large]{--qds-form-large-text:var(--qds-control-large-text)}.qds-checkbox[data-size=large]{border-radius:var(--qds-control-toggle-large-knob-border-radius);height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-large-icon-size)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height);padding:var(--qds-control-large-padding-auto-height) var(--qds-control-toggle-large-padding-horizontal)}";
12
+ const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}.qds-checkbox,.qds-icon{grid-area:b;place-self:center}.qds-icon{color:var(--qds-theme-signature-color-contrast);display:none;pointer-events:none}.qds-container{display:grid;grid-template-areas:\"b\"}.qds-label{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label:has(.qds-checkbox:focus-visible){box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner{color:var(--qds-theme-control-text-standard);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;width:100%}.qds-required{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}.qds-tooltip{line-height:normal}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:none}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-control-background-contrast);border-color:#0000}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-checkbox[data-size=small]{border-radius:var(--qds-control-toggle-small-knob-border-radius);height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-toggle-small-box-size)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-label-inner[data-size=small]{font:var(--qds-control-small-text)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height);padding:var(--qds-control-small-padding-auto-height) var(--qds-control-toggle-small-padding-horizontal)}.qds-checkbox[data-size=standard]{border-radius:var(--qds-control-toggle-standard-knob-border-radius);height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-toggle-standard-box-size)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-label-inner[data-size=standard]{font:var(--qds-control-standard-text)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-checkbox[data-size=large]{border-radius:var(--qds-control-toggle-large-knob-border-radius);height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-toggle-large-box-size)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-label-inner[data-size=large]{font:var(--qds-control-large-text)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height);padding:var(--qds-control-large-padding-auto-height) var(--qds-control-toggle-large-padding-horizontal)}";
14
13
 
15
14
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
16
15
  //
@@ -31,7 +30,7 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
31
30
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
32
31
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
33
32
  };
34
- var _Checkbox_instances, _Checkbox_inheritedAttributes, _Checkbox_computedChecked_get, _Checkbox_computedDisabled_get, _Checkbox_computedIndeterminate_get, _Checkbox_computedSize_get, _Checkbox_computedValue_get, _Checkbox_hasText_get, _Checkbox_onBlur, _Checkbox_onFocus, _Checkbox_defineGetter;
33
+ var _Checkbox_instances, _Checkbox_inheritedAttributes, _Checkbox_ro, _Checkbox_span, _Checkbox_tooltip, _Checkbox_computedChecked_get, _Checkbox_computedDisabled_get, _Checkbox_computedIndeterminate_get, _Checkbox_computedSize_get, _Checkbox_computedValue_get, _Checkbox_hasText_get, _Checkbox_onBlur, _Checkbox_onFocus, _Checkbox_spanRef, _Checkbox_tooltipRef, _Checkbox_defineGetter;
35
34
  const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
36
35
  constructor(registerHost) {
37
36
  super();
@@ -108,7 +107,11 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
108
107
  * Whether or not the text is displayed.
109
108
  */
110
109
  this.checkboxOnly = false;
110
+ this.tooltip = false;
111
111
  _Checkbox_inheritedAttributes.set(this, {});
112
+ _Checkbox_ro.set(this, void 0);
113
+ _Checkbox_span.set(this, void 0);
114
+ _Checkbox_tooltip.set(this, void 0);
112
115
  this.checkValidity = () => this.internals.checkValidity();
113
116
  this.reportValidity = () => this.internals.reportValidity();
114
117
  this.setCustomValidity = (error) => {
@@ -119,9 +122,23 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
119
122
  };
120
123
  _Checkbox_onBlur.set(this, (event) => {
121
124
  this.blurEmitter.emit(pickFocusEventAttributes(event));
125
+ if (__classPrivateFieldGet(this, _Checkbox_tooltip, "f"))
126
+ ignorePromise(__classPrivateFieldGet(this, _Checkbox_tooltip, "f").close());
122
127
  });
123
128
  _Checkbox_onFocus.set(this, (event) => {
124
129
  this.focusEmitter.emit(pickFocusEventAttributes(event));
130
+ if (__classPrivateFieldGet(this, _Checkbox_tooltip, "f"))
131
+ ignorePromise(__classPrivateFieldGet(this, _Checkbox_tooltip, "f").show());
132
+ });
133
+ _Checkbox_spanRef.set(this, (span) => {
134
+ __classPrivateFieldSet(this, _Checkbox_span, span, "f");
135
+ });
136
+ _Checkbox_tooltipRef.set(this, (tooltip) => {
137
+ if (tooltip) {
138
+ // eslint-disable-next-line no-param-reassign
139
+ tooltip.target = this.host;
140
+ __classPrivateFieldSet(this, _Checkbox_tooltip, tooltip, "f");
141
+ }
125
142
  });
126
143
  }
127
144
  onClick(event) {
@@ -152,6 +169,20 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
152
169
  this.tabIndex =
153
170
  parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
154
171
  }
172
+ textChanged() {
173
+ if (__classPrivateFieldGet(this, _Checkbox_ro, "f"))
174
+ __classPrivateFieldGet(this, _Checkbox_ro, "f").disconnect();
175
+ if (!__classPrivateFieldGet(this, _Checkbox_span, "f"))
176
+ return;
177
+ const span = __classPrivateFieldGet(this, _Checkbox_span, "f");
178
+ readTask(() => {
179
+ this.tooltip = isEllipsisActive(span);
180
+ });
181
+ __classPrivateFieldSet(this, _Checkbox_ro, new ResizeObserver(([spanEntry]) => {
182
+ this.tooltip = isEllipsisActive(spanEntry.target);
183
+ }), "f");
184
+ __classPrivateFieldGet(this, _Checkbox_ro, "f").observe(__classPrivateFieldGet(this, _Checkbox_span, "f"));
185
+ }
155
186
  valueChanged() {
156
187
  if (__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedChecked_get) && !__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get))
157
188
  this.internals.setFormValue(__classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedValue_get));
@@ -165,21 +196,28 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
165
196
  __classPrivateFieldSet(this, _Checkbox_inheritedAttributes, inheritAriaAttributes(this.host), "f");
166
197
  this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
167
198
  }
199
+ componentDidLoad() {
200
+ this.textChanged();
201
+ }
202
+ disconnectedCallback() {
203
+ if (__classPrivateFieldGet(this, _Checkbox_ro, "f"))
204
+ __classPrivateFieldGet(this, _Checkbox_ro, "f").disconnect();
205
+ }
168
206
  render() {
169
207
  return (
170
208
  // eslint-disable-next-line jsx-a11y/label-has-associated-control
171
- h("label", { key: 'eee46a1d52fdce13a48944878461a64b4010ac2b', "aria-disabled": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? 'true' : undefined, class: {
209
+ h("label", { key: 'ff46801768016168ffb89acd3148a796dd94765f', "aria-disabled": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedDisabled_get) ? 'true' : undefined, class: {
172
210
  'qds-inline': this.inline,
173
211
  'qds-label': true,
174
- }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }, h("div", { key: 'b22d88f6b62e988057db205e8b493a31cb9eabdc', class: "qds-container" }, h("input", { key: 'c1510dc602adc3cf9470edbc6fa95af12f701b9a',
212
+ }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get) }, h("div", { key: 'f4761b84afd3a10bff6367b2b22628cbf22d01d6', class: "qds-container" }, h("input", { key: 'e29721f3efccdcbf3ca70e733c8932b69d134b5c',
175
213
  // eslint-disable-next-line jsx-a11y/no-autofocus
176
- 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", "aria-label": this.checkboxOnly ? this.text : undefined, ...__classPrivateFieldGet(this, _Checkbox_inheritedAttributes, "f") }), h("qds-icon", { key: '7fd98e670537e117298a45d854b34fb9060a8850', "aria-hidden": "true", class: {
214
+ 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", "aria-label": this.checkboxOnly ? this.text : undefined, ...__classPrivateFieldGet(this, _Checkbox_inheritedAttributes, "f") }), h("qds-icon", { key: '83ec6c6752f5c0138d3adb3fa4f1e04dd78e83ea', class: {
177
215
  'qds-icon': true,
178
216
  'qds-checked': true,
179
- }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "checked" }), h("qds-icon", { key: '7d5266124a946507ee7384a7086af51e6f5a1d66', "aria-hidden": "true", class: {
217
+ }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "checked" }), h("qds-icon", { key: 'dfbbe3c44f7ee900706fbda544e4c9c709895608', class: {
180
218
  'qds-icon': true,
181
219
  'qds-indeterminate': true,
182
- }, "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: '2abb3aa9fe38db5b754d65024d907fe7e6c05ed0', class: "qds-label-inner", required: this.required, size: this.size, text: this.text, tabindex: -1, tooltipTarget: this.host }))));
220
+ }, "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), library: "core", name: "indeterminate" })), __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_hasText_get) && (h("span", { key: 'cdb7452d5230c202e957a1c1223549f4e1a8131b', class: "qds-label-inner", "data-size": __classPrivateFieldGet(this, _Checkbox_instances, "a", _Checkbox_computedSize_get), ref: __classPrivateFieldGet(this, _Checkbox_spanRef, "f") }, this.required === true && h("span", { key: 'bfcda68d1914a4942ab46cc4b421a7918f89ac6d', class: "qds-required" }, "*"), this.text)), this.tooltip && (h("qds-tooltip", { key: '314e615f55bd825269f44513ab50b5059755e6f3', "aria-hidden": "true", class: "qds-tooltip", ref: __classPrivateFieldGet(this, _Checkbox_tooltipRef, "f") }, this.text))));
183
221
  }
184
222
  static get delegatesFocus() { return true; }
185
223
  static get formAssociated() { return true; }
@@ -188,6 +226,7 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
188
226
  "checked": ["checkedChanged"],
189
227
  "disabled": ["disabledChanged"],
190
228
  "tabindex": ["tabindexChanged"],
229
+ "text": ["textChanged"],
191
230
  "value": ["valueChanged"]
192
231
  }; }
193
232
  static get style() { return checkboxCss; }
@@ -206,14 +245,16 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
206
245
  "value": [8],
207
246
  "willValidate": [4, "will-validate"],
208
247
  "checkboxOnly": [4, "checkbox-only"],
209
- "tabIndex": [32]
248
+ "tabIndex": [32],
249
+ "tooltip": [32]
210
250
  }, [[0, "click", "onClick"]], {
211
251
  "checked": ["checkedChanged"],
212
252
  "disabled": ["disabledChanged"],
213
253
  "tabindex": ["tabindexChanged"],
254
+ "text": ["textChanged"],
214
255
  "value": ["valueChanged"]
215
256
  }]);
216
- _Checkbox_inheritedAttributes = new WeakMap(), _Checkbox_onBlur = new WeakMap(), _Checkbox_onFocus = new WeakMap(), _Checkbox_instances = new WeakSet(), _Checkbox_computedChecked_get = function _Checkbox_computedChecked_get() {
257
+ _Checkbox_inheritedAttributes = new WeakMap(), _Checkbox_ro = new WeakMap(), _Checkbox_span = new WeakMap(), _Checkbox_tooltip = new WeakMap(), _Checkbox_onBlur = new WeakMap(), _Checkbox_onFocus = new WeakMap(), _Checkbox_spanRef = new WeakMap(), _Checkbox_tooltipRef = new WeakMap(), _Checkbox_instances = new WeakSet(), _Checkbox_computedChecked_get = function _Checkbox_computedChecked_get() {
217
258
  return this.checked ?? false;
218
259
  }, _Checkbox_computedDisabled_get = function _Checkbox_computedDisabled_get() {
219
260
  return ((this.host.matches(':disabled') || (this.disabled ?? false)) &&
@@ -243,7 +284,7 @@ function defineCustomElement() {
243
284
  if (typeof customElements === "undefined") {
244
285
  return;
245
286
  }
246
- const components = ["qds-checkbox", "qds-icon", "qds-label", "qds-tooltip"];
287
+ const components = ["qds-checkbox", "qds-icon", "qds-tooltip"];
247
288
  components.forEach(tagName => { switch (tagName) {
248
289
  case "qds-checkbox":
249
290
  if (!customElements.get(tagName)) {
@@ -251,11 +292,6 @@ function defineCustomElement() {
251
292
  }
252
293
  break;
253
294
  case "qds-icon":
254
- if (!customElements.get(tagName)) {
255
- defineCustomElement$3();
256
- }
257
- break;
258
- case "qds-label":
259
295
  if (!customElements.get(tagName)) {
260
296
  defineCustomElement$2();
261
297
  }
@@ -269,6 +305,6 @@ function defineCustomElement() {
269
305
  }
270
306
 
271
307
  export { Checkbox as C, defineCustomElement as d };
272
- //# sourceMappingURL=p-DNHI4C-W.js.map
308
+ //# sourceMappingURL=p-DRcxeXWE.js.map
273
309
 
274
- //# sourceMappingURL=p-DNHI4C-W.js.map
310
+ //# sourceMappingURL=p-DRcxeXWE.js.map