@appbaseio/reactivesearch-vue 1.16.0-alpha.4 → 1.16.0-alpha.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +8110 -7499
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-d2f1aeda.js +68 -0
  6. package/dist/cjs/{DownShift-b09da079.js → CancelSvg-82021d23.js} +60 -16
  7. package/dist/cjs/Card-4b915733.js +30 -0
  8. package/dist/cjs/{ComponentWrapper-5a0a8849.js → ComponentWrapper-7302fe1a.js} +40 -21
  9. package/dist/cjs/{Container-f84e72fc.js → Container-8a08d663.js} +3 -11
  10. package/dist/cjs/DataSearch.js +354 -398
  11. package/dist/cjs/{DropDown-c66be1a8.js → DropDown-c46d8b0c.js} +80 -95
  12. package/dist/cjs/DynamicRangeSlider.js +107 -42
  13. package/dist/cjs/Flex-699639d2.js +52 -0
  14. package/dist/cjs/FormControlList-73497794.js +47 -0
  15. package/dist/cjs/Input-c6f181d5.js +79 -0
  16. package/dist/cjs/ListItem-933c27e4.js +46 -0
  17. package/dist/cjs/MultiDropdownList.js +101 -65
  18. package/dist/cjs/MultiList.js +79 -47
  19. package/dist/cjs/MultiRange.js +20 -14
  20. package/dist/cjs/{Pagination-91df3b77.js → Pagination-1b2320a7.js} +4 -3
  21. package/dist/cjs/RangeInput.js +29 -45
  22. package/dist/cjs/RangeSlider.js +31 -28
  23. package/dist/cjs/ReactiveBase.js +55 -34
  24. package/dist/cjs/ReactiveComponent.js +69 -62
  25. package/dist/cjs/ReactiveGoogleMap.js +326 -235
  26. package/dist/cjs/ReactiveList.js +188 -241
  27. package/dist/cjs/ResultCard.js +8 -6
  28. package/dist/cjs/ResultList.js +8 -6
  29. package/dist/cjs/SelectedFilters.js +25 -12
  30. package/dist/cjs/SingleDropdownList.js +87 -57
  31. package/dist/cjs/SingleList.js +60 -37
  32. package/dist/cjs/SingleRange.js +17 -11
  33. package/dist/cjs/StateProvider.js +11 -7
  34. package/dist/cjs/{Title-e9beb554.js → Title-39765ee6.js} +3 -11
  35. package/dist/cjs/ToggleButton.js +35 -16
  36. package/dist/cjs/{_rollupPluginBabelHelpers-280a574c.js → _rollupPluginBabelHelpers-4abdbfff.js} +11 -1
  37. package/dist/cjs/{index-e0583d76.js → index-d44a0a21.js} +87 -13
  38. package/dist/cjs/index.js +23 -19
  39. package/dist/cjs/initReactivesearch.js +190 -103
  40. package/dist/cjs/install.js +20 -18
  41. package/dist/cjs/ssr-c333c82c.js +39 -0
  42. package/dist/cjs/{utils-d1ea9f95.js → utils-23afb20b.js} +2 -2
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/cjs/{vueTypes-c21f265b.js → vueTypes-6de9d2a9.js} +9 -4
  45. package/dist/es/Button-799185e2.js +59 -0
  46. package/dist/es/{DownShift-d8f2500f.js → CancelSvg-4d9e0857.js} +56 -17
  47. package/dist/es/Card-04b3c33e.js +23 -0
  48. package/dist/es/{ComponentWrapper-d0b21b95.js → ComponentWrapper-bbb717bc.js} +40 -21
  49. package/dist/es/Container-4383c6f0.js +10 -0
  50. package/dist/es/DataSearch.js +352 -396
  51. package/dist/es/{DropDown-5dbd69c2.js → DropDown-4edaa621.js} +79 -94
  52. package/dist/es/DynamicRangeSlider.js +107 -42
  53. package/dist/es/Flex-aac91505.js +47 -0
  54. package/dist/es/FormControlList-fe389a2e.js +40 -0
  55. package/dist/es/Input-d8519224.js +71 -0
  56. package/dist/es/ListItem-bdb6d53d.js +39 -0
  57. package/dist/es/MultiDropdownList.js +101 -65
  58. package/dist/es/MultiList.js +79 -47
  59. package/dist/es/MultiRange.js +20 -14
  60. package/dist/es/{Pagination-800af44f.js → Pagination-b3e4054a.js} +4 -3
  61. package/dist/es/RangeInput.js +29 -45
  62. package/dist/es/RangeSlider.js +31 -28
  63. package/dist/es/ReactiveBase.js +55 -34
  64. package/dist/es/ReactiveComponent.js +69 -62
  65. package/dist/es/ReactiveGoogleMap.js +326 -235
  66. package/dist/es/ReactiveList.js +188 -241
  67. package/dist/es/ResultCard.js +8 -6
  68. package/dist/es/ResultList.js +8 -6
  69. package/dist/es/SelectedFilters.js +25 -12
  70. package/dist/es/SingleDropdownList.js +87 -57
  71. package/dist/es/SingleList.js +60 -37
  72. package/dist/es/SingleRange.js +17 -11
  73. package/dist/es/StateProvider.js +11 -7
  74. package/dist/es/Title-579f8d6c.js +10 -0
  75. package/dist/es/ToggleButton.js +35 -16
  76. package/dist/es/{_rollupPluginBabelHelpers-c9fbe19f.js → _rollupPluginBabelHelpers-ecf6c03c.js} +11 -1
  77. package/dist/es/{index-1fe91a0a.js → index-5daa8276.js} +84 -14
  78. package/dist/es/index.js +23 -19
  79. package/dist/es/initReactivesearch.js +191 -104
  80. package/dist/es/install.js +20 -18
  81. package/dist/es/ssr-e3196de1.js +33 -0
  82. package/dist/es/{utils-ce3d86fd.js → utils-3a32e13f.js} +2 -2
  83. package/dist/es/version.js +1 -1
  84. package/dist/es/{vueTypes-98d938a9.js → vueTypes-9326e0be.js} +9 -4
  85. package/package.json +7 -5
  86. package/dist/cjs/Button-78d8bc26.js +0 -146
  87. package/dist/cjs/Card-b4af314f.js +0 -58
  88. package/dist/cjs/Flex-737c55be.js +0 -160
  89. package/dist/cjs/FormControlList-08dfb28e.js +0 -105
  90. package/dist/cjs/Input-643d02a7.js +0 -178
  91. package/dist/cjs/ListItem-0c58c5d2.js +0 -84
  92. package/dist/cjs/ssr-b7a729f9.js +0 -47
  93. package/dist/es/Button-6c71c66e.js +0 -137
  94. package/dist/es/Card-ecf70ba1.js +0 -51
  95. package/dist/es/Container-f5efec9e.js +0 -18
  96. package/dist/es/Flex-40a74d8a.js +0 -155
  97. package/dist/es/FormControlList-b96aebef.js +0 -98
  98. package/dist/es/Input-dfd9dd40.js +0 -170
  99. package/dist/es/ListItem-da73bc7d.js +0 -77
  100. package/dist/es/Title-22c2f3bf.js +0 -18
  101. package/dist/es/ssr-2f57791d.js +0 -41
