@uh-design-system/component-library 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/dist/cjs/{utils-3412cbed.js → attributes-BMbXzbwU.js} +2 -28
  2. package/dist/cjs/component-library.cjs.js +7 -7
  3. package/dist/cjs/controlUtils-ofqiQxRF.js +42 -0
  4. package/dist/cjs/ds-accordion.cjs.entry.js +79 -0
  5. package/dist/cjs/ds-button.cjs.entry.js +107 -0
  6. package/dist/cjs/ds-card.cjs.entry.js +58 -0
  7. package/dist/cjs/ds-checkbox-group.cjs.entry.js +109 -49
  8. package/dist/cjs/ds-checkbox.cjs.entry.js +88 -79
  9. package/dist/cjs/ds-icon.cjs.entry.js +943 -0
  10. package/dist/cjs/ds-input-validity.cjs.entry.js +14 -15
  11. package/dist/cjs/ds-link-with-arrow.cjs.entry.js +21 -20
  12. package/dist/cjs/ds-link.cjs.entry.js +34 -31
  13. package/dist/cjs/ds-radio-button-group.cjs.entry.js +153 -0
  14. package/dist/cjs/ds-radio-button.cjs.entry.js +151 -0
  15. package/dist/cjs/ds-spinner.cjs.entry.js +62 -0
  16. package/dist/cjs/ds-text-input.cjs.entry.js +90 -77
  17. package/dist/cjs/ds-visually-hidden.cjs.entry.js +3 -6
  18. package/dist/cjs/index-Bp6Dd2i1.js +94 -0
  19. package/dist/cjs/{store-9bd20f3c.js → index-DwLFyR5p.js} +6 -2
  20. package/dist/cjs/{index-bf84b124.js → index-Mjp9Y-Sw.js} +701 -55
  21. package/dist/cjs/index.cjs.js +3 -5
  22. package/dist/cjs/{linkUtils-695da37c.js → linkUtils-onlbgKdI.js} +4 -2
  23. package/dist/cjs/loader.cjs.js +3 -5
  24. package/dist/cjs/utils-BjZTECpy.js +29 -0
  25. package/dist/collection/accessibility/stories/naming.stories.js +3 -3
  26. package/dist/collection/collection-manifest.json +78 -3
  27. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.css +18 -17
  28. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +91 -50
  29. package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.examples.stories.js +6 -6
  30. package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.features.stories.js +14 -14
  31. package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.stories.js +24 -66
  32. package/dist/collection/components/01-base-components/ds-button/ds-button.css +124 -145
  33. package/dist/collection/components/01-base-components/ds-button/ds-button.js +150 -65
  34. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.examples.stories.js +121 -23
  35. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.features.stories.js +49 -42
  36. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.stories.js +16 -72
  37. package/dist/collection/components/01-base-components/ds-card/ds-card.css +127 -0
  38. package/dist/collection/components/01-base-components/ds-card/ds-card.js +303 -0
  39. package/dist/collection/components/01-base-components/ds-card/stories/ds-card.examples.stories.js +92 -0
  40. package/dist/collection/components/01-base-components/ds-card/stories/ds-card.features.stories.js +66 -0
  41. package/dist/collection/components/01-base-components/ds-card/stories/ds-card.stories.js +71 -0
  42. package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.css +46 -46
  43. package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.js +120 -111
  44. package/dist/collection/components/01-base-components/ds-checkbox/stories/ds-checkbox.features.stories.js +20 -20
  45. package/dist/collection/components/01-base-components/ds-checkbox/stories/ds-checkbox.stories.js +12 -25
  46. package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.css +2 -3
  47. package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.js +214 -63
  48. package/dist/collection/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.features.stories.js +215 -50
  49. package/dist/collection/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.stories.js +30 -28
  50. package/dist/collection/components/01-base-components/ds-icon/ds-icon.js +36 -31
  51. package/dist/collection/components/01-base-components/ds-icon/stories/ds-icon.stories.js +10 -37
  52. package/dist/collection/components/01-base-components/ds-input-validity/ds-input-validity.css +2 -2
  53. package/dist/collection/components/01-base-components/ds-input-validity/ds-input-validity.js +60 -30
  54. package/dist/collection/components/01-base-components/ds-input-validity/stories/ds-input-validity.features.stories.js +4 -4
  55. package/dist/collection/components/01-base-components/ds-input-validity/stories/ds-input-validity.stories.js +4 -9
  56. package/dist/collection/components/01-base-components/ds-link/ds-link.css +24 -14
  57. package/dist/collection/components/01-base-components/ds-link/ds-link.js +74 -75
  58. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.examples.stories.js +27 -27
  59. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.features.stories.js +38 -21
  60. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.stories.js +8 -67
  61. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.css +10 -12
  62. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.js +30 -52
  63. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.examples.stories.js +4 -4
  64. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.features.stories.js +6 -6
  65. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.stories.js +4 -28
  66. package/dist/collection/components/01-base-components/ds-radio-button/ds-radio-button.css +115 -0
  67. package/dist/collection/components/01-base-components/ds-radio-button/ds-radio-button.js +449 -0
  68. package/dist/collection/components/01-base-components/ds-radio-button/stories/ds-radio-button.features.stories.js +72 -0
  69. package/dist/collection/components/01-base-components/ds-radio-button/stories/ds-radio-button.stories.js +22 -0
  70. package/dist/collection/components/01-base-components/ds-radio-button-group/ds-radio-button-group.css +30 -0
  71. package/dist/collection/components/01-base-components/ds-radio-button-group/ds-radio-button-group.js +360 -0
  72. package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.examples.stories.js +42 -0
  73. package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.features.stories.js +71 -0
  74. package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.stories.js +60 -0
  75. package/dist/collection/components/01-base-components/ds-spinner/ds-spinner.css +279 -0
  76. package/dist/collection/components/01-base-components/ds-spinner/ds-spinner.js +221 -0
  77. package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.examples.stories.js +120 -0
  78. package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.features.stories.js +107 -0
  79. package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.stories.js +14 -0
  80. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.css +85 -118
  81. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +230 -155
  82. package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.examples.stories.js +26 -21
  83. package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.features.stories.js +40 -40
  84. package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.stories.js +30 -56
  85. package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.js +1 -1
  86. package/dist/collection/store.js +7 -1
  87. package/dist/collection/utils/attributes/attributes.js +2 -2
  88. package/dist/collection/utils/button/buttonUtils.js +14 -0
  89. package/dist/collection/utils/colours/colourTypes.js +3 -3
  90. package/dist/collection/utils/colours/colourUtils.js +5 -3
  91. package/dist/collection/utils/controls/controlUtils.js +35 -1
  92. package/dist/collection/utils/link/linkUtils.js +3 -2
  93. package/dist/collection/utils/spinner/spinnerUtils.js +20 -0
  94. package/dist/collection/utils/tests/testUtils.js +1 -0
  95. package/dist/collection/utils/typography/typographyUtils.js +3 -3
  96. package/dist/collection/utils/utils.js +10 -9
  97. package/dist/component-library/{utils-cfc536bc.js → attributes-BD_lNRxn.js} +1 -1
  98. package/dist/component-library/component-library.css +1 -1
  99. package/dist/component-library/component-library.esm.js +1 -1
  100. package/dist/component-library/controlUtils-CNER0MvM.js +1 -0
  101. package/dist/component-library/ds-accordion.entry.js +1 -0
  102. package/dist/component-library/ds-button.entry.js +1 -0
  103. package/dist/component-library/ds-card.entry.js +1 -0
  104. package/dist/component-library/ds-checkbox-group.entry.js +1 -1
  105. package/dist/component-library/ds-checkbox.entry.js +1 -1
  106. package/dist/component-library/ds-icon.entry.js +1 -0
  107. package/dist/component-library/ds-input-validity.entry.js +1 -1
  108. package/dist/component-library/ds-link-with-arrow.entry.js +1 -1
  109. package/dist/component-library/ds-link.entry.js +1 -1
  110. package/dist/component-library/ds-radio-button-group.entry.js +1 -0
  111. package/dist/component-library/ds-radio-button.entry.js +1 -0
  112. package/dist/component-library/ds-spinner.entry.js +1 -0
  113. package/dist/component-library/ds-text-input.entry.js +1 -1
  114. package/dist/component-library/ds-visually-hidden.entry.js +1 -1
  115. package/dist/component-library/index-BfTCfPZ1.js +6 -0
  116. package/dist/component-library/index-Cm7V4EAn.js +2 -0
  117. package/dist/component-library/index-DuYjhvTn.js +1 -0
  118. package/dist/component-library/index.esm.js +1 -1
  119. package/dist/component-library/linkUtils-02nCfO0F.js +1 -0
  120. package/dist/component-library/utils-CqaqnfY4.js +1 -0
  121. package/dist/components/attributes.js +3 -3
  122. package/dist/components/controlUtils.js +35 -2
  123. package/dist/components/ds-accordion.js +58 -42
  124. package/dist/components/ds-button2.js +78 -39
  125. package/dist/components/ds-card.d.ts +11 -0
  126. package/dist/components/ds-card.js +91 -0
  127. package/dist/components/ds-checkbox-group.js +116 -56
  128. package/dist/components/ds-checkbox2.js +93 -80
  129. package/dist/components/ds-icon2.js +292 -292
  130. package/dist/components/ds-input-validity2.js +17 -14
  131. package/dist/components/ds-link-with-arrow.js +22 -22
  132. package/dist/components/ds-link.js +43 -40
  133. package/dist/components/ds-radio-button-group.d.ts +11 -0
  134. package/dist/components/ds-radio-button-group.js +185 -0
  135. package/dist/components/ds-radio-button.d.ts +11 -0
  136. package/dist/components/ds-radio-button.js +198 -0
  137. package/dist/components/ds-spinner.d.ts +11 -0
  138. package/dist/components/ds-spinner.js +6 -0
  139. package/dist/components/ds-spinner2.js +89 -0
  140. package/dist/components/ds-text-input.js +126 -104
  141. package/dist/components/ds-visually-hidden2.js +2 -3
  142. package/dist/components/index.js +208 -2
  143. package/dist/components/index2.js +713 -39
  144. package/dist/components/index3.js +69 -57
  145. package/dist/components/linkUtils.js +4 -2
  146. package/dist/docs.d.ts +443 -0
  147. package/dist/docs.json +4790 -0
  148. package/dist/esm/{utils-cfc536bc.js → attributes-BD_lNRxn.js} +3 -26
  149. package/dist/esm/component-library.js +6 -5
  150. package/dist/esm/controlUtils-CNER0MvM.js +37 -0
  151. package/dist/esm/ds-accordion.entry.js +77 -0
  152. package/dist/esm/ds-button.entry.js +105 -0
  153. package/dist/esm/ds-card.entry.js +56 -0
  154. package/dist/esm/ds-checkbox-group.entry.js +108 -46
  155. package/dist/esm/ds-checkbox.entry.js +78 -67
  156. package/dist/esm/ds-icon.entry.js +941 -0
  157. package/dist/esm/ds-input-validity.entry.js +14 -13
  158. package/dist/esm/ds-link-with-arrow.entry.js +21 -18
  159. package/dist/esm/ds-link.entry.js +34 -29
  160. package/dist/esm/ds-radio-button-group.entry.js +151 -0
  161. package/dist/esm/ds-radio-button.entry.js +149 -0
  162. package/dist/esm/ds-spinner.entry.js +60 -0
  163. package/dist/esm/ds-text-input.entry.js +88 -73
  164. package/dist/esm/ds-visually-hidden.entry.js +3 -4
  165. package/dist/esm/index-BfTCfPZ1.js +92 -0
  166. package/dist/esm/{index-434995e1.js → index-Cm7V4EAn.js} +699 -34
  167. package/dist/{components/store.js → esm/index-DuYjhvTn.js} +6 -3
  168. package/dist/esm/index.js +2 -2
  169. package/dist/esm/{linkUtils-3d1b28cf.js → linkUtils-02nCfO0F.js} +4 -2
  170. package/dist/esm/loader.js +4 -4
  171. package/dist/esm/utils-CqaqnfY4.js +25 -0
  172. package/dist/hydrate/index.d.ts +271 -0
  173. package/dist/hydrate/index.js +22280 -0
  174. package/dist/hydrate/index.mjs +22272 -0
  175. package/dist/hydrate/package.json +12 -0
  176. package/dist/styles/helpers.css +15 -0
  177. package/dist/styles/helpers.css.map +1 -0
  178. package/dist/styles/mixins/_breakpoints.scss +13 -0
  179. package/dist/styles/mixins/_focus.scss +26 -0
  180. package/dist/styles/mixins/_wrapper.scss +5 -0
  181. package/dist/styles/mixins/imports-default/_imports.scss +2 -0
  182. package/dist/styles/mixins/tokens/_breakpoints.scss +13 -0
  183. package/dist/styles/mixins/tokens/_semantic-colours.scss +75 -0
  184. package/dist/styles/mixins.scss +12 -0
  185. package/dist/styles/variables.css +176 -0
  186. package/dist/styles/variables.css.map +1 -0
  187. package/dist/types/components/01-base-components/ds-accordion/ds-accordion.d.ts +11 -8
  188. package/dist/types/components/01-base-components/ds-button/ds-button.d.ts +16 -11
  189. package/dist/types/components/01-base-components/ds-button/stories/ds-button.examples.stories.d.ts +1 -0
  190. package/dist/types/components/01-base-components/ds-button/stories/ds-button.features.stories.d.ts +1 -0
  191. package/dist/types/components/01-base-components/ds-card/ds-card.d.ts +20 -0
  192. package/dist/types/components/01-base-components/ds-card/stories/ds-card.examples.stories.d.ts +8 -0
  193. package/dist/types/components/01-base-components/ds-card/stories/ds-card.features.stories.d.ts +8 -0
  194. package/dist/types/components/01-base-components/ds-card/stories/ds-card.stories.d.ts +7 -0
  195. package/dist/types/components/01-base-components/ds-checkbox/ds-checkbox.d.ts +21 -22
  196. package/dist/types/components/01-base-components/ds-checkbox-group/ds-checkbox-group.d.ts +21 -11
  197. package/dist/types/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.features.stories.d.ts +3 -0
  198. package/dist/types/components/01-base-components/ds-icon/ds-icon.d.ts +7 -5
  199. package/dist/types/components/01-base-components/ds-input-validity/ds-input-validity.d.ts +5 -6
  200. package/dist/types/components/01-base-components/ds-link/ds-link.d.ts +13 -14
  201. package/dist/types/components/01-base-components/ds-link/stories/ds-link.features.stories.d.ts +2 -0
  202. package/dist/types/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.d.ts +5 -7
  203. package/dist/types/components/01-base-components/ds-radio-button/ds-radio-button.d.ts +44 -0
  204. package/dist/types/components/01-base-components/ds-radio-button/stories/ds-radio-button.features.stories.d.ts +15 -0
  205. package/dist/types/components/01-base-components/ds-radio-button/stories/ds-radio-button.stories.d.ts +7 -0
  206. package/dist/types/components/01-base-components/ds-radio-button-group/ds-radio-button-group.d.ts +34 -0
  207. package/dist/types/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.examples.stories.d.ts +6 -0
  208. package/dist/types/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.features.stories.d.ts +11 -0
  209. package/dist/types/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.stories.d.ts +7 -0
  210. package/dist/types/components/01-base-components/ds-spinner/ds-spinner.d.ts +17 -0
  211. package/dist/types/components/01-base-components/ds-spinner/stories/ds-spinner.examples.stories.d.ts +7 -0
  212. package/dist/types/components/01-base-components/ds-spinner/stories/ds-spinner.features.stories.d.ts +7 -0
  213. package/dist/types/components/01-base-components/ds-spinner/stories/ds-spinner.stories.d.ts +7 -0
  214. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.d.ts +37 -32
  215. package/dist/types/components.d.ts +1287 -228
  216. package/dist/types/stencil-public-runtime.d.ts +22 -0
  217. package/dist/types/store.d.ts +6 -1
  218. package/dist/types/utils/attributes/attributes.d.ts +1 -1
  219. package/dist/types/utils/button/buttonUtils.d.ts +1 -0
  220. package/dist/types/utils/colours/colourTypes.d.ts +3 -3
  221. package/dist/types/utils/controls/controlUtils.d.ts +2 -0
  222. package/dist/types/utils/link/linkUtils.d.ts +1 -1
  223. package/dist/types/utils/spinner/spinnerUtils.d.ts +1 -0
  224. package/dist/types/utils/tests/testUtils.d.ts +1 -0
  225. package/dist/types/utils/utils.d.ts +2 -1
  226. package/package.json +40 -36
  227. package/dist/cjs/controlUtils-041de0fd.js +0 -7
  228. package/dist/cjs/ds-accordion_3.cjs.entry.js +0 -1095
  229. package/dist/cjs/index-5b0b9d4c.js +0 -82
  230. package/dist/component-library/controlUtils-9ca4087b.js +0 -1
  231. package/dist/component-library/ds-accordion_3.entry.js +0 -1
  232. package/dist/component-library/index-434995e1.js +0 -2
  233. package/dist/component-library/index-72ac5051.js +0 -6
  234. package/dist/component-library/linkUtils-3d1b28cf.js +0 -1
  235. package/dist/component-library/store-b8d17c10.js +0 -1
  236. package/dist/esm/controlUtils-9ca4087b.js +0 -4
  237. package/dist/esm/ds-accordion_3.entry.js +0 -1089
  238. package/dist/esm/index-72ac5051.js +0 -80
  239. package/dist/esm/store-b8d17c10.js +0 -204
  240. package/dist/loader/package.json +0 -11
  241. /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
  242. /package/dist/component-library/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  243. /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
