q2-tecton-elements 1.55.3 → 1.55.4

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 (240) hide show
  1. package/dist/bundle-report.json +299 -299
  2. package/dist/cjs/{index-f69742cf.js → index-e0aba375.js} +1 -1
  3. package/dist/cjs/{index-f69742cf.js.map → index-e0aba375.js.map} +1 -1
  4. package/dist/cjs/q2-action-group.cjs.entry.js +1 -1
  5. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  6. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  7. package/dist/cjs/q2-badge_7.cjs.entry.js +1 -1
  8. package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
  9. package/dist/cjs/q2-carousel-pane.cjs.entry.js +2 -2
  10. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
  14. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  15. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  16. package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
  17. package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
  18. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-detail.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-example.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-form.cjs.entry.js +2 -2
  25. package/dist/cjs/q2-form.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-item_3.cjs.entry.js +2 -2
  28. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-modal.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-month-picker.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-option-list_2.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
  35. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  36. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  38. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  39. package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-select.cjs.entry.js +2 -2
  42. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  43. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  45. package/dist/collection/collection-manifest.json +6 -6
  46. package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
  47. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  48. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  49. package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
  50. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  51. package/dist/collection/components/q2-carousel/q2-carousel.js +1 -1
  52. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  53. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  54. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  55. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  56. package/dist/collection/components/q2-checkbox/q2-checkbox.css +1 -1
  57. package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
  58. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +0 -5
  59. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +1 -1
  60. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  61. package/dist/collection/components/q2-data-table/q2-data-table.js +8 -8
  62. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  63. package/dist/collection/components/q2-dropdown/q2-dropdown.js +1 -1
  64. package/dist/collection/components/q2-editable-field/q2-editable-field.js +1 -1
  65. package/dist/collection/components/q2-example/q2-example.js +1 -1
  66. package/dist/collection/components/q2-file-picker/q2-file-picker.js +5 -5
  67. package/dist/collection/components/q2-form/q2-form.css +0 -1
  68. package/dist/collection/components/q2-form/q2-form.js +1 -1
  69. package/dist/collection/components/q2-form/test/q2-form-test.e2e.js +24 -4
  70. package/dist/collection/components/q2-form/test/q2-form-test.e2e.js.map +1 -1
  71. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  72. package/dist/collection/components/q2-input/q2-input.js +2 -2
  73. package/dist/collection/components/q2-item/q2-item.js +1 -1
  74. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  75. package/dist/collection/components/q2-list/q2-list.js +1 -1
  76. package/dist/collection/components/q2-message/q2-message.js +1 -1
  77. package/dist/collection/components/q2-modal/q2-modal.js +1 -1
  78. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  79. package/dist/collection/components/q2-option-list/q2-option-list.js +7 -7
  80. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  81. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  82. package/dist/collection/components/q2-popover/q2-popover.js +1 -1
  83. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  84. package/dist/collection/components/q2-radio-group/q2-radio-group.js +1 -1
  85. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  86. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  87. package/dist/collection/components/q2-section/q2-section.js +2 -2
  88. package/dist/collection/components/q2-select/q2-select.js +2 -2
  89. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  90. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -3
  91. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  92. package/dist/components/q2-action-group2.js +1 -1
  93. package/dist/components/q2-action-sheet.js +1 -1
  94. package/dist/components/q2-avatar2.js +1 -1
  95. package/dist/components/q2-calendar.js +1 -1
  96. package/dist/components/q2-carousel-pane.js +2 -2
  97. package/dist/components/q2-carousel.js +1 -1
  98. package/dist/components/q2-chart-area.js +1 -1
  99. package/dist/components/q2-chart-bar.js +1 -1
  100. package/dist/components/q2-chart-donut.js +1 -1
  101. package/dist/components/q2-checkbox-group.js +2 -2
  102. package/dist/components/q2-checkbox-group.js.map +1 -1
  103. package/dist/components/q2-checkbox2.js +2 -2
  104. package/dist/components/q2-checkbox2.js.map +1 -1
  105. package/dist/components/q2-currency.js +1 -1
  106. package/dist/components/q2-data-table.js +1 -1
  107. package/dist/components/q2-detail.js +1 -1
  108. package/dist/components/q2-dropdown.js +1 -1
  109. package/dist/components/q2-editable-field.js +1 -1
  110. package/dist/components/q2-example.js +1 -1
  111. package/dist/components/q2-form.js +2 -2
  112. package/dist/components/q2-form.js.map +1 -1
  113. package/dist/components/q2-formatted-text.js +1 -1
  114. package/dist/components/q2-input2.js +1 -1
  115. package/dist/components/q2-item2.js +1 -1
  116. package/dist/components/q2-legend2.js +1 -1
  117. package/dist/components/q2-list2.js +1 -1
  118. package/dist/components/q2-message2.js +1 -1
  119. package/dist/components/q2-modal.js +1 -1
  120. package/dist/components/q2-month-picker.js +2 -2
  121. package/dist/components/q2-optgroup2.js +1 -1
  122. package/dist/components/q2-option-list2.js +1 -1
  123. package/dist/components/q2-pagination.js +3 -3
  124. package/dist/components/q2-pill.js +1 -1
  125. package/dist/components/q2-popover2.js +1 -1
  126. package/dist/components/q2-radio-group.js +1 -1
  127. package/dist/components/q2-radio.js +1 -1
  128. package/dist/components/q2-relative-time.js +1 -1
  129. package/dist/components/q2-resize-observer2.js +1 -1
  130. package/dist/components/q2-section.js +2 -2
  131. package/dist/components/q2-select2.js +2 -2
  132. package/dist/components/q2-stepper-pane.js +1 -1
  133. package/dist/components/q2-stepper.js +1 -1
  134. package/dist/components/q2-textarea.js +1 -1
  135. package/dist/esm/{index-3184c760.js → index-3bb7a785.js} +1 -1
  136. package/dist/esm/{index-3184c760.js.map → index-3bb7a785.js.map} +1 -1
  137. package/dist/esm/q2-action-group.entry.js +1 -1
  138. package/dist/esm/q2-action-sheet.entry.js +1 -1
  139. package/dist/esm/q2-avatar.entry.js +1 -1
  140. package/dist/esm/q2-badge_7.entry.js +1 -1
  141. package/dist/esm/q2-calendar.entry.js +2 -2
  142. package/dist/esm/q2-carousel-pane.entry.js +2 -2
  143. package/dist/esm/q2-carousel.entry.js +1 -1
  144. package/dist/esm/q2-chart-area.entry.js +1 -1
  145. package/dist/esm/q2-chart-bar.entry.js +1 -1
  146. package/dist/esm/q2-chart-donut.entry.js +1 -1
  147. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  148. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  149. package/dist/esm/q2-checkbox.entry.js +2 -2
  150. package/dist/esm/q2-checkbox.entry.js.map +1 -1
  151. package/dist/esm/q2-currency.entry.js +1 -1
  152. package/dist/esm/q2-data-table.entry.js +1 -1
  153. package/dist/esm/q2-detail.entry.js +1 -1
  154. package/dist/esm/q2-dropdown.entry.js +1 -1
  155. package/dist/esm/q2-editable-field.entry.js +1 -1
  156. package/dist/esm/q2-example.entry.js +1 -1
  157. package/dist/esm/q2-form.entry.js +2 -2
  158. package/dist/esm/q2-form.entry.js.map +1 -1
  159. package/dist/esm/q2-formatted-text.entry.js +1 -1
  160. package/dist/esm/q2-item_3.entry.js +2 -2
  161. package/dist/esm/q2-legend.entry.js +1 -1
  162. package/dist/esm/q2-message.entry.js +1 -1
  163. package/dist/esm/q2-modal.entry.js +1 -1
  164. package/dist/esm/q2-month-picker.entry.js +2 -2
  165. package/dist/esm/q2-optgroup.entry.js +1 -1
  166. package/dist/esm/q2-option-list_2.entry.js +2 -2
  167. package/dist/esm/q2-pagination.entry.js +3 -3
  168. package/dist/esm/q2-pill.entry.js +1 -1
  169. package/dist/esm/q2-radio-group.entry.js +1 -1
  170. package/dist/esm/q2-radio.entry.js +1 -1
  171. package/dist/esm/q2-relative-time.entry.js +2 -2
  172. package/dist/esm/q2-resize-observer.entry.js +1 -1
  173. package/dist/esm/q2-section.entry.js +2 -2
  174. package/dist/esm/q2-select.entry.js +2 -2
  175. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  176. package/dist/esm/q2-stepper.entry.js +1 -1
  177. package/dist/esm/q2-textarea.entry.js +1 -1
  178. package/dist/q2-tecton-elements/{index-3184c760.js → index-3bb7a785.js} +1 -1
  179. package/dist/q2-tecton-elements/q2-action-group.entry.js +3 -3
  180. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +62 -62
  181. package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
  182. package/dist/q2-tecton-elements/q2-badge_7.entry.js +2 -2
  183. package/dist/q2-tecton-elements/q2-calendar.entry.js +3 -3
  184. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +3 -3
  185. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  186. package/dist/q2-tecton-elements/q2-chart-area.entry.js +2 -2
  187. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +79 -79
  188. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +100 -100
  189. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +11 -11
  190. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -1
  191. package/dist/q2-tecton-elements/q2-checkbox.entry.js +8 -8
  192. package/dist/q2-tecton-elements/q2-checkbox.entry.js.map +1 -1
  193. package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
  194. package/dist/q2-tecton-elements/q2-data-table.entry.js +3 -3
  195. package/dist/q2-tecton-elements/q2-detail.entry.js +3 -3
  196. package/dist/q2-tecton-elements/q2-dropdown.entry.js +5 -5
  197. package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
  198. package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
  199. package/dist/q2-tecton-elements/q2-form.entry.js +10 -10
  200. package/dist/q2-tecton-elements/q2-form.entry.js.map +1 -1
  201. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  202. package/dist/q2-tecton-elements/q2-item_3.entry.js +21 -21
  203. package/dist/q2-tecton-elements/q2-legend.entry.js +5 -5
  204. package/dist/q2-tecton-elements/q2-message.entry.js +5 -5
  205. package/dist/q2-tecton-elements/q2-modal.entry.js +17 -17
  206. package/dist/q2-tecton-elements/q2-month-picker.entry.js +30 -30
  207. package/dist/q2-tecton-elements/q2-optgroup.entry.js +4 -4
  208. package/dist/q2-tecton-elements/q2-option-list_2.entry.js +7 -7
  209. package/dist/q2-tecton-elements/q2-pagination.entry.js +33 -33
  210. package/dist/q2-tecton-elements/q2-pill.entry.js +13 -13
  211. package/dist/q2-tecton-elements/q2-radio-group.entry.js +33 -33
  212. package/dist/q2-tecton-elements/q2-radio.entry.js +8 -8
  213. package/dist/q2-tecton-elements/q2-relative-time.entry.js +2 -2
  214. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
  215. package/dist/q2-tecton-elements/q2-section.entry.js +11 -11
  216. package/dist/q2-tecton-elements/q2-select.entry.js +5 -5
  217. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +11 -11
  218. package/dist/q2-tecton-elements/q2-stepper.entry.js +20 -20
  219. package/dist/q2-tecton-elements/q2-textarea.entry.js +2 -2
  220. package/dist/types/components/q2-action-group/q2-action-group.d.ts +0 -1
  221. package/dist/types/components/q2-loading/skeleton/shapes.d.ts +0 -1
  222. package/dist/types/components/q2-optgroup/q2-optgroup.d.ts +1 -1
  223. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +2 -2
  224. package/package.json +3 -4
  225. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +0 -60
  226. package/dist/types/components/q2-calendar/q2-calendar.d.ts +0 -327
  227. package/dist/types/components/q2-carousel/q2-carousel.d.ts +0 -95
  228. package/dist/types/components/q2-data-table/q2-data-table.d.ts +0 -261
  229. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +0 -181
  230. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +0 -140
  231. package/dist/types/components/q2-option-list/q2-option-list.d.ts +0 -100
  232. package/dist/types/components/q2-pagination/q2-pagination.d.ts +0 -117
  233. package/dist/types/components/q2-pill/q2-pill.d.ts +0 -143
  234. package/dist/types/components/q2-select/q2-select.d.ts +0 -238
  235. package/dist/types/components/q2-stepper/q2-stepper.d.ts +0 -61
  236. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +0 -68
  237. package/dist/types/components/q2-tag/q2-tag.d.ts +0 -91
  238. package/dist/types/utils/action-sheet.d.ts +0 -12
  239. /package/dist/q2-tecton-elements/{index-3184c760.js.map → index-3bb7a785.js.map} +0 -0
  240. /package/dist/types/{builds/q2e/development/tecton/tecton → Users/kvanhouten/Documents/Work/tecton_extra}/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["q2CheckboxGroupCss","Q2CheckboxGroupStyle0","Q2CheckboxGroup","this","_id","createGuid","onInnerCheckboxChange","event","stopImmediatePropagation","groupValue","setTimeout","checkboxElements","forEach","check","value","checked","change","emit","onMutationObserved","updateValue","updateDisabled","updateReadonly","disconnectedCallback","mutationObserver","disconnect","componentWillLoad","componentDidLoad","observer","MutationObserver","observe","hostElement","childList","subtree","onHostElementChange","target","onchange","detail","setValue","values","valuesSet","Set","Array","isArray","has","click","disabledObserver","readonlyObserver","valueObserver","from","querySelectorAll","inputId","protectedValue","inputDom","h","class","groupDisabled","disabled","checkbox","slotReadonly","readonly","hasOwnProperty","render","showLabel","label","optional","showLabelRow","hideLabel","hasError","Fragment","key","renderLabel","type","onChange","undefined"],"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@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 display: block;\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-checkbox-group-fieldset-padding, 0);\n margin: 0;\n border: 0;\n position: relative;\n}\n\n.label-row {\n display: grid;\n grid-template-columns: 1fr 24px;\n grid-template-areas: 'label icon';\n column-gap: var(--tct-checkbox-group-label-column-gap, var(--app-scale-2x, 10px));\n\n q2-icon {\n grid-area: icon;\n margin-top: -2px;\n margin-bottom: -2px;\n }\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.slot-container {\n margin: var(--app-scale-1x, 5px) 0;\n padding: var(--app-scale-1x, 5px);\n border-width: 1px;\n border-color: transparent;\n border-style: solid;\n border-radius: var-list(--tct-checkbox-group-border-radius, --app-border-radius-1, 4px);\n\n :host([has-error]) & {\n border-color: var-list(--tct-checkbox-group-error-border-color, --const-stoplight-alert, #d20a0a);\n }\n :host([has-error='false']) & {\n border-color: transparent;\n }\n}\n\n.optional-tag {\n margin-left: var-list(--tct-checkbox-group-label-optional-margin-left, --app-scale-1x, 5px);\n color: var-list(\n var-prefixer(checkbox-group-label-optional-color),\n var-prefixer(a11y-color),\n var-prefixer(a11y-gray-color),\n var-prefixer(gray-7),\n var-prefixer(gray-d1),\n --app-gray-d1,\n rgba(77, 77, 77, 0.77)\n );\n font-size: var(--tct-checkbox-group-label-optional-font-size, 12px);\n font-weight: var(--tct-checkbox-group-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 Fragment,\n} from '@stencil/core';\nimport { createGuid, renderLabel } from 'src/utils';\n\n@Component({ tag: 'q2-checkbox-group', shadow: true, styleUrl: 'q2-checkbox-group.scss' })\nexport class Q2CheckboxGroup implements ComponentInterface {\n // #region Own Properties\n\n _id: string = `checkbox-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Determines if all checkboxes in the group are put into a `disabled` state. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true })\n 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 })\n hideLabel: boolean;\n\n /**\n * The label that displays above all the checkboxes.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /** Determines if the component is marked as `optional`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /** Determines if all the checkboxes are marked as `readonly`. */\n @Prop({ reflect: true })\n 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 })\n value: object;\n\n // #endregion\n // #region Events\n\n @Event()\n change: EventEmitter;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n }\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 // #endregion\n // #region Listeners\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 // #endregion\n // #region Public Methods API\n\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 // #endregion\n // #region Watchers\n\n @Watch('disabled')\n disabledObserver() {\n this.updateDisabled();\n }\n\n @Watch('readonly')\n readonlyObserver() {\n this.updateReadonly();\n }\n\n @Watch('value')\n valueObserver() {\n this.updateValue();\n }\n\n // #endregion\n // #region Local Methods\n\n get checkboxElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-checkbox')) as HTMLQ2CheckboxElement[];\n }\n\n get inputId() {\n return this._id;\n }\n\n get protectedValue(): object {\n return this.value || {};\n }\n\n inputDom() {\n return (\n <div class=\"slot-container\">\n <slot />\n </div>\n );\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 onMutationObserved = () => {\n this.updateValue();\n this.updateDisabled();\n this.updateReadonly();\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 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 // #endregion\n // #region Render Methods\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n const showLabelRow = (showLabel && !this.hideLabel) || this.hasError;\n return (\n <Fragment>\n {showLabelRow && (\n <div class=\"label-row\">\n {showLabel && !this.hideLabel && <div class=\"group-legend\">{renderLabel(this)}</div>}\n {this.hasError && (\n <q2-icon\n type=\"error\"\n test-id=\"iconError\"\n ></q2-icon>\n )}\n </div>\n )}\n <fieldset\n onChange={this.onInnerCheckboxChange}\n aria-invalid={this.hasError ? `${this.hasError}` : undefined}\n >\n {showLabel && <legend class=\"sr-only\">{renderLabel(this)}</legend>}\n {this.inputDom()}\n </fieldset>\n </Fragment>\n );\n }\n\n // #endregion\n}\n"],"mappings":";;;;AAAA,MAAMA,IAAqB;;AAC3B,MAAAC,IAAeD;;MCeFE,IAAe;;;;;QAGxBC,KAAAC,MAAc,kBAAkBC;IA4JhCF,KAAAG,wBAAyBC;MACrBA,EAAMC;MACN,MAAMC,IAAa;MACnBC,YAAW;QACPP,KAAKQ,iBAAiBC,SAAQC;UAC1BJ,EAAWI,EAAMC,WAAWD,EAAME;AAAO;QAE7CZ,KAAKa,OAAOC,KAAKR;AAAW,UAC7B;AAAE;IAGTN,KAAAe,qBAAqB;MACjBf,KAAKgB;MACLhB,KAAKiB;MACLjB,KAAKkB;AAAgB;;;;;;;;;;;EAnGzB,oBAAAC;IACI,IAAInB,KAAKoB,kBAAkB;MACvBpB,KAAKoB,iBAAiBC;MACtBrB,KAAKoB,mBAAmB;;;EAIhC,iBAAAE;IACItB,KAAKkB;;EAGT,gBAAAK;IACI,MAAMC,IAAW,IAAIC,iBAAiBzB,KAAKe;IAC3CS,EAASE,QAAQ1B,KAAK2B,aAAa;MAAEC,WAAW;MAAMC,SAAS;;IAC/D7B,KAAKoB,mBAAmBI;IACxBxB,KAAKe;;;;EAOT,mBAAAe,CAAoB1B;IAChB,IAAIA,EAAM2B,WAAW/B,KAAK2B,gBAAgB3B,KAAK2B,YAAYK,UAAU;MACjEhC,KAAKW,QAAQP,EAAM6B;;;;;;;;;;EAa3B,QAAAC,CAASC;IACL,MAAMC,IAAY,IAAIC,IAAIC,MAAMC,QAAQJ,KAAUA,IAAS,EAACA;IAC5DnC,KAAKQ,iBAAiBC,SAAQC;MAC1B,IAAI0B,EAAUI,IAAI9B,EAAMC,QAAQD,EAAM+B;AAAO;;;;EAQrD,gBAAAC;IACI1C,KAAKiB;;EAIT,gBAAA0B;IACI3C,KAAKkB;;EAIT,aAAA0B;IACI5C,KAAKgB;;;;EAMT,oBAAIR;IACA,OAAO8B,MAAMO,KAAK7C,KAAK2B,YAAYmB,iBAAiB;;EAGxD,WAAIC;IACA,OAAO/C,KAAKC;;EAGhB,kBAAI+C;IACA,OAAOhD,KAAKW,SAAS;;EAGzB,QAAAsC;IACI,OACIC,EAAA;MAAKC,OAAM;OACPD,EAAA;;EAsBZ,cAAAjC;IACI,MAAMmC,IAAgBpD,KAAKqD;IAC3BrD,KAAKQ,iBAAiBC,SAAQ6C;MAC1BA,EAASF,gBAAgBA;AAAa;;EAI9C,cAAAlC;IACI,MAAMqC,IAAevD,KAAKwD;IAC1BxD,KAAKQ,iBAAiBC,SAAQ6C;MAC1BA,EAASC,eAAeA;AAAY;;EAI5C,WAAAvC;IACI,IAAIhB,KAAKwD,UAAU;IACnBxD,KAAKQ,iBAAiBC,SAAQC;MAC1B,IAAIV,KAAKgD,eAAeS,eAAe/C,EAAMC,QAAQ;QACjDD,EAAME,UAAUZ,KAAKW,MAAMD,EAAMC;;;;;;EAQ7C,MAAA+C;IACI,MAAMC,IAAY3D,KAAK4D,SAAS5D,KAAK6D,YAAY7D,KAAKwD;IACtD,MAAMM,IAAgBH,MAAc3D,KAAK+D,aAAc/D,KAAKgE;IAC5D,OACId,EAACe,GAAQ;MAAAC,KAAA;OACJJ,KACGZ,EAAA;MAAAgB,KAAA;MAAKf,OAAM;OACNQ,MAAc3D,KAAK+D,aAAab,EAAA;MAAAgB,KAAA;MAAKf,OAAM;OAAgBgB,EAAYnE,QACvEA,KAAKgE,YACFd,EAAA;MAAAgB,KAAA;MACIE,MAAK;MAAO,WACJ;SAKxBlB,EAAA;MAAAgB,KAAA;MACIG,UAAUrE,KAAKG;MAAqB,gBACtBH,KAAKgE,WAAW,GAAGhE,KAAKgE,aAAaM;OAElDX,KAAaT,EAAA;MAAAgB,KAAA;MAAQf,OAAM;OAAWgB,EAAYnE,QAClDA,KAAKiD"}
