@xihan-ui/web-components 1.0.0-alpha.0 → 1.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +269 -0
- package/README.md +3 -3
- package/custom-elements.json +5646 -3876
- package/dist/backgrounds.js +2 -2
- package/dist/backgrounds.js.map +1 -1
- package/dist/define.d.ts +658 -57
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +1302 -520
- package/dist/define.js.map +1 -1
- package/dist/{element-xjYY5Oe2.js → element-BHyfNDKE.js} +2 -2
- package/dist/{element-xjYY5Oe2.js.map → element-BHyfNDKE.js.map} +1 -1
- package/dist/index.d.ts +20 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{machine-controller-Bnr5jbhz.js → machine-controller-B1dE9_NF.js} +84 -13
- package/dist/machine-controller-B1dE9_NF.js.map +1 -0
- package/package.json +12 -11
- package/dist/machine-controller-Bnr5jbhz.js.map +0 -1
package/dist/define.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as XhReactiveElement } from "./element-DRoFjrYO.js";
|
|
2
2
|
import { t as Spreader } from "./spread-Ch8ZXZDC.js";
|
|
3
3
|
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, CascaderValue, CheckboxCheckedState, CheckboxGroupNode, ColorPickerFormat, ColorPickerTranslations, ComboboxInputBehavior, ComboboxNode, ComponentMeta, ComposerRunStatus, ComposerTranslations, ContextMenuNode, DateGranularity, DatePickerSchema, DateSegmentType, DrawerSchema, EditableActivationMode, EditableSubmitMode, EmptyStateLive, FileUploadTranslations, FormErrorPatch, FormSchema, FormValidateOn, FormValues, IconWeight, ListboxNode, ListboxSelectionMode, LoadingBarTranslations, MenuNode, MenubarNode, NavigationMenuNode, NavigationMenuTranslations, PaginationTranslations, PinInputTranslations, PinInputType, PopoverTranslations, RadioGroupNode, ResolvedToast, ScrollAreaOrientation, ScrollAreaType, SelectNode, SkeletonVariant, SliderValueTextDetails, SpinnerTranslations, SplitterPanelProps, TableColumnDef, TableRowDef, TableSelection, TableSelectionMode, TableSortDescriptor, TabsActivationMode, TabsNode, TabsVariant, TagsInputBlurBehavior, ThreadStatus, ThreadTranslations, TimeGranularity, TimeHourCycle, ToastOptions, ToastPlacement, ToastRecord, ToastTranslations, ToastType, ToasterTranslations, ToggleGroupNode, TourStep, TourTranslations, TransferFilter, TransferItem, TreeNode, TreeSelectionMode, VirtualizerAlign, VirtualizerItemState } from "@xihan-ui/headless";
|
|
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
5
|
//#region src/dom/part-contract.d.ts
|
|
6
6
|
/** 只取校验用得上的两项,避免把 `Anatomy<具体 part 联合>` 收窄成 `Anatomy<string>` 时不可赋值。 */
|
|
7
7
|
interface PartContract {
|
|
@@ -103,7 +103,7 @@ declare abstract class XhElement extends XhReactiveElement {
|
|
|
103
103
|
*/
|
|
104
104
|
declare class XhAccordionElement extends XhElement {
|
|
105
105
|
static partContract: {
|
|
106
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "
|
|
106
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "header" | "trigger">;
|
|
107
107
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
108
108
|
};
|
|
109
109
|
static properties: {
|
|
@@ -767,6 +767,9 @@ declare class XhCarouselElement extends XhElement {
|
|
|
767
767
|
* @attr {'click'|'hover'} expand-trigger - 子列由点还是悬停展开,默认 click
|
|
768
768
|
* @attr {boolean} change-on-select - 中间层(分支)也能落值
|
|
769
769
|
* @attr {boolean} multiple - 多选:选中后浮层不收起,焦点留在列里
|
|
770
|
+
* @attr {boolean} searchable - 开启搜索:input 部件可用,输入后整条路径连缀过滤、候选替换列视图
|
|
771
|
+
* @attr {boolean} cascade - 多选下父子级联勾选(整枝传导/半选/禁用冻结),默认 false
|
|
772
|
+
* @attr {string} checked-strategy - 级联下对外值的收敛策略:child(默认)/ parent / all
|
|
770
773
|
* @attr {boolean} disabled - 整个控件禁用:trigger 用原生 disabled,浮层展不开
|
|
771
774
|
* @attr {boolean} read-only - 只读:浮层照常展开、列照常浏览,但选中值改不动、也清不掉
|
|
772
775
|
* @attr {boolean} invalid - 校验失败标注
|
|
@@ -788,7 +791,11 @@ declare class XhCarouselElement extends XhElement {
|
|
|
788
791
|
* @csspart indicator - 展开指示符(aria-hidden,data-state 随开合)
|
|
789
792
|
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab 位且对读屏隐藏
|
|
790
793
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
791
|
-
* @csspart content - 浮层壳(焦点域与消解层的根节点),键盘在此收口,收起时带 hidden
|
|
794
|
+
* @csspart content - 浮层壳(焦点域与消解层的根节点),键盘在此收口,收起时带 hidden;根列没有条目时带 data-empty
|
|
795
|
+
* @csspart input - 搜索框(content 顶部);没开 searchable 时带 hidden。上下键走候选、Enter 选中、Escape 先清词
|
|
796
|
+
* @csspart search-list - 候选列表容器;不在搜索视图时带 hidden,无候选时带 data-empty
|
|
797
|
+
* @csspart search-item - 一条候选,须用 value 属性写整条路径的 JSON 数组串(如 value='["a","b"]');词换了不匹配的带 hidden
|
|
798
|
+
* @csspart empty - 空态占位:搜索无候选或 collection 为空时露面,其余时候带 hidden。标记里没写就由元素在 content 末尾补一个并填缺省文案;写了就用作者那份,文案也归作者
|
|
792
799
|
* @csspart column - role=listbox 的一列,须自带 level 属性标识它是第几列;砍掉时带 hidden
|
|
793
800
|
* @csspart item - role=option 的条目,须自带 value 属性标识身份;不在当前列里时带 hidden
|
|
794
801
|
* @csspart item-text - 条目文本
|
|
@@ -796,7 +803,7 @@ declare class XhCarouselElement extends XhElement {
|
|
|
796
803
|
*/
|
|
797
804
|
declare class XhCascaderElement extends XhElement {
|
|
798
805
|
static partContract: {
|
|
799
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "label" | "positioner" | "item-text" | "item-indicator" | "clear-trigger" | "value-text" | "column">;
|
|
806
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "label" | "positioner" | "item-text" | "item-indicator" | "input" | "empty" | "clear-trigger" | "value-text" | "column" | "search-list" | "search-item">;
|
|
800
807
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
801
808
|
};
|
|
802
809
|
static properties: {
|
|
@@ -833,6 +840,18 @@ declare class XhCascaderElement extends XhElement {
|
|
|
833
840
|
multiple: {
|
|
834
841
|
type: BooleanConstructor;
|
|
835
842
|
};
|
|
843
|
+
searchable: {
|
|
844
|
+
type: BooleanConstructor;
|
|
845
|
+
};
|
|
846
|
+
cascade: {
|
|
847
|
+
type: BooleanConstructor;
|
|
848
|
+
};
|
|
849
|
+
checkedStrategy: {
|
|
850
|
+
converter: {
|
|
851
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
852
|
+
};
|
|
853
|
+
attribute: string;
|
|
854
|
+
};
|
|
836
855
|
disabled: {
|
|
837
856
|
type: BooleanConstructor;
|
|
838
857
|
};
|
|
@@ -872,6 +891,9 @@ declare class XhCascaderElement extends XhElement {
|
|
|
872
891
|
fromAttribute: (v: string | null) => string | undefined;
|
|
873
892
|
};
|
|
874
893
|
};
|
|
894
|
+
translations: {
|
|
895
|
+
attribute: boolean;
|
|
896
|
+
};
|
|
875
897
|
placement: {
|
|
876
898
|
converter: {
|
|
877
899
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -902,6 +924,9 @@ declare class XhCascaderElement extends XhElement {
|
|
|
902
924
|
expandTrigger?: CascaderExpandTrigger;
|
|
903
925
|
changeOnSelect?: boolean;
|
|
904
926
|
multiple?: boolean;
|
|
927
|
+
searchable?: boolean;
|
|
928
|
+
cascade?: boolean;
|
|
929
|
+
checkedStrategy?: CascaderSchema['props']['checkedStrategy'];
|
|
905
930
|
disabled?: boolean;
|
|
906
931
|
readOnly?: boolean;
|
|
907
932
|
invalid?: boolean;
|
|
@@ -914,12 +939,15 @@ declare class XhCascaderElement extends XhElement {
|
|
|
914
939
|
offset?: number;
|
|
915
940
|
loop?: boolean;
|
|
916
941
|
direction?: Direction;
|
|
942
|
+
translations?: CascaderSchema['props']['translations'];
|
|
917
943
|
private readonly idGen;
|
|
918
944
|
private readonly cascaderScope;
|
|
919
945
|
private readonly positionEngine;
|
|
920
946
|
private config;
|
|
921
947
|
/** value-text 是否归元素填:首次见到该节点时定,之后不再回读(回读到的会是自己写的字)。 */
|
|
922
948
|
private readonly ownsValueText;
|
|
949
|
+
/** 空态占位的文案是否归元素填,判定同 ownsValueText。 */
|
|
950
|
+
private readonly ownsEmptyText;
|
|
923
951
|
private readonly notifyValue;
|
|
924
952
|
private readonly notifyOpen;
|
|
925
953
|
private readonly ctrl;
|
|
@@ -943,8 +971,13 @@ declare class XhCascaderElement extends XhElement {
|
|
|
943
971
|
private levelOf;
|
|
944
972
|
/** 摘掉作者写在条目上的原生 disabled,条目禁用一律由 collection 决定并以 aria-disabled 表达。 */
|
|
945
973
|
private stripNativeDisabled;
|
|
946
|
-
/**
|
|
947
|
-
private
|
|
974
|
+
/** 把文字填进角色节点;首次见到该节点时若已有内容则判为归作者,之后一概不碰。 */
|
|
975
|
+
private fillOwnedText;
|
|
976
|
+
/**
|
|
977
|
+
* 取空态占位;标记里没写就在 content 末尾补一个,位置与 Vue 侧一致。
|
|
978
|
+
* 作者写了就用作者那份,只接线不新建。补出来的节点下一轮由 discoverParts 收进 partMap。
|
|
979
|
+
*/
|
|
980
|
+
private ensureEmpty;
|
|
948
981
|
protected wire(): void;
|
|
949
982
|
disconnectedCallback(): void;
|
|
950
983
|
}
|
|
@@ -962,10 +995,12 @@ declare class XhCascaderElement extends XhElement {
|
|
|
962
995
|
* @fires checked-change - checked 状态变化;detail 为 `{ checked: boolean }`
|
|
963
996
|
* @csspart root - role=checkbox 的按钮(承载 aria-checked / data-state)
|
|
964
997
|
* @csspart indicator - 选中标记
|
|
998
|
+
* @attr {string} name - 表单字段名;给了 hidden-input 才参与提交
|
|
999
|
+
* @csspart hidden-input - type=hidden 的表单出口,省略该节点即不参与表单
|
|
965
1000
|
*/
|
|
966
1001
|
declare class XhCheckboxElement extends XhElement {
|
|
967
1002
|
static partContract: {
|
|
968
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator">;
|
|
1003
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "hidden-input">;
|
|
969
1004
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
970
1005
|
};
|
|
971
1006
|
static properties: {
|
|
@@ -983,12 +1018,24 @@ declare class XhCheckboxElement extends XhElement {
|
|
|
983
1018
|
disabled: {
|
|
984
1019
|
type: BooleanConstructor;
|
|
985
1020
|
};
|
|
1021
|
+
name: {
|
|
1022
|
+
converter: {
|
|
1023
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
value: {
|
|
1027
|
+
converter: {
|
|
1028
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
986
1031
|
tone: {};
|
|
987
1032
|
size: {};
|
|
988
1033
|
};
|
|
989
1034
|
checked?: CheckboxCheckedState;
|
|
990
1035
|
defaultChecked?: CheckboxCheckedState;
|
|
991
1036
|
disabled?: boolean;
|
|
1037
|
+
name?: string;
|
|
1038
|
+
value?: string;
|
|
992
1039
|
tone?: Tone;
|
|
993
1040
|
size?: Size;
|
|
994
1041
|
private readonly notify;
|
|
@@ -1000,7 +1047,7 @@ declare class XhCheckboxElement extends XhElement {
|
|
|
1000
1047
|
//#region src/elements/checkbox-group.d.ts
|
|
1001
1048
|
/**
|
|
1002
1049
|
* `<xh-checkbox-group>` —— Light-DOM 行为宿主:作者写 root/label 与若干 item 角色节点,
|
|
1003
|
-
* 每个 item 内自带
|
|
1050
|
+
* 每个 item 内自带 hidden-input/indicator/item-text,元素跑 checkbox-group 机器
|
|
1004
1051
|
* 并把 connect 产出打上去。条目身份取自条目节点上的 value 属性。
|
|
1005
1052
|
*
|
|
1006
1053
|
* 不做 roving tabindex:组内每一项都是独立的 Tab 停靠点(禁用项也保留),容器自己不占位。
|
|
@@ -1018,14 +1065,14 @@ declare class XhCheckboxElement extends XhElement {
|
|
|
1018
1065
|
* @csspart root - role=group 容器
|
|
1019
1066
|
* @csspart label - 组标题(aria-labelledby 目标)
|
|
1020
1067
|
* @csspart item - role=checkbox 条目,作者用 value 属性声明身份
|
|
1021
|
-
* @csspart
|
|
1068
|
+
* @csspart indicator - 条目的视觉方框(对读屏隐藏)
|
|
1022
1069
|
* @csspart item-text - 条目文本,条目的可及名来源
|
|
1023
|
-
* @csspart
|
|
1070
|
+
* @csspart hidden-input - 条目的表单影子输入(必须是原生 input)
|
|
1024
1071
|
* @csspart trigger - 全选/半选的父复选框,须写在 root 之内
|
|
1025
1072
|
*/
|
|
1026
1073
|
declare class XhCheckboxGroupElement extends XhElement {
|
|
1027
1074
|
static partContract: {
|
|
1028
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "
|
|
1075
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "trigger" | "label" | "item-text" | "hidden-input">;
|
|
1029
1076
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1030
1077
|
};
|
|
1031
1078
|
static properties: {
|
|
@@ -1124,7 +1171,7 @@ declare class XhCheckboxGroupElement extends XhElement {
|
|
|
1124
1171
|
*/
|
|
1125
1172
|
declare class XhClipboardElement extends XhElement {
|
|
1126
1173
|
static partContract: {
|
|
1127
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "trigger" | "label" | "
|
|
1174
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "indicator" | "trigger" | "label" | "input" | "control">;
|
|
1128
1175
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1129
1176
|
};
|
|
1130
1177
|
static properties: {
|
|
@@ -1274,6 +1321,7 @@ declare class XhCollapsibleElement extends XhElement {
|
|
|
1274
1321
|
* @attr {'ltr'|'rtl'} dir - 文字方向,只改写横轴上左右两键与指针的语义,默认 ltr
|
|
1275
1322
|
* @attr {string} placement - 首选放置位,默认 bottom-start;避让后的实际位写在 data-placement 上
|
|
1276
1323
|
* @attr {number} offset - 浮层与锚点的间距(px)
|
|
1324
|
+
* @attr {string} name - 表单字段名;给了 hidden-input 才带 name 并参与提交
|
|
1277
1325
|
* @fires value-change - 颜色变化;detail 为 `{ value: string }`
|
|
1278
1326
|
* @fires open-change - open 状态变化;detail 为 `{ open: boolean }`
|
|
1279
1327
|
* @csspart root - 组件根容器(承载 data-state/data-disabled/data-readonly)
|
|
@@ -1292,10 +1340,11 @@ declare class XhCollapsibleElement extends XhElement {
|
|
|
1292
1340
|
* @csspart eye-dropper-trigger - 屏幕取色按钮,须是原生 button;环境不支持时自动禁用
|
|
1293
1341
|
* @csspart swatch-group - role=group 的预设色板容器
|
|
1294
1342
|
* @csspart swatch-item - 预设色板一格,须是原生 button 且自带 value 属性
|
|
1343
|
+
* @csspart hidden-input - type=hidden 的表单出口,值是当前颜色串;作者不写这个部件就不参与提交
|
|
1295
1344
|
*/
|
|
1296
1345
|
declare class XhColorPickerElement extends XhElement {
|
|
1297
1346
|
static partContract: {
|
|
1298
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "label" | "positioner" | "value-text" | "area" | "swatch" | "area-thumb" | "channel-slider" | "channel-slider-track" | "channel-slider-thumb" | "channel-input" | "eye-dropper-trigger" | "swatch-group" | "swatch-item">;
|
|
1347
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "label" | "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">;
|
|
1299
1348
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1300
1349
|
};
|
|
1301
1350
|
static properties: {
|
|
@@ -1345,6 +1394,11 @@ declare class XhColorPickerElement extends XhElement {
|
|
|
1345
1394
|
fromAttribute: (v: string | null) => string[] | undefined;
|
|
1346
1395
|
};
|
|
1347
1396
|
};
|
|
1397
|
+
name: {
|
|
1398
|
+
converter: {
|
|
1399
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
1400
|
+
};
|
|
1401
|
+
};
|
|
1348
1402
|
direction: {
|
|
1349
1403
|
converter: {
|
|
1350
1404
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -1374,6 +1428,7 @@ declare class XhColorPickerElement extends XhElement {
|
|
|
1374
1428
|
readOnly?: boolean;
|
|
1375
1429
|
alpha?: boolean;
|
|
1376
1430
|
swatches?: string[];
|
|
1431
|
+
name?: string;
|
|
1377
1432
|
direction?: Direction;
|
|
1378
1433
|
placement?: Placement;
|
|
1379
1434
|
offset?: number;
|
|
@@ -1449,17 +1504,24 @@ declare class XhColorPickerElement extends XhElement {
|
|
|
1449
1504
|
* @csspart item-indicator - 候选选中标记(aria-hidden)
|
|
1450
1505
|
* @csspart item-group - role=group 分组容器,须自带 value 属性标识身份
|
|
1451
1506
|
* @csspart item-group-label - 分组标题(本组 aria-labelledby 的目标)
|
|
1507
|
+
* @attr {string} name - 表单字段名;给了 hidden-input 才参与提交(多选按逗号拼成一串)
|
|
1508
|
+
* @csspart hidden-input - type=hidden 的表单出口,省略该节点即不参与表单
|
|
1452
1509
|
* @csspart empty - 无匹配项提示;须放在 positioner 里当 content 的兄弟(列表内只允许 option 与 group)
|
|
1453
1510
|
*/
|
|
1454
1511
|
declare class XhComboboxElement extends XhElement {
|
|
1455
1512
|
static partContract: {
|
|
1456
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "label" | "item-group" | "positioner" | "item-text" | "item-indicator" | "clear-trigger" | "
|
|
1513
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "label" | "item-group" | "positioner" | "item-text" | "item-indicator" | "input" | "empty" | "clear-trigger" | "hidden-input" | "control" | "item-group-label">;
|
|
1457
1514
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1458
1515
|
};
|
|
1459
1516
|
static properties: {
|
|
1460
1517
|
collection: {
|
|
1461
1518
|
attribute: boolean;
|
|
1462
1519
|
};
|
|
1520
|
+
name: {
|
|
1521
|
+
converter: {
|
|
1522
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
1523
|
+
};
|
|
1524
|
+
};
|
|
1463
1525
|
value: {
|
|
1464
1526
|
converter: {
|
|
1465
1527
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -1571,6 +1633,7 @@ declare class XhComboboxElement extends XhElement {
|
|
|
1571
1633
|
readOnly?: boolean;
|
|
1572
1634
|
invalid?: boolean;
|
|
1573
1635
|
loop?: boolean;
|
|
1636
|
+
name?: string;
|
|
1574
1637
|
placeholder?: string;
|
|
1575
1638
|
allowCustomValue?: boolean;
|
|
1576
1639
|
openOnClick?: boolean;
|
|
@@ -1752,6 +1815,9 @@ declare class XhContextMenuElement extends XhElement {
|
|
|
1752
1815
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
1753
1816
|
};
|
|
1754
1817
|
};
|
|
1818
|
+
translations: {
|
|
1819
|
+
attribute: boolean;
|
|
1820
|
+
};
|
|
1755
1821
|
direction: {
|
|
1756
1822
|
converter: {
|
|
1757
1823
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -1782,6 +1848,8 @@ declare class XhContextMenuElement extends XhElement {
|
|
|
1782
1848
|
offset?: number;
|
|
1783
1849
|
loop?: boolean;
|
|
1784
1850
|
typeahead?: boolean;
|
|
1851
|
+
/** 读屏文案(菜单名字);对象进不了属性,只作为 property 暴露。 */
|
|
1852
|
+
translations?: ContextMenuSchema['props']['translations'];
|
|
1785
1853
|
direction?: Direction;
|
|
1786
1854
|
longPressDelay?: number;
|
|
1787
1855
|
tone?: Tone;
|
|
@@ -1858,7 +1926,7 @@ type SegmentTexts = { readonly [K in DateSegmentType]?: string; };
|
|
|
1858
1926
|
*/
|
|
1859
1927
|
declare class XhDateFieldElement extends XhElement {
|
|
1860
1928
|
static partContract: {
|
|
1861
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "
|
|
1929
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "hidden-input" | "control" | "segment">;
|
|
1862
1930
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1863
1931
|
};
|
|
1864
1932
|
static properties: {
|
|
@@ -2021,6 +2089,9 @@ declare class XhDateFieldElement extends XhElement {
|
|
|
2021
2089
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
2022
2090
|
* @csspart content - role=dialog 浮层(消解层的根节点),收起时带 hidden
|
|
2023
2091
|
* @csspart calendar - 内嵌日历的挂载点,同时充当日历的根节点
|
|
2092
|
+
* @csspart time-column - showTime 的时间列,须自带 unit 属性(hour/minute/second);没开时带 hidden
|
|
2093
|
+
* @csspart time-item - 时间选项,须自带 value 属性(两位补零串);点按把该单位写进值
|
|
2094
|
+
* @csspart confirm-trigger - showTime 的收口按钮;没开时带 hidden
|
|
2024
2095
|
* @csspart header - 日历标题栏外壳(data-scope="calendar")
|
|
2025
2096
|
* @csspart prev-trigger - 上一月;越过 min 时转原生 disabled
|
|
2026
2097
|
* @csspart next-trigger - 下一月;越过 max 时转原生 disabled
|
|
@@ -2036,9 +2107,9 @@ declare class XhDateFieldElement extends XhElement {
|
|
|
2036
2107
|
*/
|
|
2037
2108
|
declare class XhDatePickerElement extends XhElement {
|
|
2038
2109
|
static partContract: {
|
|
2039
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "label" | "positioner" | "clear-trigger" | "control" | "
|
|
2110
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "label" | "positioner" | "input" | "clear-trigger" | "control" | "confirm-trigger" | "calendar" | "time-column" | "time-item">;
|
|
2040
2111
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2041
|
-
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" | "
|
|
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" | "control" | "segment">)[];
|
|
2042
2113
|
};
|
|
2043
2114
|
static properties: {
|
|
2044
2115
|
value: {
|
|
@@ -2139,6 +2210,18 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2139
2210
|
};
|
|
2140
2211
|
attribute: string;
|
|
2141
2212
|
};
|
|
2213
|
+
showTime: {
|
|
2214
|
+
converter: {
|
|
2215
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
2216
|
+
};
|
|
2217
|
+
attribute: string;
|
|
2218
|
+
};
|
|
2219
|
+
timeGranularity: {
|
|
2220
|
+
converter: {
|
|
2221
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2222
|
+
};
|
|
2223
|
+
attribute: string;
|
|
2224
|
+
};
|
|
2142
2225
|
isDateUnavailable: {
|
|
2143
2226
|
attribute: boolean;
|
|
2144
2227
|
};
|
|
@@ -2162,6 +2245,8 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2162
2245
|
placement?: Placement;
|
|
2163
2246
|
offset?: number;
|
|
2164
2247
|
closeOnSelect?: boolean;
|
|
2248
|
+
showTime?: boolean;
|
|
2249
|
+
timeGranularity?: DatePickerSchema['props']['timeGranularity'];
|
|
2165
2250
|
isDateUnavailable?: (value: string) => boolean;
|
|
2166
2251
|
private readonly idGen;
|
|
2167
2252
|
private readonly pickerScope;
|
|
@@ -2270,11 +2355,14 @@ declare class XhDialogElement extends XhElement {
|
|
|
2270
2355
|
private readonly dialogScope;
|
|
2271
2356
|
private config;
|
|
2272
2357
|
private contentNode;
|
|
2358
|
+
private exit;
|
|
2273
2359
|
private backdropNode;
|
|
2274
2360
|
private readonly notify;
|
|
2275
2361
|
private readonly ctrl;
|
|
2276
2362
|
private machineProps;
|
|
2277
2363
|
private ensureConfig;
|
|
2364
|
+
/** 退场闸门建一次;presence 不是响应式 cell,退场结束要显式排一次更新才轮得到收起。 */
|
|
2365
|
+
private ensureExit;
|
|
2278
2366
|
private readonly registerLayer;
|
|
2279
2367
|
private injectRefs;
|
|
2280
2368
|
protected wire(): void;
|
|
@@ -2373,11 +2461,14 @@ declare class XhDrawerElement extends XhElement {
|
|
|
2373
2461
|
private readonly drawerScope;
|
|
2374
2462
|
private config;
|
|
2375
2463
|
private contentNode;
|
|
2464
|
+
private exit;
|
|
2376
2465
|
private backdropNode;
|
|
2377
2466
|
private readonly notify;
|
|
2378
2467
|
private readonly ctrl;
|
|
2379
2468
|
private machineProps;
|
|
2380
2469
|
private ensureConfig;
|
|
2470
|
+
/** 退场闸门建一次;presence 不是响应式 cell,退场结束要显式排一次更新才轮得到收起。 */
|
|
2471
|
+
private ensureExit;
|
|
2381
2472
|
private readonly registerLayer;
|
|
2382
2473
|
private injectRefs;
|
|
2383
2474
|
protected wire(): void;
|
|
@@ -2429,7 +2520,7 @@ declare class XhDrawerElement extends XhElement {
|
|
|
2429
2520
|
*/
|
|
2430
2521
|
declare class XhEditableElement extends XhElement {
|
|
2431
2522
|
static partContract: {
|
|
2432
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "
|
|
2523
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "input" | "control" | "area" | "submit-trigger" | "cancel-trigger" | "preview" | "edit-trigger">;
|
|
2433
2524
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2434
2525
|
};
|
|
2435
2526
|
static properties: {
|
|
@@ -2664,7 +2755,11 @@ declare class XhFieldElement extends XhElement {
|
|
|
2664
2755
|
* @attr {boolean} allow-drop - 是否接受拖拽投放,默认 true;写 allow-drop="false" 关掉
|
|
2665
2756
|
* @attr {boolean} directory - 选目录而不是选文件(隐藏输入带 webkitdirectory)
|
|
2666
2757
|
* @attr {'user'|'environment'} capture - 移动端直接调用摄像头/麦克风采集
|
|
2758
|
+
* @attr {boolean} auto-upload - 收下即自动开传(须配 upload 实现),默认 true;写 auto-upload="false" 关掉
|
|
2667
2759
|
* @fires files-change - 列表变化;detail 为 `{ files: File[] }`
|
|
2760
|
+
* @fires remote-files-change - 远程附件列表变化;detail 为 `{ files: FileUploadRemoteFile[] }`
|
|
2761
|
+
* @fires upload-complete - 单个文件传完;detail 为 `{ file, url? }`
|
|
2762
|
+
* @fires upload-error - 单个文件传败;detail 为 `{ file, error }`
|
|
2668
2763
|
* @fires file-accept - 本次收下了哪些;detail 为 `{ files: File[] }`
|
|
2669
2764
|
* @fires file-reject - 本次拒了哪些、各自为什么;detail 为 `{ files: { file, reasons }[] }`
|
|
2670
2765
|
* @csspart root - 组件根容器,承载 data-dragging / data-disabled / data-invalid / data-empty
|
|
@@ -2692,6 +2787,21 @@ declare class XhFileUploadElement extends XhElement {
|
|
|
2692
2787
|
defaultFiles: {
|
|
2693
2788
|
attribute: boolean;
|
|
2694
2789
|
};
|
|
2790
|
+
remoteFiles: {
|
|
2791
|
+
attribute: boolean;
|
|
2792
|
+
};
|
|
2793
|
+
defaultRemoteFiles: {
|
|
2794
|
+
attribute: boolean;
|
|
2795
|
+
};
|
|
2796
|
+
upload: {
|
|
2797
|
+
attribute: boolean;
|
|
2798
|
+
};
|
|
2799
|
+
autoUpload: {
|
|
2800
|
+
converter: {
|
|
2801
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
2802
|
+
};
|
|
2803
|
+
attribute: string;
|
|
2804
|
+
};
|
|
2695
2805
|
accept: {
|
|
2696
2806
|
converter: {
|
|
2697
2807
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -2746,6 +2856,10 @@ declare class XhFileUploadElement extends XhElement {
|
|
|
2746
2856
|
};
|
|
2747
2857
|
files?: File[];
|
|
2748
2858
|
defaultFiles?: File[];
|
|
2859
|
+
remoteFiles?: FileUploadRemoteFile[];
|
|
2860
|
+
defaultRemoteFiles?: FileUploadRemoteFile[];
|
|
2861
|
+
upload?: FileUploadSchema['props']['upload'];
|
|
2862
|
+
autoUpload?: boolean;
|
|
2749
2863
|
accept?: string | string[];
|
|
2750
2864
|
maxFiles?: number;
|
|
2751
2865
|
maxFileSize?: number;
|
|
@@ -2761,6 +2875,9 @@ declare class XhFileUploadElement extends XhElement {
|
|
|
2761
2875
|
private readonly notifyChange;
|
|
2762
2876
|
private readonly notifyAccept;
|
|
2763
2877
|
private readonly notifyReject;
|
|
2878
|
+
private readonly notifyRemoteChange;
|
|
2879
|
+
private readonly notifyUploadComplete;
|
|
2880
|
+
private readonly notifyUploadError;
|
|
2764
2881
|
private readonly ctrl;
|
|
2765
2882
|
private machineProps;
|
|
2766
2883
|
/** 命令式入口共用的取法;机器要到进文档(hostConnected)才建,未建则抛。 */
|
|
@@ -2806,6 +2923,9 @@ declare class XhFileUploadElement extends XhElement {
|
|
|
2806
2923
|
*
|
|
2807
2924
|
* @customElement xh-form
|
|
2808
2925
|
* @attr {string} validate-on - 校验时机:submit(默认)/ blur / change
|
|
2926
|
+
* @attr {string} layout - 排布:vertical(默认)/ horizontal(标签左置两列)/ inline(横排一行流)
|
|
2927
|
+
* @attr {string} label-width - horizontal 下标签列宽(CSS 长度),整表统一对齐
|
|
2928
|
+
* @attr {string} label-align - horizontal 下标签对齐缘:end(默认,贴控件)/ start
|
|
2809
2929
|
* @attr {boolean} disabled - 整个表单禁用:提交、重置、写值一概不发生,两颗按钮带原生 disabled
|
|
2810
2930
|
* @attr {boolean} read-only - 只读:写值与重置不发生,但仍可提交
|
|
2811
2931
|
* @fires values-change - 值表变化;detail 为 `{ values }`
|
|
@@ -2813,7 +2933,8 @@ declare class XhFileUploadElement extends XhElement {
|
|
|
2813
2933
|
* @fires submit - 校验通过才派发;detail 为 `{ values }`
|
|
2814
2934
|
* @fires invalid - 校验不通过时派发;detail 为 `{ errors, values }`
|
|
2815
2935
|
* @csspart root - 表单根容器,必须是原生 `<form>`(承载 data-state/data-disabled/data-readonly/data-invalid)
|
|
2816
|
-
* @csspart field-group - 单个字段的容器,须自带 value 属性标识字段名;带 id
|
|
2936
|
+
* @csspart field-group - 单个字段的容器,须自带 value 属性标识字段名;带 id 供摘要链接指向。
|
|
2937
|
+
* 组里的 `<xh-field>` 由表单驱动 invalid/required/disabled,作者显式设的会被顶掉
|
|
2817
2938
|
* @csspart error-summary - role=alert 的错误汇总,提交失败且仍有错误时才显形
|
|
2818
2939
|
* @csspart error-summary-item - 摘要里的一条,须是原生 `<a>` 且自带 value 属性标识字段名;无对应错误时带 hidden
|
|
2819
2940
|
* @csspart submit-trigger - 提交键,须是原生 button(连接层写成 type=submit)
|
|
@@ -2821,7 +2942,7 @@ declare class XhFileUploadElement extends XhElement {
|
|
|
2821
2942
|
*/
|
|
2822
2943
|
declare class XhFormElement extends XhElement {
|
|
2823
2944
|
static partContract: {
|
|
2824
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "submit-trigger" | "field-group" | "error-summary" | "error-summary-item"
|
|
2945
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "submit-trigger" | "reset-trigger" | "field-group" | "error-summary" | "error-summary-item">;
|
|
2825
2946
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2826
2947
|
};
|
|
2827
2948
|
static properties: {
|
|
@@ -2840,12 +2961,35 @@ declare class XhFormElement extends XhElement {
|
|
|
2840
2961
|
validate: {
|
|
2841
2962
|
attribute: boolean;
|
|
2842
2963
|
};
|
|
2964
|
+
rules: {
|
|
2965
|
+
attribute: boolean;
|
|
2966
|
+
};
|
|
2967
|
+
validateMessages: {
|
|
2968
|
+
attribute: boolean;
|
|
2969
|
+
};
|
|
2843
2970
|
validateOn: {
|
|
2844
2971
|
converter: {
|
|
2845
2972
|
fromAttribute: (v: string | null) => string | undefined;
|
|
2846
2973
|
};
|
|
2847
2974
|
attribute: string;
|
|
2848
2975
|
};
|
|
2976
|
+
layout: {
|
|
2977
|
+
converter: {
|
|
2978
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2979
|
+
};
|
|
2980
|
+
};
|
|
2981
|
+
labelWidth: {
|
|
2982
|
+
converter: {
|
|
2983
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2984
|
+
};
|
|
2985
|
+
attribute: string;
|
|
2986
|
+
};
|
|
2987
|
+
labelAlign: {
|
|
2988
|
+
converter: {
|
|
2989
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
2990
|
+
};
|
|
2991
|
+
attribute: string;
|
|
2992
|
+
};
|
|
2849
2993
|
disabled: {
|
|
2850
2994
|
converter: {
|
|
2851
2995
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
@@ -2863,7 +3007,13 @@ declare class XhFormElement extends XhElement {
|
|
|
2863
3007
|
errors?: FormErrorPatch;
|
|
2864
3008
|
defaultErrors?: FormErrorPatch;
|
|
2865
3009
|
validate?: FormSchema['props']['validate'];
|
|
3010
|
+
/** 声明式校验规则;对象进不了属性,只作为 property 暴露。 */
|
|
3011
|
+
rules?: FormSchema['props']['rules'];
|
|
3012
|
+
validateMessages?: FormSchema['props']['validateMessages'];
|
|
2866
3013
|
validateOn?: FormValidateOn;
|
|
3014
|
+
layout?: FormSchema['props']['layout'];
|
|
3015
|
+
labelWidth?: string;
|
|
3016
|
+
labelAlign?: FormSchema['props']['labelAlign'];
|
|
2867
3017
|
disabled?: boolean;
|
|
2868
3018
|
readOnly?: boolean;
|
|
2869
3019
|
private readonly notifyValues;
|
|
@@ -3134,6 +3284,154 @@ declare class XhImageElement extends XhElement {
|
|
|
3134
3284
|
protected wire(): void;
|
|
3135
3285
|
}
|
|
3136
3286
|
//#endregion
|
|
3287
|
+
//#region src/elements/image-viewer.d.ts
|
|
3288
|
+
/**
|
|
3289
|
+
* `<xh-image-viewer>` —— Light-DOM 行为宿主,跑 image-viewer 机器:
|
|
3290
|
+
* 模态看片浮层,滚轮缩放、拖拽平移、旋转翻转与多图翻页。
|
|
3291
|
+
*
|
|
3292
|
+
* @customElement xh-image-viewer
|
|
3293
|
+
* @attr {boolean} open - 受控开合;缺省该属性即非受控
|
|
3294
|
+
* @attr {boolean} default-open - 非受控初始为打开
|
|
3295
|
+
* @attr {number} index - 受控下标(0 起)
|
|
3296
|
+
* @attr {number} default-index - 非受控初始下标,默认 0
|
|
3297
|
+
* @attr {boolean} loop - 前后翻页到头回绕,默认 true;写 loop="false" 关掉
|
|
3298
|
+
* @attr {number} zoom-step - 缩放步长(加法),默认 0.5
|
|
3299
|
+
* @attr {number} min-scale - 缩放下限,默认 0.25
|
|
3300
|
+
* @attr {number} max-scale - 缩放上限,默认 8
|
|
3301
|
+
* @attr {boolean} close-on-escape - Esc 关闭,默认 true
|
|
3302
|
+
* @attr {boolean} close-on-interact-outside - 点遮罩关闭,默认 true
|
|
3303
|
+
* @attr {boolean} restore-focus - 关闭后把焦点归还触发元素,默认 true
|
|
3304
|
+
* @fires open-change - open 状态变化;detail 为 `{ open: boolean }`
|
|
3305
|
+
* @fires index-change - 下标变化;detail 为 `{ index: number }`
|
|
3306
|
+
* @csspart trigger - 触发按钮
|
|
3307
|
+
* @csspart backdrop - 遮罩层
|
|
3308
|
+
* @csspart positioner - 浮层定位容器
|
|
3309
|
+
* @csspart content - 看片容器(role=dialog + aria-modal;方向键翻页在这里)
|
|
3310
|
+
* @csspart viewport - 手势视口(滚轮缩放、拖拽平移)
|
|
3311
|
+
* @csspart image - 当前那张图(src/alt/transform 由元素代填)
|
|
3312
|
+
* @csspart toolbar - 工具条容器
|
|
3313
|
+
* @csspart zoom-in-trigger - 放大
|
|
3314
|
+
* @csspart zoom-out-trigger - 缩小
|
|
3315
|
+
* @csspart rotate-left-trigger - 左转 90°
|
|
3316
|
+
* @csspart rotate-right-trigger - 右转 90°
|
|
3317
|
+
* @csspart flip-horizontal-trigger - 水平翻转
|
|
3318
|
+
* @csspart flip-vertical-trigger - 垂直翻转
|
|
3319
|
+
* @csspart reset-trigger - 变换归零
|
|
3320
|
+
* @csspart prev-trigger - 上一张
|
|
3321
|
+
* @csspart next-trigger - 下一张
|
|
3322
|
+
* @csspart counter - 「第 n / 共 m」计数(元素代填)
|
|
3323
|
+
* @csspart close-trigger - 关闭
|
|
3324
|
+
*/
|
|
3325
|
+
declare class XhImageViewerElement extends XhElement {
|
|
3326
|
+
static partContract: {
|
|
3327
|
+
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">;
|
|
3328
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3329
|
+
};
|
|
3330
|
+
static properties: {
|
|
3331
|
+
open: {
|
|
3332
|
+
converter: {
|
|
3333
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3334
|
+
};
|
|
3335
|
+
};
|
|
3336
|
+
defaultOpen: {
|
|
3337
|
+
type: BooleanConstructor;
|
|
3338
|
+
attribute: string;
|
|
3339
|
+
};
|
|
3340
|
+
index: {
|
|
3341
|
+
converter: {
|
|
3342
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3343
|
+
};
|
|
3344
|
+
};
|
|
3345
|
+
defaultIndex: {
|
|
3346
|
+
converter: {
|
|
3347
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3348
|
+
};
|
|
3349
|
+
attribute: string;
|
|
3350
|
+
};
|
|
3351
|
+
loop: {
|
|
3352
|
+
converter: {
|
|
3353
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3354
|
+
};
|
|
3355
|
+
};
|
|
3356
|
+
zoomStep: {
|
|
3357
|
+
converter: {
|
|
3358
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3359
|
+
};
|
|
3360
|
+
attribute: string;
|
|
3361
|
+
};
|
|
3362
|
+
minScale: {
|
|
3363
|
+
converter: {
|
|
3364
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3365
|
+
};
|
|
3366
|
+
attribute: string;
|
|
3367
|
+
};
|
|
3368
|
+
maxScale: {
|
|
3369
|
+
converter: {
|
|
3370
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3371
|
+
};
|
|
3372
|
+
attribute: string;
|
|
3373
|
+
};
|
|
3374
|
+
closeOnEscape: {
|
|
3375
|
+
converter: {
|
|
3376
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3377
|
+
};
|
|
3378
|
+
attribute: string;
|
|
3379
|
+
};
|
|
3380
|
+
closeOnInteractOutside: {
|
|
3381
|
+
converter: {
|
|
3382
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3383
|
+
};
|
|
3384
|
+
attribute: string;
|
|
3385
|
+
};
|
|
3386
|
+
restoreFocus: {
|
|
3387
|
+
converter: {
|
|
3388
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3389
|
+
};
|
|
3390
|
+
attribute: string;
|
|
3391
|
+
};
|
|
3392
|
+
items: {
|
|
3393
|
+
attribute: boolean;
|
|
3394
|
+
};
|
|
3395
|
+
translations: {
|
|
3396
|
+
attribute: boolean;
|
|
3397
|
+
};
|
|
3398
|
+
};
|
|
3399
|
+
open?: boolean;
|
|
3400
|
+
defaultOpen?: boolean;
|
|
3401
|
+
index?: number;
|
|
3402
|
+
defaultIndex?: number;
|
|
3403
|
+
loop?: boolean;
|
|
3404
|
+
zoomStep?: number;
|
|
3405
|
+
minScale?: number;
|
|
3406
|
+
maxScale?: number;
|
|
3407
|
+
closeOnEscape?: boolean;
|
|
3408
|
+
closeOnInteractOutside?: boolean;
|
|
3409
|
+
restoreFocus?: boolean;
|
|
3410
|
+
/** 图片清单。看单张就给长度 1 的数组。 */
|
|
3411
|
+
items?: ImageViewerItem[];
|
|
3412
|
+
/** 工具条按钮的可及名与计数文案;connect 每帧重写,只能从这里给。 */
|
|
3413
|
+
translations?: Partial<ImageViewerTranslations>;
|
|
3414
|
+
private readonly idGen;
|
|
3415
|
+
private readonly viewerScope;
|
|
3416
|
+
private config;
|
|
3417
|
+
private contentNode;
|
|
3418
|
+
private exit;
|
|
3419
|
+
private backdropNode;
|
|
3420
|
+
/** counter 的文本归属:首帧为空才代填,作者写过内容就不碰。 */
|
|
3421
|
+
private counterOwned;
|
|
3422
|
+
private readonly notifyOpen;
|
|
3423
|
+
private readonly notifyIndex;
|
|
3424
|
+
private readonly ctrl;
|
|
3425
|
+
private machineProps;
|
|
3426
|
+
private ensureConfig;
|
|
3427
|
+
/** 退场闸门建一次;presence 不是响应式 cell,退场结束要显式排一次更新才轮得到收起。 */
|
|
3428
|
+
private ensureExit;
|
|
3429
|
+
private readonly registerLayer;
|
|
3430
|
+
private injectRefs;
|
|
3431
|
+
protected wire(): void;
|
|
3432
|
+
disconnectedCallback(): void;
|
|
3433
|
+
}
|
|
3434
|
+
//#endregion
|
|
3137
3435
|
//#region src/elements/listbox.d.ts
|
|
3138
3436
|
/**
|
|
3139
3437
|
* `<xh-listbox>` —— Light-DOM 行为宿主:作者写 root/label/content 与若干 item 角色节点,
|
|
@@ -3434,6 +3732,29 @@ declare class XhMenuElement extends XhElement {
|
|
|
3434
3732
|
fromAttribute: (v: string | null) => string | undefined;
|
|
3435
3733
|
};
|
|
3436
3734
|
};
|
|
3735
|
+
submenu: {
|
|
3736
|
+
converter: {
|
|
3737
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3738
|
+
};
|
|
3739
|
+
};
|
|
3740
|
+
openOnHover: {
|
|
3741
|
+
converter: {
|
|
3742
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
3743
|
+
};
|
|
3744
|
+
attribute: string;
|
|
3745
|
+
};
|
|
3746
|
+
hoverOpenDelay: {
|
|
3747
|
+
converter: {
|
|
3748
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3749
|
+
};
|
|
3750
|
+
attribute: string;
|
|
3751
|
+
};
|
|
3752
|
+
hoverCloseDelay: {
|
|
3753
|
+
converter: {
|
|
3754
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
3755
|
+
};
|
|
3756
|
+
attribute: string;
|
|
3757
|
+
};
|
|
3437
3758
|
};
|
|
3438
3759
|
collection?: MenuNode[];
|
|
3439
3760
|
open?: boolean;
|
|
@@ -3444,6 +3765,10 @@ declare class XhMenuElement extends XhElement {
|
|
|
3444
3765
|
direction?: Direction;
|
|
3445
3766
|
tone?: Tone;
|
|
3446
3767
|
size?: Size;
|
|
3768
|
+
submenu?: boolean;
|
|
3769
|
+
openOnHover?: boolean;
|
|
3770
|
+
hoverOpenDelay?: number;
|
|
3771
|
+
hoverCloseDelay?: number;
|
|
3447
3772
|
private readonly idGen;
|
|
3448
3773
|
private readonly menuScope;
|
|
3449
3774
|
private readonly positionEngine;
|
|
@@ -4195,20 +4520,39 @@ declare class XhPopoverElement extends XhElement {
|
|
|
4195
4520
|
//#endregion
|
|
4196
4521
|
//#region src/elements/progress.d.ts
|
|
4197
4522
|
/**
|
|
4198
|
-
* `<xh-progress>` —— Light-DOM 行为宿主,无状态机,把 connectProgress
|
|
4523
|
+
* `<xh-progress>` —— Light-DOM 行为宿主,无状态机,把 connectProgress 产出打到各角色节点。
|
|
4524
|
+
*
|
|
4525
|
+
* 线形写三层 div(root > track > range);环形要把 track 与 range 写成 `<circle>`、
|
|
4526
|
+
* 外面套一层 `<svg>` 当 canvas,环心的文字放进 label:
|
|
4527
|
+
*
|
|
4528
|
+
* ```html
|
|
4529
|
+
* <xh-progress variant="circle" value="60">
|
|
4530
|
+
* <div data-part="root">
|
|
4531
|
+
* <svg data-part="canvas"><circle data-part="track" /><circle data-part="range" /></svg>
|
|
4532
|
+
* <div data-part="label">60%</div>
|
|
4533
|
+
* </div>
|
|
4534
|
+
* </xh-progress>
|
|
4535
|
+
* ```
|
|
4199
4536
|
*
|
|
4200
4537
|
* @customElement xh-progress
|
|
4201
4538
|
* @attr {number} value - 当前进度值,越界会被夹到 [0, max],默认 0
|
|
4202
4539
|
* @attr {number} max - 满值上限,默认 100
|
|
4540
|
+
* @attr {'line'|'circle'|'dashboard'} variant - 形态,默认 line
|
|
4541
|
+
* @attr {number} stroke-width - 环的线宽(viewBox 单位),默认 6;只对 circle / dashboard 生效
|
|
4542
|
+
* @attr {number} gap-degree - 缺口角度,默认 75;只对 dashboard 生效
|
|
4543
|
+
* @attr {'top'|'right'|'bottom'|'left'} gap-position - 缺口朝向,默认 bottom;只对 dashboard 生效
|
|
4544
|
+
* @attr {string} value-text - 读屏播报的文字,覆盖默认的数值播报
|
|
4203
4545
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
4204
|
-
* @attr {'sm'|'md'|'lg'} size -
|
|
4546
|
+
* @attr {'sm'|'md'|'lg'} size - 尺寸:线形改厚度,环形改直径
|
|
4205
4547
|
* @csspart root - role=progressbar 的容器(承载 aria-valuenow/aria-valuemax/data-state)
|
|
4206
|
-
* @csspart
|
|
4207
|
-
* @csspart
|
|
4548
|
+
* @csspart canvas - 承载环的 svg(线形不用)
|
|
4549
|
+
* @csspart track - 进度轨道:线形是满长背景,环形是整段弧
|
|
4550
|
+
* @csspart range - 已完成区段:线形写内联 inline-size,环形写 stroke-dashoffset
|
|
4551
|
+
* @csspart label - 环心那一块,写什么由使用者决定(线形不用)
|
|
4208
4552
|
*/
|
|
4209
4553
|
declare class XhProgressElement extends XhElement {
|
|
4210
4554
|
static partContract: {
|
|
4211
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "track" | "range">;
|
|
4555
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "track" | "range" | "canvas">;
|
|
4212
4556
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4213
4557
|
};
|
|
4214
4558
|
static properties: {
|
|
@@ -4218,11 +4562,31 @@ declare class XhProgressElement extends XhElement {
|
|
|
4218
4562
|
max: {
|
|
4219
4563
|
type: NumberConstructor;
|
|
4220
4564
|
};
|
|
4565
|
+
variant: {};
|
|
4566
|
+
strokeWidth: {
|
|
4567
|
+
type: NumberConstructor;
|
|
4568
|
+
attribute: string;
|
|
4569
|
+
};
|
|
4570
|
+
gapDegree: {
|
|
4571
|
+
type: NumberConstructor;
|
|
4572
|
+
attribute: string;
|
|
4573
|
+
};
|
|
4574
|
+
gapPosition: {
|
|
4575
|
+
attribute: string;
|
|
4576
|
+
};
|
|
4577
|
+
valueText: {
|
|
4578
|
+
attribute: string;
|
|
4579
|
+
};
|
|
4221
4580
|
tone: {};
|
|
4222
4581
|
size: {};
|
|
4223
4582
|
};
|
|
4224
4583
|
value?: number;
|
|
4225
4584
|
max?: number;
|
|
4585
|
+
variant?: ProgressVariant;
|
|
4586
|
+
strokeWidth?: number;
|
|
4587
|
+
gapDegree?: number;
|
|
4588
|
+
gapPosition?: ProgressGapPosition;
|
|
4589
|
+
valueText?: string;
|
|
4226
4590
|
tone?: Tone;
|
|
4227
4591
|
size?: Size;
|
|
4228
4592
|
protected wire(): void;
|
|
@@ -4318,6 +4682,7 @@ declare class XhRadioGroupElement extends XhElement {
|
|
|
4318
4682
|
* @attr {number} default-value - 非受控初值,缺省 0(还没评)
|
|
4319
4683
|
* @attr {number} count - 星星颗数,默认 5
|
|
4320
4684
|
* @attr {boolean} allow-half - 允许半颗星:档位从 1 变成 0.5
|
|
4685
|
+
* @attr {boolean} allow-clear - 再点当前档位清零,键盘最低档再往下也清;默认开,写 "false" 关
|
|
4321
4686
|
* @attr {boolean} disabled - 整个不可交互:整条带子退出 Tab 序列,指针与键盘都不认
|
|
4322
4687
|
* @attr {boolean} read-only - 只读:仍可聚焦与朗读,但改不动,也没有悬停预览
|
|
4323
4688
|
* @attr {boolean} required - 必填标注;表单影子据此参与原生校验
|
|
@@ -4336,7 +4701,7 @@ declare class XhRadioGroupElement extends XhElement {
|
|
|
4336
4701
|
*/
|
|
4337
4702
|
declare class XhRatingElement extends XhElement {
|
|
4338
4703
|
static partContract: {
|
|
4339
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "
|
|
4704
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "hidden-input" | "control">;
|
|
4340
4705
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4341
4706
|
};
|
|
4342
4707
|
static properties: {
|
|
@@ -4362,6 +4727,12 @@ declare class XhRatingElement extends XhElement {
|
|
|
4362
4727
|
};
|
|
4363
4728
|
attribute: string;
|
|
4364
4729
|
};
|
|
4730
|
+
allowClear: {
|
|
4731
|
+
converter: {
|
|
4732
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
4733
|
+
};
|
|
4734
|
+
attribute: string;
|
|
4735
|
+
};
|
|
4365
4736
|
disabled: {
|
|
4366
4737
|
converter: {
|
|
4367
4738
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
@@ -4404,6 +4775,7 @@ declare class XhRatingElement extends XhElement {
|
|
|
4404
4775
|
defaultValue?: number;
|
|
4405
4776
|
count?: number;
|
|
4406
4777
|
allowHalf?: boolean;
|
|
4778
|
+
allowClear?: boolean;
|
|
4407
4779
|
disabled?: boolean;
|
|
4408
4780
|
readOnly?: boolean;
|
|
4409
4781
|
required?: boolean;
|
|
@@ -4517,6 +4889,8 @@ declare class XhScrollAreaElement extends XhElement {
|
|
|
4517
4889
|
* @attr {boolean} open - 受控开合;缺省该属性即非受控
|
|
4518
4890
|
* @attr {boolean} default-open - 非受控初始为展开
|
|
4519
4891
|
* @attr {boolean} disabled - 整个控件禁用:trigger 用原生 disabled,表单影子不参与提交
|
|
4892
|
+
* @attr {boolean} invalid - 校验错误态:trigger 标红并输出 aria-invalid
|
|
4893
|
+
* @attr {number} max-tag-count - 多选标签最多摆几个,其余折进 api 的 overflowCount;缺省全摆
|
|
4520
4894
|
* @attr {boolean} required - 原生表单校验:无选中值时提交被拦下;多选下的门槛是至少选中一项
|
|
4521
4895
|
* @attr {string} name - 表单字段名;给定后表单影子才带 name 并参与提交
|
|
4522
4896
|
* @attr {string} placeholder - 无选中时 value-text 显示的占位文字
|
|
@@ -4535,6 +4909,10 @@ declare class XhScrollAreaElement extends XhElement {
|
|
|
4535
4909
|
* @csspart trigger - 触发按钮(aria-haspopup=listbox/aria-expanded/aria-controls 所在),同时是定位锚点,须是原生 button
|
|
4536
4910
|
* @csspart value-text - 选中项文本的显示位;留空即由元素填入 displayText,作者写了内容则归作者
|
|
4537
4911
|
* @csspart indicator - 展开指示符(aria-hidden,data-state 随开合)
|
|
4912
|
+
* @csspart control - 触发器与清空按钮的收纳容器兼定位基准;清空钮据此嵌进触发器右端、悬停时替换展开指示符
|
|
4913
|
+
* @csspart clear-trigger - 清空按钮:trigger 的兄弟节点(放进 control 即内嵌形态),没选中或禁用时带 hidden;可及名走 translations.clear
|
|
4914
|
+
* @csspart tag - 多选标签,须自带 value 属性标识选中值;放触发器里是纯展示,放外面配 tag-remove 可删
|
|
4915
|
+
* @csspart tag-remove - 标签删除按钮,须放在 tag 里;点按摘掉所在标签的选中值,可及名走 translations.removeTag
|
|
4538
4916
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
4539
4917
|
* @csspart content - role=listbox 容器(焦点域与消解层的根节点,键盘在此收口),收起时带 hidden
|
|
4540
4918
|
* @csspart item - role=option 条目,须自带 value 属性标识身份;禁用写 aria-disabled="true"
|
|
@@ -4544,7 +4922,7 @@ declare class XhScrollAreaElement extends XhElement {
|
|
|
4544
4922
|
*/
|
|
4545
4923
|
declare class XhSelectElement extends XhElement {
|
|
4546
4924
|
static partContract: {
|
|
4547
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "label" | "positioner" | "item-text" | "item-indicator" | "value-text" | "hidden-select">;
|
|
4925
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "label" | "positioner" | "item-text" | "item-indicator" | "clear-trigger" | "value-text" | "control" | "tag" | "tag-remove" | "hidden-select">;
|
|
4548
4926
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4549
4927
|
};
|
|
4550
4928
|
static properties: {
|
|
@@ -4574,6 +4952,9 @@ declare class XhSelectElement extends XhElement {
|
|
|
4574
4952
|
disabled: {
|
|
4575
4953
|
type: BooleanConstructor;
|
|
4576
4954
|
};
|
|
4955
|
+
invalid: {
|
|
4956
|
+
type: BooleanConstructor;
|
|
4957
|
+
};
|
|
4577
4958
|
required: {
|
|
4578
4959
|
type: BooleanConstructor;
|
|
4579
4960
|
};
|
|
@@ -4626,6 +5007,15 @@ declare class XhSelectElement extends XhElement {
|
|
|
4626
5007
|
fromAttribute: (v: string | null) => string | undefined;
|
|
4627
5008
|
};
|
|
4628
5009
|
};
|
|
5010
|
+
translations: {
|
|
5011
|
+
attribute: boolean;
|
|
5012
|
+
};
|
|
5013
|
+
maxTagCount: {
|
|
5014
|
+
converter: {
|
|
5015
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
5016
|
+
};
|
|
5017
|
+
attribute: string;
|
|
5018
|
+
};
|
|
4629
5019
|
};
|
|
4630
5020
|
collection?: SelectNode[];
|
|
4631
5021
|
value?: string | string[];
|
|
@@ -4633,6 +5023,7 @@ declare class XhSelectElement extends XhElement {
|
|
|
4633
5023
|
open?: boolean;
|
|
4634
5024
|
defaultOpen?: boolean;
|
|
4635
5025
|
disabled?: boolean;
|
|
5026
|
+
invalid?: boolean;
|
|
4636
5027
|
required?: boolean;
|
|
4637
5028
|
name?: string;
|
|
4638
5029
|
placeholder?: string;
|
|
@@ -4644,6 +5035,9 @@ declare class XhSelectElement extends XhElement {
|
|
|
4644
5035
|
variant?: ControlVariant;
|
|
4645
5036
|
tone?: Tone;
|
|
4646
5037
|
size?: Size;
|
|
5038
|
+
/** 读屏文案(clear 等);对象进不了属性,只作为 property 暴露。 */
|
|
5039
|
+
translations?: SelectSchema['props']['translations'];
|
|
5040
|
+
maxTagCount?: number;
|
|
4647
5041
|
private readonly idGen;
|
|
4648
5042
|
private readonly selectScope;
|
|
4649
5043
|
private readonly positionEngine;
|
|
@@ -4713,6 +5107,128 @@ declare class XhSeparatorElement extends XhElement {
|
|
|
4713
5107
|
protected wire(): void;
|
|
4714
5108
|
}
|
|
4715
5109
|
//#endregion
|
|
5110
|
+
//#region src/elements/side-nav.d.ts
|
|
5111
|
+
/**
|
|
5112
|
+
* `<xh-side-nav>` —— Light-DOM 行为宿主:管理后台侧栏导航。
|
|
5113
|
+
* 作者写 root/list 与若干 branch / link 角色节点,元素跑 side-nav 机器并把 connect 产出打上去。
|
|
5114
|
+
* 节点身份取自节点上的 value 属性;href 与禁用查 `collection` 这份树数据。
|
|
5115
|
+
*
|
|
5116
|
+
* @customElement xh-side-nav
|
|
5117
|
+
* @attr {string} value - 受控选中的叶子;缺省该属性即非受控
|
|
5118
|
+
* @attr {string} default-value - 非受控初始选中
|
|
5119
|
+
* @attr {boolean} accordion - 同层手风琴:展开一枝收起同层其余,默认 false
|
|
5120
|
+
* @attr {boolean} collapsed - 折叠成图标栏(内嵌展开整体收起、文字由皮肤藏掉;顶层分支换装浮层弹出)
|
|
5121
|
+
* @attr {boolean} collapsed-popout - 折叠态下顶层分支是否弹出子级面板,默认 true
|
|
5122
|
+
* @attr {boolean} disabled - 整个侧栏禁用
|
|
5123
|
+
* @attr {boolean} loop - 上下键走到首尾回绕,默认关
|
|
5124
|
+
* @attr {'ltr'|'rtl'} dir - 文字方向,只对调左右方向键的展开/收起语义,默认 ltr
|
|
5125
|
+
* @fires value-change - 选中变化;detail 为 `{ value: string | null }`
|
|
5126
|
+
* @fires expanded-change - 展开集合变化;detail 为 `{ value: string[] }`
|
|
5127
|
+
* @csspart root - nav 地标根容器(aria-label 由 translations.root 给)
|
|
5128
|
+
* @csspart list - 顶层列表容器
|
|
5129
|
+
* @csspart group - role=group 分组,须自带 value 属性
|
|
5130
|
+
* @csspart group-label - 分组标题(aria-labelledby 目标)
|
|
5131
|
+
* @csspart branch - 分支行容器,须自带 value 属性;它裹着自己的 branch-content
|
|
5132
|
+
* @csspart branch-trigger - 展开/收起按钮(aria-expanded / aria-controls)
|
|
5133
|
+
* @csspart branch-text - 行文字载体,折叠成图标栏时隐藏
|
|
5134
|
+
* @csspart branch-indicator - 展开方向指示符(aria-hidden)
|
|
5135
|
+
* @csspart branch-content - 内嵌子层容器,收起时隐藏
|
|
5136
|
+
* @csspart link - 去处链接,须自带 value 属性;选中输出 aria-current="page"
|
|
5137
|
+
* @csspart link-text - 链接文字载体,折叠成图标栏时隐藏
|
|
5138
|
+
*/
|
|
5139
|
+
declare class XhSideNavElement extends XhElement {
|
|
5140
|
+
static partContract: {
|
|
5141
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "list" | "link" | "group" | "group-label" | "branch" | "branch-trigger" | "branch-text" | "branch-indicator" | "branch-content" | "link-text">;
|
|
5142
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5143
|
+
};
|
|
5144
|
+
static properties: {
|
|
5145
|
+
value: {
|
|
5146
|
+
converter: {
|
|
5147
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5148
|
+
};
|
|
5149
|
+
};
|
|
5150
|
+
defaultValue: {
|
|
5151
|
+
converter: {
|
|
5152
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5153
|
+
};
|
|
5154
|
+
attribute: string;
|
|
5155
|
+
};
|
|
5156
|
+
accordion: {
|
|
5157
|
+
converter: {
|
|
5158
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
5159
|
+
};
|
|
5160
|
+
};
|
|
5161
|
+
collapsed: {
|
|
5162
|
+
converter: {
|
|
5163
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
5164
|
+
};
|
|
5165
|
+
};
|
|
5166
|
+
collapsedPopout: {
|
|
5167
|
+
converter: {
|
|
5168
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
5169
|
+
};
|
|
5170
|
+
attribute: string;
|
|
5171
|
+
};
|
|
5172
|
+
disabled: {
|
|
5173
|
+
converter: {
|
|
5174
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
5175
|
+
};
|
|
5176
|
+
};
|
|
5177
|
+
loop: {
|
|
5178
|
+
converter: {
|
|
5179
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
5180
|
+
};
|
|
5181
|
+
};
|
|
5182
|
+
direction: {
|
|
5183
|
+
converter: {
|
|
5184
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5185
|
+
};
|
|
5186
|
+
attribute: string;
|
|
5187
|
+
};
|
|
5188
|
+
collection: {
|
|
5189
|
+
attribute: boolean;
|
|
5190
|
+
};
|
|
5191
|
+
expandedValue: {
|
|
5192
|
+
attribute: boolean;
|
|
5193
|
+
};
|
|
5194
|
+
defaultExpandedValue: {
|
|
5195
|
+
attribute: boolean;
|
|
5196
|
+
};
|
|
5197
|
+
translations: {
|
|
5198
|
+
attribute: boolean;
|
|
5199
|
+
};
|
|
5200
|
+
};
|
|
5201
|
+
value?: string;
|
|
5202
|
+
defaultValue?: string;
|
|
5203
|
+
accordion?: boolean;
|
|
5204
|
+
collapsed?: boolean;
|
|
5205
|
+
collapsedPopout?: boolean;
|
|
5206
|
+
disabled?: boolean;
|
|
5207
|
+
loop?: boolean;
|
|
5208
|
+
direction?: SideNavSchema['props']['dir'];
|
|
5209
|
+
/** 入口树,href/禁用/层级的唯一事实源,须与标记同源。 */
|
|
5210
|
+
collection?: SideNavNode[];
|
|
5211
|
+
expandedValue?: string[];
|
|
5212
|
+
defaultExpandedValue?: string[];
|
|
5213
|
+
translations?: Partial<SideNavTranslations>;
|
|
5214
|
+
private readonly notifyValue;
|
|
5215
|
+
private readonly notifyExpanded;
|
|
5216
|
+
private readonly idGen;
|
|
5217
|
+
private readonly navScope;
|
|
5218
|
+
private readonly positionEngine;
|
|
5219
|
+
private config;
|
|
5220
|
+
private readonly ctrl;
|
|
5221
|
+
private machineProps;
|
|
5222
|
+
private ensureConfig;
|
|
5223
|
+
/** 当前弹出分支名下的角色节点:按归属分支的 value 现查。 */
|
|
5224
|
+
private findPopoutPart;
|
|
5225
|
+
private readonly registerLayer;
|
|
5226
|
+
private injectRefs;
|
|
5227
|
+
private nodeOf;
|
|
5228
|
+
disconnectedCallback(): void;
|
|
5229
|
+
protected wire(): void;
|
|
5230
|
+
}
|
|
5231
|
+
//#endregion
|
|
4716
5232
|
//#region src/elements/skeleton.d.ts
|
|
4717
5233
|
/**
|
|
4718
5234
|
* `<xh-skeleton>` —— 骨架屏宿主,无状态机,把 connectSkeleton 产出的属性打到角色节点上。
|
|
@@ -4768,6 +5284,7 @@ declare class XhSkeletonElement extends XhElement {
|
|
|
4768
5284
|
* @attr {number} step - 方向键与吸附网格的步长,默认 1
|
|
4769
5285
|
* @attr {number} large-step - PageUp/PageDown 的步长,默认 10 倍 step
|
|
4770
5286
|
* @attr {number} min-steps-between-thumbs - 相邻滑块至少隔几格,默认 0
|
|
5287
|
+
* @attr {boolean} snap-to-marks - 只认刻度落点:拖动、点按与键盘都吸到最近/下一档刻度;刻度表经 marks property 赋
|
|
4771
5288
|
* @attr {'horizontal'|'vertical'} orientation - 轨道朝向,默认 horizontal
|
|
4772
5289
|
* @attr {'ltr'|'rtl'} dir - 文字方向,只改写水平轨道上左右两键与指针的语义,默认 ltr
|
|
4773
5290
|
* @attr {boolean} disabled - 禁用:拇指退出 Tab 序列、推不动、不参与表单提交
|
|
@@ -4783,12 +5300,15 @@ declare class XhSkeletonElement extends XhElement {
|
|
|
4783
5300
|
* @csspart control - 指针命中区,按下即跳到落点并接管拖动
|
|
4784
5301
|
* @csspart track - 轨道本体,值与坐标的换算以它的矩形为准
|
|
4785
5302
|
* @csspart range - 已选区间,起止由内联逻辑属性给出
|
|
5303
|
+
* @csspart marks - 刻度容器
|
|
5304
|
+
* @csspart mark - 刻度点(纯装饰),须自带 value 属性;落进已选区间带 data-active
|
|
5305
|
+
* @csspart mark-label - 刻度文案,须自带 value 属性;点按把最近的滑块跳到这一档
|
|
4786
5306
|
* @csspart thumb - role=slider 的拇指,键盘交互全在它身上;多滑块须写 index 属性
|
|
4787
5307
|
* @csspart hidden-input - 拇指内的表单影子(须是原生 input)
|
|
4788
5308
|
*/
|
|
4789
5309
|
declare class XhSliderElement extends XhElement {
|
|
4790
5310
|
static partContract: {
|
|
4791
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "
|
|
5311
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "hidden-input" | "control" | "track" | "range" | "thumb" | "mark" | "marks" | "mark-label">;
|
|
4792
5312
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4793
5313
|
};
|
|
4794
5314
|
static properties: {
|
|
@@ -4830,6 +5350,15 @@ declare class XhSliderElement extends XhElement {
|
|
|
4830
5350
|
};
|
|
4831
5351
|
attribute: string;
|
|
4832
5352
|
};
|
|
5353
|
+
snapToMarks: {
|
|
5354
|
+
converter: {
|
|
5355
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
5356
|
+
};
|
|
5357
|
+
attribute: string;
|
|
5358
|
+
};
|
|
5359
|
+
marks: {
|
|
5360
|
+
attribute: boolean;
|
|
5361
|
+
};
|
|
4833
5362
|
orientation: {
|
|
4834
5363
|
converter: {
|
|
4835
5364
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -4883,6 +5412,9 @@ declare class XhSliderElement extends XhElement {
|
|
|
4883
5412
|
step?: number;
|
|
4884
5413
|
largeStep?: number;
|
|
4885
5414
|
minStepsBetweenThumbs?: number;
|
|
5415
|
+
/** 刻度表;数组进不了属性,只作为 property 暴露。 */
|
|
5416
|
+
marks?: SliderSchema['props']['marks'];
|
|
5417
|
+
snapToMarks?: boolean;
|
|
4886
5418
|
orientation?: Orientation;
|
|
4887
5419
|
direction?: Direction;
|
|
4888
5420
|
disabled?: boolean;
|
|
@@ -4969,16 +5501,16 @@ declare class XhSpinnerElement extends XhElement {
|
|
|
4969
5501
|
* 第 index 条分隔条坐在第 index 与第 index+1 块面板之间,调整的是前一块。
|
|
4970
5502
|
*
|
|
4971
5503
|
* @customElement xh-splitter
|
|
4972
|
-
* @attr {string}
|
|
4973
|
-
* @attr {string} default-
|
|
5504
|
+
* @attr {string} sizes - 受控布局,逗号分隔的百分比(如 "30,70");缺省该属性即非受控
|
|
5505
|
+
* @attr {string} default-sizes - 非受控初值,同样逗号分隔;缺省时按面板数等分
|
|
4974
5506
|
* @attr {string} panels - 逐块约束的 JSON 数组:id / min / max / collapsible / collapsedSize
|
|
4975
5507
|
* @attr {'horizontal'|'vertical'} orientation - 面板排布轴,默认 horizontal(并排)
|
|
4976
5508
|
* @attr {'ltr'|'rtl'} dir - 文字方向,只对调水平排布下左右两键与指针位移的正负,默认 ltr
|
|
4977
5509
|
* @attr {boolean} disabled - 禁用:分隔条退出 Tab 序列、拖不动也推不动
|
|
4978
5510
|
* @attr {number} step - 方向键的步长(百分比),默认 1
|
|
4979
5511
|
* @attr {number} large-step - Shift + 方向键的步长(百分比),默认 10
|
|
4980
|
-
* @fires
|
|
4981
|
-
* @fires
|
|
5512
|
+
* @fires sizes-change - 布局变化(拖动途中会连发);detail 为 `{ sizes: number[] }`
|
|
5513
|
+
* @fires sizes-change-end - 一次拖拽收尾发一次;detail 为 `{ sizes: number[], index: number }`
|
|
4982
5514
|
* @csspart root - 承载 data-orientation / data-disabled / data-dragging 的容器,矩形以它为准
|
|
4983
5515
|
* @csspart panel - 一块面板;尺寸由内联 flex-basis 给出,折叠时带 data-collapsed
|
|
4984
5516
|
* @csspart resize-trigger - role=separator 的分隔条,指针与键盘交互全在它身上
|
|
@@ -4989,12 +5521,12 @@ declare class XhSplitterElement extends XhElement {
|
|
|
4989
5521
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4990
5522
|
};
|
|
4991
5523
|
static properties: {
|
|
4992
|
-
|
|
5524
|
+
sizes: {
|
|
4993
5525
|
converter: {
|
|
4994
5526
|
fromAttribute: (v: string | null) => number[] | undefined;
|
|
4995
5527
|
};
|
|
4996
5528
|
};
|
|
4997
|
-
|
|
5529
|
+
defaultSizes: {
|
|
4998
5530
|
converter: {
|
|
4999
5531
|
fromAttribute: (v: string | null) => number[] | undefined;
|
|
5000
5532
|
};
|
|
@@ -5033,8 +5565,8 @@ declare class XhSplitterElement extends XhElement {
|
|
|
5033
5565
|
attribute: string;
|
|
5034
5566
|
};
|
|
5035
5567
|
};
|
|
5036
|
-
|
|
5037
|
-
|
|
5568
|
+
sizes?: number[];
|
|
5569
|
+
defaultSizes?: number[];
|
|
5038
5570
|
panels?: SplitterPanelProps[];
|
|
5039
5571
|
orientation?: Orientation;
|
|
5040
5572
|
direction?: Direction;
|
|
@@ -5180,15 +5712,18 @@ declare class XhStepsElement extends XhElement {
|
|
|
5180
5712
|
* @attr {boolean} checked - 受控开合;缺省该属性即非受控
|
|
5181
5713
|
* @attr {boolean} default-checked - 非受控初始为选中
|
|
5182
5714
|
* @attr {boolean} disabled - 禁用
|
|
5715
|
+
* @attr {boolean} loading - 提交中:交互挂起、滑块转圈,仍可聚焦(aria-busy)
|
|
5183
5716
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
5184
5717
|
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
5185
5718
|
* @fires checked-change - checked 状态变化;detail 为 `{ checked: boolean }`
|
|
5186
5719
|
* @csspart root - role=switch 的按钮(承载 aria-checked / data-state)
|
|
5187
5720
|
* @csspart thumb - 滑块
|
|
5721
|
+
* @attr {string} name - 表单字段名;给了 hidden-input 才参与提交
|
|
5722
|
+
* @csspart hidden-input - type=hidden 的表单出口,省略该节点即不参与表单
|
|
5188
5723
|
*/
|
|
5189
5724
|
declare class XhSwitchElement extends XhElement {
|
|
5190
5725
|
static partContract: {
|
|
5191
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "thumb">;
|
|
5726
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "hidden-input" | "thumb">;
|
|
5192
5727
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5193
5728
|
};
|
|
5194
5729
|
static properties: {
|
|
@@ -5204,12 +5739,28 @@ declare class XhSwitchElement extends XhElement {
|
|
|
5204
5739
|
disabled: {
|
|
5205
5740
|
type: BooleanConstructor;
|
|
5206
5741
|
};
|
|
5742
|
+
loading: {
|
|
5743
|
+
type: BooleanConstructor;
|
|
5744
|
+
};
|
|
5745
|
+
name: {
|
|
5746
|
+
converter: {
|
|
5747
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5748
|
+
};
|
|
5749
|
+
};
|
|
5750
|
+
value: {
|
|
5751
|
+
converter: {
|
|
5752
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
5753
|
+
};
|
|
5754
|
+
};
|
|
5207
5755
|
tone: {};
|
|
5208
5756
|
size: {};
|
|
5209
5757
|
};
|
|
5210
5758
|
checked?: boolean;
|
|
5211
5759
|
defaultChecked?: boolean;
|
|
5212
5760
|
disabled?: boolean;
|
|
5761
|
+
loading?: boolean;
|
|
5762
|
+
name?: string;
|
|
5763
|
+
value?: string;
|
|
5213
5764
|
tone?: Tone;
|
|
5214
5765
|
size?: Size;
|
|
5215
5766
|
private readonly notify;
|
|
@@ -5257,12 +5808,12 @@ declare class XhSwitchElement extends XhElement {
|
|
|
5257
5808
|
* @csspart sort-trigger - 排序把手,自占一个 Tab 位;按住 Shift 点是追加到排序链
|
|
5258
5809
|
* @csspart expand-trigger - 展开把手(aria-hidden 且不占 Tab 位,键盘那一路由左右方向键承担)
|
|
5259
5810
|
* @csspart expanded-row - role=row 详情行,须自带 value 属性与它所属的数据行配对,内部须放一个 cell 承载详情;收起时 hidden
|
|
5260
|
-
* @csspart empty
|
|
5811
|
+
* @csspart empty - 空态节点,表体为空且不在加载时显形
|
|
5261
5812
|
* @csspart loading-state - 加载态节点,表体为空且正在加载时显形
|
|
5262
5813
|
*/
|
|
5263
5814
|
declare class XhTableElement extends XhElement {
|
|
5264
5815
|
static partContract: {
|
|
5265
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "header" | "cell" | "expand-trigger" | "body" | "footer" | "
|
|
5816
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "header" | "cell" | "empty" | "expand-trigger" | "body" | "footer" | "select-all-trigger" | "row" | "column-header" | "caption" | "row-select-trigger" | "sort-trigger" | "expanded-row" | "loading-state">;
|
|
5266
5817
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5267
5818
|
};
|
|
5268
5819
|
static properties: {
|
|
@@ -5508,7 +6059,7 @@ declare class XhTabsElement extends XhElement {
|
|
|
5508
6059
|
*/
|
|
5509
6060
|
declare class XhTagsInputElement extends XhElement {
|
|
5510
6061
|
static partContract: {
|
|
5511
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "item-text" | "
|
|
6062
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "item-text" | "input" | "clear-trigger" | "hidden-input" | "control" | "item-preview" | "item-delete-trigger" | "item-input">;
|
|
5512
6063
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5513
6064
|
};
|
|
5514
6065
|
static properties: {
|
|
@@ -5667,6 +6218,7 @@ declare class XhTagsInputElement extends XhElement {
|
|
|
5667
6218
|
* @attr {string} name - 表单字段名;给了才参与提交
|
|
5668
6219
|
* @attr {number} max-length - 字符数上限;同时落成原生 maxlength 与机器侧截断
|
|
5669
6220
|
* @attr {boolean} clearable - 开启清空:清空按钮显出并在有值时可用,Escape 接管
|
|
6221
|
+
* @attr {boolean} auto-size - 多行宿主(input 部件写成 textarea)的自动高度;行数界限对象经 autoSize property 赋
|
|
5670
6222
|
* @attr {'outline'|'subtle'|'ghost'} variant - 视觉变体
|
|
5671
6223
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
5672
6224
|
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
@@ -5678,7 +6230,7 @@ declare class XhTagsInputElement extends XhElement {
|
|
|
5678
6230
|
*/
|
|
5679
6231
|
declare class XhTextFieldElement extends XhElement {
|
|
5680
6232
|
static partContract: {
|
|
5681
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "
|
|
6233
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "input" | "clear-trigger">;
|
|
5682
6234
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5683
6235
|
};
|
|
5684
6236
|
static properties: {
|
|
@@ -5735,6 +6287,12 @@ declare class XhTextFieldElement extends XhElement {
|
|
|
5735
6287
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
5736
6288
|
};
|
|
5737
6289
|
};
|
|
6290
|
+
autoSize: {
|
|
6291
|
+
converter: {
|
|
6292
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6293
|
+
};
|
|
6294
|
+
attribute: string;
|
|
6295
|
+
};
|
|
5738
6296
|
variant: {
|
|
5739
6297
|
converter: {
|
|
5740
6298
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -5761,6 +6319,8 @@ declare class XhTextFieldElement extends XhElement {
|
|
|
5761
6319
|
name?: string;
|
|
5762
6320
|
maxLength?: number;
|
|
5763
6321
|
clearable?: boolean;
|
|
6322
|
+
/** 布尔走 auto-size 属性;行数界限对象进不了属性,只作为 property 赋。 */
|
|
6323
|
+
autoSize?: TextFieldSchema['props']['autoSize'];
|
|
5764
6324
|
variant?: ControlVariant;
|
|
5765
6325
|
tone?: Tone;
|
|
5766
6326
|
size?: Size;
|
|
@@ -5858,7 +6418,7 @@ declare class XhThreadElement extends XhElement {
|
|
|
5858
6418
|
*/
|
|
5859
6419
|
declare class XhTimeFieldElement extends XhElement {
|
|
5860
6420
|
static partContract: {
|
|
5861
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "
|
|
6421
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "label" | "hidden-input" | "control" | "segment">;
|
|
5862
6422
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5863
6423
|
};
|
|
5864
6424
|
static properties: {
|
|
@@ -5978,7 +6538,7 @@ declare class XhTimeFieldElement extends XhElement {
|
|
|
5978
6538
|
//#region src/elements/time-picker.d.ts
|
|
5979
6539
|
/**
|
|
5980
6540
|
* `<xh-time-picker>` —— Light-DOM 行为宿主:作者写 root/label/control/input(多个)/trigger/
|
|
5981
|
-
* clear-trigger/positioner/content/column(多个)/
|
|
6541
|
+
* clear-trigger/positioner/content/column(多个)/item(多个)/hidden-input 角色节点,
|
|
5982
6542
|
* 元素跑 time-picker 机器并把 connect 产出打上去。浮层定位引擎在本元素里建好、经 refs 注入机器,
|
|
5983
6543
|
* 锚点取 control(浮层因此与整个输入行对齐),被定位的浮层取 positioner。
|
|
5984
6544
|
*
|
|
@@ -6016,12 +6576,12 @@ declare class XhTimeFieldElement extends XhElement {
|
|
|
6016
6576
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
6017
6577
|
* @csspart content - 浮层容器(消解层与焦点域的根节点),收起时带 hidden
|
|
6018
6578
|
* @csspart column - role=listbox 的一列,可自带 unit 属性声明单位,缺省按文档序
|
|
6019
|
-
* @csspart
|
|
6579
|
+
* @csspart item - role=option 的一格,须自带 value 属性(两位补零的显示串)
|
|
6020
6580
|
* @csspart hidden-input - type=hidden 的表单出口,值是完整 ISO 串
|
|
6021
6581
|
*/
|
|
6022
6582
|
declare class XhTimePickerElement extends XhElement {
|
|
6023
6583
|
static partContract: {
|
|
6024
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
6584
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "label" | "positioner" | "input" | "clear-trigger" | "column" | "hidden-input" | "control">;
|
|
6025
6585
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6026
6586
|
};
|
|
6027
6587
|
static properties: {
|
|
@@ -6723,6 +7283,7 @@ declare class XhTooltipElement extends XhElement {
|
|
|
6723
7283
|
* @attr {boolean} close-on-interact-outside - 层外交互关闭,默认 false;写 "true" 打开
|
|
6724
7284
|
* @attr {boolean} show-backdrop - 画遮罩,默认 true;写 show-backdrop="false" 关掉
|
|
6725
7285
|
* @attr {number} spotlight-padding - 高亮框在目标四周留出的空白(px),默认 8
|
|
7286
|
+
* @attr {boolean} auto-scroll - 展开与换步时自动把目标滚进视口(nearest),默认 true;写 auto-scroll="false" 关掉
|
|
6726
7287
|
* @fires open-change - open 状态变化;detail 为 `{ open: boolean }`
|
|
6727
7288
|
* @fires step-change - 步序变化;detail 为 `{ step: number }`
|
|
6728
7289
|
* @fires complete - 末步再按下一步;detail 为 `{ step: number }`
|
|
@@ -6801,6 +7362,12 @@ declare class XhTourElement extends XhElement {
|
|
|
6801
7362
|
};
|
|
6802
7363
|
attribute: string;
|
|
6803
7364
|
};
|
|
7365
|
+
autoScroll: {
|
|
7366
|
+
converter: {
|
|
7367
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
7368
|
+
};
|
|
7369
|
+
attribute: string;
|
|
7370
|
+
};
|
|
6804
7371
|
steps: {
|
|
6805
7372
|
attribute: boolean;
|
|
6806
7373
|
};
|
|
@@ -6818,6 +7385,7 @@ declare class XhTourElement extends XhElement {
|
|
|
6818
7385
|
closeOnInteractOutside?: boolean;
|
|
6819
7386
|
showBackdrop?: boolean;
|
|
6820
7387
|
spotlightPadding?: number;
|
|
7388
|
+
autoScroll?: boolean;
|
|
6821
7389
|
/** 步骤清单。它是步序的上界,也是读屏"第 m 步,共 n 步"的分母。 */
|
|
6822
7390
|
steps?: TourStep[];
|
|
6823
7391
|
/** 关闭按钮的无障碍名与进度文案;connect 每帧重写,作者写在节点上会被盖掉,只能从这里给。 */
|
|
@@ -6854,6 +7422,8 @@ declare class XhTourElement extends XhElement {
|
|
|
6854
7422
|
*/
|
|
6855
7423
|
private fillText;
|
|
6856
7424
|
protected wire(): void;
|
|
7425
|
+
/** 重量高亮框与浮层位置:目标节点被外部改动(换位、变尺寸)后调它校准。 */
|
|
7426
|
+
remeasure(): void;
|
|
6857
7427
|
private wireWith;
|
|
6858
7428
|
disconnectedCallback(): void;
|
|
6859
7429
|
}
|
|
@@ -6864,7 +7434,7 @@ declare class XhTourElement extends XhElement {
|
|
|
6864
7434
|
* root/source-panel/target-panel/panel-header/panel-title/panel-count/search/list/item/...
|
|
6865
7435
|
* 角色节点,元素跑 transfer 机器并把 connect 产出打上去。
|
|
6866
7436
|
*
|
|
6867
|
-
* 条目全集由 `
|
|
7437
|
+
* 条目全集由 `collection` 属性(property)给出,它是标签与禁用的唯一事实源;
|
|
6868
7438
|
* **两侧面板各挂一份全集**,不属于本侧、或被搜索筛掉的那一份由元素打上 hidden,
|
|
6869
7439
|
* 节点不卸载。条目身份取节点上的 `value` 属性,归哪一侧则取它落在哪个面板里。
|
|
6870
7440
|
*
|
|
@@ -6873,8 +7443,8 @@ declare class XhTourElement extends XhElement {
|
|
|
6873
7443
|
* 导航与勾选在事件那一刻按 data-scope+data-part 查活 DOM,依赖 connect 回写的 data-value,
|
|
6874
7444
|
* 因此 wire 必须先于交互跑过(基类 updated 已保证)。
|
|
6875
7445
|
*
|
|
6876
|
-
* 集合类输入(
|
|
6877
|
-
* `el.
|
|
7446
|
+
* 集合类输入(collection / value / selected / filter)都表达不成属性,只能走 property:
|
|
7447
|
+
* `el.collection = [...]`、`el.value = ['a']`。
|
|
6878
7448
|
*
|
|
6879
7449
|
* @customElement xh-transfer
|
|
6880
7450
|
* @attr {boolean} searchable - 每侧带一个搜索框;关掉时搜索框仍在 DOM 里但带 hidden
|
|
@@ -6883,7 +7453,7 @@ declare class XhTourElement extends XhElement {
|
|
|
6883
7453
|
* @attr {boolean} loop - 列表内方向键走到尽头回绕,默认 true;写 loop="false" 关掉
|
|
6884
7454
|
* @attr {'ltr'|'rtl'} dir - 文字方向,决定列表内哪个横向方向键是"搬向对面",默认 ltr
|
|
6885
7455
|
* @fires value-change - 落在右侧的值变化;detail 为 `{ value: string[] }`
|
|
6886
|
-
* @fires
|
|
7456
|
+
* @fires selection-change - 勾选集合变化;detail 为 `{ selected: string[] }`
|
|
6887
7457
|
* @csspart root - 组件根容器(承载 data-disabled/data-one-way)
|
|
6888
7458
|
* @csspart source-panel - 左侧面板容器,其内的角色节点一律归左侧
|
|
6889
7459
|
* @csspart target-panel - 右侧面板容器,其内的角色节点一律归右侧
|
|
@@ -6892,7 +7462,7 @@ declare class XhTourElement extends XhElement {
|
|
|
6892
7462
|
* @csspart panel-count - 计数节点,只带 data-count / data-checked-count,文案由作者写
|
|
6893
7463
|
* @csspart search - 本侧搜索框,须是原生 input;searchable 关掉时带 hidden
|
|
6894
7464
|
* @csspart list - role=listbox 容器,键盘在此收口,也是 roving tabindex 的兜底位
|
|
6895
|
-
* @csspart item - role=option 条目,须自带 value 属性标识身份;禁用写在
|
|
7465
|
+
* @csspart item - role=option 条目,须自带 value 属性标识身份;禁用写在 collection 里,不写在节点上
|
|
6896
7466
|
* @csspart item-text - 条目文本
|
|
6897
7467
|
* @csspart item-checkbox - 条目勾选标记(aria-hidden);oneWay 下右侧的那一份带 hidden
|
|
6898
7468
|
* @csspart select-all-trigger - 本侧全选格,须是原生 button;三态经 aria-checked 上报
|
|
@@ -6905,7 +7475,7 @@ declare class XhTransferElement extends XhElement {
|
|
|
6905
7475
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6906
7476
|
};
|
|
6907
7477
|
static properties: {
|
|
6908
|
-
|
|
7478
|
+
collection: {
|
|
6909
7479
|
attribute: boolean;
|
|
6910
7480
|
};
|
|
6911
7481
|
value: {
|
|
@@ -6945,7 +7515,7 @@ declare class XhTransferElement extends XhElement {
|
|
|
6945
7515
|
attribute: string;
|
|
6946
7516
|
};
|
|
6947
7517
|
};
|
|
6948
|
-
|
|
7518
|
+
collection?: TransferItem[];
|
|
6949
7519
|
value?: string[];
|
|
6950
7520
|
defaultValue?: string[];
|
|
6951
7521
|
selected?: string[];
|
|
@@ -6983,6 +7553,8 @@ declare class XhTransferElement extends XhElement {
|
|
|
6983
7553
|
*
|
|
6984
7554
|
* @customElement xh-tree
|
|
6985
7555
|
* @attr {'single'|'multiple'} selection-mode - 选择模式,默认 single
|
|
7556
|
+
* @attr {boolean} cascade - multiple 下父子级联勾选(整枝传导/半选/禁用冻结),默认 false
|
|
7557
|
+
* @attr {string} checked-strategy - 级联下对外值的收敛策略:child(默认)/ parent / all
|
|
6986
7558
|
* @attr {boolean} expand-on-click - 点分支行顺带展开/收起,默认开;写 expand-on-click="false" 关掉
|
|
6987
7559
|
* @attr {boolean} disabled - 整棵树禁用:所有节点转 aria-disabled,键盘与点击都改不了展开与选中
|
|
6988
7560
|
* @attr {boolean} loop - 上下键走到首尾回绕,默认关;写 loop="true" 打开
|
|
@@ -7005,7 +7577,7 @@ declare class XhTransferElement extends XhElement {
|
|
|
7005
7577
|
*/
|
|
7006
7578
|
declare class XhTreeElement extends XhElement {
|
|
7007
7579
|
static partContract: {
|
|
7008
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "item-text" | "item-indicator" | "
|
|
7580
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "label" | "item-text" | "item-indicator" | "branch" | "branch-trigger" | "branch-text" | "branch-indicator" | "branch-content" | "tree" | "branch-control">;
|
|
7009
7581
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7010
7582
|
};
|
|
7011
7583
|
static properties: {
|
|
@@ -7030,6 +7602,15 @@ declare class XhTreeElement extends XhElement {
|
|
|
7030
7602
|
};
|
|
7031
7603
|
attribute: string;
|
|
7032
7604
|
};
|
|
7605
|
+
cascade: {
|
|
7606
|
+
type: BooleanConstructor;
|
|
7607
|
+
};
|
|
7608
|
+
checkedStrategy: {
|
|
7609
|
+
converter: {
|
|
7610
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7611
|
+
};
|
|
7612
|
+
attribute: string;
|
|
7613
|
+
};
|
|
7033
7614
|
expandOnClick: {
|
|
7034
7615
|
converter: {
|
|
7035
7616
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
@@ -7062,6 +7643,8 @@ declare class XhTreeElement extends XhElement {
|
|
|
7062
7643
|
selectedValue?: string[];
|
|
7063
7644
|
defaultSelectedValue?: string[];
|
|
7064
7645
|
selectionMode?: TreeSelectionMode;
|
|
7646
|
+
cascade?: boolean;
|
|
7647
|
+
checkedStrategy?: TreeSchema['props']['checkedStrategy'];
|
|
7065
7648
|
expandOnClick?: boolean;
|
|
7066
7649
|
disabled?: boolean;
|
|
7067
7650
|
loop?: boolean;
|
|
@@ -7108,6 +7691,8 @@ declare class XhTreeElement extends XhElement {
|
|
|
7108
7691
|
* @attr {boolean} open - 受控开合;缺省该属性即非受控
|
|
7109
7692
|
* @attr {boolean} default-open - 非受控初始为展开
|
|
7110
7693
|
* @attr {boolean} multiple - 多选:选中后浮层不收起,焦点留在树里
|
|
7694
|
+
* @attr {boolean} cascade - 多选下父子级联勾选(整枝传导/半选/禁用冻结),默认 false
|
|
7695
|
+
* @attr {string} checked-strategy - 级联下对外值的收敛策略:child(默认)/ parent / all
|
|
7111
7696
|
* @attr {boolean} disabled - 整个控件禁用:trigger 用原生 disabled,表单出口不参与提交
|
|
7112
7697
|
* @attr {boolean} read-only - 只读:浮层照常展开、树照常浏览,但选中值改不动、也清不掉
|
|
7113
7698
|
* @attr {boolean} invalid - 校验失败标注
|
|
@@ -7130,8 +7715,8 @@ declare class XhTreeElement extends XhElement {
|
|
|
7130
7715
|
* @csspart indicator - 展开指示符(aria-hidden,data-state 随开合)
|
|
7131
7716
|
* @csspart clear-trigger - 清空按钮,须是原生 button;不占 Tab 位且对读屏隐藏
|
|
7132
7717
|
* @csspart positioner - 浮层定位容器,坐标由引擎写成内联样式
|
|
7133
|
-
* @csspart content -
|
|
7134
|
-
* @csspart tree - role=tree
|
|
7718
|
+
* @csspart content - 浮层壳(焦点域与消解层的根节点,键盘在此收口),收起时带 hidden
|
|
7719
|
+
* @csspart tree - role=tree 容器,没有锚点时的 Tab 兜底位与落焦点
|
|
7135
7720
|
* @csspart item - role=treeitem 叶子,须自带 value 属性标识身份
|
|
7136
7721
|
* @csspart item-text - 叶子文本
|
|
7137
7722
|
* @csspart item-indicator - 叶子选中标记(aria-hidden)
|
|
@@ -7145,7 +7730,7 @@ declare class XhTreeElement extends XhElement {
|
|
|
7145
7730
|
*/
|
|
7146
7731
|
declare class XhTreeSelectElement extends XhElement {
|
|
7147
7732
|
static partContract: {
|
|
7148
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "label" | "positioner" | "item-text" | "item-indicator" | "clear-trigger" | "value-text" | "hidden-input" | "
|
|
7733
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "label" | "positioner" | "item-text" | "item-indicator" | "clear-trigger" | "value-text" | "hidden-input" | "branch" | "branch-trigger" | "branch-text" | "branch-indicator" | "branch-content" | "tree" | "branch-control">;
|
|
7149
7734
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7150
7735
|
};
|
|
7151
7736
|
static properties: {
|
|
@@ -7181,6 +7766,15 @@ declare class XhTreeSelectElement extends XhElement {
|
|
|
7181
7766
|
multiple: {
|
|
7182
7767
|
type: BooleanConstructor;
|
|
7183
7768
|
};
|
|
7769
|
+
cascade: {
|
|
7770
|
+
type: BooleanConstructor;
|
|
7771
|
+
};
|
|
7772
|
+
checkedStrategy: {
|
|
7773
|
+
converter: {
|
|
7774
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7775
|
+
};
|
|
7776
|
+
attribute: string;
|
|
7777
|
+
};
|
|
7184
7778
|
disabled: {
|
|
7185
7779
|
type: BooleanConstructor;
|
|
7186
7780
|
};
|
|
@@ -7215,6 +7809,9 @@ declare class XhTreeSelectElement extends XhElement {
|
|
|
7215
7809
|
fromAttribute: (v: string | null) => string | undefined;
|
|
7216
7810
|
};
|
|
7217
7811
|
};
|
|
7812
|
+
translations: {
|
|
7813
|
+
attribute: boolean;
|
|
7814
|
+
};
|
|
7218
7815
|
placement: {
|
|
7219
7816
|
converter: {
|
|
7220
7817
|
fromAttribute: (v: string | null) => string | undefined;
|
|
@@ -7250,6 +7847,8 @@ declare class XhTreeSelectElement extends XhElement {
|
|
|
7250
7847
|
open?: boolean;
|
|
7251
7848
|
defaultOpen?: boolean;
|
|
7252
7849
|
multiple?: boolean;
|
|
7850
|
+
cascade?: boolean;
|
|
7851
|
+
checkedStrategy?: TreeSelectSchema['props']['checkedStrategy'];
|
|
7253
7852
|
disabled?: boolean;
|
|
7254
7853
|
readOnly?: boolean;
|
|
7255
7854
|
invalid?: boolean;
|
|
@@ -7257,6 +7856,8 @@ declare class XhTreeSelectElement extends XhElement {
|
|
|
7257
7856
|
tone?: Tone;
|
|
7258
7857
|
size?: Size;
|
|
7259
7858
|
placeholder?: string;
|
|
7859
|
+
/** 读屏文案(树容器兜底名字);对象进不了属性,只作为 property 暴露。 */
|
|
7860
|
+
translations?: TreeSelectSchema['props']['translations'];
|
|
7260
7861
|
placement?: Placement;
|
|
7261
7862
|
offset?: number;
|
|
7262
7863
|
loop?: boolean;
|
|
@@ -7422,5 +8023,5 @@ declare class XhVirtualizerElement extends XhElement {
|
|
|
7422
8023
|
//#region src/define.d.ts
|
|
7423
8024
|
declare function defineXhElements(): void;
|
|
7424
8025
|
//#endregion
|
|
7425
|
-
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, XhListboxElement, XhLoadingBarElement, XhMenuElement, XhMenubarElement, XhNavigationMenuElement, XhNumberFieldElement, XhPaginationElement, XhPinInputElement, XhPopoverElement, XhProgressElement, XhRadioGroupElement, XhRatingElement, XhScrollAreaElement, XhSelectElement, XhSeparatorElement, 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 };
|
|
8026
|
+
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 };
|
|
7426
8027
|
//# sourceMappingURL=define.d.ts.map
|