x-next 0.0.0-alpha.60 → 0.0.0-alpha.62
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/README.md +39 -47
- package/dist/_hooks/_types.d.ts +1 -0
- package/dist/_hooks/use-component-ref.d.ts +5 -0
- package/dist/_hooks/use-input.d.ts +24 -0
- package/dist/_hooks/use-scrollbar.d.ts +6 -0
- package/dist/_utils/debounce.d.ts +1 -0
- package/dist/_utils/dom.d.ts +13 -0
- package/dist/components/_components/input-label/input-label.d.ts +56 -0
- package/dist/components/_components/select-view/interface.d.ts +6 -0
- package/dist/components/_components/select-view/select-view.d.ts +148 -0
- package/dist/components/alert/Alert.vue.d.ts +413 -0
- package/dist/components/alert/index.d.ts +716 -0
- package/dist/components/button/Button.d.ts +2 -2
- package/dist/components/button/index.d.ts +6 -6
- package/dist/components/dialog/Dialog.d.ts +12 -12
- package/dist/components/dialog/index.d.ts +21 -21
- package/dist/components/dialog/props.d.ts +5 -5
- package/dist/components/drawer/index.d.ts +27 -27
- package/dist/components/drawer/src/Drawer.vue.d.ts +14 -14
- package/dist/components/drawer/src/props.d.ts +2 -2
- package/dist/components/dropdown/Dropdown.vue.d.ts +19 -19
- package/dist/components/dropdown/DropdownButton.vue.d.ts +30 -30
- package/dist/components/dropdown/DropdownOption.vue.d.ts +2 -2
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +26 -26
- package/dist/components/dropdown/dropdown-panel.vue.d.ts +3 -3
- package/dist/components/dropdown/index.d.ts +164 -164
- package/dist/components/form/FormItem.vue.d.ts +43 -43
- package/dist/components/form/form-item-label.vue.d.ts +35 -35
- package/dist/components/form/index.d.ts +85 -85
- package/dist/components/form-checkbox/Checkbox.d.ts +2 -2
- package/dist/components/form-checkbox/index.d.ts +3 -3
- package/dist/components/form-input/Input.d.ts +3 -3
- package/dist/components/form-input/InputPassword.vue.d.ts +7 -7
- package/dist/components/form-input/index.d.ts +23 -23
- package/dist/components/form-input-number/InputNumber.d.ts +351 -0
- package/dist/components/form-input-number/index.d.ts +278 -0
- package/dist/components/form-input-tag/InputTag.d.ts +363 -0
- package/dist/components/form-input-tag/index.d.ts +321 -0
- package/dist/components/form-input-tag/interface.d.ts +32 -0
- package/dist/components/form-input-tag/style/index.d.ts +0 -0
- package/dist/components/form-input-tag/utils.d.ts +2 -0
- package/dist/components/form-select/Select.d.ts +1395 -0
- package/dist/components/form-select/SelectDropdown.vue.d.ts +531 -0
- package/dist/components/form-select/SelectOption.vue.d.ts +213 -0
- package/dist/components/form-select/SelectOptionGroup.vue.d.ts +25 -0
- package/dist/components/form-select/context.d.ts +17 -0
- package/dist/components/form-select/hooks/use-options.d.ts +30 -0
- package/dist/components/form-select/hooks/use-select.d.ts +47 -0
- package/dist/components/form-select/index.d.ts +3425 -0
- package/dist/components/form-select/interface.d.ts +115 -0
- package/dist/components/form-select/utils.d.ts +27 -0
- package/dist/components/form-slider/Slider.vue.d.ts +2153 -0
- package/dist/components/form-slider/index.d.ts +4098 -0
- package/dist/components/form-slider/slider-button.vue.d.ts +1397 -0
- package/dist/components/form-slider/slider-dots.vue.d.ts +62 -0
- package/dist/components/form-slider/slider-input.vue.d.ts +334 -0
- package/dist/components/form-slider/slider-marks.vue.d.ts +54 -0
- package/dist/components/form-slider/slider-ticks.vue.d.ts +60 -0
- package/dist/components/form-slider/utils.d.ts +4 -0
- package/dist/components/form-switch/Switch.vue.d.ts +8 -8
- package/dist/components/form-switch/index.d.ts +13 -13
- package/dist/components/image/Image.vue.d.ts +48 -48
- package/dist/components/image/ImagePreview.vue.d.ts +42 -42
- package/dist/components/image/ImagePreviewAction.d.ts +33 -33
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +43 -43
- package/dist/components/image/index.d.ts +333 -333
- package/dist/components/image/preview-arrow.vue.d.ts +4 -4
- package/dist/components/image/preview-toolbar.vue.d.ts +33 -33
- package/dist/components/index.d.ts +7 -0
- package/dist/components/message/Message.d.ts +3 -3
- package/dist/components/message/index.d.ts +9 -9
- package/dist/components/message/message.vue.d.ts +13 -13
- package/dist/components/notification/Notification.d.ts +3 -3
- package/dist/components/notification/index.d.ts +9 -9
- package/dist/components/popconfirm/index.d.ts +9 -9
- package/dist/components/popconfirm/src/Popconfirm.d.ts +5 -5
- package/dist/components/popconfirm/src/popup.vue.d.ts +11 -11
- package/dist/components/popconfirm/src/props.d.ts +2 -2
- package/dist/components/popup/Popup.d.ts +12 -12
- package/dist/components/popup/index.d.ts +21 -21
- package/dist/components/popup/props.d.ts +5 -5
- package/dist/components/progress/Progress.vue.d.ts +661 -0
- package/dist/components/progress/circle.vue.d.ts +196 -0
- package/dist/components/progress/index.d.ts +1104 -0
- package/dist/components/progress/line.vue.d.ts +155 -0
- package/dist/components/progress/steps.vue.d.ts +124 -0
- package/dist/components/scrollbar-v2/Scrollbar.vue.d.ts +2 -2
- package/dist/components/scrollbar-v2/index.d.ts +3 -3
- package/dist/components/skeleton/Skeleton.vue.d.ts +43 -0
- package/dist/components/skeleton/SkeletonLine.vue.d.ts +82 -0
- package/dist/components/skeleton/SkeletonShape.vue.d.ts +46 -0
- package/dist/components/skeleton/index.d.ts +226 -0
- package/dist/components/spin/Spin.d.ts +17 -0
- package/dist/components/spin/index.d.ts +15 -0
- package/dist/components/steps/Step.vue.d.ts +4 -4
- package/dist/components/steps/index.d.ts +8 -8
- package/dist/components/tabs/Tabs.d.ts +6 -6
- package/dist/components/tabs/index.d.ts +12 -12
- package/dist/components/tabs/tabs-nav.d.ts +2 -2
- package/dist/components/tabs/tabs-tab.vue.d.ts +2 -2
- package/dist/components/tag/Tag.vue.d.ts +7 -7
- package/dist/components/tag/index.d.ts +17 -17
- package/dist/components/tooltip/Tooltip.vue.d.ts +16 -16
- package/dist/components/tooltip/index.d.ts +33 -33
- package/dist/components/trend-chart/components/TrendChart.d.ts +1 -1
- package/dist/components/trend-chart/index.d.ts +3 -3
- package/dist/components/trigger/index.d.ts +15 -15
- package/dist/components/trigger/src/_trigger.d.ts +3 -3
- package/dist/components/trigger/src/trigger.d.ts +8 -8
- package/dist/components/trigger-v2/index.d.ts +15 -15
- package/dist/components/trigger-v2/trigger.d.ts +8 -8
- package/dist/components/virtual-list-v2/hooks/use-size.d.ts +18 -0
- package/dist/components/virtual-list-v2/index.d.ts +2 -0
- package/dist/components/virtual-list-v2/interface.d.ts +63 -0
- package/dist/components/virtual-list-v2/virtual-list-item.d.ts +22 -0
- package/dist/components/virtual-list-v2/virtual-list.vue.d.ts +154 -0
- package/dist/icons/_self/down.d.ts +2 -2
- package/dist/icons/_self/empty-better.d.ts +2 -2
- package/dist/icons/_self/empty.d.ts +2 -2
- package/dist/icons/_self/eye-invisible.d.ts +2 -2
- package/dist/icons/_self/eye.d.ts +2 -2
- package/dist/icons/_self/full-screen.d.ts +2 -2
- package/dist/icons/_self/left.d.ts +2 -2
- package/dist/icons/_self/more-dot.d.ts +2 -2
- package/dist/icons/_self/next.d.ts +2 -2
- package/dist/icons/_self/original-size.d.ts +2 -2
- package/dist/icons/_self/plus.d.ts +2 -2
- package/dist/icons/_self/prev.d.ts +2 -2
- package/dist/icons/_self/question-message.d.ts +2 -2
- package/dist/icons/_self/right.d.ts +2 -2
- package/dist/icons/_self/rotate-left.d.ts +2 -2
- package/dist/icons/_self/rotate-right.d.ts +2 -2
- package/dist/icons/_self/search.d.ts +2 -2
- package/dist/icons/_self/up.d.ts +2 -2
- package/dist/icons/_self/zoom-in.d.ts +2 -2
- package/dist/icons/_self/zoom-out.d.ts +2 -2
- package/dist/icons/animation/animation-loading.d.ts +2 -2
- package/dist/icons/default/check-circle-fill.d.ts +2 -2
- package/dist/icons/default/check.d.ts +50 -0
- package/dist/icons/default/close-circle-fill.d.ts +2 -2
- package/dist/icons/default/close.d.ts +2 -2
- package/dist/icons/default/exclamation-circle-fill.d.ts +2 -2
- package/dist/icons/default/exclamation.d.ts +50 -0
- package/dist/icons/default/info-circle-fill.d.ts +2 -2
- package/dist/icons/default/left.d.ts +2 -2
- package/dist/icons/default/logo-simple.d.ts +2 -2
- package/dist/icons/default/minus-circle-fill.d.ts +2 -2
- package/dist/icons/default/right.d.ts +2 -2
- package/dist/icons/icon.d.ts +2 -2
- package/dist/index.es.js +9001 -4524
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +12 -0
- package/package.json +2 -1
- package/volar.d.ts +12 -0
- /package/dist/components/_components/{icon-hover.vue.d.ts → icon-hover/index.vue.d.ts} +0 -0
@@ -0,0 +1,115 @@
|
|
1
|
+
import { RenderFunction } from 'vue';
|
2
|
+
import { FieldString } from '../../_hooks/_types';
|
3
|
+
import { Size } from '../../_utils/constant';
|
4
|
+
import { VirtualListProps } from '../virtual-list-v2/interface';
|
5
|
+
import { TriggerProps } from '../trigger-v2/interface';
|
6
|
+
export interface SelectProps {
|
7
|
+
options?: (string | number | boolean | SelectOptionData | SelectOptionGroup)[];
|
8
|
+
multiple?: boolean;
|
9
|
+
modelValue?: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[];
|
10
|
+
defaultValue?: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[];
|
11
|
+
inputValue?: string;
|
12
|
+
defaultInputValue?: string;
|
13
|
+
size?: Size;
|
14
|
+
placeholder?: string;
|
15
|
+
loading?: boolean;
|
16
|
+
disabled?: boolean;
|
17
|
+
error?: boolean;
|
18
|
+
allowClear?: boolean;
|
19
|
+
allowSearch?: boolean | {
|
20
|
+
retainInputValue?: boolean;
|
21
|
+
};
|
22
|
+
allowCreate?: boolean;
|
23
|
+
maxTagCount?: number;
|
24
|
+
popupContainer?: string | HTMLElement;
|
25
|
+
bordered?: boolean;
|
26
|
+
popupVisible?: boolean;
|
27
|
+
defaultPopupVisible?: boolean;
|
28
|
+
unmountOnClose?: boolean;
|
29
|
+
filterOption?: boolean | ((inputValue: string, option: SelectOptionData) => boolean);
|
30
|
+
virtualListProps?: VirtualListProps;
|
31
|
+
triggerProps?: TriggerProps;
|
32
|
+
formatLabel?: (data: SelectOptionData) => string;
|
33
|
+
fallbackOption?: boolean | ((value: string | number | boolean | Record<string, unknown>) => SelectOptionData);
|
34
|
+
showExtraOptions?: boolean;
|
35
|
+
valueKey?: string;
|
36
|
+
searchDelay?: number;
|
37
|
+
limit?: number;
|
38
|
+
fieldNames?: SelectFieldNames;
|
39
|
+
showHeaderOnEmpty?: boolean;
|
40
|
+
showFooterOnEmpty?: boolean;
|
41
|
+
}
|
42
|
+
export type SelectOptionValue = string | number | boolean | Record<string, unknown>;
|
43
|
+
export interface OptionValueWithKey {
|
44
|
+
value: SelectOptionValue;
|
45
|
+
key: string;
|
46
|
+
}
|
47
|
+
export type SelectFieldNames = FieldString<SelectOptionData>;
|
48
|
+
export interface SelectOptionData {
|
49
|
+
/**
|
50
|
+
* @zh 选项值
|
51
|
+
* @en Option Value
|
52
|
+
*/
|
53
|
+
value?: string | number | boolean | Record<string, unknown>;
|
54
|
+
/**
|
55
|
+
* @zh 选项内容
|
56
|
+
* @en Option content
|
57
|
+
*/
|
58
|
+
label?: string;
|
59
|
+
/**
|
60
|
+
* @zh 是否禁用
|
61
|
+
* @en Whether to disable
|
62
|
+
*/
|
63
|
+
disabled?: boolean;
|
64
|
+
/**
|
65
|
+
* @zh 选项对应的多选标签的属性
|
66
|
+
* @en Props of the multi-select label corresponding to the option
|
67
|
+
*/
|
68
|
+
tagProps?: any;
|
69
|
+
/**
|
70
|
+
* @zh 自定义渲染
|
71
|
+
* @en Custom Render
|
72
|
+
*/
|
73
|
+
render?: RenderFunction;
|
74
|
+
[other: string]: any;
|
75
|
+
}
|
76
|
+
export interface SelectOptionGroup {
|
77
|
+
/**
|
78
|
+
* @zh 是否为选项组
|
79
|
+
* @en Whether it is an option group
|
80
|
+
*/
|
81
|
+
isGroup: true;
|
82
|
+
/**
|
83
|
+
* @zh 选项组标题
|
84
|
+
* @en Option group title
|
85
|
+
*/
|
86
|
+
label: string;
|
87
|
+
/**
|
88
|
+
* @zh 选项组中的选项
|
89
|
+
* @en Options in the option group
|
90
|
+
*/
|
91
|
+
options: SelectOption[];
|
92
|
+
[other: string]: any;
|
93
|
+
}
|
94
|
+
/**
|
95
|
+
* @zh 选项
|
96
|
+
* @en Option
|
97
|
+
*/
|
98
|
+
export type SelectOption = string | number | boolean | SelectOptionData | SelectOptionGroup;
|
99
|
+
export interface SelectOptionInfo extends SelectOptionData {
|
100
|
+
raw: Record<string, unknown>;
|
101
|
+
key: string;
|
102
|
+
index?: number;
|
103
|
+
origin: 'slot' | 'options' | 'extraOptions';
|
104
|
+
value: SelectOptionValue;
|
105
|
+
label: string;
|
106
|
+
}
|
107
|
+
export interface SelectOptionGroupInfo extends SelectOptionGroup {
|
108
|
+
key: string;
|
109
|
+
options: (SelectOptionInfo | SelectOptionGroupInfo)[];
|
110
|
+
}
|
111
|
+
/**
|
112
|
+
* @zh 筛选
|
113
|
+
* @en Filter
|
114
|
+
*/
|
115
|
+
export type FilterOption = boolean | ((inputValue: string, option: SelectOptionData) => boolean);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { FilterOption, SelectOptionGroup, SelectOptionGroupInfo, SelectOption, SelectOptionData, SelectOptionInfo, SelectOptionValue, SelectFieldNames } from './interface';
|
2
|
+
export declare const isGroupOption: (option: SelectOption) => option is SelectOptionGroup;
|
3
|
+
export declare const isGroupOptionInfo: (option: SelectOptionInfo | SelectOptionGroupInfo) => option is SelectOptionGroupInfo;
|
4
|
+
export declare const getValueString: (value: SelectOptionValue, valueKey?: string) => string;
|
5
|
+
export declare const getKeyFromValue: (value?: SelectOptionValue, valueKey?: string) => string;
|
6
|
+
export declare const hasEmptyStringKey: (optionInfoMap: Map<string, SelectOptionInfo>) => boolean;
|
7
|
+
export declare const createOptionInfo: (option: string | number | SelectOptionData, { valueKey, fieldNames, origin, index, }: {
|
8
|
+
valueKey: string;
|
9
|
+
fieldNames: Required<SelectFieldNames>;
|
10
|
+
origin: "slot" | "options" | "extraOptions";
|
11
|
+
index?: number;
|
12
|
+
}) => SelectOptionInfo;
|
13
|
+
export declare const getOptionInfos: (options: SelectOption[], { valueKey, fieldNames, origin, optionInfoMap, }: {
|
14
|
+
valueKey: string;
|
15
|
+
fieldNames: Required<SelectFieldNames>;
|
16
|
+
origin: "options" | "extraOptions";
|
17
|
+
optionInfoMap: Map<string, SelectOptionInfo>;
|
18
|
+
}) => (SelectOptionInfo | SelectOptionGroupInfo)[];
|
19
|
+
export declare const createOptionInfoMap: (optionInfos: (SelectOptionInfo | SelectOptionGroupInfo)[]) => Map<string, SelectOptionInfo>;
|
20
|
+
export declare const getValidOptions: (optionInfos: (SelectOptionInfo | SelectOptionGroupInfo)[], { inputValue, filterOption, }: {
|
21
|
+
inputValue?: string;
|
22
|
+
filterOption?: FilterOption;
|
23
|
+
}) => (SelectOptionInfo | SelectOptionGroupInfo)[];
|
24
|
+
export declare const isValidOption: (optionInfo: SelectOptionInfo, { inputValue, filterOption, }: {
|
25
|
+
inputValue?: string;
|
26
|
+
filterOption?: FilterOption;
|
27
|
+
}) => boolean;
|