q2-tecton-elements 1.47.0 → 1.48.1-alpha.0

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 (331) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +43 -7
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-c385e32f.js → index-c9a86a33.js} +1 -1
  4. package/dist/cjs/{index-c385e32f.js.map → index-c9a86a33.js.map} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
  7. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  8. package/dist/cjs/q2-chart-donut.cjs.entry.js +7 -4
  9. package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
  10. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  12. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
  14. package/dist/cjs/q2-data-table.cjs.entry.js +8 -5
  15. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  16. package/dist/cjs/q2-dropdown-item.cjs.entry.js +13 -4
  17. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  18. package/dist/cjs/q2-editable-field.cjs.entry.js +36 -27
  19. package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
  20. package/dist/cjs/q2-form.cjs.entry.js +23 -0
  21. package/dist/cjs/q2-form.cjs.entry.js.map +1 -0
  22. package/dist/cjs/q2-input.cjs.entry.js +3 -3
  23. package/dist/cjs/q2-input.cjs.entry.js.map +1 -1
  24. package/dist/cjs/q2-item.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-list.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-option-list.cjs.entry.js +2 -3
  31. package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
  32. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-pagination.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  36. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  37. package/dist/cjs/q2-relative-time.cjs.entry.js +35 -18
  38. package/dist/cjs/q2-relative-time.cjs.entry.js.map +1 -1
  39. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  40. package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
  41. package/dist/cjs/q2-select.cjs.entry.js +8 -3
  42. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  43. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  45. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  46. package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
  47. package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
  48. package/dist/cjs/q2-tab-container.cjs.entry.js.map +1 -1
  49. package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
  50. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  51. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  52. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  53. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  54. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  55. package/dist/collection/collection-manifest.json +1 -0
  56. package/dist/collection/components/q2-calendar/q2-calendar.css +2 -0
  57. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +7 -4
  58. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  59. package/dist/collection/components/q2-checkbox/q2-checkbox.css +2 -0
  60. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +7 -1
  61. package/dist/collection/components/q2-data-table/q2-data-table.css +15 -1
  62. package/dist/collection/components/q2-data-table/q2-data-table.js +34 -14
  63. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  64. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +22 -5
  65. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  66. package/dist/collection/components/q2-editable-field/q2-editable-field.js +41 -29
  67. package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
  68. package/dist/collection/components/q2-form/q2-form.css +92 -0
  69. package/dist/collection/components/q2-form/q2-form.js +44 -0
  70. package/dist/collection/components/q2-form/q2-form.js.map +1 -0
  71. package/dist/collection/components/q2-input/q2-input.css +1 -1
  72. package/dist/collection/components/q2-input/q2-input.js +23 -20
  73. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  74. package/dist/collection/components/q2-item/q2-item.js +1 -1
  75. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  76. package/dist/collection/components/q2-list/q2-list.js +1 -1
  77. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  78. package/dist/collection/components/q2-message/q2-message.js +1 -1
  79. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  80. package/dist/collection/components/q2-option/q2-option.js +1 -1
  81. package/dist/collection/components/q2-option-list/q2-option-list.js +4 -5
  82. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  83. package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
  84. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  85. package/dist/collection/components/q2-popover/q2-popover.js +43 -7
  86. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  87. package/dist/collection/components/q2-radio-group/q2-radio-group.css +4 -2
  88. package/dist/collection/components/q2-relative-time/q2-relative-time.js +79 -25
  89. package/dist/collection/components/q2-relative-time/q2-relative-time.js.map +1 -1
  90. package/dist/collection/components/q2-section/q2-section.js +7 -4
  91. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  92. package/dist/collection/components/q2-select/q2-select.css +2 -2
  93. package/dist/collection/components/q2-select/q2-select.js +7 -2
  94. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  95. package/dist/collection/components/q2-stepper/q2-stepper.js +2 -2
  96. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  97. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -3
  98. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  99. package/dist/collection/components/q2-tab-container/q2-tab-container.css +2 -1
  100. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  101. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  102. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  103. package/dist/collection/components/q2-textarea/q2-textarea.css +2 -2
  104. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  105. package/dist/components/index.js +2 -0
  106. package/dist/components/index.js.map +1 -1
  107. package/dist/components/q2-calendar.js +1 -1
  108. package/dist/components/q2-calendar.js.map +1 -1
  109. package/dist/components/q2-chart-donut.js +7 -4
  110. package/dist/components/q2-chart-donut.js.map +1 -1
  111. package/dist/components/q2-checkbox-group.js +1 -1
  112. package/dist/components/q2-checkbox-group.js.map +1 -1
  113. package/dist/components/q2-checkbox2.js +1 -1
  114. package/dist/components/q2-checkbox2.js.map +1 -1
  115. package/dist/components/q2-data-table.js +10 -6
  116. package/dist/components/q2-data-table.js.map +1 -1
  117. package/dist/components/q2-dropdown-item2.js +16 -6
  118. package/dist/components/q2-dropdown-item2.js.map +1 -1
  119. package/dist/components/q2-editable-field.js +37 -28
  120. package/dist/components/q2-editable-field.js.map +1 -1
  121. package/dist/components/q2-form.d.ts +11 -0
  122. package/dist/components/q2-form.js +39 -0
  123. package/dist/components/q2-form.js.map +1 -0
  124. package/dist/components/q2-input2.js +4 -4
  125. package/dist/components/q2-input2.js.map +1 -1
  126. package/dist/components/q2-item.js +1 -1
  127. package/dist/components/q2-legend2.js +1 -1
  128. package/dist/components/q2-list.js +1 -1
  129. package/dist/components/q2-loc.js +1 -1
  130. package/dist/components/q2-message2.js +1 -1
  131. package/dist/components/q2-optgroup2.js +1 -1
  132. package/dist/components/q2-option-list2.js +2 -3
  133. package/dist/components/q2-option-list2.js.map +1 -1
  134. package/dist/components/q2-option2.js +1 -1
  135. package/dist/components/q2-pagination.js +2 -2
  136. package/dist/components/q2-pill.js +1 -1
  137. package/dist/components/q2-popover2.js +43 -7
  138. package/dist/components/q2-popover2.js.map +1 -1
  139. package/dist/components/q2-radio-group.js +1 -1
  140. package/dist/components/q2-radio-group.js.map +1 -1
  141. package/dist/components/q2-relative-time.js +37 -18
  142. package/dist/components/q2-relative-time.js.map +1 -1
  143. package/dist/components/q2-section.js +2 -2
  144. package/dist/components/q2-section.js.map +1 -1
  145. package/dist/components/q2-select2.js +8 -3
  146. package/dist/components/q2-select2.js.map +1 -1
  147. package/dist/components/q2-stepper-pane.js +1 -1
  148. package/dist/components/q2-stepper-vertical.js +1 -1
  149. package/dist/components/q2-stepper.js +2 -2
  150. package/dist/components/q2-stepper.js.map +1 -1
  151. package/dist/components/q2-tab-container.js +2 -2
  152. package/dist/components/q2-tab-container.js.map +1 -1
  153. package/dist/components/q2-tab-pane.js +1 -1
  154. package/dist/components/q2-tag.js +1 -1
  155. package/dist/components/q2-textarea.js +1 -1
  156. package/dist/components/q2-textarea.js.map +1 -1
  157. package/dist/components/tecton-tab-pane.js +2 -2
  158. package/dist/esm/click-elsewhere_2.entry.js +43 -7
  159. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  160. package/dist/esm/{index-f0dfb099.js → index-8582f46d.js} +1 -1
  161. package/dist/esm/{index-f0dfb099.js.map → index-8582f46d.js.map} +1 -1
  162. package/dist/esm/loader.js +1 -1
  163. package/dist/esm/q2-calendar.entry.js +2 -2
  164. package/dist/esm/q2-calendar.entry.js.map +1 -1
  165. package/dist/esm/q2-chart-donut.entry.js +7 -4
  166. package/dist/esm/q2-chart-donut.entry.js.map +1 -1
  167. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  168. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  169. package/dist/esm/q2-checkbox.entry.js +1 -1
  170. package/dist/esm/q2-checkbox.entry.js.map +1 -1
  171. package/dist/esm/q2-data-table.entry.js +8 -5
  172. package/dist/esm/q2-data-table.entry.js.map +1 -1
  173. package/dist/esm/q2-dropdown-item.entry.js +14 -5
  174. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  175. package/dist/esm/q2-editable-field.entry.js +37 -28
  176. package/dist/esm/q2-editable-field.entry.js.map +1 -1
  177. package/dist/esm/q2-form.entry.js +19 -0
  178. package/dist/esm/q2-form.entry.js.map +1 -0
  179. package/dist/esm/q2-input.entry.js +3 -3
  180. package/dist/esm/q2-input.entry.js.map +1 -1
  181. package/dist/esm/q2-item.entry.js +1 -1
  182. package/dist/esm/q2-legend.entry.js +1 -1
  183. package/dist/esm/q2-list.entry.js +1 -1
  184. package/dist/esm/q2-loc.entry.js +1 -1
  185. package/dist/esm/q2-message.entry.js +1 -1
  186. package/dist/esm/q2-optgroup.entry.js +1 -1
  187. package/dist/esm/q2-option-list.entry.js +2 -3
  188. package/dist/esm/q2-option-list.entry.js.map +1 -1
  189. package/dist/esm/q2-option.entry.js +1 -1
  190. package/dist/esm/q2-pagination.entry.js +2 -2
  191. package/dist/esm/q2-pill.entry.js +1 -1
  192. package/dist/esm/q2-radio-group.entry.js +1 -1
  193. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  194. package/dist/esm/q2-relative-time.entry.js +35 -18
  195. package/dist/esm/q2-relative-time.entry.js.map +1 -1
  196. package/dist/esm/q2-section.entry.js +2 -2
  197. package/dist/esm/q2-section.entry.js.map +1 -1
  198. package/dist/esm/q2-select.entry.js +8 -3
  199. package/dist/esm/q2-select.entry.js.map +1 -1
  200. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  201. package/dist/esm/q2-stepper-vertical.entry.js +1 -1
  202. package/dist/esm/q2-stepper.entry.js +2 -2
  203. package/dist/esm/q2-stepper.entry.js.map +1 -1
  204. package/dist/esm/q2-tab-container.entry.js +2 -2
  205. package/dist/esm/q2-tab-container.entry.js.map +1 -1
  206. package/dist/esm/q2-tab-pane.entry.js +1 -1
  207. package/dist/esm/q2-tag.entry.js +1 -1
  208. package/dist/esm/q2-tecton-elements.js +1 -1
  209. package/dist/esm/q2-textarea.entry.js +1 -1
  210. package/dist/esm/q2-textarea.entry.js.map +1 -1
  211. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  212. package/dist/q2-tecton-elements/{p-d5776227.entry.js → p-0d6edd2a.entry.js} +2 -2
  213. package/dist/q2-tecton-elements/p-19da46dc.entry.js +2 -0
  214. package/dist/q2-tecton-elements/p-19da46dc.entry.js.map +1 -0
  215. package/dist/q2-tecton-elements/{p-dd18416f.entry.js → p-258f8c9c.entry.js} +2 -2
  216. package/dist/q2-tecton-elements/p-2878a662.entry.js +2 -0
  217. package/dist/q2-tecton-elements/p-2878a662.entry.js.map +1 -0
  218. package/dist/q2-tecton-elements/p-2a8de00d.entry.js +2 -0
  219. package/dist/q2-tecton-elements/p-2a8de00d.entry.js.map +1 -0
  220. package/dist/q2-tecton-elements/p-30296b0e.entry.js +2 -0
  221. package/dist/q2-tecton-elements/p-30296b0e.entry.js.map +1 -0
  222. package/dist/q2-tecton-elements/{p-ca43e917.entry.js → p-32130845.entry.js} +2 -2
  223. package/dist/q2-tecton-elements/{p-ff39ba49.entry.js → p-366a92d9.entry.js} +2 -2
  224. package/dist/q2-tecton-elements/p-4008aceb.entry.js +2 -0
  225. package/dist/q2-tecton-elements/p-4008aceb.entry.js.map +1 -0
  226. package/dist/q2-tecton-elements/{p-c9ee763d.entry.js → p-400f6071.entry.js} +2 -2
  227. package/dist/q2-tecton-elements/{p-c9ee763d.entry.js.map → p-400f6071.entry.js.map} +1 -1
  228. package/dist/q2-tecton-elements/p-43236cac.entry.js +2 -0
  229. package/dist/q2-tecton-elements/p-43236cac.entry.js.map +1 -0
  230. package/dist/q2-tecton-elements/{p-ca17f7ca.entry.js → p-49ecdf18.entry.js} +2 -2
  231. package/dist/q2-tecton-elements/{p-6f2de185.entry.js → p-4f7e6e79.entry.js} +2 -2
  232. package/dist/q2-tecton-elements/p-4f7e6e79.entry.js.map +1 -0
  233. package/dist/q2-tecton-elements/{p-a3d58a50.entry.js → p-56dd051a.entry.js} +2 -2
  234. package/dist/q2-tecton-elements/p-56dd051a.entry.js.map +1 -0
  235. package/dist/q2-tecton-elements/{p-abe30d0c.entry.js → p-6e313705.entry.js} +2 -2
  236. package/dist/q2-tecton-elements/p-75bb43b2.entry.js +2 -0
  237. package/dist/q2-tecton-elements/p-75bb43b2.entry.js.map +1 -0
  238. package/dist/q2-tecton-elements/p-79696bef.entry.js +2 -0
  239. package/dist/q2-tecton-elements/p-79696bef.entry.js.map +1 -0
  240. package/dist/q2-tecton-elements/{p-1d824cdf.entry.js → p-828850c1.entry.js} +2 -2
  241. package/dist/q2-tecton-elements/{p-774975fa.entry.js → p-861e83de.entry.js} +2 -2
  242. package/dist/q2-tecton-elements/p-861e83de.entry.js.map +1 -0
  243. package/dist/q2-tecton-elements/p-8a8d51f1.entry.js +2 -0
  244. package/dist/q2-tecton-elements/p-8a8d51f1.entry.js.map +1 -0
  245. package/dist/q2-tecton-elements/p-8e60bcaa.entry.js +2 -0
  246. package/dist/q2-tecton-elements/{p-6eac40be.entry.js.map → p-8e60bcaa.entry.js.map} +1 -1
  247. package/dist/q2-tecton-elements/p-9a5695db.entry.js +2 -0
  248. package/dist/q2-tecton-elements/p-9a5695db.entry.js.map +1 -0
  249. package/dist/q2-tecton-elements/{p-8fc099f5.entry.js → p-9b65cc28.entry.js} +2 -2
  250. package/dist/q2-tecton-elements/{p-3c42c90f.js → p-b6bcef6a.js} +1 -1
  251. package/dist/q2-tecton-elements/{p-f18caa3f.entry.js → p-bc73f69c.entry.js} +2 -2
  252. package/dist/q2-tecton-elements/{p-fb7dd7ab.entry.js → p-d32f8e53.entry.js} +2 -2
  253. package/dist/q2-tecton-elements/{p-a891571c.entry.js → p-d35de465.entry.js} +2 -2
  254. package/dist/q2-tecton-elements/{p-66ae329f.entry.js → p-dfa489ba.entry.js} +2 -2
  255. package/dist/q2-tecton-elements/{p-b849365e.entry.js → p-e793a82c.entry.js} +2 -2
  256. package/dist/q2-tecton-elements/{p-b849365e.entry.js.map → p-e793a82c.entry.js.map} +1 -1
  257. package/dist/q2-tecton-elements/{p-23183c61.entry.js → p-f57c4448.entry.js} +2 -2
  258. package/dist/q2-tecton-elements/{p-0e482a7c.entry.js → p-fcffc029.entry.js} +2 -2
  259. package/dist/q2-tecton-elements/p-fde11d9c.entry.js +2 -0
  260. package/dist/q2-tecton-elements/p-fde11d9c.entry.js.map +1 -0
  261. package/dist/q2-tecton-elements/{p-e25194ce.entry.js → p-fec9edc8.entry.js} +2 -2
  262. package/dist/q2-tecton-elements/p-fec9edc8.entry.js.map +1 -0
  263. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  264. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  265. package/dist/test/elements/q2-chart-donut-test.e2e.js +9 -1
  266. package/dist/test/elements/q2-chart-donut-test.e2e.js.map +1 -1
  267. package/dist/test/elements/q2-data-table-test.e2e.js +107 -11
  268. package/dist/test/elements/q2-data-table-test.e2e.js.map +1 -1
  269. package/dist/test/elements/q2-dropdown-item-test.e2e.js +183 -104
  270. package/dist/test/elements/q2-dropdown-item-test.e2e.js.map +1 -1
  271. package/dist/test/elements/q2-editable-field-test.e2e.js +436 -418
  272. package/dist/test/elements/q2-editable-field-test.e2e.js.map +1 -1
  273. package/dist/test/elements/q2-form-test.e2e.js +93 -0
  274. package/dist/test/elements/q2-form-test.e2e.js.map +1 -0
  275. package/dist/test/elements/q2-popover-test.spec.js +162 -31
  276. package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
  277. package/dist/test/elements/q2-relative-time-test.e2e.js +65 -40
  278. package/dist/test/elements/q2-relative-time-test.e2e.js.map +1 -1
  279. package/dist/test/elements/q2-select-test.e2e.js +53 -22
  280. package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
  281. package/dist/test/elements/q2-stepper-test.e2e.js +23 -0
  282. package/dist/test/elements/q2-stepper-test.e2e.js.map +1 -1
  283. package/dist/types/components/q2-form/q2-form.d.ts +6 -0
  284. package/dist/types/components/q2-input/q2-input.d.ts +15 -1
  285. package/dist/types/components/q2-popover/q2-popover.d.ts +2 -0
  286. package/dist/types/components/q2-relative-time/q2-relative-time.d.ts +25 -11
  287. package/dist/types/components/q2-section/q2-section.d.ts +10 -2
  288. package/dist/types/components.d.ts +74 -22
  289. package/dist/types/workspace/workspace/{_Gitlab_tecton-production_master → on-production_release_1.48.0-pre}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +1 -1
  290. package/package.json +3 -3
  291. package/dist/q2-tecton-elements/p-0e27ea75.entry.js +0 -2
  292. package/dist/q2-tecton-elements/p-0e27ea75.entry.js.map +0 -1
  293. package/dist/q2-tecton-elements/p-24d96969.entry.js +0 -2
  294. package/dist/q2-tecton-elements/p-24d96969.entry.js.map +0 -1
  295. package/dist/q2-tecton-elements/p-33af97b0.entry.js +0 -2
  296. package/dist/q2-tecton-elements/p-33af97b0.entry.js.map +0 -1
  297. package/dist/q2-tecton-elements/p-45d70da2.entry.js +0 -2
  298. package/dist/q2-tecton-elements/p-45d70da2.entry.js.map +0 -1
  299. package/dist/q2-tecton-elements/p-52e277b8.entry.js +0 -2
  300. package/dist/q2-tecton-elements/p-52e277b8.entry.js.map +0 -1
  301. package/dist/q2-tecton-elements/p-6eac40be.entry.js +0 -2
  302. package/dist/q2-tecton-elements/p-6f2de185.entry.js.map +0 -1
  303. package/dist/q2-tecton-elements/p-774975fa.entry.js.map +0 -1
  304. package/dist/q2-tecton-elements/p-8a00552f.entry.js +0 -2
  305. package/dist/q2-tecton-elements/p-8a00552f.entry.js.map +0 -1
  306. package/dist/q2-tecton-elements/p-9eafabd5.entry.js +0 -2
  307. package/dist/q2-tecton-elements/p-9eafabd5.entry.js.map +0 -1
  308. package/dist/q2-tecton-elements/p-a03c29f3.entry.js +0 -2
  309. package/dist/q2-tecton-elements/p-a03c29f3.entry.js.map +0 -1
  310. package/dist/q2-tecton-elements/p-a3d58a50.entry.js.map +0 -1
  311. package/dist/q2-tecton-elements/p-e25194ce.entry.js.map +0 -1
  312. package/dist/q2-tecton-elements/p-f450db0b.entry.js +0 -2
  313. package/dist/q2-tecton-elements/p-f450db0b.entry.js.map +0 -1
  314. package/dist/q2-tecton-elements/p-fce6bc58.entry.js +0 -2
  315. package/dist/q2-tecton-elements/p-fce6bc58.entry.js.map +0 -1
  316. /package/dist/q2-tecton-elements/{p-d5776227.entry.js.map → p-0d6edd2a.entry.js.map} +0 -0
  317. /package/dist/q2-tecton-elements/{p-dd18416f.entry.js.map → p-258f8c9c.entry.js.map} +0 -0
  318. /package/dist/q2-tecton-elements/{p-ca43e917.entry.js.map → p-32130845.entry.js.map} +0 -0
  319. /package/dist/q2-tecton-elements/{p-ff39ba49.entry.js.map → p-366a92d9.entry.js.map} +0 -0
  320. /package/dist/q2-tecton-elements/{p-ca17f7ca.entry.js.map → p-49ecdf18.entry.js.map} +0 -0
  321. /package/dist/q2-tecton-elements/{p-abe30d0c.entry.js.map → p-6e313705.entry.js.map} +0 -0
  322. /package/dist/q2-tecton-elements/{p-1d824cdf.entry.js.map → p-828850c1.entry.js.map} +0 -0
  323. /package/dist/q2-tecton-elements/{p-8fc099f5.entry.js.map → p-9b65cc28.entry.js.map} +0 -0
  324. /package/dist/q2-tecton-elements/{p-3c42c90f.js.map → p-b6bcef6a.js.map} +0 -0
  325. /package/dist/q2-tecton-elements/{p-f18caa3f.entry.js.map → p-bc73f69c.entry.js.map} +0 -0
  326. /package/dist/q2-tecton-elements/{p-fb7dd7ab.entry.js.map → p-d32f8e53.entry.js.map} +0 -0
  327. /package/dist/q2-tecton-elements/{p-a891571c.entry.js.map → p-d35de465.entry.js.map} +0 -0
  328. /package/dist/q2-tecton-elements/{p-66ae329f.entry.js.map → p-dfa489ba.entry.js.map} +0 -0
  329. /package/dist/q2-tecton-elements/{p-23183c61.entry.js.map → p-f57c4448.entry.js.map} +0 -0
  330. /package/dist/q2-tecton-elements/{p-0e482a7c.entry.js.map → p-fcffc029.entry.js.map} +0 -0
  331. /package/dist/types/workspace/workspace/{_Gitlab_tecton-production_master → on-production_release_1.48.0-pre}/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -0
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-14c3693c.js');
6
6
  const index$1 = require('./index-a93362ed.js');
