apptify 0.6.2 → 0.7.1

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.
Files changed (131) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_LICENSES.txt +23 -0
  3. package/dist/apptify.css +1 -1
  4. package/dist/apptify.js +2395 -2451
  5. package/dist/components/AppleCard.vue.d.ts +1 -1
  6. package/dist/components/button.d.ts +3 -3
  7. package/dist/components/content.d.ts +81 -20
  8. package/dist/components/forms.d.ts +2 -2
  9. package/dist/components/foundation.d.ts +136 -14
  10. package/dist/components/mobile-image-viewer.d.ts +35 -12
  11. package/dist/components/navibar.d.ts +2 -2
  12. package/dist/components/overlays.d.ts +10 -59
  13. package/dist/components/scrollbar.d.ts +88 -0
  14. package/dist/components/speed-dial.d.ts +157 -0
  15. package/dist/core/context.d.ts +11 -0
  16. package/dist/core/device.d.ts +2 -0
  17. package/dist/core/image-gallery-motion.d.ts +2 -1
  18. package/dist/core/image-motion.d.ts +1 -1
  19. package/dist/core/layers.d.ts +1 -0
  20. package/dist/core/motion-driver.d.ts +40 -0
  21. package/dist/core/motion.d.ts +1 -1
  22. package/dist/core/ripple.d.ts +16 -0
  23. package/dist/core/scroll-motion.d.ts +6 -0
  24. package/dist/core/scrollbar.d.ts +14 -0
  25. package/dist/core/speed-dial.d.ts +21 -0
  26. package/dist/index.d.ts +240 -29
  27. package/docs/COMPONENTS.md +11 -7
  28. package/package.json +5 -7
  29. package/templates/playground/README.md +1 -1
  30. package/templates/playground/package.json +1 -2
  31. package/templates/playground/source-snapshot.json +300 -67
  32. package/templates/playground/src/App.vue +1 -0
  33. package/templates/playground/src/ComponentDemo.vue +30 -21
  34. package/templates/playground/src/catalog.ts +70 -65
  35. package/templates/playground/src/components/ComponentIndex.vue +10 -14
  36. package/templates/playground/src/components/MasonryFeed.vue +52 -0
  37. package/templates/playground/src/components/UserMenu.vue +1 -1
  38. package/templates/playground/src/components/forbidden-paper-scene.vue +367 -0
  39. package/templates/playground/src/components/forbidden-paper-story.ts +233 -0
  40. package/templates/playground/src/editor/ComponentPlayground.vue +91 -0
  41. package/templates/playground/src/editor/ConfigurableEditor.vue +1 -1
  42. package/templates/playground/src/editor/apple-input-source.ts +1 -1
  43. package/templates/playground/src/editor/component-metadata.ts +72 -0
  44. package/templates/playground/src/editor/component-playground.ts +163 -0
  45. package/templates/playground/src/editor/contract.ts +1 -1
  46. package/templates/playground/src/editor/documents.ts +11 -2
  47. package/templates/playground/src/editor/handbook.ts +22 -0
  48. package/templates/playground/src/editor/handbooks/apple-accordion.ts +66 -0
  49. package/templates/playground/src/editor/handbooks/apple-action-sheet.ts +72 -0
  50. package/templates/playground/src/editor/handbooks/apple-alert.ts +67 -0
  51. package/templates/playground/src/editor/handbooks/apple-aside.ts +32 -0
  52. package/templates/playground/src/editor/handbooks/apple-auto-size.ts +32 -0
  53. package/templates/playground/src/editor/handbooks/apple-autocomplete.ts +114 -0
  54. package/templates/playground/src/editor/handbooks/apple-avatar-group.ts +50 -0
  55. package/templates/playground/src/editor/handbooks/apple-avatar.ts +56 -0
  56. package/templates/playground/src/editor/handbooks/apple-back-top.ts +62 -0
  57. package/templates/playground/src/editor/handbooks/apple-badge.ts +62 -0
  58. package/templates/playground/src/editor/handbooks/apple-breadcrumbs.ts +38 -0
  59. package/templates/playground/src/editor/handbooks/apple-button.ts +92 -0
  60. package/templates/playground/src/editor/handbooks/apple-card.ts +112 -0
  61. package/templates/playground/src/editor/handbooks/apple-cascader.ts +102 -0
  62. package/templates/playground/src/editor/handbooks/apple-checkbox.ts +85 -0
  63. package/templates/playground/src/editor/handbooks/apple-color-picker.ts +79 -0
  64. package/templates/playground/src/editor/handbooks/apple-container.ts +26 -0
  65. package/templates/playground/src/editor/handbooks/apple-date-picker.ts +104 -0
  66. package/templates/playground/src/editor/handbooks/apple-dialog.ts +151 -0
  67. package/templates/playground/src/editor/handbooks/apple-divider.ts +38 -0
  68. package/templates/playground/src/editor/handbooks/apple-drawer.ts +151 -0
  69. package/templates/playground/src/editor/handbooks/apple-empty.ts +43 -0
  70. package/templates/playground/src/editor/handbooks/apple-floating-group.ts +51 -0
  71. package/templates/playground/src/editor/handbooks/apple-form-field.ts +69 -0
  72. package/templates/playground/src/editor/handbooks/apple-form.ts +76 -0
  73. package/templates/playground/src/editor/handbooks/apple-grid.ts +32 -0
  74. package/templates/playground/src/editor/handbooks/apple-image.ts +122 -0
  75. package/templates/playground/src/editor/handbooks/apple-infinite-scroll.ts +73 -0
  76. package/templates/playground/src/editor/handbooks/apple-link.ts +68 -0
  77. package/templates/playground/src/editor/handbooks/apple-list.ts +67 -0
  78. package/templates/playground/src/editor/handbooks/apple-menu.ts +72 -0
  79. package/templates/playground/src/editor/handbooks/apple-navibar.ts +100 -0
  80. package/templates/playground/src/editor/handbooks/apple-otp-input.ts +108 -0
  81. package/templates/playground/src/editor/handbooks/apple-overlay-host.ts +13 -0
  82. package/templates/playground/src/editor/handbooks/apple-pagination.ts +61 -0
  83. package/templates/playground/src/editor/handbooks/apple-popover.ts +112 -0
  84. package/templates/playground/src/editor/handbooks/apple-progress.ts +56 -0
  85. package/templates/playground/src/editor/handbooks/apple-provider.ts +32 -0
  86. package/templates/playground/src/editor/handbooks/apple-pull-refresh.ts +61 -0
  87. package/templates/playground/src/editor/handbooks/apple-radio-group.ts +91 -0
  88. package/templates/playground/src/editor/handbooks/apple-rate.ts +97 -0
  89. package/templates/playground/src/editor/handbooks/apple-scroll-bar.ts +15 -0
  90. package/templates/playground/src/editor/handbooks/apple-search.ts +49 -0
  91. package/templates/playground/src/editor/handbooks/apple-segmented-control.ts +85 -0
  92. package/templates/playground/src/editor/handbooks/apple-select.ts +91 -0
  93. package/templates/playground/src/editor/handbooks/apple-sheet.ts +151 -0
  94. package/templates/playground/src/editor/handbooks/apple-skeleton.ts +74 -0
  95. package/templates/playground/src/editor/handbooks/apple-slider.ts +103 -0
  96. package/templates/playground/src/editor/handbooks/apple-snackbar.ts +89 -0
  97. package/templates/playground/src/editor/handbooks/apple-speed-dial-item.ts +16 -0
  98. package/templates/playground/src/editor/handbooks/apple-speed-dial.ts +13 -0
  99. package/templates/playground/src/editor/handbooks/apple-spinner.ts +38 -0
  100. package/templates/playground/src/editor/handbooks/apple-stack.ts +44 -0
  101. package/templates/playground/src/editor/handbooks/apple-statistic.ts +69 -0
  102. package/templates/playground/src/editor/handbooks/apple-stepper.ts +91 -0
  103. package/templates/playground/src/editor/handbooks/apple-steps.ts +61 -0
  104. package/templates/playground/src/editor/handbooks/apple-switch.ts +79 -0
  105. package/templates/playground/src/editor/handbooks/apple-tab-bar.ts +66 -0
  106. package/templates/playground/src/editor/handbooks/apple-table.ts +176 -0
  107. package/templates/playground/src/editor/handbooks/apple-tabs.ts +72 -0
  108. package/templates/playground/src/editor/handbooks/apple-tag.ts +56 -0
  109. package/templates/playground/src/editor/handbooks/apple-textarea.ts +109 -0
  110. package/templates/playground/src/editor/handbooks/apple-timeline.ts +44 -0
  111. package/templates/playground/src/editor/handbooks/apple-tooltip.ts +45 -0
  112. package/templates/playground/src/editor/handbooks/apple-transition.ts +44 -0
  113. package/templates/playground/src/editor/handbooks/apple-tree.ts +84 -0
  114. package/templates/playground/src/editor/handbooks/apple-upload.ts +126 -0
  115. package/templates/playground/src/editor/playground-examples.ts +105 -0
  116. package/templates/playground/src/images.ts +3 -0
  117. package/templates/playground/src/router/index.ts +19 -2
  118. package/templates/playground/src/style.css +4 -4
  119. package/templates/playground/src/views/403.vue +65 -0
  120. package/templates/playground/src/views/component-docs/[component].vue +11 -14
  121. package/templates/playground/src/views/components.vue +11 -41
  122. package/templates/playground/src/views/index.vue +3 -1
  123. package/templates/playground/src/views/settings.vue +5 -2
  124. package/templates/playground/tooling/playground-editor.mjs +4 -3
  125. package/tooling/playground-editor.mjs +4 -3
  126. package/tooling/prepare-playground.mjs +3 -3
  127. package/tooling/test-playground-package.mjs +10 -0
  128. package/dist/components/gallery-scrollbar.d.ts +0 -46
  129. package/dist/core/desktop-image-enter.d.ts +0 -6
  130. package/dist/core/desktop-image-return.d.ts +0 -1
  131. package/templates/playground/src/components/DirectoryDialog.vue +0 -20
