@uh-design-system/component-library 0.5.1 → 0.5.3

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 (159) hide show
  1. package/dist/cjs/component-library.cjs.js +2 -2
  2. package/dist/cjs/{controlUtils-041de0fd.js → controlUtils-8bf55ef0.js} +1 -1
  3. package/dist/cjs/{ds-accordion_3.cjs.entry.js → ds-accordion_5.cjs.entry.js} +122 -24
  4. package/dist/cjs/ds-checkbox-group.cjs.entry.js +39 -30
  5. package/dist/cjs/ds-checkbox.cjs.entry.js +33 -28
  6. package/dist/cjs/ds-input-validity.cjs.entry.js +4 -4
  7. package/dist/cjs/ds-link-with-arrow.cjs.entry.js +5 -6
  8. package/dist/cjs/ds-link.cjs.entry.js +5 -6
  9. package/dist/cjs/ds-radio-button-group.cjs.entry.js +111 -0
  10. package/dist/cjs/ds-radio-button.cjs.entry.js +150 -0
  11. package/dist/cjs/ds-text-input.cjs.entry.js +15 -10
  12. package/dist/cjs/{index-bf84b124.js → index-947af833.js} +36 -4
  13. package/dist/cjs/index.cjs.js +2 -2
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/cjs/{store-9bd20f3c.js → store-e8e87298.js} +1 -1
  16. package/dist/cjs/{attributes-5f5b58be.js → utils-3412cbed.js} +41 -2
  17. package/dist/collection/collection-manifest.json +4 -1
  18. package/dist/collection/components/00-foundations/icons/categories/actions.js +2 -0
  19. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.css +12 -12
  20. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +11 -13
  21. package/dist/collection/components/01-base-components/ds-button/ds-button.css +98 -87
  22. package/dist/collection/components/01-base-components/ds-button/ds-button.js +92 -6
  23. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.examples.stories.js +66 -0
  24. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.stories.js +3 -0
  25. package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.css +31 -20
  26. package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.js +31 -47
  27. package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.css +1 -1
  28. package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.js +52 -26
  29. package/dist/collection/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.features.stories.js +74 -18
  30. package/dist/collection/components/01-base-components/ds-icon/ds-icon.js +1 -1
  31. package/dist/collection/components/01-base-components/ds-input-validity/ds-input-validity.css +2 -2
  32. package/dist/collection/components/01-base-components/ds-input-validity/ds-input-validity.js +1 -1
  33. package/dist/collection/components/01-base-components/ds-link/ds-link.css +12 -12
  34. package/dist/collection/components/01-base-components/ds-link/ds-link.js +1 -1
  35. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.css +10 -10
  36. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.js +1 -1
  37. package/dist/collection/components/01-base-components/ds-radio-button/ds-radio-button.css +116 -0
  38. package/dist/collection/components/01-base-components/ds-radio-button/ds-radio-button.js +468 -0
  39. package/dist/collection/components/01-base-components/ds-radio-button/stories/ds-radio-button.features.stories.js +70 -0
  40. package/dist/collection/components/01-base-components/ds-radio-button/stories/ds-radio-button.stories.js +36 -0
  41. package/dist/collection/components/01-base-components/ds-radio-button-group/ds-radio-button-group.css +31 -0
  42. package/dist/collection/components/01-base-components/ds-radio-button-group/ds-radio-button-group.js +287 -0
  43. package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.examples.stories.js +51 -0
  44. package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.features.stories.js +58 -0
  45. package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.stories.js +59 -0
  46. package/dist/collection/components/01-base-components/ds-spinner/ds-spinner.css +309 -0
  47. package/dist/collection/components/01-base-components/ds-spinner/ds-spinner.js +221 -0
  48. package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.examples.stories.js +122 -0
  49. package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.features.stories.js +107 -0
  50. package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.stories.js +59 -0
  51. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.css +38 -38
  52. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +12 -6
  53. package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.stories.js +2 -2
  54. package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.css +1 -1
  55. package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.js +1 -1
  56. package/dist/collection/utils/attributes/attributes.js +14 -3
  57. package/dist/collection/utils/button/buttonUtils.js +14 -0
  58. package/dist/collection/utils/colours/colourTypes.js +3 -3
  59. package/dist/collection/utils/colours/colourUtils.js +5 -3
  60. package/dist/collection/utils/controls/controlUtils.js +1 -1
  61. package/dist/collection/utils/spinner/spinnerUtils.js +20 -0
  62. package/dist/collection/utils/tests/testUtils.js +1 -0
  63. package/dist/collection/utils/typography/typographyUtils.js +3 -3
  64. package/dist/component-library/component-library.css +1 -1
  65. package/dist/component-library/component-library.esm.js +1 -1
  66. package/dist/component-library/controlUtils-c2ba44bd.js +1 -0
  67. package/dist/component-library/ds-accordion_5.entry.js +1 -0
  68. package/dist/component-library/ds-checkbox-group.entry.js +1 -1
  69. package/dist/component-library/ds-checkbox.entry.js +1 -1
  70. package/dist/component-library/ds-input-validity.entry.js +1 -1
  71. package/dist/component-library/ds-link-with-arrow.entry.js +1 -1
  72. package/dist/component-library/ds-link.entry.js +1 -1
  73. package/dist/component-library/ds-radio-button-group.entry.js +1 -0
  74. package/dist/component-library/ds-radio-button.entry.js +1 -0
  75. package/dist/component-library/ds-text-input.entry.js +1 -1
  76. package/dist/component-library/index-84fd0ee9.js +2 -0
  77. package/dist/component-library/index.esm.js +1 -1
  78. package/dist/component-library/{store-b8d17c10.js → store-73a56075.js} +1 -1
  79. package/dist/component-library/{attributes-7d09be1b.js → utils-cfc536bc.js} +1 -1
  80. package/dist/components/attributes.js +15 -3
  81. package/dist/components/controlUtils.js +1 -1
  82. package/dist/components/ds-accordion.js +28 -18
  83. package/dist/components/ds-button2.js +51 -9
  84. package/dist/components/ds-checkbox-group.js +38 -27
  85. package/dist/components/ds-checkbox2.js +33 -26
  86. package/dist/components/ds-icon2.js +4 -1
  87. package/dist/components/ds-input-validity2.js +2 -2
  88. package/dist/components/ds-link-with-arrow.js +2 -2
  89. package/dist/components/ds-link.js +2 -2
  90. package/dist/components/ds-radio-button-group.d.ts +11 -0
  91. package/dist/components/ds-radio-button-group.js +147 -0
  92. package/dist/components/ds-radio-button.d.ts +11 -0
  93. package/dist/components/ds-radio-button.js +196 -0
  94. package/dist/components/ds-spinner.d.ts +11 -0
  95. package/dist/components/ds-spinner.js +6 -0
  96. package/dist/components/ds-spinner2.js +90 -0
  97. package/dist/components/ds-text-input.js +25 -13
  98. package/dist/components/ds-visually-hidden2.js +2 -2
  99. package/dist/components/index2.js +36 -5
  100. package/dist/esm/component-library.js +3 -3
  101. package/dist/esm/controlUtils-c2ba44bd.js +4 -0
  102. package/dist/esm/{ds-accordion_3.entry.js → ds-accordion_5.entry.js} +120 -24
  103. package/dist/esm/ds-checkbox-group.entry.js +38 -29
  104. package/dist/esm/ds-checkbox.entry.js +33 -28
  105. package/dist/esm/ds-input-validity.entry.js +4 -4
  106. package/dist/esm/ds-link-with-arrow.entry.js +4 -5
  107. package/dist/esm/ds-link.entry.js +4 -5
  108. package/dist/esm/ds-radio-button-group.entry.js +107 -0
  109. package/dist/esm/ds-radio-button.entry.js +146 -0
  110. package/dist/esm/ds-text-input.entry.js +15 -10
  111. package/dist/esm/{index-434995e1.js → index-84fd0ee9.js} +36 -5
  112. package/dist/esm/index.js +2 -2
  113. package/dist/esm/loader.js +3 -3
  114. package/dist/esm/{store-b8d17c10.js → store-73a56075.js} +1 -1
  115. package/dist/esm/{attributes-7d09be1b.js → utils-cfc536bc.js} +38 -3
  116. package/dist/styles/helpers.css +7 -0
  117. package/dist/styles/helpers.css.map +1 -0
  118. package/dist/styles/mixins/_breakpoints.scss +14 -0
  119. package/dist/styles/mixins/_focus.scss +28 -0
  120. package/dist/styles/mixins/_wrapper.scss +5 -0
  121. package/dist/styles/mixins/imports-default/_imports.scss +2 -0
  122. package/dist/styles/mixins/tokens/_breakpoints.scss +13 -0
  123. package/dist/styles/mixins/tokens/_semantic-colours.scss +75 -0
  124. package/dist/styles/mixins.scss +10 -0
  125. package/dist/styles/variables.css +168 -0
  126. package/dist/styles/variables.css.map +1 -0
  127. package/dist/types/components/01-base-components/ds-button/ds-button.d.ts +5 -0
  128. package/dist/types/components/01-base-components/ds-button/stories/ds-button.examples.stories.d.ts +1 -0
  129. package/dist/types/components/01-base-components/ds-checkbox/ds-checkbox.d.ts +6 -10
  130. package/dist/types/components/01-base-components/ds-checkbox-group/ds-checkbox-group.d.ts +5 -4
  131. package/dist/types/components/01-base-components/ds-radio-button/ds-radio-button.d.ts +44 -0
  132. package/dist/types/components/01-base-components/ds-radio-button/stories/ds-radio-button.features.stories.d.ts +15 -0
  133. package/dist/types/components/01-base-components/ds-radio-button/stories/ds-radio-button.stories.d.ts +7 -0
  134. package/dist/types/components/01-base-components/ds-radio-button-group/ds-radio-button-group.d.ts +24 -0
  135. package/dist/types/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.examples.stories.d.ts +6 -0
  136. package/dist/types/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.features.stories.d.ts +10 -0
  137. package/dist/types/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.stories.d.ts +7 -0
  138. package/dist/types/components/01-base-components/ds-spinner/ds-spinner.d.ts +17 -0
  139. package/dist/types/components/01-base-components/ds-spinner/stories/ds-spinner.examples.stories.d.ts +7 -0
  140. package/dist/types/components/01-base-components/ds-spinner/stories/ds-spinner.features.stories.d.ts +7 -0
  141. package/dist/types/components/01-base-components/ds-spinner/stories/ds-spinner.stories.d.ts +7 -0
  142. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.d.ts +2 -1
  143. package/dist/types/components.d.ts +135 -20
  144. package/dist/types/utils/attributes/attributes.d.ts +2 -1
  145. package/dist/types/utils/button/buttonUtils.d.ts +1 -0
  146. package/dist/types/utils/colours/colourTypes.d.ts +3 -3
  147. package/dist/types/utils/spinner/spinnerUtils.d.ts +1 -0
  148. package/dist/types/utils/tests/testUtils.d.ts +1 -0
  149. package/package.json +15 -15
  150. package/dist/cjs/ds-visually-hidden.cjs.entry.js +0 -20
  151. package/dist/cjs/utils-2ba5e075.js +0 -28
  152. package/dist/component-library/controlUtils-9ca4087b.js +0 -1
  153. package/dist/component-library/ds-accordion_3.entry.js +0 -1
  154. package/dist/component-library/ds-visually-hidden.entry.js +0 -1
  155. package/dist/component-library/index-434995e1.js +0 -2
  156. package/dist/component-library/utils-5daa5bc0.js +0 -1
  157. package/dist/esm/controlUtils-9ca4087b.js +0 -4
  158. package/dist/esm/ds-visually-hidden.entry.js +0 -16
  159. package/dist/esm/utils-5daa5bc0.js +0 -24