1
+ {"version":3,"names":["q2CheckboxGroupCss","Q2CheckboxGroupStyle0","Q2CheckboxGroup","this","_id","createGuid","onInnerCheckboxChange","event","stopImmediatePropagation","groupValue","setTimeout","checkboxElements","forEach","check","value","checked","change","emit","onMutationObserved","updateValue","updateDisabled","updateReadonly","disconnectedCallback","mutationObserver","disconnect","componentWillLoad","componentDidLoad","observer","MutationObserver","observe","hostElement","childList","subtree","onHostElementChange","target","onchange","detail","setValue","values","valuesSet","Set","Array","isArray","has","click","disabledObserver","readonlyObserver","valueObserver","from","querySelectorAll","inputId","protectedValue","inputDom","h","class","groupDisabled","disabled","checkbox","slotReadonly","readonly","hasOwnProperty","render","showLabel","label","optional","showLabelRow","hideLabel","hasError","Fragment","key","renderLabel","type","onChange","undefined"],"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@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 display: block;\n margin: var-list(--tct-checkbox-group-margin, --comp-default-checkbox-group-margin);\n}\n\nfieldset {\n padding: var(--tct-checkbox-group-fieldset-padding, 0);\n margin: 0;\n border: 0;\n position: relative;\n}\n\n.label-row {\n display: grid;\n grid-template-columns: 1fr 24px;\n grid-template-areas: 'label icon';\n column-gap: var(--tct-checkbox-group-label-column-gap, var(--app-scale-2x, 10px));\n\n q2-icon {\n grid-area: icon;\n margin-top: -2px;\n margin-bottom: -2px;\n }\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.slot-container {\n margin: var(--app-scale-1x, 5px) 0;\n padding: var(--app-scale-1x, 5px);\n border-width: 1px;\n border-color: transparent;\n border-style: solid;\n border-radius: var-list(--tct-checkbox-group-border-radius, --app-border-radius-1, 4px);\n\n :host([has-error]) & {\n border-color: var-list(--tct-checkbox-group-error-border-color, --const-stoplight-alert, #d20a0a);\n }\n :host([has-error='false']) & {\n border-color: transparent;\n }\n}\n\n.optional-tag {\n margin-left: var-list(--tct-checkbox-group-label-optional-margin-left, --app-scale-1x, 5px);\n color: var-list(\n var-prefixer(checkbox-group-label-optional-color),\n var-prefixer(a11y-color),\n var-prefixer(a11y-gray-color),\n var-prefixer(gray-7),\n var-prefixer(gray-d1),\n --app-gray-d1,\n rgba(77, 77, 77, 0.77)\n );\n font-size: var(--tct-checkbox-group-label-optional-font-size, 12px);\n font-weight: var(--tct-checkbox-group-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 Fragment,\n} from '@stencil/core';\nimport { createGuid, renderLabel } from 'src/utils';\n\n@Component({ tag: 'q2-checkbox-group', shadow: true, styleUrl: 'q2-checkbox-group.scss' })\nexport class Q2CheckboxGroup implements ComponentInterface {\n // #region Own Properties\n\n _id: string = `checkbox-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Determines if all checkboxes in the group are put into a `disabled` state. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true })\n 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 })\n hideLabel: boolean;\n\n /**\n * The label that displays above all the checkboxes.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /** Determines if the component is marked as `optional`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /** Determines if all the checkboxes are marked as `readonly`. */\n @Prop({ reflect: true })\n 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 })\n value: object;\n\n // #endregion\n // #region Events\n\n @Event()\n change: EventEmitter;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n }\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 // #endregion\n // #region Listeners\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 // #endregion\n // #region Public Methods API\n\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 // #endregion\n // #region Watchers\n\n @Watch('disabled')\n disabledObserver() {\n this.updateDisabled();\n }\n\n @Watch('readonly')\n readonlyObserver() {\n this.updateReadonly();\n }\n\n @Watch('value')\n valueObserver() {\n this.updateValue();\n }\n\n // #endregion\n // #region Local Methods\n\n get checkboxElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-checkbox')) as HTMLQ2CheckboxElement[];\n }\n\n get inputId() {\n return this._id;\n }\n\n get protectedValue(): object {\n return this.value || {};\n }\n\n inputDom() {\n return (\n <div class=\"slot-container\">\n <slot />\n </div>\n );\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 onMutationObserved = () => {\n this.updateValue();\n this.updateDisabled();\n this.updateReadonly();\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 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 // #endregion\n // #region Render Methods\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n const showLabelRow = (showLabel && !this.hideLabel) || this.hasError;\n return (\n <Fragment>\n {showLabelRow && (\n <div class=\"label-row\">\n {showLabel && !this.hideLabel && <div class=\"group-legend\">{renderLabel(this)}</div>}\n {this.hasError && (\n <q2-icon\n type=\"error\"\n test-id=\"iconError\"\n ></q2-icon>\n )}\n </div>\n )}\n <fieldset\n onChange={this.onInnerCheckboxChange}\n aria-invalid={this.hasError ? `${this.hasError}` : undefined}\n >\n {showLabel && <legend class=\"sr-only\">{renderLabel(this)}</legend>}\n {this.inputDom()}\n </fieldset>\n </Fragment>\n );\n }\n\n // #endregion\n}\n"],"mappings":";;;;AAAA,MAAMA,IAAqB;;AAC3B,MAAAC,IAAeD;;MCeFE,IAAe;;;;;QAGxBC,KAAAC,MAAc,kBAAkBC;IA4JhCF,KAAAG,wBAAyBC;MACrBA,EAAMC;MACN,MAAMC,IAAa;MACnBC,YAAW;QACPP,KAAKQ,iBAAiBC,SAAQC;UAC1BJ,EAAWI,EAAMC,WAAWD,EAAME;AAAO;QAE7CZ,KAAKa,OAAOC,KAAKR;AAAW,UAC7B;AAAE;IAGTN,KAAAe,qBAAqB;MACjBf,KAAKgB;MACLhB,KAAKiB;MACLjB,KAAKkB;AAAgB;;;;;;;;;;;EAnGzB,oBAAAC;IACI,IAAInB,KAAKoB,kBAAkB;MACvBpB,KAAKoB,iBAAiBC;MACtBrB,KAAKoB,mBAAmB;;;EAIhC,iBAAAE;IACItB,KAAKkB;;EAGT,gBAAAK;IACI,MAAMC,IAAW,IAAIC,iBAAiBzB,KAAKe;IAC3CS,EAASE,QAAQ1B,KAAK2B,aAAa;MAAEC,WAAW;MAAMC,SAAS;;IAC/D7B,KAAKoB,mBAAmBI;IACxBxB,KAAKe;;;;EAOT,mBAAAe,CAAoB1B;IAChB,IAAIA,EAAM2B,WAAW/B,KAAK2B,gBAAgB3B,KAAK2B,YAAYK,UAAU;MACjEhC,KAAKW,QAAQP,EAAM6B;;;;;;;;;;EAa3B,QAAAC,CAASC;IACL,MAAMC,IAAY,IAAIC,IAAIC,MAAMC,QAAQJ,KAAUA,IAAS,EAACA;IAC5DnC,KAAKQ,iBAAiBC,SAAQC;MAC1B,IAAI0B,EAAUI,IAAI9B,EAAMC,QAAQD,EAAM+B;AAAO;;;;EAQrD,gBAAAC;IACI1C,KAAKiB;;EAIT,gBAAA0B;IACI3C,KAAKkB;;EAIT,aAAA0B;IACI5C,KAAKgB;;;;EAMT,oBAAIR;IACA,OAAO8B,MAAMO,KAAK7C,KAAK2B,YAAYmB,iBAAiB;;EAGxD,WAAIC;IACA,OAAO/C,KAAKC;;EAGhB,kBAAI+C;IACA,OAAOhD,KAAKW,SAAS;;EAGzB,QAAAsC;IACI,OACIC,EAAA;MAAKC,OAAM;OACPD,EAAA;;EAsBZ,cAAAjC;IACI,MAAMmC,IAAgBpD,KAAKqD;IAC3BrD,KAAKQ,iBAAiBC,SAAQ6C;MAC1BA,EAASF,gBAAgBA;AAAa;;EAI9C,cAAAlC;IACI,MAAMqC,IAAevD,KAAKwD;IAC1BxD,KAAKQ,iBAAiBC,SAAQ6C;MAC1BA,EAASC,eAAeA;AAAY;;EAI5C,WAAAvC;IACI,IAAIhB,KAAKwD,UAAU;IACnBxD,KAAKQ,iBAAiBC,SAAQC;MAC1B,IAAIV,KAAKgD,eAAeS,eAAe/C,EAAMC,QAAQ;QACjDD,EAAME,UAAUZ,KAAKW,MAAMD,EAAMC;;;;;;EAQ7C,MAAA+C;IACI,MAAMC,IAAY3D,KAAK4D,SAAS5D,KAAK6D,YAAY7D,KAAKwD;IACtD,MAAMM,IAAgBH,MAAc3D,KAAK+D,aAAc/D,KAAKgE;IAC5D,OACId,EAACe,GAAQ;MAAAC,KAAA;OACJJ,KACGZ,EAAA;MAAAgB,KAAA;MAAKf,OAAM;OACNQ,MAAc3D,KAAK+D,aAAab,EAAA;MAAAgB,KAAA;MAAKf,OAAM;OAAgBgB,EAAYnE,QACvEA,KAAKgE,YACFd,EAAA;MAAAgB,KAAA;MACIE,MAAK;MAAO,WACJ;SAKxBlB,EAAA;MAAAgB,KAAA;MACIG,UAAUrE,KAAKG;MAAqB,gBACtBH,KAAKgE,WAAW,GAAGhE,KAAKgE,aAAaM;OAElDX,KAAaT,EAAA;MAAAgB,KAAA;MAAQf,OAAM;OAAWgB,EAAYnE,QAClDA,KAAKiD"}
@@ -2,7 +2,7 @@ import { r as e, c as o, h as t, g as c } from "./index-7a5365e2.js";
2
2
 
