@uh-design-system/component-library 0.2.4 → 0.3.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 (108) hide show
  1. package/dist/cjs/attributes-f7831329.js +78 -0
  2. package/dist/cjs/component-library.cjs.js +3 -3
  3. package/dist/cjs/{ds-accordion_2.cjs.entry.js → ds-accordion_3.cjs.entry.js} +418 -241
  4. package/dist/cjs/ds-link-with-arrow.cjs.entry.js +47 -0
  5. package/dist/cjs/ds-link.cjs.entry.js +54 -0
  6. package/dist/cjs/ds-text-input.cjs.entry.js +12 -16
  7. package/dist/cjs/ds-visually-hidden.cjs.entry.js +20 -0
  8. package/dist/cjs/{index-fd4f6cd2.js → index-bfa0f441.js} +17 -11
  9. package/dist/cjs/linkUtils-695da37c.js +16 -0
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/utils-8b73aa91.js +10 -0
  12. package/dist/collection/collection-manifest.json +3 -1
  13. package/dist/collection/components/00-foundations/icons/categories/arrows.js +6 -0
  14. package/dist/collection/components/00-foundations/icons/categories/information.js +12 -0
  15. package/dist/collection/components/00-foundations/icons/categories/media.js +4 -0
  16. package/dist/collection/components/00-foundations/icons/categories/social.js +17 -0
  17. package/dist/collection/components/00-foundations/icons/iconList.js +2 -0
  18. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.css +92 -81
  19. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +41 -9
  20. package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.examples.stories.js +15 -0
  21. package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.features.stories.js +1 -1
  22. package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.stories.js +10 -1
  23. package/dist/collection/components/01-base-components/ds-button/ds-button.css +55 -55
  24. package/dist/collection/components/01-base-components/ds-button/ds-button.js +2 -2
  25. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.features.stories.js +4 -8
  26. package/dist/collection/components/01-base-components/ds-icon/ds-icon.css +5 -1
  27. package/dist/collection/components/01-base-components/ds-icon/ds-icon.js +9 -6
  28. package/dist/collection/components/01-base-components/ds-icon/ds-icon.stories.js +2 -2
  29. package/dist/collection/components/01-base-components/ds-link/ds-link.css +158 -0
  30. package/dist/collection/components/01-base-components/ds-link/ds-link.js +281 -0
  31. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.examples.stories.js +53 -0
  32. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.features.stories.js +73 -0
  33. package/dist/collection/components/01-base-components/ds-link/stories/ds-link.stories.js +72 -0
  34. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.css +142 -0
  35. package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.js +161 -0
  36. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.examples.stories.js +33 -0
  37. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.features.stories.js +19 -0
  38. package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.stories.js +40 -0
  39. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.css +45 -40
  40. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +43 -3
  41. package/dist/collection/components/01-base-components/ds-text-input/{ds-text-input.examples.stories.js → stories/ds-text-input.examples.stories.js} +13 -0
  42. package/dist/collection/components/01-base-components/ds-text-input/{ds-text-input.features.stories.js → stories/ds-text-input.features.stories.js} +18 -4
  43. package/dist/collection/components/01-base-components/ds-text-input/{ds-text-input.stories.js → stories/ds-text-input.stories.js} +2 -2
  44. package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.js +1 -1
  45. package/dist/collection/introduction/introduction.stories.js +9 -0
  46. package/dist/collection/utils/link/linkUtils.js +11 -0
  47. package/dist/collection/utils/utils.js +5 -0
  48. package/dist/component-library/attributes-9419ac39.js +1 -0
  49. package/dist/component-library/component-library.css +1 -1
  50. package/dist/component-library/component-library.esm.js +1 -1
  51. package/dist/component-library/ds-accordion_3.entry.js +1 -0
  52. package/dist/component-library/ds-link-with-arrow.entry.js +1 -0
  53. package/dist/component-library/ds-link.entry.js +1 -0
  54. package/dist/component-library/ds-text-input.entry.js +1 -1
  55. package/dist/component-library/ds-visually-hidden.entry.js +1 -0
  56. package/dist/component-library/{index-4200d514.js → index-42701395.js} +2 -2
  57. package/dist/component-library/linkUtils-3d1b28cf.js +1 -0
  58. package/dist/component-library/utils-cca2a41a.js +1 -0
  59. package/dist/components/attributes.js +154 -0
  60. package/dist/components/ds-accordion.js +31 -12
  61. package/dist/components/ds-button2.js +4 -78
  62. package/dist/components/ds-icon2.js +320 -231
  63. package/dist/components/ds-link-with-arrow.d.ts +11 -0
  64. package/dist/components/ds-link-with-arrow.js +78 -0
  65. package/dist/components/ds-link.d.ts +11 -0
  66. package/dist/components/ds-link.js +90 -0
  67. package/dist/components/ds-text-input.js +10 -12
  68. package/dist/components/ds-visually-hidden2.js +1 -1
  69. package/dist/components/index2.js +7 -10
  70. package/dist/components/linkUtils.js +13 -0
  71. package/dist/components/utils.js +8 -0
  72. package/dist/esm/attributes-9419ac39.js +75 -0
  73. package/dist/esm/component-library.js +4 -4
  74. package/dist/esm/{ds-accordion_2.entry.js → ds-accordion_3.entry.js} +418 -242
  75. package/dist/esm/ds-link-with-arrow.entry.js +43 -0
  76. package/dist/esm/ds-link.entry.js +50 -0
  77. package/dist/esm/ds-text-input.entry.js +8 -12
  78. package/dist/esm/ds-visually-hidden.entry.js +16 -0
  79. package/dist/esm/{index-4200d514.js → index-42701395.js} +17 -11
  80. package/dist/esm/linkUtils-3d1b28cf.js +13 -0
  81. package/dist/esm/loader.js +3 -3
  82. package/dist/esm/utils-cca2a41a.js +8 -0
  83. package/dist/types/components/00-foundations/icons/categories/social.d.ts +5 -0
  84. package/dist/types/components/01-base-components/ds-accordion/ds-accordion.d.ts +2 -0
  85. package/dist/types/components/01-base-components/ds-accordion/stories/ds-accordion.examples.stories.d.ts +1 -0
  86. package/dist/types/components/01-base-components/ds-icon/ds-icon.d.ts +1 -1
  87. package/dist/types/components/01-base-components/ds-link/ds-link.d.ts +25 -0
  88. package/dist/types/components/01-base-components/ds-link/stories/ds-link.examples.stories.d.ts +11 -0
  89. package/dist/types/components/01-base-components/ds-link/stories/ds-link.features.stories.d.ts +11 -0
  90. package/dist/types/components/01-base-components/ds-link/stories/ds-link.stories.d.ts +7 -0
  91. package/dist/types/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.d.ts +18 -0
  92. package/dist/types/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.examples.stories.d.ts +7 -0
  93. package/dist/types/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.features.stories.d.ts +7 -0
  94. package/dist/types/components/01-base-components/ds-link-with-arrow/stories/ds-arrow-link.stories.d.ts +7 -0
  95. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.d.ts +2 -0
  96. package/dist/types/components/01-base-components/ds-text-input/{ds-text-input.examples.stories.d.ts → stories/ds-text-input.examples.stories.d.ts} +2 -1
  97. package/dist/types/components/01-base-components/ds-text-input/{ds-text-input.features.stories.d.ts → stories/ds-text-input.features.stories.d.ts} +4 -1
  98. package/dist/types/components/01-base-components/ds-text-input/{ds-text-input.stories.d.ts → stories/ds-text-input.stories.d.ts} +1 -1
  99. package/dist/types/components.d.ts +64 -2
  100. package/dist/types/introduction/introduction.stories.d.ts +10 -0
  101. package/dist/types/utils/link/linkUtils.d.ts +2 -0
  102. package/dist/types/utils/utils.d.ts +1 -0
  103. package/package.json +2 -2
  104. package/dist/cjs/ds-button_2.cjs.entry.js +0 -170
  105. package/dist/component-library/ds-accordion_2.entry.js +0 -1
  106. package/dist/component-library/ds-button_2.entry.js +0 -1
  107. package/dist/components/index3.js +0 -80
  108. package/dist/esm/ds-button_2.entry.js +0 -165
