apptify 0.6.1 → 0.7.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 +1 -1
- package/THIRD_PARTY_LICENSES.txt +23 -0
- package/dist/apptify.css +1 -1
- package/dist/apptify.js +2395 -2451
- package/dist/components/AppleCard.vue.d.ts +1 -1
- package/dist/components/content.d.ts +81 -20
- package/dist/components/forms.d.ts +2 -2
- package/dist/components/foundation.d.ts +133 -11
- package/dist/components/mobile-image-viewer.d.ts +35 -12
- package/dist/components/navibar.d.ts +2 -2
- package/dist/components/overlays.d.ts +10 -59
- package/dist/components/scrollbar.d.ts +88 -0
- package/dist/components/speed-dial.d.ts +157 -0
- package/dist/core/context.d.ts +11 -0
- package/dist/core/device.d.ts +2 -0
- package/dist/core/image-gallery-motion.d.ts +2 -1
- package/dist/core/image-motion.d.ts +1 -1
- package/dist/core/layers.d.ts +1 -0
- package/dist/core/motion-driver.d.ts +40 -0
- package/dist/core/motion.d.ts +1 -1
- package/dist/core/ripple.d.ts +16 -0
- package/dist/core/scroll-motion.d.ts +6 -0
- package/dist/core/scrollbar.d.ts +14 -0
- package/dist/core/speed-dial.d.ts +21 -0
- package/dist/index.d.ts +237 -26
- package/docs/COMPONENTS.md +10 -6
- package/package.json +5 -7
- package/templates/playground/README.md +1 -1
- package/templates/playground/package.json +1 -2
- package/templates/playground/source-snapshot.json +299 -66
- package/templates/playground/src/App.vue +1 -0
- package/templates/playground/src/ComponentDemo.vue +30 -21
- package/templates/playground/src/catalog.ts +70 -65
- package/templates/playground/src/components/ComponentIndex.vue +10 -14
- package/templates/playground/src/components/MasonryFeed.vue +52 -0
- package/templates/playground/src/components/UserMenu.vue +1 -1
- package/templates/playground/src/components/forbidden-paper-scene.vue +367 -0
- package/templates/playground/src/components/forbidden-paper-story.ts +233 -0
- package/templates/playground/src/editor/ComponentPlayground.vue +89 -0
- package/templates/playground/src/editor/ConfigurableEditor.vue +1 -1
- package/templates/playground/src/editor/apple-input-source.ts +1 -1
- package/templates/playground/src/editor/component-metadata.ts +72 -0
- package/templates/playground/src/editor/component-playground.ts +162 -0
- package/templates/playground/src/editor/contract.ts +1 -1
- package/templates/playground/src/editor/documents.ts +11 -2
- package/templates/playground/src/editor/handbook.ts +22 -0
- package/templates/playground/src/editor/handbooks/apple-accordion.ts +66 -0
- package/templates/playground/src/editor/handbooks/apple-action-sheet.ts +72 -0
- package/templates/playground/src/editor/handbooks/apple-alert.ts +67 -0
- package/templates/playground/src/editor/handbooks/apple-aside.ts +32 -0
- package/templates/playground/src/editor/handbooks/apple-auto-size.ts +32 -0
- package/templates/playground/src/editor/handbooks/apple-autocomplete.ts +114 -0
- package/templates/playground/src/editor/handbooks/apple-avatar-group.ts +50 -0
- package/templates/playground/src/editor/handbooks/apple-avatar.ts +56 -0
- package/templates/playground/src/editor/handbooks/apple-back-top.ts +62 -0
- package/templates/playground/src/editor/handbooks/apple-badge.ts +62 -0
- package/templates/playground/src/editor/handbooks/apple-breadcrumbs.ts +38 -0
- package/templates/playground/src/editor/handbooks/apple-button.ts +92 -0
- package/templates/playground/src/editor/handbooks/apple-card.ts +112 -0
- package/templates/playground/src/editor/handbooks/apple-cascader.ts +102 -0
- package/templates/playground/src/editor/handbooks/apple-checkbox.ts +85 -0
- package/templates/playground/src/editor/handbooks/apple-color-picker.ts +79 -0
- package/templates/playground/src/editor/handbooks/apple-container.ts +26 -0
- package/templates/playground/src/editor/handbooks/apple-date-picker.ts +104 -0
- package/templates/playground/src/editor/handbooks/apple-dialog.ts +151 -0
- package/templates/playground/src/editor/handbooks/apple-divider.ts +38 -0
- package/templates/playground/src/editor/handbooks/apple-drawer.ts +151 -0
- package/templates/playground/src/editor/handbooks/apple-empty.ts +43 -0
- package/templates/playground/src/editor/handbooks/apple-floating-group.ts +51 -0
- package/templates/playground/src/editor/handbooks/apple-form-field.ts +69 -0
- package/templates/playground/src/editor/handbooks/apple-form.ts +76 -0
- package/templates/playground/src/editor/handbooks/apple-grid.ts +32 -0
- package/templates/playground/src/editor/handbooks/apple-image.ts +122 -0
- package/templates/playground/src/editor/handbooks/apple-infinite-scroll.ts +73 -0
- package/templates/playground/src/editor/handbooks/apple-link.ts +68 -0
- package/templates/playground/src/editor/handbooks/apple-list.ts +67 -0
- package/templates/playground/src/editor/handbooks/apple-menu.ts +72 -0
- package/templates/playground/src/editor/handbooks/apple-navibar.ts +100 -0
- package/templates/playground/src/editor/handbooks/apple-otp-input.ts +108 -0
- package/templates/playground/src/editor/handbooks/apple-overlay-host.ts +13 -0
- package/templates/playground/src/editor/handbooks/apple-pagination.ts +61 -0
- package/templates/playground/src/editor/handbooks/apple-popover.ts +112 -0
- package/templates/playground/src/editor/handbooks/apple-progress.ts +56 -0
- package/templates/playground/src/editor/handbooks/apple-provider.ts +32 -0
- package/templates/playground/src/editor/handbooks/apple-pull-refresh.ts +61 -0
- package/templates/playground/src/editor/handbooks/apple-radio-group.ts +91 -0
- package/templates/playground/src/editor/handbooks/apple-rate.ts +97 -0
- package/templates/playground/src/editor/handbooks/apple-scroll-bar.ts +15 -0
- package/templates/playground/src/editor/handbooks/apple-search.ts +49 -0
- package/templates/playground/src/editor/handbooks/apple-segmented-control.ts +85 -0
- package/templates/playground/src/editor/handbooks/apple-select.ts +91 -0
- package/templates/playground/src/editor/handbooks/apple-sheet.ts +151 -0
- package/templates/playground/src/editor/handbooks/apple-skeleton.ts +74 -0
- package/templates/playground/src/editor/handbooks/apple-slider.ts +103 -0
- package/templates/playground/src/editor/handbooks/apple-snackbar.ts +89 -0
- package/templates/playground/src/editor/handbooks/apple-speed-dial-item.ts +16 -0
- package/templates/playground/src/editor/handbooks/apple-speed-dial.ts +13 -0
- package/templates/playground/src/editor/handbooks/apple-spinner.ts +38 -0
- package/templates/playground/src/editor/handbooks/apple-stack.ts +44 -0
- package/templates/playground/src/editor/handbooks/apple-statistic.ts +69 -0
- package/templates/playground/src/editor/handbooks/apple-stepper.ts +91 -0
- package/templates/playground/src/editor/handbooks/apple-steps.ts +61 -0
- package/templates/playground/src/editor/handbooks/apple-switch.ts +79 -0
- package/templates/playground/src/editor/handbooks/apple-tab-bar.ts +66 -0
- package/templates/playground/src/editor/handbooks/apple-table.ts +176 -0
- package/templates/playground/src/editor/handbooks/apple-tabs.ts +72 -0
- package/templates/playground/src/editor/handbooks/apple-tag.ts +56 -0
- package/templates/playground/src/editor/handbooks/apple-textarea.ts +109 -0
- package/templates/playground/src/editor/handbooks/apple-timeline.ts +44 -0
- package/templates/playground/src/editor/handbooks/apple-tooltip.ts +45 -0
- package/templates/playground/src/editor/handbooks/apple-transition.ts +44 -0
- package/templates/playground/src/editor/handbooks/apple-tree.ts +84 -0
- package/templates/playground/src/editor/handbooks/apple-upload.ts +126 -0
- package/templates/playground/src/editor/playground-examples.ts +105 -0
- package/templates/playground/src/images.ts +3 -0
- package/templates/playground/src/router/index.ts +19 -2
- package/templates/playground/src/style.css +4 -4
- package/templates/playground/src/views/403.vue +65 -0
- package/templates/playground/src/views/component-docs/[component].vue +11 -14
- package/templates/playground/src/views/components.vue +11 -41
- package/templates/playground/src/views/index.vue +3 -1
- package/templates/playground/src/views/settings.vue +5 -2
- package/tooling/create-playground.mjs +2 -2
- package/tooling/prepare-playground.mjs +3 -3
- package/tooling/test-create-apptify.mjs +3 -1
- package/tooling/test-playground-package.mjs +10 -0
- package/dist/components/gallery-scrollbar.d.ts +0 -46
- package/dist/core/desktop-image-enter.d.ts +0 -6
- package/dist/core/desktop-image-return.d.ts +0 -1
- package/templates/playground/src/components/DirectoryDialog.vue +0 -20
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ScrollBarAxis = 'both' | 'horizontal' | 'vertical';
|
|
2
|
+
interface ScrollBarOptions {
|
|
3
|
+
axis?: ScrollBarAxis;
|
|
4
|
+
label?: string;
|
|
5
|
+
controls?: string;
|
|
6
|
+
host?: HTMLElement;
|
|
7
|
+
interaction?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function attachScrollBar(target: HTMLElement, options?: ScrollBarOptions): {
|
|
10
|
+
refresh: () => void;
|
|
11
|
+
dispose(): void;
|
|
12
|
+
};
|
|
13
|
+
export declare function installScrollBars(host: HTMLElement): () => void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface SpeedDialEntry {
|
|
2
|
+
id: string;
|
|
3
|
+
kind: 'directory' | 'action';
|
|
4
|
+
label: string;
|
|
5
|
+
target: HTMLElement;
|
|
6
|
+
}
|
|
7
|
+
export declare function createSpeedDialRegistry(): import("vue").Raw<{
|
|
8
|
+
entries: import("vue").ShallowRef<SpeedDialEntry[], SpeedDialEntry[]>;
|
|
9
|
+
host: import("vue").Ref<string | undefined, string | undefined>;
|
|
10
|
+
hostDepth: import("vue").Ref<number, number>;
|
|
11
|
+
mobile: import("vue").Ref<boolean, boolean>;
|
|
12
|
+
open: import("vue").Ref<boolean, boolean>;
|
|
13
|
+
activeDirectory: import("vue").Ref<string | undefined, string | undefined>;
|
|
14
|
+
register(entry: SpeedDialEntry): void;
|
|
15
|
+
unregister(id: string): void;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function useSpeedDialEntry(kind: SpeedDialEntry['kind'], label: () => string, enabled?: () => boolean): {
|
|
18
|
+
target: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
19
|
+
hosted: import("vue").ComputedRef<boolean>;
|
|
20
|
+
close: () => void;
|
|
21
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -7,11 +7,14 @@ import './styles/date-picker.css';
|
|
|
7
7
|
import './styles/content.css';
|
|
8
8
|
import './styles/navibar.css';
|
|
9
9
|
import './styles/overlays.css';
|
|
10
|
+
import './styles/scrollbar.css';
|
|
10
11
|
export * from './core/context';
|
|
11
|
-
export { isTouchDevice } from './core/device';
|
|
12
|
+
export { isTouchDevice, isVerticalScreen } from './core/device';
|
|
12
13
|
export * from './components/foundation';
|
|
13
14
|
export * from './components/forms';
|
|
14
15
|
export * from './components/content';
|
|
16
|
+
export * from './components/speed-dial';
|
|
17
|
+
export * from './components/scrollbar';
|
|
15
18
|
export { AppleDialog, AppleDrawer, AppleSheet, AppleSnackbar, AppleOverlayHost, ApplePopover, AppleTooltip, AppleMenu, AppleActionSheet } from './components/overlays';
|
|
16
19
|
export type { AppleMenuItem, AppleViewerImage } from './components/overlays';
|
|
17
20
|
export * from './components/motion';
|
|
@@ -19,6 +22,125 @@ export * from './components/navibar';
|
|
|
19
22
|
export * from './core/motion';
|
|
20
23
|
export { overlayComponents };
|
|
21
24
|
export declare const components: {
|
|
25
|
+
AppleScrollBar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
26
|
+
target: {
|
|
27
|
+
type: import("vue").PropType<string | HTMLElement | (() => HTMLElement | undefined)>;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
axis: {
|
|
31
|
+
type: import("vue").PropType<import("./core/scrollbar").ScrollBarAxis>;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
label: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
controls: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
}>, () => null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "interaction"[], "interaction", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
target: {
|
|
44
|
+
type: import("vue").PropType<string | HTMLElement | (() => HTMLElement | undefined)>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
axis: {
|
|
48
|
+
type: import("vue").PropType<import("./core/scrollbar").ScrollBarAxis>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
label: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
controls: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
}>> & Readonly<{
|
|
60
|
+
onInteraction?: ((...args: any[]) => any) | undefined;
|
|
61
|
+
}>, {
|
|
62
|
+
label: string;
|
|
63
|
+
target: string | HTMLElement | (() => HTMLElement | undefined);
|
|
64
|
+
axis: import("./core/scrollbar").ScrollBarAxis;
|
|
65
|
+
controls: string;
|
|
66
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
67
|
+
AppleSpeedDial: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
68
|
+
backTop: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
target: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
threshold: {
|
|
77
|
+
type: NumberConstructor;
|
|
78
|
+
default: number;
|
|
79
|
+
};
|
|
80
|
+
label: {
|
|
81
|
+
type: StringConstructor;
|
|
82
|
+
default: string;
|
|
83
|
+
};
|
|
84
|
+
}>, () => import("vue").VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
85
|
+
backTop: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
target: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
|
+
threshold: {
|
|
94
|
+
type: NumberConstructor;
|
|
95
|
+
default: number;
|
|
96
|
+
};
|
|
97
|
+
label: {
|
|
98
|
+
type: StringConstructor;
|
|
99
|
+
default: string;
|
|
100
|
+
};
|
|
101
|
+
}>> & Readonly<{}>, {
|
|
102
|
+
label: string;
|
|
103
|
+
target: string;
|
|
104
|
+
threshold: number;
|
|
105
|
+
backTop: boolean;
|
|
106
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
107
|
+
AppleSpeedDialItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
108
|
+
label: {
|
|
109
|
+
type: StringConstructor;
|
|
110
|
+
required: true;
|
|
111
|
+
};
|
|
112
|
+
icon: import("vue").PropType<import("vue").Component>;
|
|
113
|
+
disabled: BooleanConstructor;
|
|
114
|
+
visible: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
default: boolean;
|
|
117
|
+
};
|
|
118
|
+
variant: {
|
|
119
|
+
type: import("vue").PropType<"primary" | "secondary" | "outline" | "danger">;
|
|
120
|
+
default: string;
|
|
121
|
+
};
|
|
122
|
+
}>, () => import("vue").VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
123
|
+
label: {
|
|
124
|
+
type: StringConstructor;
|
|
125
|
+
required: true;
|
|
126
|
+
};
|
|
127
|
+
icon: import("vue").PropType<import("vue").Component>;
|
|
128
|
+
disabled: BooleanConstructor;
|
|
129
|
+
visible: {
|
|
130
|
+
type: BooleanConstructor;
|
|
131
|
+
default: boolean;
|
|
132
|
+
};
|
|
133
|
+
variant: {
|
|
134
|
+
type: import("vue").PropType<"primary" | "secondary" | "outline" | "danger">;
|
|
135
|
+
default: string;
|
|
136
|
+
};
|
|
137
|
+
}>> & Readonly<{
|
|
138
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
139
|
+
}>, {
|
|
140
|
+
disabled: boolean;
|
|
141
|
+
variant: "secondary" | "danger" | "primary" | "outline";
|
|
142
|
+
visible: boolean;
|
|
143
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
144
|
AppleNavibar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
23
145
|
items: {
|
|
24
146
|
type: import("vue").PropType<import(".").AppleItem[]>;
|
|
@@ -115,8 +237,8 @@ export declare const components: {
|
|
|
115
237
|
onToggle?: ((...args: any[]) => any) | undefined;
|
|
116
238
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
117
239
|
}>, {
|
|
118
|
-
fixed: boolean;
|
|
119
240
|
label: string;
|
|
241
|
+
fixed: boolean;
|
|
120
242
|
motion: import(".").ComponentMotion;
|
|
121
243
|
items: import(".").AppleItem[];
|
|
122
244
|
brand: string;
|
|
@@ -687,9 +809,7 @@ export declare const components: {
|
|
|
687
809
|
type: import("vue").PropType<"auto" | "full" | "reduced" | "none" | "inherit">;
|
|
688
810
|
default: "auto" | "full" | "reduced" | "none" | "inherit";
|
|
689
811
|
};
|
|
690
|
-
}>, {
|
|
691
|
-
isTouchDevice: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
692
|
-
}, {
|
|
812
|
+
}>, {}, {
|
|
693
813
|
timer: ReturnType<typeof setTimeout> | null;
|
|
694
814
|
remaining: number;
|
|
695
815
|
started: number;
|
|
@@ -701,7 +821,7 @@ export declare const components: {
|
|
|
701
821
|
pause(): void;
|
|
702
822
|
resume(): void;
|
|
703
823
|
close(reason?: string): void;
|
|
704
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue" | "after-close"
|
|
824
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "action" | "update:modelValue" | "after-close")[], "close" | "action" | "update:modelValue" | "after-close", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
705
825
|
modelValue: {
|
|
706
826
|
type: BooleanConstructor;
|
|
707
827
|
default: boolean;
|
|
@@ -741,13 +861,13 @@ export declare const components: {
|
|
|
741
861
|
onAction?: ((...args: any[]) => any) | undefined;
|
|
742
862
|
}>, {
|
|
743
863
|
message: string;
|
|
864
|
+
action: string;
|
|
744
865
|
title: string;
|
|
745
866
|
tone: "error" | "danger" | "success" | "warning" | "default" | "info";
|
|
746
867
|
duration: number;
|
|
747
868
|
motion: "auto" | "full" | "reduced" | "none" | "inherit";
|
|
748
869
|
modelValue: boolean;
|
|
749
870
|
closable: boolean;
|
|
750
|
-
action: string;
|
|
751
871
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
752
872
|
AppleOverlayHost: import("vue").DefineComponent<{}, {}, {
|
|
753
873
|
present: Array<{
|
|
@@ -863,9 +983,9 @@ export declare const components: {
|
|
|
863
983
|
"onAfter-close"?: ((...args: any[]) => any) | undefined;
|
|
864
984
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
865
985
|
}>, {
|
|
986
|
+
label: string;
|
|
866
987
|
width: string | number;
|
|
867
988
|
placement: "top" | "bottom" | "left" | "right";
|
|
868
|
-
label: string;
|
|
869
989
|
disabled: boolean;
|
|
870
990
|
motion: "auto" | "full" | "reduced" | "none" | "inherit";
|
|
871
991
|
role: string;
|
|
@@ -1475,8 +1595,8 @@ export declare const components: {
|
|
|
1475
1595
|
"onRow-click"?: ((...args: any[]) => any) | undefined;
|
|
1476
1596
|
"onColumn-resize"?: ((...args: any[]) => any) | undefined;
|
|
1477
1597
|
}>, {
|
|
1478
|
-
height: number;
|
|
1479
1598
|
label: string;
|
|
1599
|
+
height: number;
|
|
1480
1600
|
disabled: boolean;
|
|
1481
1601
|
loading: boolean;
|
|
1482
1602
|
motion: "auto" | "full" | "reduced" | "none" | "inherit";
|
|
@@ -1515,15 +1635,31 @@ export declare const components: {
|
|
|
1515
1635
|
type: StringConstructor;
|
|
1516
1636
|
default: string;
|
|
1517
1637
|
};
|
|
1638
|
+
searchable: {
|
|
1639
|
+
type: BooleanConstructor;
|
|
1640
|
+
default: boolean;
|
|
1641
|
+
};
|
|
1642
|
+
mobileDirectory: {
|
|
1643
|
+
type: BooleanConstructor;
|
|
1644
|
+
default: boolean;
|
|
1645
|
+
};
|
|
1518
1646
|
motion: {
|
|
1519
1647
|
type: import("vue").PropType<"auto" | "full" | "reduced" | "none" | "inherit">;
|
|
1520
1648
|
default: string;
|
|
1521
1649
|
};
|
|
1522
|
-
}>, {
|
|
1650
|
+
}>, {
|
|
1651
|
+
directoryTarget: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
1652
|
+
inMobileDirectory: import("vue").ComputedRef<boolean>;
|
|
1653
|
+
closeDirectory: () => void;
|
|
1654
|
+
}, {
|
|
1655
|
+
search: string;
|
|
1656
|
+
searchCollapsed: import(".").AppleValue[];
|
|
1523
1657
|
internalExpanded: import(".").AppleValue[];
|
|
1524
1658
|
internalValue: import(".").AppleValue | undefined;
|
|
1525
1659
|
focusValue: import(".").AppleValue | undefined;
|
|
1526
1660
|
}, {
|
|
1661
|
+
query(): string;
|
|
1662
|
+
filteredItems(): import(".").AppleTreeItem[];
|
|
1527
1663
|
expandedValues(): import(".").AppleValue[];
|
|
1528
1664
|
selectedValue(): import(".").AppleValue | undefined;
|
|
1529
1665
|
visibleItems(): {
|
|
@@ -1555,6 +1691,14 @@ export declare const components: {
|
|
|
1555
1691
|
type: StringConstructor;
|
|
1556
1692
|
default: string;
|
|
1557
1693
|
};
|
|
1694
|
+
searchable: {
|
|
1695
|
+
type: BooleanConstructor;
|
|
1696
|
+
default: boolean;
|
|
1697
|
+
};
|
|
1698
|
+
mobileDirectory: {
|
|
1699
|
+
type: BooleanConstructor;
|
|
1700
|
+
default: boolean;
|
|
1701
|
+
};
|
|
1558
1702
|
motion: {
|
|
1559
1703
|
type: import("vue").PropType<"auto" | "full" | "reduced" | "none" | "inherit">;
|
|
1560
1704
|
default: string;
|
|
@@ -1570,6 +1714,8 @@ export declare const components: {
|
|
|
1570
1714
|
modelValue: import(".").AppleValue;
|
|
1571
1715
|
expanded: import(".").AppleValue[];
|
|
1572
1716
|
items: import(".").AppleTreeItem[];
|
|
1717
|
+
searchable: boolean;
|
|
1718
|
+
mobileDirectory: boolean;
|
|
1573
1719
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1574
1720
|
AppleList: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1575
1721
|
modelValue: {
|
|
@@ -1975,7 +2121,7 @@ export declare const components: {
|
|
|
1975
2121
|
};
|
|
1976
2122
|
}>> & Readonly<{}>, {
|
|
1977
2123
|
label: string;
|
|
1978
|
-
variant: "
|
|
2124
|
+
variant: "table" | "text" | "image" | "avatar" | "card" | "list";
|
|
1979
2125
|
motion: "auto" | "full" | "reduced" | "none" | "inherit";
|
|
1980
2126
|
rows: number;
|
|
1981
2127
|
columns: number;
|
|
@@ -2179,7 +2325,7 @@ export declare const components: {
|
|
|
2179
2325
|
AppleInfiniteScroll: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2180
2326
|
loading: BooleanConstructor;
|
|
2181
2327
|
error: {
|
|
2182
|
-
type: (
|
|
2328
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
2183
2329
|
default: boolean;
|
|
2184
2330
|
};
|
|
2185
2331
|
finished: BooleanConstructor;
|
|
@@ -2208,7 +2354,7 @@ export declare const components: {
|
|
|
2208
2354
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("load" | "retry")[], "load" | "retry", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2209
2355
|
loading: BooleanConstructor;
|
|
2210
2356
|
error: {
|
|
2211
|
-
type: (
|
|
2357
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
2212
2358
|
default: boolean;
|
|
2213
2359
|
};
|
|
2214
2360
|
finished: BooleanConstructor;
|
|
@@ -2233,8 +2379,8 @@ export declare const components: {
|
|
|
2233
2379
|
disabled: boolean;
|
|
2234
2380
|
loading: boolean;
|
|
2235
2381
|
motion: "auto" | "full" | "reduced" | "none" | "inherit";
|
|
2236
|
-
distance: number;
|
|
2237
2382
|
finished: boolean;
|
|
2383
|
+
distance: number;
|
|
2238
2384
|
finishedText: string;
|
|
2239
2385
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2240
2386
|
AppleBackTop: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -2264,14 +2410,13 @@ export declare const components: {
|
|
|
2264
2410
|
}, {
|
|
2265
2411
|
visible: boolean;
|
|
2266
2412
|
scrollTarget: HTMLElement | Window | undefined;
|
|
2267
|
-
|
|
2413
|
+
scrollRun: import(".").MotionScroll | undefined;
|
|
2268
2414
|
}, {
|
|
2269
2415
|
motionMode(): "full" | "reduced" | "none";
|
|
2270
2416
|
}, {
|
|
2271
2417
|
bindTarget(): void;
|
|
2272
2418
|
scrollPosition(): number;
|
|
2273
2419
|
onScroll(): void;
|
|
2274
|
-
interruptScroll(event: Event): void;
|
|
2275
2420
|
cancelScroll(): void;
|
|
2276
2421
|
go(event: Event): void;
|
|
2277
2422
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -2299,8 +2444,8 @@ export declare const components: {
|
|
|
2299
2444
|
}>> & Readonly<{
|
|
2300
2445
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
2301
2446
|
}>, {
|
|
2302
|
-
fixed: boolean;
|
|
2303
2447
|
label: string;
|
|
2448
|
+
fixed: boolean;
|
|
2304
2449
|
disabled: boolean;
|
|
2305
2450
|
motion: "auto" | "full" | "reduced" | "none" | "inherit";
|
|
2306
2451
|
target: string;
|
|
@@ -2327,7 +2472,12 @@ export declare const components: {
|
|
|
2327
2472
|
type: import("vue").PropType<"auto" | "full" | "reduced" | "none" | "inherit">;
|
|
2328
2473
|
default: string;
|
|
2329
2474
|
};
|
|
2330
|
-
}>,
|
|
2475
|
+
}>, {
|
|
2476
|
+
previewRoot: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
2477
|
+
previewActive: import("vue").Ref<boolean, boolean>;
|
|
2478
|
+
}, {}, {
|
|
2479
|
+
motionMode(): "full" | "reduced" | "none";
|
|
2480
|
+
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2331
2481
|
backTop: {
|
|
2332
2482
|
type: BooleanConstructor;
|
|
2333
2483
|
default: boolean;
|
|
@@ -3639,8 +3789,8 @@ export declare const components: {
|
|
|
3639
3789
|
}>, {
|
|
3640
3790
|
error: string;
|
|
3641
3791
|
label: string;
|
|
3642
|
-
disabled: boolean;
|
|
3643
3792
|
capture: "user" | "environment";
|
|
3793
|
+
disabled: boolean;
|
|
3644
3794
|
loading: boolean;
|
|
3645
3795
|
motion: "auto" | "full" | "reduced" | "none" | "inherit";
|
|
3646
3796
|
modelValue: File[];
|
|
@@ -4360,7 +4510,18 @@ export declare const components: {
|
|
|
4360
4510
|
clear(): void;
|
|
4361
4511
|
};
|
|
4362
4512
|
portalTarget: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
4513
|
+
speedDial: import("vue").Raw<{
|
|
4514
|
+
entries: import("vue").ShallowRef<import("./core/speed-dial").SpeedDialEntry[], import("./core/speed-dial").SpeedDialEntry[]>;
|
|
4515
|
+
host: import("vue").Ref<string | undefined, string | undefined>;
|
|
4516
|
+
hostDepth: import("vue").Ref<number, number>;
|
|
4517
|
+
mobile: import("vue").Ref<boolean, boolean>;
|
|
4518
|
+
open: import("vue").Ref<boolean, boolean>;
|
|
4519
|
+
activeDirectory: import("vue").Ref<string | undefined, string | undefined>;
|
|
4520
|
+
register(entry: import("./core/speed-dial").SpeedDialEntry): void;
|
|
4521
|
+
unregister(id: string): void;
|
|
4522
|
+
}>;
|
|
4363
4523
|
isTouchDevice: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
4524
|
+
isVerticalScreen: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
4364
4525
|
dialog: <T = unknown>(settings: Omit<import(".").OverlayOptions, "kind">) => import(".").OverlayHandle<T>;
|
|
4365
4526
|
notify: (message: string, settings?: Omit<import(".").OverlayOptions, "kind" | "message">) => import(".").OverlayHandle<unknown>;
|
|
4366
4527
|
sendMessage: <T = unknown>(channel: string, payload?: T) => unknown[];
|
|
@@ -4707,7 +4868,18 @@ export declare const components: {
|
|
|
4707
4868
|
clear(): void;
|
|
4708
4869
|
};
|
|
4709
4870
|
portalTarget: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
4871
|
+
speedDial: import("vue").Raw<{
|
|
4872
|
+
entries: import("vue").ShallowRef<import("./core/speed-dial").SpeedDialEntry[], import("./core/speed-dial").SpeedDialEntry[]>;
|
|
4873
|
+
host: import("vue").Ref<string | undefined, string | undefined>;
|
|
4874
|
+
hostDepth: import("vue").Ref<number, number>;
|
|
4875
|
+
mobile: import("vue").Ref<boolean, boolean>;
|
|
4876
|
+
open: import("vue").Ref<boolean, boolean>;
|
|
4877
|
+
activeDirectory: import("vue").Ref<string | undefined, string | undefined>;
|
|
4878
|
+
register(entry: import("./core/speed-dial").SpeedDialEntry): void;
|
|
4879
|
+
unregister(id: string): void;
|
|
4880
|
+
}>;
|
|
4710
4881
|
isTouchDevice: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
4882
|
+
isVerticalScreen: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
4711
4883
|
dialog: <T = unknown>(settings: Omit<import(".").OverlayOptions, "kind">) => import(".").OverlayHandle<T>;
|
|
4712
4884
|
notify: (message: string, settings?: Omit<import(".").OverlayOptions, "kind" | "message">) => import(".").OverlayHandle<unknown>;
|
|
4713
4885
|
sendMessage: <T = unknown>(channel: string, payload?: T) => unknown[];
|
|
@@ -4716,6 +4888,7 @@ export declare const components: {
|
|
|
4716
4888
|
detach(): void;
|
|
4717
4889
|
dispose(): void;
|
|
4718
4890
|
}>>;
|
|
4891
|
+
disposeScrollBars: (() => void) | null;
|
|
4719
4892
|
}, {
|
|
4720
4893
|
inheritedTheme(): string | undefined;
|
|
4721
4894
|
inheritedMotion(): import(".").Motion | undefined;
|
|
@@ -5062,7 +5235,18 @@ export declare const components: {
|
|
|
5062
5235
|
clear(): void;
|
|
5063
5236
|
};
|
|
5064
5237
|
portalTarget: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
5238
|
+
speedDial: import("vue").Raw<{
|
|
5239
|
+
entries: import("vue").ShallowRef<import("./core/speed-dial").SpeedDialEntry[], import("./core/speed-dial").SpeedDialEntry[]>;
|
|
5240
|
+
host: import("vue").Ref<string | undefined, string | undefined>;
|
|
5241
|
+
hostDepth: import("vue").Ref<number, number>;
|
|
5242
|
+
mobile: import("vue").Ref<boolean, boolean>;
|
|
5243
|
+
open: import("vue").Ref<boolean, boolean>;
|
|
5244
|
+
activeDirectory: import("vue").Ref<string | undefined, string | undefined>;
|
|
5245
|
+
register(entry: import("./core/speed-dial").SpeedDialEntry): void;
|
|
5246
|
+
unregister(id: string): void;
|
|
5247
|
+
}>;
|
|
5065
5248
|
isTouchDevice: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
5249
|
+
isVerticalScreen: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
5066
5250
|
dialog: <T = unknown>(settings: Omit<import(".").OverlayOptions, "kind">) => import(".").OverlayHandle<T>;
|
|
5067
5251
|
notify: (message: string, settings?: Omit<import(".").OverlayOptions, "kind" | "message">) => import(".").OverlayHandle<unknown>;
|
|
5068
5252
|
sendMessage: <T = unknown>(channel: string, payload?: T) => unknown[];
|
|
@@ -5197,7 +5381,7 @@ export declare const components: {
|
|
|
5197
5381
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
5198
5382
|
shadow: "none" | "static" | "normal" | "focused";
|
|
5199
5383
|
motion: import(".").ComponentMotion;
|
|
5200
|
-
zoom: "none" | "
|
|
5384
|
+
zoom: "none" | "small" | "big";
|
|
5201
5385
|
imageAlt: string;
|
|
5202
5386
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
5203
5387
|
P: {};
|
|
@@ -5234,7 +5418,7 @@ export declare const components: {
|
|
|
5234
5418
|
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
5235
5419
|
shadow: "none" | "static" | "normal" | "focused";
|
|
5236
5420
|
motion: import(".").ComponentMotion;
|
|
5237
|
-
zoom: "none" | "
|
|
5421
|
+
zoom: "none" | "small" | "big";
|
|
5238
5422
|
imageAlt: string;
|
|
5239
5423
|
}>;
|
|
5240
5424
|
__isFragment?: never;
|
|
@@ -5268,7 +5452,7 @@ export declare const components: {
|
|
|
5268
5452
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
5269
5453
|
shadow: "none" | "static" | "normal" | "focused";
|
|
5270
5454
|
motion: import(".").ComponentMotion;
|
|
5271
|
-
zoom: "none" | "
|
|
5455
|
+
zoom: "none" | "small" | "big";
|
|
5272
5456
|
imageAlt: string;
|
|
5273
5457
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
5274
5458
|
$slots: {
|
|
@@ -5298,6 +5482,14 @@ export declare const components: {
|
|
|
5298
5482
|
type: StringConstructor;
|
|
5299
5483
|
default: string;
|
|
5300
5484
|
};
|
|
5485
|
+
autoplay: {
|
|
5486
|
+
type: BooleanConstructor;
|
|
5487
|
+
default: boolean;
|
|
5488
|
+
};
|
|
5489
|
+
interval: {
|
|
5490
|
+
type: NumberConstructor;
|
|
5491
|
+
default: number;
|
|
5492
|
+
};
|
|
5301
5493
|
galleryLayout: {
|
|
5302
5494
|
type: import("vue").PropType<"compact" | "tiled" | "tiled-wrap">;
|
|
5303
5495
|
default: string;
|
|
@@ -5325,15 +5517,19 @@ export declare const components: {
|
|
|
5325
5517
|
};
|
|
5326
5518
|
}>, {
|
|
5327
5519
|
uid: string;
|
|
5520
|
+
isVerticalScreen: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
5328
5521
|
}, {
|
|
5329
5522
|
open: boolean;
|
|
5330
5523
|
previewing: boolean;
|
|
5331
5524
|
failed: boolean;
|
|
5332
5525
|
loaded: boolean;
|
|
5333
5526
|
previewIndex: number;
|
|
5334
|
-
mobile: boolean;
|
|
5335
|
-
viewportQuery: MediaQueryList | null;
|
|
5336
5527
|
thumbnails: import("vue").Raw<Map<number, HTMLImageElement>>;
|
|
5528
|
+
autoplayTimer: ReturnType<typeof setTimeout> | null;
|
|
5529
|
+
hovered: boolean;
|
|
5530
|
+
focused: boolean;
|
|
5531
|
+
pageHidden: boolean;
|
|
5532
|
+
arrowCenter: number | null;
|
|
5337
5533
|
galleryLoaded: Record<number, boolean>;
|
|
5338
5534
|
galleryFailed: Record<number, boolean>;
|
|
5339
5535
|
gallerySizes: Record<string, import("./core/image-geometry").PhotoSize>;
|
|
@@ -5354,16 +5550,21 @@ export declare const components: {
|
|
|
5354
5550
|
images(): import(".").AppleViewerImage[];
|
|
5355
5551
|
grouped(): boolean;
|
|
5356
5552
|
layout(): "compact" | "tiled" | "tiled-wrap";
|
|
5553
|
+
canAutoplay(): boolean;
|
|
5357
5554
|
}, {
|
|
5555
|
+
stopAutoplay(): void;
|
|
5556
|
+
restartAutoplay(): void;
|
|
5557
|
+
syncVisibility(): void;
|
|
5558
|
+
measureArrows(): void;
|
|
5559
|
+
stepImage(direction: number): void;
|
|
5358
5560
|
normalizeIndex(value: number): number;
|
|
5359
5561
|
observeGallery(): void;
|
|
5360
5562
|
cancelGalleryScroll(): void;
|
|
5361
5563
|
interruptGalleryScroll(): void;
|
|
5362
5564
|
galleryWheel(event: WheelEvent): void;
|
|
5363
|
-
syncViewport(): void;
|
|
5364
5565
|
afterPreview(): void;
|
|
5365
5566
|
origin(index: number, reveal?: boolean): HTMLImageElement | null;
|
|
5366
|
-
showImage(index: number): void;
|
|
5567
|
+
showImage(index: number, snap?: string): void;
|
|
5367
5568
|
scrolled(): void;
|
|
5368
5569
|
galleryPointerDown(event: PointerEvent): void;
|
|
5369
5570
|
galleryPointerMove(event: PointerEvent): void;
|
|
@@ -5393,6 +5594,14 @@ export declare const components: {
|
|
|
5393
5594
|
type: StringConstructor;
|
|
5394
5595
|
default: string;
|
|
5395
5596
|
};
|
|
5597
|
+
autoplay: {
|
|
5598
|
+
type: BooleanConstructor;
|
|
5599
|
+
default: boolean;
|
|
5600
|
+
};
|
|
5601
|
+
interval: {
|
|
5602
|
+
type: NumberConstructor;
|
|
5603
|
+
default: number;
|
|
5604
|
+
};
|
|
5396
5605
|
galleryLayout: {
|
|
5397
5606
|
type: import("vue").PropType<"compact" | "tiled" | "tiled-wrap">;
|
|
5398
5607
|
default: string;
|
|
@@ -5430,6 +5639,8 @@ export declare const components: {
|
|
|
5430
5639
|
squared: boolean;
|
|
5431
5640
|
preview: boolean;
|
|
5432
5641
|
gallery: import(".").AppleImageItem | (string | import(".").AppleImageItem)[];
|
|
5642
|
+
autoplay: boolean;
|
|
5643
|
+
interval: number;
|
|
5433
5644
|
galleryLayout: "compact" | "tiled" | "tiled-wrap";
|
|
5434
5645
|
galleryShape: "square" | "natural";
|
|
5435
5646
|
aspectRatio: string | number;
|
package/docs/COMPONENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 组件 API 参考
|
|
2
2
|
|
|
3
|
-
本页按 `src/index.ts` 合并的组件注册表列出当前 **
|
|
3
|
+
本页按 `src/index.ts` 合并的组件注册表列出当前 **65 个导出组件**,不是未来功能清单。组件名均可换成 kebab-case 模板标签,例如 `AppleOtpInput` 对应 `<apple-otp-input>`。
|
|
4
4
|
|
|
5
5
|
## 公共约定
|
|
6
6
|
|
|
@@ -46,7 +46,7 @@ Tabs、TabBar、SegmentedControl、DatePicker 日期/时间页签均不使用 Ri
|
|
|
46
46
|
| `AppleButton` | M;`variant=primary`(primary/secondary/outline/danger)、`size=medium`(small/medium/large)、`icon: Component`、`iconOnly`、`label`、`disabled`、`loading`、`ripple=true`、`href`、`type=button` | `click(event)`;default slot;图标位于文字右侧。纯图标按钮须提供 label。关闭动效时禁用 Ripple,其余模式遵循全局波纹开关。 |
|
|
47
47
|
| `AppleLink` | `as=a`(a/button)、`href`、`external`、`disabled`、`icon`、`iconOnly`、`label` | default slot;文字操作使用 as=button;external 使用新窗口并设置 `noopener noreferrer`。 |
|
|
48
48
|
| `AppleCard` | M;`title`、`subtitle`、`text`、`eyebrow`、`icon: Component 或图片 URL`、`iconColor`、`image`、`imageAlt`、`href`、`zoom=none`(big/small/none)、`shadow=normal`(normal/static/focused/none) | default、media、icon、title、actions slots;href 为标题链接,不会把所有嵌套控件变成一个大按钮。 |
|
|
49
|
-
| `AppleImage` | M;`gallery: AppleImageItem | (string/AppleImageItem)[]`(唯一来源,默认空数组,单图可传对象);`preview=true`、`carousel=false`、`disabled=false`、`label`、`galleryLayout=compact`(compact/tiled/tiled-wrap,所有设备)、`galleryShape=natural`(natural/square)、`index=0`、`squared`、`aspectRatio='4/3'`、`fit=cover`(cover/contain) | caption 与 item({item,index,active}) slots;carousel 强制 compact
|
|
49
|
+
| `AppleImage` | M;`gallery: AppleImageItem | (string/AppleImageItem)[]`(唯一来源,默认空数组,单图可传对象);`preview=true`、`carousel=false`、`autoplay=true`、`interval=5000`(毫秒,仅 carousel)、`disabled=false`、`label`、`galleryLayout=compact`(compact/tiled/tiled-wrap,所有设备)、`galleryShape=natural`(natural/square)、`index=0`、`squared`、`aspectRatio='4/3'`、`fit=cover`(cover/contain) | caption 与 item({item,index,active}) slots;carousel 强制 compact、默认每 5 秒循环播放,悬停、聚焦、预览、拖动、页面隐藏或禁用时暂停,保留自由滚动;默认点击预览;统一预览交互,支持拖动、双击、捏合、平滑滚轮及键盘;连续滚轮累积目标并保持位置与速度,缩放、旋转、翻页与进退场分通道,可在动画途中继续操作;翻页按距离与速度使用 360–720ms 动画,放大图片随各自画布裁剪离场;底部单一胶囊按左旋转、缩小、可选名称、放大、右旋转排列,每次旋转 90°,旋转状态按图片保存;竖屏隐藏箭头、关闭及缩放按钮;完整渲染图片组,compact 在固定框内横滑,桌面横向滚轮或 Shift+滚轮平滑横滑,连续事件保留累计目标,停止后平滑吸附;一次手势可跨越多张,快速点击翻页延续当前位置和速度;hover 放大并使用 AppleCard 的悬停阴影,横屏多图的缩略图左右按钮仅在悬浮时淡入、移开时淡出,遵循 --apple-fast 与 --apple-ease 并对齐图片中间(单图小窗与全屏均无翻页箭头),跨多张点击小点时直接衔接当前画面与目标图并支持连续改选,tiled 等高横向平铺,溢出时底部常显自定义滚动条,支持拖动、点击轨道与键盘,滑块比例随内容和容器尺寸同步,tiled-wrap 等宽保留图片比例,按列从上往下紧密堆叠,避免按行对齐产生空白;平铺 hover 只缩放当前图片;galleryShape=square 强制 1:1 并居中裁剪(覆盖 fit),squared 同样作用于图片组;`update:index`、`change(index)`;图片错误状态;squared 覆盖 aspectRatio。 |
|
|
50
50
|
| `AppleSearch` | `v-model: string`、`placeholder='搜索'`、`label='搜索'`、`disabled` | `search(value)` 在 Enter 时发出;清空更新 model。 |
|
|
51
51
|
| `AppleContainer` | `width=1200`(number/string) | default slot;数字宽度按 px,宽度不会超过可用空间。 |
|
|
52
52
|
| `AppleStack` | `direction=column`、`gap=16`、`align=stretch`、`wrap=true` | default slot;Flex 布局;数字 gap 按 px。 |
|
|
@@ -99,7 +99,7 @@ validator 返回 `true` 才通过;字符串作为错误信息,`false` 显示
|
|
|
99
99
|
|
|
100
100
|
| 组件 | 主要 Props | Events / Slots / 说明 |
|
|
101
101
|
| --- | --- | --- |
|
|
102
|
-
| `AppleNavibar` | `v-model: string/number`、`items: AppleItem[]`、`brand`、`brandHref='/'`、`label='主导航'`、`fixed=true`、`breakpoint=640`、`hideOnPreview`(默认跟随 fixed) | `change(value,item)`、`toggle(open)`;brand、item `{item,active}`、actions `{close}` slots。固定模式自带占位;栏宽不超过 breakpoint 时折叠为三横杠菜单;选择、Escape、外部点击或焦点移出后收起。`fixed=false`
|
|
102
|
+
| `AppleNavibar` | `v-model: string/number`、`items: AppleItem[]`、`brand`、`brandHref='/'`、`label='主导航'`、`fixed=true`、`breakpoint=640`、`hideOnPreview`(默认跟随 fixed) | `change(value,item)`、`toggle(open)`;brand、item `{item,active}`、actions `{close}` slots。固定模式自带占位;栏宽不超过 breakpoint 时折叠为三横杠菜单;选择、Escape、外部点击或焦点移出后收起。`fixed=false` 可嵌入容器。参与预览时保留占位并隐藏,退出开始时与黑色背景淡出同步执行 300ms 淡入与向下滑入。 |
|
|
103
103
|
| `AppleAside` | M;`hideOnPreview=true` | 原生 aside 容器,布局由调用方提供;图片预览期间保留尺寸、隐藏并禁用交互,退出开始时 140ms 淡入。正常文档流侧栏可设 `hideOnPreview=false`。 |
|
|
104
104
|
| `AppleTabs` | `v-model: string/number`、`items`、`label`、`disabled` | `change(value)`;`panel-${value}` slot `{item}` 或 default `{item,value}`;可非受控;方向键/Home/End。 |
|
|
105
105
|
| `AppleTabBar` | 与 AppleTabs 相同 | 顶角圆角页签,移动选中背景与内容滑动。 |
|
|
@@ -107,7 +107,7 @@ validator 返回 `true` 才通过;字符串作为错误信息,`false` 显示
|
|
|
107
107
|
| `ApplePagination` | `v-model: number=1`、`total=0`、`pageSize=10`、`disabled`、`label` | `change(page)`;页码从 1 开始,total 是总条目数。 |
|
|
108
108
|
| `AppleAccordion` | `v-model: string/number/array`、`items`、`multiple`、`disabled` | `change(value)`;`item-${value}` 或 item slot `{item,open}`;默认内容使用 item.content;multiple 时模型为数组。 |
|
|
109
109
|
| `AppleTable` | `columns: AppleColumn[]`、`rows: Record[]`、`rowKey=id`、`label`、`selectable`、`v-model:selected`、`v-model:sort-by`、`v-model:sort-direction`、`v-model:page`、`pageSize=0`、`loading`、`disabled`、`emptyText` | `sort({key,direction})`、`row-click(row)`;`cell-${key}` slot `{row,value,index}`、empty slot;本地排序/分页;pageSize=0 不分页。 |
|
|
110
|
-
| `AppleTree` | `items: AppleTreeItem[]`、`v-model`、`v-model:expanded`、`disabled`、`label` |
|
|
110
|
+
| `AppleTree` | `items: AppleTreeItem[]`、`v-model`、`v-model:expanded`、`disabled`、`label`、`searchable=true`、`mobileDirectory=true` | 默认顶部搜索;宽度 ≤900px 自动进入全局 SpeedDial 目录,无宿主保留原位。`select(item)`;item slot `{item,expanded,selected}`;递归 children;单选与键盘树导航,不含勾选联动。 |
|
|
111
111
|
| `AppleList` | `items`、`v-model`、`selectable`、`disabled`、`label` | `select(item)`;item slot `{item,selected}`;selectable 时更新模型,否则 href 生成链接。 |
|
|
112
112
|
| `AppleAvatar` | `src`、`name='用户'`、`size=40`、`square` | `error(event)`;default slot;图片失败回退到姓名前两个字符。 |
|
|
113
113
|
| `AppleAvatarGroup` | `items: {name,src?,value?}[]`、`max=4`、`size=36`、`label` | default slot 可替换头像集合;超出数量显示 +N。 |
|
|
@@ -123,8 +123,11 @@ validator 返回 `true` 才通过;字符串作为错误信息,`false` 显示
|
|
|
123
123
|
| `AppleTimeline` | `items: AppleTimelineItem[]`、`orientation=vertical`(horizontal/vertical)、`label` | item slot `{item}`;选项增加 `time?` 和 `tone?: default/success/danger`。 |
|
|
124
124
|
| `ApplePullRefresh` | `v-model: boolean`、`disabled`、`threshold=72`、`label` | `refresh(done)`;default slot `{refresh,refreshing}`;在滚动顶部下拉,也提供刷新按钮;完成必须调用 done 或将 model 设为 false。 |
|
|
125
125
|
| `AppleInfiniteScroll` | `loading`、`error: boolean/string`、`finished`、`disabled`、`distance=120`、`finishedText` | `load(done)`、`retry(done)`;default slot;IntersectionObserver 及手动加载按钮;完成后调用 done,或令 loading 从 true 回到 false。 |
|
|
126
|
+
| `AppleScrollBar` | `target: string/HTMLElement/()=>HTMLElement`、`axis='both'`、`label`、`controls` | `interaction()`;`refresh()`;fixed 悬浮滚动条,不占空间,支持横向/纵向、拖动、轨道点击、键盘及 RTL。AppleProvider 自动接管文档滚动容器,原本隐藏滚动条的控件除外;`data-apple-scrollbar-ignore` 可排除容器。 |
|
|
126
127
|
| `AppleBackTop` | `target: CSS selector=''`、`threshold=300`、`label`、`disabled` | `click(event)`;default slot;空 target 使用 window,达到滚动阈值才显示。 |
|
|
127
|
-
| `AppleFloatingGroup` | `backTop=true`、`threshold=300`、`target`、`label` | default slot
|
|
128
|
+
| `AppleFloatingGroup` | `backTop=true`、`threshold=300`、`target`、`label` | default slot 放附加操作,回顶按钮始终排最下;默认固定右下并考虑安全区,与 Navibar 同为 z-index 70;图片预览时隐藏,退出开始时执行 300ms FadeInLeft,尊重 reduced/none 动效。 |
|
|
129
|
+
| `AppleSpeedDial` | `backTop=true`、`threshold=300`、`target`、`label` | App.vue 全局唯一宿主,嵌套 Provider 共享注册表;BackTop 排第一,操作按注册顺序排列,primary 目录按钮排最后。移动目录弹窗保持高高度,多目录用 AppleTabBar 切换。 |
|
|
130
|
+
| `AppleSpeedDialItem` | `label`、`icon`、`disabled`、`visible=true`、`variant='primary'` | `click(event)`;default slot 可放按钮文字;页面声明后自动注册全局宿主,卸载或 KeepAlive 停用时注销;无需父子通信。 |
|
|
128
131
|
| `AppleStatistic` | 必填 `label`;`value: string/number`、`prefix`、`suffix`、`precision=0`、`locale=zh-CN`、`description` | default slot;数值本地化格式,不会自动请求统计数据。 |
|
|
129
132
|
|
|
130
133
|
`AppleColumn = { key: string; label: string; sortable?: boolean; align?: 'left'|'center'|'right'; width?: number|string; minWidth?: number; maxWidth?: number; resizable?: boolean }`。表格 rows 应提供稳定唯一的 `rowKey`。
|
|
@@ -189,7 +192,7 @@ Modal slots:`title`、default `{close}`、footer `{close,confirm,cancel}`。
|
|
|
189
192
|
|
|
190
193
|
`AppleMenuItem = { label; value: string|number; disabled?; danger?; description?; icon?: Component }`。
|
|
191
194
|
|
|
192
|
-
`AppleViewerImage = { src: string; alt?: string; title?: string; width?: number; height?: number }` 仍是 `AppleImage` 可用的公共图片类型。图片数组字符串是 URL
|
|
195
|
+
`AppleViewerImage = { src: string; alt?: string; title?: string; width?: number; height?: number }` 仍是 `AppleImage` 可用的公共图片类型。图片数组字符串是 URL;需要可访问描述或标题时传对象。预览名称可选,使用 title(未提供时使用 label),不以 alt 或编号填充名称。`AppleImageItem` 扩展该类型,`src` 可选以支持 carousel 的自定义内容,另有 `label`、`value`、`description`。顶层不接受 src/alt;index 从 0 开始、默认 0,支持 `v-model:index`,非有限值归零、越界值截取到有效范围。普通图片忽略无效空项;空列表显示占位且不打开预览。点击放大由 `AppleImage` 内部管理,不另行注册独立查看器。
|
|
193
196
|
|
|
194
197
|
## 上下文与服务
|
|
195
198
|
|
|
@@ -201,6 +204,7 @@ Modal slots:`title`、default `{close}`、footer `{close,confirm,cancel}`。
|
|
|
201
204
|
| `theme.value.register(name,tokens,scheme='light')` | 注册自定义主题并补齐基础 token。 |
|
|
202
205
|
| `theme.value.name / resolved / current / themes` | 当前配置名、解析后名称、主题内容、主题注册表。 |
|
|
203
206
|
| `overlays.entries.value` | 当前弹层列表,`Ref<OverlayEntry[]>`。 |
|
|
207
|
+
| `isVerticalScreen.value` | 全局只读 ref,当前视口高度大于宽度时为 true,随 resize/orientationchange 更新;也可独立导入。 |
|
|
204
208
|
| `portalTarget.value` | 弹层挂载 DOM 元素。 |
|
|
205
209
|
| `motion.value.set(mode)` | 即时修改全局动效策略。 |
|
|
206
210
|
| `ripple.value.enabled / set(enabled)` | 全局点击波纹开关,默认 true;也可传入 `createAppleUI({ ripple: false })`。切换到减弱动效或系统开启减少动态效果时自动关闭,可手动开启;只有关闭动效时禁止开启。开启 persist 时保存偏好,嵌套 Provider 共享此开关。 |
|