@appbaseio/reactivesearch-vue 2.0.0-alpha.4 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/@appbaseio/reactivesearch-vue.umd.js +21316 -29369
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -19
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-ad042719.js +59 -0
- package/dist/cjs/Card-f5ab024a.js +27 -0
- package/dist/cjs/{ComponentWrapper-ad3dad02.js → ComponentWrapper-611cf7f9.js} +44 -58
- package/dist/cjs/Container-29f049b2.js +12 -0
- package/dist/cjs/DropDown-dc184468.js +700 -0
- package/dist/cjs/DynamicRangeSlider.js +106 -157
- package/dist/cjs/Flex-d5675ea6.js +48 -0
- package/dist/cjs/FormControlList-fadd792f.js +42 -0
- package/dist/cjs/Input-088dfcb4.js +74 -0
- package/dist/cjs/ListItem-d57d648d.js +42 -0
- package/dist/cjs/MultiDropdownList.js +124 -240
- package/dist/cjs/MultiList.js +124 -262
- package/dist/cjs/MultiRange.js +87 -133
- package/dist/cjs/{Pagination-71e85fa9.js → Pagination-b5ddc906.js} +70 -83
- package/dist/cjs/PreferencesConsumer-22d1b49f.js +73 -0
- package/dist/cjs/RangeInput.js +163 -171
- package/dist/cjs/RangeSlider.js +81 -109
- package/dist/cjs/ReactiveBase.js +139 -156
- package/dist/cjs/ReactiveComponent-a6108189.js +2184 -0
- package/dist/cjs/ReactiveComponent.js +46 -340
- package/dist/cjs/ReactiveGoogleMap.js +451 -660
- package/dist/cjs/ReactiveList.js +180 -305
- package/dist/cjs/ResultCard.js +36 -36
- package/dist/cjs/ResultList.js +48 -56
- package/dist/cjs/SelectedFilters.js +62 -69
- package/dist/cjs/SingleDropdownList.js +117 -177
- package/dist/cjs/SingleList.js +122 -206
- package/dist/cjs/SingleRange.js +78 -105
- package/dist/cjs/StateProvider.js +35 -38
- package/dist/cjs/Title-8802a218.js +12 -0
- package/dist/cjs/ToggleButton.js +72 -119
- package/dist/cjs/{_rollupPluginBabelHelpers-c705cbe6.js → _rollupPluginBabelHelpers-f8b843f8.js} +0 -15
- package/dist/cjs/{index-6a167fe0.js → index-d8d8f291.js} +38 -108
- package/dist/cjs/index.js +44 -41
- package/dist/cjs/initReactivesearch.js +63 -150
- package/dist/cjs/install.js +47 -43
- package/dist/cjs/ssr-6c8a72e1.js +66 -0
- package/dist/cjs/{utils-d6a52588.js → utils-83fd01e9.js} +7 -16
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-727b7c63.js → vueTypes-1bf00978.js} +8 -19
- package/dist/es/Button-474510e3.js +53 -0
- package/dist/es/{Card-450683f1.js → Card-38cbe652.js} +3 -3
- package/dist/es/{ComponentWrapper-424e86fd.js → ComponentWrapper-3dfe6931.js} +44 -58
- package/dist/es/{Container-ba826e96.js → Container-d00219f7.js} +2 -2
- package/dist/es/DropDown-029ffd42.js +690 -0
- package/dist/es/DynamicRangeSlider.js +106 -157
- package/dist/es/Flex-a08e22d7.js +46 -0
- package/dist/es/FormControlList-fe6eaee4.js +38 -0
- package/dist/es/Input-ad474a55.js +69 -0
- package/dist/es/{ListItem-cad14c5e.js → ListItem-16756c02.js} +7 -8
- package/dist/es/MultiDropdownList.js +124 -240
- package/dist/es/MultiList.js +124 -262
- package/dist/es/MultiRange.js +87 -133
- package/dist/es/{Pagination-784bf143.js → Pagination-72bd1d9e.js} +70 -83
- package/dist/es/PreferencesConsumer-24e88f3b.js +71 -0
- package/dist/es/RangeInput.js +163 -170
- package/dist/es/RangeSlider.js +81 -109
- package/dist/es/ReactiveBase.js +138 -154
- package/dist/es/ReactiveComponent-0a97eb1e.js +2178 -0
- package/dist/es/ReactiveComponent.js +42 -337
- package/dist/es/ReactiveGoogleMap.js +446 -654
- package/dist/es/ReactiveList.js +178 -302
- package/dist/es/ResultCard.js +36 -36
- package/dist/es/ResultList.js +48 -56
- package/dist/es/SelectedFilters.js +62 -69
- package/dist/es/SingleDropdownList.js +117 -177
- package/dist/es/SingleList.js +122 -206
- package/dist/es/SingleRange.js +78 -105
- package/dist/es/StateProvider.js +36 -39
- package/dist/es/{Title-3342664a.js → Title-863dfa42.js} +2 -2
- package/dist/es/ToggleButton.js +72 -119
- package/dist/es/{_rollupPluginBabelHelpers-76660dab.js → _rollupPluginBabelHelpers-ded08042.js} +0 -15
- package/dist/es/{index-7788a843.js → index-4520a598.js} +39 -107
- package/dist/es/index.js +30 -32
- package/dist/es/initReactivesearch.js +63 -150
- package/dist/es/install.js +49 -41
- package/dist/es/{ssr-b2c0b401.js → ssr-584c278d.js} +37 -8
- package/dist/es/{utils-9e68acee.js → utils-9e5a16a1.js} +7 -16
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-b8146772.js → vueTypes-f1923c72.js} +8 -19
- package/package.json +10 -9
- package/dist/cjs/Button-446f819e.js +0 -68
- package/dist/cjs/CancelSvg-9f258f4f.js +0 -449
- package/dist/cjs/Card-642547a8.js +0 -30
- package/dist/cjs/Container-daf30918.js +0 -15
- package/dist/cjs/DataSearch-aa04dc6e.js +0 -2352
- package/dist/cjs/DataSearch.js +0 -30
- package/dist/cjs/DropDown-c479bbb0.js +0 -328
- package/dist/cjs/Flex-aa517a13.js +0 -52
- package/dist/cjs/FormControlList-c195a592.js +0 -47
- package/dist/cjs/Input-e6603a7e.js +0 -79
- package/dist/cjs/ListItem-8c9e0d68.js +0 -46
- package/dist/cjs/Title-1de7d0f4.js +0 -15
- package/dist/cjs/install-b97dbac4.js +0 -1409
- package/dist/cjs/ssr-3027b848.js +0 -39
- package/dist/es/Button-d8bc15ea.js +0 -59
- package/dist/es/CancelSvg-4cfae5fd.js +0 -440
- package/dist/es/DataSearch-b86a6675.js +0 -2337
- package/dist/es/DataSearch.js +0 -22
- package/dist/es/DropDown-05a644a5.js +0 -322
- package/dist/es/Flex-1f0795c3.js +0 -47
- package/dist/es/FormControlList-c22d64f6.js +0 -40
- package/dist/es/Input-7a2a9fac.js +0 -71
- package/dist/es/install-ac8a1edb.js +0 -1402
|
@@ -1,449 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-c705cbe6.js');
|
|
6
|
-
var styled = require('@appbaseio/vue-emotion');
|
|
7
|
-
var styled__default = _interopDefault(styled);
|
|
8
|
-
var computeScrollIntoView = _interopDefault(require('compute-scroll-into-view'));
|
|
9
|
-
|
|
10
|
-
var _templateObject;
|
|
11
|
-
var InputWrapper = styled__default('span')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n flex: 1;\n position: relative;\n"])));
|
|
12
|
-
|
|
13
|
-
var _templateObject$1, _templateObject2, _templateObject3, _templateObject4;
|
|
14
|
-
var IconGroup = styled__default('div')(_templateObject$1 || (_templateObject$1 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgrid-gap: 6px;\n\tmargin: 0 10px;\n\theight: 100%;\n\n\t", ";\n\n\t", ";\n"])), function (_ref) {
|
|
15
|
-
var positionType = _ref.positionType;
|
|
16
|
-
|
|
17
|
-
if (positionType === 'absolute') {
|
|
18
|
-
return styled.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t"])));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return null;
|
|
22
|
-
}, function (_ref2) {
|
|
23
|
-
var groupPosition = _ref2.groupPosition;
|
|
24
|
-
return groupPosition === 'right' ? styled.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\t\t\tright: 0;\n\t\t\t "]))) : styled.css(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\t\t\tleft: 0;\n\t\t\t "])));
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
var _templateObject$2;
|
|
28
|
-
var IconWrapper = styled__default('div')(_templateObject$2 || (_templateObject$2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmax-width: 23px;\n\twidth: max-content;\n\tcursor: pointer;\n\theight: 100%;min-width:20px;\n\n\tsvg.search-icon {\n\t\tfill: ", ";\n\t\ttransform:scale(1.5);\n\t}\n\n\tsvg.cancel-icon {\n\t\tfill: ", ";\n\t}\n"])), function (_ref) {
|
|
29
|
-
var theme = _ref.theme;
|
|
30
|
-
return theme.colors.primaryColor;
|
|
31
|
-
}, function (_ref2) {
|
|
32
|
-
var theme = _ref2.theme;
|
|
33
|
-
return theme.colors.borderColor || '#000';
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Scroll node into view if necessary
|
|
38
|
-
* @param {HTMLElement} node the element that should scroll into view
|
|
39
|
-
* @param {HTMLElement} rootNode the root element of the component
|
|
40
|
-
*/
|
|
41
|
-
// eslint-disable-next-line
|
|
42
|
-
|
|
43
|
-
var scrollIntoView = function scrollIntoView(node, rootNode) {
|
|
44
|
-
if (node === null) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
var actions = computeScrollIntoView(node, {
|
|
49
|
-
boundary: rootNode,
|
|
50
|
-
block: 'nearest',
|
|
51
|
-
scrollMode: 'if-needed'
|
|
52
|
-
});
|
|
53
|
-
actions.forEach(function (_ref) {
|
|
54
|
-
var el = _ref.el,
|
|
55
|
-
top = _ref.top,
|
|
56
|
-
left = _ref.left;
|
|
57
|
-
el.scrollTop = top;
|
|
58
|
-
el.scrollLeft = left;
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
var Downshift = {
|
|
63
|
-
// eslint-disable-next-line
|
|
64
|
-
props: ['isOpen', 'inputValue', 'selectedItem', 'highlightedIndex', 'handleChange', 'itemToString', 'handleMouseup'],
|
|
65
|
-
data: function data() {
|
|
66
|
-
return {
|
|
67
|
-
isMouseDown: false,
|
|
68
|
-
internal_isOpen: false,
|
|
69
|
-
internal_inputValue: '',
|
|
70
|
-
internal_selectedItem: null,
|
|
71
|
-
internal_highlightedIndex: null
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
computed: {
|
|
75
|
-
mergedState: function mergedState() {
|
|
76
|
-
var _this = this;
|
|
77
|
-
|
|
78
|
-
return Object.keys(this.$props).reduce(function (state, key) {
|
|
79
|
-
var _extends2;
|
|
80
|
-
|
|
81
|
-
return _rollupPluginBabelHelpers._extends({}, state, (_extends2 = {}, _extends2[key] = _this.isControlledProp(key) ? _this.$props[key] : _this["internal_" + key], _extends2));
|
|
82
|
-
}, {});
|
|
83
|
-
},
|
|
84
|
-
internalItemCount: function internalItemCount() {
|
|
85
|
-
return this.items.length;
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
mounted: function mounted() {
|
|
89
|
-
window.addEventListener('mousedown', this.handleWindowMousedown);
|
|
90
|
-
window.addEventListener('mouseup', this.handleWindowMouseup);
|
|
91
|
-
},
|
|
92
|
-
beforeDestroy: function beforeDestroy() {
|
|
93
|
-
window.removeEventListener('mousedown', this.handleWindowMousedown);
|
|
94
|
-
window.removeEventListener('mouseup', this.handleWindowMouseup);
|
|
95
|
-
},
|
|
96
|
-
methods: {
|
|
97
|
-
handleWindowMousedown: function handleWindowMousedown() {
|
|
98
|
-
this.isMouseDown = true;
|
|
99
|
-
},
|
|
100
|
-
handleWindowMouseup: function handleWindowMouseup(event) {
|
|
101
|
-
this.isMouseDown = false;
|
|
102
|
-
|
|
103
|
-
if ((event.target === this.$refs.rootNode || !this.$refs.rootNode.contains(event.target)) && this.mergedState.isOpen) {
|
|
104
|
-
// TODO: handle on outer click here
|
|
105
|
-
if (!this.isMouseDown) {
|
|
106
|
-
this.reset();
|
|
107
|
-
|
|
108
|
-
if (this.$props.handleMouseup) {
|
|
109
|
-
this.$props.handleMouseup({
|
|
110
|
-
isOpen: false
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
keyDownArrowDown: function keyDownArrowDown(event) {
|
|
117
|
-
event.preventDefault();
|
|
118
|
-
var amount = event.shiftKey ? 5 : 1;
|
|
119
|
-
|
|
120
|
-
if (this.mergedState.isOpen) {
|
|
121
|
-
this.changeHighlightedIndex(amount);
|
|
122
|
-
} else {
|
|
123
|
-
this.setState({
|
|
124
|
-
isOpen: true
|
|
125
|
-
});
|
|
126
|
-
this.setHighlightedIndex();
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
keyDownArrowUp: function keyDownArrowUp(event) {
|
|
130
|
-
event.preventDefault();
|
|
131
|
-
var amount = event.shiftKey ? -5 : -1;
|
|
132
|
-
|
|
133
|
-
if (this.mergedState.isOpen) {
|
|
134
|
-
this.changeHighlightedIndex(amount);
|
|
135
|
-
} else {
|
|
136
|
-
this.setState({
|
|
137
|
-
isOpen: true
|
|
138
|
-
});
|
|
139
|
-
this.setHighlightedIndex();
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
keyDownEnter: function keyDownEnter(event) {
|
|
143
|
-
if (this.mergedState.isOpen) {
|
|
144
|
-
event.preventDefault();
|
|
145
|
-
this.selectHighlightedItem();
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
keyDownEscape: function keyDownEscape(event) {
|
|
149
|
-
event.preventDefault();
|
|
150
|
-
this.reset();
|
|
151
|
-
},
|
|
152
|
-
selectHighlightedItem: function selectHighlightedItem() {
|
|
153
|
-
return this.selectItemAtIndex(this.mergedState.highlightedIndex);
|
|
154
|
-
},
|
|
155
|
-
selectItemAtIndex: function selectItemAtIndex(itemIndex) {
|
|
156
|
-
var item = this.items[itemIndex];
|
|
157
|
-
|
|
158
|
-
if (item == null) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
this.selectItem(item);
|
|
163
|
-
},
|
|
164
|
-
selectItem: function selectItem(item) {
|
|
165
|
-
if (this.$props.handleChange) {
|
|
166
|
-
this.$props.handleChange(item);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function getInputValue() {
|
|
170
|
-
if (this.isControlledProp('selectedItem')) {
|
|
171
|
-
return '';
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
return typeof item === 'object' ? item.label || '' : item;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
this.setState({
|
|
178
|
-
isOpen: false,
|
|
179
|
-
highlightedIndex: null,
|
|
180
|
-
selectedItem: item,
|
|
181
|
-
inputValue: getInputValue.call(this)
|
|
182
|
-
});
|
|
183
|
-
},
|
|
184
|
-
changeHighlightedIndex: function changeHighlightedIndex(moveAmount) {
|
|
185
|
-
if (this.internalItemCount < 0) {
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
var highlightedIndex = this.mergedState.highlightedIndex;
|
|
190
|
-
var baseIndex = highlightedIndex;
|
|
191
|
-
|
|
192
|
-
if (baseIndex === null) {
|
|
193
|
-
baseIndex = moveAmount > 0 ? -1 : this.internalItemCount + 1;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
var newIndex = baseIndex + moveAmount;
|
|
197
|
-
|
|
198
|
-
if (newIndex < 0) {
|
|
199
|
-
newIndex = this.internalItemCount;
|
|
200
|
-
} else if (newIndex > this.internalItemCount) {
|
|
201
|
-
newIndex = 0;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
this.setHighlightedIndex(newIndex);
|
|
205
|
-
},
|
|
206
|
-
setHighlightedIndex: function setHighlightedIndex(highlightedIndex) {
|
|
207
|
-
if (highlightedIndex === void 0) {
|
|
208
|
-
highlightedIndex = null;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
this.setState({
|
|
212
|
-
highlightedIndex: highlightedIndex
|
|
213
|
-
});
|
|
214
|
-
var element = document.getElementById("Downshift" + highlightedIndex);
|
|
215
|
-
scrollIntoView(element, this.rootNode); // Implement scrollIntroView thingy
|
|
216
|
-
},
|
|
217
|
-
reset: function reset() {
|
|
218
|
-
var selectedItem = this.mergedState.selectedItem;
|
|
219
|
-
this.setState({
|
|
220
|
-
isOpen: false,
|
|
221
|
-
highlightedIndex: null,
|
|
222
|
-
inputValue: selectedItem
|
|
223
|
-
});
|
|
224
|
-
},
|
|
225
|
-
getItemProps: function getItemProps(_ref) {
|
|
226
|
-
var index = _ref.index,
|
|
227
|
-
item = _ref.item;
|
|
228
|
-
var newIndex = index;
|
|
229
|
-
|
|
230
|
-
if (index === undefined) {
|
|
231
|
-
if (this.$props.itemToString) {
|
|
232
|
-
this.items.push(this.$props.itemToString(item));
|
|
233
|
-
} else {
|
|
234
|
-
this.items.push(item);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
newIndex = this.items.indexOf(item);
|
|
238
|
-
} else {
|
|
239
|
-
this.items[newIndex] = item;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
return {
|
|
243
|
-
id: "Downshift" + newIndex
|
|
244
|
-
};
|
|
245
|
-
},
|
|
246
|
-
getItemEvents: function getItemEvents(_ref2) {
|
|
247
|
-
var index = _ref2.index,
|
|
248
|
-
item = _ref2.item;
|
|
249
|
-
var newIndex = index;
|
|
250
|
-
|
|
251
|
-
if (index === undefined) {
|
|
252
|
-
newIndex = this.items.indexOf(item);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
var vm = this;
|
|
256
|
-
return {
|
|
257
|
-
mouseenter: function mouseenter() {
|
|
258
|
-
vm.setHighlightedIndex(newIndex);
|
|
259
|
-
},
|
|
260
|
-
click: function click(event) {
|
|
261
|
-
event.stopPropagation();
|
|
262
|
-
vm.selectItemAtIndex(newIndex);
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
},
|
|
266
|
-
getInputProps: function getInputProps(_ref3) {
|
|
267
|
-
var value = _ref3.value;
|
|
268
|
-
var inputValue = this.mergedState.inputValue;
|
|
269
|
-
|
|
270
|
-
if (value !== inputValue) {
|
|
271
|
-
this.setState({
|
|
272
|
-
inputValue: value
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
return {
|
|
277
|
-
value: inputValue
|
|
278
|
-
};
|
|
279
|
-
},
|
|
280
|
-
getButtonProps: function getButtonProps(_ref4) {
|
|
281
|
-
var _this2 = this;
|
|
282
|
-
|
|
283
|
-
var onClick = _ref4.onClick,
|
|
284
|
-
onKeyDown = _ref4.onKeyDown,
|
|
285
|
-
onKeyUp = _ref4.onKeyUp,
|
|
286
|
-
onBlur = _ref4.onBlur;
|
|
287
|
-
return {
|
|
288
|
-
click: function click(event) {
|
|
289
|
-
_this2.setState({
|
|
290
|
-
isOpen: true,
|
|
291
|
-
inputValue: event.target.value
|
|
292
|
-
});
|
|
293
|
-
|
|
294
|
-
if (onClick) {
|
|
295
|
-
onClick(event);
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
keydown: function keydown(event) {
|
|
299
|
-
if (event.key && _this2["keyDown" + event.key]) {
|
|
300
|
-
_this2["keyDown" + event.key].call(_this2, event);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
if (onKeyDown) {
|
|
304
|
-
onKeyDown(event);
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
keyup: function keyup(event) {
|
|
308
|
-
if (onKeyUp) {
|
|
309
|
-
onKeyUp(event);
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
blur: function blur(event) {
|
|
313
|
-
if (onBlur) {
|
|
314
|
-
onBlur(event);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
};
|
|
318
|
-
},
|
|
319
|
-
getInputEvents: function getInputEvents(_ref5) {
|
|
320
|
-
var _this3 = this;
|
|
321
|
-
|
|
322
|
-
var onInput = _ref5.onInput,
|
|
323
|
-
onBlur = _ref5.onBlur,
|
|
324
|
-
onFocus = _ref5.onFocus,
|
|
325
|
-
onKeyPress = _ref5.onKeyPress,
|
|
326
|
-
onKeyDown = _ref5.onKeyDown,
|
|
327
|
-
onKeyUp = _ref5.onKeyUp,
|
|
328
|
-
onClick = _ref5.onClick;
|
|
329
|
-
return {
|
|
330
|
-
input: function input(event) {
|
|
331
|
-
_this3.setState({
|
|
332
|
-
isOpen: true,
|
|
333
|
-
inputValue: event.target.value
|
|
334
|
-
});
|
|
335
|
-
|
|
336
|
-
if (onInput) {
|
|
337
|
-
onInput(event);
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
focus: function focus(event) {
|
|
341
|
-
if (onFocus) {
|
|
342
|
-
onFocus(event);
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
keydown: function keydown(event) {
|
|
346
|
-
if (event.key && _this3["keyDown" + event.key]) {
|
|
347
|
-
_this3["keyDown" + event.key].call(_this3, event);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
if (onKeyDown) {
|
|
351
|
-
onKeyDown(event);
|
|
352
|
-
}
|
|
353
|
-
},
|
|
354
|
-
keypress: function keypress(event) {
|
|
355
|
-
if (onKeyPress) {
|
|
356
|
-
onKeyPress(event);
|
|
357
|
-
}
|
|
358
|
-
},
|
|
359
|
-
keyup: function keyup(event) {
|
|
360
|
-
if (onKeyUp) {
|
|
361
|
-
onKeyUp(event);
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
|
-
blur: function blur(event) {
|
|
365
|
-
if (onBlur) {
|
|
366
|
-
onBlur(event);
|
|
367
|
-
} // TODO: implement isMouseDown
|
|
368
|
-
// this.reset()
|
|
369
|
-
|
|
370
|
-
},
|
|
371
|
-
click: onClick
|
|
372
|
-
};
|
|
373
|
-
},
|
|
374
|
-
getHelpersAndState: function getHelpersAndState() {
|
|
375
|
-
var getItemProps = this.getItemProps,
|
|
376
|
-
getItemEvents = this.getItemEvents,
|
|
377
|
-
getInputProps = this.getInputProps,
|
|
378
|
-
getInputEvents = this.getInputEvents,
|
|
379
|
-
getButtonProps = this.getButtonProps,
|
|
380
|
-
setHighlightedIndex = this.setHighlightedIndex;
|
|
381
|
-
return _rollupPluginBabelHelpers._extends({
|
|
382
|
-
getItemProps: getItemProps,
|
|
383
|
-
getItemEvents: getItemEvents,
|
|
384
|
-
getInputProps: getInputProps,
|
|
385
|
-
getInputEvents: getInputEvents,
|
|
386
|
-
getButtonProps: getButtonProps,
|
|
387
|
-
setHighlightedIndex: setHighlightedIndex
|
|
388
|
-
}, this.mergedState);
|
|
389
|
-
},
|
|
390
|
-
isControlledProp: function isControlledProp(prop) {
|
|
391
|
-
return this.$props[prop] !== undefined;
|
|
392
|
-
},
|
|
393
|
-
setState: function setState(stateToSet) {
|
|
394
|
-
var _this4 = this;
|
|
395
|
-
|
|
396
|
-
// eslint-disable-next-line
|
|
397
|
-
Object.keys(stateToSet).forEach(function (key) {
|
|
398
|
-
// eslint-disable-next-line
|
|
399
|
-
if (_this4.isControlledProp(key)) {
|
|
400
|
-
_this4.$emit(key + "Change", stateToSet[key]);
|
|
401
|
-
|
|
402
|
-
_this4.$emit(key + "-change", stateToSet[key]);
|
|
403
|
-
} else {
|
|
404
|
-
_this4["internal_" + key] = stateToSet[key];
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
this.$emit('stateChange', this.mergedState);
|
|
408
|
-
this.$emit('state-change', this.mergedState);
|
|
409
|
-
}
|
|
410
|
-
},
|
|
411
|
-
render: function render() {
|
|
412
|
-
var h = arguments[0];
|
|
413
|
-
this.items = [];
|
|
414
|
-
return h("div", {
|
|
415
|
-
"ref": "rootNode"
|
|
416
|
-
}, [this.$scopedSlots["default"] && this.$scopedSlots["default"](_rollupPluginBabelHelpers._extends({}, this.getHelpersAndState()))]);
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
var CancelSvg = {
|
|
421
|
-
functional: true,
|
|
422
|
-
render: function render(h) {
|
|
423
|
-
return h("svg", {
|
|
424
|
-
"attrs": {
|
|
425
|
-
"alt": "Clear",
|
|
426
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
427
|
-
"height": "20px",
|
|
428
|
-
"viewBox": "0 0 24 24",
|
|
429
|
-
"width": "20px"
|
|
430
|
-
},
|
|
431
|
-
"class": "cancel-icon"
|
|
432
|
-
}, [h("title", ["Clear"]), h("path", {
|
|
433
|
-
"attrs": {
|
|
434
|
-
"d": "M0 0h24v24H0V0z",
|
|
435
|
-
"fill": "none"
|
|
436
|
-
}
|
|
437
|
-
}), h("path", {
|
|
438
|
-
"attrs": {
|
|
439
|
-
"d": "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
440
|
-
}
|
|
441
|
-
})]);
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
exports.CancelSvg = CancelSvg;
|
|
446
|
-
exports.Downshift = Downshift;
|
|
447
|
-
exports.IconGroup = IconGroup;
|
|
448
|
-
exports.IconWrapper = IconWrapper;
|
|
449
|
-
exports.InputWrapper = InputWrapper;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-c705cbe6.js');
|
|
6
|
-
var emotion = require('emotion');
|
|
7
|
-
var styled = require('@appbaseio/vue-emotion');
|
|
8
|
-
var styled__default = _interopDefault(styled);
|
|
9
|
-
var polished = require('polished');
|
|
10
|
-
require('./Title-1de7d0f4.js');
|
|
11
|
-
|
|
12
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
13
|
-
var container = emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: row;\n\tjustify-content: center;\n\tflex-wrap: wrap;\n\tmargin: 0 -8px;\n\n\t@media (max-width: 420px) {\n\t\tmargin: 0;\n\t}\n"])));
|
|
14
|
-
var Image = styled__default('div')(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: calc(100% + 20px);\n\theight: 220px;\n\tmargin: -10px -10px 0;\n\tbackground-color: ", ";\n\tbackground-size: contain;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n"])), function (_ref) {
|
|
15
|
-
var colors = _ref.theme.colors;
|
|
16
|
-
return colors.backgroundColor || '#fcfcfc';
|
|
17
|
-
});
|
|
18
|
-
var Card = styled__default('a')(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: auto;\n\tflex-grow: 1;\n\toutline: none;\n\ttext-decoration: none;\n\tmin-width: 240px;\n\tmax-width: 250px;\n\tborder-radius: 0.25rem;\n\tbackground-color: ", ";\n\theight: 300px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tmargin: 8px;\n\tpadding: 10px;\n\toverflow: hidden;\n\tbox-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2);\n\tcolor: ", ";\n\t", ";\n\ttransition: all 0.3s ease;\n\n\th2 {\n\t\twidth: 100%;\n\t\tfont-size: 0.9rem;\n\t\tline-height: 1.2rem;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\tmargin: 0;\n\t\tpadding: 10px 0 8px;\n\t}\n\n\tp {\n\t\tmargin: 0;\n\t}\n\n\tarticle {\n\t\tflex-grow: 1;\n\t\tfont-size: 0.9rem;\n\t}\n\n\t&:hover,\n\t&:focus {\n\t\tbox-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.3);\n\t}\n\n\t@media (max-width: 420px) {\n\t\twidth: 50%;\n\t\tmin-width: 0;\n\t\theight: 210px;\n\t\tmargin: 0;\n\t\tborder-radius: 0;\n\t\tbox-shadow: none;\n\t\tborder: 1px solid #eee;\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbox-shadow: 0;\n\t\t}\n\t}\n"])), function (_ref2) {
|
|
19
|
-
var theme = _ref2.theme;
|
|
20
|
-
return theme.colors.backgroundColor ? polished.lighten(0.1, theme.colors.backgroundColor) : '#fff';
|
|
21
|
-
}, function (_ref3) {
|
|
22
|
-
var theme = _ref3.theme;
|
|
23
|
-
return theme.colors.textColor;
|
|
24
|
-
}, function (props) {
|
|
25
|
-
return props.href ? 'cursor: pointer' : null;
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
exports.Card = Card;
|
|
29
|
-
exports.Image = Image;
|
|
30
|
-
exports.container = container;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-c705cbe6.js');
|
|
6
|
-
var styled = require('@appbaseio/vue-emotion');
|
|
7
|
-
var styled__default = _interopDefault(styled);
|
|
8
|
-
|
|
9
|
-
var _templateObject;
|
|
10
|
-
var Container = styled__default('div')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t", ";\n"])), function (_ref) {
|
|
11
|
-
var theme = _ref.theme;
|
|
12
|
-
return theme.component;
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
exports.Container = Container;
|