@apexhub/apex-ui-react-source 1.2.0 → 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/README.md +18 -4
- package/bin/apex-ui-react-source.mjs +208 -24
- package/dist/files/AGENTS.md +2 -2
- 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 +6 -5
- package/template/_gitignore +5 -0
- package/template/index.html +12 -0
- package/template/src/App.tsx +25 -0
- package/template/src/main.tsx +14 -0
- package/template/tsconfig.app.json +22 -0
- package/template/tsconfig.json +4 -0
- package/template/tsconfig.node.json +16 -0
- package/template/vite.config.ts +8 -0
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
overflow-x: hidden;
|
|
128
128
|
overflow-y: auto;
|
|
129
129
|
box-sizing: border-box;
|
|
130
|
+
padding-block-start: var(--drawer-spacing-padding);
|
|
130
131
|
margin-inline-end: calc((var(--drawer-spacing-padding) - var(--drawer-scrollbar-inset)) * -1);
|
|
131
132
|
padding-inline-end: calc(
|
|
132
133
|
var(--drawer-spacing-padding) - var(--drawer-scrollbar-inset) - var(--scrollbar-width-thumb, 4px)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Drawer:需要从屏幕边缘滑出面板展示详情、表单或临时任务,且保留原页面上下文时。
|
|
4
4
|
|
|
5
|
-
版本:`1.2.
|
|
5
|
+
版本:`1.2.2`。组件源码在本目录,属于当前项目。
|
|
6
6
|
|
|
7
7
|
公开导出:`Drawer`。
|
|
8
8
|
|
|
@@ -341,7 +341,7 @@ export default () => {
|
|
|
341
341
|
body: 'custom-drawer-body',
|
|
342
342
|
}}
|
|
343
343
|
styles={{
|
|
344
|
-
body: { paddingBlock: 'var(--drawer-padding)' },
|
|
344
|
+
body: { paddingBlock: 'var(--drawer-spacing-padding)' },
|
|
345
345
|
}}
|
|
346
346
|
drawerRender={(node) => <div data-demo="drawer-shell">{node}</div>}
|
|
347
347
|
onClose={() => setOpen(false)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Drawer 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
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
| `--drawer-icon-hover` | `color` | `var(--apex-icon-neutral-secondary)` | `.apex-drawer.apex-default-drawer` |
|
|
17
17
|
| `--drawer-radius-radius` | `border-radius` | `var(--apex-radius-12)` | `.apex-drawer.apex-default-drawer` |
|
|
18
18
|
| `--drawer-spacing-margin` | `height`、`margin`、`max-height` | `var(--apex-spacing-8)` | `.apex-drawer.apex-default-drawer` |
|
|
19
|
-
| `--drawer-spacing-padding` | `margin-inline-end`、`padding`、`padding-inline-end` | `var(--apex-spacing-16)` | `.apex-drawer.apex-default-drawer` |
|
|
19
|
+
| `--drawer-spacing-padding` | `margin-inline-end`、`padding`、`padding-block-start`、`padding-inline-end` | `var(--apex-spacing-16)` | `.apex-drawer.apex-default-drawer` |
|
|
20
20
|
| `--drawer-spacing-width` | `width` | `var(--apex-size-800)` | `.apex-drawer.apex-default-drawer` |
|
|
21
21
|
| `--drawer-stroke-default` | `border` | `var(--apex-stroke-neutral-quinary)` | `.apex-drawer.apex-default-drawer` |
|
|
22
22
|
| `--drawer-stroke-stroke` | `border` | `var(--apex-border-1)` | `.apex-drawer.apex-default-drawer` |
|
package/dist/files/form/form.css
CHANGED
|
@@ -222,6 +222,16 @@
|
|
|
222
222
|
color: var(--form-text-caption-default);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
/* Figma form1/form2:caption 从控件底边下方 4px 开始。 */
|
|
226
|
+
.apex-form__item--vertical .apex-form__item-caption {
|
|
227
|
+
margin-top: var(--form-spacing-gap);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.apex-form__item--horizontal .apex-form__item-caption,
|
|
231
|
+
.apex-form__item--inline .apex-form__item-caption {
|
|
232
|
+
margin-top: var(--form-spacing-gap-y);
|
|
233
|
+
}
|
|
234
|
+
|
|
225
235
|
/* caption 预留态:保证最小高度防止布局跳动 */
|
|
226
236
|
.apex-form__item-caption[data-reserve] {
|
|
227
237
|
min-height: 16px;
|
package/dist/files/form/llm.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Form 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
|
|
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
| Token | 用途(CSS 属性) | 定义值 | 定义作用域 |
|
|
12
12
|
| --- | --- | --- | --- |
|
|
13
|
+
| `--form-spacing-gap` | `margin-top` | `var(--apex-spacing-4)` | `.apex-form.apex-vertical-form` |
|
|
13
14
|
| `--form-spacing-gap-caption` | `gap` | `var(--apex-spacing-0)` | `.apex-form.apex-horizontal-form` |
|
|
14
15
|
| `--form-spacing-gap-caption` | `gap` | `var(--apex-spacing-0)` | `.apex-form.apex-vertical-form` |
|
|
15
16
|
| `--form-spacing-gap-title` | `column-gap`、`gap` | `var(--apex-spacing-8)` | `.apex-form.apex-horizontal-form` |
|
|
16
17
|
| `--form-spacing-gap-title` | `column-gap`、`gap` | `var(--apex-spacing-4)` | `.apex-form.apex-vertical-form` |
|
|
18
|
+
| `--form-spacing-gap-y` | `margin-top` | `var(--apex-spacing-4)` | `.apex-form.apex-horizontal-form` |
|
|
17
19
|
| `--form-text-caption-default` | `color` | `var(--apex-text-neutral-secondary)` | `.apex-form.apex-default-form` |
|
|
18
20
|
| `--form-text-caption-disabled` | `color` | `var(--apex-text-neutral-disabled)` | `.apex-form.apex-default-form` |
|
|
19
21
|
| `--form-text-caption-error` | `color` | `var(--apex-text-error-primary)` | `.apex-form.apex-default-form` |
|
package/dist/files/grid/llm.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Grid:页面区块需要按 24 栅格划分宽度与响应式列数时。
|
|
4
4
|
|
|
5
|
-
版本:`1.2.
|
|
5
|
+
版本:`1.2.2`。组件源码在本目录,属于当前项目。
|
|
6
6
|
|
|
7
7
|
公开导出:`Col`、`Row`、`useBreakpoint`。
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ import { Col, Row } from '@/components/apex/grid'
|
|
|
16
16
|
import type { CSSProperties } from 'react'
|
|
17
17
|
|
|
18
18
|
const boxStyle: CSSProperties = {
|
|
19
|
-
background: 'var(--apex-fill-neutral-secondary
|
|
19
|
+
background: 'var(--apex-fill-neutral-secondary)',
|
|
20
20
|
padding: '8px 0',
|
|
21
21
|
textAlign: 'center',
|
|
22
22
|
borderRadius: 4,
|
|
@@ -173,7 +173,7 @@ import { Col, Row } from '@/components/apex/grid'
|
|
|
173
173
|
import type { CSSProperties } from 'react'
|
|
174
174
|
|
|
175
175
|
const boxStyle: CSSProperties = {
|
|
176
|
-
background: 'var(--apex-fill-neutral-secondary
|
|
176
|
+
background: 'var(--apex-fill-neutral-secondary)',
|
|
177
177
|
padding: '8px 0',
|
|
178
178
|
textAlign: 'center',
|
|
179
179
|
borderRadius: 4,
|
|
@@ -204,7 +204,7 @@ import { Col, Row } from '@/components/apex/grid'
|
|
|
204
204
|
import type { CSSProperties } from 'react'
|
|
205
205
|
|
|
206
206
|
const boxStyle: CSSProperties = {
|
|
207
|
-
background: 'var(--apex-fill-neutral-secondary
|
|
207
|
+
background: 'var(--apex-fill-neutral-secondary)',
|
|
208
208
|
padding: '8px 0',
|
|
209
209
|
textAlign: 'center',
|
|
210
210
|
borderRadius: 4,
|
|
@@ -262,7 +262,7 @@ import { Typography } from '@/components/apex/typography'
|
|
|
262
262
|
import type { CSSProperties } from 'react'
|
|
263
263
|
|
|
264
264
|
const boxStyle: CSSProperties = {
|
|
265
|
-
background: 'var(--apex-fill-neutral-secondary
|
|
265
|
+
background: 'var(--apex-fill-neutral-secondary)',
|
|
266
266
|
padding: '8px 0',
|
|
267
267
|
textAlign: 'center',
|
|
268
268
|
borderRadius: 4,
|
|
@@ -270,7 +270,7 @@ const boxStyle: CSSProperties = {
|
|
|
270
270
|
|
|
271
271
|
const rowStyle: CSSProperties = {
|
|
272
272
|
width: '100%',
|
|
273
|
-
backgroundColor: '
|
|
273
|
+
backgroundColor: 'var(--apex-fill-neutral-primary)',
|
|
274
274
|
borderRadius: 4,
|
|
275
275
|
}
|
|
276
276
|
|
|
@@ -320,7 +320,7 @@ import { Col, Row } from '@/components/apex/grid'
|
|
|
320
320
|
import type { CSSProperties } from 'react'
|
|
321
321
|
|
|
322
322
|
const boxStyle: CSSProperties = {
|
|
323
|
-
background: 'var(--apex-fill-neutral-secondary
|
|
323
|
+
background: 'var(--apex-fill-neutral-secondary)',
|
|
324
324
|
padding: '8px 0',
|
|
325
325
|
textAlign: 'center',
|
|
326
326
|
borderRadius: 4,
|
|
@@ -356,7 +356,7 @@ export default () => (
|
|
|
356
356
|
import { Col, Row } from '@/components/apex/grid'
|
|
357
357
|
|
|
358
358
|
const boxStyle = {
|
|
359
|
-
background: 'var(--apex-fill-neutral-secondary
|
|
359
|
+
background: 'var(--apex-fill-neutral-secondary)',
|
|
360
360
|
padding: '8px 12px',
|
|
361
361
|
borderRadius: 4,
|
|
362
362
|
display: 'flex',
|
|
@@ -386,7 +386,7 @@ import { Col, Row } from '@/components/apex/grid'
|
|
|
386
386
|
import type { CSSProperties } from 'react'
|
|
387
387
|
|
|
388
388
|
const boxStyle: CSSProperties = {
|
|
389
|
-
background: 'var(--apex-fill-neutral-secondary
|
|
389
|
+
background: 'var(--apex-fill-neutral-secondary)',
|
|
390
390
|
padding: '8px 0',
|
|
391
391
|
textAlign: 'center',
|
|
392
392
|
borderRadius: 4,
|
|
@@ -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
|
>
|