@quasar/quasar-ui-qiconpicker 2.0.7 → 3.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +49 -253
  2. package/dist/api/QIconPicker.json +26 -40
  3. package/dist/index.cjs.js +460 -543
  4. package/dist/index.cjs.min.js +3 -3
  5. package/dist/index.css +2 -2
  6. package/dist/index.esm.js +479 -548
  7. package/dist/index.esm.min.js +3 -3
  8. package/dist/index.min.css +2 -2
  9. package/dist/index.rtl.css +2 -2
  10. package/dist/index.rtl.min.css +2 -2
  11. package/dist/index.umd.js +484 -564
  12. package/dist/index.umd.min.js +3 -3
  13. package/dist/types/index.d.ts +17 -19
  14. package/dist/types/types.d.ts +37 -37
  15. package/package.json +92 -82
  16. package/src/components/QIconPicker.json +180 -0
  17. package/src/components/QIconPicker.scss +37 -0
  18. package/src/components/QIconPicker.ts +574 -0
  19. package/src/components/icon-set-loader.ts +269 -0
  20. package/src/{index.cjs.js → index.cjs.ts} +0 -1
  21. package/src/{index.esm.js → index.esm.ts} +0 -1
  22. package/src/index.scss +1 -0
  23. package/src/index.ts +16 -0
  24. package/src/{index.umd.js → index.umd.ts} +1 -2
  25. package/src/version.ts +1 -0
  26. package/src/vue-plugin.ts +10 -0
  27. package/dist/icon-set/bootstrap-icons.umd.js +0 -6
  28. package/dist/icon-set/eva-icons.umd.js +0 -6
  29. package/dist/icon-set/fontawesome-v5.umd.js +0 -6
  30. package/dist/icon-set/ionicons-v4.umd.js +0 -6
  31. package/dist/icon-set/line-awesome.umd.js +0 -6
  32. package/dist/icon-set/material-icons-outlined.umd.js +0 -6
  33. package/dist/icon-set/material-icons-round.umd.js +0 -6
  34. package/dist/icon-set/material-icons-sharp.umd.js +0 -6
  35. package/dist/icon-set/material-icons.umd.js +0 -6
  36. package/dist/icon-set/mdi-v4.umd.js +0 -6
  37. package/dist/icon-set/mdi-v5.umd.js +0 -6
  38. package/dist/icon-set/mdi-v6.umd.js +0 -6
  39. package/dist/icon-set/themify.umd.js +0 -6
  40. package/dist/types/ts-helpers.d.ts +0 -14
  41. package/dist/types/tsconfig.json +0 -7
  42. package/dist/vetur/attributes.json +0 -74
  43. package/dist/vetur/tags.json +0 -25
  44. package/src/components/QIconPicker.js +0 -544
  45. package/src/components/QIconPicker.sass +0 -32
  46. package/src/components/icon-set/bootstrap-icons.js +0 -1959
  47. package/src/components/icon-set/eva-icons.js +0 -495
  48. package/src/components/icon-set/fontawesome-v5.js +0 -1467
  49. package/src/components/icon-set/ionicons-v4.js +0 -701
  50. package/src/components/icon-set/line-awesome.js +0 -1403
  51. package/src/components/icon-set/material-icons-outlined.js +0 -2126
  52. package/src/components/icon-set/material-icons-round.js +0 -2130
  53. package/src/components/icon-set/material-icons-sharp.js +0 -2128
  54. package/src/components/icon-set/material-icons.js +0 -2143
  55. package/src/components/icon-set/mdi-v4.js +0 -5000
  56. package/src/components/icon-set/mdi-v5.js +0 -5960
  57. package/src/components/icon-set/mdi-v6.js +0 -6801
  58. package/src/components/icon-set/themify.js +0 -357
  59. package/src/index.js +0 -17
  60. package/src/index.sass +0 -2
  61. package/src/version.js +0 -1
  62. package/src/vue-plugin.js +0 -14
  63. package/types/types.d.ts +0 -152
package/README.md CHANGED
@@ -1,297 +1,93 @@
1
- QIconPicker (Quasar v2, UMD and Vue v3 Compatible)
2
- ===
1
+ # QIconPicker
3
2
 