@@ -2,21 +2,19 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bf84b124.js');
5
+ const index = require('./index-947af833.js');
6
6
  const index$1 = require('./index-5b0b9d4c.js');
7
- const attributes = require('./attributes-5f5b58be.js');
8
- const controlUtils = require('./controlUtils-041de0fd.js');
9
- const store = require('./store-9bd20f3c.js');
10
- const utils = require('./utils-2ba5e075.js');
7
+ const utils = require('./utils-3412cbed.js');
8
+ const controlUtils = require('./controlUtils-8bf55ef0.js');
9
+ const store = require('./store-e8e87298.js');
11
10
 
12
- const dsCheckboxCss = ".ds-checkbox-fieldset{display:inline-flex;flex-direction:column;border:none;padding:0;margin:0;gap:var(--ds-spacing-3xSmall)}.ds-checkbox-fieldset__legend{padding-inline:0;font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}.ds-checkbox-fieldset__assistive-text{display:inline;font-size:var(--ds-fontSize-14);color:var(--ds-textColor-secondary);line-height:var(--ds-lineHeight-large)}.ds-checkbox{display:inline-flex;align-self:flex-start;align-items:center;flex-direction:row;flex-wrap:nowrap;text-wrap:wrap;position:relative;cursor:pointer;user-select:none;width:auto;padding:var(--ds-spacing-xSmall)}.ds-checkbox--no-margin .ds-checkbox__input{margin-right:0}.ds-checkbox--disabled{color:var(--ds-textColor-disabled-onLight)}.ds-checkbox__span--optional{color:var(--ds-textColor-secondary);font-size:var(--ds-fontSize-14)}.ds-checkbox:has(.ds-checkbox__input:disabled){cursor:not-allowed}.ds-checkbox__input{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--ds-bgColor-white);margin:0;display:grid;place-content:center;height:24px;width:24px;margin-right:var(--ds-spacing-xSmall);border-width:var(--ds-borderWidth-thin);border-style:solid;border-color:var(--ds-palette-black-50);}.ds-checkbox__input:focus-visible{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-checkbox__input:hover,.ds-checkbox__input:active{border-color:var(--ds-borderColor-default)}.ds-checkbox__input:hover{background-color:var(--ds-bgColor-white-hover)}.ds-checkbox__input:active{background-color:var(--ds-bgColor-white-active)}.ds-checkbox__input:disabled{background-color:var(--ds-bgColor-disabled-onLight);border-color:var(--ds-borderColor-disabled-onLight)}@media (forced-colors: active){.ds-checkbox__input:disabled{border-color:GrayText}}.ds-checkbox__input:checked,.ds-checkbox__input:indeterminate{background-color:var(--ds-bgColor-primary);border-color:var(--ds-borderColor-transparent)}.ds-checkbox__input:checked:hover,.ds-checkbox__input:indeterminate:hover{background-color:var(--ds-bgColor-primary-hover)}.ds-checkbox__input:checked:active,.ds-checkbox__input:indeterminate:active{background-color:var(--ds-bgColor-primary-active)}.ds-checkbox__input:checked:disabled,.ds-checkbox__input:indeterminate:disabled{background-color:var(--ds-bgColor-disabled-onLight)}.ds-checkbox__input:user-invalid,.ds-checkbox__input--invalid,.ds-checkbox__input--invalid:checked,.ds-checkbox__input--invalid:indeterminate{border-color:var(--ds-borderColor-danger)}.ds-checkbox__input:disabled{cursor:not-allowed;color:var(--ds-textColor-disabled-onLight)}.ds-checkbox__input::before{content:\"\";display:block;height:1em;width:1em;background-size:contain;background-repeat:no-repeat;background-position:center}.ds-checkbox__input:checked::before{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>\")}.ds-checkbox__input:checked:disabled::before{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>\")}.ds-checkbox__input:indeterminate::before{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>\")}.ds-checkbox__input:indeterminate:disabled::before{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>\")}.ds-checkbox-error{display:flex}.ds-checkbox-error--visible{padding-top:var(--ds-spacing-3xSmall);padding-left:var(--ds-spacing-xSmall)}";
11
+ const dsCheckboxCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.ds-checkbox-fieldset{display:inline-flex;flex-direction:column;border:none;padding:0;margin:0;gap:var(--ds-spacing-3xSmall)}.ds-checkbox-fieldset__legend{padding-inline:0;font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}.ds-checkbox-fieldset__assistive-text{display:inline;font-size:var(--ds-fontSize-14);color:var(--ds-palette-black-70);line-height:var(--ds-lineHeight-large)}.ds-checkbox{display:inline-flex;align-self:flex-start;align-items:flex-start;flex-direction:row;flex-wrap:nowrap;text-wrap:wrap;word-wrap:break-word;white-space:normal;position:relative;cursor:pointer;user-select:none;width:auto;padding:var(--ds-spacing-xSmall)}.ds-checkbox--no-margin .ds-checkbox__input{margin-right:0}.ds-checkbox--disabled{color:var(--ds-palette-black-40)}.ds-checkbox__span--optional{color:var(--ds-palette-black-70);font-size:var(--ds-fontSize-14)}.ds-checkbox:has(.ds-checkbox__input:disabled){cursor:not-allowed}.ds-checkbox__input{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--ds-palette-white);margin:0;display:grid;place-content:center;height:24px;width:24px;flex-shrink:0;margin-right:var(--ds-spacing-xSmall);border-width:var(--ds-borderWidth-thin);border-style:solid;border-color:var(--ds-palette-black-50);}.ds-checkbox__input: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-checkbox__input:hover,.ds-checkbox__input:active{border-color:var(--ds-palette-black-50)}.ds-checkbox__input:hover{background-color:var(--ds-palette-black-10)}.ds-checkbox__input:active{background-color:var(--ds-palette-black-20)}.ds-checkbox__input:disabled{background-color:var(--ds-overlay-black-10);border-color:var(--ds-overlay-black-15)}@media (forced-colors: active){.ds-checkbox__input:disabled{border-color:GrayText}}.ds-checkbox__input:checked,.ds-checkbox__input:indeterminate{background-color:var(--ds-palette-mainBlue-70);border-color:var(--ds-overlay-black-00)}.ds-checkbox__input:checked:hover,.ds-checkbox__input:indeterminate:hover{background-color:var(--ds-palette-mainBlue-80)}.ds-checkbox__input:checked:active,.ds-checkbox__input:indeterminate:active{background-color:var(--ds-palette-mainBlue-90)}.ds-checkbox__input:checked:disabled,.ds-checkbox__input:indeterminate:disabled{background-color:var(--ds-overlay-black-10)}.ds-checkbox__input:user-invalid,.ds-checkbox__input--invalid,.ds-checkbox__input--invalid:checked,.ds-checkbox__input--invalid:indeterminate{border-color:var(--ds-palette-red-50)}.ds-checkbox__input:disabled{cursor:not-allowed;color:var(--ds-palette-black-40)}.ds-checkbox__input::before{content:\"\";display:block;height:1em;width:1em;background-size:contain;background-repeat:no-repeat;background-position:center}.ds-checkbox__input:checked::before{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>\")}.ds-checkbox__input:checked:disabled::before{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>\")}.ds-checkbox__input:indeterminate::before{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>\")}.ds-checkbox__input:indeterminate:disabled::before{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>\")}.ds-checkbox-error{display:flex}.ds-checkbox-error--visible{padding-top:var(--ds-spacing-3xSmall);padding-left:var(--ds-spacing-xSmall)}";
13
12
  const DsCheckboxStyle0 = dsCheckboxCss;
14
13
 
15
14
  const checkboxIdGenerator = utils.idGenerator('ds-checkbox');
16
15
  const DsCheckbox = class {
17
16
  constructor(hostRef) {
18
17
  index.registerInstance(this, hostRef);
19
- this.dsCheckboxInput = index.createEvent(this, "dsCheckboxInput", 7);
20
18
  if (hostRef.$hostElement$["s-ei"]) {
21
19
  this.internals = hostRef.$hostElement$["s-ei"];
22
20
  }
@@ -25,16 +23,15 @@ const DsCheckbox = class {
25
23
  hostRef.$hostElement$["s-ei"] = this.internals;
26
24
  }
27
25
  }
26
+ checkboxGroup = null;
28
27
  inputElem;
29
28
  labelId;
30
29
  inputValidityId;
31
30
  assistiveTextId;
32
31
  inheritedAttributes = {};
33
- initialChecked;
34
32
  labelClicked = false;
35
33
  get el() { return index.getElement(this); }
36
34
  internals;
37
- dsCheckboxInput;
38
35
  identifier = checkboxIdGenerator.next().value;
39
36
  checked = false;
40
37
  legend;
@@ -48,7 +45,8 @@ const DsCheckbox = class {
48
45
  optional = false;
49
46
  optionalText;
50
47
  ariaLabel;
51
- value = this.checked.toString();
48
+ invalid = !!this.errorText;
49
+ initialChecked = this.checked;
52
50
  validationMessage;
53
51
  setIds = () => {
54
52
  this.labelId = `${this.identifier}-label`;
@@ -78,24 +76,33 @@ const DsCheckbox = class {
78
76
  return this.text;
79
77
  };
80
78
  getAriaDescribedBy = () => [Boolean(this.assistiveText) && this.assistiveTextId, Boolean(this.getValidationMessage()) && this.inputValidityId].filter(Boolean).join(' ');
81
- restoreInitialState = () => {
79
+ formResetCallback() {
82
80
  this.checked = this.initialChecked;
83
- this.value = this.checked.toString();
84
81
  this.internals?.setValidity({});
85
- this.internals?.setFormValue(this.value);
86
- };
87
- setInitialState = () => {
88
- this.initialChecked = this.checked;
89
- this.value = this.checked.toString();
90
- this.internals?.setFormValue(this.value);
91
- };
92
- formResetCallback() {
93
- this.restoreInitialState();
82
+ this.internals?.setFormValue(this.checked.toString());
94
83
  }
84
+ connectedCallback() {
85
+ this.checkboxGroup = this.el.closest('ds-checkbox-group');
86
+ if (this.checkboxGroup) {
87
+ this.invalid = !!this.checkboxGroup.errorText;
88
+ this.checkboxGroup.addEventListener('dsCheckboxGroupInvalidStateChange', this.updateInvalidState);
89
+ }
90
+ }
91
+ disconnectedCallback() {
92
+ if (this.checkboxGroup) {
93
+ this.checkboxGroup.removeEventListener('dsCheckboxGroupInvalidStateChange', this.updateInvalidState);
94
+ }
95
+ this.checkboxGroup = null;
96
+ }
97
+ updateInvalidState = (e) => {
98
+ this.invalid = e.detail;
99
+ };
95
100
  componentWillLoad() {
96
- this.setInitialState();
97
101
  this.setIds();
98
- this.inheritedAttributes = attributes.inheritAriaAttributes(this.el, ['aria-label', 'aria-describedby', 'aria-hidden', 'aria-invalid']);
102
+ this.inheritedAttributes = {
103
+ ...utils.inheritAriaAttributes(this.el, ['aria-label', 'aria-describedby', 'aria-hidden', 'aria-invalid']),
104
+ ...utils.inheritAttributes(this, this.el),
105
+ };
99
106
  if (store.isValidation('server') || this.errorText) {
100
107
  this.validationMessage = this.getValidationMessage();
101
108
  }
@@ -103,9 +110,7 @@ const DsCheckbox = class {
103
110
  handleInput = (e) => {
104
111
  const target = e.target;
105
112
  this.checked = target.checked;
106
- this.value = target.checked.toString();
107
- this.internals?.setFormValue(this.value);
108
- this.dsCheckboxInput.emit({ id: this.identifier, checked: target.checked });
113
+ this.internals?.setFormValue(target.checked.toString());
109
114
  if (store.isValidation('client') && this.validationMessage) {
110
115
  this.validationMessage = this.getValidationMessage();
111
116
  }
@@ -133,13 +138,13 @@ const DsCheckbox = class {
133
138
  'ds-checkbox--no-margin': Boolean(!this.text),
134
139
  });
135
140
  const inputClasses = index$1.classNames('ds-checkbox__input', {
136
- 'ds-checkbox__input--invalid': Boolean(this.errorText),
141
+ 'ds-checkbox__input--invalid': Boolean(this.errorText) || this.invalid,
137
142
  });
138
143
  const errorClasses = index$1.classNames('ds-checkbox-error', {
139
144
  'ds-checkbox-error--visible': Boolean(this.validationMessage),
140
145
  });
141
146
  const ariaDescribedBy = this.getAriaDescribedBy();
142
- return (index.h(index.Fragment, null, index.h("div", null, index.h("label", { id: this.labelId, class: classes, onMouseDown: this.handleMouseDown, onMouseUp: this.handleMouseUp }, index.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": utils.getAriaLabel(this.getCheckboxText(), this.ariaLabel), "aria-invalid": this.errorText ? true : undefined, ...this.inheritedAttributes }), this.getCheckboxText())), !this.errorsDisabled && (index.h("div", { class: errorClasses }, index.h("ds-input-validity", { id: this.inputValidityId, text: this.validationMessage, type: "error", role: "alert" })))));
147
+ return (index.h(index.Fragment, null, index.h("div", null, index.h("label", { id: this.labelId, class: classes, onMouseDown: this.handleMouseDown, onMouseUp: this.handleMouseUp }, index.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.checked.toString(), disabled: this.disabled, required: this.required, id: this.identifier, "aria-describedby": ariaDescribedBy, "aria-label": utils.getAriaLabel(this.getCheckboxText(), this.ariaLabel), "aria-invalid": this.errorText ? true : undefined, ...this.inheritedAttributes }), this.getCheckboxText())), !this.errorsDisabled && (index.h("div", { class: errorClasses }, index.h("ds-input-validity", { id: this.inputValidityId, text: this.validationMessage, type: "error", role: "alert" })))));
143
148
  }
144
149
  renderFieldset() {
145
150
  const fieldsetClasses = index$1.classNames('ds-checkbox-fieldset');
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bf84b124.js');
5
+ const index = require('./index-947af833.js');
6
6
  const index$1 = require('./index-5b0b9d4c.js');
7
- const store = require('./store-9bd20f3c.js');
7
+ const store = require('./store-e8e87298.js');
8
8
 
9
- 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-textColor-danger)}.ds-input-validity--success{color:var(--ds-textColor-success)}.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)}";
9
+ 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
10
  const DsInputValidityStyle0 = dsInputValidityCss;
11
11
 
12
12
  const DsInputValidity = class {
@@ -28,7 +28,7 @@ const DsInputValidity = class {
28
28
  'ds-input-validity--success': this.type === 'success',
29
29
  });
30
30
  const icon = this.type === 'success' ? 'check_circle_fill' : 'warning_fill';
31
- return (index.h("div", { key: '2eca152eca6e7b4d7e894ff8aaf50a6d03c3e44f', role: store.isValidation('client') ? this.validityRole : undefined }, this.text && (index.h("div", { key: '73e4cd1b3af6a84b9c7cbca813c166bc10e9dd26', class: classes }, index.h("ds-icon", { key: '4eaad4001e758837f9e8b1aae48292a1c5a1a08f', name: icon }), index.h("small", { key: '3ee5d39785454b9aab9ae6012f3ad940c1f18df0', id: this.identifier }, this.text)))));
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)))));
32
32
  }
