apptify 0.6.2 → 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.
Files changed (129) 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/content.d.ts +81 -20
  7. package/dist/components/forms.d.ts +2 -2
  8. package/dist/components/foundation.d.ts +133 -11
  9. package/dist/components/mobile-image-viewer.d.ts +35 -12
  10. package/dist/components/navibar.d.ts +2 -2
  11. package/dist/components/overlays.d.ts +10 -59
  12. package/dist/components/scrollbar.d.ts +88 -0
  13. package/dist/components/speed-dial.d.ts +157 -0
  14. package/dist/core/context.d.ts +11 -0
  15. package/dist/core/device.d.ts +2 -0
  16. package/dist/core/image-gallery-motion.d.ts +2 -1
  17. package/dist/core/image-motion.d.ts +1 -1
  18. package/dist/core/layers.d.ts +1 -0
  19. package/dist/core/motion-driver.d.ts +40 -0
  20. package/dist/core/motion.d.ts +1 -1
  21. package/dist/core/ripple.d.ts +16 -0
  22. package/dist/core/scroll-motion.d.ts +6 -0
  23. package/dist/core/scrollbar.d.ts +14 -0
  24. package/dist/core/speed-dial.d.ts +21 -0
  25. package/dist/index.d.ts +237 -26
  26. package/docs/COMPONENTS.md +10 -6
  27. package/package.json +5 -7
  28. package/templates/playground/README.md +1 -1
  29. package/templates/playground/package.json +1 -2
  30. package/templates/playground/source-snapshot.json +298 -65
  31. package/templates/playground/src/App.vue +1 -0
  32. package/templates/playground/src/ComponentDemo.vue +30 -21
  33. package/templates/playground/src/catalog.ts +70 -65
  34. package/templates/playground/src/components/ComponentIndex.vue +10 -14
  35. package/templates/playground/src/components/MasonryFeed.vue +52 -0
  36. package/templates/playground/src/components/UserMenu.vue +1 -1
  37. package/templates/playground/src/components/forbidden-paper-scene.vue +367 -0
  38. package/templates/playground/src/components/forbidden-paper-story.ts +233 -0
  39. package/templates/playground/src/editor/ComponentPlayground.vue +89 -0
  40. package/templates/playground/src/editor/ConfigurableEditor.vue +1 -1
  41. package/templates/playground/src/editor/apple-input-source.ts +1 -1
  42. package/templates/playground/src/editor/component-metadata.ts +72 -0
  43. package/templates/playground/src/editor/component-playground.ts +162 -0
  44. package/templates/playground/src/editor/contract.ts +1 -1
  45. package/templates/playground/src/editor/documents.ts +11 -2
  46. package/templates/playground/src/editor/handbook.ts +22 -0
  47. package/templates/playground/src/editor/handbooks/apple-accordion.ts +66 -0
  48. package/templates/playground/src/editor/handbooks/apple-action-sheet.ts +72 -0
  49. package/templates/playground/src/editor/handbooks/apple-alert.ts +67 -0
  50. package/templates/playground/src/editor/handbooks/apple-aside.ts +32 -0
  51. package/templates/playground/src/editor/handbooks/apple-auto-size.ts +32 -0
  52. package/templates/playground/src/editor/handbooks/apple-autocomplete.ts +114 -0
  53. package/templates/playground/src/editor/handbooks/apple-avatar-group.ts +50 -0
  54. package/templates/playground/src/editor/handbooks/apple-avatar.ts +56 -0
  55. package/templates/playground/src/editor/handbooks/apple-back-top.ts +62 -0
  56. package/templates/playground/src/editor/handbooks/apple-badge.ts +62 -0
  57. package/templates/playground/src/editor/handbooks/apple-breadcrumbs.ts +38 -0
  58. package/templates/playground/src/editor/handbooks/apple-button.ts +92 -0
  59. package/templates/playground/src/editor/handbooks/apple-card.ts +112 -0
  60. package/templates/playground/src/editor/handbooks/apple-cascader.ts +102 -0
  61. package/templates/playground/src/editor/handbooks/apple-checkbox.ts +85 -0
  62. package/templates/playground/src/editor/handbooks/apple-color-picker.ts +79 -0
  63. package/templates/playground/src/editor/handbooks/apple-container.ts +26 -0
  64. package/templates/playground/src/editor/handbooks/apple-date-picker.ts +104 -0
  65. package/templates/playground/src/editor/handbooks/apple-dialog.ts +151 -0
  66. package/templates/playground/src/editor/handbooks/apple-divider.ts +38 -0
  67. package/templates/playground/src/editor/handbooks/apple-drawer.ts +151 -0
  68. package/templates/playground/src/editor/handbooks/apple-empty.ts +43 -0
  69. package/templates/playground/src/editor/handbooks/apple-floating-group.ts +51 -0
  70. package/templates/playground/src/editor/handbooks/apple-form-field.ts +69 -0
  71. package/templates/playground/src/editor/handbooks/apple-form.ts +76 -0
  72. package/templates/playground/src/editor/handbooks/apple-grid.ts +32 -0
  73. package/templates/playground/src/editor/handbooks/apple-image.ts +122 -0
  74. package/templates/playground/src/editor/handbooks/apple-infinite-scroll.ts +73 -0
  75. package/templates/playground/src/editor/handbooks/apple-link.ts +68 -0
  76. package/templates/playground/src/editor/handbooks/apple-list.ts +67 -0
  77. package/templates/playground/src/editor/handbooks/apple-menu.ts +72 -0
  78. package/templates/playground/src/editor/handbooks/apple-navibar.ts +100 -0
  79. package/templates/playground/src/editor/handbooks/apple-otp-input.ts +108 -0
  80. package/templates/playground/src/editor/handbooks/apple-overlay-host.ts +13 -0
  81. package/templates/playground/src/editor/handbooks/apple-pagination.ts +61 -0
  82. package/templates/playground/src/editor/handbooks/apple-popover.ts +112 -0
  83. package/templates/playground/src/editor/handbooks/apple-progress.ts +56 -0
  84. package/templates/playground/src/editor/handbooks/apple-provider.ts +32 -0
  85. package/templates/playground/src/editor/handbooks/apple-pull-refresh.ts +61 -0
  86. package/templates/playground/src/editor/handbooks/apple-radio-group.ts +91 -0
  87. package/templates/playground/src/editor/handbooks/apple-rate.ts +97 -0
  88. package/templates/playground/src/editor/handbooks/apple-scroll-bar.ts +15 -0
  89. package/templates/playground/src/editor/handbooks/apple-search.ts +49 -0
  90. package/templates/playground/src/editor/handbooks/apple-segmented-control.ts +85 -0
  91. package/templates/playground/src/editor/handbooks/apple-select.ts +91 -0
  92. package/templates/playground/src/editor/handbooks/apple-sheet.ts +151 -0
  93. package/templates/playground/src/editor/handbooks/apple-skeleton.ts +74 -0
  94. package/templates/playground/src/editor/handbooks/apple-slider.ts +103 -0
  95. package/templates/playground/src/editor/handbooks/apple-snackbar.ts +89 -0
  96. package/templates/playground/src/editor/handbooks/apple-speed-dial-item.ts +16 -0
  97. package/templates/playground/src/editor/handbooks/apple-speed-dial.ts +13 -0
  98. package/templates/playground/src/editor/handbooks/apple-spinner.ts +38 -0
  99. package/templates/playground/src/editor/handbooks/apple-stack.ts +44 -0
  100. package/templates/playground/src/editor/handbooks/apple-statistic.ts +69 -0
  101. package/templates/playground/src/editor/handbooks/apple-stepper.ts +91 -0
  102. package/templates/playground/src/editor/handbooks/apple-steps.ts +61 -0
  103. package/templates/playground/src/editor/handbooks/apple-switch.ts +79 -0
  104. package/templates/playground/src/editor/handbooks/apple-tab-bar.ts +66 -0
  105. package/templates/playground/src/editor/handbooks/apple-table.ts +176 -0
  106. package/templates/playground/src/editor/handbooks/apple-tabs.ts +72 -0
  107. package/templates/playground/src/editor/handbooks/apple-tag.ts +56 -0
  108. package/templates/playground/src/editor/handbooks/apple-textarea.ts +109 -0
  109. package/templates/playground/src/editor/handbooks/apple-timeline.ts +44 -0
  110. package/templates/playground/src/editor/handbooks/apple-tooltip.ts +45 -0
  111. package/templates/playground/src/editor/handbooks/apple-transition.ts +44 -0
  112. package/templates/playground/src/editor/handbooks/apple-tree.ts +84 -0
  113. package/templates/playground/src/editor/handbooks/apple-upload.ts +126 -0
  114. package/templates/playground/src/editor/playground-examples.ts +105 -0
  115. package/templates/playground/src/images.ts +3 -0
  116. package/templates/playground/src/router/index.ts +19 -2
  117. package/templates/playground/src/style.css +4 -4
  118. package/templates/playground/src/views/403.vue +65 -0
  119. package/templates/playground/src/views/component-docs/[component].vue +11 -14
  120. package/templates/playground/src/views/components.vue +11 -41
  121. package/templates/playground/src/views/index.vue +3 -1
  122. package/templates/playground/src/views/settings.vue +5 -2
  123. package/tooling/create-playground.mjs +0 -0
  124. package/tooling/prepare-playground.mjs +3 -3
  125. package/tooling/test-playground-package.mjs +10 -0
  126. package/dist/components/gallery-scrollbar.d.ts +0 -46
  127. package/dist/core/desktop-image-enter.d.ts +0 -6
  128. package/dist/core/desktop-image-return.d.ts +0 -1
  129. package/templates/playground/src/components/DirectoryDialog.vue +0 -20
