@uh-design-system/component-library 0.2.0-alpha.0 → 0.2.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 (86) hide show
  1. package/dist/cjs/{uh-component-library.cjs.js → component-library.cjs.js} +3 -3
  2. package/dist/cjs/ds-accordion_2.cjs.entry.js +10 -36
  3. package/dist/cjs/ds-button_2.cjs.entry.js +14 -43
  4. package/dist/cjs/ds-text-input.cjs.entry.js +9 -31
  5. package/dist/cjs/{index-f7420801.js → index-d03b8350.js} +369 -316
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +1 -1
  8. package/dist/collection/components/00-foundations/borders/borders.stories.js +0 -1
  9. package/dist/collection/components/00-foundations/breakpoints/breakpoints.stories.js +0 -2
  10. package/dist/collection/components/00-foundations/icons/categories/actions.js +0 -3
  11. package/dist/collection/components/00-foundations/icons/categories/arrows.js +0 -3
  12. package/dist/collection/components/00-foundations/icons/categories/custom.js +0 -3
  13. package/dist/collection/components/00-foundations/icons/categories/information.js +0 -3
  14. package/dist/collection/components/00-foundations/icons/categories/media.js +0 -3
  15. package/dist/collection/components/00-foundations/icons/categories/navigation.js +0 -3
  16. package/dist/collection/components/00-foundations/icons/categories/notifications.js +0 -3
  17. package/dist/collection/components/00-foundations/icons/categories/text.js +0 -3
  18. package/dist/collection/components/00-foundations/icons/categories/users.js +0 -3
  19. package/dist/collection/components/00-foundations/icons/iconList.js +0 -1
  20. package/dist/collection/components/00-foundations/icons/icons.stories.js +0 -3
  21. package/dist/collection/components/00-foundations/spacing/spacing.stories.js +0 -2
  22. package/dist/collection/components/00-foundations/typography/typography.stories.js +0 -2
  23. package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +8 -8
  24. package/dist/collection/components/01-base-components/ds-button/ds-button.js +12 -13
  25. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.examples.stories.js +0 -1
  26. package/dist/collection/components/01-base-components/ds-button/stories/ds-button.stories.js +0 -5
  27. package/dist/collection/components/01-base-components/ds-icon/ds-icon.js +0 -7
  28. package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +7 -29
  29. package/dist/collection/utils/attributes.js +0 -32
  30. package/dist/collection/utils/borders/borderUtils.js +0 -1
  31. package/dist/collection/utils/breakpoints/breakpointsUtils.js +0 -1
  32. package/dist/collection/utils/colours/colourTypes.js +0 -1
  33. package/dist/collection/utils/colours/colourUtils.js +1 -5
  34. package/dist/collection/utils/spacing/spacingUtils.js +1 -2
  35. package/dist/collection/utils/tests/testUtils.js +0 -4
  36. package/dist/collection/utils/typography/typographyUtils.js +0 -2
  37. package/dist/collection/utils/utils.js +0 -14
  38. package/dist/{uh-component-library/uh-component-library.esm.js → component-library/component-library.esm.js} +1 -1
  39. package/dist/{uh-component-library → component-library}/ds-accordion_2.entry.js +1 -1
  40. package/dist/component-library/ds-button_2.entry.js +1 -0
  41. package/dist/component-library/ds-text-input.entry.js +1 -0
  42. package/dist/component-library/index-dfeefc7e.js +2 -0
  43. package/dist/components/ds-accordion.js +9 -9
  44. package/dist/components/ds-button2.js +13 -42
  45. package/dist/components/ds-icon2.js +1 -27
  46. package/dist/components/ds-text-input.js +8 -30
  47. package/dist/components/ds-visually-hidden2.js +1 -1
  48. package/dist/components/index2.js +322 -283
  49. package/dist/esm/{uh-component-library.js → component-library.js} +3 -3
  50. package/dist/esm/ds-accordion_2.entry.js +10 -36
  51. package/dist/esm/ds-button_2.entry.js +14 -43
  52. package/dist/esm/ds-text-input.entry.js +9 -31
  53. package/dist/esm/{index-1d0a6586.js → index-dfeefc7e.js} +369 -316
  54. package/dist/esm/loader.js +2 -2
  55. package/dist/loader/package.json +1 -1
  56. package/dist/types/components/01-base-components/ds-accordion/stories/ds-accordion.examples.stories.d.ts +0 -1
  57. package/dist/types/components/01-base-components/ds-accordion/stories/ds-accordion.features.stories.d.ts +0 -1
  58. package/dist/types/components/01-base-components/ds-accordion/stories/ds-accordion.stories.d.ts +0 -1
  59. package/dist/types/components/01-base-components/ds-button/ds-button.d.ts +0 -13
  60. package/dist/types/components/01-base-components/ds-button/stories/ds-button.features.stories.d.ts +0 -1
  61. package/dist/types/components/01-base-components/ds-button/stories/ds-button.stories.d.ts +0 -1
  62. package/dist/types/components/01-base-components/ds-icon/ds-icon.stories.d.ts +0 -1
  63. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.examples.stories.d.ts +0 -1
  64. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.features.stories.d.ts +0 -1
  65. package/dist/types/components/01-base-components/ds-text-input/ds-text-input.stories.d.ts +0 -1
  66. package/dist/types/components/01-base-components/ds-visually-hidden/ds-visually-hidden.stories.d.ts +0 -1
  67. package/dist/types/index.d.ts +0 -9
  68. package/dist/types/utils/attributes.d.ts +0 -31
  69. package/dist/types/utils/tests/testUtils.d.ts +0 -4
  70. package/dist/types/utils/utils.d.ts +0 -14
  71. package/package.json +6 -9
  72. package/README.md +0 -13
  73. package/dist/uh-component-library/ds-button_2.entry.js +0 -1
  74. package/dist/uh-component-library/ds-text-input.entry.js +0 -1
  75. package/dist/uh-component-library/index-1d0a6586.js +0 -2
  76. package/docs/DEPLOYMENT.md +0 -52
  77. package/docs/DEVELOPMENT.md +0 -52
  78. package/docs/PUBLISHING.md +0 -48
  79. package/docs/TESTING.md +0 -24
  80. package/docs/USAGE.md +0 -30
  81. package/react-wrapper/components.ts +0 -24
  82. /package/dist/cjs/{index-5a88e57b.js → index-5b0b9d4c.js} +0 -0
  83. /package/dist/{uh-component-library → component-library}/app-globals-0f993ce5.js +0 -0
  84. /package/dist/{uh-component-library/index-097075ad.js → component-library/index-72ac5051.js} +0 -0
  85. /package/dist/{uh-component-library → component-library}/index.esm.js +0 -0
  86. /package/dist/esm/{index-097075ad.js → index-72ac5051.js} +0 -0
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f7420801.js');
5
+ const index = require('./index-d03b8350.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.23.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
- const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('uh-component-library.cjs.js', document.baseURI).href));
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));
13
13
  const opts = {};
