maz-ui 2.3.13 → 2.4.2

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 (237) hide show
  1. package/components/MazArrowIcon.d.ts +43 -0
  2. package/components/MazArrowIcon.js +1 -0
  3. package/components/MazAvatar.d.ts +149 -0
  4. package/components/MazAvatar.js +3 -0
  5. package/components/MazBackdrop.d.ts +89 -0
  6. package/components/MazBackdrop.js +3 -0
  7. package/components/MazBadge.d.ts +68 -0
  8. package/components/MazBadge.js +1 -0
  9. package/components/MazBottomSheet.d.ts +29 -0
  10. package/components/MazBottomSheet.js +3 -0
  11. package/components/MazBtn.d.ts +171 -0
  12. package/components/MazBtn.js +3 -0
  13. package/components/MazCard.d.ts +183 -0
  14. package/components/MazCard.js +3 -0
  15. package/components/MazCarousel.d.ts +16 -0
  16. package/components/MazCarousel.js +3 -0
  17. package/components/MazChart/includes.d.ts +11 -0
  18. package/components/MazChart.d.ts +114 -0
  19. package/components/MazChart.js +1 -0
  20. package/components/MazCheckbox.d.ts +49 -0
  21. package/components/MazCheckbox.js +1 -0
  22. package/components/MazDialog.d.ts +29 -0
  23. package/components/MazDialog.js +3 -0
  24. package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +30 -0
  25. package/components/MazDialogPromise.d.ts +28 -0
  26. package/components/MazDialogPromise.js +3 -0
  27. package/components/MazDrawer.d.ts +59 -0
  28. package/components/MazDrawer.js +3 -0
  29. package/components/MazDropzone.d.ts +128 -0
  30. package/components/MazDropzone.js +3 -0
  31. package/components/MazGallery.d.ts +144 -0
  32. package/components/MazGallery.js +3 -0
  33. package/components/MazIcon.d.ts +66 -0
  34. package/components/MazIcon.js +3 -0
  35. package/components/MazInput.d.ts +276 -0
  36. package/components/MazInput.js +3 -0
  37. package/components/MazInputNumber.d.ts +67 -0
  38. package/components/MazInputNumber.js +3 -0
  39. package/components/MazInputPrice.d.ts +64 -0
  40. package/components/MazInputPrice.js +3 -0
  41. package/components/MazInputTags.d.ts +96 -0
  42. package/components/MazInputTags.js +3 -0
  43. package/components/MazLazyImg.d.ts +80 -0
  44. package/components/MazLazyImg.js +3 -0
  45. package/components/MazPhoneNumberInput/constantes/locales.d.ts +12 -0
  46. package/components/MazPhoneNumberInput/types.d.ts +21 -0
  47. package/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +2 -0
  48. package/components/MazPhoneNumberInput/utils/index.d.ts +12 -0
  49. package/components/MazPhoneNumberInput.d.ts +255 -0
  50. package/components/MazPhoneNumberInput.js +3 -0
  51. package/components/MazPicker/MazPickerCalendar.vue.d.ts +137 -0
  52. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +22 -0
  53. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +114 -0
  54. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +124 -0
  55. package/components/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +38 -0
  56. package/components/MazPicker/MazPickerContainer.vue.d.ts +212 -0
  57. package/components/MazPicker/MazPickerHeader.vue.d.ts +84 -0
  58. package/components/MazPicker/MazPickerMonthSwitcher.vue.d.ts +43 -0
  59. package/components/MazPicker/MazPickerShortcuts.vue.d.ts +62 -0
  60. package/components/MazPicker/MazPickerTime.vue.d.ts +129 -0
  61. package/components/MazPicker/MazPickerYearSwitcher.vue.d.ts +35 -0
  62. package/components/MazPicker/types.d.ts +15 -0
  63. package/components/MazPicker/utils.d.ts +54 -0
  64. package/components/MazPicker.d.ts +313 -0
  65. package/components/MazPicker.js +3 -0
  66. package/components/MazRadioButtons.d.ts +69 -0
  67. package/components/MazRadioButtons.js +1 -0
  68. package/components/MazSelect.d.ts +176 -0
  69. package/components/MazSelect.js +3 -0
  70. package/components/MazSlider/utils.d.ts +15 -0
  71. package/components/MazSlider.d.ts +96 -0
  72. package/components/MazSlider.js +3 -0
  73. package/components/MazSpinner.d.ts +30 -0
  74. package/components/MazSpinner.js +1 -0
  75. package/components/MazStepper.d.ts +73 -0
  76. package/components/MazStepper.js +1 -0
  77. package/components/MazSwitch.d.ts +56 -0
  78. package/components/MazSwitch.js +1 -0
  79. package/components/MazTabsBar.d.ts +49 -0
  80. package/components/MazTabsBar.js +3 -0
  81. package/components/MazTabsContent.d.ts +16 -0
  82. package/components/MazTabsContent.js +1 -0
  83. package/components/MazTabsContentItem.d.ts +14 -0
  84. package/components/MazTabsContentItem.js +3 -0
  85. package/components/MazTextarea/textarea-autogrow.d.ts +9 -0
  86. package/components/MazTextarea.d.ts +125 -0
  87. package/components/MazTextarea.js +1 -0
  88. package/components/MazTransitionExpand.d.ts +4 -0
  89. package/components/MazTransitionExpand.js +1 -0
  90. package/components/index.d.ts +34 -0
  91. package/components/index.js +36 -0
  92. package/components/no_photo-a72545e4.js +1 -0
  93. package/components/types.d.ts +17 -0
  94. package/css/aos.css +1 -0
  95. package/css/main.css +1 -0
  96. package/maz-ui.d.ts +307 -0
  97. package/modules/index.js +3 -0
  98. package/modules/no_photo-a72545e4.js +1 -0
  99. package/package.json +145 -81
  100. package/tailwindcss/tailwind.config.js +65 -0
  101. package/tailwindcss/utils/colors.js +28 -0
  102. package/tailwindcss/variables/breakpoints.js +15 -0
  103. package/tailwindcss/variables/colors.js +44 -0
  104. package/tailwindcss/variables/utilities.js +20 -0
  105. package/tailwindcss/variables/z-indexes.js +15 -0
  106. package/LICENSE +0 -21
  107. package/README.md +0 -66
  108. package/bin/index.js +0 -63
  109. package/bin/lib/_constantes/default-colors.js +0 -69
  110. package/bin/lib/index.d.ts +0 -2
  111. package/bin/lib/index.js +0 -145
  112. package/bin/lib/methods/generate-root-css.js +0 -49
  113. package/bin/lib/methods/get-theme-settings.js +0 -58
  114. package/bin/lib/methods/set-css-vars.js +0 -11
  115. package/lib/css/base.css +0 -1
  116. package/lib/css/index.css +0 -1
  117. package/lib/css/maz-avatar.css +0 -1
  118. package/lib/css/maz-bottom-sheet.css +0 -1
  119. package/lib/css/maz-btn-group.css +0 -1
  120. package/lib/css/maz-btn.css +0 -0
  121. package/lib/css/maz-card.css +0 -1
  122. package/lib/css/maz-carousel.css +0 -1
  123. package/lib/css/maz-checkbox.css +0 -1
  124. package/lib/css/maz-collapse.css +0 -1
  125. package/lib/css/maz-dialog.css +0 -1
  126. package/lib/css/maz-draggable-list.css +0 -1
  127. package/lib/css/maz-dropdown.css +0 -1
  128. package/lib/css/maz-dropzone.css +0 -1
  129. package/lib/css/maz-flex.css +0 -0
  130. package/lib/css/maz-gallery.css +0 -0
  131. package/lib/css/maz-img.css +0 -1
  132. package/lib/css/maz-input-tags.css +0 -1
  133. package/lib/css/maz-input.css +0 -0
  134. package/lib/css/maz-list-item.css +0 -1
  135. package/lib/css/maz-list.css +0 -1
  136. package/lib/css/maz-loader.css +0 -0
  137. package/lib/css/maz-pagination.css +0 -1
  138. package/lib/css/maz-phone-number-input.css +0 -1
  139. package/lib/css/maz-picker.css +0 -1
  140. package/lib/css/maz-plotly.css +0 -0
  141. package/lib/css/maz-progress-bar.css +0 -1
  142. package/lib/css/maz-radio.css +0 -1
  143. package/lib/css/maz-read-more.css +0 -1
  144. package/lib/css/maz-responsive-menu.css +0 -1
  145. package/lib/css/maz-search.css +0 -1
  146. package/lib/css/maz-select.css +0 -0
  147. package/lib/css/maz-sidebar.css +0 -1
  148. package/lib/css/maz-slider.css +0 -1
  149. package/lib/css/maz-spinner.css +0 -0
  150. package/lib/css/maz-stepper.css +0 -1
  151. package/lib/css/maz-switch.css +0 -1
  152. package/lib/css/maz-tabs-bar.css +0 -1
  153. package/lib/css/maz-tabs-content-item.css +0 -1
  154. package/lib/css/maz-tabs-content.css +0 -1
  155. package/lib/css/maz-transition-expand.css +0 -0
  156. package/lib/index.d.ts +0 -1
  157. package/lib/index.js +0 -1
  158. package/lib/maz-avatar.d.ts +0 -3
  159. package/lib/maz-avatar.js +0 -430
  160. package/lib/maz-bottom-sheet.d.ts +0 -3
  161. package/lib/maz-bottom-sheet.js +0 -1045
  162. package/lib/maz-btn-group.d.ts +0 -3
  163. package/lib/maz-btn-group.js +0 -907
  164. package/lib/maz-btn.d.ts +0 -3
  165. package/lib/maz-btn.js +0 -764
  166. package/lib/maz-card.d.ts +0 -3
  167. package/lib/maz-card.js +0 -572
  168. package/lib/maz-carousel.d.ts +0 -3
  169. package/lib/maz-carousel.js +0 -569
  170. package/lib/maz-checkbox.d.ts +0 -3
  171. package/lib/maz-checkbox.js +0 -359
  172. package/lib/maz-collapse.d.ts +0 -3
  173. package/lib/maz-collapse.js +0 -1238
  174. package/lib/maz-dialog.d.ts +0 -3
  175. package/lib/maz-dialog.js +0 -1315
  176. package/lib/maz-draggable-list.d.ts +0 -3
  177. package/lib/maz-draggable-list.js +0 -439
  178. package/lib/maz-dropdown.d.ts +0 -3
  179. package/lib/maz-dropdown.js +0 -438
  180. package/lib/maz-dropzone.d.ts +0 -3
  181. package/lib/maz-dropzone.js +0 -664
  182. package/lib/maz-flex.d.ts +0 -3
  183. package/lib/maz-flex.js +0 -427
  184. package/lib/maz-gallery.d.ts +0 -3
  185. package/lib/maz-gallery.js +0 -672
  186. package/lib/maz-img.d.ts +0 -3
  187. package/lib/maz-img.js +0 -612
  188. package/lib/maz-input-tags.d.ts +0 -3
  189. package/lib/maz-input-tags.js +0 -1207
  190. package/lib/maz-input.d.ts +0 -3
  191. package/lib/maz-input.js +0 -1076
  192. package/lib/maz-list-item.d.ts +0 -3
  193. package/lib/maz-list-item.js +0 -304
  194. package/lib/maz-list.d.ts +0 -3
  195. package/lib/maz-list.js +0 -331
  196. package/lib/maz-loader.d.ts +0 -3
  197. package/lib/maz-loader.js +0 -304
  198. package/lib/maz-pagination.d.ts +0 -3
  199. package/lib/maz-pagination.js +0 -1414
  200. package/lib/maz-phone-number-input.d.ts +0 -3
  201. package/lib/maz-phone-number-input.js +0 -3776
  202. package/lib/maz-picker.d.ts +0 -3
  203. package/lib/maz-picker.js +0 -6474
  204. package/lib/maz-plotly.d.ts +0 -3
  205. package/lib/maz-plotly.js +0 -500
  206. package/lib/maz-progress-bar.d.ts +0 -3
  207. package/lib/maz-progress-bar.js +0 -398
  208. package/lib/maz-radio.d.ts +0 -3
  209. package/lib/maz-radio.js +0 -358
  210. package/lib/maz-read-more.d.ts +0 -3
  211. package/lib/maz-read-more.js +0 -344
  212. package/lib/maz-responsive-menu.d.ts +0 -3
  213. package/lib/maz-responsive-menu.js +0 -438
  214. package/lib/maz-search.d.ts +0 -3
  215. package/lib/maz-search.js +0 -1590
  216. package/lib/maz-select.d.ts +0 -3
  217. package/lib/maz-select.js +0 -2740
  218. package/lib/maz-sidebar.d.ts +0 -3
  219. package/lib/maz-sidebar.js +0 -815
  220. package/lib/maz-slider.d.ts +0 -3
  221. package/lib/maz-slider.js +0 -1014
  222. package/lib/maz-spinner.d.ts +0 -3
  223. package/lib/maz-spinner.js +0 -328
  224. package/lib/maz-stepper.d.ts +0 -3
  225. package/lib/maz-stepper.js +0 -1011
  226. package/lib/maz-switch.d.ts +0 -3
  227. package/lib/maz-switch.js +0 -375
  228. package/lib/maz-tabs-bar.d.ts +0 -3
  229. package/lib/maz-tabs-bar.js +0 -428
  230. package/lib/maz-tabs-content-item.d.ts +0 -3
  231. package/lib/maz-tabs-content-item.js +0 -376
  232. package/lib/maz-tabs-content.d.ts +0 -3
  233. package/lib/maz-tabs-content.js +0 -367
  234. package/lib/maz-transition-expand.d.ts +0 -3
  235. package/lib/maz-transition-expand.js +0 -328
  236. package/lib/maz-ui.common.d.ts +0 -1
  237. package/lib/maz-ui.common.js +0 -17202