4
- [![npm](https://img.shields.io/npm/v/@quasar/quasar-ui-qiconpicker/next?label=@quasar/quasar-ui-qiconpicker)](https://www.npmjs.com/package/@quasar/quasar-ui-qiconpicker)
5
- [![npm](https://img.shields.io/npm/dt/@quasar/quasar-ui-qiconpicker.svg)](https://www.npmjs.com/package/@quasar/quasar-ui-qiconpicker)
6
-
7
- QIconPicker is a [Quasar](https://quasar.dev) component. It gives an Icon Picker for your apps.
3
+ QIconPicker is a Quasar component that provides an icon picker for Vue and Quasar applications.
8
4
 
9
- ![QIconPicker](https://raw.githubusercontent.com/quasarframework/quasar-ui-qiconpicker/dev/demo/public/q-icon-picker.png)
5
+ [![npm](https://img.shields.io/npm/v/@quasar/quasar-ui-qiconpicker/next?label=@quasar/quasar-ui-qiconpicker)](https://www.npmjs.com/package/@quasar/quasar-ui-qiconpicker)
6
+ [![npm](https://img.shields.io/npm/dt/@quasar/quasar-ui-qiconpicker)](https://www.npmjs.com/package/@quasar/quasar-ui-qiconpicker)
10
7
 
11
- # Examples and Documentation
12
- Can be found [here](https://quasarframework.github.io/quasar-ui-qiconpicker)
8
+ [![Discord](https://img.shields.io/badge/discord-join%20server-738ADB?style=for-the-badge&logo=discord&logoColor=738ADB)](https://chat.quasar.dev)
9
+ [![X](https://img.shields.io/badge/follow-@jgalbraith64-1DA1F2?style=for-the-badge&logo=x&logoColor=1DA1F2)](https://twitter.com/jgalbraith64)
13
10
 
14
- # Usage
11
+ ## Usage
15
12
 
16
- ## Quasar CLI project
13
+ ### Quasar CLI Project
17
14
 
18
15
  Install the [App Extension](../app-extension).
19
16
 
20
- **OR**:
21
-
22
- Create and register a boot file:
23
-
24
- ```js
25
- import Vue from 'vue'
26
- import Plugin from '@quasar/quasar-ui-qiconpicker'
27
- import '@quasar/quasar-ui-qiconpicker/dist/index.css'
28
-
29
- Vue.use(Plugin)
30
- ```
31
-
32
- **OR**:
33
-
34
- ```html
35
- <style src="@quasar/quasar-ui-qiconpicker/dist/index.css"></style>
36
-
37
- <script>
38
- import { QIconPicker } from '@quasar/quasar-ui-qiconpicker'
17
+ Or install the UI package directly:
39
18
 
40
- export default {
41
- components: {
42
- QIconPicker
43
- }
44
- }
45
- </script>
19
+ ```bash
20
+ pnpm add @quasar/quasar-ui-qiconpicker
21
+ # yarn add @quasar/quasar-ui-qiconpicker
22
+ # npm install @quasar/quasar-ui-qiconpicker
23
+ # bun add @quasar/quasar-ui-qiconpicker
46
24
  ```
47
25
 
48
- ## Vue CLI project
26
+ Then create and register a boot file:
49
27
 
50
28
  ```js
51
- import Vue from 'vue'
52
- import Plugin from '@quasar/quasar-ui-qiconpicker'
29
+ import { defineBoot } from '#q-app'
30
+ import VuePlugin from '@quasar/quasar-ui-qiconpicker'
53
31
  import '@quasar/quasar-ui-qiconpicker/dist/index.css'
54
32
 
55
- Vue.use(Plugin)
33
+ export default defineBoot(({ app }) => {
34
+ app.use(VuePlugin)
35
+ })
56
36
  ```
57
37
 
58
- **OR**:
38
+ ### Vue 3 Project
59
39
 
60
- ```html
61
- <style src="@quasar/quasar-ui-qiconpicker/dist/index.css"></style>
40
+ ```js
41
+ import { createApp } from 'vue'
42
+ import VuePlugin from '@quasar/quasar-ui-qiconpicker'
43
+ import '@quasar/quasar-ui-qiconpicker/dist/index.css'
44
+ import App from './App.vue'
62
45
 
63
- <script>
64
- import { QIconPicker } from '@quasar/quasar-ui-qiconpicker'
46
+ const app = createApp(App)
65
47
 
66
- export default {
67
- components: {
68
- QIconPicker
69
- }
70
- }
71
- </script>
48
+ app.use(VuePlugin)
49
+ app.mount('#app')
72
50
  ```
73
51
 
74
- ### Caching
75
-
76
- If you are using a large icon set and find it is taking too long to load, you can pre-cache the UMD variant.
77
-
78
- You can do this by adding to your **App.vue** (or, any other appropriate) file:
52
+ ### Component Import
79
53
 
80
54
  ```html
81
- <template>
82
- <div id="q-app">
83
- <router-view />
84
- </div>
85
- </template>
55
+ <style src="@quasar/quasar-ui-qiconpicker/dist/index.css"></style>
86
56
 
87
- <script>
88
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/eva-icons.umd.js'
89
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/fontawesome-v5.umd.js'
90
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/line-awesome.umd.js'
91
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/ionicons-v4.umd.js'
92
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/material-icons-outlined.umd.js'
93
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/material-icons-round.umd.js'
94
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/material-icons-sharp.umd.js'
95
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/material-icons.umd.js'
96
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/mdi-v6.umd.js'
97
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/themify.umd.js'
98
- import '@quasar/quasar-ui-qiconpicker/dist/icon-set/bootstrap-icons.umd.js'
99
- export default {
100
- name: 'App'
101
- }
57
+ <script setup>
58
+ import { QIconPicker } from '@quasar/quasar-ui-qiconpicker'
102
59
  </script>
103
-
104
- <style>
105
- </style>
106
- ```
107
-
108
- Don't add them all (unless you have this requirement). Remove the ones from above you won't be needing.
109
-
110
- ## UMD variant
111
-
112
- Exports `window.QIconPicker`.
113
-
114
- Add the following tag(s) after the Quasar ones:
115
-
116
- ```html
117
- <head>
118
- <!-- AFTER the Quasar stylesheet tags: -->
119
- <link href="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qiconpicker/dist/index.min.css" rel="stylesheet" type="text/css">
120
- </head>
121
- <body>
122
- <!-- at end of body, AFTER Quasar script(s): -->
123
- <script src="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qiconpicker/dist/index.umd.min.js"></script>
124
- </body>
125
60
  ```
126
- If you need the RTL variant of the CSS, then go for the following (instead of the above stylesheet link):
127
- ```html
128
- <link href="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qiconpicker/dist/index.rtl.min.css" rel="stylesheet" type="text/css">
129
- ```
130
-
131
- For **UMD** variants only, there is also a caveat:
132
-
133
- You must **also** load the QIconPicker icon set for the icon font(s) that you have loaded:
134
61
 
135
- ```html
136
- <script src="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qiconpicker/dist/icon-set/material-icons.umd.js"></script>
137
- ```
62
+ ### UMD Variant
138
63
 
139
- Choices are:
140
- 1. eva-icons.umd.js
141
- 2. fontawesome-v5.umd.js
142
- 3. ionicons-v4.umd.js
143
- 4. material-icons-outlined.umd.js
144
- 5. material-icons-round.umd.js
145
- 6. material-icons-sharp.umd.js
146
- 7. material-icons.umd.js
147
- 8. mdi-v4.umd.js
148
- 9. mdi-v5.umd.js
149
- 10. mdi-v5.umd.js
150
- 11. themify.umd.js
151
- 12. line-awesome.umd.js
152
- 13. bootstrap-icons.umd.js
64
+ The UMD bundle exports `window.QIconPicker`.
153
65
 
154
- > You can only use one of `mdi-v4`, `mdi-v5` or `mdi-v6`
155
-
156
- ### UMD Example
157
66
  ```html
158
- <!DOCTYPE html>
159
- <html lang="en">
160
- <head>
161
- <meta charset="utf-8">
162
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
163
- <meta name="format-detection" content="telephone=no">
164
- <meta name="msapplication-tap-highlight" content="no">
165
- <meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width">
166
-
167
- <title>UMD test</title>
168
- <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" rel="stylesheet" type="text/css">
169
- <link href="https://cdn.jsdelivr.net/npm/quasar@^1.0.0/dist/quasar.min.css" rel="stylesheet" type="text/css">
170
- <link href="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qiconpicker/dist/index.css" rel="stylesheet" type="text/css">
171
- </head>
172
- <body>
173
- <div id="q-app">
174
- <q-layout view="lHh Lpr fff">
175
- <q-header class="glossy bg-primary">
176
- <q-toolbar>
177
- <q-toolbar-title>
178
- quasar-ui-qiconpicker <span class="text-subtitle2">v{{ version }}</span>
179
- </q-toolbar-title>
180
-
181
- <div>Quasar v{{ $q.version }}</div>
182
- </q-toolbar>
183
- </q-header>
184
-
185
- <q-page-container>
186
- <q-page padding>
187
- <div style="width: 700px;">
188
- <q-input
189
- v-model="filter"
190
- label="Filter"
191
- outlined
192
- clearable
193
- class="q-ma-md">
194
- </q-input>
195
- <q-icon-picker
196
- v-model="value"
197
- icon-set="material-icons"
198
- :filter="filter"
199
- v-model:model-pagination="pagination"
200
- style="height: 220px"
201
- ></q-icon-picker>
202
- </div>
203
- <ul class="q-mb-lg">
204
- <li>In /ui, run: "yarn build"</li>
205
- <li class="text-red">You need to build & refresh page on each change manually.</li>
206
- <li>Use self-closing tags only!</li>
207
- <li>Example: &lt;my-component&gt;&lt;/my-component&gt;</li>
208
- </ul>
209
- </q-page>
210
- </q-page-container>
211
- </q-layout>
212
- </div>
213
-
214
- <script src="https://cdn.jsdelivr.net/npm/quasar@^1.0.0/dist/quasar.ie.polyfills.umd.min.js"></script>
215
- <script src="https://cdn.jsdelivr.net/npm/vue@^2.0.0/dist/vue.min.js"></script>
216
- <script src="https://cdn.jsdelivr.net/npm/quasar@^1.0.0/dist/quasar.umd.min.js"></script>
217
- <script src="https://cdn.jsdelivr.net/npm/quasar@^1.0.0/dist/icon-set/material-icons.umd.min.js"></script>
218
- <script src="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qiconpicker/dist/index.umd.js"></script>
219
- <script src="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qiconpicker/dist/icon-set/material-icons.umd.js"></script>
220
-
221
-
222
- <script>
223
- new Vue({
224
- el: '#q-app',
225
-
226
- data: function () {
227
- return {
228
- version: QIconPicker.version,
229
- value: '',
230
- filter: '',
231
- pagination: {
232
- itemsPerPage: 60,
233
- page: 0
234
- }
235
- }
236
- }
237
- })
238
- </script>
239
- </body>
240
- </html>
67
+ <link
68
+ href="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qiconpicker/dist/index.min.css"
69
+ rel="stylesheet"
70
+ type="text/css"
71
+ />
72
+ <script src="https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qiconpicker/dist/index.umd.min.js"></script>
241
73
  ```
242
74
 
243
- # Codepen
244
-
245
- [UMD Example on Codepen](https://codepen.io/Hawkeye64/pen/vYYYewG)
246
-
247
- # Building the Projects
75
+ Built-in `icon-set` values lazy load from `@quasar/extras` and are intended for ESM/CJS bundler usage. For UMD, pass an `icons` array directly.
248
76
 
249
77
  ## Setup
250
78
 
251
- In both the `ui` and `ui/dev` folders:
79
+ This project is a pnpm workspace mono-repo.
252
80
 
253
81
  ```bash
254
- $ yarn
82
+ pnpm install
83
+ pnpm build:ui
84
+ pnpm build:docs
255
85
  ```
256
86
 
257
- ## Developing
258
-
259
- In the `ui` folder
260
-
261
- ```bash
262
- # start dev in SPA mode
263
- $ yarn dev
264
-
265
- # start dev in UMD mode
266
- $ yarn dev:umd
267
-
268
- # start dev in SSR mode
269
- $ yarn dev:ssr
270
-
271
- # start dev in Cordova iOS mode
272
- $ yarn dev:ios
273
-
274
- # start dev in Cordova Android mode
275
- $ yarn dev:android
276
-
277
- # start dev in Electron mode
278
- $ yarn dev:electron
279
- ```
280
-
281
- ## Building package
282
-
283
- ```bash
284
- $ yarn build
285
- ```
286
-
287
- # build just the JSON API
288
- ```bash
289
- $ yarn build:api
290
- ```
87
+ ## Donate
291
88
 
292
- # Donate
89
+ If you appreciate the work that went into this project, please consider donating to [Quasar](https://donate.quasar.dev) or [Jeff](https://github.com/sponsors/hawkeye64).
293
90
 
294
- If you appreciate the work that went into this, please consider donating to [Quasar](https://donate.quasar.dev) or [Jeff](https://github.com/sponsors/hawkeye64).
91
+ ## License
295
92
 
296
- # License
297
93
  MIT (c) Jeff Galbraith <jeff@quasar.dev>
@@ -4,7 +4,7 @@
4
4
  "docsUrl": "https://quasarframework.github.io/quasar-ui-qiconpicker/docs"
5
5
  },
6
6
  "props": {
7
- "value": {
7
+ "model-value": {
8
8
  "type": "String",
9
9
  "desc": "`v-model`; The selected icon",
10
10
  "default": "''",
@@ -16,18 +16,22 @@
16
16
  },
17
17
  "icon-set": {
18
18
  "type": "String",
19
- "desc": "The name of a [Quasar Icon Set](https://quasar.dev/options/quasar-icon-sets)",
19
+ "desc": "The name of a [Quasar Icon Set](https://quasar.dev/options/quasar-icon-sets). Built-in sets are lazy loaded from `@quasar/extras`.",
20
20
  "category": "model",
21
21
  "values": [
22
22
  "material-icons",
23
23
  "material-icons-outlined",
24
24
  "material-icons-round",
25
25
  "material-icons-sharp",
26
- "ionicons-v4",
27
- "mdi-v4",
28
- "mdi-v5",
26
+ "material-symbols-outlined",
27
+ "material-symbols-rounded",
28
+ "material-symbols-sharp",
29
+ "ionicons-v7",
30
+ "ionicons-v8",
29
31
  "mdi-v6",
30
- "fontawesome-v5",
32
+ "mdi-v7",
33
+ "fontawesome-v6",
34
+ "fontawesome-v7",
31
35
  "line-awesome",
32
36
  "eva-icons",
33
37
  "themify",
@@ -35,23 +39,17 @@
35
39
  ],
36
40
  "examples": [
37
41
  "icon-set=\"material-icons\"",
38
- "icon-set=\"fontawesome-v5\""
42
+ "icon-set=\"fontawesome-v7\""
39
43
  ]
40
44
  },
41
45
  "icons": {
42
46
  "type": "Array",
43
47
  "tsType": "IconNameArray",
44
- "desc": "An array of objects containing icon information. The object must contain the key `name` with the value being the icon name (ie: `{ name: 'bolt' }`). _**Note:** the icons used must already be loaded by Quasar._",
48
+ "desc": "An array of objects containing icon information. The object must contain the key `name` with the value being the selected icon name. Use the optional `icon` key for SVG path data used for display, for example `{ name: 'bolt', icon: matBolt }`.",
45
49
  "category": "model",
46
50
  "examples": [
47
51
  ":icons=\"[{ name: 'calendar-today' }, { name: 'bolt' }]\""
48
- ],
49
- "definition": {
50
- "name": {
51
- "type": "String",
52
- "desc": "The icon name"
53
- }
54
- }
52
+ ]
55
53
  },
56
54
  "filter": {
57
55
  "type": "String",
@@ -61,17 +59,6 @@
61
59
  ":filter=\"myFilter\""
62
60
  ]
63
61
  },
64
- "tags": {
65
- "type": "Array",
66
- "tsType": "StringArray",
67
- "addedIn": "v1.0.7",
68
- "desc": "An array of tags to be used to do filtering by category",
69
- "category": "behavior",
70
- "examples": [
71
- ":tags=\"['accessibility']\"",
72
- ":tags=\"['media']\""
73
- ]
74
- },
75
62
  "dense": {
76
63
  "type": "Boolean",
77
64
  "desc": "Use less of a foot print for the component",
@@ -148,7 +135,10 @@
148
135
  "type": "Object",
149
136
  "tsType": "PaginationProps",
150
137
  "desc": "The properties to pass to the QPagination component",
151
- "category": "behavior"
138
+ "category": "behavior",
139
+ "__exemption": [
140
+ "examples"
141
+ ]
152
142
  },
153
143
  "animated": {
154
144
  "type": "Boolean",
@@ -174,13 +164,19 @@
174
164
  ]
175
165
  }
176
166
  },
167
+ "events": {
168
+ "update:model-value": {
169
+ "type": "String",
170
+ "desc": "`v-model`; Selected icon name, including the icon prefix when required"
171
+ }
172
+ },
177
173
  "slots": {
178
174
  "icon": {
179
- "desc": "Slot for changing the display of the icon",
175
+ "desc": "Slot for changing the display of the icon.",
180
176
  "scope": {
181
177
  "name": {
182
178
  "type": "String",
183
- "desc": "The name of the slotted icon",
179
+ "desc": "The selected icon name",
184
180
  "examples": [
185
181
  "bolt",
186
182
  "calendar",
@@ -196,16 +192,6 @@
196
192
  "desc": "Use if you want to provide your own pagination UI. You can control this with the data from the property `model-pagination`"
197
193
  }
198
194
  },
199
- "events": {
200
- "input": {
201
- "type": "String",
202
- "desc": "`v-model`; Value from when the selection changes"
203
- },
204
- "tags": {
205
- "type": "Array",
206
- "desc": "An array of categories (tags) for the selected icon set"
207
- }
208
- },
209
195
  "methods": {
210
196
  "prevPage": {
211
197
  "desc": "If paginated, will go to previous page if not on 1st page"
@@ -226,4 +212,4 @@
226
212
  "desc": "True if on first page otherwise false"
227
213
  }
228
214
  }
229
- }
215
+ }