@xihan-ui/web-components 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +213 -0
- package/custom-elements.json +3108 -2080
- package/dist/backgrounds.js +1 -1
- package/dist/define.d.ts +355 -35
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +1161 -739
- package/dist/define.js.map +1 -1
- package/dist/{element-ib25-l85.js → element-b0p0Q8Py.js} +2 -2
- package/dist/{element-ib25-l85.js.map → element-b0p0Q8Py.js.map} +1 -1
- package/package.json +13 -12
package/dist/define.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { r as PropertyValues } from "./types-BvWWqMd_.js";
|
|
2
2
|
import { t as XhReactiveElement } from "./element-DRoFjrYO.js";
|
|
3
3
|
import { l as Spreader, n as XhConfigScope, t as XhConfig } from "./config-Cz16-P4i.js";
|
|
4
|
-
import { AccordionNode, AlertSchema, AnchorTranslations, BadgePlacement, 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, NotificationOptions, NotificationPlacement, NotificationRecord, NotificationTranslations, NotificationType, NumberFieldSchema, PaginationTranslations, PasswordInputTranslations, PinInputTranslations, PinInputType, PopoverTranslations, ProgressGapPosition, ProgressVariant, RadioGroupNode, ResolvedNotification, ScrollAreaOrientation, ScrollbarSchema, ScrollbarType, SegmentedNode, SelectNode, SelectSchema, SideNavNode, SideNavSchema, SideNavTranslations, SignaturePadDrawingOptions, SignaturePadTranslations, SkeletonVariant, SliderSchema, SliderValueTextDetails, SpaceProps, SpinnerTranslations, SplitterPanelProps, TableColumnDef, TableColumnKind, TableColumnPreference, TableRowDef, TableSelection, TableSelectionMode, TableSortDescriptor, TabsActivationMode, TabsNode, TabsVariant, TagSchema, TagVariant, TagsInputBlurBehavior, TextFieldSchema, TextFieldType, ThreadStatus, ThreadTranslations, TimeFieldSchema, TimeGranularity, TimeHourCycle, TimePickerPreset, TimePickerSchema, TimerSchema, ToastTranslations, ToastType, ToggleGroupNode, TourStep, TourTranslations, TransferFilter, TransferItem, TreeNode, TreeSchema, TreeSelectSchema, TreeSelectionMode, VirtualizerAlign, VirtualizerItemState, XhTranslationOverrides } from "@xihan-ui/headless";
|
|
4
|
+
import { AccordionNode, AlertSchema, AnchorTranslations, BadgePlacement, 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, NotificationOptions, NotificationPlacement, NotificationRecord, NotificationTranslations, NotificationType, NumberFieldSchema, PaginationTranslations, PasswordInputTranslations, PinInputTranslations, PinInputType, PopoverTranslations, ProgressGapPosition, ProgressVariant, RadioGroupNode, ResizableSize, ResolvedNotification, ScrollAreaOrientation, ScrollbarSchema, ScrollbarType, SegmentedNode, SelectNode, SelectSchema, SideNavNode, SideNavSchema, SideNavTranslations, SignaturePadDrawingOptions, SignaturePadTranslations, SkeletonVariant, SliderSchema, SliderValueTextDetails, SpaceProps, SpinnerTranslations, SplitterPanelProps, TableColumnDef, TableColumnKind, TableColumnPreference, TableRowDef, TableSchema, TableSelection, TableSelectionMode, TableSortDescriptor, TabsActivationMode, TabsNode, TabsTranslations, TabsVariant, TagSchema, TagVariant, TagsInputBlurBehavior, TextFieldSchema, TextFieldType, ThreadStatus, ThreadTranslations, TimeFieldSchema, TimeGranularity, TimeHourCycle, TimePickerPreset, TimePickerSchema, TimerSchema, ToastTranslations, ToastType, ToggleGroupNode, TourStep, TourTranslations, TransferFilter, TransferItem, TreeNode, TreeSchema, TreeSelectSchema, TreeSelectionMode, TreeTranslations, VirtualizerAlign, VirtualizerItemState, XhTranslationOverrides } from "@xihan-ui/headless";
|
|
5
5
|
import { MotionPreference } from "@xihan-ui/motion";
|
|
6
6
|
import { ActionVariant, ControlVariant, Direction, HighlighterPort, IconRecord, Orientation, Placement, Size, Tone } from "@xihan-ui/kernel";
|
|
7
|
+
import { ResizeEdge, SortableAxis } from "@xihan-ui/pointer";
|
|
7
8
|
//#region src/dom/part-contract.d.ts
|
|
8
9
|
/** 只取校验用得上的两项,避免把 `Anatomy<具体 part 联合>` 收窄成 `Anatomy<string>` 时不可赋值。 */
|
|
9
10
|
interface PartContract {
|
|
@@ -123,7 +124,7 @@ declare class XhAccordionElement extends XhElement {
|
|
|
123
124
|
private exitConfig;
|
|
124
125
|
private ensureExitConfig;
|
|
125
126
|
static partContract: {
|
|
126
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
127
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "header" | "trigger">;
|
|
127
128
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
128
129
|
};
|
|
129
130
|
static properties: {
|
|
@@ -252,7 +253,7 @@ declare class XhAlertElement extends XhElement {
|
|
|
252
253
|
*/
|
|
253
254
|
declare class XhAnchorElement extends XhElement {
|
|
254
255
|
static partContract: {
|
|
255
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
256
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "list" | "link">;
|
|
256
257
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
257
258
|
};
|
|
258
259
|
static properties: {
|
|
@@ -770,7 +771,7 @@ declare class XhCalendarElement extends XhElement {
|
|
|
770
771
|
*/
|
|
771
772
|
declare class XhCarouselElement extends XhElement {
|
|
772
773
|
static partContract: {
|
|
773
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
774
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "viewport" | "indicator" | "prev-trigger" | "next-trigger" | "item-group" | "indicator-group">;
|
|
774
775
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
775
776
|
};
|
|
776
777
|
static properties: {
|
|
@@ -918,7 +919,7 @@ declare class XhCarouselElement extends XhElement {
|
|
|
918
919
|
*/
|
|
919
920
|
declare class XhCascaderElement extends XhElement {
|
|
920
921
|
static partContract: {
|
|
921
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
922
|
+
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">;
|
|
922
923
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
923
924
|
};
|
|
924
925
|
static properties: {
|
|
@@ -1213,7 +1214,7 @@ declare class XhCheckboxElement extends XhElement {
|
|
|
1213
1214
|
*/
|
|
1214
1215
|
declare class XhCheckboxGroupElement extends XhElement {
|
|
1215
1216
|
static partContract: {
|
|
1216
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
1217
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "trigger" | "label" | "item-text" | "hidden-input">;
|
|
1217
1218
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1218
1219
|
};
|
|
1219
1220
|
static properties: {
|
|
@@ -1418,7 +1419,7 @@ declare class XhCollapsibleElement extends XhElement {
|
|
|
1418
1419
|
private config;
|
|
1419
1420
|
private ensureConfig;
|
|
1420
1421
|
static partContract: {
|
|
1421
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
1422
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger">;
|
|
1422
1423
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1423
1424
|
};
|
|
1424
1425
|
static properties: {
|
|
@@ -1497,7 +1498,7 @@ declare class XhCollapsibleElement extends XhElement {
|
|
|
1497
1498
|
*/
|
|
1498
1499
|
declare class XhColorPickerElement extends XhElement {
|
|
1499
1500
|
static partContract: {
|
|
1500
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
1501
|
+
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">;
|
|
1501
1502
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1502
1503
|
};
|
|
1503
1504
|
static properties: {
|
|
@@ -1673,7 +1674,7 @@ declare class XhColorPickerElement extends XhElement {
|
|
|
1673
1674
|
*/
|
|
1674
1675
|
declare class XhComboboxElement extends XhElement {
|
|
1675
1676
|
static partContract: {
|
|
1676
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "
|
|
1677
|
+
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">;
|
|
1677
1678
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
1678
1679
|
};
|
|
1679
1680
|
static properties: {
|
|
@@ -2009,7 +2010,7 @@ declare class XhConfigElement extends XhReactiveElement implements XhConfigScope
|
|
|
2009
2010
|
*/
|
|
2010
2011
|
declare class XhContextMenuElement extends XhElement {
|
|
2011
2012
|
static partContract: {
|
|
2012
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "
|
|
2013
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "separator" | "positioner" | "item-text" | "item-indicator" | "group" | "group-label" | "arrow">;
|
|
2013
2014
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2014
2015
|
};
|
|
2015
2016
|
static properties: {
|
|
@@ -2376,7 +2377,7 @@ declare class XhDateFieldElement extends XhElement {
|
|
|
2376
2377
|
*/
|
|
2377
2378
|
declare class XhDatePickerElement extends XhElement {
|
|
2378
2379
|
static partContract: {
|
|
2379
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
2380
|
+
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">;
|
|
2380
2381
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2381
2382
|
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" | "segment-group">)[];
|
|
2382
2383
|
};
|
|
@@ -2651,7 +2652,7 @@ declare class XhDatePickerElement extends XhElement {
|
|
|
2651
2652
|
*/
|
|
2652
2653
|
declare class XhDialogElement extends XhElement {
|
|
2653
2654
|
static partContract: {
|
|
2654
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"
|
|
2655
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"content" | "trigger" | "title" | "description" | "close-trigger" | "positioner" | "backdrop">;
|
|
2655
2656
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2656
2657
|
};
|
|
2657
2658
|
static properties: {
|
|
@@ -2807,7 +2808,7 @@ declare class XhDownloadTriggerElement extends XhElement {
|
|
|
2807
2808
|
*/
|
|
2808
2809
|
declare class XhDrawerElement extends XhElement {
|
|
2809
2810
|
static partContract: {
|
|
2810
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
2811
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "title" | "description" | "close-trigger" | "positioner" | "backdrop">;
|
|
2811
2812
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
2812
2813
|
};
|
|
2813
2814
|
static properties: {
|
|
@@ -3424,7 +3425,7 @@ declare class XhFileUploadElement extends XhElement {
|
|
|
3424
3425
|
*/
|
|
3425
3426
|
declare class XhFloatingPanelElement extends XhElement {
|
|
3426
3427
|
static partContract: {
|
|
3427
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
3428
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "header" | "trigger" | "title" | "close-trigger" | "positioner" | "body" | "drag-trigger" | "resize-trigger" | "stage-trigger">;
|
|
3428
3429
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3429
3430
|
};
|
|
3430
3431
|
static properties: {
|
|
@@ -3948,7 +3949,7 @@ declare class XhHotkeysElement extends XhElement {
|
|
|
3948
3949
|
*/
|
|
3949
3950
|
declare class XhHoverCardElement extends XhElement {
|
|
3950
3951
|
static partContract: {
|
|
3951
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
3952
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "positioner" | "arrow">;
|
|
3952
3953
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
3953
3954
|
};
|
|
3954
3955
|
static properties: {
|
|
@@ -4197,7 +4198,7 @@ declare class XhImageElement extends XhElement {
|
|
|
4197
4198
|
*/
|
|
4198
4199
|
declare class XhImageCropperElement extends XhElement {
|
|
4199
4200
|
static partContract: {
|
|
4200
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
4201
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "viewport" | "image" | "grid" | "hidden-input" | "crop-area" | "crop-handle">;
|
|
4201
4202
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4202
4203
|
};
|
|
4203
4204
|
static properties: {
|
|
@@ -4350,7 +4351,7 @@ declare class XhImageCropperElement extends XhElement {
|
|
|
4350
4351
|
*/
|
|
4351
4352
|
declare class XhImageViewerElement extends XhElement {
|
|
4352
4353
|
static partContract: {
|
|
4353
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"
|
|
4354
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"content" | "viewport" | "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">;
|
|
4354
4355
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4355
4356
|
};
|
|
4356
4357
|
static properties: {
|
|
@@ -4928,7 +4929,7 @@ declare class XhMasonryElement extends XhElement {
|
|
|
4928
4929
|
*/
|
|
4929
4930
|
declare class XhMenuElement extends XhElement {
|
|
4930
4931
|
static partContract: {
|
|
4931
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"item" | "
|
|
4932
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"item" | "content" | "trigger" | "separator" | "positioner" | "group" | "group-label" | "arrow">;
|
|
4932
4933
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
4933
4934
|
};
|
|
4934
4935
|
static properties: {
|
|
@@ -5091,7 +5092,7 @@ declare class XhMenubarElement extends XhElement {
|
|
|
5091
5092
|
/** 闸门只用到 reducedMotion,本元素别处不需要 config,建一份共用即可。 */
|
|
5092
5093
|
private exitConfig;
|
|
5093
5094
|
static partContract: {
|
|
5094
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "
|
|
5095
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "separator" | "positioner" | "item-text" | "item-indicator" | "group" | "group-label">;
|
|
5095
5096
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5096
5097
|
};
|
|
5097
5098
|
static properties: {
|
|
@@ -5230,7 +5231,7 @@ declare class XhNavigationMenuElement extends XhElement {
|
|
|
5230
5231
|
/** 退场闸门与消解层共用一份环境包。 */
|
|
5231
5232
|
private config;
|
|
5232
5233
|
static partContract: {
|
|
5233
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
5234
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "viewport" | "indicator" | "trigger" | "list" | "link">;
|
|
5234
5235
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
5235
5236
|
};
|
|
5236
5237
|
static properties: {
|
|
@@ -6148,7 +6149,7 @@ declare class XhPinInputElement extends XhElement {
|
|
|
6148
6149
|
*/
|
|
6149
6150
|
declare class XhPopoverElement extends XhElement {
|
|
6150
6151
|
static partContract: {
|
|
6151
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"
|
|
6152
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"content" | "trigger" | "title" | "description" | "close-trigger" | "positioner" | "arrow">;
|
|
6152
6153
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6153
6154
|
};
|
|
6154
6155
|
static properties: {
|
|
@@ -6340,7 +6341,7 @@ declare class XhProgressElement extends XhElement {
|
|
|
6340
6341
|
*/
|
|
6341
6342
|
declare class XhRadioGroupElement extends XhElement {
|
|
6342
6343
|
static partContract: {
|
|
6343
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
6344
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "label" | "item-text" | "hidden-input">;
|
|
6344
6345
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6345
6346
|
};
|
|
6346
6347
|
static properties: {
|
|
@@ -6533,6 +6534,146 @@ declare class XhRatingElement extends XhElement {
|
|
|
6533
6534
|
protected wire(): void;
|
|
6534
6535
|
}
|
|
6535
6536
|
//#endregion
|
|
6537
|
+
//#region src/elements/resizable.d.ts
|
|
6538
|
+
/**
|
|
6539
|
+
* `<xh-resizable>` —— Light-DOM 行为宿主:作者写 root 与八向 handle 角色节点,
|
|
6540
|
+
* 元素跑 resizable 机器并把 connect 产出打上去。
|
|
6541
|
+
*
|
|
6542
|
+
* 每个 handle 用 `edge` 属性写明自己是哪条边(`n` / `ne` / `e` / `se` / `s` / `sw` / `w` / `nw`),
|
|
6543
|
+
* 与 Vue 侧的 `:edge` 是同一份声明。
|
|
6544
|
+
*
|
|
6545
|
+
* 尺寸由元素每帧写进 root 的内联 `inline-size` / `block-size`,作者的样式表不要再碰这两条轴。
|
|
6546
|
+
* **推西边与北边时容器的起点会动**,那段位移写成 root 的 `left` / `top`——皮肤已给
|
|
6547
|
+
* `position: relative`,开箱即对;把 root 改成 `static` 会让这两个方向只变尺寸不移位。
|
|
6548
|
+
*
|
|
6549
|
+
* 键盘全在把手上:方向键按屏幕方向推一步(推东边时右键变宽、推西边时右键变窄,与拖动同义),
|
|
6550
|
+
* 按住 Shift 走大步,Home / End 推到这条边能到的两端。
|
|
6551
|
+
*
|
|
6552
|
+
* @customElement xh-resizable
|
|
6553
|
+
* @attr {string} size - 受控尺寸,写成 `宽x高`(如 `320x200`);缺省该属性即非受控
|
|
6554
|
+
* @attr {string} default-size - 非受控初值,同样写成 `宽x高`
|
|
6555
|
+
* @attr {number} min-width - 宽度下限
|
|
6556
|
+
* @attr {number} min-height - 高度下限
|
|
6557
|
+
* @attr {number} max-width - 宽度上限;不给即不封顶
|
|
6558
|
+
* @attr {number} max-height - 高度上限;不给即不封顶
|
|
6559
|
+
* @attr {number} aspect-ratio - 宽高比(宽 ÷ 高)。给了就锁死,四个角以宽为准
|
|
6560
|
+
* @attr {number} step - 吸附步进:宽高各自落到最近的整数倍
|
|
6561
|
+
* @attr {number} keyboard-step - 方向键一次推多远(px),默认 8
|
|
6562
|
+
* @attr {number} keyboard-large-step - 按住 Shift 时的步长(px),默认 40
|
|
6563
|
+
* @attr {string} edges - 开放哪几条边,逗号分隔(如 `e,s,se`);默认八向全开
|
|
6564
|
+
* @attr {boolean} disabled - 禁用:把手退出 Tab 序列,按下也不进调整
|
|
6565
|
+
* @attr {'ltr'|'rtl'} dir - 文字方向,只对调水平位移与左右两键的正负,默认 ltr
|
|
6566
|
+
* @fires size-change - 尺寸变化(拖动途中会连发);detail 为 `{ size }`
|
|
6567
|
+
* @fires size-change-end - 一次调整收尾发一次;detail 为 `{ size, edge }`
|
|
6568
|
+
* @csspart root - 承载 data-resizing / data-edge / data-disabled 的容器,尺寸写在它的内联样式上
|
|
6569
|
+
* @csspart handle - role=separator 的把手,指针与键盘交互全在它身上
|
|
6570
|
+
*/
|
|
6571
|
+
declare class XhResizableElement extends XhElement {
|
|
6572
|
+
static partContract: {
|
|
6573
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "handle">;
|
|
6574
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6575
|
+
};
|
|
6576
|
+
static properties: {
|
|
6577
|
+
size: {
|
|
6578
|
+
converter: {
|
|
6579
|
+
fromAttribute: (v: string | null) => ResizableSize | undefined;
|
|
6580
|
+
};
|
|
6581
|
+
};
|
|
6582
|
+
defaultSize: {
|
|
6583
|
+
converter: {
|
|
6584
|
+
fromAttribute: (v: string | null) => ResizableSize | undefined;
|
|
6585
|
+
};
|
|
6586
|
+
attribute: string;
|
|
6587
|
+
};
|
|
6588
|
+
minWidth: {
|
|
6589
|
+
converter: {
|
|
6590
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6591
|
+
};
|
|
6592
|
+
attribute: string;
|
|
6593
|
+
};
|
|
6594
|
+
minHeight: {
|
|
6595
|
+
converter: {
|
|
6596
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6597
|
+
};
|
|
6598
|
+
attribute: string;
|
|
6599
|
+
};
|
|
6600
|
+
maxWidth: {
|
|
6601
|
+
converter: {
|
|
6602
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6603
|
+
};
|
|
6604
|
+
attribute: string;
|
|
6605
|
+
};
|
|
6606
|
+
maxHeight: {
|
|
6607
|
+
converter: {
|
|
6608
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6609
|
+
};
|
|
6610
|
+
attribute: string;
|
|
6611
|
+
};
|
|
6612
|
+
aspectRatio: {
|
|
6613
|
+
converter: {
|
|
6614
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6615
|
+
};
|
|
6616
|
+
attribute: string;
|
|
6617
|
+
};
|
|
6618
|
+
step: {
|
|
6619
|
+
converter: {
|
|
6620
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6621
|
+
};
|
|
6622
|
+
};
|
|
6623
|
+
keyboardStep: {
|
|
6624
|
+
converter: {
|
|
6625
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6626
|
+
};
|
|
6627
|
+
attribute: string;
|
|
6628
|
+
};
|
|
6629
|
+
keyboardLargeStep: {
|
|
6630
|
+
converter: {
|
|
6631
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
6632
|
+
};
|
|
6633
|
+
attribute: string;
|
|
6634
|
+
};
|
|
6635
|
+
edges: {
|
|
6636
|
+
converter: {
|
|
6637
|
+
fromAttribute: (v: string | null) => ResizeEdge[] | undefined;
|
|
6638
|
+
};
|
|
6639
|
+
};
|
|
6640
|
+
disabled: {
|
|
6641
|
+
converter: {
|
|
6642
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
6643
|
+
};
|
|
6644
|
+
};
|
|
6645
|
+
direction: {
|
|
6646
|
+
converter: {
|
|
6647
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
6648
|
+
};
|
|
6649
|
+
attribute: string;
|
|
6650
|
+
};
|
|
6651
|
+
};
|
|
6652
|
+
size?: ResizableSize;
|
|
6653
|
+
defaultSize?: ResizableSize;
|
|
6654
|
+
minWidth?: number;
|
|
6655
|
+
minHeight?: number;
|
|
6656
|
+
maxWidth?: number;
|
|
6657
|
+
maxHeight?: number;
|
|
6658
|
+
aspectRatio?: number;
|
|
6659
|
+
step?: number;
|
|
6660
|
+
keyboardStep?: number;
|
|
6661
|
+
keyboardLargeStep?: number;
|
|
6662
|
+
edges?: ResizeEdge[];
|
|
6663
|
+
disabled?: boolean;
|
|
6664
|
+
direction?: Direction;
|
|
6665
|
+
private readonly idGen;
|
|
6666
|
+
private readonly resizableScope;
|
|
6667
|
+
private readonly notifySize;
|
|
6668
|
+
private readonly notifySizeEnd;
|
|
6669
|
+
private readonly ctrl;
|
|
6670
|
+
private machineProps;
|
|
6671
|
+
private injectRefs;
|
|
6672
|
+
/** 把手自报的边。没写就落东南角——那是文档流里最常见的那个。 */
|
|
6673
|
+
private edgeOf;
|
|
6674
|
+
protected wire(): void;
|
|
6675
|
+
}
|
|
6676
|
+
//#endregion
|
|
6536
6677
|
//#region src/elements/scroll-area.d.ts
|
|
6537
6678
|
/**
|
|
6538
6679
|
* `<xh-scroll-area>` —— Light-DOM 行为宿主:作者写 root/viewport/content 与两条 scrollbar
|
|
@@ -6804,7 +6945,7 @@ declare class XhScrollbarElement extends XhElement {
|
|
|
6804
6945
|
*/
|
|
6805
6946
|
declare class XhSegmentedElement extends XhElement {
|
|
6806
6947
|
static partContract: {
|
|
6807
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
6948
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "indicator" | "item-text" | "hidden-input">;
|
|
6808
6949
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6809
6950
|
};
|
|
6810
6951
|
static properties: {
|
|
@@ -6966,7 +7107,7 @@ declare class XhSegmentedElement extends XhElement {
|
|
|
6966
7107
|
*/
|
|
6967
7108
|
declare class XhSelectElement extends XhElement {
|
|
6968
7109
|
static partContract: {
|
|
6969
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
7110
|
+
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">;
|
|
6970
7111
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
6971
7112
|
};
|
|
6972
7113
|
static properties: {
|
|
@@ -7596,6 +7737,103 @@ declare class XhSliderElement extends XhElement {
|
|
|
7596
7737
|
protected wire(): void;
|
|
7597
7738
|
}
|
|
7598
7739
|
//#endregion
|
|
7740
|
+
//#region src/elements/sortable.d.ts
|
|
7741
|
+
/**
|
|
7742
|
+
* `<xh-sortable>` —— Light-DOM 行为宿主:作者写 root/item/item-handle/live-region 角色节点,
|
|
7743
|
+
* 元素跑 sortable 机器并把 connect 产出打上去。
|
|
7744
|
+
*
|
|
7745
|
+
* 顺序的唯一真源是 `ids`,DOM 里项的先后必须与它一致——几何按 DOM 量,事件按 `ids` 算。
|
|
7746
|
+
* 每个 item 与它的 item-handle 都要用 `item-id` 属性写明自己是哪一项(与 Vue 侧的 `:item-id` 同一份声明)。
|
|
7747
|
+
* 单独禁掉某一项写 `item-disabled`。不给 item-handle 时整项可拖。
|
|
7748
|
+
*
|
|
7749
|
+
* 拖动落点走乐观投影:拖动过程中其余项实时让位,松手即定。让位与跟手的位移由元素每帧
|
|
7750
|
+
* 写进内联 transform,作者的样式表不要再碰这条属性。
|
|
7751
|
+
*
|
|
7752
|
+
* 键盘全在手柄上:空格或回车拾起、方向键挪一格、再按空格放下、Esc 取消。
|
|
7753
|
+
* 拖动中的 Tab 会被拦下——焦点一旦移走,这一场就没有出口了。
|
|
7754
|
+
*
|
|
7755
|
+
* @customElement xh-sortable
|
|
7756
|
+
* @attr {string} ids - 顺序真源,逗号分隔的项标识(如 "a,b,c")
|
|
7757
|
+
* @attr {'horizontal'|'vertical'|'both'} orientation - 排序轴,默认 vertical;换行网格用 both
|
|
7758
|
+
* @attr {'ltr'|'rtl'} dir - 文字方向,只对调水平排布下左右两键的语义,默认 ltr
|
|
7759
|
+
* @attr {boolean} disabled - 禁用:手柄退出 Tab 序列,按下也不进拖动
|
|
7760
|
+
* @attr {number} activation-distance - 按下之后走多远才算开始拖,默认 5;给 0 表示按下即拖
|
|
7761
|
+
* @attr {boolean} auto-scroll - 拖到容器边缘时自动滚动,默认开
|
|
7762
|
+
* @fires sort - 顺序变化;detail 为 `{ from, to, id, ids }`,其中 ids 已重排好
|
|
7763
|
+
* @fires drag-start - 拾起;detail 为 `{ id, from, mode }`
|
|
7764
|
+
* @fires drag-end - 收尾(含取消);detail 为 `{ id, from, to, mode, canceled }`
|
|
7765
|
+
* @csspart root - 承载 data-orientation / data-disabled / data-dragging 的容器
|
|
7766
|
+
* @csspart item - 一项;位移由内联 transform 给出,被拖的那项带 data-dragging
|
|
7767
|
+
* @csspart item-handle - role=button 的拖拽手柄,指针与键盘交互全在它身上
|
|
7768
|
+
* @csspart live-region - 视觉隐藏的播报区,拖动过程的读屏文案写在这里
|
|
7769
|
+
*/
|
|
7770
|
+
declare class XhSortableElement extends XhElement {
|
|
7771
|
+
static partContract: {
|
|
7772
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "live-region" | "item-handle">;
|
|
7773
|
+
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7774
|
+
};
|
|
7775
|
+
static properties: {
|
|
7776
|
+
ids: {
|
|
7777
|
+
converter: {
|
|
7778
|
+
fromAttribute: (v: string | null) => string[] | undefined;
|
|
7779
|
+
};
|
|
7780
|
+
};
|
|
7781
|
+
orientation: {
|
|
7782
|
+
converter: {
|
|
7783
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7784
|
+
};
|
|
7785
|
+
};
|
|
7786
|
+
direction: {
|
|
7787
|
+
converter: {
|
|
7788
|
+
fromAttribute: (v: string | null) => string | undefined;
|
|
7789
|
+
};
|
|
7790
|
+
attribute: string;
|
|
7791
|
+
};
|
|
7792
|
+
disabled: {
|
|
7793
|
+
converter: {
|
|
7794
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
7795
|
+
};
|
|
7796
|
+
};
|
|
7797
|
+
activationDistance: {
|
|
7798
|
+
converter: {
|
|
7799
|
+
fromAttribute: (v: string | null) => number | undefined;
|
|
7800
|
+
};
|
|
7801
|
+
attribute: string;
|
|
7802
|
+
};
|
|
7803
|
+
autoScroll: {
|
|
7804
|
+
converter: {
|
|
7805
|
+
fromAttribute: (v: string | null) => boolean | undefined;
|
|
7806
|
+
};
|
|
7807
|
+
attribute: string;
|
|
7808
|
+
};
|
|
7809
|
+
};
|
|
7810
|
+
ids?: string[];
|
|
7811
|
+
orientation?: SortableAxis;
|
|
7812
|
+
direction?: Direction;
|
|
7813
|
+
disabled?: boolean;
|
|
7814
|
+
activationDistance?: number;
|
|
7815
|
+
autoScroll?: boolean;
|
|
7816
|
+
private readonly idGen;
|
|
7817
|
+
private readonly sortableScope;
|
|
7818
|
+
private readonly notifySort;
|
|
7819
|
+
private readonly notifyDragStart;
|
|
7820
|
+
private readonly notifyDragEnd;
|
|
7821
|
+
private readonly ctrl;
|
|
7822
|
+
private machineProps;
|
|
7823
|
+
private injectRefs;
|
|
7824
|
+
/**
|
|
7825
|
+
* 部件自报的项标识。作者在节点上写 item-id="a",与 Vue 侧的 `:id` 是同一份声明;
|
|
7826
|
+
* 没写就落空串——connect 那边找不到对应项,会当作不可拖的普通节点。
|
|
7827
|
+
*
|
|
7828
|
+
* 不用 `id`:那是 HTML 全局属性,写上去会留在 DOM 里(Vue 侧的同名 prop 不会),
|
|
7829
|
+
* 而且同一项的外壳与手柄同名时会造出两个相同的 DOM id。
|
|
7830
|
+
*/
|
|
7831
|
+
private partId;
|
|
7832
|
+
/** 项级禁用。写 item-disabled 即禁掉这一项,与列表级的 disabled 各管各的。 */
|
|
7833
|
+
private partDisabled;
|
|
7834
|
+
protected wire(): void;
|
|
7835
|
+
}
|
|
7836
|
+
//#endregion
|
|
7599
7837
|
//#region src/elements/space.d.ts
|
|
7600
7838
|
/**
|
|
7601
7839
|
* `<xh-space>` —— Light-DOM 行为宿主,无状态机,把 connectSpace 产出打到 root 角色节点。
|
|
@@ -7856,7 +8094,7 @@ declare class XhSplitterElement extends XhElement {
|
|
|
7856
8094
|
*/
|
|
7857
8095
|
declare class XhStepsElement extends XhElement {
|
|
7858
8096
|
static partContract: {
|
|
7859
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
8097
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "indicator" | "trigger" | "title" | "description" | "list" | "separator">;
|
|
7860
8098
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
7861
8099
|
};
|
|
7862
8100
|
static properties: {
|
|
@@ -8020,6 +8258,8 @@ declare class XhSwitchElement extends XhElement {
|
|
|
8020
8258
|
}
|
|
8021
8259
|
//#endregion
|
|
8022
8260
|
//#region src/elements/table.d.ts
|
|
8261
|
+
/** 行换位事件的 detail:从机器 props 上的回调取,不在适配器里另抄一份类型。 */
|
|
8262
|
+
type TableRowMoveDetails = Parameters<NonNullable<TableSchema['props']['onRowMove']>>[0];
|
|
8023
8263
|
/**
|
|
8024
8264
|
* `<xh-table>` —— Light-DOM 行为宿主:作者写 root/caption/header/body/footer 与若干
|
|
8025
8265
|
* row / column-header / cell 角色节点,元素跑 table 机器并把 connect 产出打上去。
|
|
@@ -8031,7 +8271,13 @@ declare class XhSwitchElement extends XhElement {
|
|
|
8031
8271
|
* 同一个 row 部件写在 header / body / footer 里语义不同(表头行、数据行、脚注行),
|
|
8032
8272
|
* 元素按祖先链现查区段,作者无需换用别的部件名。
|
|
8033
8273
|
*
|
|
8034
|
-
* 两份定义与三个集合都是数组/对象,只走 property(`el.rows = [...]
|
|
8274
|
+
* 两份定义与三个集合都是数组/对象,只走 property(`el.rows = [...]`);
|
|
8275
|
+
* 落点校验 `allowRowDrop`(函数)同理。
|
|
8276
|
+
*
|
|
8277
|
+
* 打开 row-reorderable 后行可以拖着换位:整行都是拖动源。落点画在参照行上——
|
|
8278
|
+
* data-drop 为 before/after 是插在这一行前后;rows 带 parentId 的树形表另有 inside,
|
|
8279
|
+
* 是放进这一行底下,只有可展开或已经有孩子的行给这一档。触屏那一路走 row-drag-trigger 把手。
|
|
8280
|
+
* 键盘走 Alt + 方向键:上下在同层挪一位,左右在树形表下改缩进层级(rtl 下左右对调)。
|
|
8035
8281
|
*
|
|
8036
8282
|
* @customElement xh-table
|
|
8037
8283
|
* @attr {'none'|'single'|'multiple'} selection-mode - 选择模式,默认 none(不声明就没有选择这回事)
|
|
@@ -8042,6 +8288,7 @@ declare class XhSwitchElement extends XhElement {
|
|
|
8042
8288
|
* @attr {boolean} borderless - 去掉外框,只留行间横线
|
|
8043
8289
|
* @attr {boolean} ruled - 列与列之间加竖分隔线
|
|
8044
8290
|
* @attr {boolean} footer - 表格带脚注行:行号空间的最后一行留给它,aria-rowcount 也算上
|
|
8291
|
+
* @attr {boolean} row-reorderable - 行可以拖着换位:整行都是拖动源;触屏那一路走 row-drag-trigger 把手
|
|
8045
8292
|
* @attr {boolean} loop - 上下键走到首尾回绕,默认关;写 loop="true" 打开
|
|
8046
8293
|
* @attr {'ltr'|'rtl'} dir - 文字方向,只对调左右方向键的展开/收起语义,默认 ltr
|
|
8047
8294
|
* @attr {'sm'|'md'|'lg'} size - 密度:只换单元格的纵向内边距与字号,列宽不受影响
|
|
@@ -8051,6 +8298,8 @@ declare class XhSwitchElement extends XhElement {
|
|
|
8051
8298
|
* @prop {TableColumnKind[]} prefixColumns - 要哪几列前缀列,按给定顺序插在最前面
|
|
8052
8299
|
* @fires selection-change - 选中集合变化;detail 为 `{ value: string[] | 'all' }`
|
|
8053
8300
|
* @fires expanded-change - 展开集合变化;detail 为 `{ value: string[] }`
|
|
8301
|
+
* @fires row-move - 行换了位置;detail 为 `{ id, parent, index, ids }`,parent 为 null 即根层,index 是在那一层的落位(已算过先摘后插),ids 是重排好的整份行序
|
|
8302
|
+
* @prop {(move: TableRowMoveDetails) => boolean} allowRowDrop - 这一次搬家许不许,收到的是折算好的落点;不给即都许
|
|
8054
8303
|
* @csspart root - role=grid 容器(rows 里有可展开的行时为 treegrid),报行列总数与多选声明
|
|
8055
8304
|
* @csspart caption - 表格标题(aria-labelledby 目标)
|
|
8056
8305
|
* @csspart header - role=rowgroup 表头区
|
|
@@ -8062,6 +8311,10 @@ declare class XhSwitchElement extends XhElement {
|
|
|
8062
8311
|
* @csspart select-all-trigger - 全选把手,三态(aria-checked 半选为 mixed),自占一个 Tab 位
|
|
8063
8312
|
* @csspart row-select-trigger - 行选择把手(aria-hidden 且不占 Tab 位,键盘那一路由 Space 承担)
|
|
8064
8313
|
* @csspart sort-trigger - 排序把手,自占一个 Tab 位;按住 Shift 点是追加到排序链
|
|
8314
|
+
* @csspart column-resize-trigger - 列宽把手,自占一个 Tab 位;方向键改一步、按住 Shift 是大步
|
|
8315
|
+
* @csspart column-drag-trigger - 列拖拽把手,自占一个 Tab 位;方向键移一位、Home/End 移到可拖区段首末
|
|
8316
|
+
* @csspart row-drag-trigger - 行拖拽把手,触屏那一路的入口(自带 touch-action: none,按下即拖);对读屏隐藏且不占 Tab 位,键盘那一路由表体上的 Alt + 方向键承担
|
|
8317
|
+
* @csspart live-region - 视觉隐藏的播报区,列拖拽过程的读屏文案写在这里;须写在 root 之外(root 是 role=grid,它的子节点只能是 row 与 rowgroup)
|
|
8065
8318
|
* @csspart expand-trigger - 展开把手(aria-hidden 且不占 Tab 位,键盘那一路由左右方向键承担)
|
|
8066
8319
|
* @csspart expanded-row - role=row 详情行,须自带 value 属性与它所属的数据行配对,内部须放一个 cell 承载详情;收起时 hidden
|
|
8067
8320
|
* @csspart empty - 空态节点,表体为空且不在加载时显形
|
|
@@ -8069,7 +8322,7 @@ declare class XhSwitchElement extends XhElement {
|
|
|
8069
8322
|
*/
|
|
8070
8323
|
declare class XhTableElement extends XhElement {
|
|
8071
8324
|
static partContract: {
|
|
8072
|
-
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">;
|
|
8325
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "header" | "cell" | "empty" | "expand-trigger" | "body" | "row" | "footer" | "live-region" | "select-all-trigger" | "column-header" | "caption" | "row-select-trigger" | "sort-trigger" | "column-resize-trigger" | "column-drag-trigger" | "row-drag-trigger" | "expanded-row" | "loading-state">;
|
|
8073
8326
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
8074
8327
|
};
|
|
8075
8328
|
static properties: {
|
|
@@ -8147,6 +8400,13 @@ declare class XhTableElement extends XhElement {
|
|
|
8147
8400
|
footer: {
|
|
8148
8401
|
type: BooleanConstructor;
|
|
8149
8402
|
};
|
|
8403
|
+
rowReorderable: {
|
|
8404
|
+
type: BooleanConstructor;
|
|
8405
|
+
attribute: string;
|
|
8406
|
+
};
|
|
8407
|
+
allowRowDrop: {
|
|
8408
|
+
attribute: boolean;
|
|
8409
|
+
};
|
|
8150
8410
|
loop: {
|
|
8151
8411
|
converter: {
|
|
8152
8412
|
fromAttribute: (v: string | null) => boolean | undefined;
|
|
@@ -8185,6 +8445,8 @@ declare class XhTableElement extends XhElement {
|
|
|
8185
8445
|
borderless?: boolean;
|
|
8186
8446
|
ruled?: boolean;
|
|
8187
8447
|
footer?: boolean;
|
|
8448
|
+
rowReorderable?: boolean;
|
|
8449
|
+
allowRowDrop?: (move: TableRowMoveDetails) => boolean;
|
|
8188
8450
|
loop?: boolean;
|
|
8189
8451
|
direction?: Direction;
|
|
8190
8452
|
size?: Size;
|
|
@@ -8192,6 +8454,7 @@ declare class XhTableElement extends XhElement {
|
|
|
8192
8454
|
private readonly notifySort;
|
|
8193
8455
|
private readonly notifySelection;
|
|
8194
8456
|
private readonly notifyExpanded;
|
|
8457
|
+
private readonly notifyRowMove;
|
|
8195
8458
|
private readonly ctrl;
|
|
8196
8459
|
private machineProps;
|
|
8197
8460
|
/** 承载焦点的行被移出 DOM 时上报 TABLE.BLUR,让机器重挑焦点锚点。 */
|
|
@@ -8203,6 +8466,11 @@ declare class XhTableElement extends XhElement {
|
|
|
8203
8466
|
private identityOf;
|
|
8204
8467
|
private rowOf;
|
|
8205
8468
|
private columnOf;
|
|
8469
|
+
/**
|
|
8470
|
+
* 播报区节点。第一次用时建出来挂在元素末尾,之后一直复用——
|
|
8471
|
+
* 读屏不播报后插入的节点,等到拾起才建等于没有。
|
|
8472
|
+
*/
|
|
8473
|
+
private ensureLiveRegion;
|
|
8206
8474
|
/** 按祖先链现查行所在的区段。 */
|
|
8207
8475
|
private sectionOf;
|
|
8208
8476
|
protected wire(): void;
|
|
@@ -8213,6 +8481,13 @@ declare class XhTableElement extends XhElement {
|
|
|
8213
8481
|
* `<xh-tabs>` —— Light-DOM 行为宿主,跑 tabs 机器并把 connect 产出打到 root/list/trigger/content
|
|
8214
8482
|
* 角色节点上。条目身份取作者写在 trigger/content 上的 value 属性,trigger 的禁用由部件自报。
|
|
8215
8483
|
*
|
|
8484
|
+
* 读屏文案 `translations` 是对象,属性表达不了,只能走 property(`el.translations = {...}`)。
|
|
8485
|
+
*
|
|
8486
|
+
* 打开 reorderable 后标签可以拖着换位:整个标签都是拖动源。拖动中被拖的标签原地不动,
|
|
8487
|
+
* 只落 data-dragging;落点画在参照标签上,data-drop 为 before/after 即插在这个标签前后。触屏那一路走 tab-drag-trigger 把手。
|
|
8488
|
+
* 键盘走 Alt + 主轴方向键(横排是左右、竖排是上下,横排 rtl 下左右对调),一按就是一次完整提交。
|
|
8489
|
+
* 顺序不由元素保管:换位只发 tab-move,标签序由使用方写回自己的数据源。
|
|
8490
|
+
*
|
|
8216
8491
|
* @customElement xh-tabs
|
|
8217
8492
|
* @attr {string} value - 受控选中值;缺省该属性即非受控
|
|
8218
8493
|
* @attr {string} default-value - 非受控的初始选中值
|
|
@@ -8223,15 +8498,19 @@ declare class XhTableElement extends XhElement {
|
|
|
8223
8498
|
* @attr {'line'|'card'|'segment'} variant - 形态,默认 line
|
|
8224
8499
|
* @attr {'brand'|'neutral'|'success'|'warning'|'danger'|'info'} tone - 语气
|
|
8225
8500
|
* @attr {'sm'|'md'|'lg'} size - 尺寸
|
|
8501
|
+
* @attr {boolean} reorderable - 标签可以拖着换位,默认关
|
|
8226
8502
|
* @fires value-change - 选中值变化;detail 为 `{ value: string | null }`
|
|
8503
|
+
* @fires tab-move - 标签换了位;detail 为 `{ value, from, to, values }`,values 是重排好的整份标签序
|
|
8227
8504
|
* @csspart root - 组件根容器(承载 data-orientation)
|
|
8228
8505
|
* @csspart list - role=tablist 容器(方向键与 Tab 序列在此收口)
|
|
8506
|
+
* @csspart live-region - 视觉隐藏的播报区,拖动过程的读屏文案写在这里;写在 root 里、与 list 部件平级(root 自己不带角色,它落不进 role=tablist 的子节点集合)
|
|
8229
8507
|
* @csspart trigger - role=tab 的标签按钮,须自带 value 属性标识身份
|
|
8230
8508
|
* @csspart content - role=tabpanel 的面板,须自带 value 属性与 trigger 配对;未选中时 hidden
|
|
8509
|
+
* @csspart tab-drag-trigger - 标签拖拽把手,触屏那一路的入口(自带 touch-action: none,按下即拖);对读屏隐藏且不占 Tab 位,键盘那一路由标签带上的 Alt + 方向键承担
|
|
8231
8510
|
*/
|
|
8232
8511
|
declare class XhTabsElement extends XhElement {
|
|
8233
8512
|
static partContract: {
|
|
8234
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
8513
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "trigger" | "list" | "live-region" | "tab-drag-trigger">;
|
|
8235
8514
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
8236
8515
|
};
|
|
8237
8516
|
static properties: {
|
|
@@ -8286,6 +8565,12 @@ declare class XhTabsElement extends XhElement {
|
|
|
8286
8565
|
fromAttribute: (v: string | null) => string | undefined;
|
|
8287
8566
|
};
|
|
8288
8567
|
};
|
|
8568
|
+
reorderable: {
|
|
8569
|
+
type: BooleanConstructor;
|
|
8570
|
+
};
|
|
8571
|
+
translations: {
|
|
8572
|
+
attribute: boolean;
|
|
8573
|
+
};
|
|
8289
8574
|
};
|
|
8290
8575
|
collection?: TabsNode[];
|
|
8291
8576
|
value?: string;
|
|
@@ -8297,13 +8582,22 @@ declare class XhTabsElement extends XhElement {
|
|
|
8297
8582
|
variant?: TabsVariant;
|
|
8298
8583
|
tone?: Tone;
|
|
8299
8584
|
size?: Size;
|
|
8585
|
+
reorderable?: boolean;
|
|
8586
|
+
translations?: Partial<TabsTranslations>;
|
|
8300
8587
|
private readonly notify;
|
|
8588
|
+
private readonly notifyTabMove;
|
|
8301
8589
|
private readonly ctrl;
|
|
8302
8590
|
/** 作者声明的条目禁用,只认首见那一份;给了 collection 时用它,否则现读 */
|
|
8303
8591
|
private readonly declaredDisabled;
|
|
8304
8592
|
private machineProps;
|
|
8305
8593
|
/** 承载焦点的条目被移出 DOM 时浏览器不派 focusout,这里替 DOM 上报焦点离场。 */
|
|
8306
8594
|
protected onPartsReleased(nodes: readonly HTMLElement[]): void;
|
|
8595
|
+
/**
|
|
8596
|
+
* 取把手所属标签的身份:向上找本宿主内最近的 trigger,没有包裹层时退回读节点自身。
|
|
8597
|
+
* 越出本宿主的 trigger 不算数——嵌套 xh-tabs 的内层把手不会认外层的标签。
|
|
8598
|
+
*/
|
|
8599
|
+
/** 把手所属的那个 trigger 节点;把手自己就写在 trigger 上时即它本身。 */
|
|
8600
|
+
private triggerElOf;
|
|
8307
8601
|
protected wire(): void;
|
|
8308
8602
|
}
|
|
8309
8603
|
//#endregion
|
|
@@ -8733,7 +9027,7 @@ declare class XhTextFieldElement extends XhElement {
|
|
|
8733
9027
|
*/
|
|
8734
9028
|
declare class XhThreadElement extends XhElement {
|
|
8735
9029
|
static partContract: {
|
|
8736
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "viewport" | "
|
|
9030
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "content" | "viewport" | "live-region" | "scroll-button">;
|
|
8737
9031
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
8738
9032
|
};
|
|
8739
9033
|
static properties: {
|
|
@@ -8980,7 +9274,7 @@ declare class XhTimeFieldElement extends XhElement {
|
|
|
8980
9274
|
*/
|
|
8981
9275
|
declare class XhTimePickerElement extends XhElement {
|
|
8982
9276
|
static partContract: {
|
|
8983
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "
|
|
9277
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "item" | "content" | "trigger" | "label" | "control" | "positioner" | "clear-trigger" | "input" | "column" | "hidden-input" | "segment-group" | "preset" | "presets">;
|
|
8984
9278
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
8985
9279
|
};
|
|
8986
9280
|
static properties: {
|
|
@@ -9606,7 +9900,7 @@ declare class XhToolbarElement extends XhElement {
|
|
|
9606
9900
|
*/
|
|
9607
9901
|
declare class XhTooltipElement extends XhElement {
|
|
9608
9902
|
static partContract: {
|
|
9609
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"
|
|
9903
|
+
anatomy: import("@xihan-ui/kernel").Anatomy<"content" | "trigger" | "positioner" | "arrow">;
|
|
9610
9904
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
9611
9905
|
};
|
|
9612
9906
|
/** 退场闸门:收起从跟着 open 走改成跟着 presence 走,退场动画播完才真收。 */
|
|
@@ -9962,6 +10256,8 @@ declare class XhTransferElement extends XhElement {
|
|
|
9962
10256
|
}
|
|
9963
10257
|
//#endregion
|
|
9964
10258
|
//#region src/elements/tree.d.ts
|
|
10259
|
+
/** 搬家事件的 detail:从机器 props 上的回调取,不在适配器里另抄一份类型。 */
|
|
10260
|
+
type TreeNodeMoveDetails = Parameters<NonNullable<TreeSchema['props']['onNodeMove']>>[0];
|
|
9965
10261
|
/**
|
|
9966
10262
|
* `<xh-tree>` —— Light-DOM 行为宿主:作者写 root/label/tree 与若干 item / branch 角色节点,
|
|
9967
10263
|
* 元素跑 tree 机器并把 connect 产出打上去。节点身份取自节点上的 value 属性。
|
|
@@ -9970,7 +10266,13 @@ declare class XhTransferElement extends XhElement {
|
|
|
9970
10266
|
* 这份树数据——它是元信息的唯一事实源,作者的标记只管长相,两个适配器也就不会各推各的。
|
|
9971
10267
|
* 因此 collection 必须与标记同源:标记里有、collection 里没有的节点报不出层级,也进不了导航。
|
|
9972
10268
|
*
|
|
9973
|
-
* 树数据与展开/选中集合都是数组,属性表达不了,只能走 property(`el.collection = [...]
|
|
10269
|
+
* 树数据与展开/选中集合都是数组,属性表达不了,只能走 property(`el.collection = [...]`);
|
|
10270
|
+
* 落点校验 `allowDrop`(函数)与读屏文案 `translations`(对象)同理。
|
|
10271
|
+
*
|
|
10272
|
+
* 打开 node-draggable 后节点可以拖着搬家:整个节点都是拖动源。拖动中被拖的节点原地不动,
|
|
10273
|
+
* 只落 data-dragging;落点画在参照节点上——data-drop 为 before/after 是插在这一行前后,
|
|
10274
|
+
* 为 inside 是放进这个分支。触屏那一路走 node-drag-trigger 把手。
|
|
10275
|
+
* 键盘走 Alt + 方向键:上下在同层兄弟间挪,左右改缩进层级(rtl 下左右对调),一按就是一次完整提交。
|
|
9974
10276
|
*
|
|
9975
10277
|
* @customElement xh-tree
|
|
9976
10278
|
* @attr {boolean} multiple - 复选,默认关闭
|
|
@@ -9983,10 +10285,13 @@ declare class XhTransferElement extends XhElement {
|
|
|
9983
10285
|
* @attr {boolean} loop - 上下键走到首尾回绕,默认关;写 loop="true" 打开
|
|
9984
10286
|
* @attr {boolean} typeahead - 连打检索,默认开;写 typeahead="false" 关掉
|
|
9985
10287
|
* @attr {'ltr'|'rtl'} dir - 文字方向,只对调左右方向键的展开/收起语义,默认 ltr
|
|
10288
|
+
* @attr {boolean} node-draggable - 节点可以拖着搬家,默认关;不叫 draggable 是因为那是 HTML 全局属性,写在元素上浏览器会拿它接管原生拖放,指针就到不了这里
|
|
9986
10289
|
* @fires expanded-change - 展开集合变化;detail 为 `{ value: string[] }`
|
|
9987
10290
|
* @fires selection-change - 选中集合变化;detail 为 `{ value: string[] }`
|
|
10291
|
+
* @fires node-move - 节点搬了家;detail 为 `{ value, parent, index }`,parent 为 null 即根层,index 是在那一层的落位(已算过先摘后插)
|
|
9988
10292
|
* @csspart root - 组件根容器
|
|
9989
10293
|
* @csspart label - 树标题(aria-labelledby 目标)
|
|
10294
|
+
* @csspart live-region - 视觉隐藏的播报区,拖动过程的读屏文案写在这里;写在 root 里、与 tree 部件平级(root 自己不带角色,它落不进 role=tree 的子节点集合)
|
|
9990
10295
|
* @csspart tree - role=tree 容器,键盘在此收口,也是 roving tabindex 的兜底位
|
|
9991
10296
|
* @csspart item - role=treeitem 叶子,须自带 value 属性标识身份
|
|
9992
10297
|
* @csspart item-text - 叶子文本
|
|
@@ -9999,10 +10304,11 @@ declare class XhTransferElement extends XhElement {
|
|
|
9999
10304
|
* @csspart branch-indicator - 展开方向指示符(aria-hidden)
|
|
10000
10305
|
* @csspart branch-text - 分支文本
|
|
10001
10306
|
* @csspart branch-content - role=group 子层容器,收起时隐藏
|
|
10307
|
+
* @csspart node-drag-trigger - 节点拖拽把手,触屏那一路的入口(自带 touch-action: none,按下即拖);对读屏隐藏且不占 Tab 位,键盘那一路由树上的 Alt + 方向键承担
|
|
10002
10308
|
*/
|
|
10003
10309
|
declare class XhTreeElement extends XhElement {
|
|
10004
10310
|
static partContract: {
|
|
10005
|
-
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">;
|
|
10311
|
+
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" | "live-region" | "item-checkbox" | "branch-checkbox" | "node-drag-trigger">;
|
|
10006
10312
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
10007
10313
|
};
|
|
10008
10314
|
static properties: {
|
|
@@ -10072,6 +10378,16 @@ declare class XhTreeElement extends XhElement {
|
|
|
10072
10378
|
};
|
|
10073
10379
|
attribute: string;
|
|
10074
10380
|
};
|
|
10381
|
+
nodeDraggable: {
|
|
10382
|
+
type: BooleanConstructor;
|
|
10383
|
+
attribute: string;
|
|
10384
|
+
};
|
|
10385
|
+
allowDrop: {
|
|
10386
|
+
attribute: boolean;
|
|
10387
|
+
};
|
|
10388
|
+
translations: {
|
|
10389
|
+
attribute: boolean;
|
|
10390
|
+
};
|
|
10075
10391
|
};
|
|
10076
10392
|
collection?: TreeNode[];
|
|
10077
10393
|
expandedValue?: string[];
|
|
@@ -10088,8 +10404,12 @@ declare class XhTreeElement extends XhElement {
|
|
|
10088
10404
|
loop?: boolean;
|
|
10089
10405
|
typeahead?: boolean;
|
|
10090
10406
|
direction?: Direction;
|
|
10407
|
+
nodeDraggable?: boolean;
|
|
10408
|
+
allowDrop?: (move: TreeNodeMoveDetails) => boolean;
|
|
10409
|
+
translations?: Partial<TreeTranslations>;
|
|
10091
10410
|
private readonly notifyExpanded;
|
|
10092
10411
|
private readonly notifySelection;
|
|
10412
|
+
private readonly notifyNodeMove;
|
|
10093
10413
|
private readonly ctrl;
|
|
10094
10414
|
private machineProps;
|
|
10095
10415
|
/**
|
|
@@ -10169,7 +10489,7 @@ declare class XhTreeElement extends XhElement {
|
|
|
10169
10489
|
*/
|
|
10170
10490
|
declare class XhTreeSelectElement extends XhElement {
|
|
10171
10491
|
static partContract: {
|
|
10172
|
-
anatomy: import("@xihan-ui/kernel").Anatomy<"root" | "
|
|
10492
|
+
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">;
|
|
10173
10493
|
meta: import("@xihan-ui/headless").ComponentMeta;
|
|
10174
10494
|
};
|
|
10175
10495
|
static properties: {
|
|
@@ -10470,5 +10790,5 @@ declare class XhVirtualizerElement extends XhElement {
|
|
|
10470
10790
|
//#region src/define.d.ts
|
|
10471
10791
|
declare function defineXhElements(): void;
|
|
10472
10792
|
//#endregion
|
|
10473
|
-
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, XhNotificationElement, XhNotificationItemElement, 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, XhToggleElement, XhToggleGroupElement, XhToolbarElement, XhTooltipElement, XhTourElement, XhTransferElement, XhTreeElement, XhTreeSelectElement, XhVirtualizerElement, defineXhElements };
|
|
10793
|
+
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, XhNotificationElement, XhNotificationItemElement, XhNumberFieldElement, XhPaginationElement, XhPasswordInputElement, XhPinInputElement, XhPopoverElement, XhProgressElement, XhRadioGroupElement, XhRatingElement, XhResizableElement, XhScrollAreaElement, XhScrollbarElement, XhSegmentedElement, XhSelectElement, XhSeparatorElement, XhSideNavElement, XhSignaturePadElement, XhSkeletonElement, XhSliderElement, XhSortableElement, XhSpaceElement, XhSpinnerElement, XhSplitterElement, XhStepsElement, XhSwitchElement, XhTableElement, XhTabsElement, XhTagElement, XhTagsInputElement, XhTextFieldElement, XhThreadElement, XhTimeFieldElement, XhTimePickerElement, XhTimerElement, XhToastElement, XhToggleElement, XhToggleGroupElement, XhToolbarElement, XhTooltipElement, XhTourElement, XhTransferElement, XhTreeElement, XhTreeSelectElement, XhVirtualizerElement, defineXhElements };
|
|
10474
10794
|
//# sourceMappingURL=define.d.ts.map
|