@@ -0,0 +1,112 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleCard",
5
+ "source": "src/components/AppleCard.vue",
6
+ "props": [
7
+ {
8
+ "name": "motion",
9
+ "type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
10
+ "default": "\"inherit\"",
11
+ "description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
12
+ },
13
+ {
14
+ "name": "icon",
15
+ "type": "Component | string",
16
+ "default": "undefined",
17
+ "description": "Vue 图标组件或图片 URL 字符串;icon 插槽可以覆盖。"
18
+ },
19
+ {
20
+ "name": "iconColor",
21
+ "type": "string",
22
+ "default": "undefined",
23
+ "description": "组件图标的颜色,不影响字符串图片图标。"
24
+ },
25
+ {
26
+ "name": "title",
27
+ "type": "string",
28
+ "default": "undefined",
29
+ "description": "标题文字。"
30
+ },
31
+ {
32
+ "name": "subtitle",
33
+ "type": "string",
34
+ "default": "undefined",
35
+ "description": "标题下方的补充文字。"
36
+ },
37
+ {
38
+ "name": "text",
39
+ "type": "string",
40
+ "default": "undefined",
41
+ "description": "内容文字。"
42
+ },
43
+ {
44
+ "name": "eyebrow",
45
+ "type": "string",
46
+ "default": "undefined",
47
+ "description": "标题上方的短文字。"
48
+ },
49
+ {
50
+ "name": "image",
51
+ "type": "string",
52
+ "default": "undefined",
53
+ "description": "顶部图片 URL;media 插槽会替代该图片。"
54
+ },
55
+ {
56
+ "name": "imageAlt",
57
+ "type": "string",
58
+ "default": "\"\"",
59
+ "description": "顶部图片的替代文字。"
60
+ },
61
+ {
62
+ "name": "href",
63
+ "type": "string",
64
+ "default": "undefined",
65
+ "description": "仅将标题渲染为链接,不会让整张卡片可点击。"
66
+ },
67
+ {
68
+ "name": "zoom",
69
+ "type": "'big' | 'small' | 'none'",
70
+ "default": "\"none\"",
71
+ "description": "悬停缩放:big、small、none;仅完整动效且支持悬停时使用。"
72
+ },
73
+ {
74
+ "name": "shadow",
75
+ "type": "'normal' | 'static' | 'focused' | 'none'",
76
+ "default": "\"normal\"",
77
+ "description": "阴影:normal(悬停增强)、static、focused、none。"
78
+ }
79
+ ],
80
+ "events": [],
81
+ "slots": [
82
+ {
83
+ "name": "media",
84
+ "type": "() => VNode[](无 slot props)",
85
+ "description": "替代默认顶部图片。"
86
+ },
87
+ {
88
+ "name": "icon",
89
+ "type": "() => VNode[](无 slot props)",
90
+ "description": "替代默认图标。"
91
+ },
92
+ {
93
+ "name": "title",
94
+ "type": "() => VNode[](无 slot props)",
95
+ "description": "替代默认标题,需自行保留标题与链接语义。"
96
+ },
97
+ {
98
+ "name": "default",
99
+ "type": "() => VNode[](无 slot props)",
100
+ "description": "放在文字后的卡片正文。"
101
+ },
102
+ {
103
+ "name": "actions",
104
+ "type": "() => VNode[](无 slot props)",
105
+ "description": "底部操作区。"
106
+ }
107
+ ],
108
+ "methods": [],
109
+ "notes": [
110
+ "使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
111
+ ]
112
+ })
@@ -0,0 +1,102 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleCascader",
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 | number)[]",
52
+ "default": "[]",
53
+ "description": "已选 value 的路径数组,每级一个值;改选上级时舍弃其后的旧路径。"
54
+ },
55
+ {
56
+ "name": "items",
57
+ "type": "AppleCascaderOption[]",
58
+ "default": "[]",
59
+ "description": "递归选项:{ label: string; value: string | number; disabled?: boolean } & { children?: AppleCascaderOption[] }。需自行提供数据。"
60
+ },
61
+ {
62
+ "name": "placeholder",
63
+ "type": "string",
64
+ "default": "\"请选择\"",
65
+ "description": "尚未填写或选择时显示的占位文字,不能替代字段名称。"
66
+ },
67
+ {
68
+ "name": "levelLabels",
69
+ "type": "string[]",
70
+ "default": "[]",
71
+ "description": "各层选择器的占位文字和可访问名称,未提供的层级使用 placeholder / label。"
72
+ },
73
+ {
74
+ "name": "name",
75
+ "type": "string",
76
+ "default": "undefined",
77
+ "description": "提交字段按 name[0]、name[1] 等命名。"
78
+ }
79
+ ],
80
+ "events": [
81
+ {
82
+ "name": "update:modelValue",
83
+ "type": "(value: (string | number)[]) => void",
84
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
85
+ },
86
+ {
87
+ "name": "change",
88
+ "type": "(value: (string | number)[]) => void",
89
+ "description": "用户提交选择或调整时发出当前值;直接从父组件赋值不会主动发出此事件。"
90
+ },
91
+ {
92
+ "name": "complete",
93
+ "type": "(path: (string | number)[]) => void",
94
+ "description": "选择无子节点的叶子选项时触发,参数是完整选中路径。"
95
+ }
96
+ ],
97
+ "slots": [],
98
+ "methods": [],
99
+ "notes": [
100
+ "字段名称、帮助和错误文字只用于说明。直接操作控件;原生 name、autocomplete 等属性需按实际输入类型使用。"
101
+ ]
102
+ })
@@ -0,0 +1,85 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleCheckbox",
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": "boolean",
52
+ "default": "false",
53
+ "description": "是否勾选,布尔值。"
54
+ },
55
+ {
56
+ "name": "indeterminate",
57
+ "type": "boolean",
58
+ "default": "false",
59
+ "description": "显示混合状态并设置 aria-checked=mixed;不会自行修改 modelValue。"
60
+ }
61
+ ],
62
+ "events": [
63
+ {
64
+ "name": "update:modelValue",
65
+ "type": "(value: boolean) => void",
66
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
67
+ },
68
+ {
69
+ "name": "change",
70
+ "type": "(value: boolean) => void",
71
+ "description": "用户提交选择或调整时发出当前值;直接从父组件赋值不会主动发出此事件。"
72
+ }
73
+ ],
74
+ "slots": [
75
+ {
76
+ "name": "default",
77
+ "type": "() => VNode[](无 slot props)",
78
+ "description": "替代可见 label 文字,保留控件的名称关联。"
79
+ }
80
+ ],
81
+ "methods": [],
82
+ "notes": [
83
+ "字段名称、帮助和错误文字只用于说明。直接操作控件;原生 name、autocomplete 等属性需按实际输入类型使用。"
84
+ ]
85
+ })
@@ -0,0 +1,79 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleColorPicker",
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": "\"#0071e3\"",
53
+ "description": "HEX 颜色字符串,默认 #0071e3。交互更新为小写的六位 #rrggbb;HEX 输入允许三位简写。"
54
+ },
55
+ {
56
+ "name": "showValue",
57
+ "type": "boolean",
58
+ "default": "true",
59
+ "description": "在颜色触发按钮旁显示大写 HEX 文字,不影响面板中的 HEX 编辑。"
60
+ }
61
+ ],
62
+ "events": [
63
+ {
64
+ "name": "update:modelValue",
65
+ "type": "(value: string) => void",
66
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
67
+ },
68
+ {
69
+ "name": "change",
70
+ "type": "(value: string) => void",
71
+ "description": "完成拖动、键盘操作、应用 HEX 或选择色样时发出;连续拖动的模型更新不一定发出 change。"
72
+ }
73
+ ],
74
+ "slots": [],
75
+ "methods": [],
76
+ "notes": [
77
+ "字段名称、帮助和错误文字只用于说明。直接操作控件;原生 name、autocomplete 等属性需按实际输入类型使用。"
78
+ ]
79
+ })
@@ -0,0 +1,26 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleContainer",
5
+ "source": "src/components/foundation.ts",
6
+ "props": [
7
+ {
8
+ "name": "width",
9
+ "type": "number | string",
10
+ "default": "1200",
11
+ "description": "内容最大宽度;数字按 px,字符串按 CSS 尺寸。实际宽度不会超过可用空间。"
12
+ }
13
+ ],
14
+ "events": [],
15
+ "slots": [
16
+ {
17
+ "name": "default",
18
+ "type": "() => VNode[](无 slot props)",
19
+ "description": "容器内的内容。"
20
+ }
21
+ ],
22
+ "methods": [],
23
+ "notes": [
24
+ "使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
25
+ ]
26
+ })
@@ -0,0 +1,104 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleDatePicker",
5
+ "source": "src/components/date-picker.ts",
6
+ "props": [
7
+ {
8
+ "name": "modelValue",
9
+ "type": "string",
10
+ "default": "\"\"",
11
+ "description": "规范化模型字符串:YYYY、YYYY-MM、YYYY-MM-DD、日期THH:mm[:ss] 或 HH:mm[:ss],由显示分段决定;清空为 \"\"。"
12
+ },
13
+ {
14
+ "name": "label",
15
+ "type": "string",
16
+ "default": "\"\"",
17
+ "description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
18
+ },
19
+ {
20
+ "name": "hint",
21
+ "type": "string",
22
+ "default": "\"\"",
23
+ "description": "字段帮助文字;error 非空时优先显示错误,帮助文字暂时隐藏。"
24
+ },
25
+ {
26
+ "name": "error",
27
+ "type": "string",
28
+ "default": "\"\"",
29
+ "description": "显示字段错误和错误样式,不会自行执行校验或阻止表单提交。"
30
+ },
31
+ {
32
+ "name": "disabled",
33
+ "type": "boolean",
34
+ "default": "false",
35
+ "description": "禁用控件的交互。选项自身的 disabled 仍然独立生效。"
36
+ },
37
+ {
38
+ "name": "loading",
39
+ "type": "boolean",
40
+ "default": "false",
41
+ "description": "显示忙碌状态;表单控件在加载时禁止编辑或选择。"
42
+ },
43
+ {
44
+ "name": "required",
45
+ "type": "boolean",
46
+ "default": "false",
47
+ "description": "为字段添加必填标记并传递必填约束;不会自动生成 error 文本。"
48
+ },
49
+ {
50
+ "name": "min",
51
+ "type": "string",
52
+ "default": "undefined",
53
+ "description": "最早允许的日期/时间字符串,与当前模型精度对应。"
54
+ },
55
+ {
56
+ "name": "max",
57
+ "type": "string",
58
+ "default": "undefined",
59
+ "description": "最晚允许的日期/时间字符串,与当前模型精度对应。"
60
+ },
61
+ {
62
+ "name": "format",
63
+ "type": "string",
64
+ "default": "undefined",
65
+ "description": "显示分段格式,例如 YYYY/MM/DD、YYYY/MM/DD HH:mm:ss 或 HH:mm。优先级高于 granularity 和 type,模型仍用规范化分隔符。"
66
+ },
67
+ {
68
+ "name": "granularity",
69
+ "type": "string",
70
+ "default": "undefined",
71
+ "description": "格式预设名称。内置 year、month、day、hour、minute、second、hm、hms、ym、ymd、ymdhm、ymdhms。显式 format 优先。"
72
+ },
73
+ {
74
+ "name": "type",
75
+ "type": "'date' | 'month' | 'datetime-local' | 'time'",
76
+ "default": "\"date\"",
77
+ "description": "未设置 format/granularity 时选择 date、month、datetime-local 或 time 的默认分段。"
78
+ },
79
+ {
80
+ "name": "motion",
81
+ "type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
82
+ "default": "\"inherit\"",
83
+ "description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
84
+ }
85
+ ],
86
+ "events": [
87
+ {
88
+ "name": "update:modelValue",
89
+ "type": "(value: string) => void",
90
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
91
+ },
92
+ {
93
+ "name": "change",
94
+ "type": "(value: string) => void",
95
+ "description": "用户提交选择或调整时发出当前值;直接从父组件赋值不会主动发出此事件。"
96
+ }
97
+ ],
98
+ "slots": [],
99
+ "methods": [],
100
+ "notes": [
101
+ "format > granularity > type。显示格式和模型格式分离,输入不会自动跳到下一段;不支持范围或 ISO week 选择。",
102
+ "字段名称、帮助和错误文字只用于说明。直接操作控件;原生 name、autocomplete 等属性需按实际输入类型使用。"
103
+ ]
104
+ })
@@ -0,0 +1,151 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleDialog",
5
+ "source": "src/components/overlays.ts",
6
+ "props": [
7
+ {
8
+ "name": "modelValue",
9
+ "type": "boolean",
10
+ "default": "false",
11
+ "description": "是否打开。使用 v-model 接收关闭操作的 false。"
12
+ },
13
+ {
14
+ "name": "title",
15
+ "type": "string",
16
+ "default": "\"\"",
17
+ "description": "标题文字。"
18
+ },
19
+ {
20
+ "name": "message",
21
+ "type": "string",
22
+ "default": "\"\"",
23
+ "description": "正文文字;提供 default 插槽时以插槽内容为准。"
24
+ },
25
+ {
26
+ "name": "ariaLabel",
27
+ "type": "string",
28
+ "default": "\"对话框\"",
29
+ "description": "没有 title 时用于对话框的可访问名称。"
30
+ },
31
+ {
32
+ "name": "persistent",
33
+ "type": "boolean",
34
+ "default": "false",
35
+ "description": "阻止 Escape 和背景点击关闭;显式关闭、确认和取消仍可使用。"
36
+ },
37
+ {
38
+ "name": "loading",
39
+ "type": "boolean",
40
+ "default": "false",
41
+ "description": "阻止所有交互关闭、确认和取消,显示忙碌状态。"
42
+ },
43
+ {
44
+ "name": "closeOnConfirm",
45
+ "type": "boolean",
46
+ "default": "true",
47
+ "description": "确认后自动关闭。异步保存时可设 false,由应用控制 loading 和 modelValue。"
48
+ },
49
+ {
50
+ "name": "confirmText",
51
+ "type": "string",
52
+ "default": "\"确定\"",
53
+ "description": "确认按钮文字,空字符串隐藏按钮。"
54
+ },
55
+ {
56
+ "name": "cancelText",
57
+ "type": "string",
58
+ "default": "\"取消\"",
59
+ "description": "取消按钮文字,空字符串隐藏按钮。"
60
+ },
61
+ {
62
+ "name": "showFooter",
63
+ "type": "boolean",
64
+ "default": "true",
65
+ "description": "显示默认操作区;自定义 footer 插槽始终可以显示。Dialog 默认 true,Drawer/Sheet 默认 false。"
66
+ },
67
+ {
68
+ "name": "closable",
69
+ "type": "boolean",
70
+ "default": "true",
71
+ "description": "显示关闭按钮。"
72
+ },
73
+ {
74
+ "name": "width",
75
+ "type": "string | number",
76
+ "default": "480",
77
+ "description": "宽度。数字按 px,字符串作为 CSS 尺寸;仍受可用空间约束。"
78
+ },
79
+ {
80
+ "name": "placement",
81
+ "type": "'left' | 'right' | 'bottom'",
82
+ "default": "\"right\"",
83
+ "description": "抽屉方向为 left、right、bottom;Sheet 默认 bottom。Dialog 不使用方向来改变其居中布局。"
84
+ },
85
+ {
86
+ "name": "tone",
87
+ "type": "string",
88
+ "default": "\"default\"",
89
+ "description": "语义色;danger 使用危险确认按钮。"
90
+ },
91
+ {
92
+ "name": "motion",
93
+ "type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
94
+ "default": "\"inherit\"",
95
+ "description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
96
+ }
97
+ ],
98
+ "events": [
99
+ {
100
+ "name": "update:modelValue",
101
+ "type": "(value: boolean) => void",
102
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
103
+ },
104
+ {
105
+ "name": "close",
106
+ "type": "(value: unknown, reason: 'escape' | 'backdrop' | 'cancel' | 'confirm' | 'close') => void",
107
+ "description": "交互关闭时发出结果和原因;确认 true,取消 false,直接关闭通常 undefined。外部直接设置 modelValue=false 不会主动发出 close。"
108
+ },
109
+ {
110
+ "name": "confirm",
111
+ "type": "(value: true) => void",
112
+ "description": "点击确认时触发;closeOnConfirm=true 时随后关闭。"
113
+ },
114
+ {
115
+ "name": "cancel",
116
+ "type": "(value: false) => void",
117
+ "description": "点击取消时触发,随后关闭。"
118
+ },
119
+ {
120
+ "name": "open",
121
+ "type": "() => void",
122
+ "description": "面板挂载并注册焦点与层级管理后触发。"
123
+ },
124
+ {
125
+ "name": "after-close",
126
+ "type": "() => void",
127
+ "description": "退出动效完成并释放层级状态后触发。"
128
+ }
129
+ ],
130
+ "slots": [
131
+ {
132
+ "name": "title",
133
+ "type": "() => VNode[](无 slot props)",
134
+ "description": "替代标题内容;仍应通过 title 或 ariaLabel 提供对话框名称。"
135
+ },
136
+ {
137
+ "name": "default",
138
+ "type": "({ close: (value?: unknown) => void }) => VNode[]",
139
+ "description": "对话框正文,替代 message;调用 close(value) 交回结果。"
140
+ },
141
+ {
142
+ "name": "footer",
143
+ "type": "({ close: (value?: unknown) => void, confirm: () => void, cancel: () => void }) => VNode[]",
144
+ "description": "替代默认按钮区;即使 showFooter=false 也会显示。"
145
+ }
146
+ ],
147
+ "methods": [],
148
+ "notes": [
149
+ "使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
150
+ ]
151
+ })