3
3
  import { c as r, a, o as i, i as s, l } from "./index-f2a66217.js";
4
4
 
5
- const h = '*{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, 38px));--comp-checkbox-toggle-error-color:var(--tct-checkbox-toggle-error-color, var(--comp-checkbox-error-color));--comp-checkbox-toggle-color:var(--tct-checkbox-toggle-color, var(--t-gray-8, #808080));--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)}.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, 4px))));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));stroke-width:var(--tct-checkbox-check-stroke-width, var(--t-checkbox-check-stroke-width, 2.5));stroke-linecap:round;stroke-linejoin:round}.indeterminate-fill{stroke-width:var(--tct-checkbox-indeterminate-stroke-width, var(--t-checkbox-indeterminate-stroke-width, 3.5))}.toggle-svg-container{height:30px;width:var(--comp-checkbox-toggle-width);position:relative;text-align:initial}.toggle-indicator,.toggle-track{position:absolute;top:50%;transform:translateY(-50%)}.toggle-indicator{transition:left var(--comp-checkbox-tween), height var(--comp-checkbox-tween), width var(--comp-checkbox-tween);height:16px;width:16px;left:4px;border-radius:50%}.toggle-track{height:24px;width:38px;fill:transparent;border-radius:var(--app-border-radius-3, 12px);box-shadow:inset 0 0 0 1px var(--comp-checkbox-toggle-color);transition:fill var(--comp-checkbox-tween), box-shadow var(--comp-checkbox-tween)}.toggle-circle{mask:url(#xMask);fill:var(--comp-checkbox-toggle-color);transition:fill var(--comp-checkbox-tween)}.toggle-icon{stroke-linecap:round;stroke-linejoin:round;stroke-width:var(--tct-checkbox-toggle-icon-stroke-width, 2);stroke:black}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{box-shadow:inset 0 0 0 2px var(--comp-checkbox-toggle-color)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-indicator,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-indicator{height:18px;width:18px}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-circle,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-circle{fill:var(--tct-checkbox-toggle-hover-circle-color, var(--t-primary-d1, var(--t-gray-6, #4d4d4d)))}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-circle{fill:var(--tct-checkbox-toggle-active-color, var(--t-primary-l1, #7755af))}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])) .toggle-track{box-shadow:inset 0 0 0 1px var(--comp-checkbox-toggle-error-color)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])) .toggle-circle{fill:var(--comp-checkbox-toggle-error-color)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{box-shadow:inset 0 0 0 2px var(--comp-checkbox-toggle-error-color)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-circle,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-circle{fill:var(--tct-checkbox-toggle-error-hover-color, var(--comp-checkbox-toggle-error-color))}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-circle{fill:var(--tct-checkbox-toggle-error-active-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-track-color, var(--t-primary, #6a4a9e));border:none}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) .toggle-indicator{left:18px}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) .toggle-circle{mask:url(#checkMask);fill:var(--tct-checkbox-toggle-checked-circle-color, var(--t-base, #ffffff))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{fill:var(--tct-checkbox-toggle-checked-hover-track-color, var(--t-primary-d1, #5f438e))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-indicator,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-indicator{height:18px;width:18px}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-track{fill:var(--tct-checkbox-toggle-checked-active-track-color, var(--t-primary-l1, #7755af))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-indicator{height:18px;width:18px}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-track-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-hover-track-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-active-track-color, var(--comp-checkbox-toggle-error-color))}:host(:is([disabled]:not([disabled=false]),[group-disabled]:not([group-disabled=false]))){cursor:not-allowed;opacity:var(--tct-checkbox-disabled-opacity, var(--t-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}:host(:is([disabled]:not([disabled=false]),[group-disabled]:not([group-disabled=false]))) label{cursor:not-allowed}';
5
+ const h = '*{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, 0px)) 0 var(--tct-checkbox-margin-bottom, var(--t-checkbox-margin-bottom, 0px));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, 38px));--comp-checkbox-toggle-error-color:var(--tct-checkbox-toggle-error-color, var(--comp-checkbox-error-color));--comp-checkbox-toggle-color:var(--tct-checkbox-toggle-color, var(--t-gray-8, #808080));--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)}.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, 4px))));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));stroke-width:var(--tct-checkbox-check-stroke-width, var(--t-checkbox-check-stroke-width, 2.5));stroke-linecap:round;stroke-linejoin:round}.indeterminate-fill{stroke-width:var(--tct-checkbox-indeterminate-stroke-width, var(--t-checkbox-indeterminate-stroke-width, 3.5))}.toggle-svg-container{height:30px;width:var(--comp-checkbox-toggle-width);position:relative;text-align:initial}.toggle-indicator,.toggle-track{position:absolute;top:50%;transform:translateY(-50%)}.toggle-indicator{transition:left var(--comp-checkbox-tween), height var(--comp-checkbox-tween), width var(--comp-checkbox-tween);height:16px;width:16px;left:4px;border-radius:50%}.toggle-track{height:24px;width:38px;fill:transparent;border-radius:var(--app-border-radius-3, 12px);box-shadow:inset 0 0 0 1px var(--comp-checkbox-toggle-color);transition:fill var(--comp-checkbox-tween), box-shadow var(--comp-checkbox-tween)}.toggle-circle{mask:url(#xMask);fill:var(--comp-checkbox-toggle-color);transition:fill var(--comp-checkbox-tween)}.toggle-icon{stroke-linecap:round;stroke-linejoin:round;stroke-width:var(--tct-checkbox-toggle-icon-stroke-width, 2);stroke:black}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{box-shadow:inset 0 0 0 2px var(--comp-checkbox-toggle-color)}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-indicator,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-indicator{height:18px;width:18px}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-circle,:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-circle{fill:var(--tct-checkbox-toggle-hover-circle-color, var(--t-primary-d1, var(--t-gray-6, #4d4d4d)))}:host(:is(:not([checked]),[checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-circle{fill:var(--tct-checkbox-toggle-active-color, var(--t-primary-l1, #7755af))}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])) .toggle-track{box-shadow:inset 0 0 0 1px var(--comp-checkbox-toggle-error-color)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])) .toggle-circle{fill:var(--comp-checkbox-toggle-error-color)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{box-shadow:inset 0 0 0 2px var(--comp-checkbox-toggle-error-color)}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-circle,:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-circle{fill:var(--tct-checkbox-toggle-error-hover-color, var(--comp-checkbox-toggle-error-color))}:host(:is(:not([checked]),[checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-circle{fill:var(--tct-checkbox-toggle-error-active-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-track-color, var(--t-primary, #6a4a9e));border:none}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) .toggle-indicator{left:18px}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) .toggle-circle{mask:url(#checkMask);fill:var(--tct-checkbox-toggle-checked-circle-color, var(--t-base, #ffffff))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{fill:var(--tct-checkbox-toggle-checked-hover-track-color, var(--t-primary-d1, #5f438e))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-indicator,:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-indicator{height:18px;width:18px}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-track{fill:var(--tct-checkbox-toggle-checked-active-track-color, var(--t-primary-l1, #7755af))}:host([checked]:not([checked=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-indicator{height:18px;width:18px}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-track-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :hover .toggle-track,:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :focus-within .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-hover-track-color, var(--comp-checkbox-toggle-error-color))}:host([checked]:not([checked=false])):host([has-error]:not([has-error=false])):host(:is(:not([disabled]),[disabled=false]):is(:not([group-disabled]),[group-disabled=false])) :active .toggle-track{fill:var(--tct-checkbox-toggle-checked-error-active-track-color, var(--comp-checkbox-toggle-error-color))}:host(:is([disabled]:not([disabled=false]),[group-disabled]:not([group-disabled=false]))){cursor:not-allowed;opacity:var(--tct-checkbox-disabled-opacity, var(--t-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}:host(:is([disabled]:not([disabled=false]),[group-disabled]:not([group-disabled=false]))) label{cursor:not-allowed}';
6
6
 
