@uh-design-system/component-library 0.4.0 → 0.4.2

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 (151) hide show
  1. package/dist/cjs/component-library.cjs.js +3 -3
  2. package/dist/cjs/controlUtils-041de0fd.js +7 -0
  3. package/dist/cjs/ds-accordion_3.cjs.entry.js +27 -20
  4. package/dist/cjs/ds-checkbox-group.cjs.entry.js +156 -0
  5. package/dist/cjs/ds-checkbox.cjs.entry.js +153 -0
  6. package/dist/cjs/ds-input-validity.cjs.entry.js +38 -0
  7. package/dist/cjs/ds-link-with-arrow.cjs.entry.js +8 -7
  8. package/dist/cjs/ds-link.cjs.entry.js +11 -8
  9. package/dist/cjs/ds-text-input.cjs.entry.js +30 -6
  10. package/dist/cjs/ds-visually-hidden.cjs.entry.js +2 -2
  11. package/dist/cjs/{index-bfa0f441.js → index-b2bddcf4.js} +326 -125
  12. package/dist/cjs/{linkUtils-695da37c.js → linkUtils-e911e899.js} +10 -0
  13. package/dist/cjs/loader.cjs.js +2 -2
  14. package/dist/cjs/utils-c9113835.js +18 -0
  15. package/dist/collection/accessibility/accessibility.stories.js +10 -0
  16. package/dist/collection/accessibility/stories/ariaLabel.stories.js +19 -0
  17. package/dist/collection/accessibility/stories/ariaLabelledBy.stories.js +49 -0
  18. package/dist/collection/accessibility/stories/naming.stories.js +39 -0
  19. package/dist/collection/collection-manifest.json +4 -1
  20. package/dist/collection/components/00-foundations/icons/categories/information.js +4 -0
  21. package/dist/collection/components/00-foundations/typography/stories/typography.stories.js +133 -48
  22. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.css +1 -1
  23. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +6 -6
  24. package/dist/collection/components/01-base-components/ds-button/ds-button.css +9 -9
  25. package/dist/collection/components/01-base-components/ds-button/ds-button.js +2 -2
  26. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.examples.stories.js +53 -12
  27. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.features.stories.js +88 -55
  28. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.stories.js +1 -1
  29. package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.css +144 -0
  30. package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.js +429 -0
  31. package/dist/collection/components/01-base-components/ds-checkbox/stories/ds-checkbox.features.stories.js +115 -0
  32. package/dist/collection/components/01-base-components/ds-checkbox/stories/ds-checkbox.stories.js +37 -0
  33. package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.css +38 -0
  34. package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.js +445 -0
  35. package/dist/collection/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.features.stories.js +89 -0
  36. package/dist/collection/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.stories.js +47 -0
  37. package/dist/collection/components/01-base-components/ds-icon/ds-icon.js +1 -1
  38. package/dist/collection/components/01-base-components/ds-icon/{ds-icon.stories.js → stories/ds-icon.stories.js} +12 -2
  39. package/dist/collection/components/01-base-components/ds-input-validity/ds-input-validity.css +31 -0
  40. package/dist/collection/components/01-base-components/ds-input-validity/ds-input-validity.js +114 -0
  41. package/dist/collection/components/01-base-components/ds-input-validity/stories/ds-input-validity.features.stories.js +17 -0
  42. package/dist/collection/components/01-base-components/ds-input-validity/stories/ds-input-validity.stories.js +21 -0
  43. package/dist/collection/components/01-base-components/ds-link/ds-link.css +19 -139
  44. package/dist/collection/components/01-base-components/ds-link/ds-link.js +68 -8
  45. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.examples.stories.js +6 -2
  46. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.features.stories.js +2 -2
  47. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.stories.js +15 -4
  48. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.css +1 -139
  49. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.js +25 -5
  50. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/{ds-arrow-link.examples.stories.js → ds-link-with-arrow.examples.stories.js} +26 -3
  51. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/{ds-arrow-link.stories.js → ds-link-with-arrow.stories.js} +5 -4
  52. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.css +8 -11
  53. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +30 -5
  54. package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.examples.stories.js +29 -7
  55. package/dist/collection/components/01-base-components/ds-text-input/utils.js +0 -6
  56. package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.js +1 -1
  57. package/dist/collection/utils/controls/controlUtils.js +2 -0
  58. package/dist/collection/utils/link/linkUtils.js +9 -0
  59. package/dist/collection/utils/typography/typographyUtils.js +39 -0
  60. package/dist/collection/utils/utils.js +24 -6
  61. package/dist/component-library/component-library.css +1 -1
  62. package/dist/component-library/component-library.esm.js +1 -1
  63. package/dist/component-library/controlUtils-9ca4087b.js +1 -0
  64. package/dist/component-library/ds-accordion_3.entry.js +1 -1
  65. package/dist/component-library/ds-checkbox-group.entry.js +1 -0
  66. package/dist/component-library/ds-checkbox.entry.js +1 -0
  67. package/dist/component-library/ds-input-validity.entry.js +1 -0
  68. package/dist/component-library/ds-link-with-arrow.entry.js +1 -1
  69. package/dist/component-library/ds-link.entry.js +1 -1
  70. package/dist/component-library/ds-text-input.entry.js +1 -1
  71. package/dist/component-library/ds-visually-hidden.entry.js +1 -1
  72. package/dist/component-library/index-50783b0c.js +2 -0
  73. package/dist/component-library/{linkUtils-3d1b28cf.js → linkUtils-fe63ff72.js} +1 -1
  74. package/dist/component-library/utils-b5843ae1.js +1 -0
  75. package/dist/components/attributes.js +1 -80
  76. package/dist/components/controlUtils.js +4 -0
  77. package/dist/components/ds-accordion.js +8 -8
  78. package/dist/components/ds-button2.js +4 -3
  79. package/dist/components/ds-checkbox-group.d.ts +11 -0
  80. package/dist/components/ds-checkbox-group.js +206 -0
  81. package/dist/components/ds-checkbox.d.ts +11 -0
  82. package/dist/components/ds-checkbox.js +6 -0
  83. package/dist/components/ds-checkbox2.js +185 -0
  84. package/dist/components/ds-icon2.js +24 -4
  85. package/dist/components/ds-input-validity.d.ts +11 -0
  86. package/dist/components/ds-input-validity.js +6 -0
  87. package/dist/components/ds-input-validity2.js +59 -0
  88. package/dist/components/ds-link-with-arrow.js +10 -8
  89. package/dist/components/ds-link.js +15 -9
  90. package/dist/components/ds-text-input.js +30 -7
  91. package/dist/components/ds-visually-hidden2.js +1 -1
  92. package/dist/components/index2.js +298 -130
  93. package/dist/components/index3.js +80 -0
  94. package/dist/components/linkUtils.js +10 -1
  95. package/dist/esm/component-library.js +4 -4
  96. package/dist/esm/controlUtils-9ca4087b.js +4 -0
  97. package/dist/esm/ds-accordion_3.entry.js +25 -18
  98. package/dist/esm/ds-checkbox-group.entry.js +152 -0
  99. package/dist/esm/ds-checkbox.entry.js +149 -0
  100. package/dist/esm/ds-input-validity.entry.js +34 -0
  101. package/dist/esm/ds-link-with-arrow.entry.js +8 -7
  102. package/dist/esm/ds-link.entry.js +11 -8
  103. package/dist/esm/ds-text-input.entry.js +30 -6
  104. package/dist/esm/ds-visually-hidden.entry.js +2 -2
  105. package/dist/esm/{index-42701395.js → index-50783b0c.js} +326 -126
  106. package/dist/esm/{linkUtils-3d1b28cf.js → linkUtils-fe63ff72.js} +10 -1
  107. package/dist/esm/loader.js +3 -3
  108. package/dist/esm/utils-b5843ae1.js +15 -0
  109. package/dist/types/accessibility/accessibility.stories.d.ts +3 -0
  110. package/dist/types/accessibility/stories/ariaLabel.stories.d.ts +5 -0
  111. package/dist/types/accessibility/stories/ariaLabelledBy.stories.d.ts +4 -0
  112. package/dist/types/accessibility/stories/naming.stories.d.ts +4 -0
  113. package/dist/types/components/00-foundations/typography/stories/typography.stories.d.ts +1 -0
  114. package/dist/types/components/01-base-components/ds-button/stories/ds-button.examples.stories.d.ts +2 -0
  115. package/dist/types/components/01-base-components/ds-button/stories/ds-button.features.stories.d.ts +4 -1
  116. package/dist/types/components/01-base-components/ds-checkbox/ds-checkbox.d.ts +49 -0
  117. package/dist/types/components/01-base-components/ds-checkbox/stories/ds-checkbox.features.stories.d.ts +13 -0
  118. package/dist/types/components/01-base-components/ds-checkbox/stories/ds-checkbox.stories.d.ts +7 -0
  119. package/dist/types/components/01-base-components/ds-checkbox-group/ds-checkbox-group.d.ts +56 -0
  120. package/dist/types/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.features.stories.d.ts +11 -0
  121. package/dist/types/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.stories.d.ts +7 -0
  122. package/dist/types/components/01-base-components/ds-icon/{ds-icon.stories.d.ts → stories/ds-icon.stories.d.ts} +2 -1
  123. package/dist/types/components/01-base-components/ds-input-validity/ds-input-validity.d.ts +12 -0
  124. package/dist/types/components/01-base-components/ds-input-validity/stories/ds-input-validity.features.stories.d.ts +7 -0
  125. package/dist/types/components/01-base-components/ds-input-validity/stories/ds-input-validity.stories.d.ts +7 -0
  126. package/dist/types/components/01-base-components/ds-link/ds-link.d.ts +4 -1
  127. package/dist/types/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.d.ts +1 -0
  128. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.d.ts +5 -0
  129. package/dist/types/components/01-base-components/ds-text-input/utils.d.ts +0 -1
  130. package/dist/types/components.d.ts +142 -2
  131. package/dist/types/utils/controls/controlUtils.d.ts +2 -0
  132. package/dist/types/utils/link/linkUtils.d.ts +1 -0
  133. package/dist/types/utils/typography/typographyUtils.d.ts +5 -0
  134. package/dist/types/utils/utils.d.ts +10 -3
  135. package/package.json +19 -18
  136. package/dist/cjs/utils-8b73aa91.js +0 -10
  137. package/dist/collection/components/00-foundations/typography/typography.stories.js +0 -68
  138. package/dist/component-library/index-42701395.js +0 -2
  139. package/dist/component-library/utils-cca2a41a.js +0 -1
  140. package/dist/components/utils.js +0 -8
  141. package/dist/esm/utils-cca2a41a.js +0 -8
  142. package/dist/types/components/00-foundations/typography/typography.stories.d.ts +0 -7
  143. /package/dist/cjs/{attributes-f7831329.js → attributes-5f5b58be.js} +0 -0
  144. /package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/{ds-arrow-link.features.stories.js → ds-link-with-arrow.features.stories.js} +0 -0
  145. /package/dist/collection/utils/{attributes.js → attributes/attributes.js} +0 -0
  146. /package/dist/component-library/{attributes-9419ac39.js → attributes-7d09be1b.js} +0 -0
  147. /package/dist/esm/{attributes-9419ac39.js → attributes-7d09be1b.js} +0 -0
  148. /package/dist/types/components/01-base-components/ds-link-with-arrow/stories/{ds-arrow-link.examples.stories.d.ts → ds-link-with-arrow.examples.stories.d.ts} +0 -0
  149. /package/dist/types/components/01-base-components/ds-link-with-arrow/stories/{ds-arrow-link.features.stories.d.ts → ds-link-with-arrow.features.stories.d.ts} +0 -0
  150. /package/dist/types/components/01-base-components/ds-link-with-arrow/stories/{ds-arrow-link.stories.d.ts → ds-link-with-arrow.stories.d.ts} +0 -0
  151. /package/dist/types/utils/{attributes.d.ts → attributes/attributes.d.ts} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { html } from "lit";
