@schwarzdavid/ui-kit 0.0.1-alpha.2 → 0.0.1-alpha.20
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/LICENSE.md +201 -201
- package/README.md +165 -1
- package/dist/main.d.ts +365 -0
- package/dist/main.js +1394 -0
- package/dist/styles.d.ts +1 -0
- package/dist/ui-kit.css +2 -0
- package/dist/validators.d.ts +91 -0
- package/dist/validators.js +61 -0
- package/dist/vuetify/settings.scss +32 -0
- package/dist/vuetify.d.ts +31 -0
- package/dist/vuetify.js +288 -0
- package/package.json +120 -87
- package/dist/favicon.ico +0 -0
- package/dist/style.css +0 -1
- package/dist/ui-kit.d.ts +0 -150
- package/dist/ui-kit.js +0 -691
package/package.json
CHANGED
|
@@ -1,87 +1,120 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@schwarzdavid/ui-kit",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"vue-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@schwarzdavid/ui-kit",
|
|
3
|
+
"version": "0.0.1-alpha.20",
|
|
4
|
+
"description": "Vue 3 + Vuetify composables and components for dialogs, toasts, loading states and Vuelidate helpers",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vue",
|
|
7
|
+
"vue3",
|
|
8
|
+
"vuetify",
|
|
9
|
+
"composables",
|
|
10
|
+
"dialog",
|
|
11
|
+
"toast",
|
|
12
|
+
"vuelidate",
|
|
13
|
+
"ui-kit"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/schwarzdavid/ui-kit#readme",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/schwarzdavid/ui-kit.git"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/schwarzdavid/ui-kit/issues"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"sideEffects": [
|
|
25
|
+
"*.css"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"check": "vue-tsc --build --force",
|
|
29
|
+
"docs": "storybook dev -p 6006 --no-open",
|
|
30
|
+
"build:lib": "vue-tsc --build --force && vite build",
|
|
31
|
+
"build:docs": "storybook build",
|
|
32
|
+
"lint": "eslint .",
|
|
33
|
+
"lint:fix": "eslint . --fix",
|
|
34
|
+
"test": "vitest run",
|
|
35
|
+
"prepublishOnly": "npm run build:lib",
|
|
36
|
+
"update:version": "npm version prerelease --preid alpha"
|
|
37
|
+
},
|
|
38
|
+
"author": "David Schwarz <david@ists-wurscht.at>",
|
|
39
|
+
"license": "Apache-2.0",
|
|
40
|
+
"files": [
|
|
41
|
+
"dist"
|
|
42
|
+
],
|
|
43
|
+
"module": "./dist/main.js",
|
|
44
|
+
"types": "./dist/main.d.ts",
|
|
45
|
+
"exports": {
|
|
46
|
+
".": {
|
|
47
|
+
"types": "./dist/main.d.ts",
|
|
48
|
+
"import": "./dist/main.js",
|
|
49
|
+
"default": "./dist/main.js"
|
|
50
|
+
},
|
|
51
|
+
"./validators": {
|
|
52
|
+
"types": "./dist/validators.d.ts",
|
|
53
|
+
"import": "./dist/validators.js",
|
|
54
|
+
"default": "./dist/validators.js"
|
|
55
|
+
},
|
|
56
|
+
"./vuetify": {
|
|
57
|
+
"types": "./dist/vuetify.d.ts",
|
|
58
|
+
"import": "./dist/vuetify.js",
|
|
59
|
+
"default": "./dist/vuetify.js"
|
|
60
|
+
},
|
|
61
|
+
"./vuetify/settings.scss": "./dist/vuetify/settings.scss",
|
|
62
|
+
"./vuetify/settings": "./dist/vuetify/settings.scss",
|
|
63
|
+
"./styles": {
|
|
64
|
+
"types": "./dist/styles.d.ts",
|
|
65
|
+
"default": "./dist/ui-kit.css"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"@vuelidate/core": "^2.0.0",
|
|
70
|
+
"vue": "^3.5.0",
|
|
71
|
+
"vue-i18n": "^9.0.0 || ^10.0.0 || ^11.0.0",
|
|
72
|
+
"vuetify": "^3.4.0 || ^4.0.0"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@mdi/js": "^7.4.47",
|
|
76
|
+
"@vuelidate/validators": "^2.0.4",
|
|
77
|
+
"lodash-es": "^4.18.1",
|
|
78
|
+
"type-fest": "^5.10.0",
|
|
79
|
+
"vue-component-type-helpers": "^3.3.13"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@eslint/js": "10.0.1",
|
|
83
|
+
"@fontsource/jetbrains-mono": "^5.3.0",
|
|
84
|
+
"@fontsource/noto-sans": "^5.3.0",
|
|
85
|
+
"@intlify/unplugin-vue-i18n": "11.2.6",
|
|
86
|
+
"@microsoft/api-extractor": "7.59.4",
|
|
87
|
+
"@storybook/addon-docs": "10.6.5",
|
|
88
|
+
"@storybook/vue3-vite": "10.6.5",
|
|
89
|
+
"@stylistic/eslint-plugin": "5.10.0",
|
|
90
|
+
"@tsconfig/node24": "24.0.5",
|
|
91
|
+
"@types/jsdom": "30.0.0",
|
|
92
|
+
"@types/lodash-es": "4.17.12",
|
|
93
|
+
"@types/node": "26.6.5",
|
|
94
|
+
"@vitejs/plugin-vue": "6.0.10",
|
|
95
|
+
"@vitest/eslint-plugin": "1.6.27",
|
|
96
|
+
"@vue/test-utils": "2.5.1",
|
|
97
|
+
"@vue/tsconfig": "0.9.1",
|
|
98
|
+
"@vuelidate/core": "2.0.3",
|
|
99
|
+
"eslint": "10.12.0",
|
|
100
|
+
"eslint-plugin-storybook": "10.6.5",
|
|
101
|
+
"eslint-plugin-vue": "10.11.1",
|
|
102
|
+
"jsdom": "30.1.3",
|
|
103
|
+
"sass": "1.105.1",
|
|
104
|
+
"storybook": "10.6.5",
|
|
105
|
+
"typescript": "6.0.3",
|
|
106
|
+
"typescript-eslint": "8.71.2",
|
|
107
|
+
"vite": "8.3.4",
|
|
108
|
+
"vite-plugin-dts": "5.1.2",
|
|
109
|
+
"vite-plugin-vuetify": "^2.1.3",
|
|
110
|
+
"vitest": "5.0.5",
|
|
111
|
+
"vue": "3.5.44",
|
|
112
|
+
"vue-eslint-parser": "10.4.1",
|
|
113
|
+
"vue-i18n": "11.4.14",
|
|
114
|
+
"vue-tsc": "3.3.13",
|
|
115
|
+
"vuetify": "4.2.6"
|
|
116
|
+
},
|
|
117
|
+
"overrides": {
|
|
118
|
+
"vite": "8.3.4"
|
|
119
|
+
}
|
|
120
|
+
}
|
package/dist/favicon.ico
DELETED
|
Binary file
|
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.toast-entry[data-v-419b7d95]{pointer-events:all}.toast-outlet[data-v-93b5ec8a]{position:fixed;z-index:9999;bottom:8px;right:8px;left:8px;display:flex;flex-direction:column;row-gap:8px;pointer-events:none}.fade-move[data-v-93b5ec8a],.fade-enter-active[data-v-93b5ec8a],.fade-leave-active[data-v-93b5ec8a]{transition:all .3s cubic-bezier(.4,0,.2,1)}.fade-enter-from[data-v-93b5ec8a],.fade-leave-to[data-v-93b5ec8a]{opacity:0;transform:translate(50%) scaleY(.5)}.fade-leave-active[data-v-93b5ec8a]{position:absolute}.info-dialog-card[data-v-ab153f63]>.v-card-text{padding-left:16px!important;padding-right:16px!important}.prompt-dialog-card[data-v-1f5a0caf]>.v-card-item{padding-left:16px!important;padding-right:16px!important}.prompt-dialog-toolbar-slot[data-v-1f5a0caf]{display:contents}.confirm-dialog-card[data-v-634f1f39]>.v-card-text{padding-left:16px!important;padding-right:16px!important}
|
package/dist/ui-kit.d.ts
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
2
|
-
import { ComponentOptionsMixin } from 'vue';
|
|
3
|
-
import { ComponentProps } from 'vue-component-type-helpers';
|
|
4
|
-
import { ComponentProvideOptions } from 'vue';
|
|
5
|
-
import { ComponentPublicInstance } from 'vue';
|
|
6
|
-
import { ComputedOptions } from 'vue';
|
|
7
|
-
import { DefineComponent } from 'vue';
|
|
8
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
9
|
-
import { MethodOptions } from 'vue';
|
|
10
|
-
import { PublicProps } from 'vue';
|
|
11
|
-
import { Ref } from 'vue';
|
|
12
|
-
|
|
13
|
-
declare interface ConfirmDialogBaseProps {
|
|
14
|
-
title: string;
|
|
15
|
-
translateTitle?: boolean;
|
|
16
|
-
confirmCta?: Partial<ConfirmDialogCta>;
|
|
17
|
-
rejectCta?: Partial<ConfirmDialogCta>;
|
|
18
|
-
throwOnReject?: boolean;
|
|
19
|
-
permanent?: boolean;
|
|
20
|
-
maxWidth?: number | string;
|
|
21
|
-
highlightCta?: 'confirm' | 'reject' | false;
|
|
22
|
-
level?: ConfirmDialogLevel;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export declare interface ConfirmDialogComponentContent<C extends Component = Component> extends ConfirmDialogBaseProps {
|
|
26
|
-
component: C;
|
|
27
|
-
props: ComponentProps<C>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export declare interface ConfirmDialogCta {
|
|
31
|
-
text: string;
|
|
32
|
-
translateText?: boolean;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export declare enum ConfirmDialogLevel {
|
|
36
|
-
DEFAULT = "primary",
|
|
37
|
-
WARNING = "warning",
|
|
38
|
-
DANGER = "error"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export declare type ConfirmDialogProps<C extends Component = Component> = ConfirmDialogComponentContent<C> | ConfirmDialogTextContent;
|
|
42
|
-
|
|
43
|
-
export declare interface ConfirmDialogTextContent extends ConfirmDialogBaseProps {
|
|
44
|
-
content: string;
|
|
45
|
-
translateContent?: boolean;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export declare interface DialogComposable {
|
|
49
|
-
info(title: string, content: string): Promise<null>;
|
|
50
|
-
info<T = void, C extends Component = Component>(options: InfoDialogProps<T, C>): Promise<T extends void ? null : (T | null)>;
|
|
51
|
-
prompt<T, R extends boolean = false, C extends PromptDialogComponent<T> = PromptDialogComponent<T>>(options: PromptDialogProps<T, R, C>): Promise<R extends true ? T : T | null>;
|
|
52
|
-
confirm(title: string, content: string, level?: ConfirmDialogLevel): Promise<boolean>;
|
|
53
|
-
confirm<C extends Component = Component>(options: ConfirmDialogProps<C>): Promise<boolean>;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export declare interface InfoDialogActionCta extends InfoDialogBaseCta {
|
|
57
|
-
action(): unknown;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export declare interface InfoDialogBaseCta {
|
|
61
|
-
text: string;
|
|
62
|
-
translateText?: boolean;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
declare interface InfoDialogBaseProps<T> {
|
|
66
|
-
title: string;
|
|
67
|
-
translateTitle?: boolean;
|
|
68
|
-
additionalCta?: InfoDialogCta<T>[];
|
|
69
|
-
defaultCta?: Partial<InfoDialogCta<T>> | false;
|
|
70
|
-
width?: number | string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export declare interface InfoDialogComponentContent<T = void, C extends Component = Component> extends InfoDialogBaseProps<T> {
|
|
74
|
-
component: C;
|
|
75
|
-
props: ComponentProps<C>;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export declare type InfoDialogCta<T> = InfoDialogActionCta | InfoDialogValueCta<T>;
|
|
79
|
-
|
|
80
|
-
export declare type InfoDialogProps<T = void, C extends Component = Component> = InfoDialogComponentContent<T, C> | InfoDialogTextContent<T>;
|
|
81
|
-
|
|
82
|
-
export declare interface InfoDialogTextContent<T> extends InfoDialogBaseProps<T> {
|
|
83
|
-
content: string;
|
|
84
|
-
translateContent?: boolean;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export declare interface InfoDialogValueCta<T> extends InfoDialogBaseCta {
|
|
88
|
-
value: T;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export declare type LoadingAction = (...args: any) => any | Promise<any>;
|
|
92
|
-
|
|
93
|
-
export declare interface LoadingComposable<A extends LoadingAction> {
|
|
94
|
-
loading: Readonly<Ref<boolean>>;
|
|
95
|
-
action(...args: Parameters<A>): Promise<Awaited<ReturnType<A>>>;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export declare interface LoadingOptions {
|
|
99
|
-
overlay: MaybeRefOrGetter<boolean>;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export declare type PromptDialogComponent<T> = ComponentPublicInstance<PromptDialogComponentProps<T>, any, any, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, PromptDialogComponentEmits<T>>;
|
|
103
|
-
|
|
104
|
-
export declare type PromptDialogComponentEmits<T> = (name: 'update:modelValue', value: T | null) => unknown;
|
|
105
|
-
|
|
106
|
-
export declare interface PromptDialogComponentProps<T> {
|
|
107
|
-
modelValue: T | null;
|
|
108
|
-
toolbar: HTMLElement;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export declare interface PromptDialogCta {
|
|
112
|
-
text: string;
|
|
113
|
-
translateText?: boolean;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export declare interface PromptDialogProps<T, R extends boolean = false, C extends PromptDialogComponent<T> = PromptDialogComponent<T>> {
|
|
117
|
-
title: string;
|
|
118
|
-
translateTitle?: boolean;
|
|
119
|
-
saveCta?: Partial<PromptDialogCta>;
|
|
120
|
-
abortCta?: Partial<PromptDialogCta>;
|
|
121
|
-
initialValue?: MaybeRefOrGetter<T>;
|
|
122
|
-
size?: PromptDialogSize;
|
|
123
|
-
required?: R;
|
|
124
|
-
component: C;
|
|
125
|
-
props: Omit<ComponentProps<C>, keyof PromptDialogComponentProps<T>>;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export declare enum PromptDialogSize {
|
|
129
|
-
SMALL = "sm",
|
|
130
|
-
LARGE = "lg"
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export declare interface ToastComposable {
|
|
134
|
-
info(message: string): Promise<void>;
|
|
135
|
-
warn(message: string): Promise<void>;
|
|
136
|
-
error(message: string): Promise<void>;
|
|
137
|
-
success(message: string): Promise<void>;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export declare const UiKitOutlet: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
141
|
-
|
|
142
|
-
export declare function useDialog(): DialogComposable;
|
|
143
|
-
|
|
144
|
-
export declare function useLoading<A extends LoadingAction>(actionCallback: A, { overlay }?: Partial<LoadingOptions>): LoadingComposable<A>;
|
|
145
|
-
|
|
146
|
-
export declare function useLoadingOverlay(): Ref<boolean>;
|
|
147
|
-
|
|
148
|
-
export declare function useToast(): ToastComposable;
|
|
149
|
-
|
|
150
|
-
export { }
|