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

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 +2 -2
  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-b1d61146.js} +116 -2
  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 +3 -0
  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 +315 -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 -1
  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 +11 -3
  48. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.css +1 -1
  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} +1 -3
  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-aaccd233.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 +104 -4
  93. package/dist/components/index3.js +80 -0
  94. package/dist/components/linkUtils.js +10 -1
  95. package/dist/esm/component-library.js +3 -3
  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-aaccd233.js} +116 -3
  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 +3 -2
  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,11 +1,11 @@
1
1
  import { p as proxyCustomElement, H, h } from './index2.js';
2
- import { i as inheritAriaAttributes, c as classNames } from './attributes.js';
3
- import { i as idGenerator } from './utils.js';
4
- import { o as opensInNewTab, v as visuallyHiddenAssistiveText } from './linkUtils.js';
5
- import { d as defineCustomElement$3 } from './ds-icon2.js';
2
+ import { c as classNames } from './index3.js';
3
+ import { i as inheritAriaAttributes } from './attributes.js';
4
+ import { o as opensInNewTab, v as visuallyHiddenAssistiveText, g as getAriaLabel } from './linkUtils.js';
5
+ import { i as idGenerator, d as defineCustomElement$3 } from './ds-icon2.js';
6
6
  import { d as defineCustomElement$2 } from './ds-visually-hidden2.js';
7
7
 