@@ -1,3 +1,11 @@
1
+ :root {
2
+ --ds-breakpoint-xSmall: 20rem;
3
+ --ds-breakpoint-small: 30rem;
4
+ --ds-breakpoint-medium: 60rem;
5
+ --ds-breakpoint-large: 75rem;
6
+ --ds-breakpoint-xLarge: 90rem;
7
+ }
8
+
1
9
  .ds-checkbox-fieldset {
2
10
  display: inline-flex;
3
11
  flex-direction: column;
@@ -16,19 +24,17 @@
16
24
  .ds-checkbox-fieldset__assistive-text {
17
25
  display: inline;
18
26
  font-size: var(--ds-fontSize-14);
19
- color: var(--ds-textColor-secondary);
27
+ color: var(--ds-palette-black-70);
20
28
  line-height: var(--ds-lineHeight-large);
21
29
  }
22
30
 
23
31
  .ds-checkbox {
24
32
  display: inline-flex;
25
33
  align-self: flex-start;
26
- align-items: center;
27
- flex-direction: row;
28
- flex-wrap: nowrap;
34
+ align-items: flex-start;
35
+ flex-flow: row nowrap;
29
36
  text-wrap: wrap;
30
37
  word-wrap: break-word;
31
- word-break: break-all;
32
38
  white-space: normal;
33
39
  position: relative;
34
40
  cursor: pointer;
@@ -36,26 +42,12 @@
36
42
  width: auto;
37
43
  padding: var(--ds-spacing-xSmall);
38
44
  }
39
- .ds-checkbox--no-margin .ds-checkbox__input {
40
- margin-right: 0;
41
- }
42
- .ds-checkbox--disabled {
43
- color: var(--ds-textColor-disabled-onLight);
44
- }
45
- .ds-checkbox__span--optional {
46
- color: var(--ds-textColor-secondary);
47
- font-size: var(--ds-fontSize-14);
48
- }
49
- .ds-checkbox:has(.ds-checkbox__input:disabled) {
50
- cursor: not-allowed;
51
- }
52
45
  .ds-checkbox__input {
53
46
  cursor: pointer;
54
47
  /* hide the default checkbox */
55
- -webkit-appearance: none;
56
48
  appearance: none;
57
49
  /* For iOS < 15 to remove gradient background */
58
- background-color: var(--ds-bgColor-white);
50
+ background-color: var(--ds-palette-white);
59
51
  /* Not removed via appearance */
60
52
  margin: 0;
61
53
  display: grid;
@@ -69,53 +61,48 @@
69
61
  border-color: var(--ds-palette-black-50);
70
62
  /** unchecked **/
71
63
  /** checked and indeterminate **/
72
- /** Error state should override other styles */
73
64
  /** checkmark **/
74
65
  }
75
66
  .ds-checkbox__input:focus-visible {
76
- box-shadow: 0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);
77
- outline-color: var(--ds-borderColor-black);
78
- outline-offset: var(--ds-borderWidth-thin);
79
- outline-style: solid;
80
- outline-width: var(--ds-borderWidth-thin);
67
+ box-shadow: 0 0 0 var(--ds-borderWidth-thin) var(--ds-palette-white);
68
+ outline: var(--ds-borderWidth-thin) solid var(--ds-palette-black-95);
69
+ outline-offset: calc(var(--ds-borderWidth-thin) * 1);
81
70
  }