14
14
  if (importMeta !== "") {
15
15
  opts.resourcesUrl = new URL(".", importMeta).href;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f7420801.js');
6
- const index$1 = require('./index-5a88e57b.js');
5
+ const index = require('./index-d03b8350.js');
6
+ const index$1 = require('./index-5b0b9d4c.js');
7
7
 
8
8
  const dsAccordionCss = ".ds-accordion__open-button{color:var(--ds-textColor-default, #1A1A1A);all:unset;box-sizing:border-box;display:flex;flex-direction:row;gap:8px;width:100%}.ds-accordion__open-button:hover{cursor:pointer;background:var(--ds-bgColor-transparent-onLight-hover, rgba(0, 0, 0, 0.1019607843))}.ds-accordion__open-button:hover.ds-accordion--border-aligned{padding-inline:16px;margin-inline:0}.ds-accordion__open-button:active{background:var(--ds-bgColor-transparent-onLight-active, rgba(0, 0, 0, 0.1490196078))}.ds-accordion__open-button:active.ds-accordion--border-aligned{padding-inline:16px;margin-inline:0}.ds-accordion__open-button:focus{background:var(--ds-bgColor-transparent-onLight-hover, rgba(0, 0, 0, 0.1019607843));box-shadow:0px 0px 0px 1px var(--ds-palette-black)}.ds-accordion__open-button:focus.ds-accordion--border-aligned{padding-inline:16px;margin-inline:0}.ds-accordion__open-button.ds-accordion--default{padding:16px;font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-18);font-weight:600;line-height:27px;letter-spacing:var(--letterSpacing-wide)}.ds-accordion__open-button.ds-accordion--compact{font-size:var(--ds-fontSize-16);padding:12px 16px 12px 16px;line-height:24px;font-weight:600}.ds-accordion__open-button.ds-accordion--border-aligned{padding-inline:0;padding-inline:0;margin-inline:16px}.ds-accordion__open-button[aria-expanded=false]{border-bottom:1px solid var(--ds-borderColor-light, #CCCCCC)}.ds-accordion__panel--expanded{border-bottom:1px solid var(--ds-borderColor-light, #CCCCCC)}.ds-accordion__content{color:var(--ds-textColor-default, #1A1A1A);font-family:var(--ds-fontFamily-body);padding:16px}.ds-accordion__content .ds-accordion--default{font-size:var(--ds-fontSize-18);font-weight:400;line-height:27px;letter-spacing:var(--ds-letterSpacing-wide)}.ds-accordion__content .ds-accordion--compact{font-size:var(--fontSize-16);font-weight:400;line-height:24px;letter-spacing:var(--letterSpacing-wide)}.ds-accordion__close-button{color:var(--ds-textColor-default, #1A1A1A);all:unset;border-bottom:1px solid var(--ds-borderColor-light, #CCCCCC);display:flex;flex-direction:row;gap:8px;font-family:var(--ds-fontFamily-body);letter-spacing:var(--ds-letterSpacing-wide);width:100%}.ds-accordion__close-button:hover{cursor:pointer;background:var(--ds-bgColor-transparent-onLight-hover, rgba(0, 0, 0, 0.1019607843))}.ds-accordion__close-button:hover.ds-accordion--border-aligned{padding-inline:16px;margin-inline:0}.ds-accordion__close-button:active{background:var(--ds-bgColor-transparent-onLight-active, rgba(0, 0, 0, 0.1490196078))}.ds-accordion__close-button:active.ds-accordion--border-aligned{padding-inline:16px;margin-inline:0}.ds-accordion__close-button:focus{background:var(--ds-bgColor-transparent-onLight-hover, rgba(0, 0, 0, 0.1019607843));box-shadow:0px 0px 0px 1px var(--ds-palette-black)}.ds-accordion__close-button:focus.ds-accordion--border-aligned{padding-inline:16px;margin-inline:0}.ds-accordion__close-button.ds-accordion--default{padding:16px;font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-18);font-weight:600;line-height:27px;letter-spacing:var(--letterSpacing-wide)}.ds-accordion__close-button.ds-accordion--compact{font-size:var(--ds-fontSize-16);padding:12px 16px 12px 16px;line-height:24px;font-weight:600}.ds-accordion__close-button.ds-accordion--border-aligned{padding-inline:0;padding-inline:0;margin-inline:16px}";
9
9
  const DsAccordionStyle0 = dsAccordionCss;
@@ -11,6 +11,14 @@ const DsAccordionStyle0 = dsAccordionCss;
11
11
  const DsAccordion = class {
12
12
  constructor(hostRef) {
13
13
  index.registerInstance(this, hostRef);
14
+ this.variant = 'default';
15
+ this.borderAligned = false;
16
+ this.openByDefault = false;
17
+ this.accordionId = 'dsaccordion';
18
+ this.headingLevel = 2;
19
+ this.useCloseButton = false;
20
+ this.closeButtonLabel = 'Close';
21
+ this.isExpanded = this.openByDefault;
14
22
  this.shouldMoveFocus = false;
15
23
  this.handleClick = (event) => {
16
24
  const isCloseButton = event.target.closest('.ds-accordion__close-button');
@@ -28,14 +36,6 @@ const DsAccordion = class {
28
36
  break;
29
37
  }
30
38
  };
31
- this.variant = 'default';
32
- this.borderAligned = false;
33
- this.openByDefault = false;
34
- this.accordionId = 'dsaccordion';
35
- this.headingLevel = 2;
36
- this.useCloseButton = false;
37
- this.closeButtonLabel = 'Close';
38
- this.isExpanded = this.openByDefault;
39
39
  }
40
40
  watchHandler(isExpanded) {
41
41
  if (!isExpanded && this.shouldMoveFocus && this.headerButtonRef) {
@@ -76,8 +76,6 @@ const DSFlameFillIcon = `<svg width="24" height="24" viewBox="0 0 24 24" xmlns="
76
76
  </svg>
77
77
  `;
78
78
 
79
- // src/components/00-foundations/icons/categories/custom.ts
80
- // Set category name
81
79
  const category$8 = 'DS Custom icons';
82
80
  const icons$9 = [
83
81
  { name: 'ds_flame', component: DSFlameIcon, category: category$8 },
@@ -188,8 +186,6 @@ const SaveIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"
188
186
 
189
187
  const SaveFillIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M866-694v599H95v-771h599l172 172ZM479.76-254q43.24 0 73.74-30.26 30.5-30.27 30.5-73.5 0-43.24-30.26-73.74-30.27-30.5-73.5-30.5-43.24 0-73.74 30.26-30.5 30.27-30.5 73.5 0 43.24 30.26 73.74 30.27 30.5 73.5 30.5ZM242-575h358v-143H242v143Z"/></svg>`;
190
188
 
191
- // src/components/00-foundations/icons/categories/actions.ts
192
- // Set category name
193
189
  const category$7 = 'Actions';
194
190
  const icons$8 = [
195
191
  { name: 'archive', component: ArchiveIcon, category: category$7 },
@@ -304,8 +300,6 @@ const ArrowDropDownIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" he
304
300
 
305
301
  const FunctionIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M389-221v-80h70l128-137-127.93-138H379l-70 360q-11 56-45.75 88T179-96q-48 0-80.5-28.64Q66-153.27 66-194q0-30.65 18.3-50.32Q102.6-264 131.76-264q26.24 0 42.74 16 16.5 16 16.5 41 0 10-4 18t-11 13q3 2 7.5 3t10.5 1q12 1 21-10.5t12-29.5l71-364H160v-79h153l19-84q13-60 47.22-93.5t86.07-33.5Q513-866 545-838.5q32 27.5 32 68.5 0 32.7-18.5 52.35T510.53-698q-25.53 0-42.03-15T452-753q0-7.56 3.5-16.5 3.5-8.94 8.5-13.5-2-2-6-3.5t-8-1.5q-12-1-22 10.75T415-749l-20 94h214v79h-44l78 87 73-87h-45v-79h219v79h-68L694-438l129 137h67v80H671v-80h45l-75-82-78 82h46v80H389Z"/></svg>`;
306
302
 
307
- // src/components/00-foundations/icons/categories/arrows.ts
308
- // Set category name
309
303
  const category$6 = 'Arrows and operators';
310
304
  const icons$7 = [
311
305
  { name: 'arrow_upward', component: ArrowUpwardIcon, category: category$6 },
@@ -427,8 +421,6 @@ const AccountBalanceFillIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="4
427
421
 
428
422
  const ProgressActivityIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M480-55q-90.2 0-167.57-32.58-77.37-32.57-134.82-90.03-57.46-57.45-90.03-134.82Q55-389.8 55-480q0-89.87 32.56-167.25 32.57-77.37 89.87-135.11 57.31-57.74 134.79-90.69Q389.7-906 480-906v95q-138.33 0-234.66 96.27Q149-618.46 149-480.23 149-342 245.27-245.5t234.5 96.5Q618-149 714.5-245.34 811-341.67 811-480h95q0 90.3-33.01 167.79-33.02 77.5-90.5 134.85Q725-120 647.5-87.5 570.01-55 480-55Z"/></svg>`;
429
423
 
430
- // src/components/00-foundations/icons/categories/information.ts
431
- // Set category name
432
424
  const category$5 = 'Information';
433
425
  const icons$6 = [
434
426
  { name: 'calendar_month', component: CalendarMonthIcon, category: category$5 },
@@ -521,8 +513,6 @@ const TourIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"
521
513
 
522
514
  const TourFillIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M187-55v-851h94v78h611l-96 225 96 225H281v323h-94Zm322.21-476Q539-531 560-552.21t21-51Q581-633 559.79-654t-51-21Q479-675 458-653.79t-21 51Q437-573 458.21-552t51 21Z"/></svg>`;
523
515
 
524
- // src/components/00-foundations/icons/categories/navigation.ts
525
- // Set category name
526
516
  const category$4 = 'Navigation';
527
517
  const icons$5 = [
528
518
  { name: 'home', component: HomeIcon, category: category$4 },
@@ -607,8 +597,6 @@ const StarIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"
607
597
 
608
598
  const StarFillIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="m196-68 75-324L19-610l332-28 129-306 129 306 332 28-252 218 76 324-285-173L196-68Z"/></svg>`;
609
599
 
610
- // src/components/00-foundations/icons/categories/notifications.ts
611
- // Set category name
612
600
  const category$3 = 'Notifications and expressions';
613
601
  const icons$4 = [
614
602
  { name: 'favorite', component: FavoriteIcon, category: category$3 },
@@ -712,8 +700,6 @@ const PictureAsPdfIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" hei
712
700
 
713
701
  const PictureAsPdfFillIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M353-448h37v-83h62l23-24v-75l-23-23h-99v205Zm37-120v-48h48v48h-48Zm122 120h98l23-24v-158l-23-23h-98v205Zm37-37v-131h47v131h-47Zm129 37h37v-83h50v-37h-50v-48h50v-37h-87v205ZM192-192v-731h731v731H192ZM37-37v-731h95v636h636v95H37Z"/></svg>`;
714
702
 
715
- // src/components/00-foundations/icons/categories/media.ts
716
- // Set category name
717
703
  const category$2 = 'Media and devices';
718
704
  const icons$3 = [
719
705
  { name: 'photo_camera', component: PhotoCameraIcon, category: category$2 },
@@ -765,8 +751,6 @@ const FormatItalicIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" hei
765
751
 
766
752
  const FormatBoldIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M238-175v-611h289q75 0 126 48.5T704-622q0 30-17.5 67.5T623-497v8q57 19 78.5 63t21.5 80q0 60-50.5 115.5T533-175H238Zm111-90h163q23 0 58.5-20t35.5-70q0-49-35-69.5T514-445H349v180Zm0-266h156q29 0 57.5-23t28.5-60q0-34-26.5-59T504-698H349v167Z"/></svg>`;
767
753
 
768
- // src/components/00-foundations/icons/categories/text.ts
769
- // Set category name
770
754
  const category$1 = 'Text formatting';
771
755
  const icons$2 = [
772
756
  { name: 'format_quote', component: FormatQuoteIcon, category: category$1 },
@@ -823,8 +807,6 @@ const BadgeIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48
823
807
 
824
808
  const BadgeFillIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M232-238h239v-14q0-18-9-32t-23-19q-32-11-50-14.5t-35-3.5q-19 0-40.5 4.5T265-303q-15 5-24 19t-9 32v14Zm336-67h170v-50H568v50Zm-214-50q22.5 0 38.25-15.75T408-409q0-22.5-15.75-38.25T354-463q-22.5 0-38.25 15.75T300-409q0 22.5 15.75 38.25T354-355Zm214-63h170v-50H568v50ZM55-55v-651h310v-200h231v200h310v651H55Zm397-553h57v-211h-57v211Z"/></svg>`;
825
809
 
826
- // src/components/00-foundations/icons/categories/users.ts
827
- // Set category name
828
810
  const category = 'Users and avatars';
829
811
  const icons$1 = [
830
812
  { name: 'account_circle', component: AccountCircleIcon, category: category },
@@ -852,7 +834,6 @@ const icons$1 = [
852
834
  { name: 'badge_fill', component: BadgeFillIcon, category: category },
853
835
  ];
854
836
 
855
- // src/components/00-foundations/icons/iconList.ts
856
837
  const icons = [
857
838
  ...icons$9,
858
839
  ...icons$8,
@@ -871,15 +852,12 @@ const DsIconStyle0 = dsIconCss;
871
852
  const DsIcon = class {
872
853
  constructor(hostRef) {
873
854
  index.registerInstance(this, hostRef);
874
- this.name = undefined;
875
- this.colour = undefined;
876
855
  this.size = '1.5rem';
877
856
  this.title = 'Icon';
878
857
  this.role = 'img';
879
858
  this.hidden = true;
880
859
  this.message = '';
881
860
  }
882
- // get the icon from the icon list
883
861
  getIcon() {
884
862
  const selectedIcon = icons.find(icon => icon.name === this.name);
885
863
  if (!selectedIcon) {
@@ -892,18 +870,15 @@ const DsIcon = class {
892
870
  }
893
871
  return svgElement ? svgElement.outerHTML : '';
894
872
  }
895
- // parse the svg string to an svg element
896
873
  parseSvg(svgString) {
897
874
  const parser = new DOMParser();
898
875
  const svgDoc = parser.parseFromString(svgString, 'image/svg+xml');
899
876
  return svgDoc.querySelector('svg');
900
877
  }
901
- // get the colour of the icon
902
878
  getIconColour() {
903
879
  const colour = this.colour ? `var(--${this.colour})` : 'currentColor';
904
880
  return colour;
905
881
  }
906
- // set the attributes of the icon
907
882
  setIconAttributes(svgElement) {
908
883
  const size = this.size || '1.5rem';
909
884
  const colour = this.getIconColour() || 'currentColor';
@@ -911,7 +886,6 @@ const DsIcon = class {
911
886
  const title = this.title || '';
912
887
  svgElement.setAttribute('style', `fill: ${colour}; width: ${size}; height: ${size};`);
913
888
  svgElement.setAttribute('role', role);
914
- // if title is available, insert it into the svg element
915
889
  const titleText = title || 'Icon';
916
890
  const titleElement = document.createElementNS('http://www.w3.org/2000/svg', 'title');
917
891
  titleElement.textContent = titleText;
@@ -2,21 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f7420801.js');
6
- const index$1 = require('./index-5a88e57b.js');
5
+ const index = require('./index-d03b8350.js');
6
+ const index$1 = require('./index-5b0b9d4c.js');
7
7
 
8
- /**
9
- * Copied from https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/helpers.ts
10
- *
11
- * Elements inside of web components sometimes need to inherit global attributes
12
- * set on the host. For example, the inner input in `ion-input` should inherit
13
- * the `title` attribute that developers set directly on `ion-input`. This
14
- * helper function should be called in componentWillLoad and assigned to a variable
15
- * that is later used in the render function.
16
- *
17
- * This does not need to be reactive as changing attributes on the host element
18
- * does not trigger a re-render.
19
- */
20
8
  const inheritAttributes = (el, attributes = []) => {
21
9
  const attributeObject = {};
22
10
  attributes.forEach(attr => {
@@ -30,13 +18,6 @@ const inheritAttributes = (el, attributes = []) => {
30
18
  });
31
19
  return attributeObject;
32
20
  };
33
- /**
34
- * Copied from https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/helpers.ts
35
- *
36
- * List of available ARIA attributes + `role`.
37
- * Removed deprecated attributes.
38
- * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes
39
- */
40
21
  const ariaAttributes = [
41
22
  'role',
42
23
  'aria-activedescendant',
@@ -90,15 +71,6 @@ const ariaAttributes = [
90
71
  'aria-valuenow',
91
72
  'aria-valuetext',
92
73
  ];
93
- /**
94
- * Copied from https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/helpers.ts
95
- *
96
- * Returns an array of aria attributes that should be copied from
97
- * the shadow host element to a target within the light DOM.
98
- * @param el The element that the attributes should be copied from.
99
- * @param ignoreList The list of aria-attributes to ignore reflecting and removing from the host.
100
- * Use this in instances where we manually specify aria attributes on the `<Host>` element.
101
- */
102
74
  const inheritAriaAttributes = (el, ignoreList) => {
103
75
  let attributesToInherit = [...ariaAttributes];
104
76
  if (ignoreList && ignoreList.length > 0) {
@@ -115,9 +87,17 @@ const DsButton = class {
115
87
  index.registerInstance(this, hostRef);
116
88
  this.inheritedAttributes = {};
117
89
  this.pressedKeys = new Set();
90
+ this.value = '';
91
+ this.variant = 'primary';
92
+ this.colour = 'blue';
93
+ this.size = 'medium';
94
+ this.fontWeight = 'normal';
95
+ this.icon = '';
96
+ this.iconPosition = 'start';
97
+ this.type = 'button';
98
+ this.disabled = false;
99
+ this.ariaDisabled = 'false';
118
100
  this.handleKeyDown = (event) => {
119
- // Exit early when a key is held down
120
- // See: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat
121
101
  if (event.repeat) {
122
102
  return;
123
103
  }
@@ -140,16 +120,6 @@ const DsButton = class {
140
120
  break;
141
121
  }
142
122
  };
143
- this.value = '';
144
- this.variant = 'primary';
145
- this.colour = 'blue';
146
- this.size = 'medium';
147
- this.fontWeight = 'normal';
148
- this.icon = '';
149
- this.iconPosition = 'start';
150
- this.type = 'button';
151
- this.disabled = false;
152
- this.ariaDisabled = 'false';
153
123
  }
154
124
  componentWillLoad() {
155
125
  this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el, ['aria-disabled'])), inheritAttributes(this.el, [
@@ -166,6 +136,7 @@ const DsButton = class {
166
136
  ]));
167
137
  }
168
138
  render() {
139
+ console.log('render');
169
140
  const classes = index$1.classNames(`${this.variant} ${this.colour} ${this.size}`, {
170
141
  'icon-start': this.icon && this.iconPosition === 'start' && this.value,
171
142
  'icon-end': this.icon && this.iconPosition === 'end' && this.value,
@@ -173,7 +144,7 @@ const DsButton = class {
173
144
  });
174
145
  const iconSize = this.size === 'small' ? '1rem' : undefined;
175
146
  const isDisabled = this.disabled || this.ariaDisabled === 'true';
176
- return (index.h("button", Object.assign({ key: '1230108c308cc8a89f8202bef69e839e36b6912d', ref: el => (this.buttonEl = el), onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, class: classes, style: { fontWeight: this.fontWeight }, type: this.type, "aria-disabled": isDisabled ? 'true' : 'false' }, this.inheritedAttributes), index.h("slot", { key: 'bb67886e636e7a5294a6fbbde4a8a013e1ace3ce', name: "prefix" }, this.icon && this.iconPosition === 'start' && index.h("ds-icon", { key: '6e93f6095ee4482d5026b42a67b7591712206146', name: this.icon, size: iconSize })), this.value && index.h("span", { key: '833424437f89ace4253e9daef6d8cda409563a4a', class: "button-value" }, this.value), index.h("slot", { key: '162e459206000c3b1b5b4ede761f5600f88b3de1', name: "suffix" }, this.icon && this.iconPosition === 'end' && index.h("ds-icon", { key: '2e9bff6bdc4d5023374916bcbdc11151270113b6', name: this.icon, size: iconSize }))));
147
+ return (index.h("button", Object.assign({ key: 'd85ee424afafcb437fa873e69b7554e315e4cad5', ref: el => (this.buttonEl = el), onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, class: classes, style: { fontWeight: this.fontWeight }, type: this.type, "aria-disabled": isDisabled ? 'true' : 'false' }, this.inheritedAttributes), index.h("slot", { key: 'c21dc9317ae1970d8e5fcead12b4041a8dc13af0', name: "prefix" }, this.icon && this.iconPosition === 'start' && index.h("ds-icon", { key: 'cc993dd0b2a12b3243bc8863d754a0efa3b6f1f4', name: this.icon, size: iconSize })), this.value && index.h("span", { key: 'b8a7bcac21782fd898192d98c605c0eacbfff882', class: "button-value" }, this.value), index.h("slot", { key: 'e4766fc18983798416533173ceddcbe3c80779ba', name: "suffix" }, this.icon && this.iconPosition === 'end' && index.h("ds-icon", { key: 'f308fb96c0b0b06036975df25fc5fba59dffe301', name: this.icon, size: iconSize }))));
177
148
  }
178
149
  get el() { return index.getElement(this); }
179
150
  };
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f7420801.js');
6
- const index$1 = require('./index-5a88e57b.js');
5
+ const index = require('./index-d03b8350.js');
6
+ const index$1 = require('./index-5b0b9d4c.js');
7
7
 
8
8
  function* idGenerator(id) {
9
9
  let currentId = 1;
@@ -33,6 +33,13 @@ const DsTextInput = class {
33
33
  this.visuallyHiddenAssistiveTextId = visuallyHiddenAssistiveTextIdGenerator.next().value;
34
34
  this.successTextId = successTextIdGenerator.next().value;
35
35
  this.errorTextId = errorTextIdGenerator.next().value;
36
+ this.id = 'input';
37
+ this.icon = '';
38
+ this.type = 'text';
39
+ this.hasFocus = false;
40
+ this.clearButtonVisible = false;
41
+ this.passwordInputVisible = false;
42
+ this.inputActive = false;
36
43
  this.onActionButtonClicked = (e) => {
37
44
  e.stopPropagation();
38
45
  switch (this.type) {
@@ -44,35 +51,6 @@ const DsTextInput = class {
44
51
  return;
45
52
  }
46
53
  };
47
- this.label = undefined;
48
- this.placeholder = undefined;
49
- this.id = 'input';
50
- this.name = undefined;
51
- this.disabled = undefined;
52
- this.required = undefined;
53
- this.readonly = undefined;
54
- this.value = undefined;
55
- this.min = undefined;
56
- this.max = undefined;
57
- this.maxlength = undefined;
58
- this.pattern = undefined;
59
- this.autocomplete = undefined;
60
- this.errorText = undefined;
61
- this.successText = undefined;
62
- this.assistiveText = undefined;
63
- this.actionButtonAriaLabel = undefined;
64
- this.hiddenAssistiveText = undefined;
65
- this.prefixText = undefined;
66
- this.suffixText = undefined;
67
- this.icon = '';
68
- this.type = 'text';
69
- this.ariaLabel = undefined;
70
- this.ariaLabelledBy = undefined;
71
- this.ariaDescribedby = undefined;
72
- this.hasFocus = false;
73
- this.clearButtonVisible = false;
74
- this.passwordInputVisible = false;
75
- this.inputActive = false;
76
54
  }
77
55
  async togglePasswordVisibility() {
78
56
  return (this.passwordInputVisible = !this.passwordInputVisible);