@quasar/quasar-ui-qiconpicker 2.0.4 → 2.0.5

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/index.esm.js DELETED
@@ -1,568 +0,0 @@
1
- /*!
2
- * @quasar/quasar-ui-qiconpicker v2.0.4
3
- * (c) 2021 Jeff Galbraith <jeff@quasar.dev>
4
- * Released under the MIT License.
5
- */
6
-
7
- import { defineComponent, ref, reactive, computed, onMounted, watch, nextTick, h, Transition } from 'vue';
8
- import { QScrollArea, QResizeObserver, QPagination, QBtn, QTooltip } from 'quasar';
9
-
10
- /**
11
- * QIconPicker Properties
12
- */
13
- var useIconPickerProps = {
14
- modelValue: String,
15
- iconSet: {
16
- type: String,
17
- validator: function (v) { return [
18
- 'material-icons',
19
- 'material-icons-outlined',
20
- 'material-icons-round',
21
- 'material-icons-sharp',
22
- 'ionicons-v4',
23
- 'mdi-v4',
24
- 'mdi-v5',
25
- 'mdi-v6',
26
- 'fontawesome-v5',
27
- 'eva-icons',
28
- 'themify',
29
- 'line-awesome',
30
- 'bootstrap-icons',
31
- ''
32
- ].includes(v); },
33
- default: ''
34
- },
35
- icons: Array,
36
- filter: String,
37
- tags: Array,
38
- dense: Boolean,
39
- tooltips: Boolean,
40
- noFooter: Boolean,
41
- size: {
42
- type: String,
43
- default: 'inherit'
44
- },
45
- color: String,
46
- textColor: String,
47
- selectedColor: {
48
- type: String,
49
- default: 'primary'
50
- },
51
- selectedTextColor: {
52
- type: String,
53
- default: 'grey-1'
54
- },
55
- paginationProps: {
56
- type: Object,
57
- default: function () { return ({
58
- maxPages: 5,
59
- input: true
60
- }); }
61
- },
62
- modelPagination: Object,
63
- animated: Boolean,
64
- transitionPrev: {
65
- type: String,
66
- default: 'slide-right'
67
- },
68
- transitionNext: {
69
- type: String,
70
- default: 'slide-left'
71
- }
72
- };
73
-
74
- var direction = {
75
- NEXT: 'next',
76
- PREV: 'prev'
77
- };
78
-
79
- /**
80
- * Pagination
81
- */
82
- function useIconPickerPagination(data, props, emit, computedFilteredIcons) {
83
-
84
- function fixPagination(p) {
85
- if (p.page < 1) {
86
- p.page = 1;
87
- }
88
- if (p.itemsPerPage === void 0 || p.itemsPerPage < 1) {
89
- p.itemsPerPage = 0; // all
90
- }
91
- return p
92
- }
93
-
94
- // returns true if the pagination is the same,
95
- // otherwise returns false if it has changed
96
- function samePagination(oldPag, newPag) {
97
- for (var prop in newPag) {
98
- if (newPag[ prop ] !== oldPag[ prop ]) {
99
- return false
100
- }
101
- }
102
- return true
103
- }
104
-
105
- var computedPagination = computed(function () {
106
- return fixPagination(Object.assign({}, data.innerPagination,
107
- props.modelPagination))
108
- });
109
-
110
- var computedPagesNumber = computed(function () {
111
- return computedPagination.value.itemsPerPage === 0 ? 1
112
- : Math.max(1, Math.ceil(computedFilteredIcons.value.length / computedPagination.value.itemsPerPage))
113
- });
114
-
115
- function setPagination(val) {
116
- var newPagination = fixPagination(Object.assign({}, computedPagination.value,
117
- val));
118
-
119
- if (!samePagination(data.innerPagination, newPagination)) {
120
- if (props.modelPagination) {
121
- emit('update:model-pagination', newPagination);
122
- }
123
- data.innerPagination = newPagination;
124
- }
125
- }
126
-
127
- function updatePagination() {
128
- if (props.modelPagination !== void 0) {
129
- setPagination({ total: computedFilteredIcons.value.length, totalPages: computedPagesNumber.value });
130
- }
131
- }
132
-
133
- return {
134
- samePagination: samePagination,
135
- computedPagination: computedPagination,
136
- setPagination: setPagination,
137
- updatePagination: updatePagination,
138
- computedPagesNumber: computedPagesNumber
139
- }
140
- }
141
-
142
- /**
143
- * Icons
144
- */
145
- function useIconPickerIcons(data, props, computedFirstItemIndex, computedLastItemIndex) {
146
-
147
- function loadIconSet(iconSet) {
148
- data.iconsList = [];
149
- if (iconSet) {
150
- // detect if UMD version is installed
151
- if (window.QIconPicker) {
152
- var name = iconSet.replace(/-([a-z])/g, function (g) { return g[ 1 ].toUpperCase(); });
153
- if (window.QIconPicker.iconSet && window.QIconPicker.iconSet[ name ]) {
154
- data.iconsList = window.QIconPicker.iconSet[ name ].icons;
155
- }
156
- else {
157
- console.error(("QIconPicker: no icon set loaded called " + iconSet));
158
- console.error('Be sure to load the UMD version of the icon set in a script tag before using QIconPicker UMD version');
159
- }
160
- }
161
- else {
162
- try {
163
- data.iconsList = require(("@quasar/quasar-ui-qiconpicker/src/components/icon-set/" + iconSet + ".js")).default.icons;
164
- }
165
- catch (e) {
166
- console.error(("QIconPicker: cannot find icon set found called " + iconSet));
167
- }
168
- }
169
- }
170
- console.info(("Loaded " + (data.iconsList.length) + " icons."));
171
- }
172
-
173
- var computedDisplayedIcons = computed(function () {
174
- var icons = [];
175
- if (data.iconsList) {
176
- icons = computedFilteredIcons.value;
177
-
178
- // should the icons be paged?
179
- if (props.modelPagination && props.modelPagination.itemsPerPage !== 0) {
180
- icons = icons.slice(computedFirstItemIndex.value, computedLastItemIndex.value);
181
- }
182
- }
183
- return icons
184
- });
185
-
186
- var computedFilteredIcons = computed(function () {
187
- var icons = data.iconsList;
188
- if (icons) {
189
- if (props.tags !== void 0 && props.tags !== '' && props.tags !== null && props.tags.length > 0) {
190
- icons = icons.filter(function (icon) {
191
- return icon.tags.filter(function (tag) { return props.tags.includes(tag); }).length > 0
192
- });
193
- }
194
- if (props.filter !== void 0 && props.filter !== '' && props.filter !== null) {
195
- icons = icons.filter(function (icon) { return icon.name.includes(props.filter); });
196
- }
197
- }
198
- return icons
199
- });
200
-
201
- function categories() {
202
- var t = [];
203
- data.iconsList.forEach(function (icon) {
204
- var tags = icon.tags;
205
- if (tags && tags.length > 0) {
206
- tags.forEach(function (tag) {
207
- if (t.includes(tag) !== true) {
208
- t.push(tag);
209
- }
210
- });
211
- }
212
- });
213
- t.sort();
214
- data.categories = t;
215
- return true
216
- }
217
-
218
- return {
219
- loadIconSet: loadIconSet,
220
- computedDisplayedIcons: computedDisplayedIcons,
221
- computedFilteredIcons: computedFilteredIcons,
222
- categories: categories
223
- }
224
- }
225
-
226
- /**
227
- * Exposes api functions
228
- */
229
- function exposeIconPickerApi(data, expose, computedPagination, setPagination, computedFirstItemIndex, computedLastItemIndex, computedFilteredIcons, computedPagesNumber) {
230
- // goes to previous page
231
- var prevPage = function () {
232
- var ref = computedPagination.value;
233
- var page = ref.page;
234
- if (page > 1) {
235
- setPagination({ page: page - 1 });
236
- data.direction = direction.PREV;
237
- }
238
- };
239
-
240
- // goes to next page
241
- var nextPage = function () {
242
- var ref = computedPagination.value;
243
- var page = ref.page;
244
- var itemsPerPage = ref.itemsPerPage;
245
- if (computedLastItemIndex.value > 0 && page * itemsPerPage < computedFilteredIcons.value.length) {
246
- setPagination({ page: page + 1 });
247
- data.direction = direction.NEXT;
248
- }
249
- };
250
-
251
- // goes to last page
252
- var lastPage = function () {
253
- setPagination({ page: computedPagesNumber.value });
254
- };
255
-
256
- // goes to first page
257
- var firstPage = function () {
258
- setPagination({ page: 0 });
259
- };
260
-
261
- // checks if we are on the last page
262
- var isLastPage = computed(function () {
263
- return computedLastItemIndex.value === 0
264
- ? true
265
- : computedPagination.value.page >= computedPagesNumber.value
266
- });
267
-
268
-
269
- // checks if we are on the first page
270
- var isFirstPage = computed(function () {
271
- return computedPagination.value.page === 1
272
- });
273
-
274
- expose({
275
- prevPage: prevPage,
276
- nextPage: nextPage,
277
- lastPage: lastPage,
278
- firstPage: firstPage,
279
- isLastPage: isLastPage,
280
- isFirstPage: isFirstPage
281
- });
282
- }
283
-
284
-
285
- var QIconPicker = defineComponent({
286
- name: 'QIconPicker',
287
-
288
- props: Object.assign({}, useIconPickerProps),
289
-
290
- emits: [
291
- 'update:model-value',
292
- 'update:tags',
293
- 'update:model-pagination'
294
- ],
295
-
296
- setup: function setup(props, ref$1) {
297
- var slots = ref$1.slots;
298
- var emit = ref$1.emit;
299
- var expose = ref$1.expose;
300
-
301
- var scrollAreaRef = ref(null);
302
- var data = reactive({
303
- iconsList: [],
304
- innerPagination: {
305
- page: 1,
306
- itemsPerPage: 0,
307
- totalPages: 0
308
- },
309
- categories: [],
310
- width: '100',
311
- height: '100',
312
- direction: ''
313
- });
314
-
315
- // index of first item on a page
316
- var computedFirstItemIndex = computed(function () {
317
- var ref = computedPagination.value;
318
- var page = ref.page;
319
- var itemsPerPage = ref.itemsPerPage;
320
- return (page - 1) * itemsPerPage
321
- });
322
-
323
- // index of last item on a page
324
- var computedLastItemIndex = computed(function () {
325
- var ref = computedPagination.value;
326
- var page = ref.page;
327
- var itemsPerPage = ref.itemsPerPage;
328
- return page * itemsPerPage
329
- });
330
-
331
- var ref$2 = useIconPickerIcons(data, props, computedFirstItemIndex, computedLastItemIndex);
332
- var loadIconSet = ref$2.loadIconSet;
333
- var computedDisplayedIcons = ref$2.computedDisplayedIcons;
334
- var computedFilteredIcons = ref$2.computedFilteredIcons;
335
- var categories = ref$2.categories;
336
-
337
- var ref$3 = useIconPickerPagination(data, props, emit, computedFilteredIcons);
338
- var samePagination = ref$3.samePagination;
339
- var computedPagination = ref$3.computedPagination;
340
- var setPagination = ref$3.setPagination;
341
- var updatePagination = ref$3.updatePagination;
342
- var computedPagesNumber = ref$3.computedPagesNumber;
343
-
344
- exposeIconPickerApi(data, expose, computedPagination, setPagination, computedFirstItemIndex, computedLastItemIndex, computedFilteredIcons, computedPagesNumber);
345
-
346
- onMounted(function () {
347
- if (props.iconSet) {
348
- loadIconSet(props.iconSet);
349
- }
350
- else if (props.icons !== void 0 && props.icons.length > 0) {
351
- data.iconsList = props.icons;
352
- }
353
- updatePagination();
354
- });
355
-
356
-
357
- watch(function () { return props.iconSet; }, function (val) {
358
- if (val) {
359
- loadIconSet(val);
360
- updatePagination();
361
- nextTick(function () {
362
- // whenever the icon set changes, it resets pagination page to page 1
363
- setPagination({ page: 1 });
364
- }).catch(function (e) { return console.error(e); });
365
- // scroll to top of QScrollArea, if applicable
366
- if(scrollAreaRef.value) {
367
- scrollAreaRef.value.setScrollPosition(0);
368
- }
369
- }
370
- });
371
-
372
- watch(function () { return props.icons; }, function (val) {
373
- if (props.icons !== void 0 && props.icons.length > 0) {
374
- data.iconsList = props.icons;
375
- }
376
- updatePagination();
377
- nextTick(function () {
378
- // whenever the icon set changes, it resets pagination page to page 1
379
- setPagination({ page: 1 });
380
- }).catch(function (e) { return console.error(e); });
381
- // scroll to top of QScrollArea, if applicable
382
- if(scrollAreaRef.value) {
383
- scrollAreaRef.value.setScrollPosition(0);
384
- }
385
- });
386
-
387
- watch(function () { return props.filter; }, function () {
388
- // whenever the filter changes, it resets pagination page to page 1
389
- setPagination({ page: 1, totalPages: computedPagesNumber.value });
390
- updatePagination();
391
- });
392
-
393
- watch(function () { return props.tags; }, function (val) {
394
- // whenever the tags change, it resets pagination page to page 1
395
- setPagination({ page: 1, totalPages: computedPagesNumber.value });
396
- updatePagination();
397
- });
398
-
399
- if (props.modelPagination) {
400
- watch(function () { return props.modelPagination; }, function (newVal, oldVal) {
401
- if (!samePagination(oldVal, newVal)) {
402
- updatePagination();
403
- }
404
- });
405
- }
406
-
407
- if (props.modelPagination) {
408
- watch(function () { return props.modelPagination.itemsPerPage; }, function () {
409
- updatePagination();
410
- });
411
-
412
- watch(function () { return props.modelPagination.page; }, function () {
413
- updatePagination();
414
- });
415
- }
416
-
417
- return function () {
418
-
419
- function renderPagination() {
420
- if (props.modelPagination && props.modelPagination.itemsPerPage === 0) { return '' }
421
- var slot = (slots.pagination && slots.pagination());
422
- var ref = computedPagination.value;
423
- var page = ref.page;
424
- var totalPages = ref.totalPages;
425
-
426
- return slot || h(QPagination, Object.assign({}, {class: 'q-icon-picker__pagination'},
427
- props.paginationProps,
428
- {modelValue: page,
429
- max: totalPages,
430
- 'onUpdate:modelValue': function (value) {
431
- if (props.animated) {
432
- if (value > page) {
433
- data.direction = direction.NEXT;
434
- }
435
- else {
436
- data.direction = direction.PREV;
437
- }
438
- }
439
- setPagination({ page: value });
440
- }}))
441
- }
442
-
443
- function renderFooter() {
444
- if (props.noFooter !== true && props.modelPagination !== void 0) {
445
- var slot = (slots.footer && slots.footer());
446
-
447
- return h('div', {
448
- class: 'q-icon-picker__footer flex flex-center'
449
- }, [
450
- slot ? slot(computedPagination.value) : renderPagination()
451
- ])
452
- }
453
- }
454
-
455
- function renderTooltip(name) {
456
- if (props.tooltips === true) {
457
- return function () { return h(QTooltip, {}, function () { return name; }); }
458
- }
459
- }
460
-
461
- function renderIcon(icon) {
462
- var name = (icon.prefix !== void 0 ? icon.prefix + ' ' + icon.name : icon.name);
463
-
464
- if (slots.icon && slots.icon()) {
465
- return slots.icon(name)
466
- }
467
- var isSelected = name === props.modelValue;
468
- var textColor = isSelected ? props.selectedTextColor : undefined;
469
- var color = isSelected ? props.selectedColor : undefined;
470
- var size = props.size ? props.size : undefined;
471
-
472
- return h(QBtn, {
473
- id: name,
474
- unelevated: true,
475
- dense: props.dense,
476
- noWrap: true,
477
- size: size,
478
- textColor: textColor,
479
- color: color,
480
- icon: name,
481
- onClick: function () { return emit('update:model-value', name); },
482
- }, renderTooltip(name))
483
- }
484
-
485
- function renderIcons() {
486
- return computedDisplayedIcons.value.map(function (icon) { return renderIcon(icon); })
487
- }
488
-
489
- function renderContainer() {
490
- var container = function () { return h('div', {
491
- key: computedPagination.value.page,
492
- class: 'q-icon-picker__container col'
493
- }, [].concat( renderIcons() )); };
494
-
495
- if (props.animated === true) {
496
- var transition = 'q-transition--' + (data.direction === 'prev' ? props.transitionPrev : props.transitionNext);
497
- return function () { return h(Transition, {
498
- name: transition,
499
- appear: true
500
- }, container); }
501
- }
502
-
503
- return container
504
- }
505
-
506
-
507
- function renderScrollArea() {
508
- return h(QScrollArea, {
509
- ref: scrollAreaRef,
510
- style: {
511
- width: data.width + 'px',
512
- height: data.height + 'px'
513
- }
514
- }, renderContainer())
515
- }
516
-
517
- function renderBody() {
518
- return h('div', {
519
- class: 'q-icon-picker__body col column'
520
- }, [
521
- renderScrollArea(),
522
- h(QResizeObserver, {
523
- onResize: function (size) {
524
- data.width = size.width;
525
- data.height = size.height;
526
- }
527
- })
528
- ])
529
- }
530
-
531
- var classes = [
532
- 'q-icon-picker',
533
- 'column'
534
- ];
535
- if (props.color) { classes.push('bg-' + props.color); }
536
- if (props.textColor) { classes.push('text-' + props.textColor); }
537
-
538
- var picker = h('div', {
539
- class: classes.join(' ')
540
- }, [
541
- renderBody(),
542
- renderFooter()
543
- ]);
544
-
545
- nextTick(function () {
546
- categories();
547
- emit('update:tags', data.categories);
548
- }).catch(function (e) { return console.error(e); });
549
-
550
- return picker
551
- }
552
- }
553
- });
554
-
555
- var version = '2.0.4';
556
-
557
- function install (app) {
558
- app.component(QIconPicker.name, QIconPicker);
559
- }
560
-
561
- var VuePlugin = /*#__PURE__*/Object.freeze({
562
- __proto__: null,
563
- version: version,
564
- QIconPicker: QIconPicker,
565
- install: install
566
- });
567
-
568
- export { QIconPicker, VuePlugin as default, install, version };
@@ -1,6 +0,0 @@
1
- /*!
2
- * @quasar/quasar-ui-qiconpicker v2.0.4
3
- * (c) 2021 Jeff Galbraith <jeff@quasar.dev>
4
- * Released under the MIT License.
5
- */
6
- import{defineComponent,ref,reactive,computed,onMounted,watch,nextTick,h,Transition}from"vue";import{QScrollArea,QResizeObserver,QPagination,QBtn,QTooltip}from"quasar";var useIconPickerProps={modelValue:String,iconSet:{type:String,validator:function(e){return["material-icons","material-icons-outlined","material-icons-round","material-icons-sharp","ionicons-v4","mdi-v4","mdi-v5","mdi-v6","fontawesome-v5","eva-icons","themify","line-awesome","bootstrap-icons",""].includes(e)},default:""},icons:Array,filter:String,tags:Array,dense:Boolean,tooltips:Boolean,noFooter:Boolean,size:{type:String,default:"inherit"},color:String,textColor:String,selectedColor:{type:String,default:"primary"},selectedTextColor:{type:String,default:"grey-1"},paginationProps:{type:Object,default:function(){return{maxPages:5,input:!0}}},modelPagination:Object,animated:Boolean,transitionPrev:{type:String,default:"slide-right"},transitionNext:{type:String,default:"slide-left"}},direction={NEXT:"next",PREV:"prev"};function useIconPickerPagination(n,t,i,e){function o(e){return e.page<1&&(e.page=1),(void 0===e.itemsPerPage||e.itemsPerPage<1)&&(e.itemsPerPage=0),e}function a(e,n){for(var t in n)if(n[t]!==e[t])return!1;return!0}var r=computed(function(){return o(Object.assign({},n.innerPagination,t.modelPagination))}),c=computed(function(){return 0===r.value.itemsPerPage?1:Math.max(1,Math.ceil(e.value.length/r.value.itemsPerPage))});function u(e){e=o(Object.assign({},r.value,e));a(n.innerPagination,e)||(t.modelPagination&&i("update:model-pagination",e),n.innerPagination=e)}function s(){void 0!==t.modelPagination&&u({total:e.value.length,totalPages:c.value})}return{samePagination:a,computedPagination:r,setPagination:u,updatePagination:s,computedPagesNumber:c}}function useIconPickerIcons(t,n,i,o){function e(n){if(t.iconsList=[],n)if(window.QIconPicker){var e=n.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()});window.QIconPicker.iconSet&&window.QIconPicker.iconSet[e]?t.iconsList=window.QIconPicker.iconSet[e].icons:(console.error("QIconPicker: no icon set loaded called "+n),console.error("Be sure to load the UMD version of the icon set in a script tag before using QIconPicker UMD version"))}else try{t.iconsList=require("@quasar/quasar-ui-qiconpicker/src/components/icon-set/"+n+".js").default.icons}catch(e){console.error("QIconPicker: cannot find icon set found called "+n)}console.info("Loaded "+t.iconsList.length+" icons.")}var a=computed(function(){var e=[];return t.iconsList&&(e=r.value,n.modelPagination&&0!==n.modelPagination.itemsPerPage&&(e=e.slice(i.value,o.value))),e}),r=computed(function(){var e=t.iconsList;return e&&(void 0!==n.tags&&""!==n.tags&&null!==n.tags&&n.tags.length>0&&(e=e.filter(function(e){return e.tags.filter(function(e){return n.tags.includes(e)}).length>0})),void 0!==n.filter&&""!==n.filter&&null!==n.filter&&(e=e.filter(function(e){return e.name.includes(n.filter)}))),e});function c(){var n=[];return t.iconsList.forEach(function(e){e=e.tags;e&&e.length>0&&e.forEach(function(e){!0!==n.includes(e)&&n.push(e)})}),n.sort(),t.categories=n,!0}return{loadIconSet:e,computedDisplayedIcons:a,computedFilteredIcons:r,categories:c}}function exposeIconPickerApi(t,e,i,o,n,a,r,c){var u=function(){var e=i.value,e=e.page;e>1&&(o({page:e-1}),t.direction=direction.PREV)},s=function(){var e=i.value,n=e.page,e=e.itemsPerPage;a.value>0&&n*e<r.value.length&&(o({page:n+1}),t.direction=direction.NEXT)},l=function(){o({page:c.value})},g=function(){o({page:0})},d=computed(function(){return 0===a.value||i.value.page>=c.value}),f=computed(function(){return 1===i.value.page});e({prevPage:u,nextPage:s,lastPage:l,firstPage:g,isLastPage:d,isFirstPage:f})}var QIconPicker=defineComponent({name:"QIconPicker",props:Object.assign({},useIconPickerProps),emits:["update:model-value","update:tags","update:model-pagination"],setup:function(s,e){var l=e.slots,g=e.emit,n=e.expose,d=ref(null),f=reactive({iconsList:[],innerPagination:{page:1,itemsPerPage:0,totalPages:0},categories:[],width:"100",height:"100",direction:""}),t=computed(function(){var e=v.value,n=e.page,e=e.itemsPerPage;return(n-1)*e}),i=computed(function(){var e=v.value,n=e.page,e=e.itemsPerPage;return n*e}),o=useIconPickerIcons(f,s,t,i),a=o.loadIconSet,p=o.computedDisplayedIcons,e=o.computedFilteredIcons,P=o.categories,o=useIconPickerPagination(f,s,g,e),r=o.samePagination,v=o.computedPagination,m=o.setPagination,c=o.updatePagination,u=o.computedPagesNumber;return exposeIconPickerApi(f,n,v,m,t,i,e,u),onMounted(function(){s.iconSet?a(s.iconSet):void 0!==s.icons&&s.icons.length>0&&(f.iconsList=s.icons),c()}),watch(function(){return s.iconSet},function(e){e&&(a(e),c(),nextTick(function(){m({page:1})}).catch(function(e){return console.error(e)}),d.value&&d.value.setScrollPosition(0))}),watch(function(){return s.icons},function(e){void 0!==s.icons&&s.icons.length>0&&(f.iconsList=s.icons),c(),nextTick(function(){m({page:1})}).catch(function(e){return console.error(e)}),d.value&&d.value.setScrollPosition(0)}),watch(function(){return s.filter},function(){m({page:1,totalPages:u.value}),c()}),watch(function(){return s.tags},function(e){m({page:1,totalPages:u.value}),c()}),s.modelPagination&&watch(function(){return s.modelPagination},function(e,n){r(n,e)||c()}),s.modelPagination&&(watch(function(){return s.modelPagination.itemsPerPage},function(){c()}),watch(function(){return s.modelPagination.page},function(){c()})),function(){function n(){if(s.modelPagination&&0===s.modelPagination.itemsPerPage)return"";var e=l.pagination&&l.pagination(),n=v.value,t=n.page,n=n.totalPages;return e||h(QPagination,Object.assign({},{class:"q-icon-picker__pagination"},s.paginationProps,{modelValue:t,max:n,"onUpdate:modelValue":function(e){s.animated&&(f.direction=e>t?direction.NEXT:direction.PREV),m({page:e})}}))}function e(){if(!0!==s.noFooter&&void 0!==s.modelPagination){var e=l.footer&&l.footer();return h("div",{class:"q-icon-picker__footer flex flex-center"},[e?e(v.value):n()])}}function o(e){if(!0===s.tooltips)return function(){return h(QTooltip,{},function(){return e})}}function t(e){var n=void 0!==e.prefix?e.prefix+" "+e.name:e.name;if(l.icon&&l.icon())return l.icon(n);var t=n===s.modelValue,i=t?s.selectedTextColor:void 0,e=t?s.selectedColor:void 0,t=s.size||void 0;return h(QBtn,{id:n,unelevated:!0,dense:s.dense,noWrap:!0,size:t,textColor:i,color:e,icon:n,onClick:function(){return g("update:model-value",n)}},o(n))}function i(){return p.value.map(function(e){return t(e)})}function a(){var e=function(){return h("div",{key:v.value.page,class:"q-icon-picker__container col"},[].concat(i()))};if(!0!==s.animated)return e;var n="q-transition--"+("prev"===f.direction?s.transitionPrev:s.transitionNext);return function(){return h(Transition,{name:n,appear:!0},e)}}function r(){return h(QScrollArea,{ref:d,style:{width:f.width+"px",height:f.height+"px"}},a())}function c(){return h("div",{class:"q-icon-picker__body col column"},[r(),h(QResizeObserver,{onResize:function(e){f.width=e.width,f.height=e.height}})])}var u=["q-icon-picker","column"];s.color&&u.push("bg-"+s.color),s.textColor&&u.push("text-"+s.textColor);u=h("div",{class:u.join(" ")},[c(),e()]);return nextTick(function(){P(),g("update:tags",f.categories)}).catch(function(e){return console.error(e)}),u}}}),version="2.0.4";function install(e){e.component(QIconPicker.name,QIconPicker)}var VuePlugin=Object.freeze({__proto__:null,version:version,QIconPicker:QIconPicker,install:install});export{QIconPicker,VuePlugin as default,install,version};