33
33
  };
34
34
  DsInputValidity.style = DsInputValidityStyle0;
@@ -2,13 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bf84b124.js');
5
+ const index = require('./index-947af833.js');
6
6
  const index$1 = require('./index-5b0b9d4c.js');
7
- const attributes = require('./attributes-5f5b58be.js');
7
+ const utils = require('./utils-3412cbed.js');
8
8
  const linkUtils = require('./linkUtils-695da37c.js');
9
- const utils = require('./utils-2ba5e075.js');
10
9
 
11
- 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-textColor-link);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-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);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-textColor-white);background-color:var(--ds-bgColor-primary)}.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-bgColor-primary-hover)}:active slot>.ds-link-with-arrow__icon{background-color:var(--ds-bgColor-primary-active)}.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-textColor-link-hover)}.ds-link-with-arrow:active,.ds-link-with-arrow:focus-visible{color:var(--ds-textColor-link-active)}";
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)}";
12
11
  const DsLinkWithArrowStyle0 = dsLinkWithArrowCss;
13
12
 
14
13
  const visuallyHiddenAssistiveTextIdGenerator = utils.idGenerator('visually-hidden-assistive-text');
@@ -28,7 +27,7 @@ const DsLinkWithArrow = class {
28
27
  language;
29
28
  ariaLabel;
30
29
  componentWillLoad() {
31
- this.inheritedAttributes = attributes.inheritAriaAttributes(this.el, ['aria-label']);
30
+ this.inheritedAttributes = utils.inheritAriaAttributes(this.el, ['aria-label']);
32
31
  if (linkUtils.opensInNewTab(this.target)) {
33
32
  this.icon = 'arrow_outward';
34
33
  this.rel = 'noopener noreferrer';
@@ -40,7 +39,7 @@ const DsLinkWithArrow = class {
40
39
  'ds-link-with-arrow__icon--start': this.iconPosition === 'start',
41
40
  'ds-link-with-arrow__icon--end': this.iconPosition === 'end',
42
41
  });
43
- return (index.h("a", { key: 'bce4a90f9cc5113ab3d5b300d791d2299e22b7ad', 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: '96ba4a33114443aab36d1301cf65c56437b9a85b', name: "iconStart" }, this.iconPosition === 'start' && index.h("ds-icon", { key: '86d8029de69c1ecb3002a97f5bc0cdbf899b7f91', name: this.icon, class: iconClasses, size: "1.4em" })), this.text, index.h("slot", { key: '7c2dafaee60253b1f5c22819b1afec83d106234b', name: "iconStart" }, this.iconPosition === 'end' && index.h("ds-icon", { key: 'a9fb3e2ddee16cce7c6b8fc0fba0b11970567276', name: this.icon, class: iconClasses, size: "1.4em" })), linkUtils.opensInNewTab(this.target) && (index.h("ds-visually-hidden", { key: 'f93f37d0d10d7a2d51980ff8feb76915cc4823b2', id: this.visuallyHiddenAssistiveTextId }, linkUtils.visuallyHiddenAssistiveText(this.language ?? document.documentElement.lang)))));
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)))));
44
43
  }