@@ -4,94 +4,40 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
4
4
 
5
5
  var configureStore = require('@appbaseio/reactivecore');
6
6
  var configureStore__default = _interopDefault(configureStore);
7
- var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-280a574c.js');
7
+ var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
8
8
  var VueTypes = _interopDefault(require('vue-types'));
9
9
  var emotion = require('emotion');
10
10
  var styled = require('@appbaseio/vue-emotion');
11
11
  var styled__default = _interopDefault(styled);
12
- var vueTypes = require('./vueTypes-c21f265b.js');
13
- var index = require('./index-e0583d76.js');
14
- var Input = require('./Input-643d02a7.js');
15
- var DownShift = require('./DownShift-b09da079.js');
12
+ var vueTypes = require('./vueTypes-6de9d2a9.js');
13
+ var index = require('./index-d44a0a21.js');
14
+ var _mergeJSXProps = _interopDefault(require('@vue/babel-helper-vue-jsx-merge-props'));
15
+ var CancelSvg = require('./CancelSvg-82021d23.js');
16
+ var Input = require('./Input-c6f181d5.js');
17
+ var suggestions = require('@appbaseio/reactivecore/lib/utils/suggestions');
16
18
 
17
- function _templateObject4() {
18
- var data = _rollupPluginBabelHelpers._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"]);
19
-
20
- _templateObject4 = function _templateObject4() {
21
- return data;
22
- };
23
-
24
- return data;
25
- }
26
-
27
- function _templateObject3() {
28
- var data = _rollupPluginBabelHelpers._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"]);
29
-
30
- _templateObject3 = function _templateObject3() {
31
- return data;
32
- };
33
-
34
- return data;
35
- }
36
-
37
- function _templateObject2() {
38
- var data = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tborder-color: ", ";\n\tcolor: ", ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"]);
39
-
40
- _templateObject2 = function _templateObject2() {
41
- return data;
42
- };
43
-
44
- return data;
45
- }
46
-
47
- function _templateObject() {
48
- var data = _rollupPluginBabelHelpers._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"]);
49
-
50
- _templateObject = function _templateObject() {
51
- return data;
52
- };
53
-
54
- return data;
55
- }
56
- var small = emotion.css(_templateObject());
19
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
20
+ var small = emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._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"])));
57
21
 
