@uh-design-system/component-library 0.1.0 → 0.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js +0 -2
  3. package/dist/cjs/ds-accordion_2.cjs.entry.js +930 -0
  4. package/dist/cjs/ds-button_2.cjs.entry.js +196 -0
  5. package/dist/cjs/ds-text-input.cjs.entry.js +137 -0
  6. package/dist/cjs/index-5a88e57b.js +82 -0
  7. package/dist/cjs/{index-eaf5876c.js → index-f7420801.js} +652 -149
  8. package/dist/cjs/index.cjs.js +0 -9
  9. package/dist/cjs/loader.cjs.js +2 -4
  10. package/dist/cjs/uh-component-library.cjs.js +3 -5
  11. package/dist/collection/collection-manifest.json +6 -2
  12. package/dist/collection/components/00-foundations/borders/borders.stories.js +7 -8
  13. package/dist/collection/components/00-foundations/breakpoints/breakpoints.stories.js +20 -0
  14. package/dist/collection/components/00-foundations/colours/colours.stories.js +9 -17
  15. package/dist/collection/components/00-foundations/icons/categories/actions.js +110 -0
  16. package/dist/collection/components/00-foundations/icons/categories/arrows.js +64 -0
  17. package/dist/collection/components/00-foundations/icons/categories/custom.js +10 -0
  18. package/dist/collection/components/00-foundations/icons/categories/information.js +94 -0
  19. package/dist/collection/components/00-foundations/icons/categories/media.js +76 -0
  20. package/dist/collection/components/00-foundations/icons/categories/navigation.js +50 -0
  21. package/dist/collection/components/00-foundations/icons/categories/notifications.js +64 -0
  22. package/dist/collection/components/00-foundations/icons/categories/text.js +18 -0
  23. package/dist/collection/components/00-foundations/icons/categories/users.js +52 -0
  24. package/dist/collection/components/00-foundations/icons/iconList.js +18 -293
  25. package/dist/collection/components/00-foundations/icons/icons.stories.js +0 -1
  26. package/dist/collection/components/00-foundations/spacing/spacing.stories.js +2 -3
  27. package/dist/collection/components/00-foundations/typography/typography.stories.js +52 -3
  28. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.css +130 -0
  29. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +217 -0
  30. package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.examples.stories.js +43 -0
  31. package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.features.stories.js +79 -0
  32. package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.stories.js +96 -0
  33. package/dist/collection/components/01-base-components/ds-button/ds-button.css +238 -0
  34. package/dist/collection/components/01-base-components/ds-button/ds-button.js +294 -0
  35. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.examples.stories.js +28 -0
  36. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.features.stories.js +77 -0
  37. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.stories.js +79 -0
  38. package/dist/collection/components/01-base-components/ds-icon/ds-icon.css +1 -1
  39. package/dist/collection/components/01-base-components/ds-icon/ds-icon.js +18 -6
  40. package/dist/collection/components/01-base-components/ds-icon/ds-icon.stories.js +1 -2
  41. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.css +186 -0
  42. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.examples.stories.js +24 -0
  43. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.features.stories.js +126 -0
  44. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +665 -0
  45. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.stories.js +73 -0
  46. package/dist/collection/components/01-base-components/ds-text-input/utils.js +16 -0
  47. package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.css +9 -0
  48. package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.js +18 -0
  49. package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.stories.js +9 -0
  50. package/dist/collection/index.js +1 -11
  51. package/dist/collection/utils/attributes.js +107 -0
  52. package/dist/collection/utils/borders/borderUtils.js +24 -4
  53. package/dist/collection/utils/breakpoints/breakpointsUtils.js +58 -0
  54. package/dist/collection/utils/colours/colourTypes.js +19 -0
  55. package/dist/collection/utils/colours/colourUtils.js +67 -47
  56. package/dist/collection/utils/spacing/spacingUtils.js +21 -9
  57. package/dist/collection/utils/tests/testUtils.js +21 -6
  58. package/dist/collection/utils/typography/typographyUtils.js +0 -1
  59. package/dist/collection/utils/utils.js +48 -3
  60. package/dist/components/ds-accordion.d.ts +11 -0
  61. package/dist/components/ds-accordion.js +96 -0
  62. package/dist/components/ds-button.d.ts +11 -0
  63. package/dist/components/ds-button.js +6 -0
  64. package/dist/components/ds-button2.js +209 -0
  65. package/dist/components/ds-icon.js +1 -540
  66. package/dist/components/ds-icon2.js +890 -0
  67. package/dist/components/ds-text-input.d.ts +11 -0
  68. package/dist/components/ds-text-input.js +200 -0
  69. package/dist/components/ds-visually-hidden.d.ts +11 -0
  70. package/dist/components/ds-visually-hidden.js +6 -0
  71. package/dist/components/ds-visually-hidden2.js +31 -0
  72. package/dist/components/index.js +1 -9
  73. package/dist/components/{p-dcfb6eb2.js → index2.js} +616 -146
  74. package/dist/components/index3.js +80 -0
  75. package/dist/esm/app-globals-0f993ce5.js +0 -2
  76. package/dist/esm/ds-accordion_2.entry.js +925 -0
  77. package/dist/esm/ds-button_2.entry.js +191 -0
  78. package/dist/esm/ds-text-input.entry.js +133 -0
  79. package/dist/esm/index-097075ad.js +80 -0
  80. package/dist/esm/{index-1586ada2.js → index-1d0a6586.js} +652 -150
  81. package/dist/esm/index.js +0 -6
  82. package/dist/esm/loader.js +3 -5
  83. package/dist/esm/uh-component-library.js +4 -6
  84. package/dist/loader/cdn.js +1 -0
  85. package/dist/loader/index.cjs.js +1 -0
  86. package/{loader → dist/loader}/index.d.ts +1 -1
  87. package/dist/loader/index.es2017.js +1 -0
  88. package/{loader → dist/loader}/index.js +1 -1
  89. package/dist/types/components/00-foundations/breakpoints/breakpoints.stories.d.ts +6 -0
  90. package/dist/types/components/00-foundations/colours/colours.stories.d.ts +3 -2
  91. package/dist/types/components/00-foundations/icons/categories/actions.d.ts +5 -0
  92. package/dist/types/components/00-foundations/icons/categories/arrows.d.ts +5 -0
  93. package/dist/types/components/00-foundations/icons/categories/custom.d.ts +5 -0
  94. package/dist/types/components/00-foundations/icons/categories/information.d.ts +5 -0
  95. package/dist/types/components/00-foundations/icons/categories/media.d.ts +5 -0
  96. package/dist/types/components/00-foundations/icons/categories/navigation.d.ts +5 -0
  97. package/dist/types/components/00-foundations/icons/categories/notifications.d.ts +5 -0
  98. package/dist/types/components/00-foundations/icons/categories/text.d.ts +5 -0
  99. package/dist/types/components/00-foundations/icons/categories/users.d.ts +5 -0
  100. package/dist/types/components/00-foundations/typography/typography.stories.d.ts +6 -5
  101. package/dist/types/components/01-base-components/ds-accordion/ds-accordion.d.ts +17 -0
  102. package/dist/types/components/01-base-components/ds-accordion/stories/ds-accordion.examples.stories.d.ts +9 -0
  103. package/dist/types/components/01-base-components/ds-accordion/stories/ds-accordion.features.stories.d.ts +13 -0
  104. package/dist/types/components/01-base-components/ds-accordion/stories/ds-accordion.stories.d.ts +8 -0
  105. package/dist/types/components/01-base-components/ds-button/ds-button.d.ts +33 -0
  106. package/dist/types/components/01-base-components/ds-button/stories/ds-button.examples.stories.d.ts +6 -0
  107. package/dist/types/components/01-base-components/ds-button/stories/ds-button.features.stories.d.ts +17 -0
  108. package/dist/types/components/01-base-components/ds-button/stories/ds-button.stories.d.ts +8 -0
  109. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.d.ts +46 -0
  110. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.examples.stories.d.ts +8 -0
  111. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.features.stories.d.ts +18 -0
  112. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.stories.d.ts +8 -0
  113. package/dist/types/components/01-base-components/ds-text-input/utils.d.ts +3 -0
  114. package/dist/types/components/01-base-components/ds-visually-hidden/ds-visually-hidden.d.ts +3 -0
  115. package/dist/types/components/01-base-components/ds-visually-hidden/ds-visually-hidden.stories.d.ts +7 -0
  116. package/dist/types/components.d.ts +152 -0
  117. package/dist/types/declarations.d.ts +4 -0
  118. package/dist/types/index.d.ts +0 -1
  119. package/dist/types/utils/attributes.d.ts +39 -0
  120. package/dist/types/utils/borders/borderUtils.d.ts +9 -0
  121. package/dist/types/utils/breakpoints/breakpointsUtils.d.ts +11 -0
  122. package/dist/types/utils/colours/colourTypes.d.ts +18 -0
  123. package/dist/types/utils/colours/colourUtils.d.ts +4 -14
  124. package/dist/types/utils/spacing/spacingUtils.d.ts +6 -3
  125. package/dist/types/utils/tests/testUtils.d.ts +2 -0
  126. package/dist/types/utils/utils.d.ts +20 -1
  127. package/dist/uh-component-library/app-globals-0f993ce5.js +1 -0
  128. package/dist/uh-component-library/ds-accordion_2.entry.js +1 -0
  129. package/dist/uh-component-library/ds-button_2.entry.js +1 -0
  130. package/dist/uh-component-library/ds-text-input.entry.js +1 -0
  131. package/dist/uh-component-library/index-097075ad.js +6 -0
  132. package/dist/uh-component-library/index-1d0a6586.js +2 -0
  133. package/dist/uh-component-library/index.esm.js +0 -2
  134. package/dist/uh-component-library/uh-component-library.esm.js +1 -2
  135. package/package.json +8 -15
  136. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  137. package/dist/cjs/ds-icon.cjs.entry.js +0 -522
  138. package/dist/cjs/ds-icon.cjs.entry.js.map +0 -1
  139. package/dist/cjs/index-eaf5876c.js.map +0 -1
  140. package/dist/cjs/index.cjs.js.map +0 -1
  141. package/dist/cjs/loader.cjs.js.map +0 -1
  142. package/dist/cjs/uh-component-library.cjs.js.map +0 -1
  143. package/dist/collection/components/00-foundations/borders/borders.stories.js.map +0 -1
  144. package/dist/collection/components/00-foundations/colours/colours.stories.js.map +0 -1
  145. package/dist/collection/components/00-foundations/icons/iconList.js.map +0 -1
  146. package/dist/collection/components/00-foundations/icons/icons.stories.js.map +0 -1
  147. package/dist/collection/components/00-foundations/spacing/spacing.stories.js.map +0 -1
  148. package/dist/collection/components/00-foundations/typography/headings.stories.js +0 -23
  149. package/dist/collection/components/00-foundations/typography/headings.stories.js.map +0 -1
  150. package/dist/collection/components/00-foundations/typography/text.stories.js +0 -17
  151. package/dist/collection/components/00-foundations/typography/text.stories.js.map +0 -1
  152. package/dist/collection/components/00-foundations/typography/typography.stories.js.map +0 -1
  153. package/dist/collection/components/01-base-components/ds-icon/ds-icon.js.map +0 -1
  154. package/dist/collection/components/01-base-components/ds-icon/ds-icon.stories.js.map +0 -1
  155. package/dist/collection/index.js.map +0 -1
  156. package/dist/collection/utils/borders/borderUtils.js.map +0 -1
  157. package/dist/collection/utils/colours/colourUtils.js.map +0 -1
  158. package/dist/collection/utils/spacing/spacingUtils.js.map +0 -1
  159. package/dist/collection/utils/tests/testUtils.js.map +0 -1
  160. package/dist/collection/utils/typography/typographyUtils.js.map +0 -1
  161. package/dist/collection/utils/utils.js.map +0 -1
  162. package/dist/components/ds-icon.js.map +0 -1
  163. package/dist/components/index.js.map +0 -1
  164. package/dist/components/p-dcfb6eb2.js.map +0 -1
  165. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  166. package/dist/esm/ds-icon.entry.js +0 -518
  167. package/dist/esm/ds-icon.entry.js.map +0 -1
  168. package/dist/esm/index-1586ada2.js.map +0 -1
  169. package/dist/esm/index.js.map +0 -1
  170. package/dist/esm/loader.js.map +0 -1
  171. package/dist/esm/uh-component-library.js.map +0 -1
  172. package/dist/types/components/00-foundations/typography/headings.stories.d.ts +0 -17
  173. package/dist/types/components/00-foundations/typography/text.stories.d.ts +0 -11
  174. package/dist/uh-component-library/index.esm.js.map +0 -1
  175. package/dist/uh-component-library/p-74d73de3.js +0 -3
  176. package/dist/uh-component-library/p-74d73de3.js.map +0 -1
  177. package/dist/uh-component-library/p-c7cd80a5.entry.js +0 -2
  178. package/dist/uh-component-library/p-c7cd80a5.entry.js.map +0 -1
  179. package/dist/uh-component-library/p-e1255160.js +0 -2
  180. package/dist/uh-component-library/p-e1255160.js.map +0 -1
  181. package/dist/uh-component-library/uh-component-library.esm.js.map +0 -1
  182. package/loader/cdn.js +0 -1
  183. package/loader/index.cjs.js +0 -1
  184. package/loader/index.es2017.js +0 -1
  185. /package/{loader → dist/loader}/package.json +0 -0
