@uh-design-system/component-library 0.5.3 → 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 (217) 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 +82 -32
  8. package/dist/cjs/ds-checkbox.cjs.entry.js +70 -64
  9. package/dist/cjs/ds-icon.cjs.entry.js +943 -0
  10. package/dist/cjs/ds-input-validity.cjs.entry.js +13 -14
  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 +72 -30
  14. package/dist/cjs/ds-radio-button.cjs.entry.js +60 -59
  15. package/dist/cjs/ds-spinner.cjs.entry.js +62 -0
  16. package/dist/cjs/ds-text-input.cjs.entry.js +89 -77
  17. package/dist/cjs/ds-visually-hidden.cjs.entry.js +17 -0
  18. package/dist/cjs/index-Bp6Dd2i1.js +94 -0
  19. package/dist/cjs/{store-e8e87298.js → index-DwLFyR5p.js} +6 -2
  20. package/dist/cjs/{index-947af833.js → index-Mjp9Y-Sw.js} +666 -52
  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 +74 -2
  27. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.css +7 -6
  28. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +88 -45
  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 +38 -70
  33. package/dist/collection/components/01-base-components/ds-button/ds-button.js +91 -91
  34. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.examples.stories.js +84 -52
  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 -75
  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 +23 -30
  43. package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.js +112 -84
  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 +1 -2
  47. package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.js +170 -45
  48. package/dist/collection/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.features.stories.js +153 -44
  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.js +60 -30
  53. package/dist/collection/components/01-base-components/ds-input-validity/stories/ds-input-validity.features.stories.js +4 -4
  54. package/dist/collection/components/01-base-components/ds-input-validity/stories/ds-input-validity.stories.js +4 -9
  55. package/dist/collection/components/01-base-components/ds-link/ds-link.css +13 -3
  56. package/dist/collection/components/01-base-components/ds-link/ds-link.js +74 -75
  57. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.examples.stories.js +27 -27
  58. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.features.stories.js +38 -21
  59. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.stories.js +8 -67
  60. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.css +1 -3
  61. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.js +30 -52
  62. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.examples.stories.js +4 -4
  63. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.features.stories.js +6 -6
  64. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.stories.js +4 -28
  65. package/dist/collection/components/01-base-components/ds-radio-button/ds-radio-button.css +26 -27
  66. package/dist/collection/components/01-base-components/ds-radio-button/ds-radio-button.js +98 -117
  67. package/dist/collection/components/01-base-components/ds-radio-button/stories/ds-radio-button.features.stories.js +29 -27
  68. package/dist/collection/components/01-base-components/ds-radio-button/stories/ds-radio-button.stories.js +9 -23
  69. package/dist/collection/components/01-base-components/ds-radio-button-group/ds-radio-button-group.css +1 -2
  70. package/dist/collection/components/01-base-components/ds-radio-button-group/ds-radio-button-group.js +111 -38
  71. package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.examples.stories.js +16 -25
  72. package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.features.stories.js +40 -27
  73. package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.stories.js +23 -22
  74. package/dist/collection/components/01-base-components/ds-spinner/ds-spinner.css +34 -64
  75. package/dist/collection/components/01-base-components/ds-spinner/ds-spinner.js +42 -42
  76. package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.examples.stories.js +15 -17
  77. package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.features.stories.js +8 -8
  78. package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.stories.js +4 -49
  79. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.css +45 -78
  80. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +229 -155
  81. package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.examples.stories.js +26 -21
  82. package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.features.stories.js +40 -40
  83. package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.stories.js +30 -56
  84. package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.js +1 -1
  85. package/dist/collection/store.js +7 -1
  86. package/dist/collection/utils/attributes/attributes.js +2 -2
  87. package/dist/collection/utils/controls/controlUtils.js +35 -1
  88. package/dist/collection/utils/link/linkUtils.js +3 -2
  89. package/dist/collection/utils/utils.js +10 -9
  90. package/dist/component-library/{utils-cfc536bc.js → attributes-BD_lNRxn.js} +1 -1
  91. package/dist/component-library/component-library.css +1 -1
  92. package/dist/component-library/component-library.esm.js +1 -1
  93. package/dist/component-library/controlUtils-CNER0MvM.js +1 -0
  94. package/dist/component-library/ds-accordion.entry.js +1 -0
  95. package/dist/component-library/ds-button.entry.js +1 -0
  96. package/dist/component-library/ds-card.entry.js +1 -0
  97. package/dist/component-library/ds-checkbox-group.entry.js +1 -1
  98. package/dist/component-library/ds-checkbox.entry.js +1 -1
  99. package/dist/component-library/ds-icon.entry.js +1 -0
  100. package/dist/component-library/ds-input-validity.entry.js +1 -1
  101. package/dist/component-library/ds-link-with-arrow.entry.js +1 -1
  102. package/dist/component-library/ds-link.entry.js +1 -1
  103. package/dist/component-library/ds-radio-button-group.entry.js +1 -1
  104. package/dist/component-library/ds-radio-button.entry.js +1 -1
  105. package/dist/component-library/ds-spinner.entry.js +1 -0
  106. package/dist/component-library/ds-text-input.entry.js +1 -1
  107. package/dist/component-library/ds-visually-hidden.entry.js +1 -0
  108. package/dist/component-library/index-BfTCfPZ1.js +6 -0
  109. package/dist/component-library/index-Cm7V4EAn.js +2 -0
  110. package/dist/component-library/index-DuYjhvTn.js +1 -0
  111. package/dist/component-library/index.esm.js +1 -1
  112. package/dist/component-library/linkUtils-02nCfO0F.js +1 -0
  113. package/dist/component-library/utils-CqaqnfY4.js +1 -0
  114. package/dist/components/attributes.js +3 -3
  115. package/dist/components/controlUtils.js +35 -2
  116. package/dist/components/ds-accordion.js +39 -33
  117. package/dist/components/ds-button2.js +49 -51
  118. package/dist/components/ds-card.d.ts +11 -0
  119. package/dist/components/ds-card.js +91 -0
  120. package/dist/components/ds-checkbox-group.js +88 -39
  121. package/dist/components/ds-checkbox2.js +73 -64
  122. package/dist/components/ds-icon2.js +292 -292
  123. package/dist/components/ds-input-validity2.js +16 -13
  124. package/dist/components/ds-link-with-arrow.js +22 -22
  125. package/dist/components/ds-link.js +43 -40
  126. package/dist/components/ds-radio-button-group.js +72 -34
  127. package/dist/components/ds-radio-button.js +63 -61
  128. package/dist/components/ds-spinner2.js +31 -32
  129. package/dist/components/ds-text-input.js +114 -99
  130. package/dist/components/ds-visually-hidden2.js +2 -3
  131. package/dist/components/index.js +208 -2
  132. package/dist/components/index2.js +679 -36
  133. package/dist/components/index3.js +69 -57
  134. package/dist/components/linkUtils.js +4 -2
  135. package/dist/docs.d.ts +443 -0
  136. package/dist/docs.json +4790 -0
  137. package/dist/esm/{utils-cfc536bc.js → attributes-BD_lNRxn.js} +3 -26
  138. package/dist/esm/component-library.js +6 -5
  139. package/dist/esm/controlUtils-CNER0MvM.js +37 -0
  140. package/dist/esm/ds-accordion.entry.js +77 -0
  141. package/dist/esm/ds-button.entry.js +105 -0
  142. package/dist/esm/ds-card.entry.js +56 -0
  143. package/dist/esm/ds-checkbox-group.entry.js +81 -29
  144. package/dist/esm/ds-checkbox.entry.js +60 -52
  145. package/dist/esm/ds-icon.entry.js +941 -0
  146. package/dist/esm/ds-input-validity.entry.js +13 -12
  147. package/dist/esm/ds-link-with-arrow.entry.js +21 -18
  148. package/dist/esm/ds-link.entry.js +34 -29
  149. package/dist/esm/ds-radio-button-group.entry.js +71 -27
  150. package/dist/esm/ds-radio-button.entry.js +52 -49
  151. package/dist/esm/ds-spinner.entry.js +60 -0
  152. package/dist/esm/ds-text-input.entry.js +87 -73
  153. package/dist/esm/ds-visually-hidden.entry.js +15 -0
  154. package/dist/esm/index-BfTCfPZ1.js +92 -0
  155. package/dist/esm/{index-84fd0ee9.js → index-Cm7V4EAn.js} +665 -31
  156. package/dist/{components/store.js → esm/index-DuYjhvTn.js} +6 -3
  157. package/dist/esm/index.js +2 -2
  158. package/dist/esm/{linkUtils-3d1b28cf.js → linkUtils-02nCfO0F.js} +4 -2
  159. package/dist/esm/loader.js +4 -4
  160. package/dist/esm/utils-CqaqnfY4.js +25 -0
  161. package/dist/hydrate/index.d.ts +271 -0
  162. package/dist/hydrate/index.js +22280 -0
  163. package/dist/hydrate/index.mjs +22272 -0
  164. package/dist/hydrate/package.json +12 -0
  165. package/dist/styles/helpers.css +9 -1
  166. package/dist/styles/helpers.css.map +1 -1
  167. package/dist/styles/mixins/_breakpoints.scss +1 -2
  168. package/dist/styles/mixins/_focus.scss +3 -5
  169. package/dist/styles/mixins.scss +8 -6
  170. package/dist/styles/variables.css +32 -24
  171. package/dist/styles/variables.css.map +1 -1
  172. package/dist/types/components/01-base-components/ds-accordion/ds-accordion.d.ts +11 -8
  173. package/dist/types/components/01-base-components/ds-button/ds-button.d.ts +14 -14
  174. package/dist/types/components/01-base-components/ds-button/stories/ds-button.features.stories.d.ts +1 -0
  175. package/dist/types/components/01-base-components/ds-card/ds-card.d.ts +20 -0
  176. package/dist/types/components/01-base-components/ds-card/stories/ds-card.examples.stories.d.ts +8 -0
  177. package/dist/types/components/01-base-components/ds-card/stories/ds-card.features.stories.d.ts +8 -0
  178. package/dist/types/components/01-base-components/ds-card/stories/ds-card.stories.d.ts +7 -0
  179. package/dist/types/components/01-base-components/ds-checkbox/ds-checkbox.d.ts +16 -13
  180. package/dist/types/components/01-base-components/ds-checkbox-group/ds-checkbox-group.d.ts +16 -7
  181. package/dist/types/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.features.stories.d.ts +3 -0
  182. package/dist/types/components/01-base-components/ds-icon/ds-icon.d.ts +7 -5
  183. package/dist/types/components/01-base-components/ds-input-validity/ds-input-validity.d.ts +5 -6
  184. package/dist/types/components/01-base-components/ds-link/ds-link.d.ts +13 -14
  185. package/dist/types/components/01-base-components/ds-link/stories/ds-link.features.stories.d.ts +2 -0
  186. package/dist/types/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.d.ts +5 -7
  187. package/dist/types/components/01-base-components/ds-radio-button/ds-radio-button.d.ts +14 -14
  188. package/dist/types/components/01-base-components/ds-radio-button/stories/ds-radio-button.features.stories.d.ts +1 -1
  189. package/dist/types/components/01-base-components/ds-radio-button-group/ds-radio-button-group.d.ts +16 -6
  190. package/dist/types/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.features.stories.d.ts +1 -0
  191. package/dist/types/components/01-base-components/ds-spinner/ds-spinner.d.ts +7 -7
  192. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.d.ts +37 -32
  193. package/dist/types/components.d.ts +1225 -281
  194. package/dist/types/stencil-public-runtime.d.ts +22 -0
  195. package/dist/types/store.d.ts +6 -1
  196. package/dist/types/utils/attributes/attributes.d.ts +1 -1
  197. package/dist/types/utils/controls/controlUtils.d.ts +2 -0
  198. package/dist/types/utils/link/linkUtils.d.ts +1 -1
  199. package/dist/types/utils/utils.d.ts +2 -1
  200. package/package.json +28 -24
  201. package/dist/cjs/controlUtils-8bf55ef0.js +0 -7
  202. package/dist/cjs/ds-accordion_5.cjs.entry.js +0 -1190
  203. package/dist/cjs/index-5b0b9d4c.js +0 -82
  204. package/dist/component-library/controlUtils-c2ba44bd.js +0 -1
  205. package/dist/component-library/ds-accordion_5.entry.js +0 -1
  206. package/dist/component-library/index-72ac5051.js +0 -6
  207. package/dist/component-library/index-84fd0ee9.js +0 -2
  208. package/dist/component-library/linkUtils-3d1b28cf.js +0 -1
  209. package/dist/component-library/store-73a56075.js +0 -1
  210. package/dist/esm/controlUtils-c2ba44bd.js +0 -4
  211. package/dist/esm/ds-accordion_5.entry.js +0 -1182
  212. package/dist/esm/index-72ac5051.js +0 -80
  213. package/dist/esm/store-73a56075.js +0 -204
  214. package/dist/loader/package.json +0 -11
  215. /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
  216. /package/dist/component-library/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  217. /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
