@fastkit/vui 0.19.40 → 0.19.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.
- package/dist/vui.d.ts +2 -2
- package/dist/vui.mjs +10 -10
- package/dist/vui.mjs.map +1 -1
- package/package.json +14 -14
- package/src/plugin.tsx +1 -1
- package/src/service.tsx +15 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastkit/vui",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.42",
|
|
4
4
|
"description": "A simple, extensible UI kit for Vue applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fastkit",
|
|
@@ -45,30 +45,30 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@fastkit/color-scheme": "^2.0.10",
|
|
48
|
-
"@fastkit/color-scheme-gen": "^0.14.13",
|
|
49
|
-
"@fastkit/helpers": "^0.14.5",
|
|
50
48
|
"@fastkit/icon-font": "^2.0.7",
|
|
51
|
-
"@fastkit/dom": "^0.2.6",
|
|
52
|
-
"@fastkit/rules": "^0.14.7",
|
|
53
49
|
"@fastkit/media-match": "^2.0.7",
|
|
50
|
+
"@fastkit/rules": "^0.14.7",
|
|
51
|
+
"@fastkit/tiny-logger": "^0.14.5",
|
|
54
52
|
"@fastkit/stylebase": "^0.13.1",
|
|
53
|
+
"@fastkit/dom": "^0.2.6",
|
|
54
|
+
"@fastkit/color-scheme-gen": "^0.14.13",
|
|
55
55
|
"@fastkit/media-match-gen": "^0.14.13",
|
|
56
|
-
"@fastkit/
|
|
57
|
-
"@fastkit/vue-app-layout": "^0.15.10",
|
|
56
|
+
"@fastkit/helpers": "^0.14.5",
|
|
58
57
|
"@fastkit/vue-action": "^0.3.16",
|
|
59
|
-
"@fastkit/vue-
|
|
60
|
-
"@fastkit/vue-loading": "^0.15.12",
|
|
61
|
-
"@fastkit/vue-form-control": "^0.20.21",
|
|
62
|
-
"@fastkit/vue-location": "^0.3.1",
|
|
58
|
+
"@fastkit/vue-body-scroll-lock": "^0.2.10",
|
|
63
59
|
"@fastkit/vue-click-outside": "^0.2.9",
|
|
60
|
+
"@fastkit/vue-form-control": "^0.20.21",
|
|
61
|
+
"@fastkit/vue-app-layout": "^0.15.10",
|
|
64
62
|
"@fastkit/vue-keyboard": "^0.2.5",
|
|
63
|
+
"@fastkit/vue-color-scheme": "^0.15.12",
|
|
64
|
+
"@fastkit/vue-loading": "^0.15.12",
|
|
65
65
|
"@fastkit/vue-media-match": "^0.14.10",
|
|
66
|
-
"@fastkit/vue-
|
|
66
|
+
"@fastkit/vue-scroller": "^0.15.9",
|
|
67
67
|
"@fastkit/vue-resize": "^0.2.9",
|
|
68
68
|
"@fastkit/vue-transitions": "^0.2.10",
|
|
69
|
-
"@fastkit/vue-
|
|
69
|
+
"@fastkit/vue-utils": "^0.15.9",
|
|
70
70
|
"@fastkit/vue-stack": "^0.16.13",
|
|
71
|
-
"@fastkit/vue-
|
|
71
|
+
"@fastkit/vue-location": "^0.3.3"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"vue": "^3.4.0",
|
package/src/plugin.tsx
CHANGED
|
@@ -98,7 +98,7 @@ export class VuiPlugin {
|
|
|
98
98
|
installResizeDirective(app);
|
|
99
99
|
|
|
100
100
|
// Vui
|
|
101
|
-
const $vui = new VuiService(opts, app
|
|
101
|
+
const $vui = new VuiService(opts, app);
|
|
102
102
|
app.provide(VuiInjectionKey, $vui);
|
|
103
103
|
app.config.globalProperties.$vui = $vui;
|
|
104
104
|
|
package/src/service.tsx
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type VNodeChild,
|
|
3
|
+
reactive,
|
|
4
|
+
type UnwrapNestedRefs,
|
|
5
|
+
type App,
|
|
6
|
+
} from 'vue';
|
|
2
7
|
import { ScopeName, ColorVariant } from '@fastkit/color-scheme';
|
|
3
8
|
import {
|
|
4
9
|
type VueStackService,
|
|
@@ -231,7 +236,7 @@ export class VuiService {
|
|
|
231
236
|
return getDocumentScroller();
|
|
232
237
|
}
|
|
233
238
|
|
|
234
|
-
constructor(options: VuiServiceOptions,
|
|
239
|
+
constructor(options: VuiServiceOptions, app: App) {
|
|
235
240
|
this.options = options;
|
|
236
241
|
this.configure();
|
|
237
242
|
|
|
@@ -246,12 +251,11 @@ export class VuiService {
|
|
|
246
251
|
this.textareaRows = textareaRows;
|
|
247
252
|
this.requiredChip = requiredChip;
|
|
248
253
|
this.router = options.router;
|
|
249
|
-
this.location =
|
|
254
|
+
this.location = LocationService.install(app, {
|
|
250
255
|
router: this.router,
|
|
251
256
|
});
|
|
252
257
|
this.useLink = options.useLink || useLink;
|
|
253
|
-
|
|
254
|
-
this.stack = stackService;
|
|
258
|
+
this.stack = app.config.globalProperties.$vstack;
|
|
255
259
|
const { uiSettings } = options;
|
|
256
260
|
this.stackActions = {
|
|
257
261
|
ok: ({ bindings }) => (
|
|
@@ -271,8 +275,8 @@ export class VuiService {
|
|
|
271
275
|
),
|
|
272
276
|
};
|
|
273
277
|
|
|
274
|
-
this.dialog =
|
|
275
|
-
this.alert =
|
|
278
|
+
this.dialog = this.stack.createLauncher(VDialog);
|
|
279
|
+
this.alert = this.stack.createLauncher(VDialog, (props) => {
|
|
276
280
|
const actions = [...(props?.actions || [])];
|
|
277
281
|
if (!actions.length) {
|
|
278
282
|
actions.push(this.stackAction('ok'));
|
|
@@ -285,7 +289,7 @@ export class VuiService {
|
|
|
285
289
|
};
|
|
286
290
|
});
|
|
287
291
|
|
|
288
|
-
this.confirm =
|
|
292
|
+
this.confirm = this.stack.createLauncher(VDialog, (props) => {
|
|
289
293
|
const actions = [...(props?.actions || [])];
|
|
290
294
|
if (!actions.length) {
|
|
291
295
|
actions.push(this.stackAction('cancel'), this.stackAction('ok'));
|
|
@@ -297,9 +301,9 @@ export class VuiService {
|
|
|
297
301
|
actions,
|
|
298
302
|
};
|
|
299
303
|
});
|
|
300
|
-
this.snackbar =
|
|
301
|
-
this.menu =
|
|
302
|
-
this.sheet =
|
|
304
|
+
this.snackbar = this.stack.createLauncher(VSnackbar);
|
|
305
|
+
this.menu = this.stack.createLauncher(VMenu);
|
|
306
|
+
this.sheet = this.stack.createLauncher(VSheetModal);
|
|
303
307
|
}
|
|
304
308
|
|
|
305
309
|
configure(options?: Partial<VuiServiceOptions>) {
|