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.
Files changed (130) 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 +299 -66
  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 +2 -2
  124. package/tooling/prepare-playground.mjs +3 -3
  125. package/tooling/test-create-apptify.mjs +3 -1
  126. package/tooling/test-playground-package.mjs +10 -0
  127. package/dist/components/gallery-scrollbar.d.ts +0 -46
  128. package/dist/core/desktop-image-enter.d.ts +0 -6
  129. package/dist/core/desktop-image-return.d.ts +0 -1
  130. package/templates/playground/src/components/DirectoryDialog.vue +0 -20
@@ -0,0 +1,79 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleSwitch",
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
+ "events": [
57
+ {
58
+ "name": "update:modelValue",
59
+ "type": "(value: boolean) => void",
60
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
61
+ },
62
+ {
63
+ "name": "change",
64
+ "type": "(value: boolean) => void",
65
+ "description": "用户提交选择或调整时发出当前值;直接从父组件赋值不会主动发出此事件。"
66
+ }
67
+ ],
68
+ "slots": [
69
+ {
70
+ "name": "default",
71
+ "type": "() => VNode[](无 slot props)",
72
+ "description": "替代左侧 label 文字。"
73
+ }
74
+ ],
75
+ "methods": [],
76
+ "notes": [
77
+ "字段名称、帮助和错误文字只用于说明。直接操作控件;原生 name、autocomplete 等属性需按实际输入类型使用。"
78
+ ]
79
+ })
@@ -0,0 +1,66 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleTabBar",
5
+ "source": "src/components/tabs.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。省略时内部管理;无匹配或匹配项禁用时回退到第一个可用项。"
24
+ },
25
+ {
26
+ "name": "label",
27
+ "type": "string",
28
+ "default": "\"内容分类\"",
29
+ "description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
30
+ },
31
+ {
32
+ "name": "disabled",
33
+ "type": "boolean",
34
+ "default": "false",
35
+ "description": "禁用控件的交互。选项自身的 disabled 仍然独立生效。"
36
+ }
37
+ ],
38
+ "events": [
39
+ {
40
+ "name": "update:modelValue",
41
+ "type": "(value: string | number) => void",
42
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
43
+ },
44
+ {
45
+ "name": "change",
46
+ "type": "(value: string | number) => void",
47
+ "description": "用户提交选择或调整时发出当前值;直接从父组件赋值不会主动发出此事件。"
48
+ }
49
+ ],
50
+ "slots": [
51
+ {
52
+ "name": "default",
53
+ "type": "({ item: AppleItem | undefined, value: string | number | undefined }) => VNode[]",
54
+ "description": "当前面板内容;优先级低于对应的 panel-${value}。"
55
+ },
56
+ {
57
+ "name": "panel-${value}",
58
+ "type": "({ item: AppleItem }) => VNode[]",
59
+ "description": "为具体页签 value 定义面板,例如 #panel-overview。"
60
+ }
61
+ ],
62
+ "methods": [],
63
+ "notes": [
64
+ "与 Tabs 使用相同页签与面板契约;样式固定为 bar,不提供 variant prop。"
65
+ ]
66
+ })
@@ -0,0 +1,176 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleTable",
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": "columns",
15
+ "type": "AppleColumn[]",
16
+ "default": "[]",
17
+ "description": "列数组:{ key, label, sortable?, align?: 'left'|'center'|'right', width?: number|string, minWidth?, maxWidth?, resizable? }。key 对应行字段;宽度数字按 px。"
18
+ },
19
+ {
20
+ "name": "rows",
21
+ "type": "Record<string, unknown>[]",
22
+ "default": "[]",
23
+ "description": "行对象数组;每行需提供稳定唯一的 rowKey。排序和分页在本地完成。"
24
+ },
25
+ {
26
+ "name": "rowKey",
27
+ "type": "string",
28
+ "default": "\"id\"",
29
+ "description": "行的唯一标识字段名称,默认 id。"
30
+ },
31
+ {
32
+ "name": "label",
33
+ "type": "string",
34
+ "default": "\"数据表格\"",
35
+ "description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
36
+ },
37
+ {
38
+ "name": "selectable",
39
+ "type": "boolean",
40
+ "default": "false",
41
+ "description": "显示行复选框及当前页全选框;全选只影响当前可见页。"
42
+ },
43
+ {
44
+ "name": "selected",
45
+ "type": "(string | number)[]",
46
+ "default": "undefined",
47
+ "description": "选中行的 rowKey 值数组,可用 v-model:selected;省略时内部管理。"
48
+ },
49
+ {
50
+ "name": "disabled",
51
+ "type": "boolean",
52
+ "default": "false",
53
+ "description": "禁止排序、选择、翻页、列宽调整及 row-click。"
54
+ },
55
+ {
56
+ "name": "sortBy",
57
+ "type": "string",
58
+ "default": "undefined",
59
+ "description": "排序字段名,可用 v-model:sort-by;省略时使用内部排序状态。"
60
+ },
61
+ {
62
+ "name": "sortDirection",
63
+ "type": "'asc' | 'desc'",
64
+ "default": "undefined",
65
+ "description": "asc 或 desc,可用 v-model:sort-direction;省略时内部初始方向为 asc。"
66
+ },
67
+ {
68
+ "name": "page",
69
+ "type": "number",
70
+ "default": "undefined",
71
+ "description": "从 1 开始的当前页,可用 v-model:page;省略时内部初始为 1。"
72
+ },
73
+ {
74
+ "name": "pageSize",
75
+ "type": "number",
76
+ "default": "0",
77
+ "description": "每页行数,0 禁用分页;总条目数使用 rows.length。"
78
+ },
79
+ {
80
+ "name": "loading",
81
+ "type": "boolean",
82
+ "default": "false",
83
+ "description": "设置 aria-busy,空表格时显示加载文字;不会阻止排序、选择或行点击。"
84
+ },
85
+ {
86
+ "name": "emptyText",
87
+ "type": "string",
88
+ "default": "\"暂无数据\"",
89
+ "description": "没有行且不在加载时的文字;empty 插槽可以覆盖。"
90
+ },
91
+ {
92
+ "name": "virtual",
93
+ "type": "boolean",
94
+ "default": "false",
95
+ "description": "基于固定行高的虚拟滚动;配合分页时只虚拟化当前页。"
96
+ },
97
+ {
98
+ "name": "height",
99
+ "type": "number",
100
+ "default": "360",
101
+ "description": "virtual 模式的滚动视口高度,单位 px,实际至少 96。"
102
+ },
103
+ {
104
+ "name": "rowHeight",
105
+ "type": "number",
106
+ "default": "48",
107
+ "description": "虚拟行的固定高度,单位 px,实际至少 28;不支持自动测量可变行高。"
108
+ },
109
+ {
110
+ "name": "overscan",
111
+ "type": "number",
112
+ "default": "5",
113
+ "description": "虚拟视口前后额外渲染的行数,实际至少 0。"
114
+ },
115
+ {
116
+ "name": "resizable",
117
+ "type": "boolean",
118
+ "default": "true",
119
+ "description": "允许拖动或键盘调整列宽;列上 resizable=false 可单独关闭。"
120
+ }
121
+ ],
122
+ "events": [
123
+ {
124
+ "name": "update:selected",
125
+ "type": "(value: (string | number)[]) => void",
126
+ "description": "交互更新 selected 时发出新值;可使用对应的命名 v-model 接收。"
127
+ },
128
+ {
129
+ "name": "update:sortBy",
130
+ "type": "(value: string) => void",
131
+ "description": "交互更新 sortBy 时发出新值;可使用对应的命名 v-model 接收。"
132
+ },
133
+ {
134
+ "name": "update:sortDirection",
135
+ "type": "(value: 'asc' | 'desc') => void",
136
+ "description": "交互更新 sortDirection 时发出新值;可使用对应的命名 v-model 接收。"
137
+ },
138
+ {
139
+ "name": "sort",
140
+ "type": "(sort: { key: string; direction: 'asc' | 'desc' }) => void",
141
+ "description": "点击可排序列时,在 sortBy/sortDirection 更新事件后发出排序信息。"
142
+ },
143
+ {
144
+ "name": "update:page",
145
+ "type": "(value: number) => void",
146
+ "description": "交互更新 page 时发出新值;可使用对应的命名 v-model 接收。"
147
+ },
148
+ {
149
+ "name": "row-click",
150
+ "type": "(row: Record<string, unknown>) => void",
151
+ "description": "点击数据行时发出该行;复选框操作不会冒泡触发此事件。"
152
+ },
153
+ {
154
+ "name": "column-resize",
155
+ "type": "(column: { key: string; width: number }) => void",
156
+ "description": "拖动或键盘调整列宽时发出列 key 和约束后的像素宽度。"
157
+ }
158
+ ],
159
+ "slots": [
160
+ {
161
+ "name": "cell-${key}",
162
+ "type": "({ row: Record<string, unknown>, value: unknown, index: number }) => VNode[]",
163
+ "description": "替代 key 对应列的单元格,例如 #cell-name。index 为当前排序/分页后可见页内的行索引。"
164
+ },
165
+ {
166
+ "name": "empty",
167
+ "type": "() => VNode[](无 slot props)",
168
+ "description": "替代空表格内容,包括默认加载或空文字。"
169
+ }
170
+ ],
171
+ "methods": [],
172
+ "notes": [
173
+ "rows 使用稳定唯一 rowKey。虚拟滚动使用固定行高;与分页同时启用时只虚拟化当前页。",
174
+ "排序、选择、分页可受控也可内部管理。列宽可通过拖动或方向键调整;此组件不提供服务器分页协议。"
175
+ ]
176
+ })
@@ -0,0 +1,72 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleTabs",
5
+ "source": "src/components/tabs.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。省略时内部管理;无匹配或匹配项禁用时回退到第一个可用项。"
24
+ },
25
+ {
26
+ "name": "label",
27
+ "type": "string",
28
+ "default": "\"内容分类\"",
29
+ "description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
30
+ },
31
+ {
32
+ "name": "disabled",
33
+ "type": "boolean",
34
+ "default": "false",
35
+ "description": "禁用控件的交互。选项自身的 disabled 仍然独立生效。"
36
+ },
37
+ {
38
+ "name": "variant",
39
+ "type": "'underline' | 'bar'",
40
+ "default": "\"underline\"",
41
+ "description": "underline 为下划线样式;bar 为页签栏样式。"
42
+ }
43
+ ],
44
+ "events": [
45
+ {
46
+ "name": "update:modelValue",
47
+ "type": "(value: string | number) => void",
48
+ "description": "交互更新时发出新模型值;可使用 v-model 接收。"
49
+ },
50
+ {
51
+ "name": "change",
52
+ "type": "(value: string | number) => void",
53
+ "description": "用户提交选择或调整时发出当前值;直接从父组件赋值不会主动发出此事件。"
54
+ }
55
+ ],
56
+ "slots": [
57
+ {
58
+ "name": "default",
59
+ "type": "({ item: AppleItem | undefined, value: string | number | undefined }) => VNode[]",
60
+ "description": "当前面板内容;优先级低于对应的 panel-${value}。"
61
+ },
62
+ {
63
+ "name": "panel-${value}",
64
+ "type": "({ item: AppleItem }) => VNode[]",
65
+ "description": "为具体页签 value 定义面板,例如 #panel-overview。"
66
+ }
67
+ ],
68
+ "methods": [],
69
+ "notes": [
70
+ "支持方向键、Home/End,跳过禁用项。省略 v-model 时内部管理,不会自动请求面板内容。"
71
+ ]
72
+ })
@@ -0,0 +1,56 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleTag",
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": "tone",
15
+ "type": "string",
16
+ "default": "\"neutral\"",
17
+ "description": "视觉语义颜色,不会自行触发业务操作。"
18
+ },
19
+ {
20
+ "name": "closable",
21
+ "type": "boolean",
22
+ "default": "false",
23
+ "description": "显示移除按钮;点击仅发出 close,不会自行移除标签。"
24
+ },
25
+ {
26
+ "name": "disabled",
27
+ "type": "boolean",
28
+ "default": "false",
29
+ "description": "禁用控件的交互。选项自身的 disabled 仍然独立生效。"
30
+ },
31
+ {
32
+ "name": "label",
33
+ "type": "string",
34
+ "default": "undefined",
35
+ "description": "默认文字及移除按钮的名称;default 插槽可替换文字。"
36
+ }
37
+ ],
38
+ "events": [
39
+ {
40
+ "name": "close",
41
+ "type": "(event: Event) => void",
42
+ "description": "点击移除按钮时触发;由父组件决定删除或隐藏标签。"
43
+ }
44
+ ],
45
+ "slots": [
46
+ {
47
+ "name": "default",
48
+ "type": "() => VNode[](无 slot props)",
49
+ "description": "标签文字,优先于 label。"
50
+ }
51
+ ],
52
+ "methods": [],
53
+ "notes": [
54
+ "使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
55
+ ]
56
+ })
@@ -0,0 +1,109 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleTextarea",
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": "多行文本,输入后仍返回字符串。"
54
+ },
55
+ {
56
+ "name": "placeholder",
57
+ "type": "string",
58
+ "default": "undefined",
59
+ "description": "尚未填写或选择时显示的占位文字,不能替代字段名称。"
60
+ },
61
+ {
62
+ "name": "rows",
63
+ "type": "number",
64
+ "default": "4",
65
+ "description": "原生 textarea 的可见行数。"
66
+ },
67
+ {
68
+ "name": "maxlength",
69
+ "type": "number",
70
+ "default": "undefined",
71
+ "description": "原生最大字符数。省略时不限制长度。"
72
+ },
73
+ {
74
+ "name": "counter",
75
+ "type": "boolean",
76
+ "default": "false",
77
+ "description": "显示字符数;同时设置 maxlength 时显示“当前数 / 上限”。"
78
+ },
79
+ {
80
+ "name": "resize",
81
+ "type": "boolean",
82
+ "default": "true",
83
+ "description": "允许用户纵向调整大小;false 禁止手动缩放。"
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": "原生 change 时发出文字,通常在修改后移出焦点时触发。"
96
+ }
97
+ ],
98
+ "slots": [],
99
+ "methods": [
100
+ {
101
+ "name": "focus()",
102
+ "type": "() => void",
103
+ "description": "通过组件 ref 将焦点移到输入或选择触发元素;禁用时无法聚焦。"
104
+ }
105
+ ],
106
+ "notes": [
107
+ "字段名称、帮助和错误文字只用于说明。直接操作控件;原生 name、autocomplete 等属性需按实际输入类型使用。"
108
+ ]
109
+ })
@@ -0,0 +1,44 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleTimeline",
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": "AppleTimelineItem[]",
16
+ "default": "[]",
17
+ "description": "时间项:{ label: string; value: string | number; disabled?: boolean; description?: string; href?: string; content?: string } & { time?: string; tone?: 'default'|'success'|'danger' }。"
18
+ },
19
+ {
20
+ "name": "orientation",
21
+ "type": "'horizontal' | 'vertical'",
22
+ "default": "\"vertical\"",
23
+ "description": "时间线排列方向:vertical 或 horizontal。"
24
+ },
25
+ {
26
+ "name": "label",
27
+ "type": "string",
28
+ "default": "\"时间线\"",
29
+ "description": "控件名称或区域的可访问名称。无可见名称时应提供 aria-label。"
30
+ }
31
+ ],
32
+ "events": [],
33
+ "slots": [
34
+ {
35
+ "name": "item",
36
+ "type": "({ item: AppleTimelineItem }) => VNode[]",
37
+ "description": "替代 description 部分;标题和 time 仍保留。"
38
+ }
39
+ ],
40
+ "methods": [],
41
+ "notes": [
42
+ "使用真实内容与可访问名称;交互控件可通过 Tab 和原生键盘方式操作,动效遵循外层偏好。"
43
+ ]
44
+ })
@@ -0,0 +1,45 @@
1
+ import { defineHandbook } from '../handbook'
2
+
3
+ export default defineHandbook({
4
+ "name": "AppleTooltip",
5
+ "source": "src/components/overlays.ts",
6
+ "props": [
7
+ {
8
+ "name": "text",
9
+ "type": "string",
10
+ "default": "undefined",
11
+ "description": "必填的提示文字,用于面板内容和可访问名称。",
12
+ "required": true
13
+ },
14
+ {
15
+ "name": "placement",
16
+ "type": "'top' | 'bottom' | 'left' | 'right'",
17
+ "default": "\"top\"",
18
+ "description": "期望提示方向:top、bottom、left、right;自动避让视口边缘。"
19
+ },
20
+ {
21
+ "name": "disabled",
22
+ "type": "boolean",
23
+ "default": "false",
24
+ "description": "禁用提示面板,不会禁用 default 插槽内的触发元素。"
25
+ },
26
+ {
27
+ "name": "motion",
28
+ "type": "'inherit' | 'auto' | 'full' | 'reduced' | 'none'",
29
+ "default": "\"inherit\"",
30
+ "description": "局部动效偏好。inherit 跟随外层;全局与系统的减少动效设置仍是上限。"
31
+ }
32
+ ],
33
+ "events": [],
34
+ "slots": [
35
+ {
36
+ "name": "default",
37
+ "type": "({ props: Record<string, unknown>, open: () => void, close: () => void, isOpen: boolean }) => VNode[]",
38
+ "description": "作为底层 Popover 的 activator 透传,触发元素可绑定 props。"
39
+ }
40
+ ],
41
+ "methods": [],
42
+ "notes": [
43
+ "仅用于短文字提示,默认插槽透传 Popover activator 参数;不应用 tooltip 承载需要焦点操作的表单。"
44
+ ]
45
+ })