package/lib/maz-slider.js DELETED
@@ -1,1014 +0,0 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "/dist/";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 49);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ 0:
91
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
-
93
- "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
- /* globals __VUE_SSR_CONTEXT__ */
96
-
97
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
98
- // This module is a runtime utility for cleaner component module output and will
99
- // be included in the final webpack user bundle.
100
-
101
- function normalizeComponent (
102
- scriptExports,
103
- render,
104
- staticRenderFns,
105
- functionalTemplate,
106
- injectStyles,
107
- scopeId,
108
- moduleIdentifier, /* server only */
109
- shadowMode /* vue-cli only */
110
- ) {
111
- // Vue.extend constructor export interop
112
- var options = typeof scriptExports === 'function'
113
- ? scriptExports.options
114
- : scriptExports
115
-
116
- // render functions
117
- if (render) {
118
- options.render = render
119
- options.staticRenderFns = staticRenderFns
120
- options._compiled = true
121
- }
122
-
123
- // functional template
124
- if (functionalTemplate) {
125
- options.functional = true
126
- }
127
-
128
- // scopedId
129
- if (scopeId) {
130
- options._scopeId = 'data-v-' + scopeId
131
- }
132
-
133
- var hook
134
- if (moduleIdentifier) { // server build
135
- hook = function (context) {
136
- // 2.3 injection
137
- context =
138
- context || // cached call
139
- (this.$vnode && this.$vnode.ssrContext) || // stateful
140
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
141
- // 2.2 with runInNewContext: true
142
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
143
- context = __VUE_SSR_CONTEXT__
144
- }
145
- // inject component styles
146
- if (injectStyles) {
147
- injectStyles.call(this, context)
148
- }
149
- // register component module identifier for async chunk inferrence
150
- if (context && context._registeredComponents) {
151
- context._registeredComponents.add(moduleIdentifier)
152
- }
153
- }
154
- // used by ssr in case component is cached and beforeCreate
155
- // never gets called
156
- options._ssrRegister = hook
157
- } else if (injectStyles) {
158
- hook = shadowMode
159
- ? function () {
160
- injectStyles.call(
161
- this,
162
- (options.functional ? this.parent : this).$root.$options.shadowRoot
163
- )
164
- }
165
- : injectStyles
166
- }
167
-
168
- if (hook) {
169
- if (options.functional) {
170
- // for template-only hot-reload because in that case the render fn doesn't
171
- // go through the normalizer
172
- options._injectStyles = hook
173
- // register for functional component in vue file
174
- var originalRender = options.render
175
- options.render = function renderWithStyleInjection (h, context) {
176
- hook.call(context)
177
- return originalRender(h, context)
178
- }
179
- } else {
180
- // inject component registration as beforeCreate hook
181
- var existing = options.beforeCreate
182
- options.beforeCreate = existing
183
- ? [].concat(existing, hook)
184
- : [hook]
185
- }
186
- }
187
-
188
- return {
189
- exports: scriptExports,
190
- options: options
191
- }
192
- }
193
-
194
-
195
- /***/ }),
196
-
197
- /***/ 1:
198
- /***/ (function(module, exports, __webpack_require__) {
199
-
200
- module.exports = __webpack_require__(9);
201
-
202
-
203
- /***/ }),
204
-
205
- /***/ 49:
206
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
207
-
208
- "use strict";
209
- // ESM COMPAT FLAG
210
- __webpack_require__.r(__webpack_exports__);
211
-
212
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/MazSlider/_main.vue?vue&type=template&id=13a411ca&
213
- var render = function () {
214
- var _vm = this
215
- var _h = _vm.$createElement
216
- var _c = _vm._self._c || _h
217
- return _c(
218
- "div",
219
- {
220
- staticClass: "maz-base-component maz-slider",
221
- class: ["maz-slider--" + _vm.color],
222
- style: [_vm.wrapperStyle],
223
- on: {
224
- mousemove: _vm.handleMousemove,
225
- mouseup: _vm.handleMouseup,
226
- mouseleave: _vm.handleMouseup,
227
- },
228
- },
229
- [
230
- _c(
231
- "div",
232
- {
233
- ref: "MazSlider",
234
- staticClass: "maz-slider__bar maz-flex maz-flex-center",
235
- style: [_vm.barStyle],
236
- attrs: { role: "slider" },
237
- },
238
- [
239
- _vm._l(_vm.dividers, function (div, i) {
240
- return _c("div", {
241
- key: "divider-" + i,
242
- staticClass: "maz-slider__divider",
243
- style: [_vm.dividers[i]],
244
- })
245
- }),
246
- _vm._l(_vm.computedValue, function (btn, i) {
247
- return _c(
248
- "button",
249
- {
250
- key: "cursor-" + i,
251
- ref: "Cursor",
252
- refInFor: true,
253
- staticClass:
254
- "maz-slider__btn maz-flex maz-flex-center maz-bg-color-light",
255
- class: {
256
- "active-cursor": i === _vm.activeCursor && !_vm.noCursorAnim,
257
- },
258
- style: [_vm.buttonStyles[i]],
259
- attrs: { type: "button", "data-label": _vm.getLabel(i) },
260
- on: {
261
- mousedown: function ($event) {
262
- return _vm.handleMousedown($event, i)
263
- },
264
- focus: function ($event) {
265
- return _vm.handleMousedown($event, i)
266
- },
267
- blur: function ($event) {
268
- return _vm.blurCursor(i)
269
- },
270
- keydown: function ($event) {
271
- return _vm.cursorKeyDown($event, i)
272
- },
273
- },
274
- },
275
- [
276
- i === _vm.activeCursor && !_vm.noCursorAnim
277
- ? _c("ArrowIcon", {
278
- attrs: { orientation: "left", size: _vm.sizeValue * 2 },
279
- })
280
- : _vm._e(),
281
- _c("span", { staticClass: "maz-text-color" }, [
282
- _vm._v("\n " + _vm._s(_vm.tmpValues[i]) + "\n "),
283
- ]),
284
- i === _vm.activeCursor && !_vm.noCursorAnim
285
- ? _c("ArrowIcon", {
286
- attrs: { orientation: "right", size: _vm.sizeValue * 2 },
287
- })
288
- : _vm._e(),
289
- ],
290
- 1
291
- )
292
- }),
293
- ],
294
- 2
295
- ),
296
- ]
297
- )
298
- }
299
- var staticRenderFns = []
300
- render._withStripped = true
301
-
302
-
303
- // CONCATENATED MODULE: ./packages/components/MazSlider/_main.vue?vue&type=template&id=13a411ca&
304
-
305
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
306
- var regenerator = __webpack_require__(1);
307
- var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
308
-
309
- // EXTERNAL MODULE: ./packages/components/_subs/ArrowIcon/index.vue + 4 modules
310
- var ArrowIcon = __webpack_require__(7);
311
-
312
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/MazSlider/_main.vue?vue&type=script&lang=js&
313
-
314
-
315
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
316
-
317
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
318
-
319
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
320
-
321
- //
322
- //
323
- //
324
- //
325
- //
326
- //
327
- //
328
- //
329
- //
330
- //
331
- //
332
- //
333
- //
334
- //
335
- //
336
- //
337
- //
338
- //
339
- //
340
- //
341
- //
342
- //
343
- //
344
- //
345
- //
346
- //
347
- //
348
- //
349
- //
350
- //
351
- //
352
- //
353
- //
354
- //
355
- //
356
- //
357
- //
358
- //
359
- //
360
- //
361
- //
362
- //
363
- //
364
- //
365
- //
366
- //
367
- //
368
- //
369
- //
370
- //
371
- //
372
- //
373
- //
374
- //
375
- //
376
-
377
-
378
- var getOpacityCoeff = function getOpacityCoeff(index, middle, length) {
379
- var currentIndex = index + 1;
380
- var isBiggerThanMiddle = middle < currentIndex;
381
- var deviation = isBiggerThanMiddle ? currentIndex - middle : middle - currentIndex;
382
- return 100 / length * deviation / 100;
383
- };
384
-
385
- var isBetween = function isBetween(value, prev, next, direction) {
386
- return direction === 'minus' ? prev ? value >= prev : true : next ? value <= next : true;
387
- };
388
-
389
- /* harmony default export */ var _mainvue_type_script_lang_js_ = ({
390
- name: 'MazSlider',
391
- components: {
392
- ArrowIcon: ArrowIcon["a" /* default */]
393
- },
394
- props: {
395
- // Array of cursors values
396
- value: {
397
- required: true,
398
- validator: function validator(prop) {
399
- return ['number'].includes(_typeof(prop)) || Array.isArray(prop) || prop === null;
400
- }
401
- },
402
- // array of cursors label
403
- labels: {
404
- type: Array,
405
- default: null
406
- },
407
- // min value of sliders
408
- min: {
409
- type: Number,
410
- default: 0
411
- },
412
- // max value of sliders
413
- max: {
414
- type: Number,
415
- default: 100
416
- },
417
- // height size of slider bar
418
- size: {
419
- type: Number,
420
- default: 8
421
- },
422
- // remove div in different colors
423
- noDivider: {
424
- type: Boolean,
425
- default: false
426
- },
427
- // become a logarithmic slider (exponential)
428
- log: {
429
- type: Boolean,
430
- default: false
431
- },
432
- // main slider color
433
- color: {
434
- type: String,
435
- default: 'primary'
436
- },
437
- // disables cursor animation when active
438
- noCursorAnim: {
439
- type: Boolean,
440
- default: false
441
- }
442
- },
443
- data: function data() {
444
- return {
445
- activeCursor: null,
446
- buttonPositions: [],
447
- buttonStyles: [],
448
- tmpValues: null,
449
- dividers: []
450
- };
451
- },
452
- computed: {
453
- computedValue: function computedValue() {
454
- var value = this.value;
455
- return typeof value === 'number' ? [value] : value ? value : [0];
456
- },
457
- minLog: function minLog() {
458
- return Math.log(this.min || 1);
459
- },
460
- maxLog: function maxLog() {
461
- return Math.log(this.max);
462
- },
463
- scale: function scale() {
464
- var minLog = this.minLog,
465
- maxLog = this.maxLog,
466
- min = this.min,
467
- max = this.max;
468
- return (maxLog - minLog) / (max - min);
469
- },
470
- range: function range() {
471
- var min = this.min,
472
- max = this.max;
473
- return max - min;
474
- },
475
- sizeValue: function sizeValue() {
476
- var size = this.size;
477
- return size < 8 ? 8 : size;
478
- },
479
- buttonSize: function buttonSize() {
480
- var size = this.sizeValue;
481
- return {
482
- height: size * 2
483
- };
484
- },
485
- barStyle: function barStyle() {
486
- var size = this.size,
487
- sizeValue = this.sizeValue;
488
- return {
489
- height: "".concat(size, "px"),
490
- fontSize: "".concat(sizeValue, "px")
491
- };
492
- },
493
- wrapperStyle: function wrapperStyle() {
494
- var labels = this.labels,
495
- sizeValue = this.sizeValue,
496
- noCursorAnim = this.noCursorAnim;
497
- return {
498
- padding: "".concat(sizeValue * 1.5, "px ").concat(sizeValue * (noCursorAnim ? 2 : 5.5), "px"),
499
- paddingTop: labels ? "".concat(sizeValue * 4, "px") : "".concat(sizeValue * 1.5, "px")
500
- };
501
- },
502
- hasMultipleValues: function hasMultipleValues() {
503
- return Array.isArray(this.value);
504
- }
505
- },
506
- watch: {
507
- value: {
508
- handler: function handler() {
509
- this.tmpValues = this.computedValue;
510
- },
511
- immediate: true
512
- }
513
- },
514
- mounted: function mounted() {
515
- var buildComponent = this.buildComponent;
516
- buildComponent(true);
517
- window.addEventListener('resize', buildComponent); // watch multiples values
518
-
519
- this.$watch(function (vm) {
520
- return [vm.computedValue, vm.min, vm.max, vm.sizeValue, vm.log].join();
521
- }, function () {
522
- buildComponent(true);
523
- });
524
- },
525
- destroyed: function destroyed() {
526
- var buildComponent = this.buildComponent;
527
- window.removeEventListener('resize', buildComponent);
528
- },
529
- methods: {
530
- cursorKeyDown: function cursorKeyDown(e, i) {
531
- // ArrowLeft
532
- if (e.keyCode === 37) {
533
- e.preventDefault();
534
-
535
- if (isBetween(this.tmpValues[i] - 1, this.tmpValues[i - 1], this.tmpValues[i + 1], 'minus')) {
536
- this.tmpValues[i]--;
537
- this.emitValue(this.tmpValues);
538
- }
539
- } // ArrowRight
540
-
541
-
542
- if (e.keyCode === 39) {
543
- e.preventDefault();
544
-
545
- if (isBetween(this.tmpValues[i] + 1, this.tmpValues[i - 1], this.tmpValues[i + 1], 'plus')) {
546
- this.tmpValues[i]++;
547
- this.emitValue(this.tmpValues);
548
- }
549
- }
550
- },
551
- blurCursor: function blurCursor(i) {
552
- this.activeCursor = null;
553
- this.setBtnStyle(i);
554
- },
555
- buildComponent: function buildComponent(emitValue) {
556
- var _this = this;
557
-
558
- return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
559
- return regenerator_default.a.wrap(function _callee$(_context) {
560
- while (1) {
561
- switch (_context.prev = _context.next) {
562
- case 0:
563
- if (!(emitValue === true)) {
564
- _context.next = 3;
565
- break;
566
- }
567
-
568
- _context.next = 3;
569
- return _this.checkValues();
570
-
571
- case 3:
572
- _context.next = 5;
573
- return _this.calcPos();
574
-
575
- case 5:
576
- _context.next = 7;
577
- return _this.$nextTick();
578
-
579
- case 7:
580
- _this.computedValue.forEach(function (b, i) {
581
- return _this.setBtnDividers(i);
582
- });
583
-
584
- case 8:
585
- case "end":
586
- return _context.stop();
587
- }
588
- }
589
- }, _callee);
590
- }))();
591
- },
592
- checkValues: function checkValues() {
593
- var _this2 = this;
594
-
595
- return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee2() {
596
- var min, max, computedValue, valuesChecked;
597
- return regenerator_default.a.wrap(function _callee2$(_context2) {
598
- while (1) {
599
- switch (_context2.prev = _context2.next) {
600
- case 0:
601
- // check if values are not below the min or above the max
602
- min = _this2.min, max = _this2.max, computedValue = _this2.computedValue;
603
- valuesChecked = computedValue.map(function (v) {
604
- return v < min ? min : v > max ? max : v;
605
- });
606
-
607
- _this2.emitValue(valuesChecked);
608
-
609
- _this2.tmpValues = valuesChecked;
610
-
611
- case 4:
612
- case "end":
613
- return _context2.stop();
614
- }
615
- }
616
- }, _callee2);
617
- }))();
618
- },
619
- emitValue: function emitValue(values) {
620
- var hasMultipleValues = this.hasMultipleValues;
621
- var valueToEmit = hasMultipleValues ? values.slice() : values[0];
622
- this.$emit('input', valueToEmit);
623
- },
624
- getLabel: function getLabel(i) {
625
- var labels = this.labels;
626
- return labels ? labels[i] : null;
627
- },
628
- setBtnDividers: function setBtnDividers(i) {
629
- this.setBtnStyle(i);
630
- if (!this.noDivider) this.setDividers();
631
- },
632
- setBtnStyle: function setBtnStyle(i) {
633
- var _this3 = this;
634
-
635
- return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee3() {
636
- var height, buttonPositions, noCursorAnim, Cursor, width, isActive, btnStyle;
637
- return regenerator_default.a.wrap(function _callee3$(_context3) {
638
- while (1) {
639
- switch (_context3.prev = _context3.next) {
640
- case 0:
641
- _context3.next = 2;
642
- return _this3.$nextTick();
643
-
644
- case 2:
645
- height = _this3.buttonSize.height;
646
- buttonPositions = _this3.buttonPositions, noCursorAnim = _this3.noCursorAnim;
647
- Cursor = _this3.$refs.Cursor; // get width of text in cursor + padding/space
648
-
649
- width = Cursor[i].querySelector('span').clientWidth + 16;
650
- isActive = i === _this3.activeCursor;
651
- btnStyle = {
652
- // 16 = space for arrows
653
- width: "".concat(isActive && !noCursorAnim ? width + 16 : width, "px"),
654
- height: "".concat(height, "px"),
655
- left: "".concat(buttonPositions[i] - width / 2, "px")
656
- };
657
-
658
- _this3.$set(_this3.buttonStyles, i, btnStyle);
659
-
660
- case 9:
661
- case "end":
662
- return _context3.stop();
663
- }
664
- }
665
- }, _callee3);
666
- }))();
667
- },
668
- setDividers: function setDividers() {
669
- var buttonPositions = this.buttonPositions; // remove getters/setters of vue
670
-
671
- var base = buttonPositions.slice(); // add an item to generate one more divider
672
-
673
- base.push(0);
674
- var baseLength = base.length;
675
- var middle = Math.round(baseLength / 2); // generate dividers items with style
676
-
677
- this.dividers = base.map(function (pos, i) {
678
- return {
679
- left: "".concat(i === 0 ? 0 : buttonPositions[i - 1], "px"),
680
- right: "".concat(i + 1 === baseLength ? 0 : 'calc( 100% - ' + pos + 'px )'),
681
- backgroundColor: middle === i + 1 ? null : i < middle // ligthen
682
- ? "rgba(255, 255, 255, ".concat(getOpacityCoeff(i, middle, baseLength), ")") // darken
683
- : "rgba(0, 0, 0, ".concat(getOpacityCoeff(i, middle, baseLength), ")")
684
- };
685
- });
686
- },
687
- calcPos: function calcPos() {
688
- var _this4 = this;
689
-
690
- return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee4() {
691
- var MazSlider, tmpValues, min, scale, range, minLog, max, log, barWidth;
692
- return regenerator_default.a.wrap(function _callee4$(_context4) {
693
- while (1) {
694
- switch (_context4.prev = _context4.next) {
695
- case 0:
696
- _context4.next = 2;
697
- return _this4.$nextTick();
698
-
699
- case 2:
700
- MazSlider = _this4.$refs.MazSlider;
701
- tmpValues = _this4.tmpValues, min = _this4.min, scale = _this4.scale, range = _this4.range, minLog = _this4.minLog, max = _this4.max, log = _this4.log;
702
- barWidth = MazSlider.clientWidth;
703
- _this4.buttonPositions = tmpValues.map(function (v) {
704
- return log ? barWidth / max * (min + (Math.log(v) - minLog) / scale) : barWidth / range * (v - min);
705
- });
706
-
707
- case 6:
708
- case "end":
709
- return _context4.stop();
710
- }
711
- }
712
- }, _callee4);
713
- }))();
714
- },
715
- getCursorsValues: function getCursorsValues() {
716
- var _this5 = this;
717
-
718
- return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee5() {
719
- var range, scale, buttonPositions, max, min, minLog, log, barWidth;
720
- return regenerator_default.a.wrap(function _callee5$(_context5) {
721
- while (1) {
722
- switch (_context5.prev = _context5.next) {
723
- case 0:
724
- _context5.next = 2;
725
- return _this5.$nextTick();
726
-
727
- case 2:
728
- range = _this5.range, scale = _this5.scale, buttonPositions = _this5.buttonPositions, max = _this5.max, min = _this5.min, minLog = _this5.minLog, log = _this5.log;
729
- barWidth = _this5.$refs.MazSlider.clientWidth;
730
- return _context5.abrupt("return", log ? buttonPositions.map(function (pos) {
731
- var position = pos / (barWidth / max);
732
- var value = Math.exp((position - min) * scale + minLog);
733
- return Math.round(value);
734
- }) : buttonPositions.map(function (pos) {
735
- return Math.round(pos / (barWidth / range)) + min;
736
- }));
737
-
738
- case 5:
739
- case "end":
740
- return _context5.stop();
741
- }
742
- }
743
- }, _callee5);
744
- }))();
745
- },
746
- handleMousedown: function handleMousedown(e, i) {
747
- e.preventDefault();
748
- if (this.activeCursor !== null) return;
749
- this.activeCursor = i;
750
- this.setBtnDividers(i);
751
- },
752
- handleMouseup: function handleMouseup() {
753
- var _this6 = this;
754
-
755
- return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee6() {
756
- var activeCursor, getCursorsValues, values;
757
- return regenerator_default.a.wrap(function _callee6$(_context6) {
758
- while (1) {
759
- switch (_context6.prev = _context6.next) {
760
- case 0:
761
- activeCursor = _this6.activeCursor, getCursorsValues = _this6.getCursorsValues;
762
-
763
- if (!(activeCursor === null)) {
764
- _context6.next = 3;
765
- break;
766
- }
767
-
768
- return _context6.abrupt("return");
769
-
770
- case 3:
771
- _context6.next = 5;
772
- return getCursorsValues();
773
-
774
- case 5:
775
- values = _context6.sent;
776
-
777
- // emit values of cursors
778
- // @arg array of numbers
779
- _this6.emitValue(values);
780
-
781
- _this6.activeCursor = null;
782
-
783
- _this6.setBtnDividers(activeCursor);
784
-
785
- case 9:
786
- case "end":
787
- return _context6.stop();
788
- }
789
- }
790
- }, _callee6);
791
- }))();
792
- },
793
- handleMousemove: function handleMousemove(e) {
794
- var _this7 = this;
795
-
796
- return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee7() {
797
- var activeCursor, buttonPositions, getCursorsValues, barWidth, position, prevValue, nextValue;
798
- return regenerator_default.a.wrap(function _callee7$(_context7) {
799
- while (1) {
800
- switch (_context7.prev = _context7.next) {
801
- case 0:
802
- _context7.next = 2;
803
- return _this7.$nextTick();
804
-
805
- case 2:
806
- activeCursor = _this7.activeCursor, buttonPositions = _this7.buttonPositions, getCursorsValues = _this7.getCursorsValues;
807
-
808
- if (!(activeCursor === null)) {
809
- _context7.next = 5;
810
- break;
811
- }
812
-
813
- return _context7.abrupt("return");
814
-
815
- case 5:
816
- _context7.next = 7;
817
- return getCursorsValues();
818
-
819
- case 7:
820
- _this7.tmpValues = _context7.sent;
821
- barWidth = _this7.$refs.MazSlider.clientWidth;
822
- position = buttonPositions[activeCursor];
823
- prevValue = buttonPositions[activeCursor - 1] || 0;
824
- nextValue = buttonPositions[activeCursor + 1] || barWidth;
825
-
826
- buttonPositions[activeCursor] = function () {
827
- var pos = position + e.movementX;
828
-
829
- if (pos < prevValue) {
830
- return prevValue;
831
- } else if (pos > nextValue) {
832
- return nextValue;
833
- }
834
-
835
- return pos;
836
- }();
837
-
838
- _this7.setBtnDividers(activeCursor);
839
-
840
- _this7.buttonPositions = buttonPositions;
841
-
842
- case 15:
843
- case "end":
844
- return _context7.stop();
845
- }
846
- }
847
- }, _callee7);
848
- }))();
849
- }
850
- }
851
- });
852
- // CONCATENATED MODULE: ./packages/components/MazSlider/_main.vue?vue&type=script&lang=js&
853
- /* harmony default export */ var MazSlider_mainvue_type_script_lang_js_ = (_mainvue_type_script_lang_js_);
854
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
855
- var componentNormalizer = __webpack_require__(0);
856
-
857
- // CONCATENATED MODULE: ./packages/components/MazSlider/_main.vue
858
-
859
-
860
-
861
-
862
-
863
- /* normalize component */
864
-
865
- var component = Object(componentNormalizer["a" /* default */])(
866
- MazSlider_mainvue_type_script_lang_js_,
867
- render,
868
- staticRenderFns,
869
- false,
870
- null,
871
- null,
872
- null
873
-
874
- )
875
-
876
- /* hot reload */
877
- if (false) { var api; }
878
- component.options.__file = "packages/components/MazSlider/_main.vue"
879
- /* harmony default export */ var _main = (component.exports);
880
- // CONCATENATED MODULE: ./packages/components/MazSlider/index.js
881
-
882
-
883
- _main.install = function (Vue) {
884
- Vue.component(_main.name, _main);
885
- };
886
-
887
- /* harmony default export */ var components_MazSlider = __webpack_exports__["default"] = (_main);
888
-
889
- /***/ }),
890
-
891
- /***/ 7:
892
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
893
-
894
- "use strict";
895
-
896
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/_subs/ArrowIcon/index.vue?vue&type=template&id=1c91afda&
897
- var render = function () {
898
- var _vm = this
899
- var _h = _vm.$createElement
900
- var _c = _vm._self._c || _h
901
- return _c(
902
- "svg",
903
- {
904
- staticClass: "maz-arrow-icon",
905
- class: [{ "is-white": _vm.dark }, _vm.orientation],
906
- attrs: {
907
- mlns: "http://www.w3.org/2000/svg",
908
- width: _vm.size,
909
- height: _vm.size,
910
- viewBox: "0 0 24 24",
911
- },
912
- },
913
- [
914
- _c("path", {
915
- staticClass: "arrow",
916
- class: [_vm.color],
917
- attrs: {
918
- fill: _vm.color,
919
- d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",
920
- },
921
- }),
922
- _c("path", { attrs: { fill: "none", d: "M0 0h24v24H0V0z" } }),
923
- ]
924
- )
925
- }
926
- var staticRenderFns = []
927
- render._withStripped = true
928
-
929
-
930
- // CONCATENATED MODULE: ./packages/components/_subs/ArrowIcon/index.vue?vue&type=template&id=1c91afda&
931
-
932
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/_subs/ArrowIcon/index.vue?vue&type=script&lang=js&
933
- //
934
- //
935
- //
936
- //
937
- //
938
- //
939
- //
940
- //
941
- //
942
- //
943
- //
944
- //
945
- //
946
- //
947
- //
948
- //
949
- //
950
- //
951
- //
952
- //
953
- //
954
- //
955
- /* harmony default export */ var ArrowIconvue_type_script_lang_js_ = ({
956
- name: 'ArrowIcon',
957
- props: {
958
- dark: {
959
- type: Boolean,
960
- default: false
961
- },
962
- color: {
963
- type: String,
964
- default: null
965
- },
966
- size: {
967
- type: Number,
968
- default: 24
969
- },
970
- orientation: {
971
- type: String,
972
- default: 'bottom'
973
- }
974
- }
975
- });
976
- // CONCATENATED MODULE: ./packages/components/_subs/ArrowIcon/index.vue?vue&type=script&lang=js&
977
- /* harmony default export */ var _subs_ArrowIconvue_type_script_lang_js_ = (ArrowIconvue_type_script_lang_js_);
978
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
979
- var componentNormalizer = __webpack_require__(0);
980
-
981
- // CONCATENATED MODULE: ./packages/components/_subs/ArrowIcon/index.vue
982
-
983
-
984
-
985
-
986
-
987
- /* normalize component */
988
-
989
- var component = Object(componentNormalizer["a" /* default */])(
990
- _subs_ArrowIconvue_type_script_lang_js_,
991
- render,
992
- staticRenderFns,
993
- false,
994
- null,
995
- null,
996
- null
997
-
998
- )
999
-
1000
- /* hot reload */
1001
- if (false) { var api; }
1002
- component.options.__file = "packages/components/_subs/ArrowIcon/index.vue"
1003
- /* harmony default export */ var ArrowIcon = __webpack_exports__["a"] = (component.exports);
1004
-
1005
- /***/ }),
1006
-
1007
- /***/ 9:
1008
- /***/ (function(module, exports) {
1009
-
1010
- module.exports = require("regenerator-runtime");
1011
-
1012
- /***/ })
1013
-
1014
- /******/ });