fluekit 2.0.1 → 2.1.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/README.md +24 -9
- package/dist/ActionChip.d.ts +31 -0
- package/dist/AlertDialog.d.ts +7 -0
- package/dist/AnimatedContainer.d.ts +2 -1
- package/dist/AppBar.d.ts +3 -2
- package/dist/BackdropFilter.d.ts +23 -0
- package/dist/Border.d.ts +3 -2
- package/dist/Box.d.ts +2 -1
- package/dist/BoxDecoration.d.ts +6 -24
- package/dist/BoxFit.d.ts +12 -0
- package/dist/BoxShadow.d.ts +2 -1
- package/dist/Button.d.ts +6 -5
- package/dist/ButtonStyle.d.ts +5 -4
- package/dist/Card.d.ts +5 -4
- package/dist/Checkbox.d.ts +3 -2
- package/dist/Chip.d.ts +36 -0
- package/dist/ChoiceChip.d.ts +35 -0
- package/dist/CircleAvatar.d.ts +29 -0
- package/dist/CircularProgressIndicator.d.ts +1 -1
- package/dist/Clip.d.ts +11 -0
- package/dist/Color.d.ts +7 -0
- package/dist/Colors.d.ts +1 -1
- package/dist/Container.d.ts +2 -1
- package/dist/CupertinoActivityIndicator.d.ts +1 -1
- package/dist/CupertinoColors.d.ts +2 -2
- package/dist/CupertinoContextMenu.d.ts +2 -6
- package/dist/CupertinoNavigationBar.d.ts +3 -2
- package/dist/CupertinoPageScaffold.d.ts +3 -2
- package/dist/Divider.d.ts +3 -2
- package/dist/Drawer.d.ts +44 -0
- package/dist/EdgeInsets.d.ts +1 -0
- package/dist/ElevatedButton.d.ts +37 -0
- package/dist/FlueConfigProvider.d.ts +26 -0
- package/dist/Gradient.d.ts +2 -1
- package/dist/Icon.d.ts +2 -1
- package/dist/IconButton.d.ts +32 -0
- package/dist/Icons.d.ts +6 -0
- package/dist/ImageFilter.d.ts +28 -0
- package/dist/ImageProvider.d.ts +16 -2
- package/dist/InkWell.d.ts +4 -4
- package/dist/InputDecoration.d.ts +3 -1
- package/dist/LinearProgressIndicator.d.ts +1 -1
- package/dist/ListTile.d.ts +6 -5
- package/dist/ListView.d.ts +1 -0
- package/dist/OutlinedButton.d.ts +37 -0
- package/dist/Overlay.d.ts +33 -0
- package/dist/PopupMenuButton.d.ts +39 -0
- package/dist/Radio.d.ts +3 -2
- package/dist/RefreshIndicator.d.ts +32 -0
- package/dist/Scaffold.d.ts +21 -8
- package/dist/Slider.d.ts +7 -6
- package/dist/SlidingSegmentedControl.d.ts +25 -0
- package/dist/Switch.d.ts +9 -8
- package/dist/TabBar.d.ts +25 -0
- package/dist/TabBarView.d.ts +20 -0
- package/dist/TextButton.d.ts +37 -0
- package/dist/TextField.d.ts +2 -1
- package/dist/TextStyle.d.ts +5 -4
- package/dist/__tests__/px2vw_mobile.spec.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +26 -2
- package/dist/index.js +4428 -3328
- package/dist/px2vw.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,21 +60,35 @@ import { Container, Column, Row, Text, SizedBox, Alignment, MainAxisAlignment }
|
|
|
60
60
|
|
|
61
61
|
FlueKit automatically converts number values (e.g., `:width="100"`) to `vw` units based on a default design width of **750px**.
|
|
62
62
|
|
|
63
|
-
To
|
|
63
|
+
To enable this feature and configure the design width, wrap your application with `FlueConfigProvider`:
|
|
64
64
|
|
|
65
|
-
```
|
|
66
|
-
|
|
65
|
+
```vue
|
|
66
|
+
<!-- App.vue -->
|
|
67
|
+
<template>
|
|
68
|
+
<FlueConfigProvider
|
|
69
|
+
:transform="true"
|
|
70
|
+
:designWidth="750"
|
|
71
|
+
assetBaseURL="https://cdn.example.com/assets/"
|
|
72
|
+
>
|
|
73
|
+
<Root></Root>
|
|
74
|
+
</FlueConfigProvider>
|
|
75
|
+
</template>
|
|
67
76
|
|
|
68
|
-
|
|
69
|
-
|
|
77
|
+
<script setup>
|
|
78
|
+
import { FlueConfigProvider } from "fluekit";
|
|
79
|
+
</script>
|
|
70
80
|
```
|
|
71
81
|
|
|
72
|
-
|
|
82
|
+
#### Bypassing Conversion
|
|
83
|
+
|
|
84
|
+
If you want to use exact pixel values without conversion, you can explicitly use the `px` unit string:
|
|
73
85
|
|
|
74
|
-
```
|
|
75
|
-
|
|
86
|
+
```vue
|
|
87
|
+
<!-- This will be converted to vw -->
|
|
88
|
+
<Container :width="100" />
|
|
76
89
|
|
|
77
|
-
|
|
90
|
+
<!-- This will remain exactly 100px -->
|
|
91
|
+
<Container width="100px" />
|
|
78
92
|
```
|
|
79
93
|
|
|
80
94
|
## 🧩 Component Overview
|
|
@@ -98,6 +112,7 @@ setTransform(false); // Numbers will be treated as px
|
|
|
98
112
|
### Painting & Effects
|
|
99
113
|
|
|
100
114
|
- **Opacity / AnimatedOpacity**: Makes its child partially transparent.
|
|
115
|
+
- **BackdropFilter**: Applies a filter (e.g., blur) to the existing painted content.
|
|
101
116
|
- **Transform**: Applies a transformation before painting its child.
|
|
102
117
|
- **Decorations**: Rich styling support via `BoxDecoration` (borders, shadows, gradients, images).
|
|
103
118
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { Color } from './Color';
|
|
3
|
+
interface Props {
|
|
4
|
+
label: string;
|
|
5
|
+
avatar?: Component;
|
|
6
|
+
backgroundColor?: string | Color;
|
|
7
|
+
labelColor?: string | Color;
|
|
8
|
+
}
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
slots: {
|
|
12
|
+
avatar?(_: {}): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {};
|
|
15
|
+
rootEl: any;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
19
|
+
pressed: () => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
21
|
+
onPressed?: (() => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
backgroundColor: string | Color;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
package/dist/AlertDialog.d.ts
CHANGED
|
@@ -21,12 +21,16 @@ interface Props {
|
|
|
21
21
|
titleStyle?: TextStyle;
|
|
22
22
|
titleColor?: string;
|
|
23
23
|
titleFontSize?: number;
|
|
24
|
+
variant?: "material" | "ios";
|
|
25
|
+
okText?: string;
|
|
26
|
+
cancelText?: string;
|
|
24
27
|
}
|
|
25
28
|
declare function __VLS_template(): {
|
|
26
29
|
attrs: Partial<{}>;
|
|
27
30
|
slots: {
|
|
28
31
|
default?(_: {}): any;
|
|
29
32
|
actions?(_: {}): any;
|
|
33
|
+
actions?(_: {}): any;
|
|
30
34
|
};
|
|
31
35
|
refs: {};
|
|
32
36
|
rootEl: any;
|
|
@@ -43,9 +47,12 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
43
47
|
}>, {
|
|
44
48
|
alignment: Alignment;
|
|
45
49
|
visible: boolean;
|
|
50
|
+
variant: "material" | "ios";
|
|
46
51
|
barrierDismissible: boolean;
|
|
47
52
|
barrierColor: string;
|
|
48
53
|
actionsAlignment: MainAxisAlignment;
|
|
54
|
+
okText: string;
|
|
55
|
+
cancelText: string;
|
|
49
56
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
50
57
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
51
58
|
export default _default;
|
|
@@ -2,6 +2,7 @@ import { BoxConstraints } from './BoxConstraints';
|
|
|
2
2
|
import { BoxDecoration } from './BoxDecoration';
|
|
3
3
|
import { EdgeInsets } from './EdgeInsets';
|
|
4
4
|
import { Alignment } from './FlexProps';
|
|
5
|
+
import { Color } from './Color';
|
|
5
6
|
interface Props {
|
|
6
7
|
width?: number | string;
|
|
7
8
|
height?: number | string;
|
|
@@ -9,7 +10,7 @@ interface Props {
|
|
|
9
10
|
margin?: EdgeInsets;
|
|
10
11
|
decoration?: BoxDecoration;
|
|
11
12
|
foregroundDecoration?: BoxDecoration;
|
|
12
|
-
color?: string;
|
|
13
|
+
color?: string | Color;
|
|
13
14
|
alignment?: Alignment | string;
|
|
14
15
|
clipBehavior?: "none" | "hardEdge" | "antiAlias" | string;
|
|
15
16
|
transform?: string;
|
package/dist/AppBar.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EdgeInsets } from './EdgeInsets';
|
|
2
|
+
import { Color } from './Color';
|
|
2
3
|
export interface AppBarProps {
|
|
3
4
|
title?: string;
|
|
4
|
-
backgroundColor?: string;
|
|
5
|
+
backgroundColor?: string | Color;
|
|
5
6
|
height?: number;
|
|
6
7
|
centerTitle?: boolean;
|
|
7
8
|
elevation?: number;
|
|
@@ -20,7 +21,7 @@ declare function __VLS_template(): {
|
|
|
20
21
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
22
|
declare const __VLS_component: import('vue').DefineComponent<AppBarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AppBarProps> & Readonly<{}>, {
|
|
22
23
|
height: number;
|
|
23
|
-
backgroundColor: string;
|
|
24
|
+
backgroundColor: string | Color;
|
|
24
25
|
elevation: number;
|
|
25
26
|
centerTitle: boolean;
|
|
26
27
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { ImageFilter } from './ImageFilter';
|
|
3
|
+
interface Props {
|
|
4
|
+
filter: ImageFilter | string;
|
|
5
|
+
blendMode?: CSSProperties["mixBlendMode"];
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
package/dist/Border.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
|
+
import { Color } from './Color';
|
|
2
3
|
export type BorderStyleType = "none" | "solid" | "dashed" | "dotted" | "double";
|
|
3
4
|
declare const BORDER_SIDE_SYMBOL: unique symbol;
|
|
4
5
|
declare const BORDERS_SYMBOL: unique symbol;
|
|
5
6
|
export type BorderSide = {
|
|
6
7
|
width?: number | string;
|
|
7
|
-
color?: string;
|
|
8
|
+
color?: string | Color;
|
|
8
9
|
style?: BorderStyleType;
|
|
9
10
|
[BORDER_SIDE_SYMBOL]?: true;
|
|
10
11
|
};
|
|
@@ -19,7 +20,7 @@ export declare function BorderSide(side: Omit<BorderSide, typeof BORDER_SIDE_SYM
|
|
|
19
20
|
export interface BorderFunction {
|
|
20
21
|
(side: Omit<BorderSide, typeof BORDER_SIDE_SYMBOL>): BorderSide;
|
|
21
22
|
all: (options?: {
|
|
22
|
-
color?: string;
|
|
23
|
+
color?: string | Color;
|
|
23
24
|
width?: number | string;
|
|
24
25
|
style?: BorderStyleType;
|
|
25
26
|
}) => Borders;
|
package/dist/Box.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { EdgeInsets } from './EdgeInsets';
|
|
|
5
5
|
import { Borders } from './Border';
|
|
6
6
|
import { BorderRadius } from './BorderRadius';
|
|
7
7
|
import { BoxShadow } from './BoxShadow';
|
|
8
|
+
import { Color } from './Color';
|
|
8
9
|
interface Props {
|
|
9
10
|
width?: number | string;
|
|
10
11
|
height?: number | string;
|
|
@@ -15,7 +16,7 @@ interface Props {
|
|
|
15
16
|
transformAlignment?: Alignment;
|
|
16
17
|
constraints?: BoxConstraints;
|
|
17
18
|
clipBehavior?: "none" | "hardEdge" | "antiAlias" | string;
|
|
18
|
-
color?: string;
|
|
19
|
+
color?: string | Color;
|
|
19
20
|
border?: Borders;
|
|
20
21
|
borderRadius?: BorderRadius;
|
|
21
22
|
boxShadow?: BoxShadow[];
|
package/dist/BoxDecoration.d.ts
CHANGED
|
@@ -3,19 +3,12 @@ import { Alignment } from './Alignment';
|
|
|
3
3
|
import { Borders } from './Border';
|
|
4
4
|
import { BorderRadius } from './BorderRadius';
|
|
5
5
|
import { BoxShadowProps } from './BoxShadow';
|
|
6
|
+
import { Color } from './Color';
|
|
7
|
+
import { ImageFilter } from './ImageFilter';
|
|
8
|
+
import { BoxFit } from './BoxFit';
|
|
6
9
|
import { ImageProvider } from './ImageProvider';
|
|
7
10
|
export * from './Gradient';
|
|
8
|
-
|
|
9
|
-
export type BoxFit = Valueof<typeof BoxFit>;
|
|
10
|
-
export declare const BoxFit: {
|
|
11
|
-
readonly fitWidth: "fitWidth";
|
|
12
|
-
readonly fitHeight: "fitHeight";
|
|
13
|
-
readonly fill: "fill";
|
|
14
|
-
readonly contain: "contain";
|
|
15
|
-
readonly cover: "cover";
|
|
16
|
-
readonly none: "none";
|
|
17
|
-
readonly scaleDown: "scaleDown";
|
|
18
|
-
};
|
|
11
|
+
export { Clip } from './Clip';
|
|
19
12
|
export type ImageRepeat = "repeat" | "repeat-x" | "repeat-y" | "no-repeat";
|
|
20
13
|
export type Overflow = "none" | "visible" | "hidden" | "scroll" | "auto";
|
|
21
14
|
export type BoxAlignment = Alignment;
|
|
@@ -34,7 +27,6 @@ export declare enum BoxShape {
|
|
|
34
27
|
rectangle = "rectangle",
|
|
35
28
|
circle = "circle"
|
|
36
29
|
}
|
|
37
|
-
export declare function setBaseUrl(url: string): void;
|
|
38
30
|
export declare function normalizeSrc(src: string): string;
|
|
39
31
|
export interface DecorationImageProps {
|
|
40
32
|
image: ImageProvider | string;
|
|
@@ -53,7 +45,7 @@ export declare function DecorationImage(props: DecorationImageProps): Decoration
|
|
|
53
45
|
*/
|
|
54
46
|
declare const BOX_DECORATION_SYMBOL: unique symbol;
|
|
55
47
|
export type BoxDecorationProps = {
|
|
56
|
-
color?: string;
|
|
48
|
+
color?: string | Color;
|
|
57
49
|
border?: Borders;
|
|
58
50
|
borderRadius?: BorderRadius;
|
|
59
51
|
boxShadow?: BoxShadowProps | BoxShadowProps[];
|
|
@@ -62,6 +54,7 @@ export type BoxDecorationProps = {
|
|
|
62
54
|
overflow?: Overflow;
|
|
63
55
|
opacity?: number;
|
|
64
56
|
shape?: BoxShape;
|
|
57
|
+
backdropFilter?: ImageFilter | string;
|
|
65
58
|
};
|
|
66
59
|
export type BoxDecoration = BoxDecorationProps & {
|
|
67
60
|
[BOX_DECORATION_SYMBOL]?: true;
|
|
@@ -73,14 +66,3 @@ export declare function BoxDecoration(props?: BoxDecorationProps): BoxDecoration
|
|
|
73
66
|
* 类型守卫:检查对象是否通过 BoxDecoration 构造函数创建
|
|
74
67
|
*/
|
|
75
68
|
export declare function isBoxDecoration(value: any): value is BoxDecoration;
|
|
76
|
-
/**
|
|
77
|
-
* Clip
|
|
78
|
-
* 对应 Flutter 的 Clip
|
|
79
|
-
*/
|
|
80
|
-
export declare const Clip: {
|
|
81
|
-
readonly none: "none";
|
|
82
|
-
readonly hardEdge: "hardEdge";
|
|
83
|
-
readonly antiAlias: "antiAlias";
|
|
84
|
-
readonly antiAliasWithSaveLayer: "antiAliasWithSaveLayer";
|
|
85
|
-
};
|
|
86
|
-
export type Clip = keyof typeof Clip;
|
package/dist/BoxFit.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const BoxFit: {
|
|
2
|
+
readonly fitWidth: "fitWidth";
|
|
3
|
+
readonly fitHeight: "fitHeight";
|
|
4
|
+
readonly fill: "fill";
|
|
5
|
+
readonly contain: "contain";
|
|
6
|
+
readonly cover: "cover";
|
|
7
|
+
readonly none: "none";
|
|
8
|
+
readonly scaleDown: "scaleDown";
|
|
9
|
+
};
|
|
10
|
+
type Valueof<T> = T[keyof T];
|
|
11
|
+
export type BoxFit = Valueof<typeof BoxFit>;
|
|
12
|
+
export {};
|
package/dist/BoxShadow.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Color } from './Color';
|
|
1
2
|
export interface Offset {
|
|
2
3
|
x: number;
|
|
3
4
|
y: number;
|
|
@@ -9,7 +10,7 @@ export declare enum BlurStyle {
|
|
|
9
10
|
inner = "inner"
|
|
10
11
|
}
|
|
11
12
|
export interface BoxShadowProps {
|
|
12
|
-
color?: string;
|
|
13
|
+
color?: string | Color;
|
|
13
14
|
offset?: Offset;
|
|
14
15
|
blurRadius?: number;
|
|
15
16
|
spreadRadius?: number;
|
package/dist/Button.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { BorderRadius } from './BorderRadius';
|
|
1
2
|
import { ButtonStyle } from './ButtonStyle';
|
|
2
|
-
import {
|
|
3
|
+
import { Color } from './Color';
|
|
3
4
|
import { EdgeInsets } from './EdgeInsets';
|
|
4
|
-
import {
|
|
5
|
+
import { Behavior } from './useGesture';
|
|
5
6
|
interface Props {
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
behavior?: Behavior;
|
|
8
9
|
text?: string;
|
|
9
10
|
style?: ButtonStyle;
|
|
10
11
|
variant?: "ios" | "raw";
|
|
11
|
-
color?: string;
|
|
12
|
-
disabledColor?: string;
|
|
12
|
+
color?: string | Color;
|
|
13
|
+
disabledColor?: string | Color;
|
|
13
14
|
pressedOpacity?: number;
|
|
14
15
|
padding?: EdgeInsets;
|
|
15
16
|
borderRadius?: BorderRadius;
|
|
@@ -38,7 +39,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
38
39
|
}>, {
|
|
39
40
|
disabled: boolean;
|
|
40
41
|
behavior: Behavior;
|
|
41
|
-
disabledColor: string;
|
|
42
|
+
disabledColor: string | Color;
|
|
42
43
|
pressedOpacity: number;
|
|
43
44
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
44
45
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/dist/ButtonStyle.d.ts
CHANGED
|
@@ -5,12 +5,13 @@ import { BorderRadius } from './BorderRadius';
|
|
|
5
5
|
import { EdgeInsets } from './EdgeInsets';
|
|
6
6
|
import { SizeType } from './Size';
|
|
7
7
|
import { TextStyle } from './TextStyle';
|
|
8
|
+
import { Color } from './Color';
|
|
8
9
|
export interface ButtonStyle {
|
|
9
10
|
textStyle?: TextStyle;
|
|
10
|
-
backgroundColor?: string;
|
|
11
|
-
foregroundColor?: string;
|
|
12
|
-
overlayColor?: string;
|
|
13
|
-
shadowColor?: string;
|
|
11
|
+
backgroundColor?: string | Color;
|
|
12
|
+
foregroundColor?: string | Color;
|
|
13
|
+
overlayColor?: string | Color;
|
|
14
|
+
shadowColor?: string | Color;
|
|
14
15
|
elevation?: number;
|
|
15
16
|
padding?: EdgeInsets;
|
|
16
17
|
minimumSize?: SizeType;
|
package/dist/Card.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { BorderRadius } from './BorderRadius';
|
|
2
2
|
import { EdgeInsets } from './EdgeInsets';
|
|
3
|
+
import { Color } from './Color';
|
|
3
4
|
interface Props {
|
|
4
|
-
color?: string;
|
|
5
|
-
shadowColor?: string;
|
|
5
|
+
color?: string | Color;
|
|
6
|
+
shadowColor?: string | Color;
|
|
6
7
|
elevation?: number;
|
|
7
8
|
shape?: BorderRadius;
|
|
8
9
|
margin?: EdgeInsets;
|
|
@@ -20,12 +21,12 @@ declare function __VLS_template(): {
|
|
|
20
21
|
};
|
|
21
22
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
23
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
23
|
-
color: string;
|
|
24
|
+
color: string | Color;
|
|
24
25
|
margin: EdgeInsets;
|
|
25
26
|
clipBehavior: "none" | "hardEdge" | "antiAlias" | string;
|
|
26
27
|
elevation: number;
|
|
27
28
|
variant: "material" | "ios";
|
|
28
|
-
shadowColor: string;
|
|
29
|
+
shadowColor: string | Color;
|
|
29
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
31
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
32
|
export default _default;
|
package/dist/Checkbox.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Color } from './Color';
|
|
1
2
|
export interface CheckboxProps<T> {
|
|
2
3
|
value?: T;
|
|
3
4
|
onChanged?: (value: T) => void;
|
|
4
|
-
activeColor?: string;
|
|
5
|
-
checkColor?: string;
|
|
5
|
+
activeColor?: string | Color;
|
|
6
|
+
checkColor?: string | Color;
|
|
6
7
|
labelPosition?: "left" | "right";
|
|
7
8
|
hideIcon?: boolean;
|
|
8
9
|
}
|
package/dist/Chip.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { Color } from './Color';
|
|
3
|
+
interface Props {
|
|
4
|
+
label: string;
|
|
5
|
+
avatar?: Component;
|
|
6
|
+
backgroundColor?: string | Color;
|
|
7
|
+
labelColor?: string | Color;
|
|
8
|
+
deletable?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
slots: {
|
|
13
|
+
avatar?(_: {}): any;
|
|
14
|
+
deleteIcon?(_: {}): any;
|
|
15
|
+
};
|
|
16
|
+
refs: {};
|
|
17
|
+
rootEl: any;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
21
|
+
delete: () => any;
|
|
22
|
+
pressed: () => any;
|
|
23
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
24
|
+
onDelete?: (() => any) | undefined;
|
|
25
|
+
onPressed?: (() => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
backgroundColor: string | Color;
|
|
28
|
+
labelColor: string | Color;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { Color } from './Color';
|
|
3
|
+
interface Props {
|
|
4
|
+
label: string;
|
|
5
|
+
selected: boolean;
|
|
6
|
+
avatar?: Component;
|
|
7
|
+
backgroundColor?: string | Color;
|
|
8
|
+
selectedColor?: string | Color;
|
|
9
|
+
labelColor?: string | Color;
|
|
10
|
+
}
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: {
|
|
14
|
+
avatar?(_: {}): any;
|
|
15
|
+
};
|
|
16
|
+
refs: {};
|
|
17
|
+
rootEl: any;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
21
|
+
selected: (value: boolean) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
23
|
+
onSelected?: ((value: boolean) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
backgroundColor: string | Color;
|
|
26
|
+
selected: boolean;
|
|
27
|
+
selectedColor: string | Color;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Color } from './Color';
|
|
2
|
+
interface Props {
|
|
3
|
+
backgroundImage?: string;
|
|
4
|
+
backgroundColor?: string | Color;
|
|
5
|
+
foregroundColor?: string | Color;
|
|
6
|
+
radius?: number;
|
|
7
|
+
minRadius?: number;
|
|
8
|
+
maxRadius?: number;
|
|
9
|
+
}
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
slots: {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
20
|
+
backgroundColor: string | Color;
|
|
21
|
+
foregroundColor: string | Color;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -25,8 +25,8 @@ interface Props {
|
|
|
25
25
|
size?: number;
|
|
26
26
|
}
|
|
27
27
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
28
|
-
size: number;
|
|
29
28
|
color: string | Color;
|
|
29
|
+
size: number;
|
|
30
30
|
value: number | null;
|
|
31
31
|
strokeWidth: number;
|
|
32
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
package/dist/Clip.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clip
|
|
3
|
+
* 对应 Flutter 的 Clip
|
|
4
|
+
*/
|
|
5
|
+
export declare const Clip: {
|
|
6
|
+
readonly none: "none";
|
|
7
|
+
readonly hardEdge: "hardEdge";
|
|
8
|
+
readonly antiAlias: "antiAlias";
|
|
9
|
+
readonly antiAliasWithSaveLayer: "antiAliasWithSaveLayer";
|
|
10
|
+
};
|
|
11
|
+
export type Clip = keyof typeof Clip;
|
package/dist/Color.d.ts
CHANGED
|
@@ -87,6 +87,13 @@ export declare class Color {
|
|
|
87
87
|
*/
|
|
88
88
|
get value(): number;
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Resolves a color value to a CSS string.
|
|
92
|
+
*
|
|
93
|
+
* @param color A string color, a Color object, or undefined/null.
|
|
94
|
+
* @returns The CSS string representation or undefined.
|
|
95
|
+
*/
|
|
96
|
+
export declare function resolveColor(color: string | Color | undefined | null): string | undefined;
|
|
90
97
|
export declare function withOpacity(color: string | Color, opacity: number): string;
|
|
91
98
|
export declare function withAlpha(color: string | Color, alpha: number): string;
|
|
92
99
|
export declare function withRed(color: string | Color, red: number): string;
|
package/dist/Colors.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const Colors: {
|
|
|
6
6
|
withGreen: (color: Color | string, green: number) => Color;
|
|
7
7
|
withBlue: (color: Color | string, blue: number) => Color;
|
|
8
8
|
computeLuminance: (color: Color | string) => number;
|
|
9
|
-
lighten: (color: Color | string, amount: number) =>
|
|
9
|
+
lighten: (color: Color | string, amount: number) => string;
|
|
10
10
|
transparent: Color;
|
|
11
11
|
black: Color;
|
|
12
12
|
black87: Color;
|
package/dist/Container.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { BoxConstraints } from './BoxConstraints';
|
|
|
2
2
|
import { Alignment } from './Alignment';
|
|
3
3
|
import { BoxDecoration } from './BoxDecoration';
|
|
4
4
|
import { EdgeInsets } from './EdgeInsets';
|
|
5
|
+
import { Color } from './Color';
|
|
5
6
|
interface Props {
|
|
6
7
|
width?: number | string;
|
|
7
8
|
height?: number | string;
|
|
@@ -9,7 +10,7 @@ interface Props {
|
|
|
9
10
|
margin?: EdgeInsets;
|
|
10
11
|
decoration?: BoxDecoration;
|
|
11
12
|
foregroundDecoration?: BoxDecoration;
|
|
12
|
-
color?: string;
|
|
13
|
+
color?: string | Color;
|
|
13
14
|
alignment?: Alignment;
|
|
14
15
|
clipBehavior?: "none" | "hardEdge" | "antiAlias" | string;
|
|
15
16
|
transform?: string;
|
|
@@ -17,7 +17,7 @@ interface Props {
|
|
|
17
17
|
}
|
|
18
18
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
19
19
|
color: string | Color;
|
|
20
|
-
radius: number;
|
|
21
20
|
animating: boolean;
|
|
21
|
+
radius: number;
|
|
22
22
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
23
|
export default _default;
|
|
@@ -6,8 +6,8 @@ export declare const CupertinoColors: {
|
|
|
6
6
|
withGreen: (color: Color | string, green: number) => Color;
|
|
7
7
|
withBlue: (color: Color | string, blue: number) => Color;
|
|
8
8
|
computeLuminance: (color: Color | string) => number;
|
|
9
|
-
lighten: (color: Color | string, amount: number) =>
|
|
10
|
-
darken: (color: Color | string, amount: number) =>
|
|
9
|
+
lighten: (color: Color | string, amount: number) => string;
|
|
10
|
+
darken: (color: Color | string, amount: number) => string;
|
|
11
11
|
activeBlue: Color;
|
|
12
12
|
activeGreen: Color;
|
|
13
13
|
activeOrange: Color;
|
|
@@ -13,15 +13,11 @@ declare function __VLS_template(): {
|
|
|
13
13
|
slots: {
|
|
14
14
|
default?(_: {}): any;
|
|
15
15
|
};
|
|
16
|
-
refs: {
|
|
17
|
-
anchorRef: HTMLDivElement;
|
|
18
|
-
};
|
|
16
|
+
refs: {};
|
|
19
17
|
rootEl: HTMLDivElement;
|
|
20
18
|
};
|
|
21
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
23
|
-
anchorRef: HTMLDivElement;
|
|
24
|
-
}, HTMLDivElement>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
25
21
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
22
|
export default _default;
|
|
27
23
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { EdgeInsets } from './EdgeInsets';
|
|
2
2
|
import { Borders } from './Border';
|
|
3
|
+
import { Color } from './Color';
|
|
3
4
|
export interface CupertinoNavigationBarProps {
|
|
4
5
|
middle?: string;
|
|
5
|
-
backgroundColor?: string;
|
|
6
|
+
backgroundColor?: string | Color;
|
|
6
7
|
border?: Borders | null;
|
|
7
8
|
padding?: EdgeInsets;
|
|
8
9
|
}
|
|
@@ -19,7 +20,7 @@ declare function __VLS_template(): {
|
|
|
19
20
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
21
|
declare const __VLS_component: import('vue').DefineComponent<CupertinoNavigationBarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CupertinoNavigationBarProps> & Readonly<{}>, {
|
|
21
22
|
border: Borders | null;
|
|
22
|
-
backgroundColor: string;
|
|
23
|
+
backgroundColor: string | Color;
|
|
23
24
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
24
25
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
26
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Color } from './Color';
|
|
1
2
|
export interface CupertinoPageScaffoldProps {
|
|
2
|
-
backgroundColor?: string;
|
|
3
|
+
backgroundColor?: string | Color;
|
|
3
4
|
}
|
|
4
5
|
declare function __VLS_template(): {
|
|
5
6
|
attrs: Partial<{}>;
|
|
@@ -13,7 +14,7 @@ declare function __VLS_template(): {
|
|
|
13
14
|
};
|
|
14
15
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
16
|
declare const __VLS_component: import('vue').DefineComponent<CupertinoPageScaffoldProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CupertinoPageScaffoldProps> & Readonly<{}>, {
|
|
16
|
-
backgroundColor: string;
|
|
17
|
+
backgroundColor: string | Color;
|
|
17
18
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
19
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
20
|
export default _default;
|