package/dist/esm/index.js CHANGED
@@ -1,7 +1 @@
1
- function format(first, middle, last) {
2
- return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
3
- }
4
1
 
5
- export { format };
6
-
7
- //# sourceMappingURL=index.js.map
@@ -1,13 +1,11 @@
1
- import { b as bootstrapLazy } from './index-1586ada2.js';
2
- export { s as setNonce } from './index-1586ada2.js';
1
+ import { b as bootstrapLazy } from './index-1d0a6586.js';
2
+ export { s as setNonce } from './index-1d0a6586.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-icon",[[1,"ds-icon",{"name":[1],"colour":[1],"size":[1],"title":[1],"role":[1],"hidden":[4],"message":[32]}]]]], options);
8
+ return bootstrapLazy([["ds-accordion_2",[[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"],"isExpanded":[32]},null,{"isExpanded":["watchHandler"]}],[1,"ds-icon",{"name":[1],"colour":[1],"size":[1],"title":[1],"role":[1],"hidden":[4],"message":[32]}]]],["ds-button_2",[[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],"ariaDisabled":[1,"aria-disabled"]}],[1,"ds-visually-hidden"]]],["ds-text-input",[[6,"ds-text-input",{"label":[1],"placeholder":[1],"id":[1],"name":[1],"disabled":[4],"required":[4],"readonly":[4],"value":[1],"min":[2],"max":[2],"maxlength":[2],"pattern":[1],"autocomplete":[1],"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]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
12
-
13
- //# sourceMappingURL=loader.js.map
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-1586ada2.js';
2
- export { s as setNonce } from './index-1586ada2.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-1d0a6586.js';
2
+ export { s as setNonce } from './index-1d0a6586.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.22.2 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.23.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -16,7 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["ds-icon",[[1,"ds-icon",{"name":[1],"colour":[1],"size":[1],"title":[1],"role":[1],"hidden":[4],"message":[32]}]]]], options);
19
+ return bootstrapLazy([["ds-accordion_2",[[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"],"isExpanded":[32]},null,{"isExpanded":["watchHandler"]}],[1,"ds-icon",{"name":[1],"colour":[1],"size":[1],"title":[1],"role":[1],"hidden":[4],"message":[32]}]]],["ds-button_2",[[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],"ariaDisabled":[1,"aria-disabled"]}],[1,"ds-visually-hidden"]]],["ds-text-input",[[6,"ds-text-input",{"label":[1],"placeholder":[1],"id":[1],"name":[1],"disabled":[4],"required":[4],"readonly":[4],"value":[1],"min":[2],"max":[2],"maxlength":[2],"pattern":[1],"autocomplete":[1],"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]}]]]], options);
20
20
  });