45
44
  };
46
45
  DsLinkWithArrow.style = DsLinkWithArrowStyle0;
@@ -2,13 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bf84b124.js');
5
+ const index = require('./index-947af833.js');
6
6
  const index$1 = require('./index-5b0b9d4c.js');
7
- const attributes = require('./attributes-5f5b58be.js');
7
+ const utils = require('./utils-3412cbed.js');
8
8
  const linkUtils = require('./linkUtils-695da37c.js');
9
- const utils = require('./utils-2ba5e075.js');
10
9
 
11
- 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-textColor-link);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-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);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-textColor-link-hover)}.ds-link:active{color:var(--ds-textColor-link-active)}.ds-link:visited{color:var(--ds-textColor-link-visited)}.ds-link--standalone{color:var(--ds-textColor-link);text-decoration-line:none}.ds-link--standalone:hover,.ds-link--standalone:active{text-decoration-line:underline}.ds-link--standalone:hover{color:var(--ds-textColor-link-hover)}.ds-link--standalone:active{color:var(--ds-textColor-link-active)}.ds-link--standalone:focus-visible{color:var(--ds-textColor-link)}.ds-link--standalone:visited{color:var(--ds-textColor-link)}";
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)}";
12
11
  const DsLinkStyle0 = dsLinkCss;