@@ -0,0 +1,78 @@
1
+ 'use strict';
2
+
3
+ const inheritAttributes = (el, attributes = []) => {
4
+ const attributeObject = {};
5
+ attributes.forEach(attr => {
6
+ if (el.hasAttribute(attr)) {
7
+ const value = el.getAttribute(attr);
8
+ if (value !== null) {
9
+ attributeObject[attr] = el.getAttribute(attr);
10
+ }
11
+ el.removeAttribute(attr);
12
+ }
13
+ });
14
+ return attributeObject;
15
+ };
16
+ const ariaAttributes = [
17
+ 'role',
18
+ 'aria-activedescendant',
19
+ 'aria-atomic',
20
+ 'aria-autocomplete',
21
+ 'aria-braillelabel',
22
+ 'aria-brailleroledescription',
23
+ 'aria-busy',
24
+ 'aria-checked',
25
+ 'aria-colcount',
26
+ 'aria-colindex',
27
+ 'aria-colindextext',
28
+ 'aria-colspan',
29
+ 'aria-controls',
30
+ 'aria-current',
31
+ 'aria-describedby',
32
+ 'aria-description',
33
+ 'aria-details',
34
+ 'aria-disabled',
35
+ 'aria-errormessage',
36
+ 'aria-expanded',
37
+ 'aria-flowto',
38
+ 'aria-haspopup',
39
+ 'aria-hidden',
40
+ 'aria-invalid',
41
+ 'aria-keyshortcuts',
42
+ 'aria-label',
43
+ 'aria-labelledby',
44
+ 'aria-level',
45
+ 'aria-live',
46
+ 'aria-multiline',
47
+ 'aria-multiselectable',
48
+ 'aria-orientation',
49
+ 'aria-owns',
50
+ 'aria-placeholder',
51
+ 'aria-posinset',
52
+ 'aria-pressed',
53
+ 'aria-readonly',
54
+ 'aria-relevant',
55
+ 'aria-required',
56
+ 'aria-roledescription',
57
+ 'aria-rowcount',
58
+ 'aria-rowindex',
59
+ 'aria-rowindextext',
60
+ 'aria-rowspan',
61
+ 'aria-selected',
62
+ 'aria-setsize',
63
+ 'aria-sort',
64
+ 'aria-valuemax',
65
+ 'aria-valuemin',
66
+ 'aria-valuenow',
67
+ 'aria-valuetext',
68
+ ];
69
+ const inheritAriaAttributes = (el, ignoreList) => {
70
+ let attributesToInherit = [...ariaAttributes];
71
+ if (ignoreList && ignoreList.length > 0) {
72
+ attributesToInherit = attributesToInherit.filter(attr => !ignoreList.includes(attr));
73
+ }
74
+ return inheritAttributes(el, attributesToInherit);
75
+ };
76
+
77
+ exports.inheritAriaAttributes = inheritAriaAttributes;
78
+ exports.inheritAttributes = inheritAttributes;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-fd4f6cd2.js');
5
+ const index = require('./index-bfa0f441.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('component-library.cjs.js', document.baseURI).href));
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["ds-accordion_2.cjs",[[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.cjs",[[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.cjs",[[6,"ds-text-input",{"label":[1],"placeholder":[1],"dsId":[1,"ds-id"],"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);
22
+ return index.bootstrapLazy([["ds-visually-hidden.cjs",[[1,"ds-visually-hidden"]]],["ds-accordion_3.cjs",[[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],"ariaDisabled":[1,"aria-disabled"]}],[1,"ds-icon",{"name":[1],"colour":[1],"size":[1],"dsTitle":[1,"ds-title"],"role":[1],"hidden":[4],"message":[32]}]]],["ds-text-input.cjs",[[6,"ds-text-input",{"label":[1],"placeholder":[1],"dsId":[1,"ds-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.cjs",[[1,"ds-link",{"text":[1],"size":[1],"variant":[1],"weight":[1],"icon":[1025],"iconPosition":[1025,"icon-position"],"href":[1],"target":[1],"download":[4],"lang":[1]}]]],["ds-link-with-arrow.cjs",[[1,"ds-link-with-arrow",{"text":[1],"iconPosition":[1,"icon-position"],"href":[1],"target":[1],"lang":[1]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;