@@ -1,22 +1,21 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-947af833.js');
6
- const index$1 = require('./index-5b0b9d4c.js');
7
- const store = require('./store-e8e87298.js');
3
+ var index = require('./index-Mjp9Y-Sw.js');
4
+ var index$1 = require('./index-Bp6Dd2i1.js');
5
+ var index$2 = require('./index-DwLFyR5p.js');
8
6
 
9
7
  const dsInputValidityCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.ds-input-validity{display:flex;align-items:center;margin-top:var(--ds-spacing-2xSmall);gap:var(--ds-spacing-2xSmall)}.ds-input-validity--error{color:var(--ds-palette-red-70)}.ds-input-validity--success{color:var(--ds-palette-green-70)}.ds-input-validity ds-icon{display:block;height:1.5rem}.ds-input-validity small{font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}";
10
- const DsInputValidityStyle0 = dsInputValidityCss;
11
8
 
12
9
  const DsInputValidity = class {
13
10
  constructor(hostRef) {
14
11
  index.registerInstance(this, hostRef);
15
12
  }
16
13
  get el() { return index.getElement(this); }
17
- text;
18
- type = 'error';
19
- validityRole;
14
+ dsText;
15
+ dsType = 'error';
16
+ dsValidityRole;
17
+ dsAriaLive;
18
+ dsAriaAtomic;
20
19
  identifier;
21
20
  componentDidLoad() {
22
21
  this.identifier = this.el.getAttribute('id');
@@ -24,13 +23,13 @@ const DsInputValidity = class {
24
23
  }
25
24
  render() {
26
25
  const classes = index$1.classNames('ds-input-validity', {
27
- 'ds-input-validity--error': this.type === 'error',
28
- 'ds-input-validity--success': this.type === 'success',
26
+ 'ds-input-validity--error': this.dsType === 'error',
27
+ 'ds-input-validity--success': this.dsType === 'success',
29
28
  });
30
- const icon = this.type === 'success' ? 'check_circle_fill' : 'warning_fill';
31
- return (index.h("div", { key: 'b76f90369546a44b88ff02ec08182ebf2299c0e9', role: store.isValidation('client') ? this.validityRole : undefined }, this.text && (index.h("div", { key: '575d68fff500bac58612514a3c4efebdb62dffdb', class: classes }, index.h("ds-icon", { key: '707c95678fdf517f83bc5126a1fcea0d9f8eb5cb', name: icon }), index.h("small", { key: '39e098386b1ed37c9d797513d626bb50e2e50034', id: this.identifier }, this.text)))));
29
+ const icon = this.dsType === 'success' ? 'check_circle_fill' : 'warning_fill';
30
+ return (index.h("div", { key: '469ca293035b5f7f7f832fcde1651aef6d8a7e93', role: index$2.isValidation('client') ? this.dsValidityRole : undefined, "aria-live": index$2.isValidation('client') ? this.dsAriaLive : undefined, "aria-atomic": index$2.isValidation('client') ? this.dsAriaAtomic : undefined }, this.dsText && (index.h("div", { key: 'c1b800c75f2434fd3f26f656289853897a5fd485', class: classes }, index.h("ds-icon", { key: '7af7ca8d0ab5be6b795f4143c310b5134cadc7cd', dsName: icon }), index.h("small", { key: '81f8f36d3558f98331a0ec15cffcc3a6bb41f449', id: this.identifier }, this.dsText)))));
32
31
  }
33
32
  };
34
- DsInputValidity.style = DsInputValidityStyle0;
33
+ DsInputValidity.style = dsInputValidityCss;
35
34
 
36
35
  exports.ds_input_validity = DsInputValidity;
@@ -1,14 +1,13 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
3
+ var index = require('./index-Mjp9Y-Sw.js');
4
+ var index$1 = require('./index-Bp6Dd2i1.js');
5
+ var attributes = require('./attributes-BMbXzbwU.js');
6
+ var linkUtils = require('./linkUtils-onlbgKdI.js');
7
+ var utils = require('./utils-BjZTECpy.js');
8
+ require('./index-DwLFyR5p.js');
4
9
 
5
- const index = require('./index-947af833.js');
6
- const index$1 = require('./index-5b0b9d4c.js');
7
- const utils = require('./utils-3412cbed.js');
8
- const linkUtils = require('./linkUtils-695da37c.js');
9
-
10
- const dsLinkWithArrowCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}:host{display:inline-block}.ds-link-with-arrow{display:inline-flex;align-items:center;color:var(--ds-palette-mainBlue-70);letter-spacing:var(--ds-letterSpacing-wide);font-weight:var(--ds-fontWeight-semibold);font-size:var(--ds-fontSize-16);text-decoration-line:none}.ds-link-with-arrow:focus-visible{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-palette-white);outline-color:var(--ds-palette-black-95);outline-offset:calc(var(--ds-borderWidth-thin) * 1);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}@media (min-width: 30rem){.ds-link-with-arrow{font-size:var(--ds-fontSize-18)}}.ds-link-with-arrow__icon{display:inline-flex;width:2em;height:2em;line-height:0;align-items:center;justify-content:center;color:var(--ds-palette-white);background-color:var(--ds-palette-mainBlue-70)}.ds-link-with-arrow__icon--start{margin-right:var(--ds-spacing-xSmall)}.ds-link-with-arrow__icon--end{margin-left:var(--ds-spacing-xSmall)}:hover slot>.ds-link-with-arrow__icon{outline:10px solid;background-color:var(--ds-palette-mainBlue-80)}:active slot>.ds-link-with-arrow__icon{background-color:var(--ds-palette-mainBlue-90)}.ds-link-with-arrow:hover,.ds-link-with-arrow:active{text-decoration-line:underline;text-decoration-style:solid;text-decoration-skip-ink:auto;text-decoration-thickness:7%;text-underline-offset:12%;text-underline-position:from-font}.ds-link-with-arrow:hover{color:var(--ds-palette-mainBlue-80)}.ds-link-with-arrow:active,.ds-link-with-arrow:focus-visible{color:var(--ds-palette-mainBlue-90)}";
11
- const DsLinkWithArrowStyle0 = dsLinkWithArrowCss;
10
+ const dsLinkWithArrowCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}:host{display:inline-block}.ds-link-with-arrow{display:inline-flex;align-items:center;color:var(--ds-palette-mainBlue-70);letter-spacing:var(--ds-letterSpacing-wide);font-weight:var(--ds-fontWeight-semibold);font-size:var(--ds-fontSize-16);text-decoration-line:none}.ds-link-with-arrow:focus-visible{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-palette-white);outline:var(--ds-borderWidth-thin) solid var(--ds-palette-black-95);outline-offset:calc(var(--ds-borderWidth-thin) * 1)}@media (min-width: 30rem){.ds-link-with-arrow{font-size:var(--ds-fontSize-18)}}.ds-link-with-arrow__icon{display:inline-flex;width:2em;height:2em;line-height:0;align-items:center;justify-content:center;color:var(--ds-palette-white);background-color:var(--ds-palette-mainBlue-70)}.ds-link-with-arrow__icon--start{margin-right:var(--ds-spacing-xSmall)}.ds-link-with-arrow__icon--end{margin-left:var(--ds-spacing-xSmall)}:hover slot>.ds-link-with-arrow__icon{outline:10px solid;background-color:var(--ds-palette-mainBlue-80)}:active slot>.ds-link-with-arrow__icon{background-color:var(--ds-palette-mainBlue-90)}.ds-link-with-arrow:hover,.ds-link-with-arrow:active{text-decoration-line:underline;text-decoration-style:solid;text-decoration-skip-ink:auto;text-decoration-thickness:7%;text-underline-offset:12%;text-underline-position:from-font}.ds-link-with-arrow:hover{color:var(--ds-palette-mainBlue-80)}.ds-link-with-arrow:active,.ds-link-with-arrow:focus-visible{color:var(--ds-palette-mainBlue-90)}";
12
11
 
