@quartzds/core 1.0.0-beta.113 → 1.0.0-beta.115

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 (209) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/components/index.d.ts +2 -2
  3. package/components/index.js +2 -2
  4. package/components/{p-CB1GgGmx.js → p--vOFwWP9.js} +4 -4
  5. package/components/{p-CB1GgGmx.js.map → p--vOFwWP9.js.map} +1 -1
  6. package/{dist/esm/helpers-CDZIefsI.js → components/p-Bs-thw7N.js} +24 -8
  7. package/components/{p-CzJQDr3N.js.map → p-Bs-thw7N.js.map} +1 -1
  8. package/components/{p-9fm05BrQ.js → p-D6kEwmWw.js} +16 -9
  9. package/components/p-D6kEwmWw.js.map +1 -0
  10. package/components/{p-jzP-octC.js → p-DG13nyez.js} +13 -13
  11. package/components/p-DG13nyez.js.map +1 -0
  12. package/components/{p-oYV2Vg_F.js → p-DHsQa63F.js} +6 -6
  13. package/components/{p-oYV2Vg_F.js.map → p-DHsQa63F.js.map} +1 -1
  14. package/components/{p-GGIVf4ry.js → p-DQ0iArwG.js} +12 -12
  15. package/components/p-DQ0iArwG.js.map +1 -0
  16. package/components/{p-Cin_uEzc.js → p-DRvYbv4e.js} +6 -6
  17. package/components/{p-Cin_uEzc.js.map → p-DRvYbv4e.js.map} +1 -1
  18. package/components/p-DabDNFFa.js +112 -0
  19. package/components/p-DabDNFFa.js.map +1 -0
  20. package/components/{p-CPvTGxdE.js → p-DeLdhUte.js} +9 -9
  21. package/components/p-DeLdhUte.js.map +1 -0
  22. package/components/{p-CK_Yxg3A.js → p-Df4zqimN.js} +11 -9
  23. package/components/p-Df4zqimN.js.map +1 -0
  24. package/components/{p-Dqnx5weA.js → p-Dmky30vp.js} +3 -3
  25. package/components/{p-Dqnx5weA.js.map → p-Dmky30vp.js.map} +1 -1
  26. package/components/{p-CSR3ZAEX.js → p-I5PkZmy8.js} +4 -4
  27. package/components/{p-CSR3ZAEX.js.map → p-I5PkZmy8.js.map} +1 -1
  28. package/components/qds-action-item.js +7 -7
  29. package/components/qds-action-item.js.map +1 -1
  30. package/components/{qds-nav-list-item.d.ts → qds-avatar-media.d.ts} +4 -4
  31. package/components/qds-avatar-media.js +14 -0
  32. package/components/qds-avatar-media.js.map +1 -0
  33. package/components/qds-breadcrumb-item.js +7 -7
  34. package/components/qds-breadcrumb-item.js.map +1 -1
  35. package/components/qds-button.js +1 -1
  36. package/components/qds-checkbox.js +1 -1
  37. package/components/qds-chip.js +11 -11
  38. package/components/qds-chip.js.map +1 -1
  39. package/components/qds-dialog.js +26 -7
  40. package/components/qds-dialog.js.map +1 -1
  41. package/components/qds-dropdown.js +1 -1
  42. package/components/qds-form-message.js +5 -5
  43. package/components/qds-form-message.js.map +1 -1
  44. package/components/qds-icon-button.js +10 -8
  45. package/components/qds-icon-button.js.map +1 -1
  46. package/components/qds-icon.js +1 -1
  47. package/components/qds-inline-link.js +43 -13
  48. package/components/qds-inline-link.js.map +1 -1
  49. package/components/qds-input.js +6 -6
  50. package/components/qds-label.js +1 -1
  51. package/components/qds-list-item.js +22 -16
  52. package/components/qds-list-item.js.map +1 -1
  53. package/components/qds-loader.js +3 -3
  54. package/components/qds-loader.js.map +1 -1
  55. package/components/qds-menu-item.js +9 -9
  56. package/components/qds-menu-item.js.map +1 -1
  57. package/components/qds-mini-button.js +1 -1
  58. package/components/qds-progress-bar.js +1 -1
  59. package/components/qds-radio.js +1 -1
  60. package/components/qds-select.js +5 -5
  61. package/components/qds-standalone-link.js +43 -13
  62. package/components/qds-standalone-link.js.map +1 -1
  63. package/components/qds-switch.js +5 -5
  64. package/components/qds-tab.js +11 -11
  65. package/components/qds-tab.js.map +1 -1
  66. package/components/qds-tabbar.js +8 -8
  67. package/components/qds-table-cell.js +2 -2
  68. package/components/qds-table-head-cell.js +2 -2
  69. package/components/qds-table-row.js +1 -1
  70. package/components/qds-table.js +1 -1
  71. package/components/qds-tag.js +1 -1
  72. package/components/qds-textarea.js +3 -3
  73. package/components/qds-title.js +1 -1
  74. package/components/qds-tooltip.js +1 -1
  75. package/dist/cjs/{helpers-D--0PcCT.js → helpers-BH_NFaV-.js} +24 -8
  76. package/dist/cjs/helpers-BH_NFaV-.js.map +1 -0
  77. package/dist/cjs/index.cjs.js +1 -1
  78. package/dist/cjs/{library-CF8K3bIq.js → library-C_NJJiFI.js} +15 -8
  79. package/dist/cjs/library-C_NJJiFI.js.map +1 -0
  80. package/dist/cjs/loader.cjs.js +1 -1
  81. package/dist/cjs/qds-action-item.cjs.entry.js +5 -5
  82. package/dist/cjs/qds-action-item.entry.cjs.js.map +1 -1
  83. package/dist/cjs/qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map +1 -0
  84. package/dist/cjs/{qds-checkbox_2.cjs.entry.js → qds-avatar-media_3.cjs.entry.js} +79 -8
  85. package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +5 -5
  86. package/dist/cjs/qds-breadcrumb-item.entry.cjs.js.map +1 -1
  87. package/dist/cjs/qds-button.cjs.entry.js +8 -8
  88. package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
  89. package/dist/cjs/qds-chip.cjs.entry.js +8 -8
  90. package/dist/cjs/qds-chip.entry.cjs.js.map +1 -1
  91. package/dist/cjs/qds-dialog.cjs.entry.js +23 -4
  92. package/dist/cjs/qds-dialog.entry.cjs.js.map +1 -1
  93. package/dist/cjs/qds-dropdown.cjs.entry.js +1 -1
  94. package/dist/cjs/qds-form-message.cjs.entry.js +4 -4
  95. package/dist/cjs/qds-form-message.entry.cjs.js.map +1 -1
  96. package/dist/cjs/qds-icon-button.cjs.entry.js +8 -6
  97. package/dist/cjs/qds-icon-button.entry.cjs.js.map +1 -1
  98. package/dist/cjs/qds-icon.cjs.entry.js +2 -2
  99. package/dist/cjs/qds-inline-link.cjs.entry.js +39 -8
  100. package/dist/cjs/qds-inline-link.entry.cjs.js.map +1 -1
  101. package/dist/cjs/qds-input.cjs.entry.js +4 -4
  102. package/dist/cjs/qds-label.cjs.entry.js +9 -9
  103. package/dist/cjs/qds-label.entry.cjs.js.map +1 -1
  104. package/dist/cjs/qds-list-item.cjs.entry.js +10 -10
  105. package/dist/cjs/qds-list-item.entry.cjs.js.map +1 -1
  106. package/dist/cjs/qds-loader.cjs.entry.js +2 -2
  107. package/dist/cjs/qds-loader.entry.cjs.js.map +1 -1
  108. package/dist/cjs/qds-menu-item.cjs.entry.js +6 -6
  109. package/dist/cjs/qds-menu-item.entry.cjs.js.map +1 -1
  110. package/dist/cjs/qds-mini-button.cjs.entry.js +1 -1
  111. package/dist/cjs/qds-progress-bar.cjs.entry.js +1 -1
  112. package/dist/cjs/qds-select.cjs.entry.js +4 -4
  113. package/dist/cjs/qds-standalone-link.cjs.entry.js +39 -8
  114. package/dist/cjs/qds-standalone-link.entry.cjs.js.map +1 -1
  115. package/dist/cjs/qds-switch.cjs.entry.js +4 -4
  116. package/dist/cjs/qds-tab.cjs.entry.js +7 -7
  117. package/dist/cjs/qds-tab.entry.cjs.js.map +1 -1
  118. package/dist/cjs/qds-tabbar.cjs.entry.js +5 -5
  119. package/dist/cjs/qds-table-cell.cjs.entry.js +2 -2
  120. package/dist/cjs/qds-table-head-cell.cjs.entry.js +2 -2
  121. package/dist/cjs/qds-table-row.cjs.entry.js +1 -1
  122. package/dist/cjs/qds-table.cjs.entry.js +1 -1
  123. package/dist/cjs/qds-tag_2.cjs.entry.js +6 -6
  124. package/dist/cjs/qds-textarea.cjs.entry.js +3 -3
  125. package/dist/cjs/qds-tooltip.cjs.entry.js +2 -2
  126. package/dist/cjs/qds.cjs.js +1 -1
  127. package/dist/custom-elements.json +311 -367
  128. package/dist/docs.json +223 -331
  129. package/{components/p-CzJQDr3N.js → dist/esm/helpers-t9FQ7Vl_.js} +24 -8
  130. package/dist/esm/helpers-t9FQ7Vl_.js.map +1 -0
  131. package/dist/esm/index.js +1 -1
  132. package/dist/esm/{library-B2PJ_ZJB.js → library-C7n28y3j.js} +15 -8
  133. package/dist/esm/library-C7n28y3j.js.map +1 -0
  134. package/dist/esm/loader.js +1 -1
  135. package/dist/esm/qds-action-item.entry.js +5 -5
  136. package/dist/esm/qds-action-item.entry.js.map +1 -1
  137. package/dist/esm/qds-avatar-media.qds-checkbox.qds-radio.entry.js.map +1 -0
  138. package/dist/esm/{qds-checkbox_2.entry.js → qds-avatar-media_3.entry.js} +79 -9
  139. package/dist/esm/qds-breadcrumb-item.entry.js +5 -5
  140. package/dist/esm/qds-breadcrumb-item.entry.js.map +1 -1
  141. package/dist/esm/qds-button.entry.js +8 -8
  142. package/dist/esm/qds-button.entry.js.map +1 -1
  143. package/dist/esm/qds-chip.entry.js +8 -8
  144. package/dist/esm/qds-chip.entry.js.map +1 -1
  145. package/dist/esm/qds-dialog.entry.js +23 -4
  146. package/dist/esm/qds-dialog.entry.js.map +1 -1
  147. package/dist/esm/qds-dropdown.entry.js +1 -1
  148. package/dist/esm/qds-form-message.entry.js +4 -4
  149. package/dist/esm/qds-form-message.entry.js.map +1 -1
  150. package/dist/esm/qds-icon-button.entry.js +8 -6
  151. package/dist/esm/qds-icon-button.entry.js.map +1 -1
  152. package/dist/esm/qds-icon.entry.js +2 -2
  153. package/dist/esm/qds-inline-link.entry.js +39 -8
  154. package/dist/esm/qds-inline-link.entry.js.map +1 -1
  155. package/dist/esm/qds-input.entry.js +4 -4
  156. package/dist/esm/qds-label.entry.js +9 -9
  157. package/dist/esm/qds-label.entry.js.map +1 -1
  158. package/dist/esm/qds-list-item.entry.js +10 -10
  159. package/dist/esm/qds-list-item.entry.js.map +1 -1
  160. package/dist/esm/qds-loader.entry.js +2 -2
  161. package/dist/esm/qds-loader.entry.js.map +1 -1
  162. package/dist/esm/qds-menu-item.entry.js +6 -6
  163. package/dist/esm/qds-menu-item.entry.js.map +1 -1
  164. package/dist/esm/qds-mini-button.entry.js +1 -1
  165. package/dist/esm/qds-progress-bar.entry.js +1 -1
  166. package/dist/esm/qds-select.entry.js +4 -4
  167. package/dist/esm/qds-standalone-link.entry.js +39 -8
  168. package/dist/esm/qds-standalone-link.entry.js.map +1 -1
  169. package/dist/esm/qds-switch.entry.js +4 -4
  170. package/dist/esm/qds-tab.entry.js +7 -7
  171. package/dist/esm/qds-tab.entry.js.map +1 -1
  172. package/dist/esm/qds-tabbar.entry.js +5 -5
  173. package/dist/esm/qds-table-cell.entry.js +2 -2
  174. package/dist/esm/qds-table-head-cell.entry.js +2 -2
  175. package/dist/esm/qds-table-row.entry.js +1 -1
  176. package/dist/esm/qds-table.entry.js +1 -1
  177. package/dist/esm/qds-tag_2.entry.js +6 -6
  178. package/dist/esm/qds-textarea.entry.js +3 -3
  179. package/dist/esm/qds-tooltip.entry.js +2 -2
  180. package/dist/esm/qds.js +1 -1
  181. package/dist/types/components/avatar-media/avatar-media.d.ts +39 -0
  182. package/dist/types/components/icon-button/icon-button.d.ts +1 -1
  183. package/dist/types/components/inline-link/inline-link.d.ts +1 -1
  184. package/dist/types/components/label/label.d.ts +1 -1
  185. package/dist/types/components/standalone-link/standalone-link.d.ts +1 -1
  186. package/dist/types/components.d.ts +94 -125
  187. package/dist/types/helpers.d.ts +3 -3
  188. package/dist/vscode.html-custom-data.json +29 -52
  189. package/hydrate/index.js +694 -632
  190. package/hydrate/index.mjs +694 -632
  191. package/package.json +1 -1
  192. package/components/p-9fm05BrQ.js.map +0 -1
  193. package/components/p-CK_Yxg3A.js.map +0 -1
  194. package/components/p-CPvTGxdE.js.map +0 -1
  195. package/components/p-GGIVf4ry.js.map +0 -1
  196. package/components/p-jzP-octC.js.map +0 -1
  197. package/components/qds-nav-list-item.js +0 -164
  198. package/components/qds-nav-list-item.js.map +0 -1
  199. package/dist/cjs/helpers-D--0PcCT.js.map +0 -1
  200. package/dist/cjs/library-CF8K3bIq.js.map +0 -1
  201. package/dist/cjs/qds-checkbox.qds-radio.entry.cjs.js.map +0 -1
  202. package/dist/cjs/qds-nav-list-item.cjs.entry.js +0 -120
  203. package/dist/cjs/qds-nav-list-item.entry.cjs.js.map +0 -1
  204. package/dist/esm/helpers-CDZIefsI.js.map +0 -1
  205. package/dist/esm/library-B2PJ_ZJB.js.map +0 -1
  206. package/dist/esm/qds-checkbox.qds-radio.entry.js.map +0 -1
  207. package/dist/esm/qds-nav-list-item.entry.js +0 -118
  208. package/dist/esm/qds-nav-list-item.entry.js.map +0 -1
  209. package/dist/types/components/nav-list-item/nav-list-item.d.ts +0 -67
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quartzds/core",
3
- "version": "1.0.0-beta.113",
3
+ "version": "1.0.0-beta.115",
4
4
  "description": "Quartz design system web components",