21
-
22
- //# sourceMappingURL=uh-component-library.js.map
@@ -0,0 +1 @@
1
+ module.exports = require('../cjs/loader.cjs.js');
@@ -0,0 +1 @@
1
+ module.exports = require('../cjs/loader.cjs.js');
@@ -1,4 +1,4 @@
1
- export * from '../dist/types/components';
1
+ export * from '../types/components';
2
2
  export interface CustomElementsDefineOptions {
3
3
  exclude?: string[];
4
4
  resourcesUrl?: string;
@@ -0,0 +1 @@
1
+ export * from '../esm/loader.js';
@@ -1,2 +1,2 @@
1
1
  (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
2
- export * from '../dist/esm/loader.js';
2
+ export * from '../esm/loader.js';
@@ -0,0 +1,6 @@
1
+ import './_breakpoints.scss';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const Breakpoints: () => HTMLDivElement;
@@ -1,6 +1,7 @@
1
- import './_colours.scss';
2
1
  declare const _default: {
3
2
  title: string;
4
3
  };
5
4
  export default _default;
6
- export declare const Colours: () => HTMLDivElement;
5
+ export declare const Palette: () => HTMLDivElement;
6
+ export declare const Opaque: () => HTMLDivElement;
7
+ export declare const SemanticColours: () => HTMLDivElement;
@@ -0,0 +1,5 @@
1
+ export declare const icons: {
2
+ name: string;
3
+ component: string;
4
+ category: string;
5
+ }[];
@@ -0,0 +1,5 @@
1
+ export declare const icons: {
2
+ name: string;
3
+ component: string;
4
+ category: string;
5
+ }[];
@@ -0,0 +1,5 @@
1
+ export declare const icons: {
2
+ name: string;
3
+ component: string;
4
+ category: string;
5
+ }[];
@@ -0,0 +1,5 @@
1
+ export declare const icons: {
2
+ name: string;
3
+ component: string;
4
+ category: string;
5
+ }[];
@@ -0,0 +1,5 @@
1
+ export declare const icons: {
2
+ name: string;
3
+ component: string;
4
+ category: string;
5
+ }[];
@@ -0,0 +1,5 @@
1
+ export declare const icons: {
2
+ name: string;
3
+ component: string;
4
+ category: string;
5
+ }[];
@@ -0,0 +1,5 @@
1
+ export declare const icons: {
2
+ name: string;
3
+ component: string;
4
+ category: string;
5
+ }[];
@@ -0,0 +1,5 @@
1
+ export declare const icons: {
2
+ name: string;
3
+ component: string;
4
+ category: string;
5
+ }[];
@@ -0,0 +1,5 @@
1
+ export declare const icons: {
2
+ name: string;
3
+ component: string;
4
+ category: string;
5
+ }[];
@@ -1,6 +1,7 @@
1
1
  import './_typography.scss';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const Typography: () => HTMLDivElement;
2
+ import { Meta, StoryObj } from '@storybook/web-components';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ export declare const Headings: StoryObj;
6
+ export declare const Text: StoryObj;
7
+ export declare const Typography: StoryObj;
@@ -0,0 +1,17 @@
1
+ export declare class DsAccordion {
2
+ variant: 'default' | 'compact';
3
+ borderAligned: boolean;
4
+ openByDefault: boolean;
5
+ accordionId: string;
6
+ headingLevel: number;
7
+ useCloseButton: boolean;
8
+ closeButtonLabel: string;
9
+ isExpanded: boolean;
10
+ host: HTMLElement;
11
+ private headerButtonRef?;
12
+ private shouldMoveFocus;
13
+ watchHandler(isExpanded: boolean): void;
14
+ private handleClick;
15
+ private handleKeyDown;
16
+ render(): any;
17
+ }
@@ -0,0 +1,9 @@
1
+ /** src/components/01-base-components/ds-accordion/stories/ds-accordion.examples.stories.ts */
2
+ import { Meta, StoryObj } from '@storybook/web-components';
3
+ import { DsAccordion } from '../ds-accordion';
4
+ declare const meta: Meta<typeof DsAccordion.prototype>;
5
+ export default meta;
6
+ type Story = StoryObj;
7
+ export declare const WithLinkInBody: Story;
8
+ export declare const WithInputInBody: Story;
9
+ export declare const MultipleAccordions: Story;
@@ -0,0 +1,13 @@
1
+ /** src/components/01-base-components/ds-accordion/stories/ds-accordion.features.stories.ts */
2
+ import { Meta, StoryObj } from '@storybook/web-components';
3
+ import { DsAccordion } from '../ds-accordion';
4
+ declare const meta: Meta<typeof DsAccordion.prototype>;
5
+ export default meta;
6
+ type Story = StoryObj;
7
+ export declare const VariantDefault: Story;
8
+ export declare const VariantCompact: Story;
9
+ export declare const BorderAligned: Story;
10
+ export declare const WithCloseButton: Story;
11
+ export declare const OpenByDefault: Story;
12
+ export declare const CustomIdForAccordion: Story;
13
+ export declare const HeadingLevel: Story;
@@ -0,0 +1,8 @@
1
+ /** src/components/01-base-components/ds-accordion/stories/ds-accordion.stories.ts */
2
+ import { Meta, StoryObj } from '@storybook/web-components';
3
+ import { DsAccordion } from '../ds-accordion';
4
+ declare const meta: Meta<typeof DsAccordion.prototype>;
5
+ export default meta;
6
+ type Story = StoryObj;
7
+ export declare const Default: Story;
8
+ export declare const Playground: Story;
@@ -0,0 +1,33 @@
1
+ export declare class DsButton {
2
+ private inheritedAttributes;
3
+ private buttonEl;
4
+ private pressedKeys;
5
+ el: HTMLElement;
6
+ /**
7
+ * Button text content.
8
+ *
9
+ * Uses a text prop instead of `<slot />` to avoid triggering another render to set correct CSS classes just after initial load.
10
+ *
11
+ * @example
12
+ *
13
+ * <ds-button value="button"></ds-button> // Do this
14
+ * <ds-button>button</ds-button> // Instead of this
15
+ *
16
+ * @see {@link https://stackoverflow.com/a/52445966}
17
+ * @see {@link https://github.com/ionic-team/stencil/issues/399}
18
+ */
19
+ value: string;
20
+ variant: 'primary' | 'secondary' | 'supplementary';
21
+ colour: 'blue' | 'black' | 'white';
22
+ size: 'small' | 'medium';
23
+ fontWeight: string;
24
+ icon: string;
25
+ iconPosition: 'start' | 'end';
26
+ type: 'button' | 'submit' | 'reset';
27
+ disabled: boolean;
28
+ ariaDisabled: string;
29
+ componentWillLoad(): void;
30
+ private handleKeyDown;
31
+ private handleKeyUp;
32
+ render(): any;
33
+ }
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ import { DsButton } from '../ds-button';
3
+ declare const meta: Meta<typeof DsButton.prototype>;
4
+ export default meta;
5
+ export declare const ButtonGroup: StoryObj;
6
+ export declare const ResetAndSubmitButton: StoryObj;
@@ -0,0 +1,17 @@
1
+ /** src/components/01-base-components/ds-button/ds-button.stories.ts */
2
+ import { Meta, StoryObj } from '@storybook/web-components';
3
+ import { DsButton } from '../ds-button';
4
+ declare const meta: Meta<typeof DsButton.prototype>;
5
+ export default meta;
6
+ type Story = StoryObj;
7
+ export declare const Primary: Story;
8
+ export declare const Secondary: Story;
9
+ export declare const Supplementary: Story;
10
+ export declare const Blue: Story;
11
+ export declare const Black: Story;
12
+ export declare const White: Story;
13
+ export declare const Medium: Story;
14
+ export declare const Small: Story;
15
+ export declare const Disabled: Story;
16
+ export declare const IconStart: Story;
17
+ export declare const IconEnd: Story;
@@ -0,0 +1,8 @@
1
+ /** src/components/01-base-components/ds-button/ds-button.stories.ts */
2
+ import { Meta, StoryObj } from '@storybook/web-components';
3
+ import { DsButton } from '../ds-button';
4
+ declare const meta: Meta<typeof DsButton.prototype>;
5
+ export default meta;
6
+ type Story = StoryObj;
7
+ export declare const Default: Story;
8
+ export declare const Playground: Story;
@@ -0,0 +1,46 @@
1
+ import { TextInputType } from './utils';
2
+ export declare class DsTextInput {
3
+ private suffixButtonElement;
4
+ private inputElement;
5
+ private readonly assistiveTextId;
6
+ private readonly visuallyHiddenAssistiveTextId;
7
+ private readonly successTextId;
8
+ private readonly errorTextId;
9
+ label?: string;
10
+ placeholder?: string;
11
+ id?: string;
12
+ name: string;
13
+ disabled?: boolean;
14
+ required?: boolean;
15
+ readonly?: boolean;
16
+ value?: string;
17
+ min?: number;
18
+ max?: number;
19
+ maxlength?: number;
20
+ pattern?: string;
21
+ autocomplete?: string;
22
+ errorText?: string;
23
+ successText?: string;
24
+ assistiveText?: string;
25
+ actionButtonAriaLabel?: string;
26
+ hiddenAssistiveText?: string;
27
+ prefixText?: string;
28
+ suffixText?: string;
29
+ icon: string;
30
+ type: TextInputType;
31
+ ariaLabel?: string;
32
+ ariaLabelledBy?: string;
33
+ ariaDescribedby?: string;
34
+ hasFocus: boolean;
35
+ clearButtonVisible: boolean;
36
+ passwordInputVisible: boolean;
37
+ inputActive: boolean;
38
+ togglePasswordVisibility(): Promise<boolean>;
39
+ clearInput(): Promise<void>;
40
+ private onActionButtonClicked;
41
+ private renderValidityMessage;
42
+ private renderPrefixContent;
43
+ private renderSuffixContent;
44
+ private handleInputContainerClick;
45
+ render(): any;
46
+ }
@@ -0,0 +1,8 @@
1
+ /** src/components/01-base-components/ds-text-input/ds-text-input.examples.stories.ts */
2
+ import { Meta, StoryObj } from '@storybook/web-components';
3
+ import { DsTextInput } from './ds-text-input';
4
+ declare const meta: Meta<typeof DsTextInput.prototype>;
5
+ export default meta;
6
+ type Story = StoryObj;
7
+ export declare const CustomWidth: Story;
8
+ export declare const UsingSlots: Story;
@@ -0,0 +1,18 @@
1
+ /** src/components/01-base-components/ds-text-input/ds-text-input.features.stories.ts */
2
+ import { Meta, StoryObj } from '@storybook/web-components';
3
+ import { DsTextInput } from './ds-text-input';
4
+ declare const meta: Meta<typeof DsTextInput.prototype>;
5
+ export default meta;
6
+ type Story = StoryObj;
7
+ export declare const WithPlaceholder: Story;
8
+ export declare const WithAssistiveText: Story;
9
+ export declare const Disabled: Story;
10
+ export declare const ReadOnly: Story;
11
+ export declare const Required: Story;
12
+ export declare const Valid: Story;
13
+ export declare const Invalid: Story;
14
+ export declare const WithIcon: Story;
15
+ export declare const PasswordInput: Story;
16
+ export declare const SearchInput: Story;
17
+ export declare const PrefixText: Story;
18
+ export declare const SuffixText: Story;
@@ -0,0 +1,8 @@
1
+ /** src/components/01-base-components/ds-text-input/ds-text-input.stories.ts */
2
+ import { Meta, StoryObj } from '@storybook/web-components';
3
+ import { DsTextInput } from './ds-text-input';
4
+ declare const meta: Meta<typeof DsTextInput.prototype>;
5
+ export default meta;
6
+ type Story = StoryObj;
7
+ export declare const Default: Story;
8
+ export declare const Playground: Story;
@@ -0,0 +1,3 @@
1
+ export declare const textInputTypes: readonly ["text", "password", "search", "loading", "tel", "email", "url", "number"];
2
+ export type TextInputType = typeof textInputTypes[number];
3
+ export declare function idGenerator(id: string): Generator<string, void, unknown>;
@@ -0,0 +1,3 @@
1
+ export declare class DsVisuallyHidden {
2
+ render(): any;
3
+ }
@@ -0,0 +1,7 @@
1
+ /** src/components/01-base-components/ds-input/ds-input.stories.ts */
2
+ import { Meta, StoryObj } from '@storybook/web-components';
3
+ import { DsVisuallyHidden } from './ds-visually-hidden';
4
+ declare const meta: Meta<typeof DsVisuallyHidden.prototype>;
5
+ export default meta;
6
+ type Story = StoryObj;
7
+ export declare const Default: Story;
@@ -5,7 +5,36 @@
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 { TextInputType } from "./components/01-base-components/ds-text-input/utils";
9
+ export { TextInputType } from "./components/01-base-components/ds-text-input/utils";
8
10
  export namespace Components {
11
+ interface DsAccordion {
12
+ "accordionId": string;
13
+ "borderAligned": boolean;
14
+ "closeButtonLabel": string;
15
+ "headingLevel": number;
16
+ "openByDefault": boolean;
17
+ "useCloseButton": boolean;
18
+ "variant": 'default' | 'compact';
19
+ }
20
+ interface DsButton {
21
+ "ariaDisabled": string;
22
+ "colour": 'blue' | 'black' | 'white';
23
+ "disabled": boolean;
24
+ "fontWeight": string;
25
+ "icon": string;
26
+ "iconPosition": 'start' | 'end';
27
+ "size": 'small' | 'medium';
28
+ "type": 'button' | 'submit' | 'reset';
29
+ /**
30
+ * Button text content. Uses a text prop instead of `<slot />` to avoid triggering another render to set correct CSS classes just after initial load.
31
+ * @example <ds-button value="button"></ds-button> // Do this <ds-button>button</ds-button> // Instead of this
32
+ * @see {@link https://stackoverflow.com/a/52445966}
33
+ * @see {@link https://github.com/ionic-team/stencil/issues/399}
34
+ */
35
+ "value": string;
36
+ "variant": 'primary' | 'secondary' | 'supplementary';
37
+ }
9
38
  interface DsIcon {
10
39
  "colour": string;
11
40
  "hidden": boolean;
@@ -14,19 +43,105 @@ export namespace Components {
14
43
  "size": string;
15
44
  "title": string;
16
45
  }
46
+ interface DsTextInput {
47
+ "actionButtonAriaLabel"?: string;
48
+ "ariaDescribedby"?: string;
49
+ "ariaLabel"?: string;
50
+ "ariaLabelledBy"?: string;
51
+ "assistiveText"?: string;
52
+ "autocomplete"?: string;
53
+ "clearInput": () => Promise<void>;
54
+ "disabled"?: boolean;
55
+ "errorText"?: string;
56
+ "hiddenAssistiveText"?: string;
57
+ "icon": string;
58
+ "id"?: string;
59
+ "label"?: string;
60
+ "max"?: number;
61
+ "maxlength"?: number;
62
+ "min"?: number;
63
+ "name": string;
64
+ "pattern"?: string;
65
+ "placeholder"?: string;
66
+ "prefixText"?: string;
67
+ "readonly"?: boolean;
68
+ "required"?: boolean;
69
+ "successText"?: string;
70
+ "suffixText"?: string;
71
+ "togglePasswordVisibility": () => Promise<boolean>;
72
+ "type": TextInputType;
73
+ "value"?: string;
74
+ }
75
+ interface DsVisuallyHidden {
76
+ }
17
77
  }
18
78
  declare global {
79
+ interface HTMLDsAccordionElement extends Components.DsAccordion, HTMLStencilElement {
80
+ }
81
+ var HTMLDsAccordionElement: {
82
+ prototype: HTMLDsAccordionElement;
83
+ new (): HTMLDsAccordionElement;
84
+ };
85
+ interface HTMLDsButtonElement extends Components.DsButton, HTMLStencilElement {
86
+ }
87
+ var HTMLDsButtonElement: {
88
+ prototype: HTMLDsButtonElement;
89
+ new (): HTMLDsButtonElement;
90
+ };
19
91
  interface HTMLDsIconElement extends Components.DsIcon, HTMLStencilElement {
20
92
  }
21
93
  var HTMLDsIconElement: {
22
94
  prototype: HTMLDsIconElement;
23
95
  new (): HTMLDsIconElement;
24
96
  };
97
+ interface HTMLDsTextInputElement extends Components.DsTextInput, HTMLStencilElement {
98
+ }
99
+ var HTMLDsTextInputElement: {
100
+ prototype: HTMLDsTextInputElement;
101
+ new (): HTMLDsTextInputElement;
102
+ };
103
+ interface HTMLDsVisuallyHiddenElement extends Components.DsVisuallyHidden, HTMLStencilElement {
104
+ }
105
+ var HTMLDsVisuallyHiddenElement: {
106
+ prototype: HTMLDsVisuallyHiddenElement;
107
+ new (): HTMLDsVisuallyHiddenElement;
108
+ };
25
109
  interface HTMLElementTagNameMap {
110
+ "ds-accordion": HTMLDsAccordionElement;
111
+ "ds-button": HTMLDsButtonElement;
26
112
  "ds-icon": HTMLDsIconElement;
113
+ "ds-text-input": HTMLDsTextInputElement;
114
+ "ds-visually-hidden": HTMLDsVisuallyHiddenElement;
27
115
  }
28
116
  }
29
117
  declare namespace LocalJSX {
118
+ interface DsAccordion {
119
+ "accordionId"?: string;
120
+ "borderAligned"?: boolean;
121
+ "closeButtonLabel"?: string;
122
+ "headingLevel"?: number;
123
+ "openByDefault"?: boolean;
124
+ "useCloseButton"?: boolean;
125
+ "variant"?: 'default' | 'compact';
126
+ }
127
+ interface DsButton {
128
+ "ariaDisabled"?: string;
129
+ "colour"?: 'blue' | 'black' | 'white';
130
+ "disabled"?: boolean;
131
+ "fontWeight"?: string;
132
+ "icon"?: string;
133
+ "iconPosition"?: 'start' | 'end';
134
+ "size"?: 'small' | 'medium';
135
+ "type"?: 'button' | 'submit' | 'reset';
136
+ /**
137
+ * Button text content. Uses a text prop instead of `<slot />` to avoid triggering another render to set correct CSS classes just after initial load.
138
+ * @example <ds-button value="button"></ds-button> // Do this <ds-button>button</ds-button> // Instead of this
139
+ * @see {@link https://stackoverflow.com/a/52445966}
140
+ * @see {@link https://github.com/ionic-team/stencil/issues/399}
141
+ */
142
+ "value"?: string;
143
+ "variant"?: 'primary' | 'secondary' | 'supplementary';
144
+ }
30
145
  interface DsIcon {
31
146
  "colour"?: string;
32
147
  "hidden"?: boolean;
@@ -35,15 +150,52 @@ declare namespace LocalJSX {
35
150
  "size"?: string;
36
151
  "title"?: string;
37
152
  }
153
+ interface DsTextInput {
154
+ "actionButtonAriaLabel"?: string;
155
+ "ariaDescribedby"?: string;
156
+ "ariaLabel"?: string;
157
+ "ariaLabelledBy"?: string;
158
+ "assistiveText"?: string;
159
+ "autocomplete"?: string;
160
+ "disabled"?: boolean;
161
+ "errorText"?: string;
162
+ "hiddenAssistiveText"?: string;
163
+ "icon"?: string;
164
+ "id"?: string;
165
+ "label"?: string;
166
+ "max"?: number;
167
+ "maxlength"?: number;
168
+ "min"?: number;
169
+ "name"?: string;
170
+ "pattern"?: string;
171
+ "placeholder"?: string;
172
+ "prefixText"?: string;
173
+ "readonly"?: boolean;
174
+ "required"?: boolean;
175
+ "successText"?: string;
176
+ "suffixText"?: string;
177
+ "type"?: TextInputType;
178
+ "value"?: string;
179
+ }
180
+ interface DsVisuallyHidden {
181
+ }
38
182
  interface IntrinsicElements {
183
+ "ds-accordion": DsAccordion;
184
+ "ds-button": DsButton;
39
185
  "ds-icon": DsIcon;
186
+ "ds-text-input": DsTextInput;
187
+ "ds-visually-hidden": DsVisuallyHidden;
40
188
  }
41
189
  }
42
190
  export { LocalJSX as JSX };
43
191
  declare module "@stencil/core" {
44
192
  export namespace JSX {
45
193
  interface IntrinsicElements {
194
+ "ds-accordion": LocalJSX.DsAccordion & JSXBase.HTMLAttributes<HTMLDsAccordionElement>;
195
+ "ds-button": LocalJSX.DsButton & JSXBase.HTMLAttributes<HTMLDsButtonElement>;
46
196
  "ds-icon": LocalJSX.DsIcon & JSXBase.HTMLAttributes<HTMLDsIconElement>;
197
+ "ds-text-input": LocalJSX.DsTextInput & JSXBase.HTMLAttributes<HTMLDsTextInputElement>;
198
+ "ds-visually-hidden": LocalJSX.DsVisuallyHidden & JSXBase.HTMLAttributes<HTMLDsVisuallyHiddenElement>;
47
199
  }
48
200
  }
49
201
  }
@@ -0,0 +1,4 @@
1
+ declare module '!!raw-loader!*' {
2
+ const content: string;
3
+ export default content;
4
+ }
@@ -7,5 +7,4 @@
7
7
  * DO NOT use this file to export your components. Instead, use the recommended approaches
8
8
  * to consume components of this package as outlined in the `README.md`.
9
9
  */
10
- export { format } from './utils/utils';
11
10
  export type * from './components.d.ts';