@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Checkbox 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,10 @@
|
|
|
10
10
|
|
|
11
11
|
| Token | 用途(CSS 属性) | 定义值 | 定义作用域 |
|
|
12
12
|
| --- | --- | --- | --- |
|
|
13
|
+
| `--checkbox-fill-check-active` | `fill` | `var(--apex-fill-brand-tertiary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
14
|
+
| `--checkbox-fill-check-hover` | `fill` | `var(--apex-fill-brand-secondary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
13
15
|
| `--checkbox-fill-checked` | `fill`、`outline` | `var(--apex-fill-brand-primary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
16
|
+
| `--checkbox-fill-disabled` | `fill` | `var(--apex-fill-neutral-quinary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
14
17
|
| `--checkbox-fill-indeterminate` | `fill` | `var(--apex-fill-brand-primary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
15
18
|
| `--checkbox-group-spacing-gap-x` | `column-gap` | `var(--apex-spacing-12)` | `.apex-checkbox-group.apex-default-checkbox-group` |
|
|
16
19
|
| `--checkbox-group-spacing-gap-y` | `row-gap` | `var(--apex-spacing-8)` | `.apex-checkbox-group.apex-default-checkbox-group` |
|
|
@@ -19,10 +22,15 @@
|
|
|
19
22
|
| `--checkbox-icon-indeterminate` | `color` | `var(--apex-icon-neutral-quaternary-stable)` | `.apex-checkbox.apex-default-checkbox` |
|
|
20
23
|
| `--checkbox-radius-radius` | `border-radius` | `var(--apex-radius-4)` | `.apex-checkbox.apex-default-checkbox` |
|
|
21
24
|
| `--checkbox-spacing-gap` | `gap` | `var(--apex-spacing-4)` | `.apex-checkbox.apex-default-checkbox` |
|
|
25
|
+
| `--checkbox-stroke-active` | `color` | `var(--apex-stroke-neutral-septenary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
26
|
+
| `--checkbox-stroke-check-active` | `color` | `var(--apex-stroke-brand-tertiary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
27
|
+
| `--checkbox-stroke-check-hover` | `color` | `var(--apex-stroke-brand-secondary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
22
28
|
| `--checkbox-stroke-checked` | `color` | `var(--apex-stroke-brand-primary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
23
29
|
| `--checkbox-stroke-default` | `color` | `var(--apex-stroke-neutral-denary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
24
|
-
| `--checkbox-stroke-disabled` | `color
|
|
30
|
+
| `--checkbox-stroke-disabled` | `color` | `var(--apex-stroke-neutral-quinary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
25
31
|
| `--checkbox-stroke-hover` | `color` | `var(--apex-stroke-neutral-octonary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
26
32
|
| `--checkbox-stroke-indeterminate` | `color` | `var(--apex-stroke-brand-primary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
33
|
+
| `--checkbox-text-active` | `color` | `var(--apex-text-neutral-tertiary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
27
34
|
| `--checkbox-text-default` | `color` | `var(--apex-text-neutral-primary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
28
35
|
| `--checkbox-text-disabled` | `color` | `var(--apex-text-neutral-disabled)` | `.apex-checkbox.apex-default-checkbox` |
|
|
36
|
+
| `--checkbox-text-hover` | `color` | `var(--apex-text-neutral-secondary)` | `.apex-checkbox.apex-default-checkbox` |
|
|
@@ -17,8 +17,11 @@
|
|
|
17
17
|
font: inherit;
|
|
18
18
|
border-radius: var(--apex-radius-999);
|
|
19
19
|
cursor: pointer;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
/* Figma:Clear Button 恒为 14×14,与同排下拉箭头(--input-icon-icon,md/lg 16px)
|
|
21
|
+
不同轨。消费方可用 --clear-size-size 覆盖;不要再挂回 --input-icon-icon,
|
|
22
|
+
否则 md/lg 下会被拉到 16px。 */
|
|
23
|
+
width: var(--clear-size-size, var(--apex-icon-14));
|
|
24
|
+
height: var(--clear-size-size, var(--apex-icon-14));
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
.apex-clear__icon,
|
|
@@ -42,9 +42,9 @@ const EMPTY_PRESETS: RangePickerPreset[] = []
|
|
|
42
42
|
dayjs.extend(weekOfYear)
|
|
43
43
|
dayjs.extend(quarterOfYear)
|
|
44
44
|
|
|
45
|
-
function
|
|
45
|
+
function CalendarPrefixIcon() {
|
|
46
46
|
return (
|
|
47
|
-
<span className="apex-
|
|
47
|
+
<span className="apex-input__prefix" data-slot="date-picker-prefix" aria-hidden="true">
|
|
48
48
|
<Icon name="calendar" />
|
|
49
49
|
</span>
|
|
50
50
|
)
|
|
@@ -919,6 +919,8 @@ export const RangePicker: React.FC<RangePickerProps> = ({
|
|
|
919
919
|
data-readonly={readOnly || undefined}
|
|
920
920
|
onClick={handleInnerClick}
|
|
921
921
|
>
|
|
922
|
+
{!readOnly ? <CalendarPrefixIcon /> : null}
|
|
923
|
+
|
|
922
924
|
{/* Start trigger */}
|
|
923
925
|
<Trigger
|
|
924
926
|
style={{ display: 'flex', justifyContent: 'center' }}
|
|
@@ -998,7 +1000,7 @@ export const RangePicker: React.FC<RangePickerProps> = ({
|
|
|
998
1000
|
}}
|
|
999
1001
|
/>
|
|
1000
1002
|
|
|
1001
|
-
{/* Clear button
|
|
1003
|
+
{/* Clear button */}
|
|
1002
1004
|
{!readOnly && allowClear && (value[0] || value[1]) ? (
|
|
1003
1005
|
<Clear
|
|
1004
1006
|
data-slot="date-picker-clear"
|
|
@@ -1009,8 +1011,6 @@ export const RangePicker: React.FC<RangePickerProps> = ({
|
|
|
1009
1011
|
}}
|
|
1010
1012
|
/>
|
|
1011
1013
|
) : null}
|
|
1012
|
-
|
|
1013
|
-
{!readOnly ? <CalendarSuffixIcon /> : null}
|
|
1014
1014
|
</div>
|
|
1015
1015
|
</div>
|
|
1016
1016
|
|
|
@@ -80,6 +80,11 @@ export const Trigger: React.FC<
|
|
|
80
80
|
data-readonly={readOnly || undefined}
|
|
81
81
|
{...rest}
|
|
82
82
|
>
|
|
83
|
+
{!isRange && !readOnly ? (
|
|
84
|
+
<span className="apex-input__prefix" data-slot="date-picker-prefix" aria-hidden="true">
|
|
85
|
+
<Icon name="calendar" />
|
|
86
|
+
</span>
|
|
87
|
+
) : null}
|
|
83
88
|
<span
|
|
84
89
|
style={style}
|
|
85
90
|
className={cn(
|
|
@@ -101,11 +106,6 @@ export const Trigger: React.FC<
|
|
|
101
106
|
}}
|
|
102
107
|
/>
|
|
103
108
|
) : null}
|
|
104
|
-
{!isRange && !readOnly ? (
|
|
105
|
-
<span className="apex-input__suffix" data-slot="date-picker-suffix" aria-hidden="true">
|
|
106
|
-
<Icon name="calendar" />
|
|
107
|
-
</span>
|
|
108
|
-
) : null}
|
|
109
109
|
</>
|
|
110
110
|
)
|
|
111
111
|
}
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
max-width: 100%;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
/* RangePicker
|
|
37
|
+
/* RangePicker 为完整日期与清除图标预留空间(待 UI 补 --datepicker-width-range-trigger)。 */
|
|
38
38
|
.apex-datepicker.apex-input:is(.apex-default-input, .apex-elevated-input).apex-datepicker--range {
|
|
39
|
-
width: calc(2 * var(--input-spacing-width-min));
|
|
39
|
+
width: calc(2 * var(--input-spacing-width-min) + 2 * var(--input-spacing-padding-x) + var(--input-icon-icon));
|
|
40
40
|
height: var(--input-spacing-height);
|
|
41
41
|
min-width: 0;
|
|
42
42
|
max-width: 100%;
|
|
@@ -80,13 +80,13 @@
|
|
|
80
80
|
color: var(--input-icon-focused);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
/*
|
|
83
|
+
/* 只读保持 disabled 视觉,仍可聚焦。 */
|
|
84
84
|
.apex-datepicker[data-readonly]:not([data-disabled]) .apex-input__inner,
|
|
85
85
|
.apex-datepicker[data-readonly]:not([data-disabled]):hover .apex-input__inner,
|
|
86
86
|
.apex-datepicker[data-readonly]:not([data-disabled]) .apex-input__inner:focus-within {
|
|
87
|
-
background-color: var(--input-fill-
|
|
88
|
-
border-color: var(--input-stroke-
|
|
89
|
-
color: var(--input-text-filled-
|
|
87
|
+
background-color: var(--input-fill-disabled);
|
|
88
|
+
border-color: var(--input-stroke-disabled);
|
|
89
|
+
color: var(--input-text-filled-disabled);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
.apex-datepicker__trigger[data-readonly] {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
§2 触发器 button(字段区,布局对齐 .apex-input__field)
|
|
98
98
|
========================================================================== */
|
|
99
99
|
|
|
100
|
-
/* 双 class 提权:填满 __inner 中
|
|
100
|
+
/* 双 class 提权:填满 __inner 中 prefix / clear 之外的区域,整块可点 */
|
|
101
101
|
.apex-datepicker__trigger.apex-input__field {
|
|
102
102
|
flex: 1 1 auto;
|
|
103
103
|
min-width: 0;
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
text-align: start;
|
|
109
109
|
cursor: pointer;
|
|
110
110
|
white-space: nowrap;
|
|
111
|
+
gap: var(--input-spacing-gap-x);
|
|
111
112
|
}
|
|
112
113
|
|
|
113
114
|
.apex-datepicker__trigger.apex-input__field:disabled {
|
|
@@ -122,7 +123,7 @@
|
|
|
122
123
|
}
|
|
123
124
|
|
|
124
125
|
/* ==========================================================================
|
|
125
|
-
§3 value / separator / clear
|
|
126
|
+
§3 value / separator / clear
|
|
126
127
|
========================================================================== */
|
|
127
128
|
|
|
128
129
|
.apex-datepicker__value {
|
|
@@ -159,32 +160,44 @@
|
|
|
159
160
|
|
|
160
161
|
.apex-datepicker .apex-input__inner[data-readonly]:not([data-disabled])
|
|
161
162
|
.apex-datepicker__value--placeholder {
|
|
162
|
-
color: var(--input-text-placeholder-
|
|
163
|
+
color: var(--input-text-placeholder-disabled);
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
.apex-datepicker__separator {
|
|
167
|
+
position: relative;
|
|
168
|
+
display: inline-flex;
|
|
169
|
+
align-items: center;
|
|
166
170
|
flex-shrink: 0;
|
|
167
171
|
padding: 0 var(--input-spacing-gap-x);
|
|
168
172
|
user-select: none;
|
|
169
173
|
color: inherit;
|
|
170
174
|
}
|
|
171
175
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
.apex-datepicker__separator::before {
|
|
177
|
+
content: '';
|
|
178
|
+
position: absolute;
|
|
179
|
+
inset-block: var(--apex-spacing-6);
|
|
180
|
+
inset-inline-start: 50%;
|
|
181
|
+
width: var(--apex-border-1);
|
|
182
|
+
transform: translateX(-50%);
|
|
183
|
+
background: var(--input-stroke-default);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* Icon 默认渲染 16px,但 DatePicker 槽位应遵循 Input 的 --input-icon-icon。 */
|
|
187
|
+
.apex-datepicker .apex-input__prefix,
|
|
188
|
+
.apex-datepicker .apex-input__prefix .apex-icon,
|
|
189
|
+
.apex-datepicker .apex-input__prefix .apex-icon svg {
|
|
177
190
|
width: var(--input-icon-icon);
|
|
178
191
|
height: var(--input-icon-icon);
|
|
179
192
|
}
|
|
180
193
|
|
|
181
|
-
/* Icon 自带默认 color
|
|
182
|
-
.apex-datepicker .apex-
|
|
194
|
+
/* Icon 自带默认 color;改为继承槽位,才能响应 Input 的 hover / focus / error / disabled 色。 */
|
|
195
|
+
.apex-datepicker .apex-input__prefix .apex-icon {
|
|
183
196
|
color: inherit;
|
|
184
197
|
}
|
|
185
198
|
|
|
186
199
|
/* RangePicker showTime 打开时:仅拉伸当前编辑字段绘制底部 active bar。
|
|
187
|
-
inner 保持 Input 默认的纵向居中,避免固定高度的 clear /
|
|
200
|
+
inner 保持 Input 默认的纵向居中,避免固定高度的 clear / prefix icon 贴到顶部。 */
|
|
188
201
|
.apex-datepicker--range[data-show-time][data-open]:not([data-disabled]):not([data-readonly])
|
|
189
202
|
.apex-datepicker__trigger--start,
|
|
190
203
|
.apex-datepicker--range[data-show-time][data-open]:not([data-disabled]):not([data-readonly])
|
|
@@ -227,7 +240,7 @@
|
|
|
227
240
|
color: var(--input-text-placeholder-focused);
|
|
228
241
|
}
|
|
229
242
|
|
|
230
|
-
/* 有值且 hover 时显示 clear
|
|
243
|
+
/* 有值且 hover 时显示 clear。 */
|
|
231
244
|
.apex-datepicker .apex-clear {
|
|
232
245
|
display: none;
|
|
233
246
|
}
|
|
@@ -236,11 +249,19 @@
|
|
|
236
249
|
display: inline-flex;
|
|
237
250
|
}
|
|
238
251
|
|
|
239
|
-
/*
|
|
240
|
-
.apex-datepicker
|
|
241
|
-
display:
|
|
252
|
+
/* RangePicker 的 clear 常驻占位,避免 hover 时两段日期重新分配宽度。 */
|
|
253
|
+
.apex-datepicker--range .apex-clear {
|
|
254
|
+
display: inline-flex;
|
|
255
|
+
visibility: hidden;
|
|
256
|
+
pointer-events: none;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.apex-datepicker--range:hover:not([data-disabled]):not([data-readonly]) .apex-clear {
|
|
260
|
+
visibility: visible;
|
|
261
|
+
pointer-events: auto;
|
|
242
262
|
}
|
|
243
263
|
|
|
264
|
+
|
|
244
265
|
/* Popover portal shell — above Modal/Drawer (default z-index 1000); align with Select dropdown */
|
|
245
266
|
.apex-datepicker__popup {
|
|
246
267
|
z-index: var(--apex-z-index-date-picker, 1050);
|
|
@@ -461,8 +482,17 @@
|
|
|
461
482
|
}
|
|
462
483
|
|
|
463
484
|
.apex-datepicker-panel__half--left {
|
|
464
|
-
|
|
465
|
-
|
|
485
|
+
position: relative;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.apex-datepicker-panel__half--left::after {
|
|
489
|
+
content: '';
|
|
490
|
+
position: absolute;
|
|
491
|
+
inset-block: 0;
|
|
492
|
+
inset-inline-end: 0;
|
|
493
|
+
width: var(--datepicker-stroke-stroke-container);
|
|
494
|
+
background: var(--datepicker-stroke-container-default);
|
|
495
|
+
pointer-events: none;
|
|
466
496
|
}
|
|
467
497
|
|
|
468
498
|
/* ==========================================================================
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> DatePicker:用户需要选择单个日期或日期范围,且精确到日、周、月、季、年等不同粒度时。
|
|
4
4
|
|
|
5
|
-
版本:`1.2.
|
|
5
|
+
版本:`1.2.2`。组件源码在本目录,属于当前项目。
|
|
6
6
|
|
|
7
7
|
公开导出:`DatePicker`、`RangePicker`。
|
|
8
8
|
|
|
@@ -299,15 +299,19 @@ export default () => (
|
|
|
299
299
|
|
|
300
300
|
### 只读
|
|
301
301
|
|
|
302
|
-
`readOnly` 为 true
|
|
302
|
+
`readOnly` 为 true 时仅展示选中值,不可打开面板或修改;视觉使用禁用配色,触发器仍可聚焦。示例对照空值与已填值的单日期和日期范围。
|
|
303
303
|
|
|
304
304
|
```tsx
|
|
305
305
|
import { DatePicker, RangePicker } from '@/components/apex/date-picker'
|
|
306
306
|
|
|
307
|
+
import dayjs from 'dayjs'
|
|
308
|
+
|
|
307
309
|
export default () => (
|
|
308
310
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 12, padding: 24 }}>
|
|
309
311
|
<DatePicker readOnly placeholder="只读,不可打开面板" />
|
|
312
|
+
<DatePicker readOnly defaultValue={dayjs('2026-11-19')} />
|
|
310
313
|
<RangePicker readOnly placeholder={['开始日期', '结束日期']} />
|
|
314
|
+
<RangePicker readOnly defaultValue={[dayjs('2026-11-01'), dayjs('2026-11-19')]} />
|
|
311
315
|
</div>
|
|
312
316
|
)
|
|
313
317
|
```
|
|
@@ -391,7 +395,7 @@ export default () => (
|
|
|
391
395
|
|
|
392
396
|
## DOM 结构
|
|
393
397
|
|
|
394
|
-
源码声明的静态 `data-slot`:`date-picker-shortcuts`、`date-picker-shortcut`、`date-picker-
|
|
398
|
+
源码声明的静态 `data-slot`:`date-picker-shortcuts`、`date-picker-shortcut`、`date-picker-prefix`、`range-picker-trigger`、`date-picker-clear`、`range-picker-panel`、`date-picker-panel-body`、`date-picker-panel-day`、`date-picker-panel-footer`、`date-picker-panel-header`、`date-picker-panel`、`date-picker-panel-time-shortcut`、`date-picker-panel-time`。具体节点随模式和状态出现,不表示固定嵌套顺序。
|
|
395
399
|
|
|
396
400
|
## 样式定制
|
|
397
401
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DatePicker 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
|
|
|
@@ -124,10 +124,10 @@
|
|
|
124
124
|
| `--input-spacing-height` | `height`、`min-height`、`padding-top` | `var(--apex-size-32)` | `.apex-input.apex-md-input` |
|
|
125
125
|
| `--input-spacing-height` | `height`、`min-height`、`padding-top` | `var(--apex-size-24)` | `.apex-input.apex-sm-input` |
|
|
126
126
|
| `--input-spacing-height-max` | `max-height` | `var(--apex-size-130)` | `.apex-input.apex-textarea-input` |
|
|
127
|
-
| `--input-spacing-padding-x` | `padding-inline` | `var(--apex-spacing-12)` | `.apex-input.apex-lg-input` |
|
|
128
|
-
| `--input-spacing-padding-x` | `padding-inline` | `var(--apex-spacing-12)` | `.apex-input.apex-md-input` |
|
|
129
|
-
| `--input-spacing-padding-x` | `padding-inline` | `var(--apex-spacing-8)` | `.apex-input.apex-sm-input` |
|
|
130
|
-
| `--input-spacing-padding-x` | `padding-inline` | `var(--apex-spacing-12)` | `.apex-input.apex-textarea-input` |
|
|
127
|
+
| `--input-spacing-padding-x` | `padding-inline`、`width` | `var(--apex-spacing-12)` | `.apex-input.apex-lg-input` |
|
|
128
|
+
| `--input-spacing-padding-x` | `padding-inline`、`width` | `var(--apex-spacing-12)` | `.apex-input.apex-md-input` |
|
|
129
|
+
| `--input-spacing-padding-x` | `padding-inline`、`width` | `var(--apex-spacing-8)` | `.apex-input.apex-sm-input` |
|
|
130
|
+
| `--input-spacing-padding-x` | `padding-inline`、`width` | `var(--apex-spacing-12)` | `.apex-input.apex-textarea-input` |
|
|
131
131
|
| `--input-spacing-padding-y` | `padding-block` | `var(--apex-spacing-12)` | `.apex-input.apex-lg-input` |
|
|
132
132
|
| `--input-spacing-padding-y` | `padding-block` | `var(--apex-spacing-6)` | `.apex-input.apex-md-input` |
|
|
133
133
|
| `--input-spacing-padding-y` | `padding-block` | `var(--apex-spacing-4)` | `.apex-input.apex-sm-input` |
|
|
@@ -135,8 +135,8 @@
|
|
|
135
135
|
| `--input-spacing-width-min` | `min-width`、`width` | `var(--apex-size-120)` | `.apex-input.apex-lg-input` |
|
|
136
136
|
| `--input-spacing-width-min` | `min-width`、`width` | `var(--apex-size-120)` | `.apex-input.apex-md-input` |
|
|
137
137
|
| `--input-spacing-width-min` | `min-width`、`width` | `var(--apex-size-120)` | `.apex-input.apex-sm-input` |
|
|
138
|
-
| `--input-stroke-default` | `border-color` | `var(--apex-stroke-neutral-quaternary)` | `.apex-input.apex-default-input` |
|
|
139
|
-
| `--input-stroke-default` | `border-color` | `var(--apex-stroke-neutral-quaternary)` | `.apex-input.apex-elevated-input` |
|
|
138
|
+
| `--input-stroke-default` | `background`、`border-color` | `var(--apex-stroke-neutral-quaternary)` | `.apex-input.apex-default-input` |
|
|
139
|
+
| `--input-stroke-default` | `background`、`border-color` | `var(--apex-stroke-neutral-quaternary)` | `.apex-input.apex-elevated-input` |
|
|
140
140
|
| `--input-stroke-disabled` | `border-color` | `var(--apex-stroke-neutral-quaternary)` | `.apex-input.apex-default-input` |
|
|
141
141
|
| `--input-stroke-disabled` | `border-color` | `var(--apex-stroke-neutral-quaternary)` | `.apex-input.apex-elevated-input` |
|
|
142
142
|
| `--input-stroke-error` | `border-color` | `var(--apex-stroke-error-primary)` | `.apex-input.apex-default-input` |
|
|
@@ -150,10 +150,10 @@
|
|
|
150
150
|
| `--input-stroke-stroke` | `border-width`、`padding-block` | `var(--apex-border-1)` | `.apex-input.apex-sm-input` |
|
|
151
151
|
| `--input-text-filled-default` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
|
|
152
152
|
| `--input-text-filled-default` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
|
|
153
|
-
| `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-
|
|
153
|
+
| `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-disabled)` | `.apex-input.apex-default-input` |
|
|
154
154
|
| `--input-text-filled-disabled` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-disabled)` | `.apex-input.apex-elevated-input` |
|
|
155
|
-
| `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-
|
|
156
|
-
| `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-
|
|
155
|
+
| `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
|
|
156
|
+
| `--input-text-filled-error` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
|
|
157
157
|
| `--input-text-filled-focused` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
|
|
158
158
|
| `--input-text-filled-focused` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-elevated-input` |
|
|
159
159
|
| `--input-text-filled-hover` | `-webkit-text-fill-color`、`caret-color`、`color` | `var(--apex-text-neutral-primary)` | `.apex-input.apex-default-input` |
|
|
@@ -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,
|