7
7
  const d = h;
8
8
 
@@ -174,10 +174,10 @@ const b = class {
174
174
  const e = [ "label-text" ];
175
175
  if (this.hideLabel) e.push("sr");
176
176
  return t("div", {
177
- key: "8cb9c126a850022c4e4305cbc62eaf036b41fc85",
177
+ key: "579eccd325b8fb5b2336adb011aea200f8217b86",
178
178
  class: "container"
179
179
  }, t("input", {
180
- key: "3c7bc46662dfc50ce3da872ac082930018c6c1f0",
180
+ key: "1c87398cb9da8136dec2b0103941f848b3e9ef5e",
181
181
  ref: e => this.inputElement = e,
182
182
  "aria-describedby": this.description ? "description" : undefined,
183
183
  "aria-invalid": this.hasError === undefined ? undefined : `${this.hasError}`,
@@ -191,21 +191,21 @@ const b = class {
191
191
  type: "checkbox",
192
192
  value: this.value
193
193
  }), t("label", {
194
- key: "7e79d168122d18aa644bfae0f63b5556a5c1f4cf",
194
+ key: "c24b63f7f594fa7601c0c3b9a942bb4e85186cfb",
195
195
  htmlFor: this._id,
196
196
  class: "label-control",
197
197
  "test-id": "checkboxButton"
198
198
  }, this.renderCheckboxSVG()), t("div", {
199
- key: "f0fb5ebd65dfd865a6a2874b223a1104b5dd38df",
199
+ key: "b3d173fb63c8b7075769b42fa641fd4bc0bda63c",
200
200
  class: e.join(" ")
201
201
  }, t("label", {
202
- key: "e9451e5975f6e6be66c395ec2bd45bc8aa3e3407",
202
+ key: "6ab46bdd8f6e858a6066fbf11b410509d04f1d00",
203
203
  "test-id": "checkboxLabel",
204
204
  htmlFor: this._id
205
205
  }, l(this.label), t("slot", {
206
- key: "4f7d5eeaba7c621d0863cf18a45499eb692b1f9d"
206
+ key: "4f812dbe26b6148955d34763c62938427b6a0a70"
207
207
  }))), this.description && t("div", {
208
- key: "644d733eaaed63f83147e102735b08f7e50d6457",
208
+ key: "0ebd507482912f71edad0042a30a7582b040444e",
209
209
  class: "description-text",
210
210
  "test-id": "checkboxDescription",
211
211
  id: "description"
@@ -1 +1 @@
1
- {"version":3,"names":["q2CheckboxCss","Q2CheckboxStyle0","Q2Checkbox","this","_id","createGuid","onInputClick","event","stopPropagation","preventDefault","isNotInteractive","disabled","readonly","slotReadonly","target","HTMLInputElement","value","checked","change","emit","inputElement","focus","componentWillLoad","handleAriaLabel","componentDidLoad","overrideFocus","hostElement","click","defaultChangeHandler","setTimeout","handleChangeEvent","delegateFocus","isEventFromElement","shadowRoot","querySelector","ariaLabelObserver","onchange","defaultPrevented","detail","renderCheckboxSVG","type","h","class","renderToggleSVG","width","height","viewBox","focusable","x","y","rx","indeterminate","renderCheckBoxSVGFill","x1","y1","x2","y2","points","id","fill","cx","cy","r","mask","render","textLabelClasses","hideLabel","push","key","ref","el","description","undefined","hasError","groupDisabled","name","onClick","htmlFor","join","loc","label"],"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), 38px)};\n --comp-checkbox-toggle-error-color: #{var-list(--tct-checkbox-toggle-error-color, --comp-checkbox-error-color)};\n --comp-checkbox-toggle-color: #{var-list(--tct-checkbox-toggle-color, --t-gray-8, #808080)};\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.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 4px\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 stroke-width: var-list(var-prefixer(checkbox-check-stroke-width), 2.5);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.indeterminate-fill {\n stroke-width: var-list(var-prefixer(checkbox-indeterminate-stroke-width), 3.5);\n}\n\n.toggle-svg-container {\n height: 30px;\n width: var(--comp-checkbox-toggle-width);\n position: relative;\n text-align: initial;\n}\n\n.toggle-indicator,\n.toggle-track {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n.toggle-indicator {\n transition:\n left var(--comp-checkbox-tween),\n height var(--comp-checkbox-tween),\n width var(--comp-checkbox-tween);\n height: 16px;\n width: 16px;\n left: 4px;\n border-radius: 50%;\n}\n\n.toggle-track {\n height: 24px;\n width: 38px;\n fill: transparent;\n border-radius: var(--app-border-radius-3, 12px);\n box-shadow: inset 0 0 0 1px var(--comp-checkbox-toggle-color);\n transition:\n fill var(--comp-checkbox-tween),\n box-shadow var(--comp-checkbox-tween);\n}\n\n.toggle-circle {\n mask: url(#xMask);\n fill: var(--comp-checkbox-toggle-color);\n transition: fill var(--comp-checkbox-tween);\n}\n\n.toggle-icon {\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: var(--tct-checkbox-toggle-icon-stroke-width, 2);\n stroke: black;\n}\n\n:host(:is(:not([checked]), [checked='false'])) {\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n box-shadow: inset 0 0 0 2px var(--comp-checkbox-toggle-color);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-hover-circle-color, --t-primary-d1, --t-gray-6, #4d4d4d);\n }\n }\n :active {\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-active-color, --t-primary-l1, #7755af);\n }\n }\n }\n\n &:host([has-error]:not([has-error='false'])) {\n .toggle-track {\n box-shadow: inset 0 0 0 1px var(--comp-checkbox-toggle-error-color);\n }\n .toggle-circle {\n fill: var(--comp-checkbox-toggle-error-color);\n }\n\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n box-shadow: inset 0 0 0 2px var(--comp-checkbox-toggle-error-color);\n }\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-error-hover-color, --comp-checkbox-toggle-error-color);\n }\n }\n :active {\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-error-active-color, --comp-checkbox-toggle-error-color);\n }\n }\n }\n }\n}\n\n:host([checked]:not([checked='false'])) {\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-track-color, --t-primary, #6a4a9e);\n border: none;\n }\n .toggle-indicator {\n left: 18px;\n }\n .toggle-circle {\n mask: url(#checkMask);\n fill: var-list(--tct-checkbox-toggle-checked-circle-color, --t-base, #ffffff);\n }\n\n :hover,\n :focus-within {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-hover-track-color, --t-primary-d1, #5f438e);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n }\n\n :active {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-active-track-color, --t-primary-l1, #7755af);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n }\n }\n\n &:host([has-error]:not([has-error='false'])) {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-error-track-color, --comp-checkbox-toggle-error-color);\n }\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n fill: var-list(\n --tct-checkbox-toggle-checked-error-hover-track-color,\n --comp-checkbox-toggle-error-color\n );\n }\n }\n\n :active {\n .toggle-track {\n fill: var-list(\n --tct-checkbox-toggle-checked-error-active-track-color,\n --comp-checkbox-toggle-error-color\n );\n }\n }\n }\n }\n}\n\n:host(:is([disabled]:not([disabled='false']), [group-disabled]:not([group-disabled='false']))) {\n cursor: not-allowed;\n opacity: var-list(var-prefixer(checkbox-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n label {\n cursor: not-allowed;\n }\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 // #region Own Properties\n\n _id: string = `checkbox-${createGuid()}`;\n inputElement: HTMLInputElement;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Determine which side of the label the checkbox will render on. */\n @Prop({ reflect: true })\n alignment: string;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** The state of the checkbox. This modifies the visual appearance of the element. */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /**\n * Populates a description that is displayed beneath the label.\n * @localizable\n */\n @Prop({ reflect: true })\n description: string;\n\n /** Disables the checkbox and prevents interaction. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * Used by q2-checkbox-group to disable all checkboxes in the group\n * @private\n */\n @Prop({ reflect: true })\n groupDisabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true })\n 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 })\n 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 })\n 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 })\n label: string;\n\n /** A static string used to establish a symbolic relationship between checkboxes. */\n @Prop({ reflect: true })\n name: string;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true })\n 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 })\n type: 'favorite' | 'toggle';\n\n /** A static reference value for the checkbox. */\n @Prop({ reflect: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the checkbox is toggled.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string; checked: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\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 // #endregion\n // #region Listeners\n\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 // #endregion\n // #region Watchers\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n // #endregion\n // #region Local Methods\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 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 // #endregion\n // #region Render Methods\n\n renderCheckboxSVG() {\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.renderToggleSVG();\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.renderCheckBoxSVGFill()}\n </svg>\n );\n }\n\n renderCheckBoxSVGFill() {\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 renderToggleSVG() {\n return (\n <div class=\"toggle-svg-container\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 38 24\"\n class=\"toggle-track\"\n test-id=\"toggleTrack\"\n >\n <defs>\n {/* Mask for the X icon */}\n <mask id=\"xMask\">\n <rect\n width=\"18\"\n height=\"18\"\n fill=\"white\"\n />\n <line\n class=\"toggle-icon\"\n x1=\"6.5\"\n y1=\"6.5\"\n x2=\"11.5\"\n y2=\"11.5\"\n />\n <line\n class=\"toggle-icon\"\n x1=\"6.5\"\n y1=\"11.5\"\n x2=\"11.5\"\n y2=\"6.5\"\n />\n </mask>\n\n {/* Mask for the checkmark icon */}\n <mask id=\"checkMask\">\n <rect\n width=\"18\"\n height=\"18\"\n fill=\"white\"\n />\n <polyline\n class=\"toggle-icon\"\n points=\"6,8.5 8.5,11 12.5,6.5\"\n fill=\"none\"\n />\n </mask>\n </defs>\n <rect\n width=\"38\"\n height=\"24\"\n rx=\"12\"\n />\n </svg>\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 18 18\"\n class=\"toggle-indicator\"\n test-id=\"toggleIndicator\"\n >\n <circle\n class=\"toggle-circle\"\n cx=\"9\"\n cy=\"9\"\n r=\"9\"\n mask=\"url(#xMask)\"\n />\n </svg>\n </div>\n );\n }\n\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 === undefined ? undefined : `${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.renderCheckboxSVG()}\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 // #endregion\n}\n"],"mappings":";;;;AAAA,MAAMA,IAAgB;;AACtB,MAAAC,IAAeD;;MCGFE,IAAU;;;;;QAGnBC,KAAAC,MAAc,YAAYC;IA0J1BF,KAAAG,eAAgBC;MACZA,EAAMC;MACND,EAAME;MAEN,MAAMC,IAAmBP,KAAKQ,YAAYR,KAAKS,YAAYT,KAAKU;MAChE,IAAIH,GAAkB;MACtB,MAAMH,EAAMO,kBAAkBC,mBAAmB;MACjD,OAAMC,OAAEA,GAAKC,SAAEA,KAAYV,EAAMO;MAEjCX,KAAKe,OAAOC,KAAK;QACbH;QACAC;;MAEJd,KAAKiB,aAAaC;AAAO;;;mBAjJV;;;;oBAsBC;;;;;;;;;;;;EA6DpB,iBAAAC;IACIC,EAAgBpB;;EAGpB,gBAAAqB;IACIC,EAActB,KAAKuB;IACnBvB,KAAKuB,YAAYC,QAAQ,MAAMxB,KAAKiB,aAAaO;;;;EAOrD,oBAAAC,CAAqBrB;;IAEjBsB,YAAW,MAAM1B,KAAK2B,kBAAkBvB,KAAQ;;EAIpD,aAAAwB,CAAcxB;IACV,KAAKyB,EAAmBzB,GAAOJ,KAAKuB,cAAc;IAClDvB,KAAKuB,YAAYO,WAAWC,cAAc,SAASb;;;;EAOvD,iBAAAc;IACIZ,EAAgBpB;;;;EAMpB,iBAAA2B,CAAkBvB;IACd,IACIJ,KAAKS,YACLT,KAAKQ,YACLR,KAAKuB,YAAYU,YACjB7B,EAAM8B,oBACN9B,EAAMO,WAAWX,KAAKuB,gBACrBnB,EAAM+B,QACT;MACE;;IAEJnC,KAAKc,UAAUV,EAAM+B,OAAOrB;;;;EAsBhC,iBAAAsB;IACI,IAAIpC,KAAKqC,SAAS,YAAY;MAC1B,OACIC,EAAA;QACID,MAAK;QACLE,OAAM;;;IAKlB,IAAIvC,KAAKqC,SAAS,UAAU;MACxB,OAAOrC,KAAKwC;;IAGhB,OACIF,EAAA;MAAA,eACgB;MACZG,OAAM;MACNC,QAAO;MACPC,SAAQ;MACRJ,OAAM;MACNK,WAAU;OAEVN,EAAA;MACIO,GAAE;MACFC,GAAE;MACFL,OAAM;MACNC,QAAO;MACPK,IAAG;SAEL/C,KAAKc,WAAWd,KAAKgD,kBAAkBhD,KAAKiD;;EAK1D,qBAAAA;IACI,IAAIjD,KAAKgD,eAAe;MACpB,OACIV,EAAA;QACIC,OAAM;QACNW,IAAG;QACHC,IAAG;QACHC,IAAG;QACHC,IAAG;;;IAIf,OACIf,EAAA;MACIC,OAAM;MACNe,QAAO;;;EAKnB,eAAAd;IACI,OACIF,EAAA;MAAKC,OAAM;OACPD,EAAA;MAAA,eACgB;MACZM,WAAU;MACVD,SAAQ;MACRJ,OAAM;MAAc,WACZ;OAERD,EAAA,cAEIA,EAAA;MAAMiB,IAAG;OACLjB,EAAA;MACIG,OAAM;MACNC,QAAO;MACPc,MAAK;QAETlB,EAAA;MACIC,OAAM;MACNW,IAAG;MACHC,IAAG;MACHC,IAAG;MACHC,IAAG;QAEPf,EAAA;MACIC,OAAM;MACNW,IAAG;MACHC,IAAG;MACHC,IAAG;MACHC,IAAG;SAKXf,EAAA;MAAMiB,IAAG;OACLjB,EAAA;MACIG,OAAM;MACNC,QAAO;MACPc,MAAK;QAETlB,EAAA;MACIC,OAAM;MACNe,QAAO;MACPE,MAAK;UAIjBlB,EAAA;MACIG,OAAM;MACNC,QAAO;MACPK,IAAG;SAGXT,EAAA;MAAA,eACgB;MACZM,WAAU;MACVD,SAAQ;MACRJ,OAAM;MAAkB,WAChB;OAERD,EAAA;MACIC,OAAM;MACNkB,IAAG;MACHC,IAAG;MACHC,GAAE;MACFC,MAAK;;;EAOzB,MAAAC;IACI,MAAMC,IAAmB,EAAC;IAC1B,IAAI9D,KAAK+D,WAAWD,EAAiBE,KAAK;IAC1C,OACI1B,EAAA;MAAA2B,KAAA;MAAK1B,OAAM;OACPD,EAAA;MAAA2B,KAAA;MACIC,KAAKC,KAAOnE,KAAKiB,eAAekD;MAAG,oBACjBnE,KAAKoE,cAAc,gBAAgBC;MAAS,gBAChDrE,KAAKsE,aAAaD,YAAYA,YAAY,GAAGrE,KAAKsE;MAChExD,SAASd,KAAKgD,iBAAiBhD,KAAKc,WAAW;MAC/CyB,OAAM;MACN/B,YAAYR,KAAKQ,cAAcR,KAAKuE;MACpChB,IAAIvD,KAAKC;MACTuE,MAAMxE,KAAKwE,QAAQxE,KAAKC;MACxBwE,SAASzE,KAAKG;MAAY,WAClB;MACRkC,MAAK;MACLxB,OAAOb,KAAKa;QAEhByB,EAAA;MAAA2B,KAAA;MACIS,SAAS1E,KAAKC;MACdsC,OAAM;MAAe,WACb;OAEPvC,KAAKoC,sBAEVE,EAAA;MAAA2B,KAAA;MAAK1B,OAAOuB,EAAiBa,KAAK;OAC9BrC,EAAA;MAAA2B,KAAA;MAAA,WACY;MACRS,SAAS1E,KAAKC;OAEb2E,EAAI5E,KAAK6E,QACVvC,EAAA;MAAA2B,KAAA;UAGPjE,KAAKoE,eACF9B,EAAA;MAAA2B,KAAA;MACI1B,OAAM;MAAkB,WAChB;MACRgB,IAAG;OAEFqB,EAAI5E,KAAKoE"}
1
+ {"version":3,"names":["q2CheckboxCss","Q2CheckboxStyle0","Q2Checkbox","this","_id","createGuid","onInputClick","event","stopPropagation","preventDefault","isNotInteractive","disabled","readonly","slotReadonly","target","HTMLInputElement","value","checked","change","emit","inputElement","focus","componentWillLoad","handleAriaLabel","componentDidLoad","overrideFocus","hostElement","click","defaultChangeHandler","setTimeout","handleChangeEvent","delegateFocus","isEventFromElement","shadowRoot","querySelector","ariaLabelObserver","onchange","defaultPrevented","detail","renderCheckboxSVG","type","h","class","renderToggleSVG","width","height","viewBox","focusable","x","y","rx","indeterminate","renderCheckBoxSVGFill","x1","y1","x2","y2","points","id","fill","cx","cy","r","mask","render","textLabelClasses","hideLabel","push","key","ref","el","description","undefined","hasError","groupDisabled","name","onClick","htmlFor","join","loc","label"],"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), 0px) 0\n var-list(var-prefixer(checkbox-margin-bottom), 0px)};\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), 38px)};\n --comp-checkbox-toggle-error-color: #{var-list(--tct-checkbox-toggle-error-color, --comp-checkbox-error-color)};\n --comp-checkbox-toggle-color: #{var-list(--tct-checkbox-toggle-color, --t-gray-8, #808080)};\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.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 4px\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 stroke-width: var-list(var-prefixer(checkbox-check-stroke-width), 2.5);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.indeterminate-fill {\n stroke-width: var-list(var-prefixer(checkbox-indeterminate-stroke-width), 3.5);\n}\n\n.toggle-svg-container {\n height: 30px;\n width: var(--comp-checkbox-toggle-width);\n position: relative;\n text-align: initial;\n}\n\n.toggle-indicator,\n.toggle-track {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n.toggle-indicator {\n transition:\n left var(--comp-checkbox-tween),\n height var(--comp-checkbox-tween),\n width var(--comp-checkbox-tween);\n height: 16px;\n width: 16px;\n left: 4px;\n border-radius: 50%;\n}\n\n.toggle-track {\n height: 24px;\n width: 38px;\n fill: transparent;\n border-radius: var(--app-border-radius-3, 12px);\n box-shadow: inset 0 0 0 1px var(--comp-checkbox-toggle-color);\n transition:\n fill var(--comp-checkbox-tween),\n box-shadow var(--comp-checkbox-tween);\n}\n\n.toggle-circle {\n mask: url(#xMask);\n fill: var(--comp-checkbox-toggle-color);\n transition: fill var(--comp-checkbox-tween);\n}\n\n.toggle-icon {\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: var(--tct-checkbox-toggle-icon-stroke-width, 2);\n stroke: black;\n}\n\n:host(:is(:not([checked]), [checked='false'])) {\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n box-shadow: inset 0 0 0 2px var(--comp-checkbox-toggle-color);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-hover-circle-color, --t-primary-d1, --t-gray-6, #4d4d4d);\n }\n }\n :active {\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-active-color, --t-primary-l1, #7755af);\n }\n }\n }\n\n &:host([has-error]:not([has-error='false'])) {\n .toggle-track {\n box-shadow: inset 0 0 0 1px var(--comp-checkbox-toggle-error-color);\n }\n .toggle-circle {\n fill: var(--comp-checkbox-toggle-error-color);\n }\n\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n box-shadow: inset 0 0 0 2px var(--comp-checkbox-toggle-error-color);\n }\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-error-hover-color, --comp-checkbox-toggle-error-color);\n }\n }\n :active {\n .toggle-circle {\n fill: var-list(--tct-checkbox-toggle-error-active-color, --comp-checkbox-toggle-error-color);\n }\n }\n }\n }\n}\n\n:host([checked]:not([checked='false'])) {\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-track-color, --t-primary, #6a4a9e);\n border: none;\n }\n .toggle-indicator {\n left: 18px;\n }\n .toggle-circle {\n mask: url(#checkMask);\n fill: var-list(--tct-checkbox-toggle-checked-circle-color, --t-base, #ffffff);\n }\n\n :hover,\n :focus-within {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-hover-track-color, --t-primary-d1, #5f438e);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n }\n\n :active {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-active-track-color, --t-primary-l1, #7755af);\n }\n .toggle-indicator {\n height: 18px;\n width: 18px;\n }\n }\n }\n\n &:host([has-error]:not([has-error='false'])) {\n .toggle-track {\n fill: var-list(--tct-checkbox-toggle-checked-error-track-color, --comp-checkbox-toggle-error-color);\n }\n &:host(:is(:not([disabled]), [disabled='false']):is(:not([group-disabled]), [group-disabled='false'])) {\n :hover,\n :focus-within {\n .toggle-track {\n fill: var-list(\n --tct-checkbox-toggle-checked-error-hover-track-color,\n --comp-checkbox-toggle-error-color\n );\n }\n }\n\n :active {\n .toggle-track {\n fill: var-list(\n --tct-checkbox-toggle-checked-error-active-track-color,\n --comp-checkbox-toggle-error-color\n );\n }\n }\n }\n }\n}\n\n:host(:is([disabled]:not([disabled='false']), [group-disabled]:not([group-disabled='false']))) {\n cursor: not-allowed;\n opacity: var-list(var-prefixer(checkbox-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n label {\n cursor: not-allowed;\n }\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 // #region Own Properties\n\n _id: string = `checkbox-${createGuid()}`;\n inputElement: HTMLInputElement;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Determine which side of the label the checkbox will render on. */\n @Prop({ reflect: true })\n alignment: string;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** The state of the checkbox. This modifies the visual appearance of the element. */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /**\n * Populates a description that is displayed beneath the label.\n * @localizable\n */\n @Prop({ reflect: true })\n description: string;\n\n /** Disables the checkbox and prevents interaction. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * Used by q2-checkbox-group to disable all checkboxes in the group\n * @private\n */\n @Prop({ reflect: true })\n groupDisabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true })\n 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 })\n 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 })\n 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 })\n label: string;\n\n /** A static string used to establish a symbolic relationship between checkboxes. */\n @Prop({ reflect: true })\n name: string;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true })\n 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 })\n type: 'favorite' | 'toggle';\n\n /** A static reference value for the checkbox. */\n @Prop({ reflect: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the checkbox is toggled.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string; checked: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\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 // #endregion\n // #region Listeners\n\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 // #endregion\n // #region Watchers\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n // #endregion\n // #region Local Methods\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 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 // #endregion\n // #region Render Methods\n\n renderCheckboxSVG() {\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.renderToggleSVG();\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.renderCheckBoxSVGFill()}\n </svg>\n );\n }\n\n renderCheckBoxSVGFill() {\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 renderToggleSVG() {\n return (\n <div class=\"toggle-svg-container\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 38 24\"\n class=\"toggle-track\"\n test-id=\"toggleTrack\"\n >\n <defs>\n {/* Mask for the X icon */}\n <mask id=\"xMask\">\n <rect\n width=\"18\"\n height=\"18\"\n fill=\"white\"\n />\n <line\n class=\"toggle-icon\"\n x1=\"6.5\"\n y1=\"6.5\"\n x2=\"11.5\"\n y2=\"11.5\"\n />\n <line\n class=\"toggle-icon\"\n x1=\"6.5\"\n y1=\"11.5\"\n x2=\"11.5\"\n y2=\"6.5\"\n />\n </mask>\n\n {/* Mask for the checkmark icon */}\n <mask id=\"checkMask\">\n <rect\n width=\"18\"\n height=\"18\"\n fill=\"white\"\n />\n <polyline\n class=\"toggle-icon\"\n points=\"6,8.5 8.5,11 12.5,6.5\"\n fill=\"none\"\n />\n </mask>\n </defs>\n <rect\n width=\"38\"\n height=\"24\"\n rx=\"12\"\n />\n </svg>\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 18 18\"\n class=\"toggle-indicator\"\n test-id=\"toggleIndicator\"\n >\n <circle\n class=\"toggle-circle\"\n cx=\"9\"\n cy=\"9\"\n r=\"9\"\n mask=\"url(#xMask)\"\n />\n </svg>\n </div>\n );\n }\n\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 === undefined ? undefined : `${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.renderCheckboxSVG()}\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 // #endregion\n}\n"],"mappings":";;;;AAAA,MAAMA,IAAgB;;AACtB,MAAAC,IAAeD;;MCGFE,IAAU;;;;;QAGnBC,KAAAC,MAAc,YAAYC;IA0J1BF,KAAAG,eAAgBC;MACZA,EAAMC;MACND,EAAME;MAEN,MAAMC,IAAmBP,KAAKQ,YAAYR,KAAKS,YAAYT,KAAKU;MAChE,IAAIH,GAAkB;MACtB,MAAMH,EAAMO,kBAAkBC,mBAAmB;MACjD,OAAMC,OAAEA,GAAKC,SAAEA,KAAYV,EAAMO;MAEjCX,KAAKe,OAAOC,KAAK;QACbH;QACAC;;MAEJd,KAAKiB,aAAaC;AAAO;;;mBAjJV;;;;oBAsBC;;;;;;;;;;;;EA6DpB,iBAAAC;IACIC,EAAgBpB;;EAGpB,gBAAAqB;IACIC,EAActB,KAAKuB;IACnBvB,KAAKuB,YAAYC,QAAQ,MAAMxB,KAAKiB,aAAaO;;;;EAOrD,oBAAAC,CAAqBrB;;IAEjBsB,YAAW,MAAM1B,KAAK2B,kBAAkBvB,KAAQ;;EAIpD,aAAAwB,CAAcxB;IACV,KAAKyB,EAAmBzB,GAAOJ,KAAKuB,cAAc;IAClDvB,KAAKuB,YAAYO,WAAWC,cAAc,SAASb;;;;EAOvD,iBAAAc;IACIZ,EAAgBpB;;;;EAMpB,iBAAA2B,CAAkBvB;IACd,IACIJ,KAAKS,YACLT,KAAKQ,YACLR,KAAKuB,YAAYU,YACjB7B,EAAM8B,oBACN9B,EAAMO,WAAWX,KAAKuB,gBACrBnB,EAAM+B,QACT;MACE;;IAEJnC,KAAKc,UAAUV,EAAM+B,OAAOrB;;;;EAsBhC,iBAAAsB;IACI,IAAIpC,KAAKqC,SAAS,YAAY;MAC1B,OACIC,EAAA;QACID,MAAK;QACLE,OAAM;;;IAKlB,IAAIvC,KAAKqC,SAAS,UAAU;MACxB,OAAOrC,KAAKwC;;IAGhB,OACIF,EAAA;MAAA,eACgB;MACZG,OAAM;MACNC,QAAO;MACPC,SAAQ;MACRJ,OAAM;MACNK,WAAU;OAEVN,EAAA;MACIO,GAAE;MACFC,GAAE;MACFL,OAAM;MACNC,QAAO;MACPK,IAAG;SAEL/C,KAAKc,WAAWd,KAAKgD,kBAAkBhD,KAAKiD;;EAK1D,qBAAAA;IACI,IAAIjD,KAAKgD,eAAe;MACpB,OACIV,EAAA;QACIC,OAAM;QACNW,IAAG;QACHC,IAAG;QACHC,IAAG;QACHC,IAAG;;;IAIf,OACIf,EAAA;MACIC,OAAM;MACNe,QAAO;;;EAKnB,eAAAd;IACI,OACIF,EAAA;MAAKC,OAAM;OACPD,EAAA;MAAA,eACgB;MACZM,WAAU;MACVD,SAAQ;MACRJ,OAAM;MAAc,WACZ;OAERD,EAAA,cAEIA,EAAA;MAAMiB,IAAG;OACLjB,EAAA;MACIG,OAAM;MACNC,QAAO;MACPc,MAAK;QAETlB,EAAA;MACIC,OAAM;MACNW,IAAG;MACHC,IAAG;MACHC,IAAG;MACHC,IAAG;QAEPf,EAAA;MACIC,OAAM;MACNW,IAAG;MACHC,IAAG;MACHC,IAAG;MACHC,IAAG;SAKXf,EAAA;MAAMiB,IAAG;OACLjB,EAAA;MACIG,OAAM;MACNC,QAAO;MACPc,MAAK;QAETlB,EAAA;MACIC,OAAM;MACNe,QAAO;MACPE,MAAK;UAIjBlB,EAAA;MACIG,OAAM;MACNC,QAAO;MACPK,IAAG;SAGXT,EAAA;MAAA,eACgB;MACZM,WAAU;MACVD,SAAQ;MACRJ,OAAM;MAAkB,WAChB;OAERD,EAAA;MACIC,OAAM;MACNkB,IAAG;MACHC,IAAG;MACHC,GAAE;MACFC,MAAK;;;EAOzB,MAAAC;IACI,MAAMC,IAAmB,EAAC;IAC1B,IAAI9D,KAAK+D,WAAWD,EAAiBE,KAAK;IAC1C,OACI1B,EAAA;MAAA2B,KAAA;MAAK1B,OAAM;OACPD,EAAA;MAAA2B,KAAA;MACIC,KAAKC,KAAOnE,KAAKiB,eAAekD;MAAG,oBACjBnE,KAAKoE,cAAc,gBAAgBC;MAAS,gBAChDrE,KAAKsE,aAAaD,YAAYA,YAAY,GAAGrE,KAAKsE;MAChExD,SAASd,KAAKgD,iBAAiBhD,KAAKc,WAAW;MAC/CyB,OAAM;MACN/B,YAAYR,KAAKQ,cAAcR,KAAKuE;MACpChB,IAAIvD,KAAKC;MACTuE,MAAMxE,KAAKwE,QAAQxE,KAAKC;MACxBwE,SAASzE,KAAKG;MAAY,WAClB;MACRkC,MAAK;MACLxB,OAAOb,KAAKa;QAEhByB,EAAA;MAAA2B,KAAA;MACIS,SAAS1E,KAAKC;MACdsC,OAAM;MAAe,WACb;OAEPvC,KAAKoC,sBAEVE,EAAA;MAAA2B,KAAA;MAAK1B,OAAOuB,EAAiBa,KAAK;OAC9BrC,EAAA;MAAA2B,KAAA;MAAA,WACY;MACRS,SAAS1E,KAAKC;OAEb2E,EAAI5E,KAAK6E,QACVvC,EAAA;MAAA2B,KAAA;UAGPjE,KAAKoE,eACF9B,EAAA;MAAA2B,KAAA;MACI1B,OAAM;MAAkB,WAChB;MACRgB,IAAG;OAEFqB,EAAI5E,KAAKoE"}
@@ -113,22 +113,22 @@ const i = class {
113
113
  render() {
114
114
  const {hasPlusMinusSign: r, plusMinusSign: e, currencyIsFront: s, currencySymbol: n, shouldSuperscriptSymbol: i, amountCore: c, fraction: o, shouldSuperscriptFraction: a, readableCurrency: u, currencyClasses: l} = this;
115
115
  return t("div", {
116
- key: "85d715e4a420d06562d2d64f389ea0a5929cdc98",
116
+ key: "3efe0672f5e20e09261851b05679fda20b3be205",
117
117
  "test-id": "q2CurrencyInner",
118
118
  class: l,
119
119
  "aria-label": u
120
120
  }, r && t("span", {
121
- key: "ee6691d5e476d0f3d7285ecf8b5f251a6a6e417b"
121
+ key: "9d07a91d9b59f912027745546da3ee5ad0202e11"
122
122
  }, e), s && t("span", {
123
- key: "ed8e2a1bea42bfd3e3d218dd5831ef15ceb75502",
123
+ key: "be29f84ea601303e04c8c4d61b78ce5254c2063d",
124
124
  class: i ? "superscript" : ""
125
125
  }, n), t("span", {
126
- key: "f9aa62f179a5d9c67b154df4f28113d4993a3ec3"
126
+ key: "d070e4cfb634fd69f72ed0e65b6adf613747782a"
127
127
  }, c), t("span", {
128
- key: "9049169b8d30ff721ba251a13c63c599dc9491aa",
128
+ key: "d55e59a3bae3481985ccd6d5e62789f602aa3f65",
129
129
  class: a ? "superscript" : ""
130
130
  }, o), !s && t("span", {
131
- key: "e1cd352956a793cb4626d9f8f72b3ca759a471e6",
131
+ key: "1c8ad290f748e6cd14833b045fdf2745a03d9024",
132
132
  class: i ? "superscript" : ""
133
133
  }, n));
134
134
  }
@@ -342,12 +342,12 @@ const i = class {
342
342
  render() {
343
343
  const {caption: t} = this;
344
344
  return a("div", {
345
- key: "3b83513a749562f7d9787103e4bad96b281da690",
345
+ key: "0911fc154c13f520e6d010a772d4542c5aca33ff",
346
346
  class: "container"
347
347
  }, a("table", {
348
- key: "61142600c24e4dba06d9bcf06a0abdc5e424997c"
348
+ key: "9b4590da3d87804d7d5a28d676322dc0d8deb643"
349
349
  }, t && a("caption", {
350
- key: "db2048dcbd52e6f2bc892634be354d2fe8fc4560",
350
+ key: "00be6497e4123cdecab0dd0635b0f6212e3fe995",
351
351
  class: this.hideCaption ? "sr" : undefined
352
352
  }, t), this.renderTableColGroup(), this.renderTableHeader(), this.renderEmptyState(), this.renderTableRows()));
353
353
  }
@@ -103,16 +103,16 @@ const n = class {
103
103
  // #region Render Methods
104
104
  render() {
105
105
  return e("div", {
106
- key: "5266648e705eff434fd3f70992e4131b465093a1",
106
+ key: "99cdf14ddfd4e5aabb5abb21d2e6b57130ccdf4d",
107
107
  class: this.detailClasses
108
108
  }, this.hasLabel && e("div", {
109
- key: "8790254081b4a51a2e71ffd0342f5946b0d49bfe",
109
+ key: "a4c4b1100a49ecd259b71fd60c425d093bfa60d2",
110
110
  class: this.labelClasses,
111
111
  "aria-describedby": !!this.description ? "label-description" : undefined
112
112
  }, !!this.label ? s(this.label) : this.hasLabelSlotContent ? e("slot", {
113
113
  name: "label"
114
114
  }) : ""), this.hasDescripiton && e("div", {
115
- key: "226f0df4f71a50e44cb8eafff8d1f74d3a9a7b33",
115
+ key: "9a7d20fd82f9f1323d711694081a41953247e3fa",
116
116
  id: "label-description",
117
117
  class: this.descriptionClasses
118
118
  }, !!this.description ? s(this.description) : this.hasDefaultSlotContent ? e("slot", null) : ""));
@@ -302,12 +302,12 @@ const f = class {
302
302
  render() {
303
303
  const t = this.toggleButtonProps;
304
304
  return e("click-elsewhere", {
305
- key: "35405b57c6680f44ce21156a578cea6d96c063b8",
305
+ key: "c73d902efcfe8dbd8eb30bbc4c690791688ec7ab",
306
306
  class: this.open ? "dropdown-open" : "",
307
307
  onChange: this.onClickElsewhere,
308
308
  "test-id": "dropdownContainer"
309
309
  }, e("q2-btn", {
310
- key: "8ec87dae4f675d7764d91e91a3e37f704ad73d07",
310
+ key: "c38f86f4782ac7af8f8d63f653a9bbe6a2f15156",
311
311
  ref: t => this.controlElement = t,
312
312
  class: t.className,
313
313
  onClick: this.onToggleClick,
@@ -334,7 +334,7 @@ const f = class {
334
334
  }) : " ", this.label && !this.hideLabel && e("span", {
335
335
  class: "dropdown-button-text"
336
336
  }, c(this.label)))), e("q2-popover", {
337
- key: "c71cdf5198dc87f720828d1b9623eadde266d118",
337
+ key: "214ed5802be23e3105372ece60be34c6b921d312",
338
338
  ref: t => this.popoverElement = t,
339
339
  controlElement: this.controlElement,
340
340
  open: this.open,
@@ -346,7 +346,7 @@ const f = class {
346
346
  mode: this.popoverMode || undefined,
347
347
  block: this.block
348
348
  }, e("q2-option-list", {
349
- key: "42b372ea1203e50d15253590f4b8454df5b4f6d7",
349
+ key: "574775f82aa39d8ab88173dd122164e274f34be5",
350
350
  onPopoverState: this.onPopoverState,
351
351
  id: "option-list",
352
352
  ref: t => this.optionList = t,
@@ -354,7 +354,7 @@ const f = class {
354
354
  label: c("tecton.element.optionList.label", [ this.optionListLabel ]),
355
355
  "no-select": true
356
356
  }, e("slot", {
357
- key: "50f04d7a1f74de7cf41b74d4b00b99b9a58eec8d"
357
+ key: "57a547da980d65679787f5a84654761114b9f722"
358
358
  }))));
359
359
  }
360
360
  get hostElement() {
@@ -275,7 +275,7 @@ const c = class {
275
275
  // #region Render Methods
276
276
  render() {
277
277
  return e("div", {
278
- key: "255dac3b6e39618e37fc129ef0a743aca1aefc88"
278
+ key: "e4537652284887776f863a690eef445a3bdaa3c6"
279
279
  }, this.generateEditStateDOM(), this.generateReadStateDOM());
280
280
  }
281
281
  get hostElement() {
@@ -131,7 +131,7 @@ const d = class {
131
131
  }
132
132
  render() {
133
133
  return n(o, {
134
- key: "e4df51465f7c14e0ff4ae2463613e73cc6100318",
134
+ key: "a89b3080a47ebc5401317f5620c918ff2c34bac2",
135
135
  attribute: "navigation"
136
136
  }, this.renderMenuInner());
137
137
  }
@@ -1,25 +1,25 @@
1
- import { r as o, h as a } from "./index-7a5365e2.js";
1
+ import { r as a, h as o } from "./index-7a5365e2.js";
2
2
 
3
- const c = "*{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}.container{--tct-input-margin:var(--comp-spacing);--tct-select-margin:var(--comp-spacing);--tct-calendar-margin:var(--comp-spacing);--tct-file-picker-margin:var(--comp-spacing);--tct-textarea-margin:var(--comp-spacing);--tct-checkbox-margin:var(--comp-spacing);--tct-checkbox-group-margin:var(--comp-spacing);--tct-radio-group-margin:var(--comp-spacing)}:host([spacing=none]) .container{--comp-spacing-none:var(--app-scale-0x, 0px);--comp-spacing:var(--tct-form-spacing-none, var(--comp-spacing-none) 0)}:host([spacing=compact]) .container{--comp-spacing-compact:var(--app-scale-3x, 15px);--comp-spacing:var(--tct-form-spacing-compact, var(--comp-spacing-compact) 0)}:host(:not([spacing]),[spacing=normal]) .container{--comp-spacing-normal:var(--app-scale-5x, 25px);--comp-spacing:var(--tct-form-spacing-normal, var(--comp-spacing-normal) 0)}:host([spacing=comfortable]) .container{--comp-spacing-comfortable:var(--app-scale-7x, 35px);--comp-spacing:var(--tct-form-spacing-comfortable, var(--comp-spacing-comfortable) 0)}";
3
+ const n = "*{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}.container{--tct-input-margin:var(--comp-spacing);--tct-select-margin:var(--comp-spacing);--tct-calendar-margin:var(--comp-spacing);--tct-file-picker-margin:var(--comp-spacing);--tct-textarea-margin:var(--comp-spacing);--tct-checkbox-group-margin:var(--comp-spacing);--tct-radio-group-margin:var(--comp-spacing)}:host([spacing=none]) .container{--comp-spacing-none:var(--app-scale-0x, 0px);--comp-spacing:var(--tct-form-spacing-none, var(--comp-spacing-none) 0)}:host([spacing=compact]) .container{--comp-spacing-compact:var(--app-scale-3x, 15px);--comp-spacing:var(--tct-form-spacing-compact, var(--comp-spacing-compact) 0)}:host(:not([spacing]),[spacing=normal]) .container{--comp-spacing-normal:var(--app-scale-5x, 25px);--comp-spacing:var(--tct-form-spacing-normal, var(--comp-spacing-normal) 0)}:host([spacing=comfortable]) .container{--comp-spacing-comfortable:var(--app-scale-7x, 35px);--comp-spacing:var(--tct-form-spacing-comfortable, var(--comp-spacing-comfortable) 0)}";
4
4
 
5
- const n = c;
5
+ const c = n;
6
6
 
7
7
  const i = class {
8
- constructor(a) {
9
- o(this, a);
8
+ constructor(o) {
9
+ a(this, o);
10
10
  this.spacing = "normal";
11
11
  }
12
12
  render() {
13
- return a("div", {
14
- key: "aa542ff0f5ecdee36ffdb070cb863553c3d725bc",
13
+ return o("div", {
14
+ key: "377fbc8245a6d6734536a37f3d733384801fd00b",
15
15
  class: "container"
16
- }, a("slot", {
17
- key: "980dc6939c003dfbd57189e7ba9fb151033e8b29"
16
+ }, o("slot", {
17
+ key: "73d1054f5ca1af44c78a4f85b1009143989a5530"
18
18
  }));
19
19
  }
20
20
  };
21
21
 
22
- i.style = n;
22
+ i.style = c;
23
23
 
24
24
  export { i as q2_form };
25
25
  //# sourceMappingURL=q2-form.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["q2FormCss","Q2FormStyle0","Q2Checkbox","render","h","key","class"],"sources":["src/components/q2-form/q2-form.scss?tag=q2-form&encapsulation=shadow","src/components/q2-form/q2-form.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n :host([spacing='none']) & {\n --comp-spacing-none: #{var-list(--app-scale-0x, 0px)};\n --comp-spacing: #{var-list(--tct-form-spacing-none, unquote('var(--comp-spacing-none) 0'))};\n }\n :host([spacing='compact']) & {\n --comp-spacing-compact: #{var-list(--app-scale-3x, 15px)};\n --comp-spacing: #{var-list(--tct-form-spacing-compact, unquote('var(--comp-spacing-compact) 0'))};\n }\n :host(:not([spacing]), [spacing='normal']) & {\n --comp-spacing-normal: #{var-list(--app-scale-5x, 25px)};\n --comp-spacing: #{var-list(--tct-form-spacing-normal, unquote('var(--comp-spacing-normal) 0'))};\n }\n\n :host([spacing='comfortable']) & {\n --comp-spacing-comfortable: #{var-list(--app-scale-7x, 35px)};\n --comp-spacing: #{var-list(--tct-form-spacing-comfortable, unquote('var(--comp-spacing-comfortable) 0'))};\n }\n\n --tct-input-margin: var(--comp-spacing);\n --tct-select-margin: var(--comp-spacing);\n --tct-calendar-margin: var(--comp-spacing);\n --tct-file-picker-margin: var(--comp-spacing);\n --tct-textarea-margin: var(--comp-spacing);\n --tct-checkbox-margin: var(--comp-spacing);\n --tct-checkbox-group-margin: var(--comp-spacing);\n --tct-radio-group-margin: var(--comp-spacing);\n}\n","import { Component, ComponentInterface, Prop, h } from '@stencil/core';\n\n@Component({ tag: 'q2-form', shadow: true, styleUrl: 'q2-form.scss' })\nexport class Q2Checkbox implements ComponentInterface {\n /** Changes the vertical spacing of the form-fields contained within the component's slot */\n @Prop({ reflect: true }) spacing: 'none' | 'compact' | 'normal' | 'comfortable' = 'normal';\n\n render() {\n return (\n <div class=\"container\">\n <slot />\n </div>\n );\n }\n}\n"],"mappings":";;AAAA,MAAMA,IAAY;;AAClB,MAAAC,IAAeD;;MCEFE,IAAU;;;mBAE+D;;EAElF,MAAAC;IACI,OACIC,EAAA;MAAAC,KAAA;MAAKC,OAAM;OACPF,EAAA;MAAAC,KAAA"}
1
+ {"version":3,"names":["q2FormCss","Q2FormStyle0","Q2Checkbox","render","h","key","class"],"sources":["src/components/q2-form/q2-form.scss?tag=q2-form&encapsulation=shadow","src/components/q2-form/q2-form.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n :host([spacing='none']) & {\n --comp-spacing-none: #{var-list(--app-scale-0x, 0px)};\n --comp-spacing: #{var-list(--tct-form-spacing-none, unquote('var(--comp-spacing-none) 0'))};\n }\n :host([spacing='compact']) & {\n --comp-spacing-compact: #{var-list(--app-scale-3x, 15px)};\n --comp-spacing: #{var-list(--tct-form-spacing-compact, unquote('var(--comp-spacing-compact) 0'))};\n }\n :host(:not([spacing]), [spacing='normal']) & {\n --comp-spacing-normal: #{var-list(--app-scale-5x, 25px)};\n --comp-spacing: #{var-list(--tct-form-spacing-normal, unquote('var(--comp-spacing-normal) 0'))};\n }\n\n :host([spacing='comfortable']) & {\n --comp-spacing-comfortable: #{var-list(--app-scale-7x, 35px)};\n --comp-spacing: #{var-list(--tct-form-spacing-comfortable, unquote('var(--comp-spacing-comfortable) 0'))};\n }\n\n --tct-input-margin: var(--comp-spacing);\n --tct-select-margin: var(--comp-spacing);\n --tct-calendar-margin: var(--comp-spacing);\n --tct-file-picker-margin: var(--comp-spacing);\n --tct-textarea-margin: var(--comp-spacing);\n --tct-checkbox-group-margin: var(--comp-spacing);\n --tct-radio-group-margin: var(--comp-spacing);\n}\n","import { Component, ComponentInterface, Prop, h } from '@stencil/core';\n\n@Component({ tag: 'q2-form', shadow: true, styleUrl: 'q2-form.scss' })\nexport class Q2Checkbox implements ComponentInterface {\n /** Changes the vertical spacing of the form-fields contained within the component's slot */\n @Prop({ reflect: true }) spacing: 'none' | 'compact' | 'normal' | 'comfortable' = 'normal';\n\n render() {\n return (\n <div class=\"container\">\n <slot />\n </div>\n );\n }\n}\n"],"mappings":";;AAAA,MAAMA,IAAY;;AAClB,MAAAC,IAAeD;;MCEFE,IAAU;;;mBAE+D;;EAElF,MAAAC;IACI,OACIC,EAAA;MAAAC,KAAA;MAAKC,OAAM;OACPF,EAAA;MAAAC,KAAA"}
@@ -49,11 +49,11 @@ const s = class {
49
49
  render() {
50
50
  const {formattedTextClasses: t} = this;
51
51
  return e("div", {
52
- key: "f8729c7f3dea39a14da8add529ae642e78d20643",
52
+ key: "29aac8ea5e737d01243d42d0a9790d18a11f768c",
53
53
  class: t,
54
54
  "aria-label": this.formattedValue
55
55
  }, e("span", {
56
- key: "94390c62b148e3a0ce2d470377818ac442e9257e"
56
+ key: "613fe3f2d365edd4a2ffefd37ac2ec4f05220978"
57
57
  }, this.formattedValue));
58
58
  }
59
59
  static get watchers() {