@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.
- package/bin/apex-ui-react-source.mjs +0 -0
- package/dist/files/AGENTS.md +1 -1
- package/dist/files/_assets/table-empty.url.ts +1 -1
- package/dist/files/alert/Alert.tsx +2 -2
- package/dist/files/alert/alert.css +1 -0
- package/dist/files/alert/llm.txt +3 -3
- package/dist/files/alert/tokens.txt +1 -1
- package/dist/files/apex-provider/llm.txt +3 -2
- package/dist/files/auto-complete/llm.txt +1 -1
- package/dist/files/auto-complete/tokens.txt +1 -1
- package/dist/files/avatar/Avatar.tsx +1 -1
- package/dist/files/avatar/avatar.css +12 -1
- package/dist/files/avatar/llm.txt +1 -1
- package/dist/files/avatar/tokens.txt +1 -1
- package/dist/files/breadcrumb/Breadcrumb.tsx +17 -10
- package/dist/files/breadcrumb/breadcrumb.css +20 -10
- package/dist/files/breadcrumb/interface.ts +4 -4
- package/dist/files/breadcrumb/llm.txt +8 -8
- package/dist/files/breadcrumb/tokens.txt +46 -96
- package/dist/files/breadcrumb/variants.ts +6 -0
- package/dist/files/button/Button.tsx +25 -8
- package/dist/files/button/button.css +20 -2
- package/dist/files/button/interface.ts +7 -4
- package/dist/files/button/llm.txt +16 -8
- package/dist/files/button/tokens.txt +1 -1
- package/dist/files/button/variants.ts +8 -0
- package/dist/files/card/Card.tsx +8 -1
- package/dist/files/card/card-states.stories.css +42 -0
- package/dist/files/card/card.css +6 -1
- package/dist/files/card/interface.ts +3 -0
- package/dist/files/card/llm.txt +24 -1
- package/dist/files/card/tokens.txt +3 -1
- package/dist/files/cascader/cascader-data.ts +29 -8
- package/dist/files/cascader/cascader.css +45 -11
- package/dist/files/cascader/llm.txt +25 -6
- package/dist/files/cascader/tokens.txt +15 -7
- package/dist/files/cascader/variants.ts +1 -1
- package/dist/files/checkbox/Checkbox.tsx +26 -10
- package/dist/files/checkbox/checkbox.css +64 -22
- package/dist/files/checkbox/llm.txt +24 -13
- package/dist/files/checkbox/tokens.txt +10 -2
- package/dist/files/clear/clear.css +5 -2
- package/dist/files/collapse/llm.txt +1 -1
- package/dist/files/collapse/tokens.txt +1 -1
- package/dist/files/date-picker/RangePicker.tsx +5 -5
- package/dist/files/date-picker/Trigger.tsx +5 -5
- package/dist/files/date-picker/date-picker.css +53 -23
- package/dist/files/date-picker/llm.txt +7 -3
- package/dist/files/date-picker/tokens.txt +10 -10
- package/dist/files/divider/llm.txt +1 -1
- package/dist/files/divider/tokens.txt +1 -1
- package/dist/files/drawer/drawer.css +1 -0
- package/dist/files/drawer/llm.txt +2 -2
- package/dist/files/drawer/tokens.txt +2 -2
- package/dist/files/dropdown/llm.txt +1 -1
- package/dist/files/dropdown/tokens.txt +1 -1
- package/dist/files/form/form.css +10 -0
- package/dist/files/form/llm.txt +1 -1
- package/dist/files/form/tokens.txt +3 -1
- package/dist/files/grid/llm.txt +9 -9
- package/dist/files/image/ImagePreview.tsx +7 -6
- package/dist/files/image/image.css +0 -10
- package/dist/files/image/llm.txt +2 -2
- package/dist/files/image/tokens.txt +1 -1
- package/dist/files/input/input.css +14 -14
- package/dist/files/input/llm.txt +4 -2
- package/dist/files/input/tokens.txt +4 -4
- package/dist/files/input-number/InputNumber.tsx +2 -0
- package/dist/files/input-number/input-number.css +13 -1
- package/dist/files/input-number/llm.txt +8 -3
- package/dist/files/input-number/tokens.txt +4 -4
- package/dist/files/layout/llm.txt +1 -1
- package/dist/files/layout/tokens.txt +1 -1
- package/dist/files/llms.txt +18 -11
- package/dist/files/menu/Menu.tsx +5 -1
- package/dist/files/menu/llm.txt +19 -12
- package/dist/files/menu/menu.css +41 -15
- package/dist/files/menu/menu.figma.stories.css +39 -0
- package/dist/files/menu/tokens.txt +21 -8
- package/dist/files/message/llm.txt +1 -1
- package/dist/files/message/tokens.txt +1 -1
- package/dist/files/modal/Modal.tsx +1 -2
- package/dist/files/modal/interface.ts +1 -1
- package/dist/files/modal/llm.txt +9 -9
- package/dist/files/modal/tokens.txt +1 -1
- package/dist/files/notification/llm.txt +1 -1
- package/dist/files/notification/tokens.txt +1 -1
- package/dist/files/pagination/PageButton.tsx +2 -0
- package/dist/files/pagination/Pagination.tsx +149 -170
- package/dist/files/pagination/interface.ts +2 -2
- package/dist/files/pagination/llm.txt +18 -9
- package/dist/files/pagination/pagination.css +56 -17
- package/dist/files/pagination/tokens.txt +6 -4
- package/dist/files/popover/Popover.tsx +11 -3
- package/dist/files/popover/llm.txt +3 -3
- package/dist/files/popover/popover.css +30 -18
- package/dist/files/popover/popover.stories.css +6 -0
- package/dist/files/popover/tokens.txt +4 -14
- package/dist/files/progress/llm.txt +4 -4
- package/dist/files/progress/tokens.txt +1 -1
- package/dist/files/radio/llm.txt +38 -1
- package/dist/files/radio/radio.css +51 -14
- package/dist/files/radio/tokens.txt +11 -6
- package/dist/files/rate/llm.txt +1 -1
- package/dist/files/rate/tokens.txt +1 -1
- package/dist/files/select/llm.txt +8 -7
- package/dist/files/select/select.css +30 -16
- package/dist/files/select/tokens.txt +4 -4
- package/dist/files/skeleton/llm.txt +1 -1
- package/dist/files/skeleton/tokens.txt +1 -1
- package/dist/files/spin/llm.txt +1 -1
- package/dist/files/spin/tokens.txt +1 -1
- package/dist/files/steps/llm.txt +1 -1
- package/dist/files/steps/tokens.txt +1 -1
- package/dist/files/switch/llm.txt +1 -1
- package/dist/files/switch/tokens.txt +1 -1
- package/dist/files/table/constants.ts +2 -2
- package/dist/files/table/hooks/useRowSelection.tsx +3 -3
- package/dist/files/table/interface.ts +7 -7
- package/dist/files/table/llm.txt +16 -13
- package/dist/files/table/parts/TablePagination.tsx +8 -0
- package/dist/files/table/table.css +27 -10
- package/dist/files/table/tokenScopes.ts +2 -2
- package/dist/files/table/tokens.txt +2 -2
- package/dist/files/tabs/Tabs.tsx +1 -2
- package/dist/files/tabs/llm.txt +1 -1
- package/dist/files/tabs/tabs.css +3 -3
- package/dist/files/tabs/tokens.txt +1 -1
- package/dist/files/tag/interface.ts +2 -2
- package/dist/files/tag/llm.txt +7 -8
- package/dist/files/tag/tag.css +1 -1
- package/dist/files/tag/tokens.txt +1 -2
- package/dist/files/tag/variants.ts +12 -2
- package/dist/files/theme/aliases.css +1 -1
- package/dist/files/theme/component-tokens.css +7 -7
- package/dist/files/theme/primitives.css +1 -1
- package/dist/files/tooltip/Tooltip.tsx +2 -2
- package/dist/files/tooltip/llm.txt +1 -1
- package/dist/files/tooltip/tokens.txt +1 -1
- package/dist/files/tooltip/tooltip.css +2 -3
- package/dist/files/tree/Tree.tsx +8 -38
- package/dist/files/tree/llm.txt +11 -15
- package/dist/files/tree/tokens.txt +1 -3
- package/dist/files/tree/tree-data.ts +30 -2
- package/dist/files/tree/tree.css +17 -3
- package/dist/files/tree/variants.ts +4 -2
- package/dist/files/tree-select/llm.txt +32 -22
- package/dist/files/tree-select/tokens.txt +7 -6
- package/dist/files/tree-select/tree-select-data.ts +2 -1
- package/dist/files/tree-select/tree-select.css +61 -8
- package/dist/files/typography/llm.txt +1 -1
- package/dist/files/typography/tokens.txt +1 -1
- package/dist/files/upload/llm.txt +4 -2
- package/dist/files/upload/tokens.txt +5 -1
- package/dist/files/upload/upload.css +54 -11
- package/dist/manifest.json +155 -153
- 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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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;
|
package/dist/files/image/llm.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Image:需要以缩略图形式展示图片,并支持点击放大预览时。
|
|
4
4
|
|
|
5
|
-
版本:`1.2.
|
|
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
|
-
-
|
|
411
|
+
- **变换工具栏**:预览层使用 medium 图标按钮,内置缩放(步进 0.25,范围 0.25–5)、左右旋转、1:1 原始尺寸、适应视口、占满视口。切图/关闭/重开时变换复位。
|
|
412
412
|
- **键盘**:打开后焦点陷阱;`Esc` 在占满视口时先退出占满再关闭;`←` / `→` 切图;关闭后焦点回触发元素。
|
|
413
413
|
- **边界**:单图无 prev/next 控件;索引越界时禁用不循环;`fallback` 再失败不递归。
|
|
414
414
|
|
|
@@ -135,19 +135,19 @@
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.apex-input__inner[data-readonly]:not([data-disabled]) {
|
|
138
|
-
background-color: var(--input-fill-
|
|
139
|
-
border-color: var(--input-stroke-
|
|
140
|
-
color: var(--input-text-filled-
|
|
141
|
-
--input-autofill-text-color: var(--input-text-filled-
|
|
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-
|
|
148
|
-
border-color: var(--input-stroke-
|
|
149
|
-
color: var(--input-text-filled-
|
|
150
|
-
--input-autofill-text-color: var(--input-text-filled-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
}
|
package/dist/files/input/llm.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Input:需要通过键盘录入单行或多行文本内容时。
|
|
4
4
|
|
|
5
|
-
版本:`1.2.
|
|
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
|
|
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.
|
|
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-
|
|
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-
|
|
124
|
-
| `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-
|
|
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-
|
|
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.
|
|
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 () =>
|
|
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.
|
|
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-
|
|
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-
|
|
145
|
-
| `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-
|
|
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` |
|
package/dist/files/llms.txt
CHANGED
|
@@ -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: '
|
|
80
|
-
{ title: '
|
|
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
|
|
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
|
-
<
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
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
|
```
|
package/dist/files/menu/Menu.tsx
CHANGED
|
@@ -669,7 +669,11 @@ export const Menu: React.FC<MenuProps> = ({
|
|
|
669
669
|
>
|
|
670
670
|
{header != null ? (
|
|
671
671
|
<header
|
|
672
|
-
className={cn(
|
|
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
|
>
|
package/dist/files/menu/llm.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Menu:侧栏持久导航,需要在图标 rail 与展开列表之间切换时。
|
|
4
4
|
|
|
5
|
-
版本:`1.2.
|
|
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
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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: '
|
|
269
|
-
borderRight: '
|
|
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
|
-
? '
|
|
609
|
+
? 'var(--apex-fill-neutral-tertiary)'
|
|
603
610
|
: undefined,
|
|
604
611
|
transition: 'background-color 0.15s ease',
|
|
605
612
|
}}
|
package/dist/files/menu/menu.css
CHANGED
|
@@ -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:
|
|
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-
|
|
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
|
-
|
|
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-
|
|
363
|
-
.apex-menu .apex-menu__row[data-selected] .apex-
|
|
364
|
-
.apex-menu .apex-menu__row[data-selected-secondary] .apex-
|
|
365
|
-
|
|
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:
|
|
438
|
+
gap: 0;
|
|
415
439
|
}
|
|
416
440
|
|
|
417
441
|
.apex-menu .apex-menu__sublist {
|
|
418
|
-
|
|
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-
|
|
447
|
+
width: calc(100% - var(--menu-sublist-offset));
|
|
423
448
|
min-width: 0;
|
|
424
|
-
max-width: calc(100% - var(--menu-
|
|
449
|
+
max-width: calc(100% - var(--menu-sublist-offset));
|
|
425
450
|
box-sizing: border-box;
|
|
426
|
-
margin-block-start: var(--menu-spacing-gap-
|
|
427
|
-
margin-
|
|
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:
|
|
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;
|