@appbaseio/reactivesearch-vue 1.34.0-alpha.2 → 1.34.0
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/@appbaseio/reactivesearch-vue.umd.js +10874 -8633
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +12 -11
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-841fd06d.js +62 -0
- package/dist/cjs/{CancelSvg-062a42f0.js → CancelSvg-220a7cc3.js} +40 -32
- package/dist/cjs/Card-240f283d.js +30 -0
- package/dist/cjs/{ComponentWrapper-db45cc6d.js → ComponentWrapper-94c50228.js} +7 -7
- package/dist/cjs/Container-e699ea95.js +15 -0
- package/dist/cjs/DataSearch.js +1312 -20
- package/dist/cjs/{DropDown-3b899b20.js → DropDown-7a52c661.js} +79 -78
- package/dist/cjs/DynamicRangeSlider.js +46 -56
- package/dist/cjs/Flex-ddd7cb6b.js +50 -0
- package/dist/cjs/FormControlList-bbb5cd24.js +45 -0
- package/dist/cjs/Input-ead4cd84.js +77 -0
- package/dist/cjs/ListItem-5088bd6a.js +45 -0
- package/dist/cjs/MultiDropdownList.js +68 -74
- package/dist/cjs/MultiList.js +94 -89
- package/dist/cjs/MultiRange.js +44 -54
- package/dist/cjs/{Pagination-a468f960.js → Pagination-e56a5b79.js} +53 -56
- package/dist/cjs/{PreferencesConsumer-034c55e3.js → PreferencesConsumer-5e6e84a2.js} +5 -6
- package/dist/cjs/RangeInput.js +107 -115
- package/dist/cjs/RangeSlider.js +39 -50
- package/dist/cjs/ReactiveBase.js +55 -69
- package/dist/cjs/ReactiveComponent.js +316 -46
- package/dist/cjs/{ReactiveComponent-f0f486ca.js → ReactiveComponentPrivate-244c6055.js} +321 -618
- package/dist/cjs/ReactiveComponentPrivate.js +55 -0
- package/dist/cjs/ReactiveGoogleMap.js +439 -384
- package/dist/cjs/ReactiveList.js +128 -100
- package/dist/cjs/ResultCard.js +19 -26
- package/dist/cjs/ResultList.js +27 -31
- package/dist/cjs/SelectedFilters.js +34 -49
- package/dist/cjs/SingleDropdownList.js +66 -73
- package/dist/cjs/SingleList.js +96 -90
- package/dist/cjs/SingleRange.js +42 -48
- package/dist/cjs/StateProvider.js +2 -2
- package/dist/cjs/Tags-4ec43831.js +883 -0
- package/dist/cjs/Title-16042ea0.js +15 -0
- package/dist/cjs/ToggleButton.js +34 -39
- package/dist/cjs/{index-dc25b706.js → index-de136c17.js} +8 -6
- package/dist/cjs/index.js +27 -25
- package/dist/cjs/initReactivesearch.js +0 -3
- package/dist/cjs/install.js +23 -22
- package/dist/cjs/ssr-f2fc1bf6.js +36 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-621a8143.js → vueTypes-b7007f5f.js} +3 -2
- package/dist/es/Button-153cd885.js +53 -0
- package/dist/es/{CancelSvg-14ebc9a1.js → CancelSvg-e40552a5.js} +37 -30
- package/dist/es/{Card-1951569e.js → Card-19ad6d90.js} +6 -5
- package/dist/es/{ComponentWrapper-bf443c0b.js → ComponentWrapper-edaeaceb.js} +6 -6
- package/dist/es/Container-d00219f7.js +1 -1
- package/dist/es/DataSearch.js +1312 -18
- package/dist/es/{DropDown-35e232b7.js → DropDown-2c0dd714.js} +78 -78
- package/dist/es/DynamicRangeSlider.js +43 -53
- package/dist/es/Flex-7c177a10.js +45 -0
- package/dist/es/FormControlList-99797d0a.js +38 -0
- package/dist/es/Input-c09c0b56.js +69 -0
- package/dist/es/{ListItem-47a6345a.js → ListItem-07888a65.js} +7 -6
- package/dist/es/MultiDropdownList.js +66 -72
- package/dist/es/MultiList.js +93 -88
- package/dist/es/MultiRange.js +42 -52
- package/dist/es/{Pagination-145b4ff2.js → Pagination-edeb7dbe.js} +53 -56
- package/dist/es/{PreferencesConsumer-7ea7313a.js → PreferencesConsumer-86a676c8.js} +4 -5
- package/dist/es/RangeInput.js +103 -112
- package/dist/es/RangeSlider.js +36 -47
- package/dist/es/ReactiveBase.js +53 -68
- package/dist/es/ReactiveComponent.js +316 -45
- package/dist/es/{ReactiveComponent-e2fb9eb4.js → ReactiveComponentPrivate-6f16e1b7.js} +316 -614
- package/dist/es/ReactiveComponentPrivate.js +47 -0
- package/dist/es/ReactiveGoogleMap.js +434 -380
- package/dist/es/ReactiveList.js +125 -98
- package/dist/es/ResultCard.js +18 -25
- package/dist/es/ResultList.js +26 -30
- package/dist/es/SelectedFilters.js +32 -47
- package/dist/es/SingleDropdownList.js +64 -71
- package/dist/es/SingleList.js +94 -88
- package/dist/es/SingleRange.js +40 -46
- package/dist/es/StateProvider.js +2 -2
- package/dist/es/Tags-1c2d6c4d.js +869 -0
- package/dist/es/Title-863dfa42.js +1 -1
- package/dist/es/ToggleButton.js +32 -37
- package/dist/es/{index-285a43a6.js → index-5509c0bc.js} +8 -6
- package/dist/es/index.js +20 -19
- package/dist/es/initReactivesearch.js +0 -3
- package/dist/es/install.js +20 -19
- package/dist/es/ssr-03607d84.js +1 -1
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-e4af6fe2.js → vueTypes-66ebc93e.js} +3 -2
- package/package.json +10 -10
- package/dist/cjs/Button-626c5e8e.js +0 -58
- package/dist/cjs/Card-c381ded3.js +0 -26
- package/dist/cjs/Container-29f049b2.js +0 -12
- package/dist/cjs/DataSearch-7c71ec9f.js +0 -2043
- package/dist/cjs/Flex-d5675ea6.js +0 -48
- package/dist/cjs/FormControlList-cf1ff2ca.js +0 -42
- package/dist/cjs/Input-4d278ca0.js +0 -74
- package/dist/cjs/ListItem-c067bc07.js +0 -41
- package/dist/cjs/Title-8802a218.js +0 -12
- package/dist/cjs/ssr-eb901d09.js +0 -35
- package/dist/es/Button-ebafa3d6.js +0 -52
- package/dist/es/DataSearch-4f9a4e46.js +0 -2028
- package/dist/es/Flex-a08e22d7.js +0 -46
- package/dist/es/FormControlList-fa5cf78b.js +0 -38
- package/dist/es/Input-3b8408a6.js +0 -69
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import { helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
3
|
-
import { createVNode, mergeProps, createTextVNode } from 'vue';
|
|
4
3
|
import VueTypes from 'vue-types';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
4
|
+
import { css } from 'emotion';
|
|
5
|
+
import styled from '@appbaseio/vue-emotion';
|
|
6
|
+
import { t as types } from './vueTypes-66ebc93e.js';
|
|
7
|
+
import { a as isFunction } from './index-5509c0bc.js';
|
|
8
|
+
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
9
|
+
import { D as Downshift, b as InputWrapper, a as IconGroup, I as IconWrapper, C as CancelSvg } from './CancelSvg-e40552a5.js';
|
|
10
|
+
import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-c09c0b56.js';
|
|
10
11
|
import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
11
12
|
|
|
12
|
-
var _templateObject, _templateObject2;
|
|
13
|
-
var small = "\n\tmin-height: 0;\n\theight: 30px;\n\tborder: 0;\n\tbox-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;\n\tborder-radius: 2px;\n";
|
|
13
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
14
|
+
var small = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tmin-height: 0;\n\theight: 30px;\n\tborder: 0;\n\tbox-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;\n\tborder-radius: 2px;\n"])));
|
|
14
15
|
var dark = function dark(_ref) {
|
|
15
16
|
var theme = _ref.theme;
|
|
16
|
-
return "\n\tbackground-color: "
|
|
17
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tborder-color: ", ";\n\tcolor: ", ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor, theme.colors.borderColor, theme.colors.textColor, theme.colors.backgroundColor);
|
|
17
18
|
};
|
|
18
|
-
var Select = styled('button')(
|
|
19
|
+
var Select = styled('button')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tmin-height: 42px;\n\tborder-radius: 0;\n\toutline: none;\n\tpadding: 5px 12px;\n\tfont-size: 0.9rem;\n\tline-height: 1.2rem;\n\tbackground-color: #fff;\n\tborder: 1px solid #ccc;\n\tcolor: #424242;\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t", ";\n\n\t& > div {\n\t\twidth: calc(100% - 24px);\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\ttext-align: left;\n\t}\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: #fcfcfc;\n\t}\n\n\t", ";\n"])), function (props) {
|
|
19
20
|
return props.small ? small : null;
|
|
20
21
|
}, function (_ref2) {
|
|
21
22
|
var themePreset = _ref2.themePreset;
|
|
22
23
|
return themePreset === 'dark' && dark;
|
|
23
24
|
});
|
|
24
|
-
var Tick = styled('span')(
|
|
25
|
+
var Tick = styled('span')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\twidth: 16px;\n\theight: 16px;\n\tdisplay: inline-block;\n\tposition: relative;\n\tuser-select: none;\n\talign-items: center;\n\n\t&::after {\n\t\tbox-sizing: content-box;\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tbackground-color: transparent;\n\t\ttop: 50%;\n\t\tleft: 0;\n\t\twidth: 8px;\n\t\theight: 4px;\n\t\tmargin-top: -4px;\n\t\tborder-style: solid;\n\t\tborder-color: ", ";\n\t\tborder-width: 0 0 2px 2px;\n\t\tborder-radius: 0;\n\t\tborder-image: none;\n\t\ttransform: rotate(-45deg) scale(1);\n\t\ttransition: all 200ms ease-out;\n\t}\n"])), function (_ref3) {
|
|
25
26
|
var theme = _ref3.theme;
|
|
26
27
|
return theme.colors.primaryColor;
|
|
27
28
|
});
|
|
28
29
|
|
|
29
|
-
var _templateObject$1;
|
|
30
|
-
var open = "\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n";
|
|
31
|
-
var Chevron = styled('span')(
|
|
30
|
+
var _templateObject$1, _templateObject2$1;
|
|
31
|
+
var open = css(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
|
|
32
|
+
var Chevron = styled('span')(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["\n\t&::before {\n\t\tcontent: '';\n\t\tborder-style: solid;\n\t\tborder-width: 0.15em 0.15em 0 0;\n\t\tdisplay: inline-block;\n\t\theight: 0.45em;\n\t\tposition: relative;\n\t\ttop: 0.35em;\n\t\tleft: 0;\n\t\ttransform: rotate(135deg);\n\t\tvertical-align: top;\n\t\twidth: 0.45em;\n\n\t\t", ";\n\t}\n"])), function (props) {
|
|
32
33
|
return props.open ? open : null;
|
|
33
34
|
});
|
|
34
35
|
|
|
@@ -73,6 +74,7 @@ var Dropdown = {
|
|
|
73
74
|
},
|
|
74
75
|
render: function render() {
|
|
75
76
|
var _this = this;
|
|
77
|
+
var h = arguments[0];
|
|
76
78
|
var _this$$props = this.$props,
|
|
77
79
|
items = _this$$props.items,
|
|
78
80
|
selectedItem = _this$$props.selectedItem,
|
|
@@ -99,11 +101,13 @@ var Dropdown = {
|
|
|
99
101
|
}
|
|
100
102
|
return false;
|
|
101
103
|
});
|
|
102
|
-
return
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
return h(Downshift, {
|
|
105
|
+
"attrs": {
|
|
106
|
+
"isOpen": this.$data.isOpen,
|
|
107
|
+
"selectedItem": selectedItem,
|
|
108
|
+
"handleChange": this.onChange,
|
|
109
|
+
"handleMouseup": this.handleStateChange
|
|
110
|
+
},
|
|
107
111
|
"scopedSlots": {
|
|
108
112
|
"default": function _default(_ref) {
|
|
109
113
|
var getItemProps = _ref.getItemProps,
|
|
@@ -112,30 +116,29 @@ var Dropdown = {
|
|
|
112
116
|
getButtonProps = _ref.getButtonProps,
|
|
113
117
|
getItemEvents = _ref.getItemEvents,
|
|
114
118
|
getInputEvents = _ref.getInputEvents;
|
|
115
|
-
return
|
|
119
|
+
return h("div", {
|
|
116
120
|
"class": suggestionsContainer
|
|
117
|
-
}, [
|
|
118
|
-
on: _extends({}, getButtonProps({
|
|
121
|
+
}, [h(Select, {
|
|
122
|
+
"on": _extends({}, _extends({}, getButtonProps({
|
|
119
123
|
onClick: _this.toggle
|
|
120
|
-
}))
|
|
121
|
-
}, {
|
|
124
|
+
}))),
|
|
122
125
|
"class": getClassName(_this.$props.innerClass, 'select') || '',
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"default": function _default() {
|
|
128
|
-
return [customLabelRenderer ? customLabelRenderer(selectedItem) : createVNode("div", null, [selectedItem ? _this.renderToString(selectedItem) : placeholder]), createVNode(Chevron, {
|
|
129
|
-
"open": isOpen
|
|
130
|
-
}, null)];
|
|
126
|
+
"attrs": {
|
|
127
|
+
"title": selectedItem ? _this.renderToString(selectedItem) : placeholder,
|
|
128
|
+
"small": _this.$props.small,
|
|
129
|
+
"themePreset": _this.$props.themePreset
|
|
131
130
|
}
|
|
132
|
-
}),
|
|
131
|
+
}, [customLabelRenderer ? customLabelRenderer(selectedItem) : h("div", [selectedItem ? _this.renderToString(selectedItem) : placeholder]), h(Chevron, {
|
|
132
|
+
"attrs": {
|
|
133
|
+
"open": isOpen
|
|
134
|
+
}
|
|
135
|
+
})]), hasCustomRenderer ? customRenderer(itemsToRender, {
|
|
133
136
|
getItemProps: getItemProps,
|
|
134
137
|
isOpen: isOpen,
|
|
135
138
|
highlightedIndex: highlightedIndex,
|
|
136
139
|
getButtonProps: getButtonProps,
|
|
137
140
|
getItemEvents: getItemEvents
|
|
138
|
-
}) : isOpen && itemsToRender.length ?
|
|
141
|
+
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
139
142
|
"class": suggestions(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName(_this.$props.innerClass, 'list')
|
|
140
143
|
}, [_this.$props.showSearch ? _this.renderSearchbox({
|
|
141
144
|
on: {
|
|
@@ -150,35 +153,35 @@ var Dropdown = {
|
|
|
150
153
|
return value[labelField] === item[labelField];
|
|
151
154
|
}));
|
|
152
155
|
if (!_this.$props.multi) selected = item.key === selectedItem;
|
|
153
|
-
return
|
|
154
|
-
domProps: getItemProps({
|
|
156
|
+
return h("li", {
|
|
157
|
+
"domProps": _extends({}, getItemProps({
|
|
155
158
|
item: item
|
|
156
|
-
})
|
|
157
|
-
|
|
158
|
-
on: getItemEvents({
|
|
159
|
+
})),
|
|
160
|
+
"on": _extends({}, getItemEvents({
|
|
159
161
|
item: item
|
|
160
|
-
})
|
|
161
|
-
}, {
|
|
162
|
+
})),
|
|
162
163
|
"key": item[keyField],
|
|
163
164
|
"class": "" + (selected ? 'active' : ''),
|
|
164
165
|
"style": {
|
|
165
166
|
backgroundColor: _this.getBackgroundColor(highlightedIndex === index, selected)
|
|
166
167
|
}
|
|
167
|
-
}
|
|
168
|
+
}, [renderItem ? renderItem({
|
|
168
169
|
label: item[labelField],
|
|
169
170
|
count: item.doc_count,
|
|
170
171
|
isChecked: selected && _this.$props.multi
|
|
171
|
-
}) :
|
|
172
|
-
"
|
|
173
|
-
|
|
172
|
+
}) : h("div", [typeof item[labelField] === 'string' ? h("span", {
|
|
173
|
+
"domProps": {
|
|
174
|
+
"innerHTML": item[labelField]
|
|
175
|
+
}
|
|
176
|
+
}) : item[labelField], _this.$props.showCount && item.doc_count && h("span", {
|
|
174
177
|
"class": getClassName(_this.$props.innerClass, 'count') || ''
|
|
175
|
-
}, [
|
|
178
|
+
}, ["\xA0(", item.doc_count, ")"])]), selected && _this.$props.multi ? h(Tick, {
|
|
176
179
|
"class": getClassName(_this.$props.innerClass, 'icon') || ''
|
|
177
|
-
}
|
|
180
|
+
}) : null]);
|
|
178
181
|
}), footer]) : null]);
|
|
179
182
|
}
|
|
180
183
|
}
|
|
181
|
-
}
|
|
184
|
+
});
|
|
182
185
|
},
|
|
183
186
|
methods: {
|
|
184
187
|
toggle: function toggle() {
|
|
@@ -246,52 +249,49 @@ var Dropdown = {
|
|
|
246
249
|
return value;
|
|
247
250
|
},
|
|
248
251
|
renderNoResult: function renderNoResult() {
|
|
249
|
-
var
|
|
250
|
-
|
|
252
|
+
var h = this.$createElement;
|
|
253
|
+
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
254
|
+
return h("p", {
|
|
251
255
|
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
252
256
|
}, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
253
257
|
},
|
|
254
258
|
renderSearchbox: function renderSearchbox(eventObject) {
|
|
255
|
-
var
|
|
259
|
+
var h = this.$createElement;
|
|
256
260
|
var _this$$props2 = this.$props,
|
|
257
261
|
componentId = _this$$props2.componentId,
|
|
258
262
|
searchPlaceholder = _this$$props2.searchPlaceholder,
|
|
259
263
|
showClear = _this$$props2.showClear,
|
|
260
264
|
themePreset = _this$$props2.themePreset,
|
|
261
265
|
innerClass = _this$$props2.innerClass;
|
|
262
|
-
var InputComponent =
|
|
263
|
-
"
|
|
266
|
+
var InputComponent = h(Input, _mergeJSXProps([{
|
|
267
|
+
"attrs": {
|
|
268
|
+
"id": componentId + "-input",
|
|
269
|
+
"showIcon": false,
|
|
270
|
+
"showClear": showClear,
|
|
271
|
+
"placeholder": searchPlaceholder,
|
|
272
|
+
"value": this.$data.searchTerm,
|
|
273
|
+
"themePreset": themePreset
|
|
274
|
+
},
|
|
264
275
|
"style": {
|
|
265
276
|
border: 0,
|
|
266
277
|
borderBottom: '1px solid #ddd'
|
|
267
278
|
},
|
|
268
|
-
"
|
|
269
|
-
|
|
270
|
-
"class": getClassName(innerClass, 'input'),
|
|
271
|
-
"placeholder": searchPlaceholder,
|
|
272
|
-
"value": this.$data.searchTerm,
|
|
273
|
-
"themePreset": themePreset
|
|
274
|
-
}, eventObject), null);
|
|
279
|
+
"class": getClassName(innerClass, 'input')
|
|
280
|
+
}, eventObject]));
|
|
275
281
|
if (showClear) {
|
|
276
|
-
return
|
|
277
|
-
"
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
"positionType": "absolute"
|
|
281
|
-
}, {
|
|
282
|
-
"default": function _default() {
|
|
283
|
-
return [createVNode(IconWrapper, {
|
|
284
|
-
"onClick": _this3.clearSearchTerm,
|
|
285
|
-
"isClearIcon": true
|
|
286
|
-
}, {
|
|
287
|
-
"default": function _default() {
|
|
288
|
-
return [createVNode(CancelSvg, null, null)];
|
|
289
|
-
}
|
|
290
|
-
})];
|
|
291
|
-
}
|
|
292
|
-
})];
|
|
282
|
+
return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
|
|
283
|
+
"attrs": {
|
|
284
|
+
"groupPosition": "right",
|
|
285
|
+
"positionType": "absolute"
|
|
293
286
|
}
|
|
294
|
-
}
|
|
287
|
+
}, [h(IconWrapper, {
|
|
288
|
+
"on": {
|
|
289
|
+
"click": this.clearSearchTerm
|
|
290
|
+
},
|
|
291
|
+
"attrs": {
|
|
292
|
+
"isClearIcon": true
|
|
293
|
+
}
|
|
294
|
+
}, [h(CancelSvg)])])]);
|
|
295
295
|
}
|
|
296
296
|
return InputComponent;
|
|
297
297
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
-
import './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
-
import { createVNode, resolveComponent, mergeProps } from 'vue';
|
|
3
|
+
import { a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
5
4
|
import VueTypes from 'vue-types';
|
|
6
5
|
import '@appbaseio/vue-emotion';
|
|
7
|
-
import { t as types } from './vueTypes-
|
|
6
|
+
import { t as types } from './vueTypes-66ebc93e.js';
|
|
8
7
|
import 'redux';
|
|
9
|
-
import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-
|
|
10
|
-
import { P as PreferencesConsumer } from './PreferencesConsumer-
|
|
8
|
+
import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-5509c0bc.js';
|
|
9
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-86a676c8.js';
|
|
11
10
|
import { T as Title } from './Title-863dfa42.js';
|
|
12
11
|
import { C as Container } from './Container-d00219f7.js';
|
|
13
12
|
import NoSSR from 'vue-no-ssr';
|
|
@@ -63,6 +62,7 @@ var DynamicRangeSlider = {
|
|
|
63
62
|
},
|
|
64
63
|
created: function created() {
|
|
65
64
|
var _this = this;
|
|
65
|
+
this.$timestamp = new Date().getTime();
|
|
66
66
|
var onQueryChange = function onQueryChange() {
|
|
67
67
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
68
68
|
args[_key] = arguments[_key];
|
|
@@ -91,8 +91,8 @@ var DynamicRangeSlider = {
|
|
|
91
91
|
}
|
|
92
92
|
var value = this.$props.value;
|
|
93
93
|
if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
|
|
94
|
-
this.addComponent(this.componentId);
|
|
95
|
-
this.addComponent(this.internalRangeComponent);
|
|
94
|
+
this.addComponent(this.componentId, this.$timestamp);
|
|
95
|
+
this.addComponent(this.internalRangeComponent, this.$timestamp);
|
|
96
96
|
if (Array.isArray(this.selectedValue)) {
|
|
97
97
|
this.handleChange(this.selectedValue);
|
|
98
98
|
} else if (this.selectedValue) {
|
|
@@ -110,7 +110,7 @@ var DynamicRangeSlider = {
|
|
|
110
110
|
this.setDefaultValue(this.range);
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
|
-
|
|
113
|
+
beforeDestroy: function beforeDestroy() {
|
|
114
114
|
if (this.destroyOnUnmount) {
|
|
115
115
|
this.removeComponent(this.$props.componentId);
|
|
116
116
|
this.removeComponent(this.internalRangeComponent);
|
|
@@ -118,7 +118,7 @@ var DynamicRangeSlider = {
|
|
|
118
118
|
},
|
|
119
119
|
methods: {
|
|
120
120
|
isControlled: function isControlled() {
|
|
121
|
-
if (this.$props.value && this.$
|
|
121
|
+
if (this.$props.value && this.$listeners) {
|
|
122
122
|
return true;
|
|
123
123
|
}
|
|
124
124
|
return false;
|
|
@@ -297,54 +297,41 @@ var DynamicRangeSlider = {
|
|
|
297
297
|
}
|
|
298
298
|
},
|
|
299
299
|
render: function render() {
|
|
300
|
-
var
|
|
300
|
+
var h = arguments[0];
|
|
301
301
|
if (!this.range || !this.currentValue) {
|
|
302
302
|
return null;
|
|
303
303
|
}
|
|
304
304
|
var _this$range = this.range,
|
|
305
305
|
start = _this$range.start,
|
|
306
306
|
end = _this$range.end;
|
|
307
|
-
return
|
|
307
|
+
return h(Container, {
|
|
308
308
|
"class": this.$props.className
|
|
309
|
-
}, {
|
|
310
|
-
"
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}), null), _this4.labels ? createVNode("div", {
|
|
336
|
-
"class": "label-container"
|
|
337
|
-
}, [createVNode("label", {
|
|
338
|
-
"class": getClassName(_this4.$props.innerClass, 'label') || 'range-label-left'
|
|
339
|
-
}, [_this4.labels.start]), createVNode("label", {
|
|
340
|
-
"class": getClassName(_this4.$props.innerClass, 'label') || 'range-label-right'
|
|
341
|
-
}, [_this4.labels.end])]) : null];
|
|
342
|
-
}
|
|
343
|
-
})];
|
|
344
|
-
}
|
|
345
|
-
})];
|
|
346
|
-
}
|
|
347
|
-
});
|
|
309
|
+
}, [this.$props.title && h(Title, {
|
|
310
|
+
"class": getClassName(this.$props.innerClass, 'title')
|
|
311
|
+
}, [this.$props.title]), h(NoSSR, [h(Slider, {
|
|
312
|
+
"class": getClassName(this.$props.innerClass, 'slider')
|
|
313
|
+
}, [h("vue-slider-component", {
|
|
314
|
+
"ref": "slider",
|
|
315
|
+
"attrs": {
|
|
316
|
+
"value": [Math.floor(Math.max(start, this.currentValue[0])), Math.ceil(Math.min(end, this.currentValue[1]))],
|
|
317
|
+
"min": Math.floor(Math.min(start, this.currentValue[0])),
|
|
318
|
+
"max": Math.ceil(Math.max(end, this.currentValue[1])),
|
|
319
|
+
"dotSize": 20,
|
|
320
|
+
"height": 4,
|
|
321
|
+
"enable-cross": false,
|
|
322
|
+
"tooltip": "always"
|
|
323
|
+
},
|
|
324
|
+
"on": {
|
|
325
|
+
"drag-end": this.handleSlider
|
|
326
|
+
},
|
|
327
|
+
"props": _extends({}, this.$props.sliderOptions)
|
|
328
|
+
}), this.labels ? h("div", {
|
|
329
|
+
"class": "label-container"
|
|
330
|
+
}, [h("label", {
|
|
331
|
+
"class": getClassName(this.$props.innerClass, 'label') || 'range-label-left'
|
|
332
|
+
}, [this.labels.start]), h("label", {
|
|
333
|
+
"class": getClassName(this.$props.innerClass, 'label') || 'range-label-right'
|
|
334
|
+
}, [this.labels.end])]) : null])])]);
|
|
348
335
|
}
|
|
349
336
|
};
|
|
350
337
|
DynamicRangeSlider.defaultQuery = function (values, props) {
|
|
@@ -418,13 +405,16 @@ var mapDispatchtoProps = {
|
|
|
418
405
|
updateComponentProps: updateComponentProps
|
|
419
406
|
};
|
|
420
407
|
var RangeConnected = PreferencesConsumer(connect(mapStateToProps, mapDispatchtoProps)(DynamicRangeSlider));
|
|
408
|
+
RangeConnected.defaultQuery = DynamicRangeSlider.defaultQuery;
|
|
409
|
+
RangeConnected.parseValue = DynamicRangeSlider.parseValue;
|
|
410
|
+
RangeConnected.hasInternalComponent = DynamicRangeSlider.hasInternalComponent;
|
|
421
411
|
RangeConnected.name = DynamicRangeSlider.name;
|
|
422
|
-
RangeConnected.install = function (Vue) {
|
|
423
|
-
Vue.component(RangeConnected.name, RangeConnected);
|
|
424
|
-
};
|
|
425
412
|
|
|
426
413
|
// Add componentType for SSR
|
|
427
414
|
RangeConnected.componentType = componentTypes.dynamicRangeSlider;
|
|
415
|
+
RangeConnected.install = function (Vue) {
|
|
416
|
+
Vue.component(RangeConnected.name, RangeConnected);
|
|
417
|
+
};
|
|
428
418
|
|
|
429
419
|
export default RangeConnected;
|
|
430
420
|
export { RangeConnected };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
2
|
+
import { css } from 'emotion';
|
|
3
|
+
import styled from '@appbaseio/vue-emotion';
|
|
4
|
+
import { lighten } from 'polished';
|
|
5
|
+
|
|
6
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
7
|
+
var leftLabel = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tflex-direction: row;\n\talign-items: center;\n"])));
|
|
8
|
+
var rightLabel = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\tflex-direction: row-reverse;\n\talign-items: center;\n"])));
|
|
9
|
+
var topLabel = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\tflex-direction: column;\n"])));
|
|
10
|
+
var bottomLabel = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\tflex-direction: column-reverse;\n"])));
|
|
11
|
+
var border = function border(_ref) {
|
|
12
|
+
var colors = _ref.theme.colors;
|
|
13
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n\tborder: 1px solid ", ";\n"])), colors.borderColor || '#ccc');
|
|
14
|
+
};
|
|
15
|
+
var Flex = styled('div')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\tdisplay: ", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\n\tsvg.cancel-icon {\n\t\tcursor: pointer;\n\t\tfill: ", ";\n\t\tflex-basis: 30px;\n\n\t\t&:hover {\n\t\t\tfill: ", ";\n\t\t}\n\t}\n"])), function (props) {
|
|
16
|
+
return props.inline ? 'inline-flex' : 'flex';
|
|
17
|
+
}, function (props) {
|
|
18
|
+
return (props.labelPosition === 'left' || props.iconPosition === 'right') && leftLabel;
|
|
19
|
+
}, function (props) {
|
|
20
|
+
return (props.labelPosition === 'right' || props.iconPosition === 'left') && rightLabel;
|
|
21
|
+
}, function (props) {
|
|
22
|
+
return props.labelPosition === 'top' && topLabel;
|
|
23
|
+
}, function (props) {
|
|
24
|
+
return props.labelPosition === 'bottom' && bottomLabel;
|
|
25
|
+
}, function (props) {
|
|
26
|
+
return props.showBorder && border;
|
|
27
|
+
}, function (props) {
|
|
28
|
+
return props.justifyContent && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\t\t\tjustify-content: ", ";\n\t\t"])), props.justifyContent);
|
|
29
|
+
}, function (props) {
|
|
30
|
+
return props.alignItems && css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\t\t\talign-items: ", ";\n\t\t"])), props.alignItems);
|
|
31
|
+
}, function (props) {
|
|
32
|
+
return props.flex && css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n\t\t\tflex: ", ";\n\t\t"])), props.flex);
|
|
33
|
+
}, function (props) {
|
|
34
|
+
return props.direction && css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\t\t\tflex-direction: ", ";\n\t\t"])), props.direction);
|
|
35
|
+
}, function (props) {
|
|
36
|
+
return props.basis && css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n\t\t\tflex-basis: ", ";\n\t\t"])), props.basis);
|
|
37
|
+
}, function (_ref2) {
|
|
38
|
+
var colors = _ref2.theme.colors;
|
|
39
|
+
return colors.borderColor || lighten(0.3, colors.textColor);
|
|
40
|
+
}, function (_ref3) {
|
|
41
|
+
var theme = _ref3.theme;
|
|
42
|
+
return theme.colors.textColor;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export { Flex as F };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
2
|
+
import { css } from 'emotion';
|
|
3
|
+
import styled from '@appbaseio/vue-emotion';
|
|
4
|
+
import { lighten } from 'polished';
|
|
5
|
+
|
|
6
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
7
|
+
var item = {
|
|
8
|
+
width: '15px',
|
|
9
|
+
height: '15px',
|
|
10
|
+
scale: '4px'
|
|
11
|
+
};
|
|
12
|
+
var vh = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tborder: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tposition: absolute;\n\twidth: 1px;\n\twhite-space: nowrap;\n"])));
|
|
13
|
+
var hideInputControl = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\t+ label {\n\t\tpadding-left: 0;\n\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder: 0;\n\t\t\tmargin: 0;\n\t\t\tvisibility: hidden;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n"])));
|
|
14
|
+
var formItem = function formItem(_ref) {
|
|
15
|
+
var theme = _ref.theme;
|
|
16
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\t", ";\n\n\t&:focus {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tbox-shadow: 0 0 0 2px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:hover {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:active {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\ttransition-duration: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t+ label {\n\t\tposition: relative;\n\t\tuser-select: none;\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\n\t\t&::before {\n\t\t\tbackground-color: #fff;\n\t\t\tborder: 1px solid ", ";\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tcolor: ", ";\n\t\t\tmargin-right: calc(", " * 0.5);\n\t\t\ttop: 50%;\n\t\t\tleft: 0;\n\t\t\twidth: ", ";\n\t\t\theight: ", ";\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\t&::after {\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tbackground-color: ", ";\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 2);\n\t\t\twidth: calc(", " - ", ");\n\t\t\theight: calc(", " - ", ");\n\t\t\tmargin-top: calc(", " / -2 - ", " / -2);\n\t\t\ttransform: scale(0);\n\t\t\ttransform-origin: 50%;\n\t\t\ttransition: transform 200ms ease-out;\n\t\t}\n\t}\n"])), vh, lighten(0.4, theme.colors.primaryColor), theme.colors.primaryColor, theme.colors.borderColor || lighten(0.1, theme.colors.textColor), theme.colors.primaryColor, item.width, item.width, item.height, theme.colors.primaryColor, item.scale, item.width, item.scale, item.height, item.scale, item.height, item.scale);
|
|
17
|
+
};
|
|
18
|
+
var Radio = styled('input')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t+ label {\n\t\t\t\tcolor: ", ";\n\n\t\t\t\t&::before {\n\t\t\t\t\tanimation: none;\n\t\t\t\t\tfilter: none;\n\t\t\t\t\ttransition: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tanimation: none;\n\t\t\t\tbackground-color: #fff;\n\t\t\t\tborder-color: ", ";\n\t\t}\n\n\t\t&::after {\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n"])), formItem, function (props) {
|
|
19
|
+
return props.show ? null : hideInputControl;
|
|
20
|
+
}, function (_ref2) {
|
|
21
|
+
var theme = _ref2.theme;
|
|
22
|
+
return theme.colors.primaryColor;
|
|
23
|
+
}, function (_ref3) {
|
|
24
|
+
var theme = _ref3.theme;
|
|
25
|
+
return theme.colors.primaryColor;
|
|
26
|
+
});
|
|
27
|
+
var Checkbox = styled('input')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 0;\n\t\t}\n\n\t\t&::after {\n\t\t\tbackground-color: transparent;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 5);\n\t\t\twidth: calc(", " / 2);\n\t\t\theight: calc(", " / 5);\n\t\t\tmargin-top: calc(", " / -2 / 2 * 0.8);\n\t\t\tborder-style: solid;\n\t\t\tborder-color: ", ";\n\t\t\tborder-width: 0 0 2px 2px;\n\t\t\tborder-radius: 0;\n\t\t\tborder-image: none;\n\t\t\ttransform: rotate(-45deg) scale(0);\n\t\t\ttransition: none;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\ttransform: rotate(-45deg) scale(1);\n\t\t\t\ttransition: transform 200ms ease-out;\n\t\t\t}\n\t\t}\n\t}\n"])), formItem, function (props) {
|
|
28
|
+
return props.show ? null : hideInputControl;
|
|
29
|
+
}, item.width, item.width, item.width, item.height, function (_ref4) {
|
|
30
|
+
var theme = _ref4.theme;
|
|
31
|
+
return theme.colors.primaryColor;
|
|
32
|
+
}, function (_ref5) {
|
|
33
|
+
var theme = _ref5.theme;
|
|
34
|
+
return theme.colors.primaryColor;
|
|
35
|
+
});
|
|
36
|
+
var UL = styled('ul')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 0;\n\tmax-height: 240px;\n\tposition: relative;\n\toverflow-y: auto;\n\tpadding-bottom: 12px;\n\n\tli {\n\t\theight 30px;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tpadding-left: 2px;\n\t}\n"])));
|
|
37
|
+
|
|
38
|
+
export { Checkbox as C, Radio as R, UL as U };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
2
|
+
import { css } from 'emotion';
|
|
3
|
+
import styled from '@appbaseio/vue-emotion';
|
|
4
|
+
|
|
5
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
6
|
+
var alertBorder = function alertBorder(_ref) {
|
|
7
|
+
var theme = _ref.theme;
|
|
8
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tborder: 1px solid ", ";\n"])), theme.colors.alertColor);
|
|
9
|
+
};
|
|
10
|
+
var input = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tline-height: 1.5;\n\tmin-height: 42px;\n\tpadding: 8px 12px;\n\tborder: 1px solid #ccc;\n\tbackground-color: #fafafa;\n\tfont-size: 0.9rem;\n\toutline: none;\n\theight: 100%;\n\n\t&:focus {\n\t\tbackground-color: #fff;\n\t}\n"])));
|
|
11
|
+
var dark = function dark(theme) {
|
|
12
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\tborder-color: ", ";\n"])), theme.colors.borderColor);
|
|
13
|
+
};
|
|
14
|
+
var darkInput = function darkInput(_ref2) {
|
|
15
|
+
var theme = _ref2.theme;
|
|
16
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tcolor: ", ";\n\t", ";\n\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor, theme.colors.textColor, dark(theme), theme.colors.backgroundColor);
|
|
17
|
+
};
|
|
18
|
+
var Input = styled('input')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n"])), input, function (_ref3) {
|
|
19
|
+
var themePreset = _ref3.themePreset,
|
|
20
|
+
theme = _ref3.theme;
|
|
21
|
+
return themePreset === 'dark' && darkInput({
|
|
22
|
+
theme: theme
|
|
23
|
+
});
|
|
24
|
+
}, function (props) {
|
|
25
|
+
return props.showIcon && props.iconPosition === 'left' && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-left: 36px;\n\t\t"])));
|
|
26
|
+
}, function (props) {
|
|
27
|
+
return props.showIcon && props.iconPosition === 'right' && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 36px;\n\t\t"])));
|
|
28
|
+
}, function (props) {
|
|
29
|
+
return (
|
|
30
|
+
// for clear icon
|
|
31
|
+
props.showClear && css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 36px;\n\t\t"])))
|
|
32
|
+
);
|
|
33
|
+
}, function (props) {
|
|
34
|
+
return (
|
|
35
|
+
// for voice search icon
|
|
36
|
+
props.showVoiceSearch && css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 36px;\n\t\t"])))
|
|
37
|
+
);
|
|
38
|
+
}, function (props) {
|
|
39
|
+
return (
|
|
40
|
+
// for clear icon with search icon
|
|
41
|
+
props.showClear && props.showIcon && props.iconPosition === 'right' && css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 66px;\n\t\t"])))
|
|
42
|
+
);
|
|
43
|
+
}, function (props) {
|
|
44
|
+
return (
|
|
45
|
+
// for voice search icon with search icon
|
|
46
|
+
props.showVoiceSearch && props.showIcon && props.iconPosition === 'right' && css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 66px;\n\t\t"])))
|
|
47
|
+
);
|
|
48
|
+
}, function (props) {
|
|
49
|
+
return (
|
|
50
|
+
// for voice search icon with clear icon
|
|
51
|
+
props.showVoiceSearch && props.showIcon && css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 66px;\n\t\t"])))
|
|
52
|
+
);
|
|
53
|
+
}, function (props) {
|
|
54
|
+
return (
|
|
55
|
+
// for clear icon with search icon and voice search
|
|
56
|
+
props.showClear && props.showIcon && props.showVoiceSearch && props.iconPosition === 'right' && css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 90px;\n\t\t"])))
|
|
57
|
+
);
|
|
58
|
+
}, function (props) {
|
|
59
|
+
return props.alert && alertBorder;
|
|
60
|
+
});
|
|
61
|
+
var suggestions = function suggestions(themePreset, theme) {
|
|
62
|
+
return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: min(100vh, 402px);\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tcursor: pointer;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t}\n\n\t", ";\n"])), themePreset === 'dark' && theme && dark(theme));
|
|
63
|
+
};
|
|
64
|
+
var suggestionsContainer = css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
|
|
65
|
+
var noSuggestions = function noSuggestions(themePreset, theme) {
|
|
66
|
+
return css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: 260px;\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t", "\n"])), themePreset === 'dark' && theme && dark(theme));
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export { Input as I, suggestions as a, noSuggestions as n, suggestionsContainer as s };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
2
|
-
import {
|
|
2
|
+
import { css } from 'emotion';
|
|
3
|
+
import styled from '@appbaseio/vue-emotion';
|
|
3
4
|
import { lighten } from 'polished';
|
|
4
5
|
import './Title-863dfa42.js';
|
|
5
6
|
|
|
6
|
-
var _templateObject, _templateObject2;
|
|
7
|
-
var container = "\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin: 0;\n\tborder-radius: 0.25rem;\n\toverflow: hidden;\n";
|
|
8
|
-
var smallImage = "\n\twidth: 100px;\n\theight: 100px;\n";
|
|
9
|
-
var Image = styled('div')(
|
|
7
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
8
|
+
var container = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin: 0;\n\tborder-radius: 0.25rem;\n\toverflow: hidden;\n"])));
|
|
9
|
+
var smallImage = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\twidth: 100px;\n\theight: 100px;\n"])));
|
|
10
|
+
var Image = styled('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\twidth: 160px;\n\theight: 160px;\n\t", ";\n\tmargin: 0;\n\tbackground-size: contain;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tbackground-image: ", ";\n"])), function (props) {
|
|
10
11
|
return props.small ? smallImage : null;
|
|
11
12
|
}, function (props) {
|
|
12
13
|
return "url(" + props.src + ")";
|
|
13
14
|
});
|
|
14
|
-
var ListItem = styled('a')(
|
|
15
|
+
var ListItem = styled('a')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\theight: auto;\n\toutline: none;\n\ttext-decoration: none;\n\tborder-radius: 0;\n\tbackground-color: ", ";\n\tdisplay: flex;\n\tflex-direction: row;\n\tmargin: 0;\n\tpadding: 10px;\n\tborder-bottom: 1px solid ", ";\n\tcolor: ", ";\n\t", "; all 0.3s ease;\n\n\t&:hover, &:focus {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:last-child {\n\t\tborder: 0;\n\t}\n\n\th2 {\n\t\twidth: 100%;\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: 0 0 8px;\n\t}\n\n\tp {\n\t\tmargin: 0;\n\t}\n\n\tarticle {\n\t\twidth: ", ";\n\t\tpadding-left: ", ";\n\t\tfont-size: 0.9rem;\n\t}\n\n\t&:hover, &:focus {\n\t\tbox-shadow: 0 0 0 0 rgba(0,0,0,0.10);\n\t}\n\n\t@media (max-width: 420px) {\n\t\tmin-width: 0;\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, &:focus {\n\t\t\tbox-shadow: 0;\n\t\t}\n\t}\n"])), function (_ref) {
|
|
15
16
|
var theme = _ref.theme;
|
|
16
17
|
return theme.colors.backgroundColor ? lighten(0.1, theme.colors.backgroundColor) : '#fff';
|
|
17
18
|
}, function (_ref2) {
|