apptify 0.7.0 → 0.7.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/apptify.css +1 -1
- package/dist/apptify.js +1435 -1423
- package/dist/components/button.d.ts +3 -3
- package/dist/components/foundation.d.ts +3 -3
- package/dist/index.d.ts +3 -3
- package/docs/COMPONENTS.md +1 -1
- package/package.json +1 -1
- package/templates/playground/package.json +1 -1
- package/templates/playground/source-snapshot.json +17 -17
- package/templates/playground/src/ComponentDemo.vue +11 -9
- package/templates/playground/src/editor/ComponentPlayground.vue +2 -0
- package/templates/playground/src/editor/component-playground.ts +1 -0
- package/templates/playground/src/editor/handbooks/apple-button.ts +6 -6
- package/templates/playground/tooling/playground-editor.mjs +4 -3
- package/tooling/create-playground.mjs +0 -0
- package/tooling/playground-editor.mjs +4 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PropType, type Component } from 'vue';
|
|
2
2
|
export declare const AppleButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
3
|
variant: {
|
|
4
|
-
type: PropType<"primary" | "secondary" | "outline" | "danger">;
|
|
4
|
+
type: PropType<"primary" | "secondary" | "outline" | "borderless" | "danger">;
|
|
5
5
|
default: string;
|
|
6
6
|
};
|
|
7
7
|
size: {
|
|
@@ -28,7 +28,7 @@ export declare const AppleButton: import("vue").DefineComponent<import("vue").Ex
|
|
|
28
28
|
};
|
|
29
29
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
30
|
variant: {
|
|
31
|
-
type: PropType<"primary" | "secondary" | "outline" | "danger">;
|
|
31
|
+
type: PropType<"primary" | "secondary" | "outline" | "borderless" | "danger">;
|
|
32
32
|
default: string;
|
|
33
33
|
};
|
|
34
34
|
size: {
|
|
@@ -60,7 +60,7 @@ export declare const AppleButton: import("vue").DefineComponent<import("vue").Ex
|
|
|
60
60
|
disabled: boolean;
|
|
61
61
|
iconOnly: boolean;
|
|
62
62
|
loading: boolean;
|
|
63
|
-
variant: "secondary" | "danger" | "primary" | "outline";
|
|
63
|
+
variant: "secondary" | "danger" | "primary" | "outline" | "borderless";
|
|
64
64
|
ripple: boolean;
|
|
65
65
|
type: "reset" | "submit" | "button";
|
|
66
66
|
motion: import("..").ComponentMotion;
|
|
@@ -2484,7 +2484,7 @@ export declare const foundationComponents: {
|
|
|
2484
2484
|
}, true, {}, any>;
|
|
2485
2485
|
AppleButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2486
2486
|
variant: {
|
|
2487
|
-
type: PropType<"primary" | "secondary" | "outline" | "danger">;
|
|
2487
|
+
type: PropType<"primary" | "secondary" | "outline" | "borderless" | "danger">;
|
|
2488
2488
|
default: string;
|
|
2489
2489
|
};
|
|
2490
2490
|
size: {
|
|
@@ -2511,7 +2511,7 @@ export declare const foundationComponents: {
|
|
|
2511
2511
|
};
|
|
2512
2512
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2513
2513
|
variant: {
|
|
2514
|
-
type: PropType<"primary" | "secondary" | "outline" | "danger">;
|
|
2514
|
+
type: PropType<"primary" | "secondary" | "outline" | "borderless" | "danger">;
|
|
2515
2515
|
default: string;
|
|
2516
2516
|
};
|
|
2517
2517
|
size: {
|
|
@@ -2543,7 +2543,7 @@ export declare const foundationComponents: {
|
|
|
2543
2543
|
disabled: boolean;
|
|
2544
2544
|
iconOnly: boolean;
|
|
2545
2545
|
loading: boolean;
|
|
2546
|
-
variant: "secondary" | "danger" | "primary" | "outline";
|
|
2546
|
+
variant: "secondary" | "danger" | "primary" | "outline" | "borderless";
|
|
2547
2547
|
ripple: boolean;
|
|
2548
2548
|
type: "reset" | "submit" | "button";
|
|
2549
2549
|
motion: import("..").ComponentMotion;
|
package/dist/index.d.ts
CHANGED
|
@@ -5258,7 +5258,7 @@ export declare const components: {
|
|
|
5258
5258
|
}, true, {}, any>;
|
|
5259
5259
|
AppleButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5260
5260
|
variant: {
|
|
5261
|
-
type: import("vue").PropType<"primary" | "secondary" | "outline" | "danger">;
|
|
5261
|
+
type: import("vue").PropType<"primary" | "secondary" | "outline" | "borderless" | "danger">;
|
|
5262
5262
|
default: string;
|
|
5263
5263
|
};
|
|
5264
5264
|
size: {
|
|
@@ -5285,7 +5285,7 @@ export declare const components: {
|
|
|
5285
5285
|
};
|
|
5286
5286
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5287
5287
|
variant: {
|
|
5288
|
-
type: import("vue").PropType<"primary" | "secondary" | "outline" | "danger">;
|
|
5288
|
+
type: import("vue").PropType<"primary" | "secondary" | "outline" | "borderless" | "danger">;
|
|
5289
5289
|
default: string;
|
|
5290
5290
|
};
|
|
5291
5291
|
size: {
|
|
@@ -5317,7 +5317,7 @@ export declare const components: {
|
|
|
5317
5317
|
disabled: boolean;
|
|
5318
5318
|
iconOnly: boolean;
|
|
5319
5319
|
loading: boolean;
|
|
5320
|
-
variant: "secondary" | "danger" | "primary" | "outline";
|
|
5320
|
+
variant: "secondary" | "danger" | "primary" | "outline" | "borderless";
|
|
5321
5321
|
ripple: boolean;
|
|
5322
5322
|
type: "reset" | "submit" | "button";
|
|
5323
5323
|
motion: import(".").ComponentMotion;
|
package/docs/COMPONENTS.md
CHANGED
|
@@ -43,7 +43,7 @@ Tabs、TabBar、SegmentedControl、DatePicker 日期/时间页签均不使用 Ri
|
|
|
43
43
|
| 组件 | 主要 Props | Events / Slots / 说明 |
|
|
44
44
|
| --- | --- | --- |
|
|
45
45
|
| `AppleProvider` | `theme?: string`、`motion?: auto/full/reduced/none` | default slot;应用主题并自动挂载弹层宿主。无显式属性时复用插件上下文。 |
|
|
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
|
|
46
|
+
| `AppleButton` | M;`variant=primary`(primary/secondary/outline/borderless/danger)、`size=medium`(small/medium/large)、`icon: Component`、`iconOnly`、`label`、`disabled`、`loading`、`ripple=true`、`href`、`type=button` | `click(event)`;default slot;borderless 默认透明无边框,悬停时显示灰色背景。图标位于文字右侧。纯图标按钮须提供 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
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。 |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"createdAt": "2026-10-
|
|
3
|
-
"libraryVersion": "0.7.
|
|
2
|
+
"createdAt": "2026-10-16T17:27:03.556Z",
|
|
3
|
+
"libraryVersion": "0.7.2",
|
|
4
4
|
"files": {
|
|
5
5
|
"index.html": "75f6d93e3962ddca97a13b666a04d98ba9b263b6c288171383db764215034fea",
|
|
6
6
|
"public/images/SOURCES.md": "24ccb6625b1168e48550b7651e9fc20cb747324d87666d39199608c7db20541b",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"public/images/sunset.jpg": "4ee91e88f1e341143a807ef48fdfc24d63aa045d99351b4ea8ad7efcfef6ef9b",
|
|
18
18
|
"public/images/waterfall.jpg": "cfd55ff5f41d3a58e91793d0e26a9ca90c86760aa401da033fbfa77d3364f238",
|
|
19
19
|
"src/App.vue": "f85c256ed21601ccb0681a3592237e357d48ec02af371491b90a83a32203828e",
|
|
20
|
-
"src/ComponentDemo.vue": "
|
|
20
|
+
"src/ComponentDemo.vue": "a599154820d13ffb19e9a661c0e208f1b0ef79a664f3a372eb7735fa486804cd",
|
|
21
21
|
"src/catalog.ts": "a27a875d316bcc8d0be523195a0b4e8e21279c7f33c8d2f024efaa8721e1518e",
|
|
22
22
|
"src/components/ComponentIndex.vue": "7938a3fe3efb521d6efab4fe64edef06d40f22ecd68481d20427a24c39b6683f",
|
|
23
23
|
"src/components/MasonryFeed.vue": "4882725da4211e2d39b782c839c7581a0672c815d12f146a8aee186df534ac68",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"src/editor/AppleInputExample.vue": "b563cdcb1ec6b033a3a19878f68e7fe4cf39da9d3e838887b591b2364e1aad90",
|
|
31
31
|
"src/editor/AppleInputPreview.vue": "e88a71316c62c4cb763d1f285b4b9fc8fbcb4a35c6282dc95b32d5824c87dc77",
|
|
32
32
|
"src/editor/ComponentDocumentLink.vue": "f4e1c88666b315a13e48386e9353c5da733fc149fba97ecc084804abd9d0067c",
|
|
33
|
-
"src/editor/ComponentPlayground.vue": "
|
|
33
|
+
"src/editor/ComponentPlayground.vue": "2f5543cc26d438afbda48347d802d8621161c24fad6ed7d7fe37a85e2113fdec",
|
|
34
34
|
"src/editor/ComponentWorkshop.vue": "0071a843cab7a8e25697c36755f911c8939c7657bd6264ec6c01a982da9f2647",
|
|
35
35
|
"src/editor/ConfigurableEditor.vue": "dfcecbfb031d6840b22dcd208b163e75ce4e3706af33d3637ecb2925a3e3f6c8",
|
|
36
36
|
"src/editor/LiveVueEditor.vue": "0559a63bba3dc2ffb2d54ad78e7b6c4577381280f3c08e1d3493e189fa6ff0d5",
|
|
37
37
|
"src/editor/apple-input-source.ts": "c97f63206e22f6f461d2883c8baa6157e2c44a3c6b6ce6f8d4529743b9280cd5",
|
|
38
38
|
"src/editor/apple-input.ts": "54546ef9b04c991e3bedd7f718cd4b03855d0ef9a7449ad4459be615d080a141",
|
|
39
39
|
"src/editor/component-metadata.ts": "43a4d37f112cbd76953092679862cea426f5f5adb6738169d25a5dffb91207c1",
|
|
40
|
-
"src/editor/component-playground.ts": "
|
|
40
|
+
"src/editor/component-playground.ts": "caaca2c02d22e98da71928b9984039c9756c49e6acd05d490cae7fff73808cae",
|
|
41
41
|
"src/editor/contract.ts": "792b1e8b2d658297a4b48a1eaa1b697c59d4c0333a0629383e5f0f7a745bba1e",
|
|
42
42
|
"src/editor/documents.ts": "11eb5a22c3bdcbd6ef4cce4cd263339d388e71c2aff1c7dd01e6466dfebc161b",
|
|
43
43
|
"src/editor/handbook.ts": "6311187dd49aedb4fb232ded172bd09d2f9bf353f26e5e8f08a8d5e5d2e5d8bd",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"src/editor/handbooks/apple-back-top.ts": "9c25f3483e9c4cf42e8d23b4a0daa2b8b8b8488b90438b64d064705662882296",
|
|
53
53
|
"src/editor/handbooks/apple-badge.ts": "6543809f64aa6aeed1e1266a673a376999c268e7d3298c267e7df37c34953fca",
|
|
54
54
|
"src/editor/handbooks/apple-breadcrumbs.ts": "28b3734dd3acfb2b1246a840aae596e3885f72bb82e080462962f083e3a679a1",
|
|
55
|
-
"src/editor/handbooks/apple-button.ts": "
|
|
55
|
+
"src/editor/handbooks/apple-button.ts": "fe33f8f70ea2a9a443750f816115a932fab466f87a2be89c882a03716cfab689",
|
|
56
56
|
"src/editor/handbooks/apple-card.ts": "a1fdd55ccdb7f8f888640635631c002b58504984acbdbb76a0be8c58ea383a13",
|
|
57
57
|
"src/editor/handbooks/apple-cascader.ts": "873e0198af0fe6b9cfd8364c8d32d74a2214390d11d8d1f3f6ce8b6d2b5710c2",
|
|
58
58
|
"src/editor/handbooks/apple-checkbox.ts": "7b9e862613da46f8b22330ddd22bf6a3481b00d16078ecefb47bd3d392526b5e",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"src/views/components.vue": "3fd082b7621b010e9499d5274c183cf99df10dda67483efe90b3db14bf575485",
|
|
124
124
|
"src/views/index.vue": "aa266dd79241d4dd932aa7059ec0a11e92df2f1999674f6d7fa5bf335ba11698",
|
|
125
125
|
"src/views/settings.vue": "8c4853775321eafac28dbd824f1cf8dbe08cce153944f269ade286071b1e1d56",
|
|
126
|
-
"tooling/playground-editor.mjs": "
|
|
126
|
+
"tooling/playground-editor.mjs": "b59e16b130ed6175a11bd281163ea823c1fa8a7ba48c7aeb0e683293f5170b6f",
|
|
127
127
|
"tooling/prepare-input-source.mjs": "91bea35dcfa09735dbaeb5fbed7a70abfe447c3d133f4b4381e6ba0d0d4f9f6a"
|
|
128
128
|
},
|
|
129
129
|
"sourcePaths": {
|
|
@@ -253,10 +253,10 @@
|
|
|
253
253
|
},
|
|
254
254
|
"buildSources": {
|
|
255
255
|
"src/components/AppleCard.vue": "c74eea151960b41ea6b6e53f38c6bd2eb96b1dd2664e2dc352581a173651d126",
|
|
256
|
-
"src/components/button.ts": "
|
|
256
|
+
"src/components/button.ts": "b264845f4c340bd201e2d0c5b6765560194a859021b45f3b1e6009bfc1fc58ae",
|
|
257
257
|
"src/components/content.ts": "018cd8cf8052a89c0b271fdc15b27fb6296bd26cb7303ff88d58c9bfb21bbd58",
|
|
258
258
|
"src/components/date-picker.ts": "c2ea419ab9f949b984cced9cf2ab3f6710a5a2c269a65293ecbca1d2cdc9b9ef",
|
|
259
|
-
"src/components/forms.ts": "
|
|
259
|
+
"src/components/forms.ts": "90ae25b7c2200b8292a7f94e8219a553a1c834472a5e34480ffbb6cccf270825",
|
|
260
260
|
"src/components/foundation.ts": "fe56d963605e6fa9776127c152ed151d7abc1a5a0b6e2c02c69b7c859d57e432",
|
|
261
261
|
"src/components/link.ts": "f5d4acc163c205b4dfabffc62084e236aa4759f91b041367a8a4a185cca0a9e4",
|
|
262
262
|
"src/components/mobile-image-viewer.ts": "b94830d23de10de0e38b28ec04479f8a39090b5d339514b65ae0bf78757310d3",
|
|
@@ -280,10 +280,10 @@
|
|
|
280
280
|
"src/core/preview-navigation.ts": "8de5cc0f62b16b0590f212de6f7bb234859ec483a612673a87dd8fe9e260a813",
|
|
281
281
|
"src/core/ripple.ts": "cc5f14ee2e68c082ef26599e5945a7689551da134d34a97934876686d01650e9",
|
|
282
282
|
"src/core/scroll-motion.ts": "408ba816cba1c142e84c9e7154fca6aba88da0dd4b5a21005f59e3e1f03c0eef",
|
|
283
|
-
"src/core/scrollbar.ts": "
|
|
283
|
+
"src/core/scrollbar.ts": "511e9edff132554d0799a7647b2b3e865a772d5fed2e6300a623073887d8b763",
|
|
284
284
|
"src/core/speed-dial.ts": "7d2ebc5320df0357801dd58361701d51b34f71d67822098d64fea5748420962f",
|
|
285
285
|
"src/index.ts": "bb98e0c5833fea023d5b9300ee3920e1b95274a48931a41e0d562e4f2cc96f9e",
|
|
286
|
-
"src/styles/base.css": "
|
|
286
|
+
"src/styles/base.css": "d98f2da531be0725d33d4a151ee326b22cafe2401418fda0f2c9945beaed8d8b",
|
|
287
287
|
"src/styles/content.css": "ac89cc1e7040b34c915af909a1a80185e0b88a4aa81e1cb6b3daa75a3aac7177",
|
|
288
288
|
"src/styles/date-picker.css": "bfb9dd345b7041c059ca16b56e3e08f5cc575b069f82351b6a783bb42ad1fa8f",
|
|
289
289
|
"src/styles/forms.css": "35bfbe5a1d729d89dddc9c62882d1971cc12b0859131d46d356e044d20bdcae5",
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
"src/styles/ripple.css": "a16d40e8b7946dfdffa332ac2456cea6a9bf1cf7f5ace3ed5e9ae21afdeb1c45",
|
|
293
293
|
"src/styles/scrollbar.css": "d32015b2bae6dca16759e88c299fcd9d9ed84df0be164b51f2eb31981fdbe5e7",
|
|
294
294
|
"playground/App.vue": "f85c256ed21601ccb0681a3592237e357d48ec02af371491b90a83a32203828e",
|
|
295
|
-
"playground/ComponentDemo.vue": "
|
|
295
|
+
"playground/ComponentDemo.vue": "a599154820d13ffb19e9a661c0e208f1b0ef79a664f3a372eb7735fa486804cd",
|
|
296
296
|
"playground/catalog.ts": "a27a875d316bcc8d0be523195a0b4e8e21279c7f33c8d2f024efaa8721e1518e",
|
|
297
297
|
"playground/components/ComponentIndex.vue": "7938a3fe3efb521d6efab4fe64edef06d40f22ecd68481d20427a24c39b6683f",
|
|
298
298
|
"playground/components/MasonryFeed.vue": "4882725da4211e2d39b782c839c7581a0672c815d12f146a8aee186df534ac68",
|
|
@@ -305,14 +305,14 @@
|
|
|
305
305
|
"playground/editor/AppleInputExample.vue": "b563cdcb1ec6b033a3a19878f68e7fe4cf39da9d3e838887b591b2364e1aad90",
|
|
306
306
|
"playground/editor/AppleInputPreview.vue": "e88a71316c62c4cb763d1f285b4b9fc8fbcb4a35c6282dc95b32d5824c87dc77",
|
|
307
307
|
"playground/editor/ComponentDocumentLink.vue": "f4e1c88666b315a13e48386e9353c5da733fc149fba97ecc084804abd9d0067c",
|
|
308
|
-
"playground/editor/ComponentPlayground.vue": "
|
|
308
|
+
"playground/editor/ComponentPlayground.vue": "2f5543cc26d438afbda48347d802d8621161c24fad6ed7d7fe37a85e2113fdec",
|
|
309
309
|
"playground/editor/ComponentWorkshop.vue": "0071a843cab7a8e25697c36755f911c8939c7657bd6264ec6c01a982da9f2647",
|
|
310
310
|
"playground/editor/ConfigurableEditor.vue": "dfcecbfb031d6840b22dcd208b163e75ce4e3706af33d3637ecb2925a3e3f6c8",
|
|
311
311
|
"playground/editor/LiveVueEditor.vue": "0559a63bba3dc2ffb2d54ad78e7b6c4577381280f3c08e1d3493e189fa6ff0d5",
|
|
312
312
|
"playground/editor/apple-input-source.ts": "c97f63206e22f6f461d2883c8baa6157e2c44a3c6b6ce6f8d4529743b9280cd5",
|
|
313
313
|
"playground/editor/apple-input.ts": "54546ef9b04c991e3bedd7f718cd4b03855d0ef9a7449ad4459be615d080a141",
|
|
314
314
|
"playground/editor/component-metadata.ts": "43a4d37f112cbd76953092679862cea426f5f5adb6738169d25a5dffb91207c1",
|
|
315
|
-
"playground/editor/component-playground.ts": "
|
|
315
|
+
"playground/editor/component-playground.ts": "caaca2c02d22e98da71928b9984039c9756c49e6acd05d490cae7fff73808cae",
|
|
316
316
|
"playground/editor/contract.ts": "792b1e8b2d658297a4b48a1eaa1b697c59d4c0333a0629383e5f0f7a745bba1e",
|
|
317
317
|
"playground/editor/documents.ts": "11eb5a22c3bdcbd6ef4cce4cd263339d388e71c2aff1c7dd01e6466dfebc161b",
|
|
318
318
|
"playground/editor/handbook.ts": "6311187dd49aedb4fb232ded172bd09d2f9bf353f26e5e8f08a8d5e5d2e5d8bd",
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
"playground/editor/handbooks/apple-back-top.ts": "9c25f3483e9c4cf42e8d23b4a0daa2b8b8b8488b90438b64d064705662882296",
|
|
328
328
|
"playground/editor/handbooks/apple-badge.ts": "6543809f64aa6aeed1e1266a673a376999c268e7d3298c267e7df37c34953fca",
|
|
329
329
|
"playground/editor/handbooks/apple-breadcrumbs.ts": "28b3734dd3acfb2b1246a840aae596e3885f72bb82e080462962f083e3a679a1",
|
|
330
|
-
"playground/editor/handbooks/apple-button.ts": "
|
|
330
|
+
"playground/editor/handbooks/apple-button.ts": "fe33f8f70ea2a9a443750f816115a932fab466f87a2be89c882a03716cfab689",
|
|
331
331
|
"playground/editor/handbooks/apple-card.ts": "a1fdd55ccdb7f8f888640635631c002b58504984acbdbb76a0be8c58ea383a13",
|
|
332
332
|
"playground/editor/handbooks/apple-cascader.ts": "873e0198af0fe6b9cfd8364c8d32d74a2214390d11d8d1f3f6ce8b6d2b5710c2",
|
|
333
333
|
"playground/editor/handbooks/apple-checkbox.ts": "7b9e862613da46f8b22330ddd22bf6a3481b00d16078ecefb47bd3d392526b5e",
|
|
@@ -411,12 +411,12 @@
|
|
|
411
411
|
"public/images/snow.jpg": "59fec6d2bbf9df11b7c697c57a253b7bd4b5a097489ce1017fb5209b9ee54b8e",
|
|
412
412
|
"public/images/sunset.jpg": "4ee91e88f1e341143a807ef48fdfc24d63aa045d99351b4ea8ad7efcfef6ef9b",
|
|
413
413
|
"public/images/waterfall.jpg": "cfd55ff5f41d3a58e91793d0e26a9ca90c86760aa401da033fbfa77d3364f238",
|
|
414
|
-
"docs/COMPONENTS.md": "
|
|
414
|
+
"docs/COMPONENTS.md": "f7aa44e772c43183274796dc37702cc45264491b8e899b0775a03b58ff7efc6b",
|
|
415
415
|
"docs/INPUT-WORKSHOP.md": "82ea6db156d2d9be4cfee233675b107c837aaa30a849f92010e988e1df7ce3a0",
|
|
416
416
|
"docs/PLAYGROUND-TEMPLATE.md": "e476d6622e89d8cb04d9acdd54c090e5d559d666bb49f266bcf36d3f3bf8fe67",
|
|
417
417
|
"docs/VALIDATION.md": "3c1755f4699d6b7d8febb44b2b0b00eb416b86559c26d8b69e46a1c98271af5f",
|
|
418
418
|
"README.md": "d260354846c6be4ba32f6ba668c8654650684dff08ebe73b6b8bcc49462c0322",
|
|
419
|
-
"package.json": "
|
|
419
|
+
"package.json": "0d4bda6cc60481867535cf25ad2185d7c00759ae8d6eced089b8d06543ce718d",
|
|
420
420
|
"index.html": "75f6d93e3962ddca97a13b666a04d98ba9b263b6c288171383db764215034fea",
|
|
421
421
|
"vite.config.ts": "988aa18f3adf428ee3e82a41422bf76771d91b7fc3738ed36d731a497022f049",
|
|
422
422
|
"vite.lib.config.ts": "d7bc7e47f18ea4257eb1dafd8ed895f47cad8f756157cfa9a6e98b30086b1c72",
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="component-demo" :class="demoClass" :data-component="name">
|
|
3
3
|
<apple-stack v-if="name === 'AppleButton'" direction="row" align="center">
|
|
4
|
-
<apple-button @click="notify('操作已完成')">继续</apple-button>
|
|
5
|
-
<apple-button variant="secondary" @click="notify('已选择次要操作')">稍后再说</apple-button>
|
|
6
|
-
<apple-button variant="outline" @click="notify('已加入收藏')">加入收藏</apple-button>
|
|
7
|
-
<apple-
|
|
8
|
-
<apple-button
|
|
9
|
-
<apple-
|
|
4
|
+
<apple-tooltip text="primary"><apple-button @click="notify('操作已完成')">继续</apple-button></apple-tooltip>
|
|
5
|
+
<apple-tooltip text="secondary"><apple-button variant="secondary" @click="notify('已选择次要操作')">稍后再说</apple-button></apple-tooltip>
|
|
6
|
+
<apple-tooltip text="outline"><apple-button variant="outline" @click="notify('已加入收藏')">加入收藏</apple-button></apple-tooltip>
|
|
7
|
+
<apple-tooltip text="borderless"><apple-button variant="borderless" @click="notify('已选择无边框操作')">无边框</apple-button></apple-tooltip>
|
|
8
|
+
<apple-tooltip text='AppleLink · as="button"'><apple-link as="button" :icon="icons.ArrowUpRight" @click="notify('正在查看详情')">了解更多</apple-link></apple-tooltip>
|
|
9
|
+
<apple-tooltip text="primary · iconOnly"><apple-button :icon="icons.Plus" icon-only label="添加" @click="notify('已添加')" /></apple-tooltip>
|
|
10
|
+
<apple-tooltip text="primary · loading"><apple-button loading>处理中</apple-button></apple-tooltip>
|
|
11
|
+
<apple-tooltip text="primary · disabled"><apple-button disabled>暂不可用</apple-button></apple-tooltip>
|
|
10
12
|
</apple-stack>
|
|
11
13
|
<apple-stack v-else-if="name === 'AppleLink'" direction="row" align="center">
|
|
12
|
-
<apple-link href="https://www.apple.com.cn/" external>Apple 官网</apple-link>
|
|
13
|
-
<apple-link href="https://www.apple.com.cn/accessibility/" external>辅助功能</apple-link>
|
|
14
|
-
<apple-link disabled external>暂不可用</apple-link>
|
|
14
|
+
<apple-tooltip text="external"><apple-link href="https://www.apple.com.cn/" external>Apple 官网</apple-link></apple-tooltip>
|
|
15
|
+
<apple-tooltip text="external"><apple-link href="https://www.apple.com.cn/accessibility/" external>辅助功能</apple-link></apple-tooltip>
|
|
16
|
+
<apple-tooltip text="external · disabled"><apple-link disabled external>暂不可用</apple-link></apple-tooltip>
|
|
15
17
|
</apple-stack>
|
|
16
18
|
<apple-stack v-else-if="name === 'AppleSearch'">
|
|
17
19
|
<apple-search v-model="searchText" label="搜索设置" placeholder="搜索设置" @search="notify(searchText ? `正在搜索:${searchText}` : '显示全部设置')" />
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
<AppleSelect v-else-if="controls[entry.name].kind === 'select'" :model-value="String(config.props[entry.name].value)" @update:model-value="config.props[entry.name].value = String($event)" :items="controls[entry.name].options.map(value => ({ label: value, value }))" :label="entry.name" :disabled="!config.props[entry.name].enabled" />
|
|
12
12
|
<AppleTextarea v-else-if="['json', 'expression'].includes(controls[entry.name].kind)" :model-value="String(config.props[entry.name].value)" @update:model-value="config.props[entry.name].value = String($event)" :label="entry.name" :hint="controls[entry.name].kind === 'json' ? 'JSON' : 'JavaScript 表达式'" :rows="3" :error="errors[entry.name] || ''" :disabled="!config.props[entry.name].enabled" />
|
|
13
13
|
<AppleInput v-else :model-value="String(config.props[entry.name].value)" @update:model-value="config.props[entry.name].value = String($event)" :label="entry.name" :error="errors[entry.name] || ''" :disabled="!config.props[entry.name].enabled" />
|
|
14
|
+
<blockquote v-if="doc.name === 'AppleButton' && entry.name === 'href' && config.props.href.enabled" class="sandbox-note">沙箱预览不支持打开外部链接;在实际页面中,href 可正常跳转。</blockquote>
|
|
14
15
|
</div>
|
|
15
16
|
</div>
|
|
16
17
|
<AppleAccordion v-if="doc.slots.length" :items="[{ label: '插槽', value: 'slots' }]">
|
|
@@ -84,6 +85,7 @@ onBeforeUnmount(() => clearTimeout(updateTimer))
|
|
|
84
85
|
.config-heading h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
|
|
85
86
|
.config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
|
|
86
87
|
.prop-control { display: grid; align-content: start; gap: 10px; min-width: 0; }
|
|
88
|
+
.sandbox-note { margin: 0; padding-left: 12px; border-left: 2px solid var(--apple-border); color: var(--apple-secondary); font-size: 12px; line-height: 1.7; }
|
|
87
89
|
.slot-control + .slot-control { border-top: 1px solid var(--apple-border); padding-top: 20px; }
|
|
88
90
|
@media (max-width: 1100px) { .config-grid { grid-template-columns: minmax(0, 1fr); } }
|
|
89
91
|
</style>
|
|
@@ -149,6 +149,7 @@ ${component}
|
|
|
149
149
|
<style scoped>
|
|
150
150
|
.example { display: grid; gap: 28px; padding: 28px 24px; min-width: 0; }
|
|
151
151
|
.component-section { display: grid; gap: 20px; min-width: 0; }
|
|
152
|
+
.component-section > :deep(.apple-button) { justify-self: start; }
|
|
152
153
|
.actions { display: flex; flex-wrap: wrap; gap: 20px; }
|
|
153
154
|
.events-section { border-top: 1px solid var(--apple-border); padding-top: 20px; min-width: 0; }
|
|
154
155
|
.event-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
|
|
@@ -12,15 +12,15 @@ export default defineHandbook({
|
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "variant",
|
|
15
|
-
"type": "'primary' | 'secondary' | 'outline' | 'danger'",
|
|
15
|
+
"type": "'primary' | 'secondary' | 'outline' | 'borderless' | 'danger'",
|
|
16
16
|
"default": "\"primary\"",
|
|
17
|
-
"description": "primary 为主要操作,secondary 和 outline 为描边按钮,danger 为危险操作。"
|
|
17
|
+
"description": "primary 为主要操作,secondary 和 outline 为描边按钮,borderless 无背景和边框、悬停时显示灰色背景,danger 为危险操作。"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"name": "size",
|
|
21
21
|
"type": "'small' | 'medium' | 'large'",
|
|
22
22
|
"default": "\"medium\"",
|
|
23
|
-
"description": "按钮尺寸:small、medium、large
|
|
23
|
+
"description": "按钮尺寸:small、medium、large。窄屏下 small 保留至少 44px 的触控高度。"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "icon",
|
|
@@ -32,7 +32,7 @@ export default defineHandbook({
|
|
|
32
32
|
"name": "iconOnly",
|
|
33
33
|
"type": "boolean",
|
|
34
34
|
"default": "false",
|
|
35
|
-
"description": "
|
|
35
|
+
"description": "纯图标布局;提供 icon 或加载中时自动隐藏默认插槽文字,未提供 icon 时可用默认插槽放图标。用 label 提供可访问名称。"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"name": "label",
|
|
@@ -62,13 +62,13 @@ export default defineHandbook({
|
|
|
62
62
|
"name": "href",
|
|
63
63
|
"type": "string",
|
|
64
64
|
"default": "undefined",
|
|
65
|
-
"description": "
|
|
65
|
+
"description": "链接地址,非空且可用时渲染为 a 并原生跳转;禁用或加载时移除 href。"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"name": "type",
|
|
69
69
|
"type": "'button' | 'submit' | 'reset'",
|
|
70
70
|
"default": "\"button\"",
|
|
71
|
-
"description": "
|
|
71
|
+
"description": "原生按钮类型:button 仅触发点击,submit 提交关联表单,reset 将关联表单控件恢复初始值。默认 button;渲染为 a 时不使用此属性。"
|
|
72
72
|
}
|
|
73
73
|
],
|
|
74
74
|
"events": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { build } from 'esbuild'
|
|
2
2
|
import { readFile } from 'node:fs/promises'
|
|
3
3
|
import { createRequire } from 'node:module'
|
|
4
|
-
import { resolve } from 'node:path'
|
|
4
|
+
import { resolve, sep } from 'node:path'
|
|
5
5
|
import { existsSync } from 'node:fs'
|
|
6
6
|
import { createHash } from 'node:crypto'
|
|
7
7
|
import { parse, compileScript, compileStyle } from 'vue/compiler-sfc'
|
|
@@ -74,8 +74,9 @@ export default function playgroundEditor({ appDir = 'playground', libraryDir = '
|
|
|
74
74
|
return { code, map: null }
|
|
75
75
|
},
|
|
76
76
|
async handleHotUpdate(ctx) {
|
|
77
|
-
const source = libraryDir ? resolve(config.root, libraryDir) +
|
|
78
|
-
|
|
77
|
+
const source = libraryDir ? resolve(config.root, libraryDir) + sep : undefined
|
|
78
|
+
const changedFile = resolve(ctx.file)
|
|
79
|
+
if (!(source && changedFile.startsWith(source)) && changedFile !== resolve(config.root, appDir, 'editor/runtime.ts')) return
|
|
79
80
|
// Preview resources are an in-memory bundle, separate from Vite's normal CSS HMR.
|
|
80
81
|
// Rebuild it when library files change, then recreate the preview realm.
|
|
81
82
|
await rebuild()
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { build } from 'esbuild'
|
|
2
2
|
import { readFile } from 'node:fs/promises'
|
|
3
3
|
import { createRequire } from 'node:module'
|
|
4
|
-
import { resolve } from 'node:path'
|
|
4
|
+
import { resolve, sep } from 'node:path'
|
|
5
5
|
import { existsSync } from 'node:fs'
|
|
6
6
|
import { createHash } from 'node:crypto'
|
|
7
7
|
import { parse, compileScript, compileStyle } from 'vue/compiler-sfc'
|
|
@@ -74,8 +74,9 @@ export default function playgroundEditor({ appDir = 'playground', libraryDir = '
|
|
|
74
74
|
return { code, map: null }
|
|
75
75
|
},
|
|
76
76
|
async handleHotUpdate(ctx) {
|
|
77
|
-
const source = libraryDir ? resolve(config.root, libraryDir) +
|
|
78
|
-
|
|
77
|
+
const source = libraryDir ? resolve(config.root, libraryDir) + sep : undefined
|
|
78
|
+
const changedFile = resolve(ctx.file)
|
|
79
|
+
if (!(source && changedFile.startsWith(source)) && changedFile !== resolve(config.root, appDir, 'editor/runtime.ts')) return
|
|
79
80
|
// Preview resources are an in-memory bundle, separate from Vite's normal CSS HMR.
|
|
80
81
|
// Rebuild it when library files change, then recreate the preview realm.
|
|
81
82
|
await rebuild()
|