@biggive/components 1.0.144 → 1.0.146

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 (44) hide show
  1. package/dist/biggive/biggive.esm.js +1 -1
  2. package/dist/biggive/p-3cabb564.entry.js +1 -0
  3. package/dist/biggive/p-69a69960.entry.js +1 -0
  4. package/dist/biggive/p-b36c9c6e.entry.js +1 -0
  5. package/dist/cjs/biggive-article-card.cjs.entry.js +2 -1
  6. package/dist/cjs/biggive-back-to-top_26.cjs.entry.js +11 -5
  7. package/dist/cjs/biggive-image.cjs.entry.js +2 -1
  8. package/dist/cjs/biggive.cjs.js +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/collection/components/biggive-article-card/biggive-article-card.js +20 -1
  11. package/dist/collection/components/biggive-article-card/biggive-article-card.stories.js +5 -0
  12. package/dist/collection/components/biggive-button/biggive-button.js +22 -1
  13. package/dist/collection/components/biggive-campaign-card/biggive-campaign-card.js +1 -1
  14. package/dist/collection/components/biggive-hero-image/biggive-hero-image.js +21 -2
  15. package/dist/collection/components/biggive-hero-image/biggive-hero-image.stories.js +3 -1
  16. package/dist/collection/components/biggive-image/biggive-image.js +20 -1
  17. package/dist/collection/components/biggive-image/biggive-image.stories.js +5 -0
  18. package/dist/collection/components/biggive-image-feature/biggive-image-feature.js +20 -1
  19. package/dist/collection/components/biggive-image-feature/biggive-image-feature.stories.js +5 -0
  20. package/dist/components/biggive-article-card.js +3 -1
  21. package/dist/components/biggive-button2.js +6 -2
  22. package/dist/components/biggive-campaign-card.js +1 -1
  23. package/dist/components/biggive-hero-image.js +4 -2
  24. package/dist/components/biggive-image-feature.js +3 -1
  25. package/dist/components/biggive-image.js +3 -1
  26. package/dist/esm/biggive-article-card.entry.js +2 -1
  27. package/dist/esm/biggive-back-to-top_26.entry.js +11 -5
  28. package/dist/esm/biggive-image.entry.js +2 -1
  29. package/dist/esm/biggive.js +1 -1
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/types/components/biggive-article-card/biggive-article-card.d.ts +4 -0
  32. package/dist/types/components/biggive-article-card/biggive-article-card.stories.d.ts +3 -0
  33. package/dist/types/components/biggive-button/biggive-button.d.ts +6 -0
  34. package/dist/types/components/biggive-hero-image/biggive-hero-image.d.ts +4 -0
  35. package/dist/types/components/biggive-image/biggive-image.d.ts +4 -0
  36. package/dist/types/components/biggive-image/biggive-image.stories.d.ts +3 -0
  37. package/dist/types/components/biggive-image-feature/biggive-image-feature.d.ts +4 -0
  38. package/dist/types/components/biggive-image-feature/biggive-image-feature.stories.d.ts +3 -0
  39. package/dist/types/components.d.ts +37 -0
  40. package/hydrate/index.js +19 -7
  41. package/package.json +1 -1
  42. package/dist/biggive/p-47161d8b.entry.js +0 -1
  43. package/dist/biggive/p-80a390da.entry.js +0 -1
  44. package/dist/biggive/p-e9d18213.entry.js +0 -1
package/hydrate/index.js CHANGED
@@ -5949,12 +5949,13 @@ class BiggiveArticleCard {
5949
5949
  this.date = null;
5950
5950
  this.mainTitle = null;
5951
5951
  this.imageUrl = null;
5952
+ this.imageAltText = null;
5952
5953
  this.imageLabel = null;
5953
5954
  this.buttonLabel = null;
5954
5955
  this.buttonUrl = null;
5955
5956
  }
