@apexhub/apex-ui-react-source 1.2.1 → 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 (157) hide show
  1. package/bin/apex-ui-react-source.mjs +0 -0
  2. package/dist/files/AGENTS.md +1 -1
  3. package/dist/files/_assets/table-empty.url.ts +1 -1
  4. package/dist/files/alert/Alert.tsx +2 -2
  5. package/dist/files/alert/alert.css +1 -0
  6. package/dist/files/alert/llm.txt +3 -3
  7. package/dist/files/alert/tokens.txt +1 -1
  8. package/dist/files/apex-provider/llm.txt +3 -2
  9. package/dist/files/auto-complete/llm.txt +1 -1
  10. package/dist/files/auto-complete/tokens.txt +1 -1
  11. package/dist/files/avatar/Avatar.tsx +1 -1
  12. package/dist/files/avatar/avatar.css +12 -1
  13. package/dist/files/avatar/llm.txt +1 -1
  14. package/dist/files/avatar/tokens.txt +1 -1
  15. package/dist/files/breadcrumb/Breadcrumb.tsx +17 -10
  16. package/dist/files/breadcrumb/breadcrumb.css +20 -10
  17. package/dist/files/breadcrumb/interface.ts +4 -4
  18. package/dist/files/breadcrumb/llm.txt +8 -8
  19. package/dist/files/breadcrumb/tokens.txt +46 -96
  20. package/dist/files/breadcrumb/variants.ts +6 -0
  21. package/dist/files/button/Button.tsx +25 -8
  22. package/dist/files/button/button.css +20 -2
  23. package/dist/files/button/interface.ts +7 -4
  24. package/dist/files/button/llm.txt +16 -8
  25. package/dist/files/button/tokens.txt +1 -1
  26. package/dist/files/button/variants.ts +8 -0
  27. package/dist/files/card/Card.tsx +8 -1
  28. package/dist/files/card/card-states.stories.css +42 -0
  29. package/dist/files/card/card.css +6 -1
  30. package/dist/files/card/interface.ts +3 -0
  31. package/dist/files/card/llm.txt +24 -1
  32. package/dist/files/card/tokens.txt +3 -1
  33. package/dist/files/cascader/cascader-data.ts +29 -8
  34. package/dist/files/cascader/cascader.css +45 -11
  35. package/dist/files/cascader/llm.txt +25 -6
  36. package/dist/files/cascader/tokens.txt +15 -7
  37. package/dist/files/cascader/variants.ts +1 -1
  38. package/dist/files/checkbox/Checkbox.tsx +26 -10
  39. package/dist/files/checkbox/checkbox.css +64 -22
  40. package/dist/files/checkbox/llm.txt +24 -13
  41. package/dist/files/checkbox/tokens.txt +10 -2
  42. package/dist/files/clear/clear.css +5 -2
  43. package/dist/files/collapse/llm.txt +1 -1
  44. package/dist/files/collapse/tokens.txt +1 -1
  45. package/dist/files/date-picker/RangePicker.tsx +5 -5
  46. package/dist/files/date-picker/Trigger.tsx +5 -5
  47. package/dist/files/date-picker/date-picker.css +53 -23
  48. package/dist/files/date-picker/llm.txt +7 -3
  49. package/dist/files/date-picker/tokens.txt +10 -10
  50. package/dist/files/divider/llm.txt +1 -1
  51. package/dist/files/divider/tokens.txt +1 -1
  52. package/dist/files/drawer/drawer.css +1 -0
  53. package/dist/files/drawer/llm.txt +2 -2
  54. package/dist/files/drawer/tokens.txt +2 -2
  55. package/dist/files/dropdown/llm.txt +1 -1
  56. package/dist/files/dropdown/tokens.txt +1 -1
  57. package/dist/files/form/form.css +10 -0
  58. package/dist/files/form/llm.txt +1 -1
  59. package/dist/files/form/tokens.txt +3 -1
  60. package/dist/files/grid/llm.txt +9 -9
  61. package/dist/files/image/ImagePreview.tsx +7 -6
  62. package/dist/files/image/image.css +0 -10
  63. package/dist/files/image/llm.txt +2 -2
  64. package/dist/files/image/tokens.txt +1 -1
  65. package/dist/files/input/input.css +14 -14
  66. package/dist/files/input/llm.txt +4 -2
  67. package/dist/files/input/tokens.txt +4 -4
  68. package/dist/files/input-number/InputNumber.tsx +2 -0
  69. package/dist/files/input-number/input-number.css +13 -1
  70. package/dist/files/input-number/llm.txt +8 -3
  71. package/dist/files/input-number/tokens.txt +4 -4
  72. package/dist/files/layout/llm.txt +1 -1
  73. package/dist/files/layout/tokens.txt +1 -1
  74. package/dist/files/llms.txt +18 -11
  75. package/dist/files/menu/Menu.tsx +5 -1
  76. package/dist/files/menu/llm.txt +19 -12
  77. package/dist/files/menu/menu.css +41 -15
  78. package/dist/files/menu/menu.figma.stories.css +39 -0
  79. package/dist/files/menu/tokens.txt +21 -8
  80. package/dist/files/message/llm.txt +1 -1
  81. package/dist/files/message/tokens.txt +1 -1
  82. package/dist/files/modal/Modal.tsx +1 -2
  83. package/dist/files/modal/interface.ts +1 -1
  84. package/dist/files/modal/llm.txt +9 -9
  85. package/dist/files/modal/tokens.txt +1 -1
  86. package/dist/files/notification/llm.txt +1 -1
  87. package/dist/files/notification/tokens.txt +1 -1
  88. package/dist/files/pagination/PageButton.tsx +2 -0
  89. package/dist/files/pagination/Pagination.tsx +149 -170
  90. package/dist/files/pagination/interface.ts +2 -2
  91. package/dist/files/pagination/llm.txt +18 -9
  92. package/dist/files/pagination/pagination.css +56 -17
  93. package/dist/files/pagination/tokens.txt +6 -4
  94. package/dist/files/popover/Popover.tsx +11 -3
  95. package/dist/files/popover/llm.txt +3 -3
  96. package/dist/files/popover/popover.css +30 -18
  97. package/dist/files/popover/popover.stories.css +6 -0
  98. package/dist/files/popover/tokens.txt +4 -14
  99. package/dist/files/progress/llm.txt +4 -4
  100. package/dist/files/progress/tokens.txt +1 -1
  101. package/dist/files/radio/llm.txt +38 -1
  102. package/dist/files/radio/radio.css +51 -14
  103. package/dist/files/radio/tokens.txt +11 -6
  104. package/dist/files/rate/llm.txt +1 -1
  105. package/dist/files/rate/tokens.txt +1 -1
  106. package/dist/files/select/llm.txt +8 -7
  107. package/dist/files/select/select.css +30 -16
  108. package/dist/files/select/tokens.txt +4 -4
  109. package/dist/files/skeleton/llm.txt +1 -1
  110. package/dist/files/skeleton/tokens.txt +1 -1
  111. package/dist/files/spin/llm.txt +1 -1
  112. package/dist/files/spin/tokens.txt +1 -1
  113. package/dist/files/steps/llm.txt +1 -1
  114. package/dist/files/steps/tokens.txt +1 -1
  115. package/dist/files/switch/llm.txt +1 -1
  116. package/dist/files/switch/tokens.txt +1 -1
  117. package/dist/files/table/constants.ts +2 -2
  118. package/dist/files/table/hooks/useRowSelection.tsx +3 -3
  119. package/dist/files/table/interface.ts +7 -7
  120. package/dist/files/table/llm.txt +16 -13
  121. package/dist/files/table/parts/TablePagination.tsx +8 -0
  122. package/dist/files/table/table.css +27 -10
  123. package/dist/files/table/tokenScopes.ts +2 -2
  124. package/dist/files/table/tokens.txt +2 -2
  125. package/dist/files/tabs/Tabs.tsx +1 -2
  126. package/dist/files/tabs/llm.txt +1 -1
  127. package/dist/files/tabs/tabs.css +3 -3
  128. package/dist/files/tabs/tokens.txt +1 -1
  129. package/dist/files/tag/interface.ts +2 -2
  130. package/dist/files/tag/llm.txt +7 -8
  131. package/dist/files/tag/tag.css +1 -1
  132. package/dist/files/tag/tokens.txt +1 -2
  133. package/dist/files/tag/variants.ts +12 -2
  134. package/dist/files/theme/aliases.css +1 -1
  135. package/dist/files/theme/component-tokens.css +7 -7
  136. package/dist/files/theme/primitives.css +1 -1
  137. package/dist/files/tooltip/Tooltip.tsx +2 -2
  138. package/dist/files/tooltip/llm.txt +1 -1
  139. package/dist/files/tooltip/tokens.txt +1 -1
  140. package/dist/files/tooltip/tooltip.css +2 -3
  141. package/dist/files/tree/Tree.tsx +8 -38
  142. package/dist/files/tree/llm.txt +11 -15
  143. package/dist/files/tree/tokens.txt +1 -3
  144. package/dist/files/tree/tree-data.ts +30 -2
  145. package/dist/files/tree/tree.css +17 -3
  146. package/dist/files/tree/variants.ts +4 -2
  147. package/dist/files/tree-select/llm.txt +32 -22
  148. package/dist/files/tree-select/tokens.txt +7 -6
  149. package/dist/files/tree-select/tree-select-data.ts +2 -1
  150. package/dist/files/tree-select/tree-select.css +61 -8
  151. package/dist/files/typography/llm.txt +1 -1
  152. package/dist/files/typography/tokens.txt +1 -1
  153. package/dist/files/upload/llm.txt +4 -2
  154. package/dist/files/upload/tokens.txt +5 -1
  155. package/dist/files/upload/upload.css +54 -11
  156. package/dist/manifest.json +155 -153
  157. package/package.json +24 -10
