@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Button:标记一个或多个操作(提交、确认、跳转等)时。
|
|
4
4
|
|
|
5
|
-
版本:`1.2.
|
|
5
|
+
版本:`1.2.2`。组件源码在本目录,属于当前项目。
|
|
6
6
|
|
|
7
7
|
公开导出:`Button`。
|
|
8
8
|
|
|
@@ -31,8 +31,8 @@ export default () => <Button type="primary">主要按钮</Button>
|
|
|
31
31
|
| 属性 | 说明 | 类型 | 必填 | 默认值 | 版本 |
|
|
32
32
|
| --- | --- | --- | --- | --- | --- |
|
|
33
33
|
| type | 按钮类型,控制外观样式<br>- `default`:默认边框按钮(白底)<br>- `primary`:主色实心按钮<br>- `danger`:危险操作(边框红色)<br>- `text`:纯文字,无边框无背景<br>- `link`:链接样式,无边框无背景<br>注:`tabCapsule` 为 Tabs capsule 内部变体,不在对外 API 中暴露。 | `"default" \| "primary" \| "danger" \| "text" \| "link"` | 否 | `'default'` | `0.1.0` |
|
|
34
|
-
| variant | Figma visual style. When provided, it overrides the style implied by `type`.<br>- `main`: solid emphasis<br>- `outline`: bordered emphasis<br>- `secondary`: neutral filled action<br>- `text` / `link`: low-emphasis actions<br>- `icon`: icon-only
|
|
35
|
-
| tone | Visual intent. `main`, `outline`, and `icon` support every tone;<br>`icon-transparent`, `secondary`, `text
|
|
34
|
+
| variant | Figma visual style. When provided, it overrides the style implied by `type`.<br>- `main`: solid emphasis<br>- `outline`: bordered emphasis<br>- `secondary`: neutral filled action<br>- `text` / `text-secondary` / `link`: low-emphasis actions<br>- `icon` / `icon-primary`: icon-only actions with hover fill<br>- `icon-transparent`: icon-only action, fully transparent background | `"text" \| "link" \| "main" \| "outline" \| "secondary" \| "text-secondary" \| "icon" \| "icon-primary" \| "icon-transparent" \| null` | 否 | — | `0.1.0` |
|
|
35
|
+
| tone | Visual intent. `main`, `outline`, and `icon` support every tone;<br>`icon-primary`, `icon-transparent`, `secondary`, `text`,<br>`text-secondary`, and `link` use `default`.<br>When omitted, the legacy `danger` type resolves to `error`; other types<br>resolve to `default`. | `"default" \| "error" \| "success" \| "warning" \| null` | 否 | — | `0.1.0` |
|
|
36
36
|
| size | 按钮尺寸(`medium` 32px / `small` 24px;水平内边距共用 `--button-spacing-padding-x`) | `"small" \| "medium" \| null` | 否 | `'medium'` | `0.1.0` |
|
|
37
37
|
| disabled | 是否禁用。禁用时不可点击,视觉降级 | `boolean` | 否 | `false` | — |
|
|
38
38
|
| loading | 是否显示加载状态。<br>loading 为 true 时:不可点击,icon 位置替换为 loading 指示器 | `boolean` | 否 | `false` | `0.1.0` |
|
|
@@ -42,6 +42,7 @@ export default () => <Button type="primary">主要按钮</Button>
|
|
|
42
42
|
| target | 链接 target。依赖 `href`,仅在 `href` 存在时生效。 | `string` | 否 | — | — |
|
|
43
43
|
| asChild | 将按钮的样式与 props 合并到直接子元素上,而非渲染内置 `<button>` / `<a>`。<br>用于多态组合——让任意元素(如 `<a>`、路由 `Link`)拥有按钮外观。<br>优先级高于 `href` / `htmlType`。 | `boolean` | 否 | `false` | `0.1.0` |
|
|
44
44
|
| icon | 前置图标。loading 为 true 时此 prop 被 loading 指示器替换 | `React.ReactNode` | 否 | — | — |
|
|
45
|
+
| suffixIcon | 尾部图标;loading 时仍保留在文案后方。 | `React.ReactNode` | 否 | — | — |
|
|
45
46
|
| block | 是否撑满父容器宽度(`display: flex; width: 100%`) | `boolean \| null` | 否 | `false` | `0.1.0` |
|
|
46
47
|
| className | 根节点类名 | `string` | 否 | — | — |
|
|
47
48
|
| style | 根节点内联样式(禁止硬编码色值,优先 CSS Token) | `React.CSSProperties` | 否 | — | — |
|
|
@@ -72,7 +73,7 @@ type ButtonVariants = VariantProps<typeof buttonVariants>
|
|
|
72
73
|
|
|
73
74
|
### 外观类型
|
|
74
75
|
|
|
75
|
-
通过 `type` 控制外观:`default`、`primary`、`danger`、`text`、`link`。`main` / `outline` / `icon` 等 Figma 样式可通过 `variant` + `tone`
|
|
76
|
+
通过 `type` 控制外观:`default`、`primary`、`danger`、`text`、`link`。`main` / `outline` / `icon` 等 Figma 样式可通过 `variant` + `tone` 组合;`text-secondary` 对应设计稿的透明文字样式,`icon-primary` 对应主色图标按钮。显式传入 `variant` 时优先于 `type`。
|
|
76
77
|
|
|
77
78
|
```tsx
|
|
78
79
|
import { Button } from '@/components/apex/button'
|
|
@@ -90,7 +91,7 @@ export default () => (
|
|
|
90
91
|
|
|
91
92
|
### 尺寸
|
|
92
93
|
|
|
93
|
-
提供 `medium`(默认)与 `small`
|
|
94
|
+
提供 `medium`(默认)与 `small` 两种尺寸。对应文字为 14px / 20px 与 12px / 16px;前后图标占位分别为 20px 与 16px。
|
|
94
95
|
|
|
95
96
|
```tsx
|
|
96
97
|
import { Button } from '@/components/apex/button'
|
|
@@ -148,9 +149,9 @@ export default () => (
|
|
|
148
149
|
)
|
|
149
150
|
```
|
|
150
151
|
|
|
151
|
-
###
|
|
152
|
+
### 图标
|
|
152
153
|
|
|
153
|
-
通过 `icon`
|
|
154
|
+
通过 `icon` 在文案前插入图标,`suffixIcon` 在文案后插入图标;`loading` 时前置 icon 会被 loading 指示器替换。
|
|
154
155
|
|
|
155
156
|
```tsx
|
|
156
157
|
import { Button } from '@/components/apex/button'
|
|
@@ -167,7 +168,14 @@ export default () => (
|
|
|
167
168
|
<Button type="primary" icon={<StarIcon />}>
|
|
168
169
|
主要带图标
|
|
169
170
|
</Button>
|
|
171
|
+
<Button type="primary" icon={<StarIcon />} suffixIcon={<StarIcon />}>
|
|
172
|
+
前后图标
|
|
173
|
+
</Button>
|
|
174
|
+
<Button variant="text-secondary" suffixIcon={<StarIcon />}>
|
|
175
|
+
透明文字
|
|
176
|
+
</Button>
|
|
170
177
|
<Button type="primary" icon={<StarIcon />} aria-label="收藏" />
|
|
178
|
+
<Button variant="icon-primary" icon={<StarIcon />} aria-label="收藏(主色图标)" />
|
|
171
179
|
</div>
|
|
172
180
|
)
|
|
173
181
|
```
|
|
@@ -220,7 +228,7 @@ export default () => (
|
|
|
220
228
|
|
|
221
229
|
## DOM 结构
|
|
222
230
|
|
|
223
|
-
|
|
231
|
+
源码声明的静态 `data-slot`:`button-loading-icon`、`button-icon`、`button-suffix-icon`、`button-content`。具体节点随模式和状态出现,不表示固定嵌套顺序。
|
|
224
232
|
|
|
225
233
|
## 样式定制
|
|
226
234
|
|
|
@@ -13,8 +13,10 @@ export const buttonVariants = cva('apex-button', {
|
|
|
13
13
|
outline: 'apex-button--outline',
|
|
14
14
|
secondary: 'apex-button--secondary',
|
|
15
15
|
text: 'apex-button--text',
|
|
16
|
+
'text-secondary': 'apex-button--text',
|
|
16
17
|
link: 'apex-button--link',
|
|
17
18
|
icon: 'apex-button--icon-variant',
|
|
19
|
+
'icon-primary': 'apex-button--icon-variant',
|
|
18
20
|
'icon-transparent': 'apex-button--icon-variant',
|
|
19
21
|
},
|
|
20
22
|
tone: {
|
|
@@ -53,8 +55,10 @@ export const buttonVariants = cva('apex-button', {
|
|
|
53
55
|
{ variant: 'outline', tone: 'warning', class: 'apex-outline-warning-button' },
|
|
54
56
|
{ variant: 'secondary', tone: 'default', class: 'apex-secondary-default-button' },
|
|
55
57
|
{ variant: 'text', tone: 'default', class: 'apex-text-default-button' },
|
|
58
|
+
{ variant: 'text-secondary', tone: 'default', class: 'apex-text-secondary-button' },
|
|
56
59
|
{ variant: 'link', tone: 'default', class: 'apex-link-default-button' },
|
|
57
60
|
{ variant: 'icon', tone: 'default', class: 'apex-icon-secondary-button' },
|
|
61
|
+
{ variant: 'icon-primary', tone: 'default', class: 'apex-icon-primary-button' },
|
|
58
62
|
{ variant: 'icon', tone: 'error', class: 'apex-icon-error-button' },
|
|
59
63
|
{ variant: 'icon', tone: 'success', class: 'apex-icon-success-button' },
|
|
60
64
|
{ variant: 'icon', tone: 'warning', class: 'apex-icon-warning-button' },
|
|
@@ -68,10 +72,14 @@ export const buttonVariants = cva('apex-button', {
|
|
|
68
72
|
{ variant: 'secondary', size: 'small', class: 'apex-main-sm-button' },
|
|
69
73
|
{ variant: 'text', size: 'medium', class: 'apex-text-md-button' },
|
|
70
74
|
{ variant: 'text', size: 'small', class: 'apex-text-sm-button' },
|
|
75
|
+
{ variant: 'text-secondary', size: 'medium', class: 'apex-text-md-button' },
|
|
76
|
+
{ variant: 'text-secondary', size: 'small', class: 'apex-text-sm-button' },
|
|
71
77
|
{ variant: 'link', size: 'medium', class: 'apex-link-md-button' },
|
|
72
78
|
{ variant: 'link', size: 'small', class: 'apex-link-sm-button' },
|
|
73
79
|
{ variant: 'icon', size: 'medium', class: 'apex-icon-md-button' },
|
|
74
80
|
{ variant: 'icon', size: 'small', class: 'apex-icon-sm-button' },
|
|
81
|
+
{ variant: 'icon-primary', size: 'medium', class: 'apex-icon-md-button' },
|
|
82
|
+
{ variant: 'icon-primary', size: 'small', class: 'apex-icon-sm-button' },
|
|
75
83
|
{ variant: 'icon-transparent', size: 'medium', class: 'apex-icon-md-button' },
|
|
76
84
|
{ variant: 'icon-transparent', size: 'small', class: 'apex-icon-sm-button' },
|
|
77
85
|
],
|
package/dist/files/card/Card.tsx
CHANGED
|
@@ -19,6 +19,7 @@ const prefixCls = 'apex-card'
|
|
|
19
19
|
* data-headless 属性供 CSS 切换顶部 padding(见 card.css)。
|
|
20
20
|
*/
|
|
21
21
|
export const Card: React.FC<CardProps> = ({
|
|
22
|
+
variant = 'primary',
|
|
22
23
|
title,
|
|
23
24
|
extra,
|
|
24
25
|
children,
|
|
@@ -33,7 +34,13 @@ export const Card: React.FC<CardProps> = ({
|
|
|
33
34
|
ref={ref}
|
|
34
35
|
data-slot="card"
|
|
35
36
|
data-headless={hasHeader ? 'false' : 'true'}
|
|
36
|
-
|
|
37
|
+
data-variant={variant}
|
|
38
|
+
className={cn(
|
|
39
|
+
prefixCls,
|
|
40
|
+
'apex-default-card',
|
|
41
|
+
variant === 'secondary' ? 'apex-secondary-card' : 'apex-primary-card',
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
37
44
|
{...restProps}
|
|
38
45
|
>
|
|
39
46
|
{hasHeader && (
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.card-states-gallery {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
|
|
4
|
+
gap: 24px 16px;
|
|
5
|
+
width: min(100%, 1328px);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.card-states-gallery__item {
|
|
9
|
+
min-width: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.card-states-gallery__label {
|
|
13
|
+
display: block;
|
|
14
|
+
margin-bottom: 8px;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
color: var(--apex-text-neutral-secondary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.card-states-gallery__card {
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.card-states-gallery__content {
|
|
24
|
+
display: grid;
|
|
25
|
+
place-items: center;
|
|
26
|
+
height: 89px;
|
|
27
|
+
font: 400 16px/24px Inter, sans-serif;
|
|
28
|
+
background: color-mix(
|
|
29
|
+
in srgb,
|
|
30
|
+
var(--apex-fill-neutral-secondary),
|
|
31
|
+
var(--apex-fill-neutral-tertiary)
|
|
32
|
+
);
|
|
33
|
+
color: var(--apex-text-neutral-primary);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.card-states-gallery__card[data-preview-state='hover'] {
|
|
37
|
+
border-color: var(--card-stroke-hover);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.card-states-gallery__card[data-preview-state='active'] {
|
|
41
|
+
border-color: var(--card-stroke-active, var(--apex-stroke-brand-tertiary));
|
|
42
|
+
}
|
package/dist/files/card/card.css
CHANGED
|
@@ -20,7 +20,12 @@
|
|
|
20
20
|
border-color: var(--card-stroke-hover);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.apex-card
|
|
23
|
+
.apex-card:active {
|
|
24
|
+
/* The primary token currently resolves through a missing alias. */
|
|
25
|
+
border-color: var(--card-stroke-active, var(--apex-stroke-brand-tertiary));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.apex-card[data-selected]:not([data-selected='false']),
|
|
24
29
|
.apex-card[aria-selected='true'] {
|
|
25
30
|
border-color: var(--card-stroke-selected);
|
|
26
31
|
}
|
|
@@ -5,6 +5,9 @@ import type * as React from 'react'
|
|
|
5
5
|
* 根据是否传入 title/extra 自动切换「有标题」「无标题」两种形态。
|
|
6
6
|
*/
|
|
7
7
|
export interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
8
|
+
/** 卡片表面层级;primary 用于页面主容器,secondary 用于嵌套区域 */
|
|
9
|
+
variant?: 'primary' | 'secondary'
|
|
10
|
+
|
|
8
11
|
/** 卡片标题,存在时渲染头部区域 */
|
|
9
12
|
title?: React.ReactNode
|
|
10
13
|
|
package/dist/files/card/llm.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Card:需要将一组相关信息收纳在带边框的容器内,与页面背景区分时。
|
|
4
4
|
|
|
5
|
-
版本:`1.2.
|
|
5
|
+
版本:`1.2.2`。组件源码在本目录,属于当前项目。
|
|
6
6
|
|
|
7
7
|
公开导出:`Card`。
|
|
8
8
|
|
|
@@ -34,6 +34,7 @@ export default () => (
|
|
|
34
34
|
|
|
35
35
|
| 属性 | 说明 | 类型 | 必填 | 默认值 |
|
|
36
36
|
| --- | --- | --- | --- | --- |
|
|
37
|
+
| variant | 卡片表面层级;primary 用于页面主容器,secondary 用于嵌套区域 | `"primary" \| "secondary"` | 否 | — |
|
|
37
38
|
| title | 卡片标题,存在时渲染头部区域 | `React.ReactNode` | 否 | — |
|
|
38
39
|
| extra | 卡片右上角操作区域;与 title 任一存在即渲染 header | `React.ReactNode` | 否 | — |
|
|
39
40
|
| children | 卡片内容区 | `React.ReactNode` | 否 | — |
|
|
@@ -72,6 +73,28 @@ export default () => (
|
|
|
72
73
|
)
|
|
73
74
|
```
|
|
74
75
|
|
|
76
|
+
### 表面层级
|
|
77
|
+
|
|
78
|
+
React Card 可用 `variant` 切换 `primary`(默认)和 `secondary` 表面。悬停、按下以及通过 `data-selected` 标记选中时,边框会显示对应状态。
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
import { Card } from '@/components/apex/card'
|
|
82
|
+
|
|
83
|
+
export default () => (
|
|
84
|
+
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 16 }}>
|
|
85
|
+
<Card title="主表面" variant="primary" style={{ width: 240 }}>
|
|
86
|
+
页面中的主要内容区域
|
|
87
|
+
</Card>
|
|
88
|
+
<Card title="次级表面" variant="secondary" style={{ width: 240 }}>
|
|
89
|
+
需要区分层级的内容区域
|
|
90
|
+
</Card>
|
|
91
|
+
<Card title="已选中" variant="secondary" data-selected="" style={{ width: 240 }}>
|
|
92
|
+
通过 data-selected 标记选中状态
|
|
93
|
+
</Card>
|
|
94
|
+
</div>
|
|
95
|
+
)
|
|
96
|
+
```
|
|
97
|
+
|
|
75
98
|
## DOM 结构
|
|
76
99
|
|
|
77
100
|
源码声明的静态 `data-slot`:`card`、`card-header`、`card-title`、`card-extra`、`card-body`。具体节点随模式和状态出现,不表示固定嵌套顺序。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Card 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
|
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
| `--card-spacing-padding-y-bottom` | `padding` | `var(--apex-spacing-16)` | `.apex-card.apex-default-card` |
|
|
19
19
|
| `--card-spacing-padding-y-top` | `padding-top` | `var(--apex-spacing-16)` | `.apex-card.apex-default-card` |
|
|
20
20
|
| `--card-spacing-padding-y-top-header` | `padding` | `var(--apex-spacing-12)` | `.apex-card.apex-default-card` |
|
|
21
|
+
| `--card-stroke-active` | `border-color` | `var(--apex-button-outline-brand-stroke-active)` | `.apex-card.apex-primary-card` |
|
|
22
|
+
| `--card-stroke-active` | `border-color` | `var(--apex-stroke-brand-tertiary)` | `.apex-card.apex-secondary-card` |
|
|
21
23
|
| `--card-stroke-default` | `border` | `var(--apex-stroke-neutral-secondary)` | `.apex-card.apex-primary-card` |
|
|
22
24
|
| `--card-stroke-default` | `border` | `var(--apex-stroke-neutral-tertiary)` | `.apex-card.apex-secondary-card` |
|
|
23
25
|
| `--card-stroke-hover` | `border-color` | `var(--apex-stroke-brand-secondary)` | `.apex-card.apex-primary-card` |
|
|
@@ -192,6 +192,22 @@ export function getDescendantKeys(pathKey: string, index: CascaderIndex): string
|
|
|
192
192
|
return index.nodes.get(pathKey)?.descendantKeys ?? []
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
function getCheckableDescendantKeys(pathKey: string, index: CascaderIndex): string[] {
|
|
196
|
+
const result: string[] = []
|
|
197
|
+
const walk = (key: string) => {
|
|
198
|
+
const meta = index.nodes.get(key)
|
|
199
|
+
if (!meta?.option.children || meta.option.disabled) return
|
|
200
|
+
for (const child of meta.option.children) {
|
|
201
|
+
if (child.disabled) continue
|
|
202
|
+
const childKey = pathToKey([...meta.path, child.value])
|
|
203
|
+
result.push(childKey)
|
|
204
|
+
walk(childKey)
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
walk(pathKey)
|
|
208
|
+
return result
|
|
209
|
+
}
|
|
210
|
+
|
|
195
211
|
export function expandPathsToCheckedKeys(
|
|
196
212
|
paths: CascaderValuePath[],
|
|
197
213
|
index: CascaderIndex,
|
|
@@ -201,7 +217,7 @@ export function expandPathsToCheckedKeys(
|
|
|
201
217
|
const key = pathToKey(path)
|
|
202
218
|
if (!index.nodes.has(key)) continue
|
|
203
219
|
result.add(key)
|
|
204
|
-
for (const descendant of
|
|
220
|
+
for (const descendant of getCheckableDescendantKeys(key, index)) {
|
|
205
221
|
result.add(descendant)
|
|
206
222
|
}
|
|
207
223
|
}
|
|
@@ -218,7 +234,7 @@ export function applyCascaderShowCheckedStrategy(
|
|
|
218
234
|
if (strategy === 'SHOW_CHILD') {
|
|
219
235
|
return checkedKeys
|
|
220
236
|
.filter((key) => {
|
|
221
|
-
const descendants =
|
|
237
|
+
const descendants = getCheckableDescendantKeys(key, index)
|
|
222
238
|
return !descendants.some((childKey) => checkedSet.has(childKey))
|
|
223
239
|
})
|
|
224
240
|
.map((key) => index.nodes.get(key)!.path)
|
|
@@ -226,7 +242,7 @@ export function applyCascaderShowCheckedStrategy(
|
|
|
226
242
|
|
|
227
243
|
const hidden = new Set<string>()
|
|
228
244
|
for (const key of checkedKeys) {
|
|
229
|
-
const descendants =
|
|
245
|
+
const descendants = getCheckableDescendantKeys(key, index)
|
|
230
246
|
if (descendants.length > 0 && descendants.every((childKey) => checkedSet.has(childKey))) {
|
|
231
247
|
for (const childKey of descendants) hidden.add(childKey)
|
|
232
248
|
}
|
|
@@ -243,7 +259,7 @@ export function getCheckState(
|
|
|
243
259
|
if (checkedKeys.has(pathKey)) {
|
|
244
260
|
return { checked: true, indeterminate: false }
|
|
245
261
|
}
|
|
246
|
-
const descendants =
|
|
262
|
+
const descendants = getCheckableDescendantKeys(pathKey, index)
|
|
247
263
|
const some = descendants.some((key) => checkedKeys.has(key))
|
|
248
264
|
return { checked: false, indeterminate: some }
|
|
249
265
|
}
|
|
@@ -255,9 +271,9 @@ export function toggleCascadeCheck(
|
|
|
255
271
|
): Set<string> {
|
|
256
272
|
const next = new Set(checkedKeys)
|
|
257
273
|
const meta = index.nodes.get(pathKey)
|
|
258
|
-
if (!meta) return next
|
|
274
|
+
if (!meta || meta.option.disabled) return next
|
|
259
275
|
|
|
260
|
-
const keysToToggle = [pathKey, ...
|
|
276
|
+
const keysToToggle = [pathKey, ...getCheckableDescendantKeys(pathKey, index)]
|
|
261
277
|
const allChecked = keysToToggle.every((key) => next.has(key))
|
|
262
278
|
|
|
263
279
|
if (allChecked) {
|
|
@@ -270,7 +286,7 @@ export function toggleCascadeCheck(
|
|
|
270
286
|
|
|
271
287
|
/**
|
|
272
288
|
* Reconcile parent checked-state bottom-up: a non-leaf node is checked iff all of
|
|
273
|
-
* its direct children are checked. Toggling leaves only mutates leaf keys, so this
|
|
289
|
+
* its checkable direct children are checked. Toggling leaves only mutates leaf keys, so this
|
|
274
290
|
* is what promotes a parent from indeterminate to fully checked once every child is
|
|
275
291
|
* selected (and demotes it when a child is unchecked).
|
|
276
292
|
*/
|
|
@@ -279,9 +295,14 @@ export function reconcileCheckedKeys(checkedKeys: Set<string>, index: CascaderIn
|
|
|
279
295
|
// Deepest paths first so a child's reconciled state is known before its parent.
|
|
280
296
|
const metas = [...index.nodes.values()].sort((a, b) => b.path.length - a.path.length)
|
|
281
297
|
for (const meta of metas) {
|
|
298
|
+
if (meta.option.disabled) continue
|
|
282
299
|
const children = meta.option.children
|
|
283
300
|
if (!children || children.length === 0) continue
|
|
284
|
-
const
|
|
301
|
+
const checkableChildren = children.filter((child) => !child.disabled)
|
|
302
|
+
if (checkableChildren.length === 0) continue
|
|
303
|
+
const allChecked = checkableChildren.every((child) =>
|
|
304
|
+
next.has(pathToKey([...meta.path, child.value])),
|
|
305
|
+
)
|
|
285
306
|
if (allChecked) next.add(meta.pathKey)
|
|
286
307
|
else next.delete(meta.pathKey)
|
|
287
308
|
}
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
pointer-events: auto;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
/*
|
|
61
|
+
/* 只读沿用 disabled 视觉。 */
|
|
62
62
|
.apex-cascader__selector[data-readonly]:not([data-disabled]) .apex-input__inner,
|
|
63
63
|
.apex-cascader__selector[data-readonly]:not([data-disabled]):hover .apex-input__inner,
|
|
64
64
|
.apex-cascader__selector[data-readonly]:not([data-disabled]):focus-within .apex-input__inner {
|
|
65
|
-
background-color: var(--input-fill-
|
|
66
|
-
border-color: var(--input-stroke-
|
|
67
|
-
color: var(--input-text-
|
|
65
|
+
background-color: var(--input-fill-disabled);
|
|
66
|
+
border-color: var(--input-stroke-disabled);
|
|
67
|
+
color: var(--input-text-filled-disabled);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.apex-cascader__selector[data-status='error']:not([data-disabled]):not([data-readonly]) .apex-input__inner {
|
|
@@ -92,12 +92,7 @@
|
|
|
92
92
|
color: inherit;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.apex-cascader__selector:not([data-disabled]):not([data-state='open']):not(:focus-within):not(
|
|
96
|
-
[data-status='error']
|
|
97
|
-
)
|
|
98
|
-
.apex-cascader__selection[data-selected]
|
|
99
|
-
.apex-typography__content,
|
|
100
|
-
.apex-cascader__selector[data-readonly]:not([data-disabled]):not([data-state='open']):not(
|
|
95
|
+
.apex-cascader__selector:not([data-disabled]):not([data-readonly]):not([data-state='open']):not(:focus-within):not(
|
|
101
96
|
[data-status='error']
|
|
102
97
|
)
|
|
103
98
|
.apex-cascader__selection[data-selected]
|
|
@@ -105,6 +100,13 @@
|
|
|
105
100
|
color: var(--input-text-filled-default);
|
|
106
101
|
}
|
|
107
102
|
|
|
103
|
+
.apex-cascader__selector[data-status='error']:not([data-disabled]):not([data-readonly])
|
|
104
|
+
.apex-cascader__selection[data-selected],
|
|
105
|
+
.apex-cascader__selector[data-status='error']:not([data-disabled]):not([data-readonly])
|
|
106
|
+
.apex-cascader__selection[data-selected] .apex-typography__content {
|
|
107
|
+
color: var(--input-text-filled-error);
|
|
108
|
+
}
|
|
109
|
+
|
|
108
110
|
.apex-cascader__selector.apex-input:hover:not([data-disabled]):not([data-readonly])
|
|
109
111
|
.apex-cascader__placeholder {
|
|
110
112
|
color: var(--input-text-placeholder-hover);
|
|
@@ -173,6 +175,19 @@
|
|
|
173
175
|
color: var(--input-text-placeholder-disabled);
|
|
174
176
|
}
|
|
175
177
|
|
|
178
|
+
.apex-cascader__selector.apex-input[data-readonly]:not([data-disabled])
|
|
179
|
+
.apex-cascader__search::placeholder,
|
|
180
|
+
.apex-cascader__selector.apex-input[data-readonly]:not([data-disabled])
|
|
181
|
+
.apex-cascader__placeholder {
|
|
182
|
+
color: var(--input-text-placeholder-disabled);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.apex-cascader__selector:is([data-disabled], [data-readonly])
|
|
186
|
+
.apex-cascader__selection[data-selected]
|
|
187
|
+
.apex-typography__content {
|
|
188
|
+
color: var(--input-text-filled-disabled);
|
|
189
|
+
}
|
|
190
|
+
|
|
176
191
|
/* showSearch:clear / suffix 贴右;search 保持 field-sizing: content 宽度。
|
|
177
192
|
__search / .apex-clear / __suffix 为 .apex-input__inner 直接子级,:has(>) 锚定到 __inner。 */
|
|
178
193
|
.apex-cascader__selector
|
|
@@ -224,6 +239,18 @@
|
|
|
224
239
|
color: var(--input-icon-default);
|
|
225
240
|
}
|
|
226
241
|
|
|
242
|
+
/* 图标尺寸显式锚到 --input-icon-icon(md/lg 16px、sm 14px):BEM 类是 __suffix 而非
|
|
243
|
+
input.css 的 .apex-input__suffix,拿不到那边的 svg 尺寸规则,否则 svg 的
|
|
244
|
+
width="1em" 会跟随继承字号渲染成 14px,比设计稿小 2px。
|
|
245
|
+
注意 Clear Button 走 --clear-size-size(恒 14px),与此处不同轨。 */
|
|
246
|
+
.apex-cascader__prefix svg,
|
|
247
|
+
.apex-cascader__suffix svg {
|
|
248
|
+
display: block;
|
|
249
|
+
flex-shrink: 0;
|
|
250
|
+
width: var(--input-icon-icon);
|
|
251
|
+
height: var(--input-icon-icon);
|
|
252
|
+
}
|
|
253
|
+
|
|
227
254
|
.apex-cascader__selector.apex-input:hover:not([data-disabled]):not([data-readonly])
|
|
228
255
|
.apex-cascader__prefix,
|
|
229
256
|
.apex-cascader__selector.apex-input:hover:not([data-disabled]):not([data-readonly])
|
|
@@ -254,6 +281,11 @@
|
|
|
254
281
|
color: var(--input-icon-disabled);
|
|
255
282
|
}
|
|
256
283
|
|
|
284
|
+
.apex-cascader__selector.apex-input[data-readonly]:not([data-disabled]) .apex-cascader__prefix,
|
|
285
|
+
.apex-cascader__selector.apex-input[data-readonly]:not([data-disabled]) .apex-cascader__suffix {
|
|
286
|
+
color: var(--input-icon-disabled);
|
|
287
|
+
}
|
|
288
|
+
|
|
257
289
|
.apex-cascader__popup {
|
|
258
290
|
z-index: var(--apex-z-index-cascader, 1050);
|
|
259
291
|
}
|
|
@@ -263,12 +295,14 @@
|
|
|
263
295
|
height: auto;
|
|
264
296
|
min-height: 100%;
|
|
265
297
|
margin-inline: 0;
|
|
298
|
+
width: var(--apex-border-1);
|
|
299
|
+
background: var(--dropdown-stroke-container-default, var(--apex-stroke-neutral-quaternary));
|
|
266
300
|
}
|
|
267
301
|
|
|
268
302
|
/* Menus fill the popup viewport; columns own vertical scroll (not __viewport).
|
|
269
303
|
Column max-height subtracts menus padding so content stays inside the shell. */
|
|
270
304
|
.apex-cascader__menus {
|
|
271
|
-
gap: var(--
|
|
305
|
+
gap: var(--cascader-spacing-gap);
|
|
272
306
|
display: flex;
|
|
273
307
|
flex-direction: row;
|
|
274
308
|
align-items: stretch;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Cascader:选项具有清晰的层级关系(省市区、分类目录等),需要从根到叶逐级选择时。
|
|
4
4
|
|
|
5
|
-
版本:`1.2.
|
|
5
|
+
版本:`1.2.2`。组件源码在本目录,属于当前项目。
|
|
6
6
|
|
|
7
7
|
公开导出:`Cascader`。
|
|
8
8
|
|
|
@@ -266,7 +266,7 @@ type MaxTagCount = number | 'responsive'
|
|
|
266
266
|
|
|
267
267
|
### 默认值
|
|
268
268
|
|
|
269
|
-
通过 `defaultValue`
|
|
269
|
+
通过 `defaultValue` 设置非受控初始选中路径。示例可悬停查看清除按钮:medium/large 的下拉箭头为 16px、small 为 14px;清除按钮保持 14px。
|
|
270
270
|
|
|
271
271
|
```tsx
|
|
272
272
|
import { Cascader } from '@/components/apex/cascader'
|
|
@@ -678,7 +678,7 @@ export default () => (
|
|
|
678
678
|
|
|
679
679
|
### 禁用选项
|
|
680
680
|
|
|
681
|
-
在 `options` 中为单项设置 `disabled: true`
|
|
681
|
+
在 `options` 中为单项设置 `disabled: true` 禁止选中。多选时预选一个可用子项,父级显示半选;点击父级只勾选可用子项,不会勾选禁用子项。
|
|
682
682
|
|
|
683
683
|
```tsx
|
|
684
684
|
import type { CascaderOption } from '@/components/apex/cascader'
|
|
@@ -724,9 +724,27 @@ const options: CascaderOption[] = [
|
|
|
724
724
|
},
|
|
725
725
|
]
|
|
726
726
|
|
|
727
|
+
const multipleOptions: CascaderOption[] = [
|
|
728
|
+
{
|
|
729
|
+
value: 'team',
|
|
730
|
+
label: '项目组',
|
|
731
|
+
children: [
|
|
732
|
+
{ value: 'design', label: '设计', isLeaf: true },
|
|
733
|
+
{ value: 'engineering', label: '研发', isLeaf: true },
|
|
734
|
+
{ value: 'archived', label: '已归档', disabled: true, isLeaf: true },
|
|
735
|
+
],
|
|
736
|
+
},
|
|
737
|
+
]
|
|
738
|
+
|
|
727
739
|
export default () => (
|
|
728
|
-
<div style={cascaderWrapStyle}>
|
|
729
|
-
<Cascader options={options} placeholder="
|
|
740
|
+
<div style={{ ...cascaderWrapStyle, display: 'flex', flexDirection: 'column', gap: 12 }}>
|
|
741
|
+
<Cascader options={options} placeholder="禁用父级" />
|
|
742
|
+
<Cascader
|
|
743
|
+
multiple
|
|
744
|
+
options={multipleOptions}
|
|
745
|
+
defaultValue={[['team', 'design']]}
|
|
746
|
+
placeholder="多选与禁用子项"
|
|
747
|
+
/>
|
|
730
748
|
</div>
|
|
731
749
|
)
|
|
732
750
|
```
|
|
@@ -822,7 +840,7 @@ export default () => (
|
|
|
822
840
|
|
|
823
841
|
### 只读
|
|
824
842
|
|
|
825
|
-
`readOnly` 为 true
|
|
843
|
+
`readOnly` 为 true 时不可打开下拉、不可清除或修改;视觉使用禁用配色,但仍可聚焦。示例对照空值与已选路径。
|
|
826
844
|
|
|
827
845
|
```tsx
|
|
828
846
|
import { Cascader } from '@/components/apex/cascader'
|
|
@@ -862,6 +880,7 @@ export default () => (
|
|
|
862
880
|
placeholder="可编辑"
|
|
863
881
|
allowClear
|
|
864
882
|
/>
|
|
883
|
+
<Cascader options={CASCADER_OPTIONS} readOnly placeholder="只读空值" />
|
|
865
884
|
<Cascader
|
|
866
885
|
options={CASCADER_OPTIONS}
|
|
867
886
|
defaultValue={['zhejiang', 'hangzhou', 'xihu']}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cascader 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,7 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
| Token | 用途(CSS 属性) | 定义值 | 定义作用域 |
|
|
12
12
|
| --- | --- | --- | --- |
|
|
13
|
+
| `--cascader-spacing-gap` | `gap` | `var(--apex-spacing-4)` | `.apex-cascader.apex-default-cascader` |
|
|
14
|
+
| `--checkbox-fill-check-active` | `fill` | `var(--apex-fill-brand-tertiary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
15
|
+
| `--checkbox-fill-check-hover` | `fill` | `var(--apex-fill-brand-secondary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
13
16
|
| `--checkbox-fill-checked` | `fill`、`outline` | `var(--apex-fill-brand-primary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
17
|
+
| `--checkbox-fill-disabled` | `fill` | `var(--apex-fill-neutral-quinary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
14
18
|
| `--checkbox-fill-indeterminate` | `fill` | `var(--apex-fill-brand-primary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
15
19
|
| `--checkbox-group-spacing-gap-x` | `column-gap` | `var(--apex-spacing-12)` | `.apex-checkbox-group.apex-default-checkbox-group` |
|
|
16
20
|
| `--checkbox-group-spacing-gap-y` | `row-gap` | `var(--apex-spacing-8)` | `.apex-checkbox-group.apex-default-checkbox-group` |
|
|
@@ -19,13 +23,18 @@
|
|
|
19
23
|
| `--checkbox-icon-indeterminate` | `color` | `var(--apex-icon-neutral-quaternary-stable)` | `.apex-checkbox.apex-default-checkbox` |
|
|
20
24
|
| `--checkbox-radius-radius` | `border-radius` | `var(--apex-radius-4)` | `.apex-checkbox.apex-default-checkbox` |
|
|
21
25
|
| `--checkbox-spacing-gap` | `gap` | `var(--apex-spacing-4)` | `.apex-checkbox.apex-default-checkbox` |
|
|
26
|
+
| `--checkbox-stroke-active` | `color` | `var(--apex-stroke-neutral-septenary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
27
|
+
| `--checkbox-stroke-check-active` | `color` | `var(--apex-stroke-brand-tertiary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
28
|
+
| `--checkbox-stroke-check-hover` | `color` | `var(--apex-stroke-brand-secondary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
22
29
|
| `--checkbox-stroke-checked` | `color` | `var(--apex-stroke-brand-primary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
23
30
|
| `--checkbox-stroke-default` | `color` | `var(--apex-stroke-neutral-denary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
24
|
-
| `--checkbox-stroke-disabled` | `color
|
|
31
|
+
| `--checkbox-stroke-disabled` | `color` | `var(--apex-stroke-neutral-quinary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
25
32
|
| `--checkbox-stroke-hover` | `color` | `var(--apex-stroke-neutral-octonary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
26
33
|
| `--checkbox-stroke-indeterminate` | `color` | `var(--apex-stroke-brand-primary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
34
|
+
| `--checkbox-text-active` | `color` | `var(--apex-text-neutral-tertiary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
27
35
|
| `--checkbox-text-default` | `color` | `var(--apex-text-neutral-primary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
28
36
|
| `--checkbox-text-disabled` | `color` | `var(--apex-text-neutral-disabled)` | `.apex-checkbox.apex-default-checkbox` |
|
|
37
|
+
| `--checkbox-text-hover` | `color` | `var(--apex-text-neutral-secondary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
29
38
|
| `--dropdown-fill-active` | `background-color` | `var(--apex-fill-neutral-quaternary)` | `.apex-dropdown.apex-default-dropdown` |
|
|
30
39
|
| `--dropdown-fill-container-default` | `background-color` | `var(--apex-fill-neutral-secondary)` | `.apex-dropdown.apex-default-dropdown` |
|
|
31
40
|
| `--dropdown-fill-default` | `background-color` | `var(--apex-fill-neutral-transparent)` | `.apex-dropdown.apex-default-dropdown` |
|
|
@@ -65,7 +74,7 @@
|
|
|
65
74
|
| `--dropdown-spacing-item-padding-x-item` | `padding`、`padding-inline` | `var(--apex-spacing-12)` | `.apex-dropdown.apex-sm-dropdown` |
|
|
66
75
|
| `--dropdown-stroke` | `border-width` | `var(--apex-border-1)` | `.apex-dropdown.apex-lg-dropdown` |
|
|
67
76
|
| `--dropdown-stroke` | `border-width` | `var(--apex-border-1)` | `.apex-dropdown.apex-sm-dropdown` |
|
|
68
|
-
| `--dropdown-stroke-container-default` | `border-color` | `var(--apex-stroke-neutral-quinary)` | `.apex-dropdown.apex-default-dropdown` |
|
|
77
|
+
| `--dropdown-stroke-container-default` | `background`、`border-color` | `var(--apex-stroke-neutral-quinary)` | `.apex-dropdown.apex-default-dropdown` |
|
|
69
78
|
| `--dropdown-text-active` | `color` | `var(--apex-text-neutral-primary)` | `.apex-dropdown.apex-default-dropdown` |
|
|
70
79
|
| `--dropdown-text-default` | `color` | `var(--apex-text-neutral-primary)` | `.apex-dropdown.apex-default-dropdown` |
|
|
71
80
|
| `--dropdown-text-disabled` | `color` | `var(--apex-text-neutral-disabled)` | `.apex-dropdown.apex-default-dropdown` |
|
|
@@ -181,10 +190,10 @@
|
|
|
181
190
|
| `--input-stroke-stroke` | `border-width`、`padding-block` | `var(--apex-border-1)` | `.apex-input.apex-sm-input` |
|
|
182
191
|
| `--input-text-filled-default` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
|
|
183
192
|
| `--input-text-filled-default` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
|
|
184
|
-
| `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-
|
|
193
|
+
| `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-disabled)` | `.apex-input.apex-default-input` |
|
|
185
194
|
| `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-disabled)` | `.apex-input.apex-elevated-input` |
|
|
186
|
-
| `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-
|
|
187
|
-
| `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-
|
|
195
|
+
| `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
|
|
196
|
+
| `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
|
|
188
197
|
| `--input-text-filled-focused` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
|
|
189
198
|
| `--input-text-filled-focused` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
|
|
190
199
|
| `--input-text-filled-hover` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
|
|
@@ -200,7 +209,6 @@
|
|
|
200
209
|
| `--input-text-placeholder-hover` | `color` | `var(--apex-text-neutral-tertiary)` | `.apex-input.apex-default-input` |
|
|
201
210
|
| `--input-text-placeholder-hover` | `color` | `var(--apex-text-neutral-tertiary)` | `.apex-input.apex-elevated-input` |
|
|
202
211
|
| `--tag-active` | `color` | `var(--apex-icon-neutral-tertiary)` | `.apex-tag.apex-close-tag` |
|
|
203
|
-
| `--tag-default` | `color` | `var(--apex-icon-neutral-primary)` | `.apex-tag.apex-close-tag` |
|
|
204
212
|
| `--tag-fill-default` | `background-color` | `var(--apex-fill-brand-alpha-secondary)` | `.apex-tag.apex-filled-default-brand-tag` |
|
|
205
213
|
| `--tag-fill-default` | `background-color` | `var(--apex-fill-neutral-secondary)` | `.apex-tag.apex-filled-default-default-tag` |
|
|
206
214
|
| `--tag-fill-default` | `background-color` | `var(--apex-fill-error-alpha-secondary)` | `.apex-tag.apex-filled-default-error-tag` |
|
|
@@ -23,7 +23,7 @@ export const cascaderSelectorVariants = cva('apex-cascader__selector apex-input'
|
|
|
23
23
|
选项行复用 `.apex-dropdown__item` BEM 拿布局(flex / padding / min-height),
|
|
24
24
|
token 值从祖先 popup 继承(对齐 Select)。 */
|
|
25
25
|
export const cascaderPopupVariants = cva(
|
|
26
|
-
'apex-cascader__popup apex-dropdown apex-default-dropdown apex-sm-dropdown shadow',
|
|
26
|
+
'apex-cascader__popup apex-cascader apex-default-cascader apex-dropdown apex-default-dropdown apex-sm-dropdown shadow',
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
export const cascaderMenusVariants = cva('apex-cascader__menus')
|