5956
5957
  render() {
5957
- return (hAsync("div", { class: 'container space-below-' + this.spaceBelow }, hAsync("div", { class: 'sleeve background-colour-' + this.backgroundColour + ' background-colour-hover-' + this.backgroundColourHover + ' text-colour-' + this.textColour }, hAsync("div", { class: "content-wrap" }, this.slug != '' ? hAsync("div", { class: "slug text-colour-primary" }, this.slug) : null, this.date != '' ? hAsync("div", { class: "date" }, this.date) : null, hAsync("h3", { class: "title" }, hAsync("a", { href: this.buttonUrl }, this.mainTitle)), this.imageUrl != '' ? (hAsync("div", { class: "image-group" }, hAsync("div", { class: "image-wrap", style: { 'background-image': "url('" + this.imageUrl + "')" } }, hAsync("img", { src: this.imageUrl })), hAsync("div", { class: "image-label" }, this.imageLabel))) : null, this.buttonLabel != null && this.buttonUrl != null ? (hAsync("div", { class: "button-wrap align-right" }, hAsync("biggive-button", { "colour-scheme": 'clear-primary', url: this.buttonUrl, label: this.buttonLabel }))) : null))));
5958
+ return (hAsync("div", { class: 'container space-below-' + this.spaceBelow }, hAsync("div", { class: 'sleeve background-colour-' + this.backgroundColour + ' background-colour-hover-' + this.backgroundColourHover + ' text-colour-' + this.textColour }, hAsync("div", { class: "content-wrap" }, this.slug != '' ? hAsync("div", { class: "slug text-colour-primary" }, this.slug) : null, this.date != '' ? hAsync("div", { class: "date" }, this.date) : null, hAsync("h3", { class: "title" }, hAsync("a", { href: this.buttonUrl }, this.mainTitle)), this.imageUrl != '' ? (hAsync("div", { class: "image-group" }, hAsync("div", { class: "image-wrap", style: { 'background-image': "url('" + this.imageUrl + "')" } }, hAsync("img", { src: this.imageUrl, alt: this.imageAltText, title: this.imageAltText })), hAsync("div", { class: "image-label" }, this.imageLabel))) : null, this.buttonLabel != null && this.buttonUrl != null ? (hAsync("div", { class: "button-wrap align-right" }, hAsync("biggive-button", { "colour-scheme": 'clear-primary', url: this.buttonUrl, label: this.buttonLabel }))) : null))));
5958
5959
  }
5959
5960
  static get style() { return biggiveArticleCardCss; }