58
22
  var dark = function dark(_ref) {
59
23
  var theme = _ref.theme;
60
- return emotion.css(_templateObject2(), theme.colors.backgroundColor, theme.colors.borderColor, theme.colors.textColor, theme.colors.backgroundColor);
24
+ return emotion.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._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);
61
25
  };
62
26
 
63
- var Select = styled__default('button')(_templateObject3(), function (props) {
27
+ var Select = styled__default('button')(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._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) {
64
28
  return props.small ? small : null;
65
29
  }, function (_ref2) {
66
30
  var themePreset = _ref2.themePreset;
67
31
  return themePreset === 'dark' && dark;
68
32
  });
69
- var Tick = styled__default('span')(_templateObject4(), function (_ref3) {
33
+ var Tick = styled__default('span')(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._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) {
70
34
  var theme = _ref3.theme;
71
35
  return theme.colors.primaryColor;
72
36
  });
73
37
 
74
- function _templateObject2$1() {
75
- var data = _rollupPluginBabelHelpers._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"]);
76
-
77
- _templateObject2$1 = function _templateObject2() {
78
- return data;
79
- };
80
-
81
- return data;
82
- }
83
-
84
- function _templateObject$1() {
85
- var data = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"]);
86
-
87
- _templateObject$1 = function _templateObject() {
88
- return data;
89
- };
90
-
91
- return data;
92
- }
93
- var open = emotion.css(_templateObject$1());
94
- var Chevron = styled__default('span')(_templateObject2$1(), function (props) {
38
+ var _templateObject$1, _templateObject2$1;
39
+ var open = emotion.css(_templateObject$1 || (_templateObject$1 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
40
+ var Chevron = styled__default('span')(_templateObject2$1 || (_templateObject2$1 = _rollupPluginBabelHelpers._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) {
95
41
  return props.open ? open : null;
96
42
  });
97
43
 
@@ -114,23 +60,25 @@ var Dropdown = {
114
60
  items: vueTypes.types.data,
115
61
  keyField: VueTypes.string.def('key'),
116
62
  labelField: VueTypes.string.def('label'),
117
- multi: vueTypes.types.bool,
63
+ multi: VueTypes.bool,
118
64
  // change event
119
65
  placeholder: vueTypes.types.string,
120
- returnsObject: vueTypes.types.bool,
66
+ returnsObject: VueTypes.bool,
121
67
  customLabelRenderer: vueTypes.types.func,
122
- hasCustomRenderer: vueTypes.types.bool,
68
+ hasCustomRenderer: VueTypes.bool,
123
69
  customRenderer: vueTypes.types.func,
124
70
  renderItem: vueTypes.types.func,
125
71
  renderNoResults: VueTypes.any,
126
72
  handleChange: vueTypes.types.func,
127
73
  transformData: vueTypes.types.func,
128
74
  selectedItem: vueTypes.types.selectedValue,
129
- showCount: vueTypes.types.bool,
130
- single: vueTypes.types.bool,
75
+ showCount: VueTypes.bool,
76
+ single: VueTypes.bool,
131
77
  small: VueTypes.bool.def(false),
132
78
  themePreset: vueTypes.types.themePreset,
133
- showSearch: vueTypes.types.bool
79
+ showSearch: VueTypes.bool,
80
+ showClear: VueTypes.bool,
81
+ searchPlaceholder: VueTypes.string.def('Type here to search...')
134
82
  },
135
83
  render: function render() {
136
84
  var _this = this;
@@ -158,7 +106,7 @@ var Dropdown = {
158
106
  var filteredItemsToRender = itemsToRender.filter(function (item) {
159
107
  if (String(item[labelField]).length) {
160
108
  if (_this.$props.showSearch && _this.$data.searchTerm) {
161
- return String(item[labelField]).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
109
+ return suggestions.replaceDiacritics(String(item[labelField])).toLowerCase().includes(suggestions.replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
162
110
  }
163
111
 
164
112
  return true;
@@ -166,7 +114,7 @@ var Dropdown = {
166
114
 
167
115
  return false;
168
116
  });
169
- return h(DownShift.Downshift, {
117
+ return h(CancelSvg.Downshift, {
170
118
  "attrs": {
171
119
  "isOpen": this.$data.isOpen,
172
120
  "selectedItem": selectedItem,
@@ -179,7 +127,8 @@ var Dropdown = {
179
127
  isOpen = _ref.isOpen,
180
128
  highlightedIndex = _ref.highlightedIndex,
181
129
  getButtonProps = _ref.getButtonProps,
182
- getItemEvents = _ref.getItemEvents;
130
+ getItemEvents = _ref.getItemEvents,
131
+ getInputEvents = _ref.getInputEvents;
183
132
  return h("div", {
184
133
  "class": Input.suggestionsContainer
185
134
  }, [h(Select, {
@@ -204,26 +153,16 @@ var Dropdown = {
204
153
  getItemEvents: getItemEvents
205
154
  }) : isOpen && itemsToRender.length ? h("ul", {
206
155
  "class": Input.suggestions(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName(_this.$props.innerClass, 'list')
207
- }, [_this.$props.showSearch ? h(Input.Input, {
208
- "attrs": {
209
- "id": _this.$props.componentId + "-input",
210
- "showIcon": false,
211
- "placeholder": "Type here to search...",
212
- "value": _this.$data.searchTerm,
213
- "themePreset": themePreset
214
- },
215
- "style": {
216
- border: 0,
217
- borderBottom: '1px solid #ddd'
218
- },
219
- "class": getClassName(_this.$props.innerClass, 'input'),
220
- "on": {
221
- "change": _this.handleInputChange
156
+ }, [_this.$props.showSearch ? _this.renderSearchbox({
157
+ on: {
158
+ input: getInputEvents({
159
+ onInput: _this.handleInputChange
160
+ }).input
222
161
  }
223
162
  }) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
224
163
  var selected = _this.$props.multi // MultiDropdownList
225
- && (selectedItem && !!selectedItem[item[keyField]] || // MultiDropdownRange
226
- Array.isArray(selectedItem) && selectedItem.find(function (value) {
164
+ && (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
165
+ || Array.isArray(selectedItem) && selectedItem.find(function (value) {
227
166
  return value[labelField] === item[labelField];
228
167
  }));
229
168
  if (!_this.$props.multi) selected = item.key === selectedItem;
@@ -273,6 +212,7 @@ var Dropdown = {
273
212
 
274
213
  if (!this.$props.multi) {
275
214
  this.isOpen = false;
215
+ this.searchTerm = '';
276
216
  }
277
217
  },
278
218
  handleStateChange: function handleStateChange(_ref2) {
@@ -296,6 +236,9 @@ var Dropdown = {
296
236
  var value = e.target.value;
297
237
  this.searchTerm = value;
298
238
  },
239
+ clearSearchTerm: function clearSearchTerm() {
240
+ this.searchTerm = '';
241
+ },
299
242
  renderToString: function renderToString(value) {
300
243
  var _this2 = this;
301
244
 
@@ -336,6 +279,48 @@ var Dropdown = {
336
279
  return h("p", {
337
280
  "class": getClassName(this.$props.innerClass, 'noResults') || null
338
281
  }, [index.isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
282
+ },
283
+ renderSearchbox: function renderSearchbox(eventObject) {
284
+ var h = this.$createElement;
285
+ var _this$$props2 = this.$props,
286
+ componentId = _this$$props2.componentId,
287
+ searchPlaceholder = _this$$props2.searchPlaceholder,
288
+ showClear = _this$$props2.showClear,
289
+ themePreset = _this$$props2.themePreset,
290
+ innerClass = _this$$props2.innerClass;
291
+ var InputComponent = h(Input.Input, _mergeJSXProps([{
292
+ "attrs": {
293
+ "id": componentId + "-input",
294
+ "showIcon": false,
295
+ "showClear": showClear,
296
+ "placeholder": searchPlaceholder,
297
+ "value": this.$data.searchTerm,
298
+ "themePreset": themePreset
299
+ },
300
+ "style": {
301
+ border: 0,
302
+ borderBottom: '1px solid #ddd'
303
+ },
304
+ "class": getClassName(innerClass, 'input')
305
+ }, eventObject]));
306
+
307
+ if (showClear) {
308
+ return h(CancelSvg.InputWrapper, [InputComponent, this.searchTerm && h(CancelSvg.IconGroup, {
309
+ "attrs": {
310
+ "groupPosition": "right",
311
+ "positionType": "absolute"
312
+ }
313
+ }, [h(CancelSvg.IconWrapper, {
314
+ "on": {
315
+ "click": this.clearSearchTerm
316
+ },
317
+ "attrs": {
318
+ "isClearIcon": true
319
+ }
320
+ }, [h(CancelSvg.CancelSvg)])])]);
321
+ }
322
+
323
+ return InputComponent;
339
324
  }
340
325
  }
341
326
  };
@@ -6,17 +6,17 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
6
6
 
7
7
  var configureStore = require('@appbaseio/reactivecore');
8
8
  var configureStore__default = _interopDefault(configureStore);
9
- var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-280a574c.js');
9
+ var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
10
10
  var VueTypes = _interopDefault(require('vue-types'));
11
11
  var constants = require('@appbaseio/reactivecore/lib/utils/constants');
12
12
  require('@appbaseio/vue-emotion');
13
- var vueTypes = require('./vueTypes-c21f265b.js');
13
+ var vueTypes = require('./vueTypes-6de9d2a9.js');
14
14
  require('redux');
15
- var index = require('./index-e0583d76.js');
16
- var Title = require('./Title-e9beb554.js');
17
- var Container = require('./Container-f84e72fc.js');
15
+ var index = require('./index-d44a0a21.js');
16
+ var Title = require('./Title-39765ee6.js');
17
+ var Container = require('./Container-8a08d663.js');
18
18
  var NoSSR = _interopDefault(require('vue-no-ssr'));
19
- var ssr = require('./ssr-b7a729f9.js');
19
+ var ssr = require('./ssr-c333c82c.js');
20
20
 
21
21
  var addComponent = configureStore.Actions.addComponent,
22
22
  removeComponent = configureStore.Actions.removeComponent,
@@ -29,9 +29,10 @@ var addComponent = configureStore.Actions.addComponent,
29
29
  updateComponentProps = configureStore.Actions.updateComponentProps;
30
30
  var checkValueChange = configureStore.helper.checkValueChange,
31
31
  getClassName = configureStore.helper.getClassName,
32
- getOptionsFromQuery = configureStore.helper.getOptionsFromQuery,
33
32
  isEqual = configureStore.helper.isEqual,
34
- checkSomePropChange = configureStore.helper.checkSomePropChange;
33
+ checkSomePropChange = configureStore.helper.checkSomePropChange,
34
+ extractQueryFromCustomQuery = configureStore.helper.extractQueryFromCustomQuery,
35
+ getOptionsForCustomQuery = configureStore.helper.getOptionsForCustomQuery;
35
36
  var DynamicRangeSlider = {
36
37
  name: 'DynamicRangeSlider',
37
38
  components: ssr.getComponents(),
@@ -48,11 +49,14 @@ var DynamicRangeSlider = {
48
49
  innerClass: vueTypes.types.style,
49
50
  react: vueTypes.types.react,
50
51
  showFilter: VueTypes.bool.def(true),
52
+ destroyOnUnmount: VueTypes.bool,
51
53
  showCheckbox: VueTypes.bool.def(true),
52
54
  title: vueTypes.types.title,
53
55
  URLParams: VueTypes.bool.def(false),
54
56
  sliderOptions: VueTypes.object.def({}),
55
- nestedField: vueTypes.types.string
57
+ nestedField: vueTypes.types.string,
58
+ index: VueTypes.string,
59
+ value: vueTypes.types.range
56
60
  },
57
61
  data: function data() {
58
62
  this.internalRangeComponent = this.$props.componentId + "__range__internal";
@@ -77,7 +81,12 @@ var DynamicRangeSlider = {
77
81
  this.setQueryListener(this.$props.componentId, onQueryChange, null); // Update props in store
78
82
 
79
83
  this.setComponentProps(this.componentId, this.$props, constants.componentTypes.dynamicRangeSlider);
80
- this.setComponentProps(this.internalRangeComponent, this.$props, constants.componentTypes.dynamicRangeSlider); // Set custom query in store
84
+ this.setComponentProps(this.internalRangeComponent, this.$props, constants.componentTypes.dynamicRangeSlider);
85
+
86
+ if (!this.enableAppbase && this.$props.index) {
87
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
88
+ } // Set custom query in store
89
+
81
90
 
82
91
  index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
83
92
  },
@@ -85,17 +94,31 @@ var DynamicRangeSlider = {
85
94
  this.setReact();
86
95
  },
87
96
  beforeMount: function beforeMount() {
88
- this.addComponent(this.$props.componentId);
89
- this.addComponent(this.internalRangeComponent);
97
+ var components = [];
98
+
99
+ if (this.$$store) {
100
+ var _this$$$store$getStat = this.$$store.getState();
101
+
102
+ components = _this$$$store$getStat.components;
103
+ }
104
+
105
+ var value = this.$props.value;
90
106
 
91
- if (Array.isArray(this.selectedValue)) {
92
- this.handleChange(this.selectedValue);
93
- } else if (this.selectedValue) {
94
- this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
95
- } // get range before executing other queries
107
+ if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
108
+ this.addComponent(this.componentId);
109
+ this.addComponent(this.internalRangeComponent);
96
110
 
111
+ if (Array.isArray(this.selectedValue)) {
112
+ this.handleChange(this.selectedValue);
113
+ } else if (this.selectedValue) {
114
+ this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
115
+ } else if (value) {
116
+ this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
117
+ } // get range before executing other queries
97
118
 
98
- this.updateRangeQueryOptions();
119
+
120
+ this.updateRangeQueryOptions();
121
+ }
99
122
  },
100
123
  beforeUpdate: function beforeUpdate() {
101
124
  if (!this.currentValue) {
@@ -103,10 +126,19 @@ var DynamicRangeSlider = {
103
126
  }
104
127
  },
105
128
  beforeDestroy: function beforeDestroy() {
106
- this.removeComponent(this.$props.componentId);
107
- this.removeComponent(this.internalRangeComponent);
129
+ if (this.destroyOnUnmount) {
130
+ this.removeComponent(this.$props.componentId);
131
+ this.removeComponent(this.internalRangeComponent);
132
+ }
108
133
  },
109
134
  methods: {
135
+ isControlled: function isControlled() {
136
+ if (this.$props.value && this.$listeners) {
137
+ return true;
138
+ }
139
+
140
+ return false;
141
+ },
110
142
  setDefaultValue: function setDefaultValue(_ref) {
111
143
  var start = _ref.start,
112
144
  end = _ref.end;
@@ -117,6 +149,8 @@ var DynamicRangeSlider = {
117
149
  defaultEnd = _this$$props$defaultV.end;
118
150
 
119
151
  this.handleChange([defaultStart, defaultEnd]);
152
+ } else if (this.isControlled()) {
153
+ this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
120
154
  } else {
121
155
  this.currentValue = [start, end];
122
156
  }
@@ -164,8 +198,18 @@ var DynamicRangeSlider = {
164
198
  aggs: aggs
165
199
  });
166
200
  },
167
- handleSlider: function handleSlider(values) {
168
- this.handleChange(values.currentValue);
201
+ handleSlider: function handleSlider() {
202
+ var sliderValues = this.$refs.slider.getValue();
203
+ var value = this.$props.value;
204
+
205
+ if (value === undefined) {
206
+ this.handleChange(sliderValues);
207
+ } else {
208
+ this.$emit('change', {
209
+ start: sliderValues[0],
210
+ end: sliderValues[1]
211
+ });
212
+ }
169
213
  },
170
214
  handleChange: function handleChange(currentValue) {
171
215
  var _this2 = this;
@@ -199,25 +243,29 @@ var DynamicRangeSlider = {
199
243
  var customQueryOptions;
200
244
 
201
245
  if (this.$props.customQuery) {
202
- var _ref2 = this.$props.customQuery(value, this.$props) || {};
246
+ var customQueryTobeSet = this.$props.customQuery(value, this.$props);
247
+ var queryTobeSet = extractQueryFromCustomQuery(customQueryTobeSet);
248
+
249
+ if (queryTobeSet) {
250
+ query = queryTobeSet;
251
+ }
203
252
 
204
- query = _ref2.query;
205
- customQueryOptions = getOptionsFromQuery(this.$props.customQuery(value, this.$props));
253
+ customQueryOptions = getOptionsForCustomQuery(customQueryTobeSet);
206
254
  index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, value);
207
255
  }
208
256
 
209
- var _ref3 = this.range || {
257
+ var _ref2 = this.range || {
210
258
  start: value[0],
211
259
  end: value[1]
212
260
  },
213
- start = _ref3.start,
214
- end = _ref3.end;
261
+ start = _ref2.start,
262
+ end = _ref2.end;
215
263
 
216
264
  var currentStart = value[0],
217
265
  currentEnd = value[1]; // check if the slider is at its initial position
218
266
 
219
267
  var isInitialValue = currentStart === start && currentEnd === end;
220
- this.setQueryOptions(this.$props.componentId, customQueryOptions);
268
+ this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
221
269
  this.updateQuery({
222
270
  componentId: this.$props.componentId,
223
271
  query: query,
@@ -258,18 +306,19 @@ var DynamicRangeSlider = {
258
306
  start: this.range.start,
259
307
  end: this.range.end
260
308
  };
309
+ this.$emit('change', value);
261
310
  this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
262
311
  },
263
312
  range: function range(newValue, oldValue) {
264
313
  if (isEqual(newValue, oldValue) || !this.currentValue) return;
265
314
 
266
- var _ref4 = this.currentValue || [],
267
- currentStart = _ref4[0],
268
- currentEnd = _ref4[1];
315
+ var _ref3 = this.currentValue || [],
316
+ currentStart = _ref3[0],
317
+ currentEnd = _ref3[1];
269
318
 
270
- var _ref5 = oldValue || {},
271
- oldStart = _ref5.start,
272
- oldEnd = _ref5.end;
319
+ var _ref4 = oldValue || {},
320
+ oldStart = _ref4.start,
321
+ oldEnd = _ref4.end;
273
322
 
274
323
  var newStart = currentStart === oldStart ? newValue.start : currentStart;
275
324
  var newEnd = currentEnd === oldEnd ? newValue.end : currentEnd;
@@ -279,12 +328,17 @@ var DynamicRangeSlider = {
279
328
  if (!index.isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
280
329
  this.updateQueryHandler(this.$data.currentValue);
281
330
  }
331
+ },
332
+ value: function value(newVal, oldVal) {
333
+ if (!isEqual(newVal, oldVal)) {
334
+ this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
335
+ }
282
336
  }
283
337
  },
284
338
  render: function render() {
285
339
  var h = arguments[0];
286
340
 
287
- if (!this.range) {
341
+ if (!this.range || !this.currentValue) {
288
342
  return null;
289
343
  }
290
344
 
@@ -298,13 +352,15 @@ var DynamicRangeSlider = {
298
352
  }, [this.$props.title]), h(NoSSR, [h(ssr.Slider, {
299
353
  "class": getClassName(this.$props.innerClass, 'slider')
300
354
  }, [h("vue-slider-component", {
355
+ "ref": "slider",
301
356
  "attrs": {
302
- "value": [Math.max(start, this.currentValue[0]), Math.min(end, this.currentValue[1])],
303
- "min": Math.min(start, this.currentValue[0]),
304
- "max": Math.max(end, this.currentValue[1]),
357
+ "value": [Math.floor(Math.max(start, this.currentValue[0])), Math.ceil(Math.min(end, this.currentValue[1]))],
358
+ "min": Math.floor(Math.min(start, this.currentValue[0])),
359
+ "max": Math.ceil(Math.max(end, this.currentValue[1])),
305
360
  "dotSize": 20,
306
361
  "height": 4,
307
- "enable-cross": false
362
+ "enable-cross": false,
363
+ "tooltip": "always"
308
364
  },
309
365
  "on": {
310
366
  "drag-end": this.handleSlider
@@ -350,7 +406,15 @@ DynamicRangeSlider.defaultQuery = function (values, props) {
350
406
  };
351
407
 
352
408
  DynamicRangeSlider.parseValue = function (value) {
353
- return [value.start, value.end];
409
+ if (value) {
410
+ return Array.isArray(value) ? value : [value.start, value.end];
411
+ }
412
+
413
+ return [];
414
+ };
415
+
416
+ DynamicRangeSlider.hasInternalComponent = function () {
417
+ return true;
354
418
  };
355
419
 
356
420
  var mapStateToProps = function mapStateToProps(state, props) {
@@ -377,7 +441,8 @@ var mapStateToProps = function mapStateToProps(state, props) {
377
441
  options: options,
378
442
  range: range,
379
443
  selectedValue: state.selectedValues[props.componentId] ? state.selectedValues[props.componentId].value : null,
380
- componentProps: state.props[props.componentId]
444
+ componentProps: state.props[props.componentId],
445
+ enableAppbase: state.config.enableAppbase
381
446
  };
382
447
  };
383
448
 
@@ -0,0 +1,52 @@
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-4abdbfff.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
+
11
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
12
+ var leftLabel = emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tflex-direction: row;\n\talign-items: center;\n"])));
13
+ var rightLabel = emotion.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tflex-direction: row-reverse;\n\talign-items: center;\n"])));
14
+ var topLabel = emotion.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tflex-direction: column;\n"])));
15
+ var bottomLabel = emotion.css(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tflex-direction: column-reverse;\n"])));
16
+
17
+ var border = function border(_ref) {
18
+ var colors = _ref.theme.colors;
19
+ return emotion.css(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tborder: 1px solid ", ";\n"])), colors.borderColor || '#ccc');
20
+ };
21
+
22
+ var Flex = styled__default('div')(_templateObject6 || (_templateObject6 = _rollupPluginBabelHelpers._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) {
23
+ return props.inline ? 'inline-flex' : 'flex';
24
+ }, function (props) {
25
+ return (props.labelPosition === 'left' || props.iconPosition === 'right') && leftLabel;
26
+ }, function (props) {
27
+ return (props.labelPosition === 'right' || props.iconPosition === 'left') && rightLabel;
28
+ }, function (props) {
29
+ return props.labelPosition === 'top' && topLabel;
30
+ }, function (props) {
31
+ return props.labelPosition === 'bottom' && bottomLabel;
32
+ }, function (props) {
33
+ return props.showBorder && border;
34
+ }, function (props) {
35
+ return props.justifyContent && emotion.css(_templateObject7 || (_templateObject7 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tjustify-content: ", ";\n\t\t"])), props.justifyContent);
36
+ }, function (props) {
37
+ return props.alignItems && emotion.css(_templateObject8 || (_templateObject8 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\talign-items: ", ";\n\t\t"])), props.alignItems);
38
+ }, function (props) {
39
+ return props.flex && emotion.css(_templateObject9 || (_templateObject9 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tflex: ", ";\n\t\t"])), props.flex);
40
+ }, function (props) {
41
+ return props.direction && emotion.css(_templateObject10 || (_templateObject10 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tflex-direction: ", ";\n\t\t"])), props.direction);
42
+ }, function (props) {
43
+ return props.basis && emotion.css(_templateObject11 || (_templateObject11 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\tflex-basis: ", ";\n\t\t"])), props.basis);
44
+ }, function (_ref2) {
45
+ var colors = _ref2.theme.colors;
46
+ return colors.borderColor || polished.lighten(0.3, colors.textColor);
47
+ }, function (_ref3) {
48
+ var theme = _ref3.theme;
49
+ return theme.colors.textColor;
50
+ });
51
+
52
+ exports.Flex = Flex;
@@ -0,0 +1,47 @@
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-4abdbfff.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
+
11
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
12
+ var item = {
13
+ width: '15px',
14
+ height: '15px',
15
+ scale: '4px'
16
+ };
17
+ var vh = emotion.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers._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"])));
18
+ var hideInputControl = emotion.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._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"])));
19
+
20
+ var formItem = function formItem(_ref) {
21
+ var theme = _ref.theme;
22
+ return emotion.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._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, polished.lighten(0.4, theme.colors.primaryColor), theme.colors.primaryColor, theme.colors.borderColor || polished.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);
23
+ };
24
+
25
+ var Radio = styled__default('input')(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers._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) {
26
+ return props.show ? null : hideInputControl;
27
+ }, function (_ref2) {
28
+ var theme = _ref2.theme;
29
+ return theme.colors.primaryColor;
30
+ }, function (_ref3) {
31
+ var theme = _ref3.theme;
32
+ return theme.colors.primaryColor;
33
+ });
34
+ var Checkbox = styled__default('input')(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers._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) {
35
+ return props.show ? null : hideInputControl;
36
+ }, item.width, item.width, item.width, item.height, function (_ref4) {
37
+ var theme = _ref4.theme;
38
+ return theme.colors.primaryColor;
39
+ }, function (_ref5) {
40
+ var theme = _ref5.theme;
41
+ return theme.colors.primaryColor;
42
+ });
43
+ var UL = styled__default('ul')(_templateObject6 || (_templateObject6 = _rollupPluginBabelHelpers._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"])));
44
+
45
+ exports.Checkbox = Checkbox;
46
+ exports.Radio = Radio;
47
+ exports.UL = UL;