@schwarzdavid/ui-kit 0.0.1-alpha.1 → 0.0.1-alpha.11
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 +5 -1
- package/dist/main.d.ts +195 -0
- package/dist/main.js +869 -0
- package/dist/ui-kit.css +1 -0
- package/dist/validators.d.ts +66 -0
- package/dist/validators.js +56 -0
- package/package.json +94 -87
- package/dist/style.css +0 -1
- package/dist/ui-kit.d.ts +0 -125
- package/dist/ui-kit.js +0 -599
package/dist/ui-kit.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.toast-entry[data-v-7b5e0267]{pointer-events:all}.toast-entry[data-v-7b5e0267] .v-alert__prepend{align-self:center}.toast-outlet[data-v-ba5c8268]{position:fixed;z-index:9999;bottom:8px;right:8px;left:8px;display:flex;flex-direction:column;row-gap:8px;pointer-events:none}.toast-outlet--desktop[data-v-ba5c8268]{left:unset;max-width:500px;width:100%}.fade-move[data-v-ba5c8268],.fade-enter-active[data-v-ba5c8268],.fade-leave-active[data-v-ba5c8268]{transition:all .3s cubic-bezier(.4,0,.2,1)}.fade-enter-from[data-v-ba5c8268],.fade-leave-to[data-v-ba5c8268]{opacity:0;transform:translate(50%) scaleY(.5)}.fade-leave-active[data-v-ba5c8268]{position:absolute}.info-dialog-card[data-v-0f8116ef]>.v-card-text{padding-left:16px!important;padding-right:16px!important}.prompt-dialog-card[data-v-6cec23a5]>.v-card-item{padding-left:16px!important;padding-right:16px!important}.prompt-dialog-toolbar-slot[data-v-6cec23a5]{display:contents}.confirm-dialog-card[data-v-3e8b3358]>.v-card-text{padding-left:16px!important;padding-right:16px!important}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { Validation } from '@vuelidate/core';
|
|
4
|
+
import { ValidationArgs } from '@vuelidate/core';
|
|
5
|
+
import { ValidationRuleWithoutParams } from '@vuelidate/core';
|
|
6
|
+
import { ValidationRuleWithParams } from '@vuelidate/core';
|
|
7
|
+
|
|
8
|
+
export declare const alpha: ValidationRuleWithoutParams<any>;
|
|
9
|
+
|
|
10
|
+
export declare const alphaNum: ValidationRuleWithoutParams<any>;
|
|
11
|
+
|
|
12
|
+
export declare const between: (min: number | Ref<number>, max: number | Ref<number>) => ValidationRuleWithParams< {
|
|
13
|
+
min: number;
|
|
14
|
+
max: number;
|
|
15
|
+
}>;
|
|
16
|
+
|
|
17
|
+
export declare const decimal: ValidationRuleWithoutParams<any>;
|
|
18
|
+
|
|
19
|
+
export declare const email: ValidationRuleWithoutParams<any>;
|
|
20
|
+
|
|
21
|
+
export declare const integer: ValidationRuleWithoutParams<any>;
|
|
22
|
+
|
|
23
|
+
export declare const ipAddress: ValidationRuleWithoutParams<any>;
|
|
24
|
+
|
|
25
|
+
export declare const maxAddress: (separator: string | Ref<string>) => ValidationRuleWithoutParams;
|
|
26
|
+
|
|
27
|
+
export declare const maxLength: (max: number | Ref<number>) => ValidationRuleWithParams< {
|
|
28
|
+
max: number;
|
|
29
|
+
}>;
|
|
30
|
+
|
|
31
|
+
export declare const maxValue: (max: number | Ref<number> | string | Ref<string>) => ValidationRuleWithParams< {
|
|
32
|
+
max: number;
|
|
33
|
+
}>;
|
|
34
|
+
|
|
35
|
+
export declare const minLength: (min: number | Ref<number>) => ValidationRuleWithParams< {
|
|
36
|
+
min: number;
|
|
37
|
+
}>;
|
|
38
|
+
|
|
39
|
+
export declare const minValue: (min: number | Ref<number> | string | Ref<string>) => ValidationRuleWithParams< {
|
|
40
|
+
min: number;
|
|
41
|
+
}>;
|
|
42
|
+
|
|
43
|
+
export declare const numeric: ValidationRuleWithoutParams<any>;
|
|
44
|
+
|
|
45
|
+
export declare const oneOf: (values: Record<string, string> | string[]) => ValidationRuleWithParams<object, any>;
|
|
46
|
+
|
|
47
|
+
export declare const required: ValidationRuleWithoutParams<any>;
|
|
48
|
+
|
|
49
|
+
export declare const requiredIf: (prop: boolean | Ref<boolean> | string | (() => boolean | Promise<boolean>)) => ValidationRuleWithoutParams;
|
|
50
|
+
|
|
51
|
+
export declare const requiredUnless: (prop: boolean | Ref<boolean> | string | (() => boolean | Promise<boolean>)) => ValidationRuleWithoutParams;
|
|
52
|
+
|
|
53
|
+
export declare const sameAs: <E = unknown>(equalTo: E | Ref<E>, otherName?: string) => ValidationRuleWithParams< {
|
|
54
|
+
equalTo: E;
|
|
55
|
+
otherName: string;
|
|
56
|
+
}>;
|
|
57
|
+
|
|
58
|
+
export declare const url: ValidationRuleWithoutParams<any>;
|
|
59
|
+
|
|
60
|
+
export declare const useVuelidateErrors: <T extends object>(validation: Ref<Validation<ValidationArgs<T>, T>>) => ComputedRef<ValidationErrors<T>>;
|
|
61
|
+
|
|
62
|
+
export declare type ValidationErrors<T extends object> = {
|
|
63
|
+
[key in keyof T]: T[key] extends object ? ValidationErrors<T[key]> : string[];
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export { }
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as r from "@vuelidate/validators";
|
|
2
|
+
import { helpers as o } from "@vuelidate/validators";
|
|
3
|
+
import { useI18n as a } from "vue-i18n";
|
|
4
|
+
import { computed as m, unref as l } from "vue";
|
|
5
|
+
const n = r.createI18nMessage({
|
|
6
|
+
t: (...e) => {
|
|
7
|
+
const { t } = a({ useScope: "global" });
|
|
8
|
+
return t(...e);
|
|
9
|
+
},
|
|
10
|
+
messagePath(e) {
|
|
11
|
+
return console.log(e.$validator), "validation." + e.$validator;
|
|
12
|
+
}
|
|
13
|
+
}), A = n(r.required), b = n(r.requiredIf, { withArguments: !0 }), V = n(r.requiredUnless, { withArguments: !0 }), O = n(r.minLength, { withArguments: !0 }), j = n(r.maxLength, { withArguments: !0 }), $ = n(r.minValue, { withArguments: !0 }), q = n(r.maxValue, { withArguments: !0 }), x = n(r.between, { withArguments: !0 }), I = n(r.alpha), y = n(r.alphaNum), L = n(r.numeric), E = n(r.integer), N = n(r.decimal), U = n(r.email), W = n(r.ipAddress), B = n(r.macAddress), M = n(r.sameAs, { withArguments: !0 }), P = n(r.url), T = n((e) => o.withParams({
|
|
14
|
+
type: "oneOf",
|
|
15
|
+
values: e
|
|
16
|
+
}, (t) => {
|
|
17
|
+
const s = Array.isArray(e) ? e : Object.values(e);
|
|
18
|
+
return !o.req(t) || s.includes(t);
|
|
19
|
+
}), { withArguments: !0 }), R = (e) => m(() => i(e.value));
|
|
20
|
+
function i(e) {
|
|
21
|
+
return Object.entries(e).map(([t, s]) => t.startsWith("$") ? [t, null] : f(s) ? [t, d(s)] : h(s) ? [t, i(s)] : (console.warn("Unknown validation type.", t, s), [t, null])).reduce((t, [s, u]) => (u && (t[s] = u), t), {});
|
|
22
|
+
}
|
|
23
|
+
function f(e) {
|
|
24
|
+
return typeof e != "object" || e === null ? !1 : Object.hasOwn(e, "$model") && Object.entries(e).filter(([t]) => !t.startsWith("$")).every(([, t]) => c(t));
|
|
25
|
+
}
|
|
26
|
+
function h(e) {
|
|
27
|
+
return typeof e != "object" || e === null ? !1 : Object.entries(e).filter(([t]) => !t.startsWith("$")).some(([, t]) => !c(t));
|
|
28
|
+
}
|
|
29
|
+
function c(e) {
|
|
30
|
+
return typeof e == "object" && e !== null && Object.hasOwn(e, "$params");
|
|
31
|
+
}
|
|
32
|
+
function d(e) {
|
|
33
|
+
return e.$errors.map((t) => l(t.$message));
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
I as alpha,
|
|
37
|
+
y as alphaNum,
|
|
38
|
+
x as between,
|
|
39
|
+
N as decimal,
|
|
40
|
+
U as email,
|
|
41
|
+
E as integer,
|
|
42
|
+
W as ipAddress,
|
|
43
|
+
B as maxAddress,
|
|
44
|
+
j as maxLength,
|
|
45
|
+
q as maxValue,
|
|
46
|
+
O as minLength,
|
|
47
|
+
$ as minValue,
|
|
48
|
+
L as numeric,
|
|
49
|
+
T as oneOf,
|
|
50
|
+
A as required,
|
|
51
|
+
b as requiredIf,
|
|
52
|
+
V as requiredUnless,
|
|
53
|
+
M as sameAs,
|
|
54
|
+
P as url,
|
|
55
|
+
R as useVuelidateErrors
|
|
56
|
+
};
|
package/package.json
CHANGED
|
@@ -1,87 +1,94 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@schwarzdavid/ui-kit",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"preview": "vite preview",
|
|
7
|
-
"check": "vue-tsc --build --force",
|
|
8
|
-
"docs": "storybook dev -p 6006 --no-open",
|
|
9
|
-
"build:lib": "vue-tsc && vite build",
|
|
10
|
-
"build:docs": "storybook build",
|
|
11
|
-
"lint": "eslint .",
|
|
12
|
-
"lint:fix": "eslint . --fix",
|
|
13
|
-
"prepublishOnly": "npm run build:lib"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
],
|
|
21
|
-
"module": "./dist/
|
|
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
|
-
"@storybook/
|
|
50
|
-
"@storybook/
|
|
51
|
-
"@storybook/
|
|
52
|
-
"@storybook/
|
|
53
|
-
"@storybook/
|
|
54
|
-
"@storybook/
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@vue
|
|
66
|
-
"
|
|
67
|
-
"eslint-plugin
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@schwarzdavid/ui-kit",
|
|
3
|
+
"version": "0.0.1-alpha.11",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"preview": "vite preview",
|
|
7
|
+
"check": "vue-tsc --build --force",
|
|
8
|
+
"docs": "storybook dev -p 6006 --no-open",
|
|
9
|
+
"build:lib": "vue-tsc && vite build",
|
|
10
|
+
"build:docs": "storybook build",
|
|
11
|
+
"lint": "eslint .",
|
|
12
|
+
"lint:fix": "eslint . --fix",
|
|
13
|
+
"prepublishOnly": "npm run build:lib",
|
|
14
|
+
"update:version": "npm version prerelease --preid alpha"
|
|
15
|
+
},
|
|
16
|
+
"author": "David Schwarz <david@ists-wurscht.at>",
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"module": "./dist/main.js",
|
|
22
|
+
"types": "./dist/main.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"import": "./dist/main.js",
|
|
26
|
+
"types": "./dist/main.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"./validators": {
|
|
29
|
+
"import": "./dist/validators.js",
|
|
30
|
+
"types": "./dist/validators.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./styles": {
|
|
33
|
+
"import": "./dist/ui-kit.css"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@vuelidate/core": ">=2",
|
|
38
|
+
"pinia": ">=2",
|
|
39
|
+
"vue": ">=3",
|
|
40
|
+
"vue-i18n": ">=9",
|
|
41
|
+
"vuetify": ">=3"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@chromatic-com/storybook": "^3.2.4",
|
|
45
|
+
"@eslint/js": "^9.18.0",
|
|
46
|
+
"@intlify/unplugin-vue-i18n": "^6.0.3",
|
|
47
|
+
"@laynezh/vite-plugin-lib-assets": "^1.0.0",
|
|
48
|
+
"@mdi/font": "^7.4.47",
|
|
49
|
+
"@storybook/addon-essentials": "^8.5.0",
|
|
50
|
+
"@storybook/addon-interactions": "^8.5.0",
|
|
51
|
+
"@storybook/addon-links": "^8.5.0",
|
|
52
|
+
"@storybook/addon-onboarding": "^8.5.0",
|
|
53
|
+
"@storybook/blocks": "^8.5.0",
|
|
54
|
+
"@storybook/manager-api": "^8.5.0",
|
|
55
|
+
"@storybook/test": "^8.5.0",
|
|
56
|
+
"@storybook/theming": "^8.5.0",
|
|
57
|
+
"@storybook/vue3": "^8.5.0",
|
|
58
|
+
"@storybook/vue3-vite": "^8.5.0",
|
|
59
|
+
"@stylistic/eslint-plugin": "^2.13.0",
|
|
60
|
+
"@tsconfig/node20": "^20.1.4",
|
|
61
|
+
"@types/jsdom": "^21.1.7",
|
|
62
|
+
"@types/lodash": "^4.17.14",
|
|
63
|
+
"@types/node": "^22.10.9",
|
|
64
|
+
"@types/uuid": "^10.0.0",
|
|
65
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
66
|
+
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
67
|
+
"@vitest/eslint-plugin": "^1.1.25",
|
|
68
|
+
"@vue/test-utils": "^2.4.6",
|
|
69
|
+
"@vue/tsconfig": "^0.7.0",
|
|
70
|
+
"@vuelidate/core": "^2.0.3",
|
|
71
|
+
"eslint": "^9.18.0",
|
|
72
|
+
"eslint-plugin-vue": "^9.32.0",
|
|
73
|
+
"jsdom": "^26.0.0",
|
|
74
|
+
"pinia": "^2.3.1",
|
|
75
|
+
"sass": "^1.83.4",
|
|
76
|
+
"storybook": "^8.5.0",
|
|
77
|
+
"type-fest": "^4.33.0",
|
|
78
|
+
"typescript": "~5.7.3",
|
|
79
|
+
"typescript-eslint": "^8.23.0",
|
|
80
|
+
"vite": "^6.1.0",
|
|
81
|
+
"vite-plugin-dts": "^4.5.0",
|
|
82
|
+
"vitest": "^3.0.4",
|
|
83
|
+
"vue-component-type-helpers": "^2.2.0",
|
|
84
|
+
"vue-eslint-parser": "^9.4.3",
|
|
85
|
+
"vue-i18n": "^11.0.1",
|
|
86
|
+
"vue-tsc": "^2.2.0",
|
|
87
|
+
"vuetify": "^3.7.7"
|
|
88
|
+
},
|
|
89
|
+
"dependencies": {
|
|
90
|
+
"@vuelidate/validators": "^2.0.4",
|
|
91
|
+
"lodash": "^4.17.21",
|
|
92
|
+
"uuid": "^11.0.5"
|
|
93
|
+
}
|
|
94
|
+
}
|
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,125 +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
|
-
|
|
12
|
-
declare interface ConfirmDialogBaseProps {
|
|
13
|
-
title: string;
|
|
14
|
-
translateTitle?: boolean;
|
|
15
|
-
confirmCta?: Partial<ConfirmDialogCta>;
|
|
16
|
-
rejectCta?: Partial<ConfirmDialogCta>;
|
|
17
|
-
throwOnReject?: boolean;
|
|
18
|
-
permanent?: boolean;
|
|
19
|
-
maxWidth?: number | string;
|
|
20
|
-
highlightCta?: 'confirm' | 'reject' | false;
|
|
21
|
-
level?: ConfirmDialogLevel;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export declare interface ConfirmDialogComponentContent<C extends Component = Component> extends ConfirmDialogBaseProps {
|
|
25
|
-
component: C;
|
|
26
|
-
props: ComponentProps<C>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export declare interface ConfirmDialogCta {
|
|
30
|
-
text: string;
|
|
31
|
-
translateText?: boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export declare enum ConfirmDialogLevel {
|
|
35
|
-
DEFAULT = "primary",
|
|
36
|
-
WARNING = "warning",
|
|
37
|
-
DANGER = "error"
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export declare type ConfirmDialogProps<C extends Component = Component> = ConfirmDialogComponentContent<C> | ConfirmDialogTextContent;
|
|
41
|
-
|
|
42
|
-
export declare interface ConfirmDialogTextContent extends ConfirmDialogBaseProps {
|
|
43
|
-
content: string;
|
|
44
|
-
translateContent?: boolean;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export declare interface DialogComposable {
|
|
48
|
-
info(title: string, content: string): Promise<null>;
|
|
49
|
-
info<T = void, C extends Component = Component>(options: InfoDialogProps<T, C>): Promise<T extends void ? null : (T | null)>;
|
|
50
|
-
prompt<T, R extends boolean = false, C extends PromptDialogComponent<T> = PromptDialogComponent<T>>(options: PromptDialogProps<T, R, C>): Promise<R extends true ? T : T | null>;
|
|
51
|
-
confirm(title: string, content: string, level?: ConfirmDialogLevel): Promise<boolean>;
|
|
52
|
-
confirm<C extends Component = Component>(options: ConfirmDialogProps<C>): Promise<boolean>;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export declare interface InfoDialogActionCta extends InfoDialogBaseCta {
|
|
56
|
-
action(): unknown;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export declare interface InfoDialogBaseCta {
|
|
60
|
-
text: string;
|
|
61
|
-
translateText?: boolean;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
declare interface InfoDialogBaseProps<T> {
|
|
65
|
-
title: string;
|
|
66
|
-
translateTitle?: boolean;
|
|
67
|
-
additionalCta?: InfoDialogCta<T>[];
|
|
68
|
-
defaultCta?: Partial<InfoDialogCta<T>> | false;
|
|
69
|
-
width?: number | string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export declare interface InfoDialogComponentContent<T = void, C extends Component = Component> extends InfoDialogBaseProps<T> {
|
|
73
|
-
component: C;
|
|
74
|
-
props: ComponentProps<C>;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export declare type InfoDialogCta<T> = InfoDialogActionCta | InfoDialogValueCta<T>;
|
|
78
|
-
|
|
79
|
-
export declare type InfoDialogProps<T = void, C extends Component = Component> = InfoDialogComponentContent<T, C> | InfoDialogTextContent<T>;
|
|
80
|
-
|
|
81
|
-
export declare interface InfoDialogTextContent<T> extends InfoDialogBaseProps<T> {
|
|
82
|
-
content: string;
|
|
83
|
-
translateContent?: boolean;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export declare interface InfoDialogValueCta<T> extends InfoDialogBaseCta {
|
|
87
|
-
value: T;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export declare type PromptDialogComponent<T> = ComponentPublicInstance<PromptDialogComponentProps<T>, any, any, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, PromptDialogComponentEmits<T>>;
|
|
91
|
-
|
|
92
|
-
export declare type PromptDialogComponentEmits<T> = (name: 'update:modelValue', value: T | null) => unknown;
|
|
93
|
-
|
|
94
|
-
export declare interface PromptDialogComponentProps<T> {
|
|
95
|
-
modelValue: T | null;
|
|
96
|
-
toolbar: HTMLElement;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export declare interface PromptDialogCta {
|
|
100
|
-
text: string;
|
|
101
|
-
translateText?: boolean;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export declare interface PromptDialogProps<T, R extends boolean = false, C extends PromptDialogComponent<T> = PromptDialogComponent<T>> {
|
|
105
|
-
title: string;
|
|
106
|
-
translateTitle?: boolean;
|
|
107
|
-
saveCta?: Partial<PromptDialogCta>;
|
|
108
|
-
abortCta?: Partial<PromptDialogCta>;
|
|
109
|
-
initialValue?: MaybeRefOrGetter<T>;
|
|
110
|
-
size?: PromptDialogSize;
|
|
111
|
-
required?: R;
|
|
112
|
-
component: C;
|
|
113
|
-
props: Omit<ComponentProps<C>, keyof PromptDialogComponentProps<T>>;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export declare enum PromptDialogSize {
|
|
117
|
-
SMALL = "sm",
|
|
118
|
-
LARGE = "lg"
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export declare const UiKitOutlet: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
122
|
-
|
|
123
|
-
export declare function useDialog(): DialogComposable;
|
|
124
|
-
|
|
125
|
-
export { }
|