82
71
  .ds-checkbox__input:hover, .ds-checkbox__input:active {
83
- border-color: var(--ds-borderColor-default);
72
+ border-color: var(--ds-palette-black-50);
84
73
  }
85
74
  .ds-checkbox__input:hover {
86
- background-color: var(--ds-bgColor-white-hover);
75
+ background-color: var(--ds-palette-black-10);
87
76
  }
88
77
  .ds-checkbox__input:active {
89
- background-color: var(--ds-bgColor-white-active);
78
+ background-color: var(--ds-palette-black-20);
90
79
  }
91
80
  .ds-checkbox__input:disabled {
92
- background-color: var(--ds-bgColor-disabled-onLight);
93
- border-color: var(--ds-borderColor-disabled-onLight);
81
+ cursor: not-allowed;
82
+ color: var(--ds-palette-black-40);
83
+ background-color: var(--ds-overlay-black-10);
84
+ border-color: var(--ds-overlay-black-15);
94
85
  }
95
86
  @media (forced-colors: active) {
96
87
  .ds-checkbox__input:disabled {
97
88
  border-color: GrayText;
98
89
  }
99
90
  }
91
+ .ds-checkbox__input:user-invalid, .ds-checkbox__input--invalid, .ds-checkbox__input--invalid:checked, .ds-checkbox__input--invalid:indeterminate {
92
+ border-color: var(--ds-palette-red-50);
93
+ }
100
94
  .ds-checkbox__input:checked, .ds-checkbox__input:indeterminate {
101
- background-color: var(--ds-bgColor-primary);
102
- border-color: var(--ds-borderColor-transparent);
95
+ background-color: var(--ds-palette-mainBlue-70);
96
+ border-color: var(--ds-overlay-black-00);
103
97
  }
