@biggive/components 0.0.16 → 0.0.20
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.
- package/dist/biggive/biggive.esm.js +1 -1
- package/dist/biggive/{p-59970be1.entry.js → p-b6653b6d.entry.js} +1 -1
- package/dist/cjs/biggive-campaign-card_3.cjs.entry.js +1 -1
- package/dist/cjs/biggive.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/biggive-campaign-card/biggive-campaign-card.css +2 -0
- package/dist/collection/components/biggive-campaign-card/biggive-campaign-card.js +0 -3
- package/dist/collection/components/demo-campaign-cards/demo-campaign-cards.stories.js +5 -0
- package/dist/components/biggive-campaign-card2.js +1 -1
- package/dist/esm/biggive-campaign-card_3.entry.js +1 -1
- package/dist/esm/biggive.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/biggive-campaign-card/biggive-campaign-card.d.ts +0 -3
- package/dist/types/components/demo-campaign-cards/demo-campaign-cards.stories.d.ts +5 -0
- package/dist/types/interfaces.d.ts +1 -0
- package/package.json +15 -3
- package/readme.md +44 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,b as i}from"./p-ce3d5ebc.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),a(n)})().then((a=>i([["p-
|
|
1
|
+
import{p as a,b as i}from"./p-ce3d5ebc.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),a(n)})().then((a=>i([["p-b6653b6d",[[1,"demo-campaign-cards"],[1,"biggive-campaign-card",{banner:[1],daysRemaining:[2,"days-remaining"],currencyCode:[1,"currency-code"],target:[2],organisationName:[1,"organisation-name"],campaignTitle:[1,"campaign-title"],campaignType:[1,"campaign-type"],beneficiaries:[16],categories:[16],matchFundsRemaining:[2,"match-funds-remaining"],totalFundsRaised:[2,"total-funds-raised"],callToActionUrl:[1,"call-to-action-url"],callToActionLabel:[1,"call-to-action-label"]}],[1,"biggive-grid"]]]],a)));
|
|
@@ -8,4 +8,4 @@ import{r as e,h as c,g as a}from"./p-ce3d5ebc.js";
|
|
|
8
8
|
* Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com
|
|
9
9
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
10
10
|
* Copyright 2022 Fonticons, Inc.
|
|
11
|
-
*/class A{static getBeneficiaries(){return[{name:"Children (3-18)",icon:s},{name:"General Public/Humankind",icon:V},{name:"Infants (<2)",icon:n},{name:"LGBTQAI",icon:L},{name:"Minority Groups",icon:N},{name:"Older People",icon:M},{name:"People With Disabilities",icon:i},{name:"Refugees/Asylum Seekers",icon:l},{name:"Women & Girls",icon:S},{name:"Young People (18-30)",icon:w},{name:"Other",icon:b}]}static getCategories(){return[{name:"Animals",icon:z},{name:"Armed Forces/Emergency Services",icon:h},{name:"Arts/Culture/Heritage",icon:p},{name:"Cancer",icon:v},{name:"Community Support & Development",icon:x},{name:"Disaster Relief",icon:g},{name:"Education/Training/Employment",icon:t},{name:"Environment/Conservation",icon:y},{name:"Health/Wellbeing",icon:C},{name:"Homeless/Refuge",icon:F},{name:"Hospitals/Hospices",icon:m},{name:"Human Rights/Advocacy",icon:H},{name:"Information/Advice",icon:o},{name:"Medical Research",icon:f},{name:"Mental Health",icon:k},{name:"Poverty Alleviation/Relief",icon:d},{name:"Religious",icon:u},{name:"Sports/Recreation",icon:r},{name:"Other",icon:b}]}static getBeneficiaryIcon(e){return A.getBeneficiaries().filter((c=>c.name===e))[0].icon||b}static getCategoryIcon(e){var c;return(null===(c=A.getCategories().filter((c=>c.name===e))[0])||void 0===c?void 0:c.icon)||b}}const R=class{constructor(c){e(this,c),this.banner="",this.daysRemaining=null,this.target=null,this.organisationName=null,this.campaignTitle=null,this.campaignType=null,this.beneficiaries=[],this.categories=[],this.matchFundsRemaining=null,this.totalFundsRaised=null,this.callToActionUrl=null,this.callToActionLabel=null}getBeneficiaryIcons(){return this.beneficiaries.map((e=>A.getBeneficiaryIcon(e)))}getCategoryIcons(){return this.categories.map((e=>A.getCategoryIcon(e)))}formatCurrency(e,c){return null===c||isNaN(c)?"–":Intl.NumberFormat("en-GB",{style:"currency",currency:e,currencyDisplay:"symbol",maximumFractionDigits:0}).format(c)}render(){return c("div",{class:"container"},c("div",{class:"sleeve"},c("div",{class:"campaign-type"},c("span",null,this.campaignType)),this.banner.length>0?c("div",{class:"image-wrap banner",style:{"background-image":"url("+this.banner+")"}},c("img",{src:this.banner,class:"banner"})):null,c("div",{class:"content"},c("div",{class:"meta-wrap style-1"},c("div",{class:"meta-item"},c("span",{class:"label"},"Days Remaining:")," ",c("span",{class:"text"},this.daysRemaining)),c("div",{class:"meta-item"},c("span",{class:"label"},"Target:")," ",c("span",{class:"text"},this.formatCurrency(this.currencyCode,this.target)))),c("header",null,c("div",{class:"slug"},this.organisationName),c("h3",null,this.campaignTitle)),c("div",{class:"meta-wrap style-2"},c("div",{class:"meta-item"},c("span",{class:"label"},"Categories"),c("span",{class:"text"},this.getCategoryIcons().map((e=>c("svg",{width:"512",height:"512",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},c("path",{d:e.icon[4].toString()})))))),c("div",{class:"meta-item"},c("span",{class:"label"},"Helping"),c("span",{class:"text"},this.getBeneficiaryIcons().map((e=>c("svg",{width:"512",height:"512",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},c("path",{d:e.icon[4].toString()}))))))),c("div",{class:"meta-wrap style-3"},c("div",{class:"meta-item"},c("span",{class:"label"},"Match",c("br",null),"Funds Remaining"),c("span",{class:"text"},this.formatCurrency(this.currencyCode,this.matchFundsRemaining))),c("div",{class:"meta-item"},c("span",{class:"label"},"Total",c("br",null),"Funds Received"),c("span",{class:"text"},this.formatCurrency(this.currencyCode,this.totalFundsRaised)))),c("div",{class:"button-wrap"},c("a",{href:this.callToActionUrl,class:"call-to-action"},this.callToActionLabel)))))}};R.style=':host{display:block;margin-bottom:30px}.container{font-family:"Euclid Triangle", sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0, 0, 0, 0.25))}.sleeve{clip-path:polygon(0% 0%, 0% 0%, 100% 0%, 100% 0%, 100% 100%, 100% 100%, 10% 100%, 0 90%)}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:85px 45px 0 45px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-85px;left:-25px;position:relative;width:45px;height:45px;margin:0;color:#2C089B;font-size:0.9rem}.banner{padding-bottom:30%;background-repeat:no-repeat;background-position:center center;background-size:cover}.banner img{display:none}.meta-wrap.style-1{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-1 .meta-item{width:50%}.meta-wrap.style-1 .meta-item .label{font-weight:bold}.meta-wrap.style-1 .meta-item .text{color:#2C089B}header{margin-bottom:20px}header .slug{text-transform:uppercase;font-size:12px;line-height:14px}header h3{margin:0;padding:0;font-size:24px;line-height:28px}.meta-wrap.style-2{display:flex;font-size:12px;line-height:14px;margin-bottom:40px}.meta-wrap.style-2 .meta-item{width:50%}.meta-wrap.style-2 .meta-item .label{font-weight:bold;display:block;margin-bottom:10px}.meta-wrap.style-2 .meta-item .text{display:block;font-size:16px;line-height:18px}.meta-wrap.style-2 .meta-item .text i{margin-right:10px}.meta-wrap.style-3{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-3 .meta-item{margin-right:60px}.meta-wrap.style-3 .meta-item .label{font-weight:bold;display:block;font-size:12px;line-height:14px;margin-bottom:10px}.meta-wrap.style-3 .meta-item .text{display:block;font-size:36px;line-height:40px;font-weight:bold}.meta-wrap.style-3 .meta-item:last-child .text{color:#2C089B}.button-wrap{text-align:right}.button-wrap a{display:inline-block;padding:15px 30px;color:#FFFFFF;background-color:#2C089B;cursor:pointer;text-transform:uppercase;font-size:12px;text-decoration:none}.icon{height:1rem;width:2rem;vertical-align:-0.125rem}';const B=class{constructor(c){e(this,c)}render(){return c("div",{class:"grid"},c("slot",null))}};B.style=":host{display:block}.grid{display:flex;flex-flow:row wrap;justify-content:space-between}";const T=class{constructor(c){e(this,c)}render(){return c("biggive-grid",null,[...Array(12)].map((()=>c("biggive-campaign-card",{banner:a("/assets/images/banner.png"),daysRemaining:50,currencyCode:"GBP",target:5e4,organisationName:"Ardent Theatre Company",campaignType:"Match Funded",campaignTitle:"Strike! A play by Tracy Ryan",categories:["Arts/Culture/Heritage","Environment/Conservation","Health/Wellbeing"],beneficiaries:["General Public/Humankind"],matchFundsRemaining:17424,totalFundsRaised:15424,callToActionUrl:"#",callToActionLabel:"Donate"}))))}};T.style=":host{display:block}";export{R as biggive_campaign_card,B as biggive_grid,T as demo_campaign_cards}
|
|
11
|
+
*/class A{static getBeneficiaries(){return[{name:"Children (3-18)",icon:s},{name:"General Public/Humankind",icon:V},{name:"Infants (<2)",icon:n},{name:"LGBTQAI",icon:L},{name:"Minority Groups",icon:N},{name:"Older People",icon:M},{name:"People With Disabilities",icon:i},{name:"Refugees/Asylum Seekers",icon:l},{name:"Women & Girls",icon:S},{name:"Young People (18-30)",icon:w},{name:"Other",icon:b}]}static getCategories(){return[{name:"Animals",icon:z},{name:"Armed Forces/Emergency Services",icon:h},{name:"Arts/Culture/Heritage",icon:p},{name:"Cancer",icon:v},{name:"Community Support & Development",icon:x},{name:"Disaster Relief",icon:g},{name:"Education/Training/Employment",icon:t},{name:"Environment/Conservation",icon:y},{name:"Health/Wellbeing",icon:C},{name:"Homeless/Refuge",icon:F},{name:"Hospitals/Hospices",icon:m},{name:"Human Rights/Advocacy",icon:H},{name:"Information/Advice",icon:o},{name:"Medical Research",icon:f},{name:"Mental Health",icon:k},{name:"Poverty Alleviation/Relief",icon:d},{name:"Religious",icon:u},{name:"Sports/Recreation",icon:r},{name:"Other",icon:b}]}static getBeneficiaryIcon(e){return A.getBeneficiaries().filter((c=>c.name===e))[0].icon||b}static getCategoryIcon(e){var c;return(null===(c=A.getCategories().filter((c=>c.name===e))[0])||void 0===c?void 0:c.icon)||b}}const R=class{constructor(c){e(this,c),this.banner="",this.daysRemaining=null,this.target=null,this.organisationName=null,this.campaignTitle=null,this.campaignType=null,this.beneficiaries=[],this.categories=[],this.matchFundsRemaining=null,this.totalFundsRaised=null,this.callToActionUrl=null,this.callToActionLabel=null}getBeneficiaryIcons(){return this.beneficiaries.map((e=>A.getBeneficiaryIcon(e)))}getCategoryIcons(){return this.categories.map((e=>A.getCategoryIcon(e)))}formatCurrency(e,c){return null===c||isNaN(c)?"–":Intl.NumberFormat("en-GB",{style:"currency",currency:e,currencyDisplay:"symbol",maximumFractionDigits:0}).format(c)}render(){return c("div",{class:"container"},c("div",{class:"sleeve"},c("div",{class:"campaign-type"},c("span",null,this.campaignType)),this.banner.length>0?c("div",{class:"image-wrap banner",style:{"background-image":"url("+this.banner+")"}},c("img",{src:this.banner,class:"banner"})):null,c("div",{class:"content"},c("div",{class:"meta-wrap style-1"},c("div",{class:"meta-item"},c("span",{class:"label"},"Days Remaining:")," ",c("span",{class:"text"},this.daysRemaining)),c("div",{class:"meta-item"},c("span",{class:"label"},"Target:")," ",c("span",{class:"text"},this.formatCurrency(this.currencyCode,this.target)))),c("header",null,c("div",{class:"slug"},this.organisationName),c("h3",null,this.campaignTitle)),c("div",{class:"meta-wrap style-2"},c("div",{class:"meta-item"},c("span",{class:"label"},"Categories"),c("span",{class:"text"},this.getCategoryIcons().map((e=>c("svg",{width:"512",height:"512",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},c("path",{d:e.icon[4].toString()})))))),c("div",{class:"meta-item"},c("span",{class:"label"},"Helping"),c("span",{class:"text"},this.getBeneficiaryIcons().map((e=>c("svg",{width:"512",height:"512",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},c("path",{d:e.icon[4].toString()}))))))),c("div",{class:"meta-wrap style-3"},c("div",{class:"meta-item"},c("span",{class:"label"},"Match",c("br",null),"Funds Remaining"),c("span",{class:"text"},this.formatCurrency(this.currencyCode,this.matchFundsRemaining))),c("div",{class:"meta-item"},c("span",{class:"label"},"Total",c("br",null),"Funds Received"),c("span",{class:"text"},this.formatCurrency(this.currencyCode,this.totalFundsRaised)))),c("div",{class:"button-wrap"},c("a",{href:this.callToActionUrl,class:"call-to-action"},this.callToActionLabel)))))}};R.style=':host{display:block;margin-bottom:30px;flex-grow:1;margin:1rem}.container{font-family:"Euclid Triangle", sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0, 0, 0, 0.25))}.sleeve{clip-path:polygon(0% 0%, 0% 0%, 100% 0%, 100% 0%, 100% 100%, 100% 100%, 10% 100%, 0 90%)}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:85px 45px 0 45px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-85px;left:-25px;position:relative;width:45px;height:45px;margin:0;color:#2C089B;font-size:0.9rem}.banner{padding-bottom:30%;background-repeat:no-repeat;background-position:center center;background-size:cover}.banner img{display:none}.meta-wrap.style-1{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-1 .meta-item{width:50%}.meta-wrap.style-1 .meta-item .label{font-weight:bold}.meta-wrap.style-1 .meta-item .text{color:#2C089B}header{margin-bottom:20px}header .slug{text-transform:uppercase;font-size:12px;line-height:14px}header h3{margin:0;padding:0;font-size:24px;line-height:28px}.meta-wrap.style-2{display:flex;font-size:12px;line-height:14px;margin-bottom:40px}.meta-wrap.style-2 .meta-item{width:50%}.meta-wrap.style-2 .meta-item .label{font-weight:bold;display:block;margin-bottom:10px}.meta-wrap.style-2 .meta-item .text{display:block;font-size:16px;line-height:18px}.meta-wrap.style-2 .meta-item .text i{margin-right:10px}.meta-wrap.style-3{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-3 .meta-item{margin-right:60px}.meta-wrap.style-3 .meta-item .label{font-weight:bold;display:block;font-size:12px;line-height:14px;margin-bottom:10px}.meta-wrap.style-3 .meta-item .text{display:block;font-size:36px;line-height:40px;font-weight:bold}.meta-wrap.style-3 .meta-item:last-child .text{color:#2C089B}.button-wrap{text-align:right}.button-wrap a{display:inline-block;padding:15px 30px;color:#FFFFFF;background-color:#2C089B;cursor:pointer;text-transform:uppercase;font-size:12px;text-decoration:none}.icon{height:1rem;width:2rem;vertical-align:-0.125rem}';const B=class{constructor(c){e(this,c)}render(){return c("div",{class:"grid"},c("slot",null))}};B.style=":host{display:block}.grid{display:flex;flex-flow:row wrap;justify-content:space-between}";const T=class{constructor(c){e(this,c)}render(){return c("biggive-grid",null,[...Array(12)].map((()=>c("biggive-campaign-card",{banner:a("/assets/images/banner.png"),daysRemaining:50,currencyCode:"GBP",target:5e4,organisationName:"Ardent Theatre Company",campaignType:"Match Funded",campaignTitle:"Strike! A play by Tracy Ryan",categories:["Arts/Culture/Heritage","Environment/Conservation","Health/Wellbeing"],beneficiaries:["General Public/Humankind"],matchFundsRemaining:17424,totalFundsRaised:15424,callToActionUrl:"#",callToActionLabel:"Donate"}))))}};T.style=":host{display:block}";export{R as biggive_campaign_card,B as biggive_grid,T as demo_campaign_cards}
|
|
@@ -322,7 +322,7 @@ class CampaignGroupsService {
|
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
const biggiveCampaignCardCss = ":host{display:block;margin-bottom:30px}.container{font-family:\"Euclid Triangle\", sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0, 0, 0, 0.25))}.sleeve{clip-path:polygon(0% 0%, 0% 0%, 100% 0%, 100% 0%, 100% 100%, 100% 100%, 10% 100%, 0 90%)}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:85px 45px 0 45px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-85px;left:-25px;position:relative;width:45px;height:45px;margin:0;color:#2C089B;font-size:0.9rem}.banner{padding-bottom:30%;background-repeat:no-repeat;background-position:center center;background-size:cover}.banner img{display:none}.meta-wrap.style-1{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-1 .meta-item{width:50%}.meta-wrap.style-1 .meta-item .label{font-weight:bold}.meta-wrap.style-1 .meta-item .text{color:#2C089B}header{margin-bottom:20px}header .slug{text-transform:uppercase;font-size:12px;line-height:14px}header h3{margin:0;padding:0;font-size:24px;line-height:28px}.meta-wrap.style-2{display:flex;font-size:12px;line-height:14px;margin-bottom:40px}.meta-wrap.style-2 .meta-item{width:50%}.meta-wrap.style-2 .meta-item .label{font-weight:bold;display:block;margin-bottom:10px}.meta-wrap.style-2 .meta-item .text{display:block;font-size:16px;line-height:18px}.meta-wrap.style-2 .meta-item .text i{margin-right:10px}.meta-wrap.style-3{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-3 .meta-item{margin-right:60px}.meta-wrap.style-3 .meta-item .label{font-weight:bold;display:block;font-size:12px;line-height:14px;margin-bottom:10px}.meta-wrap.style-3 .meta-item .text{display:block;font-size:36px;line-height:40px;font-weight:bold}.meta-wrap.style-3 .meta-item:last-child .text{color:#2C089B}.button-wrap{text-align:right}.button-wrap a{display:inline-block;padding:15px 30px;color:#FFFFFF;background-color:#2C089B;cursor:pointer;text-transform:uppercase;font-size:12px;text-decoration:none}.icon{height:1rem;width:2rem;vertical-align:-0.125rem}";
|
|
325
|
+
const biggiveCampaignCardCss = ":host{display:block;margin-bottom:30px;flex-grow:1;margin:1rem}.container{font-family:\"Euclid Triangle\", sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0, 0, 0, 0.25))}.sleeve{clip-path:polygon(0% 0%, 0% 0%, 100% 0%, 100% 0%, 100% 100%, 100% 100%, 10% 100%, 0 90%)}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:85px 45px 0 45px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-85px;left:-25px;position:relative;width:45px;height:45px;margin:0;color:#2C089B;font-size:0.9rem}.banner{padding-bottom:30%;background-repeat:no-repeat;background-position:center center;background-size:cover}.banner img{display:none}.meta-wrap.style-1{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-1 .meta-item{width:50%}.meta-wrap.style-1 .meta-item .label{font-weight:bold}.meta-wrap.style-1 .meta-item .text{color:#2C089B}header{margin-bottom:20px}header .slug{text-transform:uppercase;font-size:12px;line-height:14px}header h3{margin:0;padding:0;font-size:24px;line-height:28px}.meta-wrap.style-2{display:flex;font-size:12px;line-height:14px;margin-bottom:40px}.meta-wrap.style-2 .meta-item{width:50%}.meta-wrap.style-2 .meta-item .label{font-weight:bold;display:block;margin-bottom:10px}.meta-wrap.style-2 .meta-item .text{display:block;font-size:16px;line-height:18px}.meta-wrap.style-2 .meta-item .text i{margin-right:10px}.meta-wrap.style-3{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-3 .meta-item{margin-right:60px}.meta-wrap.style-3 .meta-item .label{font-weight:bold;display:block;font-size:12px;line-height:14px;margin-bottom:10px}.meta-wrap.style-3 .meta-item .text{display:block;font-size:36px;line-height:40px;font-weight:bold}.meta-wrap.style-3 .meta-item:last-child .text{color:#2C089B}.button-wrap{text-align:right}.button-wrap a{display:inline-block;padding:15px 30px;color:#FFFFFF;background-color:#2C089B;cursor:pointer;text-transform:uppercase;font-size:12px;text-decoration:none}.icon{height:1rem;width:2rem;vertical-align:-0.125rem}";
|
|
326
326
|
|
|
327
327
|
const BiggiveCampaignCard = class {
|
|
328
328
|
constructor(hostRef) {
|
package/dist/cjs/biggive.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const index = require('./index-8692cc53.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.17.
|
|
6
|
+
Stencil Client Patch Browser v2.17.3 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
const patchBrowser = () => {
|
|
9
9
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('biggive.cjs.js', document.baseURI).href));
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-8692cc53.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.17.
|
|
8
|
+
Stencil Client Patch Esm v2.17.3 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Component, Prop, h } from '@stencil/core';
|
|
2
2
|
import { CampaignGroupsService } from '../../util/campaign-groups';
|
|
3
|
-
/**
|
|
4
|
-
* @todo Currency code for the campaign must be passed as a `@Prop`, not localised to the prospective donor.
|
|
5
|
-
*/
|
|
6
3
|
export class BiggiveCampaignCard {
|
|
7
4
|
constructor() {
|
|
8
5
|
/**
|
|
@@ -318,7 +318,7 @@ class CampaignGroupsService {
|
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
const biggiveCampaignCardCss = ":host{display:block;margin-bottom:30px}.container{font-family:\"Euclid Triangle\", sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0, 0, 0, 0.25))}.sleeve{clip-path:polygon(0% 0%, 0% 0%, 100% 0%, 100% 0%, 100% 100%, 100% 100%, 10% 100%, 0 90%)}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:85px 45px 0 45px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-85px;left:-25px;position:relative;width:45px;height:45px;margin:0;color:#2C089B;font-size:0.9rem}.banner{padding-bottom:30%;background-repeat:no-repeat;background-position:center center;background-size:cover}.banner img{display:none}.meta-wrap.style-1{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-1 .meta-item{width:50%}.meta-wrap.style-1 .meta-item .label{font-weight:bold}.meta-wrap.style-1 .meta-item .text{color:#2C089B}header{margin-bottom:20px}header .slug{text-transform:uppercase;font-size:12px;line-height:14px}header h3{margin:0;padding:0;font-size:24px;line-height:28px}.meta-wrap.style-2{display:flex;font-size:12px;line-height:14px;margin-bottom:40px}.meta-wrap.style-2 .meta-item{width:50%}.meta-wrap.style-2 .meta-item .label{font-weight:bold;display:block;margin-bottom:10px}.meta-wrap.style-2 .meta-item .text{display:block;font-size:16px;line-height:18px}.meta-wrap.style-2 .meta-item .text i{margin-right:10px}.meta-wrap.style-3{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-3 .meta-item{margin-right:60px}.meta-wrap.style-3 .meta-item .label{font-weight:bold;display:block;font-size:12px;line-height:14px;margin-bottom:10px}.meta-wrap.style-3 .meta-item .text{display:block;font-size:36px;line-height:40px;font-weight:bold}.meta-wrap.style-3 .meta-item:last-child .text{color:#2C089B}.button-wrap{text-align:right}.button-wrap a{display:inline-block;padding:15px 30px;color:#FFFFFF;background-color:#2C089B;cursor:pointer;text-transform:uppercase;font-size:12px;text-decoration:none}.icon{height:1rem;width:2rem;vertical-align:-0.125rem}";
|
|
321
|
+
const biggiveCampaignCardCss = ":host{display:block;margin-bottom:30px;flex-grow:1;margin:1rem}.container{font-family:\"Euclid Triangle\", sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0, 0, 0, 0.25))}.sleeve{clip-path:polygon(0% 0%, 0% 0%, 100% 0%, 100% 0%, 100% 100%, 100% 100%, 10% 100%, 0 90%)}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:85px 45px 0 45px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-85px;left:-25px;position:relative;width:45px;height:45px;margin:0;color:#2C089B;font-size:0.9rem}.banner{padding-bottom:30%;background-repeat:no-repeat;background-position:center center;background-size:cover}.banner img{display:none}.meta-wrap.style-1{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-1 .meta-item{width:50%}.meta-wrap.style-1 .meta-item .label{font-weight:bold}.meta-wrap.style-1 .meta-item .text{color:#2C089B}header{margin-bottom:20px}header .slug{text-transform:uppercase;font-size:12px;line-height:14px}header h3{margin:0;padding:0;font-size:24px;line-height:28px}.meta-wrap.style-2{display:flex;font-size:12px;line-height:14px;margin-bottom:40px}.meta-wrap.style-2 .meta-item{width:50%}.meta-wrap.style-2 .meta-item .label{font-weight:bold;display:block;margin-bottom:10px}.meta-wrap.style-2 .meta-item .text{display:block;font-size:16px;line-height:18px}.meta-wrap.style-2 .meta-item .text i{margin-right:10px}.meta-wrap.style-3{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-3 .meta-item{margin-right:60px}.meta-wrap.style-3 .meta-item .label{font-weight:bold;display:block;font-size:12px;line-height:14px;margin-bottom:10px}.meta-wrap.style-3 .meta-item .text{display:block;font-size:36px;line-height:40px;font-weight:bold}.meta-wrap.style-3 .meta-item:last-child .text{color:#2C089B}.button-wrap{text-align:right}.button-wrap a{display:inline-block;padding:15px 30px;color:#FFFFFF;background-color:#2C089B;cursor:pointer;text-transform:uppercase;font-size:12px;text-decoration:none}.icon{height:1rem;width:2rem;vertical-align:-0.125rem}";
|
|
322
322
|
|
|
323
323
|
const BiggiveCampaignCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
324
324
|
constructor() {
|
|
@@ -318,7 +318,7 @@ class CampaignGroupsService {
|
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
const biggiveCampaignCardCss = ":host{display:block;margin-bottom:30px}.container{font-family:\"Euclid Triangle\", sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0, 0, 0, 0.25))}.sleeve{clip-path:polygon(0% 0%, 0% 0%, 100% 0%, 100% 0%, 100% 100%, 100% 100%, 10% 100%, 0 90%)}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:85px 45px 0 45px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-85px;left:-25px;position:relative;width:45px;height:45px;margin:0;color:#2C089B;font-size:0.9rem}.banner{padding-bottom:30%;background-repeat:no-repeat;background-position:center center;background-size:cover}.banner img{display:none}.meta-wrap.style-1{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-1 .meta-item{width:50%}.meta-wrap.style-1 .meta-item .label{font-weight:bold}.meta-wrap.style-1 .meta-item .text{color:#2C089B}header{margin-bottom:20px}header .slug{text-transform:uppercase;font-size:12px;line-height:14px}header h3{margin:0;padding:0;font-size:24px;line-height:28px}.meta-wrap.style-2{display:flex;font-size:12px;line-height:14px;margin-bottom:40px}.meta-wrap.style-2 .meta-item{width:50%}.meta-wrap.style-2 .meta-item .label{font-weight:bold;display:block;margin-bottom:10px}.meta-wrap.style-2 .meta-item .text{display:block;font-size:16px;line-height:18px}.meta-wrap.style-2 .meta-item .text i{margin-right:10px}.meta-wrap.style-3{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-3 .meta-item{margin-right:60px}.meta-wrap.style-3 .meta-item .label{font-weight:bold;display:block;font-size:12px;line-height:14px;margin-bottom:10px}.meta-wrap.style-3 .meta-item .text{display:block;font-size:36px;line-height:40px;font-weight:bold}.meta-wrap.style-3 .meta-item:last-child .text{color:#2C089B}.button-wrap{text-align:right}.button-wrap a{display:inline-block;padding:15px 30px;color:#FFFFFF;background-color:#2C089B;cursor:pointer;text-transform:uppercase;font-size:12px;text-decoration:none}.icon{height:1rem;width:2rem;vertical-align:-0.125rem}";
|
|
321
|
+
const biggiveCampaignCardCss = ":host{display:block;margin-bottom:30px;flex-grow:1;margin:1rem}.container{font-family:\"Euclid Triangle\", sans-serif;filter:drop-shadow(-1px 6px 3px rgba(0, 0, 0, 0.25))}.sleeve{clip-path:polygon(0% 0%, 0% 0%, 100% 0%, 100% 0%, 100% 100%, 100% 100%, 10% 100%, 0 90%)}.content{padding:15px;background-color:#FFFFFF}.campaign-type{margin-left:15px;width:0;height:0;border-style:inset;border-width:85px 45px 0 45px;border-color:#2AF135 transparent transparent transparent;float:left;transform:rotate(360deg)}.campaign-type span{display:block;text-align:center;top:-85px;left:-25px;position:relative;width:45px;height:45px;margin:0;color:#2C089B;font-size:0.9rem}.banner{padding-bottom:30%;background-repeat:no-repeat;background-position:center center;background-size:cover}.banner img{display:none}.meta-wrap.style-1{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-1 .meta-item{width:50%}.meta-wrap.style-1 .meta-item .label{font-weight:bold}.meta-wrap.style-1 .meta-item .text{color:#2C089B}header{margin-bottom:20px}header .slug{text-transform:uppercase;font-size:12px;line-height:14px}header h3{margin:0;padding:0;font-size:24px;line-height:28px}.meta-wrap.style-2{display:flex;font-size:12px;line-height:14px;margin-bottom:40px}.meta-wrap.style-2 .meta-item{width:50%}.meta-wrap.style-2 .meta-item .label{font-weight:bold;display:block;margin-bottom:10px}.meta-wrap.style-2 .meta-item .text{display:block;font-size:16px;line-height:18px}.meta-wrap.style-2 .meta-item .text i{margin-right:10px}.meta-wrap.style-3{display:flex;font-size:16px;line-height:20px;margin-bottom:20px}.meta-wrap.style-3 .meta-item{margin-right:60px}.meta-wrap.style-3 .meta-item .label{font-weight:bold;display:block;font-size:12px;line-height:14px;margin-bottom:10px}.meta-wrap.style-3 .meta-item .text{display:block;font-size:36px;line-height:40px;font-weight:bold}.meta-wrap.style-3 .meta-item:last-child .text{color:#2C089B}.button-wrap{text-align:right}.button-wrap a{display:inline-block;padding:15px 30px;color:#FFFFFF;background-color:#2C089B;cursor:pointer;text-transform:uppercase;font-size:12px;text-decoration:none}.icon{height:1rem;width:2rem;vertical-align:-0.125rem}";
|
|
322
322
|
|
|
323
323
|
const BiggiveCampaignCard = class {
|
|
324
324
|
constructor(hostRef) {
|
package/dist/esm/biggive.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as promiseResolve, b as bootstrapLazy } from './index-4c3bc0b8.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.17.
|
|
4
|
+
Stencil Client Patch Browser v2.17.3 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchBrowser = () => {
|
|
7
7
|
const importMeta = import.meta.url;
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as promiseResolve, b as bootstrapLazy } from './index-4c3bc0b8.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.17.
|
|
4
|
+
Stencil Client Patch Esm v2.17.3 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchEsm = () => {
|
|
7
7
|
return promiseResolve();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@biggive/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "Big Give Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"es2015": "dist/esm/index.mjs",
|
|
8
8
|
"es2017": "dist/esm/index.mjs",
|
|
9
|
-
"types": "dist/types/
|
|
9
|
+
"types": "dist/types/interfaces.d.ts",
|
|
10
10
|
"collection": "dist/collection/collection-manifest.json",
|
|
11
11
|
"collection:main": "dist/collection/index.js",
|
|
12
12
|
"unpkg": "dist/biggive/biggive.esm.js",
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
28
28
|
"generate": "stencil generate",
|
|
29
29
|
"prepare": "husky install",
|
|
30
|
-
"pre-commit": "lint-staged"
|
|
30
|
+
"pre-commit": "lint-staged",
|
|
31
|
+
"storybook": "start-storybook -p 6006",
|
|
32
|
+
"build-storybook": "build-storybook"
|
|
31
33
|
},
|
|
32
34
|
"dependencies": {
|
|
33
35
|
"@fortawesome/fontawesome-svg-core": "^6.1.2",
|
|
@@ -38,10 +40,20 @@
|
|
|
38
40
|
"@stencil/core": "^2.13.0"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
43
|
+
"@babel/core": "^7.18.9",
|
|
41
44
|
"@stencil/angular-output-target": "^0.4.0",
|
|
42
45
|
"@stencil/eslint-plugin": "^0.4.0",
|
|
43
46
|
"@stencil/sass": "^1.5.2",
|
|
47
|
+
"@storybook/addon-actions": "^6.5.9",
|
|
48
|
+
"@storybook/addon-essentials": "^6.5.9",
|
|
49
|
+
"@storybook/addon-interactions": "^6.5.9",
|
|
50
|
+
"@storybook/addon-links": "^6.5.9",
|
|
51
|
+
"@storybook/builder-webpack4": "^6.5.9",
|
|
52
|
+
"@storybook/html": "^6.5.9",
|
|
53
|
+
"@storybook/manager-webpack4": "^6.5.9",
|
|
54
|
+
"@storybook/testing-library": "^0.0.13",
|
|
44
55
|
"@types/jest": "^27.0.3",
|
|
56
|
+
"babel-loader": "^8.2.5",
|
|
45
57
|
"eslint-config-prettier": "^8.5.0",
|
|
46
58
|
"eslint-plugin-prettier": "^4.2.1",
|
|
47
59
|
"husky": "^8.0.0",
|
package/readme.md
CHANGED
|
@@ -45,6 +45,28 @@ Anything externally managed should be loaded with npm and no copies checked into
|
|
|
45
45
|
|
|
46
46
|
Generated build outputs should similarly be `.gitignore`d.
|
|
47
47
|
|
|
48
|
+
Because Stencil components have *partly* generated readme docs, it is a good idea after changing any `@Prop`s or similar to `npm run build`
|
|
49
|
+
before committing your changes. The docs should be source controlled as they can include manual content. If you make a new one, it's a good
|
|
50
|
+
idea to add a one line description of its purpose to the readme before the generated section.
|
|
51
|
+
|
|
52
|
+
### Output targets
|
|
53
|
+
|
|
54
|
+
Main targets are:
|
|
55
|
+
|
|
56
|
+
* `angularOutputTarget()` – used in [Donate frontend](https://github.com/thebiggive/donate-frontend).
|
|
57
|
+
* `dist-custom-elements` – the docs don't make this terribly clear but with our current configuration,
|
|
58
|
+
these are a dependency for the Angular project/target to build successfully. Angular needs to be told
|
|
59
|
+
that they live inside `dist/` (so are published in `dist/components`).
|
|
60
|
+
* `dist` for general web modules – used in [WordPress](https://github.com/thebiggive/wordpress).
|
|
61
|
+
* Storybook has its own build step using the component from source. Currently, this is also used in
|
|
62
|
+
Salesforce to embed components in iframes, the only feasible way we've been able to get Experiences
|
|
63
|
+
to dynamically pull in components.
|
|
64
|
+
* `docs-readme` for documentation.
|
|
65
|
+
|
|
66
|
+
Targets we have but just for local experiments:
|
|
67
|
+
|
|
68
|
+
* `www`
|
|
69
|
+
|
|
48
70
|
### Angular components
|
|
49
71
|
|
|
50
72
|
As well as the core package `@biggive/components`, CI automatically publishes a version best tailored to
|
|
@@ -100,8 +122,20 @@ This directory contains the distribtion files
|
|
|
100
122
|
### www directory - https://stenciljs.com/docs/www
|
|
101
123
|
This directory contains a static version of the web components which can be used for testing and inclusion in simple web apps. Due to CORS restrictions, the index.html file needs to be run from a webserver (not as a local file).
|
|
102
124
|
|
|
125
|
+
### Storybook
|
|
126
|
+
|
|
127
|
+
We've followed [this guide](https://ionicframework.com/blog/how-to-use-storybook-with-stencil/) to
|
|
128
|
+
provide sample usage of key components: a living style guide.
|
|
103
129
|
|
|
130
|
+
CI automatically publishes the Storybook preview:
|
|
131
|
+
* to [its Staging site](https://components-staging.thebiggivetest.org.uk) on *any* push to `main`; and
|
|
132
|
+
* to [its Production site](https://components-production.thebiggive.org.uk) on *tagged* pushes
|
|
133
|
+
(typically also on `main`) – intended for tested, new versions which are also to be npm published.
|
|
104
134
|
|
|
135
|
+
For now, the local `npm run storybook` won't load static image assets or fonts. We've prioritised realistic
|
|
136
|
+
renders in the deployed environment, where these work due to:
|
|
137
|
+
* CI separately copying the main build's `assets` output to S3: see e.g. `deploy-staging-storybook` in [CI config](./.circleci/config.yml)
|
|
138
|
+
* Storybook having a custom [`preview-head.html`](./.storybook/preview-head.html).
|
|
105
139
|
|
|
106
140
|
## Publish to NPM
|
|
107
141
|
|
|
@@ -112,9 +146,17 @@ npm add_user
|
|
|
112
146
|
|
|
113
147
|
### Publish
|
|
114
148
|
|
|
115
|
-
Continuous Integration will automatically publish `main` to
|
|
149
|
+
Continuous Integration will automatically publish `main` to npm when you push a `v*` tag.
|
|
150
|
+
|
|
151
|
+
Versioning is manual currently. To prepare a release for publishing:
|
|
152
|
+
|
|
153
|
+
* Update the root `package.json`'s `version` field.
|
|
154
|
+
* `npm install` to update `package-lock.json` to match.
|
|
155
|
+
* Update `angular/projects/components/package.json`'s `version` field so that `@biggive/components-angular` matches too.
|
|
156
|
+
* `git tag v0.0.1` (replace with your new version)
|
|
157
|
+
* `git push --tags`
|
|
116
158
|
|
|
117
|
-
|
|
159
|
+
You can also do it manually if necessary:
|
|
118
160
|
|
|
119
161
|
```bash
|
|
120
162
|
npm publish --access=public
|