@biggive/components 1.0.97 → 1.0.99

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 (54) hide show
  1. package/dist/biggive/assets/images/logo-biggive-black.svg +1 -1
  2. package/dist/biggive/biggive.esm.js +1 -1
  3. package/dist/biggive/p-2330ffc8.entry.js +1 -0
  4. package/dist/biggive/p-899aafca.entry.js +1 -0
  5. package/dist/biggive/p-9978ef51.entry.js +1 -0
  6. package/dist/cjs/biggive-back-to-top_23.cjs.entry.js +74 -32
  7. package/dist/cjs/biggive-nav-group.cjs.entry.js +20 -0
  8. package/dist/cjs/biggive-nav-item.cjs.entry.js +22 -0
  9. package/dist/cjs/biggive.cjs.js +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/collection/assets/images/logo-biggive-black.svg +1 -1
  12. package/dist/collection/collection-manifest.json +2 -0
  13. package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.css +4 -4
  14. package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.js +267 -30
  15. package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.stories.js +10 -5
  16. package/dist/collection/components/biggive-campaign-highlights/biggive-campaign-highlights.css +2 -0
  17. package/dist/collection/components/biggive-form-field-select/biggive-form-field-select.js +41 -10
  18. package/dist/collection/components/biggive-header/biggive-header.js +1 -1
  19. package/dist/collection/components/biggive-header/biggive-header.stories.js +10 -1
  20. package/dist/collection/components/biggive-hero-image/biggive-hero-image.css +2 -2
  21. package/dist/collection/components/biggive-hero-image/biggive-hero-image.js +39 -1
  22. package/dist/collection/components/biggive-hero-image/biggive-hero-image.stories.js +15 -0
  23. package/dist/collection/components/biggive-nav-group/biggive-nav-group.css +517 -0
  24. package/dist/collection/components/biggive-nav-group/biggive-nav-group.js +43 -0
  25. package/dist/collection/components/biggive-nav-item/biggive-nav-item.css +522 -0
  26. package/dist/collection/components/biggive-nav-item/biggive-nav-item.js +81 -0
  27. package/dist/collection/components/biggive-social-icon/biggive-social-icon.js +1 -1
  28. package/dist/components/biggive-campaign-card-filter-grid.js +77 -29
  29. package/dist/components/biggive-campaign-highlights.js +1 -1
  30. package/dist/components/biggive-form-field-select2.js +5 -4
  31. package/dist/components/biggive-header.js +1 -1
  32. package/dist/components/biggive-hero-image.js +6 -2
  33. package/dist/components/biggive-nav-group.d.ts +11 -0
  34. package/dist/components/biggive-nav-group.js +36 -0
  35. package/dist/components/biggive-nav-item.d.ts +11 -0
  36. package/dist/components/biggive-nav-item.js +40 -0
  37. package/dist/components/biggive-social-icon.js +1 -1
  38. package/dist/components/index.d.ts +2 -0
  39. package/dist/components/index.js +2 -0
  40. package/dist/esm/biggive-back-to-top_23.entry.js +75 -33
  41. package/dist/esm/biggive-nav-group.entry.js +16 -0
  42. package/dist/esm/biggive-nav-item.entry.js +18 -0
  43. package/dist/esm/biggive.js +1 -1
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/types/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.d.ts +30 -0
  46. package/dist/types/components/biggive-form-field-select/biggive-form-field-select.d.ts +1 -1
  47. package/dist/types/components/biggive-hero-image/biggive-hero-image.d.ts +8 -0
  48. package/dist/types/components/biggive-hero-image/biggive-hero-image.stories.d.ts +9 -0
  49. package/dist/types/components/biggive-nav-group/biggive-nav-group.d.ts +7 -0
  50. package/dist/types/components/biggive-nav-item/biggive-nav-item.d.ts +15 -0
  51. package/dist/types/components.d.ts +131 -1
  52. package/hydrate/index.js +142 -37
  53. package/package.json +2 -5
  54. package/dist/biggive/p-da0a4725.entry.js +0 -1