13
12
 
14
13
  const visuallyHiddenAssistiveTextIdGenerator = utils.idGenerator('visually-hidden-assistive-text');
@@ -34,7 +33,7 @@ const DsLink = class {
34
33
  language;
35
34
  ariaLabel;
36
35
  componentWillLoad() {
37
- this.inheritedAttributes = attributes.inheritAriaAttributes(this.el, ['aria-label']);
36
+ this.inheritedAttributes = utils.inheritAriaAttributes(this.el, ['aria-label']);
38
37
  if (linkUtils.opensInNewTab(this.target)) {
39
38
  this.icon = 'open_in_new';
40
39
  this.iconPosition = 'end';
@@ -49,7 +48,7 @@ const DsLink = class {
49
48
  [`ds-link__icon--start-${this.variant}`]: this.iconPosition === 'start',
50
49
  [`ds-link__icon--end-${this.variant}`]: this.iconPosition === 'end',
51
50
  });
52
- return (index.h("a", { key: 'f8e36a029709033379e53cc1c409bc9c0069820e', 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: '88f90209b6557942dd956585b5f77632aa647c8e', name: "iconStart" }, this.icon && this.iconPosition === 'start' && index.h("ds-icon", { key: '87169acfb32913d10d27b35a9c6f714385979aa7', name: this.icon, class: iconClasses, size: "1em", title: this.iconTitle, hidden: this.iconHidden })), this.text, index.h("slot", { key: 'b38677240eb8bd7c1200c8dc08876ba75e7b3e81', name: "iconEnd" }, this.icon && this.iconPosition === 'end' && index.h("ds-icon", { key: 'c3088e302a43b4cbc5601a9adff54a3dc27a59dc', name: this.icon, class: iconClasses, size: "1em", title: this.iconTitle, hidden: this.iconHidden })), linkUtils.opensInNewTab(this.target) && (index.h("ds-visually-hidden", { key: '25ac189fd216148a05fddfc6e384cfbde59e0e22', id: this.visuallyHiddenAssistiveTextId }, linkUtils.visuallyHiddenAssistiveText(this.language ?? document.documentElement.lang)))));
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)))));
53
52
  }
