@apexhub/apex-ui-react 0.0.0-stage → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -2
  3. package/dist/en_US.d.ts +191 -0
  4. package/dist/index.cjs +40727 -0
  5. package/dist/index.d.ts +6873 -0
  6. package/dist/index.mjs +40711 -0
  7. package/dist/llm/alert.tokens.txt +44 -0
  8. package/dist/llm/alert.txt +167 -0
  9. package/dist/llm/apex-provider.txt +369 -0
  10. package/dist/llm/auto-complete.tokens.txt +77 -0
  11. package/dist/llm/auto-complete.txt +373 -0
  12. package/dist/llm/avatar.tokens.txt +38 -0
  13. package/dist/llm/avatar.txt +199 -0
  14. package/dist/llm/breadcrumb.tokens.txt +143 -0
  15. package/dist/llm/breadcrumb.txt +251 -0
  16. package/dist/llm/button.tokens.txt +470 -0
  17. package/dist/llm/button.txt +270 -0
  18. package/dist/llm/card.tokens.txt +29 -0
  19. package/dist/llm/card.txt +118 -0
  20. package/dist/llm/cascader.tokens.txt +261 -0
  21. package/dist/llm/cascader.txt +917 -0
  22. package/dist/llm/checkbox.tokens.txt +36 -0
  23. package/dist/llm/checkbox.txt +343 -0
  24. package/dist/llm/collapse.tokens.txt +84 -0
  25. package/dist/llm/collapse.txt +330 -0
  26. package/dist/llm/date-picker.tokens.txt +171 -0
  27. package/dist/llm/date-picker.txt +428 -0
  28. package/dist/llm/divider.tokens.txt +22 -0
  29. package/dist/llm/divider.txt +161 -0
  30. package/dist/llm/drawer.tokens.txt +71 -0
  31. package/dist/llm/drawer.txt +369 -0
  32. package/dist/llm/dropdown.tokens.txt +59 -0
  33. package/dist/llm/dropdown.txt +420 -0
  34. package/dist/llm/form.tokens.txt +28 -0
  35. package/dist/llm/form.txt +341 -0
  36. package/dist/llm/grid.txt +419 -0
  37. package/dist/llm/image.tokens.txt +28 -0
  38. package/dist/llm/image.txt +428 -0
  39. package/dist/llm/input-number.tokens.txt +159 -0
  40. package/dist/llm/input-number.txt +491 -0
  41. package/dist/llm/input.tokens.txt +136 -0
  42. package/dist/llm/input.txt +424 -0
  43. package/dist/llm/layout.tokens.txt +29 -0
  44. package/dist/llm/layout.txt +298 -0
  45. package/dist/llm/menu.tokens.txt +100 -0
  46. package/dist/llm/menu.txt +687 -0
  47. package/dist/llm/message.tokens.txt +25 -0
  48. package/dist/llm/message.txt +301 -0
  49. package/dist/llm/modal.tokens.txt +96 -0
  50. package/dist/llm/modal.txt +584 -0
  51. package/dist/llm/notification.tokens.txt +79 -0
  52. package/dist/llm/notification.txt +383 -0
  53. package/dist/llm/pagination.tokens.txt +35 -0
  54. package/dist/llm/pagination.txt +217 -0
  55. package/dist/llm/popover.tokens.txt +18 -0
  56. package/dist/llm/popover.txt +233 -0
  57. package/dist/llm/progress.tokens.txt +83 -0
  58. package/dist/llm/progress.txt +279 -0
  59. package/dist/llm/radio.tokens.txt +26 -0
  60. package/dist/llm/radio.txt +385 -0
  61. package/dist/llm/rate.tokens.txt +20 -0
  62. package/dist/llm/rate.txt +241 -0
  63. package/dist/llm/select.tokens.txt +160 -0
  64. package/dist/llm/select.txt +831 -0
  65. package/dist/llm/skeleton.tokens.txt +15 -0
  66. package/dist/llm/skeleton.txt +275 -0
  67. package/dist/llm/spin.tokens.txt +21 -0
  68. package/dist/llm/spin.txt +294 -0
  69. package/dist/llm/steps.tokens.txt +30 -0
  70. package/dist/llm/steps.txt +300 -0
  71. package/dist/llm/switch.tokens.txt +38 -0
  72. package/dist/llm/switch.txt +216 -0
  73. package/dist/llm/table.tokens.txt +94 -0
  74. package/dist/llm/table.txt +1049 -0
  75. package/dist/llm/tabs.tokens.txt +78 -0
  76. package/dist/llm/tabs.txt +306 -0
  77. package/dist/llm/tag.tokens.txt +75 -0
  78. package/dist/llm/tag.txt +304 -0
  79. package/dist/llm/tooltip.tokens.txt +22 -0
  80. package/dist/llm/tooltip.txt +304 -0
  81. package/dist/llm/tree-select.tokens.txt +175 -0
  82. package/dist/llm/tree-select.txt +772 -0
  83. package/dist/llm/tree.tokens.txt +34 -0
  84. package/dist/llm/tree.txt +501 -0
  85. package/dist/llm/typography.tokens.txt +60 -0
  86. package/dist/llm/typography.txt +413 -0
  87. package/dist/llm/upload.tokens.txt +205 -0
  88. package/dist/llm/upload.txt +708 -0
  89. package/dist/llms-full.txt +16826 -0
  90. package/dist/llms-theme.txt +32 -0
  91. package/dist/llms.txt +59 -0
  92. package/dist/locale/en_US.cjs +160 -0
  93. package/dist/locale/en_US.d.ts +4 -0
  94. package/dist/locale/en_US.mjs +161 -0
  95. package/dist/locale/zh_CN.cjs +160 -0
  96. package/dist/locale/zh_CN.d.ts +4 -0
  97. package/dist/locale/zh_CN.mjs +161 -0
  98. package/dist/style.css +20095 -0
  99. package/dist/zh_CN.d.ts +191 -0
  100. package/llms-full.txt +16826 -0
  101. package/llms-theme.txt +32 -0
  102. package/llms.txt +59 -0
  103. package/package.json +118 -3
  104. package/src/alert/llm.txt +167 -0
  105. package/src/alert/tokens.txt +44 -0
  106. package/src/apex-provider/llm.txt +369 -0
  107. package/src/auto-complete/llm.txt +373 -0
  108. package/src/auto-complete/tokens.txt +77 -0
  109. package/src/avatar/llm.txt +199 -0
  110. package/src/avatar/tokens.txt +38 -0
  111. package/src/breadcrumb/llm.txt +251 -0
  112. package/src/breadcrumb/tokens.txt +143 -0
  113. package/src/button/llm.txt +270 -0
  114. package/src/button/tokens.txt +470 -0
  115. package/src/card/llm.txt +118 -0
  116. package/src/card/tokens.txt +29 -0
  117. package/src/cascader/llm.txt +917 -0
  118. package/src/cascader/tokens.txt +261 -0
  119. package/src/checkbox/llm.txt +343 -0
  120. package/src/checkbox/tokens.txt +36 -0
  121. package/src/collapse/llm.txt +330 -0
  122. package/src/collapse/tokens.txt +84 -0
  123. package/src/date-picker/llm.txt +428 -0
  124. package/src/date-picker/tokens.txt +171 -0
  125. package/src/divider/llm.txt +161 -0
  126. package/src/divider/tokens.txt +22 -0
  127. package/src/drawer/llm.txt +369 -0
  128. package/src/drawer/tokens.txt +71 -0
  129. package/src/dropdown/llm.txt +420 -0
  130. package/src/dropdown/tokens.txt +59 -0
  131. package/src/form/llm.txt +341 -0
  132. package/src/form/tokens.txt +28 -0
  133. package/src/grid/llm.txt +419 -0
  134. package/src/image/llm.txt +428 -0
  135. package/src/image/tokens.txt +28 -0
  136. package/src/input/llm.txt +424 -0
  137. package/src/input/tokens.txt +136 -0
  138. package/src/input-number/llm.txt +491 -0
  139. package/src/input-number/tokens.txt +159 -0
  140. package/src/layout/llm.txt +298 -0
  141. package/src/layout/tokens.txt +29 -0
  142. package/src/menu/llm.txt +687 -0
  143. package/src/menu/tokens.txt +100 -0
  144. package/src/message/llm.txt +301 -0
  145. package/src/message/tokens.txt +25 -0
  146. package/src/modal/llm.txt +584 -0
  147. package/src/modal/tokens.txt +96 -0
  148. package/src/notification/llm.txt +383 -0
  149. package/src/notification/tokens.txt +79 -0
  150. package/src/pagination/llm.txt +217 -0
  151. package/src/pagination/tokens.txt +35 -0
  152. package/src/popover/llm.txt +233 -0
  153. package/src/popover/tokens.txt +18 -0
  154. package/src/progress/llm.txt +279 -0
  155. package/src/progress/tokens.txt +83 -0
  156. package/src/radio/llm.txt +385 -0
  157. package/src/radio/tokens.txt +26 -0
  158. package/src/rate/llm.txt +241 -0
  159. package/src/rate/tokens.txt +20 -0
  160. package/src/select/llm.txt +831 -0
  161. package/src/select/tokens.txt +160 -0
  162. package/src/skeleton/llm.txt +275 -0
  163. package/src/skeleton/tokens.txt +15 -0
  164. package/src/spin/llm.txt +294 -0
  165. package/src/spin/tokens.txt +21 -0
  166. package/src/steps/llm.txt +300 -0
  167. package/src/steps/tokens.txt +30 -0
  168. package/src/switch/llm.txt +216 -0
  169. package/src/switch/tokens.txt +38 -0
  170. package/src/table/llm.txt +1049 -0
  171. package/src/table/tokens.txt +94 -0
  172. package/src/tabs/llm.txt +306 -0
  173. package/src/tabs/tokens.txt +78 -0
  174. package/src/tag/llm.txt +304 -0
  175. package/src/tag/tokens.txt +75 -0
  176. package/src/tooltip/llm.txt +304 -0
  177. package/src/tooltip/tokens.txt +22 -0
  178. package/src/tree/llm.txt +501 -0
  179. package/src/tree/tokens.txt +34 -0
  180. package/src/tree-select/llm.txt +772 -0
  181. package/src/tree-select/tokens.txt +175 -0
  182. package/src/typography/llm.txt +413 -0
  183. package/src/typography/tokens.txt +60 -0
  184. package/src/upload/llm.txt +708 -0
  185. package/src/upload/tokens.txt +205 -0