5
5
  "homepage": "https://github.com/quartzds/core-foundations/tree/main/packages/core",
6
6
  "bugs": {
@@ -1 +0,0 @@
1
- {"file":"p-9fm05BrQ.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,wZAAwZ;;ACA3a,MAAM,QAAQ,GAAG,4eAA4e;;ACA7f,MAAM,YAAY,GAAG,oxBAAoxB;;ACAzyB,MAAM,WAAW,GAAG,wcAAwc;;ACA5d,MAAM,eAAe,GAAG,obAAob;;ACA5c,MAAM,gBAAgB,GAAG,4XAA4X;;ACArZ,MAAM,YAAY,GAAG,gvEAAgvE;;ACArwE,MAAM,qBAAqB,GAAG,gvEAAgvE;;ACA9wE,MAAM,aAAa,GAAG,4lBAA4lB;;ACAlnB,MAAM,aAAa,GAAG,4xCAA4xC;;ACAlzC,MAAM,oBAAoB,GAAG,4jBAA4jB;;ACAzlB,MAAM,oBAAoB,GAAG,gjBAAgjB;;ACA7kB,MAAM,cAAc,GAAG,gnBAAgnB;;ACAvoB,MAAM,WAAW,GAAG,gxBAAgxB;;ACApyB,MAAM,YAAY,GAAG,gjCAAgjC;;ACArkC,MAAM,WAAW,GAAG,4zBAA4zB;;ACAh1B,MAAM,YAAY,GAAG,4mCAA4mC;;ACAjoC,MAAM,aAAa,GAAG,gcAAgc;;ACAtd,MAAM,OAAO,GAAG,gcAAgc;;ACAhd,MAAM,cAAc,GAAG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,EAAA,0CAAA,EAAA,KAAK,EAAC,kBAAkB,EAAC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAI,CAAA,EACtD,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,kBAAkB,EAAG,CAAA,CAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["clear","checked","draggable","dropdown","externalLink","indeterminate","inputMonth","inputTel","inputWeek","inputUrl","inputTime","inputDate","inputDatetimeLocal","inputEmail","inputSearch","inputPasswordHide","inputPasswordShow","navigation","next","statusError","statusInfo","statusWarning","toggleOff","toggleOn","defaultLibrary","__stencil_proxyCustomElement","HTMLElement"],"sources":["../../node_modules/@quartzds/generic-icons-core/dist/checked.svg","../../node_modules/@quartzds/generic-icons-core/dist/clear.svg","../../node_modules/@quartzds/generic-icons-core/dist/draggable.svg","../../node_modules/@quartzds/generic-icons-core/dist/dropdown.svg","../../node_modules/@quartzds/generic-icons-core/dist/external-link.svg","../../node_modules/@quartzds/generic-icons-core/dist/indeterminate.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-date.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-datetime-local.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-email.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-month.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-password-hide.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-password-show.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-search.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-tel.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-time.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-url.svg","../../node_modules/@quartzds/generic-icons-core/dist/input-week.svg","../../node_modules/@quartzds/generic-icons-core/dist/navigation.svg","../../node_modules/@quartzds/generic-icons-core/dist/next.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-error.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-info.svg","../../node_modules/@quartzds/generic-icons-core/dist/status-warning.svg","../../node_modules/@quartzds/generic-icons-core/dist/toggle-off.svg","../../node_modules/@quartzds/generic-icons-core/dist/toggle-on.svg","src/components/icon/core-library.ts","src/components/icon/default-library.ts","src/components/icon/library.ts","src/components/icon/request.ts","src/components/icon/icon.css?tag=qds-icon&encapsulation=shadow","src/components/icon/icon.tsx"],"sourcesContent":["<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"m12.111 3.5-5.918 9L3.89 9.024\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M10.827 10.846 5.17 5.189m5.665-.027-5.657 5.657M8 .5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 18 20\"><path fill=\"currentColor\" d=\"M4.96 0a2.148 2.148 0 1 1 0 4.297 2.148 2.148 0 0 1 0-4.296ZM2.812 17.852a2.149 2.149 0 1 0 4.298 0 2.149 2.149 0 0 0-4.298 0Zm0-7.851a2.149 2.149 0 1 0 4.298 0 2.149 2.149 0 0 0-4.298 0Zm10.079-7.852a2.149 2.149 0 1 0 4.297 0 2.149 2.149 0 0 0-4.297 0Zm0 15.703a2.149 2.149 0 1 0 4.297 0 2.149 2.149 0 0 0-4.297 0Zm0-7.851a2.149 2.149 0 1 0 4.297 0 2.149 2.149 0 0 0-4.297 0Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.707 4.443c-1.45 1.45-7.5 7.113-7.5 7.113s-6.05-5.663-7.5-7.113\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M10.5.5h5m0 0v5m0-5L9.696 6.305M8.5 3.5h-8v12h12v-8\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M3.5 8h9\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M7.06 11.294q.285.38.284.939 0 .774-.568 1.232-.57.457-1.537.459-.552 0-1.062-.171a2.6 2.6 0 0 1-.866-.475.517.517 0 0 1-.089-.717.31.31 0 0 1 .251-.132q.084 0 .153.029t.187.098q.357.237.68.365c.225.087.464.13.705.127q.56 0 .833-.225t.272-.684q0-.45-.285-.667c-.285-.217-.483-.217-.879-.217h-.484a.37.37 0 0 1-.302-.132.47.47 0 0 1-.106-.301q0-.178.106-.306a.37.37 0 0 1 .302-.127h.339q1.164 0 1.164-.874 0-.41-.246-.628-.245-.22-.68-.221-.62 0-1.325.492a2 2 0 0 1-.187.098.4.4 0 0 1-.153.029.31.31 0 0 1-.251-.132.5.5 0 0 1-.106-.318.46.46 0 0 1 .047-.217c.047-.089.081-.12.149-.183q.357-.297.854-.471c.497-.174.669-.175 1.015-.175q.883 0 1.406.434.522.433.523 1.155c0 .307-.09.607-.259.862a1.43 1.43 0 0 1-.701.539q.534.136.82.514zm5.751 2.128q0 .45-.509.45H9.431q-.518 0-.518-.45 0-.434.518-.434h.883V9.115l-.815.501a.45.45 0 0 1-.213.068.37.37 0 0 1-.301-.153.53.53 0 0 1-.123-.34q0-.246.221-.382l1.317-.816a.96.96 0 0 1 .484-.153q.237 0 .382.145a.54.54 0 0 1 .144.399v4.603h.892q.51 0 .509.434z\"/><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.5 6.5H.5m6-4h5m-5 0v-.78C6.5 1.224 6.278.5 5.463.5h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066m.999-2h-4l-.247.002A1.764 1.764 0 0 0 .5 4.267v9.469c0 .975.79 1.765 1.765 1.765h11.471c.975 0 1.765-.79 1.765-1.765V4.263c0-.973-.789-1.763-1.763-1.763h-1.237m.999 0h-2m0 0v-.78c0-.496-.222-1.22-1.037-1.22h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M7.06 11.294q.285.38.284.939 0 .774-.568 1.232-.57.457-1.537.459-.552 0-1.062-.171a2.6 2.6 0 0 1-.866-.475.517.517 0 0 1-.089-.717.31.31 0 0 1 .251-.132q.084 0 .153.029t.187.098q.357.237.68.365c.225.087.464.13.705.127q.56 0 .833-.225t.272-.684q0-.45-.285-.667c-.285-.217-.483-.217-.879-.217h-.484a.37.37 0 0 1-.302-.132.47.47 0 0 1-.106-.301q0-.178.106-.306a.37.37 0 0 1 .302-.127h.339q1.164 0 1.164-.874 0-.41-.246-.628-.245-.22-.68-.221-.62 0-1.325.492a2 2 0 0 1-.187.098.4.4 0 0 1-.153.029.31.31 0 0 1-.251-.132.5.5 0 0 1-.106-.318.46.46 0 0 1 .047-.217c.047-.089.081-.12.149-.183q.357-.297.854-.471c.497-.174.669-.175 1.015-.175q.883 0 1.406.434.522.433.523 1.155c0 .307-.09.607-.259.862a1.43 1.43 0 0 1-.701.539q.534.136.82.514zm5.751 2.128q0 .45-.509.45H9.431q-.518 0-.518-.45 0-.434.518-.434h.883V9.115l-.815.501a.45.45 0 0 1-.213.068.37.37 0 0 1-.301-.153.53.53 0 0 1-.123-.34q0-.246.221-.382l1.317-.816a.96.96 0 0 1 .484-.153q.237 0 .382.145a.54.54 0 0 1 .144.399v4.603h.892q.51 0 .509.434z\"/><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.5 6.5H.5m6-4h5m-5 0v-.78C6.5 1.224 6.278.5 5.463.5h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066m.999-2h-4l-.247.002A1.764 1.764 0 0 0 .5 4.267v9.469c0 .975.79 1.765 1.765 1.765h11.471c.975 0 1.765-.79 1.765-1.765V4.263c0-.973-.789-1.763-1.763-1.763h-1.237m.999 0h-2m0 0v-.78c0-.496-.222-1.22-1.037-1.22h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.369 3.137 7.99 8.5.734 2.734m14.635.403a1.2 1.2 0 0 0-1.06-.637H1.3a.8.8 0 0 0-.566.234m14.635.403L15.5 5.5v7.2a.8.8 0 0 1-.8.8H1.3a.8.8 0 0 1-.8-.8V3.3a.8.8 0 0 1 .234-.566\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.5 6.5H.5m6-4h5m-5 0v-.78C6.5 1.224 6.278.5 5.463.5h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066m.999-2h-4l-.247.002A1.764 1.764 0 0 0 .5 4.267v9.469c0 .975.79 1.765 1.765 1.765h11.471c.975 0 1.765-.79 1.765-1.765V4.263c0-.973-.789-1.763-1.763-1.763h-1.237m.999 0h-2m0 0v-.78c0-.496-.222-1.22-1.037-1.22h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066\"/><path fill=\"currentColor\" d=\"M3 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm-9 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17 17\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"m.707.707 15 15m0-6.646c-.365-.704-4.303-5.67-8.088-5.387C4.207 3.93 2.288 6.071.707 9.06c0 0 2.828 4.85 9.126 3.416 2.661-.606 3.477-2.397 5.874-3.415Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.572 8.854c-.365-.704-4.304-5.67-8.088-5.387C4.07 3.722 2.153 5.864.572 8.853c0 0 2.828 4.85 9.126 3.416 2.66-.606 3.477-2.397 5.874-3.415Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17 17\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"m15.506 15.5-4.254-4.292m0 0a6.284 6.284 0 1 0-1.763 1.253c.755-.412 1.143-.684 1.763-1.253ZM6.565 2.849c-.99 0-1.923.386-2.624 1.087a3.68 3.68 0 0 0-1.047 2.102c-.047.34-.047.685-.003 1.024\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M12.5 13.933c0 .866-.702 1.567-1.567 1.567H5.068a1.567 1.567 0 0 1-1.567-1.567V2.062C3.501 1.199 4.2.5 5.063.5h5.876c.863 0 1.562.699 1.562 1.562z\"/><path fill=\"currentColor\" d=\"M8.5 2.5h-2Zm0 11h-1Z\"/><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M8.5 2.5h-2m2 11h-1\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M3.955 4.743 2.84 3.627m10.33-.025-1.611-1.608a2.29 2.29 0 0 1 3.94 1.582 2.3 2.3 0 0 1-.67 1.617l-.033.033-1.634-1.6-1.248 1.205m-7.296 8.362-1.374 1.769M8.262 1.2l-.217 1.607M8.262 1.2l1.037.183M8.262 1.2l-.918-.161m4.542 6.321L8.5 8.781v2.718m3.414-6.668a5.43 5.43 0 0 0-3.806-1.548A5.445 5.445 0 0 0 2.66 8.726a5.446 5.446 0 0 0 5.448 5.444 5.446 5.446 0 0 0 5.448-5.444c-.037-1.825-.357-2.65-1.642-3.895Zm-.32 8.362 1.374 1.769M4.437 1.994l-.032-.034A2.29 2.29 0 0 0 .5 3.576a2.28 2.28 0 0 0 .67 1.617l.034.033 1.609-1.609z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M7.95.5v14.987m0-14.988S3.64 4.525 3.64 8.96c0 3.294 4.308 6.528 4.308 6.528M7.948.5s4.338 4.027 4.338 8.46c0 3.295-4.338 6.528-4.338 6.528m0 0a7.5 7.5 0 0 1-5.117-2.075C1.452 12.094.602 10.205.5 8.3m7.45 7.187a7.494 7.494 0 0 0 7.534-6.975M.5 8.3C.5 5 2.08 3.027 3.63 1.912a7.494 7.494 0 0 1 11.854 6.6M.5 8.3c7.893 2.542 14.357.43 14.984.212\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M15.5 6.5H.5m6-4h5m-5 0v-.78C6.5 1.224 6.278.5 5.463.5h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066m.999-2h-4l-.247.002A1.764 1.764 0 0 0 .5 4.267v9.469c0 .975.79 1.765 1.765 1.765h11.471c.975 0 1.765-.79 1.765-1.765V4.263c0-.973-.789-1.763-1.763-1.763h-1.237m.999 0h-2m0 0v-.78c0-.496-.222-1.22-1.037-1.22h.021c-.755 0-.983.724-.983 1.22v1.324c0 .786.074 1.456 1.066 1.456h-.066\"/><path fill=\"currentColor\" d=\"M3 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M4.443.5C5.893 1.95 11.556 8 11.556 8s-5.663 6.05-7.113 7.5\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M4.443.5C5.893 1.95 11.556 8 11.556 8s-5.663 6.05-7.113 7.5\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M10.827 10.846 5.17 5.189m5.665-.027-5.657 5.657M8 .5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" stroke-width=\"1.079\" d=\"M15.5 8a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Z\"/><path fill=\"currentColor\" d=\"M8 4.78q-.483 0-.751-.241-.27-.242-.269-.668 0-.441.269-.676c.269-.235.43-.234.751-.234q.495 0 .758.234c.262.234.263.382.263.676q0 .428-.263.668-.262.24-.758.241Zm0 8.218q-.414 0-.634-.248-.22-.25-.221-.689v-5.06q0-.456.221-.696.22-.242.634-.242c.414 0 .49.081.641.242q.228.242.228.696v5.06q0 .44-.221.689-.22.248-.648.248Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M8 .5a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15Z\"/><path fill=\"currentColor\" d=\"M8.064 13.109q-.484 0-.777-.3-.292-.3-.292-.77 0-.457.292-.748.293-.292.777-.292.5 0 .778.292t.278.748q0 .47-.278.77-.279.3-.778.3Zm0-2.964a.53.53 0 0 1-.42-.172q-.15-.17-.178-.484l-.428-5.445q-.042-.527.228-.848t.798-.321q.513 0 .778.321.264.321.221.848l-.429 5.445q-.014.314-.164.484a.51.51 0 0 1-.406.172Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M8 3.5a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Z\"/></svg>","<!-- SPDX-FileCopyrightText: © 2025 Schneider Electric SPDX-License-Identifier: Apache-2.0 -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"square\" stroke-miterlimit=\"16\" d=\"M8 3.5v9\"/></svg>","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport checked from '@quartzds/generic-icons-core/checked.svg'\nimport clear from '@quartzds/generic-icons-core/clear.svg'\nimport draggable from '@quartzds/generic-icons-core/draggable.svg'\nimport dropdown from '@quartzds/generic-icons-core/dropdown.svg'\nimport externalLink from '@quartzds/generic-icons-core/external-link.svg'\nimport indeterminate from '@quartzds/generic-icons-core/indeterminate.svg'\nimport inputDate from '@quartzds/generic-icons-core/input-date.svg'\nimport inputDatetimeLocal from '@quartzds/generic-icons-core/input-datetime-local.svg'\nimport inputEmail from '@quartzds/generic-icons-core/input-email.svg'\nimport inputMonth from '@quartzds/generic-icons-core/input-month.svg'\nimport inputPasswordHide from '@quartzds/generic-icons-core/input-password-hide.svg'\nimport inputPasswordShow from '@quartzds/generic-icons-core/input-password-show.svg'\nimport inputSearch from '@quartzds/generic-icons-core/input-search.svg'\nimport inputTel from '@quartzds/generic-icons-core/input-tel.svg'\nimport inputTime from '@quartzds/generic-icons-core/input-time.svg'\nimport inputUrl from '@quartzds/generic-icons-core/input-url.svg'\nimport inputWeek from '@quartzds/generic-icons-core/input-week.svg'\nimport navigation from '@quartzds/generic-icons-core/navigation.svg'\nimport next from '@quartzds/generic-icons-core/next.svg'\nimport statusError from '@quartzds/generic-icons-core/status-error.svg'\nimport statusInfo from '@quartzds/generic-icons-core/status-info.svg'\nimport statusWarning from '@quartzds/generic-icons-core/status-warning.svg'\nimport toggleOff from '@quartzds/generic-icons-core/toggle-off.svg'\nimport toggleOn from '@quartzds/generic-icons-core/toggle-on.svg'\n\nimport type { IconLibrary } from './library'\n\nconst icons: Record<string, string | undefined> = {\n /* eslint-disable @typescript-eslint/naming-convention */\n clear,\n checked,\n draggable,\n dropdown,\n 'external-link': externalLink,\n 'external-new-tab-link': externalLink,\n indeterminate,\n 'input-month': inputMonth,\n 'input-tel': inputTel,\n 'input-week': inputWeek,\n 'input-url': inputUrl,\n 'input-time': inputTime,\n 'input-date': inputDate,\n 'input-datetime-local': inputDatetimeLocal,\n 'input-email': inputEmail,\n 'input-search': inputSearch,\n 'input-password-hide': inputPasswordHide,\n 'input-password-show': inputPasswordShow,\n navigation,\n next,\n close: statusError,\n 'status-error': statusError,\n 'status-info': statusInfo,\n 'status-success': checked,\n 'status-warning': statusWarning,\n 'toggle-off': toggleOff,\n 'toggle-on': toggleOn,\n /* eslint-enable @typescript-eslint/naming-convention */\n}\n\nconst coreLibrary: IconLibrary = {\n name: 'core',\n resolver: (name) => icons[name] ?? '',\n}\n\nexport default coreLibrary\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport { getAssetPath } from '@stencil/core'\n\nimport type { IconLibrary } from './library'\n\nconst library: IconLibrary = {\n name: 'default',\n resolver: (name) => getAssetPath(`/icons/${name}.svg`),\n}\n\nexport default library\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Except } from 'type-fest'\n\nimport coreLibrary from './core-library'\nimport defaultLibrary from './default-library'\n\nexport type IconLibraryResolver = (name: string) => string\nexport interface IconLibrary {\n name: string\n resolver: IconLibraryResolver\n}\n\nlet registry: IconLibrary[] = [defaultLibrary, coreLibrary]\n\n/**\n * Returns a library from the registry.\n */\nexport const getIconLibrary = (name: string): IconLibrary | undefined =>\n registry.find((library) => library.name === name)\n\n/**\n * Removes an icon library from the registry.\n */\nexport const unregisterIconLibrary = (name: string): void => {\n registry = registry.filter((library) => library.name !== name)\n}\n\n/**\n * Adds an icon library to the registry or overrides an existing one.\n */\nexport const registerIconLibrary = (\n name: string,\n options: Except<IconLibrary, 'name'>,\n): void => {\n unregisterIconLibrary(name)\n registry.push({\n name,\n ...options,\n })\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\ninterface IconResponse {\n ok: boolean\n status: number\n data: string\n}\n\nconst cachedIconRequests = new Map<\n string,\n IconResponse | Promise<IconResponse>\n>()\n\nconst requestIcon = (url: string): Promise<IconResponse> => {\n const cachedIconRequest = cachedIconRequests.get(url)\n if (cachedIconRequest) return Promise.resolve(cachedIconRequest)\n\n const iconPromise = fetch(url, { mode: 'cors' }).then(async (response) => {\n const iconResponse: IconResponse = {\n ok: response.ok,\n status: response.status,\n data: await response.text(),\n }\n if (response.ok) {\n const div = document.createElement('div')\n div.innerHTML = iconResponse.data\n const child = div.firstElementChild\n iconResponse.data =\n child?.tagName.toLowerCase() === 'svg' ? child.outerHTML : ''\n }\n\n cachedIconRequests.set(url, iconResponse)\n return iconResponse\n })\n cachedIconRequests.set(url, iconPromise)\n return iconPromise\n}\n\nexport default requestIcon\n","/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n height: 1em;\n width: 1em;\n}\n\n.qds-container {\n position: relative;\n}\n\n.qds-icon-wrapper {\n display: contents;\n}\n\nsvg {\n display: block;\n fill: currentcolor;\n height: 100%;\n width: 100%;\n}\n\n.qds-click-target {\n height: var(--qds-experimental-icon-click-target-size);\n left: calc(-1 * (var(--qds-experimental-icon-click-target-size) - 100%) / 2);\n position: absolute;\n top: calc(-1 * (var(--qds-experimental-icon-click-target-size) - 100%) / 2);\n width: var(--qds-experimental-icon-click-target-size);\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport { Component, Element, Event, h, Prop, State, Watch } from '@stencil/core'\n\nimport type { Attributes } from '../../helpers'\nimport { inheritAriaAttributes } from '../../helpers'\nimport { getIconLibrary } from './library'\nimport requestIcon from './request'\n\nlet parser: DOMParser | undefined\n\n/**\n * @experimental\n */\n@Component({\n tag: 'qds-icon',\n shadow: true,\n styleUrl: 'icon.css',\n})\nexport class Icon implements ComponentInterface {\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly name!: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly library: string = 'default'\n\n /**\n * Emitted when the icon has loaded.\n */\n @Event({ eventName: 'qdsLoad', cancelable: false })\n private readonly loadEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the icon fails to load due to an error.\n */\n @Event({ eventName: 'qdsError', cancelable: false })\n private readonly errorEmitter!: EventEmitter<void>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private svg = ''\n\n #inheritedAttributes: Attributes = {}\n\n @Watch('name')\n @Watch('library')\n private async setIcon(): Promise<void> {\n if (!this.name) return\n\n const library = getIconLibrary(this.library)\n if (!library) return\n\n const url = library.resolver(this.name)\n if (!url) {\n this.svg = ''\n return\n }\n\n try {\n const request = await requestIcon(url)\n if (!request.ok) {\n this.svg = ''\n this.errorEmitter.emit()\n return\n }\n\n // Create an instance of the DOM parser. We do it here instead of at the\n // top-level to support SSR while maintaining a single parser instance\n // for optimal performance.\n parser ||= new DOMParser()\n const document = parser.parseFromString(request.data, 'text/html')\n const svgElement = document.body.querySelector('svg')\n if (svgElement === null) {\n this.svg = ''\n this.errorEmitter.emit()\n } else {\n for (const [key, value] of Object.entries(this.#inheritedAttributes))\n if (value !== undefined) svgElement.setAttribute(key, value)\n this.svg = svgElement.outerHTML\n this.loadEmitter.emit()\n }\n } catch {\n this.errorEmitter.emit()\n }\n }\n\n public async componentWillLoad(): Promise<void> {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n await this.setIcon()\n }\n\n public render() {\n return (\n <div class=\"qds-container\">\n <span class=\"qds-icon-wrapper\" innerHTML={this.svg} />\n <div class=\"qds-click-target\" />\n </div>\n )\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"p-CK_Yxg3A.js","mappings":";;;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,w1HAAw1H;;ACAz2H;AACA;AACA;;;;;;;;;;;;;;;;;;MAsCa,KAAK,iBAAAA,kBAAA,CAAA,MAAA,KAAA,SAAAC,CAAA,CAAA;AALlB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;AAME;;;;;AAKG;AACqB,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAE/C;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAU,UAAU;AA0FhD,QAAA,0BAAA,CAAA,GAAA,CAAA,IAAA,EAAmC,EAAE,CAAA;QAErC,YAAyB,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QAiGhB,UAAO,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,KAAwB,KAAU;YACjD,sBAAA,CAAA,IAAI,EAAA,YAAA,EAAU,KAAK,EAAA,GAAA,CAAA;AACrB,SAAC,CAAA;QAEQ,aAAU,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,KAAiB,KAAU;YAC7C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AACxD,SAAC,CAAA;AAEQ,QAAA,eAAA,CAAA,GAAA,CAAA,IAAA,EAAY,MAAW;AAC9B,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE;AAC3B,SAAC,CAAA;QAEQ,cAAW,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,KAAiB,KAAU;YAC9C,IAA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gBAAA,EAAA,GAAA,EAAA,uBAAA,CAAc,EAC7B,OAAO,EAAC,MAAM,EACd,IAAI,EAAC,SAAS,GACd,CACE,EACL,sBAAA,CAAA,IAAI,EAAS,gBAAA,EAAA,GAAA,EAAA,kBAAA,CAAA,KACZ,CAAA,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAE,sBAAA,CAAA,IAAI,EAAc,gBAAA,EAAA,GAAA,EAAA,uBAAA,CAAA,EACxB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,CAAA,CACH,CACK;;;;;;;;;;;;;;;;;;;;;;AA1FV,IAAA,OAAO,IAAI,CAAC,QAAQ,IAAI,KAAK;AAC/B,CAAC,EAAA,uBAAA,GAAA,SAAA,uBAAA,GAAA;AAGC,IAAA,QAAQ,IAAI,CAAC,IAAI;AACf,QAAA,KAAK,UAAU;AACf,QAAA,KAAK,OAAO;QACZ,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI;;QAElB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,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-box,\n.qds-icon {\n grid-area: radio;\n place-self: center;\n}\n\n.qds-icon,\n.qds-box {\n display: none;\n pointer-events: none;\n}\n\n.qds-box {\n border-radius: var(--qds-control-rounded-border-radius);\n}\n\n.qds-container {\n display: grid;\n align-self: flex-start;\n grid-template-areas: 'radio';\n}\n\n.qds-icon {\n color: var(--qds-theme-signature-color-contrast);\n}\n\n.qds-label {\n cursor: pointer;\n display: inline-flex;\n width: inherit;\n}\n\n.qds-label-inner {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.qds-radio {\n appearance: none;\n background-color: var(--qds-theme-control-input-background);\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 print-color-adjust: exact;\n\n &:focus-visible {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n }\n\n &:hover ~ .qds-box,\n &:active ~ .qds-box {\n display: block;\n }\n\n &:hover ~ .qds-box {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active ~ .qds-box {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n\n &:checked {\n background-color: var(--qds-theme-signature-color-default);\n border-color: transparent;\n\n & ~ .qds-icon {\n display: block;\n }\n\n &:hover {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n }\n}\n\n[aria-disabled='true'] {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-size='small'] {\n &.qds-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-small-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-small-indicator-size);\n height: var(--qds-control-toggle-small-indicator-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 }\n\n &.qds-inline {\n margin-block: var(--qds-control-small-padding-auto-height);\n min-height: var(--qds-control-small-height);\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-standard-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-standard-indicator-size);\n height: var(--qds-control-toggle-standard-indicator-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 }\n\n &.qds-inline {\n margin-block: var(--qds-control-standard-padding-auto-height);\n min-height: var(--qds-control-standard-height);\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-large-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-large-indicator-size);\n height: var(--qds-control-toggle-large-indicator-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 }\n\n &.qds-inline {\n margin-block: var(--qds-control-large-padding-auto-height);\n min-height: var(--qds-control-large-height);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { Attributes, QdsFocusEventDetail } from '../../helpers'\nimport {\n inheritAriaAttributes,\n invariant,\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 #inheritedAttributes: Attributes = {}\n\n #input?: HTMLInputElement\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 public componentWillLoad(): void {\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public render() {\n return (\n // eslint-disable-next-line jsx-a11y/label-has-associated-control\n <label\n aria-disabled={this.#computedDisabled ? 'true' : undefined}\n class={{\n 'qds-inline': this.inline,\n 'qds-label': true,\n }}\n data-size={this.#computedSize}\n >\n <div class=\"qds-container\">\n <input\n 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 <div class=\"qds-box\" data-size={this.#computedSize} />\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library=\"core\"\n name=\"checked\"\n />\n </div>\n {this.#hasText && (\n <qds-label\n class=\"qds-label-inner\"\n size={this.#computedSize}\n text={this.text}\n />\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 }\n\n readonly #onChange = (): void => {\n this.changeEmitter.emit()\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"p-CPvTGxdE.js","mappings":";;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,++GAA++G;;ACAngH;AACA;AACA;;;;;;;;;;;;;;;;;;MAmCa,QAAQ,iBAAAA,kBAAA,CAAA,MAAA,QAAA,SAAAC,CAAA,CAAA;AANrB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;;;AAOE;;;;;AAKG;AACqB,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAE/C;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAU,UAAU;AAyBhD;;;;;;;;;;;;;;;AAeG;;AAEqB,QAAA,IAAI,CAAA,IAAA,GAAsC,IAAI;AAgCtE;;;;;;AAMG;AAEa,QAAA,IAAiB,CAAA,iBAAA,GAA0C,EAAE;AAE7E;;;;;;;AAOG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAiC,WAAW;AAE5E;;;;AAIG;AACqB,QAAA,IAAK,CAAA,KAAA,GAAmB,IAAI;AAEpD;;;;;;AAMG;AACqB,QAAA,IAAY,CAAA,YAAA,GAAqC,KAAK;AAE9E;;AAEG;AACqB,QAAA,IAAY,CAAA,YAAA,GAAY,KAAK;AA0BrD,QAAA,6BAAA,CAAA,GAAA,CAAA,IAAA,EAAmC,EAAE,CAAA;AAoK9B,QAAA,IAAa,CAAA,aAAA,GAAsC,MACxD,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE;AAEzB,QAAA,IAAc,CAAA,cAAA,GAAuC,MAC1D,IAAI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A,SAAA,2BAAA,GAAA;;AAIC,IAAA,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;AAC1D,CAAC,EAAA,qBAAA,GAAA,SAAA,qBAAA,GAAA;AAGC,IAAA,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY;AAC3E,CAAC,EAAA,sBAAA,GAAA,SAAA,sBAAA,CAkJa,CAAc,EAAE,GAAkB,EAAA;AAC9C,IAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAChE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/checkbox/checkbox.css?tag=qds-checkbox&encapsulation=shadow","src/components/checkbox/checkbox.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n line-height: 0;\n}\n\n.qds-checkbox,\n.qds-box,\n.qds-icon {\n grid-area: checkbox;\n place-self: center;\n}\n\n.qds-icon,\n.qds-box {\n display: none;\n pointer-events: none;\n}\n\n.qds-box {\n border-radius: var(--qds-control-toggle-indicator-border-radius);\n}\n\n.qds-container {\n display: grid;\n align-self: flex-start;\n grid-template-areas: 'checkbox';\n}\n\n.qds-icon {\n color: var(--qds-theme-signature-color-contrast);\n}\n\n.qds-label {\n cursor: pointer;\n display: inline-flex;\n width: inherit;\n}\n\n.qds-label-inner {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.qds-checkbox {\n appearance: none;\n background-color: var(--qds-theme-control-input-background);\n border-radius: var(--qds-control-border-radius);\n border: var(--qds-control-border-width) solid var(--qds-theme-control-border);\n cursor: pointer;\n margin: 0;\n print-color-adjust: exact;\n\n &:focus-visible {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n }\n\n &:hover ~ .qds-box,\n &:active ~ .qds-box {\n display: block;\n }\n\n &:hover ~ .qds-box {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active ~ .qds-box {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n\n &:checked ~ .qds-checked,\n &:indeterminate ~ .qds-indeterminate {\n display: block;\n }\n\n &:checked,\n &:indeterminate {\n background-color: var(--qds-theme-signature-color-default);\n border-color: transparent;\n\n &:hover {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n }\n}\n\n[aria-disabled='true'] {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n[data-size='small'] {\n &.qds-checkbox {\n width: var(--qds-control-toggle-small-box-size);\n height: var(--qds-control-toggle-small-box-size);\n }\n\n &.qds-icon {\n font-size: var(--qds-control-small-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-small-indicator-size);\n height: var(--qds-control-toggle-small-indicator-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 }\n\n &.qds-inline {\n margin-block: var(--qds-control-small-padding-auto-height);\n min-height: var(--qds-control-small-height);\n }\n}\n\n[data-size='standard'] {\n &.qds-checkbox {\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-standard-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-standard-indicator-size);\n height: var(--qds-control-toggle-standard-indicator-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 }\n\n &.qds-inline {\n margin-block: var(--qds-control-standard-padding-auto-height);\n min-height: var(--qds-control-standard-height);\n }\n}\n\n[data-size='large'] {\n &.qds-checkbox {\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-large-icon-size);\n }\n\n &.qds-box {\n width: var(--qds-control-toggle-large-indicator-size);\n height: var(--qds-control-toggle-large-indicator-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 }\n\n &.qds-inline {\n margin-block: var(--qds-control-large-padding-auto-height);\n min-height: var(--qds-control-large-height);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { Attributes, QdsFocusEventDetail } from '../../helpers'\nimport { inheritAriaAttributes, pickFocusEventAttributes } from '../../helpers'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Size } from '../shared'\n\nexport type CheckboxValue = number | string | null\n\n/**\n * `<qds-checkbox>` elements are rendered as boxes that are checked (ticked)\n * when activated, like you might see in an official government paper form. A\n * checkbox allows you to select single values for submission in a form (or not).\n *\n * @see https://quartz.se.com/build/components/checkbox\n */\n@Component({\n tag: 'qds-checkbox',\n formAssociated: true,\n shadow: { delegatesFocus: true },\n styleUrl: 'checkbox.css',\n})\nexport class Checkbox implements ComponentInterface {\n /**\n * Adds vertical margin to the checkbox for alignment.\n *\n * This is useful when creating inline layouts so that the first lines have\n * the correct vertical centering.\n */\n @Prop() public readonly inline: boolean = false\n\n /**\n * The checkbox's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The checkbox's text.\n *\n * Its value will also be used as the `aria-label` value when the\n * `checkbox-only` attribute is specified.\n */\n @Prop() public readonly text!: string\n\n /**\n * Sets the checkbox's state.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public checked?: boolean\n\n /**\n * Prevents the checkbox from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop() public readonly disabled?: boolean\n\n /**\n * The [`<form>`][] element to associate the checkbox with (its form owner).\n *\n * The value of this attribute must be the id of a `<form>` in the same\n * document. If this attribute is not set, the `<qds-checkbox>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-checkbox>` elements to `<form>`s\n * anywhere in the document, not just inside a `<form>`. It can also override\n * an ancestor `<form>` element.\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n *\n * @readonly\n * @webnative\n */\n // eslint-disable-next-line unicorn/no-null\n @Prop() public readonly form: ElementInternals['form'] | string = null\n\n /**\n * Sets the checkbox to an indeterminate state. This is usually applied to\n * checkboxes that represent a \"select all/none\" behavior when associated\n * checkboxes have a mix of checked and unchecked states.\n *\n * @webnative\n */\n @Prop({ mutable: true }) public indeterminate?: boolean\n\n /**\n * The name of the checkbox, which is submitted with the form data.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * A value must be specified for the checkbox before the owning form can be\n * submitted.\n *\n * See\n * [Client-side validation](https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation)\n * and the\n * [HTML attribute: `required`](https://developer.mozilla.org/docs/Web/HTML/Attributes/required)\n * for more information.\n *\n * @webnative\n */\n @Prop() public readonly required?: boolean\n\n /**\n * The error message that would be shown to the user if the `<qds-checkbox>`\n * was to be checked for validity.\n *\n * @readonly\n * @webnative\n */\n @Prop()\n public readonly validationMessage: ElementInternals['validationMessage'] = ''\n\n /**\n * The [`ValidityState`][] object for this `<qds-checkbox>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * The value of the checkbox, submitted as a name/value pair with form data.\n *\n * @webnative\n */\n @Prop() public readonly value?: CheckboxValue = 'on'\n\n /**\n * True if `<qds-checkbox>` will be validated when the form is submitted;\n * false otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n /**\n * Whether or not the text is displayed.\n */\n @Prop() public readonly checkboxOnly: boolean = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when a change to the checkbox's state is committed by the user.\n */\n @Event({ eventName: 'qdsChange', cancelable: false })\n private readonly changeEmitter!: EventEmitter<void>\n\n /**\n * Emitted when the checkbox gains focus.\n */\n @Event({ eventName: 'qdsFocus', bubbles: false, cancelable: false })\n private readonly focusEmitter!: EventEmitter<QdsFocusEventDetail>\n\n @Element() private readonly host!: HTMLElement\n\n @State() private tabIndex?: number\n\n #inheritedAttributes: Attributes = {}\n\n get #computedChecked(): boolean {\n return this.checked ?? false\n }\n\n get #computedDisabled(): boolean {\n return (\n (this.host.matches(':disabled') || (this.disabled ?? false)) &&\n this.host.getAttribute('disabled') !== 'false'\n )\n }\n\n get #computedIndeterminate(): boolean {\n return this.indeterminate ?? false\n }\n\n get #computedSize(): Size {\n switch (this.size) {\n case 'standard':\n case 'small':\n case 'large': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedValue(): string | null {\n // eslint-disable-next-line unicorn/no-null\n return this.value == null ? null : this.value.toString()\n }\n\n get #hasText(): boolean {\n return (this.text !== '' || this.required === true) && !this.checkboxOnly\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) {\n event.stopImmediatePropagation()\n return\n }\n\n event.preventDefault()\n\n this.checked = this.#computedIndeterminate ? true : !this.#computedChecked\n this.changeEmitter.emit()\n this.indeterminate = false\n }\n\n @Watch('checked')\n protected checkedChanged(): void {\n this.internals.setFormValue(\n this.#computedChecked && !this.#computedDisabled\n ? this.#computedValue\n : // eslint-disable-next-line unicorn/no-null\n null,\n )\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n if (this.#computedChecked && !this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\n // eslint-disable-next-line unicorn/no-null\n else this.internals.setFormValue(null)\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n @Watch('value')\n protected valueChanged(): void {\n if (this.#computedChecked && !this.#computedDisabled)\n this.internals.setFormValue(this.#computedValue)\n }\n\n public componentWillLoad(): void {\n this.valueChanged()\n\n this.#defineGetter('form', () => this.internals.form)\n this.#defineGetter('willValidate', () => this.internals.willValidate)\n this.#defineGetter('validity', () => this.internals.validity)\n this.#defineGetter(\n 'validationMessage',\n () => this.internals.validationMessage,\n )\n\n this.#inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public render() {\n return (\n // eslint-disable-next-line jsx-a11y/label-has-associated-control\n <label\n aria-disabled={this.#computedDisabled ? 'true' : undefined}\n class={{\n 'qds-inline': this.inline,\n 'qds-label': true,\n }}\n data-size={this.#computedSize}\n >\n <div class=\"qds-container\">\n <input\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.host.autofocus}\n checked={this.#computedIndeterminate ? false : this.checked}\n class=\"qds-checkbox\"\n data-size={this.#computedSize}\n disabled={this.#computedDisabled}\n indeterminate={this.indeterminate}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n required={this.required}\n tabIndex={this.#computedDisabled ? undefined : this.tabIndex}\n type=\"checkbox\"\n aria-label={this.checkboxOnly ? this.text : undefined}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.#inheritedAttributes}\n />\n <qds-icon\n aria-hidden=\"true\"\n class={{\n 'qds-icon': true,\n 'qds-checked': true,\n }}\n data-size={this.#computedSize}\n library=\"core\"\n name=\"checked\"\n />\n <div class=\"qds-box\" data-size={this.#computedSize} />\n <qds-icon\n aria-hidden=\"true\"\n class={{\n 'qds-icon': true,\n 'qds-indeterminate': true,\n }}\n data-size={this.#computedSize}\n library=\"core\"\n name=\"indeterminate\"\n />\n </div>\n {this.#hasText && (\n <qds-label\n class=\"qds-label-inner\"\n required={this.required}\n size={this.size}\n text={this.text}\n tabindex={-1}\n tooltipTarget={this.host}\n />\n )}\n </label>\n )\n }\n\n public checkValidity: ElementInternals['checkValidity'] = () =>\n this.internals.checkValidity()\n\n public reportValidity: ElementInternals['reportValidity'] = () =>\n this.internals.reportValidity()\n\n public setCustomValidity: HTMLInputElement['setCustomValidity'] = (error) => {\n if (error) this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.host)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n #defineGetter(p: PropertyKey, get: () => unknown): void {\n Object.defineProperty(this.host, p, { enumerable: true, get })\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"p-GGIVf4ry.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,SAAS,GAAG,04RAA04R;;ACA55R;AACA;AACA;;;;;;;;;;;;;;;;;;AAiCA,MAAM,SAAS,GAAG,CAAC,KAAc,KAC/B,OAAO,KAAK,KAAK;AACf,MAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;AACxC,MAAE,OAAO,KAAK,KAAK,QAAQ;AAE/B,MAAM,WAAW,GAAG,CAAC,KAAc,KACjC,KAAK,KAAK,EAAE,IAAI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AAC,gBAAgB,KAAK,SAAS,EAAE;AACnE,QAAA,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,CAAA,EAAG,IAAI,CAAC,IAAI,CAAA,CAAA,EACrC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,KACtC,CAAI,CAAA,EAAA,IAAI,CAAC,gBAAgB,EAAE;QAC3B;;AAGF,IAAA,IACE,IAAI,CAAC,MAAM,KAAK,SAAS;QACzB,IAAI,CAAC,MAAM,KAAK,QAAQ;AACxB,QAAA,IAAI,CAAC,IAAI,KAAK,SAAS,EACvB;QACA,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,GAAG,IAAI,CAAC,IAAI,CAAA,mBAAA,CAAqB;QAC5D;;IAGF,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI;AACtC,CAAC,EAAA,oBAAA,GAAA,SAAA,oBAAA,CAEa,CAAc,EAAE,GAAkB,EAAA;AAC9C,IAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAChE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/button/button.css?tag=qds-button&encapsulation=shadow","src/components/button/button.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 outline: none;\n}\n\n.qds-button:disabled,\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n.qds-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &[data-size='hero'] {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n white-space: normal;\n }\n}\n\n.qds-action {\n transform: scaleX(var(--qds-direction-factor, 1));\n}\n\n.qds-container {\n display: grid;\n grid-template-areas: 'button';\n}\n\n.qds-focus-ring {\n border-radius: max(\n 1px,\n var(\n --qds-control-border-radius-top-left,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-border-radius)\n )\n );\n grid-area: button;\n isolation: isolate;\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n outline-offset: var(--qds-focus-border-offset);\n pointer-events: none;\n visibility: hidden;\n width: calc(\n 100% + var(--qds-control-border-width) -\n var(\n --qds-control-border-width-inline-end,\n var(--qds-control-border-width)\n )\n );\n height: calc(\n 100% + var(--qds-control-border-width) - var(--qds-control-border-width)\n );\n}\n\n:host(:focus-visible) .qds-focus-ring {\n visibility: visible;\n}\n\n.qds-button {\n position: relative;\n align-items: center;\n appearance: none;\n\n /* Avoid automatic minimum size on flex element: https://www.w3.org/TR/css-flexbox-1/#min-size-auto */\n min-width: 0;\n background-color: initial;\n border: none;\n border-radius: var(\n --qds-control-border-radius-top-left,\n var(--qds-control-border-radius)\n )\n var(--qds-control-border-radius-top-right, var(--qds-control-border-radius))\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-border-radius)\n );\n box-sizing: border-box;\n cursor: pointer;\n display: inline-flex;\n grid-area: button;\n justify-content: center;\n outline: none;\n padding-block: 0;\n print-color-adjust: exact;\n text-align: center;\n user-select: none;\n\n &:any-link {\n text-decoration: none;\n }\n}\n\n.qds-icon {\n flex-shrink: 0;\n}\n\n.qds-indicator {\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n transform: translate(50%, -50%);\n}\n\n[data-size='small'] {\n font: var(--qds-control-small-text);\n\n &.qds-button {\n gap: var(--qds-control-small-gap-internal);\n min-height: var(--qds-control-small-height);\n padding-inline: var(--qds-control-button-small-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-small-height);\n }\n }\n\n &.qds-icon {\n font-size: var(--qds-control-small-icon-size);\n }\n}\n\n[data-size='standard'] {\n font: var(--qds-control-standard-text);\n\n &.qds-button {\n gap: var(--qds-control-standard-gap-internal);\n min-height: var(--qds-control-standard-height);\n padding-inline: var(--qds-control-button-standard-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-standard-height);\n }\n }\n\n &.qds-icon {\n font-size: var(--qds-control-standard-icon-size);\n }\n}\n\n[data-size='large'] {\n font: var(--qds-control-large-text);\n\n &.qds-button {\n gap: var(--qds-control-large-gap-internal);\n min-height: var(--qds-control-large-height);\n padding-inline: var(--qds-control-button-large-padding-horizontal);\n\n &.qds-icon-only {\n width: var(--qds-control-large-height);\n }\n }\n\n &.qds-icon {\n font-size: var(--qds-control-large-icon-size);\n }\n}\n\n[data-size='small'],\n[data-size='standard'],\n[data-size='large'] {\n line-height: normal;\n\n &.qds-button.qds-icon-only {\n padding-inline: 0;\n }\n}\n\n[data-size='hero'] {\n font: var(--qds-control-hero-text);\n\n &.qds-button {\n border-radius: var(\n --qds-control-border-radius-top-left,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-hero-border-radius)\n )\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-hero-border-radius)\n );\n gap: var(--qds-control-hero-gap-internal);\n padding-block: var(--qds-control-hero-padding-auto-height);\n padding-inline: var(--qds-control-button-hero-padding-horizontal);\n\n &.qds-icon-only {\n min-height: var(--qds-control-hero-height);\n padding-inline: 0;\n width: var(--qds-control-hero-height);\n }\n }\n\n &.qds-focus-ring {\n border-radius: max(\n 1px,\n var(\n --qds-control-border-radius-top-left,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-top-right,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-right,\n var(--qds-control-hero-border-radius)\n )\n )\n max(\n 1px,\n var(\n --qds-control-border-radius-bottom-left,\n var(--qds-control-hero-border-radius)\n )\n );\n }\n\n &.qds-icon {\n font-size: var(--qds-control-hero-icon-size);\n }\n}\n\n[data-importance='subdued'] {\n color: var(--qds-theme-link-standard-default);\n\n &.qds-button {\n border-block-end: var(--qds-control-border-width) solid transparent;\n padding-inline: 0;\n\n &:hover {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-link-standard-hover);\n color: var(--qds-theme-link-standard-hover);\n }\n\n &:active {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-link-standard-pressed);\n color: var(--qds-theme-link-standard-pressed);\n }\n\n &:not(.qds-icon-only) {\n border-radius: 0;\n }\n\n &.qds-icon-only {\n border: none;\n color: var(--qds-theme-control-text-standard);\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 }\n}\n\n[data-importance='standard'] {\n color: var(--qds-theme-control-text-standard);\n\n &.qds-button {\n border-color: var(--qds-theme-control-border);\n border-style: solid;\n border-width: var(--qds-control-border-width);\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}\n\n[data-importance='emphasized'] {\n &.qds-button {\n background-color: var(--qds-theme-signature-color-default);\n color: var(--qds-theme-signature-color-contrast);\n\n &:hover {\n background-color: var(--qds-theme-signature-color-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-signature-color-pressed);\n }\n }\n}\n\n[data-importance='destructive'] {\n &.qds-button {\n background-color: var(--qds-theme-feedback-action-destructive-default);\n color: var(--qds-theme-feedback-action-destructive-contrast);\n\n &:hover {\n background-color: var(--qds-theme-feedback-action-destructive-hover);\n }\n\n &:active {\n background-color: var(--qds-theme-feedback-action-destructive-pressed);\n }\n }\n}\n\n[data-importance='subdued-destructive'] {\n color: var(--qds-theme-feedback-action-destructive-default);\n\n &.qds-button {\n border-block-end: var(--qds-control-border-width) solid transparent;\n padding-inline: 0;\n\n &:hover {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-feedback-action-destructive-hover);\n color: var(--qds-theme-feedback-action-destructive-hover);\n }\n\n &:active {\n border-block-end: var(--qds-control-border-width) solid\n var(--qds-theme-feedback-action-destructive-pressed);\n color: var(--qds-theme-feedback-action-destructive-pressed);\n }\n\n &:not(.qds-icon-only) {\n border-radius: 0;\n }\n\n &.qds-icon-only {\n border: none;\n\n &:hover {\n background-color: var(--qds-theme-interactive-background-hover);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n\n &:active {\n background-color: var(--qds-theme-interactive-background-pressed);\n color: var(--qds-theme-feedback-action-destructive-default);\n }\n }\n }\n}\n\n[data-action='dropdown-close'] .qds-action {\n transform: rotate(-180deg);\n}\n\n:is([data-action='dropdown'], [data-action='dropdown-close']) {\n .qds-action {\n transition-duration: 0.3s;\n transition-property: transform;\n }\n\n &:not(:has(qds-badge-counter)) .qds-action {\n margin-inline-start: auto;\n }\n\n qds-badge-counter {\n margin-inline-start: auto;\n }\n\n &:not([data-importance='subdued'], [data-importance='subdued-destructive']) {\n padding-inline: var(--qds-control-input-padding-horizontal);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Placement } from '@floating-ui/dom'\nimport type { ComponentInterface, EventEmitter } from '@stencil/core'\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n h,\n Listen,\n Prop,\n readTask,\n State,\n Watch,\n} from '@stencil/core'\nimport type { LiteralUnion } from 'type-fest'\n\nimport type { QdsFocusEventDetail } from '../../helpers'\nimport { isOverflowing, pickFocusEventAttributes } from '../../helpers'\nimport { CUSTOM_ERROR_FLAGS, NO_ERROR_FLAGS, VALID_STATE } from '../controls'\nimport type { Importance, Size } from '../shared'\n\nexport type Action = 'dropdown-close' | 'dropdown' | 'next'\nexport type ButtonImportance =\n | Importance\n | 'destructive'\n | 'subdued-destructive'\nexport type ButtonSize = Size | 'hero'\nexport type ButtonTarget = '_blank' | '_parent' | '_self' | '_top'\nexport type ButtonType = 'button' | 'reset' | 'submit'\nexport type FormMethod = 'dialog' | 'get' | 'post'\n\nconst isCounter = (value: unknown): value is number =>\n typeof value === 'string'\n ? !Number.isNaN(Number.parseFloat(value))\n : typeof value === 'number'\n\nconst isIndicator = (value: unknown): value is '' | true =>\n value === '' || value === true\n\nconst preventDefault = (event: KeyboardEvent | MouseEvent): void => {\n event.preventDefault()\n}\n/**\n * The `<qds-button>` element is an interactive element activated by a user\n * with a mouse, keyboard, finger, voice command, or other assistive technology.\n * Once activated, it then performs a programmable action, such as submitting a\n * [form](https://developer.mozilla.org/docs/Learn/Forms)\n * or opening a dialog.\n *\n * @see https://quartz.se.com/build/components/button\n */\n@Component({\n tag: 'qds-button',\n formAssociated: true,\n shadow: true,\n styleUrl: 'button.css',\n})\nexport class Button implements ComponentInterface {\n /**\n * The name of the action icon to render.\n */\n @Prop() public readonly action?: Action\n\n /**\n * Displays an indicator if `true` or the empty string. Otherwise, displays a\n * counter badge if a number or string representing a number is used.\n *\n * @webnative\n */\n @Prop() public readonly badge?: number | string | true\n\n /**\n * The indicator or counter badge's accessible text that will be used by\n * screen readers.\n */\n @Prop() public readonly badgeDescription?: string\n\n /**\n * The indicator's status.\n */\n @Prop()\n public readonly badgeIndicatorStatus?: HTMLQdsBadgeIndicatorElement['status'] =\n 'neutral'\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * The button's importance.\n */\n @Prop() public readonly importance?: ButtonImportance = 'standard'\n\n /**\n * The button's size.\n */\n @Prop() public readonly size?: Size | 'hero' = 'standard'\n\n /**\n * The button's text.\n */\n @Prop() public readonly text!: string\n\n /**\n * Sets if button is icon only.\n */\n @Prop() public readonly iconOnly: boolean = false\n\n /**\n * Prevents the button from being interacted with: it cannot be pressed or\n * focused.\n *\n * @webnative\n */\n @Prop()\n public readonly disabled?: boolean\n\n /**\n * Tells the browser to download the linked file as this filename. Only used\n * when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly download?: string\n\n /**\n * The [`<form>`][] element to associate the button with (its form owner).\n *\n * The value of this attribute must be the id of a `<form>` in the same\n * document. If this attribute is not set, the `<qds-button>` is associated\n * with its ancestor `<form>` element, if any.\n *\n * This attribute lets you associate `<qds-button>` elements to `<form>`s\n * anywhere in the document, not just inside a `<form>`. It can also override\n * an ancestor `<form>` element.\n *\n * [`<form>`]: https://developer.mozilla.org/docs/Web/HTML/Element/form\n *\n * @readonly\n * @webnative\n */\n // eslint-disable-next-line unicorn/no-null\n @Prop() public readonly form: ElementInternals['form'] | string = null\n\n /**\n * The URL that processes the information submitted by the button. Overrides\n * the [`action`](https://developer.mozilla.org/docs/Web/HTML/Element/button#attr-formaction)\n * attribute of the button's form owner. Does nothing if there is no form owner.\n *\n * @webnative\n */\n @Prop({ attribute: 'formaction' }) public readonly formAction?: string\n\n /**\n * If the button is a submit button (it's inside/associated with a `<form>`\n * and doesn't have `type=\"button\"`), this attribute specifies the\n * [HTTP method][] used to submit the form, or `dialog` which won't submit\n * the form. Possible values:\n *\n * - `get`: The form data are appended to the form's action URL, with a ? as\n * a separator, and the resulting URL is sent to the server. Use this method\n * when the form has no side effects, like search forms.\n * - `post`: The data from the form are included in the body of the HTTP\n * request when sent to the server. Use when the form contains information\n * that shouldn't be public, like login credentials.\n * - `dialog`: Close the dialog box in which the button finds itself, if any,\n * and do not submit the button's form owner.\n *\n * If specified, this attribute overrides the `method` attribute of the\n * button's form owner.\n *\n * [HTTP method]: https://developer.mozilla.org/docs/Web/HTTP/Methods\n *\n * @webnative\n */\n @Prop({ attribute: 'formmethod' }) public readonly formMethod?: FormMethod\n\n /**\n * If the button is a submit button, this attribute specifies that the form\n * is not to be\n * [validated](https://developer.mozilla.org/docs/Learn/Forms/Form_validation)\n * when it is submitted. If this attribute is specified, it overrides the\n * [`novalidate`](https://developer.mozilla.org/docs/Web/HTML/Element/form#attr-novalidate)\n * attribute of the button's form owner.\n *\n * @webnative\n */\n @Prop({ attribute: 'formnovalidate' })\n public readonly formNoValidate: boolean = false\n\n /**\n * If the button is a submit button, this attribute is an author-defined name\n * or standardized, underscore-prefixed keyword indicating where to display\n * the response from submitting the form. This is the `name` of, or keyword\n * for, a browsing context (a tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe)).\n * If this attribute is specified, it overrides the\n * [`target`](https://developer.mozilla.org/docs/Web/HTML/Element/form#attr-target)\n * attribute of the button's form owner. The following keywords have special\n * meanings:\n *\n * - `_blank`: Load the response into a new unnamed browsing context — usually\n * a new tab or window, depending on the user's browser settings.\n * - `_parent`: Load the response into the parent browsing context of the\n * current one. If there is no parent, this option behaves the same way as\n * `_self`.\n * - `_self`: Load the response into the same browsing context as the current\n * one.\n * - `_top`: Load the response into the top-level browsing context (that is,\n * the browsing context that is an ancestor of the current one, and has no\n * parent). If there is no parent, this option behaves the same way as\n * `_self`.\n *\n * @webnative\n */\n @Prop({ attribute: 'formtarget' })\n public readonly formTarget: LiteralUnion<ButtonTarget, string> = '_self'\n\n /**\n * When set, the underlying button will be rendered as an `<a>` with this\n * `href` instead of a `<button>`.\n *\n * @webnative\n */\n @Prop() public readonly href?: string\n\n /**\n * Returns a list of the [`<label>`][] elements associated with the\n * `qds-button` element.\n *\n * [`<label>`]: https://developer.mozilla.org/docs/Web/HTML/Element/label\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly labels: ElementInternals['labels'] =\n {} as ElementInternals['labels']\n\n /**\n * When href is define and the button act as a link (`<a>`), the `rel` will be added to the element.\n *\n * @webnative\n */\n @Prop() public readonly rel?: string = 'noopener'\n\n /**\n * The name of the button, submitted as a pair with the button's `value` as\n * part of the form data, when that button is used to submit the form.\n * Ignored when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly name?: string\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a\n * tab, window, or\n * [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).\n * The following keywords have special meanings for where to load the URL:\n *\n * - `_blank`: usually a new tab, but users can configure browsers to open a new\n * window instead.\n * - `_parent`: the parent browsing context of the current one. If no parent,\n * behaves as `_self`.\n * - `_self`: the current browsing context.\n * - `_top`: the topmost browsing context (the \"highest\" context that's an\n * ancestor of the current one). If no ancestors, behaves as `_self`.\n *\n * @webnative\n */\n @Prop() public readonly target?: LiteralUnion<ButtonTarget, string>\n\n /**\n * The type of button.\n *\n * `button`: The button has no default behavior, and does nothing when\n * pressed by default. It can have client-side scripts listen to the\n * element's events, which are triggered when the events occur.\n *\n * `submit`: The button submits the form data to the server. This is the\n * default if the attribute is not specified for buttons associated with a\n * `<form>`, or if the attribute is an empty or invalid value.\n *\n * `reset`: The button resets all the controls to their initial values.\n *\n * @webnative\n */\n @Prop() public readonly type?: ButtonType\n\n /**\n * The error message that would be shown to the user if the `<qds-button>`\n * was to be checked for validity.\n *\n * @readonly\n * @webnative\n */\n @Prop()\n public readonly validationMessage: ElementInternals['validationMessage'] = ''\n\n /**\n * The [`ValidityState`][] object for this `<qds-button>`.\n *\n * [`ValidityState`]: https://developer.mozilla.org/docs/Web/API/ValidityState\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly validity: ElementInternals['validity'] = VALID_STATE\n\n /**\n * Defines the value associated with the button's `name` when it's submitted\n * with the form data. This value is passed to the server in params when the\n * form is submitted using this button. Ignored when `href` is set.\n *\n * @webnative\n */\n @Prop() public readonly value?: string\n\n /**\n * True if `<qds-button>` will be validated when the form is submitted; false\n * otherwise.\n *\n * @readonly\n * @webnative\n */\n @Prop() public readonly willValidate: ElementInternals['willValidate'] = false\n\n /**\n * Placement of the overflow tooltip.\n */\n @Prop() public readonly tooltipPlacement: Placement = 'top'\n\n /**\n * Emitted when the button loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the 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 tooltip = false\n\n @AttachInternals() private readonly internals!: ElementInternals\n\n #savedTabIndex = 0\n\n #button?: HTMLAnchorElement | HTMLButtonElement\n\n #span?: HTMLSpanElement\n\n #ro?: ResizeObserver\n\n get #buttonType(): ButtonType {\n if (this.type === undefined)\n return this.internals.form ? 'submit' : 'button'\n return this.type\n }\n\n get #iconOnly(): boolean {\n const hasIcon = this.iconName !== undefined && this.iconName !== ''\n\n return hasIcon && this.iconOnly\n }\n\n get #computedAction(): Action | undefined {\n switch (this.action) {\n case 'dropdown':\n case 'dropdown-close':\n case 'next': {\n return this.action\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computedActionIcon(): Exclude<Action, 'dropdown-close'> | undefined {\n switch (this.action) {\n case 'dropdown':\n case 'next': {\n return this.action\n }\n case 'dropdown-close': {\n return 'dropdown'\n }\n default: {\n return undefined\n }\n }\n }\n\n get #computedDisabled(): boolean {\n return this.disabled ?? false\n }\n\n get #computedImportance(): ButtonImportance {\n switch (this.importance) {\n case 'emphasized':\n case 'subdued':\n case 'destructive':\n case 'subdued-destructive': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedSize(): ButtonSize {\n switch (this.size) {\n case 'small':\n case 'large':\n case 'hero': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n @Listen('blur')\n protected onBlur(event: FocusEvent): void {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.#computedDisabled) {\n event.stopImmediatePropagation()\n return\n }\n\n if (this.#buttonType === 'button' || !this.internals.form) return\n if (this.#buttonType === 'reset') {\n this.internals.form.reset()\n } else {\n this.internals.form.requestSubmit()\n }\n event.preventDefault()\n }\n\n @Listen('focus')\n protected onFocus(event: FocusEvent): void {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n\n @Listen('keydown')\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n if (this.#button instanceof HTMLAnchorElement) this.#button.click()\n else this.host.click()\n }\n }\n\n @Listen('keyup')\n protected onKeyup(event: KeyboardEvent): void {\n if (event.key === ' ') this.host.click()\n }\n\n @Watch('disabled')\n protected disabledChanged(): void {\n this.internals.ariaDisabled = this.#computedDisabled.toString()\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('href')\n protected hrefChanged(): void {\n this.internals.role = this.href === undefined ? 'button' : 'link'\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string | null): void {\n if (newValue !== null) {\n const parsedValue = Number.parseInt(newValue, 10)\n this.#savedTabIndex =\n Number.isNaN(parsedValue) || !Number.isFinite(parsedValue)\n ? 0\n : parsedValue\n }\n if (this.#computedDisabled) this.host.removeAttribute('tabindex')\n else this.host.tabIndex = this.#savedTabIndex\n }\n\n @Watch('text')\n protected textChanged(): void {\n this.#updateAriaLabel()\n\n if (this.#ro) this.#ro.disconnect()\n if (!this.#span) return\n\n const span = this.#span\n readTask(() => {\n this.tooltip = isOverflowing(span)\n })\n this.#ro = new ResizeObserver(([spanEntry]) => {\n this.tooltip = isOverflowing(spanEntry.target)\n })\n this.#ro.observe(this.#span)\n }\n\n public componentWillLoad(): void {\n this.#defineGetter('form', () => this.internals.form)\n this.#defineGetter('willValidate', () => this.internals.willValidate)\n this.#defineGetter('validity', () => this.internals.validity)\n this.#defineGetter(\n 'validationMessage',\n () => this.internals.validationMessage,\n )\n this.#defineGetter('labels', () => this.internals.labels)\n\n this.hrefChanged()\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n this.disabledChanged()\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 const Tag = this.href === undefined ? 'button' : 'a'\n\n return (\n <div\n class=\"qds-container\"\n onClick={this.#onClick}\n onKeyDown={preventDefault}\n onKeyUp={preventDefault}\n onKeyPress={preventDefault}\n aria-hidden=\"true\"\n >\n <Tag\n class={{\n 'qds-button': true,\n 'qds-disabled': Tag === 'a' ? this.#computedDisabled : false,\n 'qds-icon-only': this.#iconOnly,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n data-action={this.#computedAction}\n disabled={Tag === 'a' ? undefined : this.disabled}\n download={Tag === 'a' ? this.download : undefined}\n formAction={this.formAction}\n formMethod={this.formMethod}\n formNoValidate={this.formNoValidate}\n formTarget={this.formTarget}\n href={Tag === 'a' ? this.href : undefined}\n name={Tag === 'a' ? undefined : this.name}\n ref={this.#buttonRef}\n rel={Tag === 'a' ? this.rel : undefined}\n tabIndex={-1}\n target={Tag === 'a' ? this.target : undefined}\n type={Tag === 'a' ? undefined : this.#buttonType}\n value={Tag === 'a' ? undefined : this.value}\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n class=\"qds-icon\"\n data-size={this.#computedSize}\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n {!this.#iconOnly && (\n <span\n class=\"qds-overflow\"\n data-size={this.#computedSize}\n ref={this.#spanRef}\n >\n {this.text}\n </span>\n )}\n {isIndicator(this.badge) && (\n <qds-badge-indicator\n class=\"qds-indicator\"\n status={this.badgeIndicatorStatus}\n description={this.badgeDescription}\n size={this.#computedSize}\n strokeRing\n />\n )}\n {isCounter(this.badge) && (\n <qds-badge-counter\n class={{\n 'qds-indicator': this.#iconOnly,\n }}\n description={this.badgeDescription}\n importance={this.#computedImportance}\n size={this.#computedSize}\n strokeRing\n value={this.badge}\n />\n )}\n {this.#computedActionIcon !== undefined && (\n <qds-icon\n class=\"qds-icon qds-action\"\n data-size={this.#computedSize}\n library=\"core\"\n name={this.#computedActionIcon}\n />\n )}\n </Tag>\n <div\n class={{\n 'qds-focus-ring': true,\n 'qds-icon-only': this.#iconOnly,\n }}\n data-importance={this.#computedImportance}\n data-size={this.#computedSize}\n />\n {this.tooltip && (\n <qds-tooltip ref={this.#tooltipRef} placement={this.tooltipPlacement}>\n {this.text}\n </qds-tooltip>\n )}\n </div>\n )\n }\n\n public checkValidity: ElementInternals['checkValidity'] = () =>\n this.internals.checkValidity()\n\n public reportValidity: ElementInternals['reportValidity'] = () =>\n this.internals.reportValidity()\n\n public setCustomValidity: HTMLButtonElement['setCustomValidity'] = (\n error,\n ) => {\n if (error)\n this.internals.setValidity(CUSTOM_ERROR_FLAGS, error, this.#button)\n else this.internals.setValidity(NO_ERROR_FLAGS)\n }\n\n readonly #buttonRef = (\n button?: HTMLAnchorElement | HTMLButtonElement,\n ): void => {\n this.#button = button\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 }\n\n readonly #onClick = (event: MouseEvent): void => {\n if (this.#computedDisabled) {\n preventDefault(event)\n event.stopImmediatePropagation()\n }\n }\n\n #updateAriaLabel(): void {\n if (this.badge !== undefined && this.badgeDescription !== undefined) {\n this.internals.ariaLabel = `${this.text} ${\n isIndicator(this.badge) ? '' : this.badge\n } ${this.badgeDescription}`\n return\n }\n\n if (\n this.target !== undefined &&\n this.target === '_blank' &&\n this.href !== undefined\n ) {\n this.internals.ariaLabel = `${this.text} Opens in a new tab`\n return\n }\n\n this.internals.ariaLabel = this.text\n }\n\n #defineGetter(p: Propert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CAAA,IAAI,EAAoB,gBAAA,EAAA,GAAA,EAAA,6BAAA,CAAA,EACzC,GAAG,EAAE,sBAAA,CAAA,IAAI,EAAU,eAAA,EAAA,GAAA,CAAA;;YAEnB,QAAQ,EAAE,IAAI,CAAC,gBAAgB,GAAG,CAAC,GAAG,SAAS,EAAA,EAE9C,IAAI,CAAC,QAAQ,IAAI,6DAAM,KAAK,EAAC,cAAc,EAAS,EAAA,GAAA,CAAA,EACrD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,UAAU,EAAC,GAAG,EAAE,sBAAA,CAAA,IAAI,EAAS,cAAA,EAAA,GAAA,CAAA,EAAA,EACtC,IAAI,CAAC,IAAI,CACL,EACN,IAAI,CAAC,gBAAgB,KACpB,mFAAyB,MAAM,EAAC,GAAG,EAAE,sBAAA,CAAA,IAAI,EAAqB,0BAAA,EAAA,GAAA,CAAA,EAAA,EAC3D,IAAI,CAAC,IAAI,CACE,CACf,CACI;;;;;;;;;;;;;;;;;;AAtET,IAAA,QAAQ,IAAI,CAAC,IAAI;AACf,QAAA,KAAK,UAAU;AACf,QAAA,KAAK,OAAO;QACZ,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI;;QAElB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC,EAAA,6BAAA,GAAA,SAAA,6BAAA,GAAA;AAGC,IAAA,QAAQ,IAAI,CAAC,UAAU;AACrB,QAAA,KAAK,YAAY;QACjB,KAAK,UAAU,EAAE;YACf,OAAO,IAAI,CAAC,UAAU;;QAExB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/label/label.css?tag=qds-label&encapsulation=shadow","src/components/label/label.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: inline-block;\n}\n\n.qds-label {\n box-sizing: border-box;\n color: var(--qds-theme-control-text-standard);\n display: inline-flex;\n align-items: center;\n gap: var(--qds-text-icon-gap);\n width: 100%;\n\n &:focus-visible {\n outline: var(--qds-focus-border-width) solid var(--qds-theme-focus-border);\n outline-offset: var(--qds-focus-border-offset);\n border-radius: var(--qds-focus-border-radius);\n }\n}\n\n.qds-text {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.qds-required {\n color: var(--qds-theme-feedback-field-required);\n user-select: none;\n}\n\n[data-size='small'] {\n &[data-importance='standard'] {\n font: var(--qds-form-small-text);\n }\n\n &[data-importance='emphasized'] .qds-text {\n font: var(--qds-form-small-text-emphasized);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-small-height);\n }\n\n &.qds-icon {\n height: var(--qds-form-small-icon-size);\n width: var(--qds-form-small-icon-size);\n min-width: var(--qds-form-small-icon-size);\n }\n}\n\n[data-size='standard'] {\n &[data-importance='standard'] {\n font: var(--qds-form-standard-text);\n }\n\n &[data-importance='emphasized'] .qds-text {\n font: var(--qds-form-standard-text-emphasized);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-standard-height);\n }\n\n &.qds-icon {\n height: var(--qds-form-standard-icon-size);\n width: var(--qds-form-standard-icon-size);\n min-width: var(--qds-form-standard-icon-size);\n }\n}\n\n[data-size='large'] {\n &[data-importance='standard'] {\n font: var(--qds-form-large-text);\n }\n\n &[data-importance='emphasized'] .qds-text {\n font: var(--qds-form-large-text-emphasized);\n }\n\n &.qds-inline {\n min-height: var(--qds-control-large-height);\n }\n\n &.qds-icon {\n height: var(--qds-form-large-icon-size);\n width: var(--qds-form-large-icon-size);\n min-width: var(--qds-form-large-icon-size);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface } from '@stencil/core'\nimport { Component, h, Prop, readTask, State, Watch } from '@stencil/core'\n\nimport { isOverflowing } from '../../helpers'\nimport type { Importance, Size } from '../shared'\nimport type { Tooltip } from '../tooltip/tooltip'\n\nexport type LabelImportance = Exclude<Importance, 'subdued'>\n\n/**\n * `<qds-label>` elements represent a caption for an item in a user interface.\n *\n * @see https://quartz.se.com/build/components/label\n */\n@Component({\n tag: 'qds-label',\n shadow: true,\n styleUrl: 'label.css',\n})\nexport class Label implements ComponentInterface {\n /**\n * Adds vertical margin to the label 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 * Specify the labelled item as required by appending a red asterisk (*).\n */\n @Prop() public readonly required: boolean = false\n\n /**\n * The label's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * The label's importance.\n */\n @Prop() public readonly importance?: LabelImportance = 'standard'\n\n /**\n * The label's text.\n */\n @Prop() public readonly text?: string\n\n /**\n * The element to which the tooltip is anchored.\n * By default, the tooltip is anchored to the label itself when this prop is not set.\n */\n @Prop() public readonly tooltipTarget?: Tooltip['target']\n\n @State() private truncatedTooltip = false\n\n #label?: HTMLSpanElement\n\n #ro?: ResizeObserver\n\n #span?: HTMLSpanElement\n\n get #computedSize(): Size {\n switch (this.size) {\n case 'standard':\n case 'small':\n case 'large': {\n return this.size\n }\n default: {\n return 'standard'\n }\n }\n }\n\n get #computedImportance(): LabelImportance {\n switch (this.importance) {\n case 'emphasized':\n case 'standard': {\n return this.importance\n }\n default: {\n return 'standard'\n }\n }\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.truncatedTooltip = isOverflowing(span)\n })\n this.#ro = new ResizeObserver(([spanEntry]) => {\n this.truncatedTooltip = isOverflowing(spanEntry.target)\n })\n this.#ro.observe(this.#span)\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 <span\n class={{\n 'qds-inline': this.inline,\n 'qds-label': true,\n }}\n data-size={this.#computedSize}\n data-importance={this.#computedImportance}\n ref={this.#labelRef}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={this.truncatedTooltip ? 0 : undefined}\n >\n {this.required && <span class=\"qds-required\">*</span>}\n <span class=\"qds-text\" ref={this.#spanRef}>\n {this.text}\n </span>\n {this.truncatedTooltip && (\n <qds-tooltip aria-hidden=\"true\" ref={this.#truncatedTooltipRef}>\n {this.text}\n </qds-tooltip>\n )}\n </span>\n )\n }\n\n readonly #labelRef = (label?: HTMLSpanElement): void => {\n this.#label = label\n }\n\n readonly #spanRef = (span?: HTMLSpanElement): void => {\n this.#span = span\n }\n\n readonly #truncatedTooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.tooltipTarget ?? this.#label\n }\n}\n"],"version":3}
@@ -1,164 +0,0 @@
1
- /*!
2
- * SPDX-FileCopyrightText: © 2025 Schneider Electric
3
- *
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { p as proxyCustomElement, H, c as createEvent, h, e as Host } from './p-BEWDu8_P.js';
7
- import { p as pickFocusEventAttributes, b as inheritAriaAttributes } from './p-CzJQDr3N.js';
8
- import { d as defineCustomElement$3 } from './p-9fm05BrQ.js';
9
- import { d as defineCustomElement$2 } from './p-CB1GgGmx.js';
10
-
11
- const navListItemCss = ":host([hidden]){display:none!important}:host{display:block}.qds-button,.qds-nav-list-item,.qds-texts{display:flex}.qds-button,.qds-texts{flex:1 0}.qds-icon,.qds-text{color:var(--qds-theme-title)}.qds-button{align-items:center;-webkit-appearance:none;appearance:none;background:none;border:none;cursor:pointer;text-align:initial}.qds-button:focus-visible{border-radius:var(--qds-focus-border-radius);outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width)}.qds-button:not(.qds-selected):hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-button:not(.qds-selected):active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-subtext{color:var(--qds-theme-subtitle)}.qds-texts{flex-direction:column}.qds-button[data-size=small]{gap:var(--qds-list-item-small-gap-internal);min-height:var(--qds-list-item-small-height);padding-block:var(--qds-list-item-small-padding-vertical);padding-inline:var(--qds-list-item-small-padding-horizontal)}[data-size=small]>.qds-icon{font-size:var(--qds-list-item-small-icon-size)}[data-size=small]>.qds-texts{gap:var(--qds-list-item-small-titles-gap)}[data-size=small] .qds-text{font:var(--qds-list-item-small-title)}[data-size=small] .qds-subtext{font:var(--qds-list-item-small-subtitle)}.qds-button[data-size=standard]{gap:var(--qds-list-item-standard-gap-internal);min-height:var(--qds-list-item-standard-height);padding-block:var(--qds-list-item-standard-padding-vertical);padding-inline:var(--qds-list-item-standard-padding-horizontal)}[data-size=standard]>.qds-icon{font-size:var(--qds-list-item-standard-icon-size)}[data-size=standard]>.qds-texts{gap:var(--qds-list-item-standard-titles-gap)}[data-size=standard] .qds-text{font:var(--qds-list-item-standard-title)}[data-size=standard] .qds-subtext{font:var(--qds-list-item-standard-subtitle)}.qds-button[data-size=large]{gap:var(--qds-list-item-large-gap-internal);min-height:var(--qds-list-item-large-height);padding-block:var(--qds-list-item-large-padding-vertical);padding-inline:var(--qds-list-item-large-padding-horizontal)}[data-size=large]>.qds-icon{font-size:var(--qds-list-item-large-icon-size)}[data-size=large]>.qds-texts{gap:var(--qds-list-item-large-titles-gap)}[data-size=large] .qds-text{font:var(--qds-list-item-large-title)}[data-size=large] .qds-subtext{font:var(--qds-list-item-large-subtitle)}.qds-selected.qds-nav-list-item{background-color:var(\n --qds-theme-navigation-subsection-standard-background\n )}.qds-selected.qds-nav-list-item:after{background-color:var(--qds-theme-signature-color-default);border-radius:var(--qds-signature-line-connection-cap-radius);content:\"\";cursor:pointer;margin-right:calc(var(--qds-signature-line-connection-width)*-1/2);width:var(--qds-signature-line-connection-width)}.qds-selected .qds-icon{color:var(--qds-theme-signature-color-default)}.qds-selected[data-size=small] .qds-text{font:var(--qds-list-item-small-title-emphasized)}.qds-selected[data-size=standard] .qds-text{font:var(--qds-list-item-standard-title-emphasized)}.qds-selected[data-size=large] .qds-text{font:var(--qds-list-item-large-title-emphasized)}";
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 _NavListItem_instances, _NavListItem_computedSize_get, _NavListItem_shouldCollapse_get, _NavListItem_liRef, _NavListItem_tooltipRef, _NavListItem_onBlur, _NavListItem_onFocus;
24
- const NavListItem = /*@__PURE__*/ proxyCustomElement(class NavListItem extends H {
25
- constructor(registerHost) {
26
- super();
27
- if (registerHost !== false) {
28
- this.__registerHost();
29
- }
30
- this.__attachShadow();
31
- this.blurEmitter = createEvent(this, "qdsBlur", 2);
32
- this.focusEmitter = createEvent(this, "qdsFocus", 2);
33
- _NavListItem_instances.add(this);
34
- /**
35
- * Displays the navigation list item in a collapsed state without its text.
36
- * The text will be displayed in a tooltip instead.
37
- *
38
- * This property has no effect if the navigation list item does not have an
39
- * icon set.
40
- */
41
- this.collapsed = false;
42
- /**
43
- * Prevents the navigation list item from being interacted with: it cannot be
44
- * selected or focused.
45
- */
46
- this.disabled = false;
47
- /**
48
- * The name of a registered icon library.
49
- */
50
- this.iconLibrary = 'default';
51
- /**
52
- * The navigation list items's size.
53
- */
54
- this.size = 'standard';
55
- /**
56
- * Whether or not the navigation list item is selected.
57
- */
58
- this.selected = false;
59
- this.inheritedAttributes = {};
60
- _NavListItem_liRef.set(this, (li) => {
61
- this.li = li;
62
- });
63
- _NavListItem_tooltipRef.set(this, (tooltip) => {
64
- if (tooltip)
65
- // eslint-disable-next-line no-param-reassign
66
- tooltip.target = this.li;
67
- });
68
- _NavListItem_onBlur.set(this, (event) => {
69
- this.blurEmitter.emit(pickFocusEventAttributes(event));
70
- });
71
- _NavListItem_onFocus.set(this, (event) => {
72
- this.focusEmitter.emit(pickFocusEventAttributes(event));
73
- });
74
- }
75
- onClick(event) {
76
- if (this.disabled)
77
- event.stopImmediatePropagation();
78
- }
79
- tabindexChanged(newValue) {
80
- const parsedValue = Number.parseInt(newValue, 10);
81
- this.tabIndex =
82
- parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue;
83
- }
84
- componentWillLoad() {
85
- this.inheritedAttributes = inheritAriaAttributes(this.host);
86
- this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
87
- }
88
- render() {
89
- return (h(Host, { key: '4e51db3364c0e5f747196dd12bf0ea7f34c200eb' }, h("li", { key: 'ed735bb7c6868bb94af5de2d7de2b54ea02d7f08', class: {
90
- 'qds-nav-list-item': true,
91
- 'qds-disabled': this.disabled,
92
- 'qds-selected': this.selected,
93
- }, ref: __classPrivateFieldGet(this, _NavListItem_liRef, "f"), ...this.inheritedAttributes }, h("button", { key: 'd9a7a799486ca5836b480d1ffaab2d376d6388e0', class: {
94
- 'qds-button': true,
95
- 'qds-selected': this.selected,
96
- }, "data-size": __classPrivateFieldGet(this, _NavListItem_instances, "a", _NavListItem_computedSize_get), disabled: this.disabled, onBlur: __classPrivateFieldGet(this, _NavListItem_onBlur, "f"), onFocus: __classPrivateFieldGet(this, _NavListItem_onFocus, "f"), tabIndex: this.disabled ? undefined : this.tabIndex, type: "button" }, this.iconName !== undefined && this.iconName !== '' && (h("qds-icon", { key: '331c36aab5ea40cca48f35f796e3d8ab3c4e44a1', "aria-hidden": "true", class: "qds-icon", library: this.iconLibrary, name: this.iconName })), !__classPrivateFieldGet(this, _NavListItem_instances, "a", _NavListItem_shouldCollapse_get) && this.text && this.renderText())), __classPrivateFieldGet(this, _NavListItem_instances, "a", _NavListItem_shouldCollapse_get) && this.text && (h("qds-tooltip", { key: '57fad87d2567e8a3c4e7c7fcdf09be5faac38553', placement: "right", ref: __classPrivateFieldGet(this, _NavListItem_tooltipRef, "f") }, this.renderText()))));
97
- }
98
- renderText() {
99
- return (h("div", { class: "qds-texts" }, h("div", { class: "qds-text" }, this.text), this.subtext !== undefined && this.subtext !== '' && (h("div", { class: "qds-subtext" }, this.subtext))));
100
- }
101
- static get delegatesFocus() { return true; }
102
- get host() { return this; }
103
- static get watchers() { return {
104
- "tabindex": ["tabindexChanged"]
105
- }; }
106
- static get style() { return navListItemCss; }
107
- }, [273, "qds-nav-list-item", {
108
- "collapsed": [4],
109
- "disabled": [4],
110
- "iconName": [1, "icon-name"],
111
- "iconLibrary": [1, "icon-library"],
112
- "size": [1],
113
- "selected": [4],
114
- "subtext": [1],
115
- "text": [1],
116
- "tabIndex": [32]
117
- }, [[0, "click", "onClick"]], {
118
- "tabindex": ["tabindexChanged"]
119
- }]);
120
- _NavListItem_liRef = new WeakMap(), _NavListItem_tooltipRef = new WeakMap(), _NavListItem_onBlur = new WeakMap(), _NavListItem_onFocus = new WeakMap(), _NavListItem_instances = new WeakSet(), _NavListItem_computedSize_get = function _NavListItem_computedSize_get() {
121
- switch (this.size) {
122
- case 'standard':
123
- case 'small':
124
- case 'large': {
125
- return this.size;
126
- }
127
- default: {
128
- return 'standard';
129
- }
130
- }
131
- }, _NavListItem_shouldCollapse_get = function _NavListItem_shouldCollapse_get() {
132
- return this.collapsed && this.iconName !== undefined && this.iconName !== '';
133
- };
134
- function defineCustomElement$1() {
135
- if (typeof customElements === "undefined") {
136
- return;
137
- }
138
- const components = ["qds-nav-list-item", "qds-icon", "qds-tooltip"];
139
- components.forEach(tagName => { switch (tagName) {
140
- case "qds-nav-list-item":
141
- if (!customElements.get(tagName)) {
142
- customElements.define(tagName, NavListItem);
143
- }
144
- break;
145
- case "qds-icon":
146
- if (!customElements.get(tagName)) {
147
- defineCustomElement$3();
148
- }
149
- break;
150
- case "qds-tooltip":
151
- if (!customElements.get(tagName)) {
152
- defineCustomElement$2();
153
- }
154
- break;
155
- } });
156
- }
157
-
158
- const QdsNavListItem = NavListItem;
159
- const defineCustomElement = defineCustomElement$1;
160
-
161
- export { QdsNavListItem, defineCustomElement };
162
- //# sourceMappingURL=qds-nav-list-item.js.map
163
-
164
- //# sourceMappingURL=qds-nav-list-item.js.map
@@ -1 +0,0 @@
1
- {"file":"qds-nav-list-item.js","mappings":";;;;;;;;;;AAAA,MAAM,cAAc,GAAG,6nGAA6nG;;ACAppG;AACA;AACA;;;;;;;;;MA6Ba,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;AALxB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;AAME;;;;;;AAMG;AACqB,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK;AAElD;;;AAGG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AASjD;;AAEG;AACqB,QAAA,IAAW,CAAA,WAAA,GAAW,SAAS;AAEvD;;AAEG;AACqB,QAAA,IAAI,CAAA,IAAA,GAAU,UAAU;AAEhD;;AAEG;AACqB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AA4BzC,QAAA,IAAmB,CAAA,mBAAA,GAAe,EAAE;QA8FnC,kBAAS,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,EAAkB,KAAU;AAC7C,YAAA,IAAI,CAAC,EAAE,GAAG,EAAE;AACd,SAAC,CAAA;QAEQ,uBAAc,CAAA,GAAA,CAAA,IAAA,EAAA,CAAC,OAA+B,KAAU;AAC/D,YAAA,IAAI,OAAO;;AAET,gBAAA,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE;AAC5B,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,EAAK,KAAK,EAAC,UAAU,IAAE,IAAI,CAAC,IAAI,CAAO,EACtC,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,EAAE,KAChD,WAAK,KAAK,EAAC,aAAa,EAAA,EAAE,IAAI,CAAC,OAAO,CAAO,CAC9C,CACG;;;;;;;;;;;;;;;;;;;;;;AArFR,IAAA,QAAQ,IAAI,CAAC,IAAI;AACf,QAAA,KAAK,UAAU;AACf,QAAA,KAAK,OAAO;QACZ,KAAK,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI;;QAElB,SAAS;AACP,YAAA,OAAO,UAAU;;;AAGvB,CAAC,EAAA,+BAAA,GAAA,SAAA,+BAAA,GAAA;AAGC,IAAA,OAAO,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE;AAC9E,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/nav-list-item/nav-list-item.css?tag=qds-nav-list-item&encapsulation=shadow","src/components/nav-list-item/nav-list-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: © 2024 Schneider Electric\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n@import url('../shared.css');\n\n:host {\n display: block;\n}\n\n.qds-button,\n.qds-nav-list-item,\n.qds-texts {\n display: flex;\n}\n\n.qds-button,\n.qds-texts {\n flex: 1 0;\n}\n\n.qds-icon,\n.qds-text {\n color: var(--qds-theme-title);\n}\n\n.qds-button {\n align-items: center;\n appearance: none;\n background: none;\n border: none;\n cursor: pointer;\n text-align: initial;\n\n &:focus-visible {\n outline: var(--qds-theme-focus-border) solid var(--qds-focus-border-width);\n border-radius: var(--qds-focus-border-radius);\n }\n\n &:not(.qds-selected) {\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}\n\n.qds-disabled {\n opacity: var(--qds-theme-disabled);\n pointer-events: none;\n}\n\n.qds-subtext {\n color: var(--qds-theme-subtitle);\n}\n\n.qds-texts {\n flex-direction: column;\n}\n\n[data-size='small'] {\n &.qds-button {\n gap: var(--qds-list-item-small-gap-internal);\n min-height: var(--qds-list-item-small-height);\n padding-block: var(--qds-list-item-small-padding-vertical);\n padding-inline: var(--qds-list-item-small-padding-horizontal);\n }\n\n & > .qds-icon {\n font-size: var(--qds-list-item-small-icon-size);\n }\n\n & > .qds-texts {\n gap: var(--qds-list-item-small-titles-gap);\n }\n\n & .qds-text {\n font: var(--qds-list-item-small-title);\n }\n\n & .qds-subtext {\n font: var(--qds-list-item-small-subtitle);\n }\n}\n\n[data-size='standard'] {\n &.qds-button {\n gap: var(--qds-list-item-standard-gap-internal);\n min-height: var(--qds-list-item-standard-height);\n padding-block: var(--qds-list-item-standard-padding-vertical);\n padding-inline: var(--qds-list-item-standard-padding-horizontal);\n }\n\n & > .qds-icon {\n font-size: var(--qds-list-item-standard-icon-size);\n }\n\n & > .qds-texts {\n gap: var(--qds-list-item-standard-titles-gap);\n }\n\n & .qds-text {\n font: var(--qds-list-item-standard-title);\n }\n\n & .qds-subtext {\n font: var(--qds-list-item-standard-subtitle);\n }\n}\n\n[data-size='large'] {\n &.qds-button {\n gap: var(--qds-list-item-large-gap-internal);\n min-height: var(--qds-list-item-large-height);\n padding-block: var(--qds-list-item-large-padding-vertical);\n padding-inline: var(--qds-list-item-large-padding-horizontal);\n }\n\n & > .qds-icon {\n font-size: var(--qds-list-item-large-icon-size);\n }\n\n & > .qds-texts {\n gap: var(--qds-list-item-large-titles-gap);\n }\n\n & .qds-text {\n font: var(--qds-list-item-large-title);\n }\n\n & .qds-subtext {\n font: var(--qds-list-item-large-subtitle);\n }\n}\n\n.qds-selected {\n &.qds-nav-list-item {\n background-color: var(\n --qds-theme-navigation-subsection-standard-background\n );\n\n &::after {\n background-color: var(--qds-theme-signature-color-default);\n border-radius: var(--qds-signature-line-connection-cap-radius);\n content: '';\n cursor: pointer;\n margin-right: calc(-1 * var(--qds-signature-line-connection-width) / 2);\n width: var(--qds-signature-line-connection-width);\n }\n }\n\n & .qds-icon {\n color: var(--qds-theme-signature-color-default);\n }\n\n &[data-size='small'] .qds-text {\n font: var(--qds-list-item-small-title-emphasized);\n }\n\n &[data-size='standard'] .qds-text {\n font: var(--qds-list-item-standard-title-emphasized);\n }\n\n &[data-size='large'] .qds-text {\n font: var(--qds-list-item-large-title-emphasized);\n }\n}\n","// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ComponentInterface, EventEmitter, JSX } from '@stencil/core'\nimport {\n Component,\n Element,\n Event,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core'\n\nimport type { Attributes, QdsFocusEventDetail } from '../../helpers'\nimport { inheritAriaAttributes, pickFocusEventAttributes } from '../../helpers'\nimport type { Size } from '../shared'\n\n/**\n *\n *\n * @see https://quartz.se.com/build/components/nav-list-item\n */\n@Component({\n tag: 'qds-nav-list-item',\n shadow: { delegatesFocus: true },\n styleUrl: 'nav-list-item.css',\n})\nexport class NavListItem implements ComponentInterface {\n /**\n * Displays the navigation list item in a collapsed state without its text.\n * The text will be displayed in a tooltip instead.\n *\n * This property has no effect if the navigation list item does not have an\n * icon set.\n */\n @Prop() public readonly collapsed: boolean = false\n\n /**\n * Prevents the navigation list item from being interacted with: it cannot be\n * selected or focused.\n */\n @Prop() public readonly disabled: boolean = false\n\n /**\n * The name of the icon to render.\n *\n * Available names depend on the icon library being used.\n */\n @Prop() public readonly iconName?: string\n\n /**\n * The name of a registered icon library.\n */\n @Prop() public readonly iconLibrary: string = 'default'\n\n /**\n * The navigation list items's size.\n */\n @Prop() public readonly size?: Size = 'standard'\n\n /**\n * Whether or not the navigation list item is selected.\n */\n @Prop() public readonly selected: boolean = false\n\n /**\n * Text to display for the subtext.\n */\n @Prop() public readonly subtext?: string\n\n /**\n * Primary text to display.\n */\n @Prop() public readonly text!: string\n\n /**\n * Emitted when the navigation list item loses focus.\n */\n @Event({ eventName: 'qdsBlur', bubbles: false, cancelable: false })\n private readonly blurEmitter!: EventEmitter<QdsFocusEventDetail>\n\n /**\n * Emitted when the navigation list item 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 private inheritedAttributes: Attributes = {}\n\n private li?: HTMLLIElement\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 #shouldCollapse(): boolean {\n return this.collapsed && this.iconName !== undefined && this.iconName !== ''\n }\n\n @Listen('click')\n protected onClick(event: MouseEvent): void {\n if (this.disabled) event.stopImmediatePropagation()\n }\n\n @Watch('tabindex')\n protected tabindexChanged(newValue: string): void {\n const parsedValue = Number.parseInt(newValue, 10)\n this.tabIndex =\n parsedValue === 0 || Number.isNaN(parsedValue) ? undefined : parsedValue\n }\n\n public componentWillLoad(): void {\n this.inheritedAttributes = inheritAriaAttributes(this.host)\n this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0')\n }\n\n public render() {\n return (\n <Host>\n <li\n class={{\n 'qds-nav-list-item': true,\n 'qds-disabled': this.disabled,\n 'qds-selected': this.selected,\n }}\n ref={this.#liRef}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...this.inheritedAttributes}\n >\n <button\n class={{\n 'qds-button': true,\n 'qds-selected': this.selected,\n }}\n data-size={this.#computedSize}\n disabled={this.disabled}\n onBlur={this.#onBlur}\n onFocus={this.#onFocus}\n tabIndex={this.disabled ? undefined : this.tabIndex}\n type=\"button\"\n >\n {this.iconName !== undefined && this.iconName !== '' && (\n <qds-icon\n aria-hidden=\"true\"\n class=\"qds-icon\"\n library={this.iconLibrary}\n name={this.iconName}\n />\n )}\n {!this.#shouldCollapse && this.text && this.renderText()}\n </button>\n </li>\n {this.#shouldCollapse && this.text && (\n <qds-tooltip placement=\"right\" ref={this.#tooltipRef}>\n {this.renderText()}\n </qds-tooltip>\n )}\n </Host>\n )\n }\n\n private renderText(): JSX.Element {\n return (\n <div class=\"qds-texts\">\n <div class=\"qds-text\">{this.text}</div>\n {this.subtext !== undefined && this.subtext !== '' && (\n <div class=\"qds-subtext\">{this.subtext}</div>\n )}\n </div>\n )\n }\n\n readonly #liRef = (li?: HTMLLIElement): void => {\n this.li = li\n }\n\n readonly #tooltipRef = (tooltip?: HTMLQdsTooltipElement): void => {\n if (tooltip)\n // eslint-disable-next-line no-param-reassign\n tooltip.target = this.li\n }\n\n readonly #onBlur = (event: FocusEvent): void => {\n this.blurEmitter.emit(pickFocusEventAttributes(event))\n }\n\n readonly #onFocus = (event: FocusEvent): void => {\n this.focusEmitter.emit(pickFocusEventAttributes(event))\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers-D--0PcCT.js","sources":["src/helpers.ts"],"sourcesContent":["// SPDX-FileCopyrightText: © 2024 Schneider Electric\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n MiddlewareState,\n OffsetOptions as LibraryOffsetOptions,\n ReferenceElement,\n} from '@floating-ui/dom'\nimport type { Except, Replace } from 'type-fest'\n\nimport type { LinkIcon } from './components/shared'\n\nexport type Attributes = Record<string, string | undefined>\n\nconst inheritAttributes = (\n element: Element,\n attributes: string[] = [],\n): Attributes => {\n const attributeObject: Attributes = {}\n\n for (const attribute of attributes) {\n const value = element.getAttribute(attribute)\n if (value !== null) {\n attributeObject[attribute] = value\n element.removeAttribute(attribute)\n }\n }\n\n return attributeObject\n}\n\ntype ARIAAttribute =\n | Replace<Lowercase<keyof ARIAMixin>, 'aria', 'aria-'>\n | 'aria-activedescendant'\n | 'aria-braillelabel'\n | 'aria-brailleroledescription'\n | 'aria-colindextext'\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-description'\n | 'aria-details'\n | 'aria-errormessage'\n | 'aria-flowto'\n | 'aria-labelledby'\n | 'aria-owns'\n | 'aria-relevant'\n | 'aria-rowindextext'\n\nconst ariaAttributes: ARIAAttribute[] = [\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n 'role',\n]\n\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n *\n * @param element The element that the attributes should be copied from.\n */\nexport const inheritAriaAttributes = (\n element: Element,\n): ReturnType<typeof inheritAttributes> =>\n inheritAttributes(element, ariaAttributes)\n\nconst isProduction = process.env.NODE_ENV === 'production'\nconst prefix = 'Invariant failed'\n\n/**\n * Throws an error if the value is falsy.\n *\n * @param value Value to test.\n * @param message Optional message to display in development builds.\n */\nexport function invariant(value: unknown, message?: string): asserts value {\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (value) return\n if (isProduction) throw new Error(prefix)\n\n const error = message === undefined ? prefix : `${prefix}: ${message}`\n throw new Error(error)\n}\n\n/**\n * From an object pick a set of keys.\n *\n * @param object Object to pick from.\n * @param keys They keys to pick.\n * @returns New object with only the picked keys.\n */\nexport const pick = <T, K extends keyof T>(\n object: T,\n ...keys: K[]\n): Pick<T, K> => {\n const returnValue: Partial<Pick<T, K>> = {}\n for (const key of keys) returnValue[key] = object[key]\n return returnValue as Pick<T, K>\n}\n\nexport type QdsFocusEventDetail = Pick<FocusEvent, 'relatedTarget'>\nexport type QdsInputEventDetail = Pick<\n InputEvent,\n 'data' | 'inputType' | 'isComposing'\n>\nexport const pickFocusEventAttributes = (\n event: FocusEvent,\n): QdsFocusEventDetail => pick(event, 'relatedTarget')\nexport const pickInputEventAttributes = (\n event: InputEvent,\n): QdsInputEventDetail => pick(event, 'data', 'inputType', 'isComposing')\n\nconst getConversionFactor = (\n element: Element,\n unit: string,\n): number | undefined => {\n switch (unit) {\n case 'cm': {\n return 96 / 2.54\n }\n case 'em': {\n return Number.parseFloat(\n globalThis.getComputedStyle(\n element.parentElement ?? document.documentElement,\n ).fontSize,\n )\n }\n case 'in': {\n return 96\n }\n case 'mm': {\n return 96 / 25.4\n }\n case 'pc': {\n return 16\n }\n case 'pt': {\n return 96 / 72\n }\n case 'px': {\n return 1\n }\n case 'rem': {\n return Number.parseFloat(\n globalThis.getComputedStyle(document.documentElement).fontSize,\n )\n }\n default: {\n return undefined\n }\n }\n}\n\nexport const propertyToPx = (\n element: Element,\n property: string,\n): number | undefined => {\n const value = globalThis.getComputedStyle(element).getPropertyValue(property)\n const number = Number.parseFloat(value)\n if (Number.isNaN(number)) return undefined\n const unit = /\\s*[\\d+.-]*\\s*(.*)/.exec(value)?.[1] ?? ''\n\n const conversionFactor = getConversionFactor(element, unit) ?? 1\n return number * conversionFactor\n}\n\nexport const ignorePromise = <T>(promise: Promise<T>): void => {\n promise.catch(() => {\n invariant(false)\n })\n}\n\nexport const isTouchDevice = (): boolean =>\n 'ontouchstart' in globalThis ||\n ('maxTouchPoints' in globalThis && globalThis.navigator.maxTouchPoints > 0)\n\nexport const roundByDPR = (value: number): number => {\n const dpr = devicePixelRatio || 1\n return Math.round(value * dpr) / dpr\n}\n\n/**\n * Checks if an element's content is overflowing.\n *\n * @param element The element to check.\n * @returns `true` if overflowing, `false` otherwise.\n */\nexport const isOverflowing = (element: Element): boolean => {\n const { clientHeight, clientWidth, scrollHeight, scrollWidth } = element\n return scrollHeight > clientHeight + 1 || scrollWidth > clientWidth\n}\n\nexport const determineLinkIcon = (\n target?: string,\n // eslint-disable-next-line unicorn/prevent-abbreviations\n rel?: string,\n): LinkIcon | undefined => {\n if (!(rel?.split(' ') ?? []).includes('external')) return undefined\n return target === '_blank' ? 'external-new-tab-link' : 'external-link'\n}\n\nexport const resolveTarget = (\n target?: ReferenceElement | string | (() => ReferenceElement | string),\n): ReferenceElement | undefined => {\n const resolvedTarget = typeof target === 'function' ? target() : target\n if (typeof resolvedTarget !== 'string') return resolvedTarget\n\n const element = document.querySelector(resolvedTarget)\n if (element === null) throw new Error('String must resolve to an Element.')\n return element\n}\n\n/**\n * Patched version of requestAnimationFrame that avoids ngzone\n * Use only when you know ngzone should not run\n */\nexport const raf = (h: FrameRequestCallback): number => {\n const win = window as Window & {\n ['__zone_symbol__requestAnimationFrame']?: (\n callback: FrameRequestCallback,\n ) => number\n }\n // eslint-disable-next-line no-underscore-dangle\n if (typeof win.__zone_symbol__requestAnimationFrame === 'function') {\n // eslint-disable-next-line no-underscore-dangle\n return win.__zone_symbol__requestAnimationFrame(h)\n }\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame(h)\n }\n return setTimeout(h)\n}\n\n/**\n * Waits for a component to be ready for\n * both custom element and non-custom element builds.\n * If non-custom element build, el.componentOnReady\n * will be used.\n * For custom element builds, we wait a frame\n * so that the inner contents of the component\n * have a chance to render.\n *\n * Use this utility rather than calling\n * el.componentOnReady yourself.\n *\n * Reference: https://stenciljs.com/docs/api#componentonready\n */\nexport const componentOnReady = <\n T extends { componentOnReady?: () => Promise<T> },\n>(\n element: T,\n callback: (element_: T) => void,\n): void => {\n if (element.componentOnReady === undefined) {\n raf(() => {\n callback(element)\n })\n } else {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n element.componentOnReady().then((resolvedElement) => {\n callback(resolvedElement)\n })\n }\n}\n\nfunction resolvePanelFromValue(value: unknown): HTMLElement | undefined {\n if (value instanceof HTMLElement) {\n return value\n }\n\n if (typeof value === 'string') {\n const element = document.querySelector(value)\n return element instanceof HTMLElement ? element : undefined\n }\n\n return undefined\n}\n\nexport function resolvePanelElement(\n tab: HTMLQdsTabElement,\n): HTMLElement | undefined {\n const panelValue = typeof tab.panel === 'function' ? tab.panel() : tab.panel\n return resolvePanelFromValue(panelValue)\n}\n\nexport type OffsetValue = Except<\n Exclude<\n LibraryOffsetOptions,\n // eslint-disable-next-line @typescript-eslint/ban-types\n Function | number\n >,\n 'mainAxis'\n>\nexport type OffsetFunction = (state: MiddlewareState) => OffsetValue\nexport type OffsetOptions = OffsetFunction | OffsetValue\n\nexport const HORIZONTAL_MOVE_KEYS: ReadonlySet<string> = new Set([\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n])\n\nexport const VERTICAL_MOVE_KEYS: ReadonlySet<string> = new Set([\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n])\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;AACA;AAaA,MAAM,iBAAiB,GAAG,CACxB,OAAgB,EAChB,UAAuB,GAAA,EAAE,KACX;IACd,MAAM,eAAe,GAAe,EAAE;AAEtC,IAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC;AAC7C,QAAA,IAAI,KAAK,KAAK,IAAI,EAAE;AAClB,YAAA,eAAe,CAAC,SAAS,CAAC,GAAG,KAAK;AAClC,YAAA,OAAO,CAAC,eAAe,CA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