@xihan-ui/web-components 1.0.0-alpha.1 → 1.0.0-alpha.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/CHANGELOG.md +589 -0
- package/custom-elements.json +18815 -4447
- package/dist/backgrounds.js +1 -1
- package/dist/config-Cz16-P4i.d.ts +37 -0
- package/dist/config-Cz16-P4i.d.ts.map +1 -0
- package/dist/define.d.ts +2419 -266
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +4213 -978
- package/dist/define.js.map +1 -1
- package/dist/{element-BxtVEMuI.js → element-Cpkqkn_U.js} +2 -2
- package/dist/{element-BxtVEMuI.js.map → element-Cpkqkn_U.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{machine-controller-Cq9t_cfJ.js → machine-controller-j_fnUsFq.js} +68 -4
- package/dist/machine-controller-j_fnUsFq.js.map +1 -0
- package/package.json +19 -17
- package/dist/machine-controller-Cq9t_cfJ.js.map +0 -1
- package/dist/spread-Ch8ZXZDC.d.ts +0 -9
- package/dist/spread-Ch8ZXZDC.d.ts.map +0 -1
package/dist/define.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { r as PropertyValues } from "./types-BvWWqMd_.js";
|
|
1
2
|
import { t as XhReactiveElement } from "./element-DRoFjrYO.js";
|
|
2
|
-
import {
|
|
3
|
+
import { l as Spreader, n as XhConfigScope, t as XhConfig } from "./config-Cz16-P4i.js";
|
|
4
|
+
import { AccordionNode, AlertSchema, AnchorTranslations, BadgeVariant, BreadcrumbTranslations, CalendarDay, CalendarSelectionMode, CalendarView, CalendarWeekDay, CalendarWeekdayFormat, CarouselTranslations, CascaderExpandTrigger, CascaderNode, CascaderSchema, CascaderValue, CheckboxCheckedState, CheckboxGroupNode, ColorPickerFormat, ColorPickerTranslations, ComboboxInputBehavior, ComboboxNode, ComboboxSchema, ComponentMeta, ComposerRunStatus, ComposerTranslations, ContextMenuNode, ContextMenuSchema, DateFieldTranslations, DateGranularity, DatePickerPreset, DatePickerSchema, DateSegmentSet, DateSegmentType, DownloadTriggerData, DrawerSchema, EditableActivationMode, EditableSubmitMode, EmptyStateLive, FieldsetTranslations, FileUploadRemoteFile, FileUploadSchema, FileUploadTranslations, FloatingPanelPosition, FloatingPanelSchema, FloatingPanelSize, FloatingPanelStage, FormErrorPatch, FormSchema, FormValidateOn, FormValues, HeatmapAxisInput, HeatmapGrid, HeatmapMatrixGrid, HeatmapMonthGrid, HeatmapPalette, HeatmapTranslations, HeatmapValue, HeatmapVariant, HotkeysPlatform, HotkeysTarget, HotkeysTranslations, IconWeight, ImageCropperRect, ImageCropperSchema, ImageCropperShape, ImageViewerItem, ImageViewerTranslations, JsonViewerTranslations, ListboxNode, ListboxSelectionMode, LoadingBarTranslations, MasonryColumns, MasonryProps, MenuNode, MenubarNode, NavigationMenuNode, NavigationMenuTranslations, NumberFieldSchema, PaginationTranslations, PasswordInputTranslations, PinInputTranslations, PinInputType, PopoverTranslations, ProgressGapPosition, ProgressVariant, RadioGroupNode, ResolvedToast, ScrollAreaOrientation, ScrollbarSchema, ScrollbarType, SegmentedNode, SelectNode, SelectSchema, SideNavNode, SideNavSchema, SideNavTranslations, SignaturePadDrawingOptions, SignaturePadTranslations, SkeletonVariant, SliderSchema, SliderValueTextDetails, SpaceProps, SpinnerTranslations, SplitterPanelProps, TableColumnDef, TableRowDef, TableSelection, TableSelectionMode, TableSortDescriptor, TabsActivationMode, TabsNode, TabsVariant, TagSchema, TagVariant, TagsInputBlurBehavior, TextFieldSchema, TextFieldType, ThreadStatus, ThreadTranslations, TimeFieldSchema, TimeGranularity, TimeHourCycle, TimePickerPreset, TimePickerSchema, TimerSchema, ToastOptions, ToastPlacement, ToastRecord, ToastTranslations, ToastType, ToasterTranslations, ToggleGroupNode, TourStep, TourTranslations, TransferFilter, TransferItem, TreeNode, TreeSchema, TreeSelectSchema, TreeSelectionMode, VirtualizerAlign, VirtualizerItemState, XhTranslationOverrides } from "@xihan-ui/headless";
|
|
5
|
+
import { MotionPreference } from "@xihan-ui/motion";
|
|
3
6
|
import { ActionVariant, ControlVariant, Direction, HighlighterPort, IconRecord, Orientation, Placement, Size, Tone } from "@xihan-ui/kernel";
|
|
4
|
-
import { AccordionNode, AlertSchema, AnchorTranslations, BadgeVariant, BreadcrumbTranslations, CalendarDay, CalendarSelectionMode, CalendarWeekDay, CalendarWeekdayFormat, CarouselTranslations, CascaderExpandTrigger, CascaderNode, CascaderSchema, CascaderValue, CheckboxCheckedState, CheckboxGroupNode, ColorPickerFormat, ColorPickerTranslations, ComboboxInputBehavior, ComboboxNode, ComponentMeta, ComposerRunStatus, ComposerTranslations, ContextMenuNode, ContextMenuSchema, DateGranularity, DatePickerSchema, DateSegmentType, DrawerSchema, EditableActivationMode, EditableSubmitMode, EmptyStateLive, FileUploadRemoteFile, FileUploadSchema, FileUploadTranslations, FormErrorPatch, FormSchema, FormValidateOn, FormValues, IconWeight, ImageViewerItem, ImageViewerTranslations, ListboxNode, ListboxSelectionMode, LoadingBarTranslations, MenuNode, MenubarNode, NavigationMenuNode, NavigationMenuTranslations, PaginationTranslations, PinInputTranslations, PinInputType, PopoverTranslations, ProgressGapPosition, ProgressVariant, RadioGroupNode, ResolvedToast, ScrollAreaOrientation, ScrollAreaType, SelectNode, SelectSchema, SideNavNode, SideNavSchema, SideNavTranslations, SkeletonVariant, SliderSchema, SliderValueTextDetails, SpinnerTranslations, SplitterPanelProps, TableColumnDef, TableRowDef, TableSelection, TableSelectionMode, TableSortDescriptor, TabsActivationMode, TabsNode, TabsVariant, TagsInputBlurBehavior, TextFieldSchema, ThreadStatus, ThreadTranslations, TimeGranularity, TimeHourCycle, ToastOptions, ToastPlacement, ToastRecord, ToastTranslations, ToastType, ToasterTranslations, ToggleGroupNode, TourStep, TourTranslations, TransferFilter, TransferItem, TreeNode, TreeSchema, TreeSelectSchema, TreeSelectionMode, VirtualizerAlign, VirtualizerItemState } from "@xihan-ui/headless";
|
|
5
7
|
//#region src/dom/part-contract.d.ts
|
|
6
8
|
/** 只取校验用得上的两项,避免把 `Anatomy<具体 part 联合>` 收窄成 `Anatomy<string>` 时不可赋值。 */
|
|
7
9
|
interface PartContract {
|
|
@@ -54,6 +56,12 @@ declare abstract class XhElement extends XhReactiveElement {
|
|
|
54
56
|
*/
|
|
55
57
|
protected onPartsReleased(_nodes: readonly HTMLElement[]): void;
|
|
56
58
|
connectedCallback(): void;
|
|
59
|
+
private stopConfigWatch;
|
|
60
|
+
/**
|
|
61
|
+
* 把沿祖先链解析到的全局配置并进这份 props:translations 按组件名分桶合并,
|
|
62
|
+
* locale 与 size 在元素上没给时取配置里的。不跑机器的元素在 wire() 里用它包一层。
|
|
63
|
+
*/
|
|
64
|
+
protected configured<T extends object>(component: string, props: T): T;
|
|
57
65
|
/** 已排了断开后的交还,还没跑到。 */
|
|
58
66
|
private releaseScheduled;
|
|
59
67
|
disconnectedCallback(): void;
|
|
@@ -67,6 +75,13 @@ declare abstract class XhElement extends XhReactiveElement {
|
|
|
67
75
|
* 宿主离场后没有观察器再触发更新,refreshParts 那条交还路径够不着,没摘的监听器会经节点钉住整台宿主。
|
|
68
76
|
*/
|
|
69
77
|
private releaseAllParts;
|
|
78
|
+
/** 层叠上下文那条诊断已经查过。 */
|
|
79
|
+
private stackingChecked;
|
|
80
|
+
/**
|
|
81
|
+
* 浮层首次展开后查一次祖先链有没有建层叠上下文,命中即投诊断。
|
|
82
|
+
* 每个实例只查一次,重定位与后续展开不再重复。
|
|
83
|
+
*/
|
|
84
|
+
private checkStackingTrap;
|
|
70
85
|
/** 标记 wire() 正在写属性。 */
|
|
71
86
|
private wiring;
|
|
72
87
|
/**
|
|
@@ -102,8 +117,13 @@ declare abstract class XhElement extends XhReactiveElement {
|
|
|
102
117
|
* @csspart indicator - 展开方向指示符
|
|
103
118
|
*/
|
|
104
119
|
declare class XhAccordionElement extends XhElement {
|
|
120
|
+
private readonly exits;
|
|
121
|
+
private readonly exitIdGen;
|
|
122
|
+
private readonly exitScope;
|
|
123
|
+
private exitConfig;
|
|
124
|
+
private ensureExitConfig;
|
|
105
125
|
static partContract: {
|
|
106
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
126
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "header" | "trigger">;
|
|
107
127
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
108
128
|
};
|
|
109
129
|
static properties: {
|
|
@@ -232,7 +252,7 @@ declare class XhAlertElement extends XhElement {
|
|
|
232
252
|
*/
|
|
233
253
|
declare class XhAnchorElement extends XhElement {
|
|
234
254
|
static partContract: {
|
|
235
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
255
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "list" | "link">;
|
|
236
256
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
237
257
|
};
|
|
238
258
|
static properties: {
|
|
@@ -360,6 +380,11 @@ declare class XhAvatarElement extends XhElement {
|
|
|
360
380
|
* @attr {'solid'|'subtle'|'outline'} variant - 视觉变体
|
|
361
381
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
362
382
|
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
383
|
+
* @attr {number} count - 计数:给了它徽标就自己出数字,超过 max 写成「max+」;节点已有内容时以内容为准
|
|
384
|
+
* @attr {number} max - 计数上限,默认 99
|
|
385
|
+
* @attr {boolean} show-zero - 计数为 0 时也显示,默认不显示
|
|
386
|
+
* @attr {boolean} dot - 只出一个点,不出数字
|
|
387
|
+
* @attr {string} label - 读屏怎么念这枚徽标,例如「3 条未读」
|
|
363
388
|
* @csspart root - 承载 data-scope/data-part/data-* 的展示节点
|
|
364
389
|
*/
|
|
365
390
|
declare class XhBadgeElement extends XhElement {
|
|
@@ -383,10 +408,37 @@ declare class XhBadgeElement extends XhElement {
|
|
|
383
408
|
fromAttribute: (v: string | null) => string | undefined;
|
|
384
409
|
};
|
|
385
410
|
};
|
|
411
|
+
count: {
|
|
412
|
+
converter: {
|
|
413
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
max: {
|
|
417
|
+
converter: {
|
|
418
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
showZero: {
|
|
422
|
+
type: BooleanConstructor;
|
|
423
|
+
attribute: string;
|
|
424
|
+
};
|
|
425
|
+
dot: {
|
|
426
|
+
type: BooleanConstructor;
|
|
427
|
+
};
|
|
428
|
+
label: {
|
|
429
|
+
converter: {
|
|
430
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
431
|
+
};
|
|
432
|
+
};
|
|
386
433
|
};
|
|
387
434
|
variant?: BadgeVariant;
|
|
388
435
|
tone?: Tone;
|
|
389
436
|
size?: Size;
|
|
437
|
+
count?: number;
|
|
438
|
+
max?: number;
|
|
439
|
+
showZero?: boolean;
|
|
440
|
+
dot?: boolean;
|
|
441
|
+
label?: string;
|
|
390
442
|
protected wire(): void;
|
|
391
443
|
}
|
|
392
444
|
//#endregion
|
|
@@ -448,6 +500,8 @@ declare class XhBreadcrumbElement extends XhElement {
|
|
|
448
500
|
* @customElement xh-button
|
|
449
501
|
* @attr {'button'|'submit'|'reset'} type - 原生按钮类型,默认 button
|
|
450
502
|
* @attr {boolean} disabled - 禁用(原生 disabled,丢焦点)
|
|
503
|
+
* @attr {boolean} icon-only - 只有图标:左右内距清零、宽高相等;作者须自行给可及名
|
|
504
|
+
* @attr {boolean} full-width - 撑满行宽
|
|
451
505
|
* @attr {boolean} loading - 加载中(aria-disabled,保留焦点并拦截点击)
|
|
452
506
|
* @attr {'solid'|'subtle'|'outline'|'ghost'} variant - 视觉变体
|
|
453
507
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
@@ -464,6 +518,14 @@ declare class XhButtonElement extends XhElement {
|
|
|
464
518
|
disabled: {
|
|
465
519
|
type: BooleanConstructor;
|
|
466
520
|
};
|
|
521
|
+
iconOnly: {
|
|
522
|
+
type: BooleanConstructor;
|
|
523
|
+
attribute: string;
|
|
524
|
+
};
|
|
525
|
+
fullWidth: {
|
|
526
|
+
type: BooleanConstructor;
|
|
527
|
+
attribute: string;
|
|
528
|
+
};
|
|
467
529
|
loading: {
|
|
468
530
|
type: BooleanConstructor;
|
|
469
531
|
};
|
|
@@ -473,6 +535,8 @@ declare class XhButtonElement extends XhElement {
|
|
|
473
535
|
};
|
|
474
536
|
type?: 'button' | 'submit' | 'reset';
|
|
475
537
|
disabled?: boolean;
|
|
538
|
+
iconOnly?: boolean;
|
|
539
|
+
fullWidth?: boolean;
|
|
476
540
|
loading?: boolean;
|
|
477
541
|
variant?: ActionVariant;
|
|
478
542
|
tone?: Tone;
|
|
@@ -497,30 +561,41 @@ declare class XhButtonElement extends XhElement {
|
|
|
497
561
|
* @attr {string} default-focused-value - 非受控初始聚焦日;缺省时退回首个选中值,再退回今天
|
|
498
562
|
* @attr {string} min - 可选范围下界(含当天),界外的日子转 aria-disabled 但仍可聚焦
|
|
499
563
|
* @attr {string} max - 可选范围上界(含当天)
|
|
500
|
-
* @attr {string} locale -
|
|
564
|
+
* @attr {string} locale - 决定周首日与文案;不给按宿主语言,宿主也没有时按 en-US
|
|
501
565
|
* @attr {string} time-zone - 判定今天与格式化用的时区,默认宿主本地时区
|
|
502
566
|
* @attr {boolean} disabled - 整张禁用:翻月按钮转原生 disabled,格子全转 aria-disabled
|
|
503
567
|
* @attr {boolean} read-only - 只读:翻月与移动焦点照常,只是选不动值
|
|
504
568
|
* @attr {'narrow'|'short'} weekday-format - 表头缩写粒度,默认 short
|
|
505
569
|
* @attr {boolean} fixed-weeks - 恒渲染六行
|
|
570
|
+
* @attr {'day'|'month'|'quarter'|'year'} view - 挑的粒度,默认 day;这一档也是「点一格即选中」的那一档
|
|
571
|
+
* @attr {'day'|'month'|'quarter'|'year'} active-view - 受控:面板此刻钻到了哪一层;缺省跟着 view
|
|
572
|
+
* @attr {'day'|'month'|'quarter'|'year'} default-active-view - 非受控初值,缺省同 view
|
|
573
|
+
* @attr {boolean} week-selection - 周选:点任意一天选中它所在的整周(view=day 且区间模式下生效)
|
|
574
|
+
* @attr {number} visible-count - 并排展示几页
|
|
506
575
|
* @fires value-change - 选中集合变化;detail 为 `{ value: string[] }`
|
|
507
576
|
* @fires focused-value-change - 聚焦日变化;detail 为 `{ focusedValue: string }`
|
|
577
|
+
* @fires active-view-change - 钻到了另一层;detail 为 `{ activeView: 'day'|'month'|'quarter'|'year' }`
|
|
508
578
|
* @csspart root - 组件根容器
|
|
509
579
|
* @csspart header - 标题栏外壳
|
|
580
|
+
* @csspart prev-year-trigger - 快速往前翻一大步(日视图一年、粗粒度十页);可选
|
|
510
581
|
* @csspart prev-trigger - 上一月;越过 min 时转原生 disabled
|
|
511
582
|
* @csspart next-trigger - 下一月;越过 max 时转原生 disabled
|
|
583
|
+
* @csspart next-year-trigger - 快速往后翻一大步;可选
|
|
512
584
|
* @csspart heading - 展示月标题(grid 的 aria-labelledby 目标)
|
|
585
|
+
* @csspart heading-year-trigger - 标题里年那一截,点它钻到十年格;文字由元素填。年视图下已到顶,转原生 disabled;可选
|
|
586
|
+
* @csspart heading-month-trigger - 标题里月那一截,点它钻到月格;只有日视图有这一截,其余层带 hidden;可选
|
|
513
587
|
* @csspart grid - role=grid 容器,键盘在此收口
|
|
514
588
|
* @csspart grid-head - role=rowgroup 表头组,里面套一个 week-row
|
|
515
589
|
* @csspart week-day - role=columnheader 列头,须自带 value 属性标明列序 0-6
|
|
516
590
|
* @csspart grid-body - role=rowgroup 日期组
|
|
517
591
|
* @csspart week-row - role=row 周行,表头与日期行共用
|
|
592
|
+
* @csspart week-number - 行首的周序号格(role=rowheader),须自带 value 属性(行首那天);可选
|
|
518
593
|
* @csspart cell - role=gridcell 日期格,承载 aria-selected;须自带 value 属性(ISO 串)标明是哪一天
|
|
519
594
|
* @csspart cell-trigger - 可点可聚焦层,承载 aria-disabled 与 roving tabindex
|
|
520
595
|
*/
|
|
521
596
|
declare class XhCalendarElement extends XhElement {
|
|
522
597
|
static partContract: {
|
|
523
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "header" | "grid" | "heading" | "prev-trigger" | "next-trigger" | "grid-head" | "week-day" | "grid-body" | "week-row" | "cell" | "cell-trigger">;
|
|
598
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "header" | "grid" | "heading" | "prev-trigger" | "next-trigger" | "prev-year-trigger" | "next-year-trigger" | "heading-year-trigger" | "heading-month-trigger" | "grid-head" | "week-day" | "grid-body" | "week-row" | "week-number" | "cell" | "cell-trigger">;
|
|
524
599
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
525
600
|
};
|
|
526
601
|
static properties: {
|
|
@@ -591,6 +666,35 @@ declare class XhCalendarElement extends XhElement {
|
|
|
591
666
|
type: BooleanConstructor;
|
|
592
667
|
attribute: string;
|
|
593
668
|
};
|
|
669
|
+
view: {
|
|
670
|
+
converter: {
|
|
671
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
activeView: {
|
|
675
|
+
converter: {
|
|
676
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
677
|
+
};
|
|
678
|
+
attribute: string;
|
|
679
|
+
};
|
|
680
|
+
defaultActiveView: {
|
|
681
|
+
converter: {
|
|
682
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
683
|
+
};
|
|
684
|
+
attribute: string;
|
|
685
|
+
};
|
|
686
|
+
weekSelection: {
|
|
687
|
+
converter: {
|
|
688
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
689
|
+
};
|
|
690
|
+
attribute: string;
|
|
691
|
+
};
|
|
692
|
+
visibleCount: {
|
|
693
|
+
converter: {
|
|
694
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
695
|
+
};
|
|
696
|
+
attribute: string;
|
|
697
|
+
};
|
|
594
698
|
isDateUnavailable: {
|
|
595
699
|
attribute: boolean;
|
|
596
700
|
};
|
|
@@ -608,9 +712,15 @@ declare class XhCalendarElement extends XhElement {
|
|
|
608
712
|
disabled?: boolean;
|
|
609
713
|
readOnly?: boolean;
|
|
610
714
|
fixedWeeks?: boolean;
|
|
715
|
+
view?: CalendarView;
|
|
716
|
+
activeView?: CalendarView;
|
|
717
|
+
defaultActiveView?: CalendarView;
|
|
718
|
+
weekSelection?: boolean;
|
|
719
|
+
visibleCount?: number;
|
|
611
720
|
isDateUnavailable?: (value: string) => boolean;
|
|
612
721
|
private readonly notifyValue;
|
|
613
722
|
private readonly notifyFocus;
|
|
723
|
+
private readonly notifyActiveView;
|
|
614
724
|
private readonly ctrl;
|
|
615
725
|
private machineProps;
|
|
616
726
|
/** 当前展示月的日期矩阵,作者照它重画网格。机器尚未建起时给空数组。 */
|
|
@@ -656,7 +766,7 @@ declare class XhCalendarElement extends XhElement {
|
|
|
656
766
|
*/
|
|
657
767
|
declare class XhCarouselElement extends XhElement {
|
|
658
768
|
static partContract: {
|
|
659
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
769
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "viewport" | "indicator" | "prev-trigger" | "next-trigger" | "item-group" | "indicator-group">;
|
|
660
770
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
661
771
|
};
|
|
662
772
|
static properties: {
|
|
@@ -786,10 +896,11 @@ declare class XhCarouselElement extends XhElement {
|
|
|
786
896
|
* @fires open-change - open 状态变化;detail 为 `{ open: boolean }`
|
|
787
897
|
* @csspart root - 组件根容器(承载 data-state/data-disabled/data-readonly/data-invalid)
|
|
788
898
|
* @csspart label - 标题(aria-labelledby 目标)
|
|
899
|
+
* @csspart control - 触发按钮与清空按钮的收纳容器:描边、底色与聚焦环都落在这一层
|
|
789
900
|
* @csspart trigger - role=combobox 的触发按钮,同时是定位锚点,须是原生 button
|
|
790
901
|
* @csspart value-text - 整条路径的显示位;留空即由元素填入,作者写了内容则归作者
|
|
791
902
|
* @csspart indicator - 展开指示符(aria-hidden,data-state 随开合)
|
|
792
|
-
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab
|
|
903
|
+
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab 位,可及名字取 translations.clearTrigger
|
|
793
904
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
794
905
|
* @csspart content - 浮层壳(焦点域与消解层的根节点),键盘在此收口,收起时带 hidden;根列没有条目时带 data-empty
|
|
795
906
|
* @csspart input - 搜索框(content 顶部);没开 searchable 时带 hidden。上下键走候选、Enter 选中、Escape 先清词
|
|
@@ -803,7 +914,7 @@ declare class XhCarouselElement extends XhElement {
|
|
|
803
914
|
*/
|
|
804
915
|
declare class XhCascaderElement extends XhElement {
|
|
805
916
|
static partContract: {
|
|
806
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
917
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "label" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "input" | "empty" | "column" | "value-text" | "search-list" | "search-item">;
|
|
807
918
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
808
919
|
};
|
|
809
920
|
static properties: {
|
|
@@ -944,6 +1055,8 @@ declare class XhCascaderElement extends XhElement {
|
|
|
944
1055
|
private readonly cascaderScope;
|
|
945
1056
|
private readonly positionEngine;
|
|
946
1057
|
private config;
|
|
1058
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
1059
|
+
private exit;
|
|
947
1060
|
/** value-text 是否归元素填:首次见到该节点时定,之后不再回读(回读到的会是自己写的字)。 */
|
|
948
1061
|
private readonly ownsValueText;
|
|
949
1062
|
/** 空态占位的文案是否归元素填,判定同 ownsValueText。 */
|
|
@@ -990,6 +1103,9 @@ declare class XhCascaderElement extends XhElement {
|
|
|
990
1103
|
* @attr {boolean|'indeterminate'} checked - 受控选中;写 indeterminate 为半选,缺省该属性即非受控
|
|
991
1104
|
* @attr {boolean|'indeterminate'} default-checked - 非受控初值
|
|
992
1105
|
* @attr {boolean} disabled - 禁用
|
|
1106
|
+
* @attr {boolean} read-only - 只读:勾不动,但仍可聚焦、仍参与提交
|
|
1107
|
+
* @attr {boolean} invalid - 校验失败态
|
|
1108
|
+
* @attr {boolean} required - 必填
|
|
993
1109
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
994
1110
|
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
995
1111
|
* @fires checked-change - checked 状态变化;detail 为 `{ checked: boolean }`
|
|
@@ -997,10 +1113,12 @@ declare class XhCascaderElement extends XhElement {
|
|
|
997
1113
|
* @csspart indicator - 选中标记
|
|
998
1114
|
* @attr {string} name - 表单字段名;给了 hidden-input 才参与提交
|
|
999
1115
|
* @csspart hidden-input - type=hidden 的表单出口,省略该节点即不参与表单
|
|
1116
|
+
* @csspart label - 可选:包住 root 与 text 的 <label>,点文字即切换
|
|
1117
|
+
* @csspart text - 可选:控件旁的文字
|
|
1000
1118
|
*/
|
|
1001
1119
|
declare class XhCheckboxElement extends XhElement {
|
|
1002
1120
|
static partContract: {
|
|
1003
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "hidden-input">;
|
|
1121
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "label" | "text" | "hidden-input">;
|
|
1004
1122
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1005
1123
|
};
|
|
1006
1124
|
static properties: {
|
|
@@ -1018,6 +1136,16 @@ declare class XhCheckboxElement extends XhElement {
|
|
|
1018
1136
|
disabled: {
|
|
1019
1137
|
type: BooleanConstructor;
|
|
1020
1138
|
};
|
|
1139
|
+
readOnly: {
|
|
1140
|
+
type: BooleanConstructor;
|
|
1141
|
+
attribute: string;
|
|
1142
|
+
};
|
|
1143
|
+
invalid: {
|
|
1144
|
+
type: BooleanConstructor;
|
|
1145
|
+
};
|
|
1146
|
+
required: {
|
|
1147
|
+
type: BooleanConstructor;
|
|
1148
|
+
};
|
|
1021
1149
|
name: {
|
|
1022
1150
|
converter: {
|
|
1023
1151
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -1034,6 +1162,9 @@ declare class XhCheckboxElement extends XhElement {
|
|
|
1034
1162
|
checked?: CheckboxCheckedState;
|
|
1035
1163
|
defaultChecked?: CheckboxCheckedState;
|
|
1036
1164
|
disabled?: boolean;
|
|
1165
|
+
readOnly?: boolean;
|
|
1166
|
+
invalid?: boolean;
|
|
1167
|
+
required?: boolean;
|
|
1037
1168
|
name?: string;
|
|
1038
1169
|
value?: string;
|
|
1039
1170
|
tone?: Tone;
|
|
@@ -1072,7 +1203,7 @@ declare class XhCheckboxElement extends XhElement {
|
|
|
1072
1203
|
*/
|
|
1073
1204
|
declare class XhCheckboxGroupElement extends XhElement {
|
|
1074
1205
|
static partContract: {
|
|
1075
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
1206
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "trigger" | "label" | "item-text" | "hidden-input">;
|
|
1076
1207
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1077
1208
|
};
|
|
1078
1209
|
static properties: {
|
|
@@ -1171,7 +1302,7 @@ declare class XhCheckboxGroupElement extends XhElement {
|
|
|
1171
1302
|
*/
|
|
1172
1303
|
declare class XhClipboardElement extends XhElement {
|
|
1173
1304
|
static partContract: {
|
|
1174
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "trigger" | "label" | "
|
|
1305
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "trigger" | "label" | "control" | "input">;
|
|
1175
1306
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1176
1307
|
};
|
|
1177
1308
|
static properties: {
|
|
@@ -1204,6 +1335,7 @@ declare class XhClipboardElement extends XhElement {
|
|
|
1204
1335
|
* @customElement xh-code-block
|
|
1205
1336
|
* @attr {string} code - 代码原文,只用于数行数预撑高度
|
|
1206
1337
|
* @attr {string} code-lang - 围栏语言标注,空白时按 plaintext 处理
|
|
1338
|
+
* @attr {boolean} wrap - 长行自动换行,默认关(长行横向滚动)
|
|
1207
1339
|
* @attr {boolean} complete - 代码块是否已闭合
|
|
1208
1340
|
* @csspart root - 外壳,承载 data-lang / data-complete
|
|
1209
1341
|
* @csspart lang-label - 语言角标,纯装饰且对读屏隐藏
|
|
@@ -1229,6 +1361,9 @@ declare class XhCodeBlockElement extends XhElement {
|
|
|
1229
1361
|
};
|
|
1230
1362
|
attribute: string;
|
|
1231
1363
|
};
|
|
1364
|
+
wrap: {
|
|
1365
|
+
type: BooleanConstructor;
|
|
1366
|
+
};
|
|
1232
1367
|
complete: {
|
|
1233
1368
|
converter: {
|
|
1234
1369
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
@@ -1243,6 +1378,7 @@ declare class XhCodeBlockElement extends XhElement {
|
|
|
1243
1378
|
};
|
|
1244
1379
|
code?: string;
|
|
1245
1380
|
codeLang?: string;
|
|
1381
|
+
wrap?: boolean;
|
|
1246
1382
|
complete?: boolean;
|
|
1247
1383
|
highlightWhileStreaming?: boolean;
|
|
1248
1384
|
/** 换一个着色实现(典型是接 Shiki);置 null 关掉着色。只走 property,属性表达不了对象。 */
|
|
@@ -1266,8 +1402,13 @@ declare class XhCodeBlockElement extends XhElement {
|
|
|
1266
1402
|
* @csspart content - 可折叠内容(收起时隐藏)
|
|
1267
1403
|
*/
|
|
1268
1404
|
declare class XhCollapsibleElement extends XhElement {
|
|
1405
|
+
private exit;
|
|
1406
|
+
private readonly idGen;
|
|
1407
|
+
private readonly collapsibleScope;
|
|
1408
|
+
private config;
|
|
1409
|
+
private ensureConfig;
|
|
1269
1410
|
static partContract: {
|
|
1270
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
1411
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger">;
|
|
1271
1412
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1272
1413
|
};
|
|
1273
1414
|
static properties: {
|
|
@@ -1326,6 +1467,7 @@ declare class XhCollapsibleElement extends XhElement {
|
|
|
1326
1467
|
* @fires open-change - open 状态变化;detail 为 `{ open: boolean }`
|
|
1327
1468
|
* @csspart root - 组件根容器(承载 data-state/data-disabled/data-readonly)
|
|
1328
1469
|
* @csspart label - 组标题(触发器 aria-labelledby 的目标之一)
|
|
1470
|
+
* @csspart control - 触发按钮的收纳容器:描边、底色与聚焦环都落在这一层
|
|
1329
1471
|
* @csspart trigger - 触发按钮,须是原生 button;同时是浮层的定位锚点
|
|
1330
1472
|
* @csspart value-text - 当前值串的显示位;留空即由元素填入,作者写了内容则归作者
|
|
1331
1473
|
* @csspart swatch - 当前颜色的色块(aria-hidden,背景由连接层写成内联样式)
|
|
@@ -1344,7 +1486,7 @@ declare class XhCollapsibleElement extends XhElement {
|
|
|
1344
1486
|
*/
|
|
1345
1487
|
declare class XhColorPickerElement extends XhElement {
|
|
1346
1488
|
static partContract: {
|
|
1347
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
1489
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "label" | "control" | "positioner" | "value-text" | "hidden-input" | "area" | "swatch" | "area-thumb" | "channel-slider" | "channel-slider-track" | "channel-slider-thumb" | "channel-input" | "eye-dropper-trigger" | "swatch-group" | "swatch-item">;
|
|
1348
1490
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1349
1491
|
};
|
|
1350
1492
|
static properties: {
|
|
@@ -1437,6 +1579,8 @@ declare class XhColorPickerElement extends XhElement {
|
|
|
1437
1579
|
private readonly pickerScope;
|
|
1438
1580
|
private readonly positionEngine;
|
|
1439
1581
|
private config;
|
|
1582
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
1583
|
+
private exit;
|
|
1440
1584
|
private readonly notifyValue;
|
|
1441
1585
|
private readonly notifyOpen;
|
|
1442
1586
|
private readonly ctrl;
|
|
@@ -1496,7 +1640,7 @@ declare class XhColorPickerElement extends XhElement {
|
|
|
1496
1640
|
* @csspart control - 输入行容器,同时是浮层的定位锚点
|
|
1497
1641
|
* @csspart input - 输入框,整个组合框唯一的 Tab 停靠点;写 input 时带 role=combobox,写 textarea 时保留它自带的 textbox 角色
|
|
1498
1642
|
* @csspart trigger - 展开/收起按钮,须是原生 button;不占 Tab 位,可及名字由作者给
|
|
1499
|
-
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab
|
|
1643
|
+
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab 位,读屏按 aria-label 找到它
|
|
1500
1644
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
1501
1645
|
* @csspart content - role=listbox 容器(消解层的根节点),收起时带 hidden
|
|
1502
1646
|
* @csspart item - role=option 候选,须自带 value 属性标识身份;禁用写 aria-disabled="true"
|
|
@@ -1510,13 +1654,16 @@ declare class XhColorPickerElement extends XhElement {
|
|
|
1510
1654
|
*/
|
|
1511
1655
|
declare class XhComboboxElement extends XhElement {
|
|
1512
1656
|
static partContract: {
|
|
1513
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "
|
|
1657
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "label" | "item-group" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "input" | "empty" | "hidden-input" | "item-group-label">;
|
|
1514
1658
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1515
1659
|
};
|
|
1516
1660
|
static properties: {
|
|
1517
1661
|
collection: {
|
|
1518
1662
|
attribute: boolean;
|
|
1519
1663
|
};
|
|
1664
|
+
translations: {
|
|
1665
|
+
attribute: boolean;
|
|
1666
|
+
};
|
|
1520
1667
|
name: {
|
|
1521
1668
|
converter: {
|
|
1522
1669
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -1622,6 +1769,7 @@ declare class XhComboboxElement extends XhElement {
|
|
|
1622
1769
|
};
|
|
1623
1770
|
};
|
|
1624
1771
|
collection?: ComboboxNode[];
|
|
1772
|
+
translations?: ComboboxSchema['props']['translations'];
|
|
1625
1773
|
value?: string | string[];
|
|
1626
1774
|
defaultValue?: string | string[];
|
|
1627
1775
|
inputValue?: string;
|
|
@@ -1647,6 +1795,8 @@ declare class XhComboboxElement extends XhElement {
|
|
|
1647
1795
|
private readonly comboboxScope;
|
|
1648
1796
|
private readonly positionEngine;
|
|
1649
1797
|
private config;
|
|
1798
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
1799
|
+
private exit;
|
|
1650
1800
|
private readonly notifyValue;
|
|
1651
1801
|
private readonly notifyInputValue;
|
|
1652
1802
|
private readonly notifyOpen;
|
|
@@ -1741,6 +1891,65 @@ declare class XhComposerElement extends XhElement {
|
|
|
1741
1891
|
protected wire(): void;
|
|
1742
1892
|
}
|
|
1743
1893
|
//#endregion
|
|
1894
|
+
//#region src/elements/config.d.ts
|
|
1895
|
+
/**
|
|
1896
|
+
* `<xh-config>` —— 配置作用域。包住一棵子树,里面的元素解析 locale / size / translations
|
|
1897
|
+
* 时先看最近的这一层,再往外层与全局那份回落。
|
|
1898
|
+
*
|
|
1899
|
+
* 它不渲染任何东西、不接线任何角色节点:作者写的子节点原样留在 Light DOM 里,
|
|
1900
|
+
* 这个元素只是 DOM 树上的一个记号。皮肤里没有它的规则,布局上它是 display: contents。
|
|
1901
|
+
*
|
|
1902
|
+
* 与 Vue 适配器的 `provideXhConfig` 是同一件事的两种写法:那边沿组件树找,这边沿 DOM 祖先链找。
|
|
1903
|
+
* 逐键合并,本层只覆盖自己写了的那几项——只想改文案的子树不会把外层的 locale 一并抹掉。
|
|
1904
|
+
*
|
|
1905
|
+
* `translations` 与 `scrollRoot` 是对象与函数,只能走 property;`locale` / `size` / `motion` 属性与 property 都行。
|
|
1906
|
+
* `motion` 写了就调 setMotionOverride(应用级、不分子树);CSS 侧的 data-motion 钩子由作者自己打。
|
|
1907
|
+
*
|
|
1908
|
+
* @customElement xh-config
|
|
1909
|
+
* @attr {string} locale - BCP 47 语言标记,喂给日期时间系组件
|
|
1910
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸档的默认值,落到子树里每个声明了三轴 size 的组件上
|
|
1911
|
+
* @attr {'reduce'|'no-preference'} motion - 应用级动效偏好,写了就覆盖系统的 prefers-reduced-motion
|
|
1912
|
+
* @prop {XhTranslationOverrides} translations - 各组件内建文案的覆盖(对象只走 property)
|
|
1913
|
+
* @prop {() => HTMLElement | null} scrollRoot - 真正在滚的那个元素,交给滚动锁(函数只走 property)
|
|
1914
|
+
*/
|
|
1915
|
+
declare class XhConfigElement extends XhReactiveElement implements XhConfigScope {
|
|
1916
|
+
static properties: {
|
|
1917
|
+
locale: {
|
|
1918
|
+
converter: {
|
|
1919
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
1920
|
+
};
|
|
1921
|
+
};
|
|
1922
|
+
size: {
|
|
1923
|
+
converter: {
|
|
1924
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
1925
|
+
};
|
|
1926
|
+
};
|
|
1927
|
+
motion: {
|
|
1928
|
+
converter: {
|
|
1929
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
1930
|
+
};
|
|
1931
|
+
};
|
|
1932
|
+
translations: {
|
|
1933
|
+
attribute: boolean;
|
|
1934
|
+
};
|
|
1935
|
+
scrollRoot: {
|
|
1936
|
+
attribute: boolean;
|
|
1937
|
+
};
|
|
1938
|
+
};
|
|
1939
|
+
locale?: string;
|
|
1940
|
+
size?: Size;
|
|
1941
|
+
motion?: MotionPreference;
|
|
1942
|
+
translations?: XhTranslationOverrides;
|
|
1943
|
+
scrollRoot?: () => HTMLElement | null;
|
|
1944
|
+
/** 本层声明的那几项;解析器沿祖先链读它,缺席的键交给外层。 */
|
|
1945
|
+
get xhConfig(): XhConfig;
|
|
1946
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
1947
|
+
connectedCallback(): void;
|
|
1948
|
+
disconnectedCallback(): void;
|
|
1949
|
+
/** 改了任一项都要让子树里已挂载的元素重算一遍。 */
|
|
1950
|
+
protected updated(changed: PropertyValues): void;
|
|
1951
|
+
}
|
|
1952
|
+
//#endregion
|
|
1744
1953
|
//#region src/elements/context-menu.d.ts
|
|
1745
1954
|
/**
|
|
1746
1955
|
* `<xh-context-menu>` —— Light-DOM 行为宿主:作者写 root/trigger/positioner/content 与若干
|
|
@@ -1779,7 +1988,7 @@ declare class XhComposerElement extends XhElement {
|
|
|
1779
1988
|
*/
|
|
1780
1989
|
declare class XhContextMenuElement extends XhElement {
|
|
1781
1990
|
static partContract: {
|
|
1782
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "
|
|
1991
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "separator" | "positioner" | "item-text" | "item-indicator" | "group" | "group-label" | "arrow">;
|
|
1783
1992
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1784
1993
|
};
|
|
1785
1994
|
static properties: {
|
|
@@ -1858,6 +2067,8 @@ declare class XhContextMenuElement extends XhElement {
|
|
|
1858
2067
|
private readonly menuScope;
|
|
1859
2068
|
private readonly positionEngine;
|
|
1860
2069
|
private config;
|
|
2070
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
2071
|
+
private exit;
|
|
1861
2072
|
private readonly notifyOpen;
|
|
1862
2073
|
private readonly notifySelect;
|
|
1863
2074
|
private readonly ctrl;
|
|
@@ -1888,13 +2099,16 @@ declare class XhContextMenuElement extends XhElement {
|
|
|
1888
2099
|
//#region src/elements/date-field.d.ts
|
|
1889
2100
|
type SegmentTexts = { readonly [K in DateSegmentType]?: string; };
|
|
1890
2101
|
/**
|
|
1891
|
-
* `<xh-date-field>` —— Light-DOM 行为宿主:作者写 root/label/control/segment(多个)/hidden-input
|
|
2102
|
+
* `<xh-date-field>` —— Light-DOM 行为宿主:作者写 root/label/control/segment-group/segment(多个)/hidden-input
|
|
1892
2103
|
* 角色节点,元素跑 date-field 机器并把 connect 产出打上去。
|
|
1893
2104
|
*
|
|
1894
2105
|
* 每一段是一个 role=spinbutton 的可聚焦节点:上下键加减并在段区间里回绕、左右键与 Home/End 换段、
|
|
1895
|
-
* 数字键直填且敲满自动跳下一段、Backspace
|
|
1896
|
-
*
|
|
1897
|
-
*
|
|
2106
|
+
* 数字键直填且敲满自动跳下一段、Backspace 清掉本段;可选的 clear-trigger 一键清空全部段。
|
|
2107
|
+
*
|
|
2108
|
+
* 是哪一段有两种写法:只声明下标(`index`,或按文档序),是哪一段由 locale(zh-CN 年月日、
|
|
2109
|
+
* en-US 月日年)与段集算出来——同一份标记换个 locale 就换一副面孔;或按段名写死
|
|
2110
|
+
* (`segment="quarter"`),段集里没有这一块时那一格收起。用不上的段带 hidden 留在文档里,
|
|
2111
|
+
* 不卸载作者节点。
|
|
1898
2112
|
*
|
|
1899
2113
|
* 段位没填齐时整份值是 null;填齐了才拼出 ISO 串,由 hidden-input 随表单提交。
|
|
1900
2114
|
*
|
|
@@ -1906,9 +2120,12 @@ type SegmentTexts = { readonly [K in DateSegmentType]?: string; };
|
|
|
1906
2120
|
* @attr {string} default-value - 非受控初值,同样是 ISO 串
|
|
1907
2121
|
* @attr {string} min - 下界 ISO 串,参与各段区间的收窄
|
|
1908
2122
|
* @attr {string} max - 上界 ISO 串
|
|
1909
|
-
* @attr {string} locale - BCP 47
|
|
2123
|
+
* @attr {string} locale - BCP 47 语言标记,决定年月日三段的先后;不给按宿主语言,宿主也没有时按 en-US
|
|
1910
2124
|
* @attr {string} time-zone - IANA 时区名,只用来取"今天"(空段按上下键时的起点)
|
|
1911
2125
|
* @attr {'day'|'hour'|'minute'|'second'} granularity - 精度,决定一共几段,默认 day
|
|
2126
|
+
* @attr {string} segments - 段集,逗号分隔的段名(`year,quarter`);给了它 granularity 让路。
|
|
2127
|
+
* 可选的九块:year / quarter / month / week / day / hour / minute / second / dayPeriod。
|
|
2128
|
+
* 季度与月、周与日两两互斥,都写时留细的那个
|
|
1912
2129
|
* @attr {boolean} disabled - 禁用:整组退出 Tab 序,隐藏输入不参与提交
|
|
1913
2130
|
* @attr {boolean} read-only - 只读:可聚焦、可换段,但改不动
|
|
1914
2131
|
* @attr {boolean} invalid - 校验失败标注
|
|
@@ -1921,12 +2138,15 @@ type SegmentTexts = { readonly [K in DateSegmentType]?: string; };
|
|
|
1921
2138
|
* @csspart root - 最外层,承载 data-disabled / data-invalid / data-complete / data-out-of-range
|
|
1922
2139
|
* @csspart label - 标题;点它把焦点送进首段
|
|
1923
2140
|
* @csspart control - role=group 的分段容器
|
|
1924
|
-
* @csspart segment -
|
|
2141
|
+
* @csspart segment-group - 段位与分隔符的外壳,占满盒里剩下的宽度
|
|
2142
|
+
* @csspart segment - 一段一个的 spinbutton 节点。可自带 segment 属性按段名认领(segment="quarter"),
|
|
2143
|
+
* 或自带 index 属性声明下标,两者都没写按文档序
|
|
2144
|
+
* @csspart clear-trigger - 清空钮,不占 Tab 位;没值或不可编辑时收起,点完焦点回到首段
|
|
1925
2145
|
* @csspart hidden-input - type=hidden 的表单出口,值是 ISO 串
|
|
1926
2146
|
*/
|
|
1927
2147
|
declare class XhDateFieldElement extends XhElement {
|
|
1928
2148
|
static partContract: {
|
|
1929
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "hidden-input" | "
|
|
2149
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "hidden-input" | "segment-group" | "segment">;
|
|
1930
2150
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1931
2151
|
};
|
|
1932
2152
|
static properties: {
|
|
@@ -1967,6 +2187,11 @@ declare class XhDateFieldElement extends XhElement {
|
|
|
1967
2187
|
fromAttribute: (v: string | null) => string | undefined;
|
|
1968
2188
|
};
|
|
1969
2189
|
};
|
|
2190
|
+
segments: {
|
|
2191
|
+
converter: {
|
|
2192
|
+
fromAttribute: (v: string | null) => DateSegmentSet | undefined;
|
|
2193
|
+
};
|
|
2194
|
+
};
|
|
1970
2195
|
disabled: {
|
|
1971
2196
|
converter: {
|
|
1972
2197
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
@@ -2022,13 +2247,14 @@ declare class XhDateFieldElement extends XhElement {
|
|
|
2022
2247
|
locale?: string;
|
|
2023
2248
|
timeZone?: string;
|
|
2024
2249
|
granularity?: DateGranularity;
|
|
2250
|
+
segments?: DateSegmentSet;
|
|
2025
2251
|
disabled?: boolean;
|
|
2026
2252
|
readOnly?: boolean;
|
|
2027
2253
|
invalid?: boolean;
|
|
2028
2254
|
required?: boolean;
|
|
2029
2255
|
name?: string;
|
|
2030
2256
|
placeholder?: SegmentTexts;
|
|
2031
|
-
translations?:
|
|
2257
|
+
translations?: DateFieldTranslations;
|
|
2032
2258
|
variant?: ControlVariant;
|
|
2033
2259
|
tone?: Tone;
|
|
2034
2260
|
size?: Size;
|
|
@@ -2040,7 +2266,7 @@ declare class XhDateFieldElement extends XhElement {
|
|
|
2040
2266
|
//#endregion
|
|
2041
2267
|
//#region src/elements/date-picker.d.ts
|
|
2042
2268
|
/**
|
|
2043
|
-
* `<xh-date-picker>` —— Light-DOM 行为宿主:作者写 root/label/control/
|
|
2269
|
+
* `<xh-date-picker>` —— Light-DOM 行为宿主:作者写 root/label/control/segment-group/segment/trigger/
|
|
2044
2270
|
* clear-trigger/positioner/content/calendar 角色节点,calendar 之内再照日历那套写
|
|
2045
2271
|
* header/prev-trigger/next-trigger/heading/grid/grid-head/week-day/grid-body/week-row/cell/cell-trigger。
|
|
2046
2272
|
*
|
|
@@ -2050,12 +2276,13 @@ declare class XhDateFieldElement extends XhElement {
|
|
|
2050
2276
|
* 网格由作者渲染,元素不生成节点:读 `weeks` / `weekDays` / `headingLabel` 三个只读属性,
|
|
2051
2277
|
* 听 `focused-value-change` 重画。日期身份取 cell 节点上的 `value`(ISO 串),
|
|
2052
2278
|
* cell-trigger 跟随所在 cell;表头列取 week-day 上的 `value`(列序 0-6);
|
|
2053
|
-
* 段位可自带 `
|
|
2279
|
+
* 段位可自带 `segment` 属性按段名认领(`segment="quarter"`),或自带 `index` 属性声明下标,
|
|
2280
|
+
* 两者都没写按所在 segment-group 之内的文档序。
|
|
2054
2281
|
*
|
|
2055
|
-
* 区间模式(selection-mode="range")下
|
|
2056
|
-
* 各自内部写一整套段位。段位与 hidden-input 按所在
|
|
2057
|
-
* hidden-input 写在
|
|
2058
|
-
* 其余模式只认第一个
|
|
2282
|
+
* 区间模式(selection-mode="range")下 segment-group 写两个:文档序在前的是起点、在后的是终点,
|
|
2283
|
+
* 各自内部写一整套段位。段位与 hidden-input 按所在 segment-group 归组,方向键不跨组;
|
|
2284
|
+
* hidden-input 写在 segment-group 之外(如与 control 平级)时按文档序对应起止两端。
|
|
2285
|
+
* 其余模式只认第一个 segment-group。
|
|
2059
2286
|
*
|
|
2060
2287
|
* @customElement xh-date-picker
|
|
2061
2288
|
* @attr {string} value - 受控选中值(单选简写,ISO 串);缺省该属性即非受控,区间/多选请用 property 传数组
|
|
@@ -2064,52 +2291,69 @@ declare class XhDateFieldElement extends XhElement {
|
|
|
2064
2291
|
* @attr {boolean} default-open - 非受控初始为展开
|
|
2065
2292
|
* @attr {string} min - 可选范围下界(含当天),日历与分段输入共用
|
|
2066
2293
|
* @attr {string} max - 可选范围上界(含当天)
|
|
2067
|
-
* @attr {string} locale -
|
|
2294
|
+
* @attr {string} locale - 决定周首日、月份文案与段位先后;不给按宿主语言,宿主也没有时按 en-US
|
|
2068
2295
|
* @attr {string} time-zone - 判定"今天"与格式化用的时区,默认宿主本地时区
|
|
2069
2296
|
* @attr {'single'|'multiple'|'range'} selection-mode - 选择模式,默认 single
|
|
2297
|
+
* @attr {'day'|'month'|'quarter'|'year'} view - 挑的粒度,默认 day;输入行铺哪几段也跟着它走
|
|
2298
|
+
* @attr {'day'|'month'|'quarter'|'year'} active-view - 受控:面板此刻钻到了哪一层;缺省跟着 view,每次展开都拨回去
|
|
2299
|
+
* @attr {boolean} week-selection - 周选:点任意一天选中它所在的整周(view=day 且区间模式下生效)
|
|
2300
|
+
* @prop {DatePickerPreset[]} presets - 快捷选项(数组只走 property):给了就在浮层里多出一列
|
|
2301
|
+
* @attr {number} visible-count - 并排展示几页
|
|
2070
2302
|
* @attr {boolean} disabled - 整个控件禁用:trigger 转原生 disabled,段位退出 Tab 序
|
|
2071
2303
|
* @attr {boolean} read-only - 只读:浮层照常展开、日历照常浏览,但选中值改不动
|
|
2072
2304
|
* @attr {boolean} invalid - 校验失败标注
|
|
2073
2305
|
* @attr {boolean} required - 必填标注,落到每段的 aria-required 上
|
|
2074
2306
|
* @attr {string} name - 表单字段名;给了隐藏输入才带 name。区间模式下是起点那一份
|
|
2075
2307
|
* @attr {string} end-name - 区间终点那份隐藏输入的表单字段名;不给即终点不参与提交
|
|
2308
|
+
* @attr {'outline'|'subtle'|'ghost'} variant - 视觉变体
|
|
2309
|
+
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
2310
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
2076
2311
|
* @attr {string} placement - 首选放置位,默认 bottom-start;避让后的实际位写在 data-placement 上
|
|
2077
2312
|
* @attr {number} offset - 浮层与锚点的间距(px)
|
|
2078
2313
|
* @attr {boolean} close-on-select - 选完即收起,默认 true;写 close-on-select="false" 关掉
|
|
2079
2314
|
* @fires value-change - 选中集合变化;detail 为 `{ value: string[] }`
|
|
2080
2315
|
* @fires open-change - open 状态变化;detail 为 `{ open: boolean }`
|
|
2081
2316
|
* @fires focused-value-change - 聚焦日变化(意味着展示月可能换了);detail 为 `{ focusedValue: string }`,作者据此重画网格
|
|
2317
|
+
* @fires active-view-change - 钻到了另一层(点标题钻上、点格子钻下);detail 为 `{ activeView: 'day'|'month'|'quarter'|'year' }`,作者据此重画网格
|
|
2082
2318
|
* @csspart root - 组件根容器(承载 data-state/data-disabled/data-readonly/data-invalid)
|
|
2083
2319
|
* @csspart label - 标题;点它把焦点送进首段。刻意不是原生 label(段位是 div,标不了)
|
|
2084
2320
|
* @csspart control - 输入行容器,同时是浮层的定位锚点
|
|
2085
|
-
* @csspart
|
|
2086
|
-
* @csspart segment - 一段一个的 spinbutton 节点(data-scope="date-field"
|
|
2321
|
+
* @csspart segment-group - role=group 的分段容器,段位挂在它里面;区间模式下有起止两个,data-index 区分
|
|
2322
|
+
* @csspart segment - 一段一个的 spinbutton 节点(data-scope="date-field")。可自带 segment 属性按段名认领
|
|
2323
|
+
* (segment="quarter"),或自带 index 属性声明下标(在所属 segment-group 组内数),两者都没写按文档序
|
|
2087
2324
|
* @csspart trigger - 展开日历的按钮,须是原生 button
|
|
2088
|
-
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab
|
|
2325
|
+
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab 位,名字取 translations.clearTrigger
|
|
2089
2326
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
2090
2327
|
* @csspart content - role=dialog 浮层(消解层的根节点),收起时带 hidden
|
|
2328
|
+
* @csspart presets - 快捷选项列(role=listbox);没给 presets 时带 hidden
|
|
2329
|
+
* @csspart preset - 一条快捷选项(role=option),须自带 value 属性(与 presets 数据里的 value 逐字对上)
|
|
2091
2330
|
* @csspart calendar - 内嵌日历的挂载点,同时充当日历的根节点
|
|
2092
2331
|
* @csspart time-column - showTime 的时间列,须自带 unit 属性(hour/minute/second);没开时带 hidden
|
|
2093
2332
|
* @csspart time-item - 时间选项,须自带 value 属性(两位补零串);点按把该单位写进值
|
|
2094
2333
|
* @csspart confirm-trigger - showTime 的收口按钮;没开时带 hidden
|
|
2095
2334
|
* @csspart header - 日历标题栏外壳(data-scope="calendar")
|
|
2335
|
+
* @csspart prev-year-trigger - 快速往前翻一大步(日视图一年、粗粒度十页);可选
|
|
2096
2336
|
* @csspart prev-trigger - 上一月;越过 min 时转原生 disabled
|
|
2097
2337
|
* @csspart next-trigger - 下一月;越过 max 时转原生 disabled
|
|
2338
|
+
* @csspart next-year-trigger - 快速往后翻一大步;可选
|
|
2098
2339
|
* @csspart heading - 展示月标题(grid 的 aria-labelledby 目标)
|
|
2340
|
+
* @csspart heading-year-trigger - 标题里年那一截,点它钻到十年格;可选
|
|
2341
|
+
* @csspart heading-month-trigger - 标题里月那一截,点它钻到月格;只有日视图有这一截;可选
|
|
2099
2342
|
* @csspart grid - role=grid 容器,网格键盘在此收口
|
|
2100
2343
|
* @csspart grid-head - role=rowgroup 表头组,里面套一个 week-row
|
|
2101
2344
|
* @csspart week-day - role=columnheader 列头,须自带 value 属性标明列序 0-6
|
|
2102
2345
|
* @csspart grid-body - role=rowgroup 日期组
|
|
2103
2346
|
* @csspart week-row - role=row 周行,表头与日期行共用
|
|
2347
|
+
* @csspart week-number - 行首的周序号格(role=rowheader),须自带 value 属性(行首那天);可选
|
|
2104
2348
|
* @csspart cell - role=gridcell 日期格,承载 aria-selected;须自带 value 属性(ISO 串)
|
|
2105
2349
|
* @csspart cell-trigger - 真正可点可聚焦的那一层,承载 aria-disabled 与 roving tabindex
|
|
2106
2350
|
* @csspart hidden-input - type=hidden 的表单出口,值是 ISO 串;区间模式下起止各一份
|
|
2107
2351
|
*/
|
|
2108
2352
|
declare class XhDatePickerElement extends XhElement {
|
|
2109
2353
|
static partContract: {
|
|
2110
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
2354
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "label" | "control" | "positioner" | "clear-trigger" | "segment-group" | "confirm-trigger" | "preset" | "presets" | "calendar" | "time-column" | "time-item">;
|
|
2111
2355
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2112
|
-
delegates: (import("@xihan-ui/kernel").Anatomy<"root" | "header" | "grid" | "heading" | "prev-trigger" | "next-trigger" | "grid-head" | "week-day" | "grid-body" | "week-row" | "cell" | "cell-trigger"> | import("@xihan-ui/kernel").Anatomy<"root" | "label" | "hidden-input" | "
|
|
2356
|
+
delegates: (import("@xihan-ui/kernel").Anatomy<"root" | "header" | "grid" | "heading" | "prev-trigger" | "next-trigger" | "prev-year-trigger" | "next-year-trigger" | "heading-year-trigger" | "heading-month-trigger" | "grid-head" | "week-day" | "grid-body" | "week-row" | "week-number" | "cell" | "cell-trigger"> | import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "hidden-input" | "segment-group" | "segment">)[];
|
|
2113
2357
|
};
|
|
2114
2358
|
static properties: {
|
|
2115
2359
|
value: {
|
|
@@ -2159,6 +2403,35 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2159
2403
|
};
|
|
2160
2404
|
attribute: string;
|
|
2161
2405
|
};
|
|
2406
|
+
view: {
|
|
2407
|
+
converter: {
|
|
2408
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2409
|
+
};
|
|
2410
|
+
};
|
|
2411
|
+
activeView: {
|
|
2412
|
+
converter: {
|
|
2413
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2414
|
+
};
|
|
2415
|
+
attribute: string;
|
|
2416
|
+
};
|
|
2417
|
+
segments: {
|
|
2418
|
+
attribute: boolean;
|
|
2419
|
+
};
|
|
2420
|
+
weekSelection: {
|
|
2421
|
+
converter: {
|
|
2422
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
2423
|
+
};
|
|
2424
|
+
attribute: string;
|
|
2425
|
+
};
|
|
2426
|
+
presets: {
|
|
2427
|
+
attribute: boolean;
|
|
2428
|
+
};
|
|
2429
|
+
visibleCount: {
|
|
2430
|
+
converter: {
|
|
2431
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
2432
|
+
};
|
|
2433
|
+
attribute: string;
|
|
2434
|
+
};
|
|
2162
2435
|
disabled: {
|
|
2163
2436
|
converter: {
|
|
2164
2437
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
@@ -2194,6 +2467,21 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2194
2467
|
translations: {
|
|
2195
2468
|
attribute: boolean;
|
|
2196
2469
|
};
|
|
2470
|
+
variant: {
|
|
2471
|
+
converter: {
|
|
2472
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2473
|
+
};
|
|
2474
|
+
};
|
|
2475
|
+
tone: {
|
|
2476
|
+
converter: {
|
|
2477
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2478
|
+
};
|
|
2479
|
+
};
|
|
2480
|
+
size: {
|
|
2481
|
+
converter: {
|
|
2482
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2483
|
+
};
|
|
2484
|
+
};
|
|
2197
2485
|
placement: {
|
|
2198
2486
|
converter: {
|
|
2199
2487
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -2235,6 +2523,12 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2235
2523
|
locale?: string;
|
|
2236
2524
|
timeZone?: string;
|
|
2237
2525
|
selectionMode?: CalendarSelectionMode;
|
|
2526
|
+
view?: CalendarView;
|
|
2527
|
+
activeView?: CalendarView;
|
|
2528
|
+
segments?: DateSegmentSet;
|
|
2529
|
+
weekSelection?: boolean;
|
|
2530
|
+
presets?: DatePickerPreset[];
|
|
2531
|
+
visibleCount?: number;
|
|
2238
2532
|
disabled?: boolean;
|
|
2239
2533
|
readOnly?: boolean;
|
|
2240
2534
|
invalid?: boolean;
|
|
@@ -2242,6 +2536,9 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2242
2536
|
name?: string;
|
|
2243
2537
|
endName?: string;
|
|
2244
2538
|
translations?: DatePickerSchema['props']['translations'];
|
|
2539
|
+
variant?: ControlVariant;
|
|
2540
|
+
tone?: Tone;
|
|
2541
|
+
size?: Size;
|
|
2245
2542
|
placement?: Placement;
|
|
2246
2543
|
offset?: number;
|
|
2247
2544
|
closeOnSelect?: boolean;
|
|
@@ -2252,8 +2549,11 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2252
2549
|
private readonly pickerScope;
|
|
2253
2550
|
private readonly positionEngine;
|
|
2254
2551
|
private config;
|
|
2552
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
2553
|
+
private exit;
|
|
2255
2554
|
private readonly notifyValue;
|
|
2256
2555
|
private readonly notifyOpen;
|
|
2556
|
+
private readonly notifyActiveView;
|
|
2257
2557
|
private readonly notifyFocus;
|
|
2258
2558
|
private readonly rootCtrl;
|
|
2259
2559
|
private readonly calendarCtrl;
|
|
@@ -2275,8 +2575,8 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2275
2575
|
/** 取 owner 子树内指定名字的角色节点。 */
|
|
2276
2576
|
private partsIn;
|
|
2277
2577
|
/**
|
|
2278
|
-
* 把隐藏输入分到起止两端:写在某个
|
|
2279
|
-
* 写在全部
|
|
2578
|
+
* 把隐藏输入分到起止两端:写在某个 segment-group 之内的归那一组,
|
|
2579
|
+
* 写在全部 segment-group 之外的按自己的文档序对号入座。多出来的一律不接线。
|
|
2280
2580
|
*/
|
|
2281
2581
|
private hiddenInputGroups;
|
|
2282
2582
|
/** 打一组段位:下标在组内从 0 数起,段位文字与收起态一并落。 */
|
|
@@ -2297,6 +2597,7 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2297
2597
|
* @attr {'dialog'|'alertdialog'} role - 语义角色,默认 dialog
|
|
2298
2598
|
* @attr {boolean} close-on-escape - Esc 关闭,默认 true
|
|
2299
2599
|
* @attr {boolean} restore-focus - 关闭后把焦点归还触发元素,默认 true
|
|
2600
|
+
* @attr {string} initial-focus - 展开后先聚焦到 content 内匹配此选择器的元素
|
|
2300
2601
|
* @attr {'sm'|'md'|'lg'} size - 尺寸:只换 content 的最大宽度,落在 content 上
|
|
2301
2602
|
* @fires open-change - open 状态变化;detail 为 `{ open: boolean }`
|
|
2302
2603
|
* @csspart trigger - 触发按钮
|
|
@@ -2309,7 +2610,7 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2309
2610
|
*/
|
|
2310
2611
|
declare class XhDialogElement extends XhElement {
|
|
2311
2612
|
static partContract: {
|
|
2312
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"
|
|
2613
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"content" | "trigger" | "title" | "description" | "close-trigger" | "positioner" | "backdrop">;
|
|
2313
2614
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2314
2615
|
};
|
|
2315
2616
|
static properties: {
|
|
@@ -2339,6 +2640,12 @@ declare class XhDialogElement extends XhElement {
|
|
|
2339
2640
|
};
|
|
2340
2641
|
attribute: string;
|
|
2341
2642
|
};
|
|
2643
|
+
initialFocus: {
|
|
2644
|
+
converter: {
|
|
2645
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2646
|
+
};
|
|
2647
|
+
attribute: string;
|
|
2648
|
+
};
|
|
2342
2649
|
size: {
|
|
2343
2650
|
converter: {
|
|
2344
2651
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -2350,22 +2657,84 @@ declare class XhDialogElement extends XhElement {
|
|
|
2350
2657
|
modal?: boolean;
|
|
2351
2658
|
closeOnEscape?: boolean;
|
|
2352
2659
|
restoreFocus?: boolean;
|
|
2660
|
+
initialFocus?: string;
|
|
2353
2661
|
size?: Size;
|
|
2354
2662
|
private readonly idGen;
|
|
2355
2663
|
private readonly dialogScope;
|
|
2356
2664
|
private config;
|
|
2357
2665
|
private contentNode;
|
|
2666
|
+
private exit;
|
|
2358
2667
|
private backdropNode;
|
|
2359
2668
|
private readonly notify;
|
|
2360
2669
|
private readonly ctrl;
|
|
2361
2670
|
private machineProps;
|
|
2362
2671
|
private ensureConfig;
|
|
2672
|
+
/** 退场闸门建一次;presence 不是响应式 cell,退场结束要显式排一次更新才轮得到收起。 */
|
|
2673
|
+
private ensureExit;
|
|
2363
2674
|
private readonly registerLayer;
|
|
2364
2675
|
private injectRefs;
|
|
2365
2676
|
protected wire(): void;
|
|
2366
2677
|
disconnectedCallback(): void;
|
|
2367
2678
|
}
|
|
2368
2679
|
//#endregion
|
|
2680
|
+
//#region src/elements/download-trigger.d.ts
|
|
2681
|
+
/**
|
|
2682
|
+
* `<xh-download-trigger>` —— Light-DOM 行为宿主,跑 download-trigger 机器并把 connect 产出打到 root 角色节点。
|
|
2683
|
+
*
|
|
2684
|
+
* 下载走临时地址加一次隐藏链接点击:点下去先进 preparing,数据交给浏览器后回 idle 并派
|
|
2685
|
+
* `download-complete`,取数失败同样回 idle 并派 `download-error`。
|
|
2686
|
+
*
|
|
2687
|
+
* Blob 与取数函数只能走 property(`el.data = blob`):HTML 属性只装得下一个字符串。
|
|
2688
|
+
*
|
|
2689
|
+
* @customElement xh-download-trigger
|
|
2690
|
+
* @attr {string} data - 要下载的文本;Blob 与取数函数只能经 property 交进来
|
|
2691
|
+
* @attr {string} file-name - 写出的文件名;缺省或空串退回内建名 download
|
|
2692
|
+
* @attr {string} mime-type - 内容类型;给了它就以它为准,连 Blob 自带的类型也照它重包
|
|
2693
|
+
* @attr {boolean} disabled - 禁用,按钮不可聚焦也点不动
|
|
2694
|
+
* @fires download-complete - 数据已交给浏览器;detail 为 `{ fileName }`
|
|
2695
|
+
* @fires download-error - 取数失败或造不出下载;detail 为 `{ error, fileName }`,此刻状态已经回到 idle
|
|
2696
|
+
* @csspart root - 触发下载的按钮,须是原生 `<button>`(承载 data-state / aria-busy)
|
|
2697
|
+
*/
|
|
2698
|
+
declare class XhDownloadTriggerElement extends XhElement {
|
|
2699
|
+
static partContract: {
|
|
2700
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root">;
|
|
2701
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2702
|
+
};
|
|
2703
|
+
static properties: {
|
|
2704
|
+
data: {
|
|
2705
|
+
converter: {
|
|
2706
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2707
|
+
};
|
|
2708
|
+
};
|
|
2709
|
+
fileName: {
|
|
2710
|
+
converter: {
|
|
2711
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2712
|
+
};
|
|
2713
|
+
attribute: string;
|
|
2714
|
+
};
|
|
2715
|
+
mimeType: {
|
|
2716
|
+
converter: {
|
|
2717
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2718
|
+
};
|
|
2719
|
+
attribute: string;
|
|
2720
|
+
};
|
|
2721
|
+
disabled: {
|
|
2722
|
+
converter: {
|
|
2723
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
2724
|
+
};
|
|
2725
|
+
};
|
|
2726
|
+
};
|
|
2727
|
+
data?: DownloadTriggerData;
|
|
2728
|
+
fileName?: string;
|
|
2729
|
+
mimeType?: string;
|
|
2730
|
+
disabled?: boolean;
|
|
2731
|
+
private readonly notifyComplete;
|
|
2732
|
+
private readonly notifyError;
|
|
2733
|
+
private readonly ctrl;
|
|
2734
|
+
private machineProps;
|
|
2735
|
+
protected wire(): void;
|
|
2736
|
+
}
|
|
2737
|
+
//#endregion
|
|
2369
2738
|
//#region src/elements/drawer.d.ts
|
|
2370
2739
|
/**
|
|
2371
2740
|
* `<xh-drawer>` —— Light-DOM 行为宿主,跑 drawer 机器并把 connect 产出打到角色节点上,
|
|
@@ -2377,6 +2746,8 @@ declare class XhDialogElement extends XhElement {
|
|
|
2377
2746
|
* @attr {boolean} open - 受控开合;缺省该属性即非受控
|
|
2378
2747
|
* @attr {boolean} default-open - 非受控初始为打开
|
|
2379
2748
|
* @attr {boolean} modal - 模态(陷焦点、锁滚动、遮罩交互外关闭),默认 true
|
|
2749
|
+
* @attr {boolean} contained - 局部抽屉:遮罩与定位层从 fixed 换成 absolute,只罩住最近的定位祖先而不是盖满整屏。
|
|
2750
|
+
* 本元素是 Light DOM、作者写在哪浮层就在哪,所以「挂到哪个容器」这件事本身不需要属性——写上它是为了让皮肤按容器画
|
|
2380
2751
|
* @attr {'top'|'right'|'bottom'|'left'} side - 从哪条边滑出,默认 right
|
|
2381
2752
|
* @attr {'dialog'|'alertdialog'} role - 语义角色,默认 dialog
|
|
2382
2753
|
* @attr {boolean} close-on-escape - Esc 关闭,默认 true
|
|
@@ -2395,7 +2766,7 @@ declare class XhDialogElement extends XhElement {
|
|
|
2395
2766
|
*/
|
|
2396
2767
|
declare class XhDrawerElement extends XhElement {
|
|
2397
2768
|
static partContract: {
|
|
2398
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
2769
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "title" | "description" | "close-trigger" | "positioner" | "backdrop">;
|
|
2399
2770
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2400
2771
|
};
|
|
2401
2772
|
static properties: {
|
|
@@ -2413,6 +2784,11 @@ declare class XhDrawerElement extends XhElement {
|
|
|
2413
2784
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
2414
2785
|
};
|
|
2415
2786
|
};
|
|
2787
|
+
contained: {
|
|
2788
|
+
converter: {
|
|
2789
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
2790
|
+
};
|
|
2791
|
+
};
|
|
2416
2792
|
side: {
|
|
2417
2793
|
converter: {
|
|
2418
2794
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -2448,6 +2824,7 @@ declare class XhDrawerElement extends XhElement {
|
|
|
2448
2824
|
open?: boolean;
|
|
2449
2825
|
defaultOpen?: boolean;
|
|
2450
2826
|
modal?: boolean;
|
|
2827
|
+
contained?: boolean;
|
|
2451
2828
|
side?: DrawerSchema['props']['side'];
|
|
2452
2829
|
closeOnEscape?: boolean;
|
|
2453
2830
|
closeOnInteractOutside?: boolean;
|
|
@@ -2458,11 +2835,14 @@ declare class XhDrawerElement extends XhElement {
|
|
|
2458
2835
|
private readonly drawerScope;
|
|
2459
2836
|
private config;
|
|
2460
2837
|
private contentNode;
|
|
2838
|
+
private exit;
|
|
2461
2839
|
private backdropNode;
|
|
2462
2840
|
private readonly notify;
|
|
2463
2841
|
private readonly ctrl;
|
|
2464
2842
|
private machineProps;
|
|
2465
2843
|
private ensureConfig;
|
|
2844
|
+
/** 退场闸门建一次;presence 不是响应式 cell,退场结束要显式排一次更新才轮得到收起。 */
|
|
2845
|
+
private ensureExit;
|
|
2466
2846
|
private readonly registerLayer;
|
|
2467
2847
|
private injectRefs;
|
|
2468
2848
|
protected wire(): void;
|
|
@@ -2514,7 +2894,7 @@ declare class XhDrawerElement extends XhElement {
|
|
|
2514
2894
|
*/
|
|
2515
2895
|
declare class XhEditableElement extends XhElement {
|
|
2516
2896
|
static partContract: {
|
|
2517
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "
|
|
2897
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "input" | "area" | "submit-trigger" | "cancel-trigger" | "preview" | "edit-trigger">;
|
|
2518
2898
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2519
2899
|
};
|
|
2520
2900
|
static properties: {
|
|
@@ -2724,6 +3104,63 @@ declare class XhFieldElement extends XhElement {
|
|
|
2724
3104
|
protected wire(): void;
|
|
2725
3105
|
}
|
|
2726
3106
|
//#endregion
|
|
3107
|
+
//#region src/elements/fieldset.d.ts
|
|
3108
|
+
/**
|
|
3109
|
+
* `<xh-fieldset>` —— Light-DOM 行为宿主,无状态机,把 connectFieldset 产出的属性打到
|
|
3110
|
+
* root/legend/helper-text/error-text 角色节点上:说明与错误文案的 id 自动接进 root 的描述链。
|
|
3111
|
+
*
|
|
3112
|
+
* root 必须是原生 `<fieldset>`、legend 必须是原生 `<legend>` 且写成 root 的首个子节点——
|
|
3113
|
+
* 整组禁用连坐组内控件与"legend 即组名"都是浏览器给的,写成 div 两样都静默失效。
|
|
3114
|
+
*
|
|
3115
|
+
* 每个实例自带一份 scope 派生 part id,同页多个字段集各出各的 id。
|
|
3116
|
+
*
|
|
3117
|
+
* @customElement xh-fieldset
|
|
3118
|
+
* @attr {boolean} disabled - 整组禁用:root 落原生 disabled,组内表单控件一并停掉
|
|
3119
|
+
* @attr {boolean} invalid - 校验失败态:错误文案接入描述链并显出
|
|
3120
|
+
* @attr {boolean} required - 必填标记,只落 data-required 供皮肤给组标题加星号
|
|
3121
|
+
* @csspart root - 原生 `<fieldset>`,承载原生 disabled 与 data-disabled/data-invalid/data-required
|
|
3122
|
+
* @csspart legend - 原生 `<legend>`,这一组的名字;须是 root 的首个子节点
|
|
3123
|
+
* @csspart helper-text - 常驻说明文案,恒在 root 的描述链里
|
|
3124
|
+
* @csspart error-text - 错误文案(role=alert);非 invalid 时带 hidden 收起,节点不卸载
|
|
3125
|
+
*/
|
|
3126
|
+
declare class XhFieldsetElement extends XhElement {
|
|
3127
|
+
#private;
|
|
3128
|
+
static partContract: {
|
|
3129
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "error-text" | "legend" | "helper-text">;
|
|
3130
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3131
|
+
tags: {
|
|
3132
|
+
root: string[];
|
|
3133
|
+
legend: string[];
|
|
3134
|
+
};
|
|
3135
|
+
};
|
|
3136
|
+
static properties: {
|
|
3137
|
+
disabled: {
|
|
3138
|
+
converter: {
|
|
3139
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3140
|
+
};
|
|
3141
|
+
};
|
|
3142
|
+
invalid: {
|
|
3143
|
+
converter: {
|
|
3144
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3145
|
+
};
|
|
3146
|
+
};
|
|
3147
|
+
required: {
|
|
3148
|
+
converter: {
|
|
3149
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3150
|
+
};
|
|
3151
|
+
};
|
|
3152
|
+
translations: {
|
|
3153
|
+
attribute: boolean;
|
|
3154
|
+
};
|
|
3155
|
+
};
|
|
3156
|
+
disabled?: boolean;
|
|
3157
|
+
invalid?: boolean;
|
|
3158
|
+
required?: boolean;
|
|
3159
|
+
translations?: Partial<FieldsetTranslations>;
|
|
3160
|
+
private readonly fieldsetScope;
|
|
3161
|
+
protected wire(): void;
|
|
3162
|
+
}
|
|
3163
|
+
//#endregion
|
|
2727
3164
|
//#region src/elements/file-upload.d.ts
|
|
2728
3165
|
/**
|
|
2729
3166
|
* `<xh-file-upload>` —— Light-DOM 行为宿主:作者写 root/label/dropzone/trigger/hidden-input
|
|
@@ -2767,11 +3204,11 @@ declare class XhFieldElement extends XhElement {
|
|
|
2767
3204
|
* @csspart item-name - 文件名(元素代填)
|
|
2768
3205
|
* @csspart item-size-text - 人读的文件大小(元素代填)
|
|
2769
3206
|
* @csspart item-delete-trigger - 删掉这一条
|
|
2770
|
-
* @csspart clear-trigger -
|
|
3207
|
+
* @csspart clear-trigger - 清空整份列表;列表为空时打 data-empty,按钮照常在位可聚焦
|
|
2771
3208
|
*/
|
|
2772
3209
|
declare class XhFileUploadElement extends XhElement {
|
|
2773
3210
|
static partContract: {
|
|
2774
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "trigger" | "label" | "item-group" | "clear-trigger" | "hidden-input" | "dropzone" | "item-name" | "item-size-text" | "item-preview"
|
|
3211
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "trigger" | "label" | "item-group" | "clear-trigger" | "hidden-input" | "item-delete-trigger" | "dropzone" | "item-name" | "item-size-text" | "item-preview">;
|
|
2775
3212
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2776
3213
|
};
|
|
2777
3214
|
static properties: {
|
|
@@ -2886,7 +3323,8 @@ declare class XhFileUploadElement extends XhElement {
|
|
|
2886
3323
|
addFiles(files: File[]): void;
|
|
2887
3324
|
/** 按引用剔除某一个。 */
|
|
2888
3325
|
deleteFile(file: File): void;
|
|
2889
|
-
|
|
3326
|
+
/** 清空整份列表(本地与远程一起)。 */
|
|
3327
|
+
clear(): void;
|
|
2890
3328
|
/** 文本是否归元素填:节点非空即判为作者自定义渲染。首次见到时定死,之后不再回读——回读分不出内容是作者写的还是上一帧自己写的。 */
|
|
2891
3329
|
private readonly ownsText;
|
|
2892
3330
|
private fillText;
|
|
@@ -2899,20 +3337,176 @@ declare class XhFileUploadElement extends XhElement {
|
|
|
2899
3337
|
protected wire(): void;
|
|
2900
3338
|
}
|
|
2901
3339
|
//#endregion
|
|
2902
|
-
//#region src/elements/
|
|
3340
|
+
//#region src/elements/floating-panel.d.ts
|
|
2903
3341
|
/**
|
|
2904
|
-
* `<xh-
|
|
2905
|
-
*
|
|
2906
|
-
* 元素跑 form 机器并把 connect 产出打上去。
|
|
3342
|
+
* `<xh-floating-panel>` —— Light-DOM 行为宿主:作者写 root / positioner / content 等角色节点,
|
|
3343
|
+
* 元素跑 floating-panel 机器并把 connect 产出打上去。
|
|
2907
3344
|
*
|
|
2908
|
-
*
|
|
2909
|
-
*
|
|
2910
|
-
* 校验与回调都由组件收口。
|
|
3345
|
+
* 面板的落位与尺寸由元素每帧写进 positioner 的内联样式(position/left/top/width/height),
|
|
3346
|
+
* 作者的样式表不要再碰这五个属性。收起态用内联 display 收住 positioner,正文收拢时同样收住。
|
|
2911
3347
|
*
|
|
2912
|
-
*
|
|
2913
|
-
*
|
|
3348
|
+
* 改尺把手要在节点上写明守哪条边(`edge="se"`),形态按钮要写明切到哪个形态(`stage="minimized"`),
|
|
3349
|
+
* 与 Vue 侧的 `:edge` / `:stage` 是同一份声明。
|
|
2914
3350
|
*
|
|
2915
|
-
*
|
|
3351
|
+
* 位置与尺寸的属性形式是逗号分隔的一对数(`default-position="24,24"`、`default-size="360,240"`);
|
|
3352
|
+
* 也可以直接喂 property(`el.position = { x: 24, y: 24 }`)。
|
|
3353
|
+
*
|
|
3354
|
+
* @customElement xh-floating-panel
|
|
3355
|
+
* @attr {boolean} open - 受控开合;缺省该属性即非受控
|
|
3356
|
+
* @attr {boolean} default-open - 非受控初始为展开
|
|
3357
|
+
* @attr {string} position - 受控落点,写成 "x,y"(px,相对视口)
|
|
3358
|
+
* @attr {string} default-position - 非受控初始落点,默认 "24,24"
|
|
3359
|
+
* @attr {string} size - 受控尺寸,写成 "宽,高"(px)
|
|
3360
|
+
* @attr {string} default-size - 非受控初始尺寸,默认 "360,240"
|
|
3361
|
+
* @attr {string} min-size - 尺寸下限,默认 "160,120"
|
|
3362
|
+
* @attr {string} max-size - 尺寸上限,不写即不封顶
|
|
3363
|
+
* @attr {'default'|'minimized'|'maximized'} stage - 受控形态
|
|
3364
|
+
* @attr {'default'|'minimized'|'maximized'} default-stage - 非受控初始形态,默认 default
|
|
3365
|
+
* @attr {boolean} panel-draggable - 允不允许搬动面板,默认开启;铺满形态下恒不可搬。不叫 draggable:那是 HTML 全局属性,写上去宿主会变成原生拖放源
|
|
3366
|
+
* @attr {boolean} resizable - 允不允许改尺寸,默认开启;只有常规形态下才改得动
|
|
3367
|
+
* @attr {boolean} disabled - 禁用:搬不动、改不了尺寸、切不了形态;开合与关闭不受影响
|
|
3368
|
+
* @fires open-change - 展开态变化;detail 为 `{ open: boolean }`
|
|
3369
|
+
* @fires position-change - 落点变化(拖动途中会连发);detail 为 `{ position: { x, y } }`
|
|
3370
|
+
* @fires size-change - 尺寸变化(改尺途中会连发);detail 为 `{ size: { width, height } }`
|
|
3371
|
+
* @fires stage-change - 形态变化;detail 为 `{ stage: 'default' | 'minimized' | 'maximized' }`
|
|
3372
|
+
* @csspart root - 面板与触发器共同的容器
|
|
3373
|
+
* @csspart trigger - 打开面板的按钮
|
|
3374
|
+
* @csspart positioner - 承载落位与尺寸的定位容器,收起时被内联 display 收住
|
|
3375
|
+
* @csspart content - role=dialog 的面板本体(Esc 收口所在)
|
|
3376
|
+
* @csspart header - 标题栏:标题、拖拽把手与几个按钮排在这里
|
|
3377
|
+
* @csspart title - 标题(aria-labelledby 目标)
|
|
3378
|
+
* @csspart drag-trigger - 拖拽把手,须是原生 `<button>`
|
|
3379
|
+
* @csspart resize-trigger - 改尺把手,自带 edge 属性;接线后是 `role="separator"`,别写成 `<button>`
|
|
3380
|
+
* @csspart stage-trigger - 形态按钮,须是原生 `<button>` 并自带 stage 属性
|
|
3381
|
+
* @csspart close-trigger - 关闭按钮
|
|
3382
|
+
* @csspart body - 正文,收拢时带 hidden
|
|
3383
|
+
*/
|
|
3384
|
+
declare class XhFloatingPanelElement extends XhElement {
|
|
3385
|
+
static partContract: {
|
|
3386
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "header" | "trigger" | "title" | "close-trigger" | "positioner" | "body" | "drag-trigger" | "resize-trigger" | "stage-trigger">;
|
|
3387
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3388
|
+
};
|
|
3389
|
+
static properties: {
|
|
3390
|
+
open: {
|
|
3391
|
+
converter: {
|
|
3392
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3393
|
+
};
|
|
3394
|
+
};
|
|
3395
|
+
defaultOpen: {
|
|
3396
|
+
converter: {
|
|
3397
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3398
|
+
};
|
|
3399
|
+
attribute: string;
|
|
3400
|
+
};
|
|
3401
|
+
position: {
|
|
3402
|
+
converter: {
|
|
3403
|
+
fromAttribute: (v: string | null) => FloatingPanelPosition | undefined;
|
|
3404
|
+
};
|
|
3405
|
+
};
|
|
3406
|
+
defaultPosition: {
|
|
3407
|
+
converter: {
|
|
3408
|
+
fromAttribute: (v: string | null) => FloatingPanelPosition | undefined;
|
|
3409
|
+
};
|
|
3410
|
+
attribute: string;
|
|
3411
|
+
};
|
|
3412
|
+
size: {
|
|
3413
|
+
converter: {
|
|
3414
|
+
fromAttribute: (v: string | null) => FloatingPanelSize | undefined;
|
|
3415
|
+
};
|
|
3416
|
+
};
|
|
3417
|
+
defaultSize: {
|
|
3418
|
+
converter: {
|
|
3419
|
+
fromAttribute: (v: string | null) => FloatingPanelSize | undefined;
|
|
3420
|
+
};
|
|
3421
|
+
attribute: string;
|
|
3422
|
+
};
|
|
3423
|
+
minSize: {
|
|
3424
|
+
converter: {
|
|
3425
|
+
fromAttribute: (v: string | null) => FloatingPanelSize | undefined;
|
|
3426
|
+
};
|
|
3427
|
+
attribute: string;
|
|
3428
|
+
};
|
|
3429
|
+
maxSize: {
|
|
3430
|
+
converter: {
|
|
3431
|
+
fromAttribute: (v: string | null) => FloatingPanelSize | undefined;
|
|
3432
|
+
};
|
|
3433
|
+
attribute: string;
|
|
3434
|
+
};
|
|
3435
|
+
stage: {
|
|
3436
|
+
converter: {
|
|
3437
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3438
|
+
};
|
|
3439
|
+
};
|
|
3440
|
+
defaultStage: {
|
|
3441
|
+
converter: {
|
|
3442
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3443
|
+
};
|
|
3444
|
+
attribute: string;
|
|
3445
|
+
};
|
|
3446
|
+
panelDraggable: {
|
|
3447
|
+
converter: {
|
|
3448
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3449
|
+
};
|
|
3450
|
+
attribute: string;
|
|
3451
|
+
};
|
|
3452
|
+
resizable: {
|
|
3453
|
+
converter: {
|
|
3454
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3455
|
+
};
|
|
3456
|
+
};
|
|
3457
|
+
disabled: {
|
|
3458
|
+
converter: {
|
|
3459
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3460
|
+
};
|
|
3461
|
+
};
|
|
3462
|
+
translations: {
|
|
3463
|
+
attribute: boolean;
|
|
3464
|
+
};
|
|
3465
|
+
};
|
|
3466
|
+
open?: boolean;
|
|
3467
|
+
defaultOpen?: boolean;
|
|
3468
|
+
position?: FloatingPanelPosition;
|
|
3469
|
+
defaultPosition?: FloatingPanelPosition;
|
|
3470
|
+
size?: FloatingPanelSize;
|
|
3471
|
+
defaultSize?: FloatingPanelSize;
|
|
3472
|
+
minSize?: FloatingPanelSize;
|
|
3473
|
+
maxSize?: FloatingPanelSize;
|
|
3474
|
+
stage?: FloatingPanelStage;
|
|
3475
|
+
defaultStage?: FloatingPanelStage;
|
|
3476
|
+
panelDraggable?: boolean;
|
|
3477
|
+
resizable?: boolean;
|
|
3478
|
+
disabled?: boolean;
|
|
3479
|
+
translations?: FloatingPanelSchema['props']['translations'];
|
|
3480
|
+
private readonly idGen;
|
|
3481
|
+
private readonly panelScope;
|
|
3482
|
+
private readonly notifyOpen;
|
|
3483
|
+
private readonly notifyPosition;
|
|
3484
|
+
private readonly notifySize;
|
|
3485
|
+
private readonly notifyStage;
|
|
3486
|
+
private readonly ctrl;
|
|
3487
|
+
private machineProps;
|
|
3488
|
+
private injectRefs;
|
|
3489
|
+
/** 把手自报守的是哪条边;没写或写错时按右下角处理,那是最常见的那一个。 */
|
|
3490
|
+
private edgeOf;
|
|
3491
|
+
/** 形态按钮自报切到哪个形态;没写或写错时按常规处理。 */
|
|
3492
|
+
private stageOf;
|
|
3493
|
+
protected wire(): void;
|
|
3494
|
+
}
|
|
3495
|
+
//#endregion
|
|
3496
|
+
//#region src/elements/form.d.ts
|
|
3497
|
+
/**
|
|
3498
|
+
* `<xh-form>` —— Light-DOM 行为宿主:作者写 root(必须是原生 `<form>`)与
|
|
3499
|
+
* field-group / error-summary / error-summary-item / submit-trigger / reset-trigger 角色节点,
|
|
3500
|
+
* 元素跑 form 机器并把 connect 产出打上去。
|
|
3501
|
+
*
|
|
3502
|
+
* 提交只有一条路:`<form>` 自己的 submit 事件。回车的隐式提交、`type=submit` 按钮、
|
|
3503
|
+
* 以及命令式的 `submit()` 全部汇到那里,连接层一律 preventDefault——页面永不刷新,
|
|
3504
|
+
* 校验与回调都由组件收口。
|
|
3505
|
+
*
|
|
3506
|
+
* 值与错误都是「表」:元素不去收割原生控件里的值(那要替作者猜 checkbox / 多选 / 数字的类型),
|
|
3507
|
+
* 而是由作者经 `values` 属性或 `setFieldValue()` 写进来。校验函数同样由作者给。
|
|
3508
|
+
*
|
|
3509
|
+
* 每个字段用一个 field-group 包住并用 `value` 属性自报字段名:错误摘要的链接指向它,
|
|
2916
3510
|
* 提交失败后的焦点也落进它——落点按**文档序**取第一个出错的字段,而不是错误表的键序。
|
|
2917
3511
|
*
|
|
2918
3512
|
* @customElement xh-form
|
|
@@ -3045,6 +3639,245 @@ declare class XhFormElement extends XhElement {
|
|
|
3045
3639
|
protected wire(): void;
|
|
3046
3640
|
}
|
|
3047
3641
|
//#endregion
|
|
3642
|
+
//#region src/elements/heatmap.d.ts
|
|
3643
|
+
/**
|
|
3644
|
+
* `<xh-heatmap>` —— Light-DOM 行为宿主:作者写 root、grid、若干 row 与 cell 角色节点,
|
|
3645
|
+
* 元素跑 heatmap 机器并把 connect 产出打上去。
|
|
3646
|
+
*
|
|
3647
|
+
* 网格由作者渲染,元素不生成节点:铺一整年不必手写三百多个格子,读 `grid` / `monthGrid` /
|
|
3648
|
+
* `matrixGrid` 三个只读属性,照推导出来的行、列、月份段循环生成即可(三种形态各读其中一个)。
|
|
3649
|
+
* 每读一次都重算一遍,取一次存下来用。
|
|
3650
|
+
*
|
|
3651
|
+
* 角色节点的身份一律取作者写在节点上的 value 属性,怎么解释由 variant 决定:
|
|
3652
|
+
* 日历形态里 row 与 week-day-label 上是行序 0-6(不写即网格之外那条月份行与它的行首占位)、
|
|
3653
|
+
* cell 上是 ISO 日期、month-label 上是 YYYY-MM;月历形态里 month-block 上是 YYYY-MM、
|
|
3654
|
+
* row 上是月内周序(不写即块内那条星期名坐标轴);矩阵形态里 row 与 row-label 上是行身份
|
|
3655
|
+
* (不写即表头行与角落占位)、column-label 与 cell 上是列身份,格子的行身份从所在的行取。
|
|
3656
|
+
* legend-item 上是档位、legend-label 上是 low 或 high(两端那两个字,文案读 `legendText`)。
|
|
3657
|
+
*
|
|
3658
|
+
* 数据、行列、档位下界与文案只能走 property(`el.value = [...]`):HTML 属性装不下数组与函数。
|
|
3659
|
+
*
|
|
3660
|
+
* @customElement xh-heatmap
|
|
3661
|
+
* @attr {'calendar'|'month'|'matrix'} variant - 形态;缺省 calendar
|
|
3662
|
+
* @attr {string} start-date - 区间起点(含),ISO YYYY-MM-DD
|
|
3663
|
+
* @attr {string} end-date - 区间终点(含)
|
|
3664
|
+
* @attr {number} levels - 档数,缺省 5;给了 thresholds 则档数由它定
|
|
3665
|
+
* @attr {number} first-day-of-week - 周首日,0 = 星期日,缺省 1
|
|
3666
|
+
* @attr {string} locale - 月份名与星期名的书写 locale;不给按宿主语言,宿主也没有时按 en-US
|
|
3667
|
+
* @attr {'ltr'|'rtl'} dir - 文字方向;只作显式覆盖,不写时方向从 DOM 现读
|
|
3668
|
+
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
3669
|
+
* @attr {'green'|'blue'|'orange'|'purple'|'red'|'gray'} palette - 色板,直接点名色阶满档的颜色;同时写了 tone 时听它的
|
|
3670
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
3671
|
+
* @fires cell-focus - 焦点落到某一格;detail 为 `{ date, row, column, count, level, percent }`
|
|
3672
|
+
* @fires cell-active - 详情该显示哪一格(悬停或聚焦);收起时 detail 为 null
|
|
3673
|
+
* @csspart root - 承载三轴的最外层节点
|
|
3674
|
+
* @csspart grid - role=grid 的网格容器,键盘在它身上收口
|
|
3675
|
+
* @csspart month-block - 月历形态里的一个自然月块
|
|
3676
|
+
* @csspart row - 一行;写了 value 即数据行,不写即坐标轴那一行
|
|
3677
|
+
* @csspart week-day-label - 星期名,只给眼睛看
|
|
3678
|
+
* @csspart month-label - 月份名
|
|
3679
|
+
* @csspart row-label - 矩阵的行名;不写 value 即表头行行首的角落占位
|
|
3680
|
+
* @csspart column-label - 矩阵的列名
|
|
3681
|
+
* @csspart cell - 一格,身份取写在节点上的 value
|
|
3682
|
+
* @csspart tooltip - 悬停或聚焦时显示的详情条,位置由元素量好写成内联样式
|
|
3683
|
+
* @csspart legend - 色阶对照条
|
|
3684
|
+
* @csspart legend-label - 对照条一端的那个字,value 是 low 或 high
|
|
3685
|
+
* @csspart legend-item - 对照条里的一格,value 是档位
|
|
3686
|
+
*/
|
|
3687
|
+
declare class XhHeatmapElement extends XhElement {
|
|
3688
|
+
static partContract: {
|
|
3689
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "grid" | "cell" | "legend" | "tooltip" | "month-block" | "row" | "week-day-label" | "month-label" | "row-label" | "column-label" | "legend-label" | "legend-item">;
|
|
3690
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3691
|
+
};
|
|
3692
|
+
static properties: {
|
|
3693
|
+
value: {
|
|
3694
|
+
attribute: boolean;
|
|
3695
|
+
};
|
|
3696
|
+
rows: {
|
|
3697
|
+
attribute: boolean;
|
|
3698
|
+
};
|
|
3699
|
+
columns: {
|
|
3700
|
+
attribute: boolean;
|
|
3701
|
+
};
|
|
3702
|
+
thresholds: {
|
|
3703
|
+
attribute: boolean;
|
|
3704
|
+
};
|
|
3705
|
+
translations: {
|
|
3706
|
+
attribute: boolean;
|
|
3707
|
+
};
|
|
3708
|
+
variant: {
|
|
3709
|
+
converter: {
|
|
3710
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3711
|
+
};
|
|
3712
|
+
};
|
|
3713
|
+
startDate: {
|
|
3714
|
+
converter: {
|
|
3715
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3716
|
+
};
|
|
3717
|
+
attribute: string;
|
|
3718
|
+
};
|
|
3719
|
+
endDate: {
|
|
3720
|
+
converter: {
|
|
3721
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3722
|
+
};
|
|
3723
|
+
attribute: string;
|
|
3724
|
+
};
|
|
3725
|
+
levels: {
|
|
3726
|
+
converter: {
|
|
3727
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3728
|
+
};
|
|
3729
|
+
};
|
|
3730
|
+
firstDayOfWeek: {
|
|
3731
|
+
converter: {
|
|
3732
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3733
|
+
};
|
|
3734
|
+
attribute: string;
|
|
3735
|
+
};
|
|
3736
|
+
locale: {
|
|
3737
|
+
converter: {
|
|
3738
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3739
|
+
};
|
|
3740
|
+
};
|
|
3741
|
+
direction: {
|
|
3742
|
+
converter: {
|
|
3743
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3744
|
+
};
|
|
3745
|
+
attribute: string;
|
|
3746
|
+
};
|
|
3747
|
+
tone: {
|
|
3748
|
+
converter: {
|
|
3749
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3750
|
+
};
|
|
3751
|
+
};
|
|
3752
|
+
palette: {
|
|
3753
|
+
converter: {
|
|
3754
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3755
|
+
};
|
|
3756
|
+
};
|
|
3757
|
+
size: {
|
|
3758
|
+
converter: {
|
|
3759
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3760
|
+
};
|
|
3761
|
+
};
|
|
3762
|
+
};
|
|
3763
|
+
value?: HeatmapValue[];
|
|
3764
|
+
rows?: HeatmapAxisInput[];
|
|
3765
|
+
columns?: HeatmapAxisInput[];
|
|
3766
|
+
thresholds?: number[];
|
|
3767
|
+
translations?: Partial<HeatmapTranslations>;
|
|
3768
|
+
variant?: HeatmapVariant;
|
|
3769
|
+
startDate?: string;
|
|
3770
|
+
endDate?: string;
|
|
3771
|
+
levels?: number;
|
|
3772
|
+
firstDayOfWeek?: number;
|
|
3773
|
+
locale?: string;
|
|
3774
|
+
direction?: Direction;
|
|
3775
|
+
tone?: Tone;
|
|
3776
|
+
palette?: HeatmapPalette;
|
|
3777
|
+
size?: Size;
|
|
3778
|
+
private readonly notifyFocus;
|
|
3779
|
+
private readonly notifyActive;
|
|
3780
|
+
private readonly ctrl;
|
|
3781
|
+
private machineProps;
|
|
3782
|
+
/**
|
|
3783
|
+
* 日历网格:七行星期 × 若干周列,另带月份段、星期名与档位标尺,作者照它铺节点。
|
|
3784
|
+
* 其余形态下是一张空网格。机器尚未建起时同样给空网格。
|
|
3785
|
+
*/
|
|
3786
|
+
get grid(): HeatmapGrid;
|
|
3787
|
+
/** 月历网格:按自然月分块,块里逐周一行;不是 month 形态时为 null。 */
|
|
3788
|
+
get monthGrid(): HeatmapMonthGrid | null;
|
|
3789
|
+
/** 矩阵网格:行列由作者给;不是 matrix 形态时为 null。 */
|
|
3790
|
+
get matrixGrid(): HeatmapMatrixGrid | null;
|
|
3791
|
+
/** 对照条两端要写的那两个字,照它填 legend-label 节点的文字。 */
|
|
3792
|
+
get legendText(): {
|
|
3793
|
+
low: string;
|
|
3794
|
+
high: string;
|
|
3795
|
+
};
|
|
3796
|
+
/** 作者写在行上的身份,按形态翻成连接层认得的那一组坐标。 */
|
|
3797
|
+
private rowProps;
|
|
3798
|
+
protected wire(): void;
|
|
3799
|
+
}
|
|
3800
|
+
//#endregion
|
|
3801
|
+
//#region src/elements/hotkeys.d.ts
|
|
3802
|
+
/**
|
|
3803
|
+
* `<xh-hotkeys>` —— Light-DOM 行为宿主:作者写一个空的行内容器当 root,
|
|
3804
|
+
* 元素把 keys 翻成当前平台的写法铺成一排键帽,并在 document 或父节点上接住这组组合。
|
|
3805
|
+
*
|
|
3806
|
+
* 键帽与连接符出多少枚由 keys 与平台决定,作者写不出来,故 root 的内容整份由本元素接管,
|
|
3807
|
+
* 写在里面的东西会被替换掉。
|
|
3808
|
+
*
|
|
3809
|
+
* `Mod` 在 Mac 上是 ⌘、其余平台是 Ctrl,同一份 keys 两边都对。平台缺省测出来的那个,
|
|
3810
|
+
* 显式写 `platform` 即以它为准。
|
|
3811
|
+
*
|
|
3812
|
+
* 命中后默认拦下浏览器的默认动作;组合里除 Shift 外没有别的修饰键时,
|
|
3813
|
+
* 落在输入框、文本域、可编辑区里的按键一律让给输入。
|
|
3814
|
+
*
|
|
3815
|
+
* @customElement xh-hotkeys
|
|
3816
|
+
* @attr {string} keys - 组合里的各枚键,逗号分隔,如 `Mod,S`;逗号本身这枚主键写不进属性,那种组合走 property 传数组
|
|
3817
|
+
* @attr {'auto'|'mac'|'other'} platform - 按哪个平台的写法显示与解析,缺省测出来的那个
|
|
3818
|
+
* @attr {'document'|'parent'} target - 监听装在哪儿,缺省 document
|
|
3819
|
+
* @attr {boolean} prevent-default - 命中后拦下浏览器的默认动作,默认开启
|
|
3820
|
+
* @attr {boolean} enabled - 监听是否生效,默认开启
|
|
3821
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
3822
|
+
* @fires hot-key - 组合被按出来;detail 为 `{ keys: string[], event: KeyboardEvent }`
|
|
3823
|
+
* @csspart root - 键帽的容器(承载 role=img 与整组组合的名字)
|
|
3824
|
+
* @csspart key - 一枚键帽,由元素铺进 root
|
|
3825
|
+
* @csspart separator - 两枚键帽之间的连接符,由元素铺进 root;Mac 的写法里收起
|
|
3826
|
+
*/
|
|
3827
|
+
declare class XhHotkeysElement extends XhElement {
|
|
3828
|
+
#private;
|
|
3829
|
+
static partContract: {
|
|
3830
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "separator" | "key">;
|
|
3831
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3832
|
+
};
|
|
3833
|
+
static properties: {
|
|
3834
|
+
keys: {
|
|
3835
|
+
converter: {
|
|
3836
|
+
fromAttribute: (v: string | null) => string[] | undefined;
|
|
3837
|
+
};
|
|
3838
|
+
};
|
|
3839
|
+
platform: {
|
|
3840
|
+
converter: {
|
|
3841
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3842
|
+
};
|
|
3843
|
+
};
|
|
3844
|
+
target: {
|
|
3845
|
+
converter: {
|
|
3846
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3847
|
+
};
|
|
3848
|
+
};
|
|
3849
|
+
preventDefault: {
|
|
3850
|
+
converter: {
|
|
3851
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3852
|
+
};
|
|
3853
|
+
attribute: string;
|
|
3854
|
+
};
|
|
3855
|
+
enabled: {
|
|
3856
|
+
converter: {
|
|
3857
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3858
|
+
};
|
|
3859
|
+
};
|
|
3860
|
+
size: {
|
|
3861
|
+
converter: {
|
|
3862
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
3863
|
+
};
|
|
3864
|
+
};
|
|
3865
|
+
translations: {
|
|
3866
|
+
attribute: boolean;
|
|
3867
|
+
};
|
|
3868
|
+
};
|
|
3869
|
+
keys?: string[];
|
|
3870
|
+
platform?: HotkeysPlatform;
|
|
3871
|
+
target?: HotkeysTarget;
|
|
3872
|
+
preventDefault?: boolean;
|
|
3873
|
+
enabled?: boolean;
|
|
3874
|
+
size?: Size;
|
|
3875
|
+
translations?: Partial<HotkeysTranslations>;
|
|
3876
|
+
connectedCallback(): void;
|
|
3877
|
+
disconnectedCallback(): void;
|
|
3878
|
+
protected wire(): void;
|
|
3879
|
+
}
|
|
3880
|
+
//#endregion
|
|
3048
3881
|
//#region src/elements/hover-card.d.ts
|
|
3049
3882
|
/**
|
|
3050
3883
|
* `<xh-hover-card>` —— Light-DOM 行为宿主:作者写 root/trigger/positioner/content/arrow 角色节点,
|
|
@@ -3074,7 +3907,7 @@ declare class XhFormElement extends XhElement {
|
|
|
3074
3907
|
*/
|
|
3075
3908
|
declare class XhHoverCardElement extends XhElement {
|
|
3076
3909
|
static partContract: {
|
|
3077
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
3910
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "positioner" | "arrow">;
|
|
3078
3911
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3079
3912
|
};
|
|
3080
3913
|
static properties: {
|
|
@@ -3137,6 +3970,8 @@ declare class XhHoverCardElement extends XhElement {
|
|
|
3137
3970
|
private readonly hoverCardScope;
|
|
3138
3971
|
private readonly positionEngine;
|
|
3139
3972
|
private config;
|
|
3973
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
3974
|
+
private exit;
|
|
3140
3975
|
private readonly notify;
|
|
3141
3976
|
private readonly ctrl;
|
|
3142
3977
|
private machineProps;
|
|
@@ -3240,41 +4075,195 @@ declare class XhImageElement extends XhElement {
|
|
|
3240
4075
|
static properties: {
|
|
3241
4076
|
src: {
|
|
3242
4077
|
converter: {
|
|
3243
|
-
fromAttribute: (v: string | null) => string | undefined;
|
|
4078
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4079
|
+
};
|
|
4080
|
+
};
|
|
4081
|
+
alt: {
|
|
4082
|
+
converter: {
|
|
4083
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4084
|
+
};
|
|
4085
|
+
};
|
|
4086
|
+
fallbackDelay: {
|
|
4087
|
+
converter: {
|
|
4088
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
4089
|
+
};
|
|
4090
|
+
attribute: string;
|
|
4091
|
+
};
|
|
4092
|
+
};
|
|
4093
|
+
src?: string;
|
|
4094
|
+
alt?: string;
|
|
4095
|
+
fallbackDelay?: number;
|
|
4096
|
+
private readonly notify;
|
|
4097
|
+
private readonly ctrl;
|
|
4098
|
+
private machineProps;
|
|
4099
|
+
/**
|
|
4100
|
+
* 图片早在监听器挂上之前就已就绪时补一次上报:load 已经派发完,机器再也等不到,
|
|
4101
|
+
* 状态会永远停在 loading——图片明明在手边,台前却一直是回退内容。两处会撞上:
|
|
4102
|
+
* 作者把同一个 src 也写进了 img 标记(升级前浏览器就加载完了),
|
|
4103
|
+
* 以及元素在 DOM 中被移动导致机器重建(状态从头走一遍,而 src 没变的 img 不会重新加载)。
|
|
4104
|
+
*
|
|
4105
|
+
* 三个条件缺一不可:complete 排除还在路上的请求;naturalWidth 排除加载失败——失败与
|
|
4106
|
+
* "压根没发起请求"在这里分不开,不去猜,留在 loading 上照样只显示回退内容;
|
|
4107
|
+
* currentSrc 与 src 相等排除换图那一瞬,此刻旧图仍是 complete 的,误报会把旧图当新图显出来。
|
|
4108
|
+
*
|
|
4109
|
+
* 只在 loading 补报:idle 期间补会被随后落地的来源决议一脚踢回 loading。
|
|
4110
|
+
* 报完即进 loaded,下一帧不再命中,不会闭成回路。
|
|
4111
|
+
*/
|
|
4112
|
+
private syncSettledImage;
|
|
4113
|
+
protected wire(): void;
|
|
4114
|
+
}
|
|
4115
|
+
//#endregion
|
|
4116
|
+
//#region src/elements/image-cropper.d.ts
|
|
4117
|
+
/**
|
|
4118
|
+
* `<xh-image-cropper>` —— Light-DOM 行为宿主:作者写 root/viewport/image/crop-area
|
|
4119
|
+
* 与可选的 crop-handle、grid、hidden-input 角色节点,元素跑 image-cropper 机器并把 connect 产出打上去。
|
|
4120
|
+
*
|
|
4121
|
+
* 裁切矩形以源图的自然像素记录,坐标换算取 viewport 的矩形——矩形在指针事件发生的那一刻才量,
|
|
4122
|
+
* 连接期一律不碰 DOM;自然尺寸由 image 部件的 load 事件报进来,所以图片必须写成原生 `<img>`。
|
|
4123
|
+
* 视口的尺寸要由图片撑出来(图片铺满视口),裁切框的百分比坐标才对得上。
|
|
4124
|
+
*
|
|
4125
|
+
* 每个把手必须用 position 属性写明自己拉的是哪个方位(`position="se"`),八个合法值是
|
|
4126
|
+
* `nw|n|ne|e|se|s|sw|w`;写不出合法方位的把手不接行为,控制台留一条诊断。
|
|
4127
|
+
* 缩放与旋转同时作用在图片与裁切框上,两者始终贴合。
|
|
4128
|
+
*
|
|
4129
|
+
* @customElement xh-image-cropper
|
|
4130
|
+
* @attr {string} src - 图片地址,原样写到 image 部件上
|
|
4131
|
+
* @attr {string} alt - 图片替代文本,原样写到 image 部件上;不给即落空串,读屏跳过这张图
|
|
4132
|
+
* @attr {string} value - 受控裁切矩形,写成 "x,y,width,height";缺省该属性即非受控
|
|
4133
|
+
* @attr {string} default-value - 非受控初值,同样是四个逗号分隔的数;缺省时图片加载完取整张图
|
|
4134
|
+
* @attr {number} aspect-ratio - 宽高比(宽 ÷ 高);不写即不锁比例
|
|
4135
|
+
* @attr {number} min-width - 裁切框最小宽度,自然像素,默认 0
|
|
4136
|
+
* @attr {number} min-height - 裁切框最小高度,自然像素,默认 0
|
|
4137
|
+
* @attr {number} zoom - 受控缩放倍率;缺省该属性即非受控
|
|
4138
|
+
* @attr {number} default-zoom - 非受控初始缩放倍率,默认 1
|
|
4139
|
+
* @attr {number} rotation - 显示旋转角度,单位度,默认 0
|
|
4140
|
+
* @attr {'rect'|'round'} shape - 裁切框外形,默认 rect
|
|
4141
|
+
* @attr {boolean} disabled - 禁用:裁切框与把手退出 Tab 序列、改不动、不参与表单提交
|
|
4142
|
+
* @attr {boolean} read-only - 只读:仍可聚焦与被读屏念出,改不动
|
|
4143
|
+
* @attr {string} name - 表单字段名;给了才参与提交,值序列化成 "x,y,width,height"
|
|
4144
|
+
* @fires value-change - 裁切矩形变化(拖动途中会连发);detail 为 `{ value: { x, y, width, height } }`
|
|
4145
|
+
* @fires value-change-end - 一次指针拖动松手发一次,一次方向键微调也发一次;detail 为 `{ value: { x, y, width, height } }`
|
|
4146
|
+
* @fires zoom-change - 缩放倍率变化;detail 为 `{ zoom: number }`
|
|
4147
|
+
* @csspart root - 承载 data-disabled / data-readonly / data-dragging / data-resizing / data-shape 的容器
|
|
4148
|
+
* @csspart viewport - 量坐标的那个盒子,图片铺满它、裁切框绝对定位在它里面
|
|
4149
|
+
* @csspart image - 源图,须是原生 `<img>`;自然尺寸与加载完成都由它报出来,src / alt 由宿主写入(作者别自己写,会被覆盖或清掉)
|
|
4150
|
+
* @csspart crop-area - role=application 的裁切框,可聚焦,方向键平移
|
|
4151
|
+
* @csspart crop-handle - 改尺寸的把手,须是原生 `<button>` 并自带 position 属性标识方位
|
|
4152
|
+
* @csspart grid - 裁切框里的构图参考线,纯装饰
|
|
4153
|
+
* @csspart hidden-input - 表单影子(须是原生 input)
|
|
4154
|
+
*/
|
|
4155
|
+
declare class XhImageCropperElement extends XhElement {
|
|
4156
|
+
static partContract: {
|
|
4157
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "viewport" | "image" | "grid" | "hidden-input" | "crop-area" | "crop-handle">;
|
|
4158
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4159
|
+
};
|
|
4160
|
+
static properties: {
|
|
4161
|
+
src: {
|
|
4162
|
+
converter: {
|
|
4163
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4164
|
+
};
|
|
4165
|
+
};
|
|
4166
|
+
alt: {
|
|
4167
|
+
converter: {
|
|
4168
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4169
|
+
};
|
|
4170
|
+
};
|
|
4171
|
+
value: {
|
|
4172
|
+
converter: {
|
|
4173
|
+
fromAttribute: (v: string | null) => ImageCropperRect | undefined;
|
|
4174
|
+
};
|
|
4175
|
+
};
|
|
4176
|
+
defaultValue: {
|
|
4177
|
+
converter: {
|
|
4178
|
+
fromAttribute: (v: string | null) => ImageCropperRect | undefined;
|
|
4179
|
+
};
|
|
4180
|
+
attribute: string;
|
|
4181
|
+
};
|
|
4182
|
+
aspectRatio: {
|
|
4183
|
+
converter: {
|
|
4184
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
4185
|
+
};
|
|
4186
|
+
attribute: string;
|
|
4187
|
+
};
|
|
4188
|
+
minWidth: {
|
|
4189
|
+
converter: {
|
|
4190
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3244
4191
|
};
|
|
4192
|
+
attribute: string;
|
|
3245
4193
|
};
|
|
3246
|
-
|
|
4194
|
+
minHeight: {
|
|
3247
4195
|
converter: {
|
|
3248
|
-
fromAttribute: (v: string | null) =>
|
|
4196
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3249
4197
|
};
|
|
4198
|
+
attribute: string;
|
|
3250
4199
|
};
|
|
3251
|
-
|
|
4200
|
+
zoom: {
|
|
4201
|
+
converter: {
|
|
4202
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
4203
|
+
};
|
|
4204
|
+
};
|
|
4205
|
+
defaultZoom: {
|
|
4206
|
+
converter: {
|
|
4207
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
4208
|
+
};
|
|
4209
|
+
attribute: string;
|
|
4210
|
+
};
|
|
4211
|
+
rotation: {
|
|
3252
4212
|
converter: {
|
|
3253
4213
|
fromAttribute: (v: string | null) => number | undefined;
|
|
3254
4214
|
};
|
|
4215
|
+
};
|
|
4216
|
+
shape: {
|
|
4217
|
+
converter: {
|
|
4218
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4219
|
+
};
|
|
4220
|
+
};
|
|
4221
|
+
disabled: {
|
|
4222
|
+
converter: {
|
|
4223
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4224
|
+
};
|
|
4225
|
+
};
|
|
4226
|
+
readOnly: {
|
|
4227
|
+
converter: {
|
|
4228
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4229
|
+
};
|
|
3255
4230
|
attribute: string;
|
|
3256
4231
|
};
|
|
4232
|
+
name: {
|
|
4233
|
+
converter: {
|
|
4234
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4235
|
+
};
|
|
4236
|
+
};
|
|
4237
|
+
translations: {
|
|
4238
|
+
attribute: boolean;
|
|
4239
|
+
};
|
|
3257
4240
|
};
|
|
3258
4241
|
src?: string;
|
|
3259
4242
|
alt?: string;
|
|
3260
|
-
|
|
3261
|
-
|
|
4243
|
+
value?: ImageCropperRect;
|
|
4244
|
+
defaultValue?: ImageCropperRect;
|
|
4245
|
+
aspectRatio?: number;
|
|
4246
|
+
minWidth?: number;
|
|
4247
|
+
minHeight?: number;
|
|
4248
|
+
zoom?: number;
|
|
4249
|
+
defaultZoom?: number;
|
|
4250
|
+
rotation?: number;
|
|
4251
|
+
shape?: ImageCropperShape;
|
|
4252
|
+
disabled?: boolean;
|
|
4253
|
+
readOnly?: boolean;
|
|
4254
|
+
name?: string;
|
|
4255
|
+
translations?: ImageCropperSchema['props']['translations'];
|
|
4256
|
+
private readonly notifyValue;
|
|
4257
|
+
private readonly notifyValueEnd;
|
|
4258
|
+
private readonly notifyZoom;
|
|
3262
4259
|
private readonly ctrl;
|
|
3263
4260
|
private machineProps;
|
|
4261
|
+
private injectRefs;
|
|
3264
4262
|
/**
|
|
3265
|
-
*
|
|
3266
|
-
*
|
|
3267
|
-
* 作者把同一个 src 也写进了 img 标记(升级前浏览器就加载完了),
|
|
3268
|
-
* 以及元素在 DOM 中被移动导致机器重建(状态从头走一遍,而 src 没变的 img 不会重新加载)。
|
|
3269
|
-
*
|
|
3270
|
-
* 三个条件缺一不可:complete 排除还在路上的请求;naturalWidth 排除加载失败——失败与
|
|
3271
|
-
* "压根没发起请求"在这里分不开,不去猜,留在 loading 上照样只显示回退内容;
|
|
3272
|
-
* currentSrc 与 src 相等排除换图那一瞬,此刻旧图仍是 complete 的,误报会把旧图当新图显出来。
|
|
3273
|
-
*
|
|
3274
|
-
* 只在 loading 补报:idle 期间补会被随后落地的来源决议一脚踢回 loading。
|
|
3275
|
-
* 报完即进 loaded,下一帧不再命中,不会闭成回路。
|
|
4263
|
+
* 把手自报的方位。作者在节点上写 position="se",与 Vue 侧的 `:position` 是同一份声明;
|
|
4264
|
+
* 写不出合法方位(没写、写错)时返回 null,由调用方决定怎么处理。
|
|
3276
4265
|
*/
|
|
3277
|
-
private
|
|
4266
|
+
private handlePosition;
|
|
3278
4267
|
protected wire(): void;
|
|
3279
4268
|
}
|
|
3280
4269
|
//#endregion
|
|
@@ -3318,7 +4307,7 @@ declare class XhImageElement extends XhElement {
|
|
|
3318
4307
|
*/
|
|
3319
4308
|
declare class XhImageViewerElement extends XhElement {
|
|
3320
4309
|
static partContract: {
|
|
3321
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"
|
|
4310
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"viewport" | "content" | "trigger" | "close-trigger" | "image" | "prev-trigger" | "next-trigger" | "positioner" | "backdrop" | "reset-trigger" | "toolbar" | "zoom-in-trigger" | "zoom-out-trigger" | "rotate-left-trigger" | "rotate-right-trigger" | "flip-horizontal-trigger" | "flip-vertical-trigger" | "counter">;
|
|
3322
4311
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3323
4312
|
};
|
|
3324
4313
|
static properties: {
|
|
@@ -3409,6 +4398,7 @@ declare class XhImageViewerElement extends XhElement {
|
|
|
3409
4398
|
private readonly viewerScope;
|
|
3410
4399
|
private config;
|
|
3411
4400
|
private contentNode;
|
|
4401
|
+
private exit;
|
|
3412
4402
|
private backdropNode;
|
|
3413
4403
|
/** counter 的文本归属:首帧为空才代填,作者写过内容就不碰。 */
|
|
3414
4404
|
private counterOwned;
|
|
@@ -3417,12 +4407,140 @@ declare class XhImageViewerElement extends XhElement {
|
|
|
3417
4407
|
private readonly ctrl;
|
|
3418
4408
|
private machineProps;
|
|
3419
4409
|
private ensureConfig;
|
|
4410
|
+
/** 退场闸门建一次;presence 不是响应式 cell,退场结束要显式排一次更新才轮得到收起。 */
|
|
4411
|
+
private ensureExit;
|
|
3420
4412
|
private readonly registerLayer;
|
|
3421
4413
|
private injectRefs;
|
|
3422
4414
|
protected wire(): void;
|
|
3423
4415
|
disconnectedCallback(): void;
|
|
3424
4416
|
}
|
|
3425
4417
|
//#endregion
|
|
4418
|
+
//#region src/elements/json-viewer.d.ts
|
|
4419
|
+
/**
|
|
4420
|
+
* `<xh-json-viewer>` —— Light-DOM 行为宿主:作者只写一个 root 角色节点,
|
|
4421
|
+
* 元素跑 json-viewer 机器,把 value 摊成的每一行铺进 root 里。
|
|
4422
|
+
*
|
|
4423
|
+
* 行是按数据算出来的,作者写不出也不必写:树容器与每一行由本元素建,
|
|
4424
|
+
* root 的内容整份由本元素接管(写在里面的东西会被替换掉)。
|
|
4425
|
+
*
|
|
4426
|
+
* 收起的分支整棵子层不进 DOM——一份大 JSON 全铺出来会把页面压住。
|
|
4427
|
+
*
|
|
4428
|
+
* 属性里的 value 是一段 JSON 文本(解析不了就当一个字符串值展示);
|
|
4429
|
+
* 直接喂对象走 property(`el.value = { … }`)。
|
|
4430
|
+
* expandedValue / defaultExpandedValue / translations 没有对应属性,只能走 property。
|
|
4431
|
+
*
|
|
4432
|
+
* @customElement xh-json-viewer
|
|
4433
|
+
* @attr {string} value - 要展示的值,写成一段 JSON 文本;对象与数组走 property
|
|
4434
|
+
* @attr {number} default-expanded-depth - 初始展开到第几层,默认 1(只展开根行)
|
|
4435
|
+
* @attr {number} max-string-length - 字符串值超过这么多字符就截断
|
|
4436
|
+
* @attr {number} max-items - 同一层最多摊出这么多成员,其余收成一行占位
|
|
4437
|
+
* @attr {boolean} sort-keys - 对象键按字典序排列
|
|
4438
|
+
* @attr {boolean} loop - 上下键走到首尾回绕,默认关闭
|
|
4439
|
+
* @attr {'ltr'|'rtl'} dir - 文字方向,只对调左右方向键的展开/收起语义;不写即从 DOM 现读
|
|
4440
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
4441
|
+
* @fires expanded-change - 展开集合变化;detail 为 `{ value: string[] }`
|
|
4442
|
+
* @csspart root - 组件根容器,由作者写出;承载 data-size
|
|
4443
|
+
* @csspart tree - role=tree 的树容器(键盘在此收口,焦点在树外时它兜底占 Tab 位)
|
|
4444
|
+
* @csspart item - 标量行,role=treeitem,带 data-type
|
|
4445
|
+
* @csspart item-key - 标量行的键名
|
|
4446
|
+
* @csspart item-value - 标量行的值
|
|
4447
|
+
* @csspart branch - 对象/数组行,role=treeitem,带 aria-expanded 与 data-state
|
|
4448
|
+
* @csspart branch-control - 分支那一行本身(点它切换展开态)
|
|
4449
|
+
* @csspart branch-trigger - 展开箭头(aria-hidden,不占 Tab 位)
|
|
4450
|
+
* @csspart branch-indicator - 箭头字形,随 data-state 转向
|
|
4451
|
+
* @csspart branch-text - 分支的键名
|
|
4452
|
+
* @csspart preview - 收起摘要(如 `{…} 3`),对读屏隐藏
|
|
4453
|
+
* @csspart branch-content - role=group 的子层容器,只在展开时存在
|
|
4454
|
+
*/
|
|
4455
|
+
declare class XhJsonViewerElement extends XhElement {
|
|
4456
|
+
static partContract: {
|
|
4457
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "preview" | "tree" | "item-key" | "item-value" | "branch" | "branch-control" | "branch-trigger" | "branch-indicator" | "branch-text" | "branch-content">;
|
|
4458
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4459
|
+
};
|
|
4460
|
+
static properties: {
|
|
4461
|
+
value: {
|
|
4462
|
+
converter: {
|
|
4463
|
+
fromAttribute: (v: string | null) => unknown;
|
|
4464
|
+
};
|
|
4465
|
+
};
|
|
4466
|
+
expandedValue: {
|
|
4467
|
+
attribute: boolean;
|
|
4468
|
+
};
|
|
4469
|
+
defaultExpandedValue: {
|
|
4470
|
+
attribute: boolean;
|
|
4471
|
+
};
|
|
4472
|
+
defaultExpandedDepth: {
|
|
4473
|
+
converter: {
|
|
4474
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
4475
|
+
};
|
|
4476
|
+
attribute: string;
|
|
4477
|
+
};
|
|
4478
|
+
maxStringLength: {
|
|
4479
|
+
converter: {
|
|
4480
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
4481
|
+
};
|
|
4482
|
+
attribute: string;
|
|
4483
|
+
};
|
|
4484
|
+
maxItems: {
|
|
4485
|
+
converter: {
|
|
4486
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
4487
|
+
};
|
|
4488
|
+
attribute: string;
|
|
4489
|
+
};
|
|
4490
|
+
sortKeys: {
|
|
4491
|
+
converter: {
|
|
4492
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4493
|
+
};
|
|
4494
|
+
attribute: string;
|
|
4495
|
+
};
|
|
4496
|
+
loop: {
|
|
4497
|
+
converter: {
|
|
4498
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4499
|
+
};
|
|
4500
|
+
};
|
|
4501
|
+
direction: {
|
|
4502
|
+
converter: {
|
|
4503
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4504
|
+
};
|
|
4505
|
+
attribute: string;
|
|
4506
|
+
};
|
|
4507
|
+
size: {
|
|
4508
|
+
converter: {
|
|
4509
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4510
|
+
};
|
|
4511
|
+
};
|
|
4512
|
+
translations: {
|
|
4513
|
+
attribute: boolean;
|
|
4514
|
+
};
|
|
4515
|
+
};
|
|
4516
|
+
value?: unknown;
|
|
4517
|
+
expandedValue?: string[];
|
|
4518
|
+
defaultExpandedValue?: string[];
|
|
4519
|
+
defaultExpandedDepth?: number;
|
|
4520
|
+
maxStringLength?: number;
|
|
4521
|
+
maxItems?: number;
|
|
4522
|
+
sortKeys?: boolean;
|
|
4523
|
+
loop?: boolean;
|
|
4524
|
+
direction?: Direction;
|
|
4525
|
+
size?: Size;
|
|
4526
|
+
translations?: Partial<JsonViewerTranslations>;
|
|
4527
|
+
private readonly notify;
|
|
4528
|
+
private readonly ctrl;
|
|
4529
|
+
private machineProps;
|
|
4530
|
+
/** 树容器与每一行都归本元素建,按路径留着复用。 */
|
|
4531
|
+
private treeEl;
|
|
4532
|
+
private readonly rows;
|
|
4533
|
+
/**
|
|
4534
|
+
* root 被移出本宿主时,铺在它里面的行也一并离场。浏览器此时不派 focusout,
|
|
4535
|
+
* 机器会一直认为焦点还在树内,行重新铺回来时高亮仍挂在那一行上。
|
|
4536
|
+
* 这里替 DOM 把焦点离场如实上报(锚点留着,重新铺回来时仍落回那一行)。
|
|
4537
|
+
*/
|
|
4538
|
+
protected onPartsReleased(nodes: readonly HTMLElement[]): void;
|
|
4539
|
+
private makeRow;
|
|
4540
|
+
private paint;
|
|
4541
|
+
protected wire(): void;
|
|
4542
|
+
}
|
|
4543
|
+
//#endregion
|
|
3426
4544
|
//#region src/elements/listbox.d.ts
|
|
3427
4545
|
/**
|
|
3428
4546
|
* `<xh-listbox>` —— Light-DOM 行为宿主:作者写 root/label/content 与若干 item 角色节点,
|
|
@@ -3649,9 +4767,73 @@ declare class XhLoadingBarElement extends XhElement {
|
|
|
3649
4767
|
protected wire(): void;
|
|
3650
4768
|
}
|
|
3651
4769
|
//#endregion
|
|
4770
|
+
//#region src/elements/masonry.d.ts
|
|
4771
|
+
/**
|
|
4772
|
+
* `<xh-masonry>` —— Light-DOM 行为宿主,无状态机。作者写一个 root、若干 column 空容器,
|
|
4773
|
+
* 以及一批 item;元素量出容器宽度与每一项的高度,算出各项落在第几列,再把项搬进对应的列里。
|
|
4774
|
+
*
|
|
4775
|
+
* 列由作者写,因为元素不生成结构:请按最宽那一档需要的列数写足 column 节点,
|
|
4776
|
+
* 当前档位用不上的那几列会被收起。项写在 root 里即可,写在哪儿都会被搬进列里,
|
|
4777
|
+
* 所以 column 节点必须是空容器,别在里面另放内容。
|
|
4778
|
+
*
|
|
4779
|
+
* 项的先后取「首次见到的顺序」——静态标记就是作者写的顺序;运行期新增的项排在末尾,
|
|
4780
|
+
* 需要精确插到中间时请整块重建这批项。
|
|
4781
|
+
*
|
|
4782
|
+
* 浏览器没有 ResizeObserver 时只在每次接线那一刻量,之后不再跟随尺寸变化。
|
|
4783
|
+
*
|
|
4784
|
+
* @customElement xh-masonry
|
|
4785
|
+
* @attr {number|string} columns - 分几列,不写按三列;写 JSON 对象则逐档给列数(base / sm / md / lg / xl),按容器自身宽度换档
|
|
4786
|
+
* @attr {'xs'|'sm'|'md'|'lg'|'xl'} gap - 列与列、项与项之间的间距档位,逐档对应一个间距令牌
|
|
4787
|
+
* @attr {boolean} sequential - 按文档序逐列填,不写则最短列优先
|
|
4788
|
+
* @csspart root - 排布容器,承载 data-gap / data-sequential
|
|
4789
|
+
* @csspart column - 一列,承载 data-index;须是空容器,项由元素搬进来
|
|
4790
|
+
* @csspart item - 一项,承载 data-index(作者写的原序)与 data-column(落在第几列)
|
|
4791
|
+
*/
|
|
4792
|
+
declare class XhMasonryElement extends XhElement {
|
|
4793
|
+
static partContract: {
|
|
4794
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "column">;
|
|
4795
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4796
|
+
};
|
|
4797
|
+
static properties: {
|
|
4798
|
+
columns: {
|
|
4799
|
+
converter: {
|
|
4800
|
+
fromAttribute: (v: string | null) => number | import("@xihan-ui/headless").MasonryColumnsByBreakpoint | undefined;
|
|
4801
|
+
};
|
|
4802
|
+
};
|
|
4803
|
+
gap: {
|
|
4804
|
+
converter: {
|
|
4805
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4806
|
+
};
|
|
4807
|
+
};
|
|
4808
|
+
sequential: {
|
|
4809
|
+
converter: {
|
|
4810
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4811
|
+
};
|
|
4812
|
+
};
|
|
4813
|
+
};
|
|
4814
|
+
columns?: MasonryColumns;
|
|
4815
|
+
gap?: MasonryProps['gap'];
|
|
4816
|
+
sequential?: boolean;
|
|
4817
|
+
/** 每一项首次被看到时的序号,重排后 DOM 序等于列序,原序只剩它认得出来。 */
|
|
4818
|
+
private readonly seen;
|
|
4819
|
+
private nextSeq;
|
|
4820
|
+
private observer;
|
|
4821
|
+
/** 当前挂着尺寸观察器的节点,与新一轮比对后才决定要不要重挂。 */
|
|
4822
|
+
private observed;
|
|
4823
|
+
connectedCallback(): void;
|
|
4824
|
+
disconnectedCallback(): void;
|
|
4825
|
+
/** 按首次见到的先后排好当前在场的项。 */
|
|
4826
|
+
private orderedItems;
|
|
4827
|
+
/** 把项按落格结果搬进各列。位置已经对的节点原地不动,免得每次接线都产生一堆变更记录。 */
|
|
4828
|
+
private place;
|
|
4829
|
+
/** 把尺寸观察器挂到这一批节点上。节点没变就不重挂:重挂会白白多跑一轮回调。 */
|
|
4830
|
+
private observeSizes;
|
|
4831
|
+
protected wire(): void;
|
|
4832
|
+
}
|
|
4833
|
+
//#endregion
|
|
3652
4834
|
//#region src/elements/menu.d.ts
|
|
3653
4835
|
/**
|
|
3654
|
-
* `<xh-menu>` —— Light-DOM 行为宿主:用户写 trigger/positioner/content/item/... 角色节点,
|
|
4836
|
+
* `<xh-menu>` —— Light-DOM 行为宿主:用户写 trigger/positioner/content/item/group/... 角色节点,
|
|
3655
4837
|
* 元素跑 menu 机器并把 connect 产出打上去。浮层定位引擎在本元素里建好、经 refs 注入机器,
|
|
3656
4838
|
* 锚点取 trigger、被定位的浮层取 positioner;机器只认端口,不认识具体引擎。
|
|
3657
4839
|
* 条目身份取用户写在 item 上的 value 属性,禁用由部件自报(aria-disabled)。
|
|
@@ -3672,11 +4854,13 @@ declare class XhLoadingBarElement extends XhElement {
|
|
|
3672
4854
|
* @csspart content - role=menu 容器(焦点域与消解层的根节点,键盘在此收口),收起时带 hidden
|
|
3673
4855
|
* @csspart item - role=menuitem 条目,须自带 value 属性标识身份;禁用写 aria-disabled="true"
|
|
3674
4856
|
* @csspart separator - 分隔线(role=separator,不入方向键导航)
|
|
4857
|
+
* @csspart group - role=group 分组容器,须自带 value 属性标识身份
|
|
4858
|
+
* @csspart group-label - 分组标题(本组 aria-labelledby 的目标)
|
|
3675
4859
|
* @csspart arrow - 指向锚点的箭头(aria-hidden,data-placement 随实际放置位翻转)
|
|
3676
4860
|
*/
|
|
3677
4861
|
declare class XhMenuElement extends XhElement {
|
|
3678
4862
|
static partContract: {
|
|
3679
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"item" | "
|
|
4863
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"item" | "content" | "trigger" | "separator" | "positioner" | "group" | "group-label" | "arrow">;
|
|
3680
4864
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3681
4865
|
};
|
|
3682
4866
|
static properties: {
|
|
@@ -3764,6 +4948,8 @@ declare class XhMenuElement extends XhElement {
|
|
|
3764
4948
|
private readonly menuScope;
|
|
3765
4949
|
private readonly positionEngine;
|
|
3766
4950
|
private config;
|
|
4951
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
4952
|
+
private exit;
|
|
3767
4953
|
private readonly notifyOpen;
|
|
3768
4954
|
private readonly notifySelect;
|
|
3769
4955
|
private readonly ctrl;
|
|
@@ -3786,6 +4972,8 @@ declare class XhMenuElement extends XhElement {
|
|
|
3786
4972
|
* 机器就地按当前活条目重挑锚点。
|
|
3787
4973
|
*/
|
|
3788
4974
|
protected onPartsReleased(nodes: readonly HTMLElement[]): void;
|
|
4975
|
+
/** 落在某个角色节点子树里的同名部件。 */
|
|
4976
|
+
private partsIn;
|
|
3789
4977
|
protected wire(): void;
|
|
3790
4978
|
disconnectedCallback(): void;
|
|
3791
4979
|
}
|
|
@@ -3828,8 +5016,12 @@ declare class XhMenuElement extends XhElement {
|
|
|
3828
5016
|
* @csspart group-label - 分组标题,靠 id 被同组 group 的 aria-labelledby 指着
|
|
3829
5017
|
*/
|
|
3830
5018
|
declare class XhMenubarElement extends XhElement {
|
|
5019
|
+
/** 逐个 content 一份退场闸门:一个菜单一份,它们各开各的。 */
|
|
5020
|
+
private readonly exits;
|
|
5021
|
+
/** 闸门只用到 reducedMotion,本元素别处不需要 config,建一份共用即可。 */
|
|
5022
|
+
private exitConfig;
|
|
3831
5023
|
static partContract: {
|
|
3832
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "
|
|
5024
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "separator" | "positioner" | "item-text" | "item-indicator" | "group" | "group-label">;
|
|
3833
5025
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3834
5026
|
};
|
|
3835
5027
|
static properties: {
|
|
@@ -3963,8 +5155,12 @@ declare class XhMenubarElement extends XhElement {
|
|
|
3963
5155
|
* @csspart viewport - 可选的共享面板外壳,放在 root 里;都收起时 hidden
|
|
3964
5156
|
*/
|
|
3965
5157
|
declare class XhNavigationMenuElement extends XhElement {
|
|
5158
|
+
/** 逐个 content 一份退场闸门:一个菜单一份,它们各开各的。 */
|
|
5159
|
+
private readonly exits;
|
|
5160
|
+
/** 退场闸门与消解层共用一份环境包。 */
|
|
5161
|
+
private config;
|
|
3966
5162
|
static partContract: {
|
|
3967
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
5163
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "viewport" | "content" | "indicator" | "trigger" | "list" | "link">;
|
|
3968
5164
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3969
5165
|
};
|
|
3970
5166
|
static properties: {
|
|
@@ -4040,8 +5236,11 @@ declare class XhNavigationMenuElement extends XhElement {
|
|
|
4040
5236
|
private readonly notify;
|
|
4041
5237
|
private readonly ctrl;
|
|
4042
5238
|
private machineProps;
|
|
5239
|
+
private ensureConfig;
|
|
5240
|
+
private readonly registerLayer;
|
|
4043
5241
|
private injectRefs;
|
|
4044
5242
|
protected wire(): void;
|
|
5243
|
+
disconnectedCallback(): void;
|
|
4045
5244
|
}
|
|
4046
5245
|
//#endregion
|
|
4047
5246
|
//#region src/elements/number-field.d.ts
|
|
@@ -4069,16 +5268,19 @@ declare class XhNavigationMenuElement extends XhElement {
|
|
|
4069
5268
|
* @attr {'outline'|'subtle'|'ghost'} variant - 视觉变体
|
|
4070
5269
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
4071
5270
|
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
5271
|
+
* @prop {(text: string) => number} parse - 显示串 → 数(千位分隔符、单位后缀这类靠它读回来);只走 property
|
|
5272
|
+
* @prop {(value: number) => string} format - 数 → 显示串,只在步进/取端点/失焦规范化时用;只走 property
|
|
4072
5273
|
* @fires value-change - 值变化;detail 为 `{ value: string, valueAsNumber: number }`
|
|
4073
5274
|
* @csspart root - 承载 data-disabled / data-readonly / data-invalid / data-empty 的容器
|
|
4074
5275
|
* @csspart label - 标题;`for` 恒写向 input,故须是原生 `<label>` 才点得动
|
|
5276
|
+
* @csspart control - 输入框与加减钮的包裹层;皮肤把视觉盒画在它身上,减在左、加在右、输入框居中
|
|
4075
5277
|
* @csspart input - role=spinbutton 的输入框,键盘交互全在它身上
|
|
4076
5278
|
* @csspart increment-trigger - 加一步;贴住 max 时转 disabled
|
|
4077
5279
|
* @csspart decrement-trigger - 减一步;贴住 min 时转 disabled
|
|
4078
5280
|
*/
|
|
4079
5281
|
declare class XhNumberFieldElement extends XhElement {
|
|
4080
5282
|
static partContract: {
|
|
4081
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "input" | "increment-trigger" | "decrement-trigger">;
|
|
5283
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "input" | "increment-trigger" | "decrement-trigger">;
|
|
4082
5284
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4083
5285
|
};
|
|
4084
5286
|
static properties: {
|
|
@@ -4159,6 +5361,12 @@ declare class XhNumberFieldElement extends XhElement {
|
|
|
4159
5361
|
fromAttribute: (v: string | null) => string | undefined;
|
|
4160
5362
|
};
|
|
4161
5363
|
};
|
|
5364
|
+
parse: {
|
|
5365
|
+
attribute: boolean;
|
|
5366
|
+
};
|
|
5367
|
+
format: {
|
|
5368
|
+
attribute: boolean;
|
|
5369
|
+
};
|
|
4162
5370
|
};
|
|
4163
5371
|
value?: string;
|
|
4164
5372
|
defaultValue?: string;
|
|
@@ -4176,6 +5384,8 @@ declare class XhNumberFieldElement extends XhElement {
|
|
|
4176
5384
|
variant?: ControlVariant;
|
|
4177
5385
|
tone?: Tone;
|
|
4178
5386
|
size?: Size;
|
|
5387
|
+
parse?: NumberFieldSchema['props']['parse'];
|
|
5388
|
+
format?: NumberFieldSchema['props']['format'];
|
|
4179
5389
|
private readonly notify;
|
|
4180
5390
|
private readonly ctrl;
|
|
4181
5391
|
private machineProps;
|
|
@@ -4202,53 +5412,191 @@ declare class XhNumberFieldElement extends XhElement {
|
|
|
4202
5412
|
* @attr {'ltr'|'rtl'} dir - 文字方向,只影响排版;上一页/下一页的语义不随之翻转
|
|
4203
5413
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
4204
5414
|
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
4205
|
-
* @fires page-change - 页码变化;detail 为 `{ page: number, pageSize: number }`
|
|
4206
|
-
* @csspart root - nav 地标,承载 aria-label 与 data-empty
|
|
4207
|
-
* @csspart prev-trigger - 上一页;首页时转原生 disabled
|
|
4208
|
-
* @csspart next-trigger - 下一页;末页时转原生 disabled
|
|
4209
|
-
* @csspart item - 页码按钮,须自带 value 属性;当前页带 aria-current="page" 与 data-
|
|
4210
|
-
* @csspart ellipsis - 折叠掉的那几页的占位,对读屏隐藏
|
|
5415
|
+
* @fires page-change - 页码变化;detail 为 `{ page: number, pageSize: number }`
|
|
5416
|
+
* @csspart root - nav 地标,承载 aria-label 与 data-empty
|
|
5417
|
+
* @csspart prev-trigger - 上一页;首页时转原生 disabled
|
|
5418
|
+
* @csspart next-trigger - 下一页;末页时转原生 disabled
|
|
5419
|
+
* @csspart item - 页码按钮,须自带 value 属性;当前页带 aria-current="page" 与 data-current
|
|
5420
|
+
* @csspart ellipsis - 折叠掉的那几页的占位,对读屏隐藏
|
|
5421
|
+
*/
|
|
5422
|
+
declare class XhPaginationElement extends XhElement {
|
|
5423
|
+
static partContract: {
|
|
5424
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "ellipsis" | "prev-trigger" | "next-trigger">;
|
|
5425
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5426
|
+
};
|
|
5427
|
+
static properties: {
|
|
5428
|
+
count: {
|
|
5429
|
+
converter: {
|
|
5430
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
5431
|
+
};
|
|
5432
|
+
};
|
|
5433
|
+
pageSize: {
|
|
5434
|
+
converter: {
|
|
5435
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
5436
|
+
};
|
|
5437
|
+
attribute: string;
|
|
5438
|
+
};
|
|
5439
|
+
page: {
|
|
5440
|
+
converter: {
|
|
5441
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
5442
|
+
};
|
|
5443
|
+
};
|
|
5444
|
+
defaultPage: {
|
|
5445
|
+
converter: {
|
|
5446
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
5447
|
+
};
|
|
5448
|
+
attribute: string;
|
|
5449
|
+
};
|
|
5450
|
+
siblingCount: {
|
|
5451
|
+
converter: {
|
|
5452
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
5453
|
+
};
|
|
5454
|
+
attribute: string;
|
|
5455
|
+
};
|
|
5456
|
+
direction: {
|
|
5457
|
+
converter: {
|
|
5458
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5459
|
+
};
|
|
5460
|
+
attribute: string;
|
|
5461
|
+
};
|
|
5462
|
+
tone: {
|
|
5463
|
+
converter: {
|
|
5464
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5465
|
+
};
|
|
5466
|
+
};
|
|
5467
|
+
size: {
|
|
5468
|
+
converter: {
|
|
5469
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5470
|
+
};
|
|
5471
|
+
};
|
|
5472
|
+
translations: {
|
|
5473
|
+
attribute: boolean;
|
|
5474
|
+
};
|
|
5475
|
+
};
|
|
5476
|
+
count?: number;
|
|
5477
|
+
pageSize?: number;
|
|
5478
|
+
page?: number;
|
|
5479
|
+
defaultPage?: number;
|
|
5480
|
+
siblingCount?: number;
|
|
5481
|
+
direction?: Direction;
|
|
5482
|
+
tone?: Tone;
|
|
5483
|
+
size?: Size;
|
|
5484
|
+
translations?: Partial<PaginationTranslations>;
|
|
5485
|
+
private readonly notify;
|
|
5486
|
+
private readonly ctrl;
|
|
5487
|
+
private machineProps;
|
|
5488
|
+
protected wire(): void;
|
|
5489
|
+
}
|
|
5490
|
+
//#endregion
|
|
5491
|
+
//#region src/elements/password-input.d.ts
|
|
5492
|
+
/**
|
|
5493
|
+
* `<xh-password-input>` —— Light-DOM 行为宿主:作者写 root/label/control/input/
|
|
5494
|
+
* visibility-trigger/caps-lock-indicator 六类角色节点,元素跑 password-input 机器并把 connect 产出打上去。
|
|
5495
|
+
*
|
|
5496
|
+
* label 的 `for` 恒写向 input 的 id,所以 label 角色节点必须是原生 `<label>`、input 角色节点必须是原生
|
|
5497
|
+
* `<input>`;切换钮必须是原生 `<button>`,Enter / Space 的激活由平台负责。
|
|
5498
|
+
*
|
|
5499
|
+
* 明暗只改 input 的 type:隐藏态 password、显示态 text。切换之后焦点留在按钮上,
|
|
5500
|
+
* 框里的光标与选中范围由机器放回原处。
|
|
5501
|
+
*
|
|
5502
|
+
* 大写锁定靠按键事件里的 getModifierState 判定——平台没有"现在查一下修饰键"的接口,
|
|
5503
|
+
* 所以提示要等用户按下第一个键才亮,焦点离开输入框即熄灭。提示节点作者写空壳,
|
|
5504
|
+
* 里面的文字由元素写入。
|
|
5505
|
+
*
|
|
5506
|
+
* @customElement xh-password-input
|
|
5507
|
+
* @attr {string} value - 受控值;缺省该属性即非受控
|
|
5508
|
+
* @attr {string} default-value - 非受控初值
|
|
5509
|
+
* @attr {boolean} visible - 受控的明暗态;缺省该属性即非受控
|
|
5510
|
+
* @attr {boolean} default-visible - 非受控的初始明暗态,缺省隐藏
|
|
5511
|
+
* @attr {boolean} disabled - 禁用:输入与明暗切换都推不动
|
|
5512
|
+
* @attr {boolean} read-only - 只读:值写不进,明暗照切
|
|
5513
|
+
* @attr {boolean} required - 必填标注
|
|
5514
|
+
* @attr {boolean} invalid - 校验失败标注
|
|
5515
|
+
* @attr {string} name - 表单字段名;给了才参与提交
|
|
5516
|
+
* @attr {string} placeholder - 占位文案
|
|
5517
|
+
* @attr {string} auto-complete - 落到 input 上的 autocomplete,缺省 current-password;注册表单要写 new-password
|
|
5518
|
+
* @attr {'outline'|'subtle'|'ghost'} variant - 视觉变体
|
|
5519
|
+
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
5520
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
5521
|
+
* @fires value-change - 值变化;detail 为 `{ value: string }`
|
|
5522
|
+
* @fires visibility-change - 明暗变化;detail 为 `{ visible: boolean }`
|
|
5523
|
+
* @csspart root - 承载三个视觉轴与 data-disabled / data-readonly / data-invalid / data-empty 的容器
|
|
5524
|
+
* @csspart label - 标题;`for` 恒写向 input,故须是原生 `<label>` 才点得动
|
|
5525
|
+
* @csspart control - 视觉盒:描边、底色与聚焦环画在它身上,框内三件都是透明分段
|
|
5526
|
+
* @csspart input - 真正的输入框,须是原生 `<input>`;type 随明暗在 password / text 之间换
|
|
5527
|
+
* @csspart visibility-trigger - 明暗切换钮,须是原生 `<button>`;名字随状态换,里面放图标即可
|
|
5528
|
+
* @csspart caps-lock-indicator - 大写锁定提示;节点留空即可,文字由元素写入,是 role=status 的活区域
|
|
4211
5529
|
*/
|
|
4212
|
-
declare class
|
|
5530
|
+
declare class XhPasswordInputElement extends XhElement {
|
|
4213
5531
|
static partContract: {
|
|
4214
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
5532
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "input" | "visibility-trigger" | "caps-lock-indicator">;
|
|
4215
5533
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4216
5534
|
};
|
|
4217
5535
|
static properties: {
|
|
4218
|
-
|
|
5536
|
+
value: {
|
|
4219
5537
|
converter: {
|
|
4220
|
-
fromAttribute: (v: string | null) =>
|
|
5538
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4221
5539
|
};
|
|
4222
5540
|
};
|
|
4223
|
-
|
|
5541
|
+
defaultValue: {
|
|
4224
5542
|
converter: {
|
|
4225
|
-
fromAttribute: (v: string | null) =>
|
|
5543
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4226
5544
|
};
|
|
4227
5545
|
attribute: string;
|
|
4228
5546
|
};
|
|
4229
|
-
|
|
5547
|
+
visible: {
|
|
4230
5548
|
converter: {
|
|
4231
|
-
fromAttribute: (v: string | null) =>
|
|
5549
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4232
5550
|
};
|
|
4233
5551
|
};
|
|
4234
|
-
|
|
5552
|
+
defaultVisible: {
|
|
4235
5553
|
converter: {
|
|
4236
|
-
fromAttribute: (v: string | null) =>
|
|
5554
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4237
5555
|
};
|
|
4238
5556
|
attribute: string;
|
|
4239
5557
|
};
|
|
4240
|
-
|
|
5558
|
+
disabled: {
|
|
4241
5559
|
converter: {
|
|
4242
|
-
fromAttribute: (v: string | null) =>
|
|
5560
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
5561
|
+
};
|
|
5562
|
+
};
|
|
5563
|
+
readOnly: {
|
|
5564
|
+
converter: {
|
|
5565
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4243
5566
|
};
|
|
4244
5567
|
attribute: string;
|
|
4245
5568
|
};
|
|
4246
|
-
|
|
5569
|
+
required: {
|
|
5570
|
+
converter: {
|
|
5571
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
5572
|
+
};
|
|
5573
|
+
};
|
|
5574
|
+
invalid: {
|
|
5575
|
+
converter: {
|
|
5576
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
5577
|
+
};
|
|
5578
|
+
};
|
|
5579
|
+
name: {
|
|
5580
|
+
converter: {
|
|
5581
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5582
|
+
};
|
|
5583
|
+
};
|
|
5584
|
+
placeholder: {
|
|
5585
|
+
converter: {
|
|
5586
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5587
|
+
};
|
|
5588
|
+
};
|
|
5589
|
+
autoComplete: {
|
|
4247
5590
|
converter: {
|
|
4248
5591
|
fromAttribute: (v: string | null) => string | undefined;
|
|
4249
5592
|
};
|
|
4250
5593
|
attribute: string;
|
|
4251
5594
|
};
|
|
5595
|
+
variant: {
|
|
5596
|
+
converter: {
|
|
5597
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5598
|
+
};
|
|
5599
|
+
};
|
|
4252
5600
|
tone: {
|
|
4253
5601
|
converter: {
|
|
4254
5602
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -4263,16 +5611,23 @@ declare class XhPaginationElement extends XhElement {
|
|
|
4263
5611
|
attribute: boolean;
|
|
4264
5612
|
};
|
|
4265
5613
|
};
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
5614
|
+
value?: string;
|
|
5615
|
+
defaultValue?: string;
|
|
5616
|
+
visible?: boolean;
|
|
5617
|
+
defaultVisible?: boolean;
|
|
5618
|
+
disabled?: boolean;
|
|
5619
|
+
readOnly?: boolean;
|
|
5620
|
+
required?: boolean;
|
|
5621
|
+
invalid?: boolean;
|
|
5622
|
+
name?: string;
|
|
5623
|
+
placeholder?: string;
|
|
5624
|
+
autoComplete?: string;
|
|
5625
|
+
variant?: ControlVariant;
|
|
4272
5626
|
tone?: Tone;
|
|
4273
5627
|
size?: Size;
|
|
4274
|
-
translations?: Partial<
|
|
4275
|
-
private readonly
|
|
5628
|
+
translations?: Partial<PasswordInputTranslations>;
|
|
5629
|
+
private readonly notifyValue;
|
|
5630
|
+
private readonly notifyVisibility;
|
|
4276
5631
|
private readonly ctrl;
|
|
4277
5632
|
private machineProps;
|
|
4278
5633
|
protected wire(): void;
|
|
@@ -4291,7 +5646,8 @@ declare class XhPaginationElement extends XhElement {
|
|
|
4291
5646
|
* @attr {string} value - 受控值,逐字符摊进各格;缺省该属性即非受控
|
|
4292
5647
|
* @attr {string} default-value - 非受控初值,同样逐字符摊开
|
|
4293
5648
|
* @attr {number} length - 格数,默认 6
|
|
4294
|
-
* @attr {'numeric'|'alphanumeric'|'alphabetic'} type - 接受的字符类别,默认 numeric
|
|
5649
|
+
* @attr {'numeric'|'alphanumeric'|'alphabetic'} type - 接受的字符类别,默认 numeric;同时决定移动端弹哪种键盘
|
|
5650
|
+
* @attr {string} pattern - 自定义准入:一段正则源码,逐个字符整格匹配(自动加锚与 u 标志)。给了它就盖过 type 的准入表;写坏了退回 type
|
|
4295
5651
|
* @attr {boolean} mask - 遮蔽显示:每格转 type=password
|
|
4296
5652
|
* @attr {boolean} otp - 一次性验证码:补 autocomplete=one-time-code
|
|
4297
5653
|
* @attr {string} placeholder - 空格子的占位字符
|
|
@@ -4336,6 +5692,11 @@ declare class XhPinInputElement extends XhElement {
|
|
|
4336
5692
|
fromAttribute: (v: string | null) => string | undefined;
|
|
4337
5693
|
};
|
|
4338
5694
|
};
|
|
5695
|
+
pattern: {
|
|
5696
|
+
converter: {
|
|
5697
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5698
|
+
};
|
|
5699
|
+
};
|
|
4339
5700
|
mask: {
|
|
4340
5701
|
type: BooleanConstructor;
|
|
4341
5702
|
};
|
|
@@ -4385,6 +5746,7 @@ declare class XhPinInputElement extends XhElement {
|
|
|
4385
5746
|
defaultValue?: string[];
|
|
4386
5747
|
length?: number;
|
|
4387
5748
|
type?: PinInputType;
|
|
5749
|
+
pattern?: string;
|
|
4388
5750
|
mask?: boolean;
|
|
4389
5751
|
otp?: boolean;
|
|
4390
5752
|
placeholder?: string;
|
|
@@ -4429,7 +5791,7 @@ declare class XhPinInputElement extends XhElement {
|
|
|
4429
5791
|
*/
|
|
4430
5792
|
declare class XhPopoverElement extends XhElement {
|
|
4431
5793
|
static partContract: {
|
|
4432
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"
|
|
5794
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"content" | "trigger" | "title" | "description" | "close-trigger" | "positioner" | "arrow">;
|
|
4433
5795
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4434
5796
|
};
|
|
4435
5797
|
static properties: {
|
|
@@ -4492,6 +5854,8 @@ declare class XhPopoverElement extends XhElement {
|
|
|
4492
5854
|
private readonly popoverScope;
|
|
4493
5855
|
private readonly positionEngine;
|
|
4494
5856
|
private config;
|
|
5857
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
5858
|
+
private exit;
|
|
4495
5859
|
private readonly notify;
|
|
4496
5860
|
private readonly ctrl;
|
|
4497
5861
|
private machineProps;
|
|
@@ -4532,6 +5896,7 @@ declare class XhPopoverElement extends XhElement {
|
|
|
4532
5896
|
* @attr {number} stroke-width - 环的线宽(viewBox 单位),默认 6;只对 circle / dashboard 生效
|
|
4533
5897
|
* @attr {number} gap-degree - 缺口角度,默认 75;只对 dashboard 生效
|
|
4534
5898
|
* @attr {'top'|'right'|'bottom'|'left'} gap-position - 缺口朝向,默认 bottom;只对 dashboard 生效
|
|
5899
|
+
* @attr {boolean} indeterminate - 进度未知:条子改为往复动画,读屏那侧不报数
|
|
4535
5900
|
* @attr {string} value-text - 读屏播报的文字,覆盖默认的数值播报
|
|
4536
5901
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
4537
5902
|
* @attr {'sm'|'md'|'lg'} size - 尺寸:线形改厚度,环形改直径
|
|
@@ -4565,6 +5930,9 @@ declare class XhProgressElement extends XhElement {
|
|
|
4565
5930
|
gapPosition: {
|
|
4566
5931
|
attribute: string;
|
|
4567
5932
|
};
|
|
5933
|
+
indeterminate: {
|
|
5934
|
+
type: BooleanConstructor;
|
|
5935
|
+
};
|
|
4568
5936
|
valueText: {
|
|
4569
5937
|
attribute: string;
|
|
4570
5938
|
};
|
|
@@ -4577,6 +5945,7 @@ declare class XhProgressElement extends XhElement {
|
|
|
4577
5945
|
strokeWidth?: number;
|
|
4578
5946
|
gapDegree?: number;
|
|
4579
5947
|
gapPosition?: ProgressGapPosition;
|
|
5948
|
+
indeterminate?: boolean;
|
|
4580
5949
|
valueText?: string;
|
|
4581
5950
|
tone?: Tone;
|
|
4582
5951
|
size?: Size;
|
|
@@ -4594,6 +5963,9 @@ declare class XhProgressElement extends XhElement {
|
|
|
4594
5963
|
* @attr {string} value - 受控选中值;缺省该属性即非受控
|
|
4595
5964
|
* @attr {string} default-value - 非受控初始选中值
|
|
4596
5965
|
* @attr {boolean} disabled - 整组禁用
|
|
5966
|
+
* @attr {boolean} read-only - 只读:选不动,方向键照常移焦点
|
|
5967
|
+
* @attr {boolean} invalid - 校验失败态
|
|
5968
|
+
* @attr {boolean} required - 必填
|
|
4597
5969
|
* @attr {'horizontal'|'vertical'} orientation - 视觉排布,默认 vertical
|
|
4598
5970
|
* @attr {'ltr'|'rtl'} dir - 文字方向,只改写左右方向键语义,默认 ltr
|
|
4599
5971
|
* @attr {string} name - 表单字段名;给定后隐藏输入才带 name 并参与提交
|
|
@@ -4609,7 +5981,7 @@ declare class XhProgressElement extends XhElement {
|
|
|
4609
5981
|
*/
|
|
4610
5982
|
declare class XhRadioGroupElement extends XhElement {
|
|
4611
5983
|
static partContract: {
|
|
4612
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
5984
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "label" | "item-text" | "hidden-input">;
|
|
4613
5985
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4614
5986
|
};
|
|
4615
5987
|
static properties: {
|
|
@@ -4627,6 +5999,16 @@ declare class XhRadioGroupElement extends XhElement {
|
|
|
4627
5999
|
disabled: {
|
|
4628
6000
|
type: BooleanConstructor;
|
|
4629
6001
|
};
|
|
6002
|
+
readOnly: {
|
|
6003
|
+
type: BooleanConstructor;
|
|
6004
|
+
attribute: string;
|
|
6005
|
+
};
|
|
6006
|
+
invalid: {
|
|
6007
|
+
type: BooleanConstructor;
|
|
6008
|
+
};
|
|
6009
|
+
required: {
|
|
6010
|
+
type: BooleanConstructor;
|
|
6011
|
+
};
|
|
4630
6012
|
orientation: {};
|
|
4631
6013
|
direction: {
|
|
4632
6014
|
attribute: string;
|
|
@@ -4639,6 +6021,9 @@ declare class XhRadioGroupElement extends XhElement {
|
|
|
4639
6021
|
value?: string;
|
|
4640
6022
|
defaultValue?: string;
|
|
4641
6023
|
disabled?: boolean;
|
|
6024
|
+
readOnly?: boolean;
|
|
6025
|
+
invalid?: boolean;
|
|
6026
|
+
required?: boolean;
|
|
4642
6027
|
orientation?: Orientation;
|
|
4643
6028
|
direction?: Direction;
|
|
4644
6029
|
name?: string;
|
|
@@ -4690,60 +6075,302 @@ declare class XhRadioGroupElement extends XhElement {
|
|
|
4690
6075
|
* 点亮看 data-highlighted,半亮看 data-half
|
|
4691
6076
|
* @csspart hidden-input - 表单影子输入(必须是原生 input)
|
|
4692
6077
|
*/
|
|
4693
|
-
declare class XhRatingElement extends XhElement {
|
|
6078
|
+
declare class XhRatingElement extends XhElement {
|
|
6079
|
+
static partContract: {
|
|
6080
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "control" | "hidden-input">;
|
|
6081
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6082
|
+
};
|
|
6083
|
+
static properties: {
|
|
6084
|
+
value: {
|
|
6085
|
+
converter: {
|
|
6086
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6087
|
+
};
|
|
6088
|
+
};
|
|
6089
|
+
defaultValue: {
|
|
6090
|
+
converter: {
|
|
6091
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6092
|
+
};
|
|
6093
|
+
attribute: string;
|
|
6094
|
+
};
|
|
6095
|
+
count: {
|
|
6096
|
+
converter: {
|
|
6097
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6098
|
+
};
|
|
6099
|
+
};
|
|
6100
|
+
allowHalf: {
|
|
6101
|
+
converter: {
|
|
6102
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6103
|
+
};
|
|
6104
|
+
attribute: string;
|
|
6105
|
+
};
|
|
6106
|
+
allowClear: {
|
|
6107
|
+
converter: {
|
|
6108
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6109
|
+
};
|
|
6110
|
+
attribute: string;
|
|
6111
|
+
};
|
|
6112
|
+
disabled: {
|
|
6113
|
+
converter: {
|
|
6114
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6115
|
+
};
|
|
6116
|
+
};
|
|
6117
|
+
readOnly: {
|
|
6118
|
+
converter: {
|
|
6119
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6120
|
+
};
|
|
6121
|
+
attribute: string;
|
|
6122
|
+
};
|
|
6123
|
+
required: {
|
|
6124
|
+
converter: {
|
|
6125
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6126
|
+
};
|
|
6127
|
+
};
|
|
6128
|
+
name: {
|
|
6129
|
+
converter: {
|
|
6130
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6131
|
+
};
|
|
6132
|
+
};
|
|
6133
|
+
direction: {
|
|
6134
|
+
converter: {
|
|
6135
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6136
|
+
};
|
|
6137
|
+
attribute: string;
|
|
6138
|
+
};
|
|
6139
|
+
tone: {
|
|
6140
|
+
converter: {
|
|
6141
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6142
|
+
};
|
|
6143
|
+
};
|
|
6144
|
+
size: {
|
|
6145
|
+
converter: {
|
|
6146
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6147
|
+
};
|
|
6148
|
+
};
|
|
6149
|
+
};
|
|
6150
|
+
value?: number;
|
|
6151
|
+
defaultValue?: number;
|
|
6152
|
+
count?: number;
|
|
6153
|
+
allowHalf?: boolean;
|
|
6154
|
+
allowClear?: boolean;
|
|
6155
|
+
disabled?: boolean;
|
|
6156
|
+
readOnly?: boolean;
|
|
6157
|
+
required?: boolean;
|
|
6158
|
+
name?: string;
|
|
6159
|
+
direction?: Direction;
|
|
6160
|
+
tone?: Tone;
|
|
6161
|
+
size?: Size;
|
|
6162
|
+
private readonly notifyValue;
|
|
6163
|
+
private readonly notifyHover;
|
|
6164
|
+
private readonly ctrl;
|
|
6165
|
+
private machineProps;
|
|
6166
|
+
/**
|
|
6167
|
+
* 承载焦点的星被移出 DOM 时浏览器不派 focusout,焦点锚点会停在一颗已消失的星上:
|
|
6168
|
+
* 容器判自己"焦点在带内"退出 Tab 序列,又没有条目认领得了这个锚点,
|
|
6169
|
+
* 整条评分带零个 Tab 停靠点,键盘用户再也进不来。这里替 DOM 把焦点离场如实上报。
|
|
6170
|
+
*/
|
|
6171
|
+
protected onPartsReleased(nodes: readonly HTMLElement[]): void;
|
|
6172
|
+
/** 条目身份取自作者写的 value 属性;没写就不是一颗合法的星,交给 connect 按非法值处理。 */
|
|
6173
|
+
private itemProps;
|
|
6174
|
+
protected wire(): void;
|
|
6175
|
+
}
|
|
6176
|
+
//#endregion
|
|
6177
|
+
//#region src/elements/scroll-area.d.ts
|
|
6178
|
+
/**
|
|
6179
|
+
* `<xh-scroll-area>` —— Light-DOM 行为宿主:作者写 root/viewport/content 与两条 scrollbar
|
|
6180
|
+
* 角色节点,元素按轴各跑一台 scrollbar 机器并把 connect 产出打上去。
|
|
6181
|
+
*
|
|
6182
|
+
* 滚动区没有自己的机器,它是视口加两条 scrollbar 的组装:scrollbar 角色节点是那条
|
|
6183
|
+
* scrollbar 的挂载点、同时充当它的根,里面照 scrollbar 那套写 track / thumb / corner
|
|
6184
|
+
* (它们戴 data-scope="scrollbar"),两个组件共用同一份滚动条。
|
|
6185
|
+
*
|
|
6186
|
+
* 滚动本身一概不接管:viewport 是真正 overflow:auto 的那层,键盘(PageUp/PageDown、方向键、
|
|
6187
|
+
* Home/End)与滚轮全部走浏览器原生通路,元素只是把原生滚动条藏起来另画一套。
|
|
6188
|
+
* 自绘的滚动条对读屏隐藏——同一件事没必要报两遍。
|
|
6189
|
+
*
|
|
6190
|
+
* 每条滚动条用 orientation 属性写明自己管哪条轴(不写即 vertical),
|
|
6191
|
+
* 轨道与滑块按所在滚动条的轴向取几何,不必另写。这是挂载时的静态声明:运行期要换轴,换节点。
|
|
6192
|
+
*
|
|
6193
|
+
* @customElement xh-scroll-area
|
|
6194
|
+
* @attr {'auto'|'always'|'scroll'|'hover'} type - 滚动条露面的时机,默认 hover
|
|
6195
|
+
* @attr {number} hide-delay - 收起前的等待毫秒(type 为 scroll / hover 时生效),默认 600
|
|
6196
|
+
* @attr {'horizontal'|'vertical'|'both'} orientation - 哪几条轴归本组件管,默认 both
|
|
6197
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸档,换的是滚动条厚度
|
|
6198
|
+
* @attr {'ltr'|'rtl'} dir - 排版方向,只改写横轴的滚动量正负与指针位移方向
|
|
6199
|
+
* @attr {boolean} force-visible - 触屏(粗指针)上也画自绘滚动条;缺省交给原生滚动
|
|
6200
|
+
* @csspart root - 组件根容器(承载 data-orientation / data-type / data-dragging),定位上下文
|
|
6201
|
+
* @csspart viewport - 真正 overflow:auto 的那层,带 tabindex=0 让键盘用户落得进来;承载 data-lane-vertical / data-lane-horizontal
|
|
6202
|
+
* @csspart content - 内容包裹层,横向溢出靠它撑出宽度
|
|
6203
|
+
* @csspart scrollbar - 某条轴的滚动条挂载点,须用 orientation 属性写明轴向;同时是那条 scrollbar 的根,承载 data-state / data-gutter / data-native
|
|
6204
|
+
* @csspart track - 轨道(data-scope="scrollbar"),点空白处把滑块中心挪过去
|
|
6205
|
+
* @csspart thumb - 滑块(data-scope="scrollbar"),位置与长度由内联逻辑属性给出;按住可拖
|
|
6206
|
+
* @csspart corner - 交叉口补丁(data-scope="scrollbar"),写在竖条的挂载点里;只有两条都在场时显形
|
|
6207
|
+
*/
|
|
6208
|
+
declare class XhScrollAreaElement extends XhElement {
|
|
6209
|
+
static partContract: {
|
|
6210
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "viewport" | "content" | "scrollbar">;
|
|
6211
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6212
|
+
delegates: import("@xihan-ui/kernel").Anatomy<"root" | "track" | "thumb" | "corner">[];
|
|
6213
|
+
};
|
|
6214
|
+
static properties: {
|
|
6215
|
+
type: {
|
|
6216
|
+
converter: {
|
|
6217
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6218
|
+
};
|
|
6219
|
+
};
|
|
6220
|
+
hideDelay: {
|
|
6221
|
+
converter: {
|
|
6222
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6223
|
+
};
|
|
6224
|
+
attribute: string;
|
|
6225
|
+
};
|
|
6226
|
+
orientation: {
|
|
6227
|
+
converter: {
|
|
6228
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6229
|
+
};
|
|
6230
|
+
};
|
|
6231
|
+
size: {
|
|
6232
|
+
converter: {
|
|
6233
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6234
|
+
};
|
|
6235
|
+
};
|
|
6236
|
+
direction: {
|
|
6237
|
+
converter: {
|
|
6238
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6239
|
+
};
|
|
6240
|
+
attribute: string;
|
|
6241
|
+
};
|
|
6242
|
+
forceVisible: {
|
|
6243
|
+
converter: {
|
|
6244
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6245
|
+
};
|
|
6246
|
+
attribute: string;
|
|
6247
|
+
};
|
|
6248
|
+
};
|
|
6249
|
+
type?: ScrollbarType;
|
|
6250
|
+
hideDelay?: number;
|
|
6251
|
+
orientation?: ScrollAreaOrientation;
|
|
6252
|
+
size?: Size;
|
|
6253
|
+
direction?: Direction;
|
|
6254
|
+
forceVisible?: boolean;
|
|
6255
|
+
private readonly idGen;
|
|
6256
|
+
private readonly areaScope;
|
|
6257
|
+
private readonly verticalCtrl;
|
|
6258
|
+
private readonly horizontalCtrl;
|
|
6259
|
+
private areaProps;
|
|
6260
|
+
/**
|
|
6261
|
+
* 这条滚动条管哪条轴。作者在节点上写 orientation="horizontal",与 Vue 侧的同名 prop
|
|
6262
|
+
* 是同一份声明;没写或写不出来即竖向(两个适配器同一个缺省)。
|
|
6263
|
+
*/
|
|
6264
|
+
private barOrientation;
|
|
6265
|
+
/** 某条轴的挂载点:按轴现查而不是缓存,作者随时可能增删一条轴的滚动条。 */
|
|
6266
|
+
private barEl;
|
|
6267
|
+
private partsIn;
|
|
6268
|
+
private injectRefs;
|
|
6269
|
+
protected wire(): void;
|
|
6270
|
+
}
|
|
6271
|
+
//#endregion
|
|
6272
|
+
//#region src/elements/scrollbar.d.ts
|
|
6273
|
+
/**
|
|
6274
|
+
* `<xh-scrollbar>` —— Light-DOM 行为宿主:作者写 root/track/thumb 三个角色节点,
|
|
6275
|
+
* 元素跑 scrollbar 机器并把 connect 产出打上去。
|
|
6276
|
+
*
|
|
6277
|
+
* 滚动容器由作者交出来,且**不必**是本元素的后代:写 `controls="内容区的 id"`,
|
|
6278
|
+
* 或者用 JS 把节点赋给 `scrollable` 属性。表格的滚动盒、虚拟滚动的视口、
|
|
6279
|
+
* 随手一个 overflow:auto 的 div 都行。
|
|
6280
|
+
*
|
|
6281
|
+
* 滚动本身一概不接管:键盘(PageUp/PageDown、方向键、Home/End)与滚轮在滚动容器上
|
|
6282
|
+
* 走浏览器原生通路,本元素只是另画一套并接上拖拽与点轨道。滑块缺省不进 Tab 序、
|
|
6283
|
+
* 也对读屏隐藏——同一件事没必要报两遍;要用键盘操作滑块本身时开 `focusable`。
|
|
6284
|
+
*
|
|
6285
|
+
* 滑块的位置与长度按可视区/内容/滚动量算出来后写进内联样式:竖向是
|
|
6286
|
+
* inset-block-start + block-size,横向是 inset-inline-start + inline-size(逻辑属性,RTL 自动换向)。
|
|
6287
|
+
*
|
|
6288
|
+
* @customElement xh-scrollbar
|
|
6289
|
+
* @attr {string} controls - 滚动容器的 id;没设 scrollable 属性时按它查节点,focusable 时同时落到 aria-controls
|
|
6290
|
+
* @attr {'horizontal'|'vertical'} orientation - 这条滚动条管哪条轴,默认 vertical
|
|
6291
|
+
* @attr {'auto'|'always'|'scroll'|'hover'} type - 露面的时机,默认 hover
|
|
6292
|
+
* @attr {number} hide-delay - 收起前的等待毫秒(type 为 scroll / hover 时生效),默认 600
|
|
6293
|
+
* @attr {number} min-thumb-size - 滑块最短多少像素,默认 20
|
|
6294
|
+
* @attr {number} step - 方向键一步滚多少像素,默认 40
|
|
6295
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸档,换的是滚动条厚度
|
|
6296
|
+
* @attr {boolean} disabled - 不接指针也不接键盘,恒不显形
|
|
6297
|
+
* @attr {boolean} focusable - 滑块进 Tab 序并报 role=scrollbar,默认关
|
|
6298
|
+
* @attr {boolean} gutter - 横竖两条同时摆着时在末端让出交叉口那一格,交叉口由 corner 部件补
|
|
6299
|
+
* @attr {boolean} force-visible - 触屏(粗指针)上也显形;缺省交给原生滚动,整条不画并带 data-native
|
|
6300
|
+
* @attr {'ltr'|'rtl'} dir - 排版方向,只改写横轴的滚动量正负与指针位移方向
|
|
6301
|
+
* @prop {HTMLElement} scrollable - 直接给滚动容器节点(对象只走 property),优先于 controls
|
|
6302
|
+
* @fires scroll-start - 开始滚了;detail 为 `{ offset: number, max: number }`
|
|
6303
|
+
* @fires scroll-end - 一段滚动结束(停手 120ms);detail 同上
|
|
6304
|
+
* @fires drag-start - 按住滑块;detail 同上
|
|
6305
|
+
* @fires drag-end - 松开滑块;detail 同上
|
|
6306
|
+
* @csspart root - 定位盒与指针热区,承载 data-orientation / data-type / data-state / data-scrolling / data-dragging / data-size / data-gutter / data-native;收起走 data-state=hidden 由皮肤淡出
|
|
6307
|
+
* @csspart track - 量长度的那条轨,点空白处把滑块中心挪过去
|
|
6308
|
+
* @csspart thumb - 滑块,位置与长度由内联逻辑属性给出;按住可拖,focusable 时可聚焦并吃方向键
|
|
6309
|
+
* @csspart corner - 交叉口补丁(可选),写在根里、贴在本条末端之外那一格,跟着本条显隐
|
|
6310
|
+
*/
|
|
6311
|
+
declare class XhScrollbarElement extends XhElement {
|
|
4694
6312
|
static partContract: {
|
|
4695
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
6313
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "track" | "thumb" | "corner">;
|
|
4696
6314
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4697
6315
|
};
|
|
4698
6316
|
static properties: {
|
|
4699
|
-
|
|
6317
|
+
controls: {
|
|
4700
6318
|
converter: {
|
|
4701
|
-
fromAttribute: (v: string | null) =>
|
|
6319
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4702
6320
|
};
|
|
4703
6321
|
};
|
|
4704
|
-
|
|
6322
|
+
orientation: {
|
|
6323
|
+
converter: {
|
|
6324
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6325
|
+
};
|
|
6326
|
+
};
|
|
6327
|
+
type: {
|
|
6328
|
+
converter: {
|
|
6329
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6330
|
+
};
|
|
6331
|
+
};
|
|
6332
|
+
hideDelay: {
|
|
4705
6333
|
converter: {
|
|
4706
6334
|
fromAttribute: (v: string | null) => number | undefined;
|
|
4707
6335
|
};
|
|
4708
6336
|
attribute: string;
|
|
4709
6337
|
};
|
|
4710
|
-
|
|
6338
|
+
minThumbSize: {
|
|
4711
6339
|
converter: {
|
|
4712
6340
|
fromAttribute: (v: string | null) => number | undefined;
|
|
4713
6341
|
};
|
|
6342
|
+
attribute: string;
|
|
4714
6343
|
};
|
|
4715
|
-
|
|
6344
|
+
step: {
|
|
4716
6345
|
converter: {
|
|
4717
|
-
fromAttribute: (v: string | null) =>
|
|
6346
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
4718
6347
|
};
|
|
4719
|
-
attribute: string;
|
|
4720
6348
|
};
|
|
4721
|
-
|
|
6349
|
+
size: {
|
|
4722
6350
|
converter: {
|
|
4723
|
-
fromAttribute: (v: string | null) =>
|
|
6351
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
4724
6352
|
};
|
|
4725
|
-
attribute: string;
|
|
4726
6353
|
};
|
|
4727
6354
|
disabled: {
|
|
4728
6355
|
converter: {
|
|
4729
6356
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4730
6357
|
};
|
|
4731
6358
|
};
|
|
4732
|
-
|
|
6359
|
+
focusable: {
|
|
4733
6360
|
converter: {
|
|
4734
6361
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4735
6362
|
};
|
|
4736
|
-
attribute: string;
|
|
4737
6363
|
};
|
|
4738
|
-
|
|
6364
|
+
gutter: {
|
|
4739
6365
|
converter: {
|
|
4740
6366
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4741
6367
|
};
|
|
4742
6368
|
};
|
|
4743
|
-
|
|
6369
|
+
forceVisible: {
|
|
4744
6370
|
converter: {
|
|
4745
|
-
fromAttribute: (v: string | null) =>
|
|
6371
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4746
6372
|
};
|
|
6373
|
+
attribute: string;
|
|
4747
6374
|
};
|
|
4748
6375
|
direction: {
|
|
4749
6376
|
converter: {
|
|
@@ -4751,89 +6378,117 @@ declare class XhRatingElement extends XhElement {
|
|
|
4751
6378
|
};
|
|
4752
6379
|
attribute: string;
|
|
4753
6380
|
};
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
fromAttribute: (v: string | null) => string | undefined;
|
|
4757
|
-
};
|
|
6381
|
+
scrollable: {
|
|
6382
|
+
attribute: boolean;
|
|
4758
6383
|
};
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
fromAttribute: (v: string | null) => string | undefined;
|
|
4762
|
-
};
|
|
6384
|
+
translations: {
|
|
6385
|
+
attribute: boolean;
|
|
4763
6386
|
};
|
|
4764
6387
|
};
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
6388
|
+
controls?: string;
|
|
6389
|
+
orientation?: Orientation;
|
|
6390
|
+
type?: ScrollbarType;
|
|
6391
|
+
hideDelay?: number;
|
|
6392
|
+
minThumbSize?: number;
|
|
6393
|
+
step?: number;
|
|
6394
|
+
size?: Size;
|
|
4770
6395
|
disabled?: boolean;
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
6396
|
+
focusable?: boolean;
|
|
6397
|
+
gutter?: boolean;
|
|
6398
|
+
forceVisible?: boolean;
|
|
4774
6399
|
direction?: Direction;
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
private readonly notifyValue;
|
|
4778
|
-
private readonly notifyHover;
|
|
6400
|
+
scrollable?: HTMLElement | null;
|
|
6401
|
+
translations?: ScrollbarSchema['props']['translations'];
|
|
4779
6402
|
private readonly ctrl;
|
|
4780
6403
|
private machineProps;
|
|
6404
|
+
/** 事件名逐个写在调用点:形参名会被清单分析器当成事件名,凑出一个永不派发的条目。 */
|
|
6405
|
+
private fire;
|
|
4781
6406
|
/**
|
|
4782
|
-
*
|
|
4783
|
-
*
|
|
4784
|
-
* 整条评分带零个 Tab 停靠点,键盘用户再也进不来。这里替 DOM 把焦点离场如实上报。
|
|
6407
|
+
* 先认 scrollable 属性给的节点,没有再按 controls 当 id 去查。
|
|
6408
|
+
* 每次调用现查:作者的容器可能是后插进来的,缓存住会永远指向第一次那个(或 null)。
|
|
4785
6409
|
*/
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
private itemProps;
|
|
6410
|
+
private resolveScrollable;
|
|
6411
|
+
private injectRefs;
|
|
4789
6412
|
protected wire(): void;
|
|
4790
6413
|
}
|
|
4791
6414
|
//#endregion
|
|
4792
|
-
//#region src/elements/
|
|
6415
|
+
//#region src/elements/segmented.d.ts
|
|
4793
6416
|
/**
|
|
4794
|
-
* `<xh-
|
|
4795
|
-
*
|
|
4796
|
-
*
|
|
4797
|
-
* 滚动本身一概不接管:viewport 是真正 overflow:auto 的那层,键盘(PageUp/PageDown、方向键、
|
|
4798
|
-
* Home/End)与滚轮全部走浏览器原生通路,元素只是把原生滚动条藏起来另画一套。
|
|
4799
|
-
* 自绘的 scrollbar/thumb 对读屏隐藏——同一件事没必要报两遍。
|
|
4800
|
-
*
|
|
4801
|
-
* 滑块的位置与长度按视口/内容/滚动量算出来后写进内联样式:竖向是 inset-block-start + block-size,
|
|
4802
|
-
* 横向是 inset-inline-start + inline-size(逻辑属性,RTL 下自动换向)。
|
|
4803
|
-
* 尺寸在机器的效应里量:挂载后推迟一拍量一次,此后跟着 scroll 事件与 ResizeObserver 走。
|
|
6417
|
+
* `<xh-segmented>` —— Light-DOM 行为宿主:作者写 root 与若干 item 角色节点,
|
|
6418
|
+
* 元素跑 segmented 机器并把 connect 产出打上去。段须是原生 `<button>`
|
|
6419
|
+
* (Enter/Space 的激活由平台负责),身份取写在段上的 value 属性,禁用由段自报 aria-disabled。
|
|
4804
6420
|
*
|
|
4805
|
-
*
|
|
4806
|
-
*
|
|
6421
|
+
* 一排互斥选项就是单选组:root 是 radiogroup,每段 role=radio 并显式报 aria-checked。
|
|
6422
|
+
* indicator 是那块会滑动的选中标记,位置由机器量好写成内联样式里的四个私有槽;
|
|
6423
|
+
* 它绝对定位,必须写在段之前,靠文档序让段压在它上面。
|
|
4807
6424
|
*
|
|
4808
|
-
* @customElement xh-
|
|
4809
|
-
* @attr {
|
|
4810
|
-
* @attr {
|
|
4811
|
-
* @attr {
|
|
4812
|
-
* @attr {
|
|
4813
|
-
* @
|
|
4814
|
-
* @
|
|
4815
|
-
* @
|
|
4816
|
-
* @
|
|
4817
|
-
* @
|
|
4818
|
-
* @
|
|
6425
|
+
* @customElement xh-segmented
|
|
6426
|
+
* @attr {string} value - 受控选中值;缺省该属性即非受控
|
|
6427
|
+
* @attr {string} default-value - 非受控的初始选中值
|
|
6428
|
+
* @attr {boolean} disabled - 整组禁用
|
|
6429
|
+
* @attr {boolean} read-only - 只读:选不动,方向键照常移焦点
|
|
6430
|
+
* @attr {boolean} invalid - 校验失败态
|
|
6431
|
+
* @attr {boolean} required - 必填
|
|
6432
|
+
* @attr {string} name - 表单字段名;给定后隐藏输入才带 name 并参与提交
|
|
6433
|
+
* @attr {'horizontal'|'vertical'} orientation - 视觉排布,默认 horizontal;方向键四个恒响应,与它无关
|
|
6434
|
+
* @attr {'ltr'|'rtl'} dir - 文字方向,只改写左右方向键语义与指示器的起始缘;不写即从 DOM 现读祖先链上的方向
|
|
6435
|
+
* @attr {boolean} loop - 方向键走到尽头回绕,默认开启
|
|
6436
|
+
* @attr {boolean} block - 撑满行宽,各段等分剩余空间
|
|
6437
|
+
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
6438
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
6439
|
+
* @fires value-change - 选中值变化;detail 为 `{ value: string | null }`
|
|
6440
|
+
* @csspart root - role=radiogroup 的容器(承载键盘收口与 Tab 兜底位)
|
|
6441
|
+
* @csspart item - 一段,须是原生 `<button>` 并自带 value 属性标识身份
|
|
6442
|
+
* @csspart item-text - 段内文本
|
|
6443
|
+
* @csspart indicator - 会滑动的选中标记,对读屏隐藏;无选中项时收起
|
|
6444
|
+
* @csspart hidden-input - 表单影子输入(必须是原生 input),整组只需一份;给了 name 却没写它,就没有任何东西参与提交
|
|
4819
6445
|
*/
|
|
4820
|
-
declare class
|
|
6446
|
+
declare class XhSegmentedElement extends XhElement {
|
|
4821
6447
|
static partContract: {
|
|
4822
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
6448
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "item-text" | "hidden-input">;
|
|
4823
6449
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4824
6450
|
};
|
|
4825
6451
|
static properties: {
|
|
4826
|
-
|
|
6452
|
+
collection: {
|
|
6453
|
+
attribute: boolean;
|
|
6454
|
+
};
|
|
6455
|
+
value: {
|
|
6456
|
+
converter: {
|
|
6457
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6458
|
+
};
|
|
6459
|
+
};
|
|
6460
|
+
defaultValue: {
|
|
4827
6461
|
converter: {
|
|
4828
6462
|
fromAttribute: (v: string | null) => string | undefined;
|
|
4829
6463
|
};
|
|
6464
|
+
attribute: string;
|
|
4830
6465
|
};
|
|
4831
|
-
|
|
6466
|
+
disabled: {
|
|
4832
6467
|
converter: {
|
|
4833
|
-
fromAttribute: (v: string | null) =>
|
|
6468
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6469
|
+
};
|
|
6470
|
+
};
|
|
6471
|
+
readOnly: {
|
|
6472
|
+
converter: {
|
|
6473
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4834
6474
|
};
|
|
4835
6475
|
attribute: string;
|
|
4836
6476
|
};
|
|
6477
|
+
invalid: {
|
|
6478
|
+
converter: {
|
|
6479
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6480
|
+
};
|
|
6481
|
+
};
|
|
6482
|
+
required: {
|
|
6483
|
+
converter: {
|
|
6484
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6485
|
+
};
|
|
6486
|
+
};
|
|
6487
|
+
name: {
|
|
6488
|
+
converter: {
|
|
6489
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6490
|
+
};
|
|
6491
|
+
};
|
|
4837
6492
|
orientation: {
|
|
4838
6493
|
converter: {
|
|
4839
6494
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -4845,21 +6500,57 @@ declare class XhScrollAreaElement extends XhElement {
|
|
|
4845
6500
|
};
|
|
4846
6501
|
attribute: string;
|
|
4847
6502
|
};
|
|
6503
|
+
loop: {
|
|
6504
|
+
converter: {
|
|
6505
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6506
|
+
};
|
|
6507
|
+
};
|
|
6508
|
+
block: {
|
|
6509
|
+
converter: {
|
|
6510
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6511
|
+
};
|
|
6512
|
+
};
|
|
6513
|
+
tone: {
|
|
6514
|
+
converter: {
|
|
6515
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6516
|
+
};
|
|
6517
|
+
};
|
|
6518
|
+
size: {
|
|
6519
|
+
converter: {
|
|
6520
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6521
|
+
};
|
|
6522
|
+
};
|
|
4848
6523
|
};
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
6524
|
+
collection?: SegmentedNode[];
|
|
6525
|
+
value?: string;
|
|
6526
|
+
defaultValue?: string;
|
|
6527
|
+
disabled?: boolean;
|
|
6528
|
+
readOnly?: boolean;
|
|
6529
|
+
invalid?: boolean;
|
|
6530
|
+
required?: boolean;
|
|
6531
|
+
name?: string;
|
|
6532
|
+
orientation?: Orientation;
|
|
4852
6533
|
direction?: Direction;
|
|
4853
|
-
|
|
4854
|
-
|
|
6534
|
+
loop?: boolean;
|
|
6535
|
+
block?: boolean;
|
|
6536
|
+
tone?: Tone;
|
|
6537
|
+
size?: Size;
|
|
6538
|
+
private readonly declaredDisabled;
|
|
6539
|
+
/** 上一帧是否整组禁用:解禁当帧 DOM 上还留着机器写回的 aria-disabled,读不得。 */
|
|
6540
|
+
private wasGroupDisabled;
|
|
6541
|
+
private readonly notify;
|
|
4855
6542
|
private readonly ctrl;
|
|
4856
6543
|
private machineProps;
|
|
6544
|
+
private injectRefs;
|
|
4857
6545
|
/**
|
|
4858
|
-
*
|
|
4859
|
-
*
|
|
6546
|
+
* 承载焦点的段被移出 DOM 时浏览器不派 focusout,焦点锚点会停在一个已消失的值上:
|
|
6547
|
+
* 容器判自己"焦点在组内"退出 Tab 序列,又没有段认领得了这个锚点,
|
|
6548
|
+
* 整组零个 Tab 停靠点,键盘用户再也进不来。这里替 DOM 把焦点离场如实上报。
|
|
4860
6549
|
*/
|
|
4861
|
-
|
|
4862
|
-
|
|
6550
|
+
protected onPartsReleased(nodes: readonly HTMLElement[]): void;
|
|
6551
|
+
/** 作者声明的段禁用,只认首见那一份;没写即 undefined,交给 collection 定夺 */
|
|
6552
|
+
private readonly declaredItemDisabled;
|
|
6553
|
+
private itemProps;
|
|
4863
6554
|
private partsIn;
|
|
4864
6555
|
protected wire(): void;
|
|
4865
6556
|
}
|
|
@@ -4880,6 +6571,7 @@ declare class XhScrollAreaElement extends XhElement {
|
|
|
4880
6571
|
* @attr {boolean} open - 受控开合;缺省该属性即非受控
|
|
4881
6572
|
* @attr {boolean} default-open - 非受控初始为展开
|
|
4882
6573
|
* @attr {boolean} disabled - 整个控件禁用:trigger 用原生 disabled,表单影子不参与提交
|
|
6574
|
+
* @attr {boolean} read-only - 只读:浮层照常展开、条目照常浏览,但选中值改不动、也清不掉
|
|
4883
6575
|
* @attr {boolean} invalid - 校验错误态:trigger 标红并输出 aria-invalid
|
|
4884
6576
|
* @attr {number} max-tag-count - 多选标签最多摆几个,其余折进 api 的 overflowCount;缺省全摆
|
|
4885
6577
|
* @attr {boolean} required - 原生表单校验:无选中值时提交被拦下;多选下的门槛是至少选中一项
|
|
@@ -4900,12 +6592,14 @@ declare class XhScrollAreaElement extends XhElement {
|
|
|
4900
6592
|
* @csspart trigger - 触发按钮(aria-haspopup=listbox/aria-expanded/aria-controls 所在),同时是定位锚点,须是原生 button
|
|
4901
6593
|
* @csspart value-text - 选中项文本的显示位;留空即由元素填入 displayText,作者写了内容则归作者
|
|
4902
6594
|
* @csspart indicator - 展开指示符(aria-hidden,data-state 随开合)
|
|
4903
|
-
* @csspart control -
|
|
4904
|
-
* @csspart clear-trigger -
|
|
4905
|
-
* @csspart tag - 多选标签,须自带 value 属性标识选中值;放触发器里是纯展示,放外面配
|
|
4906
|
-
* @csspart
|
|
6595
|
+
* @csspart control - 盒:触发器与清空按钮在里面并排,描边、底色、控件高度与聚焦环都长在它上面
|
|
6596
|
+
* @csspart clear-trigger - 清空按钮:盒里 trigger 的兄弟节点,不占 Tab 位;清不了(无值 / 禁用 / 只读)时带 hidden,点完焦点送回 trigger;可及名走 translations.clearTrigger
|
|
6597
|
+
* @csspart tag - 多选标签,须自带 value 属性标识选中值;放触发器里是纯展示,放外面配 item-delete-trigger 可删
|
|
6598
|
+
* @csspart item-delete-trigger - 标签删除按钮,须放在 tag 里;点按摘掉所在标签的选中值,可及名走 translations.deleteItem
|
|
4907
6599
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
4908
|
-
* @csspart content -
|
|
6600
|
+
* @csspart content - 浮层外壳(焦点域与消解层的根节点,键盘在此收口),收起时带 hidden
|
|
6601
|
+
* @csspart list - role=listbox 本体,条目放在它里面;滚动也在这一层
|
|
6602
|
+
* @csspart footer - 浮层底部的操作区,是 list 的兄弟;不进列表框的拥有关系,方向键与连打检索也不认它
|
|
4909
6603
|
* @csspart item - role=option 条目,须自带 value 属性标识身份;禁用写 aria-disabled="true"
|
|
4910
6604
|
* @csspart item-text - 条目文本(连打检索与 value-text 的取字处)
|
|
4911
6605
|
* @csspart item-indicator - 条目选中标记(aria-hidden)
|
|
@@ -4913,7 +6607,7 @@ declare class XhScrollAreaElement extends XhElement {
|
|
|
4913
6607
|
*/
|
|
4914
6608
|
declare class XhSelectElement extends XhElement {
|
|
4915
6609
|
static partContract: {
|
|
4916
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
6610
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "list" | "label" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "value-text" | "item-delete-trigger" | "footer" | "tag" | "hidden-select">;
|
|
4917
6611
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4918
6612
|
};
|
|
4919
6613
|
static properties: {
|
|
@@ -4943,6 +6637,12 @@ declare class XhSelectElement extends XhElement {
|
|
|
4943
6637
|
disabled: {
|
|
4944
6638
|
type: BooleanConstructor;
|
|
4945
6639
|
};
|
|
6640
|
+
readOnly: {
|
|
6641
|
+
converter: {
|
|
6642
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6643
|
+
};
|
|
6644
|
+
attribute: string;
|
|
6645
|
+
};
|
|
4946
6646
|
invalid: {
|
|
4947
6647
|
type: BooleanConstructor;
|
|
4948
6648
|
};
|
|
@@ -5014,6 +6714,7 @@ declare class XhSelectElement extends XhElement {
|
|
|
5014
6714
|
open?: boolean;
|
|
5015
6715
|
defaultOpen?: boolean;
|
|
5016
6716
|
disabled?: boolean;
|
|
6717
|
+
readOnly?: boolean;
|
|
5017
6718
|
invalid?: boolean;
|
|
5018
6719
|
required?: boolean;
|
|
5019
6720
|
name?: string;
|
|
@@ -5026,13 +6727,15 @@ declare class XhSelectElement extends XhElement {
|
|
|
5026
6727
|
variant?: ControlVariant;
|
|
5027
6728
|
tone?: Tone;
|
|
5028
6729
|
size?: Size;
|
|
5029
|
-
/** 读屏文案(
|
|
6730
|
+
/** 读屏文案(clearTrigger 等);对象进不了属性,只作为 property 暴露。 */
|
|
5030
6731
|
translations?: SelectSchema['props']['translations'];
|
|
5031
6732
|
maxTagCount?: number;
|
|
5032
6733
|
private readonly idGen;
|
|
5033
6734
|
private readonly selectScope;
|
|
5034
6735
|
private readonly positionEngine;
|
|
5035
6736
|
private config;
|
|
6737
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
6738
|
+
private exit;
|
|
5036
6739
|
/** value-text 是否归元素填:首次见到该节点时定,之后不再回读(回读到的会是自己写的字)。 */
|
|
5037
6740
|
private readonly ownsValueText;
|
|
5038
6741
|
/** 表单影子当前这批选项对应的值与文字,同一份不重建。 */
|
|
@@ -5116,20 +6819,22 @@ declare class XhSeparatorElement extends XhElement {
|
|
|
5116
6819
|
* @fires value-change - 选中变化;detail 为 `{ value: string | null }`
|
|
5117
6820
|
* @fires expanded-change - 展开集合变化;detail 为 `{ value: string[] }`
|
|
5118
6821
|
* @csspart root - nav 地标根容器(aria-label 由 translations.root 给)
|
|
5119
|
-
* @csspart list -
|
|
6822
|
+
* @csspart list - 顶层列表容器(ul),直接子节点只能是 item 与 branch
|
|
6823
|
+
* @csspart item - 叶子行的列表项(li),裹住一个 link
|
|
5120
6824
|
* @csspart group - role=group 分组,须自带 value 属性
|
|
5121
6825
|
* @csspart group-label - 分组标题(aria-labelledby 目标)
|
|
5122
6826
|
* @csspart branch - 分支行容器,须自带 value 属性;它裹着自己的 branch-content
|
|
5123
|
-
* @csspart branch-trigger - 展开/收起按钮(aria-expanded / aria-controls
|
|
5124
|
-
* @csspart branch-text -
|
|
6827
|
+
* @csspart branch-trigger - 展开/收起按钮(aria-expanded / aria-controls);落在选中路径上输出 data-in-path
|
|
6828
|
+
* @csspart branch-text - 行文字载体,折叠成图标栏时裁到看不见但仍参与播报,是按钮在图标栏里的可及名
|
|
5125
6829
|
* @csspart branch-indicator - 展开方向指示符(aria-hidden)
|
|
6830
|
+
* @csspart positioner - 折叠态弹出面板的定位层,坐标写在它身上;平铺态不用渲染
|
|
5126
6831
|
* @csspart branch-content - 内嵌子层容器,收起时隐藏
|
|
5127
|
-
* @csspart link - 去处链接,须自带 value 属性;选中输出 aria-current="page"
|
|
5128
|
-
* @csspart link-text -
|
|
6832
|
+
* @csspart link - 去处链接,须自带 value 属性;选中输出 aria-current="page" 与 data-current
|
|
6833
|
+
* @csspart link-text - 链接文字载体,折叠成图标栏时裁到看不见但仍参与播报,是链接在图标栏里的可及名
|
|
5129
6834
|
*/
|
|
5130
6835
|
declare class XhSideNavElement extends XhElement {
|
|
5131
6836
|
static partContract: {
|
|
5132
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "list" | "link" | "group" | "group-label" | "branch" | "branch-trigger" | "branch-
|
|
6837
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "list" | "link" | "positioner" | "group" | "group-label" | "branch" | "branch-trigger" | "branch-indicator" | "branch-text" | "branch-content" | "link-text">;
|
|
5133
6838
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5134
6839
|
};
|
|
5135
6840
|
static properties: {
|
|
@@ -5182,41 +6887,142 @@ declare class XhSideNavElement extends XhElement {
|
|
|
5182
6887
|
expandedValue: {
|
|
5183
6888
|
attribute: boolean;
|
|
5184
6889
|
};
|
|
5185
|
-
defaultExpandedValue: {
|
|
6890
|
+
defaultExpandedValue: {
|
|
6891
|
+
attribute: boolean;
|
|
6892
|
+
};
|
|
6893
|
+
translations: {
|
|
6894
|
+
attribute: boolean;
|
|
6895
|
+
};
|
|
6896
|
+
};
|
|
6897
|
+
value?: string;
|
|
6898
|
+
defaultValue?: string;
|
|
6899
|
+
accordion?: boolean;
|
|
6900
|
+
collapsed?: boolean;
|
|
6901
|
+
collapsedPopout?: boolean;
|
|
6902
|
+
disabled?: boolean;
|
|
6903
|
+
loop?: boolean;
|
|
6904
|
+
direction?: SideNavSchema['props']['dir'];
|
|
6905
|
+
/** 入口树,href/禁用/层级的唯一事实源,须与标记同源。 */
|
|
6906
|
+
collection?: SideNavNode[];
|
|
6907
|
+
expandedValue?: string[];
|
|
6908
|
+
defaultExpandedValue?: string[];
|
|
6909
|
+
translations?: Partial<SideNavTranslations>;
|
|
6910
|
+
private readonly notifyValue;
|
|
6911
|
+
private readonly notifyExpanded;
|
|
6912
|
+
private readonly idGen;
|
|
6913
|
+
private readonly navScope;
|
|
6914
|
+
private readonly positionEngine;
|
|
6915
|
+
private config;
|
|
6916
|
+
/** 每个弹出面板的定位层一份退场闸门:退场动画播完才真收。 */
|
|
6917
|
+
private readonly exits;
|
|
6918
|
+
private readonly ctrl;
|
|
6919
|
+
private machineProps;
|
|
6920
|
+
private ensureConfig;
|
|
6921
|
+
/** 当前弹出分支名下的角色节点:按归属分支的 value 现查。 */
|
|
6922
|
+
private findPopoutPart;
|
|
6923
|
+
private readonly registerLayer;
|
|
6924
|
+
private injectRefs;
|
|
6925
|
+
private nodeOf;
|
|
6926
|
+
disconnectedCallback(): void;
|
|
6927
|
+
protected wire(): void;
|
|
6928
|
+
}
|
|
6929
|
+
//#endregion
|
|
6930
|
+
//#region src/elements/signature-pad.d.ts
|
|
6931
|
+
/**
|
|
6932
|
+
* `<xh-signature-pad>` —— Light-DOM 行为宿主:作者写 root / control / segment 三个必需角色节点
|
|
6933
|
+
* (可再写 label、guide、clear-trigger 与 hidden-input),元素跑 signature-pad 机器并把 connect 产出打上去。
|
|
6934
|
+
*
|
|
6935
|
+
* control 必须是 `<svg>`,guide 是它里面的 `<line>`、segment 是它里面的 `<path>`:
|
|
6936
|
+
* 笔迹是一条填充轮廓,粗细随压感变,描边给不出这个效果。viewBox 由元素按第一笔落下时
|
|
6937
|
+
* 量到的画布尺寸写上去,作者不要自己写。
|
|
6938
|
+
*
|
|
6939
|
+
* 画布本身不接键盘。签名天然依赖指针,要求签名的流程必须另给一条不依赖指针的替代路径。
|
|
6940
|
+
*
|
|
6941
|
+
* 笔迹外形(drawing)与读屏文案(translations)是对象,只走 property。
|
|
6942
|
+
* 清空与取 SVG 另有 `clear()` / `toSvg()` 两个方法。
|
|
6943
|
+
*
|
|
6944
|
+
* @customElement xh-signature-pad
|
|
6945
|
+
* @attr {boolean} disabled - 整块不可交互:落笔不认,清空按钮也按不动
|
|
6946
|
+
* @attr {boolean} read-only - 只读:画好的签名照常显示,但改不动
|
|
6947
|
+
* @attr {boolean} required - 必填标注;表单影子据此参与原生校验
|
|
6948
|
+
* @attr {boolean} invalid - 校验未通过的标记,只改外观与表单影子上的 aria-invalid
|
|
6949
|
+
* @attr {string} name - 表单字段名;给了表单影子才带 name 并参与提交
|
|
6950
|
+
* @fires draw - 笔迹变了就通知一次(含清空与表单重置);detail 为 `{ paths: string[], path: string }`
|
|
6951
|
+
* @fires draw-end - 签名定稿时通知一次(抬笔、清空、表单重置);detail 为 `{ paths: string[], svg: string }`,svg 可直接落库
|
|
6952
|
+
* @csspart root - 承载 data-disabled / data-readonly / data-invalid / data-empty / data-drawing 的外壳
|
|
6953
|
+
* @csspart label - 画布标题(aria-labelledby 目标)
|
|
6954
|
+
* @csspart control - role=img 的画布,必须是 `<svg>`,指针落笔全在它身上
|
|
6955
|
+
* @csspart guide - 基准线,必须是 control 里的 `<line>`;落位由连接层按百分比给出
|
|
6956
|
+
* @csspart segment - 全部笔迹,必须是 control 里的 `<path>`;每一笔是它的一条子路径
|
|
6957
|
+
* @csspart clear-trigger - 清空按钮,必须是原生 `<button>`
|
|
6958
|
+
* @csspart status - 签没签的活区域(role=status);节点里没写字时由元素填内建文案
|
|
6959
|
+
* @csspart hidden-input - 表单影子输入(必须是原生 input),提交的是一份独立 SVG 文档
|
|
6960
|
+
*/
|
|
6961
|
+
declare class XhSignaturePadElement extends XhElement {
|
|
6962
|
+
static partContract: {
|
|
6963
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "hidden-input" | "segment" | "guide" | "status">;
|
|
6964
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6965
|
+
};
|
|
6966
|
+
static properties: {
|
|
6967
|
+
disabled: {
|
|
6968
|
+
converter: {
|
|
6969
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6970
|
+
};
|
|
6971
|
+
};
|
|
6972
|
+
readOnly: {
|
|
6973
|
+
converter: {
|
|
6974
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6975
|
+
};
|
|
6976
|
+
attribute: string;
|
|
6977
|
+
};
|
|
6978
|
+
required: {
|
|
6979
|
+
converter: {
|
|
6980
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6981
|
+
};
|
|
6982
|
+
};
|
|
6983
|
+
invalid: {
|
|
6984
|
+
converter: {
|
|
6985
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6986
|
+
};
|
|
6987
|
+
};
|
|
6988
|
+
name: {
|
|
6989
|
+
converter: {
|
|
6990
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6991
|
+
};
|
|
6992
|
+
};
|
|
6993
|
+
drawing: {
|
|
5186
6994
|
attribute: boolean;
|
|
5187
6995
|
};
|
|
5188
6996
|
translations: {
|
|
5189
6997
|
attribute: boolean;
|
|
5190
6998
|
};
|
|
5191
6999
|
};
|
|
5192
|
-
value?: string;
|
|
5193
|
-
defaultValue?: string;
|
|
5194
|
-
accordion?: boolean;
|
|
5195
|
-
collapsed?: boolean;
|
|
5196
|
-
collapsedPopout?: boolean;
|
|
5197
7000
|
disabled?: boolean;
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
private readonly
|
|
5206
|
-
private readonly notifyExpanded;
|
|
5207
|
-
private readonly idGen;
|
|
5208
|
-
private readonly navScope;
|
|
5209
|
-
private readonly positionEngine;
|
|
5210
|
-
private config;
|
|
7001
|
+
readOnly?: boolean;
|
|
7002
|
+
required?: boolean;
|
|
7003
|
+
invalid?: boolean;
|
|
7004
|
+
name?: string;
|
|
7005
|
+
drawing?: SignaturePadDrawingOptions;
|
|
7006
|
+
translations?: Partial<SignaturePadTranslations>;
|
|
7007
|
+
private readonly notifyDraw;
|
|
7008
|
+
private readonly notifyDrawEnd;
|
|
5211
7009
|
private readonly ctrl;
|
|
5212
7010
|
private machineProps;
|
|
5213
|
-
private ensureConfig;
|
|
5214
|
-
/** 当前弹出分支名下的角色节点:按归属分支的 value 现查。 */
|
|
5215
|
-
private findPopoutPart;
|
|
5216
|
-
private readonly registerLayer;
|
|
5217
7011
|
private injectRefs;
|
|
5218
|
-
|
|
5219
|
-
|
|
7012
|
+
/** 命令式入口共用的取法;机器要到进文档(hostConnected)才建,未建则抛。 */
|
|
7013
|
+
private commands;
|
|
7014
|
+
/** 抹掉全部笔迹,与点清空按钮同一条路径(照样发 draw / draw-end)。 */
|
|
7015
|
+
clear(): void;
|
|
7016
|
+
/** 当前签名的独立 SVG 文档,与表单影子提交的是同一份;空签名为空串。 */
|
|
7017
|
+
toSvg(): string;
|
|
7018
|
+
/** 一笔都没画。提交前拦空签名读它。 */
|
|
7019
|
+
get empty(): boolean;
|
|
7020
|
+
/**
|
|
7021
|
+
* 状态文本是否归元素填:节点非空即判为作者自己写了内容。
|
|
7022
|
+
* 首次见到时定死,之后不再回读——回读分不出内容是作者写的还是上一帧自己写的。
|
|
7023
|
+
*/
|
|
7024
|
+
private readonly ownsText;
|
|
7025
|
+
private fillText;
|
|
5220
7026
|
protected wire(): void;
|
|
5221
7027
|
}
|
|
5222
7028
|
//#endregion
|
|
@@ -5292,14 +7098,14 @@ declare class XhSkeletonElement extends XhElement {
|
|
|
5292
7098
|
* @csspart track - 轨道本体,值与坐标的换算以它的矩形为准
|
|
5293
7099
|
* @csspart range - 已选区间,起止由内联逻辑属性给出
|
|
5294
7100
|
* @csspart marks - 刻度容器
|
|
5295
|
-
* @csspart mark - 刻度点(纯装饰),须自带 value 属性;落进已选区间带 data-
|
|
7101
|
+
* @csspart mark - 刻度点(纯装饰),须自带 value 属性;落进已选区间带 data-passed
|
|
5296
7102
|
* @csspart mark-label - 刻度文案,须自带 value 属性;点按把最近的滑块跳到这一档
|
|
5297
7103
|
* @csspart thumb - role=slider 的拇指,键盘交互全在它身上;多滑块须写 index 属性
|
|
5298
7104
|
* @csspart hidden-input - 拇指内的表单影子(须是原生 input)
|
|
5299
7105
|
*/
|
|
5300
7106
|
declare class XhSliderElement extends XhElement {
|
|
5301
7107
|
static partContract: {
|
|
5302
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "
|
|
7108
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "hidden-input" | "track" | "range" | "thumb" | "mark" | "marks" | "mark-label">;
|
|
5303
7109
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5304
7110
|
};
|
|
5305
7111
|
static properties: {
|
|
@@ -5431,6 +7237,75 @@ declare class XhSliderElement extends XhElement {
|
|
|
5431
7237
|
protected wire(): void;
|
|
5432
7238
|
}
|
|
5433
7239
|
//#endregion
|
|
7240
|
+
//#region src/elements/space.d.ts
|
|
7241
|
+
/**
|
|
7242
|
+
* `<xh-space>` —— Light-DOM 行为宿主,无状态机,把 connectSpace 产出打到 root 角色节点。
|
|
7243
|
+
* 排布参数原样落成 data-*,排布规则写在皮肤里。
|
|
7244
|
+
*
|
|
7245
|
+
* 方向与间距恒有值:不写也留 md 间距,这是本组件与 `<xh-flex>` 的分野。
|
|
7246
|
+
*
|
|
7247
|
+
* 分隔符是一个角色节点:作者把它写在 root 里、夹在两个子项中间,元素替它打上 aria-hidden。
|
|
7248
|
+
* 本元素不生成任何结构,也就没法替作者复制节点;Vue 版的 split 插槽是同一件事的另一种写法,
|
|
7249
|
+
* 铺开后的 DOM 形状一致。
|
|
7250
|
+
*
|
|
7251
|
+
* 根上不写 role:容器只做排布,里面装的是列表还是一组按钮由作者自己声明。
|
|
7252
|
+
*
|
|
7253
|
+
* @customElement xh-space
|
|
7254
|
+
* @attr {'horizontal'|'vertical'} direction - 排布方向,缺省 horizontal
|
|
7255
|
+
* @attr {'xs'|'sm'|'md'|'lg'|'xl'} gap - 子项间距档位,缺省 md,逐档对应一个间距令牌
|
|
7256
|
+
* @attr {'start'|'center'|'end'|'stretch'|'baseline'} align - 交叉轴对齐
|
|
7257
|
+
* @attr {'start'|'center'|'end'|'between'|'around'|'evenly'} justify - 主轴分布
|
|
7258
|
+
* @attr {boolean} wrap - 一行放不下时折行
|
|
7259
|
+
* @attr {boolean} inline - 容器按行内盒排版,宽度收到内容
|
|
7260
|
+
* @csspart root - 排布容器,承载 data-orientation / data-gap / data-align / data-justify / data-wrap / data-inline
|
|
7261
|
+
* @csspart split - 夹在两个子项之间的分隔符,作者逐个写在 root 里;元素替它打上 aria-hidden
|
|
7262
|
+
*/
|
|
7263
|
+
declare class XhSpaceElement extends XhElement {
|
|
7264
|
+
static partContract: {
|
|
7265
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "split">;
|
|
7266
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7267
|
+
};
|
|
7268
|
+
static properties: {
|
|
7269
|
+
direction: {
|
|
7270
|
+
converter: {
|
|
7271
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7272
|
+
};
|
|
7273
|
+
};
|
|
7274
|
+
gap: {
|
|
7275
|
+
converter: {
|
|
7276
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7277
|
+
};
|
|
7278
|
+
};
|
|
7279
|
+
align: {
|
|
7280
|
+
converter: {
|
|
7281
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7282
|
+
};
|
|
7283
|
+
};
|
|
7284
|
+
justify: {
|
|
7285
|
+
converter: {
|
|
7286
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7287
|
+
};
|
|
7288
|
+
};
|
|
7289
|
+
wrap: {
|
|
7290
|
+
converter: {
|
|
7291
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
7292
|
+
};
|
|
7293
|
+
};
|
|
7294
|
+
inline: {
|
|
7295
|
+
converter: {
|
|
7296
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
7297
|
+
};
|
|
7298
|
+
};
|
|
7299
|
+
};
|
|
7300
|
+
direction?: SpaceProps['direction'];
|
|
7301
|
+
gap?: SpaceProps['gap'];
|
|
7302
|
+
align?: SpaceProps['align'];
|
|
7303
|
+
justify?: SpaceProps['justify'];
|
|
7304
|
+
wrap?: boolean;
|
|
7305
|
+
inline?: boolean;
|
|
7306
|
+
protected wire(): void;
|
|
7307
|
+
}
|
|
7308
|
+
//#endregion
|
|
5434
7309
|
//#region src/elements/spinner.d.ts
|
|
5435
7310
|
/**
|
|
5436
7311
|
* `<xh-spinner>` —— 加载指示器宿主,无状态机,把活区语义与可及名字打到角色节点上。
|
|
@@ -5508,7 +7383,7 @@ declare class XhSpinnerElement extends XhElement {
|
|
|
5508
7383
|
*/
|
|
5509
7384
|
declare class XhSplitterElement extends XhElement {
|
|
5510
7385
|
static partContract: {
|
|
5511
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
7386
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "resize-trigger" | "panel">;
|
|
5512
7387
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5513
7388
|
};
|
|
5514
7389
|
static properties: {
|
|
@@ -5615,7 +7490,7 @@ declare class XhSplitterElement extends XhElement {
|
|
|
5615
7490
|
*/
|
|
5616
7491
|
declare class XhStepsElement extends XhElement {
|
|
5617
7492
|
static partContract: {
|
|
5618
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
7493
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "title" | "description" | "list" | "separator">;
|
|
5619
7494
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5620
7495
|
};
|
|
5621
7496
|
static properties: {
|
|
@@ -5703,6 +7578,9 @@ declare class XhStepsElement extends XhElement {
|
|
|
5703
7578
|
* @attr {boolean} checked - 受控开合;缺省该属性即非受控
|
|
5704
7579
|
* @attr {boolean} default-checked - 非受控初始为选中
|
|
5705
7580
|
* @attr {boolean} disabled - 禁用
|
|
7581
|
+
* @attr {boolean} read-only - 只读:拨不动,但仍可聚焦、仍参与提交
|
|
7582
|
+
* @attr {boolean} invalid - 校验失败态
|
|
7583
|
+
* @attr {boolean} required - 必填
|
|
5706
7584
|
* @attr {boolean} loading - 提交中:交互挂起、滑块转圈,仍可聚焦(aria-busy)
|
|
5707
7585
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
5708
7586
|
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
@@ -5711,10 +7589,12 @@ declare class XhStepsElement extends XhElement {
|
|
|
5711
7589
|
* @csspart thumb - 滑块
|
|
5712
7590
|
* @attr {string} name - 表单字段名;给了 hidden-input 才参与提交
|
|
5713
7591
|
* @csspart hidden-input - type=hidden 的表单出口,省略该节点即不参与表单
|
|
7592
|
+
* @csspart label - 可选:包住 root 与 text 的 <label>,点文字即切换
|
|
7593
|
+
* @csspart text - 可选:控件旁的文字
|
|
5714
7594
|
*/
|
|
5715
7595
|
declare class XhSwitchElement extends XhElement {
|
|
5716
7596
|
static partContract: {
|
|
5717
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "hidden-input" | "thumb">;
|
|
7597
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "text" | "hidden-input" | "thumb">;
|
|
5718
7598
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5719
7599
|
};
|
|
5720
7600
|
static properties: {
|
|
@@ -5730,6 +7610,16 @@ declare class XhSwitchElement extends XhElement {
|
|
|
5730
7610
|
disabled: {
|
|
5731
7611
|
type: BooleanConstructor;
|
|
5732
7612
|
};
|
|
7613
|
+
readOnly: {
|
|
7614
|
+
type: BooleanConstructor;
|
|
7615
|
+
attribute: string;
|
|
7616
|
+
};
|
|
7617
|
+
invalid: {
|
|
7618
|
+
type: BooleanConstructor;
|
|
7619
|
+
};
|
|
7620
|
+
required: {
|
|
7621
|
+
type: BooleanConstructor;
|
|
7622
|
+
};
|
|
5733
7623
|
loading: {
|
|
5734
7624
|
type: BooleanConstructor;
|
|
5735
7625
|
};
|
|
@@ -5749,6 +7639,9 @@ declare class XhSwitchElement extends XhElement {
|
|
|
5749
7639
|
checked?: boolean;
|
|
5750
7640
|
defaultChecked?: boolean;
|
|
5751
7641
|
disabled?: boolean;
|
|
7642
|
+
readOnly?: boolean;
|
|
7643
|
+
invalid?: boolean;
|
|
7644
|
+
required?: boolean;
|
|
5752
7645
|
loading?: boolean;
|
|
5753
7646
|
name?: string;
|
|
5754
7647
|
value?: string;
|
|
@@ -5778,7 +7671,10 @@ declare class XhSwitchElement extends XhElement {
|
|
|
5778
7671
|
* @attr {'none'|'single'|'multiple'} selection-mode - 选择模式,默认 none(不声明就没有选择这回事)
|
|
5779
7672
|
* @attr {boolean} loading - 数据在路上:root 报 aria-busy,表体为空时加载态节点显形
|
|
5780
7673
|
* @attr {boolean} empty - 显式声明表体为空;缺省按 rows 是否为空推导,写 empty="false" 强制不空
|
|
5781
|
-
* @attr {boolean} sticky-header - 表头吸顶,只落 data-sticky
|
|
7674
|
+
* @attr {boolean} sticky-header - 表头吸顶,只落 data-sticky(布尔);列冻结另走 data-frozen
|
|
7675
|
+
* @attr {boolean} striped - 斑马纹:表体偶数行换一层浅底
|
|
7676
|
+
* @attr {boolean} borderless - 去掉外框,只留行间横线
|
|
7677
|
+
* @attr {boolean} ruled - 列与列之间加竖分隔线
|
|
5782
7678
|
* @attr {boolean} footer - 表格带脚注行:行号空间的最后一行留给它,aria-rowcount 也算上
|
|
5783
7679
|
* @attr {boolean} loop - 上下键走到首尾回绕,默认关;写 loop="true" 打开
|
|
5784
7680
|
* @attr {'ltr'|'rtl'} dir - 文字方向,只对调左右方向键的展开/收起语义,默认 ltr
|
|
@@ -5804,7 +7700,7 @@ declare class XhSwitchElement extends XhElement {
|
|
|
5804
7700
|
*/
|
|
5805
7701
|
declare class XhTableElement extends XhElement {
|
|
5806
7702
|
static partContract: {
|
|
5807
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "header" | "cell" | "empty" | "expand-trigger" | "body" | "footer" | "select-all-trigger" | "
|
|
7703
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "header" | "cell" | "empty" | "expand-trigger" | "body" | "row" | "footer" | "select-all-trigger" | "column-header" | "caption" | "row-select-trigger" | "sort-trigger" | "expanded-row" | "loading-state">;
|
|
5808
7704
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5809
7705
|
};
|
|
5810
7706
|
static properties: {
|
|
@@ -5850,6 +7746,15 @@ declare class XhTableElement extends XhElement {
|
|
|
5850
7746
|
type: BooleanConstructor;
|
|
5851
7747
|
attribute: string;
|
|
5852
7748
|
};
|
|
7749
|
+
striped: {
|
|
7750
|
+
type: BooleanConstructor;
|
|
7751
|
+
};
|
|
7752
|
+
borderless: {
|
|
7753
|
+
type: BooleanConstructor;
|
|
7754
|
+
};
|
|
7755
|
+
ruled: {
|
|
7756
|
+
type: BooleanConstructor;
|
|
7757
|
+
};
|
|
5853
7758
|
footer: {
|
|
5854
7759
|
type: BooleanConstructor;
|
|
5855
7760
|
};
|
|
@@ -5882,6 +7787,9 @@ declare class XhTableElement extends XhElement {
|
|
|
5882
7787
|
loading?: boolean;
|
|
5883
7788
|
empty?: boolean;
|
|
5884
7789
|
stickyHeader?: boolean;
|
|
7790
|
+
striped?: boolean;
|
|
7791
|
+
borderless?: boolean;
|
|
7792
|
+
ruled?: boolean;
|
|
5885
7793
|
footer?: boolean;
|
|
5886
7794
|
loop?: boolean;
|
|
5887
7795
|
direction?: Direction;
|
|
@@ -5928,7 +7836,7 @@ declare class XhTableElement extends XhElement {
|
|
|
5928
7836
|
*/
|
|
5929
7837
|
declare class XhTabsElement extends XhElement {
|
|
5930
7838
|
static partContract: {
|
|
5931
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
7839
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "list">;
|
|
5932
7840
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5933
7841
|
};
|
|
5934
7842
|
static properties: {
|
|
@@ -6004,6 +7912,85 @@ declare class XhTabsElement extends XhElement {
|
|
|
6004
7912
|
protected wire(): void;
|
|
6005
7913
|
}
|
|
6006
7914
|
//#endregion
|
|
7915
|
+
//#region src/elements/tag.d.ts
|
|
7916
|
+
/**
|
|
7917
|
+
* `<xh-tag>` —— Light-DOM 行为宿主:作者写 root、label、close-trigger 角色节点,
|
|
7918
|
+
* 元素跑 tag 机器并把 connect 产出打上去。关闭钮须是原生 `<button>`
|
|
7919
|
+
* (Enter/Space 的激活由平台负责),收起时用内联 style.display 隐藏 root。
|
|
7920
|
+
*
|
|
7921
|
+
* @customElement xh-tag
|
|
7922
|
+
* @attr {'solid'|'subtle'|'outline'} variant - 形态,决定颜色怎么用
|
|
7923
|
+
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气,决定用哪族颜色
|
|
7924
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
7925
|
+
* @attr {boolean} closable - 是否给出关闭钮,缺省为假;为假时该钮同时被禁用与收起
|
|
7926
|
+
* @attr {boolean} disabled - 标签禁用,关闭钮留在原地但按不动
|
|
7927
|
+
* @attr {boolean} open - 受控显隐;缺省该属性即非受控
|
|
7928
|
+
* @attr {boolean} default-open - 非受控初始显隐,缺省为显示
|
|
7929
|
+
* @fires open-change - open 状态变化;detail 为 `{ open: boolean }`
|
|
7930
|
+
* @csspart root - 标签根容器
|
|
7931
|
+
* @csspart label - 标签文字
|
|
7932
|
+
* @csspart close-trigger - 关闭钮,须是原生 `<button>`
|
|
7933
|
+
*/
|
|
7934
|
+
declare class XhTagElement extends XhElement {
|
|
7935
|
+
static partContract: {
|
|
7936
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "close-trigger" | "label">;
|
|
7937
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7938
|
+
};
|
|
7939
|
+
static properties: {
|
|
7940
|
+
variant: {
|
|
7941
|
+
converter: {
|
|
7942
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7943
|
+
};
|
|
7944
|
+
};
|
|
7945
|
+
tone: {
|
|
7946
|
+
converter: {
|
|
7947
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7948
|
+
};
|
|
7949
|
+
};
|
|
7950
|
+
size: {
|
|
7951
|
+
converter: {
|
|
7952
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7953
|
+
};
|
|
7954
|
+
};
|
|
7955
|
+
closable: {
|
|
7956
|
+
converter: {
|
|
7957
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
7958
|
+
};
|
|
7959
|
+
};
|
|
7960
|
+
disabled: {
|
|
7961
|
+
converter: {
|
|
7962
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
7963
|
+
};
|
|
7964
|
+
};
|
|
7965
|
+
open: {
|
|
7966
|
+
converter: {
|
|
7967
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
7968
|
+
};
|
|
7969
|
+
};
|
|
7970
|
+
defaultOpen: {
|
|
7971
|
+
converter: {
|
|
7972
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
7973
|
+
};
|
|
7974
|
+
attribute: string;
|
|
7975
|
+
};
|
|
7976
|
+
translations: {
|
|
7977
|
+
attribute: boolean;
|
|
7978
|
+
};
|
|
7979
|
+
};
|
|
7980
|
+
variant?: TagVariant;
|
|
7981
|
+
tone?: Tone;
|
|
7982
|
+
size?: Size;
|
|
7983
|
+
closable?: boolean;
|
|
7984
|
+
disabled?: boolean;
|
|
7985
|
+
open?: boolean;
|
|
7986
|
+
defaultOpen?: boolean;
|
|
7987
|
+
translations?: TagSchema['props']['translations'];
|
|
7988
|
+
private readonly notify;
|
|
7989
|
+
private readonly ctrl;
|
|
7990
|
+
private machineProps;
|
|
7991
|
+
protected wire(): void;
|
|
7992
|
+
}
|
|
7993
|
+
//#endregion
|
|
6007
7994
|
//#region src/elements/tags-input.d.ts
|
|
6008
7995
|
/**
|
|
6009
7996
|
* `<xh-tags-input>` —— Light-DOM 行为宿主:作者写 root/label/control/input/item 一族与
|
|
@@ -6045,12 +8032,12 @@ declare class XhTabsElement extends XhElement {
|
|
|
6045
8032
|
* @csspart item-text - 标签文本
|
|
6046
8033
|
* @csspart item-delete-trigger - 删除按钮,须是原生 `<button>`;不占 Tab 位,自带 aria-label
|
|
6047
8034
|
* @csspart item-input - 就地编辑框,须是原生 `<input>`;不编辑时收起
|
|
6048
|
-
* @csspart clear-trigger -
|
|
8035
|
+
* @csspart clear-trigger - 清空按钮;没东西可清时收起(hidden)
|
|
6049
8036
|
* @csspart hidden-input - type=hidden 的表单出口,值是按 delimiter 拼好的整串
|
|
6050
8037
|
*/
|
|
6051
8038
|
declare class XhTagsInputElement extends XhElement {
|
|
6052
8039
|
static partContract: {
|
|
6053
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "
|
|
8040
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "control" | "clear-trigger" | "item-text" | "input" | "hidden-input" | "item-delete-trigger" | "item-preview" | "item-input">;
|
|
6054
8041
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6055
8042
|
};
|
|
6056
8043
|
static properties: {
|
|
@@ -6201,6 +8188,7 @@ declare class XhTagsInputElement extends XhElement {
|
|
|
6201
8188
|
* @customElement xh-text-field
|
|
6202
8189
|
* @attr {string} value - 受控值;缺省该属性即非受控
|
|
6203
8190
|
* @attr {string} default-value - 非受控初值
|
|
8191
|
+
* @attr {'text'|'password'|'email'|'tel'|'url'|'search'} type - 单行输入类型,缺省 text;宿主写成 textarea 时该属性不发
|
|
6204
8192
|
* @attr {string} placeholder - 占位文案
|
|
6205
8193
|
* @attr {boolean} disabled - 禁用:不可聚焦、写不进
|
|
6206
8194
|
* @attr {boolean} read-only - 只读:仍可聚焦与复制,写不进
|
|
@@ -6208,20 +8196,22 @@ declare class XhTagsInputElement extends XhElement {
|
|
|
6208
8196
|
* @attr {boolean} invalid - 校验失败标注
|
|
6209
8197
|
* @attr {string} name - 表单字段名;给了才参与提交
|
|
6210
8198
|
* @attr {number} max-length - 字符数上限;同时落成原生 maxlength 与机器侧截断
|
|
6211
|
-
* @attr {boolean} clearable -
|
|
8199
|
+
* @attr {boolean} clearable - 开启清空:有值时清空按钮显出,Escape 接管
|
|
6212
8200
|
* @attr {boolean} auto-size - 多行宿主(input 部件写成 textarea)的自动高度;行数界限对象经 autoSize property 赋
|
|
6213
8201
|
* @attr {'outline'|'subtle'|'ghost'} variant - 视觉变体
|
|
6214
8202
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
6215
8203
|
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
8204
|
+
* @prop {object} translations - 读屏文案(只走 property):clearTrigger 是清空按钮的名字
|
|
6216
8205
|
* @fires value-change - 值变化;detail 为 `{ value: string }`
|
|
6217
8206
|
* @csspart root - 承载 data-disabled / data-readonly / data-invalid / data-empty / data-at-limit 的容器
|
|
8207
|
+
* @csspart control - 视觉盒;写了它就由它画描边、底色与聚焦环,输入框与清空按钮排在它里面
|
|
6218
8208
|
* @csspart label - 标题;`for` 恒写向 input,故须是原生 `<label>` 才点得动
|
|
6219
8209
|
* @csspart input - 真正的输入框,须是原生 `<input>`;键盘交互全在它身上
|
|
6220
|
-
* @csspart clear-trigger -
|
|
8210
|
+
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab 位,名字取 translations.clearTrigger;清不了时收起
|
|
6221
8211
|
*/
|
|
6222
8212
|
declare class XhTextFieldElement extends XhElement {
|
|
6223
8213
|
static partContract: {
|
|
6224
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "
|
|
8214
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "input">;
|
|
6225
8215
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6226
8216
|
};
|
|
6227
8217
|
static properties: {
|
|
@@ -6236,6 +8226,11 @@ declare class XhTextFieldElement extends XhElement {
|
|
|
6236
8226
|
};
|
|
6237
8227
|
attribute: string;
|
|
6238
8228
|
};
|
|
8229
|
+
type: {
|
|
8230
|
+
converter: {
|
|
8231
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
8232
|
+
};
|
|
8233
|
+
};
|
|
6239
8234
|
placeholder: {
|
|
6240
8235
|
converter: {
|
|
6241
8236
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -6299,9 +8294,13 @@ declare class XhTextFieldElement extends XhElement {
|
|
|
6299
8294
|
fromAttribute: (v: string | null) => string | undefined;
|
|
6300
8295
|
};
|
|
6301
8296
|
};
|
|
8297
|
+
translations: {
|
|
8298
|
+
attribute: boolean;
|
|
8299
|
+
};
|
|
6302
8300
|
};
|
|
6303
8301
|
value?: string;
|
|
6304
8302
|
defaultValue?: string;
|
|
8303
|
+
type?: TextFieldType;
|
|
6305
8304
|
placeholder?: string;
|
|
6306
8305
|
disabled?: boolean;
|
|
6307
8306
|
readOnly?: boolean;
|
|
@@ -6315,6 +8314,7 @@ declare class XhTextFieldElement extends XhElement {
|
|
|
6315
8314
|
variant?: ControlVariant;
|
|
6316
8315
|
tone?: Tone;
|
|
6317
8316
|
size?: Size;
|
|
8317
|
+
translations?: TextFieldSchema['props']['translations'];
|
|
6318
8318
|
private readonly notify;
|
|
6319
8319
|
private readonly ctrl;
|
|
6320
8320
|
private machineProps;
|
|
@@ -6338,7 +8338,7 @@ declare class XhTextFieldElement extends XhElement {
|
|
|
6338
8338
|
*/
|
|
6339
8339
|
declare class XhThreadElement extends XhElement {
|
|
6340
8340
|
static partContract: {
|
|
6341
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
8341
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "viewport" | "content" | "scroll-button" | "live-region">;
|
|
6342
8342
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6343
8343
|
};
|
|
6344
8344
|
static properties: {
|
|
@@ -6374,7 +8374,7 @@ declare class XhThreadElement extends XhElement {
|
|
|
6374
8374
|
//#endregion
|
|
6375
8375
|
//#region src/elements/time-field.d.ts
|
|
6376
8376
|
/**
|
|
6377
|
-
* `<xh-time-field>` —— Light-DOM 行为宿主:作者写 root/label/control/segment(多个)/hidden-input
|
|
8377
|
+
* `<xh-time-field>` —— Light-DOM 行为宿主:作者写 root/label/control/segment(多个)/clear-trigger/hidden-input
|
|
6378
8378
|
* 角色节点,元素跑 time-field 机器并把 connect 产出打上去。
|
|
6379
8379
|
*
|
|
6380
8380
|
* 每一段是一个 role=spinbutton 的展示节点:上下键加减、左右键换段、数字直输并自动跳段、
|
|
@@ -6404,12 +8404,14 @@ declare class XhThreadElement extends XhElement {
|
|
|
6404
8404
|
* @csspart root - 承载 data-disabled / data-readonly / data-invalid / data-empty / data-out-of-range 的容器
|
|
6405
8405
|
* @csspart label - 标题;点它会把焦点送到第一段
|
|
6406
8406
|
* @csspart control - role=group 的段容器,由 label 命名
|
|
8407
|
+
* @csspart segment-group - 段位与分隔符的外壳,占满盒里剩下的宽度
|
|
6407
8408
|
* @csspart segment - 一段一个的 spinbutton,可自带 segment 属性声明身份,缺省按文档序
|
|
8409
|
+
* @csspart clear-trigger - 一键清空全部段的按钮;没值或改不动时收起,不占 Tab 位,点完焦点回到第一段
|
|
6408
8410
|
* @csspart hidden-input - type=hidden 的表单出口,值是完整 ISO 串
|
|
6409
8411
|
*/
|
|
6410
8412
|
declare class XhTimeFieldElement extends XhElement {
|
|
6411
8413
|
static partContract: {
|
|
6412
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "hidden-input" | "
|
|
8414
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "control" | "clear-trigger" | "hidden-input" | "segment-group" | "segment">;
|
|
6413
8415
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6414
8416
|
};
|
|
6415
8417
|
static properties: {
|
|
@@ -6466,6 +8468,9 @@ declare class XhTimeFieldElement extends XhElement {
|
|
|
6466
8468
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6467
8469
|
};
|
|
6468
8470
|
};
|
|
8471
|
+
translations: {
|
|
8472
|
+
attribute: boolean;
|
|
8473
|
+
};
|
|
6469
8474
|
required: {
|
|
6470
8475
|
converter: {
|
|
6471
8476
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
@@ -6507,6 +8512,7 @@ declare class XhTimeFieldElement extends XhElement {
|
|
|
6507
8512
|
disabled?: boolean;
|
|
6508
8513
|
readOnly?: boolean;
|
|
6509
8514
|
invalid?: boolean;
|
|
8515
|
+
translations?: TimeFieldSchema['props']['translations'];
|
|
6510
8516
|
required?: boolean;
|
|
6511
8517
|
name?: string;
|
|
6512
8518
|
placeholder?: string;
|
|
@@ -6549,11 +8555,15 @@ declare class XhTimeFieldElement extends XhElement {
|
|
|
6549
8555
|
* @attr {'12'|'24'} hour-cycle - 小时制;不写则按 locale 推断,再没有就用 24
|
|
6550
8556
|
* @attr {'hour'|'minute'|'second'} granularity - 值精确到哪一段,默认 minute
|
|
6551
8557
|
* @attr {number} step - 分列的步进(分钟),默认 1
|
|
8558
|
+
* @prop {TimePickerPreset[]} presets - 快捷选项(数组只走 property):给了就在浮层里多出一列
|
|
6552
8559
|
* @attr {boolean} disabled - 禁用:段整组退出 Tab 序列,触发器用原生 disabled,隐藏输入不参与提交
|
|
6553
8560
|
* @attr {boolean} read-only - 只读:浮层照常展开与浏览,但值改不动也清不掉
|
|
6554
8561
|
* @attr {boolean} invalid - 校验失败标注
|
|
6555
8562
|
* @attr {boolean} required - 必填标注,落到每段的 aria-required 上
|
|
6556
8563
|
* @attr {string} name - 表单字段名;给了隐藏输入才带 name
|
|
8564
|
+
* @attr {'outline'|'subtle'|'ghost'} variant - 视觉变体
|
|
8565
|
+
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
8566
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
6557
8567
|
* @attr {string} placement - 首选放置位,默认 bottom-start;避让后的实际位写在 data-placement 上
|
|
6558
8568
|
* @attr {number} offset - 浮层与锚点的间距(px)
|
|
6559
8569
|
* @fires value-change - 值变化;detail 为 `{ value: string }`
|
|
@@ -6561,18 +8571,21 @@ declare class XhTimeFieldElement extends XhElement {
|
|
|
6561
8571
|
* @csspart root - 组件根容器(承载 data-state/data-disabled/data-readonly/data-invalid/data-empty)
|
|
6562
8572
|
* @csspart label - 标题;点它会把焦点送到第一段
|
|
6563
8573
|
* @csspart control - role=group 的输入行,同时是浮层的定位锚点
|
|
8574
|
+
* @csspart segment-group - 段位与分隔符的外壳,占满盒里剩下的宽度
|
|
6564
8575
|
* @csspart input - 一段一个的 spinbutton,可自带 segment 属性声明身份,缺省按文档序
|
|
6565
8576
|
* @csspart trigger - 展开/收起按钮,须是原生 button
|
|
6566
|
-
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab
|
|
8577
|
+
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab 位,可及名走 translations.clearTrigger;没值即收起
|
|
6567
8578
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
6568
8579
|
* @csspart content - 浮层容器(消解层与焦点域的根节点),收起时带 hidden
|
|
8580
|
+
* @csspart presets - 快捷选项列(role=listbox);没给 presets 时带 hidden
|
|
8581
|
+
* @csspart preset - 一条快捷选项(role=option),须自带 value 属性(与 presets 数据里的 value 逐字对上)
|
|
6569
8582
|
* @csspart column - role=listbox 的一列,可自带 unit 属性声明单位,缺省按文档序
|
|
6570
|
-
* @csspart item - role=option 的一格,须自带 value
|
|
8583
|
+
* @csspart item - role=option 的一格,须自带 value 属性(两位补零的显示串;上下午列写 '00' / '01')
|
|
6571
8584
|
* @csspart hidden-input - type=hidden 的表单出口,值是完整 ISO 串
|
|
6572
8585
|
*/
|
|
6573
8586
|
declare class XhTimePickerElement extends XhElement {
|
|
6574
8587
|
static partContract: {
|
|
6575
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "
|
|
8588
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "label" | "control" | "positioner" | "clear-trigger" | "input" | "column" | "hidden-input" | "segment-group" | "preset" | "presets">;
|
|
6576
8589
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6577
8590
|
};
|
|
6578
8591
|
static properties: {
|
|
@@ -6627,6 +8640,9 @@ declare class XhTimePickerElement extends XhElement {
|
|
|
6627
8640
|
fromAttribute: (v: string | null) => number | undefined;
|
|
6628
8641
|
};
|
|
6629
8642
|
};
|
|
8643
|
+
presets: {
|
|
8644
|
+
attribute: boolean;
|
|
8645
|
+
};
|
|
6630
8646
|
disabled: {
|
|
6631
8647
|
converter: {
|
|
6632
8648
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
@@ -6643,6 +8659,12 @@ declare class XhTimePickerElement extends XhElement {
|
|
|
6643
8659
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6644
8660
|
};
|
|
6645
8661
|
};
|
|
8662
|
+
translations: {
|
|
8663
|
+
attribute: boolean;
|
|
8664
|
+
};
|
|
8665
|
+
isTimeUnavailable: {
|
|
8666
|
+
attribute: boolean;
|
|
8667
|
+
};
|
|
6646
8668
|
required: {
|
|
6647
8669
|
converter: {
|
|
6648
8670
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
@@ -6653,6 +8675,21 @@ declare class XhTimePickerElement extends XhElement {
|
|
|
6653
8675
|
fromAttribute: (v: string | null) => string | undefined;
|
|
6654
8676
|
};
|
|
6655
8677
|
};
|
|
8678
|
+
variant: {
|
|
8679
|
+
converter: {
|
|
8680
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
8681
|
+
};
|
|
8682
|
+
};
|
|
8683
|
+
tone: {
|
|
8684
|
+
converter: {
|
|
8685
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
8686
|
+
};
|
|
8687
|
+
};
|
|
8688
|
+
size: {
|
|
8689
|
+
converter: {
|
|
8690
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
8691
|
+
};
|
|
8692
|
+
};
|
|
6656
8693
|
placement: {
|
|
6657
8694
|
converter: {
|
|
6658
8695
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -6674,17 +8711,25 @@ declare class XhTimePickerElement extends XhElement {
|
|
|
6674
8711
|
hourCycle?: TimeHourCycle;
|
|
6675
8712
|
granularity?: TimeGranularity;
|
|
6676
8713
|
step?: number;
|
|
8714
|
+
presets?: TimePickerPreset[];
|
|
6677
8715
|
disabled?: boolean;
|
|
6678
8716
|
readOnly?: boolean;
|
|
6679
8717
|
invalid?: boolean;
|
|
8718
|
+
translations?: TimePickerSchema['props']['translations'];
|
|
8719
|
+
isTimeUnavailable?: TimePickerSchema['props']['isTimeUnavailable'];
|
|
6680
8720
|
required?: boolean;
|
|
6681
8721
|
name?: string;
|
|
8722
|
+
variant?: ControlVariant;
|
|
8723
|
+
tone?: Tone;
|
|
8724
|
+
size?: Size;
|
|
6682
8725
|
placement?: Placement;
|
|
6683
8726
|
offset?: number;
|
|
6684
8727
|
private readonly idGen;
|
|
6685
8728
|
private readonly pickerScope;
|
|
6686
8729
|
private readonly positionEngine;
|
|
6687
8730
|
private config;
|
|
8731
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
8732
|
+
private exit;
|
|
6688
8733
|
private readonly notifyValue;
|
|
6689
8734
|
private readonly notifyOpen;
|
|
6690
8735
|
private readonly ctrl;
|
|
@@ -6702,6 +8747,100 @@ declare class XhTimePickerElement extends XhElement {
|
|
|
6702
8747
|
disconnectedCallback(): void;
|
|
6703
8748
|
}
|
|
6704
8749
|
//#endregion
|
|
8750
|
+
//#region src/elements/timer.d.ts
|
|
8751
|
+
/**
|
|
8752
|
+
* `<xh-timer>` —— Light-DOM 行为宿主:作者写 root、area、若干 item 与 separator,
|
|
8753
|
+
* 需要起停就再写一个 control。元素跑 timer 机器,把 connect 产出打到角色节点上,
|
|
8754
|
+
* 并把每一段的数字写进对应的 item。
|
|
8755
|
+
*
|
|
8756
|
+
* 时间只从单调时钟的两个时刻相减而来,一拍都不累加;`interval` 只决定数字多久跳一次,
|
|
8757
|
+
* 到点另有一个精确落在终点上的定时器判定,终点不落在整拍上也不会走过头。
|
|
8758
|
+
*
|
|
8759
|
+
* 每个 item 用 `unit` 属性声明自己是哪一段(days / hours / minutes / seconds / milliseconds)。
|
|
8760
|
+
* 它是作者的声明、不是机器写回的状态,改它本身不会另排一次接线——停着时改完要等下一次
|
|
8761
|
+
* 属性变更或起跑才生效。
|
|
8762
|
+
*
|
|
8763
|
+
* control 里的文字归作者写(多半是个图标),元素只按当前状态换它的 `data-action` 与读屏名字。
|
|
8764
|
+
*
|
|
8765
|
+
* @customElement xh-timer
|
|
8766
|
+
* @attr {number} start-ms - 起始值毫秒,缺省 0;正着走从它往上,倒着走从它往下
|
|
8767
|
+
* @attr {number} target-ms - 终点值毫秒;倒计时缺省 0,正计时不写即没有终点
|
|
8768
|
+
* @attr {boolean} countdown - 倒着走,缺省关闭
|
|
8769
|
+
* @attr {boolean} auto-start - 挂载即开跑,缺省关闭;只在挂载那一刻读一次
|
|
8770
|
+
* @attr {number} interval - 刷新间隔毫秒,缺省 1000,下限一帧
|
|
8771
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
8772
|
+
* @fires tick - 走过一拍;detail 为 `{ value: number, elapsed: number }`
|
|
8773
|
+
* @fires complete - 走到终点;detail 为 `{ value: number, elapsed: number }`
|
|
8774
|
+
* @csspart root - 组件根容器(承载 data-state / data-size / data-countdown)
|
|
8775
|
+
* @csspart area - 时间区,role=timer 并带着整段时间的读屏名字
|
|
8776
|
+
* @csspart item - 一段数字,须自带 unit 属性说明它是哪一段;文字归元素写
|
|
8777
|
+
* @csspart separator - 段与段之间的记号,对读屏隐藏
|
|
8778
|
+
* @csspart control - 起停按钮,须是原生 `<button>`;按当前状态换 data-action
|
|
8779
|
+
*/
|
|
8780
|
+
declare class XhTimerElement extends XhElement {
|
|
8781
|
+
static partContract: {
|
|
8782
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "separator" | "control" | "area">;
|
|
8783
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
8784
|
+
};
|
|
8785
|
+
static properties: {
|
|
8786
|
+
startMs: {
|
|
8787
|
+
converter: {
|
|
8788
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
8789
|
+
};
|
|
8790
|
+
attribute: string;
|
|
8791
|
+
};
|
|
8792
|
+
targetMs: {
|
|
8793
|
+
converter: {
|
|
8794
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
8795
|
+
};
|
|
8796
|
+
attribute: string;
|
|
8797
|
+
};
|
|
8798
|
+
countdown: {
|
|
8799
|
+
converter: {
|
|
8800
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
8801
|
+
};
|
|
8802
|
+
};
|
|
8803
|
+
autoStart: {
|
|
8804
|
+
converter: {
|
|
8805
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
8806
|
+
};
|
|
8807
|
+
attribute: string;
|
|
8808
|
+
};
|
|
8809
|
+
interval: {
|
|
8810
|
+
converter: {
|
|
8811
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
8812
|
+
};
|
|
8813
|
+
};
|
|
8814
|
+
size: {
|
|
8815
|
+
converter: {
|
|
8816
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
8817
|
+
};
|
|
8818
|
+
};
|
|
8819
|
+
translations: {
|
|
8820
|
+
attribute: boolean;
|
|
8821
|
+
};
|
|
8822
|
+
};
|
|
8823
|
+
startMs?: number;
|
|
8824
|
+
targetMs?: number;
|
|
8825
|
+
countdown?: boolean;
|
|
8826
|
+
autoStart?: boolean;
|
|
8827
|
+
interval?: number;
|
|
8828
|
+
size?: Size;
|
|
8829
|
+
translations?: TimerSchema['props']['translations'];
|
|
8830
|
+
private readonly notifyTick;
|
|
8831
|
+
private readonly notifyComplete;
|
|
8832
|
+
private readonly ctrl;
|
|
8833
|
+
private machineProps;
|
|
8834
|
+
/** 没进 DOM 时机器还没起来,此刻谈不上起停,送过去只会被丢弃并在开发期报一声。 */
|
|
8835
|
+
private run;
|
|
8836
|
+
/** 起停四个动作也给到元素上,作者不必自己去点那个按钮。 */
|
|
8837
|
+
start(): void;
|
|
8838
|
+
pause(): void;
|
|
8839
|
+
resume(): void;
|
|
8840
|
+
reset(): void;
|
|
8841
|
+
protected wire(): void;
|
|
8842
|
+
}
|
|
8843
|
+
//#endregion
|
|
6705
8844
|
//#region src/elements/toast.d.ts
|
|
6706
8845
|
/**
|
|
6707
8846
|
* `<xh-toast>` —— Light-DOM 行为宿主:作者写 root/title/description/action-trigger/close-trigger
|
|
@@ -7185,9 +9324,11 @@ declare class XhToolbarElement extends XhElement {
|
|
|
7185
9324
|
*/
|
|
7186
9325
|
declare class XhTooltipElement extends XhElement {
|
|
7187
9326
|
static partContract: {
|
|
7188
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"
|
|
9327
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"content" | "trigger" | "positioner" | "arrow">;
|
|
7189
9328
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7190
9329
|
};
|
|
9330
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
9331
|
+
private exit;
|
|
7191
9332
|
static properties: {
|
|
7192
9333
|
open: {
|
|
7193
9334
|
converter: {
|
|
@@ -7244,9 +9385,13 @@ declare class XhTooltipElement extends XhElement {
|
|
|
7244
9385
|
tone?: Tone;
|
|
7245
9386
|
size?: Size;
|
|
7246
9387
|
private engine;
|
|
9388
|
+
/** 消解层与退场闸门共用一份环境包。 */
|
|
9389
|
+
private config;
|
|
7247
9390
|
private readonly notify;
|
|
7248
9391
|
private readonly ctrl;
|
|
7249
9392
|
private machineProps;
|
|
9393
|
+
private ensureConfig;
|
|
9394
|
+
private readonly registerLayer;
|
|
7250
9395
|
private injectRefs;
|
|
7251
9396
|
/**
|
|
7252
9397
|
* 机器在 hostConnected 就挂载,初始即展开(open / default-open)时定位效应当场执行;
|
|
@@ -7255,6 +9400,7 @@ declare class XhTooltipElement extends XhElement {
|
|
|
7255
9400
|
*/
|
|
7256
9401
|
connectedCallback(): void;
|
|
7257
9402
|
protected wire(): void;
|
|
9403
|
+
disconnectedCallback(): void;
|
|
7258
9404
|
}
|
|
7259
9405
|
//#endregion
|
|
7260
9406
|
//#region src/elements/tour.d.ts
|
|
@@ -7387,6 +9533,8 @@ declare class XhTourElement extends XhElement {
|
|
|
7387
9533
|
private config;
|
|
7388
9534
|
private contentNode;
|
|
7389
9535
|
private backdropNode;
|
|
9536
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,气泡的退场动画播完才真收。 */
|
|
9537
|
+
private exit;
|
|
7390
9538
|
/** 哪些文本节点归元素填:作者自己写了内容的一概不碰。 */
|
|
7391
9539
|
private readonly ownsText;
|
|
7392
9540
|
private readonly emit;
|
|
@@ -7434,7 +9582,7 @@ declare class XhTourElement extends XhElement {
|
|
|
7434
9582
|
* 导航与勾选在事件那一刻按 data-scope+data-part 查活 DOM,依赖 connect 回写的 data-value,
|
|
7435
9583
|
* 因此 wire 必须先于交互跑过(基类 updated 已保证)。
|
|
7436
9584
|
*
|
|
7437
|
-
* 集合类输入(collection / value /
|
|
9585
|
+
* 集合类输入(collection / value / selection / filter)都表达不成属性,只能走 property:
|
|
7438
9586
|
* `el.collection = [...]`、`el.value = ['a']`。
|
|
7439
9587
|
*
|
|
7440
9588
|
* @customElement xh-transfer
|
|
@@ -7444,7 +9592,7 @@ declare class XhTourElement extends XhElement {
|
|
|
7444
9592
|
* @attr {boolean} loop - 列表内方向键走到尽头回绕,默认 true;写 loop="false" 关掉
|
|
7445
9593
|
* @attr {'ltr'|'rtl'} dir - 文字方向,决定列表内哪个横向方向键是"搬向对面",默认 ltr
|
|
7446
9594
|
* @fires value-change - 落在右侧的值变化;detail 为 `{ value: string[] }`
|
|
7447
|
-
* @fires selection-change - 勾选集合变化;detail 为 `{
|
|
9595
|
+
* @fires selection-change - 勾选集合变化;detail 为 `{ value: string[] }`
|
|
7448
9596
|
* @csspart root - 组件根容器(承载 data-disabled/data-one-way)
|
|
7449
9597
|
* @csspart source-panel - 左侧面板容器,其内的角色节点一律归左侧
|
|
7450
9598
|
* @csspart target-panel - 右侧面板容器,其内的角色节点一律归右侧
|
|
@@ -7462,7 +9610,7 @@ declare class XhTourElement extends XhElement {
|
|
|
7462
9610
|
*/
|
|
7463
9611
|
declare class XhTransferElement extends XhElement {
|
|
7464
9612
|
static partContract: {
|
|
7465
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "list" | "item-text" | "select-all-trigger" | "source-panel" | "target-panel" | "panel-header" | "panel-title" | "panel-count" | "search" | "
|
|
9613
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "list" | "item-text" | "select-all-trigger" | "item-checkbox" | "source-panel" | "target-panel" | "panel-header" | "panel-title" | "panel-count" | "search" | "to-target-trigger" | "to-source-trigger">;
|
|
7466
9614
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7467
9615
|
};
|
|
7468
9616
|
static properties: {
|
|
@@ -7475,10 +9623,10 @@ declare class XhTransferElement extends XhElement {
|
|
|
7475
9623
|
defaultValue: {
|
|
7476
9624
|
attribute: boolean;
|
|
7477
9625
|
};
|
|
7478
|
-
|
|
9626
|
+
selection: {
|
|
7479
9627
|
attribute: boolean;
|
|
7480
9628
|
};
|
|
7481
|
-
|
|
9629
|
+
defaultSelection: {
|
|
7482
9630
|
attribute: boolean;
|
|
7483
9631
|
};
|
|
7484
9632
|
filter: {
|
|
@@ -7509,8 +9657,8 @@ declare class XhTransferElement extends XhElement {
|
|
|
7509
9657
|
collection?: TransferItem[];
|
|
7510
9658
|
value?: string[];
|
|
7511
9659
|
defaultValue?: string[];
|
|
7512
|
-
|
|
7513
|
-
|
|
9660
|
+
selection?: string[];
|
|
9661
|
+
defaultSelection?: string[];
|
|
7514
9662
|
filter?: TransferFilter;
|
|
7515
9663
|
searchable?: boolean;
|
|
7516
9664
|
disabled?: boolean;
|
|
@@ -7518,7 +9666,7 @@ declare class XhTransferElement extends XhElement {
|
|
|
7518
9666
|
loop?: boolean;
|
|
7519
9667
|
direction?: Direction;
|
|
7520
9668
|
private readonly notifyValue;
|
|
7521
|
-
private readonly
|
|
9669
|
+
private readonly notifySelection;
|
|
7522
9670
|
private readonly ctrl;
|
|
7523
9671
|
private machineProps;
|
|
7524
9672
|
/**
|
|
@@ -7558,8 +9706,10 @@ declare class XhTransferElement extends XhElement {
|
|
|
7558
9706
|
* @csspart tree - role=tree 容器,键盘在此收口,也是 roving tabindex 的兜底位
|
|
7559
9707
|
* @csspart item - role=treeitem 叶子,须自带 value 属性标识身份
|
|
7560
9708
|
* @csspart item-text - 叶子文本
|
|
9709
|
+
* @csspart item-checkbox - 叶子的勾选把手,点它只勾选、不触发点行;可选
|
|
7561
9710
|
* @csspart item-indicator - 叶子选中标记(aria-hidden)
|
|
7562
9711
|
* @csspart branch - role=treeitem 分支,须自带 value 属性;它裹着自己的 branch-content
|
|
9712
|
+
* @csspart branch-checkbox - 分支的勾选把手,点它只勾选、不展开这一枝;可选
|
|
7563
9713
|
* @csspart branch-control - 分支可点行(选中 + 按 expand-on-click 切换展开)
|
|
7564
9714
|
* @csspart branch-trigger - 展开箭头(aria-hidden 且不占 Tab 位,只切换展开态)
|
|
7565
9715
|
* @csspart branch-indicator - 展开方向指示符(aria-hidden)
|
|
@@ -7568,7 +9718,7 @@ declare class XhTransferElement extends XhElement {
|
|
|
7568
9718
|
*/
|
|
7569
9719
|
declare class XhTreeElement extends XhElement {
|
|
7570
9720
|
static partContract: {
|
|
7571
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "item-text" | "item-indicator" | "branch" | "branch-
|
|
9721
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "item-text" | "item-indicator" | "tree" | "branch" | "branch-control" | "branch-trigger" | "branch-indicator" | "branch-text" | "branch-content" | "item-checkbox" | "branch-checkbox">;
|
|
7572
9722
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7573
9723
|
};
|
|
7574
9724
|
static properties: {
|
|
@@ -7581,10 +9731,10 @@ declare class XhTreeElement extends XhElement {
|
|
|
7581
9731
|
defaultExpandedValue: {
|
|
7582
9732
|
attribute: boolean;
|
|
7583
9733
|
};
|
|
7584
|
-
|
|
9734
|
+
selection: {
|
|
7585
9735
|
attribute: boolean;
|
|
7586
9736
|
};
|
|
7587
|
-
|
|
9737
|
+
defaultSelection: {
|
|
7588
9738
|
attribute: boolean;
|
|
7589
9739
|
};
|
|
7590
9740
|
selectionMode: {
|
|
@@ -7631,8 +9781,8 @@ declare class XhTreeElement extends XhElement {
|
|
|
7631
9781
|
collection?: TreeNode[];
|
|
7632
9782
|
expandedValue?: string[];
|
|
7633
9783
|
defaultExpandedValue?: string[];
|
|
7634
|
-
|
|
7635
|
-
|
|
9784
|
+
selection?: string[];
|
|
9785
|
+
defaultSelection?: string[];
|
|
7636
9786
|
selectionMode?: TreeSelectionMode;
|
|
7637
9787
|
cascade?: boolean;
|
|
7638
9788
|
checkedStrategy?: TreeSchema['props']['checkedStrategy'];
|
|
@@ -7701,10 +9851,11 @@ declare class XhTreeElement extends XhElement {
|
|
|
7701
9851
|
* @fires open-change - open 状态变化;detail 为 `{ open: boolean }`
|
|
7702
9852
|
* @csspart root - 组件根容器(承载 data-state/data-disabled/data-readonly/data-invalid)
|
|
7703
9853
|
* @csspart label - 标题(aria-labelledby 目标)
|
|
9854
|
+
* @csspart control - 触发按钮与清空按钮的收纳容器:描边、底色与聚焦环都落在这一层
|
|
7704
9855
|
* @csspart trigger - role=combobox 的触发按钮,同时是定位锚点,须是原生 button
|
|
7705
9856
|
* @csspart value-text - 选中项文本的显示位;留空即由元素填入 displayText,作者写了内容则归作者
|
|
7706
9857
|
* @csspart indicator - 展开指示符(aria-hidden,data-state 随开合)
|
|
7707
|
-
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab
|
|
9858
|
+
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab 位,aria-label 取 translations.clearTrigger,无值时 hidden
|
|
7708
9859
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
7709
9860
|
* @csspart content - 浮层壳(焦点域与消解层的根节点,键盘在此收口),收起时带 hidden
|
|
7710
9861
|
* @csspart tree - role=tree 容器,没有锚点时的 Tab 兜底位与落焦点
|
|
@@ -7721,7 +9872,7 @@ declare class XhTreeElement extends XhElement {
|
|
|
7721
9872
|
*/
|
|
7722
9873
|
declare class XhTreeSelectElement extends XhElement {
|
|
7723
9874
|
static partContract: {
|
|
7724
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
9875
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "label" | "control" | "positioner" | "clear-trigger" | "item-text" | "item-indicator" | "value-text" | "hidden-input" | "tree" | "branch" | "branch-control" | "branch-trigger" | "branch-indicator" | "branch-text" | "branch-content">;
|
|
7725
9876
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7726
9877
|
};
|
|
7727
9878
|
static properties: {
|
|
@@ -7858,6 +10009,8 @@ declare class XhTreeSelectElement extends XhElement {
|
|
|
7858
10009
|
private readonly treeSelectScope;
|
|
7859
10010
|
private readonly positionEngine;
|
|
7860
10011
|
private config;
|
|
10012
|
+
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
10013
|
+
private exit;
|
|
7861
10014
|
/** value-text 是否归元素填:首次见到该节点时定,之后不再回读(回读到的会是自己写的字)。 */
|
|
7862
10015
|
private readonly ownsValueText;
|
|
7863
10016
|
private readonly notifyValue;
|
|
@@ -7918,7 +10071,7 @@ declare class XhTreeSelectElement extends XhElement {
|
|
|
7918
10071
|
*/
|
|
7919
10072
|
declare class XhVirtualizerElement extends XhElement {
|
|
7920
10073
|
static partContract: {
|
|
7921
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "
|
|
10074
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "viewport" | "content">;
|
|
7922
10075
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7923
10076
|
};
|
|
7924
10077
|
static properties: {
|
|
@@ -8014,5 +10167,5 @@ declare class XhVirtualizerElement extends XhElement {
|
|
|
8014
10167
|
//#region src/define.d.ts
|
|
8015
10168
|
declare function defineXhElements(): void;
|
|
8016
10169
|
//#endregion
|
|
8017
|
-
export { XhAccordionElement, XhAlertElement, XhAnchorElement, XhAvatarElement, XhBadgeElement, XhBreadcrumbElement, XhButtonElement, XhCalendarElement, XhCarouselElement, XhCascaderElement, XhCheckboxElement, XhCheckboxGroupElement, XhClipboardElement, XhCodeBlockElement, XhCollapsibleElement, XhColorPickerElement, XhComboboxElement, XhComposerElement, XhContextMenuElement, XhDateFieldElement, XhDatePickerElement, XhDialogElement, XhDrawerElement, XhEditableElement, XhEmptyStateElement, XhFieldElement, XhFileUploadElement, XhFormElement, XhHoverCardElement, XhIconElement, XhImageElement, XhImageViewerElement, XhListboxElement, XhLoadingBarElement, XhMenuElement, XhMenubarElement, XhNavigationMenuElement, XhNumberFieldElement, XhPaginationElement, XhPinInputElement, XhPopoverElement, XhProgressElement, XhRadioGroupElement, XhRatingElement, XhScrollAreaElement, XhSelectElement, XhSeparatorElement, XhSideNavElement, XhSkeletonElement, XhSliderElement, XhSpinnerElement, XhSplitterElement, XhStepsElement, XhSwitchElement, XhTableElement, XhTabsElement, XhTagsInputElement, XhTextFieldElement, XhThreadElement, XhTimeFieldElement, XhTimePickerElement, XhToastElement, XhToasterElement, XhToggleElement, XhToggleGroupElement, XhToolbarElement, XhTooltipElement, XhTourElement, XhTransferElement, XhTreeElement, XhTreeSelectElement, XhVirtualizerElement, defineXhElements };
|
|
10170
|
+
export { XhAccordionElement, XhAlertElement, XhAnchorElement, XhAvatarElement, XhBadgeElement, XhBreadcrumbElement, XhButtonElement, XhCalendarElement, XhCarouselElement, XhCascaderElement, XhCheckboxElement, XhCheckboxGroupElement, XhClipboardElement, XhCodeBlockElement, XhCollapsibleElement, XhColorPickerElement, XhComboboxElement, XhComposerElement, XhConfigElement, XhContextMenuElement, XhDateFieldElement, XhDatePickerElement, XhDialogElement, XhDownloadTriggerElement, XhDrawerElement, XhEditableElement, XhEmptyStateElement, XhFieldElement, XhFieldsetElement, XhFileUploadElement, XhFloatingPanelElement, XhFormElement, XhHeatmapElement, XhHotkeysElement, XhHoverCardElement, XhIconElement, XhImageCropperElement, XhImageElement, XhImageViewerElement, XhJsonViewerElement, XhListboxElement, XhLoadingBarElement, XhMasonryElement, XhMenuElement, XhMenubarElement, XhNavigationMenuElement, XhNumberFieldElement, XhPaginationElement, XhPasswordInputElement, XhPinInputElement, XhPopoverElement, XhProgressElement, XhRadioGroupElement, XhRatingElement, XhScrollAreaElement, XhScrollbarElement, XhSegmentedElement, XhSelectElement, XhSeparatorElement, XhSideNavElement, XhSignaturePadElement, XhSkeletonElement, XhSliderElement, XhSpaceElement, XhSpinnerElement, XhSplitterElement, XhStepsElement, XhSwitchElement, XhTableElement, XhTabsElement, XhTagElement, XhTagsInputElement, XhTextFieldElement, XhThreadElement, XhTimeFieldElement, XhTimePickerElement, XhTimerElement, XhToastElement, XhToasterElement, XhToggleElement, XhToggleGroupElement, XhToolbarElement, XhTooltipElement, XhTourElement, XhTransferElement, XhTreeElement, XhTreeSelectElement, XhVirtualizerElement, defineXhElements };
|
|
8018
10171
|
//# sourceMappingURL=define.d.ts.map
|