5960
5961
  static get cmpMeta() { return {
@@ -5969,6 +5970,7 @@ class BiggiveArticleCard {
5969
5970
  "date": [1],
5970
5971
  "mainTitle": [1, "main-title"],
5971
5972
  "imageUrl": [1, "image-url"],
5973
+ "imageAltText": [1, "image-alt-text"],
5972
5974
  "imageLabel": [1, "image-label"],
5973
5975
  "buttonLabel": [1, "button-label"],
5974
5976
  "buttonUrl": [1, "button-url"]
@@ -6382,6 +6384,10 @@ const biggiveButtonCss = "/*!@body*/body.sc-biggive-button{background-color:#D7D
6382
6384
  class BiggiveButton {
6383
6385
  constructor(hostRef) {
6384
6386
  registerInstance(this, hostRef);
6387
+ this.doButtonClick = createEvent(this, "doButtonClick", 7);
6388
+ this.handleButtonClick = (event) => {
6389
+ this.doButtonClick.emit({ event: event, url: event.target.parentElement.href });
6390
+ };
6385
6391
  this.spaceBelow = 1;
6386
6392
  this.colourScheme = 'primary';
6387
6393
  this.label = 'Click me';
@@ -6391,7 +6397,7 @@ class BiggiveButton {
6391
6397
  this.rounded = false;
6392
6398
  }
6393
6399
  render() {
6394
- return (hAsync("div", { class: 'container space-below-' + this.spaceBelow }, hAsync("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() }, this.label)));
6400
+ return (hAsync("div", { class: 'container space-below-' + this.spaceBelow }, hAsync("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() }, hAsync("span", { onClick: this.handleButtonClick }, this.label))));
6395
6401
  }
6396
6402
  static get style() { return biggiveButtonCss; }
6397
6403
  static get cmpMeta() { return {
@@ -6496,7 +6502,7 @@ class BiggiveCampaignCard {
6496
6502
  this.moreInfoButtonColourScheme = 'clear-primary';
6497
6503
  }
6498
6504
  render() {
6499
- return (hAsync("div", { class: 'container space-below-' + this.spaceBelow.toString() }, hAsync("div", { class: "sleeve" }, this.campaignType !== null ? (hAsync("div", { class: "campaign-type" }, hAsync("span", null, this.campaignType))) : null, this.banner !== null ? hAsync("div", { class: "image-wrap banner", style: { 'background-image': 'url(' + this.banner + ')' } }) : hAsync("div", { class: "image-wrap banner" }), hAsync("div", { class: "title-wrap" }, hAsync("h3", null, this.campaignTitle), hAsync("div", { class: "organisation-name" }, "By ", this.organisationName)), hAsync("div", { class: "meta-wrap" }, hAsync("div", { class: "meta-item" }, hAsync("span", { class: "label" }, this.primaryFigureLabel), hAsync("span", { class: "text" }, this.primaryFigureAmount)), hAsync("div", { class: "meta-item" }, hAsync("span", { class: "label" }, this.secondaryFigureLabel), hAsync("span", { class: "text" }, this.secondaryFigureAmount))), hAsync("div", { class: "progress-bar-wrap" }, hAsync("biggive-progress-bar", { counter: this.progressBarCounter, "colour-scheme": "primary" })), hAsync("div", { class: "button-wrap" }, hAsync("biggive-button", { "full-width": "true", "colour-scheme": this.donateButtonColourScheme, url: this.donateButtonUrl, label: this.donateButtonLabel }), hAsync("biggive-button", { "full-width": "true", "colour-scheme": this.moreInfoButtonColourScheme, url: this.moreInfoButtonUrl, label: this.moreInfoButtonLabel })))));
6505
+ return (hAsync("div", { class: 'container space-below-' + this.spaceBelow.toString() }, hAsync("div", { class: "sleeve" }, this.campaignType !== null ? (hAsync("div", { class: "campaign-type" }, hAsync("span", null, this.campaignType))) : null, this.banner !== null ? (hAsync("div", { class: "image-wrap banner", role: "presentation", style: { 'background-image': 'url(' + this.banner + ')' } })) : (hAsync("div", { class: "image-wrap banner" })), hAsync("div", { class: "title-wrap" }, hAsync("h3", null, this.campaignTitle), hAsync("div", { class: "organisation-name" }, "By ", this.organisationName)), hAsync("div", { class: "meta-wrap" }, hAsync("div", { class: "meta-item" }, hAsync("span", { class: "label" }, this.primaryFigureLabel), hAsync("span", { class: "text" }, this.primaryFigureAmount)), hAsync("div", { class: "meta-item" }, hAsync("span", { class: "label" }, this.secondaryFigureLabel), hAsync("span", { class: "text" }, this.secondaryFigureAmount))), hAsync("div", { class: "progress-bar-wrap" }, hAsync("biggive-progress-bar", { counter: this.progressBarCounter, "colour-scheme": "primary" })), hAsync("div", { class: "button-wrap" }, hAsync("biggive-button", { "full-width": "true", "colour-scheme": this.donateButtonColourScheme, url: this.donateButtonUrl, label: this.donateButtonLabel }), hAsync("biggive-button", { "full-width": "true", "colour-scheme": this.moreInfoButtonColourScheme, url: this.moreInfoButtonUrl, label: this.moreInfoButtonLabel })))));
6500
6506
  }
6501
6507
  static get style() { return biggiveCampaignCardCss; }
6502
6508
  static get cmpMeta() { return {
@@ -7018,6 +7024,7 @@ class BiggiveHeroImage {
7018
7024
  this.slug = null;
7019
7025
  this.slugColour = null;
7020
7026
  this.logo = '';
7027
+ this.logoAltText = '';
7021
7028
  this.mainImage = null;
7022
7029
  this.mainImageAlignHorizontal = 'center';
7023
7030
  this.mainImageAlignVertical = 'center';
@@ -7030,9 +7037,9 @@ class BiggiveHeroImage {
7030
7037
  this.buttonColourScheme = 'primary';
7031
7038
  }
7032
7039
  render() {
7033
- return (hAsync("div", { class: 'container colour-scheme-' + this.colourScheme + ' space-below-' + this.spaceBelow }, hAsync("div", { class: "sleeve" }, hAsync("div", { class: "content-wrap" }, this.logo.length > 0 ? (hAsync("div", { class: "logo image-wrap", style: { 'background-image': 'url(' + this.logo + ')' } }, hAsync("img", { src: this.logo }))) : hAsync("div", { class: "logo-space" }), hAsync("div", { class: 'slug text-colour-' + this.slugColour }, this.slug), hAsync("h1", { class: 'main-title text-colour-' + this.mainTitleColour }, this.mainTitle), hAsync("div", { class: 'teaser text-colour-' + this.teaserColour }, this.teaser), this.buttonLabel != null && this.buttonUrl != null
7040
+ return (hAsync("div", { class: 'container colour-scheme-' + this.colourScheme + ' space-below-' + this.spaceBelow }, hAsync("div", { class: "sleeve" }, hAsync("div", { class: "content-wrap" }, this.logo.length > 0 ? (hAsync("div", { class: "logo image-wrap", style: { 'background-image': 'url(' + this.logo + ')' } }, hAsync("img", { src: this.logo, alt: this.logoAltText, title: this.logoAltText }))) : hAsync("div", { class: "logo-space" }), hAsync("div", { class: 'slug text-colour-' + this.slugColour }, this.slug), hAsync("h1", { class: 'main-title text-colour-' + this.mainTitleColour }, this.mainTitle), hAsync("div", { class: 'teaser text-colour-' + this.teaserColour }, this.teaser), this.buttonLabel != null && this.buttonUrl != null
7034
7041
  ? hAsync("biggive-button", { "colour-scheme": this.buttonColourScheme, url: this.buttonUrl, label: this.buttonLabel })
7035
- : null), hAsync("div", { class: "graphic-wrap" }, this.mainImage !== null ? (hAsync("div", { class: "image-wrap", style: { 'background-image': 'url(' + this.mainImage + ')', 'background-position': this.mainImageAlignHorizontal + ' ' + this.mainImageAlignVertical } })) : null))));
7042
+ : null), hAsync("div", { class: "graphic-wrap" }, this.mainImage !== null ? (hAsync("div", { class: "image-wrap", role: "presentation", style: { 'background-image': 'url(' + this.mainImage + ')', 'background-position': this.mainImageAlignHorizontal + ' ' + this.mainImageAlignVertical } })) : null))));
7036
7043
  }
7037
7044
  static get style() { return biggiveHeroImageCss; }
7038
7045
  static get cmpMeta() { return {
@@ -7044,6 +7051,7 @@ class BiggiveHeroImage {
7044
7051
  "slug": [1],
7045
7052
  "slugColour": [1, "slug-colour"],
7046
7053
  "logo": [1],
7054
+ "logoAltText": [1, "logo-alt-text"],
7047
7055
  "mainImage": [1, "main-image"],
7048
7056
  "mainImageAlignHorizontal": [1, "main-image-align-horizontal"],
7049
7057
  "mainImageAlignVertical": [1, "main-image-align-vertical"],
@@ -7094,6 +7102,7 @@ class BiggiveImage {
7094
7102
  this.spaceAbove = 0;
7095
7103
  this.spaceBelow = 0;
7096
7104
  this.imageUrl = '';
7105
+ this.imageAltText = '';
7097
7106
  this.width = 0;
7098
7107
  this.height = 0;
7099
7108
  this.sizeUnit = 'px';
@@ -7113,7 +7122,7 @@ class BiggiveImage {
7113
7122
  return height;
7114
7123
  }
7115
7124
  render() {
7116
- return (hAsync("div", { class: 'container space-above-' + this.spaceAbove + ' space-below-' + this.spaceBelow, style: { width: this.getWidth(), height: this.getHeight() } }, hAsync("div", { class: "image-wrap" }, hAsync("img", { src: this.imageUrl, style: { width: this.getWidth(), height: this.getHeight() } }))));
7125
+ return (hAsync("div", { class: 'container space-above-' + this.spaceAbove + ' space-below-' + this.spaceBelow, style: { width: this.getWidth(), height: this.getHeight() } }, hAsync("div", { class: "image-wrap" }, hAsync("img", { src: this.imageUrl, style: { width: this.getWidth(), height: this.getHeight() }, alt: this.imageAltText }))));
7117
7126
  }
7118
7127
  static get style() { return biggiveImageCss; }
7119
7128
  static get cmpMeta() { return {
@@ -7123,6 +7132,7 @@ class BiggiveImage {
7123
7132
  "spaceAbove": [2, "space-above"],
7124
7133
  "spaceBelow": [2, "space-below"],
7125
7134
  "imageUrl": [1, "image-url"],
7135
+ "imageAltText": [1, "image-alt-text"],
7126
7136
  "width": [2],
7127
7137
  "height": [2],
7128
7138
  "sizeUnit": [1, "size-unit"]
@@ -7141,6 +7151,7 @@ class BiggiveImageFeature {
7141
7151
  this.spaceBelow = 0;
7142
7152
  this.defaultTextColour = 'primary';
7143
7153
  this.imageUrl = '';
7154
+ this.imageAltText = '';
7144
7155
  this.slug = null;
7145
7156
  this.slugColour = '';
7146
7157
  this.mainTitle = null;
@@ -7152,7 +7163,7 @@ class BiggiveImageFeature {
7152
7163
  this.buttonColourScheme = 'primary';
7153
7164
  }
7154
7165
  render() {
7155
- return (hAsync("div", { class: 'container text-colour-' + this.defaultTextColour + ' space-below-' + this.spaceBelow }, hAsync("div", { class: "sleeve" }, hAsync("div", { class: "content-wrap" }, hAsync("div", { class: 'slug text-colour-' + this.slugColour }, this.slug), hAsync("h2", { class: 'title text-colour-' + this.mainTitleColour }, this.mainTitle), hAsync("div", { class: 'teaser text-colour-' + this.teaserColour }, this.teaser), this.buttonLabel != null && this.buttonUrl != null ? (hAsync("biggive-button", { "colour-scheme": this.buttonColourScheme, url: this.buttonUrl, label: this.buttonLabel })) : null), hAsync("div", { class: "graphic-wrap" }, this.imageUrl.length > 0 ? (hAsync("div", { class: "image-wrap" }, hAsync("img", { src: this.imageUrl }))) : null))));
7166
+ return (hAsync("div", { class: 'container text-colour-' + this.defaultTextColour + ' space-below-' + this.spaceBelow }, hAsync("div", { class: "sleeve" }, hAsync("div", { class: "content-wrap" }, hAsync("div", { class: 'slug text-colour-' + this.slugColour }, this.slug), hAsync("h2", { class: 'title text-colour-' + this.mainTitleColour }, this.mainTitle), hAsync("div", { class: 'teaser text-colour-' + this.teaserColour }, this.teaser), this.buttonLabel != null && this.buttonUrl != null ? (hAsync("biggive-button", { "colour-scheme": this.buttonColourScheme, url: this.buttonUrl, label: this.buttonLabel })) : null), hAsync("div", { class: "graphic-wrap" }, this.imageUrl.length > 0 ? (hAsync("div", { class: "image-wrap" }, hAsync("img", { src: this.imageUrl, alt: this.imageAltText }))) : null))));
7156
7167
  }
7157
7168
  static get style() { return biggiveImageFeatureCss; }
7158
7169
  static get cmpMeta() { return {
@@ -7162,6 +7173,7 @@ class BiggiveImageFeature {
7162
7173
  "spaceBelow": [2, "space-below"],
7163
7174
  "defaultTextColour": [1, "default-text-colour"],
7164
7175
  "imageUrl": [1, "image-url"],
7176
+ "imageAltText": [1, "image-alt-text"],
7165
7177
  "slug": [1],
7166
7178
  "slugColour": [1, "slug-colour"],
7167
7179
  "mainTitle": [1, "main-title"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biggive/components",
3
- "version": "1.0.144",
3
+ "version": "1.0.146",
4
4
  "description": "Big Give Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",