54
53
  };
55
54
  DsLink.style = DsLinkStyle0;
@@ -0,0 +1,111 @@
1
+ 'use strict';
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 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;
11
+
12
+ const radioButtonGroupIdGenerator = utils.idGenerator('ds-radio-button-group');
13
+ const DsRadioButtonGroup = class {
14
+ constructor(hostRef) {
15
+ index.registerInstance(this, hostRef);
16
+ this.dsRadioGroupValueChange = index.createEvent(this, "dsRadioGroupValueChange", 7);
17
+ this.dsRadioGroupInvalidStateChange = index.createEvent(this, "dsRadioGroupInvalidStateChange", 7);
18
+ }
19
+ fieldsetId = radioButtonGroupIdGenerator.next().value;
20
+ errorTextId = `${this.fieldsetId}-error`;
21
+ assistiveTextId = `${this.fieldsetId}-assistive-text`;
22
+ inheritedAttributes = {};
23
+ get el() { return index.getElement(this); }
24
+ legend;
25
+ assistiveText;
26
+ initialValue;
27
+ direction = 'vertical';
28
+ errorText = '';
29
+ value;
30
+ dsRadioGroupValueChange;
31
+ dsRadioGroupInvalidStateChange;
32
+ getRadios = () => {
33
+ return Array.from(this.el.querySelectorAll('ds-radio-button')).filter(e => !e.disabled);
34
+ };
35
+ updateFocusableRadioButton = () => {
36
+ const radios = this.getRadios();
37
+ if (!radios.length) {
38
+ return;
39
+ }
40
+ let focusableBtn = null;
41
+ for (const radio of radios) {
42
+ const isFocusable = radio.value === this.value;
43
+ radio.setFocusable(isFocusable);
44
+ if (isFocusable) {
45
+ focusableBtn = radio;
46
+ }
47
+ }
48
+ if (!focusableBtn) {
49
+ radios[0].setFocusable(true);
50
+ }
51
+ };
52
+ componentWillLoad() {
53
+ this.value = this.initialValue;
54
+ this.inheritedAttributes = utils.inheritAriaAttributes(this.el, ['aria-labelledby']);
55
+ this.updateFocusableRadioButton();
56
+ }
57
+ async getValue() {
58
+ return this.value;
59
+ }
60
+ errorTextObserver(errorText) {
61
+ this.dsRadioGroupInvalidStateChange.emit(!!errorText);
62
+ }
63
+ onInputChange(e) {
64
+ e.stopPropagation();
65
+ const targetElem = e.target;
66
+ this.value = targetElem.value;
67
+ this.dsRadioGroupValueChange.emit(this.value);
68
+ this.updateFocusableRadioButton();
69
+ }
70
+ onKeyDown(e) {
71
+ if (!['ArrowUp', 'ArrowLeft', 'ArrowDown', 'ArrowRight'].includes(e.key)) {
72
+ return;
73
+ }
74
+ if (e.target && !this.el.contains(e.target)) {
75
+ return;
76
+ }
77
+ const radios = this.getRadios();
78
+ if (e.target && !radios.includes(e.target)) {
79
+ return;
80
+ }
81
+ e.preventDefault();
82
+ const currentIndex = radios.findIndex(r => r === e.target);
83
+ let nextIndex;
84
+ if (['ArrowUp', 'ArrowLeft'].includes(e.key)) {
85
+ nextIndex = currentIndex === 0 ? radios.length - 1 : currentIndex - 1;
86
+ }
87
+ if (['ArrowDown', 'ArrowRight'].includes(e.key)) {
88
+ nextIndex = (currentIndex + 1) % radios.length;
89
+ }
90
+ const nextElem = radios[nextIndex];
91
+ nextElem.setFocus();
92
+ nextElem.setChecked();
93
+ }
94
+ render() {
95
+ const classes = index$1.classNames('ds-radio-button-group');
96
+ const legendClasses = index$1.classNames('ds-radio-button-group__legend');
97
+ const assistiveTextClasses = index$1.classNames('ds-radio-button-group__assistive-text');
98
+ const radioButtonsSlotClasses = index$1.classNames('ds-radio-button-group__radio-buttons-slot', {
99
+ 'ds-radio-button-group__radio-buttons-slot--horizontal': this.direction === 'horizontal',
100
+ });
101
+ 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" })))));
104
+ }
105
+ static get watchers() { return {
106
+ "errorText": ["errorTextObserver"]
107
+ }; }
108
+ };
109
+ DsRadioButtonGroup.style = DsRadioButtonGroupStyle0;
110
+
111
+ exports.ds_radio_button_group = DsRadioButtonGroup;
@@ -0,0 +1,150 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
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;
13
+
14
+ const radioButtonIdGenerator = utils.idGenerator('ds-radio-button');
15
+ const DsRadioButton = class {
16
+ constructor(hostRef) {
17
+ index.registerInstance(this, hostRef);
18
+ this.dsRadioButtonChecked = index.createEvent(this, "dsRadioButtonChecked", 7);
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
+ }
26
+ }
27
+ radioGroup = null;
28
+ inputElem;
29
+ dsRadioButtonChecked;
30
+ get el() { return index.getElement(this); }
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 = '';
44
+ focusable = true;
45
+ invalid = !!this.errorText;
46
+ initialChecked = this.checked;
47
+ validationMessage;
48
+ errorTextId = `${this.identifier}-error`;
49
+ assistiveTextId = `${this.identifier}-assistive-text`;
50
+ async setFocus() {
51
+ this.inputElem.focus();
52
+ }
53
+ async setFocusable(flag) {
54
+ this.focusable = flag;
55
+ }
56
+ async setChecked() {
57
+ this.checked = true;
58
+ this.internals?.setFormValue('true');
59
+ this.dsRadioButtonChecked.emit();
60
+ if (store.isValidation('client') && this.validationMessage) {
61
+ this.validationMessage = this.getValidationMessage();
62
+ }
63
+ }
64
+ inheritedAttributes = {};
65
+ getValidationMessage = () => (!this.errorsDisabled ? this.errorText || this.internals?.validationMessage || this.inputElem?.validationMessage : '');
66
+ componentWillLoad() {
67
+ this.inheritedAttributes = {
68
+ ...utils.inheritAttributes(this, this.el),
69
+ };
70
+ }
71
+ formResetCallback() {
72
+ this.checked = this.initialChecked;
73
+ this.internals.setValidity({});
74
+ this.internals.setFormValue(this.checked.toString());
75
+ }
76
+ connectedCallback() {
77
+ this.radioGroup = this.el.closest('ds-radio-button-group');
78
+ if (this.radioGroup) {
79
+ this.updateCheckedState();
80
+ this.invalid = !!this.radioGroup.errorText;
81
+ this.radioGroup.addEventListener('dsRadioGroupValueChange', this.updateCheckedState);
82
+ this.radioGroup.addEventListener('dsRadioGroupInvalidStateChange', this.updateInvalidState);
83
+ }
84
+ }
85
+ disconnectedCallback() {
86
+ if (this.radioGroup) {
87
+ this.radioGroup.removeEventListener('dsRadioGroupValueChange', this.updateCheckedState);
88
+ this.radioGroup.removeEventListener('dsRadioGroupInvalidStateChange', this.updateInvalidState);
89
+ }
90
+ this.radioGroup = null;
91
+ }
92
+ updateCheckedState = async () => {
93
+ this.checked = this.value === (await this.radioGroup.getValue());
94
+ };
95
+ updateInvalidState = (e) => {
96
+ this.invalid = e.detail;
97
+ };
98
+ handleInput = () => {
99
+ this.setChecked();
100
+ };
101
+ handleBlur = () => {
102
+ if (store.isValidation('client')) {
103
+ this.validationMessage = this.getValidationMessage();
104
+ }
105
+ };
106
+ getLegendText = () => {
107
+ if (this.required) {
108
+ return controlUtils.getRequiredText(this.legend);
109
+ }
110
+ if (this.optional) {
111
+ return controlUtils.getOptionalText(this.legend, this.optionalText);
112
+ }
113
+ return this.legend;
114
+ };
115
+ renderRadioIcon() {
116
+ const iconClass = 'ds-radio-button__icon';
117
+ const outerCircleClasses = index$1.classNames(`${iconClass}__outer-circle`, {
118
+ [`${iconClass}__outer-circle--checked`]: this.checked,
119
+ });
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" })))));
122
+ }
123
+ 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,
127
+ });
128
+ const inputClasses = index$1.classNames('ds-radio-button__input');
129
+ const textClasses = index$1.classNames('ds-radio-button__text');
130
+ 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 })))));
132
+ }
133
+ 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()));
139
+ }
140
+ render() {
141
+ if (this.legend) {
142
+ return this.renderFieldset();
143
+ }
144
+ return this.renderRadioButton();
145
+ }
146
+ static get formAssociated() { return true; }
147
+ };
148
+ DsRadioButton.style = DsRadioButtonStyle0;
149
+
150
+ exports.ds_radio_button = DsRadioButton;