@biggive/components 1.0.97 → 1.0.98
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-2330ffc8.entry.js +1 -0
- package/dist/biggive/p-42c41213.entry.js +1 -0
- package/dist/biggive/p-9978ef51.entry.js +1 -0
- package/dist/cjs/biggive-back-to-top_23.cjs.entry.js +73 -31
- package/dist/cjs/biggive-nav-group.cjs.entry.js +20 -0
- package/dist/cjs/biggive-nav-item.cjs.entry.js +22 -0
- package/dist/cjs/biggive.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.css +4 -4
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.js +267 -30
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.stories.js +10 -5
- package/dist/collection/components/biggive-campaign-highlights/biggive-campaign-highlights.css +2 -0
- package/dist/collection/components/biggive-form-field-select/biggive-form-field-select.js +41 -10
- package/dist/collection/components/biggive-header/biggive-header.stories.js +10 -1
- package/dist/collection/components/biggive-hero-image/biggive-hero-image.css +2 -2
- package/dist/collection/components/biggive-hero-image/biggive-hero-image.js +39 -1
- package/dist/collection/components/biggive-hero-image/biggive-hero-image.stories.js +15 -0
- package/dist/collection/components/biggive-nav-group/biggive-nav-group.css +517 -0
- package/dist/collection/components/biggive-nav-group/biggive-nav-group.js +43 -0
- package/dist/collection/components/biggive-nav-item/biggive-nav-item.css +522 -0
- package/dist/collection/components/biggive-nav-item/biggive-nav-item.js +81 -0
- package/dist/collection/components/biggive-social-icon/biggive-social-icon.js +1 -1
- package/dist/components/biggive-campaign-card-filter-grid.js +77 -29
- package/dist/components/biggive-campaign-highlights.js +1 -1
- package/dist/components/biggive-form-field-select2.js +5 -4
- package/dist/components/biggive-hero-image.js +6 -2
- package/dist/components/biggive-nav-group.d.ts +11 -0
- package/dist/components/biggive-nav-group.js +36 -0
- package/dist/components/biggive-nav-item.d.ts +11 -0
- package/dist/components/biggive-nav-item.js +40 -0
- package/dist/components/biggive-social-icon.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/esm/biggive-back-to-top_23.entry.js +74 -32
- package/dist/esm/biggive-nav-group.entry.js +16 -0
- package/dist/esm/biggive-nav-item.entry.js +18 -0
- package/dist/esm/biggive.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.d.ts +30 -0
- package/dist/types/components/biggive-form-field-select/biggive-form-field-select.d.ts +1 -1
- package/dist/types/components/biggive-hero-image/biggive-hero-image.d.ts +8 -0
- package/dist/types/components/biggive-hero-image/biggive-hero-image.stories.d.ts +9 -0
- package/dist/types/components/biggive-nav-group/biggive-nav-group.d.ts +7 -0
- package/dist/types/components/biggive-nav-item/biggive-nav-item.d.ts +15 -0
- package/dist/types/components.d.ts +131 -1
- package/hydrate/index.js +141 -36
- package/package.json +1 -1
- 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
|
-
|
|
46
|
+
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
16
47
|
}
|
|
17
48
|
handleEnterPressed(ev) {
|
|
18
49
|
if (ev.key === 'Enter') {
|
|
19
|
-
|
|
50
|
+
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
20
51
|
}
|
|
21
52
|
}
|
|
22
53
|
handleFilterButtonClick() {
|
|
23
54
|
this.el.shadowRoot.getElementById('filter-popup').open();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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: "
|
|
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
|
|
145
|
-
return {
|
|
146
|
-
|
|
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="["Finance"]"
|
|
11
|
-
data-filter-beneficiaries="["Children","Adults"]"
|
|
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: '["Children","Adults"]',
|
|
51
|
+
beneficiaryOptions: '["Children","Adults"]',
|
|
52
|
+
locationOptions: '["Children","Adults"]',
|
|
53
|
+
fundingOptions: '["ABC","Adults"]',
|
|
54
|
+
};
|
|
@@ -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": "
|
|
77
|
-
"name": "
|
|
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": "
|
|
87
|
-
"resolved": "
|
|
117
|
+
"original": "object",
|
|
118
|
+
"resolved": "object",
|
|
88
119
|
"references": {}
|
|
89
120
|
}
|
|
90
121
|
}];
|
|
@@ -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
|
|
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:
|
|
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
|
|
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.',
|