13
12
  const visuallyHiddenAssistiveTextIdGenerator = utils.idGenerator('visually-hidden-assistive-text');
14
13
  const DsLinkWithArrow = class {
@@ -20,15 +19,17 @@ const DsLinkWithArrow = class {
20
19
  rel;
21
20
  visuallyHiddenAssistiveTextId = visuallyHiddenAssistiveTextIdGenerator.next().value;
22
21
  get el() { return index.getElement(this); }
23
- text;
24
- iconPosition = 'start';
25
- href;
26
- target;
27
- language;
28
- ariaLabel;
22
+ dsText;
23
+ dsIconPosition = 'start';
24
+ dsHref;
25
+ dsTarget;
26
+ dsAriaLabel;
29
27
  componentWillLoad() {
30
- this.inheritedAttributes = utils.inheritAriaAttributes(this.el, ['aria-label']);
31
- if (linkUtils.opensInNewTab(this.target)) {
28
+ this.inheritedAttributes = {
29
+ ...attributes.inheritAriaAttributes(this.el, ['aria-label']),
30
+ ...attributes.inheritSpecifiedAttributes(this.el, ['lang']),
31
+ };
32
+ if (linkUtils.opensInNewTab(this.dsTarget)) {
32
33
  this.icon = 'arrow_outward';
33
34
  this.rel = 'noopener noreferrer';
34
35
  }
@@ -36,12 +37,12 @@ const DsLinkWithArrow = class {
36
37
  render() {
37
38
  const classes = index$1.classNames('ds-link-with-arrow');
38
39
  const iconClasses = index$1.classNames('ds-link-with-arrow__icon', {
39
- 'ds-link-with-arrow__icon--start': this.iconPosition === 'start',
40
- 'ds-link-with-arrow__icon--end': this.iconPosition === 'end',
40
+ 'ds-link-with-arrow__icon--start': this.dsIconPosition === 'start',
41
+ 'ds-link-with-arrow__icon--end': this.dsIconPosition === 'end',
41
42
  });
42
- return (index.h("a", { key: '07c30d407ab9399a29f3949bc4f9ea1139f9fa97', href: this.href, class: classes, rel: this.rel, target: this.target, "aria-label": utils.getAriaLabel(this.text, this.ariaLabel), ...this.inheritedAttributes }, index.h("slot", { key: 'bebb1091f27d49871da79235aed5772bd1059f3d', name: "iconStart" }, this.iconPosition === 'start' && index.h("ds-icon", { key: 'c7bfbfdc9953138b510b5e37830cdd1f7837bae6', name: this.icon, class: iconClasses, size: "1.4em" })), this.text, index.h("slot", { key: 'f4a8369cf54fb4d9f8aeea193c7aa52c14a59e2b', name: "iconStart" }, this.iconPosition === 'end' && index.h("ds-icon", { key: '430e7a77fe1bfa7af5f49873f1aff7371437d345', name: this.icon, class: iconClasses, size: "1.4em" })), linkUtils.opensInNewTab(this.target) && (index.h("ds-visually-hidden", { key: '3e0b84c6648fa683320e602df7f83776f9698d74', id: this.visuallyHiddenAssistiveTextId }, linkUtils.visuallyHiddenAssistiveText(this.language ?? document.documentElement.lang)))));
43
+ return (index.h("a", { key: 'be8d2878b2b0801df9d5b5988aa96ac251f659cc', href: this.dsHref, class: classes, rel: this.rel, target: this.dsTarget, "aria-label": this.dsAriaLabel, ...this.inheritedAttributes }, index.h("slot", { key: '7b5247167879c1b0335c33c1fcf74551bb78b25d', name: "prefix" }, this.dsIconPosition === 'start' && index.h("ds-icon", { key: 'd1c996dee504b053d11ad790b7ce545b1e1eab1a', dsName: this.icon, class: iconClasses, dsSize: "1.4em" })), this.dsText, index.h("slot", { key: 'd7f14b3e9f57dc3761254852f94267a55474cd3e', name: "suffix" }, this.dsIconPosition === 'end' && index.h("ds-icon", { key: 'c174d0e68979dc095a08936e6fffcc3a9e434088', dsName: this.icon, class: iconClasses, dsSize: "1.4em" })), linkUtils.opensInNewTab(this.dsTarget) && index.h("ds-visually-hidden", { key: 'de0de903e0bf1733b8be9fc2b35797e944cd3470', id: this.visuallyHiddenAssistiveTextId }, linkUtils.visuallyHiddenAssistiveText())));
43
44
  }
44
45
  };
45
- DsLinkWithArrow.style = DsLinkWithArrowStyle0;
46
+ DsLinkWithArrow.style = dsLinkWithArrowCss;
46
47
 
47
48
  exports.ds_link_with_arrow = DsLinkWithArrow;
@@ -1,14 +1,13 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
3
+ var index = require('./index-Mjp9Y-Sw.js');
4
+ var index$1 = require('./index-Bp6Dd2i1.js');
5
+ var attributes = require('./attributes-BMbXzbwU.js');
6
+ var linkUtils = require('./linkUtils-onlbgKdI.js');
7
+ var utils = require('./utils-BjZTECpy.js');
8
+ require('./index-DwLFyR5p.js');
4
9
 
5
- const index = require('./index-947af833.js');
6
- const index$1 = require('./index-5b0b9d4c.js');
7
- const utils = require('./utils-3412cbed.js');
8
- const linkUtils = require('./linkUtils-695da37c.js');
9
-
10
- const dsLinkCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}:host{display:inline-block}.ds-link{display:inline-flex;align-items:center;color:var(--ds-palette-mainBlue-70);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);text-decoration-line:underline;text-decoration-style:solid;text-decoration-skip-ink:auto;text-decoration-thickness:7%;text-underline-offset:12%;text-underline-position:from-font}.ds-link:focus-visible{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-palette-white);outline-color:var(--ds-palette-black-95);outline-offset:calc(var(--ds-borderWidth-thin) * 1);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-link--semibold{font-weight:var(--ds-fontWeight-semibold)}.ds-link--bold{font-weight:var(--ds-fontWeight-bold)}.ds-link--2xLarge{font-size:var(--ds-fontSize-22)}.ds-link--xLarge{font-size:var(--ds-fontSize-20)}.ds-link--large{font-size:var(--ds-fontSize-18)}.ds-link--medium{font-size:var(--ds-fontSize-16)}.ds-link--small{font-size:var(--ds-fontSize-14)}.ds-link--xSmall{font-size:var(--ds-fontSize-12)}.ds-link__icon{height:1em;width:1em}.ds-link__icon--start-inline{margin-right:var(--ds-spacing-3xSmall)}.ds-link__icon--start-standalone{margin-right:var(--ds-spacing-2xSmall)}.ds-link__icon--end-inline{margin-left:var(--ds-spacing-3xSmall)}.ds-link__icon--end-standalone{margin-left:var(--ds-spacing-2xSmall)}.ds-link:hover,.ds-link:active{text-decoration-thickness:13%;text-underline-offset:12%}.ds-link:hover{color:var(--ds-palette-mainBlue-80)}.ds-link:active{color:var(--ds-palette-mainBlue-90)}.ds-link:visited{color:#551a8b}.ds-link--standalone{color:var(--ds-palette-mainBlue-70);text-decoration-line:none}.ds-link--standalone:hover,.ds-link--standalone:active{text-decoration-line:underline}.ds-link--standalone:hover{color:var(--ds-palette-mainBlue-80)}.ds-link--standalone:active{color:var(--ds-palette-mainBlue-90)}.ds-link--standalone:focus-visible{color:var(--ds-palette-mainBlue-70)}.ds-link--standalone:visited{color:var(--ds-palette-mainBlue-70)}";
11
- const DsLinkStyle0 = dsLinkCss;
10
+ const dsLinkCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}:host{display:inline-block}.ds-link{display:inline-flex;align-items:center;color:var(--ds-palette-mainBlue-70);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);text-decoration-line:underline;text-decoration-style:solid;text-decoration-skip-ink:auto;text-decoration-thickness:7%;text-underline-offset:12%;text-underline-position:from-font}.ds-link:focus-visible{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-palette-white);outline:var(--ds-borderWidth-thin) solid var(--ds-palette-black-95);outline-offset:calc(var(--ds-borderWidth-thin) * 1)}.ds-link--semibold{font-weight:var(--ds-fontWeight-semibold)}.ds-link--bold{font-weight:var(--ds-fontWeight-bold)}.ds-link--2xLarge{font-size:var(--ds-fontSize-22)}.ds-link--xLarge{font-size:var(--ds-fontSize-20)}.ds-link--large{font-size:var(--ds-fontSize-18)}.ds-link--medium{font-size:var(--ds-fontSize-16)}.ds-link--small{font-size:var(--ds-fontSize-14)}.ds-link--xSmall{font-size:var(--ds-fontSize-12)}.ds-link__icon{height:1em;width:1em}.ds-link__icon--start-inline{margin-right:var(--ds-spacing-3xSmall)}.ds-link__icon--start-standalone{margin-right:var(--ds-spacing-2xSmall)}.ds-link__icon--end-inline{margin-left:var(--ds-spacing-3xSmall)}.ds-link__icon--end-standalone{margin-left:var(--ds-spacing-2xSmall)}.ds-link:hover,.ds-link:active{text-decoration-thickness:13%;text-underline-offset:12%}.ds-link:hover{color:var(--ds-palette-mainBlue-80)}.ds-link:active{color:var(--ds-palette-mainBlue-90)}.ds-link:visited{color:#551a8b}.ds-link--standalone{color:var(--ds-palette-mainBlue-70);text-decoration-line:none}.ds-link--standalone:hover,.ds-link--standalone:active{text-decoration-line:underline}.ds-link--standalone:hover{color:var(--ds-palette-mainBlue-80)}.ds-link--standalone:active{color:var(--ds-palette-mainBlue-90)}.ds-link--standalone:focus-visible{color:var(--ds-palette-mainBlue-70)}.ds-link--standalone:visited{color:var(--ds-palette-mainBlue-70)}.ds-link--colour-white{color:var(--ds-palette-white)}.ds-link--colour-white:hover,.ds-link--colour-white:active,.ds-link--colour-white:visited,.ds-link--colour-white:focus-visible{color:var(--ds-palette-white)}.ds-link--colour-black{color:var(--ds-palette-black-95)}.ds-link--colour-black:hover,.ds-link--colour-black:active,.ds-link--colour-black:visited,.ds-link--colour-black:focus-visible{color:var(--ds-palette-black-95)}";
12
11
 
13
12
  const visuallyHiddenAssistiveTextIdGenerator = utils.idGenerator('visually-hidden-assistive-text');
14
13
  const DsLink = class {
@@ -19,38 +18,42 @@ const DsLink = class {
19
18
  rel;
20
19
  visuallyHiddenAssistiveTextId = visuallyHiddenAssistiveTextIdGenerator.next().value;
21
20
  get el() { return index.getElement(this); }
22
- text;
23
- size;
24
- variant = 'inline';
25
- weight = 'regular';
26
- icon = '';
27
- iconPosition = 'end';
28
- iconTitle;
29
- iconHidden;
30
- href;
31
- target;
32
- download;
33
- language;
34
- ariaLabel;
21
+ dsText;
22
+ dsSize;
23
+ dsVariant = 'inline';
24
+ dsWeight = 'regular';
25
+ dsIcon = '';
26
+ dsIconPosition = 'end';
27
+ dsIconTitle;
28
+ dsIconHidden;
29
+ dsHref;
30
+ dsTarget;
31
+ dsDownload;
32
+ dsAriaLabel;
33
+ dsColour;
35
34
  componentWillLoad() {
36
- this.inheritedAttributes = utils.inheritAriaAttributes(this.el, ['aria-label']);
37
- if (linkUtils.opensInNewTab(this.target)) {
38
- this.icon = 'open_in_new';
39
- this.iconPosition = 'end';
35
+ this.inheritedAttributes = {
36
+ ...attributes.inheritAriaAttributes(this.el, ['aria-label']),
37
+ ...attributes.inheritSpecifiedAttributes(this.el, ['lang']),
38
+ };
39
+ if (linkUtils.opensInNewTab(this.dsTarget)) {
40
+ this.dsIcon = 'open_in_new';
41
+ this.dsIconPosition = 'end';
40
42
  this.rel = 'noopener noreferrer';
41
43
  }
42
44
  }
43
45
  render() {
44
- const classes = index$1.classNames('ds-link', `ds-link--${this.weight}`, `ds-link--${this.variant}`, {
45
- [`ds-link--${this.size}`]: Boolean(this.size),
46
+ const classes = index$1.classNames('ds-link', `ds-link--${this.dsWeight}`, `ds-link--${this.dsVariant}`, {
47
+ [`ds-link--${this.dsSize}`]: !!this.dsSize,
48
+ [`ds-link--colour-${this.dsColour}`]: !!this.dsColour,
46
49
  });
47
50
  const iconClasses = index$1.classNames('ds-link__icon', {
48
- [`ds-link__icon--start-${this.variant}`]: this.iconPosition === 'start',
49
- [`ds-link__icon--end-${this.variant}`]: this.iconPosition === 'end',
51
+ [`ds-link__icon--start-${this.dsVariant}`]: this.dsIconPosition === 'start',
52
+ [`ds-link__icon--end-${this.dsVariant}`]: this.dsIconPosition === 'end',
50
53
  });
51
- return (index.h("a", { key: 'e8db9e6a903263d717a386e2fd61a2f279c4de1d', href: this.href, class: classes, rel: this.rel, target: this.target, download: this.download, "aria-label": utils.getAriaLabel(this.text, this.ariaLabel), ...this.inheritedAttributes }, index.h("slot", { key: '9def43becc24ab8f836ced9eb1f33de903fcfa40', name: "iconStart" }, this.icon && this.iconPosition === 'start' && index.h("ds-icon", { key: '301bbcf7464dca9e0e44cd9b74ccc77e67cbfac9', name: this.icon, class: iconClasses, size: "1em", title: this.iconTitle, hidden: this.iconHidden })), this.text, index.h("slot", { key: 'f6f3b7824f5bb028375f40e2e5743989a56f187d', name: "iconEnd" }, this.icon && this.iconPosition === 'end' && index.h("ds-icon", { key: '3af94f1f8e4f1199e260929001b99ee56f780dff', name: this.icon, class: iconClasses, size: "1em", title: this.iconTitle, hidden: this.iconHidden })), linkUtils.opensInNewTab(this.target) && (index.h("ds-visually-hidden", { key: 'f91801450c834793bf05a40f011b86f500422eee', id: this.visuallyHiddenAssistiveTextId }, linkUtils.visuallyHiddenAssistiveText(this.language ?? document.documentElement.lang)))));
54
+ return (index.h("a", { key: 'a2dadeffad7a9ea98044d8d9e655b9623cdb287e', href: this.dsHref, class: classes, rel: this.rel, target: this.dsTarget, download: this.dsDownload, "aria-label": this.dsAriaLabel, ...this.inheritedAttributes }, index.h("slot", { key: '731bfe4dc924dd63b2815daed0ebe8bf2f7c455e', name: "prefix" }, this.dsIcon && this.dsIconPosition === 'start' && (index.h("ds-icon", { key: '4070f566905c409d9489221edaebb796aaccf973', dsName: this.dsIcon, class: iconClasses, dsSize: "1em", dsTitle: this.dsIconTitle, dsHidden: this.dsIconHidden }))), this.dsText, index.h("slot", { key: 'a57232ddd92c4225efe30b22247e8bf649e1f98f', name: "suffix" }, this.dsIcon && this.dsIconPosition === 'end' && (index.h("ds-icon", { key: '12d9a52ab321c0f607013accf39ee82947bac4eb', dsName: this.dsIcon, class: iconClasses, dsSize: "1em", dsTitle: this.dsIconTitle, dsHidden: this.dsIconHidden }))), linkUtils.opensInNewTab(this.dsTarget) && index.h("ds-visually-hidden", { key: 'baf51d298ca730b60c969e980fe91eb6096bd791', id: this.visuallyHiddenAssistiveTextId }, linkUtils.visuallyHiddenAssistiveText())));
52
55
  }
53
56
  };
54
- DsLink.style = DsLinkStyle0;
57
+ DsLink.style = dsLinkCss;
55
58
 
56
59
  exports.ds_link = DsLink;
@@ -1,45 +1,69 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
3
+ var index = require('./index-Mjp9Y-Sw.js');
4
+ var index$1 = require('./index-Bp6Dd2i1.js');
5
+ var utils = require('./utils-BjZTECpy.js');
6
+ var attributes = require('./attributes-BMbXzbwU.js');
7
+ var controlUtils = require('./controlUtils-ofqiQxRF.js');
8
+ require('./index-DwLFyR5p.js');
4
9
 
5
- const index = require('./index-947af833.js');
6
- const index$1 = require('./index-5b0b9d4c.js');
7
- const utils = require('./utils-3412cbed.js');
8
-
9
- const dsRadioButtonGroupCss = ".ds-radio-button-group{display:inline-flex;flex-direction:column;border:none;padding:0;margin:0}.ds-radio-button-group__radio-buttons-slot{display:inline-flex;flex-direction:column}.ds-radio-button-group__radio-buttons-slot--horizontal{flex-direction:row;gap:var(--ds-spacing-small);flex-wrap:wrap}.ds-radio-button-group__legend{padding-inline:0;color:var(--ds-palette-black-95);font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large);margin-bottom:var(--ds-spacing-3xSmall)}.ds-radio-button-group__assistive-text{font-size:var(--ds-fontSize-14);color:var(--ds-palette-black-70);line-height:var(--ds-lineHeight-large);margin-bottom:var(--ds-spacing-2xSmall)}";
10
- const DsRadioButtonGroupStyle0 = dsRadioButtonGroupCss;
10
+ const dsRadioButtonGroupCss = ".ds-radio-button-group{display:inline-flex;flex-direction:column;border:none;padding:0;margin:0}.ds-radio-button-group__radio-buttons-slot{display:inline-flex;flex-direction:column}.ds-radio-button-group__radio-buttons-slot--horizontal{flex-flow:row wrap;gap:var(--ds-spacing-small)}.ds-radio-button-group__legend{padding-inline:0;color:var(--ds-palette-black-95);font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large);margin-bottom:var(--ds-spacing-3xSmall)}.ds-radio-button-group__assistive-text{font-size:var(--ds-fontSize-14);color:var(--ds-palette-black-70);line-height:var(--ds-lineHeight-large);margin-bottom:var(--ds-spacing-2xSmall)}";
11
11
 
12
12
  const radioButtonGroupIdGenerator = utils.idGenerator('ds-radio-button-group');
13
13
  const DsRadioButtonGroup = class {
14
14
  constructor(hostRef) {
15
15
  index.registerInstance(this, hostRef);
16
- this.dsRadioGroupValueChange = index.createEvent(this, "dsRadioGroupValueChange", 7);
17
- this.dsRadioGroupInvalidStateChange = index.createEvent(this, "dsRadioGroupInvalidStateChange", 7);
16
+ this.dsRadioGroupValueChange = index.createEvent(this, "dsRadioGroupValueChange");
17
+ this.dsRadioGroupInvalidStateChange = index.createEvent(this, "dsRadioGroupInvalidStateChange");
18
+ this.dsChange = index.createEvent(this, "dsChange");
19
+ if (hostRef.$hostElement$["s-ei"]) {
20
+ this.internals = hostRef.$hostElement$["s-ei"];
21
+ }
22
+ else {
23
+ this.internals = hostRef.$hostElement$.attachInternals();
24
+ hostRef.$hostElement$["s-ei"] = this.internals;
25
+ }
18
26
  }
19
27
  fieldsetId = radioButtonGroupIdGenerator.next().value;
20
28
  errorTextId = `${this.fieldsetId}-error`;
21
29
  assistiveTextId = `${this.fieldsetId}-assistive-text`;
22
30
  inheritedAttributes = {};
23
31
  get el() { return index.getElement(this); }
24
- legend;
25
- assistiveText;
26
- initialValue;
27
- direction = 'vertical';
28
- errorText = '';
29
- value;
32
+ internals;
33
+ dsLegend;
34
+ dsAssistiveText;
35
+ dsValue;
36
+ dsDirection = 'vertical';
37
+ dsErrorText = '';
38
+ dsRequired = false;
39
+ showInternalsValidationMessage = false;
30
40
  dsRadioGroupValueChange;
31
41
  dsRadioGroupInvalidStateChange;
42
+ dsChange;
43
+ getLegendText = () => {
44
+ if (this.dsRequired) {
45
+ return controlUtils.getRequiredText(this.dsLegend);
46
+ }
47
+ return this.dsLegend;
48
+ };
49
+ getValidationMessage = () => this.dsErrorText || (this.showInternalsValidationMessage ? this.internals?.validationMessage : '');
32
50
  getRadios = () => {
33
- return Array.from(this.el.querySelectorAll('ds-radio-button')).filter(e => !e.disabled);
51
+ return Array.from(this.el.querySelectorAll('ds-radio-button'));
52
+ };
53
+ getEnabledRadios = () => {
54
+ return this.getRadios().filter(e => !e.dsDisabled);
55
+ };
56
+ updateRadios = (updateFn) => {
57
+ this.getRadios().forEach(updateFn);
34
58
  };
35
59
  updateFocusableRadioButton = () => {
36
- const radios = this.getRadios();
60
+ const radios = this.getEnabledRadios();
37
61
  if (!radios.length) {
38
62
  return;
39
63
  }
40
64
  let focusableBtn = null;
41
65
  for (const radio of radios) {
42
- const isFocusable = radio.value === this.value;
66
+ const isFocusable = radio.dsValue === this.dsValue;
43
67
  radio.setFocusable(isFocusable);
44
68
  if (isFocusable) {
45
69
  focusableBtn = radio;
@@ -49,22 +73,38 @@ const DsRadioButtonGroup = class {
49
73
  radios[0].setFocusable(true);
50
74
  }
51
75
  };
76
+ formResetCallback() {
77
+ this.internals?.setValidity({});
78
+ }
52
79
  componentWillLoad() {
53
- this.value = this.initialValue;
54
- this.inheritedAttributes = utils.inheritAriaAttributes(this.el, ['aria-labelledby']);
80
+ this.inheritedAttributes = attributes.inheritAriaAttributes(this.el, ['aria-labelledby']);
55
81
  this.updateFocusableRadioButton();
56
82
  }
83
+ componentDidLoad() {
84
+ this.updateRadios(element => {
85
+ element.setAttribute('ds-errors-disabled', 'true');
86
+ });
87
+ if (this.dsRequired) {
88
+ this.internals?.setValidity({ valueMissing: true }, controlUtils.atLeastOneOption(), this.getRadios()?.[0].shadowRoot.querySelector('input'));
89
+ }
90
+ }
57
91
  async getValue() {
58
- return this.value;
92
+ return this.dsValue;
59
93
  }
60
94
  errorTextObserver(errorText) {
61
95
  this.dsRadioGroupInvalidStateChange.emit(!!errorText);
62
96
  }
97
+ dsValueObserver(value) {
98
+ this.dsChange.emit(value);
99
+ if (this.dsRequired) {
100
+ this.internals?.setValidity({ valueMissing: !value }, controlUtils.atLeastOneOption(), this.getRadios()?.[0].shadowRoot.querySelector('input'));
101
+ }
102
+ }
63
103
  onInputChange(e) {
64
104
  e.stopPropagation();
65
105
  const targetElem = e.target;
66
- this.value = targetElem.value;
67
- this.dsRadioGroupValueChange.emit(this.value);
106
+ this.dsValue = targetElem.dsValue;
107
+ this.dsRadioGroupValueChange.emit(this.dsValue);
68
108
  this.updateFocusableRadioButton();
69
109
  }
70
110
  onKeyDown(e) {
@@ -74,7 +114,7 @@ const DsRadioButtonGroup = class {
74
114
  if (e.target && !this.el.contains(e.target)) {
75
115
  return;
76
116
  }
77
- const radios = this.getRadios();
117
+ const radios = this.getEnabledRadios();
78
118
  if (e.target && !radios.includes(e.target)) {
79
119
  return;
80
120
  }
@@ -88,7 +128,7 @@ const DsRadioButtonGroup = class {
88
128
  nextIndex = (currentIndex + 1) % radios.length;
89
129
  }
90
130
  const nextElem = radios[nextIndex];
91
- nextElem.setFocus();
131
+ nextElem.dsFocus();
92
132
  nextElem.setChecked();
93
133
  }
94
134
  render() {
@@ -96,16 +136,18 @@ const DsRadioButtonGroup = class {
96
136
  const legendClasses = index$1.classNames('ds-radio-button-group__legend');
97
137
  const assistiveTextClasses = index$1.classNames('ds-radio-button-group__assistive-text');
98
138
  const radioButtonsSlotClasses = index$1.classNames('ds-radio-button-group__radio-buttons-slot', {
99
- 'ds-radio-button-group__radio-buttons-slot--horizontal': this.direction === 'horizontal',
139
+ 'ds-radio-button-group__radio-buttons-slot--horizontal': this.dsDirection === 'horizontal',
100
140
  });
101
141
  const errorClasses = index$1.classNames('ds-radio-button-group__error');
102
- const ariaDescribedBy = [!!this.errorText && this.errorTextId, !!this.assistiveText && this.assistiveTextId].filter(Boolean).join(' ');
103
- return (index.h(index.Host, { key: 'c29b30786a96a50976486eb107c707b973c06633', "data-invalid": !!this.errorText || undefined }, index.h("fieldset", { key: '90692a539c75bb81ae692b7209bd757c5d8b6b59', class: classes, "aria-describedby": ariaDescribedBy, ...this.inheritedAttributes }, index.h("legend", { key: '1d4f2819f0fa4ca020297cddccc87f684fc03461', class: legendClasses }, index.h("slot", { key: 'd9edb199de4975dd876bf68fa834f7d1b841bad2', name: "legend" }, this.legend)), index.h("slot", { key: 'e48f2924efd4e0f47fedb8c30df34735aa6bc2df', name: "assistiveText" }, this.assistiveText && (index.h("small", { key: 'ebbb68a63acce035872ce7ef22d2821941ea3ccc', class: assistiveTextClasses, id: this.assistiveTextId }, this.assistiveText))), index.h("div", { key: 'a146cbf465a9fe97e5380db66d0baecaa46797e1', class: radioButtonsSlotClasses }, index.h("slot", { key: 'd7623edbff9870335ae62451bad2b245e394d4d0', onSlotchange: this.updateFocusableRadioButton })), index.h("div", { key: '85381c3f1b7f28d5508cf866884f0f5df2e2413a', class: errorClasses }, index.h("ds-input-validity", { key: 'ebf9f79454c11f490261959e1bdb5433744f39a3', id: this.errorTextId, text: this.errorText, type: "error" })))));
142
+ const ariaDescribedBy = [!!this.dsAssistiveText && this.assistiveTextId, !!this.dsErrorText && this.errorTextId].filter(Boolean).join(' ');
143
+ return (index.h(index.Host, { key: 'fd0fece58fea50d7ea0672b7f49608c2cdcb306e', "data-invalid": !!this.dsErrorText || undefined }, index.h("fieldset", { key: '809c66ac58f880345c231b2930ddd9c91c61cbc2', class: classes, "aria-describedby": ariaDescribedBy, ...this.inheritedAttributes }, index.h("legend", { key: '5194fa04e6645381ef83ad5b4f09c98ea6757da4', class: legendClasses }, index.h("slot", { key: '2944e5176ce596d6ab5ee6ee735f5b1e5a4e892b', name: "legend" }, this.getLegendText())), index.h("slot", { key: '3df729bf79cef8d07e88c3e52e337a54a3fb4ead', name: "assistiveText" }, this.dsAssistiveText && (index.h("small", { key: '36148c44fd5cc17ae506ab598ff79de41e23b71f', class: assistiveTextClasses, id: this.assistiveTextId }, this.dsAssistiveText))), index.h("div", { key: '54380add5970ee72c0357b9562815d39a95602f0', class: radioButtonsSlotClasses }, index.h("slot", { key: '3ec766be90173f61dbb76b762c7f6d3f9781570f', onSlotchange: this.updateFocusableRadioButton })), (!!this.dsErrorText || this.dsRequired) && (index.h("slot", { key: 'c8ae86acd96ecba84d7ab83dad731511629e3f4b', name: "validity" }, index.h("div", { key: 'da0ce15f076e2c76ca040a6ad6100d706e576862', class: errorClasses }, index.h("ds-input-validity", { key: 'd9beed52855b81a8125cb0c6498b023357383328', id: this.errorTextId, dsText: this.getValidationMessage(), dsType: "error", dsAriaLive: "polite", dsAriaAtomic: "true" })))))));
104
144
  }
145
+ static get formAssociated() { return true; }
105
146
  static get watchers() { return {
106
- "errorText": ["errorTextObserver"]
147
+ "dsErrorText": ["errorTextObserver"],
148
+ "dsValue": ["dsValueObserver"]
107
149
  }; }
108
150
  };
109
- DsRadioButtonGroup.style = DsRadioButtonGroupStyle0;
151
+ DsRadioButtonGroup.style = dsRadioButtonGroupCss;
110
152
 
111
153
  exports.ds_radio_button_group = DsRadioButtonGroup;
@@ -1,21 +1,20 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
3
+ var index = require('./index-Mjp9Y-Sw.js');
4
+ var attributes = require('./attributes-BMbXzbwU.js');
5
+ var controlUtils = require('./controlUtils-ofqiQxRF.js');
6
+ var utils = require('./utils-BjZTECpy.js');
7
+ var index$2 = require('./index-Bp6Dd2i1.js');
8
+ var index$1 = require('./index-DwLFyR5p.js');
4
9
 
5
- const index = require('./index-947af833.js');
6
- const utils = require('./utils-3412cbed.js');
7
- const controlUtils = require('./controlUtils-8bf55ef0.js');
8
- const index$1 = require('./index-5b0b9d4c.js');
9
- const store = require('./store-e8e87298.js');
10
-
11
- const dsRadioButtonCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.ds-radio-button{box-sizing:border-box;display:inline-flex;color:var(--ds-palette-black-95)}.ds-radio-button--disabled{color:var(--ds-palette-black-40)}.ds-radio-button__validity{margin-left:10px}.ds-radio-button__fieldset{display:inline-flex;flex-direction:column;border:none;margin:0;padding:0}.ds-radio-button__fieldset__legend{padding-inline:0;color:var(--ds-palette-black-95);font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large);margin-bottom:var(--ds-spacing-3xSmall)}.ds-radio-button__fieldset__assistive-text{display:inline;font-size:var(--ds-fontSize-14);color:var(--ds-palette-black-70);line-height:var(--ds-lineHeight-large)}.ds-radio-button:focus-within .ds-radio-button__icon{box-shadow:inset 0 0 0 var(--ds-borderWidth-thick) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:calc(var(--ds-borderWidth-thin) * -1 * 5);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-radio-button__icon{border-radius:50%;height:44px;width:44px}.ds-radio-button__text{margin-top:11px}.ds-radio-button__icon__outer-circle{stroke:var(--ds-palette-black-50);fill:var(--ds-palette-white)}.ds-radio-button__icon__outer-circle--checked{stroke:var(--ds-palette-mainBlue-70);fill:var(--ds-palette-white)}.ds-radio-button__icon__inner-circle{stroke:unset;fill:var(--ds-palette-mainBlue-70)}.ds-radio-button:hover:not(.ds-radio-button--disabled) .ds-radio-button__icon__outer-circle{stroke:var(--ds-palette-black-50);fill:var(--ds-palette-black-10)}.ds-radio-button:hover:not(.ds-radio-button--disabled) .ds-radio-button__icon__outer-circle--checked{stroke:var(--ds-palette-mainBlue-80);fill:var(--ds-palette-white)}.ds-radio-button:hover:not(.ds-radio-button--disabled) .ds-radio-button__icon__inner-circle{stroke:unset;fill:var(--ds-palette-mainBlue-80)}.ds-radio-button:active:not(.ds-radio-button--disabled) .ds-radio-button__icon__outer-circle{stroke:var(--ds-palette-black-50);fill:var(--ds-palette-black-20)}.ds-radio-button:active:not(.ds-radio-button--disabled) .ds-radio-button__icon__outer-circle--checked{stroke:var(--ds-palette-mainBlue-90);fill:var(--ds-palette-white)}.ds-radio-button:active:not(.ds-radio-button--disabled) .ds-radio-button__icon__inner-circle{stroke:unset;fill:var(--ds-palette-mainBlue-90)}.ds-radio-button--disabled .ds-radio-button__icon__outer-circle{stroke:var(--ds-overlay-black-15);fill:var(--ds-overlay-black-10)}.ds-radio-button--disabled .ds-radio-button__icon__outer-circle--checked{stroke:var(--ds-overlay-black-15);fill:var(--ds-overlay-black-10)}.ds-radio-button--disabled .ds-radio-button__icon__inner-circle{stroke:unset;fill:var(--ds-overlay-black-15)}.ds-radio-button--invalid .ds-radio-button__icon__outer-circle{stroke:var(--ds-palette-red-50);fill:var(--ds-palette-white)}.ds-radio-button--invalid .ds-radio-button__icon__outer-circle--checked{stroke:var(--ds-palette-red-50);fill:var(--ds-palette-white)}.ds-radio-button--invalid .ds-radio-button__icon__inner-circle{stroke:unset;fill:var(--ds-palette-mainBlue-70)}";
12
- const DsRadioButtonStyle0 = dsRadioButtonCss;
10
+ const dsRadioButtonCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.ds-radio-button{box-sizing:border-box;display:inline-flex;color:var(--ds-palette-black-95)}.ds-radio-button--disabled{color:var(--ds-palette-black-40)}.ds-radio-button__validity{margin-left:10px}.ds-radio-button:has(input:focus-visible) .ds-radio-button__icon{box-shadow:inset 0 0 0 var(--ds-borderWidth-thick) var(--ds-palette-white);outline:var(--ds-borderWidth-thin) solid var(--ds-palette-black-95);outline-offset:calc(var(--ds-borderWidth-thin) * -1 * 5)}.ds-radio-button__icon{border-radius:50%;height:44px;width:44px}.ds-radio-button__text{margin-top:11px}.ds-radio-button__icon__outer-circle{stroke:var(--ds-palette-black-50);fill:var(--ds-palette-white)}.ds-radio-button__icon__outer-circle--checked{stroke:var(--ds-palette-mainBlue-70);fill:var(--ds-palette-white)}.ds-radio-button__icon__inner-circle{stroke:unset;fill:var(--ds-palette-mainBlue-70)}.ds-radio-button:hover:not(.ds-radio-button--disabled) .ds-radio-button__icon__outer-circle{stroke:var(--ds-palette-black-50);fill:var(--ds-palette-black-10)}.ds-radio-button:hover:not(.ds-radio-button--disabled) .ds-radio-button__icon__outer-circle--checked{stroke:var(--ds-palette-mainBlue-80);fill:var(--ds-palette-white)}.ds-radio-button:hover:not(.ds-radio-button--disabled) .ds-radio-button__icon__inner-circle{stroke:unset;fill:var(--ds-palette-mainBlue-80)}.ds-radio-button:active:not(.ds-radio-button--disabled) .ds-radio-button__icon__outer-circle{stroke:var(--ds-palette-black-50);fill:var(--ds-palette-black-20)}.ds-radio-button:active:not(.ds-radio-button--disabled) .ds-radio-button__icon__outer-circle--checked{stroke:var(--ds-palette-mainBlue-90);fill:var(--ds-palette-white)}.ds-radio-button:active:not(.ds-radio-button--disabled) .ds-radio-button__icon__inner-circle{stroke:unset;fill:var(--ds-palette-mainBlue-90)}.ds-radio-button--disabled .ds-radio-button__icon__outer-circle{stroke:var(--ds-overlay-black-15);fill:var(--ds-overlay-black-10)}.ds-radio-button--disabled .ds-radio-button__icon__outer-circle--checked{stroke:var(--ds-overlay-black-15);fill:var(--ds-overlay-black-10)}.ds-radio-button--disabled .ds-radio-button__icon__inner-circle{stroke:unset;fill:var(--ds-overlay-black-15)}.ds-radio-button--invalid .ds-radio-button__icon__outer-circle{stroke:var(--ds-palette-red-50);fill:var(--ds-palette-white)}.ds-radio-button--invalid .ds-radio-button__icon__outer-circle--checked{stroke:var(--ds-palette-red-50);fill:var(--ds-palette-white)}.ds-radio-button--invalid .ds-radio-button__icon__inner-circle{stroke:unset;fill:var(--ds-palette-mainBlue-70)}.ds-radio-button-fieldset{display:inline-flex;flex-direction:column;border:none;margin:0;padding:0}.ds-radio-button-fieldset__legend{padding-inline:0;color:var(--ds-palette-black-95);font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large);margin-bottom:var(--ds-spacing-3xSmall)}.ds-radio-button-fieldset__assistive-text{display:inline;font-size:var(--ds-fontSize-14);color:var(--ds-palette-black-70);line-height:var(--ds-lineHeight-large)}";
13
11
 
14
12
  const radioButtonIdGenerator = utils.idGenerator('ds-radio-button');
15
13
  const DsRadioButton = class {
16
14
  constructor(hostRef) {
17
15
  index.registerInstance(this, hostRef);
18
- this.dsRadioButtonChecked = index.createEvent(this, "dsRadioButtonChecked", 7);
16
+ this.dsChange = index.createEvent(this, "dsChange");
17
+ this.dsRadioButtonChecked = index.createEvent(this, "dsRadioButtonChecked");
19
18
  if (hostRef.$hostElement$["s-ei"]) {
20
19
  this.internals = hostRef.$hostElement$["s-ei"];
21
20
  }
@@ -26,58 +25,60 @@ const DsRadioButton = class {
26
25
  }
27
26
  radioGroup = null;
28
27
  inputElem;
28
+ dsChange;
29
29
  dsRadioButtonChecked;
30
30
  get el() { return index.getElement(this); }
31
31
  internals;
32
- identifier = radioButtonIdGenerator.next().value;
33
- errorsDisabled = false;
34
- value = this.identifier;
35
- legend;
36
- assistiveText;
37
- text;
38
- required = false;
39
- disabled = false;
40
- optional = false;
41
- checked = false;
42
- optionalText;
43
- errorText = '';
32
+ dsId = radioButtonIdGenerator.next().value;
33
+ dsErrorsDisabled = false;
34
+ dsValue = this.dsId;
35
+ dsLegend;
36
+ dsAssistiveText;
37
+ dsText;
38
+ dsRequired = false;
39
+ dsDisabled = false;
40
+ dsChecked = false;
41
+ dsErrorText = '';
44
42
  focusable = true;
45
- invalid = !!this.errorText;
46
- initialChecked = this.checked;
43
+ invalid = !!this.dsErrorText;
44
+ initialChecked = this.dsChecked;
47
45
  validationMessage;
48
- errorTextId = `${this.identifier}-error`;
49
- assistiveTextId = `${this.identifier}-assistive-text`;
50
- async setFocus() {
46
+ errorTextId = `${this.dsId}-error`;
47
+ assistiveTextId = `${this.dsId}-assistive-text`;
48
+ async dsFocus() {
51
49
  this.inputElem.focus();
52
50
  }
53
51
  async setFocusable(flag) {
54
52
  this.focusable = flag;
55
53
  }
56
54
  async setChecked() {
57
- this.checked = true;
55
+ this.dsChecked = true;
58
56
  this.internals?.setFormValue('true');
59
57
  this.dsRadioButtonChecked.emit();
60
- if (store.isValidation('client') && this.validationMessage) {
58
+ if (index$1.isValidation('client') && this.validationMessage) {
61
59
  this.validationMessage = this.getValidationMessage();
62
60
  }
63
61
  }
62
+ dsCheckedObserver(isChecked) {
63
+ this.dsChange.emit(isChecked);
64
+ }
64
65
  inheritedAttributes = {};
65
- getValidationMessage = () => (!this.errorsDisabled ? this.errorText || this.internals?.validationMessage || this.inputElem?.validationMessage : '');
66
+ getValidationMessage = () => (!this.dsErrorsDisabled ? this.dsErrorText || this.internals?.validationMessage || this.inputElem?.validationMessage : '');
66
67
  componentWillLoad() {
67
68
  this.inheritedAttributes = {
68
- ...utils.inheritAttributes(this, this.el),
69
+ ...attributes.inheritAttributes(this, this.el),
69
70
  };
70
71
  }
71
72
  formResetCallback() {
72
- this.checked = this.initialChecked;
73
+ this.dsChecked = this.initialChecked;
73
74
  this.internals.setValidity({});
74
- this.internals.setFormValue(this.checked.toString());
75
+ this.internals.setFormValue(this.dsChecked.toString());
75
76
  }
76
77
  connectedCallback() {
77
78
  this.radioGroup = this.el.closest('ds-radio-button-group');
78
79
  if (this.radioGroup) {
79
80
  this.updateCheckedState();
80
- this.invalid = !!this.radioGroup.errorText;
81
+ this.invalid = !!this.radioGroup.dsErrorText;
81
82
  this.radioGroup.addEventListener('dsRadioGroupValueChange', this.updateCheckedState);
82
83
  this.radioGroup.addEventListener('dsRadioGroupInvalidStateChange', this.updateInvalidState);
83
84
  }
@@ -90,7 +91,7 @@ const DsRadioButton = class {
90
91
  this.radioGroup = null;
91
92
  }
92
93
  updateCheckedState = async () => {
93
- this.checked = this.value === (await this.radioGroup.getValue());
94
+ this.dsChecked = this.dsValue === (await this.radioGroup.getValue());
94
95
  };
95
96
  updateInvalidState = (e) => {
96
97
  this.invalid = e.detail;
@@ -99,52 +100,52 @@ const DsRadioButton = class {
99
100
  this.setChecked();
100
101
  };
101
102
  handleBlur = () => {
102
- if (store.isValidation('client')) {
103
+ if (index$1.isValidation('client')) {
103
104
  this.validationMessage = this.getValidationMessage();
104
105
  }
105
106
  };
106
107
  getLegendText = () => {
107
- if (this.required) {
108
- return controlUtils.getRequiredText(this.legend);
109
- }
110
- if (this.optional) {
111
- return controlUtils.getOptionalText(this.legend, this.optionalText);
108
+ if (this.dsRequired) {
109
+ return controlUtils.getRequiredText(this.dsLegend);
112
110
  }
113
- return this.legend;
111
+ return this.dsLegend;
114
112
  };
115
113
  renderRadioIcon() {
116
114
  const iconClass = 'ds-radio-button__icon';
117
- const outerCircleClasses = index$1.classNames(`${iconClass}__outer-circle`, {
118
- [`${iconClass}__outer-circle--checked`]: this.checked,
115
+ const outerCircleClasses = index$2.classNames(`${iconClass}__outer-circle`, {
116
+ [`${iconClass}__outer-circle--checked`]: this.dsChecked,
119
117
  });
120
- const innerCircleClasses = index$1.classNames(`${iconClass}__inner-circle`);
121
- return (index.h("slot", { name: "icon" }, index.h("div", { class: iconClass, "aria-hidden": "true" }, index.h("svg", { width: "44", height: "44", viewBox: "0 0 44 44", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("rect", { x: "10", y: "10", width: "24", height: "24", rx: "12", fill: "white" }), index.h("circle", { class: outerCircleClasses, cx: "22", cy: "22", r: "10", fill: "white", stroke: "#005A94", "stroke-width": "2" }), this.checked && index.h("circle", { class: innerCircleClasses, cx: "22", cy: "22", r: "6", fill: "#005A94" })))));
118
+ const innerCircleClasses = index$2.classNames(`${iconClass}__inner-circle`);
119
+ return (index.h("slot", { name: "icon" }, index.h("div", { class: iconClass, "aria-hidden": "true" }, index.h("svg", { width: "44", height: "44", viewBox: "0 0 44 44", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("rect", { x: "10", y: "10", width: "24", height: "24", rx: "12", fill: "white" }), index.h("circle", { class: outerCircleClasses, cx: "22", cy: "22", r: "10", fill: "white", stroke: "#005A94", "stroke-width": "2" }), this.dsChecked && index.h("circle", { class: innerCircleClasses, cx: "22", cy: "22", r: "6", fill: "#005A94" })))));
122
120
  }
123
121
  renderRadioButton() {
124
- const classes = index$1.classNames('ds-radio-button', {
125
- 'ds-radio-button--disabled': this.disabled,
126
- 'ds-radio-button--invalid': !!this.errorText || this.invalid,
122
+ const classes = index$2.classNames('ds-radio-button', {
123
+ 'ds-radio-button--disabled': this.dsDisabled,
124
+ 'ds-radio-button--invalid': !!this.dsErrorText || this.invalid,
127
125
  });
128
- const inputClasses = index$1.classNames('ds-radio-button__input');
129
- const textClasses = index$1.classNames('ds-radio-button__text');
126
+ const inputClasses = index$2.classNames('ds-radio-button__input');
127
+ const textClasses = index$2.classNames('ds-radio-button__text');
130
128
  const tabindex = this.focusable ? 0 : -1;
131
- return (index.h(index.Fragment, null, index.h("div", null, index.h("label", { class: classes }, index.h("ds-visually-hidden", null, index.h("input", { ref: ref => (this.inputElem = ref), type: "radio", class: inputClasses, value: this.value, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur, checked: this.checked, tabindex: tabindex, ...this.inheritedAttributes })), this.renderRadioIcon(), index.h("slot", null, index.h("span", { class: textClasses }, this.text)))), index.h("slot", { name: "validity" }, index.h("div", { class: "ds-radio-button__validity" }, index.h("ds-input-validity", { text: this.errorText, type: "error", role: "alert", id: this.errorTextId })))));
129
+ return (index.h(index.Fragment, null, index.h("div", null, index.h("label", { class: classes }, index.h("ds-visually-hidden", null, index.h("input", { ref: ref => (this.inputElem = ref), type: "radio", class: inputClasses, value: this.dsValue, disabled: this.dsDisabled, onInput: this.handleInput, onBlur: this.handleBlur, checked: this.dsChecked, tabindex: tabindex, ...this.inheritedAttributes })), this.renderRadioIcon(), index.h("slot", null, index.h("span", { class: textClasses }, this.dsText)))), !this.dsErrorsDisabled && (index.h("slot", { name: "validity" }, index.h("div", { class: "ds-radio-button__validity" }, index.h("ds-input-validity", { id: this.errorTextId, dsText: this.dsErrorText, dsType: "error", dsAriaLive: "polite", dsAriaAtomic: "true" }))))));
132
130
  }
133
131
  renderFieldset() {
134
- const fieldsetClasses = index$1.classNames('ds-radio-button__fieldset');
135
- const legendClasses = index$1.classNames('ds-radio-button__fieldset__legend');
136
- const assistiveTextClasses = index$1.classNames('ds-radio-button__fieldset__assistive-text');
137
- const ariaDescribedBy = [!!this.errorText && this.errorTextId, !!this.assistiveText && this.assistiveTextId].filter(Boolean).join(' ');
138
- return (index.h("fieldset", { class: fieldsetClasses, "aria-describedby": ariaDescribedBy }, index.h("legend", { class: legendClasses }, index.h("slot", { name: "legend" }, this.getLegendText())), index.h("slot", { name: "assistiveText" }, this.assistiveText && (index.h("small", { class: assistiveTextClasses, id: this.assistiveTextId }, this.assistiveText))), this.renderRadioButton()));
132
+ const fieldsetClasses = index$2.classNames('ds-radio-button-fieldset');
133
+ const legendClasses = index$2.classNames('ds-radio-button-fieldset__legend');
134
+ const assistiveTextClasses = index$2.classNames('ds-radio-button-fieldset__assistive-text');
135
+ const ariaDescribedBy = [!!this.dsErrorText && this.errorTextId, !!this.dsAssistiveText && this.assistiveTextId].filter(Boolean).join(' ');
136
+ return (index.h("fieldset", { class: fieldsetClasses, "aria-describedby": ariaDescribedBy }, index.h("legend", { class: legendClasses }, index.h("slot", { name: "legend" }, this.getLegendText())), index.h("slot", { name: "assistiveText" }, this.dsAssistiveText && (index.h("small", { class: assistiveTextClasses, id: this.assistiveTextId }, this.dsAssistiveText))), this.renderRadioButton()));
139
137
  }
140
138
  render() {
141
- if (this.legend) {
139
+ if (this.dsLegend) {
142
140
  return this.renderFieldset();
143
141
  }
144
142
  return this.renderRadioButton();
145
143
  }
146
144
  static get formAssociated() { return true; }
145
+ static get watchers() { return {
146
+ "dsChecked": ["dsCheckedObserver"]
147
+ }; }
147
148
  };
148
- DsRadioButton.style = DsRadioButtonStyle0;
149
+ DsRadioButton.style = dsRadioButtonCss;
149
150
 
150
151
  exports.ds_radio_button = DsRadioButton;