@flux-ui/types 3.0.0-next.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.
package/src/notify.ts ADDED
@@ -0,0 +1,55 @@
1
+ import type { FluxColor, FluxDirection, FluxIconName, FluxInputType } from './common';
2
+
3
+ type BaseAlertObject = {
4
+ readonly id: number;
5
+ readonly icon?: FluxIconName;
6
+ readonly message: string;
7
+ readonly title: string;
8
+ }
9
+
10
+ export type FluxAlertObject = BaseAlertObject & {
11
+ onClose(): void;
12
+ };
13
+
14
+ export type FluxConfirmObject = BaseAlertObject & {
15
+ onCancel(): void;
16
+ onConfirm(): void;
17
+ };
18
+
19
+ export type FluxPromptObject = BaseAlertObject & {
20
+ onCancel(): void;
21
+ onConfirm(text: string): void;
22
+
23
+ readonly fieldLabel: string;
24
+ readonly fieldPlaceholder?: string;
25
+ readonly fieldType?: FluxInputType;
26
+ };
27
+
28
+ export type FluxSnackbarObject = {
29
+ readonly id: number;
30
+ readonly actions?: Record<string, string>;
31
+ readonly color?: FluxColor;
32
+ readonly icon?: FluxIconName;
33
+ readonly isCloseable?: boolean;
34
+ readonly isLoading?: boolean;
35
+ readonly isRendered?: boolean;
36
+ readonly message?: string;
37
+ readonly progressIndeterminate?: boolean;
38
+ readonly progressMax?: number;
39
+ readonly progressMin?: number;
40
+ readonly progressStatus?: string;
41
+ readonly progressValue?: number;
42
+ readonly subMessage?: string;
43
+ readonly title?: string;
44
+
45
+ onAction?(actionKey: string): void;
46
+ onClose?(): void;
47
+ };
48
+
49
+ export type FluxTooltipObject = {
50
+ readonly id: number;
51
+ readonly content?: string;
52
+ readonly contentSlot?: Function;
53
+ readonly direction: FluxDirection;
54
+ readonly origin?: HTMLElement;
55
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "useDefineForClassFields": true,
5
+ "module": "esnext",
6
+ "moduleResolution": "bundler",
7
+ "strict": true,
8
+ "jsx": "preserve",
9
+ "resolveJsonModule": true,
10
+ "isolatedModules": true,
11
+ "esModuleInterop": true,
12
+ "lib": [
13
+ "esnext",
14
+ "dom"
15
+ ],
16
+ "skipLibCheck": true,
17
+ "allowSyntheticDefaultImports": true,
18
+ "declaration": true,
19
+ "declarationMap": true,
20
+ "emitDeclarationOnly": true,
21
+ "outDir": "dist",
22
+ "baseUrl": ".",
23
+ "rootDir": "./src",
24
+ "paths": {
25
+ "$flux/*": ["src/*"]
26
+ }
27
+ },
28
+ "include": [
29
+ "./src/**/*.ts",
30
+ "./src/**/*.vue"
31
+ ],
32
+ "exclude": [
33
+ "dist",
34
+ "node_modules"
35
+ ],
36
+ "references": [
37
+ {
38
+ "path": "./tsconfig.node.json"
39
+ }
40
+ ],
41
+ "vueCompilerOptions": {
42
+ "target": 3.5,
43
+ "strictTemplates": false
44
+ }
45
+ }