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,68 @@
|
|
|
1
|
+
import { defineHandbook } from '../handbook'
|
|
2
|
+
|
|
3
|
+
export default defineHandbook({
|
|
4
|
+
"name": "AppleLink",
|
|
5
|
+
"source": "src/components/link.ts",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "as",
|
|
9
|
+
"type": "'a' | 'button'",
|
|
10
|
+
"default": "\"a\"",
|
|
11
|
+
"description": "渲染为 a 或 button。执行页面内操作时使用 button;原生 type 默认 button,也可作为 attr 指定 submit。"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "href",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"default": "undefined",
|
|
17
|
+
"description": "链接地址。"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "external",
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": "false",
|
|
23
|
+
"description": "a 模式使用 _blank 打开,并添加 noopener noreferrer 和外链标记。"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "disabled",
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"default": "false",
|
|
29
|
+
"description": "移除 href、设置 aria-disabled 并阻止 click;button 模式还设置原生 disabled。"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "icon",
|
|
33
|
+
"type": "Component",
|
|
34
|
+
"default": "undefined",
|
|
35
|
+
"description": "Vue 图标组件,例如从 lucide-vue-next 导入的 Mail;不是图标名称字符串。"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "iconOnly",
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"default": "false",
|
|
41
|
+
"description": "紧凑的纯图标布局。用 label 为按钮提供可访问名称。"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "label",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"default": "undefined",
|
|
47
|
+
"description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"events": [
|
|
51
|
+
{
|
|
52
|
+
"name": "click",
|
|
53
|
+
"type": "(event: MouseEvent) => void",
|
|
54
|
+
"description": "可用状态下点击时触发;需要自定义导航时可调用 event.preventDefault()。"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"slots": [
|
|
58
|
+
{
|
|
59
|
+
"name": "default",
|
|
60
|
+
"type": "() => VNode[](无 slot props)",
|
|
61
|
+
"description": "链接或按钮内容。"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"methods": [],
|
|
65
|
+
"notes": [
|
|
66
|
+
"页面跳转使用 href;页面内操作使用 as=\"button\"。链接不提供 motion 或 ripple props。"
|
|
67
|
+
]
|
|
68
|
+
})
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineHandbook } from '../handbook'
|
|
2
|
+
|
|
3
|
+
export default defineHandbook({
|
|
4
|
+
"name": "AppleList",
|
|
5
|
+
"source": "src/components/content.ts",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "motion",
|
|
9
|
+
"type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
|
|
10
|
+
"default": "\"inherit\"",
|
|
11
|
+
"description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "items",
|
|
15
|
+
"type": "AppleItem[]",
|
|
16
|
+
"default": "[]",
|
|
17
|
+
"description": "按顺序显示的选项。每项 value 唯一,保留字符串和数字的类型区别。结构:{ label: string; value: string | number; disabled?: boolean; description?: string; href?: string; content?: string }。"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "modelValue",
|
|
21
|
+
"type": "string | number",
|
|
22
|
+
"default": "undefined",
|
|
23
|
+
"description": "当前选中 value,仅 selectable 交互会发出 update:modelValue。"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "selectable",
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"default": "false",
|
|
29
|
+
"description": "使用 button 单选并更新 modelValue;false 时有 href 的项渲染为链接,其余作为内容。"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "disabled",
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": "false",
|
|
35
|
+
"description": "禁用控件的交互。选项自身的 disabled 仍然独立生效。"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "label",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"default": "\"列表\"",
|
|
41
|
+
"description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"events": [
|
|
45
|
+
{
|
|
46
|
+
"name": "update:modelValue",
|
|
47
|
+
"type": "(value: string | number) => void",
|
|
48
|
+
"description": "交互更新时发出新模型值;可使用 v-model 接收。"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "select",
|
|
52
|
+
"type": "(item: AppleItem) => void",
|
|
53
|
+
"description": "点击可用项时发出完整项;selectable 时随后更新模型,否则保留链接行为。"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"slots": [
|
|
57
|
+
{
|
|
58
|
+
"name": "item",
|
|
59
|
+
"type": "({ item: AppleItem, selected: boolean }) => VNode[]",
|
|
60
|
+
"description": "替代列表项的内部内容。"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"methods": [],
|
|
64
|
+
"notes": [
|
|
65
|
+
"使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
|
|
66
|
+
]
|
|
67
|
+
})
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineHandbook } from '../handbook'
|
|
2
|
+
|
|
3
|
+
export default defineHandbook({
|
|
4
|
+
"name": "AppleMenu",
|
|
5
|
+
"source": "src/components/overlays.ts",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "modelValue",
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"default": "undefined",
|
|
11
|
+
"description": "打开状态;默认 undefined,允许内部管理。"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "label",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"default": "\"操作\"",
|
|
17
|
+
"description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "items",
|
|
21
|
+
"type": "AppleMenuItem[]",
|
|
22
|
+
"default": "[]",
|
|
23
|
+
"description": "菜单数组:{ label, value: string|number, disabled?, danger?, description?, icon?: Component }。选择后关闭。"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "selected",
|
|
27
|
+
"type": "string | number",
|
|
28
|
+
"default": "undefined",
|
|
29
|
+
"description": "为指定 value 显示勾选标记;不会因选择事件自动更新此 prop。"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "disabled",
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": "false",
|
|
35
|
+
"description": "禁用控件的交互。选项自身的 disabled 仍然独立生效。"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "motion",
|
|
39
|
+
"type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
|
|
40
|
+
"default": "\"inherit\"",
|
|
41
|
+
"description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"events": [
|
|
45
|
+
{
|
|
46
|
+
"name": "update:modelValue",
|
|
47
|
+
"type": "(value: boolean) => void",
|
|
48
|
+
"description": "交互更新时发出新模型值;可使用 v-model 接收。"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "select",
|
|
52
|
+
"type": "(value: string | number, item: AppleMenuItem) => void",
|
|
53
|
+
"description": "选择可用菜单项时发出 value 和完整项,然后更新打开状态为 false。"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"slots": [
|
|
57
|
+
{
|
|
58
|
+
"name": "activator",
|
|
59
|
+
"type": "({ props: Record<string, unknown>, open: () => void, close: () => void, isOpen: boolean }) => VNode[]",
|
|
60
|
+
"description": "自定义菜单触发元素,绑定 props 保留交互。"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "item",
|
|
64
|
+
"type": "({ item: AppleMenuItem }) => VNode[]",
|
|
65
|
+
"description": "替代菜单按钮的内部内容。"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"methods": [],
|
|
69
|
+
"notes": [
|
|
70
|
+
"使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
|
|
71
|
+
]
|
|
72
|
+
})
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { defineHandbook } from '../handbook'
|
|
2
|
+
|
|
3
|
+
export default defineHandbook({
|
|
4
|
+
"name": "AppleNavibar",
|
|
5
|
+
"source": "src/components/navibar.ts",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "motion",
|
|
9
|
+
"type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
|
|
10
|
+
"default": "\"inherit\"",
|
|
11
|
+
"description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "items",
|
|
15
|
+
"type": "AppleItem[]",
|
|
16
|
+
"default": "[]",
|
|
17
|
+
"description": "导航项结构:{ label: string; value: string | number; disabled?: boolean; description?: string; href?: string; content?: string }[]。带 href 时生成链接;事件本身不会阻止链接导航。"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "modelValue",
|
|
21
|
+
"type": "string | number",
|
|
22
|
+
"default": "undefined",
|
|
23
|
+
"description": "当前值。使用 v-model 同步组件发出的 update:modelValue。"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "brand",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"default": "\"\"",
|
|
29
|
+
"description": "品牌文字;brand 插槽可以覆盖。"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "brandHref",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"default": "\"/\"",
|
|
35
|
+
"description": "默认品牌链接地址,不负责 Vue Router 导航。"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "label",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"default": "\"主导航\"",
|
|
41
|
+
"description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "fixed",
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"default": "true",
|
|
47
|
+
"description": "固定定位;关闭后按正常文档流布局。"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "hideOnPreview",
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"default": "undefined",
|
|
53
|
+
"description": "省略时跟随 fixed;图片预览期间隐藏并保留占位,退出开始时恢复。"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "breakpoint",
|
|
57
|
+
"type": "number",
|
|
58
|
+
"default": "640",
|
|
59
|
+
"description": "导航栏自身宽度小于等于此值时折叠为菜单,单位 px;不是仅检查窗口宽度。"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"events": [
|
|
63
|
+
{
|
|
64
|
+
"name": "update:modelValue",
|
|
65
|
+
"type": "(value: string | number) => void",
|
|
66
|
+
"description": "交互更新时发出新模型值;可使用 v-model 接收。"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "change",
|
|
70
|
+
"type": "(value: string | number, item: AppleItem) => void",
|
|
71
|
+
"description": "选择导航项后发出 value 和完整项;不阻止 href 跳转。"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "toggle",
|
|
75
|
+
"type": "(open: boolean) => void",
|
|
76
|
+
"description": "折叠菜单打开状态改变时触发。"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"slots": [
|
|
80
|
+
{
|
|
81
|
+
"name": "brand",
|
|
82
|
+
"type": "() => VNode[](无 slot props)",
|
|
83
|
+
"description": "替代品牌内容。"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "item",
|
|
87
|
+
"type": "({ item: AppleItem, active: boolean }) => VNode[]",
|
|
88
|
+
"description": "替代每个导航项的内部内容;外层链接/按钮仍由组件处理。"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "actions",
|
|
92
|
+
"type": "({ close: (restoreFocus?: boolean) => void }) => VNode[]",
|
|
93
|
+
"description": "右侧附加操作;需要时调用 close() 关闭折叠菜单。"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"methods": [],
|
|
97
|
+
"notes": [
|
|
98
|
+
"固定模式保留占位;折叠取决于导航栏自身宽度。链接导航由 href 或应用的 Router 处理。"
|
|
99
|
+
]
|
|
100
|
+
})
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { defineHandbook } from '../handbook'
|
|
2
|
+
|
|
3
|
+
export default defineHandbook({
|
|
4
|
+
"name": "AppleOtpInput",
|
|
5
|
+
"source": "src/components/forms.ts",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "label",
|
|
9
|
+
"type": "string",
|
|
10
|
+
"default": "\"验证码\"",
|
|
11
|
+
"description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "hint",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"default": "\"\"",
|
|
17
|
+
"description": "字段帮助文字;error 非空时优先显示错误,帮助文字暂时隐藏。"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "error",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"default": "\"\"",
|
|
23
|
+
"description": "显示字段错误和错误样式,不会自行执行校验或阻止表单提交。"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "disabled",
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"default": "false",
|
|
29
|
+
"description": "禁用控件的交互。选项自身的 disabled 仍然独立生效。"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "loading",
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": "false",
|
|
35
|
+
"description": "显示忙碌状态;表单控件在加载时禁止编辑或选择。"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "required",
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"default": "false",
|
|
41
|
+
"description": "为字段添加必填标记并传递必填约束;不会自动生成 error 文本。"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "motion",
|
|
45
|
+
"type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
|
|
46
|
+
"default": "\"inherit\"",
|
|
47
|
+
"description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "modelValue",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"default": "\"\"",
|
|
53
|
+
"description": "验证码字符串;键入和粘贴后截取到 length。"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "length",
|
|
57
|
+
"type": "number",
|
|
58
|
+
"default": "6",
|
|
59
|
+
"description": "验证码位数,要求 1–12,默认 6。"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "numeric",
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"default": "true",
|
|
65
|
+
"description": "只保留数字;false 允许非空白字符。"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "name",
|
|
69
|
+
"type": "string",
|
|
70
|
+
"default": "undefined",
|
|
71
|
+
"description": "HTML 表单字段名;设置后才会在 FormData 中包含此字段。"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "mask",
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"default": "false",
|
|
77
|
+
"description": "将各位输入渲染为 password,不改变实际模型。"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"events": [
|
|
81
|
+
{
|
|
82
|
+
"name": "update:modelValue",
|
|
83
|
+
"type": "(value: string) => void",
|
|
84
|
+
"description": "交互更新时发出新模型值;可使用 v-model 接收。"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "change",
|
|
88
|
+
"type": "(value: string) => void",
|
|
89
|
+
"description": "用户提交选择或调整时发出当前值;直接从父组件赋值不会主动发出此事件。"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "complete",
|
|
93
|
+
"type": "(value: string) => void",
|
|
94
|
+
"description": "更新后的字符串长度达到 length 时触发;不执行远程验证。"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"slots": [],
|
|
98
|
+
"methods": [
|
|
99
|
+
{
|
|
100
|
+
"name": "focus(index = 0)",
|
|
101
|
+
"type": "(index?: number) => void",
|
|
102
|
+
"description": "聚焦指定验证码位,索引从 0 开始并约束在有效范围。"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"notes": [
|
|
106
|
+
"字段名称、帮助和错误文字只用于说明。直接操作控件;原生 name、autocomplete 等属性需按实际输入类型使用。"
|
|
107
|
+
]
|
|
108
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineHandbook } from '../handbook'
|
|
2
|
+
|
|
3
|
+
export default defineHandbook({
|
|
4
|
+
"name": "AppleOverlayHost",
|
|
5
|
+
"source": "src/components/overlays.ts",
|
|
6
|
+
"props": [],
|
|
7
|
+
"events": [],
|
|
8
|
+
"slots": [],
|
|
9
|
+
"methods": [],
|
|
10
|
+
"notes": [
|
|
11
|
+
"只消费注入上下文的 overlays.entries;不接受公开 props、事件或插槽。Provider 已包含 Host,独立宿主场景才手动挂载。"
|
|
12
|
+
]
|
|
13
|
+
})
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineHandbook } from '../handbook'
|
|
2
|
+
|
|
3
|
+
export default defineHandbook({
|
|
4
|
+
"name": "ApplePagination",
|
|
5
|
+
"source": "src/components/content.ts",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "motion",
|
|
9
|
+
"type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
|
|
10
|
+
"default": "\"inherit\"",
|
|
11
|
+
"description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "modelValue",
|
|
15
|
+
"type": "number",
|
|
16
|
+
"default": "1",
|
|
17
|
+
"description": "从 1 开始的页码,显示时约束在有效页数内。"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "total",
|
|
21
|
+
"type": "number",
|
|
22
|
+
"default": "0",
|
|
23
|
+
"description": "总条目数量,不是总页数;0 或负数时禁用翻页。"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "pageSize",
|
|
27
|
+
"type": "number",
|
|
28
|
+
"default": "10",
|
|
29
|
+
"description": "每页条目数量;页数使用 ceil(total / max(1, pageSize))。"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "disabled",
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": "false",
|
|
35
|
+
"description": "禁用控件的交互。选项自身的 disabled 仍然独立生效。"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "label",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"default": "\"分页\"",
|
|
41
|
+
"description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"events": [
|
|
45
|
+
{
|
|
46
|
+
"name": "update:modelValue",
|
|
47
|
+
"type": "(value: number) => void",
|
|
48
|
+
"description": "交互更新时发出新模型值;可使用 v-model 接收。"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "change",
|
|
52
|
+
"type": "(value: number) => void",
|
|
53
|
+
"description": "用户提交选择或调整时发出当前值;直接从父组件赋值不会主动发出此事件。"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"slots": [],
|
|
57
|
+
"methods": [],
|
|
58
|
+
"notes": [
|
|
59
|
+
"使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
|
|
60
|
+
]
|
|
61
|
+
})
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { defineHandbook } from '../handbook'
|
|
2
|
+
|
|
3
|
+
export default defineHandbook({
|
|
4
|
+
"name": "ApplePopover",
|
|
5
|
+
"source": "src/components/overlays.ts",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "modelValue",
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"default": "undefined",
|
|
11
|
+
"description": "受控打开状态;省略时内部管理,保留默认 undefined 可体验非受控模式。"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "label",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"default": "\"更多\"",
|
|
17
|
+
"description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "disabled",
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": "false",
|
|
23
|
+
"description": "禁用控件的交互。选项自身的 disabled 仍然独立生效。"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "placement",
|
|
27
|
+
"type": "'top' | 'bottom' | 'left' | 'right'",
|
|
28
|
+
"default": "\"bottom\"",
|
|
29
|
+
"description": "期望弹出方向:top、bottom、left、right;碰到视口边缘时会避让。"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "align",
|
|
33
|
+
"type": "'start' | 'center' | 'end'",
|
|
34
|
+
"default": "\"start\"",
|
|
35
|
+
"description": "与触发元素对齐:start、center、end。"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "role",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"default": "\"dialog\"",
|
|
41
|
+
"description": "面板 ARIA role,默认 dialog;自定义语义应与内容匹配。"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "width",
|
|
45
|
+
"type": "number | string",
|
|
46
|
+
"default": "280",
|
|
47
|
+
"description": "宽度。数字按 px,字符串作为 CSS 尺寸;仍受可用空间约束。"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "openOnHover",
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"default": "false",
|
|
53
|
+
"description": "在非触摸设备上支持悬停打开,同时保留焦点和点击交互。"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "trapFocus",
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"default": "true",
|
|
59
|
+
"description": "打开后限制 Tab 焦点在面板内;tooltip 等非模态提示可关闭。"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "panelClass",
|
|
63
|
+
"type": "string",
|
|
64
|
+
"default": "\"\"",
|
|
65
|
+
"description": "附加到弹出面板的 CSS class。"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "motion",
|
|
69
|
+
"type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
|
|
70
|
+
"default": "\"inherit\"",
|
|
71
|
+
"description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"events": [
|
|
75
|
+
{
|
|
76
|
+
"name": "update:modelValue",
|
|
77
|
+
"type": "(value: boolean) => void",
|
|
78
|
+
"description": "交互更新时发出新模型值;可使用 v-model 接收。"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "open",
|
|
82
|
+
"type": "() => void",
|
|
83
|
+
"description": "打开状态改变为 true 时触发。"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "close",
|
|
87
|
+
"type": "() => void",
|
|
88
|
+
"description": "面板退出过渡完成并释放层级状态后触发,无参数。"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "after-close",
|
|
92
|
+
"type": "() => void",
|
|
93
|
+
"description": "面板退出过渡完成后触发。"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"slots": [
|
|
97
|
+
{
|
|
98
|
+
"name": "activator",
|
|
99
|
+
"type": "({ props: Record<string, unknown>, open: () => void, close: () => void, isOpen: boolean }) => VNode[]",
|
|
100
|
+
"description": "自定义触发元素,使用 v-bind=\"props\" 保留点击、焦点与 ARIA 交互。"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "default",
|
|
104
|
+
"type": "({ close: () => void }) => VNode[]",
|
|
105
|
+
"description": "弹出面板内容;close() 关闭面板。"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"methods": [],
|
|
109
|
+
"notes": [
|
|
110
|
+
"支持受控与非受控状态,Esc 与外部点击关闭并恢复焦点。自定义 activator 应绑定 slot props。"
|
|
111
|
+
]
|
|
112
|
+
})
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineHandbook } from '../handbook'
|
|
2
|
+
|
|
3
|
+
export default defineHandbook({
|
|
4
|
+
"name": "AppleProgress",
|
|
5
|
+
"source": "src/components/content.ts",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "motion",
|
|
9
|
+
"type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
|
|
10
|
+
"default": "\"inherit\"",
|
|
11
|
+
"description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "modelValue",
|
|
15
|
+
"type": "number",
|
|
16
|
+
"default": "0",
|
|
17
|
+
"description": "只读进度数值,显示百分比约束为 0–100%;不发出 update:modelValue,使用 :model-value。"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "max",
|
|
21
|
+
"type": "number",
|
|
22
|
+
"default": "100",
|
|
23
|
+
"description": "进度总量,用于将 modelValue 换算为百分比;非正值按 0% 显示。"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "label",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"default": "\"进度\"",
|
|
29
|
+
"description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "indeterminate",
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": "false",
|
|
35
|
+
"description": "显示不定进度,不提供 aria-valuenow。"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "showValue",
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"default": "false",
|
|
41
|
+
"description": "确定进度显示百分比,不定进度显示“进行中”。"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "tone",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"default": "\"accent\"",
|
|
47
|
+
"description": "视觉语义颜色,不会自行触发业务操作。"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"events": [],
|
|
51
|
+
"slots": [],
|
|
52
|
+
"methods": [],
|
|
53
|
+
"notes": [
|
|
54
|
+
"使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
|
|
55
|
+
]
|
|
56
|
+
})
|