@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
@@ -9,5 +9,14 @@ const visuallyHiddenAssistiveText = (lang) => {
9
9
  return 'Opens in a new tab';
10
10
  }
11
11
  };
12
+ const getAriaLabel = (text, ariaLabel) => {
13
+ if (!ariaLabel) {
14
+ return undefined;
15
+ }
16
+ if (ariaLabel.startsWith(text)) {
17
+ return ariaLabel;
18
+ }
19
+ return [text, ariaLabel].join(' ');
20
+ };
12
21
 
13
- export { opensInNewTab as o, visuallyHiddenAssistiveText as v };
22
+ export { getAriaLabel as g, opensInNewTab as o, visuallyHiddenAssistiveText as v };
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-42701395.js';
2
- export { s as setNonce } from './index-42701395.js';
1
+ import { b as bootstrapLazy } from './index-50783b0c.js';
2
+ export { s as setNonce } from './index-50783b0c.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["ds-visually-hidden",[[1,"ds-visually-hidden"]]],["ds-accordion_3",[[1,"ds-accordion",{"variant":[1],"borderAligned":[4,"border-aligned"],"openByDefault":[4,"open-by-default"],"accordionId":[1,"accordion-id"],"headingLevel":[2,"heading-level"],"useCloseButton":[4,"use-close-button"],"closeButtonLabel":[1,"close-button-label"],"hideTopBorder":[4,"hide-top-border"],"isExpanded":[32]},null,{"isExpanded":["watchHandler"]}],[6,"ds-button",{"value":[1],"variant":[1],"colour":[1],"size":[1],"fontWeight":[1,"font-weight"],"icon":[1],"iconPosition":[1,"icon-position"],"type":[1],"disabled":[4],"fullWidth":[4,"full-width"],"ariaDisabled":[1,"aria-disabled"]}],[1,"ds-icon",{"name":[1],"colour":[1],"size":[1],"dsTitle":[1,"title"],"role":[1],"hidden":[4],"message":[32]}]]],["ds-text-input",[[6,"ds-text-input",{"label":[1],"placeholder":[1],"dsId":[1,"id"],"name":[1],"disabled":[4],"optional":[4],"required":[4],"readonly":[4],"value":[1],"min":[2],"max":[2],"maxlength":[2],"pattern":[1],"autocomplete":[1],"optionalText":[1,"optional-text"],"errorText":[1,"error-text"],"successText":[1,"success-text"],"assistiveText":[1,"assistive-text"],"actionButtonAriaLabel":[1,"action-button-aria-label"],"hiddenAssistiveText":[1,"hidden-assistive-text"],"prefixText":[1,"prefix-text"],"suffixText":[1,"suffix-text"],"icon":[1],"type":[1],"ariaLabel":[1,"aria-label"],"ariaLabelledBy":[1,"aria-labelledby"],"ariaDescribedby":[1,"aria-describedby"],"hasFocus":[32],"clearButtonVisible":[32],"passwordInputVisible":[32],"inputActive":[32],"togglePasswordVisibility":[64],"clearInput":[64]}]]],["ds-link",[[1,"ds-link",{"text":[1],"size":[1],"variant":[1],"weight":[1],"icon":[1025],"iconPosition":[1025,"icon-position"],"href":[1],"target":[1],"download":[4],"language":[1,"lang"]}]]],["ds-link-with-arrow",[[1,"ds-link-with-arrow",{"text":[1],"iconPosition":[1,"icon-position"],"href":[1],"target":[1],"language":[1,"lang"]}]]]], options);
8
+ return bootstrapLazy([["ds-accordion_3",[[1,"ds-accordion",{"variant":[1],"borderAligned":[4,"border-aligned"],"openByDefault":[4,"open-by-default"],"accordionId":[1,"accordion-id"],"headingLevel":[2,"heading-level"],"useCloseButton":[4,"use-close-button"],"closeButtonLabel":[1,"close-button-label"],"hideTopBorder":[4,"hide-top-border"],"isExpanded":[32]},null,{"isExpanded":["watchHandler"]}],[6,"ds-button",{"value":[1],"variant":[1],"colour":[1],"size":[1],"fontWeight":[1,"font-weight"],"icon":[1],"iconPosition":[1,"icon-position"],"type":[1],"disabled":[4],"fullWidth":[4,"full-width"],"ariaDisabled":[1,"aria-disabled"]}],[1,"ds-icon",{"name":[1],"colour":[1],"size":[1],"dsTitle":[1,"title"],"role":[1],"hidden":[4],"message":[32]}]]],["ds-checkbox-group",[[1,"ds-checkbox-group",{"legend":[1],"assistiveText":[1,"assistive-text"],"direction":[1],"errorText":[1,"error-text"],"text":[1],"checked":[1028],"checkedChildElementCount":[1026,"checked-child-element-count"],"disabled":[4],"parentCheckedCount":[2,"parent-checked-count"],"childElementsCount":[32],"isIndeterminate":[32],"indeterminateChildCheckboxCount":[32],"setChecked":[64]},[[0,"dsCheckboxGroupIndeterminateChildChange","handleIndeterminateChildChange"],[0,"dsCheckboxChange","handleCheckboxChange"],[0,"dsCheckboxGroupChange","handleCheckboxGroupChange"]],{"disabled":["handleCheckboxDisabledChange"],"checked":["handleCheckedChange"],"isIndeterminate":["handleIndeterminateChange"],"checkedChildElementCount":["handleCheckedChildElementCountChange"]}]]],["ds-visually-hidden",[[1,"ds-visually-hidden"]]],["ds-text-input",[[6,"ds-text-input",{"label":[1],"placeholder":[1],"dsId":[1,"id"],"name":[1],"disabled":[4],"optional":[4],"required":[4],"readonly":[4],"value":[1],"min":[2],"max":[2],"maxlength":[2],"pattern":[1],"autocomplete":[1],"optionalText":[1,"optional-text"],"errorText":[1,"error-text"],"successText":[1,"success-text"],"assistiveText":[1,"assistive-text"],"actionButtonAriaLabel":[1,"action-button-aria-label"],"hiddenAssistiveText":[1,"hidden-assistive-text"],"prefixText":[1,"prefix-text"],"suffixText":[1,"suffix-text"],"icon":[1],"type":[1],"ariaLabel":[1,"aria-label"],"ariaLabelledBy":[1,"aria-labelledby"],"ariaDescribedby":[1,"aria-describedby"],"hasFocus":[32],"clearButtonVisible":[32],"passwordInputVisible":[32],"inputActive":[32],"togglePasswordVisibility":[64],"clearInput":[64]}]]],["ds-link",[[1,"ds-link",{"text":[1],"size":[1],"variant":[1],"weight":[1],"icon":[1025],"iconPosition":[1025,"icon-position"],"iconTitle":[1,"icon-title"],"iconHidden":[4,"icon-hidden"],"href":[1],"target":[1],"download":[4],"language":[1,"lang"],"linkAriaLabel":[1,"aria-label"]}]]],["ds-link-with-arrow",[[1,"ds-link-with-arrow",{"text":[1],"iconPosition":[1,"icon-position"],"href":[1],"target":[1],"language":[1,"lang"],"linkAriaLabel":[1,"aria-label"]}]]],["ds-input-validity",[[0,"ds-input-validity",{"text":[1],"type":[1],"validityRole":[1,"role"],"identifier":[32]}]]],["ds-checkbox",[[65,"ds-checkbox",{"checkboxId":[1025,"id"],"checked":[1028],"legend":[1],"assistiveText":[1,"assistive-text"],"text":[1],"indeterminate":[4],"disabled":[4],"errorText":[1,"error-text"],"errorsDisabled":[4,"data-errors-disabled"],"required":[4],"optional":[4],"optionalText":[1,"optional-text"],"ariaLabel":[32],"value":[32],"validationMessage":[32]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -0,0 +1,15 @@
1
+ const formatAs = (value, suffix) => value.endsWith(suffix) ? value : `${value}${suffix}`;
2
+ const formatAsPx = (value) => formatAs(value, 'px');
3
+ const remToPx = (remString) => {
4
+ const rootFontSize = 16;
5
+ const rem = parseFloat(remString);
6
+ return formatAsPx(`${rem * rootFontSize}`);
7
+ };
8
+ function* idGenerator(id) {
9
+ let currentId = 1;
10
+ while (true) {
11
+ yield `${id}-${currentId++}`;
12
+ }
13
+ }
14
+
15
+ export { idGenerator as i, remToPx as r };
@@ -0,0 +1,3 @@
1
+ import { Meta } from '@storybook/web-components';
2
+ declare const meta: Meta<typeof HTMLElement.prototype>;
3
+ export default meta;
@@ -0,0 +1,5 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ declare const meta: Meta<typeof HTMLElement.prototype>;
3
+ export default meta;
4
+ export declare const HowToAriaLabel: StoryObj;
5
+ export declare const HowNotToAriaLabel: StoryObj;
@@ -0,0 +1,4 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ declare const meta: Meta<typeof HTMLElement.prototype>;
3
+ export default meta;
4
+ export declare const HowToAriaLabelledBy: StoryObj;
@@ -0,0 +1,4 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ declare const meta: Meta<typeof HTMLElement.prototype>;
3
+ export default meta;
4
+ export declare const HowNamingWorks: StoryObj;
@@ -7,3 +7,4 @@ declare const meta: Meta;
7
7
  export default meta;
8
8
  export declare const TokenClasses: StoryObj;
9
9
  export declare const Typography: StoryObj;
10
+ export declare const Headings: StoryObj;
@@ -3,5 +3,7 @@ import { DsButton } from '../ds-button';
3
3
  declare const meta: Meta<typeof DsButton.prototype>;
4
4
  export default meta;
5
5
  export declare const ButtonGroup: StoryObj;
6
+ export declare const ButtonGroupSmall: StoryObj;
7
+ export declare const ButtonGroupIcon: StoryObj;
6
8
  export declare const ResetAndSubmitButton: StoryObj;
7
9
  export declare const FullWidthWithIconsUsingSlots: StoryObj;
@@ -10,10 +10,13 @@ export declare const Blue: Story;
10
10
  export declare const Black: Story;
11
11
  export declare const White: Story;
12
12
  export declare const Medium: Story;
13
- export declare const Small: Story;
13
+ export declare const SmallPrimary: Story;
14
+ export declare const SmallSecondary: Story;
15
+ export declare const SmallSupplementary: Story;
14
16
  export declare const Disabled: Story;
15
17
  export declare const IconStart: Story;
16
18
  export declare const IconEnd: Story;
19
+ export declare const IconOnly: Story;
17
20
  export declare const FullWidth: Story;
18
21
  export declare const FullWidthWithStartIcon: Story;
19
22
  export declare const FullWidthWithEndIcon: Story;
@@ -0,0 +1,49 @@
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ export interface CheckboxChangeEvent {
3
+ id: string;
4
+ checked: boolean;
5
+ }
6
+ export declare class DsCheckbox {
7
+ private labelId;
8
+ private errorTextId;
9
+ private assistiveTextId;
10
+ private inheritedAttributes;
11
+ private initialChecked?;
12
+ private inputElem;
13
+ el: HTMLElement;
14
+ internals: ElementInternals;
15
+ dsCheckboxChange: EventEmitter<CheckboxChangeEvent>;
16
+ dsCheckboxError: EventEmitter<string>;
17
+ checkboxId?: string;
18
+ checked: boolean;
19
+ legend?: string;
20
+ assistiveText?: string;
21
+ text?: string;
22
+ indeterminate: boolean;
23
+ disabled: boolean;
24
+ errorText: string;
25
+ errorsDisabled: boolean;
26
+ required: boolean;
27
+ optional: boolean;
28
+ optionalText?: string;
29
+ ariaLabel?: string;
30
+ value: string;
31
+ validationMessage: string;
32
+ private setIds;
33
+ private getErrorText;
34
+ private getLegendText;
35
+ private getCheckboxText;
36
+ private getAriaDescribedBy;
37
+ private restoreInitialState;
38
+ private setInitialState;
39
+ private emitCheckboxError;
40
+ formResetCallback(): void;
41
+ componentWillLoad(): void;
42
+ componentDidLoad(): void;
43
+ componentDidUpdate(): void;
44
+ handleChange: () => void;
45
+ handleKeyUp: (event: KeyboardEvent) => void;
46
+ renderCheckbox(): any;
47
+ renderFieldset(): any;
48
+ render(): any;
49
+ }
@@ -0,0 +1,13 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ import { DsCheckbox } from '../ds-checkbox';
3
+ declare const meta: Meta<typeof DsCheckbox.prototype>;
4
+ export default meta;
5
+ type Story = StoryObj;
6
+ export declare const Unchecked: Story;
7
+ export declare const Checked: Story;
8
+ export declare const Indeterminate: Story;
9
+ export declare const Disabled: Story;
10
+ export declare const Invalid: Story;
11
+ export declare const WithoutValueText: Story;
12
+ export declare const RequiredAndOptional: Story;
13
+ export declare const WithLegendAndAssistiveText: Story;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ import { DsCheckbox } from '../ds-checkbox';
3
+ declare const meta: Meta<typeof DsCheckbox.prototype>;
4
+ export default meta;
5
+ type Story = StoryObj;
6
+ export declare const Default: Story;
7
+ export declare const Playground: Story;
@@ -0,0 +1,56 @@
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { CheckboxChangeEvent } from '../ds-checkbox/ds-checkbox';
3
+ export interface CheckboxGroupChangeEvent {
4
+ id: string;
5
+ checked: boolean;
6
+ }
7
+ export interface CheckboxGroupIndeterminateChildChangeEvent {
8
+ id: string;
9
+ indeterminate: boolean;
10
+ }
11
+ export declare class DsCheckboxGroup {
12
+ private readonly fieldsetId;
13
+ private readonly checkboxId;
14
+ private readonly errorTextId;
15
+ private readonly assistiveTextId;
16
+ private readonly nestedId;
17
+ private inheritedAttributes;
18
+ el: HTMLElement;
19
+ dsCheckboxGroupChange: EventEmitter<CheckboxGroupChangeEvent>;
20
+ dsCheckboxGroupIndeterminateChildChange: EventEmitter<CheckboxGroupIndeterminateChildChangeEvent>;
21
+ legend?: string;
22
+ assistiveText?: string;
23
+ direction: 'horizontal' | 'vertical';
24
+ errorText: string;
25
+ text: string;
26
+ checked: boolean;
27
+ checkedChildElementCount: number;
28
+ disabled: boolean;
29
+ parentCheckedCount: number;
30
+ childElementsCount: number;
31
+ isIndeterminate: boolean;
32
+ indeterminateChildCheckboxCount: number;
33
+ private elementIs;
34
+ private elementIsCheckbox;
35
+ private elementIsCheckboxGroup;
36
+ private getAriaDescribedBy;
37
+ private getChildElements;
38
+ private getChildCheckboxElements;
39
+ private updateChildElements;
40
+ private updateChildCheckboxes;
41
+ private updateChildElementsChecked;
42
+ setChecked(newValue: boolean): Promise<void>;
43
+ handleCheckboxDisabledChange(newValue: boolean): void;
44
+ handleCheckedChange(newValue: boolean): void;
45
+ handleIndeterminateChange(newValue: boolean): void;
46
+ handleIndeterminateChildChange(event: CustomEvent<CheckboxGroupIndeterminateChildChangeEvent>): void;
47
+ handleCheckedChildElementCountChange(newValue: number, oldValue: number): void;
48
+ private updateCheckedChildElementCount;
49
+ handleCheckboxChange(event: CustomEvent<CheckboxChangeEvent>): void;
50
+ handleCheckboxGroupChange(event: CustomEvent<CheckboxGroupChangeEvent>): void;
51
+ private setChildElementCount;
52
+ componentWillLoad(): void;
53
+ componentDidLoad(): void;
54
+ componentDidUpdate(): void;
55
+ render(): any;
56
+ }
@@ -0,0 +1,11 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ import { DsCheckboxGroup } from '../ds-checkbox-group';
3
+ declare const meta: Meta<typeof DsCheckboxGroup.prototype>;
4
+ export default meta;
5
+ type Story = StoryObj;
6
+ export declare const Vertical: Story;
7
+ export declare const VerticalInvalid: Story;
8
+ export declare const Horizontal: Story;
9
+ export declare const HorizontalInvalid: Story;
10
+ export declare const Nested: Story;
11
+ export declare const DeeplyNested: Story;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ import { DsCheckboxGroup } from '../ds-checkbox-group';
3
+ declare const meta: Meta<typeof DsCheckboxGroup.prototype>;
4
+ export default meta;
5
+ type Story = StoryObj;
6
+ export declare const Default: Story;
7
+ export declare const Playground: Story;
@@ -1,6 +1,7 @@
1
1
  import { Meta, StoryObj } from '@storybook/web-components';
2
- import { DsIcon } from './ds-icon';
2
+ import { DsIcon } from '../ds-icon';
3
3
  declare const meta: Meta<typeof DsIcon.prototype>;
4
4
  export default meta;
5
5
  type Story = StoryObj;
6
6
  export declare const Default: Story;
7
+ export declare const Playground: Story;
@@ -0,0 +1,12 @@
1
+ type InputValidityType = 'error' | 'success';
2
+ type InputValidityRole = 'alert' | 'status';
3
+ export declare class DsInputValidity {
4
+ el: HTMLElement;
5
+ text: string;
6
+ type: InputValidityType;
7
+ validityRole?: InputValidityRole;
8
+ identifier?: string;
9
+ componentDidLoad(): void;
10
+ render(): any;
11
+ }
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ import { DsInputValidity } from '../ds-input-validity';
3
+ declare const meta: Meta<typeof DsInputValidity.prototype>;
4
+ export default meta;
5
+ type Story = StoryObj;
6
+ export declare const Error: Story;
7
+ export declare const Success: Story;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ import { DsInputValidity } from '../ds-input-validity';
3
+ declare const meta: Meta<typeof DsInputValidity.prototype>;
4
+ export default meta;
5
+ type Story = StoryObj;
6
+ export declare const Default: Story;
7
+ export declare const Playground: Story;
@@ -9,16 +9,19 @@ export declare class DsLink {
9
9
  private rel?;
10
10
  private readonly visuallyHiddenAssistiveTextId;
11
11
  el: HTMLElement;
12
- text?: string;
12
+ text: string;
13
13
  size?: LinkSize;
14
14
  variant: LinkVariant;
15
15
  weight: LinkWeight;
16
16
  icon: string;
17
17
  iconPosition: LinkIconPosition;
18
+ iconTitle?: string;
19
+ iconHidden?: boolean;
18
20
  href: string;
19
21
  target?: LinkTarget;
20
22
  download?: boolean;
21
23
  language?: LinkLang;
24
+ linkAriaLabel?: string;
22
25
  componentWillLoad(): void;
23
26
  render(): any;
24
27
  }
@@ -12,6 +12,7 @@ export declare class DsLinkWithArrow {
12
12
  href: string;
13
13
  target?: LinkTarget;
14
14
  language?: LinkLang;
15
+ linkAriaLabel?: string;
15
16
  componentWillLoad(): void;
16
17
  render(): any;
17
18
  }
@@ -6,6 +6,9 @@ export declare class DsTextInput {
6
6
  private readonly visuallyHiddenAssistiveTextId;
7
7
  private readonly successTextId;
8
8
  private readonly errorTextId;
9
+ private hasPrefixSlot;
10
+ private hasSuffixSlot;
11
+ el: HTMLElement;
9
12
  label?: string;
10
13
  placeholder?: string;
11
14
  dsId?: string;
@@ -39,6 +42,8 @@ export declare class DsTextInput {
39
42
  inputActive: boolean;
40
43
  togglePasswordVisibility(): Promise<boolean>;
41
44
  clearInput(): Promise<void>;
45
+ private getLabelText;
46
+ componentWillLoad(): void;
42
47
  private onActionButtonClicked;
43
48
  private renderValidityMessage;
44
49
  private renderPrefixContent;
@@ -1,3 +1,2 @@
1
1
  export declare const textInputTypes: readonly ["text", "password", "search", "loading", "tel", "email", "url", "number"];
2
2
  export type TextInputType = typeof textInputTypes[number];
3
- export declare function idGenerator(id: string): Generator<string, void, unknown>;
@@ -5,7 +5,11 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { CheckboxChangeEvent } from "./components/01-base-components/ds-checkbox/ds-checkbox";
9
+ import { CheckboxGroupChangeEvent, CheckboxGroupIndeterminateChildChangeEvent } from "./components/01-base-components/ds-checkbox-group/ds-checkbox-group";
8
10
  import { TextInputType } from "./components/01-base-components/ds-text-input/utils";
11
+ export { CheckboxChangeEvent } from "./components/01-base-components/ds-checkbox/ds-checkbox";
12
+ export { CheckboxGroupChangeEvent, CheckboxGroupIndeterminateChildChangeEvent } from "./components/01-base-components/ds-checkbox-group/ds-checkbox-group";
9
13
  export { TextInputType } from "./components/01-base-components/ds-text-input/utils";
10
14
  export namespace Components {
11
15
  interface DsAccordion {
@@ -37,6 +41,36 @@ export namespace Components {
37
41
  "value": string;
38
42
  "variant": 'primary' | 'secondary' | 'supplementary';
39
43
  }
44
+ interface DsCheckbox {
45
+ "assistiveText"?: string;
46
+ "checkboxId"?: string;
47
+ "checked": boolean;
48
+ "disabled": boolean;
49
+ "errorText": string;
50
+ "errorsDisabled": boolean;
51
+ "indeterminate": boolean;
52
+ "legend"?: string;
53
+ "optional": boolean;
54
+ "optionalText"?: string;
55
+ "required": boolean;
56
+ "text"?: string;
57
+ }
58
+ interface DsCheckboxGroup {
59
+ "assistiveText"?: string;
60
+ "checked": boolean;
61
+ "checkedChildElementCount": number;
62
+ "direction": 'horizontal' | 'vertical';
63
+ "disabled": boolean;
64
+ "errorText": string;
65
+ "legend"?: string;
66
+ "parentCheckedCount": number;
67
+ /**
68
+ * Updates child elements' checked state.
69
+ * @param newValue New checked state.
70
+ */
71
+ "setChecked": (newValue: boolean) => Promise<void>;
72
+ "text": string;
73
+ }
40
74
  interface DsIcon {
41
75
  "colour": string;
42
76
  "dsTitle": string;
@@ -45,15 +79,23 @@ export namespace Components {
45
79
  "role": string;
46
80
  "size": string;
47
81
  }
82
+ interface DsInputValidity {
83
+ "text": string;
84
+ "type": InputValidityType;
85
+ "validityRole"?: InputValidityRole;
86
+ }
48
87
  interface DsLink {
49
88
  "download"?: boolean;
50
89
  "href": string;
51
90
  "icon": string;
91
+ "iconHidden"?: boolean;
52
92
  "iconPosition": LinkIconPosition;
93
+ "iconTitle"?: string;
53
94
  "language"?: LinkLang;
95
+ "linkAriaLabel"?: string;
54
96
  "size"?: LinkSize;
55
97
  "target"?: LinkTarget;
56
- "text"?: string;
98
+ "text": string;
57
99
  "variant": LinkVariant;
58
100
  "weight": LinkWeight;
59
101
  }
@@ -61,6 +103,7 @@ export namespace Components {
61
103
  "href": string;
62
104
  "iconPosition": LinkIconPosition;
63
105
  "language"?: LinkLang;
106
+ "linkAriaLabel"?: string;
64
107
  "target"?: LinkTarget;
65
108
  "text"?: string;
66
109
  }
@@ -98,6 +141,14 @@ export namespace Components {
98
141
  interface DsVisuallyHidden {
99
142
  }
100
143
  }
144
+ export interface DsCheckboxCustomEvent<T> extends CustomEvent<T> {
145
+ detail: T;
146
+ target: HTMLDsCheckboxElement;
147
+ }
148
+ export interface DsCheckboxGroupCustomEvent<T> extends CustomEvent<T> {
149
+ detail: T;
150
+ target: HTMLDsCheckboxGroupElement;
151
+ }
101
152
  declare global {
102
153
  interface HTMLDsAccordionElement extends Components.DsAccordion, HTMLStencilElement {
103
154
  }
@@ -111,12 +162,54 @@ declare global {
111
162
  prototype: HTMLDsButtonElement;
112
163
  new (): HTMLDsButtonElement;
113
164
  };
165
+ interface HTMLDsCheckboxElementEventMap {
166
+ "dsCheckboxChange": CheckboxChangeEvent;
167
+ "dsCheckboxError": string;
168
+ }
169
+ interface HTMLDsCheckboxElement extends Components.DsCheckbox, HTMLStencilElement {
170
+ addEventListener<K extends keyof HTMLDsCheckboxElementEventMap>(type: K, listener: (this: HTMLDsCheckboxElement, ev: DsCheckboxCustomEvent<HTMLDsCheckboxElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
171
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
172
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
173
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
174
+ removeEventListener<K extends keyof HTMLDsCheckboxElementEventMap>(type: K, listener: (this: HTMLDsCheckboxElement, ev: DsCheckboxCustomEvent<HTMLDsCheckboxElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
175
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
176
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
177
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
178
+ }
179
+ var HTMLDsCheckboxElement: {
180
+ prototype: HTMLDsCheckboxElement;
181
+ new (): HTMLDsCheckboxElement;
182
+ };
183
+ interface HTMLDsCheckboxGroupElementEventMap {
184
+ "dsCheckboxGroupChange": CheckboxGroupChangeEvent;
185
+ "dsCheckboxGroupIndeterminateChildChange": CheckboxGroupIndeterminateChildChangeEvent;
186
+ }
187
+ interface HTMLDsCheckboxGroupElement extends Components.DsCheckboxGroup, HTMLStencilElement {
188
+ addEventListener<K extends keyof HTMLDsCheckboxGroupElementEventMap>(type: K, listener: (this: HTMLDsCheckboxGroupElement, ev: DsCheckboxGroupCustomEvent<HTMLDsCheckboxGroupElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
189
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
190
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
191
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
192
+ removeEventListener<K extends keyof HTMLDsCheckboxGroupElementEventMap>(type: K, listener: (this: HTMLDsCheckboxGroupElement, ev: DsCheckboxGroupCustomEvent<HTMLDsCheckboxGroupElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
193
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
194
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
195
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
196
+ }
197
+ var HTMLDsCheckboxGroupElement: {
198
+ prototype: HTMLDsCheckboxGroupElement;
199
+ new (): HTMLDsCheckboxGroupElement;
200
+ };
114
201
  interface HTMLDsIconElement extends Components.DsIcon, HTMLStencilElement {
115
202
  }
116
203
  var HTMLDsIconElement: {
117
204
  prototype: HTMLDsIconElement;
118
205
  new (): HTMLDsIconElement;
119
206
  };
207
+ interface HTMLDsInputValidityElement extends Components.DsInputValidity, HTMLStencilElement {
208
+ }
209
+ var HTMLDsInputValidityElement: {
210
+ prototype: HTMLDsInputValidityElement;
211
+ new (): HTMLDsInputValidityElement;
212
+ };
120
213
  interface HTMLDsLinkElement extends Components.DsLink, HTMLStencilElement {
121
214
  }
122
215
  var HTMLDsLinkElement: {
@@ -144,7 +237,10 @@ declare global {
144
237
  interface HTMLElementTagNameMap {
145
238
  "ds-accordion": HTMLDsAccordionElement;
146
239
  "ds-button": HTMLDsButtonElement;
240
+ "ds-checkbox": HTMLDsCheckboxElement;
241
+ "ds-checkbox-group": HTMLDsCheckboxGroupElement;
147
242
  "ds-icon": HTMLDsIconElement;
243
+ "ds-input-validity": HTMLDsInputValidityElement;
148
244
  "ds-link": HTMLDsLinkElement;
149
245
  "ds-link-with-arrow": HTMLDsLinkWithArrowElement;
150
246
  "ds-text-input": HTMLDsTextInputElement;
@@ -181,6 +277,35 @@ declare namespace LocalJSX {
181
277
  "value"?: string;
182
278
  "variant"?: 'primary' | 'secondary' | 'supplementary';
183
279
  }
280
+ interface DsCheckbox {
281
+ "assistiveText"?: string;
282
+ "checkboxId"?: string;
283
+ "checked"?: boolean;
284
+ "disabled"?: boolean;
285
+ "errorText"?: string;
286
+ "errorsDisabled"?: boolean;
287
+ "indeterminate"?: boolean;
288
+ "legend"?: string;
289
+ "onDsCheckboxChange"?: (event: DsCheckboxCustomEvent<CheckboxChangeEvent>) => void;
290
+ "onDsCheckboxError"?: (event: DsCheckboxCustomEvent<string>) => void;
291
+ "optional"?: boolean;
292
+ "optionalText"?: string;
293
+ "required"?: boolean;
294
+ "text"?: string;
295
+ }
296
+ interface DsCheckboxGroup {
297
+ "assistiveText"?: string;
298
+ "checked"?: boolean;
299
+ "checkedChildElementCount"?: number;
300
+ "direction"?: 'horizontal' | 'vertical';
301
+ "disabled"?: boolean;
302
+ "errorText"?: string;
303
+ "legend"?: string;
304
+ "onDsCheckboxGroupChange"?: (event: DsCheckboxGroupCustomEvent<CheckboxGroupChangeEvent>) => void;
305
+ "onDsCheckboxGroupIndeterminateChildChange"?: (event: DsCheckboxGroupCustomEvent<CheckboxGroupIndeterminateChildChangeEvent>) => void;
306
+ "parentCheckedCount"?: number;
307
+ "text"?: string;
308
+ }
184
309
  interface DsIcon {
185
310
  "colour"?: string;
186
311
  "dsTitle"?: string;
@@ -189,15 +314,23 @@ declare namespace LocalJSX {
189
314
  "role"?: string;
190
315
  "size"?: string;
191
316
  }
317
+ interface DsInputValidity {
318
+ "text"?: string;
319
+ "type"?: InputValidityType;
320
+ "validityRole"?: InputValidityRole;
321
+ }
192
322
  interface DsLink {
193
323
  "download"?: boolean;
194
324
  "href": string;
195
325
  "icon"?: string;
326
+ "iconHidden"?: boolean;
196
327
  "iconPosition"?: LinkIconPosition;
328
+ "iconTitle"?: string;
197
329
  "language"?: LinkLang;
330
+ "linkAriaLabel"?: string;
198
331
  "size"?: LinkSize;
199
332
  "target"?: LinkTarget;
200
- "text"?: string;
333
+ "text": string;
201
334
  "variant"?: LinkVariant;
202
335
  "weight"?: LinkWeight;
203
336
  }
@@ -205,6 +338,7 @@ declare namespace LocalJSX {
205
338
  "href": string;
206
339
  "iconPosition"?: LinkIconPosition;
207
340
  "language"?: LinkLang;
341
+ "linkAriaLabel"?: string;
208
342
  "target"?: LinkTarget;
209
343
  "text"?: string;
210
344
  }
@@ -242,7 +376,10 @@ declare namespace LocalJSX {
242
376
  interface IntrinsicElements {
243
377
  "ds-accordion": DsAccordion;
244
378
  "ds-button": DsButton;
379
+ "ds-checkbox": DsCheckbox;
380
+ "ds-checkbox-group": DsCheckboxGroup;
245
381
  "ds-icon": DsIcon;
382
+ "ds-input-validity": DsInputValidity;
246
383
  "ds-link": DsLink;
247
384
  "ds-link-with-arrow": DsLinkWithArrow;
248
385
  "ds-text-input": DsTextInput;
@@ -255,7 +392,10 @@ declare module "@stencil/core" {
255
392
  interface IntrinsicElements {
256
393
  "ds-accordion": LocalJSX.DsAccordion & JSXBase.HTMLAttributes<HTMLDsAccordionElement>;
257
394
  "ds-button": LocalJSX.DsButton & JSXBase.HTMLAttributes<HTMLDsButtonElement>;
395
+ "ds-checkbox": LocalJSX.DsCheckbox & JSXBase.HTMLAttributes<HTMLDsCheckboxElement>;
396
+ "ds-checkbox-group": LocalJSX.DsCheckboxGroup & JSXBase.HTMLAttributes<HTMLDsCheckboxGroupElement>;
258
397
  "ds-icon": LocalJSX.DsIcon & JSXBase.HTMLAttributes<HTMLDsIconElement>;
398
+ "ds-input-validity": LocalJSX.DsInputValidity & JSXBase.HTMLAttributes<HTMLDsInputValidityElement>;
259
399
  "ds-link": LocalJSX.DsLink & JSXBase.HTMLAttributes<HTMLDsLinkElement>;
260
400
  "ds-link-with-arrow": LocalJSX.DsLinkWithArrow & JSXBase.HTMLAttributes<HTMLDsLinkWithArrowElement>;
261
401
  "ds-text-input": LocalJSX.DsTextInput & JSXBase.HTMLAttributes<HTMLDsTextInputElement>;
@@ -0,0 +1,2 @@
1
+ export declare const getOptionalText: (text: string, optionalText?: string) => string;
2
+ export declare const getRequiredText: (text: string) => string;
@@ -1,2 +1,3 @@
1
1
  export declare const opensInNewTab: (target: string) => target is "_blank";
2
2
  export declare const visuallyHiddenAssistiveText: (lang: string) => "Avautuu uuteen välilehteen" | "Öppnas i en ny flik" | "Opens in a new tab";
3
+ export declare const getAriaLabel: (text: string, ariaLabel?: string) => string;
@@ -15,3 +15,8 @@ export declare const createCategorySection: (category: string, fonts: {
15
15
  value: string;
16
16
  }[], renderedCategories: Set<string>) => HTMLDivElement;
17
17
  export declare const getCSSClasses: (prefix: string) => string[];
18
+ export declare const headingSizes: readonly ["2xLarge", "xLarge", "large", "medium", "small", "xSmall"];
19
+ export type HeadingSize = typeof headingSizes[number];
20
+ export declare const getHeadingVariables: (size: HeadingSize, isDesktop: boolean) => {
21
+ [key: string]: string;
22
+ };