2
+ import { litTemplateResultToString } from "../../../../utils/utils";
2
3
  const meta = {
3
4
  title: 'Base Components/Button/Examples',
4
5
  component: 'ds-button',
@@ -13,21 +14,61 @@ export const ButtonGroup = {
13
14
  </div>
14
15
  `,
15
16
  };
17
+ export const ButtonGroupSmall = {
18
+ render: () => html `
19
+ <div class="button-group">
20
+ <ds-button variant="primary" value="Primary" size="small"></ds-button>
21
+ <ds-button variant="secondary" value="Secondary" size="small"></ds-button>
22
+ <ds-button variant="supplementary" value="Supplementary" size="small"></ds-button>
23
+ </div>
24
+ `,
25
+ };
26
+ export const ButtonGroupIcon = {
27
+ render: () => html `
28
+ <div class="button-group">
29
+ <ds-button value="Button with text and icon" icon="ds_flame"></ds-button>
30
+ <ds-button value="Button with text and icon" icon="ds_flame" icon-position="end"></ds-button>
31
+ <ds-button icon="ds_flame" aria-label="Button with icon"></ds-button>
32
+ </div>
33
+ `,
34
+ };
35
+ const resetAndSubmitButtonDOM = html `
36
+ <form class="ds-sb-reset-and-submit-button">
37
+ <ds-text-input name="firstname" label="firstname"></ds-text-input>
38
+ <ds-text-input name="lastname" label="lastname"></ds-text-input>
39
+ <div class="button-group ds-sb-reset-and-submit-button__buttons">
40
+ <ds-button value="reset" type="reset" variant="secondary"></ds-button>
41
+ <ds-button value="submit" type="submit"></ds-button>
42
+ </div>
43
+ </form>
44
+ `;
16
45
  export const ResetAndSubmitButton = {
46
+ parameters: {
47
+ docs: {
48
+ source: {
49
+ code: litTemplateResultToString(resetAndSubmitButtonDOM),
50
+ }
51
+ },
52
+ },
17
53
  render: () => html `
18
- <form>
19
- <ds-text-input name="firstname" label="firstname"></ds-text-input>
20
- <ds-text-input name="lastname" label="lastname"></ds-text-input>
21
- <div class="button-group">
22
- <ds-button value="reset" type="reset" variant="secondary"></ds-button>
23
- <ds-button value="submit" type="submit"></ds-button>
24
- </div>
25
- </form>
54
+ <style>
55
+ .ds-sb-reset-and-submit-button {
56
+ display: inline-flex;
57
+ flex-direction: column;
58
+ gap: 1rem;
59
+ }
60
+ .ds-sb-reset-and-submit-button .ds-sb-reset-and-submit-button__buttons {
61
+ align-self: flex-end;
62
+ }
63
+ </style>
64
+ ${resetAndSubmitButtonDOM}
26
65
  `,
27
66
  };
28
67
  export const FullWidthWithIconsUsingSlots = {
29
- render: () => html `<ds-button style="width: 100%" value="Full width with icons using slots">
30
- <ds-icon slot="prefix" name="ds_flame"></ds-icon>
31
- <ds-icon slot="suffix" name="ds_flame"></ds-icon>
32
- </ds-button>`,
68
+ render: () => html `
69
+ <ds-button style="width: 100%;" value="Full width with icons using slots">
70
+ <ds-icon slot="prefix" name="ds_flame"></ds-icon>
71
+ <ds-icon slot="suffix" name="ds_flame"></ds-icon>
72
+ </ds-button>
73
+ `,
33
74
  };
@@ -16,61 +16,94 @@ const meta = {
16
16
  },
17
17
  };
18
18
  export default meta;
19
- export const Primary = {};
20
- Primary.args = {
21
- value: 'Primary',
22
- variant: 'primary',
23
- };
24
- export const Secondary = {};
25
- Secondary.args = {
26
- value: 'Secondary',
27
- variant: 'secondary',
28
- };
29
- export const Supplementary = {};
30
- Supplementary.args = {
31
- value: 'Supplementary',
32
- variant: 'supplementary',
33
- };
34
- export const Blue = {};
35
- Blue.args = {
36
- value: 'Blue',
37
- colour: 'blue',
38
- };
39
- export const Black = {};
40
- Black.args = {
41
- value: 'Black',
42
- colour: 'black',
43
- };
44
- export const White = {};
45
- White.args = {
46
- value: 'White',
47
- colour: 'white',
48
- };
49
- export const Medium = {};
50
- Medium.args = {
51
- value: 'Medium',
52
- size: 'medium',
53
- };
54
- export const Small = {};
55
- Small.args = {
56
- value: 'Small',
57
- size: 'small',
58
- };
59
- export const Disabled = {};
60
- Disabled.args = {
61
- value: 'Disabled',
62
- disabled: true,
63
- };
64
- export const IconStart = {};
65
- IconStart.args = {
66
- value: 'Icon start',
67
- icon: 'arrow_forward',
68
- };
69
- export const IconEnd = {};
70
- IconEnd.args = {
71
- value: 'Icon end',
72
- icon: 'arrow_forward',
73
- iconPosition: 'end',
19
+ export const Primary = {
20
+ args: {
21
+ value: 'Primary',
22
+ variant: 'primary',
23
+ }
24
+ };
25
+ export const Secondary = {
26
+ args: {
27
+ value: 'Secondary',
28
+ variant: 'secondary',
29
+ }
30
+ };
31
+ export const Supplementary = {
32
+ args: {
33
+ value: 'Supplementary',
34
+ variant: 'supplementary',
35
+ }
36
+ };
37
+ export const Blue = {
38
+ args: {
39
+ value: 'Blue',
40
+ colour: 'blue',
41
+ }
42
+ };
43
+ export const Black = {
44
+ args: {
45
+ value: 'Black',
46
+ colour: 'black',
47
+ }
48
+ };
49
+ export const White = {
50
+ args: {
51
+ value: 'White',
52
+ colour: 'white',
53
+ },
54
+ parameters: {
55
+ backgrounds: { default: 'Black 90%' },
56
+ }
57
+ };
58
+ export const Medium = {
59
+ args: {
60
+ value: 'Medium',
61
+ size: 'medium',
62
+ }
63
+ };
64
+ export const SmallPrimary = {
65
+ args: {
66
+ size: 'small',
67
+ variant: 'primary',
68
+ },
69
+ };
70
+ export const SmallSecondary = {
71
+ args: {
72
+ size: 'small',
73
+ variant: 'secondary',
74
+ },
75
+ };
76
+ export const SmallSupplementary = {
77
+ args: {
78
+ size: 'small',
79
+ variant: 'supplementary',
80
+ },
81
+ };
82
+ export const Disabled = {
83
+ args: {
84
+ value: 'Disabled',
85
+ disabled: true,
86
+ }
87
+ };
88
+ export const IconStart = {
89
+ args: {
90
+ value: 'Icon start',
91
+ icon: 'arrow_forward',
92
+ }
93
+ };
94
+ export const IconEnd = {
95
+ args: {
96
+ value: 'Icon end',
97
+ icon: 'arrow_forward',
98
+ iconPosition: 'end',
99
+ }
100
+ };
101
+ export const IconOnly = {
102
+ args: {
103
+ value: '',
104
+ icon: 'download',
105
+ ariaLabel: 'Download',
106
+ }
74
107
  };
75
108
  export const FullWidth = {
76
109
  render: () => html `<ds-button full-width value="Full width"></ds-button>`
@@ -1,5 +1,5 @@
1
1
  import { icons } from "../../../00-foundations/icons/iconList";
2
- import { getAriaAttributeArgTypes } from "../../../../utils/attributes";
2
+ import { getAriaAttributeArgTypes } from "../../../../utils/attributes/attributes";
3
3
  const buttonAriaAttributes = [
4
4
  'aria-busy',
5
5
  'aria-live',
@@ -0,0 +1,144 @@
1
+ .ds-checkbox-fieldset {
2
+ display: inline-flex;
3
+ flex-direction: column;
4
+ border: none;
5
+ padding: 0;
6
+ margin: 0;
7
+ gap: var(--ds-spacing-3xSmall);
8
+ }
9
+ .ds-checkbox-fieldset__legend {
10
+ padding-inline: 0;
11
+ font-size: var(--ds-fontSize-16);
12
+ font-weight: var(--ds-fontWeight-semibold);
13
+ letter-spacing: var(--ds-letterSpacing-wide);
14
+ line-height: var(--ds-lineHeight-large);
15
+ }
16
+ .ds-checkbox-fieldset__assistive-text {
17
+ display: inline;
18
+ font-size: var(--ds-fontSize-14);
19
+ color: var(--ds-textColor-secondary);
20
+ line-height: var(--ds-lineHeight-large);
21
+ }
22
+
23
+ .ds-checkbox {
24
+ display: inline-flex;
25
+ align-self: flex-start;
26
+ align-items: center;
27
+ flex-direction: row;
28
+ flex-wrap: nowrap;
29
+ text-wrap: nowrap;
30
+ position: relative;
31
+ cursor: pointer;
32
+ user-select: none;
33
+ width: auto;
34
+ padding: var(--ds-spacing-xSmall);
35
+ }
36
+ .ds-checkbox--no-margin .ds-checkbox__input {
37
+ margin-right: 0;
38
+ }
39
+ .ds-checkbox--disabled {
40
+ color: var(--ds-textColor-disabled-onLight);
41
+ }
42
+ .ds-checkbox__span--optional {
43
+ color: var(--ds-textColor-secondary);
44
+ font-size: var(--ds-fontSize-14);
45
+ }
46
+ .ds-checkbox:has(.ds-checkbox__input:disabled) {
47
+ cursor: not-allowed;
48
+ }
49
+ .ds-checkbox__input {
50
+ cursor: pointer;
51
+ /* hide the default checkbox */
52
+ -webkit-appearance: none;
53
+ appearance: none;
54
+ /* For iOS < 15 to remove gradient background */
55
+ background-color: var(--ds-bgColor-white);
56
+ /* Not removed via appearance */
57
+ margin: 0;
58
+ display: grid;
59
+ place-content: center;
60
+ height: 24px;
61
+ width: 24px;
62
+ margin-right: var(--ds-spacing-xSmall);
63
+ border-width: var(--ds-borderWidth-thin);
64
+ border-style: solid;
65
+ border-color: var(--ds-palette-black-50);
66
+ /** unchecked **/
67
+ /** checked and indeterminate **/
68
+ /** Error state should override other styles */
69
+ /** checkmark **/
70
+ }
71
+ .ds-checkbox__input:focus-visible {
72
+ box-shadow: 0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);
73
+ outline-color: var(--ds-borderColor-black);
74
+ outline-offset: var(--ds-borderWidth-thin);
75
+ outline-style: solid;
76
+ outline-width: var(--ds-borderWidth-thin);
77
+ }
78
+ .ds-checkbox__input:hover, .ds-checkbox__input:active {
79
+ border-color: var(--ds-borderColor-default);
80
+ }
81
+ .ds-checkbox__input:hover {
82
+ background-color: var(--ds-bgColor-white-hover);
83
+ }
84
+ .ds-checkbox__input:active {
85
+ background-color: var(--ds-bgColor-white-active);
86
+ }
87
+ .ds-checkbox__input:disabled {
88
+ background-color: var(--ds-bgColor-disabled-onLight);
89
+ border-color: var(--ds-borderColor-disabled-onLight);
90
+ }
91
+ @media (forced-colors: active) {
92
+ .ds-checkbox__input:disabled {
93
+ border-color: GrayText;
94
+ }
95
+ }
96
+ .ds-checkbox__input:checked, .ds-checkbox__input:indeterminate {
97
+ background-color: var(--ds-bgColor-primary);
98
+ border-color: var(--ds-borderColor-transparent);
99
+ }
100
+ .ds-checkbox__input:checked:hover, .ds-checkbox__input:indeterminate:hover {
101
+ background-color: var(--ds-bgColor-primary-hover);
102
+ }
103
+ .ds-checkbox__input:checked:active, .ds-checkbox__input:indeterminate:active {
104
+ background-color: var(--ds-bgColor-primary-active);
105
+ }
106
+ .ds-checkbox__input:checked:disabled, .ds-checkbox__input:indeterminate:disabled {
107
+ background-color: var(--ds-bgColor-disabled-onLight);
108
+ }
109
+ .ds-checkbox__input:user-invalid, .ds-checkbox__input--invalid, .ds-checkbox__input--invalid:checked, .ds-checkbox__input--invalid:indeterminate {
110
+ border-color: var(--ds-borderColor-danger);
111
+ }
112
+ .ds-checkbox__input:disabled {
113
+ cursor: not-allowed;
114
+ color: var(--ds-textColor-disabled-onLight);
115
+ }
116
+ .ds-checkbox__input::before {
117
+ content: "";
118
+ display: block;
119
+ height: 1em;
120
+ width: 1em;
121
+ background-size: contain;
122
+ background-repeat: no-repeat;
123
+ background-position: center;
124
+ }
125
+ .ds-checkbox__input:checked::before {
126
+ 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>");
127
+ }
128
+ .ds-checkbox__input:checked:disabled::before {
129
+ 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>");
130
+ }
131
+ .ds-checkbox__input:indeterminate::before {
132
+ 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>");
133
+ }
134
+ .ds-checkbox__input:indeterminate:disabled::before {
135
+ 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>");
136
+ }
137
+
138
+ .ds-checkbox-error {
139
+ display: flex;
140
+ }
141
+ .ds-checkbox-error--visible {
142
+ padding-top: var(--ds-spacing-3xSmall);
143
+ padding-left: var(--ds-spacing-xSmall);
144
+ }