8
- const dsLinkCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}:root{--ds-borderWidth-none:0px;--ds-borderWidth-hairline:1px;--ds-borderWidth-thin:2px;--ds-borderWidth-thick:4px;--ds-borderWidth-xThick:8px;--ds-borderRadius-none:0px}:root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}:root{--ds-fontFamily-heading:\"Open Sans\", sans-serif;--ds-fontFamily-body:\"Open Sans\", sans-serif;--ds-fontSize-12:12px;--ds-fontSize-14:14px;--ds-fontSize-16:16px;--ds-fontSize-18:18px;--ds-fontSize-20:20px;--ds-fontSize-22:22px;--ds-fontSize-24:24px;--ds-fontSize-26:26px;--ds-fontSize-30:30px;--ds-fontSize-32:32px;--ds-fontSize-36:36px;--ds-fontSize-40:40px;--ds-fontSize-48:48px;--ds-fontSize-56:56px;--ds-fontSize-64:64px;--ds-fontWeight-regular:400;--ds-fontWeight-semibold:600;--ds-fontWeight-semiboldPlus:650;--ds-fontWeight-bold:700;--ds-letterSpacing-xTight:-2;--ds-letterSpacing-tight:-1.4;--ds-letterSpacing-normal:-0.4;--ds-letterSpacing-wide:0;--ds-letterSpacing-xWide:0.4;--ds-lineHeight-small:1;--ds-lineHeight-medium:1.2;--ds-lineHeight-large:1.5;--ds-lineHeight-xLarge:1.75;--ds-fontWidth-normal:100;--ds-fontWidth-condense:90;--ds-number-style:proportional-figures;}@supports (font-variation-settings: normal){:root{--ds-fontFamily-heading:\"Open Sans Variable\", sans-serif;--ds-fontFamily-body:\"Open Sans Variable\", sans-serif}}:root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.ds-bodyText--2xLarge{color:var(--ds-textColor-default);font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-20);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}@media (min-width: 30rem){.ds-bodyText--2xLarge{font-size:var(--ds-fontSize-22)}}.ds-bodyText--xLarge{color:var(--ds-textColor-default);font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-18);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}@media (min-width: 30rem){.ds-bodyText--xLarge{font-size:var(--ds-fontSize-20)}}.ds-bodyText--large{color:var(--ds-textColor-default);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)}@media (min-width: 30rem){.ds-bodyText--large{font-size:var(--ds-fontSize-18)}}.ds-bodyText--medium{color:var(--ds-textColor-default);font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-14);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}@media (min-width: 30rem){.ds-bodyText--medium{font-size:var(--ds-fontSize-16)}}.ds-bodyText--small{color:var(--ds-textColor-default);font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-12);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}@media (min-width: 30rem){.ds-bodyText--small{font-size:var(--ds-fontSize-14)}}: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,.ds-link:focus-within{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__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)}";
8
+ const dsLinkCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}:root{--ds-borderWidth-none:0px;--ds-borderWidth-hairline:1px;--ds-borderWidth-thin:2px;--ds-borderWidth-thick:4px;--ds-borderWidth-xThick:8px;--ds-borderRadius-none:0px}:root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}:root{--ds-fontFamily-heading:\"Open Sans\", sans-serif;--ds-fontFamily-body:\"Open Sans\", sans-serif;--ds-fontSize-12:12px;--ds-fontSize-14:14px;--ds-fontSize-16:16px;--ds-fontSize-18:18px;--ds-fontSize-20:20px;--ds-fontSize-22:22px;--ds-fontSize-24:24px;--ds-fontSize-26:26px;--ds-fontSize-30:30px;--ds-fontSize-32:32px;--ds-fontSize-36:36px;--ds-fontSize-40:40px;--ds-fontSize-48:48px;--ds-fontSize-56:56px;--ds-fontSize-64:64px;--ds-fontWeight-regular:400;--ds-fontWeight-semibold:600;--ds-fontWeight-semiboldPlus:650;--ds-fontWeight-bold:700;--ds-letterSpacing-xTight:-2;--ds-letterSpacing-tight:-1.4;--ds-letterSpacing-normal:-0.4;--ds-letterSpacing-wide:0;--ds-letterSpacing-xWide:0.4;--ds-lineHeight-small:1;--ds-lineHeight-medium:1.2;--ds-lineHeight-large:1.5;--ds-lineHeight-xLarge:1.75;--ds-fontWidth-normal:100;--ds-fontWidth-condense:90;--ds-number-style:proportional-figures;}@supports (font-variation-settings: normal){:root{--ds-fontFamily-heading:\"Open Sans Variable\", sans-serif;--ds-fontFamily-body:\"Open Sans Variable\", sans-serif}}:root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.ds-bodyText--2xLarge{color:var(--ds-textColor-default);font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-20);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}@media (min-width: 30rem){.ds-bodyText--2xLarge{font-size:var(--ds-fontSize-22)}}.ds-bodyText--xLarge{color:var(--ds-textColor-default);font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-18);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}@media (min-width: 30rem){.ds-bodyText--xLarge{font-size:var(--ds-fontSize-20)}}.ds-bodyText--large{color:var(--ds-textColor-default);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)}@media (min-width: 30rem){.ds-bodyText--large{font-size:var(--ds-fontSize-18)}}.ds-bodyText--medium{color:var(--ds-textColor-default);font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-14);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}@media (min-width: 30rem){.ds-bodyText--medium{font-size:var(--ds-fontSize-16)}}.ds-bodyText--small{color:var(--ds-textColor-default);font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-12);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}@media (min-width: 30rem){.ds-bodyText--small{font-size:var(--ds-fontSize-14)}}: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)}";
9
9
  const DsLinkStyle0 = dsLinkCss;
10
10
 
11
11
  const visuallyHiddenAssistiveTextIdGenerator = idGenerator('visually-hidden-assistive-text');
@@ -25,12 +25,15 @@ const DsLink$1 = proxyCustomElement(class DsLink extends H {
25
25
  weight = 'regular';
26
26
  icon = '';
27
27
  iconPosition = 'end';
28
+ iconTitle;
29
+ iconHidden;
28
30
  href;
29
31
  target;
30
32
  download;
31
33
  language;
34
+ ariaLabel;
32
35
  componentWillLoad() {
33
- this.inheritedAttributes = inheritAriaAttributes(this.el);
36
+ this.inheritedAttributes = inheritAriaAttributes(this.el, ['aria-label']);
34
37
  if (opensInNewTab(this.target)) {
35
38
  this.icon = 'open_in_new';
36
39
  this.iconPosition = 'end';
@@ -39,13 +42,13 @@ const DsLink$1 = proxyCustomElement(class DsLink extends H {
39
42
  }
40
43
  render() {
41
44
  const classes = classNames('ds-link', `ds-link--${this.weight}`, `ds-link--${this.variant}`, {
42
- [`bodyText--${this.size}`]: Boolean(this.size),
45
+ [`ds-link--${this.size}`]: Boolean(this.size),
43
46
  });
44
47
  const iconClasses = classNames('ds-link__icon', {
45
48
  [`ds-link__icon--start-${this.variant}`]: this.iconPosition === 'start',
46
49
  [`ds-link__icon--end-${this.variant}`]: this.iconPosition === 'end',
47
50
  });
48
- return (h("a", { key: 'd8922731378178b2c927796fdc636fc26d4cbaea', href: this.href, class: classes, rel: this.rel, target: this.target, download: this.download, ...this.inheritedAttributes }, h("slot", { key: 'dfbd079b80132f7751501da7e47bb0f1aec4590a', name: "iconStart" }, this.icon && this.iconPosition === 'start' && h("ds-icon", { key: '2b3d864df8c04b340b0251c9ac185be918f7bb16', name: this.icon, class: iconClasses, size: "1em" })), this.text, h("slot", { key: '2fc2e4a3be8b83d545b27ae19096ffc5fbb72c0e', name: "iconEnd" }, this.icon && this.iconPosition === 'end' && h("ds-icon", { key: '9592ce7c0222bd3c739943fb9b6a37b92e67618c', name: this.icon, class: iconClasses, size: "1em" })), opensInNewTab(this.target) && (h("ds-visually-hidden", { key: '43c55dded281f4e3a084ceb64edf695707309494', id: this.visuallyHiddenAssistiveTextId }, visuallyHiddenAssistiveText(this.language ?? document.documentElement.lang)))));
51
+ return (h("a", { key: '8ac4ff399eabfbe264f031b0cf7192ee1f9f2725', href: this.href, class: classes, rel: this.rel, target: this.target, download: this.download, "aria-label": getAriaLabel(this.text, this.ariaLabel), ...this.inheritedAttributes }, h("slot", { key: '2301357ed75faeb5037c71f5da4fb8c3f8c76b6d', name: "iconStart" }, this.icon && this.iconPosition === 'start' && h("ds-icon", { key: '2d478d2cf110107d5ea31b1ea44b4904377d686b', name: this.icon, class: iconClasses, size: "1em", title: this.iconTitle, hidden: this.iconHidden })), this.text, h("slot", { key: 'a132464b8b41499c2f8b9da6f22f09d133d86219', name: "iconEnd" }, this.icon && this.iconPosition === 'end' && h("ds-icon", { key: '5fff8019a4d810e4b686f09e204cf457783d1907', name: this.icon, class: iconClasses, size: "1em", title: this.iconTitle, hidden: this.iconHidden })), opensInNewTab(this.target) && (h("ds-visually-hidden", { key: 'cc773ec9fb38d1aa042f812187389e75aab511b2', id: this.visuallyHiddenAssistiveTextId }, visuallyHiddenAssistiveText(this.language ?? document.documentElement.lang)))));
49
52
  }
50
53
  static get style() { return DsLinkStyle0; }
51
54
  }, [1, "ds-link", {
@@ -55,10 +58,13 @@ const DsLink$1 = proxyCustomElement(class DsLink extends H {
55
58
  "weight": [1],
56
59
  "icon": [1025],
57
60
  "iconPosition": [1025, "icon-position"],
61
+ "iconTitle": [1, "icon-title"],
62
+ "iconHidden": [4, "icon-hidden"],
58
63
  "href": [1],
59
64
  "target": [1],
60
65
  "download": [4],
61
- "language": [1, "lang"]
66
+ "language": [1, "lang"],
67
+ "ariaLabel": [1, "aria-label"]
62
68
  }]);
63
69
  function defineCustomElement$1() {
64
70
  if (typeof customElements === "undefined") {
@@ -1,11 +1,11 @@
1
1
  import { p as proxyCustomElement, H, h, F as Fragment } from './index2.js';
2
- import { c as classNames } from './attributes.js';
3
- import { i as idGenerator } from './utils.js';
2
+ import { c as classNames } from './index3.js';
3
+ import { i as idGenerator, d as defineCustomElement$3 } from './ds-icon2.js';
4
+ import { g as getRequiredText, a as getOptionalText } from './controlUtils.js';
4
5
  import { d as defineCustomElement$4 } from './ds-button2.js';
5
- import { d as defineCustomElement$3 } from './ds-icon2.js';
6
6
  import { d as defineCustomElement$2 } from './ds-visually-hidden2.js';
7
7
 
8
- const dsTextInputCss = ".sc-ds-text-input:root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.sc-ds-text-input-h{display:block;width:288px}@media (min-width: 75rem){.sc-ds-text-input-h{width:320px}}.ds-input--label-container.sc-ds-text-input{margin-block-end:var(--ds-spacing-2xSmall)}.ds-input--label-container.sc-ds-text-input label.sc-ds-text-input{font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large);color:var(--ds-textColor-default)}.ds-input--label-container.sc-ds-text-input label.required.sc-ds-text-input::after{content:\" *\";color:var(--ds-textColor-secondary)}.ds-input--label-container.sc-ds-text-input label.optional.sc-ds-text-input::after{content:\" (\" attr(data-optional-text, \"optional\") \")\";color:var(--ds-textColor-secondary);font-size:var(--ds-fontSize-14);font-weight:var(--ds-fontWeight-regular)}.ds-input--label-container.sc-ds-text-input small.sc-ds-text-input{font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-14);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large);display:block;margin-block-start:var(--ds-spacing-3xSmall);color:var(--ds-textColor-secondary)}.ds-input--container.sc-ds-text-input{box-sizing:border-box;width:100%;display:inline-flex;position:relative;align-items:center;border-width:var(--ds-borderWidth-thin);border-style:solid;border-color:var(--ds-borderColor-default);padding-inline:var(--ds-spacing-xSmall)}.ds-input--container.sc-ds-text-input:focus-visible,.ds-input--container.sc-ds-text-input:focus-within{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-input--container.invalid.sc-ds-text-input{background-color:var(--ds-bgColor-danger);border-color:var(--ds-borderColor-danger)}.ds-input--container.invalid.sc-ds-text-input:hover:not(.ds-input--container.invalid:focus-within){background-color:var(--ds-bgColor-danger-hover);border-color:var(--ds-borderColor-danger)}.ds-input--container.invalid.active.sc-ds-text-input{background-color:var(--ds-bgColor-danger-active);border-color:var(--ds-borderColor-danger)}.ds-input--container.valid.sc-ds-text-input{background-color:var(--ds-bgColor-success);border-color:var(--ds-borderColor-success)}.ds-input--container.valid.sc-ds-text-input:hover:not(.ds-input--container.valid:focus-within){background-color:var(--ds-bgColor-success-hover);border-color:var(--ds-borderColor-success)}.ds-input--container.valid.active.sc-ds-text-input{background-color:var(--ds-bgColor-success-active);border-color:var(--ds-borderColor-success)}.ds-input--container.readonly.sc-ds-text-input,.ds-input--container.disabled.sc-ds-text-input{background-color:var(--ds-bgColor-disabled-onLight);border-color:var(--ds-borderColor-disabled-onLight)}.ds-input--container.sc-ds-text-input:has(input:active){outline:none}.ds-input--container.sc-ds-text-input:has(input:active):not:has(input:disabled,input.sc-ds-text-input:readonly){border-color:var(--ds-borderColor-default)}.ds-input--container.active.sc-ds-text-input:not(.ds-input--container.disabled,.ds-input--container.readonly.sc-ds-text-input,.ds-input--container.invalid.sc-ds-text-input,.ds-input--container.valid).sc-ds-text-input{border-color:var(--ds-borderColor-default);background-color:var(--ds-bgColor-white-active)}.ds-input--container.sc-ds-text-input:hover:not(.ds-input--container.disabled,.ds-input--container.readonly.sc-ds-text-input,.ds-input--container.active.sc-ds-text-input,.ds-input--container.invalid.sc-ds-text-input,.ds-input--container.valid.sc-ds-text-input,.ds-input--container.sc-ds-text-input:focus-within){border-color:var(--ds-borderColor-default);background-color:var(--ds-bgColor-white-hover)}.ds-input--container.sc-ds-text-input:focus-within:not(.ds-input--container:focus-within.invalid,.ds-input--container.sc-ds-text-input:focus-within.valid,.ds-input--container.sc-ds-text-input:focus-within.readonly){border-color:var(--ds-borderColor-primary)}.ds-input--container.sc-ds-text-input:focus-within *.sc-ds-text-input>ds-button.suffix.sc-ds-text-input>button.sc-ds-text-input:focus-visible{background-clip:padding-box;outline-offset:-5px;box-shadow:none;height:var(--ds-spacing-xLarge);background-color:var(--ds-bgColor-transparent-onLight-hover)}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input{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);width:100%;box-sizing:border-box;background-color:unset;flex-grow:1;height:var(--ds-spacing-xLarge);line-height:var(--ds-fontSize-24);color:var(--ds-textColor-default);border:none;padding-block:var(--ds-spacing-4xSmall)}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input:disabled{color:var(--ds-textColor-disabled-onLight)}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input:disabled::placeholder{color:var(--ds-textColor-disabled-onLight)}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::placeholder{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);color:var(--ds-textColor-secondary)}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input:focus{outline:none;border:none}.ds-input--container.sc-ds-text-input>input[type=number].sc-ds-text-input{-moz-appearance:textfield}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-search-decoration,.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-search-cancel-button,.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-search-results-button,.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-search-results-decoration,.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-inner-spin-button,.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ds-input--container.sc-ds-text-input:has(span.prefix,ds-icon.prefix).sc-ds-text-input{padding-inline-start:var(--ds-spacing-2xSmall)}.ds-input--container.sc-ds-text-input:has(span.prefix,ds-icon.prefix).sc-ds-text-input>input.sc-ds-text-input{padding-inline-start:var(--ds-spacing-2xSmall)}.ds-input--container.sc-ds-text-input:has(ds-button.suffix){padding-inline-end:unset}.ds-input--container.sc-ds-text-input span.prefix.sc-ds-text-input,.ds-input--container.sc-ds-text-input span.suffix.sc-ds-text-input{color:var(--ds-palette-black-70)}.ds-input--container.sc-ds-text-input ds-icon.prefix.sc-ds-text-input,.ds-input--container.sc-ds-text-input-s>[slot=prefix],.ds-input--container .sc-ds-text-input-s>[slot=prefix]{height:1.5rem;color:var(--ds-textColor-default)}.ds-input--container.sc-ds-text-input ds-button.suffix.sc-ds-text-input{margin-top:calc(var(--ds-spacing-3xSmall) * -1);margin-right:calc(var(--ds-spacing-4xSmall) * -1);max-height:40px}.error-text--container.sc-ds-text-input,.success-text--container.sc-ds-text-input{display:flex;align-items:center;margin-top:var(--ds-spacing-2xSmall);gap:var(--ds-spacing-2xSmall)}.error-text--container.sc-ds-text-input ds-icon.sc-ds-text-input,.success-text--container.sc-ds-text-input ds-icon.sc-ds-text-input{display:block;height:1.5rem}.error-text--container.sc-ds-text-input small.sc-ds-text-input,.success-text--container.sc-ds-text-input small.sc-ds-text-input{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)}.error-text--container.sc-ds-text-input{color:var(--ds-textColor-danger)}.success-text--container.sc-ds-text-input{color:var(--ds-textColor-success)}";
8
+ const dsTextInputCss = ".sc-ds-text-input:root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.sc-ds-text-input-h{display:block;width:288px}@media (min-width: 75rem){.sc-ds-text-input-h{width:320px}}.ds-input--label-container.sc-ds-text-input{margin-block-end:var(--ds-spacing-2xSmall)}.ds-input--label-container.sc-ds-text-input label.sc-ds-text-input{font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large);color:var(--ds-textColor-default)}.ds-input--label-container.sc-ds-text-input small.sc-ds-text-input{font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-14);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large);display:block;margin-block-start:var(--ds-spacing-3xSmall);color:var(--ds-textColor-secondary)}.ds-input--container.sc-ds-text-input{box-sizing:border-box;width:100%;display:inline-flex;position:relative;align-items:center;border-width:var(--ds-borderWidth-thin);border-style:solid;border-color:var(--ds-borderColor-default);padding-inline:var(--ds-spacing-xSmall)}.ds-input--container.sc-ds-text-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-input--container.sc-ds-text-input:focus-within{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-input--container.invalid.sc-ds-text-input{background-color:var(--ds-bgColor-danger);border-color:var(--ds-borderColor-danger)}.ds-input--container.invalid.sc-ds-text-input:hover:not(.ds-input--container.invalid:focus-within){background-color:var(--ds-bgColor-danger-hover);border-color:var(--ds-borderColor-danger)}.ds-input--container.invalid.active.sc-ds-text-input{background-color:var(--ds-bgColor-danger-active);border-color:var(--ds-borderColor-danger)}.ds-input--container.valid.sc-ds-text-input{background-color:var(--ds-bgColor-success);border-color:var(--ds-borderColor-success)}.ds-input--container.valid.sc-ds-text-input:hover:not(.ds-input--container.valid:focus-within){background-color:var(--ds-bgColor-success-hover);border-color:var(--ds-borderColor-success)}.ds-input--container.valid.active.sc-ds-text-input{background-color:var(--ds-bgColor-success-active);border-color:var(--ds-borderColor-success)}.ds-input--container.readonly.sc-ds-text-input,.ds-input--container.disabled.sc-ds-text-input{background-color:var(--ds-bgColor-disabled-onLight);border-color:var(--ds-borderColor-disabled-onLight)}.ds-input--container.sc-ds-text-input:has(input:active){outline:none}.ds-input--container.sc-ds-text-input:has(input:active):not:has(input:disabled,input.sc-ds-text-input:readonly){border-color:var(--ds-borderColor-default)}.ds-input--container.active.sc-ds-text-input:not(.ds-input--container.disabled,.ds-input--container.readonly.sc-ds-text-input,.ds-input--container.invalid.sc-ds-text-input,.ds-input--container.valid).sc-ds-text-input{border-color:var(--ds-borderColor-default);background-color:var(--ds-bgColor-white-active)}.ds-input--container.sc-ds-text-input:hover:not(.ds-input--container.disabled,.ds-input--container.readonly.sc-ds-text-input,.ds-input--container.active.sc-ds-text-input,.ds-input--container.invalid.sc-ds-text-input,.ds-input--container.valid.sc-ds-text-input,.ds-input--container.sc-ds-text-input:focus-within){border-color:var(--ds-borderColor-default);background-color:var(--ds-bgColor-white-hover)}.ds-input--container.sc-ds-text-input:focus-within:not(.ds-input--container:focus-within.invalid,.ds-input--container.sc-ds-text-input:focus-within.valid,.ds-input--container.sc-ds-text-input:focus-within.readonly){border-color:var(--ds-borderColor-primary)}.ds-input--container.sc-ds-text-input:focus-within *.sc-ds-text-input>ds-button.suffix.sc-ds-text-input>button.sc-ds-text-input:focus-visible{background-clip:padding-box;outline-offset:-5px;box-shadow:none;height:var(--ds-spacing-xLarge);background-color:var(--ds-bgColor-transparent-onLight-hover)}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input{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);width:100%;box-sizing:border-box;background-color:unset;flex-grow:1;height:var(--ds-spacing-xLarge);line-height:var(--ds-fontSize-24);color:var(--ds-textColor-default);border:none;padding-block:var(--ds-spacing-4xSmall)}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input:disabled{color:var(--ds-textColor-disabled-onLight)}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input:disabled::placeholder{color:var(--ds-textColor-disabled-onLight)}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::placeholder{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);color:var(--ds-textColor-secondary)}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input:focus{outline:none;border:none}.ds-input--container.sc-ds-text-input>input[type=number].sc-ds-text-input{-moz-appearance:textfield}.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-search-decoration,.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-search-cancel-button,.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-search-results-button,.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-search-results-decoration,.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-inner-spin-button,.ds-input--container.sc-ds-text-input>input.sc-ds-text-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.ds-input--container.sc-ds-text-input:has(span.prefix,ds-icon.prefix).sc-ds-text-input{padding-inline-start:var(--ds-spacing-2xSmall)}.ds-input--container.sc-ds-text-input:has(span.prefix,ds-icon.prefix).sc-ds-text-input>input.sc-ds-text-input{padding-inline-start:var(--ds-spacing-2xSmall)}.ds-input--container.sc-ds-text-input:has(ds-button.suffix){padding-inline-end:unset}.ds-input--container.sc-ds-text-input span.prefix.sc-ds-text-input,.ds-input--container.sc-ds-text-input span.suffix.sc-ds-text-input{color:var(--ds-palette-black-70)}.ds-input--container.sc-ds-text-input ds-icon.prefix.sc-ds-text-input,.ds-input--container.sc-ds-text-input-s>[slot=prefix],.ds-input--container .sc-ds-text-input-s>[slot=prefix]{height:1.5rem;color:var(--ds-textColor-default)}.ds-input--container.sc-ds-text-input ds-button.suffix.sc-ds-text-input{margin-top:calc(var(--ds-spacing-3xSmall) * -1);margin-right:calc(var(--ds-spacing-4xSmall) * -1);max-height:40px}.error-text--container.sc-ds-text-input,.success-text--container.sc-ds-text-input{display:flex;align-items:center;margin-top:var(--ds-spacing-2xSmall);gap:var(--ds-spacing-2xSmall)}.error-text--container.sc-ds-text-input ds-icon.sc-ds-text-input,.success-text--container.sc-ds-text-input ds-icon.sc-ds-text-input{display:block;height:1.5rem}.error-text--container.sc-ds-text-input small.sc-ds-text-input,.success-text--container.sc-ds-text-input small.sc-ds-text-input{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)}.error-text--container.sc-ds-text-input{color:var(--ds-textColor-danger)}.success-text--container.sc-ds-text-input{color:var(--ds-textColor-success)}";
9
9
  const DsTextInputStyle0 = dsTextInputCss;
10
10
 
11
11
  const INPUT_TYPE_ICONS_MAP = {
@@ -15,6 +15,7 @@ const INPUT_TYPE_ACTION_BUTTON_ICON_MAP = {
15
15
  search: ({ clearButtonVisible }) => (clearButtonVisible ? 'cancel_fill' : ''),
16
16
  password: ({ passwordInputVisible }) => (passwordInputVisible ? 'visibility_off_fill' : 'visibility_fill'),
17
17
  };
18
+ const inputIdGenerator = idGenerator('ds-input');
18
19
  const assistiveTextIdGenerator = idGenerator('ds-assistive-text');
19
20
  const visuallyHiddenAssistiveTextIdGenerator = idGenerator('visually-hidden-assistive-text');
20
21
  const successTextIdGenerator = idGenerator('success-text');
@@ -30,9 +31,12 @@ const DsTextInput$1 = proxyCustomElement(class DsTextInput extends H {
30
31
  visuallyHiddenAssistiveTextId = visuallyHiddenAssistiveTextIdGenerator.next().value;
31
32
  successTextId = successTextIdGenerator.next().value;
32
33
  errorTextId = errorTextIdGenerator.next().value;
34
+ hasPrefixSlot = false;
35
+ hasSuffixSlot = false;
36
+ get el() { return this; }
33
37
  label;
34
38
  placeholder;
35
- dsId = 'input';
39
+ dsId = inputIdGenerator.next().value;
36
40
  name;
37
41
  disabled;
38
42
  optional;
@@ -69,6 +73,19 @@ const DsTextInput$1 = proxyCustomElement(class DsTextInput extends H {
69
73
  this.inputElement.focus();
70
74
  this.clearButtonVisible = false;
71
75
  }
76
+ getLabelText = () => {
77
+ if (this.required) {
78
+ return getRequiredText(this.label);
79
+ }
80
+ if (this.optional) {
81
+ return getOptionalText(this.label, this.optionalText);
82
+ }
83
+ return this.label;
84
+ };
85
+ componentWillLoad() {
86
+ this.hasPrefixSlot = !!this.el.querySelector('[slot="prefix"]');
87
+ this.hasSuffixSlot = !!this.el.querySelector('[slot="suffix"]');
88
+ }
72
89
  onActionButtonClicked = (e) => {
73
90
  e.stopPropagation();
74
91
  switch (this.type) {
@@ -88,6 +105,9 @@ const DsTextInput$1 = proxyCustomElement(class DsTextInput extends H {
88
105
  return (h("slot", { name: className }, text && (h("div", { class: `${className}--container` }, h("ds-icon", { name: icon }), h("small", { id: textId, class: className }, text)))));
89
106
  }
90
107
  renderPrefixContent() {
108
+ if (this.hasPrefixSlot) {
109
+ return h("slot", { name: "prefix" });
110
+ }
91
111
  if (this.prefixText) {
92
112
  return (h("slot", { name: "prefix" }, h("span", { class: "prefix" }, this.prefixText)));
93
113
  }
@@ -98,6 +118,9 @@ const DsTextInput$1 = proxyCustomElement(class DsTextInput extends H {
98
118
  return null;
99
119
  }
100
120
  renderSuffixContent() {
121
+ if (this.hasSuffixSlot) {
122
+ return h("slot", { name: "suffix" });
123
+ }
101
124
  if (this.suffixText) {
102
125
  return (h("slot", { name: "suffix" }, h("span", { class: "suffix" }, this.suffixText)));
103
126
  }
@@ -115,14 +138,14 @@ const DsTextInput$1 = proxyCustomElement(class DsTextInput extends H {
115
138
  }
116
139
  render() {
117
140
  const inputType = this.type === 'password' && this.passwordInputVisible ? 'text' : this.type;
118
- return (h(Fragment, { key: 'fe9d038685d4912e0b760bed83e21a6ae8582535' }, h("div", { key: '4c4a662fcbcbf2c9a04986ad44b018736c8ba0d7', class: "ds-input--label-container" }, h("slot", { key: '8fea3c6a05e3f5314eae43c2f2eeedc47735278a', name: "label" }, h("label", { key: '33aa9fa1ab0eba6c36b0e882d8a71000a2a2ff40', "data-optional-text": this.optionalText, class: classNames({ required: this.required, optional: this.optional }), htmlFor: this.dsId }, this.label)), h("slot", { key: '13f7adf5a85a2f2d8d5f3e7b829ff86707f75a3d', name: "help-text" }, h("small", { key: '3595ee7deb43919aeabb938a2f0cc0ce78ca181d', id: this.assistiveTextId }, this.assistiveText), h("ds-visually-hidden", { key: '001fd7a38ef2034f7e650e86d00d5a30ee217c17', id: this.visuallyHiddenAssistiveTextId }, this.hiddenAssistiveText))), h("div", { key: 'ec9f2c0d6ff40bd6c8a4618ec238e966a0756c19', onMouseDown: () => (this.inputActive = true), onMouseUp: () => (this.inputActive = false), onClick: e => this.handleInputContainerClick(e), class: classNames('ds-input--container', {
141
+ return (h(Fragment, { key: '4d3ad7cc3f0d7c6aba4bcb8e5b05d0794b614f32' }, h("div", { key: '1cad6e50d1a9c0f4214824d1ff46a8418a095790', class: "ds-input--label-container" }, h("slot", { key: '67d096bb1eecd6ac492a5dcd14bd6f9bda21eb2c', name: "label" }, h("label", { key: 'cfffb9b06f2122dd80e4ad94831ca69b71e5a0de', htmlFor: this.dsId }, this.getLabelText())), h("slot", { key: '2256dfda0cf19eae50307b9badc2a2a97d9e190b', name: "help-text" }, h("small", { key: 'b9496a9afec60a4a64a0ff66505a7572362387ac', id: this.assistiveTextId }, this.assistiveText), h("ds-visually-hidden", { key: '23026b2453728e607802aabb7760f07229edeb7c', id: this.visuallyHiddenAssistiveTextId }, this.hiddenAssistiveText))), h("div", { key: '161a4d4eed706c5fd6ba2af90029e68b1c6b95c9', onMouseDown: () => (this.inputActive = true), onMouseUp: () => (this.inputActive = false), onClick: e => this.handleInputContainerClick(e), class: classNames('ds-input--container', {
119
142
  disabled: this.disabled,
120
143
  readonly: this.readonly,
121
144
  valid: !!this.successText,
122
145
  invalid: !!this.errorText,
123
146
  focus: this.hasFocus,
124
147
  active: !!this.inputActive,
125
- }) }, this.renderPrefixContent(), h("input", { key: '1cd22b415c330cb50c4c9663f6dec3a1e99e256b', ref: e => (this.inputElement = e), id: this.dsId, name: this.name, "aria-label": this.ariaLabel, "aria-labelledby": this.ariaLabelledBy, "aria-describedby": this.ariaDescribedby ||
148
+ }) }, this.renderPrefixContent(), h("input", { key: 'a04e9ed4de86a65290206ca62efde1c27d76aa80', ref: e => (this.inputElement = e), id: this.dsId, name: this.name, "aria-label": this.ariaLabel, "aria-labelledby": this.ariaLabelledBy, "aria-describedby": this.ariaDescribedby ||
126
149
  classNames(this.assistiveTextId, this.visuallyHiddenAssistiveTextId, {
127
150
  [this.successTextId]: this.successText,
128
151
  [this.errorTextId]: this.errorText,
@@ -10,7 +10,7 @@ const DsVisuallyHidden = proxyCustomElement(class DsVisuallyHidden extends H {
10
10
  this.__attachShadow();
11
11
  }
12
12
  render() {
13
- return (h("slot", { key: '3a7edab043d1612c06a4eb6fedacec27216f3be3' }));
13
+ return (h("slot", { key: '4307602964aa15c8d3f4fb0f4b89188cf0a8b55e' }));
14
14
  }
15
15
  static get style() { return DsVisuallyHiddenStyle0; }
16
16
  }, [1, "ds-visually-hidden"]);
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'component-library';
2
- const BUILD = /* component-library */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: false, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: true, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
2
+ const BUILD = /* component-library */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: false, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: true, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
@@ -64,6 +64,12 @@ var styles = /* @__PURE__ */ new Map();
64
64
  var HYDRATED_STYLE_ID = "sty-id";
65
65
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
66
66
  var XLINK_NS = "http://www.w3.org/1999/xlink";
67
+ var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
68
+ "formAssociatedCallback",
69
+ "formResetCallback",
70
+ "formDisabledCallback",
71
+ "formStateRestoreCallback"
72
+ ];
67
73
  var win = typeof window !== "undefined" ? window : {};
68
74
  var doc = win.document || { head: {} };
69
75
  var H = win.HTMLElement || class {
@@ -77,6 +83,22 @@ var plt = {
77
83
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
78
84
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
79
85
  };
86
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
87
+ let supportsListenerOptions2 = false;
88
+ try {
89
+ doc.addEventListener(
90
+ "e",
91
+ null,
92
+ Object.defineProperty({}, "passive", {
93
+ get() {
94
+ supportsListenerOptions2 = true;
95
+ }
96
+ })
97
+ );
98
+ } catch (e) {
99
+ }
100
+ return supportsListenerOptions2;
101
+ })();
80
102
  var promiseResolve = (v) => Promise.resolve(v);
81
103
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
82
104
  try {
@@ -380,6 +402,22 @@ var parsePropertyValue = (propValue, propType) => {
380
402
  }
381
403
  return propValue;
382
404
  };
405
+ var getElement = (ref) => ref;
406
+
407
+ // src/runtime/event-emitter.ts
408
+ var createEvent = (ref, name, flags) => {
409
+ const elm = getElement(ref);
410
+ return {
411
+ emit: (detail) => {
412
+ return emitEvent(elm, name, {
413
+ bubbles: !!(flags & 4 /* Bubbles */),
414
+ composed: !!(flags & 2 /* Composed */),
415
+ cancelable: !!(flags & 1 /* Cancellable */),
416
+ detail
417
+ });
418
+ }
419
+ };
420
+ };
383
421
  var emitEvent = (elm, name, opts) => {
384
422
  const ev = plt.ce(name, opts);
385
423
  elm.dispatchEvent(ev);
@@ -1191,12 +1229,16 @@ var postUpdateComponent = (hostRef) => {
1191
1229
  const tagName = hostRef.$cmpMeta$.$tagName$;
1192
1230
  const elm = hostRef.$hostElement$;
1193
1231
  const endPostUpdate = createTime("postUpdate", tagName);
1232
+ const instance = elm;
1194
1233
  const ancestorComponent = hostRef.$ancestorComponent$;
1195
1234
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1196
1235
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1197
1236
  {
1198
1237
  addHydratedFlag(elm);
1199
1238
  }
1239
+ {
1240
+ safeCall(instance, "componentDidLoad", void 0, elm);
1241
+ }
1200
1242
  endPostUpdate();
1201
1243
  {
1202
1244
  hostRef.$onReadyResolve$(elm);
@@ -1205,6 +1247,9 @@ var postUpdateComponent = (hostRef) => {
1205
1247
  }
1206
1248
  }
1207
1249
  } else {
1250
+ {
1251
+ safeCall(instance, "componentDidUpdate", void 0, elm);
1252
+ }
1208
1253
  endPostUpdate();
1209
1254
  }
1210
1255
  {
@@ -1273,6 +1318,26 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1273
1318
  var proxyComponent = (Cstr, cmpMeta, flags) => {
1274
1319
  var _a, _b;
1275
1320
  const prototype = Cstr.prototype;
1321
+ if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
1322
+ FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
1323
+ const originalFormAssociatedCallback = prototype[cbName];
1324
+ Object.defineProperty(prototype, cbName, {
1325
+ value(...args) {
1326
+ const hostRef = getHostRef(this);
1327
+ const instance = this;
1328
+ if (!instance) {
1329
+ hostRef.$onReadyPromise$.then((asyncInstance) => {
1330
+ const cb = asyncInstance[cbName];
1331
+ typeof cb === "function" && cb.call(asyncInstance, ...args);
1332
+ });
1333
+ } else {
1334
+ const cb = originalFormAssociatedCallback;
1335
+ typeof cb === "function" && cb.call(instance, ...args);
1336
+ }
1337
+ }
1338
+ });
1339
+ });
1340
+ }
1276
1341
  if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
1277
1342
  if (Cstr.watchers && !cmpMeta.$watchers$) {
1278
1343
  cmpMeta.$watchers$ = Cstr.watchers;
@@ -1436,6 +1501,7 @@ var connectedCallback = (elm) => {
1436
1501
  initializeComponent(elm, hostRef, cmpMeta);
1437
1502
  }
1438
1503
  } else {
1504
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1439
1505
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1440
1506
  hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1441
1507
  }
@@ -1452,7 +1518,13 @@ var setContentReference = (elm) => {
1452
1518
  };
1453
1519
  var disconnectedCallback = async (elm) => {
1454
1520
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1455
- getHostRef(elm);
1521
+ const hostRef = getHostRef(elm);
1522
+ {
1523
+ if (hostRef.$rmListeners$) {
1524
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1525
+ hostRef.$rmListeners$ = void 0;
1526
+ }
1527
+ }
1456
1528
  }
1457
1529
  if (rootAppliedStyles.has(elm)) {
1458
1530
  rootAppliedStyles.delete(elm);
@@ -1469,6 +1541,9 @@ var proxyCustomElement = (Cstr, compactMeta) => {
1469
1541
  {
1470
1542
  cmpMeta.$members$ = compactMeta[2];
1471
1543
  }
1544
+ {
1545
+ cmpMeta.$listeners$ = compactMeta[3];
1546
+ }
1472
1547
  {
1473
1548
  cmpMeta.$watchers$ = Cstr.$watchers$;
1474
1549
  }
@@ -1479,7 +1554,8 @@ var proxyCustomElement = (Cstr, compactMeta) => {
1479
1554
  },
1480
1555
  connectedCallback() {
1481
1556
  if (!this.__hasHostListenerAttached) {
1482
- getHostRef(this);
1557
+ const hostRef = getHostRef(this);
1558
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1483
1559
  this.__hasHostListenerAttached = true;
1484
1560
  }
1485
1561
  connectedCallback(this);
@@ -1519,6 +1595,30 @@ var proxyCustomElement = (Cstr, compactMeta) => {
1519
1595
 
1520
1596
  // src/runtime/fragment.ts
1521
1597
  var Fragment = (_, children) => children;
1598
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1599
+ if (listeners) {
1600
+ listeners.map(([flags, name, method]) => {
1601
+ const target = elm;
1602
+ const handler = hostListenerProxy(hostRef, method);
1603
+ const opts = hostListenerOpts(flags);
1604
+ plt.ael(target, name, handler, opts);
1605
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1606
+ });
1607
+ }
1608
+ };
1609
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1610
+ try {
1611
+ {
1612
+ hostRef.$hostElement$[methodName](ev);
1613
+ }
1614
+ } catch (e) {
1615
+ consoleError(e, hostRef.$hostElement$);
1616
+ }
1617
+ };
1618
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1619
+ passive: (flags & 1 /* Passive */) !== 0,
1620
+ capture: (flags & 2 /* Capture */) !== 0
1621
+ } : (flags & 2 /* Capture */) !== 0;
1522
1622
 
1523
1623
  // src/runtime/nonce.ts
1524
1624
  var setNonce = (nonce) => plt.$nonce$ = nonce;
@@ -1526,4 +1626,4 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
1526
1626
  // src/runtime/platform-options.ts
1527
1627
  var setPlatformOptions = (opts) => Object.assign(plt, opts);
1528
1628
 
1529
- export { Fragment as F, H, setNonce as a, setPlatformOptions as b, getAssetPath as g, h, proxyCustomElement as p, setAssetPath as s };
1629
+ export { Fragment as F, H, setNonce as a, setPlatformOptions as b, createEvent as c, getAssetPath as g, h, proxyCustomElement as p, setAssetPath as s };
@@ -0,0 +1,80 @@
1
+ var classnames = {exports: {}};
2
+
3
+ /*!
4
+ Copyright (c) 2018 Jed Watson.
5
+ Licensed under the MIT License (MIT), see
6
+ http://jedwatson.github.io/classnames
7
+ */
8
+
9
+ (function (module) {
10
+ /* global define */
11
+
12
+ (function () {
13
+
14
+ var hasOwn = {}.hasOwnProperty;
15
+
16
+ function classNames () {
17
+ var classes = '';
18
+
19
+ for (var i = 0; i < arguments.length; i++) {
20
+ var arg = arguments[i];
21
+ if (arg) {
22
+ classes = appendClass(classes, parseValue(arg));
23
+ }
24
+ }
25
+
26
+ return classes;
27
+ }
28
+
29
+ function parseValue (arg) {
30
+ if (typeof arg === 'string' || typeof arg === 'number') {
31
+ return arg;
32
+ }
33
+
34
+ if (typeof arg !== 'object') {
35
+ return '';
36
+ }
37
+
38
+ if (Array.isArray(arg)) {
39
+ return classNames.apply(null, arg);
40
+ }
41
+
42
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
43
+ return arg.toString();
44
+ }
45
+
46
+ var classes = '';
47
+
48
+ for (var key in arg) {
49
+ if (hasOwn.call(arg, key) && arg[key]) {
50
+ classes = appendClass(classes, key);
51
+ }
52
+ }
53
+
54
+ return classes;
55
+ }
56
+
57
+ function appendClass (value, newClass) {
58
+ if (!newClass) {
59
+ return value;
60
+ }
61
+
62
+ if (value) {
63
+ return value + ' ' + newClass;
64
+ }
65
+
66
+ return value + newClass;
67
+ }
68
+
69
+ if (module.exports) {
70
+ classNames.default = classNames;
71
+ module.exports = classNames;
72
+ } else {
73
+ window.classNames = classNames;
74
+ }
75
+ }());
76
+ }(classnames));
77
+
78
+ const classNames = classnames.exports;
79
+
80
+ export { classNames as c };
@@ -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,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-42701395.js';
2
- export { s as setNonce } from './index-42701395.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-aaccd233.js';
2
+ export { s as setNonce } from './index-aaccd233.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- 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);
19
+ 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"],"ariaLabel":[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"],"ariaLabel":[1,"aria-label"]}]]],["ds-input-validity",[[0,"ds-input-validity",{"text":[1],"type":[1],"role":[1],"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);
20
20
  });
@@ -0,0 +1,4 @@
1
+ const getOptionalText = (text, optionalText) => [text, Boolean(optionalText) ? optionalText : '(optional)'].join(' ');
2
+ const getRequiredText = (text) => [text, '*'].join(' ');
3
+
4
+ export { getOptionalText as a, getRequiredText as g };