@q1travel/design-system 0.30.1 → 0.30.3
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/dist-pkg/design-system.d.ts +20 -3
- package/dist-pkg/design-system.js +6679 -6469
- package/dist-pkg/style.css +22 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ import { ForwardRefExoticComponent } from 'react';
|
|
|
12
12
|
import { HTMLAttributes } from 'react';
|
|
13
13
|
import { InputHTMLAttributes } from 'react';
|
|
14
14
|
import { JSX } from 'react';
|
|
15
|
+
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
15
16
|
import { KeyboardEventHandler } from 'react';
|
|
16
17
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
17
18
|
import { MouseEventHandler } from 'react';
|
|
@@ -580,13 +581,14 @@ export declare function CollapsibleBreadcrumb({ items, label }: {
|
|
|
580
581
|
label: string;
|
|
581
582
|
}): JSX.Element;
|
|
582
583
|
|
|
583
|
-
export declare function Combobox({ options, value, onChange, onSearch, isLoading, placeholder, size, disabled, readOnly, invalid, errorId, error, emptyText, clearable, id, className, name, inputMode, spellCheck, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ref, ...rest }: ComboboxProps): JSX.Element;
|
|
584
|
+
export declare function Combobox({ options, searchPlacement, searchPlaceholder, footer, value, onChange, onSearch, isLoading, placeholder, size, disabled, readOnly, invalid, errorId, error, emptyText, clearable, id, className, name, inputMode, spellCheck, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ref, ...rest }: ComboboxProps): JSX.Element;
|
|
584
585
|
|
|
585
586
|
export declare type ComboboxOption = {
|
|
586
587
|
/** 禁止空字符串(与「未选」的受控空值歧义,adapter 层保证)。 */
|
|
587
588
|
value: string;
|
|
588
589
|
/** 显示与过滤的唯一来源。 */
|
|
589
590
|
label: string;
|
|
591
|
+
description?: string;
|
|
590
592
|
disabled?: boolean;
|
|
591
593
|
/** 组件透而不读,仅随 onChange 第二参原样带回。 */
|
|
592
594
|
meta?: unknown;
|
|
@@ -599,6 +601,12 @@ export declare type ComboboxOption = {
|
|
|
599
601
|
export declare type ComboboxProps = {
|
|
600
602
|
/** 唯一 shape,后端字段在 adapter 层转换。 */
|
|
601
603
|
options: ComboboxOption[];
|
|
604
|
+
/** 默认在触发器输入;panel 使用按钮触发并将搜索放在弹层。 */
|
|
605
|
+
searchPlacement?: 'input' | 'panel';
|
|
606
|
+
/** 面板搜索的独立占位文案。 */
|
|
607
|
+
searchPlaceholder?: string;
|
|
608
|
+
/** 列表之外的操作区,进入正常 Tab 顺序。 */
|
|
609
|
+
footer?: ReactNode;
|
|
602
610
|
/** 受控选中值;'' = 未选。 */
|
|
603
611
|
value: string;
|
|
604
612
|
/** 选中传 (option.value, option);clearable 清除传 ('', undefined)。 */
|
|
@@ -1573,7 +1581,7 @@ declare type ModalLegacyDismissalProps = {
|
|
|
1573
1581
|
export declare type ModalProps = ModalBaseProps & (ModalLegacyDismissalProps | ModalEscapeActionProps);
|
|
1574
1582
|
|
|
1575
1583
|
/** 标签触发器与弹层搜索组合;选项变更保持展开,选中值完全受控。 */
|
|
1576
|
-
export declare function MultiCombobox({ options, value, onChange, onOpenChange, selectedOptions, placeholder, searchPlaceholder, onSearch, searchValue, isLoading, loadError, onRetry, emptyText, disabled, readOnly, invalid, errorId, error, clearable, id, name, className, ref, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby }: MultiComboboxProps): JSX.Element;
|
|
1584
|
+
export declare function MultiCombobox({ options, value, onChange, onOpenChange, selectedOptions, placeholder, searchPlaceholder, onSearch, searchValue, isLoading, loadError, onRetry, emptyText, footer, required, disabled, readOnly, invalid, errorId, error, clearable, id, name, className, ref, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby }: MultiComboboxProps): JSX.Element;
|
|
1577
1585
|
|
|
1578
1586
|
export declare type MultiComboboxChangeDetails = {
|
|
1579
1587
|
action: 'select' | 'remove' | 'clear';
|
|
@@ -1607,6 +1615,8 @@ export declare type MultiComboboxProps = {
|
|
|
1607
1615
|
loadError?: ReactNode;
|
|
1608
1616
|
onRetry?: () => void;
|
|
1609
1617
|
emptyText?: ReactNode;
|
|
1618
|
+
footer?: ReactNode;
|
|
1619
|
+
required?: boolean;
|
|
1610
1620
|
disabled?: boolean;
|
|
1611
1621
|
readOnly?: boolean;
|
|
1612
1622
|
invalid?: boolean;
|
|
@@ -2087,7 +2097,7 @@ export declare function ScrollerWithButtons({ axis, contentName, label, children
|
|
|
2087
2097
|
children: ReactNode;
|
|
2088
2098
|
}): JSX.Element;
|
|
2089
2099
|
|
|
2090
|
-
export declare function SearchDialog({ open, onOpenChange, query, onQueryChange, sections, onSelect, renderTrigger, label, placeholder, emptyTitle, clearQueryLabel, footer, }: SearchDialogProps): JSX.Element;
|
|
2100
|
+
export declare function SearchDialog({ open, onOpenChange, query, onQueryChange, sections, onSelect, renderTrigger, label, placeholder, emptyTitle, clearQueryLabel, footer, onEscapeKeyDown, onInputKeyDown, }: SearchDialogProps): JSX.Element;
|
|
2091
2101
|
|
|
2092
2102
|
export declare type SearchDialogItem = {
|
|
2093
2103
|
id: string;
|
|
@@ -2120,6 +2130,13 @@ export declare type SearchDialogProps = {
|
|
|
2120
2130
|
emptyTitle?: string;
|
|
2121
2131
|
clearQueryLabel?: string;
|
|
2122
2132
|
footer?: ReactNode;
|
|
2133
|
+
/** Esc 关闭前调用;preventDefault 可接管返回等操作。 */
|
|
2134
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
2135
|
+
/** 输入框键盘导航前调用;preventDefault 跳过内部处理,IME 期间不调用。 */
|
|
2136
|
+
onInputKeyDown?: (event: KeyboardEvent_2<HTMLInputElement>, context: {
|
|
2137
|
+
readonly activeItem?: SearchDialogItem;
|
|
2138
|
+
readonly activeSectionId?: string;
|
|
2139
|
+
}) => void;
|
|
2123
2140
|
};
|
|
2124
2141
|
|
|
2125
2142
|
export declare type SearchDialogSection = {
|