@q1travel/design-system 0.20.0 → 0.22.0
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/.agents/skills/product-design/references/glossary.md +28 -0
- package/contracts/design.dark.md +57 -25
- package/contracts/design.md +59 -27
- package/contracts/icon-system.md +1 -1
- package/contracts/implementation-map.md +60 -2
- package/contracts/interface-guidelines.md +38 -0
- package/contracts/overlay-shadow-migration.md +12 -0
- package/contracts/token-naming.md +13 -3
- package/dist-pkg/design-system.d.ts +177 -40
- package/dist-pkg/design-system.js +5165 -4647
- package/dist-pkg/style.css +674 -447
- package/dist-pkg/tokens.css +71 -35
- package/package.json +3 -3
|
@@ -28,12 +28,16 @@ Examples:
|
|
|
28
28
|
- `--q1-font-size-copy-14`
|
|
29
29
|
|
|
30
30
|
Reference color scales use numeric steps from `100` to `1000`.
|
|
31
|
+
`gray-alpha-100/200` are theme-relative translucent neutral overlays (black 6%/8%
|
|
32
|
+
in light mode, white 8%/12% in dark mode); use them for list states and quiet borders.
|
|
33
|
+
Strong heading roles (`heading-40/32/24/20-strong`) preserve each size and line box
|
|
34
|
+
while opting into weight 600. Existing heading roles remain weight 500.
|
|
31
35
|
|
|
32
36
|
#### Scale Steps
|
|
33
37
|
|
|
34
38
|
Non-color reference scales carry their own step rules, so a value that is off the scale shows up as a missing token rather than as a raw number in product CSS.
|
|
35
39
|
|
|
36
|
-
- **Spacing** — the step number is the pixel value divided by four: `--q1-space-4` is `16px`. Half steps fill the gaps inside the 4px grid where a whole step reads as too loose or too tight: `--q1-space-1-5` (`6px`), `--q1-space-2-5` (`10px`), `--q1-space-3-5` (`14px`). The scale runs `1`, `1-5`, `2`, `2-5`, `3`, `3-5`, `4`, `5`, `6`, `8`, `10`, `16`, `24`; it thins out above `20px` because a large gap is read as layout, not as fine adjustment.
|
|
40
|
+
- **Spacing** — the step number is the pixel value divided by four: `--q1-space-4` is `16px`. Half steps fill the gaps inside the 4px grid where a whole step reads as too loose or too tight: `--q1-space-1-5` (`6px`), `--q1-space-2-5` (`10px`), `--q1-space-3-5` (`14px`). The scale runs `1`, `1-5`, `2`, `2-5`, `3`, `3-5`, `4`, `5`, `6`, `7`, `8`, `10`, `16`, `24`; it thins out above `20px` because a large gap is read as layout, not as fine adjustment.
|
|
37
41
|
- **Radius** — `--q1-radius-1` through `--q1-radius-5` (`4`, `6`, `8`, `12`, `16px`), plus `--q1-radius-full` (`9999px`) for a pill. The pill value is deliberately larger than any half-height it can meet: it is a shape, not a measurement, and it does not interpolate with the numbered steps.
|
|
38
42
|
- **Line height** — two families coexist. `--q1-line-height-<role>-<size>` is a pixel line box bound to one font-size step, and typography styles use it. `--q1-line-height-tight` (`1.2`), `-snug` (`1.35`), `-normal` (`1.5`), and `-relaxed` (`1.6`) are unitless and scale with whatever font size they land on; they serve text whose size is not one of the typography steps, such as a body block or a table cell.
|
|
39
43
|
- **Font weight** — `--q1-font-weight-regular` (`400`), `-medium` (`500`), `-semibold` (`600`), `-bold` (`700`). Four steps is the whole scale; a weight between two of them is not a distinction the font stack renders consistently.
|
|
@@ -73,6 +77,8 @@ Their values hold only for the font stack they were measured with. The package d
|
|
|
73
77
|
- `--q1-button-hang-inline` (`calc(var(--q1-space-3) + 1px)`) — distance from a small button's border edge to its label. Ghost buttons in a table actions column hang by this amount so the label starts on the column line.
|
|
74
78
|
- `--q1-badge-optical-shift` (`0px`) and `--q1-button-affix-optical-y` (`0px`) — opt-in switches for the Badge label and Button affixes. They default to zero because Chinese and Latin labels move in opposite directions; a consumer sets them only where the label script is known.
|
|
75
79
|
|
|
80
|
+
The CJK heading and multiline-copy line boxes are independent of these label calibrations. `label-13` remains 18px and the default media offset remains `-3px`; changing heading/copy line heights does not change that first-line box. Note uses its own 1.5 line height, and ProductLockup uses the unchanged heading-16/14 line boxes. Re-measure the optical fixture before changing any compensation; the 1px tolerance remains unchanged.
|
|
81
|
+
|
|
76
82
|
Rules:
|
|
77
83
|
|
|
78
84
|
- Values are whole pixels. A compensation never uses a fractional pixel such as `0.5px`.
|
|
@@ -96,9 +102,13 @@ Examples:
|
|
|
96
102
|
|
|
97
103
|
`--q1-color-status-danger` is the bright red for fills and strokes only; use `--q1-color-status-danger-text` for text and weak notices without an underline. `--q1-color-status-danger-surface` and `--q1-color-status-danger-border` keep the background and stroke roles separate. `--q1-color-text-soft`, `--q1-color-border-subtle`, and `--q1-color-overlay-scrim` cover tertiary text, quiet separators, and overlay scrims.
|
|
98
104
|
|
|
99
|
-
|
|
105
|
+
Owner-approved exception (2026-10-05): ErrorMessage, field errors, and ErrorCard titles use `--q1-color-red-900`; other status text retains its existing semantic text token.
|
|
106
|
+
|
|
107
|
+
`--q1-color-focus` is neutral black in light mode and white in dark mode. `--q1-shadow-focus` and `--q1-shadow-focus-input` use a gapless 1px ring at 34% plus a 4px halo at 16%. Buttons and inputs consume this recipe; input focus preserves the resting border, without an active-border swap or inset stroke. `--q1-input-border-focus` remains an opt-in override and defaults to the resting input border. Invalid inputs retain their danger border; `--q1-shadow-focus-input-danger` and `--q1-shadow-focus-danger` use the same 1px / 4px geometry with danger color at 34% / 16%. Text links retain the 3px neutral focus underline. Forced colors and high contrast retain visible system outlines.
|
|
108
|
+
|
|
109
|
+
Migration: `--q1-color-bg-panel` remains `#ffffff` in light mode and changes from `#0a0a0a` to `#1a1a1a` in dark mode. The dark canvas, raised surface, and overlay now use `#121212`, `#222222`, and `#2b2b2b`. Downstream overrides that manually raised panel or overlay backgrounds should be reviewed. The 2026-10-05 owner-approved focus change replaces the brand ring and inset input stroke with the neutral 1px / 4px recipe and preserves resting input borders. Consumers with custom focus visuals should update their screenshots and forced-colors fallback. The unused `--q1-shadow-card` name is removed before release.
|
|
100
110
|
|
|
101
|
-
|
|
111
|
+
`--q1-touch-target-min` (`44px`) is the theme-independent semantic minimum for coarse-pointer hit regions, stored as `sizing.touch-target-min` in both theme contracts. It changes the invisible target, not the visual size.
|
|
102
112
|
|
|
103
113
|
### Component Tokens
|
|
104
114
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes } from 'react';
|
|
2
2
|
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
3
4
|
import { ComponentPropsWithoutRef } from 'react';
|
|
4
5
|
import { CSSProperties } from 'react';
|
|
5
6
|
import { FocusEventHandler } from 'react';
|
|
@@ -22,6 +23,18 @@ import { TextareaHTMLAttributes } from 'react';
|
|
|
22
23
|
|
|
23
24
|
export declare function addDays(date: Date, amount: number): Date;
|
|
24
25
|
|
|
26
|
+
export declare function Attachment({ name, size, type, progress, error, onRetry, onRemove, }: AttachmentProps): JSX.Element;
|
|
27
|
+
|
|
28
|
+
export declare type AttachmentProps = {
|
|
29
|
+
name: string;
|
|
30
|
+
size?: ReactNode;
|
|
31
|
+
type?: 'file' | 'image';
|
|
32
|
+
progress?: number;
|
|
33
|
+
error?: ReactNode;
|
|
34
|
+
onRetry?: () => void;
|
|
35
|
+
onRemove?: () => void;
|
|
36
|
+
};
|
|
37
|
+
|
|
25
38
|
export declare function AuthCard({ title, description, action, className }: AuthCardProps): JSX.Element;
|
|
26
39
|
|
|
27
40
|
/** Focused presentational card for account entry and connection flows. */
|
|
@@ -302,6 +315,9 @@ export declare type ButtonSize = 'sm' | 'md' | 'lg';
|
|
|
302
315
|
|
|
303
316
|
export declare type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'warning' | 'danger';
|
|
304
317
|
|
|
318
|
+
/** 标准日期区间选择器;复用 RangeField 的草稿、弹层和键盘行为。 */
|
|
319
|
+
export declare function Calendar(props: CalendarProps): JSX.Element;
|
|
320
|
+
|
|
305
321
|
export declare function CalendarGrid({ value, onChange, size, minValue, maxValue, today, }: {
|
|
306
322
|
value: RangeValue;
|
|
307
323
|
onChange: (next: RangeValue) => void;
|
|
@@ -316,6 +332,8 @@ export declare type CalendarPreset = {
|
|
|
316
332
|
getRange: () => RangeValue;
|
|
317
333
|
};
|
|
318
334
|
|
|
335
|
+
export declare type CalendarProps = ComponentProps<typeof RangeField>;
|
|
336
|
+
|
|
319
337
|
export declare type CalendarSize = 'large' | 'small';
|
|
320
338
|
|
|
321
339
|
export declare function Card(props: CardProps): JSX.Element;
|
|
@@ -435,6 +453,8 @@ export declare function CodeBlock(props: CodeBlockProps): JSX.Element;
|
|
|
435
453
|
|
|
436
454
|
declare type CodeBlockBaseProps = {
|
|
437
455
|
lineNumbers?: boolean;
|
|
456
|
+
/** flush 用于 ShowCode 等已有边框的嵌入表面;默认保留独立代码块。 */
|
|
457
|
+
variant?: 'default' | 'flush';
|
|
438
458
|
};
|
|
439
459
|
|
|
440
460
|
export declare type CodeBlockLine = {
|
|
@@ -476,8 +496,8 @@ export declare function Collapse({ title, defaultOpen, small, headingLevel, chil
|
|
|
476
496
|
title: string | ((open: boolean) => string);
|
|
477
497
|
defaultOpen?: boolean;
|
|
478
498
|
small?: boolean;
|
|
479
|
-
/** 标题层级:默认 h3;按宿主页面的标题树传 1-6
|
|
480
|
-
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
499
|
+
/** 标题层级:默认 h3;按宿主页面的标题树传 1-6,附属 disclosure 传 null 不加入标题树。 */
|
|
500
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6 | null;
|
|
481
501
|
children: ReactNode;
|
|
482
502
|
}): JSX.Element;
|
|
483
503
|
|
|
@@ -525,7 +545,7 @@ export declare type ComboboxProps = {
|
|
|
525
545
|
disabled?: boolean;
|
|
526
546
|
/** 值只读:不可输入、不展开列表。 */
|
|
527
547
|
readOnly?: boolean;
|
|
528
|
-
/** 业务错误模型(主):置 aria-invalid
|
|
548
|
+
/** 业务错误模型(主):置 aria-invalid 与错误环,文案由外部渲染(配 errorId)。 */
|
|
529
549
|
invalid?: boolean;
|
|
530
550
|
/** 外部错误文案元素的 id → aria-describedby;组件不渲染任何文案(外部拥有)。 */
|
|
531
551
|
errorId?: string;
|
|
@@ -576,6 +596,27 @@ export declare type CommandMenuSection = {
|
|
|
576
596
|
items: CommandMenuItem[];
|
|
577
597
|
};
|
|
578
598
|
|
|
599
|
+
export declare function Composer({ onSubmit, onAttach, attachments, mentions, disabled, }: ComposerProps): JSX.Element;
|
|
600
|
+
|
|
601
|
+
export declare type ComposerMention = {
|
|
602
|
+
id: string;
|
|
603
|
+
label: string;
|
|
604
|
+
description?: string;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
export declare type ComposerProps = {
|
|
608
|
+
onSubmit: (submission: ComposerSubmission) => void;
|
|
609
|
+
onAttach?: () => void;
|
|
610
|
+
attachments?: ReactNode;
|
|
611
|
+
mentions?: ComposerMention[];
|
|
612
|
+
disabled?: boolean;
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
export declare type ComposerSubmission = {
|
|
616
|
+
text: string;
|
|
617
|
+
mentionIds: string[];
|
|
618
|
+
};
|
|
619
|
+
|
|
579
620
|
export declare function ContextCard({ name, identity, rows, action, onAction, actionHref, placement, align, children, }: ContextCardProps): JSX.Element;
|
|
580
621
|
|
|
581
622
|
declare type ContextCardAction = {
|
|
@@ -743,6 +784,16 @@ export declare function CopyButton({ value, label, successMessage, size, classNa
|
|
|
743
784
|
className?: string;
|
|
744
785
|
}): JSX.Element;
|
|
745
786
|
|
|
787
|
+
export declare type CopyFeedbackOptions = {
|
|
788
|
+
/**
|
|
789
|
+
* 成功反馈:'toast'(默认)经共享 Toast 播报;'inline' 只切换就地对勾,由调用方提供读屏播报。
|
|
790
|
+
* 失败始终弹错误 Toast——只靠图标,用户可能注意不到复制没有成功。
|
|
791
|
+
*/
|
|
792
|
+
success?: 'toast' | 'inline';
|
|
793
|
+
/** 对勾保持的时长(毫秒),默认 1500。 */
|
|
794
|
+
resetAfterMs?: number;
|
|
795
|
+
};
|
|
796
|
+
|
|
746
797
|
export declare function Description({ title, tooltip, align, ellipsis, children, }: {
|
|
747
798
|
title: string;
|
|
748
799
|
tooltip?: string;
|
|
@@ -911,6 +962,16 @@ export declare type FileTreeNode = {
|
|
|
911
962
|
children?: FileTreeNode[];
|
|
912
963
|
};
|
|
913
964
|
|
|
965
|
+
/** 筛选选择器入口;弹层、筛选值与 expanded 状态归调用方。 */
|
|
966
|
+
export declare function FilterChip({ label, value, onClear, disabled, className, ...props }: FilterChipProps): JSX.Element;
|
|
967
|
+
|
|
968
|
+
export declare type FilterChipProps = {
|
|
969
|
+
label: string;
|
|
970
|
+
/** undefined 表示未设置;0、空字符串和 null 仍是已设置。 */
|
|
971
|
+
value?: ReactNode;
|
|
972
|
+
onClear?: () => void;
|
|
973
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'value'>;
|
|
974
|
+
|
|
914
975
|
export declare function FormField({ controlId, label, description, error, wide, children, }: {
|
|
915
976
|
controlId: string;
|
|
916
977
|
label: string;
|
|
@@ -1011,6 +1072,35 @@ export declare function Input({ id, label, description, error, invalid, errorId,
|
|
|
1011
1072
|
size?: FieldSize;
|
|
1012
1073
|
} & (FieldShellProps | FieldBareProps) & Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'size' | 'prefix'>): JSX.Element;
|
|
1013
1074
|
|
|
1075
|
+
export declare function InputOTP({ id, name, value, onValueChange, disabled, readOnly, required, invalid, errorId, size, separator, ref, label, description, error, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': describedBy, }: InputOTPProps): JSX.Element;
|
|
1076
|
+
|
|
1077
|
+
export declare type InputOTPProps = {
|
|
1078
|
+
id?: string;
|
|
1079
|
+
name?: string;
|
|
1080
|
+
/** 受控的 0–6 位 ASCII 数字字符串;保留前导零。 */
|
|
1081
|
+
value: string;
|
|
1082
|
+
onValueChange: (value: string) => void;
|
|
1083
|
+
disabled?: boolean;
|
|
1084
|
+
readOnly?: boolean;
|
|
1085
|
+
required?: boolean;
|
|
1086
|
+
invalid?: boolean;
|
|
1087
|
+
errorId?: string;
|
|
1088
|
+
size?: 'md' | 'lg';
|
|
1089
|
+
/** 显式显示 3+3 分组;默认六格相连,无分隔符。 */
|
|
1090
|
+
separator?: boolean;
|
|
1091
|
+
ref?: Ref<HTMLInputElement>;
|
|
1092
|
+
'aria-describedby'?: string;
|
|
1093
|
+
} & ((FieldShellProps & {
|
|
1094
|
+
'aria-label'?: never;
|
|
1095
|
+
'aria-labelledby'?: never;
|
|
1096
|
+
}) | (FieldBareProps & ({
|
|
1097
|
+
'aria-label': string;
|
|
1098
|
+
'aria-labelledby'?: never;
|
|
1099
|
+
} | {
|
|
1100
|
+
'aria-labelledby': string;
|
|
1101
|
+
'aria-label'?: never;
|
|
1102
|
+
})));
|
|
1103
|
+
|
|
1014
1104
|
export declare function JsonView({ value, singleLine, wrap, collapsedDepth, highlight, embedded, label, className, }: JsonViewProps): JSX.Element;
|
|
1015
1105
|
|
|
1016
1106
|
export declare type JsonViewProps = {
|
|
@@ -1098,6 +1188,21 @@ declare type LoadMoreButtonOwnProps = {
|
|
|
1098
1188
|
|
|
1099
1189
|
export declare type LoadMoreButtonProps = LoadMoreButtonOwnProps & Omit<ComponentPropsWithoutRef<'button'>, keyof LoadMoreButtonOwnProps>;
|
|
1100
1190
|
|
|
1191
|
+
export declare function Marker({ actor, time, variant, children, }: MarkerProps): JSX.Element;
|
|
1192
|
+
|
|
1193
|
+
export declare type MarkerProps = {
|
|
1194
|
+
actor?: ReactNode;
|
|
1195
|
+
time?: ReactNode;
|
|
1196
|
+
variant?: 'default' | 'separator';
|
|
1197
|
+
children: ReactNode;
|
|
1198
|
+
};
|
|
1199
|
+
|
|
1200
|
+
export declare function Mention({ children }: MentionProps): JSX.Element;
|
|
1201
|
+
|
|
1202
|
+
export declare type MentionProps = {
|
|
1203
|
+
children: ReactNode;
|
|
1204
|
+
};
|
|
1205
|
+
|
|
1101
1206
|
export declare function Menu({ label, entries, withChevron, align, triggerContent }: {
|
|
1102
1207
|
label: string;
|
|
1103
1208
|
entries: MenuEntry[];
|
|
@@ -1160,6 +1265,19 @@ declare type MenuLinkBase = {
|
|
|
1160
1265
|
suffix?: ReactNode;
|
|
1161
1266
|
};
|
|
1162
1267
|
|
|
1268
|
+
export declare function Message({ author, avatar, time, children, attachments, actions, status, onRetry, }: MessageProps): JSX.Element;
|
|
1269
|
+
|
|
1270
|
+
export declare type MessageProps = {
|
|
1271
|
+
author: ReactNode;
|
|
1272
|
+
avatar?: ReactNode;
|
|
1273
|
+
time?: ReactNode;
|
|
1274
|
+
children: ReactNode;
|
|
1275
|
+
attachments?: ReactNode;
|
|
1276
|
+
actions?: ReactNode;
|
|
1277
|
+
status?: 'default' | 'pending' | 'failed';
|
|
1278
|
+
onRetry?: () => void;
|
|
1279
|
+
};
|
|
1280
|
+
|
|
1163
1281
|
export declare function MiddleTruncate({ text, tailLength, mono }: {
|
|
1164
1282
|
text: string;
|
|
1165
1283
|
tailLength?: number;
|
|
@@ -1332,6 +1450,29 @@ export declare type OverlaySnapshot = {
|
|
|
1332
1450
|
readonly blockingCount: number;
|
|
1333
1451
|
};
|
|
1334
1452
|
|
|
1453
|
+
export declare function PageFeedback({ variant, onSubmit, contactConsent, privacyHref }: PageFeedbackProps): JSX.Element;
|
|
1454
|
+
|
|
1455
|
+
export declare type PageFeedbackPayload = {
|
|
1456
|
+
scale: 'rating4';
|
|
1457
|
+
rating: PageFeedbackRating;
|
|
1458
|
+
comment: string;
|
|
1459
|
+
contactConsent: boolean;
|
|
1460
|
+
} | {
|
|
1461
|
+
scale: 'helpful';
|
|
1462
|
+
rating: 'yes' | 'no';
|
|
1463
|
+
comment: string;
|
|
1464
|
+
contactConsent: boolean;
|
|
1465
|
+
};
|
|
1466
|
+
|
|
1467
|
+
export declare type PageFeedbackProps = {
|
|
1468
|
+
variant: 'rating' | 'helpful';
|
|
1469
|
+
onSubmit: (payload: PageFeedbackPayload) => Promise<void>;
|
|
1470
|
+
contactConsent?: boolean;
|
|
1471
|
+
privacyHref?: string;
|
|
1472
|
+
};
|
|
1473
|
+
|
|
1474
|
+
export declare type PageFeedbackRating = 'not-great' | 'okay' | 'good' | 'love';
|
|
1475
|
+
|
|
1335
1476
|
export declare function Pagination({ page, pageSize: pageSizeProp, total, totalPages: totalPagesProp, hasNextPage, onChange, loading, showPageNumbers, summary, pageSizeSlot, prevLabel, nextLabel, compact, className, }: PaginationProps): JSX.Element;
|
|
1336
1477
|
|
|
1337
1478
|
export declare type PaginationCommonProps = {
|
|
@@ -1384,11 +1525,11 @@ export declare type PopoverLayout = 'vertical' | 'horizontal';
|
|
|
1384
1525
|
export declare function ProductLockup({ name, icon, brand, size, className, 'aria-label': ariaLabel, ...rest }: ProductLockupProps): JSX.Element;
|
|
1385
1526
|
|
|
1386
1527
|
export declare type ProductLockupProps = {
|
|
1387
|
-
/**
|
|
1528
|
+
/** 产品名称。 */
|
|
1388
1529
|
name: string;
|
|
1389
|
-
/**
|
|
1530
|
+
/** 替换左侧品牌符号的产品图标。只起装饰作用,读屏不读。默认为奇异旅行的品牌符号。 */
|
|
1390
1531
|
icon?: ReactNode;
|
|
1391
|
-
/**
|
|
1532
|
+
/** 显示在「by」后面的品牌名,例如「奇异旅行」或「q1Travel」。 */
|
|
1392
1533
|
brand?: string;
|
|
1393
1534
|
size?: ProductLockupSize;
|
|
1394
1535
|
} & Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'role'>;
|
|
@@ -1436,10 +1577,12 @@ export declare function Radio({ ...props }: RadioProps): JSX.Element;
|
|
|
1436
1577
|
/** Radio 的完整 props。 */
|
|
1437
1578
|
export declare type RadioProps = ControlOptionOwnProps & (FieldShellProps | FieldBareProps) & ControlOptionNativeInputProps;
|
|
1438
1579
|
|
|
1439
|
-
export declare function RangeField({ layout, trigger, size, minValue, maxValue, pinnedTimezone, today, value, onChange, }: {
|
|
1580
|
+
export declare function RangeField({ layout, trigger, size, fieldSize, minValue, maxValue, pinnedTimezone, today, value, onChange, }: {
|
|
1440
1581
|
layout?: PopoverLayout;
|
|
1441
1582
|
trigger?: TriggerKind;
|
|
1442
1583
|
size?: CalendarSize;
|
|
1584
|
+
/** 仅控制触发器高度;size 保留月历网格的 large/small 尺寸语义。 */
|
|
1585
|
+
fieldSize?: FieldSize;
|
|
1443
1586
|
minValue?: Date;
|
|
1444
1587
|
maxValue?: Date;
|
|
1445
1588
|
pinnedTimezone?: string;
|
|
@@ -1742,10 +1885,9 @@ export declare type SplitButtonEntry = {
|
|
|
1742
1885
|
onSelect?: () => void;
|
|
1743
1886
|
};
|
|
1744
1887
|
|
|
1745
|
-
export declare function StatusDot({ tone, label,
|
|
1888
|
+
export declare function StatusDot({ tone, label, showLabel, titlePrefix, }: {
|
|
1746
1889
|
tone: StatusDotTone;
|
|
1747
1890
|
label: string;
|
|
1748
|
-
animated?: boolean;
|
|
1749
1891
|
showLabel?: boolean;
|
|
1750
1892
|
titlePrefix?: string;
|
|
1751
1893
|
}): JSX.Element;
|
|
@@ -1860,10 +2002,13 @@ export declare type TableSelection<T> = {
|
|
|
1860
2002
|
|
|
1861
2003
|
export declare type TableSortDirection = 'asc' | 'desc';
|
|
1862
2004
|
|
|
1863
|
-
export declare function Tabs({ tabs, ariaLabel, variant, }: {
|
|
2005
|
+
export declare function Tabs({ tabs, ariaLabel, variant, value, defaultValue, onValueChange, }: {
|
|
1864
2006
|
tabs: TabItem[];
|
|
1865
2007
|
ariaLabel: string;
|
|
1866
2008
|
variant?: 'default' | 'secondary';
|
|
2009
|
+
value?: string;
|
|
2010
|
+
defaultValue?: string;
|
|
2011
|
+
onValueChange?: (id: string) => void;
|
|
1867
2012
|
}): JSX.Element | null;
|
|
1868
2013
|
|
|
1869
2014
|
export declare function Textarea({ id, label, description, error, invalid, errorId, ref, wide, size, className, maxLength, onInput, ...rest }: TextareaProps): JSX.Element;
|
|
@@ -1889,13 +2034,32 @@ export declare function TextWithCopyButton({ text, copyValue, successMessage, si
|
|
|
1889
2034
|
size?: 'default' | 'small';
|
|
1890
2035
|
}): JSX.Element;
|
|
1891
2036
|
|
|
1892
|
-
export declare
|
|
2037
|
+
export declare type ThemeMode = 'system' | 'light' | 'dark';
|
|
2038
|
+
|
|
2039
|
+
export declare function ThemeSwitcher({ small, disabled, mode, onModeChange }: ThemeSwitcherProps): JSX.Element;
|
|
2040
|
+
|
|
2041
|
+
export declare type ThemeSwitcherProps = {
|
|
1893
2042
|
small?: boolean;
|
|
1894
2043
|
disabled?: boolean;
|
|
1895
|
-
|
|
2044
|
+
/** 传入即为受控:选中项完全由 mode 决定,组件不读写页面主题、本地存储或全局主题状态。 */
|
|
2045
|
+
mode?: ThemeMode;
|
|
2046
|
+
/** 受控用法下用户选择某一档时调用;组件自身不改变任何状态。 */
|
|
2047
|
+
onModeChange?: (mode: ThemeMode) => void;
|
|
2048
|
+
};
|
|
1896
2049
|
|
|
1897
2050
|
export declare type ThresholdTone = 'primary' | 'success' | 'warning' | 'danger';
|
|
1898
2051
|
|
|
2052
|
+
export declare function Timeline({ className, ...props }: TimelineProps): JSX.Element;
|
|
2053
|
+
|
|
2054
|
+
export declare function TimelineItem({ tone, indicator, children, className, ...props }: TimelineItemProps): JSX.Element;
|
|
2055
|
+
|
|
2056
|
+
export declare type TimelineItemProps = HTMLAttributes<HTMLLIElement> & {
|
|
2057
|
+
tone?: 'neutral' | 'success' | 'danger' | 'warning';
|
|
2058
|
+
indicator?: ReactNode;
|
|
2059
|
+
};
|
|
2060
|
+
|
|
2061
|
+
export declare type TimelineProps = HTMLAttributes<HTMLOListElement>;
|
|
2062
|
+
|
|
1899
2063
|
declare type ToastAction = {
|
|
1900
2064
|
label: string;
|
|
1901
2065
|
/** 点击后先执行回调再关闭该提示。 */
|
|
@@ -2002,7 +2166,7 @@ export declare type UnknownTailPaginationProps = PaginationCommonProps & {
|
|
|
2002
2166
|
showPageNumbers?: false;
|
|
2003
2167
|
};
|
|
2004
2168
|
|
|
2005
|
-
export declare function useCopy(): {
|
|
2169
|
+
export declare function useCopy({ success, resetAfterMs }?: CopyFeedbackOptions): {
|
|
2006
2170
|
copied: boolean;
|
|
2007
2171
|
pending: boolean;
|
|
2008
2172
|
copy: (value: string, successMessage?: string) => Promise<void>;
|
|
@@ -2020,33 +2184,6 @@ export declare type UseRadioOptions = {
|
|
|
2020
2184
|
|
|
2021
2185
|
export declare function useToast(): ToastContextValue;
|
|
2022
2186
|
|
|
2023
|
-
export declare function VerificationCodeInput({ id, name, value, onValueChange, disabled, readOnly, required, invalid, errorId, size, ref, label, description, error, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': describedBy, }: VerificationCodeInputProps): JSX.Element;
|
|
2024
|
-
|
|
2025
|
-
export declare type VerificationCodeInputProps = {
|
|
2026
|
-
id?: string;
|
|
2027
|
-
name?: string;
|
|
2028
|
-
/** 受控的 0–6 位 ASCII 数字字符串;保留前导零。 */
|
|
2029
|
-
value: string;
|
|
2030
|
-
onValueChange: (value: string) => void;
|
|
2031
|
-
disabled?: boolean;
|
|
2032
|
-
readOnly?: boolean;
|
|
2033
|
-
required?: boolean;
|
|
2034
|
-
invalid?: boolean;
|
|
2035
|
-
errorId?: string;
|
|
2036
|
-
size?: 'md' | 'lg';
|
|
2037
|
-
ref?: Ref<HTMLInputElement>;
|
|
2038
|
-
'aria-describedby'?: string;
|
|
2039
|
-
} & ((FieldShellProps & {
|
|
2040
|
-
'aria-label'?: never;
|
|
2041
|
-
'aria-labelledby'?: never;
|
|
2042
|
-
}) | (FieldBareProps & ({
|
|
2043
|
-
'aria-label': string;
|
|
2044
|
-
'aria-labelledby'?: never;
|
|
2045
|
-
} | {
|
|
2046
|
-
'aria-labelledby': string;
|
|
2047
|
-
'aria-label'?: never;
|
|
2048
|
-
})));
|
|
2049
|
-
|
|
2050
2187
|
export declare function Video({ src, poster, tracks, label, purpose, controls, loop, muted, }: VideoProps): JSX.Element;
|
|
2051
2188
|
|
|
2052
2189
|
declare type VideoBaseProps = {
|