104
98
  .ds-checkbox__input:checked:hover, .ds-checkbox__input:indeterminate:hover {
105
- background-color: var(--ds-bgColor-primary-hover);
99
+ background-color: var(--ds-palette-mainBlue-80);
106
100
  }
107
101
  .ds-checkbox__input:checked:active, .ds-checkbox__input:indeterminate:active {
108
- background-color: var(--ds-bgColor-primary-active);
102
+ background-color: var(--ds-palette-mainBlue-90);
109
103
  }
110
104
  .ds-checkbox__input:checked:disabled, .ds-checkbox__input:indeterminate:disabled {
111
- background-color: var(--ds-bgColor-disabled-onLight);
112
- }
113
- .ds-checkbox__input:user-invalid, .ds-checkbox__input--invalid, .ds-checkbox__input--invalid:checked, .ds-checkbox__input--invalid:indeterminate {
114
- border-color: var(--ds-borderColor-danger);
115
- }
116
- .ds-checkbox__input:disabled {
117
- cursor: not-allowed;
118
- color: var(--ds-textColor-disabled-onLight);
105
+ background-color: var(--ds-overlay-black-10);
119
106
  }
120
107
  .ds-checkbox__input::before {
121
108
  content: "";
@@ -129,15 +116,28 @@
129
116
  .ds-checkbox__input:checked::before {
130
117
  background-image: url("data:image/svg+xml;charset=utf-8,<svg width='16' height='13' viewBox='0 0 16 13' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M5.99997 7.87871L13.606 0.272705L15.7273 2.39403L5.99997 12.1214L0.272644 6.39402L2.39396 4.27271L5.99997 7.87871Z' fill='%23ffffff' /></svg>");
131
118
  }
132
- .ds-checkbox__input:checked:disabled::before {
133
- background-image: url("data:image/svg+xml;charset=utf-8,<svg width='16' height='13' viewBox='0 0 16 13' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M5.99997 7.87871L13.606 0.272705L15.7273 2.39403L5.99997 12.1214L0.272644 6.39402L2.39396 4.27271L5.99997 7.87871Z' fill='%23999999' /></svg>");
134
- }
135
119
  .ds-checkbox__input:indeterminate::before {
136
120
  background-image: url("data:image/svg+xml;charset=utf-8,<svg width='14' height='4' viewBox='0 0 14 4' xmlns='http://www.w3.org/2000/svg'><rect width='13.3333' height='3' transform='matrix(1 0 0 -1 0.333313 3.5)' fill='%23ffffff' /></svg>");
137
121
  }
122
+ .ds-checkbox__input:checked:disabled::before {
123
+ background-image: url("data:image/svg+xml;charset=utf-8,<svg width='16' height='13' viewBox='0 0 16 13' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M5.99997 7.87871L13.606 0.272705L15.7273 2.39403L5.99997 12.1214L0.272644 6.39402L2.39396 4.27271L5.99997 7.87871Z' fill='%23999999' /></svg>");
124
+ }
138
125
  .ds-checkbox__input:indeterminate:disabled::before {
139
126
  background-image: url("data:image/svg+xml;charset=utf-8,<svg width='14' height='4' viewBox='0 0 14 4' xmlns='http://www.w3.org/2000/svg'><rect width='13.3333' height='3' transform='matrix(1 0 0 -1 0.333313 3.5)' fill='%23999999' /></svg>");
140
127
  }
128
+ .ds-checkbox--no-margin .ds-checkbox__input {
129
+ margin-right: 0;
130
+ }
131
+ .ds-checkbox--disabled {
132
+ color: var(--ds-palette-black-40);
133
+ }
134
+ .ds-checkbox__span--optional {
135
+ color: var(--ds-palette-black-70);
136
+ font-size: var(--ds-fontSize-14);
137
+ }
138
+ .ds-checkbox:has(.ds-checkbox__input:disabled) {
139
+ cursor: not-allowed;
140
+ }
141
141
 
142
142
  .ds-checkbox-error {
143
143
  display: flex;
@@ -3,100 +3,108 @@ import classNames from "classnames";
3
3
  import { inheritAriaAttributes, inheritAttributes } from "../../../utils/attributes/attributes";
4
4
  import { getOptionalText, getRequiredText } from "../../../utils/controls/controlUtils";
5
5
  import { isValidation } from "../../../store";
6
- import { getAriaLabel, idGenerator } from "../../../utils/utils";
6
+ import { idGenerator } from "../../../utils/utils";
7
7
  const checkboxIdGenerator = idGenerator('ds-checkbox');
8
8
  export class DsCheckbox {
9
+ checkboxGroup = null;
9
10
  inputElem;
10
11
  labelId;
11
12
  inputValidityId;
12
13
  assistiveTextId;
13
14
  inheritedAttributes = {};
14
- initialChecked;
15
15
  labelClicked = false;
16
16
  el;
17
17
  internals;
18
- dsCheckboxInput;
19
- identifier = checkboxIdGenerator.next().value;
20
- checked = false;
21
- legend;
22
- assistiveText;
23
- text;
24
- indeterminate = false;
25
- disabled = false;
26
- errorText = '';
27
- errorsDisabled = false;
28
- required = false;
29
- optional = false;
30
- optionalText;
31
- ariaLabel;
32
- value = this.checked.toString();
18
+ dsId = checkboxIdGenerator.next().value;
19
+ dsChecked = false;
20
+ dsLegend;
21
+ dsAssistiveText;
22
+ dsText;
23
+ dsIndeterminate = false;
24
+ dsDisabled = false;
25
+ dsErrorText = '';
26
+ dsErrorsDisabled = false;
27
+ dsRequired = false;
28
+ dsOptional = false;
29
+ dsOptionalText;
30
+ dsAriaLabel;
31
+ dsChange;
32
+ invalid = !!this.dsErrorText;
33
+ initialChecked = this.dsChecked;
33
34
  validationMessage;
34
35
  setIds = () => {
35
- this.labelId = `${this.identifier}-label`;
36
- this.inputValidityId = `${this.identifier}-validity`;
37
- this.assistiveTextId = `${this.identifier}-assistive-text`;
36
+ this.labelId = `${this.dsId}-label`;
37
+ this.inputValidityId = `${this.dsId}-validity`;
38
+ this.assistiveTextId = `${this.dsId}-assistive-text`;
38
39
  };
39
- getValidationMessage = () => (!this.errorsDisabled ? this.errorText || this.internals?.validationMessage || this.inputElem?.validationMessage : '');
40
+ getValidationMessage = () => (!this.dsErrorsDisabled ? this.dsErrorText || this.internals?.validationMessage || this.inputElem?.validationMessage : '');
40
41
  getLegendText = () => {
41
- if (this.required) {
42
- return getRequiredText(this.legend);
42
+ if (this.dsRequired) {
43
+ return getRequiredText(this.dsLegend);
43
44
  }
44
- if (this.optional) {
45
- return getOptionalText(this.legend, this.optionalText);
45
+ if (this.dsOptional) {
46
+ return getOptionalText(this.dsLegend, this.dsOptionalText);
46
47
  }
47
- return this.legend;
48
+ return this.dsLegend;
48
49
  };
49
50
  getCheckboxText = () => {
50
- if (this.legend) {
51
- return this.text;
51
+ if (this.dsLegend) {
52
+ return this.dsText;
52
53
  }
53
- if (this.required) {
54
- return getRequiredText(this.text);
54
+ if (this.dsRequired) {
55
+ return getRequiredText(this.dsText);
55
56
  }
56
- if (this.optional) {
57
- return getOptionalText(this.text, this.optionalText);
57
+ if (this.dsOptional) {
58
+ return getOptionalText(this.dsText, this.dsOptionalText);
58
59
  }
59
- return this.text;
60
- };
61
- getAriaDescribedBy = () => [Boolean(this.assistiveText) && this.assistiveTextId, Boolean(this.getValidationMessage()) && this.inputValidityId].filter(Boolean).join(' ');
62
- restoreInitialState = () => {
63
- this.checked = this.initialChecked;
64
- this.value = this.checked.toString();
65
- this.internals?.setValidity({});
66
- this.internals?.setFormValue(this.value);
67
- };
68
- setInitialState = () => {
69
- this.initialChecked = this.checked;
70
- this.value = this.checked.toString();
71
- this.internals?.setFormValue(this.value);
60
+ return this.dsText;
72
61
  };
62
+ getAriaDescribedBy = () => [Boolean(this.dsAssistiveText) && this.assistiveTextId, Boolean(this.getValidationMessage()) && this.inputValidityId].filter(Boolean).join(' ');
73
63
  formResetCallback() {
74
- this.restoreInitialState();
64
+ this.dsChecked = this.initialChecked;
65
+ this.internals?.setValidity({});
66
+ this.internals?.setFormValue(this.dsChecked.toString());
67
+ }
68
+ connectedCallback() {
69
+ this.checkboxGroup = this.el.closest('ds-checkbox-group');
70
+ if (this.checkboxGroup) {
71
+ this.invalid = !!this.checkboxGroup.dsErrorText;
72
+ this.checkboxGroup.addEventListener('dsCheckboxGroupInvalidStateChange', this.updateInvalidState);
73
+ }
74
+ }
75
+ disconnectedCallback() {
76
+ if (this.checkboxGroup) {
77
+ this.checkboxGroup.removeEventListener('dsCheckboxGroupInvalidStateChange', this.updateInvalidState);
78
+ }
79
+ this.checkboxGroup = null;
75
80
  }
81
+ updateInvalidState = (e) => {
82
+ this.invalid = e.detail;
83
+ };
76
84
  componentWillLoad() {
77
- this.setInitialState();
78
85
  this.setIds();
79
86
  this.inheritedAttributes = {
80
87
  ...inheritAriaAttributes(this.el, ['aria-label', 'aria-describedby', 'aria-hidden', 'aria-invalid']),
81
88
  ...inheritAttributes(this, this.el),
82
89
  };
83
- if (isValidation('server') || this.errorText) {
90
+ if (isValidation('server') || this.dsErrorText) {
84
91
  this.validationMessage = this.getValidationMessage();
85
92
  }
86
93
  }
94
+ dsCheckedObserver(isChecked) {
95
+ this.dsChange.emit(isChecked);
96
+ }
87
97
  handleInput = (e) => {
88
98
  const target = e.target;
89
- this.checked = target.checked;
90
- this.value = target.checked.toString();
91
- this.internals?.setFormValue(this.value);
92
- this.dsCheckboxInput.emit({ id: this.identifier, checked: target.checked });
99
+ this.dsChecked = target.checked;
100
+ this.internals?.setFormValue(target.checked.toString());
93
101
  if (isValidation('client') && this.validationMessage) {
94
102
  this.validationMessage = this.getValidationMessage();
95
103
  }
96
104
  };
97
105
  handleKeyUp = (event) => {
98
106
  if (event.key === 'Enter') {
99
- this.inputElem.dispatchEvent(new Event('input'));
107
+ this.inputElem.click();
100
108
  }
101
109
  };
102
110
  handleBlur = () => {
@@ -113,26 +121,26 @@ export class DsCheckbox {
113
121
  };
114
122
  renderCheckbox() {
115
123
  const classes = classNames('ds-checkbox', {
116
- 'ds-checkbox--disabled': this.disabled,
117
- 'ds-checkbox--no-margin': Boolean(!this.text),
124
+ 'ds-checkbox--disabled': this.dsDisabled,
125
+ 'ds-checkbox--no-margin': Boolean(!this.dsText),
118
126
  });
119
127
  const inputClasses = classNames('ds-checkbox__input', {
120
- 'ds-checkbox__input--invalid': Boolean(this.errorText),
128
+ 'ds-checkbox__input--invalid': Boolean(this.dsErrorText) || this.invalid,
121
129
  });
122
130
  const errorClasses = classNames('ds-checkbox-error', {
123
131
  'ds-checkbox-error--visible': Boolean(this.validationMessage),
124
132
  });
125
133
  const ariaDescribedBy = this.getAriaDescribedBy();
126
- return (h(Fragment, null, h("div", null, h("label", { id: this.labelId, class: classes, onMouseDown: this.handleMouseDown, onMouseUp: this.handleMouseUp }, h("input", { ref: inputElem => (this.inputElem = inputElem), type: "checkbox", class: inputClasses, checked: this.checked, indeterminate: this.indeterminate, onInput: this.handleInput, onKeyUp: this.handleKeyUp, onBlur: this.handleBlur, value: this.value, disabled: this.disabled, required: this.required, id: this.identifier, "aria-describedby": ariaDescribedBy, "aria-label": getAriaLabel(this.getCheckboxText(), this.ariaLabel), "aria-invalid": this.errorText ? true : undefined, ...this.inheritedAttributes }), this.getCheckboxText())), !this.errorsDisabled && (h("div", { class: errorClasses }, h("ds-input-validity", { id: this.inputValidityId, text: this.validationMessage, type: "error", role: "alert" })))));
134
+ return (h(Fragment, null, h("div", null, h("label", { id: this.labelId, class: classes, onMouseDown: this.handleMouseDown, onMouseUp: this.handleMouseUp }, h("input", { ref: inputElem => (this.inputElem = inputElem), type: "checkbox", class: inputClasses, checked: this.dsChecked, indeterminate: this.dsIndeterminate, onInput: this.handleInput, onKeyUp: this.handleKeyUp, onBlur: this.handleBlur, value: this.dsChecked.toString(), disabled: this.dsDisabled, required: this.dsRequired, id: this.dsId, "aria-describedby": ariaDescribedBy, "aria-label": this.dsAriaLabel, "aria-invalid": this.dsErrorText ? true : undefined, ...this.inheritedAttributes }), this.getCheckboxText())), !this.dsErrorsDisabled && (h("div", { class: errorClasses }, h("ds-input-validity", { id: this.inputValidityId, dsText: this.validationMessage, dsType: "error", dsAriaLive: "polite", dsAriaAtomic: "true" })))));
127
135
  }
128
136
  renderFieldset() {
129
137
  const fieldsetClasses = classNames('ds-checkbox-fieldset');
130
138
  const legendClasses = classNames('ds-checkbox-fieldset__legend');
131
139
  const assistiveTextClasses = classNames('ds-checkbox-fieldset__assistive-text');
132
- return (h("fieldset", { class: fieldsetClasses }, h("legend", { class: legendClasses }, this.getLegendText()), this.assistiveText && (h("small", { class: assistiveTextClasses, id: this.assistiveTextId }, this.assistiveText)), this.renderCheckbox()));
140
+ return (h("fieldset", { class: fieldsetClasses }, h("legend", { class: legendClasses }, this.getLegendText()), this.dsAssistiveText && (h("small", { class: assistiveTextClasses, id: this.assistiveTextId }, this.dsAssistiveText)), this.renderCheckbox()));
133
141
  }
134
142
  render() {
135
- if (this.legend) {
143
+ if (this.dsLegend) {
136
144
  return this.renderFieldset();
137
145
  }
138
146
  return this.renderCheckbox();
@@ -152,8 +160,9 @@ export class DsCheckbox {
152
160
  }
153
161
  static get properties() {
154
162
  return {
155
- "identifier": {
163
+ "dsId": {
156
164
  "type": "string",
165
+ "attribute": "ds-id",
157
166
  "mutable": false,
158
167
  "complexType": {
159
168
  "original": "string",
@@ -164,16 +173,16 @@ export class DsCheckbox {
164
173
  "optional": true,
165
174
  "docs": {
166
175
  "tags": [],
167
- "text": ""
176
+ "text": "Passed to the `id` attribute of the `input` element of the rendered checkbox."
168
177
  },
169
178
  "getter": false,
170
179
  "setter": false,
171
- "attribute": "id",
172
180
  "reflect": false,
173
181
  "defaultValue": "checkboxIdGenerator.next().value as string"
174
182
  },
175
- "checked": {
183
+ "dsChecked": {
176
184
  "type": "boolean",
185
+ "attribute": "ds-checked",
177
186
  "mutable": true,
178
187
  "complexType": {
179
188
  "original": "boolean",
@@ -184,16 +193,16 @@ export class DsCheckbox {
184
193
  "optional": false,
185
194
  "docs": {
186
195
  "tags": [],
187
- "text": ""
196
+ "text": "Passed to the `checked` attriubte of the `input` element of the rendered checkbox."
188
197
  },
189
198
  "getter": false,
190
199
  "setter": false,
191
- "attribute": "checked",
192
200
  "reflect": false,
193
201
  "defaultValue": "false"
194
202
  },
195
- "legend": {
203
+ "dsLegend": {
196
204
  "type": "string",
205
+ "attribute": "ds-legend",
197
206
  "mutable": false,
198
207
  "complexType": {
199
208
  "original": "string",
@@ -204,15 +213,15 @@ export class DsCheckbox {
204
213
  "optional": true,
205
214
  "docs": {
206
215
  "tags": [],
207
- "text": ""
216
+ "text": "Label of the checkbox"
208
217
  },
209
218
  "getter": false,
210
219
  "setter": false,
211
- "attribute": "legend",
212
220
  "reflect": false
213
221
  },
214
- "assistiveText": {
222
+ "dsAssistiveText": {
215
223
  "type": "string",
224
+ "attribute": "ds-assistive-text",
216
225
  "mutable": false,
217
226
  "complexType": {
218
227
  "original": "string",
@@ -223,15 +232,15 @@ export class DsCheckbox {
223
232
  "optional": true,
224
233
  "docs": {
225
234
  "tags": [],
226
- "text": ""
235
+ "text": "Text for additional information shown below label"
227
236
  },
228
237
  "getter": false,
229
238
  "setter": false,
230
- "attribute": "assistive-text",
231
239
  "reflect": false
232
240
  },
233
- "text": {
241
+ "dsText": {
234
242
  "type": "string",
243
+ "attribute": "ds-text",
235
244
  "mutable": false,
236
245
  "complexType": {
237
246
  "original": "string",
@@ -242,15 +251,15 @@ export class DsCheckbox {
242
251
  "optional": true,
243
252
  "docs": {
244
253
  "tags": [],
245
- "text": ""
254
+ "text": "The text of the checkbox"
246
255
  },
247
256
  "getter": false,
248
257
  "setter": false,
249
- "attribute": "text",
250
258
  "reflect": false
251
259
  },
252
- "indeterminate": {
260
+ "dsIndeterminate": {
253
261
  "type": "boolean",
262
+ "attribute": "ds-indeterminate",
254
263
  "mutable": false,
255
264
  "complexType": {
256
265
  "original": "boolean",
@@ -261,16 +270,16 @@ export class DsCheckbox {
261
270
  "optional": false,
262
271
  "docs": {
263
272
  "tags": [],
264
- "text": ""
273
+ "text": "Mainly used in a nested checkbox group to display a parent\ncheckbox in a partially selected state if some but not\nall of the nested checkbox group's checkboxes are selected."
265
274
  },
266
275
  "getter": false,
267
276
  "setter": false,
268
- "attribute": "indeterminate",
269
277
  "reflect": false,
270
278
  "defaultValue": "false"
271
279
  },
272
- "disabled": {
280
+ "dsDisabled": {
273
281
  "type": "boolean",
282
+ "attribute": "ds-disabled",
274
283
  "mutable": false,
275
284
  "complexType": {
276
285
  "original": "boolean",
@@ -281,16 +290,16 @@ export class DsCheckbox {
281
290
  "optional": false,
282
291
  "docs": {
283
292
  "tags": [],
284
- "text": ""
293
+ "text": "Passed to the `disabled` attribute of the `input` element of the rendered checkbox."
285
294
  },
286
295
  "getter": false,
287
296
  "setter": false,
288
- "attribute": "disabled",
289
297
  "reflect": false,
290
298
  "defaultValue": "false"
291
299
  },
292
- "errorText": {
300
+ "dsErrorText": {
293
301
  "type": "string",
302
+ "attribute": "ds-error-text",
294
303
  "mutable": false,
295
304
  "complexType": {
296
305
  "original": "string",
@@ -301,16 +310,16 @@ export class DsCheckbox {
301
310
  "optional": false,
302
311
  "docs": {
303
312
  "tags": [],
304
- "text": ""
313
+ "text": "Error message shown below the text input.\nIf set, the checkbox is shown in an invalid state."
305
314
  },
306
315
  "getter": false,
307
316
  "setter": false,
308
- "attribute": "error-text",
309
317
  "reflect": false,
310
318
  "defaultValue": "''"
311
319
  },
312
- "errorsDisabled": {
320
+ "dsErrorsDisabled": {
313
321
  "type": "boolean",
322
+ "attribute": "ds-errors-disabled",
314
323
  "mutable": false,
315
324
  "complexType": {
316
325
  "original": "boolean",
@@ -321,16 +330,16 @@ export class DsCheckbox {
321
330
  "optional": false,
322
331
  "docs": {
323
332
  "tags": [],
324
- "text": ""
333
+ "text": "Used internally in checkbox group to disable error messages\nfor a single checkbox."
325
334
  },
326
335
  "getter": false,
327
336
  "setter": false,
328
- "attribute": "data-errors-disabled",
329
337
  "reflect": false,
330
338
  "defaultValue": "false"
331
339
  },
332
- "required": {
340
+ "dsRequired": {
333
341
  "type": "boolean",
342
+ "attribute": "ds-required",
334
343
  "mutable": false,
335
344
  "complexType": {
336
345
  "original": "boolean",
@@ -341,16 +350,16 @@ export class DsCheckbox {
341
350
  "optional": false,
342
351
  "docs": {
343
352
  "tags": [],
344
- "text": ""
353
+ "text": "Passed to the `required` attribute of the `input` element of the rendered checkbox."
345
354
  },
346
355
  "getter": false,
347
356
  "setter": false,
348
- "attribute": "required",
349
357
  "reflect": false,
350
358
  "defaultValue": "false"
351
359
  },
352
- "optional": {
360
+ "dsOptional": {
353
361
  "type": "boolean",
362
+ "attribute": "ds-optional",
354
363
  "mutable": false,
355
364
  "complexType": {
356
365
  "original": "boolean",
@@ -361,16 +370,16 @@ export class DsCheckbox {
361
370
  "optional": false,
362
371
  "docs": {
363
372
  "tags": [],
364
- "text": ""
373
+ "text": "Displays indicator that the checkbox is optional alongside label."
365
374
  },
366
375
  "getter": false,
367
376
  "setter": false,
368
- "attribute": "optional",
369
377
  "reflect": false,
370
378
  "defaultValue": "false"
371
379
  },
372
- "optionalText": {
380
+ "dsOptionalText": {
373
381
  "type": "string",
382
+ "attribute": "ds-optional-text",
374
383
  "mutable": false,
375
384
  "complexType": {
376
385
  "original": "string",
@@ -381,15 +390,15 @@ export class DsCheckbox {
381
390
  "optional": true,
382
391
  "docs": {
383
392
  "tags": [],
384
- "text": ""
393
+ "text": "Text shown alongside label, if the checkbox is set as optional."
385
394
  },
386
395
  "getter": false,
387
396
  "setter": false,
388
- "attribute": "optional-text",
389
397
  "reflect": false
390
398
  },
391
- "ariaLabel": {
399
+ "dsAriaLabel": {
392
400
  "type": "string",
401
+ "attribute": "ds-aria-label",
393
402
  "mutable": false,
394
403
  "complexType": {
395
404
  "original": "string",
@@ -400,45 +409,45 @@ export class DsCheckbox {
400
409
  "optional": false,
401
410
  "docs": {
402
411
  "tags": [],
403
- "text": ""
412
+ "text": "Passed to the `aria-label` attribute of the `input` element of the rendered checkbox."
404
413
  },
405
414
  "getter": false,
406
415
  "setter": false,
407
- "attribute": "aria-label",
408
416
  "reflect": false
409
417
  }
410
418
  };
411
419
  }
412
420
  static get states() {
413
421
  return {
414
- "value": {},
422
+ "invalid": {},
423
+ "initialChecked": {},
415
424
  "validationMessage": {}
416
425
  };
417
426
  }
418
427
  static get events() {
419
428
  return [{
420
- "method": "dsCheckboxInput",
421
- "name": "dsCheckboxInput",
429
+ "method": "dsChange",
430
+ "name": "dsChange",
422
431
  "bubbles": true,
423
432
  "cancelable": true,
424
433
  "composed": true,
425
434
  "docs": {
426
435
  "tags": [],
427
- "text": ""
436
+ "text": "The `dsChange` event is fired each time the `value` property of\nthe `ds-checkbox` element is changed."
428
437
  },
429
438
  "complexType": {
430
- "original": "DsCheckboxInputEvent",
431
- "resolved": "DsCheckboxInputEvent",
432
- "references": {
433
- "DsCheckboxInputEvent": {
434
- "location": "local",
435
- "path": "/Users/teemuparssinen/hy/uh-design-system/component-library/packages/component-library/src/components/01-base-components/ds-checkbox/ds-checkbox.tsx",
436
- "id": "src/components/01-base-components/ds-checkbox/ds-checkbox.tsx::DsCheckboxInputEvent"
437
- }
438
- }
439
+ "original": "boolean",
440
+ "resolved": "boolean",
441
+ "references": {}
439
442
  }
440
443
  }];
441
444
  }
442
445
  static get elementRef() { return "el"; }
446
+ static get watchers() {
447
+ return [{
448
+ "propName": "dsChecked",
449
+ "methodName": "dsCheckedObserver"
450
+ }];
451
+ }
443
452
  static get attachInternalsMemberName() { return "internals"; }
444
453
  }