@@ -3,55 +3,90 @@ import { faMagnifyingGlass } from '@fortawesome/pro-solid-svg-icons';
3
3
  export class BiggiveCampaignCardFilterGrid {
4
4
  constructor() {
5
5
  this.searchText = null;
6
+ this.sortBy = null;
7
+ this.filterCategory = null;
8
+ this.filterBeneficary = null;
9
+ this.filterLocation = null;
10
+ this.filterFunding = null;
6
11
  this.spaceBelow = 0;
7
12
  this.intro = 'Find a charity or project';
8
13
  this.placeholderText = 'Search';
9
14
  this.buttonText = 'Search';
15
+ this.categoryOptions = null;
16
+ this.beneficaryOptions = null;
17
+ this.locationOptions = null;
18
+ this.fundingOptions = null;
19
+ }
20
+ getSearchAndFilterObject() {
21
+ var obj = {
22
+ searchText: this.searchText,
23
+ sortBy: this.sortBy,
24
+ filterCategory: this.filterCategory,
25
+ filterBeneficary: this.filterBeneficary,
26
+ filterLocation: this.filterLocation,
27
+ filterFunding: this.filterFunding,
28
+ };
29
+ return obj;
30
+ }
31
+ doOptionSelectCompletedHandler() {
32
+ this.sortBy = this.el.shadowRoot.getElementById('sort-by').selectedValue;
33
+ this.filterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
34
+ this.filterBeneficary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
35
+ this.filterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
36
+ this.filterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
37
+ }
38
+ handleApplyFilterButtonClick() {
39
+ this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
10
40
  }
11
41
  handleSearchTextChanged(event) {
12
42
  this.searchText = event.target.value;
43
+ this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
13
44
  }
14
45
  handleSearchButtonPressed() {
15
- //this.doSearch.emit(this.searchText);
46
+ this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
16
47
  }
17
48
  handleEnterPressed(ev) {
18
49
  if (ev.key === 'Enter') {
19
- //this.doSearch.emit(this.searchText);
50
+ this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
20
51
  }
21
52
  }
22
53
  handleFilterButtonClick() {
23
54
  this.el.shadowRoot.getElementById('filter-popup').open();
24
- var filters = { categories: [], beneficiaries: [] };
25
- var cards = this.el.querySelectorAll('biggive-campaign-card');
26
- for (var i = 0; i < cards.length; i++) {
27
- var categories = JSON.parse(cards[i].getAttribute('data-filter-categories'));
28
- for (var p in categories) {
29
- if (!filters.categories.includes(categories[p])) {
30
- filters.categories.push(categories[p]);
31
- }
55
+ if (this.categoryOptions != null) {
56
+ var options = JSON.parse(this.categoryOptions);
57
+ this.el.shadowRoot.getElementById('categories').innerHTML = '';
58
+ for (var prop in options) {
59
+ this.el.shadowRoot.getElementById('categories').innerHTML +=
60
+ '<biggive-form-field-select-option value="' + options[prop] + '" label="' + options[prop] + '"></biggive-form-field-select-option>';
32
61
  }
33
- var beneficiaries = JSON.parse(cards[i].getAttribute('data-filter-beneficiaries'));
34
- for (var p in beneficiaries) {
35
- if (!filters.beneficiaries.includes(beneficiaries[p])) {
36
- filters.beneficiaries.push(beneficiaries[p]);
37
- }
62
+ }
63
+ if (this.beneficaryOptions != null) {
64
+ var options = JSON.parse(this.beneficaryOptions);
65
+ this.el.shadowRoot.getElementById('beneficaries').innerHTML = '';
66
+ for (var prop in options) {
67
+ this.el.shadowRoot.getElementById('beneficaries').innerHTML +=
68
+ '<biggive-form-field-select-option value="' + options[prop] + '" label="' + options[prop] + '"></biggive-form-field-select-option>';
38
69
  }
39
70
  }
40
- categories.sort();
41
- this.el.shadowRoot.getElementById('categories').innerHTML = '';
42
- for (var i = 0; i < filters.categories.length; i++) {
43
- this.el.shadowRoot.getElementById('categories').innerHTML +=
44
- '<biggive-form-field-select-option value="' + filters.categories[i] + '" label="' + filters.categories[i] + '"></biggive-form-field-select-option>';
71
+ if (this.locationOptions != null) {
72
+ var options = JSON.parse(this.locationOptions);
73
+ this.el.shadowRoot.getElementById('locations').innerHTML = '';
74
+ for (var prop in options) {
75
+ this.el.shadowRoot.getElementById('locations').innerHTML +=
76
+ '<biggive-form-field-select-option value="' + options[prop] + '" label="' + options[prop] + '"></biggive-form-field-select-option>';
77
+ }
45
78
  }
46
- beneficiaries.sort();
47
- this.el.shadowRoot.getElementById('beneficiaries').innerHTML = '';
48
- for (var i = 0; i < filters.beneficiaries.length; i++) {
49
- this.el.shadowRoot.getElementById('beneficiaries').innerHTML +=
50
- '<biggive-form-field-select-option value="' + filters.beneficiaries[i] + '" label="' + filters.beneficiaries[i] + '"></biggive-form-field-select-option>';
79
+ if (this.fundingOptions != null) {
80
+ var options = JSON.parse(this.fundingOptions);
81
+ this.el.shadowRoot.getElementById('funding').innerHTML = '';
82
+ for (var prop in options) {
83
+ this.el.shadowRoot.getElementById('funding').innerHTML +=
84
+ '<biggive-form-field-select-option value="' + options[prop] + '" label="' + options[prop] + '"></biggive-form-field-select-option>';
85
+ }
51
86
  }
52
87
  }
53
88
  render() {
54
- return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("div", { class: "sleeve" }, h("div", { class: "search-wrap" }, h("h4", null, this.intro), h("div", { class: "field-wrap" }, h("div", { class: "input-wrap" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { d: faMagnifyingGlass.icon[4].toString() })), h("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: event => this.handleSearchTextChanged(event), onKeyDown: event => this.handleEnterPressed(event) })), h("button", { onClick: () => this.handleSearchButtonPressed(), class: "button button-primary" }, this.buttonText))), h("div", { class: "sort-filter-wrap" }, h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by" }, h("biggive-form-field-select-option", { value: "name", label: "Name" }))), h("div", { class: "filter-wrap" }, h("div", { class: "button button-primary filter", onClick: () => this.handleFilterButtonClick() }, h("span", { class: "filter-icon" }, h("svg", { width: "16", height: "15", viewBox: "0 0 16 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M0.12042 0.76576C0.327224 0.298 0.766961 0 1.25014 0H14.7517C15.2361 0 15.6736 0.298 15.8799 0.76576C16.0893 1.23352 16.0237 1.787 15.6924 2.18745L10.0011 9.67328V13.929C10.0011 14.3341 9.7886 14.7058 9.44793 14.8866C9.1104 15.0674 8.7041 15.0306 8.40094 14.7862L6.40072 13.179C6.14756 12.9781 6.00067 12.66 6.00067 12.3218V9.67328L0.282594 2.18745C-0.023284 1.787 -0.0864161 1.23352 0.120451 0.76576H0.12042Z", fill: "white" }))), "Filters"), h("biggive-popup", { id: "filter-popup" }, h("h4", { class: "space-above-0 space-below-3 colour-primary" }, "Filters"), h("biggive-form-field-select", { placeholder: "Category", id: "categories", "space-below": "2" }), h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" })))), h("div", { class: "campaign-grid" }, h("slot", { name: "campaign-grid" })))));
89
+ return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("div", { class: "sleeve" }, h("div", { class: "search-wrap" }, h("h4", null, this.intro), h("div", { class: "field-wrap" }, h("div", { class: "input-wrap" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { d: faMagnifyingGlass.icon[4].toString() })), h("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: event => this.handleSearchTextChanged(event), onKeyDown: event => this.handleEnterPressed(event) })), h("button", { onClick: () => this.handleSearchButtonPressed(), class: "button button-primary" }, this.buttonText))), h("div", { class: "sort-filter-wrap" }, h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", id: "sort-by" }, h("biggive-form-field-select-option", { value: "most-raised", label: "Most raised" }), h("biggive-form-field-select-option", { value: "matched-funds-remaining", label: "Match funds remaining" }))), h("div", { class: "filter-wrap" }, h("div", { class: "button button-primary filter", onClick: () => this.handleFilterButtonClick() }, h("span", { class: "filter-icon" }, h("svg", { width: "16", height: "15", viewBox: "0 0 16 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M0.12042 0.76576C0.327224 0.298 0.766961 0 1.25014 0H14.7517C15.2361 0 15.6736 0.298 15.8799 0.76576C16.0893 1.23352 16.0237 1.787 15.6924 2.18745L10.0011 9.67328V13.929C10.0011 14.3341 9.7886 14.7058 9.44793 14.8866C9.1104 15.0674 8.7041 15.0306 8.40094 14.7862L6.40072 13.179C6.14756 12.9781 6.00067 12.66 6.00067 12.3218V9.67328L0.282594 2.18745C-0.023284 1.787 -0.0864161 1.23352 0.120451 0.76576H0.12042Z", fill: "white" }))), "Filters"), h("biggive-popup", { id: "filter-popup" }, h("h4", { class: "space-above-0 space-below-3 colour-primary" }, "Filters"), h("biggive-form-field-select", { placeholder: "Category", id: "categories", "space-below": "2" }), h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }), h("biggive-form-field-select", { placeholder: "Location", id: "locations", "space-below": "2" }), h("biggive-form-field-select", { placeholder: "Funding", id: "funding", "space-below": "2" }), h("div", { class: "align-right" }, h("a", { href: "#", class: "button button-primary", onClick: () => this.handleApplyFilterButtonClick() }, "Apply filters"))))), h("div", { class: "campaign-grid" }, h("slot", { name: "campaign-grid" })))));
55
90
  }
56
91
  static get is() { return "biggive-campaign-card-filter-grid"; }
57
92
  static get encapsulation() { return "shadow"; }
@@ -67,6 +102,114 @@ export class BiggiveCampaignCardFilterGrid {
67
102
  }
68
103
  static get properties() {
69
104
  return {
105
+ "searchText": {
106
+ "type": "string",
107
+ "mutable": false,
108
+ "complexType": {
109
+ "original": "string",
110
+ "resolved": "string",
111
+ "references": {}
112
+ },
113
+ "required": false,
114
+ "optional": false,
115
+ "docs": {
116
+ "tags": [],
117
+ "text": ""
118
+ },
119
+ "attribute": "search-text",
120
+ "reflect": false,
121
+ "defaultValue": "null"
122
+ },
123
+ "sortBy": {
124
+ "type": "string",
125
+ "mutable": false,
126
+ "complexType": {
127
+ "original": "string",
128
+ "resolved": "string",
129
+ "references": {}
130
+ },
131
+ "required": false,
132
+ "optional": false,
133
+ "docs": {
134
+ "tags": [],
135
+ "text": ""
136
+ },
137
+ "attribute": "sort-by",
138
+ "reflect": false,
139
+ "defaultValue": "null"
140
+ },
141
+ "filterCategory": {
142
+ "type": "string",
143
+ "mutable": false,
144
+ "complexType": {
145
+ "original": "string",
146
+ "resolved": "string",
147
+ "references": {}
148
+ },
149
+ "required": false,
150
+ "optional": false,
151
+ "docs": {
152
+ "tags": [],
153
+ "text": ""
154
+ },
155
+ "attribute": "filter-category",
156
+ "reflect": false,
157
+ "defaultValue": "null"
158
+ },
159
+ "filterBeneficary": {
160
+ "type": "string",
161
+ "mutable": false,
162
+ "complexType": {
163
+ "original": "string",
164
+ "resolved": "string",
165
+ "references": {}
166
+ },
167
+ "required": false,
168
+ "optional": false,
169
+ "docs": {
170
+ "tags": [],
171
+ "text": ""
172
+ },
173
+ "attribute": "filter-beneficary",
174
+ "reflect": false,
175
+ "defaultValue": "null"
176
+ },
177
+ "filterLocation": {
178
+ "type": "string",
179
+ "mutable": false,
180
+ "complexType": {
181
+ "original": "string",
182
+ "resolved": "string",
183
+ "references": {}
184
+ },
185
+ "required": false,
186
+ "optional": false,
187
+ "docs": {
188
+ "tags": [],
189
+ "text": ""
190
+ },
191
+ "attribute": "filter-location",
192
+ "reflect": false,
193
+ "defaultValue": "null"
194
+ },
195
+ "filterFunding": {
196
+ "type": "string",
197
+ "mutable": false,
198
+ "complexType": {
199
+ "original": "string",
200
+ "resolved": "string",
201
+ "references": {}
202
+ },
203
+ "required": false,
204
+ "optional": false,
205
+ "docs": {
206
+ "tags": [],
207
+ "text": ""
208
+ },
209
+ "attribute": "filter-funding",
210
+ "reflect": false,
211
+ "defaultValue": "null"
212
+ },
70
213
  "spaceBelow": {
71
214
  "type": "number",
72
215
  "mutable": false,
@@ -138,13 +281,107 @@ export class BiggiveCampaignCardFilterGrid {
138
281
  "attribute": "button-text",
139
282
  "reflect": false,
140
283
  "defaultValue": "'Search'"
284
+ },
285
+ "categoryOptions": {
286
+ "type": "string",
287
+ "mutable": false,
288
+ "complexType": {
289
+ "original": "string",
290
+ "resolved": "string",
291
+ "references": {}
292
+ },
293
+ "required": false,
294
+ "optional": false,
295
+ "docs": {
296
+ "tags": [],
297
+ "text": "JSON array of category key/values"
298
+ },
299
+ "attribute": "category-options",
300
+ "reflect": false,
301
+ "defaultValue": "null"
302
+ },
303
+ "beneficaryOptions": {
304
+ "type": "string",
305
+ "mutable": false,
306
+ "complexType": {
307
+ "original": "string",
308
+ "resolved": "string",
309
+ "references": {}
310
+ },
311
+ "required": false,
312
+ "optional": false,
313
+ "docs": {
314
+ "tags": [],
315
+ "text": "JSON array of beneficary key/values"
316
+ },
317
+ "attribute": "beneficary-options",
318
+ "reflect": false,
319
+ "defaultValue": "null"
320
+ },
321
+ "locationOptions": {
322
+ "type": "string",
323
+ "mutable": false,
324
+ "complexType": {
325
+ "original": "string",
326
+ "resolved": "string",
327
+ "references": {}
328
+ },
329
+ "required": false,
330
+ "optional": false,
331
+ "docs": {
332
+ "tags": [],
333
+ "text": "JSON array of location key/values"
334
+ },
335
+ "attribute": "location-options",
336
+ "reflect": false,
337
+ "defaultValue": "null"
338
+ },
339
+ "fundingOptions": {
340
+ "type": "string",
341
+ "mutable": false,
342
+ "complexType": {
343
+ "original": "string",
344
+ "resolved": "string",
345
+ "references": {}
346
+ },
347
+ "required": false,
348
+ "optional": false,
349
+ "docs": {
350
+ "tags": [],
351
+ "text": "JSON array of funding key/values"
352
+ },
353
+ "attribute": "funding-options",
354
+ "reflect": false,
355
+ "defaultValue": "null"
141
356
  }
142
357
  };
143
358
  }
144
- static get states() {
145
- return {
146
- "searchText": {}
147
- };
359
+ static get events() {
360
+ return [{
361
+ "method": "doSearchAndFilterUpdate",
362
+ "name": "doSearchAndFilterUpdate",
363
+ "bubbles": true,
364
+ "cancelable": true,
365
+ "composed": true,
366
+ "docs": {
367
+ "tags": [],
368
+ "text": "This event `doChange` event is emitted and propogates to the parent\ncomponent which handles it"
369
+ },
370
+ "complexType": {
371
+ "original": "object",
372
+ "resolved": "object",
373
+ "references": {}
374
+ }
375
+ }];
148
376
  }
149
377
  static get elementRef() { return "el"; }
378
+ static get listeners() {
379
+ return [{
380
+ "name": "doSelectChange",
381
+ "method": "doOptionSelectCompletedHandler",
382
+ "target": undefined,
383
+ "capture": false,
384
+ "passive": false
385
+ }];
386
+ }
150
387
  }
@@ -3,12 +3,10 @@ export default {
3
3
  title: 'Components/Campaign Features',
4
4
  //subcomponents: {BiggiveCampaignCard}
5
5
  };
6
- const Template = () => `
7
- <biggive-campaign-card-filter-grid>
6
+ const Template = args => `
7
+ <biggive-campaign-card-filter-grid category-options="${args.categoryOptions}" beneficiary-options="${args.beneficaryOptions}" location-options="${args.locationOptions}" funding-options="${args.fundingOptions}">
8
8
  <biggive-grid slot="campaign-grid" column-count="3">
9
- <biggive-campaign-card
10
- data-filter-categories="[&quot;Finance&quot;]"
11
- data-filter-beneficiaries="[&quot;Children&quot;,&quot;Adults&quot;]"
9
+ <biggive-campaign-card
12
10
  campaign-type="Match Funded"
13
11
  campaign-title="Oxford Piano Festival Fundraising Campaign for LGBTQ+ community"
14
12
  organisation-name="Oxford Philharmonic Orchestra"
@@ -46,4 +44,11 @@ const Template = () => `
46
44
  </biggive-grid>
47
45
  </biggive-campaign-card-filter-grid>
48
46
  `;
47
+ document.addEventListener('doSearchAndFilterUpdate', () => alert('doSearchAndFilterUpdate event emitted!'));
49
48
  export const CampaignCardFilterGridComponent = Template.bind({});
49
+ CampaignCardFilterGridComponent.args = {
50
+ categoryOptions: '[&quot;Children&quot;,&quot;Adults&quot;]',
51
+ beneficiaryOptions: '[&quot;Children&quot;,&quot;Adults&quot;]',
52
+ locationOptions: '[&quot;Children&quot;,&quot;Adults&quot;]',
53
+ fundingOptions: '[&quot;ABC&quot;,&quot;Adults&quot;]',
54
+ };
@@ -535,6 +535,8 @@ a:hover {
535
535
  margin-top: 2px;
536
536
  padding-bottom: 33.3%;
537
537
  background-color: #F1F1F1;
538
+ background-size: cover;
539
+ background-repeat: no-repeat;
538
540
  margin-bottom: 30px;
539
541
  }
540
542
  .container .banner img {
@@ -9,6 +9,7 @@ export class BiggiveFormFieldSelect {
9
9
  doOptionSelectCompletedHandler(event) {
10
10
  this.selectedValue = event.detail.value;
11
11
  this.selectedLabel = event.detail.label;
12
+ this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel });
12
13
  }
13
14
  render() {
14
15
  return (h("div", { class: 'dropdown space-below-' + this.spaceBelow }, h("div", { class: "sleeve" }, h("span", { class: "placeholder" }, this.selectedLabel == null ? this.placeholder : this.selectedLabel)), h("div", { class: "options" }, h("slot", null))));
@@ -27,6 +28,42 @@ export class BiggiveFormFieldSelect {
27
28
  }
28
29
  static get properties() {
29
30
  return {
31
+ "selectedValue": {
32
+ "type": "string",
33
+ "mutable": false,
34
+ "complexType": {
35
+ "original": "string",
36
+ "resolved": "string",
37
+ "references": {}
38
+ },
39
+ "required": false,
40
+ "optional": false,
41
+ "docs": {
42
+ "tags": [],
43
+ "text": ""
44
+ },
45
+ "attribute": "selected-value",
46
+ "reflect": false,
47
+ "defaultValue": "null"
48
+ },
49
+ "selectedLabel": {
50
+ "type": "string",
51
+ "mutable": false,
52
+ "complexType": {
53
+ "original": "string",
54
+ "resolved": "string",
55
+ "references": {}
56
+ },
57
+ "required": false,
58
+ "optional": false,
59
+ "docs": {
60
+ "tags": [],
61
+ "text": ""
62
+ },
63
+ "attribute": "selected-label",
64
+ "reflect": false,
65
+ "defaultValue": "null"
66
+ },
30
67
  "spaceBelow": {
31
68
  "type": "number",
32
69
  "mutable": false,
@@ -65,16 +102,10 @@ export class BiggiveFormFieldSelect {
65
102
  }
66
103
  };
67
104
  }
68
- static get states() {
69
- return {
70
- "selectedValue": {},
71
- "selectedLabel": {}
72
- };
73
- }
74
105
  static get events() {
75
106
  return [{
76
- "method": "doChange",
77
- "name": "doChange",
107
+ "method": "doSelectChange",
108
+ "name": "doSelectChange",
78
109
  "bubbles": true,
79
110
  "cancelable": true,
80
111
  "composed": true,
@@ -83,8 +114,8 @@ export class BiggiveFormFieldSelect {
83
114
  "text": "This event `doChange` event is emitted and propogates to the parent\ncomponent which handles it"
84
115
  },
85
116
  "complexType": {
86
- "original": "string",
87
- "resolved": "string",
117
+ "original": "object",
118
+ "resolved": "object",
88
119
  "references": {}
89
120
  }
90
121
  }];
@@ -33,7 +33,7 @@ export class BiggiveHeader {
33
33
  navSecondary.push(h("li", null, h("a", { href: el.firstElementChild.getAttribute('href') }, el.innerText)));
34
34
  });
35
35
  }
36
- return (h("header", { class: 'header space-below' + this.spaceBelow }, h("div", { class: "row row-top" }, h("div", { class: "social-icon-wrap" }, h("slot", { name: "social-icons" })), h("nav", { class: "nav nav-secondary" }, h("ul", null, navSecondary))), h("div", { class: "row row-bottom" }, h("div", { class: "logo-wrap" }, h("a", { href: this.logoUrl }, h("svg", { width: "149", height: "30", viewBox: "0 0 149 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M59.9362 6.08031C58.258 6.08031 56.8195 4.70363 56.8195 3.04015C56.8195 1.37667 58.258 0 59.9362 0C61.7342 0 63.1127 1.37667 63.1127 3.04015C63.1127 4.70363 61.7342 6.08031 59.9362 6.08031ZM57.4189 23.805H62.4534V7.74379H57.4189V23.805ZM76.5981 7.74379V8.71893C75.8189 7.97323 74.2606 7.34226 72.4626 7.34226C67.9674 7.34226 64.3114 10.5545 64.3114 15.2008C64.3114 19.9044 67.9674 23.0593 72.4626 23.0593C74.2606 23.0593 75.8189 22.543 76.5981 21.6826V22.6004C76.5981 24.6654 74.6801 25.6979 72.1629 25.6979C70.0052 25.6979 68.1472 25.239 66.4091 24.2639V29.0249C68.5068 29.7706 70.8443 30 72.4026 30C77.4371 30 81.6326 27.9924 81.6326 22.7151V7.68643H76.5981V7.74379ZM76.5981 17.2084C75.8788 18.1836 74.6801 18.6424 73.3616 18.6424C71.2639 18.6424 69.5257 17.4379 69.5257 15.2008C69.5257 13.021 71.2639 11.7591 73.3616 11.7591C74.6801 11.7591 75.8788 12.3327 76.5981 13.2505V17.2084ZM96.1368 24.2065C100.093 24.2065 102.55 23.5182 104.588 22.2562V9.98088H93.6196V14.6845H99.4332V18.8145C98.5942 19.044 97.6352 19.2161 96.2567 19.2161C91.342 19.2161 88.9446 16.0612 88.9446 12.3901C88.9446 8.71893 91.7016 5.56405 96.916 5.56405C99.0736 5.56405 101.171 6.13767 102.73 6.94073V1.72084C101.231 1.14723 99.3134 0.630979 96.6163 0.630979C89.0046 0.630979 83.6104 5.90822 83.6104 12.4474C83.5505 19.1013 88.4652 24.2065 96.1368 24.2065ZM109.442 6.08031C107.764 6.08031 106.326 4.70363 106.326 3.04015C106.326 1.37667 107.764 0 109.442 0C111.24 0 112.619 1.37667 112.619 3.04015C112.619 4.70363 111.18 6.08031 109.442 6.08031ZM106.925 23.805H111.96V7.74379H106.925V23.805ZM123.227 14.9713L118.972 7.74379H113.098L123.167 24.1491L133.237 7.74379H127.483L123.227 14.9713ZM137.372 16.9216H148.999C149.059 9.92352 144.804 7.39962 140.549 7.39962C136.053 7.39962 132.038 9.98088 131.978 15.7744C131.978 21.3958 136.113 24.1491 141.088 24.1491C143.246 24.1491 145.523 23.8623 147.501 22.8872V18.4704C144.984 19.847 143.366 19.9044 141.927 19.9044C139.769 19.847 137.552 19.2161 137.372 16.9216ZM140.608 11.1281C142.107 11.1281 143.425 11.8164 143.605 13.8241H137.372C137.732 11.8738 139.11 11.1281 140.608 11.1281ZM51.5453 11.3576C52.744 10.325 53.3433 9.00574 53.3433 7.34226C53.3433 4.24474 50.3466 1.03251 46.0313 1.03251H38V23.8623H48.4287C52.5042 23.8623 55.6209 20.8795 55.6209 17.0937C55.6209 14.7992 54.542 12.3327 51.5453 11.3576ZM43.2743 5.67878H45.6717C47.1101 5.67878 48.129 6.76865 48.129 7.97324C48.129 9.17782 47.1101 10.2103 45.6717 10.2103H43.2743V5.67878ZM47.9492 19.1587H43.2743V14.5698H47.9492C49.3876 14.5698 50.4665 15.6023 50.4665 16.8643C50.4665 18.1262 49.3876 19.1587 47.9492 19.1587Z", fill: "black" }), h("path", { d: "M21.543 1.01514L35 23.9999H8.08594L21.543 1.01514Z", fill: "black" }), h("path", { d: "M9.36142 16.9564L0 1H18.7228L9.36142 16.9564Z", fill: "#2AF135" })))), h("div", { class: "nav-toggle", onClick: event => this.toggleNav(event) }), h("nav", { class: "nav nav-primary", "data-visible": "false" }, h("ul", null, navPrimary)))));
36
+ return (h("header", { class: 'header space-below' + this.spaceBelow }, h("div", { class: "row row-top" }, h("div", { class: "social-icon-wrap" }, h("slot", { name: "social-icons" })), h("nav", { class: "nav nav-secondary" }, h("ul", null, navSecondary))), h("div", { class: "row row-bottom" }, h("div", { class: "logo-wrap" }, h("a", { href: this.logoUrl }, h("svg", { width: "149", height: "30", viewBox: "0 0 149 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": "Big Give" }, h("title", null, "Big Give"), h("path", { d: "M59.9362 6.08031C58.258 6.08031 56.8195 4.70363 56.8195 3.04015C56.8195 1.37667 58.258 0 59.9362 0C61.7342 0 63.1127 1.37667 63.1127 3.04015C63.1127 4.70363 61.7342 6.08031 59.9362 6.08031ZM57.4189 23.805H62.4534V7.74379H57.4189V23.805ZM76.5981 7.74379V8.71893C75.8189 7.97323 74.2606 7.34226 72.4626 7.34226C67.9674 7.34226 64.3114 10.5545 64.3114 15.2008C64.3114 19.9044 67.9674 23.0593 72.4626 23.0593C74.2606 23.0593 75.8189 22.543 76.5981 21.6826V22.6004C76.5981 24.6654 74.6801 25.6979 72.1629 25.6979C70.0052 25.6979 68.1472 25.239 66.4091 24.2639V29.0249C68.5068 29.7706 70.8443 30 72.4026 30C77.4371 30 81.6326 27.9924 81.6326 22.7151V7.68643H76.5981V7.74379ZM76.5981 17.2084C75.8788 18.1836 74.6801 18.6424 73.3616 18.6424C71.2639 18.6424 69.5257 17.4379 69.5257 15.2008C69.5257 13.021 71.2639 11.7591 73.3616 11.7591C74.6801 11.7591 75.8788 12.3327 76.5981 13.2505V17.2084ZM96.1368 24.2065C100.093 24.2065 102.55 23.5182 104.588 22.2562V9.98088H93.6196V14.6845H99.4332V18.8145C98.5942 19.044 97.6352 19.2161 96.2567 19.2161C91.342 19.2161 88.9446 16.0612 88.9446 12.3901C88.9446 8.71893 91.7016 5.56405 96.916 5.56405C99.0736 5.56405 101.171 6.13767 102.73 6.94073V1.72084C101.231 1.14723 99.3134 0.630979 96.6163 0.630979C89.0046 0.630979 83.6104 5.90822 83.6104 12.4474C83.5505 19.1013 88.4652 24.2065 96.1368 24.2065ZM109.442 6.08031C107.764 6.08031 106.326 4.70363 106.326 3.04015C106.326 1.37667 107.764 0 109.442 0C111.24 0 112.619 1.37667 112.619 3.04015C112.619 4.70363 111.18 6.08031 109.442 6.08031ZM106.925 23.805H111.96V7.74379H106.925V23.805ZM123.227 14.9713L118.972 7.74379H113.098L123.167 24.1491L133.237 7.74379H127.483L123.227 14.9713ZM137.372 16.9216H148.999C149.059 9.92352 144.804 7.39962 140.549 7.39962C136.053 7.39962 132.038 9.98088 131.978 15.7744C131.978 21.3958 136.113 24.1491 141.088 24.1491C143.246 24.1491 145.523 23.8623 147.501 22.8872V18.4704C144.984 19.847 143.366 19.9044 141.927 19.9044C139.769 19.847 137.552 19.2161 137.372 16.9216ZM140.608 11.1281C142.107 11.1281 143.425 11.8164 143.605 13.8241H137.372C137.732 11.8738 139.11 11.1281 140.608 11.1281ZM51.5453 11.3576C52.744 10.325 53.3433 9.00574 53.3433 7.34226C53.3433 4.24474 50.3466 1.03251 46.0313 1.03251H38V23.8623H48.4287C52.5042 23.8623 55.6209 20.8795 55.6209 17.0937C55.6209 14.7992 54.542 12.3327 51.5453 11.3576ZM43.2743 5.67878H45.6717C47.1101 5.67878 48.129 6.76865 48.129 7.97324C48.129 9.17782 47.1101 10.2103 45.6717 10.2103H43.2743V5.67878ZM47.9492 19.1587H43.2743V14.5698H47.9492C49.3876 14.5698 50.4665 15.6023 50.4665 16.8643C50.4665 18.1262 49.3876 19.1587 47.9492 19.1587Z", fill: "black" }), h("path", { d: "M21.543 1.01514L35 23.9999H8.08594L21.543 1.01514Z", fill: "black" }), h("path", { d: "M9.36142 16.9564L0 1H18.7228L9.36142 16.9564Z", fill: "#2AF135" })))), h("div", { class: "nav-toggle", onClick: event => this.toggleNav(event) }), h("nav", { class: "nav nav-primary", "data-visible": "false" }, h("ul", null, navPrimary)))));
37
37
  }
38
38
  static get is() { return "biggive-header"; }
39
39
  static get encapsulation() { return "shadow"; }
@@ -17,7 +17,16 @@ const Template = args => `
17
17
  <li><a href="#">Explore Campaigns</a></li>
18
18
  <li><a href="#">For Charities</a></li>
19
19
  <li><a href="#">For Funders</a></li>
20
- <li><a href="#">Match Funding</a></li>
20
+ <li>
21
+ <a href="#">Match Funding</a>
22
+ <ul>
23
+ <li><a href="#">Sub menu 1</a></li>
24
+ <li><a href="#">Sub menu 2</a></li>
25
+ <li><a href="#">Sub menu 3</a></li>
26
+ <li><a href="#">Sub menu 4</a></li>
27
+ <li><a href="#">Sub menu 5</a></li>
28
+ </ul>
29
+ </li>
21
30
  <li><a href="#">About Us</a></li>
22
31
  <li><a href="#">Resources</a></li>
23
32
  </ul>
@@ -536,7 +536,7 @@ a:hover {
536
536
  .container .sleeve {
537
537
  display: flex;
538
538
  justify-content: space-between;
539
- max-width: 1000px;
539
+ max-width: 1200px;
540
540
  margin-left: auto;
541
541
  margin-right: auto;
542
542
  }
@@ -544,7 +544,7 @@ a:hover {
544
544
  width: 40%;
545
545
  position: relative;
546
546
  z-index: 1;
547
- padding: 180px 60px 60px 60px;
547
+ padding: 180px 60px 60px 0;
548
548
  }
549
549
  .container .content-wrap .logo {
550
550
  height: 75px;
@@ -8,6 +8,8 @@ export class BiggiveHeroImage {
8
8
  this.slugColour = null;
9
9
  this.logo = '';
10
10
  this.mainImage = '';
11
+ this.mainImageAlignHorizontal = 'center';
12
+ this.mainImageAlignVertical = 'center';
11
13
  this.mainTitle = null;
12
14
  this.mainTitleColour = null;
13
15
  this.teaser = null;
@@ -19,7 +21,7 @@ export class BiggiveHeroImage {
19
21
  render() {
20
22
  return (h("div", { class: 'container colour-scheme-' + this.colourScheme + ' space-below-' + this.spaceBelow }, h("div", { class: "sleeve" }, h("div", { class: "content-wrap" }, this.logo.length > 0 ? (h("div", { class: "logo image-wrap", style: { 'background-image': 'url(' + this.logo + ')' } }, h("img", { src: this.logo }))) : null, h("div", { class: 'slug text-colour-' + this.slugColour }, this.slug), h("h1", { class: 'main-title text-colour-' + this.mainTitleColour }, this.mainTitle), h("div", { class: 'teaser text-colour-' + this.teaserColour }, this.teaser), this.buttonLabel != null && this.buttonUrl != null
21
23
  ? h("biggive-button", { "colour-scheme": this.buttonColourScheme, url: this.buttonUrl, label: this.buttonLabel })
22
- : null), h("div", { class: "graphic-wrap" }, this.mainImage.length > 0 ? (h("div", { class: "image-wrap", style: { 'background-image': 'url(' + this.mainImage + ')' } }, h("img", { src: this.mainImage }))) : null))));
24
+ : null), h("div", { class: "graphic-wrap" }, this.mainImage.length > 0 ? (h("div", { class: "image-wrap", style: { 'background-image': 'url(' + this.mainImage + ')', 'background-position': this.mainImageAlignHorizontal + ' ' + this.mainImageAlignVertical } }, h("img", { src: this.mainImage }))) : null))));
23
25
  }
24
26
  static get is() { return "biggive-hero-image"; }
25
27
  static get encapsulation() { return "shadow"; }
@@ -143,6 +145,42 @@ export class BiggiveHeroImage {
143
145
  "reflect": false,
144
146
  "defaultValue": "''"
145
147
  },
148
+ "mainImageAlignHorizontal": {
149
+ "type": "string",
150
+ "mutable": false,
151
+ "complexType": {
152
+ "original": "string",
153
+ "resolved": "string",
154
+ "references": {}
155
+ },
156
+ "required": false,
157
+ "optional": false,
158
+ "docs": {
159
+ "tags": [],
160
+ "text": "Horizontal alignment of image"
161
+ },
162
+ "attribute": "main-image-align-horizontal",
163
+ "reflect": false,
164
+ "defaultValue": "'center'"
165
+ },
166
+ "mainImageAlignVertical": {
167
+ "type": "string",
168
+ "mutable": false,
169
+ "complexType": {
170
+ "original": "string",
171
+ "resolved": "string",
172
+ "references": {}
173
+ },
174
+ "required": false,
175
+ "optional": false,
176
+ "docs": {
177
+ "tags": [],
178
+ "text": "Vertical alignment of image"
179
+ },
180
+ "attribute": "main-image-align-vertical",
181
+ "reflect": false,
182
+ "defaultValue": "'center'"
183
+ },
146
184
  "mainTitle": {
147
185
  "type": "string",
148
186
  "mutable": false,
@@ -1,13 +1,25 @@
1
1
  export default {
2
2
  title: 'Components/Content',
3
+ argTypes: {
4
+ spaceBelow: {
5
+ name: 'Space below',
6
+ control: {
7
+ type: 'select',
8
+ options: [0, 1, 2, 3, 4, 5, 6],
9
+ },
10
+ },
11
+ },
3
12
  };
4
13
  const Template = args => `
5
14
  <biggive-hero-image
15
+ space-below="${args.spaceBelow}"
6
16
  colour-scheme="${args.colourScheme}"
7
17
  slug="${args.slug}"
8
18
  slugColour="${args.slugColour}"
9
19
  logo="${args.logo}"
10
20
  main-image="${args.mainImage}"
21
+ main-image-align-horizontal="${args.mainImageAlignHorizontal}"
22
+ main-image-align-vertical="${args.mainImageAlignVertical}"
11
23
  main-title="${args.mainTitle}"
12
24
  main-titleColour="${args.mainTitleColour}"
13
25
  teaser="${args.teaser}"
@@ -19,11 +31,14 @@ const Template = args => `
19
31
  `;
20
32
  export const HeroImageComponent = Template.bind({});
21
33
  HeroImageComponent.args = {
34
+ spaceBelow: 0,
22
35
  colourScheme: 'primary',
23
36
  slug: 'Test slug',
24
37
  slugColour: null,
25
38
  logo: 'https://media.istockphoto.com/vectors/childish-seamless-dotted-pattern-with-colorful-doodle-letters-fun-vector-id1208462693',
26
39
  mainImage: 'https://media.istockphoto.com/vectors/childish-seamless-dotted-pattern-with-colorful-doodle-letters-fun-vector-id1208462693',
40
+ mainImageAlignHorizontal: 'center',
41
+ mainImageAlignVertical: 'center',
27
42
  mainTitle: 'Test title',
28
43
  mainTitleColour: null,
29
44
  teaser: 'We run match funding campaigns to make an extraordinary difference to the world’s big challenges.',