@@ -0,0 +1,74 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleSkeleton",
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": "variant",
15
+ "type": "'text' | 'avatar' | 'card' | 'list' | 'table' | 'image'",
16
+ "default": "\"text\"",
17
+ "description": "骨架类型:text、avatar、card、list、table、image。"
18
+ },
19
+ {
20
+ "name": "lines",
21
+ "type": "number",
22
+ "default": "3",
23
+ "description": "text 模式的行数,渲染时限制为 1–20。"
24
+ },
25
+ {
26
+ "name": "rows",
27
+ "type": "number",
28
+ "default": "3",
29
+ "description": "list/table 模式的行数,渲染时限制为 1–20。"
30
+ },
31
+ {
32
+ "name": "columns",
33
+ "type": "number",
34
+ "default": "4",
35
+ "description": "table 模式的列数,渲染时限制为 1–20。"
36
+ },
37
+ {
38
+ "name": "avatar",
39
+ "type": "boolean",
40
+ "default": "false",
41
+ "description": "text 模式在文字行旁显示头像占位;list 模式默认始终包含头像。"
42
+ },
43
+ {
44
+ "name": "width",
45
+ "type": "string | number",
46
+ "default": "undefined",
47
+ "description": "宽度。数字按 px,字符串作为 CSS 尺寸;仍受可用空间约束。"
48
+ },
49
+ {
50
+ "name": "height",
51
+ "type": "string | number",
52
+ "default": "undefined",
53
+ "description": "高度。数字按 px,字符串作为 CSS 尺寸。"
54
+ },
55
+ {
56
+ "name": "animated",
57
+ "type": "boolean",
58
+ "default": "true",
59
+ "description": "启用骨架动画,同时受动效设置约束。"
60
+ },
61
+ {
62
+ "name": "label",
63
+ "type": "string",
64
+ "default": "\"正在加载内容\"",
65
+ "description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
66
+ }
67
+ ],
68
+ "events": [],
69
+ "slots": [],
70
+ "methods": [],
71
+ "notes": [
72
+ "使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
73
+ ]
74
+ })
@@ -0,0 +1,103 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleSlider",
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": "number",
52
+ "default": "0",
53
+ "description": "单个数值,不支持双端范围数组。"
54
+ },
55
+ {
56
+ "name": "min",
57
+ "type": "number",
58
+ "default": "0",
59
+ "description": "原生 range 的最小值。"
60
+ },
61
+ {
62
+ "name": "max",
63
+ "type": "number",
64
+ "default": "100",
65
+ "description": "原生 range 的最大值。"
66
+ },
67
+ {
68
+ "name": "step",
69
+ "type": "number",
70
+ "default": "1",
71
+ "description": "每次调整的数值步长。"
72
+ },
73
+ {
74
+ "name": "showValue",
75
+ "type": "boolean",
76
+ "default": "true",
77
+ "description": "显示当前数值。"
78
+ },
79
+ {
80
+ "name": "formatValue",
81
+ "type": "(value: number) => string",
82
+ "default": "(value) => String(value)",
83
+ "description": "格式化函数 (value: number) => string,同时用于数值显示与 aria-valuetext。"
84
+ }
85
+ ],
86
+ "events": [
87
+ {
88
+ "name": "update:modelValue",
89
+ "type": "(value: number) => void",
90
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
91
+ },
92
+ {
93
+ "name": "change",
94
+ "type": "(value: number) => void",
95
+ "description": "原生 range 提交变化时发出数值,区别于连续 input 模型更新。"
96
+ }
97
+ ],
98
+ "slots": [],
99
+ "methods": [],
100
+ "notes": [
101
+ "字段名称、帮助和错误文字只用于说明。直接操作控件;原生 name、autocomplete 等属性需按实际输入类型使用。"
102
+ ]
103
+ })
@@ -0,0 +1,89 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleSnackbar",
5
+ "source": "src/components/overlays.ts",
6
+ "props": [
7
+ {
8
+ "name": "modelValue",
9
+ "type": "boolean",
10
+ "default": "true",
11
+ "description": "是否显示,默认 true。"
12
+ },
13
+ {
14
+ "name": "message",
15
+ "type": "string",
16
+ "default": "\"\"",
17
+ "description": "正文文字;提供 default 插槽时以插槽内容为准。"
18
+ },
19
+ {
20
+ "name": "title",
21
+ "type": "string",
22
+ "default": "\"\"",
23
+ "description": "标题文字。"
24
+ },
25
+ {
26
+ "name": "tone",
27
+ "type": "'default' | 'info' | 'success' | 'warning' | 'danger' | 'error'",
28
+ "default": "\"default\"",
29
+ "description": "视觉语义颜色,不会自行触发业务操作。"
30
+ },
31
+ {
32
+ "name": "duration",
33
+ "type": "number",
34
+ "default": "4000",
35
+ "description": "自动关闭等待时间,单位毫秒;0 或负数常驻。鼠标悬停或焦点进入会暂停计时,离开继续。"
36
+ },
37
+ {
38
+ "name": "action",
39
+ "type": "string",
40
+ "default": "\"\"",
41
+ "description": "非空时显示操作按钮,仅发出 action,不会自动关闭。"
42
+ },
43
+ {
44
+ "name": "closable",
45
+ "type": "boolean",
46
+ "default": "true",
47
+ "description": "显示关闭按钮,不影响 duration 自动关闭。"
48
+ },
49
+ {
50
+ "name": "motion",
51
+ "type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
52
+ "default": "\"inherit\"",
53
+ "description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
54
+ }
55
+ ],
56
+ "events": [
57
+ {
58
+ "name": "update:modelValue",
59
+ "type": "(value: boolean) => void",
60
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
61
+ },
62
+ {
63
+ "name": "close",
64
+ "type": "(value: undefined, reason: 'close' | 'timeout') => void",
65
+ "description": "手动关闭或计时结束时触发,首个参数为 undefined。"
66
+ },
67
+ {
68
+ "name": "action",
69
+ "type": "() => void",
70
+ "description": "点击操作按钮时触发,不会自动关闭。"
71
+ },
72
+ {
73
+ "name": "after-close",
74
+ "type": "() => void",
75
+ "description": "退出过渡完成后触发。"
76
+ }
77
+ ],
78
+ "slots": [
79
+ {
80
+ "name": "default",
81
+ "type": "() => VNode[](无 slot props)",
82
+ "description": "替代 title 与 message 的内容。"
83
+ }
84
+ ],
85
+ "methods": [],
86
+ "notes": [
87
+ "直接使用时位置由外层布局决定。操作按钮仅发出 action;duration 单位为毫秒。"
88
+ ]
89
+ })
@@ -0,0 +1,16 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ name: 'AppleSpeedDialItem', source: 'src/components/speed-dial.ts',
5
+ props: [
6
+ { name: 'label', type: 'string', default: 'undefined', required: true, description: '操作名称,图标按钮的可访问名称。' },
7
+ { name: 'icon', type: 'Component', default: 'undefined', description: '图标组件;有图标且未提供默认插槽时显示圆形图标按钮。' },
8
+ { name: 'disabled', type: 'boolean', default: 'false', description: '禁用此操作,保留按钮位置。' },
9
+ { name: 'visible', type: 'boolean', default: 'true', description: '控制操作的显示和注册;隐藏时不占位置。' },
10
+ { name: 'variant', type: "'primary' | 'secondary' | 'outline' | 'danger'", default: '"primary"', description: '操作按钮的外观类型。' },
11
+ ],
12
+ events: [{ name: 'click', type: '(event: MouseEvent) => void', description: '在全局宿主点击按钮时触发,处理函数仍由声明它的页面持有。' }],
13
+ slots: [{ name: 'default', type: '() => VNode[]', description: '按钮内容;省略时使用图标或 label。' }],
14
+ methods: [],
15
+ notes: ['按注册顺序插入 BackTop 与目录按钮之间,卸载和 KeepAlive 停用时自动注销。无需手动注册或父子通信。'],
16
+ })
@@ -0,0 +1,13 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ name: 'AppleSpeedDial', source: 'src/components/speed-dial.ts',
5
+ props: [
6
+ { name: 'backTop', type: 'boolean', default: 'true', description: '内置回到顶部按钮,始终排在操作项上方。' },
7
+ { name: 'target', type: 'string', default: '""', description: 'BackTop 监听的滚动容器 CSS 选择器,空字符串使用 window。' },
8
+ { name: 'threshold', type: 'number', default: '300', description: '滚动达到此距离后显示 BackTop,单位 px。' },
9
+ { name: 'label', type: 'string', default: '"快捷操作"', description: '浮动操作组的可访问名称。' },
10
+ ],
11
+ events: [], slots: [], methods: [],
12
+ notes: ['在 App.vue 的 AppleProvider 内放置一次;子页面使用 AppleSpeedDialItem 注册操作,不重复创建宿主。', '宽度不超过 900px 时自动收集 AppleTree 移动目录,目录按钮排最后。多个目录使用 AppleTabBar,弹窗保持稳定的高高度。'],
13
+ })
@@ -0,0 +1,38 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleSpinner",
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": "size",
15
+ "type": "number",
16
+ "default": "22",
17
+ "description": "尺寸,数字按 px。"
18
+ },
19
+ {
20
+ "name": "label",
21
+ "type": "string",
22
+ "default": "\"正在加载\"",
23
+ "description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
24
+ }
25
+ ],
26
+ "events": [],
27
+ "slots": [
28
+ {
29
+ "name": "default",
30
+ "type": "() => VNode[](无 slot props)",
31
+ "description": "加载图标旁的附加内容。"
32
+ }
33
+ ],
34
+ "methods": [],
35
+ "notes": [
36
+ "使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
37
+ ]
38
+ })
@@ -0,0 +1,44 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleStack",
5
+ "source": "src/components/foundation.ts",
6
+ "props": [
7
+ {
8
+ "name": "direction",
9
+ "type": "'row' | 'column'",
10
+ "default": "\"column\"",
11
+ "description": "Flex 主轴方向:row 或 column。"
12
+ },
13
+ {
14
+ "name": "gap",
15
+ "type": "string | number",
16
+ "default": "16",
17
+ "description": "子项间距。数字按 px;字符串按 CSS 长度处理。"
18
+ },
19
+ {
20
+ "name": "align",
21
+ "type": "string",
22
+ "default": "\"stretch\"",
23
+ "description": "CSS align-items 值,例如 stretch、center、flex-start、flex-end。"
24
+ },
25
+ {
26
+ "name": "wrap",
27
+ "type": "boolean",
28
+ "default": "true",
29
+ "description": "row 时允许换行;column 始终使用 nowrap。"
30
+ }
31
+ ],
32
+ "events": [],
33
+ "slots": [
34
+ {
35
+ "name": "default",
36
+ "type": "() => VNode[](无 slot props)",
37
+ "description": "参与 Flex 排列的子项。"
38
+ }
39
+ ],
40
+ "methods": [],
41
+ "notes": [
42
+ "使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
43
+ ]
44
+ })
@@ -0,0 +1,69 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleStatistic",
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": "value",
15
+ "type": "string | number",
16
+ "default": "0",
17
+ "description": "数值使用 locale 本地化并按 precision 保留小数;字符串原样显示。"
18
+ },
19
+ {
20
+ "name": "label",
21
+ "type": "string",
22
+ "default": "undefined",
23
+ "description": "必填的统计名称。",
24
+ "required": true
25
+ },
26
+ {
27
+ "name": "prefix",
28
+ "type": "string",
29
+ "default": "undefined",
30
+ "description": "数值前的文字。"
31
+ },
32
+ {
33
+ "name": "suffix",
34
+ "type": "string",
35
+ "default": "undefined",
36
+ "description": "数值后的文字。"
37
+ },
38
+ {
39
+ "name": "precision",
40
+ "type": "number",
41
+ "default": "0",
42
+ "description": "小数位数,实际限制为 0–20,仅影响数字 value。"
43
+ },
44
+ {
45
+ "name": "locale",
46
+ "type": "string",
47
+ "default": "\"zh-CN\"",
48
+ "description": "Intl 数字格式的地区标识,例如 zh-CN、en-US;使用有效地区标识。"
49
+ },
50
+ {
51
+ "name": "description",
52
+ "type": "string",
53
+ "default": "undefined",
54
+ "description": "补充说明文字。"
55
+ }
56
+ ],
57
+ "events": [],
58
+ "slots": [
59
+ {
60
+ "name": "default",
61
+ "type": "() => VNode[](无 slot props)",
62
+ "description": "数值和说明之后的附加内容。"
63
+ }
64
+ ],
65
+ "methods": [],
66
+ "notes": [
67
+ "使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
68
+ ]
69
+ })
@@ -0,0 +1,91 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleStepper",
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": "number",
52
+ "default": "0",
53
+ "description": "当前数值。加减和提交输入时约束在 min/max 内;输入过程中仅更新有效且范围内的值。"
54
+ },
55
+ {
56
+ "name": "min",
57
+ "type": "number",
58
+ "default": "-Infinity",
59
+ "description": "允许的最小数值。"
60
+ },
61
+ {
62
+ "name": "max",
63
+ "type": "number",
64
+ "default": "Infinity",
65
+ "description": "允许的最大数值。"
66
+ },
67
+ {
68
+ "name": "step",
69
+ "type": "number",
70
+ "default": "1",
71
+ "description": "加减按钮每次调整的步长,也传递给原生 number 输入。"
72
+ }
73
+ ],
74
+ "events": [
75
+ {
76
+ "name": "update:modelValue",
77
+ "type": "(value: number) => void",
78
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
79
+ },
80
+ {
81
+ "name": "change",
82
+ "type": "(value: number) => void",
83
+ "description": "用户提交选择或调整时发出当前值;直接从父组件赋值不会主动发出此事件。"
84
+ }
85
+ ],
86
+ "slots": [],
87
+ "methods": [],
88
+ "notes": [
89
+ "字段名称、帮助和错误文字只用于说明。直接操作控件;原生 name、autocomplete 等属性需按实际输入类型使用。"
90
+ ]
91
+ })
@@ -0,0 +1,61 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleSteps",
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": "number",
22
+ "default": "0",
23
+ "description": "从 0 开始的步骤位置,不是 item.value。"
24
+ },
25
+ {
26
+ "name": "clickable",
27
+ "type": "boolean",
28
+ "default": "false",
29
+ "description": "允许点击步骤并发出索引;否则只展示进度。"
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": "点击可用步骤时发出从 0 开始的位置,不是 item.value。"
54
+ }
55
+ ],
56
+ "slots": [],
57
+ "methods": [],
58
+ "notes": [
59
+ "使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
60
+ ]
61
+ })