@@ -0,0 +1,100 @@
1
+ # Menu Token 明细
2
+
3
+ 包:`@apexhub/apex-ui-react`;版本:`1.2.2`(当前源码快照)。
4
+
5
+ 按需读取:[组件用法](./llm.txt) · [主题与覆盖规则](../../llms-theme.txt)。
6
+
7
+ 以下组件变量在设计 Token 源中已定义,并被组件或其共享样式使用;不包含仅在实现中声明的临时变量。用途来自实际 CSS 属性,不是对外新增的 Props。
8
+
9
+ 定义值依赖所列尺寸、变体、状态和媒体作用域;Alias 引用还会随 light/dark 主题改变。它们不是统一默认值或最终计算值。作用域用于解释定义位置,不代表内部选择器是稳定的定制 API。
10
+
11
+ | Token | 用途(CSS 属性) | 定义值 | 定义作用域 |
12
+ | --- | --- | --- | --- |
13
+ | `--menu-button-fill-active` | `background-color` | `var(--apex-fill-neutral-quaternary)` | `.apex-menu-button.apex-primary-menu-button` |
14
+ | `--menu-button-fill-active` | `background-color` | `var(--apex-fill-neutral-quaternary)` | `.apex-menu-button.apex-secondary-menu-button` |
15
+ | `--menu-button-fill-default` | `background-color` | `var(--apex-fill-neutral-secondary)` | `.apex-menu-button.apex-primary-menu-button` |
16
+ | `--menu-button-fill-default` | `background-color` | `var(--apex-fill-neutral-secondary)` | `.apex-menu-button.apex-secondary-menu-button` |
17
+ | `--menu-button-fill-disabled` | `background-color` | `var(--apex-fill-neutral-primary)` | `.apex-menu-button.apex-primary-menu-button` |
18
+ | `--menu-button-fill-disabled` | `background-color` | `var(--apex-fill-neutral-primary)` | `.apex-menu-button.apex-secondary-menu-button` |
19
+ | `--menu-button-fill-hover` | `background-color` | `var(--apex-fill-neutral-tertiary)` | `.apex-menu-button.apex-primary-menu-button` |
20
+ | `--menu-button-fill-hover` | `background-color` | `var(--apex-fill-neutral-tertiary)` | `.apex-menu-button.apex-secondary-menu-button` |
21
+ | `--menu-button-fill-loading` | `background-color` | `var(--apex-fill-neutral-tertiary)` | `.apex-menu-button.apex-primary-menu-button` |
22
+ | `--menu-button-fill-loading` | `background-color` | `var(--apex-fill-neutral-tertiary)` | `.apex-menu-button.apex-secondary-menu-button` |
23
+ | `--menu-button-fill-selected` | `background-color` | `var(--apex-fill-neutral-secondary)` | `.apex-menu-button.apex-primary-menu-button` |
24
+ | `--menu-button-fill-selected` | `background-color` | `var(--apex-fill-brand-primary)` | `.apex-menu-button.apex-secondary-menu-button` |
25
+ | `--menu-button-icon-active` | `color` | `var(--apex-icon-neutral-tertiary)` | `.apex-menu-button.apex-primary-menu-button` |
26
+ | `--menu-button-icon-active` | `color` | `var(--apex-icon-neutral-primary)` | `.apex-menu-button.apex-secondary-menu-button` |
27
+ | `--menu-button-icon-default` | `color` | `var(--apex-icon-neutral-secondary)` | `.apex-menu-button.apex-primary-menu-button` |
28
+ | `--menu-button-icon-default` | `color` | `var(--apex-icon-neutral-secondary)` | `.apex-menu-button.apex-secondary-menu-button` |
29
+ | `--menu-button-icon-disabled` | `color` | `var(--apex-icon-neutral-disabled)` | `.apex-menu-button.apex-primary-menu-button` |
30
+ | `--menu-button-icon-disabled` | `color` | `var(--apex-icon-neutral-disabled)` | `.apex-menu-button.apex-secondary-menu-button` |
31
+ | `--menu-button-icon-hover` | `color` | `var(--apex-icon-neutral-primary)` | `.apex-menu-button.apex-primary-menu-button` |
32
+ | `--menu-button-icon-hover` | `color` | `var(--apex-icon-neutral-primary)` | `.apex-menu-button.apex-secondary-menu-button` |
33
+ | `--menu-button-icon-icon` | `font-size`、`height`、`width` | `var(--apex-icon-24)` | `.apex-menu-button.apex-icon-menu-button` |
34
+ | `--menu-button-icon-icon` | `font-size`、`height`、`width` | `var(--apex-icon-16)` | `.apex-menu-button.apex-primary-menu-button` |
35
+ | `--menu-button-icon-icon` | `font-size`、`height`、`width` | `var(--apex-icon-16)` | `.apex-menu-button.apex-secondary-menu-button` |
36
+ | `--menu-button-icon-loading` | `color` | `var(--apex-icon-neutral-disabled)` | `.apex-menu-button.apex-primary-menu-button` |
37
+ | `--menu-button-icon-loading` | `color` | `var(--apex-icon-neutral-disabled)` | `.apex-menu-button.apex-secondary-menu-button` |
38
+ | `--menu-button-icon-selected` | `color` | `var(--apex-icon-brand-primary)` | `.apex-menu-button.apex-primary-menu-button` |
39
+ | `--menu-button-icon-selected` | `color` | `var(--apex-text-neutral-primary)` | `.apex-menu-button.apex-secondary-menu-button` |
40
+ | `--menu-button-radius-radius` | `border-radius` | `var(--apex-radius-8)` | `.apex-menu-button.apex-icon-menu-button` |
41
+ | `--menu-button-radius-radius` | `border-radius` | `var(--apex-radius-8)` | `.apex-menu-button.apex-primary-menu-button` |
42
+ | `--menu-button-radius-radius` | `border-radius` | `var(--apex-radius-8)` | `.apex-menu-button.apex-secondary-menu-button` |
43
+ | `--menu-button-spacing-gap` | `gap` | `var(--apex-spacing-4)` | `.apex-menu-button.apex-primary-menu-button` |
44
+ | `--menu-button-spacing-gap` | `gap` | `var(--apex-spacing-4)` | `.apex-menu-button.apex-secondary-menu-button` |
45
+ | `--menu-button-spacing-height` | `height`、`width` | `var(--apex-size-32)` | `.apex-menu-button.apex-icon-menu-button` |
46
+ | `--menu-button-spacing-height` | `height`、`width` | `var(--apex-size-24)` | `.apex-menu-button.apex-primary-menu-button` |
47
+ | `--menu-button-spacing-height` | `height`、`width` | `var(--apex-size-24)` | `.apex-menu-button.apex-secondary-menu-button` |
48
+ | `--menu-button-spacing-padding-x` | `padding` | `var(--apex-spacing-8)` | `.apex-menu-button.apex-icon-menu-button` |
49
+ | `--menu-button-spacing-padding-x` | `padding` | `var(--apex-spacing-12)` | `.apex-menu-button.apex-primary-menu-button` |
50
+ | `--menu-button-spacing-padding-x` | `padding` | `var(--apex-spacing-8)` | `.apex-menu-button.apex-secondary-menu-button` |
51
+ | `--menu-button-stroke-active` | `border-color` | `var(--apex-stroke-neutral-quaternary)` | `.apex-menu-button.apex-primary-menu-button` |
52
+ | `--menu-button-stroke-active` | `border-color` | `var(--apex-stroke-neutral-quaternary)` | `.apex-menu-button.apex-secondary-menu-button` |
53
+ | `--menu-button-stroke-default` | `border` | `var(--apex-stroke-neutral-secondary)` | `.apex-menu-button.apex-primary-menu-button` |
54
+ | `--menu-button-stroke-default` | `border` | `var(--apex-stroke-neutral-secondary)` | `.apex-menu-button.apex-secondary-menu-button` |
55
+ | `--menu-button-stroke-disabled` | `border-color` | `var(--apex-stroke-neutral-primary)` | `.apex-menu-button.apex-primary-menu-button` |
56
+ | `--menu-button-stroke-disabled` | `border-color` | `var(--apex-stroke-neutral-primary)` | `.apex-menu-button.apex-secondary-menu-button` |
57
+ | `--menu-button-stroke-hover` | `border-color` | `var(--apex-stroke-neutral-tertiary)` | `.apex-menu-button.apex-primary-menu-button` |
58
+ | `--menu-button-stroke-hover` | `border-color` | `var(--apex-stroke-neutral-tertiary)` | `.apex-menu-button.apex-secondary-menu-button` |
59
+ | `--menu-button-stroke-selected` | `border-color` | `var(--apex-stroke-neutral-secondary)` | `.apex-menu-button.apex-primary-menu-button` |
60
+ | `--menu-button-stroke-selected` | `border-color` | `var(--apex-stroke-brand-transparent)` | `.apex-menu-button.apex-secondary-menu-button` |
61
+ | `--menu-button-stroke-stroke` | `border` | `var(--apex-border-1)` | `.apex-menu-button.apex-icon-menu-button` |
62
+ | `--menu-button-stroke-stroke` | `border` | `var(--apex-border-1)` | `.apex-menu-button.apex-primary-menu-button` |
63
+ | `--menu-button-stroke-stroke` | `border` | `var(--apex-border-1)` | `.apex-menu-button.apex-secondary-menu-button` |
64
+ | `--menu-button-text-active` | `color` | `var(--apex-text-neutral-tertiary)` | `.apex-menu-button.apex-primary-menu-button` |
65
+ | `--menu-button-text-active` | `color` | `var(--apex-text-neutral-primary)` | `.apex-menu-button.apex-secondary-menu-button` |
66
+ | `--menu-button-text-default` | `color` | `var(--apex-text-neutral-primary)` | `.apex-menu-button.apex-primary-menu-button` |
67
+ | `--menu-button-text-default` | `color` | `var(--apex-text-neutral-primary)` | `.apex-menu-button.apex-secondary-menu-button` |
68
+ | `--menu-button-text-disabled` | `color` | `var(--apex-text-neutral-disabled)` | `.apex-menu-button.apex-primary-menu-button` |
69
+ | `--menu-button-text-disabled` | `color` | `var(--apex-text-neutral-disabled)` | `.apex-menu-button.apex-secondary-menu-button` |
70
+ | `--menu-button-text-hover` | `background-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-menu-button.apex-primary-menu-button` |
71
+ | `--menu-button-text-hover` | `background-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-menu-button.apex-secondary-menu-button` |
72
+ | `--menu-button-text-selected` | `color` | `var(--apex-text-brand-primary)` | `.apex-menu-button.apex-primary-menu-button` |
73
+ | `--menu-button-text-selected` | `color` | `var(--apex-text-neutral-primary)` | `.apex-menu-button.apex-secondary-menu-button` |
74
+ | `--menu-fill-container-default` | `background-color` | `var(--apex-fill-neutral-secondary)` | `.apex-menu-sliding-panel` |
75
+ | `--menu-fill-container-default` | `background-color` | `var(--apex-fill-neutral-secondary)` | `.apex-menu.apex-default-menu` |
76
+ | `--menu-radius-radius` | `border-radius` | `var(--apex-radius-8)` | `.apex-menu.apex-container-md-menu` |
77
+ | `--menu-radius-radius` | `border-radius` | `var(--apex-radius-8)` | `.apex-menu.apex-container-sm-menu` |
78
+ | `--menu-spacing-gap-md` | `gap`、`margin-block-start`、`padding`、`padding-bottom` | `var(--apex-spacing-12)` | `.apex-menu.apex-container-md-menu` |
79
+ | `--menu-spacing-gap-md` | `gap`、`margin-block-start`、`padding`、`padding-bottom` | `var(--apex-spacing-8)` | `.apex-menu.apex-container-sm-menu` |
80
+ | `--menu-spacing-gap-sm` | `gap`、`margin-block`、`margin-block-end`、`margin-inline-start`、`max-width`、`padding`、`width` | `var(--apex-spacing-4)` | `.apex-menu-sliding-panel` |
81
+ | `--menu-spacing-gap-sm` | `gap`、`margin-block`、`margin-block-end`、`margin-inline-start`、`max-width`、`padding`、`width` | `var(--apex-spacing-4)` | `.apex-menu.apex-container-md-menu` |
82
+ | `--menu-spacing-gap-sm` | `gap`、`margin-block`、`margin-block-end`、`margin-inline-start`、`max-width`、`padding`、`width` | `var(--apex-spacing-4)` | `.apex-menu.apex-container-sm-menu` |
83
+ | `--menu-spacing-gap-sublist` | `margin-inline-start`、`max-width`、`padding-inline-start`、`width` | `var(--apex-spacing-12)` | `.apex-menu.apex-container-md-menu` |
84
+ | `--menu-spacing-gap-sublist` | `margin-inline-start`、`max-width`、`padding-inline-start`、`width` | `var(--apex-spacing-12)` | `.apex-menu.apex-container-sm-menu` |
85
+ | `--menu-spacing-padding-x` | `padding` | `var(--apex-spacing-8)` | `.apex-menu-sliding-panel` |
86
+ | `--menu-spacing-padding-x` | `padding` | `var(--apex-spacing-8)` | `.apex-menu.apex-container-md-menu` |
87
+ | `--menu-spacing-padding-x` | `padding` | `var(--apex-spacing-4)` | `.apex-menu.apex-container-sm-menu` |
88
+ | `--menu-spacing-padding-y` | `padding` | `var(--apex-spacing-12)` | `.apex-menu-sliding-panel` |
89
+ | `--menu-spacing-padding-y` | `padding` | `var(--apex-spacing-12)` | `.apex-menu.apex-container-md-menu` |
90
+ | `--menu-spacing-padding-y` | `padding` | `var(--apex-spacing-8)` | `.apex-menu.apex-container-sm-menu` |
91
+ | `--menu-spacing-width-panel` | `min-width`、`width` | `var(--apex-size-200)` | `.apex-menu.apex-container-md-menu` |
92
+ | `--menu-spacing-width-panel` | `min-width`、`width` | `var(--apex-size-200)` | `.apex-menu.apex-container-sm-menu` |
93
+ | `--menu-spacing-width-rail` | `min-width`、`width` | `var(--apex-size-56)` | `.apex-menu-sliding-panel` |
94
+ | `--menu-spacing-width-rail` | `min-width`、`width` | `var(--apex-size-56)` | `.apex-menu.apex-container-md-menu` |
95
+ | `--menu-spacing-width-rail` | `min-width`、`width` | `var(--apex-size-56)` | `.apex-menu.apex-container-sm-menu` |
96
+ | `--menu-stroke-container-default` | `background-color`、`border-inline-end` | `var(--apex-stroke-neutral-tertiary)` | `.apex-menu-sliding-panel` |
97
+ | `--menu-stroke-container-default` | `background-color`、`border-inline-end` | `var(--apex-stroke-neutral-tertiary)` | `.apex-menu.apex-default-menu` |
98
+ | `--menu-stroke-stroke` | `border-inline-end`、`height`、`width` | `var(--apex-border-1)` | `.apex-menu-sliding-panel` |
99
+ | `--menu-stroke-stroke` | `border-inline-end`、`height`、`width` | `var(--apex-border-1)` | `.apex-menu.apex-container-md-menu` |
100
+ | `--menu-stroke-stroke` | `border-inline-end`、`height`、`width` | `var(--apex-border-1)` | `.apex-menu.apex-container-sm-menu` |
@@ -0,0 +1,301 @@
1
+ # Message
2
+
3
+ > Message:操作结果的轻量全局反馈(成功、失败、警告、进行中等)时。
4
+
5
+ 包:`@apexhub/apex-ui-react`;版本:`1.2.2`(当前源码快照,发布状态以安装包版本为准)。
6
+
7
+ 公开导出:`message`。
8
+
9
+ 以下 API 属于 Apex UI;不要据 antd 的同名组件推断额外属性或默认值。默认值列的空缺表示未声明,不代表 `false`。
10
+
11
+ ## 快速开始
12
+
13
+ ```tsx
14
+ import { Button, message } from '@apexhub/apex-ui-react'
15
+
16
+ import { useEffect } from 'react'
17
+
18
+ import '@apexhub/apex-ui-react/style.css'
19
+
20
+ export default () => {
21
+ useEffect(() => () => message.destroy(), [])
22
+
23
+ return (
24
+ <Button type="primary" onClick={() => message.info('这是一条普通信息提示')}>
25
+ 显示消息
26
+ </Button>
27
+ )
28
+ }
29
+ ```
30
+
31
+ ## 何时使用
32
+
33
+ - 操作结果的轻量全局反馈(成功、失败、警告、进行中等)时。
34
+ - 信息短时展示、无需用户决策或填写的场景;默认数秒后自动关闭。
35
+ - 需用户确认、填写或承载复杂内容时请使用 Modal 或 Notification。
36
+
37
+ ## API
38
+
39
+ 仅使用类型定义支持的属性;原生属性、ref 目标和事件签名因组件而异。关联类型用于解释字段结构;只有「导出类型」中的名称可从包根导入。
40
+
41
+ ### 使用入口
42
+
43
+ 通过 `message` 使用,配置与方法见下方关联类型。
44
+
45
+ ### MessageType
46
+
47
+ ```typescript
48
+ type MessageType = 'info' | 'success' | 'error' | 'warning' | 'loading'
49
+ ```
50
+
51
+ ### MessageOnClose
52
+
53
+ ```typescript
54
+ type MessageOnClose = () => void
55
+ ```
56
+
57
+ ### MessageHandle
58
+
59
+ Message 调用返回句柄。
60
+
61
+ | 属性 | 说明 | 类型 | 必填 | 默认值 |
62
+ | --- | --- | --- | --- | --- |
63
+ | id | 当前消息的内部标识,仅用于调试与测试断言。 | `string` | 是 | — |
64
+ | close | 关闭当前消息;重复调用无副作用。 | `() => void` | 是 | — |
65
+
66
+ ### MessageOpenConfig
67
+
68
+ Message.open 配置。
69
+
70
+ | 属性 | 说明 | 类型 | 必填 | 默认值 |
71
+ | --- | --- | --- | --- | --- |
72
+ | content | 提示内容。 | `React.ReactNode` | 是 | `undefined` |
73
+ | type | 反馈语义。<br>- `info`:普通信息提示,使用 info 图标色<br>- `success`:成功反馈<br>- `error`:失败反馈<br>- `warning`:警告反馈<br>- `loading`:进行中反馈,使用 loading 图标与 info 图标色 | `"info" \| "success" \| "error" \| "warning" \| "loading"` | 否 | `'info'` |
74
+ | duration | 自动关闭延时,单位秒;传 `0` 时不自动关闭。 | `number` | 否 | `3` |
75
+ | icon | 自定义图标;未传时按 `type` 渲染默认语义图标。 | `React.ReactNode` | 否 | `undefined` |
76
+ | onClose | 当前消息关闭后触发。 | `MessageOnClose` | 否 | `undefined` |
77
+ | onClick | 点击当前消息时触发。 | `React.ComponentProps<'div'>['onClick']` | 否 | `undefined` |
78
+ | closable | 是否显示右侧关闭按钮;为 `false` 时仍可通过 `MessageHandle.close()` / `destroy()` 关闭。 | `boolean` | 否 | `false` |
79
+ | closeIcon | 自定义关闭图标;`false` / `null` 时不渲染关闭按钮(即使 `closable` 为 `true`)。 | `React.ReactNode` | 否 | `undefined` |
80
+ | className | 当前消息根节点类名,作用于 `data-slot="message"`。 | `React.ComponentProps<'div'>['className']` | 否 | `undefined` |
81
+ | style | 当前消息根节点样式;禁止硬编码色值,优先使用 CSS Token。 | `React.ComponentProps<'div'>['style']` | 否 | `undefined` |
82
+
83
+ ### MessageShortcutConfig
84
+
85
+ ```typescript
86
+ type MessageShortcutConfig = Omit<MessageOpenConfig, 'type'>
87
+ ```
88
+
89
+ ### MessageShortcutInput
90
+
91
+ ```typescript
92
+ type MessageShortcutInput = React.ReactNode | MessageShortcutConfig
93
+ ```
94
+
95
+ ### MessageApi
96
+
97
+ Message 命令式 API。
98
+
99
+ | 属性 | 说明 | 类型 | 必填 | 默认值 |
100
+ | --- | --- | --- | --- | --- |
101
+ | open | 打开一条消息。 | `(config: MessageOpenConfig) => MessageHandle` | 是 | — |
102
+ | success | 打开成功反馈。 | `{ (content: React.ReactNode, duration?: number, onClose?: MessageOnClose): MessageHandle (config: MessageShortcutConfig): MessageHandle }` | 是 | — |
103
+ | error | 打开错误反馈。 | `{ (content: React.ReactNode, duration?: number, onClose?: MessageOnClose): MessageHandle (config: MessageShortcutConfig): MessageHandle }` | 是 | — |
104
+ | info | 打开普通信息反馈。 | `{ (content: React.ReactNode, duration?: number, onClose?: MessageOnClose): MessageHandle (config: MessageShortcutConfig): MessageHandle }` | 是 | — |
105
+ | warning | 打开警告反馈。 | `{ (content: React.ReactNode, duration?: number, onClose?: MessageOnClose): MessageHandle (config: MessageShortcutConfig): MessageHandle }` | 是 | — |
106
+ | loading | 打开加载中反馈;是否常驻由调用方通过 `duration={0}` 决定。 | `{ (content: React.ReactNode, duration?: number, onClose?: MessageOnClose): MessageHandle (config: MessageShortcutConfig): MessageHandle }` | 是 | — |
107
+ | destroy | 关闭所有消息。 | `() => void` | 是 | — |
108
+
109
+ ### 导出类型
110
+
111
+ 另可从 `@apexhub/apex-ui-react` 导入:`MessageApi`、`MessageHandle`、`MessageOpenConfig`、`MessageType`(与上文子类型配合使用)。
112
+
113
+ ## 代码演示
114
+
115
+ ### 语义类型
116
+
117
+ `success`、`error`、`warning`、`info`、`loading` 五种语义,未传 `icon` 时使用对应默认图标。
118
+
119
+ ```tsx
120
+ import { Button, message } from '@apexhub/apex-ui-react'
121
+
122
+ import { useEffect } from 'react'
123
+
124
+ const rowStyle = { display: 'flex', gap: 8, flexWrap: 'wrap' as const }
125
+
126
+ export default () => {
127
+ useEffect(() => () => message.destroy(), [])
128
+
129
+ return (
130
+ <div style={rowStyle}>
131
+ <Button onClick={() => message.success('操作成功')}>success</Button>
132
+ <Button onClick={() => message.error('操作失败')}>error</Button>
133
+ <Button onClick={() => message.warning('请注意')}>warning</Button>
134
+ <Button onClick={() => message.info('普通信息')}>info</Button>
135
+ <Button onClick={() => message.loading({ content: '加载中…', duration: 0 })}>loading</Button>
136
+ </div>
137
+ )
138
+ }
139
+ ```
140
+
141
+ ### 可关闭
142
+
143
+ 通过 `closable` 显示右侧关闭按钮;默认不展示关闭按钮,仍可通过 `MessageHandle.close()` 或 `message.destroy()` 关闭。
144
+
145
+ ```tsx
146
+ import { Button, message } from '@apexhub/apex-ui-react'
147
+
148
+ import { useEffect } from 'react'
149
+
150
+ const rowStyle = { display: 'flex', gap: 8, flexWrap: 'wrap' as const }
151
+
152
+ export default () => {
153
+ useEffect(() => () => message.destroy(), [])
154
+
155
+ return (
156
+ <div style={rowStyle}>
157
+ <Button
158
+ type="primary"
159
+ onClick={() =>
160
+ message.info({
161
+ content: '这是一条可手动关闭的信息提示',
162
+ duration: 0,
163
+ closable: true,
164
+ })
165
+ }
166
+ >
167
+ 带关闭按钮
168
+ </Button>
169
+ <Button
170
+ onClick={() =>
171
+ message.success({
172
+ content: '默认无关闭按钮',
173
+ duration: 0,
174
+ })
175
+ }
176
+ >
177
+ 无关闭按钮
178
+ </Button>
179
+ </div>
180
+ )
181
+ }
182
+ ```
183
+
184
+ ### 自动关闭与常驻
185
+
186
+ `duration` 单位为秒,默认 `3`;传 `0` 时不自动关闭。
187
+
188
+ ```tsx
189
+ import { Button, message } from '@apexhub/apex-ui-react'
190
+
191
+ import { useEffect } from 'react'
192
+
193
+ const rowStyle = { display: 'flex', gap: 8, flexWrap: 'wrap' as const }
194
+
195
+ export default () => {
196
+ useEffect(() => () => message.destroy(), [])
197
+
198
+ return (
199
+ <div style={rowStyle}>
200
+ <Button onClick={() => message.info({ content: '0.5s 后自动关闭', duration: 0.5 })}>
201
+ 短时
202
+ </Button>
203
+ <Button onClick={() => message.info({ content: '常驻,不自动关闭', duration: 0 })}>
204
+ 常驻
205
+ </Button>
206
+ </div>
207
+ )
208
+ }
209
+ ```
210
+
211
+ ### loading 手动关闭
212
+
213
+ `message.loading` 返回的句柄可调用 `close()` 结束加载提示。
214
+
215
+ ```tsx
216
+ import { Button, message } from '@apexhub/apex-ui-react'
217
+
218
+ import { useEffect, useRef } from 'react'
219
+
220
+ const rowStyle = { display: 'flex', gap: 8, flexWrap: 'wrap' as const }
221
+
222
+ export default () => {
223
+ const closeRef = useRef<(() => void) | undefined>(undefined)
224
+
225
+ useEffect(() => () => message.destroy(), [])
226
+
227
+ return (
228
+ <div style={rowStyle}>
229
+ <Button
230
+ type="primary"
231
+ onClick={() => {
232
+ closeRef.current = message.loading({ content: '处理中…', duration: 0 }).close
233
+ }}
234
+ >
235
+ 开始
236
+ </Button>
237
+ <Button onClick={() => closeRef.current?.()}>完成</Button>
238
+ </div>
239
+ )
240
+ }
241
+ ```
242
+
243
+ ### 销毁全部
244
+
245
+ `message.destroy()` 关闭当前已打开的全部消息。
246
+
247
+ ```tsx
248
+ import { Button, message } from '@apexhub/apex-ui-react'
249
+
250
+ import { useEffect } from 'react'
251
+
252
+ const rowStyle = { display: 'flex', gap: 8, flexWrap: 'wrap' as const }
253
+
254
+ export default () => {
255
+ useEffect(() => () => message.destroy(), [])
256
+
257
+ return (
258
+ <div style={rowStyle}>
259
+ <Button
260
+ type="primary"
261
+ onClick={() => {
262
+ message.info({ content: '消息 A', duration: 0 })
263
+ message.success({ content: '消息 B', duration: 0 })
264
+ message.warning({ content: '消息 C', duration: 0 })
265
+ }}
266
+ >
267
+ 弹出 3 条
268
+ </Button>
269
+ <Button onClick={() => message.destroy()}>全部销毁</Button>
270
+ </div>
271
+ )
272
+ }
273
+ ```
274
+
275
+ ## DOM 结构
276
+
277
+ 源码声明的静态 `data-slot`:`message-item`、`message`、`message-icon`、`message-content`、`message-close`、`message-viewport`。具体节点随模式和状态出现,不表示固定嵌套顺序。
278
+
279
+ ## 样式定制
280
+
281
+ 优先使用本组件公开的尺寸、类型和状态属性。换肤与变量覆盖方式见 [主题指南](../../llms-theme.txt)。
282
+
283
+ 需要定制具体样式时再读取 [Token 明细](./tokens.txt),其中包含用途、定义值及适用作用域。常规组件使用无需加载该文件。
284
+
285
+ ## FAQ
286
+
287
+ ### `message.loading` 会自动一直显示吗?
288
+
289
+ 不会。`loading` 是否常驻由调用方决定;需要持续到异步结束请传 `duration={0}`,完成后调用返回句柄的 `close()`。
290
+
291
+
292
+
293
+ ### 为什么没有 `useMessage` 或 `message.config`?
294
+
295
+ v1 采用全局 singleton 挂载,不读取 React Context,因此不提供 `useMessage`、全局 `config`、按 key 更新等能力;单条关闭请用 `MessageHandle.close()`,`message.destroy()` 可清空全部。
296
+
297
+
298
+
299
+ ### 点击关闭按钮会触发消息的 `onClick` 吗?
300
+
301
+ 不会。点击关闭按钮只触发 `onClose`,事件不会冒泡到消息根节点的 `onClick`。
@@ -0,0 +1,25 @@
1
+ # Message Token 明细
2
+
3
+ 包:`@apexhub/apex-ui-react`;版本:`1.2.2`(当前源码快照)。
4
+
5
+ 按需读取:[组件用法](./llm.txt) · [主题与覆盖规则](../../llms-theme.txt)。
6
+
7
+ 以下组件变量在设计 Token 源中已定义,并被组件或其共享样式使用;不包含仅在实现中声明的临时变量。用途来自实际 CSS 属性,不是对外新增的 Props。
8
+
9
+ 定义值依赖所列尺寸、变体、状态和媒体作用域;Alias 引用还会随 light/dark 主题改变。它们不是统一默认值或最终计算值。作用域用于解释定义位置,不代表内部选择器是稳定的定制 API。
10
+
11
+ | Token | 用途(CSS 属性) | 定义值 | 定义作用域 |
12
+ | --- | --- | --- | --- |
13
+ | `--message-default-fill` | `background` | `var(--apex-fill-neutral-secondary)` | `.apex-message.apex-message-message` |
14
+ | `--message-default-icon` | `color` | `var(--apex-icon-warning-primary)` | `.apex-message.apex-message-message` |
15
+ | `--message-default-stroke` | `border` | `var(--apex-fill-neutral-quinary)` | `.apex-message.apex-message-message` |
16
+ | `--message-default-text` | `color` | `var(--apex-text-neutral-primary)` | `.apex-message.apex-message-message` |
17
+ | `--message-icon-icon` | `font-size` | `var(--apex-icon-24)` | `.apex-message.apex-default-message` |
18
+ | `--message-radius-radius` | `border-radius` | `var(--apex-radius-8)` | `.apex-message.apex-default-message` |
19
+ | `--message-size-width-max` | `max-width` | `var(--apex-size-560)` | `.apex-message.apex-default-message` |
20
+ | `--message-spacing-gap` | `gap`、`margin-inline-start` | `var(--apex-spacing-4)` | `.apex-message.apex-default-message` |
21
+ | `--message-spacing-gap-group` | `gap`、`transform` | `var(--apex-spacing-8)` | `.apex-message.apex-default-message` |
22
+ | `--message-spacing-margin-y` | `top` | `var(--apex-spacing-24)` | `.apex-message.apex-default-message` |
23
+ | `--message-spacing-padding-x` | `padding` | `var(--apex-spacing-12)` | `.apex-message.apex-default-message` |
24
+ | `--message-spacing-padding-y` | `padding` | `var(--apex-spacing-8)` | `.apex-message.apex-default-message` |
25
+ | `--message-stroke-stroke` | `border` | `var(--apex-border-08)` | `.apex-message.apex-default-message` |