@@ -585,6 +585,7 @@ export const ImagePreviewLayer: React.FC<ImagePreviewLayerProps> = ({
585
585
 
586
586
  <Button
587
587
  variant="icon"
588
+ size="medium"
588
589
  className="apex-upload-preview__close"
589
590
  data-slot="image-preview-close"
590
591
  icon={imagePreviewCloseIcon}
@@ -613,7 +614,7 @@ export const ImagePreviewLayer: React.FC<ImagePreviewLayerProps> = ({
613
614
  <PreviewToolbarAction label={imageLocale.previewFullscreen}>
614
615
  <Button
615
616
  variant="icon"
616
- size="small"
617
+ size="medium"
617
618
  icon={imagePreviewFullscreenIcon}
618
619
  aria-label={imageLocale.previewFullscreen}
619
620
  aria-pressed={isFullscreen}
@@ -623,7 +624,7 @@ export const ImagePreviewLayer: React.FC<ImagePreviewLayerProps> = ({
623
624
  <PreviewToolbarAction label={imageLocale.previewRotateLeft}>
624
625
  <Button
625
626
  variant="icon"
626
- size="small"
627
+ size="medium"
627
628
  icon={imagePreviewRotateLeftIcon}
628
629
  aria-label={imageLocale.previewRotateLeft}
629
630
  onClick={() => setRotation((deg) => deg - 90)}
@@ -632,7 +633,7 @@ export const ImagePreviewLayer: React.FC<ImagePreviewLayerProps> = ({
632
633
  <PreviewToolbarAction label={imageLocale.previewRotateRight}>
633
634
  <Button
634
635
  variant="icon"
635
- size="small"
636
+ size="medium"
636
637
  icon={imagePreviewRotateRightIcon}
637
638
  aria-label={imageLocale.previewRotateRight}
638
639
  onClick={() => setRotation((deg) => deg + 90)}
@@ -641,7 +642,7 @@ export const ImagePreviewLayer: React.FC<ImagePreviewLayerProps> = ({
641
642
  <PreviewToolbarAction label={imageLocale.previewZoomIn}>
642
643
  <Button
643
644
  variant="icon"
644
- size="small"
645
+ size="medium"
645
646
  icon={imagePreviewZoomInIcon}
646
647
  aria-label={imageLocale.previewZoomIn}
647
648
  onClick={() => {
@@ -653,7 +654,7 @@ export const ImagePreviewLayer: React.FC<ImagePreviewLayerProps> = ({
653
654
  <PreviewToolbarAction label={imageLocale.previewZoomOut}>
654
655
  <Button
655
656
  variant="icon"
656
- size="small"
657
+ size="medium"
657
658
  icon={imagePreviewZoomOutIcon}
658
659
  aria-label={imageLocale.previewZoomOut}
659
660
  onClick={() => {
@@ -665,7 +666,7 @@ export const ImagePreviewLayer: React.FC<ImagePreviewLayerProps> = ({
665
666
  <PreviewToolbarAction label={oneToOneActionLabel}>
666
667
  <Button
667
668
  variant="icon"
668
- size="small"
669
+ size="medium"
669
670
  icon={oneToOne ? imagePreviewAdaptToPageIcon : imagePreviewOneToOneIcon}
670
671
  aria-label={oneToOneActionLabel}
671
672
  aria-pressed={oneToOne}
@@ -373,20 +373,10 @@
373
373
  top: var(--apex-spacing-24);
374
374
  right: var(--apex-spacing-24);
375
375
  z-index: 2;
376
- color: var(--apex-grey-dark-10);
377
- --button-fill-default: var(--apex-grey-dark-3);
378
- --button-fill-hover: var(--apex-grey-dark-5);
379
- --button-fill-active: var(--apex-grey-dark-4);
380
- --button-stroke: 0;
381
376
  border-radius: 50%;
382
- opacity: 0.9;
383
377
  pointer-events: auto;
384
378
  }
385
379
 
386
- .apex-upload-preview__close.apex-button:hover {
387
- opacity: 1;
388
- }
389
-
390
380
  .apex-upload-preview__close:focus-visible {
391
381
  outline: 2px solid var(--apex-stroke-brand-primary);
392
382
  outline-offset: 2px;
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Image:需要以缩略图形式展示图片,并支持点击放大预览时。
4
4
 
5
- 版本:`1.2.1`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.2`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Image`。
8
8
 
@@ -408,7 +408,7 @@ export default () => {
408
408
  ## 行为要点
409
409
 
410
410
  - **URL 所有权**:Image 只接收可用 URL 字符串,**不接收 `File`/`Blob`**,不调用 `revokeObjectURL`。如果你使用 `URL.createObjectURL` 生成的 `blob:` 地址,需自行管理生命周期。
411
- - **变换工具栏**:预览层内置缩放(步进 0.25,范围 0.25–5)、左右旋转、1:1 原始尺寸、适应视口、占满视口。切图/关闭/重开时变换复位。
411
+ - **变换工具栏**:预览层使用 medium 图标按钮,内置缩放(步进 0.25,范围 0.25–5)、左右旋转、1:1 原始尺寸、适应视口、占满视口。切图/关闭/重开时变换复位。
412
412
  - **键盘**:打开后焦点陷阱;`Esc` 在占满视口时先退出占满再关闭;`←` / `→` 切图;关闭后焦点回触发元素。
413
413
  - **边界**:单图无 prev/next 控件;索引越界时禁用不循环;`fallback` 再失败不递归。
414
414
 
@@ -1,6 +1,6 @@
1
1
  # Image Token 明细
2
2
 
3
- 包:`@apexhub/apex-ui-react`;版本:`1.2.0`(当前源码快照)。
3
+ 包:`@apexhub/apex-ui-react`;版本:`1.2.2`(当前源码快照)。
4
4
 
5
5
  按需读取:[组件用法](./llm.txt) · [主题与覆盖规则](../../llms-theme.txt)。
6
6
 
@@ -135,19 +135,19 @@
135
135
  }
136
136
 
137
137
  .apex-input__inner[data-readonly]:not([data-disabled]) {
138
- background-color: var(--input-fill-default);
139
- border-color: var(--input-stroke-default);
140
- color: var(--input-text-filled-default);
141
- --input-autofill-text-color: var(--input-text-filled-default);
138
+ background-color: var(--input-fill-disabled);
139
+ border-color: var(--input-stroke-disabled);
140
+ color: var(--input-text-filled-disabled);
141
+ --input-autofill-text-color: var(--input-text-filled-disabled);
142
142
  cursor: default;
143
143
  }
144
144
 
145
145
  .apex-input__inner[data-readonly]:not([data-disabled]):hover,
146
146
  .apex-input__inner[data-readonly]:not([data-disabled]):focus-within {
147
- background-color: var(--input-fill-default);
148
- border-color: var(--input-stroke-default);
149
- color: var(--input-text-filled-default);
150
- --input-autofill-text-color: var(--input-text-filled-default);
147
+ background-color: var(--input-fill-disabled);
148
+ border-color: var(--input-stroke-disabled);
149
+ color: var(--input-text-filled-disabled);
150
+ --input-autofill-text-color: var(--input-text-filled-disabled);
151
151
  }
152
152
 
153
153
  /* ── Textarea ────────────────────────────────────────────────────────────── */
@@ -278,11 +278,11 @@
278
278
 
279
279
  .apex-input__inner[data-readonly]:not([data-disabled]) .apex-input__field {
280
280
  cursor: default;
281
- color: var(--input-text-filled-default);
281
+ color: var(--input-text-filled-disabled);
282
282
  }
283
283
 
284
284
  .apex-input__inner[data-readonly]:not([data-disabled]) .apex-input__field::placeholder {
285
- color: var(--input-text-placeholder-default);
285
+ color: var(--input-text-placeholder-disabled);
286
286
  }
287
287
 
288
288
  /* ── Prefix / suffix / count ─────────────────────────────────────────────── */
@@ -333,7 +333,7 @@
333
333
 
334
334
  .apex-input__inner[data-readonly]:not([data-disabled]) .apex-input__prefix,
335
335
  .apex-input__inner[data-readonly]:not([data-disabled]) .apex-input__suffix {
336
- color: var(--input-icon-default);
336
+ color: var(--input-icon-disabled);
337
337
  }
338
338
 
339
339
  .apex-input__count {
@@ -356,11 +356,11 @@
356
356
  color: var(--apex-text-error-alpha-primary);
357
357
  }
358
358
 
359
- .apex-input__inner[data-disabled] .apex-input__count {
359
+ .apex-input__inner:is([data-disabled], [data-readonly]) .apex-input__count {
360
360
  color: var(--input-text-filled-disabled);
361
361
  }
362
362
 
363
- .apex-input__inner[data-disabled] .apex-input__count[data-at-limit] .apex-input__count-current,
364
- .apex-input__inner[data-disabled] .apex-input__count[data-at-limit]:not(:has(.apex-input__count-current)) {
363
+ .apex-input__inner:is([data-disabled], [data-readonly]) .apex-input__count[data-at-limit] .apex-input__count-current,
364
+ .apex-input__inner:is([data-disabled], [data-readonly]) .apex-input__count[data-at-limit]:not(:has(.apex-input__count-current)) {
365
365
  color: var(--input-text-filled-disabled);
366
366
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Input:需要通过键盘录入单行或多行文本内容时。
4
4
 
5
- 版本:`1.2.1`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.2`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Input`。
8
8
 
@@ -256,14 +256,16 @@ export default () => (
256
256
 
257
257
  ### 只读
258
258
 
259
- `readOnly` 为 true 时可查看内容但不可修改,无 hover 交互态;与 `disabled` 正交,控件仍可聚焦。
259
+ `readOnly` 为 true 时可查看内容但不可修改,无 hover 交互态;视觉使用禁用配色,但控件仍可聚焦。示例同时展示空值占位和已填内容。
260
260
 
261
261
  ```tsx
262
262
  import { Input } from '@/components/apex/input'
263
263
 
264
264
  export default () => (
265
265
  <div style={{ display: 'flex', flexDirection: 'column', gap: 12, maxWidth: 320 }}>
266
+ <Input readOnly placeholder="只读空值" />
266
267
  <Input readOnly defaultValue="只读输入框" />
268
+ <Input type="textarea" readOnly rows={3} placeholder="只读文本域空值" />
267
269
  <Input type="textarea" readOnly rows={3} defaultValue="只读文本域" />
268
270
  </div>
269
271
  )
@@ -1,6 +1,6 @@
1
1
  # Input Token 明细
2
2
 
3
- 包:`@apexhub/apex-ui-react`;版本:`1.2.0`(当前源码快照)。
3
+ 包:`@apexhub/apex-ui-react`;版本:`1.2.2`(当前源码快照)。
4
4
 
5
5
  按需读取:[组件用法](./llm.txt) · [主题与覆盖规则](../../llms-theme.txt)。
6
6
 
@@ -118,10 +118,10 @@
118
118
  | `--input-stroke-stroke` | `border-width`、`padding-block` | `var(--apex-border-1)` | `.apex-input.apex-sm-input` |
119
119
  | `--input-text-filled-default` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
120
120
  | `--input-text-filled-default` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
121
- | `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-secondary)` | `.apex-input.apex-default-input` |
121
+ | `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-disabled)` | `.apex-input.apex-default-input` |
122
122
  | `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-disabled)` | `.apex-input.apex-elevated-input` |
123
- | `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-tertiary)` | `.apex-input.apex-default-input` |
124
- | `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-tertiary)` | `.apex-input.apex-elevated-input` |
123
+ | `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
124
+ | `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
125
125
  | `--input-text-filled-focused` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
126
126
  | `--input-text-filled-focused` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
127
127
  | `--input-text-filled-hover` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
@@ -408,6 +408,7 @@ export const InputNumber: React.FC<InputNumberProps> = ({
408
408
  data-text-align={textAlign}
409
409
  data-controls={showHandlers ? undefined : 'false'}
410
410
  data-disabled={disabled ? true : undefined}
411
+ data-readonly={readOnly ? true : undefined}
411
412
  className={cn(
412
413
  inputNumberVariants({ size, mode, textAlign }),
413
414
  'apex-default-input-number',
@@ -436,6 +437,7 @@ export const InputNumber: React.FC<InputNumberProps> = ({
436
437
  className="apex-input__inner apex-input-number__inner"
437
438
  data-status={status || undefined}
438
439
  data-disabled={disabled ? true : undefined}
440
+ data-readonly={readOnly ? true : undefined}
439
441
  >
440
442
  {showHandlers && !isSpinner ? handlerDown : null}
441
443
 
@@ -88,6 +88,18 @@
88
88
  border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
89
89
  }
90
90
 
91
+ /* Prefix/suffix are inline adornments. Keep their visual gap compact while
92
+ retaining the normal Input padding for a plain numeric field. */
93
+ .apex-input-number--mode-input:has(.apex-input-number__prefix, .apex-input-number__suffix)
94
+ .apex-input-number__inner {
95
+ gap: var(--input-spacing-gap-x);
96
+ }
97
+
98
+ .apex-input-number--mode-input:has(.apex-input-number__prefix, .apex-input-number__suffix)
99
+ .apex-input-number__field {
100
+ padding-inline: 0;
101
+ }
102
+
91
103
  /* input.css 的 __inner:focus-within 会染整壳;input 模式改由 field 承担 focus 皮肤 */
92
104
  .apex-input-number--mode-input
93
105
  .apex-input-number__inner:focus-within:not([data-disabled]):not([data-readonly]) {
@@ -107,7 +119,7 @@
107
119
  .apex-input-number__field:focus {
108
120
  background-color: transparent;
109
121
  border-color: transparent;
110
- color: var(--input-text-filled-default);
122
+ color: var(--input-text-filled-disabled);
111
123
  }
112
124
 
113
125
  .apex-input-number--mode-input .apex-input-number__handler:focus-visible {
@@ -2,7 +2,7 @@
2
2
 
3
3
  > InputNumber:需要录入有上下界的数值,并支持步进增减时。
4
4
 
5
- 版本:`1.2.1`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.2`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`InputNumber`。
8
8
 
@@ -282,12 +282,17 @@ export default () => <InputNumber disabled defaultValue={5} min={0} max={100} />
282
282
 
283
283
  ### 只读
284
284
 
285
- `readOnly` 为 true 时可查看数值但不可编辑,步进按钮与键盘输入一并禁用。
285
+ `readOnly` 为 true 时可查看数值但不可编辑,步进按钮与键盘输入一并禁用;空值占位和已填数值均使用禁用配色。
286
286
 
287
287
  ```tsx
288
288
  import { InputNumber } from '@/components/apex/input-number'
289
289
 
290
- export default () => <InputNumber readOnly defaultValue={5} min={0} max={100} />
290
+ export default () => (
291
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 12, maxWidth: 280 }}>
292
+ <InputNumber readOnly placeholder="只读空值" min={0} max={100} />
293
+ <InputNumber readOnly defaultValue={5} min={0} max={100} />
294
+ </div>
295
+ )
291
296
  ```
292
297
 
293
298
  ### 小数步长与格式化
@@ -1,6 +1,6 @@
1
1
  # InputNumber Token 明细
2
2
 
3
- 包:`@apexhub/apex-ui-react`;版本:`1.2.0`(当前源码快照)。
3
+ 包:`@apexhub/apex-ui-react`;版本:`1.2.2`(当前源码快照)。
4
4
 
5
5
  按需读取:[组件用法](./llm.txt) · [主题与覆盖规则](../../llms-theme.txt)。
6
6
 
@@ -139,10 +139,10 @@
139
139
  | `--input-stroke-stroke` | `border`、`border-end-end-radius`、`border-end-start-radius`、`border-start-end-radius`、`border-start-start-radius`、`border-width`、`height`、`margin-block`、`margin-inline-end`、`margin-inline-start`、`outline`、`padding-block`、`padding-inline-end`、`padding-inline-start`、`width` | `var(--apex-border-1)` | `.apex-input.apex-sm-input` |
140
140
  | `--input-text-filled-default` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
141
141
  | `--input-text-filled-default` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
142
- | `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-secondary)` | `.apex-input.apex-default-input` |
142
+ | `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-disabled)` | `.apex-input.apex-default-input` |
143
143
  | `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-disabled)` | `.apex-input.apex-elevated-input` |
144
- | `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-tertiary)` | `.apex-input.apex-default-input` |
145
- | `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-tertiary)` | `.apex-input.apex-elevated-input` |
144
+ | `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
145
+ | `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
146
146
  | `--input-text-filled-focused` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
147
147
  | `--input-text-filled-focused` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
148
148
  | `--input-text-filled-hover` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Layout:搭建后台页面的 Header、侧栏、内容区与 Footer 等整体结构时。
4
4
 
5
- 版本:`1.2.1`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.2`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Layout`、`LayoutSiderDrawerBody`、`LayoutSiderDrawerHeader`、`LayoutSiderMenuCollapsed`、`LayoutSiderMenuMaximized`。
8
8
 
@@ -1,6 +1,6 @@
1
1
  # Layout Token 明细
2
2
 
3
- 包:`@apexhub/apex-ui-react`;版本:`1.2.0`(当前源码快照)。
3
+ 包:`@apexhub/apex-ui-react`;版本:`1.2.2`(当前源码快照)。
4
4
 
5
5
  按需读取:[组件用法](./llm.txt) · [主题与覆盖规则](../../llms-theme.txt)。
6
6
 
@@ -75,9 +75,9 @@ import type { BreadcrumbItemType } from '@/components/apex/breadcrumb'
75
75
  import { Breadcrumb, BreadcrumbSeparatorIcon } from '@/components/apex/breadcrumb'
76
76
 
77
77
  const items: BreadcrumbItemType[] = [
78
- { type: 'section', title: '项目管理' },
79
- { title: 'Install Now', href: '#', onClick: (e) => e.preventDefault() },
80
- { title: 'Install Now' },
78
+ { type: 'section', title: '首页', href: '/' },
79
+ { title: 'Button', href: '/components/button' },
80
+ { title: 'Breadcrumb' },
81
81
  ]
82
82
 
83
83
  export default () => <Breadcrumb items={items} separator={<BreadcrumbSeparatorIcon />} />
@@ -323,7 +323,7 @@ import { Col, Row } from '@/components/apex/grid'
323
323
  import type { CSSProperties } from 'react'
324
324
 
325
325
  const boxStyle: CSSProperties = {
326
- background: 'var(--apex-fill-neutral-secondary, #f5f5f5)',
326
+ background: 'var(--apex-fill-neutral-secondary)',
327
327
  padding: '8px 0',
328
328
  textAlign: 'center',
329
329
  borderRadius: 4,
@@ -451,7 +451,7 @@ Menu:侧栏持久导航,需要在图标 rail 与展开列表之间切换时
451
451
 
452
452
  ```tsx
453
453
  import { Button } from '@/components/apex/button'
454
- import { Menu, MenuItemType } from '@/components/apex/menu'
454
+ import { Menu, type MenuItemType } from '@/components/apex/menu'
455
455
 
456
456
  import { useState } from 'react'
457
457
 
@@ -471,13 +471,20 @@ const items: MenuItemType[] = [
471
471
 
472
472
  export default () => {
473
473
  const [collapsed, setCollapsed] = useState(false)
474
+
474
475
  return (
475
- <div>
476
- <Button onClick={() => setCollapsed(!collapsed)}>{collapsed ? '展开' : '收起'}</Button>
477
- <br />
478
- <br />
479
- <Menu items={items} collapsed={collapsed} onCollapse={setCollapsed} />
480
- </div>
476
+ <Menu
477
+ items={items}
478
+ collapsed={collapsed}
479
+ onCollapse={setCollapsed}
480
+ defaultOpenKeys={['workspace']}
481
+ defaultSelectedKeys={['projects']}
482
+ footer={
483
+ <Button type="text" onClick={() => setCollapsed((current) => !current)}>
484
+ {collapsed ? '展开菜单' : '收起菜单'}
485
+ </Button>
486
+ }
487
+ />
481
488
  )
482
489
  }
483
490
  ```
@@ -669,7 +669,11 @@ export const Menu: React.FC<MenuProps> = ({
669
669
  >
670
670
  {header != null ? (
671
671
  <header
672
- className={cn(`${prefix}__header`, resolvedClassNames?.header)}
672
+ className={cn(
673
+ `${prefix}__header`,
674
+ 'apex-menu-button apex-primary-menu-button',
675
+ resolvedClassNames?.header,
676
+ )}
673
677
  style={resolvedStyles?.header}
674
678
  data-slot="menu-header"
675
679
  >
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Menu:侧栏持久导航,需要在图标 rail 与展开列表之间切换时。
4
4
 
5
- 版本:`1.2.1`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.2`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`isKeySelected`、`Menu`。
8
8
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  ```tsx
14
14
  import { Button } from '@/components/apex/button'
15
- import { Menu, MenuItemType } from '@/components/apex/menu'
15
+ import { Menu, type MenuItemType } from '@/components/apex/menu'
16
16
 
17
17
  import { useState } from 'react'
18
18
 
@@ -32,13 +32,20 @@ const items: MenuItemType[] = [
32
32
 
33
33
  export default () => {
34
34
  const [collapsed, setCollapsed] = useState(false)
35
+
35
36
  return (
36
- <div>
37
- <Button onClick={() => setCollapsed(!collapsed)}>{collapsed ? '展开' : '收起'}</Button>
38
- <br />
39
- <br />
40
- <Menu items={items} collapsed={collapsed} onCollapse={setCollapsed} />
41
- </div>
37
+ <Menu
38
+ items={items}
39
+ collapsed={collapsed}
40
+ onCollapse={setCollapsed}
41
+ defaultOpenKeys={['workspace']}
42
+ defaultSelectedKeys={['projects']}
43
+ footer={
44
+ <Button type="text" onClick={() => setCollapsed((current) => !current)}>
45
+ {collapsed ? '展开菜单' : '收起菜单'}
46
+ </Button>
47
+ }
48
+ />
42
49
  )
43
50
  }
44
51
  ```
@@ -265,8 +272,8 @@ const railStyle = {
265
272
  flexDirection: 'column' as const,
266
273
  width: 'fit-content',
267
274
  height: '100%',
268
- backgroundColor: '#151618',
269
- borderRight: '1px solid #2d30367a',
275
+ backgroundColor: 'var(--apex-fill-neutral-secondary)',
276
+ borderRight: 'var(--apex-border-1) solid var(--apex-stroke-neutral-tertiary)',
270
277
  padding: 8,
271
278
  boxSizing: 'border-box' as const,
272
279
  justifyContent: 'space-between' as const,
@@ -476,7 +483,7 @@ export default () => {
476
483
 
477
484
  ### 自定义顶栏
478
485
 
479
- 通过 `header` 与 `footer` 插槽自定义收窄与展开态的顶栏、底栏内容。
486
+ 通过 `header` 与 `footer` 插槽自定义收窄与展开态的顶栏、底栏内容;展开态的顶栏沿用菜单 Token 表面样式。
480
487
 
481
488
  ```tsx
482
489
  import { Avatar } from '@/components/apex/avatar'
@@ -599,7 +606,7 @@ export default () => {
599
606
  height: '100%',
600
607
  cursor: 'pointer',
601
608
  backgroundColor: profileHovered
602
- ? 'color-mix(in srgb, var(--card-fill-container-primary) 90%, white 10%)'
609
+ ? 'var(--apex-fill-neutral-tertiary)'
603
610
  : undefined,
604
611
  transition: 'background-color 0.15s ease',
605
612
  }}
@@ -41,7 +41,9 @@
41
41
  justify-content: space-between;
42
42
  width: var(--menu-spacing-width-panel);
43
43
  min-width: var(--menu-spacing-width-panel);
44
- padding: var(--menu-spacing-padding-y) var(--menu-spacing-padding-x);
44
+ padding:
45
+ calc(var(--menu-spacing-padding-y) + var(--menu-spacing-gap-sm) * 0.5)
46
+ calc(var(--menu-spacing-padding-x) + var(--menu-spacing-gap-sm) * 0.5);
45
47
  background-color: var(--menu-fill-container-default);
46
48
  }
47
49
 
@@ -118,6 +120,10 @@
118
120
  gap: var(--menu-spacing-gap-md);
119
121
  }
120
122
 
123
+ .apex-menu.apex-menu--menu-maximized .apex-menu__body {
124
+ gap: calc(var(--menu-spacing-gap-md) + var(--menu-spacing-gap-sm) * 0.5);
125
+ }
126
+
121
127
  .apex-menu.apex-menu--menu-collapsed .apex-menu__body {
122
128
  align-items: center;
123
129
  }
@@ -135,7 +141,11 @@
135
141
  padding-bottom: var(--menu-spacing-gap-md);
136
142
  overflow: hidden;
137
143
  white-space: nowrap;
138
- color: var(--menu-button-icon-default);
144
+ color: var(--menu-button-text-default);
145
+ }
146
+
147
+ .apex-menu.apex-menu--menu-maximized .apex-menu__header {
148
+ padding-bottom: 0;
139
149
  }
140
150
 
141
151
  /* ── Footer (always present) ─────────────────────────────────────────────── */
@@ -222,7 +232,7 @@
222
232
  min-height: 0;
223
233
  padding: 0;
224
234
  margin: 0;
225
- gap: var(--menu-spacing-gap-sm);
235
+ gap: var(--apex-spacing-12, var(--menu-spacing-gap-sm));
226
236
  overflow-x: visible;
227
237
  overflow-y: auto;
228
238
  list-style: none;
@@ -280,7 +290,8 @@
280
290
  grid-template-columns: minmax(0, 1fr);
281
291
  width: 100%;
282
292
  min-height: 0;
283
- gap: var(--menu-spacing-gap-sm);
293
+ align-content: start;
294
+ gap: calc(var(--menu-spacing-gap-sm) * 2);
284
295
  margin: 0;
285
296
  padding: 0;
286
297
  overflow-x: hidden;
@@ -302,6 +313,7 @@
302
313
  height: var(--menu-button-spacing-height);
303
314
  padding: 0 var(--menu-button-spacing-padding-x);
304
315
  gap: var(--menu-button-spacing-gap);
316
+ border: var(--menu-button-stroke-stroke) solid var(--menu-button-stroke-default);
305
317
  border-radius: var(--menu-button-radius-radius);
306
318
  background-color: var(--menu-button-fill-default);
307
319
  color: var(--menu-button-text-default);
@@ -337,6 +349,7 @@
337
349
 
338
350
  .apex-menu .apex-menu__row:hover:not(:disabled) {
339
351
  background-color: var(--menu-button-fill-hover);
352
+ border-color: var(--menu-button-stroke-hover);
340
353
  color: var(--menu-button-text-hover);
341
354
  }
342
355
 
@@ -346,6 +359,7 @@
346
359
 
347
360
  .apex-menu .apex-menu__row:active:not(:disabled) {
348
361
  background-color: var(--menu-button-fill-active);
362
+ border-color: var(--menu-button-stroke-active);
349
363
  color: var(--menu-button-text-active);
350
364
  }
351
365
 
@@ -356,13 +370,22 @@
356
370
  .apex-menu .apex-menu__row[data-selected-secondary]:hover:not(:disabled),
357
371
  .apex-menu .apex-menu__row[data-selected-secondary]:active:not(:disabled) {
358
372
  background-color: var(--menu-button-fill-selected);
373
+ border-color: var(--menu-button-stroke-selected);
359
374
  color: var(--menu-button-text-selected);
360
375
  }
361
376
 
362
- .apex-menu .apex-menu__row[data-selected] .apex-menu__icon,
363
- .apex-menu .apex-menu__row[data-selected] .apex-menu__caret,
364
- .apex-menu .apex-menu__row[data-selected-secondary] .apex-menu__icon,
365
- .apex-menu .apex-menu__row[data-selected-secondary] .apex-menu__caret {
377
+ .apex-menu .apex-menu__row:is([data-selected], [data-selected-secondary]) .apex-menu__label,
378
+ .apex-menu .apex-menu__row:is([data-selected], [data-selected-secondary]):hover:not(:disabled) .apex-menu__label,
379
+ .apex-menu .apex-menu__row:is([data-selected], [data-selected-secondary]):active:not(:disabled) .apex-menu__label {
380
+ color: var(--menu-button-text-selected);
381
+ }
382
+
383
+ .apex-menu .apex-menu__row:is([data-selected], [data-selected-secondary]) .apex-menu__icon,
384
+ .apex-menu .apex-menu__row:is([data-selected], [data-selected-secondary]) .apex-menu__caret,
385
+ .apex-menu .apex-menu__row:is([data-selected], [data-selected-secondary]):hover:not(:disabled) .apex-menu__icon,
386
+ .apex-menu .apex-menu__row:is([data-selected], [data-selected-secondary]):hover:not(:disabled) .apex-menu__caret,
387
+ .apex-menu .apex-menu__row:is([data-selected], [data-selected-secondary]):active:not(:disabled) .apex-menu__icon,
388
+ .apex-menu .apex-menu__row:is([data-selected], [data-selected-secondary]):active:not(:disabled) .apex-menu__caret {
366
389
  color: var(--menu-button-icon-selected);
367
390
  }
368
391
 
@@ -376,6 +399,7 @@
376
399
  .apex-menu .apex-menu__row:disabled,
377
400
  .apex-menu .apex-menu__row[data-disabled] {
378
401
  background-color: var(--menu-button-fill-disabled);
402
+ border-color: var(--menu-button-stroke-disabled);
379
403
  color: var(--menu-button-text-disabled);
380
404
  }
381
405
 
@@ -411,20 +435,22 @@
411
435
  width: 100%;
412
436
  min-width: 0;
413
437
  max-width: 100%;
414
- gap: var(--menu-spacing-gap-sm);
438
+ gap: 0;
415
439
  }
416
440
 
417
441
  .apex-menu .apex-menu__sublist {
418
- gap: var(--menu-spacing-gap-sm);
442
+ --menu-sublist-offset: max(0px, calc(var(--menu-inline-indent) - var(--menu-spacing-gap-sm)));
443
+ gap: calc(var(--menu-spacing-gap-sm) * 2);
419
444
  position: relative;
420
445
  display: grid;
421
446
  grid-template-columns: minmax(0, 1fr);
422
- width: calc(100% - var(--menu-spacing-gap-md));
447
+ width: calc(100% - var(--menu-sublist-offset));
423
448
  min-width: 0;
424
- max-width: calc(100% - var(--menu-spacing-gap-md));
449
+ max-width: calc(100% - var(--menu-sublist-offset));
425
450
  box-sizing: border-box;
426
- margin-block-start: var(--menu-spacing-gap-sm);
427
- margin-inline-start: var(--menu-spacing-gap-md);
451
+ margin-block-start: var(--menu-spacing-gap-md);
452
+ margin-block-end: calc(var(--menu-spacing-gap-sm) * 2);
453
+ margin-inline-start: var(--menu-sublist-offset);
428
454
  padding: 0;
429
455
  padding-inline-start: var(--menu-spacing-gap-sublist);
430
456
  list-style: none;
@@ -434,7 +460,7 @@
434
460
  content: '';
435
461
  position: absolute;
436
462
  inset-block: 0;
437
- inset-inline-start: var(--menu-spacing-gap-sm);
463
+ inset-inline-start: 0;
438
464
  width: var(--menu-stroke-stroke);
439
465
  background-color: var(--menu-button-fill-hover);
440
466
  pointer-events: none;