7
7
 
8
- const q2CheckboxGroupCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{margin-top:var(--tct-scale-2, var(--app-scale-2x, 10px))}fieldset{padding:var(--tct-input-error-padding, 0);margin:0;border:0}fieldset.has-error{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a));border-width:1px;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 2px));position:relative}fieldset.has-error .error-icon-container{top:8px;right:8px;position:absolute;width:40%;text-align:right;background:linear-gradient(to right, var(--tct-checkbox-group-error-gradient-start, var(--t-base-a0, rgba(255, 255, 255, 0))), var(--tct-checkbox-group-error-gradient-end, var(--t-base, rgb(255, 255, 255))))}fieldset.has-error legend+div.error-icon-container.no-label{top:28px}.group-legend{font-weight:600}legend.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px)));color:var(--tct-input-label-optional-font-color, var(--tct-a11y-color, var(--t-a11y-gray-color, var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--app-gray-d1, #666666)))))));font-size:var(--tct-input-label-optional-font-size, 12px);font-weight:var(--tct-input-label-optional-font-weight, 400)}.flexed{margin:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.flexed.left{justify-content:left}";
8
+ const q2CheckboxGroupCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{--comp-default-checkbox-group-margin:var(--tct-checkbox-group-margin-top, var(--t-checkbox-group-margin-top, var(--app-scale-5x, 25px))) 0 var(--tct-checkbox-group-margin-bottom, var(--t-checkbox-group-margin-bottom, var(--app-scale-5x, 25px)));margin:var(--tct-checkbox-group-margin, var(--comp-default-checkbox-group-margin))}::slotted(q2-checkbox){--tct-checkbox-margin:var(--tct-checkbox-group-checkbox-margin, var(--app-scale-0x, 0));--tct-checkbox-padding:var(--tct-checkbox-group-checkbox-padding, var(--app-scale-2x, 10px))}fieldset{padding:var(--tct-input-error-padding, 0);margin:0;border:0}fieldset.has-error{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a));border-width:1px;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 2px));position:relative}fieldset.has-error .error-icon-container{top:8px;right:8px;position:absolute;width:40%;text-align:right;background:linear-gradient(to right, var(--tct-checkbox-group-error-gradient-start, var(--t-base-a0, rgba(255, 255, 255, 0))), var(--tct-checkbox-group-error-gradient-end, var(--t-base, rgb(255, 255, 255))))}fieldset.has-error legend+div.error-icon-container.no-label{top:28px}.group-legend{font-weight:600}legend.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px)));color:var(--tct-input-label-optional-font-color, var(--tct-a11y-color, var(--t-a11y-gray-color, var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--app-gray-d1, #666666)))))));font-size:var(--tct-input-label-optional-font-size, 12px);font-weight:var(--tct-input-label-optional-font-weight, 400)}.flexed{margin:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.flexed.left{justify-content:left}";
9
9
  const Q2CheckboxGroupStyle0 = q2CheckboxGroupCss;
10
10
 
11
11
  const Q2CheckboxGroup = class {
@@ -1 +1 @@
1
- {"file":"q2-checkbox-group.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,miEAAmiE,CAAC;AAC/jE,8BAAe,kBAAkB;;MCcpB,eAAe;;;;QA6CxB,QAAG,GAAW,kBAAkBA,kBAAU,EAAE,EAAE,CAAC;QAe/C,uBAAkB,GAAG;YACjB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,cAA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WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;YACjE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;SAC7B;KACJ;IAED,MAAM;QACF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC;QAC/D,QACIC,oEACK,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,IAAIA,kEAAK,KAAK,EAAC,cAAc,IAAEC,gBAAQ,CAAC,IAAI,CAAC,CAAO,EACjFD,uEACI,KAAK,EAAE,wBAAwB,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,EAAE,EAAE,EACjE,QAAQ,EAAE,IAAI,CAAC,qBAAqB,kBACtB,GAAG,IAAI,CAAC,QAAQ,EAAE,IAE/B,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,GAAGA,oBAAQ,KAAK,EAAC,SAAS,IAAEC,gBAAQ,CAAC,IAAI,CAAC,CAAU,GAAG,EAAE,EACpF,IAAI,CAAC,QAAQ,IACVD,iBAAK,KAAK,EAAE,wBAAwB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,UAAU,EAAE,IAC/EA,qBACI,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,OAAO,GACL,CACT,KAEN,EAAE,CACL,EACA,IAAI,CAAC,QAAQ,EAAE,CACT,CACT,EACR;KACL;IAED,QAAQ;QACJ,OAAOA,qBAAQ,CAAC;KACnB;;;;;;;;;;;;","names":["createGuid","h","labelDOM"],"sources":["src/components/q2-checkbox-group/q2-checkbox-group.scss?tag=q2-checkbox-group&encapsulation=shadow","src/components/q2-checkbox-group/q2-checkbox-group.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n\n:host {\n margin-top: var(--tct-scale-2, var(--app-scale-2x, 10px));\n}\n\nfieldset {\n padding: var(--tct-input-error-padding, 0);\n margin: 0;\n border: 0;\n}\n\nfieldset.has-error {\n border-color: var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a));\n border-width: 1px;\n border-style: solid;\n border-radius: var(--tct-border-radius-1, var(--app-border-radius-1, 2px));\n position: relative;\n}\n\nfieldset.has-error .error-icon-container {\n top: 8px;\n right: 8px;\n position: absolute;\n width: 40%;\n text-align: right;\n background: linear-gradient(\n to right,\n var(--tct-checkbox-group-error-gradient-start, var(--t-base-a0, rgba(255, 255, 255, 0))),\n var(--tct-checkbox-group-error-gradient-end, var(--t-base, rgba(255, 255, 255)))\n );\n}\n\nfieldset.has-error legend + div.error-icon-container.no-label {\n top: 28px;\n}\n\n.group-legend {\n font-weight: 600;\n}\n\nlegend.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n border: 0;\n}\n\n.optional-tag {\n margin-left: var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px)));\n color: var(\n --tct-input-label-optional-font-color,\n var(\n --tct-a11y-color,\n var(\n --t-a11y-gray-color,\n var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--app-gray-d1, #666666))))\n )\n )\n );\n font-size: var(--tct-input-label-optional-font-size, 12px);\n font-weight: var(--tct-input-label-optional-font-weight, 400);\n}\n\n.flexed {\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n}\n.flexed.left {\n justify-content: left;\n}\n","import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Method,\n} from '@stencil/core';\nimport { createGuid, labelDOM } from 'src/utils';\n\n@Component({ tag: 'q2-checkbox-group', shadow: true, styleUrl: 'q2-checkbox-group.scss' })\nexport class Q2CheckboxGroup implements ComponentInterface {\n /** Determines if all checkboxes in the group are put into a `disabled` state. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true }) hasError: boolean;\n\n /**\n * Hide's the group's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /**\n * The label that displays above all the checkboxes.\n * @localizable\n */\n @Prop({ reflect: true }) label: string;\n\n /** Determines if the component is marked as `optional`. */\n @Prop({ reflect: true }) optional: boolean;\n\n /** Determines if all the checkboxes are marked as `readonly`. */\n @Prop({ reflect: true }) readonly: boolean;\n\n /**\n * Can be used to get and set the checked status of each `<q2-checkbox>` element contained within the group.\n *\n * **Example:**\n * @snippet\n * element.value = {\n * 'checkbox-value-1': true,\n * 'checkbox-value-2': false,\n * 'checkbox-value-3': true,\n * };\n *\n * // Also accepts partial values\n * element.value = {\n * 'checkbox-value-2': false,\n * }\n */\n @Prop({ mutable: true }) value: object;\n\n @Element() hostElement: HTMLElement;\n _id: string = `checkbox-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n get inputId() {\n return this._id;\n }\n\n get checkboxElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-checkbox')) as HTMLQ2CheckboxElement[];\n }\n\n get protectedValue(): object {\n return this.value || {};\n }\n\n onMutationObserved = () => {\n this.updateValue();\n this.updateDisabled();\n this.updateReadonly();\n };\n\n onInnerCheckboxChange = (event: CustomEvent) => {\n event.stopImmediatePropagation();\n const groupValue = {};\n setTimeout(() => {\n this.checkboxElements.forEach(check => {\n groupValue[check.value] = !!check.checked;\n });\n this.change.emit(groupValue);\n }, 0);\n };\n\n updateValue() {\n if (this.readonly) return;\n this.checkboxElements.forEach(check => {\n if (this.protectedValue.hasOwnProperty(check.value)) {\n check.checked = this.value[check.value];\n }\n });\n }\n\n updateDisabled() {\n const groupDisabled = this.disabled;\n this.checkboxElements.forEach(checkbox => {\n checkbox.groupDisabled = groupDisabled;\n });\n }\n\n updateReadonly() {\n const slotReadonly = this.readonly;\n this.checkboxElements.forEach(checkbox => {\n checkbox.slotReadonly = slotReadonly;\n });\n }\n\n ///// LIFECYCLE HOOK ///////\n\n componentWillLoad() {\n this.updateReadonly();\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true, subtree: true });\n this.mutationObserver = observer;\n this.onMutationObserved();\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n }\n\n @Watch('value')\n valueObserver() {\n this.updateValue();\n }\n\n @Watch('disabled')\n disabledObserver() {\n this.updateDisabled();\n }\n\n @Watch('readonly')\n readonlyObserver() {\n this.updateReadonly();\n }\n\n /// Methods ///\n /**\n * Emulates clicking the `<q2-checkbox>` option(s) with the provided value.\n *\n * @testOnly\n */\n @Method()\n setValue(values: string | string[]) {\n const valuesSet = new Set(Array.isArray(values) ? values : [values]);\n this.checkboxElements.forEach(check => {\n if (valuesSet.has(check.value)) check.click();\n });\n }\n\n ///// HOST ELEMENT EVENTS ///////\n\n @Event() change: EventEmitter;\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail;\n }\n }\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n return (\n <div>\n {showLabel && !this.hideLabel && <div class=\"group-legend\">{labelDOM(this)}</div>}\n <fieldset\n class={`q2-checkbox-fieldset ${this.hasError ? 'has-error' : ''}`}\n onChange={this.onInnerCheckboxChange}\n aria-invalid={`${this.hasError}`}\n >\n {this.label || this.optional ? <legend class=\"sr-only\">{labelDOM(this)}</legend> : ''}\n {this.hasError ? (\n <div class={`error-icon-container ${this.label || this.optional ? '' : 'no-label'}`}>\n <q2-icon\n class=\"h(4) w(4) mrg-b(2)\"\n type=\"error\"\n ></q2-icon>\n </div>\n ) : (\n ''\n )}\n {this.inputDom()}\n </fieldset>\n </div>\n );\n }\n\n inputDom() {\n return <slot />;\n }\n}\n"],"version":3}
1
+ {"file":"q2-checkbox-group.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAA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-group.scss?tag=q2-checkbox-group&encapsulation=shadow","src/components/q2-checkbox-group/q2-checkbox-group.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-default-checkbox-group-margin: #{var-list(var-prefixer(checkbox-group-margin-top), --app-scale-5x, 25px) 0\n var-list(var-prefixer(checkbox-group-margin-bottom), --app-scale-5x, 25px)};\n margin: var-list(--tct-checkbox-group-margin, --comp-default-checkbox-group-margin);\n}\n\n::slotted(q2-checkbox) {\n --tct-checkbox-margin: #{var-list(--tct-checkbox-group-checkbox-margin, --app-scale-0x, 0)};\n --tct-checkbox-padding: #{var-list(--tct-checkbox-group-checkbox-padding, --app-scale-2x, 10px)};\n}\n\nfieldset {\n padding: var(--tct-input-error-padding, 0);\n margin: 0;\n border: 0;\n}\n\nfieldset.has-error {\n border-color: var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a));\n border-width: 1px;\n border-style: solid;\n border-radius: var(--tct-border-radius-1, var(--app-border-radius-1, 2px));\n position: relative;\n}\n\nfieldset.has-error .error-icon-container {\n top: 8px;\n right: 8px;\n position: absolute;\n width: 40%;\n text-align: right;\n background: linear-gradient(\n to right,\n var(--tct-checkbox-group-error-gradient-start, var(--t-base-a0, rgba(255, 255, 255, 0))),\n var(--tct-checkbox-group-error-gradient-end, var(--t-base, rgba(255, 255, 255)))\n );\n}\n\nfieldset.has-error legend + div.error-icon-container.no-label {\n top: 28px;\n}\n\n.group-legend {\n font-weight: 600;\n}\n\nlegend.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n border: 0;\n}\n\n.optional-tag {\n margin-left: var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px)));\n color: var(\n --tct-input-label-optional-font-color,\n var(\n --tct-a11y-color,\n var(\n --t-a11y-gray-color,\n var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--app-gray-d1, #666666))))\n )\n )\n );\n font-size: var(--tct-input-label-optional-font-size, 12px);\n font-weight: var(--tct-input-label-optional-font-weight, 400);\n}\n\n.flexed {\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n}\n.flexed.left {\n justify-content: left;\n}\n","import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Method,\n} from '@stencil/core';\nimport { createGuid, labelDOM } from 'src/utils';\n\n@Component({ tag: 'q2-checkbox-group', shadow: true, styleUrl: 'q2-checkbox-group.scss' })\nexport class Q2CheckboxGroup implements ComponentInterface {\n /** Determines if all checkboxes in the group are put into a `disabled` state. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true }) hasError: boolean;\n\n /**\n * Hide's the group's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /**\n * The label that displays above all the checkboxes.\n * @localizable\n */\n @Prop({ reflect: true }) label: string;\n\n /** Determines if the component is marked as `optional`. */\n @Prop({ reflect: true }) optional: boolean;\n\n /** Determines if all the checkboxes are marked as `readonly`. */\n @Prop({ reflect: true }) readonly: boolean;\n\n /**\n * Can be used to get and set the checked status of each `<q2-checkbox>` element contained within the group.\n *\n * **Example:**\n * @snippet\n * element.value = {\n * 'checkbox-value-1': true,\n * 'checkbox-value-2': false,\n * 'checkbox-value-3': true,\n * };\n *\n * // Also accepts partial values\n * element.value = {\n * 'checkbox-value-2': false,\n * }\n */\n @Prop({ mutable: true }) value: object;\n\n @Element() hostElement: HTMLElement;\n _id: string = `checkbox-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n get inputId() {\n return this._id;\n }\n\n get checkboxElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-checkbox')) as HTMLQ2CheckboxElement[];\n }\n\n get protectedValue(): object {\n return this.value || {};\n }\n\n onMutationObserved = () => {\n this.updateValue();\n this.updateDisabled();\n this.updateReadonly();\n };\n\n onInnerCheckboxChange = (event: CustomEvent) => {\n event.stopImmediatePropagation();\n const groupValue = {};\n setTimeout(() => {\n this.checkboxElements.forEach(check => {\n groupValue[check.value] = !!check.checked;\n });\n this.change.emit(groupValue);\n }, 0);\n };\n\n updateValue() {\n if (this.readonly) return;\n this.checkboxElements.forEach(check => {\n if (this.protectedValue.hasOwnProperty(check.value)) {\n check.checked = this.value[check.value];\n }\n });\n }\n\n updateDisabled() {\n const groupDisabled = this.disabled;\n this.checkboxElements.forEach(checkbox => {\n checkbox.groupDisabled = groupDisabled;\n });\n }\n\n updateReadonly() {\n const slotReadonly = this.readonly;\n this.checkboxElements.forEach(checkbox => {\n checkbox.slotReadonly = slotReadonly;\n });\n }\n\n ///// LIFECYCLE HOOK ///////\n\n componentWillLoad() {\n this.updateReadonly();\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true, subtree: true });\n this.mutationObserver = observer;\n this.onMutationObserved();\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n }\n\n @Watch('value')\n valueObserver() {\n this.updateValue();\n }\n\n @Watch('disabled')\n disabledObserver() {\n this.updateDisabled();\n }\n\n @Watch('readonly')\n readonlyObserver() {\n this.updateReadonly();\n }\n\n /// Methods ///\n /**\n * Emulates clicking the `<q2-checkbox>` option(s) with the provided value.\n *\n * @testOnly\n */\n @Method()\n setValue(values: string | string[]) {\n const valuesSet = new Set(Array.isArray(values) ? values : [values]);\n this.checkboxElements.forEach(check => {\n if (valuesSet.has(check.value)) check.click();\n });\n }\n\n ///// HOST ELEMENT EVENTS ///////\n\n @Event() change: EventEmitter;\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail;\n }\n }\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n return (\n <div>\n {showLabel && !this.hideLabel && <div class=\"group-legend\">{labelDOM(this)}</div>}\n <fieldset\n class={`q2-checkbox-fieldset ${this.hasError ? 'has-error' : ''}`}\n onChange={this.onInnerCheckboxChange}\n aria-invalid={`${this.hasError}`}\n >\n {this.label || this.optional ? <legend class=\"sr-only\">{labelDOM(this)}</legend> : ''}\n {this.hasError ? (\n <div class={`error-icon-container ${this.label || this.optional ? '' : 'no-label'}`}>\n <q2-icon\n class=\"h(4) w(4) mrg-b(2)\"\n type=\"error\"\n ></q2-icon>\n </div>\n ) : (\n ''\n )}\n {this.inputDom()}\n </fieldset>\n </div>\n );\n }\n\n inputDom() {\n return <slot />;\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-14c3693c.js');
6
6
  const index$1 = require('./index-a93362ed.js');
7
7
 
8
- const q2CheckboxCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{--comp-checkbox-padding:var(--tct-checkbox-padding, var(--tct-checkbox-vertical-padding, var(--t-checkbox-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0);display:block;position:relative;padding:var(--comp-checkbox-padding)}.container{--comp-checkbox-size:var(--tct-checkbox-size, var(--t-checkbox-size, 20px));--comp-checkbox-default-column-gap:var(--app-scale-2x, 10px);--comp-checkbox-default-row-gap:0;--comp-checkbox-default-gap:var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap);--comp-checkbox-tween:var(--tct-tween-1, var(--app-tween-1, 0.2s ease));--comp-checkbox-toggle-width:var(--tct-checkbox-toggle-width, var(--t-checkbox-toggle-width, 46px));--comp-checkbox-gap:var(--tct-checkbox-gap, var(--t-checkbox-gap, var(--comp-checkbox-default-gap)));--comp-checkbox-outer-stroke-color:var(--tct-checkbox-outer-stroke-color, var(--t-checkbox-outer-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-outer-fill-color:var(--tct-checkbox-outer-fill-color, var(--t-checkbox-outer-fill-color, var(--tct-white, var(--app-white, #ffffff))));--comp-checkbox-checked-color:var(--tct-checkbox-check-stroke-color, var(--t-checkbox-check-stroke-color, var(--t-checkbox-fill, var(--t-a11y-active-gray-color-AA, #404040))));--comp-control-width:var(--comp-checkbox-size);--comp-checkbox-error-color:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a));display:grid;grid-template-areas:\"svg label\" \"svg description\";align-items:center;gap:var(--comp-checkbox-gap);grid-template-columns:var(--comp-control-width) calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap))}:host([type=favorite]) .container{--comp-checkbox-favorite-stroke-color:var(--tct-checkbox-favorite-stroke-color, var(--t-checkbox-favorite-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-favorite-fill-color:var(--tct-checkbox-favorite-fill-color, var(--t-checkbox-favorite-fill-color, #db7d24))}:host([hide-label]:not([hide-label=false])) .container{grid-template-areas:\"svg\";grid-template-columns:var(--comp-control-width)}:host([type=toggle]) .container{--comp-control-width:var(--comp-checkbox-toggle-width)}:host([alignment=right]) .container,:host([type=toggle]:not([alignment])) .container{grid-template-areas:\"label svg\" \"description svg\";grid-template-columns:calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(--comp-control-width)}.label-control{align-items:center;display:flex}.label-text{grid-area:label;font-weight:var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400))}:host([description]) .label-text{font-weight:var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600))}:host([checked]:not([checked=false])) .label-text{font-weight:var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600))}:host(:hover) .label-text{font-weight:var(--tct-checkbox-hover-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400)))}:host(:focus-within) .label-text{font-weight:var(--tct-checkbox-focused-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400)))}:host([description]:hover) .label-text{font-weight:var(--tct-checkbox-hover-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600)))}:host([checked]:not([checked=false]):hover) .label-text{font-weight:var(--tct-checkbox-checked-hover-label-font-weight, var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600)))}:host([description]:focus-within) .label-text{font-weight:var(--tct-checkbox-focused-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600)))}:host([checked]:not([checked=false]):focus-within) .label-text{font-weight:var(--tct-checkbox-checked-focused-label-font-weight, var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600)))}.description-text{grid-area:description;font-weight:var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400))}:host(:hover) .description-text{font-weight:var(--tct-checkbox-hover-description-font-weight, var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400)))}label{color:var(--tct-checkbox-label-color);cursor:pointer;hyphens:var(--tct-checkbox-label-hyphens, auto);word-break:var(--tct-checkbox-label-word-break, break-word);word-wrap:var(--tct-checkbox-label-word-wrap, break-word)}:host([disabled]:not([disabled=false])),:host([group-disabled]){opacity:var(--tct-checkbox-disabled-opacity, var(--t-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}:host([disabled]:not([disabled=false])) label,:host([group-disabled]) label{cursor:not-allowed}.checkbox-icon{width:var(--comp-checkbox-size);height:var(--comp-checkbox-size);border-radius:var(--tct-checkbox-outer-border-radius, var(--t-checkbox-outer-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));stroke:var(--comp-checkbox-outer-stroke-color);fill:var(--comp-checkbox-outer-fill-color);stroke-width:var(--tct-checkbox-outer-stroke-width, var(--t-checkbox-outer-stroke-width, 2));flex-shrink:0}:host([checked]:not([checked=false]):not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-checked-outer-stroke-color, var(--t-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color)));fill:var(--tct-checkbox-checked-outer-fill-color, var(--t-checkbox-checked-outer-fill-color, var(--comp-checkbox-outer-fill-color)))}:host([has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color));fill:var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--tct-checkbox-error-box-shadow)}:host(:hover:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-hover-outer-stroke-color, var(--comp-checkbox-outer-stroke-color));fill:var(--tct-checkbox-hover-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--tct-checkbox-hover-box-shadow)}:host(:hover[has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-hover-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));fill:var(--tct-checkbox-error-hover-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)));box-shadow:var(--tct-checkbox-error-hover-box-shadow, var(--tct-checkbox-error-box-shadow, var(--tct-checkbox-hover-box-shadow)))}:host(:focus-within:not([type=favorite])) .checkbox-icon{--comp-checkbox-focused-box-shadow:var(--const-double-focus-ring), var(--tct-global-focus, 0 0 0 2px #33b4ff);stroke:var(--tct-checkbox-focused-outer-stroke-color, var(--t-checkbox-focused-outer-stroke-color, var(--comp-checkbox-checked-color)));fill:var(--tct-checkbox-focused-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--comp-checkbox-focused-box-shadow)}:host(:focus-within[has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-focused-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));fill:var(--tct-checkbox-error-focused-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)));box-shadow:var(--tct-checkbox-error-focused-box-shadow, var(--tct-checkbox-error-box-shadow, var(--comp-checkbox-focused-box-shadow)))}:host([type=favorite]) .checkbox-icon{--tct-icon-stroke-width:var(--tct-checkbox-favorite-stroke-width, var(--t-checkbox-favorite-stroke-width, 1));--tct-icon-stroke-primary:var(--comp-checkbox-favorite-stroke-color);transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host(:hover[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-stroke-color, var(--tct-checkbox-favorite-stroke-color, var(--comp-checkbox-favorite-fill-color)));fill:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host([checked]:not([checked=false])[type=favorite]:hover) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-hover-stroke-color, var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-fill-primary:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-focused-stroke-color, var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([has-error][type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}:host([has-error][type=favorite][checked]:not([checked=false])) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}.checkbox-fill{stroke:var(--tct-checkbox-checkmark-stroke-color, var(--comp-checkbox-checked-color))}.checked-fill{stroke-width:var(--tct-checkbox-check-stroke-width, var(--t-checkbox-check-stroke-width, 2.5));stroke-linecap:round;stroke-linejoin:round}:host([type=toggle]) .checked-fill{stroke:var(--tct-checkbox-toggle-icon-stroke, var(--t-checkbox-toggle-icon-stroke, var(--tct-white, var(--app-white, #ffffff))));transition:opacity var(--comp-checkbox-tween)}:host([type=toggle][checked]:not([checked=false])) .checked-fill{stroke:var(--tct-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-text, var(--tct-white, var(--app-white, #ffffff)))))}.indeterminate-fill{stroke-width:var(--tct-checkbox-indeterminate-stroke-width, var(--t-checkbox-indeterminate-stroke-width, 3.5))}.toggle-svg{height:30px;width:var(--comp-checkbox-toggle-width);position:relative;text-align:initial}.toggle-track,.toggle-indicator{position:absolute;top:50%;transform:translateY(-50%)}.toggle-track{fill:var(--tct-checkbox-toggle-track-color, var(--t-checkbox-toggle-track-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));height:14px;width:46px}:host([checked]:not([checked=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));opacity:0.5}:host([has-error]) .toggle-track{fill:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)));opacity:0.5}.toggle-indicator{transition:left var(--comp-checkbox-tween);height:30px;width:30px;left:0;border-radius:50%}:host([checked]:not([checked=false])) .toggle-indicator{left:21px}.toggle-circle{fill:var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--t-a11y-gray-color-AA, #949494)))}:host([checked]:not([checked=false])) .toggle-circle{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)))}:host(:is(:not([checked]),[checked=false]):focus-within) .toggle-circle,:host(:is(:not([checked]),[checked=false]):hover) .toggle-circle{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)))}:host([has-error]) .toggle-circle,:host([has-error]:focus-within) .toggle-circle,:host([has-error]:hover) .toggle-circle{fill:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)))}.toggle-hover-circle{stroke-width:0}:host(:focus-within) .toggle-hover-circle,:host(:hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));stroke-width:10px;stroke-opacity:0.5}:host(:is(:not([checked]),[checked=false]):focus-within) .toggle-hover-circle,:host(:is(:not([checked]),[checked=false]):hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--t-a11y-gray-color-AA, #949494)))}:host([has-error]) .toggle-hover-circle,:host([has-error]:focus-within) .toggle-hover-circle,:host([has-error]:hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)))}:host([checked]:not([checked=false])) .off,:host(:is(:not([checked]),[checked=false])) .on{opacity:0}";
8
+ const q2CheckboxCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{--comp-checkbox-padding:var(--tct-checkbox-padding, var(--tct-checkbox-vertical-padding, var(--t-checkbox-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0);display:block;position:relative;padding:var(--comp-checkbox-padding);--comp-default-checkbox-margin:var(--tct-checkbox-margin-top, var(--t-checkbox-margin-top, var(--app-scale-5x, 25px))) 0 var(--tct-checkbox-margin-bottom, var(--t-checkbox-margin-bottom, var(--app-scale-5x, 25px)));margin:var(--tct-checkbox-margin, var(--comp-default-checkbox-margin))}.container{--comp-checkbox-size:var(--tct-checkbox-size, var(--t-checkbox-size, 20px));--comp-checkbox-default-column-gap:var(--app-scale-2x, 10px);--comp-checkbox-default-row-gap:0;--comp-checkbox-default-gap:var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap);--comp-checkbox-tween:var(--tct-tween-1, var(--app-tween-1, 0.2s ease));--comp-checkbox-toggle-width:var(--tct-checkbox-toggle-width, var(--t-checkbox-toggle-width, 46px));--comp-checkbox-gap:var(--tct-checkbox-gap, var(--t-checkbox-gap, var(--comp-checkbox-default-gap)));--comp-checkbox-outer-stroke-color:var(--tct-checkbox-outer-stroke-color, var(--t-checkbox-outer-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-outer-fill-color:var(--tct-checkbox-outer-fill-color, var(--t-checkbox-outer-fill-color, var(--tct-white, var(--app-white, #ffffff))));--comp-checkbox-checked-color:var(--tct-checkbox-check-stroke-color, var(--t-checkbox-check-stroke-color, var(--t-checkbox-fill, var(--t-a11y-active-gray-color-AA, #404040))));--comp-control-width:var(--comp-checkbox-size);--comp-checkbox-error-color:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a));display:grid;grid-template-areas:\"svg label\" \"svg description\";align-items:center;gap:var(--comp-checkbox-gap);grid-template-columns:var(--comp-control-width) calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap))}:host([type=favorite]) .container{--comp-checkbox-favorite-stroke-color:var(--tct-checkbox-favorite-stroke-color, var(--t-checkbox-favorite-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-favorite-fill-color:var(--tct-checkbox-favorite-fill-color, var(--t-checkbox-favorite-fill-color, #db7d24))}:host([hide-label]:not([hide-label=false])) .container{grid-template-areas:\"svg\";grid-template-columns:var(--comp-control-width)}:host([type=toggle]) .container{--comp-control-width:var(--comp-checkbox-toggle-width)}:host([alignment=right]) .container,:host([type=toggle]:not([alignment])) .container{grid-template-areas:\"label svg\" \"description svg\";grid-template-columns:calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(--comp-control-width)}.label-control{align-items:center;display:flex}.label-text{grid-area:label;font-weight:var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400))}:host([description]) .label-text{font-weight:var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600))}:host([checked]:not([checked=false])) .label-text{font-weight:var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600))}:host(:hover) .label-text{font-weight:var(--tct-checkbox-hover-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400)))}:host(:focus-within) .label-text{font-weight:var(--tct-checkbox-focused-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400)))}:host([description]:hover) .label-text{font-weight:var(--tct-checkbox-hover-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600)))}:host([checked]:not([checked=false]):hover) .label-text{font-weight:var(--tct-checkbox-checked-hover-label-font-weight, var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600)))}:host([description]:focus-within) .label-text{font-weight:var(--tct-checkbox-focused-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600)))}:host([checked]:not([checked=false]):focus-within) .label-text{font-weight:var(--tct-checkbox-checked-focused-label-font-weight, var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600)))}.description-text{grid-area:description;font-weight:var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400))}:host(:hover) .description-text{font-weight:var(--tct-checkbox-hover-description-font-weight, var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400)))}label{color:var(--tct-checkbox-label-color);cursor:pointer;hyphens:var(--tct-checkbox-label-hyphens, auto);word-break:var(--tct-checkbox-label-word-break, break-word);word-wrap:var(--tct-checkbox-label-word-wrap, break-word)}:host([disabled]:not([disabled=false])),:host([group-disabled]){opacity:var(--tct-checkbox-disabled-opacity, var(--t-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}:host([disabled]:not([disabled=false])) label,:host([group-disabled]) label{cursor:not-allowed}.checkbox-icon{width:var(--comp-checkbox-size);height:var(--comp-checkbox-size);border-radius:var(--tct-checkbox-outer-border-radius, var(--t-checkbox-outer-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));stroke:var(--comp-checkbox-outer-stroke-color);fill:var(--comp-checkbox-outer-fill-color);stroke-width:var(--tct-checkbox-outer-stroke-width, var(--t-checkbox-outer-stroke-width, 2));flex-shrink:0}:host([checked]:not([checked=false]):not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-checked-outer-stroke-color, var(--t-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color)));fill:var(--tct-checkbox-checked-outer-fill-color, var(--t-checkbox-checked-outer-fill-color, var(--comp-checkbox-outer-fill-color)))}:host([has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color));fill:var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--tct-checkbox-error-box-shadow)}:host(:hover:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-hover-outer-stroke-color, var(--comp-checkbox-outer-stroke-color));fill:var(--tct-checkbox-hover-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--tct-checkbox-hover-box-shadow)}:host(:hover[has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-hover-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));fill:var(--tct-checkbox-error-hover-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)));box-shadow:var(--tct-checkbox-error-hover-box-shadow, var(--tct-checkbox-error-box-shadow, var(--tct-checkbox-hover-box-shadow)))}:host(:focus-within:not([type=favorite])) .checkbox-icon{--comp-checkbox-focused-box-shadow:var(--const-double-focus-ring), var(--tct-global-focus, 0 0 0 2px #33b4ff);stroke:var(--tct-checkbox-focused-outer-stroke-color, var(--t-checkbox-focused-outer-stroke-color, var(--comp-checkbox-checked-color)));fill:var(--tct-checkbox-focused-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--comp-checkbox-focused-box-shadow)}:host(:focus-within[has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-focused-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));fill:var(--tct-checkbox-error-focused-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)));box-shadow:var(--tct-checkbox-error-focused-box-shadow, var(--tct-checkbox-error-box-shadow, var(--comp-checkbox-focused-box-shadow)))}:host([type=favorite]) .checkbox-icon{--tct-icon-stroke-width:var(--tct-checkbox-favorite-stroke-width, var(--t-checkbox-favorite-stroke-width, 1));--tct-icon-stroke-primary:var(--comp-checkbox-favorite-stroke-color);transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host(:hover[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-stroke-color, var(--tct-checkbox-favorite-stroke-color, var(--comp-checkbox-favorite-fill-color)));fill:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host([checked]:not([checked=false])[type=favorite]:hover) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-hover-stroke-color, var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-fill-primary:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-focused-stroke-color, var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([has-error][type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}:host([has-error][type=favorite][checked]:not([checked=false])) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}.checkbox-fill{stroke:var(--tct-checkbox-checkmark-stroke-color, var(--comp-checkbox-checked-color))}.checked-fill{stroke-width:var(--tct-checkbox-check-stroke-width, var(--t-checkbox-check-stroke-width, 2.5));stroke-linecap:round;stroke-linejoin:round}:host([type=toggle]) .checked-fill{stroke:var(--tct-checkbox-toggle-icon-stroke, var(--t-checkbox-toggle-icon-stroke, var(--tct-white, var(--app-white, #ffffff))));transition:opacity var(--comp-checkbox-tween)}:host([type=toggle][checked]:not([checked=false])) .checked-fill{stroke:var(--tct-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-text, var(--tct-white, var(--app-white, #ffffff)))))}.indeterminate-fill{stroke-width:var(--tct-checkbox-indeterminate-stroke-width, var(--t-checkbox-indeterminate-stroke-width, 3.5))}.toggle-svg{height:30px;width:var(--comp-checkbox-toggle-width);position:relative;text-align:initial}.toggle-track,.toggle-indicator{position:absolute;top:50%;transform:translateY(-50%)}.toggle-track{fill:var(--tct-checkbox-toggle-track-color, var(--t-checkbox-toggle-track-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));height:14px;width:46px}:host([checked]:not([checked=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));opacity:0.5}:host([has-error]) .toggle-track{fill:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)));opacity:0.5}.toggle-indicator{transition:left var(--comp-checkbox-tween);height:30px;width:30px;left:0;border-radius:50%}:host([checked]:not([checked=false])) .toggle-indicator{left:21px}.toggle-circle{fill:var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--t-a11y-gray-color-AA, #949494)))}:host([checked]:not([checked=false])) .toggle-circle{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)))}:host(:is(:not([checked]),[checked=false]):focus-within) .toggle-circle,:host(:is(:not([checked]),[checked=false]):hover) .toggle-circle{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)))}:host([has-error]) .toggle-circle,:host([has-error]:focus-within) .toggle-circle,:host([has-error]:hover) .toggle-circle{fill:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)))}.toggle-hover-circle{stroke-width:0}:host(:focus-within) .toggle-hover-circle,:host(:hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));stroke-width:10px;stroke-opacity:0.5}:host(:is(:not([checked]),[checked=false]):focus-within) .toggle-hover-circle,:host(:is(:not([checked]),[checked=false]):hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--t-a11y-gray-color-AA, #949494)))}:host([has-error]) .toggle-hover-circle,:host([has-error]:focus-within) .toggle-hover-circle,:host([has-error]:hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)))}:host([checked]:not([checked=false])) .off,:host(:is(:not([checked]),[checked=false])) .on{opacity:0}";
9
9
  const Q2CheckboxStyle0 = q2CheckboxCss;
10
10
 
11
11
  const Q2Checkbox = class {
@@ -1 +1 @@
1
- {"file":"q2-checkbox.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,aAAa,GAAG,69bAA69b,CAAC;AACp/b,yBAAe,aAAa;;MCGf,UAAU;;;;QAmEnB,QAAG,GAAW,YAAYA,kBAAU,EAAE,EAAE,CAAC;;QA0CzC,iBAAY,GAAG,CAAC,KAAY;YACxB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,KAAK,CAAC,cAAc,EAAE,CAAC;YAEvB,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC;YAC7E,IAAI,gBAAgB;gBAAE,OAAO;YAC7B,IAAI,EAAE,KAAK,CAAC,MAAM,YAAY,gBAAgB,CAAC;gBAAE,OAAO;YACxD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;YAExC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;gBACb,KAAK;gBACL,OAAO;aACV,CAAC,CAAC;YACH,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;SAC7B,CAAC;;uBAtHyD,KAAK;;;wBAYnB,KAAK;;;;;;;;;;;;;IAuDlD,iBAAiB;QACbC,uBAAe,CAAC,IAAI,CAAC,CAAC;KACzB;IAED,gBAAgB;QACZC,qBAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChC,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;KAC5D;;IAID,oBAAoB,CAAC,KAA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C,IAAI,GACT,EACFA,sBACI,KAAK,EAAC,iBAAiB,EACvB,MAAM,EAAC,yBAAyB,GAClC,CACA,CACJ,EACR;KACL;;;;;;;;;;","names":["createGuid","handleAriaLabel","overrideFocus","isEventFromElement","h","loc"],"sources":["src/components/q2-checkbox/q2-checkbox.scss?tag=q2-checkbox&encapsulation=shadow","src/components/q2-checkbox/q2-checkbox.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-checkbox-padding: #{var-list(\n --tct-checkbox-padding,\n unquote('#{var-list(var-prefixer(checkbox-vertical-padding), --tct-scale-2, --app-scale-2x, 10px)} 0')\n )};\n display: block;\n position: relative;\n padding: var(--comp-checkbox-padding);\n}\n\n.container {\n --comp-checkbox-size: #{var-list(var-prefixer(checkbox-size), 20px)};\n --comp-checkbox-default-column-gap: var(--app-scale-2x, 10px);\n --comp-checkbox-default-row-gap: 0;\n --comp-checkbox-default-gap: #{var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap)};\n --comp-checkbox-tween: #{var-list(--tct-tween-1, --app-tween-1, unquote('0.2s ease'))};\n --comp-checkbox-toggle-width: #{var-list(var-prefixer(checkbox-toggle-width), 46px)};\n --comp-checkbox-gap: #{var-list(var-prefixer(checkbox-gap), --comp-checkbox-default-gap)};\n --comp-checkbox-outer-stroke-color: #{var-list(\n var-prefixer(checkbox-outer-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-outer-fill-color: #{var-list(\n var-prefixer(checkbox-outer-fill-color),\n --tct-white,\n --app-white,\n #ffffff\n )};\n --comp-checkbox-checked-color: #{var-list(\n var-prefixer(checkbox-check-stroke-color),\n --t-checkbox-fill,\n --t-a11y-active-gray-color-AA,\n #404040\n )};\n --comp-control-width: var(--comp-checkbox-size);\n --comp-checkbox-error-color: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n\n :host([type='favorite']) & {\n --comp-checkbox-favorite-stroke-color: #{var-list(\n var-prefixer(checkbox-favorite-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-favorite-fill-color: #{var-list(var-prefixer(checkbox-favorite-fill-color), #db7d24)};\n }\n\n display: grid;\n grid-template-areas:\n 'svg label'\n 'svg description';\n align-items: center;\n gap: var(--comp-checkbox-gap);\n grid-template-columns: var(--comp-control-width) calc(\n 100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)\n );\n\n :host([hide-label]:not([hide-label='false'])) & {\n grid-template-areas: 'svg';\n grid-template-columns: var(--comp-control-width);\n }\n\n :host([type='toggle']) & {\n --comp-control-width: var(--comp-checkbox-toggle-width);\n }\n\n :host([alignment='right']) &,\n :host([type='toggle']:not([alignment])) & {\n grid-template-areas:\n 'label svg'\n 'description svg';\n grid-template-columns: calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(\n --comp-control-width\n );\n }\n}\n\n.label-control {\n align-items: center;\n display: flex;\n}\n\n.label-text {\n grid-area: label;\n font-weight: var-list(var-prefixer(checkbox-label-font-weight), 400);\n\n :host([description]) & {\n font-weight: var-list(var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false'])) & {\n font-weight: var-list(var-prefixer(checkbox-checked-label-font-weight), 600);\n }\n :host(:hover) & {\n font-weight: var-list(--tct-checkbox-hover-label-font-weight, var-prefixer(checkbox-label-font-weight), 400);\n }\n :host(:focus-within) & {\n font-weight: var-list(--tct-checkbox-focused-label-font-weight, var-prefixer(checkbox-label-font-weight), 400);\n }\n :host([description]:hover) & {\n font-weight: var-list(--tct-checkbox-hover-label-font-weight, var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false']):hover) & {\n font-weight: var-list(\n --tct-checkbox-checked-hover-label-font-weight,\n var-prefixer(checkbox-checked-label-font-weight),\n 600\n );\n }\n :host([description]:focus-within) & {\n font-weight: var-list(--tct-checkbox-focused-label-font-weight, var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false']):focus-within) & {\n font-weight: var-list(\n --tct-checkbox-checked-focused-label-font-weight,\n var-prefixer(checkbox-checked-label-font-weight),\n 600\n );\n }\n}\n\n.description-text {\n grid-area: description;\n font-weight: var-list(var-prefixer(checkbox-description-font-weight), 400);\n\n :host(:hover) & {\n font-weight: var-list(\n --tct-checkbox-hover-description-font-weight,\n var-prefixer(checkbox-description-font-weight),\n 400\n );\n }\n}\n\nlabel {\n color: var-list(--tct-checkbox-label-color);\n cursor: pointer;\n hyphens: var-list(--tct-checkbox-label-hyphens, auto);\n word-break: var-list(--tct-checkbox-label-word-break, break-word);\n word-wrap: var-list(--tct-checkbox-label-word-wrap, break-word);\n}\n\n:host([disabled]:not([disabled='false'])),\n:host([group-disabled]) {\n opacity: var-list(var-prefixer(checkbox-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n\n label {\n cursor: not-allowed;\n }\n}\n\n.checkbox-icon {\n width: var(--comp-checkbox-size);\n height: var(--comp-checkbox-size);\n border-radius: var-list(\n var-prefixer(checkbox-outer-border-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 3px\n );\n stroke: var(--comp-checkbox-outer-stroke-color);\n fill: var(--comp-checkbox-outer-fill-color);\n stroke-width: var-list(var-prefixer(checkbox-outer-stroke-width), 2);\n flex-shrink: 0;\n\n :host([checked]:not([checked='false']):not([type='favorite'])) & {\n stroke: var-list(var-prefixer(checkbox-checked-outer-stroke-color), --comp-checkbox-outer-stroke-color);\n fill: var-list(var-prefixer(checkbox-checked-outer-fill-color), --comp-checkbox-outer-fill-color);\n }\n\n :host([has-error]:not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-error-outer-stroke-color, --comp-checkbox-error-color);\n fill: var-list(--tct-checkbox-error-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--tct-checkbox-error-box-shadow);\n }\n\n :host(:hover:not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-hover-outer-stroke-color, --comp-checkbox-outer-stroke-color);\n fill: var-list(--tct-checkbox-hover-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--tct-checkbox-hover-box-shadow);\n }\n :host(:hover[has-error]:not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-hover-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n fill: var-list(\n --tct-checkbox-error-hover-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-hover-box-shadow,\n --tct-checkbox-error-box-shadow,\n --tct-checkbox-hover-box-shadow\n );\n }\n\n :host(:focus-within:not([type='favorite'])) & {\n --comp-checkbox-focused-box-shadow: #{var(--const-double-focus-ring),\n var-list(--tct-global-focus, unquote('0 0 0 2px #33b4ff'))};\n\n stroke: var-list(var-prefixer(checkbox-focused-outer-stroke-color), --comp-checkbox-checked-color);\n fill: var-list(--tct-checkbox-focused-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--comp-checkbox-focused-box-shadow);\n }\n :host(:focus-within[has-error]:not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-focused-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n fill: var-list(\n --tct-checkbox-error-focused-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-focused-box-shadow,\n --tct-checkbox-error-box-shadow,\n --comp-checkbox-focused-box-shadow\n );\n }\n\n // Favorite\n :host([type='favorite']) & {\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-stroke-width), 1)};\n --tct-icon-stroke-primary: var(--comp-checkbox-favorite-stroke-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host(:hover[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n // Checked favorite\n :host([checked]:not([checked='false'])[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-stroke-color,\n --tct-checkbox-favorite-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n fill: var-list(--tct-checkbox-favorite-checked-fill-color, --comp-checkbox-favorite-fill-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:hover) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-hover-stroke-color,\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-fill-primary: #{var-list(\n --tct-checkbox-favorite-checked-fill-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-focused-stroke-color,\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([has-error][type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n :host([has-error][type='favorite'][checked]:not([checked='false'])) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n}\n\n.checkbox-fill {\n stroke: var-list(--tct-checkbox-checkmark-stroke-color, --comp-checkbox-checked-color);\n}\n\n.checked-fill {\n stroke-width: var-list(var-prefixer(checkbox-check-stroke-width), 2.5);\n stroke-linecap: round;\n stroke-linejoin: round;\n\n :host([type='toggle']) & {\n stroke: var-list(var-prefixer(checkbox-toggle-icon-stroke), --tct-white, --app-white, #ffffff);\n transition: opacity var(--comp-checkbox-tween);\n }\n :host([type='toggle'][checked]:not([checked='false'])) & {\n stroke: var-list(\n var-prefixer(checkbox-toggle-checked-icon-stroke),\n --t-checkbox-text,\n --tct-white,\n --app-white,\n #ffffff\n );\n }\n}\n\n.indeterminate-fill {\n stroke-width: var-list(var-prefixer(checkbox-indeterminate-stroke-width), 3.5);\n}\n\n.toggle-svg {\n height: 30px;\n width: var(--comp-checkbox-toggle-width);\n position: relative;\n text-align: initial;\n}\n\n.toggle-track,\n.toggle-indicator {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.toggle-track {\n fill: var-list(\n var-prefixer(checkbox-toggle-track-color),\n var-prefixer(gray-11),\n --tct-gray-l1,\n --app-gray-l1,\n #cccccc\n );\n height: 14px;\n width: 46px;\n\n :host([checked]:not([checked='false'])) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n opacity: 0.5;\n }\n :host([has-error]) & {\n fill: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n opacity: 0.5;\n }\n}\n\n.toggle-indicator {\n transition: left var(--comp-checkbox-tween);\n height: 30px;\n width: 30px;\n left: 0;\n border-radius: 50%;\n\n :host([checked]:not([checked='false'])) & {\n left: 21px;\n }\n}\n\n.toggle-circle {\n fill: var-list(var-prefixer(checkbox-toggle-circle-color), --t-a11y-gray-color-AA, #949494);\n :host([checked]:not([checked='false'])) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n }\n\n :host(:is(:not([checked]), [checked='false']):focus-within) &,\n :host(:is(:not([checked]), [checked='false']):hover) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n }\n :host([has-error]) &,\n :host([has-error]:focus-within) &,\n :host([has-error]:hover) & {\n fill: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n }\n}\n\n.toggle-hover-circle {\n stroke-width: 0;\n\n :host(:focus-within) &,\n :host(:hover) & {\n stroke: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n stroke-width: 10px;\n stroke-opacity: 0.5;\n }\n\n :host(:is(:not([checked]), [checked='false']):focus-within) &,\n :host(:is(:not([checked]), [checked='false']):hover) & {\n stroke: var-list(var-prefixer(checkbox-toggle-circle-color), --t-a11y-gray-color-AA, #949494);\n }\n :host([has-error]) &,\n :host([has-error]:focus-within) &,\n :host([has-error]:hover) & {\n stroke: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n }\n}\n\n:host([checked]:not([checked='false'])) .off,\n:host(:is(:not([checked]), [checked='false'])) .on {\n opacity: 0;\n}\n","import { Component, ComponentInterface, Prop, Element, Listen, Watch, Event, EventEmitter, h } from '@stencil/core';\nimport { createGuid, handleAriaLabel, isEventFromElement, loc, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-checkbox', shadow: true, styleUrl: 'q2-checkbox.scss' })\nexport class Q2Checkbox implements ComponentInterface {\n /** Determine which side of the label the checkbox will render on. */\n @Prop({ reflect: true }) alignment: string;\n\n /** The state of the checkbox. This modifies the visual appearance of the element. */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n\n /**\n * Populates a description that is displayed beneath the label.\n * @localizable\n */\n @Prop({ reflect: true }) description: string;\n\n /** Disables the checkbox and prevents interaction. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true }) hasError: boolean = false;\n\n /**\n * Hide's the field's `<label>` element from view.\n *\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /**\n * Used on a parent checkbox in a checkbox group (e.g. \"Select All\") to indicate that some, but not all, checkboxes in a group are checked.\n *\n * When `true`, the \"indeterminate\" selection style is applied.\n * To apply the standard \"checked\" selection style, `checked` must be true, and `indeterminate` must be `false`.\n */\n @Prop({ reflect: true }) indeterminate: boolean;\n\n /**\n * The visible label text for the checkbox. Appears to the right of the box for 'default' and 'favorite' checkboxes, and to the left for 'toggle' checkboxes.\n * Yielded content will be adjacent to this text.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true }) label: string;\n\n /** A static string used to establish a symbolic relationship between checkboxes. */\n @Prop({ reflect: true }) name: string;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true }) readonly: boolean;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true }) slotReadonly: boolean;\n\n /** The visual style of the checkbox. This does not need to be defined for a standard checkbox. */\n @Prop({ reflect: true }) type: 'favorite' | 'toggle';\n\n /** A static reference value for the checkbox. */\n @Prop({ reflect: true }) value: string;\n\n /**\n * Used by q2-checkbox-group to disable all checkboxes in the group\n * @private\n */\n @Prop({ reflect: true }) groupDisabled: boolean;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) ariaLabel: string;\n\n @Element() hostElement: HTMLElement;\n _id: string = `checkbox-${createGuid()}`;\n inputElement: HTMLInputElement;\n\n ////////// LIFECYCLE HOOKS ////////\n\n componentWillLoad() {\n handleAriaLabel(this);\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n this.hostElement.click = () => this.inputElement.click();\n }\n\n //////// Host Element Events ////////\n @Listen('change')\n defaultChangeHandler(event: CustomEvent) {\n // We use setTimeout to give an opportunity to call preventDefault\n setTimeout(() => this.handleChangeEvent(event), 0);\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.hostElement.shadowRoot.querySelector('input').focus();\n }\n\n ////////// OBSERVERS //////////\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n ///// Event ////////\n /**\n * Emitted when the checkbox is toggled.\n * @legacyEvent\n */\n @Event() change: EventEmitter<{ value: string; checked: boolean }>;\n\n ///// Actions ////////\n onInputClick = (event: Event) => {\n event.stopPropagation();\n event.preventDefault();\n\n const isNotInteractive = this.disabled || this.readonly || this.slotReadonly;\n if (isNotInteractive) return;\n if (!(event.target instanceof HTMLInputElement)) return;\n const { value, checked } = event.target;\n\n this.change.emit({\n value,\n checked,\n });\n this.inputElement.focus();\n };\n\n handleChangeEvent(event: CustomEvent<{ checked: boolean; value: string }>) {\n if (\n this.readonly ||\n this.disabled ||\n this.hostElement.onchange ||\n event.defaultPrevented ||\n event.target !== this.hostElement ||\n !event.detail\n ) {\n return;\n }\n this.checked = event.detail.checked;\n }\n\n /////// View Methods ///////\n render() {\n const textLabelClasses = ['label-text'];\n if (this.hideLabel) textLabelClasses.push('sr');\n return (\n <div class=\"container\">\n <input\n ref={el => (this.inputElement = el)}\n aria-describedby={this.description ? 'description' : undefined}\n aria-invalid={`${this.hasError}`}\n checked={this.indeterminate || this.checked || false}\n class=\"sr\"\n disabled={!!this.disabled || !!this.groupDisabled}\n id={this._id}\n name={this.name || this._id}\n onClick={this.onInputClick}\n test-id=\"q2CheckboxInnerCheckBox\"\n type=\"checkbox\"\n value={this.value}\n />\n <label\n htmlFor={this._id}\n class=\"label-control\"\n test-id=\"checkboxButton\"\n >\n {this.generateCheckboxSVG()}\n </label>\n <div class={textLabelClasses.join(' ')}>\n <label\n test-id=\"checkboxLabel\"\n htmlFor={this._id}\n >\n {loc(this.label)}\n <slot />\n </label>\n </div>\n {this.description && (\n <div\n class=\"description-text\"\n test-id=\"checkboxDescription\"\n id=\"description\"\n >\n {loc(this.description)}\n </div>\n )}\n </div>\n );\n }\n\n generateCheckboxSVG() {\n if (this.type === 'favorite') {\n return (\n <q2-icon\n type=\"star\"\n class=\"checkbox-icon\"\n />\n );\n }\n\n if (this.type === 'toggle') {\n return this.generateToggleSVG();\n }\n\n return (\n <svg\n aria-hidden=\"true\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n class=\"checkbox-icon\"\n focusable=\"false\"\n >\n <rect\n x=\"1\"\n y=\"1\"\n width=\"18\"\n height=\"18\"\n rx=\"3\"\n />\n {(this.checked || this.indeterminate) && this.generateCheckBoxSVGFill()}\n </svg>\n );\n }\n\n generateCheckBoxSVGFill() {\n if (this.indeterminate) {\n return (\n <line\n class=\"checkbox-fill indeterminate-fill\"\n x1=\"4\"\n y1=\"10\"\n x2=\"16\"\n y2=\"10\"\n />\n );\n }\n return (\n <polyline\n class=\"checkbox-fill checked-fill\"\n points=\"5 11 8.5 14.5 15 6\"\n />\n );\n }\n\n generateToggleSVG() {\n return (\n <div class=\"toggle-svg\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 46 14\"\n class=\"toggle-track\"\n test-id=\"toggleTrack\"\n >\n <rect\n width=\"36\"\n height=\"14\"\n rx=\"7\"\n x=\"5\"\n />\n </svg>\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 30 30\"\n class=\"toggle-indicator\"\n test-id=\"toggleIndicator\"\n >\n <circle\n class=\"toggle-hover-circle\"\n width=\"20\"\n height=\"20\"\n cx=\"15\"\n cy=\"15\"\n r=\"10\"\n />\n <circle\n class=\"toggle-circle\"\n width=\"20\"\n height=\"20\"\n cx=\"15\"\n cy=\"15\"\n r=\"10\"\n />\n <line\n class=\"off checked-fill\"\n x1=\"12\"\n y1=\"18\"\n x2=\"18\"\n y2=\"12\"\n />\n <line\n class=\"off checked-fill\"\n x1=\"12\"\n y1=\"12\"\n x2=\"18\"\n y2=\"18\"\n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EventFromElement","h","loc"],"sources":["src/components/q2-checkbox/q2-checkbox.scss?tag=q2-checkbox&encapsulation=shadow","src/components/q2-checkbox/q2-checkbox.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-checkbox-padding: #{var-list(\n --tct-checkbox-padding,\n unquote('#{var-list(var-prefixer(checkbox-vertical-padding), --tct-scale-2, --app-scale-2x, 10px)} 0')\n )};\n display: block;\n position: relative;\n padding: var(--comp-checkbox-padding);\n --comp-default-checkbox-margin: #{var-list(var-prefixer(checkbox-margin-top), --app-scale-5x, 25px) 0\n var-list(var-prefixer(checkbox-margin-bottom), --app-scale-5x, 25px)};\n margin: var-list(--tct-checkbox-margin, --comp-default-checkbox-margin);\n}\n\n.container {\n --comp-checkbox-size: #{var-list(var-prefixer(checkbox-size), 20px)};\n --comp-checkbox-default-column-gap: var(--app-scale-2x, 10px);\n --comp-checkbox-default-row-gap: 0;\n --comp-checkbox-default-gap: #{var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap)};\n --comp-checkbox-tween: #{var-list(--tct-tween-1, --app-tween-1, unquote('0.2s ease'))};\n --comp-checkbox-toggle-width: #{var-list(var-prefixer(checkbox-toggle-width), 46px)};\n --comp-checkbox-gap: #{var-list(var-prefixer(checkbox-gap), --comp-checkbox-default-gap)};\n --comp-checkbox-outer-stroke-color: #{var-list(\n var-prefixer(checkbox-outer-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-outer-fill-color: #{var-list(\n var-prefixer(checkbox-outer-fill-color),\n --tct-white,\n --app-white,\n #ffffff\n )};\n --comp-checkbox-checked-color: #{var-list(\n var-prefixer(checkbox-check-stroke-color),\n --t-checkbox-fill,\n --t-a11y-active-gray-color-AA,\n #404040\n )};\n --comp-control-width: var(--comp-checkbox-size);\n --comp-checkbox-error-color: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n\n :host([type='favorite']) & {\n --comp-checkbox-favorite-stroke-color: #{var-list(\n var-prefixer(checkbox-favorite-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-favorite-fill-color: #{var-list(var-prefixer(checkbox-favorite-fill-color), #db7d24)};\n }\n\n display: grid;\n grid-template-areas:\n 'svg label'\n 'svg description';\n align-items: center;\n gap: var(--comp-checkbox-gap);\n grid-template-columns: var(--comp-control-width) calc(\n 100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)\n );\n\n :host([hide-label]:not([hide-label='false'])) & {\n grid-template-areas: 'svg';\n grid-template-columns: var(--comp-control-width);\n }\n\n :host([type='toggle']) & {\n --comp-control-width: var(--comp-checkbox-toggle-width);\n }\n\n :host([alignment='right']) &,\n :host([type='toggle']:not([alignment])) & {\n grid-template-areas:\n 'label svg'\n 'description svg';\n grid-template-columns: calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(\n --comp-control-width\n );\n }\n}\n\n.label-control {\n align-items: center;\n display: flex;\n}\n\n.label-text {\n grid-area: label;\n font-weight: var-list(var-prefixer(checkbox-label-font-weight), 400);\n\n :host([description]) & {\n font-weight: var-list(var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false'])) & {\n font-weight: var-list(var-prefixer(checkbox-checked-label-font-weight), 600);\n }\n :host(:hover) & {\n font-weight: var-list(--tct-checkbox-hover-label-font-weight, var-prefixer(checkbox-label-font-weight), 400);\n }\n :host(:focus-within) & {\n font-weight: var-list(--tct-checkbox-focused-label-font-weight, var-prefixer(checkbox-label-font-weight), 400);\n }\n :host([description]:hover) & {\n font-weight: var-list(--tct-checkbox-hover-label-font-weight, var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false']):hover) & {\n font-weight: var-list(\n --tct-checkbox-checked-hover-label-font-weight,\n var-prefixer(checkbox-checked-label-font-weight),\n 600\n );\n }\n :host([description]:focus-within) & {\n font-weight: var-list(--tct-checkbox-focused-label-font-weight, var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false']):focus-within) & {\n font-weight: var-list(\n --tct-checkbox-checked-focused-label-font-weight,\n var-prefixer(checkbox-checked-label-font-weight),\n 600\n );\n }\n}\n\n.description-text {\n grid-area: description;\n font-weight: var-list(var-prefixer(checkbox-description-font-weight), 400);\n\n :host(:hover) & {\n font-weight: var-list(\n --tct-checkbox-hover-description-font-weight,\n var-prefixer(checkbox-description-font-weight),\n 400\n );\n }\n}\n\nlabel {\n color: var-list(--tct-checkbox-label-color);\n cursor: pointer;\n hyphens: var-list(--tct-checkbox-label-hyphens, auto);\n word-break: var-list(--tct-checkbox-label-word-break, break-word);\n word-wrap: var-list(--tct-checkbox-label-word-wrap, break-word);\n}\n\n:host([disabled]:not([disabled='false'])),\n:host([group-disabled]) {\n opacity: var-list(var-prefixer(checkbox-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n\n label {\n cursor: not-allowed;\n }\n}\n\n.checkbox-icon {\n width: var(--comp-checkbox-size);\n height: var(--comp-checkbox-size);\n border-radius: var-list(\n var-prefixer(checkbox-outer-border-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 3px\n );\n stroke: var(--comp-checkbox-outer-stroke-color);\n fill: var(--comp-checkbox-outer-fill-color);\n stroke-width: var-list(var-prefixer(checkbox-outer-stroke-width), 2);\n flex-shrink: 0;\n\n :host([checked]:not([checked='false']):not([type='favorite'])) & {\n stroke: var-list(var-prefixer(checkbox-checked-outer-stroke-color), --comp-checkbox-outer-stroke-color);\n fill: var-list(var-prefixer(checkbox-checked-outer-fill-color), --comp-checkbox-outer-fill-color);\n }\n\n :host([has-error]:not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-error-outer-stroke-color, --comp-checkbox-error-color);\n fill: var-list(--tct-checkbox-error-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--tct-checkbox-error-box-shadow);\n }\n\n :host(:hover:not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-hover-outer-stroke-color, --comp-checkbox-outer-stroke-color);\n fill: var-list(--tct-checkbox-hover-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--tct-checkbox-hover-box-shadow);\n }\n :host(:hover[has-error]:not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-hover-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n fill: var-list(\n --tct-checkbox-error-hover-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-hover-box-shadow,\n --tct-checkbox-error-box-shadow,\n --tct-checkbox-hover-box-shadow\n );\n }\n\n :host(:focus-within:not([type='favorite'])) & {\n --comp-checkbox-focused-box-shadow: #{var(--const-double-focus-ring),\n var-list(--tct-global-focus, unquote('0 0 0 2px #33b4ff'))};\n\n stroke: var-list(var-prefixer(checkbox-focused-outer-stroke-color), --comp-checkbox-checked-color);\n fill: var-list(--tct-checkbox-focused-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--comp-checkbox-focused-box-shadow);\n }\n :host(:focus-within[has-error]:not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-focused-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n fill: var-list(\n --tct-checkbox-error-focused-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-focused-box-shadow,\n --tct-checkbox-error-box-shadow,\n --comp-checkbox-focused-box-shadow\n );\n }\n\n // Favorite\n :host([type='favorite']) & {\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-stroke-width), 1)};\n --tct-icon-stroke-primary: var(--comp-checkbox-favorite-stroke-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host(:hover[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n // Checked favorite\n :host([checked]:not([checked='false'])[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-stroke-color,\n --tct-checkbox-favorite-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n fill: var-list(--tct-checkbox-favorite-checked-fill-color, --comp-checkbox-favorite-fill-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:hover) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-hover-stroke-color,\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-fill-primary: #{var-list(\n --tct-checkbox-favorite-checked-fill-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-focused-stroke-color,\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([has-error][type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n :host([has-error][type='favorite'][checked]:not([checked='false'])) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n}\n\n.checkbox-fill {\n stroke: var-list(--tct-checkbox-checkmark-stroke-color, --comp-checkbox-checked-color);\n}\n\n.checked-fill {\n stroke-width: var-list(var-prefixer(checkbox-check-stroke-width), 2.5);\n stroke-linecap: round;\n stroke-linejoin: round;\n\n :host([type='toggle']) & {\n stroke: var-list(var-prefixer(checkbox-toggle-icon-stroke), --tct-white, --app-white, #ffffff);\n transition: opacity var(--comp-checkbox-tween);\n }\n :host([type='toggle'][checked]:not([checked='false'])) & {\n stroke: var-list(\n var-prefixer(checkbox-toggle-checked-icon-stroke),\n --t-checkbox-text,\n --tct-white,\n --app-white,\n #ffffff\n );\n }\n}\n\n.indeterminate-fill {\n stroke-width: var-list(var-prefixer(checkbox-indeterminate-stroke-width), 3.5);\n}\n\n.toggle-svg {\n height: 30px;\n width: var(--comp-checkbox-toggle-width);\n position: relative;\n text-align: initial;\n}\n\n.toggle-track,\n.toggle-indicator {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.toggle-track {\n fill: var-list(\n var-prefixer(checkbox-toggle-track-color),\n var-prefixer(gray-11),\n --tct-gray-l1,\n --app-gray-l1,\n #cccccc\n );\n height: 14px;\n width: 46px;\n\n :host([checked]:not([checked='false'])) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n opacity: 0.5;\n }\n :host([has-error]) & {\n fill: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n opacity: 0.5;\n }\n}\n\n.toggle-indicator {\n transition: left var(--comp-checkbox-tween);\n height: 30px;\n width: 30px;\n left: 0;\n border-radius: 50%;\n\n :host([checked]:not([checked='false'])) & {\n left: 21px;\n }\n}\n\n.toggle-circle {\n fill: var-list(var-prefixer(checkbox-toggle-circle-color), --t-a11y-gray-color-AA, #949494);\n :host([checked]:not([checked='false'])) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n }\n\n :host(:is(:not([checked]), [checked='false']):focus-within) &,\n :host(:is(:not([checked]), [checked='false']):hover) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n }\n :host([has-error]) &,\n :host([has-error]:focus-within) &,\n :host([has-error]:hover) & {\n fill: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n }\n}\n\n.toggle-hover-circle {\n stroke-width: 0;\n\n :host(:focus-within) &,\n :host(:hover) & {\n stroke: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n stroke-width: 10px;\n stroke-opacity: 0.5;\n }\n\n :host(:is(:not([checked]), [checked='false']):focus-within) &,\n :host(:is(:not([checked]), [checked='false']):hover) & {\n stroke: var-list(var-prefixer(checkbox-toggle-circle-color), --t-a11y-gray-color-AA, #949494);\n }\n :host([has-error]) &,\n :host([has-error]:focus-within) &,\n :host([has-error]:hover) & {\n stroke: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n }\n}\n\n:host([checked]:not([checked='false'])) .off,\n:host(:is(:not([checked]), [checked='false'])) .on {\n opacity: 0;\n}\n","import { Component, ComponentInterface, Prop, Element, Listen, Watch, Event, EventEmitter, h } from '@stencil/core';\nimport { createGuid, handleAriaLabel, isEventFromElement, loc, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-checkbox', shadow: true, styleUrl: 'q2-checkbox.scss' })\nexport class Q2Checkbox implements ComponentInterface {\n /** Determine which side of the label the checkbox will render on. */\n @Prop({ reflect: true }) alignment: string;\n\n /** The state of the checkbox. This modifies the visual appearance of the element. */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n\n /**\n * Populates a description that is displayed beneath the label.\n * @localizable\n */\n @Prop({ reflect: true }) description: string;\n\n /** Disables the checkbox and prevents interaction. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true }) hasError: boolean = false;\n\n /**\n * Hide's the field's `<label>` element from view.\n *\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /**\n * Used on a parent checkbox in a checkbox group (e.g. \"Select All\") to indicate that some, but not all, checkboxes in a group are checked.\n *\n * When `true`, the \"indeterminate\" selection style is applied.\n * To apply the standard \"checked\" selection style, `checked` must be true, and `indeterminate` must be `false`.\n */\n @Prop({ reflect: true }) indeterminate: boolean;\n\n /**\n * The visible label text for the checkbox. Appears to the right of the box for 'default' and 'favorite' checkboxes, and to the left for 'toggle' checkboxes.\n * Yielded content will be adjacent to this text.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true }) label: string;\n\n /** A static string used to establish a symbolic relationship between checkboxes. */\n @Prop({ reflect: true }) name: string;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true }) readonly: boolean;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true }) slotReadonly: boolean;\n\n /** The visual style of the checkbox. This does not need to be defined for a standard checkbox. */\n @Prop({ reflect: true }) type: 'favorite' | 'toggle';\n\n /** A static reference value for the checkbox. */\n @Prop({ reflect: true }) value: string;\n\n /**\n * Used by q2-checkbox-group to disable all checkboxes in the group\n * @private\n */\n @Prop({ reflect: true }) groupDisabled: boolean;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) ariaLabel: string;\n\n @Element() hostElement: HTMLElement;\n _id: string = `checkbox-${createGuid()}`;\n inputElement: HTMLInputElement;\n\n ////////// LIFECYCLE HOOKS ////////\n\n componentWillLoad() {\n handleAriaLabel(this);\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n this.hostElement.click = () => this.inputElement.click();\n }\n\n //////// Host Element Events ////////\n @Listen('change')\n defaultChangeHandler(event: CustomEvent) {\n // We use setTimeout to give an opportunity to call preventDefault\n setTimeout(() => this.handleChangeEvent(event), 0);\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.hostElement.shadowRoot.querySelector('input').focus();\n }\n\n ////////// OBSERVERS //////////\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n ///// Event ////////\n /**\n * Emitted when the checkbox is toggled.\n * @legacyEvent\n */\n @Event() change: EventEmitter<{ value: string; checked: boolean }>;\n\n ///// Actions ////////\n onInputClick = (event: Event) => {\n event.stopPropagation();\n event.preventDefault();\n\n const isNotInteractive = this.disabled || this.readonly || this.slotReadonly;\n if (isNotInteractive) return;\n if (!(event.target instanceof HTMLInputElement)) return;\n const { value, checked } = event.target;\n\n this.change.emit({\n value,\n checked,\n });\n this.inputElement.focus();\n };\n\n handleChangeEvent(event: CustomEvent<{ checked: boolean; value: string }>) {\n if (\n this.readonly ||\n this.disabled ||\n this.hostElement.onchange ||\n event.defaultPrevented ||\n event.target !== this.hostElement ||\n !event.detail\n ) {\n return;\n }\n this.checked = event.detail.checked;\n }\n\n /////// View Methods ///////\n render() {\n const textLabelClasses = ['label-text'];\n if (this.hideLabel) textLabelClasses.push('sr');\n return (\n <div class=\"container\">\n <input\n ref={el => (this.inputElement = el)}\n aria-describedby={this.description ? 'description' : undefined}\n aria-invalid={`${this.hasError}`}\n checked={this.indeterminate || this.checked || false}\n class=\"sr\"\n disabled={!!this.disabled || !!this.groupDisabled}\n id={this._id}\n name={this.name || this._id}\n onClick={this.onInputClick}\n test-id=\"q2CheckboxInnerCheckBox\"\n type=\"checkbox\"\n value={this.value}\n />\n <label\n htmlFor={this._id}\n class=\"label-control\"\n test-id=\"checkboxButton\"\n >\n {this.generateCheckboxSVG()}\n </label>\n <div class={textLabelClasses.join(' ')}>\n <label\n test-id=\"checkboxLabel\"\n htmlFor={this._id}\n >\n {loc(this.label)}\n <slot />\n </label>\n </div>\n {this.description && (\n <div\n class=\"description-text\"\n test-id=\"checkboxDescription\"\n id=\"description\"\n >\n {loc(this.description)}\n </div>\n )}\n </div>\n );\n }\n\n generateCheckboxSVG() {\n if (this.type === 'favorite') {\n return (\n <q2-icon\n type=\"star\"\n class=\"checkbox-icon\"\n />\n );\n }\n\n if (this.type === 'toggle') {\n return this.generateToggleSVG();\n }\n\n return (\n <svg\n aria-hidden=\"true\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n class=\"checkbox-icon\"\n focusable=\"false\"\n >\n <rect\n x=\"1\"\n y=\"1\"\n width=\"18\"\n height=\"18\"\n rx=\"3\"\n />\n {(this.checked || this.indeterminate) && this.generateCheckBoxSVGFill()}\n </svg>\n );\n }\n\n generateCheckBoxSVGFill() {\n if (this.indeterminate) {\n return (\n <line\n class=\"checkbox-fill indeterminate-fill\"\n x1=\"4\"\n y1=\"10\"\n x2=\"16\"\n y2=\"10\"\n />\n );\n }\n return (\n <polyline\n class=\"checkbox-fill checked-fill\"\n points=\"5 11 8.5 14.5 15 6\"\n />\n );\n }\n\n generateToggleSVG() {\n return (\n <div class=\"toggle-svg\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 46 14\"\n class=\"toggle-track\"\n test-id=\"toggleTrack\"\n >\n <rect\n width=\"36\"\n height=\"14\"\n rx=\"7\"\n x=\"5\"\n />\n </svg>\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 30 30\"\n class=\"toggle-indicator\"\n test-id=\"toggleIndicator\"\n >\n <circle\n class=\"toggle-hover-circle\"\n width=\"20\"\n height=\"20\"\n cx=\"15\"\n cy=\"15\"\n r=\"10\"\n />\n <circle\n class=\"toggle-circle\"\n width=\"20\"\n height=\"20\"\n cx=\"15\"\n cy=\"15\"\n r=\"10\"\n />\n <line\n class=\"off checked-fill\"\n x1=\"12\"\n y1=\"18\"\n x2=\"18\"\n y2=\"12\"\n />\n <line\n class=\"off checked-fill\"\n x1=\"12\"\n y1=\"12\"\n x2=\"18\"\n y2=\"18\"\n />\n <polyline\n class=\"on checked-fill\"\n points=\"11,16 14,19 18,12 14,19\"\n />\n </svg>\n </div>\n );\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-14c3693c.js');
6
6
  const index$1 = require('./index-a93362ed.js');
7
7
 
8
- const q2DataTableCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}.container{--comp-cell-padding:var(--tct-data-table-cell-padding, var(--tct-table-cell-padding, var(--app-scale-3x, 15px)));--comp-select-column-width:var(--tct-data-table-select-column-width, var(--tct-table-select-column-width, var(--tct-checkbox-size, 20px)));--comp-dropdown-column-width:var(--tct-data-table-dropdown-column-width, var(--tct-table-dropdown-column-width, var(--tct-btn-icon-width, 44px)));--comp-expandable-row-control-column-width:var(--tct-data-table-expandable-row-control-column-width, var(--tct-table-expandable-row-control-column-width, var(--tct-btn-icon-width, 44px)));overflow:auto;--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.container::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.container::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.container::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}:host([shadowed]:not([shadowed=false])) .container{box-shadow:var(--tct-data-table-shadow, var(--tct-table-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))))}:host([density=compact]) .container{--comp-cell-padding:var(--tct-data-table-cell-padding-compact, var(--tct-table-cell-padding-compact, var(--app-scale-1x, 5px)))}:host([density=comfortable]) .container{--comp-cell-padding:var(--tct-data-table-cell-padding-comfortable, var(--tct-table-cell-padding-comfortable, var(--app-scale-5x, 25px)))}table{table-layout:var(--tct-data-table-layout, var(--tct-table-layout, auto));border-collapse:collapse;border-spacing:0;width:var(--tct-data-table-width, var(--tct-table-width));min-width:100%;background:var(--tct-data-table-background, var(--tct-table-background, var(--t-base, #ffffff)));caption-side:var(--tct-data-table-caption-side, var(--tct-table-caption-side, bottom))}thead{border-width:var(--tct-data-table-header-border-width, var(--tct-table-header-border-width, 0 0 2px 0));border-style:var(--tct-data-table-header-border-style, var(--tct-table-header-border-style, solid));border-color:var(--tct-data-table-header-border-color, var(--tct-table-header-border-color, var(--t-gray-9, #999999)));background:var(--tct-data-table-header-background, var(--tct-table-header-background))}col.select-column{width:var(--comp-select-column-width)}col.expandable-row-control-column{width:var(--comp-expandable-row-control-column-width)}col.dropdown-column{width:var(--comp-dropdown-column-width)}td,th{padding:var(--comp-cell-padding);text-align:start;vertical-align:middle}td.align-end,th.align-end{text-align:end}td.align-center,th.align-center{text-align:center}td.vertical-align-top,th.vertical-align-top{vertical-align:top}td.vertical-align-bottom,th.vertical-align-bottom{vertical-align:bottom}th .header-content{font-weight:var(--tct-data-table-header-font-weight, var(--tct-table-header-font-weight, 600));font-size:var(--tct-data-table-header-font-size, var(--app-font-size, 14px))}th.sorted .header-content{font-weight:var(--tct-data-table-header-sorted-font-weight, var(--tct-table-header-sorted-font-weight, 600))}th .sorted-indicator{--comp-header-sortable-icon-size:var(--tct-data-table-header-sortable-icon-size, var(--tct-table-header-sortable-icon-size, var(--app-scale-3x, 15px)));--tct-icon-stroke-width:2;width:var(--comp-header-sortable-icon-size);height:var(--comp-header-sortable-icon-size)}th .sorted-indicator.direction-ASC{transform:rotate(180deg)}th q2-btn .header-content{display:flex;align-items:center;gap:var(--tct-data-table-header-content-gap, var(--tct-table-header-content-gap, var(--app-scale-2x, 10px)))}tr.expandable,tr.clickable{cursor:pointer}tr.expandable:focus,tr.clickable:focus{outline:none;box-shadow:none}tr.expandable:hover{background:var(--tct-data-table-expandable-row-hover-background, var(--tct-table-expandable-row-hover-background, var(--t-gray-14, #f2f2f2)))}tr.clickable:hover{background:var(--tct-data-table-clickable-row-hover-background, var(--tct-table-clickable-row-hover-background, var(--t-gray-14, #f2f2f2)))}tr.selected{background:var(--tct-data-table-selected-row-background, var(--tct-table-selected-row-background, var(--t-gray-14, #f2f2f2)))}tr.expanded{background:var(--tct-data-table-expanded-row-background, var(--tct-table-expanded-row-background, var(--t-gray-14, #f2f2f2)))}tr.expanded .toggle-expandable-row{transform:rotate(180deg)}:host([bordered]:not([bordered=false])) tbody tr{border-width:var(--tct-data-table-row-border-width, var(--tct-table-row-border-width, 0 0 1px 0));border-style:var(--tct-data-table-row-border-style, var(--tct-table-row-border-style, solid));border-color:var(--tct-data-table-row-border-color, var(--tct-table-row-border-color, var(--t-gray-9, #999999)))}tr.loading-row{background:var(--tct-data-table-loading-row-background, var(--tct-table-loading-row-background, var(--t-base, #ffffff)))}tr.loading-row td{text-align:center}tr.loading-row q2-loading{font-size:4em}tr.empty-state{background:var(--tct-data-table-loading-row-background, var(--t-base, #ffffff))}tr.empty-state td{text-align:center}tr.empty-state .empty-state-content{display:flex;flex-direction:column;align-items:center;padding-top:var(--app-scale-10x, 50px);padding-bottom:var(--app-scale-10x, 50px);gap:var(--app-scale-4x, 20px);--tct-icon-size:var(--app-scale-6x, 30px)}tr.expandable-row{background:var(--tct-data-table-expanded-row-background, var(--tct-table-expanded-row-background, var(--t-gray-14, #f2f2f2)))}td.clamped div{text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-line-clamp:var(--comp-line-clamp-count, 1);-webkit-box-orient:vertical}td.expandable-row-control-column{--tct-btn-icon-hover-bg:transparent;padding:var(--tct-data-table-expandable-row-control-column-padding, var(--tct-table-expandable-row-control-column-padding, 0 5px));text-align:center}td.dropdown-column{padding:var(--tct-data-table-dropdown-column-padding, var(--tct-table-dropdown-column-padding, 0 5px));text-align:center}td.click-column:not(.sr){padding:var(--tct-data-table-clickable-column-padding, var(--tct-table-clickable-column-padding, 0 5px));text-align:center}caption{padding:var(--tct-data-table-caption-padding, var(--tct-table-caption-padding, var(--app-scale-2x, 10px)));font-size:var(--tct-data-table-caption-font-size, var(--tct-table-caption-font-size, inherit));font-weight:var(--tct-data-table-caption-font-weight, var(--tct-table-caption-font-weight, 600));text-align:var(--tct-data-table-caption-text-align, var(--tct-table-caption-text-align, center));color:var(--tct-data-table-caption-color, var(--tct-table-caption-color, inherit))}q2-checkbox{padding:0}";
8
+ const q2DataTableCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}.container{--comp-cell-padding:var(--tct-data-table-cell-padding, var(--tct-table-cell-padding, var(--app-scale-3x, 15px)));--comp-select-column-width:var(--tct-data-table-select-column-width, var(--tct-table-select-column-width, var(--tct-checkbox-size, 20px)));--comp-dropdown-column-width:var(--tct-data-table-dropdown-column-width, var(--tct-table-dropdown-column-width, var(--tct-btn-icon-width, 44px)));--comp-expandable-row-control-column-width:var(--tct-data-table-expandable-row-control-column-width, var(--tct-table-expandable-row-control-column-width, var(--tct-btn-icon-width, 44px)));overflow:auto;--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.container::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.container::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.container::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}:host([shadowed]:not([shadowed=false])) .container{box-shadow:var(--tct-data-table-shadow, var(--tct-table-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))))}:host([density=compact]) .container{--comp-cell-padding:var(--tct-data-table-cell-padding-compact, var(--tct-table-cell-padding-compact, var(--app-scale-1x, 5px)))}:host([density=comfortable]) .container{--comp-cell-padding:var(--tct-data-table-cell-padding-comfortable, var(--tct-table-cell-padding-comfortable, var(--app-scale-5x, 25px)))}table{table-layout:var(--tct-data-table-layout, var(--tct-table-layout, auto));border-collapse:collapse;border-spacing:0;width:var(--tct-data-table-width, var(--tct-table-width));min-width:100%;background:var(--tct-data-table-background, var(--tct-table-background, var(--t-base, #ffffff)));caption-side:var(--tct-data-table-caption-side, var(--tct-table-caption-side, bottom))}thead{border-width:var(--tct-data-table-header-border-width, var(--tct-table-header-border-width, 0 0 2px 0));border-style:var(--tct-data-table-header-border-style, var(--tct-table-header-border-style, solid));border-color:var(--tct-data-table-header-border-color, var(--tct-table-header-border-color, var(--t-gray-9, #999999)));background:var(--tct-data-table-header-background, var(--tct-table-header-background))}col.select-column{width:var(--comp-select-column-width)}col.expandable-row-control-column{width:var(--comp-expandable-row-control-column-width)}col.dropdown-column{width:var(--comp-dropdown-column-width)}:host(:is([bordered=vertical],[bordered=grid])) col{border-width:var(--tct-data-table-column-border-width, 0 1px 0 0);border-style:var(--tct-data-table-column-border-style, solid);border-color:var(--tct-data-table-column-border-color, var(--t-gray-9, #999999))}:host(:is([bordered=vertical],[bordered=grid])) col:last-child{border:none}td,th{padding:var(--comp-cell-padding);text-align:start;vertical-align:middle}td.align-end,th.align-end{text-align:end}td.align-center,th.align-center{text-align:center}td.vertical-align-top,th.vertical-align-top{vertical-align:top}td.vertical-align-bottom,th.vertical-align-bottom{vertical-align:bottom}th .header-content{font-weight:var(--tct-data-table-header-font-weight, var(--tct-table-header-font-weight, 600));font-size:var(--tct-data-table-header-font-size, var(--app-font-size, 14px))}th.sorted .header-content{font-weight:var(--tct-data-table-header-sorted-font-weight, var(--tct-table-header-sorted-font-weight, 600))}th .sorted-indicator{--comp-header-sortable-icon-size:var(--tct-data-table-header-sortable-icon-size, var(--tct-table-header-sortable-icon-size, var(--app-scale-3x, 15px)));--tct-icon-stroke-width:2;width:var(--comp-header-sortable-icon-size);height:var(--comp-header-sortable-icon-size)}th .sorted-indicator.direction-ASC{transform:rotate(180deg)}th q2-btn .header-content{display:flex;align-items:center;gap:var(--tct-data-table-header-content-gap, var(--tct-table-header-content-gap, var(--app-scale-2x, 10px)))}tr.expandable,tr.clickable{cursor:pointer}tr.expandable:focus,tr.clickable:focus{outline:none;box-shadow:none}tr.striped:nth-child(even){background:var(--tct-data-table-row-even-background, var(--t-gray-14, #f2f2f2))}tr.striped:nth-child(odd){background:var(--tct-data-table-row-odd-background, transparent)}tr.expandable:hover{background:var(--tct-data-table-expandable-row-hover-background, var(--tct-table-expandable-row-hover-background, var(--t-gray-14, #f2f2f2)))}tr.clickable:hover{background:var(--tct-data-table-clickable-row-hover-background, var(--tct-table-clickable-row-hover-background, var(--t-gray-14, #f2f2f2)))}tr.selected{background:var(--tct-data-table-selected-row-background, var(--tct-table-selected-row-background, var(--t-gray-14, #f2f2f2)))}tr.expanded{background:var(--tct-data-table-expanded-row-background, var(--tct-table-expanded-row-background, var(--t-gray-14, #f2f2f2)))}tr.expanded .toggle-expandable-row{transform:rotate(180deg)}:host(:is([bordered],[bordered=horizontal],[bordered=grid]):not([bordered=vertical],[bordered=false])) tbody tr{border-width:var(--tct-data-table-row-border-width, var(--tct-table-row-border-width, 0 0 1px 0));border-style:var(--tct-data-table-row-border-style, var(--tct-table-row-border-style, solid));border-color:var(--tct-data-table-row-border-color, var(--tct-table-row-border-color, var(--t-gray-9, #999999)))}tr.loading-row{background:var(--tct-data-table-loading-row-background, var(--tct-table-loading-row-background, var(--t-base, #ffffff)))}tr.loading-row td{text-align:center}tr.loading-row q2-loading{font-size:4em}tr.empty-state{background:var(--tct-data-table-loading-row-background, var(--t-base, #ffffff))}tr.empty-state td{text-align:center}tr.empty-state .empty-state-content{display:flex;flex-direction:column;align-items:center;padding-top:var(--app-scale-10x, 50px);padding-bottom:var(--app-scale-10x, 50px);gap:var(--app-scale-4x, 20px);--tct-icon-size:var(--app-scale-6x, 30px)}tr.expandable-row{background:var(--tct-data-table-expanded-row-background, var(--tct-table-expanded-row-background, var(--t-gray-14, #f2f2f2)))}td.clamped div{text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-line-clamp:var(--comp-line-clamp-count, 1);-webkit-box-orient:vertical}td.expandable-row-control-column{--tct-btn-icon-hover-bg:transparent;padding:var(--tct-data-table-expandable-row-control-column-padding, var(--tct-table-expandable-row-control-column-padding, 0 5px));text-align:center}td.dropdown-column{padding:var(--tct-data-table-dropdown-column-padding, var(--tct-table-dropdown-column-padding, 0 5px));text-align:center}td.click-column:not(.sr){padding:var(--tct-data-table-clickable-column-padding, var(--tct-table-clickable-column-padding, 0 5px));text-align:center}caption{padding:var(--tct-data-table-caption-padding, var(--tct-table-caption-padding, var(--app-scale-2x, 10px)));font-size:var(--tct-data-table-caption-font-size, var(--tct-table-caption-font-size, inherit));font-weight:var(--tct-data-table-caption-font-weight, var(--tct-table-caption-font-weight, 600));text-align:var(--tct-data-table-caption-text-align, var(--tct-table-caption-text-align, center));color:var(--tct-data-table-caption-color, var(--tct-table-caption-color, inherit))}q2-checkbox{padding:0}";
9
9
  const Q2DataTableStyle0 = q2DataTableCss;
10
10
 
11
11
  const Q2DataTable = class {
@@ -102,6 +102,7 @@ const Q2DataTable = class {
102
102
  this.selectable = undefined;
103
103
  this.selectMode = 'multiple';
104
104
  this.shadowed = undefined;
105
+ this.striped = undefined;
105
106
  this.serializedHeaders = [];
106
107
  this.serializedRows = [];
107
108
  this.hasExpandableRows = false;
@@ -267,7 +268,7 @@ const Q2DataTable = class {
267
268
  /// DOM ///
268
269
  render() {
269
270
  const { caption } = this;
270
- return (index.h("div", { key: 'd1de84188f5da69359c6c9f04d0a6ecf8190883b', class: "container" }, index.h("table", { key: '9b8d3e02d2417c005ed2ee6e0495dec2355476b1' }, caption && index.h("caption", { key: 'b3545a27ae848672c2f0604f89d22558a59cd066', class: this.hideCaption ? 'sr' : undefined }, caption), this.renderTableColGroup(), this.renderTableHeader(), this.renderEmptyState(), this.renderTableRows())));
271
+ return (index.h("div", { key: '30e25533bb3c08e39535399938c6612722b4f058', class: "container" }, index.h("table", { key: 'c961a20fb875484f83b8023b9c5b03e95aa03427' }, caption && index.h("caption", { key: 'e4ad3f9d2c5717914794479caaae1b1961aa92b9', class: this.hideCaption ? 'sr' : undefined }, caption), this.renderTableColGroup(), this.renderTableHeader(), this.renderEmptyState(), this.renderTableRows())));
271
272
  }
272
273
  renderTableColGroup() {
273
274
  const { serializedHeaders: headers, selectable, clickable, hasExpandableRows, hasDropdowns } = this;
@@ -288,9 +289,9 @@ const Q2DataTable = class {
288
289
  headerClasses.push(`vertical-align-${verticalAlign}`);
289
290
  if (!!sorted)
290
291
  headerClasses.push('sorted');
291
- return (index.h("th", { class: headerClasses.join(' '), id: `header-${header.key}` }, header.sortable ? (index.h("q2-btn", { onClick: () => this.onSort(header), "test-id": "sort-control", disabled: this.loading }, index.h("div", { class: "header-content", "aria-label": header.ariaLabel || undefined }, header.title, !!sorted ? (index.h("q2-icon", { class: `sorted-indicator direction-${sorted}`, type: "arrow-down", label: sorted === 'ASC'
292
+ return (index.h("th", { class: headerClasses.join(' '), id: `header-${header.key}` }, header.sortable ? (index.h("q2-btn", { onClick: () => this.onSort(header), "test-id": "sort-control", disabled: this.loading }, index.h("div", { class: "header-content", "aria-label": header.ariaLabel || undefined }, index.h("slot", { name: `header-cell-${header.key}` }, header.title), !!sorted ? (index.h("q2-icon", { class: `sorted-indicator direction-${sorted}`, type: "arrow-down", label: sorted === 'ASC'
292
293
  ? index$1.loc('tecton.element.dataTable.sortedAscending')
293
- : index$1.loc('tecton.element.dataTable.sortedDescending'), "test-id": "sorted-indicator" })) : (index.h("q2-icon", { class: `sorted-indicator`, type: "sort", label: index$1.loc('tecton.element.dataTable.clickToSort'), "test-id": "sorted-indicator" }))))) : (index.h("div", { class: "header-content", "aria-label": header.ariaLabel || undefined }, header.title))));
294
+ : index$1.loc('tecton.element.dataTable.sortedDescending'), "test-id": "sorted-indicator" })) : (index.h("q2-icon", { class: `sorted-indicator`, type: "sort", label: index$1.loc('tecton.element.dataTable.clickToSort'), "test-id": "sorted-indicator" }))))) : (index.h("div", { class: "header-content", "aria-label": header.ariaLabel || undefined }, index.h("slot", { name: `header-cell-${header.key}` }, header.title)))));
294
295
  }), clickable && (index.h("th", { id: "click", class: hideClickable ? 'sr' : undefined }, index.h("span", { class: "sr" }, index$1.loc('tecton.element.dataTable.clickRow')))), hasExpandableRows && (index.h("th", { id: "toggle" }, index.h("span", { class: "sr" }, index$1.loc('tecton.element.dataTable.toggleRow')))), hasDropdowns && (index.h("th", null, index.h("span", { class: "sr" }, index$1.loc('tecton.element.dataTable.dropdown')))))));
295
296
  }
296
297
  renderEmptyState() {
@@ -300,7 +301,7 @@ const Q2DataTable = class {
300
301
  return (index.h("slot", { name: "empty-table" }, index.h("tbody", null, index.h("tr", { class: "empty-state" }, index.h("td", { colSpan: numberOfColumns }, index.h("div", { class: "empty-state-content" }, index.h("q2-icon", { type: emptyIcon }), index.h("p", null, index$1.loc(emptyMessage))))))));
301
302
  }
302
303
  renderTableRows() {
303
- const { serializedHeaders: headers, serializedRows: rows, selectable, clickable, hideClickable, selectMode, hasExpandableRows, hasDropdowns, numberOfColumns, loading, } = this;
304
+ const { serializedHeaders: headers, serializedRows: rows, selectable, clickable, striped, hideClickable, selectMode, hasExpandableRows, hasDropdowns, numberOfColumns, loading, } = this;
304
305
  if (loading) {
305
306
  return (index.h("tbody", null, index.h("tr", { class: "loading-row" }, index.h("td", { colSpan: numberOfColumns }, index.h("q2-loading", { inline: true })))));
306
307
  }
@@ -327,6 +328,8 @@ const Q2DataTable = class {
327
328
  rowClasses.push('expandable');
328
329
  if (clickable)
329
330
  rowClasses.push('clickable');
331
+ if (striped)
332
+ rowClasses.push('striped');
330
333
  if (row.expanded)
331
334
  rowClasses.push('expanded');
332
335
  if (row.selected)