@roku-ui/vue 0.17.0 → 0.18.2
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/components/Menu.vue.d.ts +20 -8
- package/dist/components/MenuItem.vue.d.ts +6 -3
- package/dist/components/ModalSystem.vue.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1786 -1692
- package/dist/index.umd.cjs +1 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/utils/menu.d.ts +5 -0
- package/dist/utils/modals.d.ts +29 -0
- package/package.json +2 -2
package/dist/shared/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export declare function getCSInner(colors: tinycolor.Instance[], type: CSType, d
|
|
|
72
72
|
export declare function useCS(cs: CSOptions): ComputedRef<CS>;
|
|
73
73
|
export declare function useColorCS(color: MaybeRef<Color>, type: CSType, index: CSIndex, alpha?: number): ComputedRef<CS>;
|
|
74
74
|
export declare function useSurfaceCS(type: CSType, index: CSIndex, alpha?: number): ComputedRef<CS>;
|
|
75
|
-
export declare function
|
|
75
|
+
export declare function useOutlineCS(color: MaybeRef<Color>): ComputedRef<CS>;
|
|
76
76
|
export declare function useButtonCS(variant?: MaybeRef<BtnVariant>, color?: MaybeRef<Color>): ComputedRef<CS>;
|
|
77
77
|
export declare function useInputColorStyle(color: MaybeRef<string>, variant?: MaybeRef<InputVariant>): ComputedRef<{
|
|
78
78
|
'--d-bg': string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MenuData, MenuDividerData, MenuItemData, MenuLabelData } from '../components/Menu.vue';
|
|
2
|
+
export declare function isDivider(item?: MenuData): item is MenuDividerData;
|
|
3
|
+
export declare function isLabel(item?: MenuData): item is MenuLabelData;
|
|
4
|
+
export declare function isMenuItem(item?: MenuData): item is MenuItemData;
|
|
5
|
+
export declare function someHasIcon(data?: MenuData[]): boolean;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { VNodeChild } from 'vue';
|
|
2
|
+
export interface BaseModalDataType {
|
|
3
|
+
id?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ConfirmModalDataType extends BaseModalDataType {
|
|
6
|
+
type: 'confirm';
|
|
7
|
+
title: string;
|
|
8
|
+
message: string;
|
|
9
|
+
onConfirm: () => void;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface AlertModalDataType extends BaseModalDataType {
|
|
13
|
+
type: 'alert';
|
|
14
|
+
title: string;
|
|
15
|
+
message: string;
|
|
16
|
+
onConfirm: () => void;
|
|
17
|
+
}
|
|
18
|
+
export interface CustomModalDataType extends BaseModalDataType {
|
|
19
|
+
type: 'custom';
|
|
20
|
+
render: () => VNodeChild;
|
|
21
|
+
}
|
|
22
|
+
export type ModalDataType = ConfirmModalDataType | AlertModalDataType;
|
|
23
|
+
export type ModalData = ModalDataType & {
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function useModals(): import('vue').ShallowRef<ModalData[], ModalData[]>;
|
|
27
|
+
export declare class Modals {
|
|
28
|
+
static open(data: ModalDataType): void;
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roku-ui/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.2",
|
|
5
5
|
"author": "Jianqi Pan <jannchie@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"vite-plugin-dts": "4.3.0",
|
|
56
56
|
"vitest": "^2.1.6",
|
|
57
57
|
"vue-tsc": "^2.1.10",
|
|
58
|
-
"@roku-ui/preset": "^0.
|
|
58
|
+
"@roku-ui/preset": "^0.18.2"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"dev": "vite",
|