antdv-next 1.0.0-beta.2 → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_util/PurePanel.mjs +4 -4
- package/dist/_util/hooks/useClosable.d.mts +0 -1
- package/dist/_util/hooks/useClosable.mjs +1 -1
- package/dist/_util/hooks/useMergeSemantic.d.mts +2 -3
- package/dist/_util/hooks/useMergeSemantic.mjs +9 -9
- package/dist/_util/tools.mjs +1 -1
- package/dist/_util/warning.d.mts +0 -1
- package/dist/affix/index.d.mts +3 -3
- package/dist/alert/Alert.d.mts +24 -7
- package/dist/alert/Alert.mjs +91 -28
- package/dist/anchor/Anchor.d.mts +18 -7
- package/dist/antd.css +1 -1
- package/dist/antd.js +101 -112
- package/dist/app/App.d.mts +2 -2
- package/dist/app/App.mjs +2 -2
- package/dist/auto-complete/index.d.mts +23 -11
- package/dist/auto-complete/index.mjs +1 -1
- package/dist/avatar/Avatar.d.mts +3 -3
- package/dist/avatar/AvatarGroup.d.mts +2 -2
- package/dist/avatar/style/index.mjs +2 -2
- package/dist/badge/Ribbon.d.mts +18 -2
- package/dist/badge/Ribbon.mjs +44 -23
- package/dist/badge/SingleNumber.mjs +2 -1
- package/dist/badge/index.d.mts +14 -7
- package/dist/badge/style/ribbon.mjs +1 -1
- package/dist/breadcrumb/Breadcrumb.d.mts +17 -6
- package/dist/breadcrumb/Breadcrumb.mjs +18 -3
- package/dist/breadcrumb/BreadcrumbItem.d.mts +1 -0
- package/dist/breadcrumb/BreadcrumbItem.mjs +29 -4
- package/dist/breadcrumb/style/index.mjs +5 -5
- package/dist/button/Button.d.mts +18 -10
- package/dist/button/buttonHelper.d.mts +0 -1
- package/dist/button/index.d.mts +1 -1
- package/dist/button/style/compact.mjs +28 -19
- package/dist/button/style/token.d.mts +0 -5
- package/dist/button/style/variant.mjs +27 -3
- package/dist/calendar/generateCalendar.d.mts +20 -7
- package/dist/calendar/generateCalendar.mjs +1 -1
- package/dist/calendar/index.d.mts +3 -3
- package/dist/card/Card.d.mts +23 -6
- package/dist/card/CardGrid.d.mts +2 -2
- package/dist/card/CardMeta.d.mts +20 -7
- package/dist/cascader/index.d.mts +28 -7
- package/dist/checkbox/Checkbox.d.mts +16 -7
- package/dist/checkbox/Checkbox.mjs +1 -1
- package/dist/checkbox/Group.d.mts +4 -3
- package/dist/checkbox/Group.mjs +11 -2
- package/dist/collapse/Collapse.d.mts +19 -6
- package/dist/collapse/Collapse.mjs +1 -1
- package/dist/color-picker/ColorPicker.d.mts +3 -3
- package/dist/color-picker/interface.d.mts +15 -7
- package/dist/color-picker/style/input.mjs +2 -0
- package/dist/components.d.mts +2 -3
- package/dist/config-provider/context.d.mts +58 -12
- package/dist/config-provider/context.mjs +3 -3
- package/dist/config-provider/define.d.mts +7 -1
- package/dist/config-provider/index.d.mts +3 -4
- package/dist/config-provider/index.mjs +82 -8
- package/dist/date-picker/generatePicker/index.d.mts +15 -15
- package/dist/date-picker/generatePicker/interface.d.mts +37 -10
- package/dist/date-picker/hooks/useMergedPickerSemantic.mjs +2 -2
- package/dist/date-picker/index.d.mts +25 -25
- package/dist/descriptions/Cell.mjs +5 -5
- package/dist/descriptions/DescriptionsContext.d.mts +13 -0
- package/dist/descriptions/Item.d.mts +3 -3
- package/dist/descriptions/hooks/useRow.mjs +7 -7
- package/dist/descriptions/index.d.mts +22 -7
- package/dist/divider/index.d.mts +15 -5
- package/dist/drawer/DrawerPanel.d.mts +28 -3
- package/dist/drawer/DrawerPanel.mjs +3 -3
- package/dist/drawer/index.d.mts +4 -4
- package/dist/drawer/index.mjs +4 -0
- package/dist/drawer/style/index.mjs +9 -2
- package/dist/dropdown/dropdown.d.mts +20 -7
- package/dist/empty/index.d.mts +18 -7
- package/dist/flex/index.d.mts +3 -3
- package/dist/float-button/FloatButton.d.mts +3 -4
- package/dist/float-button/FloatButtonGroup.d.mts +22 -3
- package/dist/form/Form.d.mts +16 -7
- package/dist/form/FormItem/index.d.mts +3 -3
- package/dist/form/FormItem/index.mjs +1 -1
- package/dist/form/FormItemInput.d.mts +0 -1
- package/dist/image/PreviewGroup.d.mts +3 -5
- package/dist/image/index.d.mts +34 -14
- package/dist/index.d.mts +3 -4
- package/dist/input/Input.d.mts +17 -4
- package/dist/input/Input.mjs +2 -2
- package/dist/input/OTP/index.d.mts +13 -4
- package/dist/input/Password.mjs +3 -3
- package/dist/input/Search.d.mts +21 -9
- package/dist/input/TextArea.d.mts +16 -7
- package/dist/input/TextArea.mjs +2 -2
- package/dist/input/index.d.mts +11 -11
- package/dist/input/style/index.mjs +5 -2
- package/dist/input/style/variants.mjs +2 -1
- package/dist/input-number/index.d.mts +20 -7
- package/dist/layout/index.d.mts +6 -6
- package/dist/layout/layout.d.mts +0 -1
- package/dist/locale/index.d.mts +0 -1
- package/dist/masonry/Masonry.d.mts +14 -7
- package/dist/masonry/MasonryItem.mjs +2 -2
- package/dist/mentions/index.d.mts +18 -7
- package/dist/mentions/index.mjs +2 -2
- package/dist/mentions/style/index.mjs +2 -2
- package/dist/menu/MenuContext.d.mts +0 -1
- package/dist/menu/MenuDivider.d.mts +2 -2
- package/dist/menu/MenuItem.d.mts +3 -3
- package/dist/menu/MenuItem.mjs +4 -3
- package/dist/menu/SubMenu.d.mts +3 -3
- package/dist/menu/SubMenu.mjs +5 -0
- package/dist/menu/index.d.mts +5 -5
- package/dist/menu/menu.d.mts +42 -10
- package/dist/menu/menu.mjs +2 -2
- package/dist/menu/style/index.d.mts +1 -1
- package/dist/menu/style/vertical.mjs +1 -1
- package/dist/message/PurePanel.d.mts +5 -7
- package/dist/message/index.mjs +2 -2
- package/dist/message/interface.d.mts +20 -4
- package/dist/message/useMessage.d.mts +0 -1
- package/dist/modal/Modal.d.mts +3 -3
- package/dist/modal/confirm.mjs +8 -4
- package/dist/modal/interface.d.mts +22 -3
- package/dist/modal/style/index.mjs +11 -8
- package/dist/notification/PurePanel.d.mts +8 -8
- package/dist/notification/index.mjs +2 -2
- package/dist/notification/interface.d.mts +18 -5
- package/dist/notification/style/index.mjs +8 -8
- package/dist/notification/useNotification.d.mts +2 -3
- package/dist/package.d.mts +4 -0
- package/dist/package.mjs +1 -1
- package/dist/pagination/Pagination.d.mts +3 -3
- package/dist/pagination/Pagination.mjs +11 -10
- package/dist/pagination/interface.d.mts +14 -5
- package/dist/pagination/style/bordered.mjs +2 -2
- package/dist/pagination/style/index.d.mts +10 -5
- package/dist/pagination/style/index.mjs +52 -103
- package/dist/popconfirm/PurePanel.d.mts +5 -7
- package/dist/popconfirm/index.d.mts +8 -6
- package/dist/popconfirm/index.mjs +7 -3
- package/dist/popover/index.d.mts +16 -9
- package/dist/popover/index.mjs +8 -5
- package/dist/progress/Line.mjs +3 -3
- package/dist/progress/progress.d.mts +20 -7
- package/dist/qrcode/index.d.mts +3 -3
- package/dist/qrcode/index.mjs +2 -1
- package/dist/qrcode/interface.d.mts +11 -3
- package/dist/radio/group.mjs +3 -3
- package/dist/radio/index.d.mts +5 -5
- package/dist/radio/interface.d.mts +13 -3
- package/dist/radio/radio.d.mts +3 -3
- package/dist/radio/radio.mjs +1 -1
- package/dist/rate/index.d.mts +3 -3
- package/dist/result/index.d.mts +22 -7
- package/dist/result/index.mjs +11 -6
- package/dist/result/noFound.d.mts +2 -2
- package/dist/result/serverError.d.mts +2 -2
- package/dist/result/unauthorized.d.mts +2 -2
- package/dist/segmented/index.d.mts +18 -7
- package/dist/select/index.d.mts +48 -20
- package/dist/skeleton/Avatar.d.mts +2 -2
- package/dist/skeleton/Button.d.mts +2 -2
- package/dist/skeleton/Image.d.mts +2 -2
- package/dist/skeleton/Input.d.mts +2 -2
- package/dist/skeleton/Node.d.mts +3 -3
- package/dist/skeleton/Skeleton.d.mts +22 -7
- package/dist/slider/index.d.mts +19 -6
- package/dist/slider/index.mjs +4 -4
- package/dist/space/index.d.mts +18 -9
- package/dist/spin/Indicator/Progress.mjs +3 -3
- package/dist/spin/index.d.mts +19 -6
- package/dist/splitter/SplitBar.mjs +12 -12
- package/dist/splitter/Splitter.d.mts +3 -3
- package/dist/splitter/Splitter.mjs +1 -1
- package/dist/splitter/hooks/useItems.mjs +2 -2
- package/dist/splitter/hooks/useResizable.mjs +5 -5
- package/dist/splitter/hooks/useResize.mjs +2 -2
- package/dist/splitter/index.d.mts +2 -2
- package/dist/splitter/interface.d.mts +21 -7
- package/dist/splitter/style/index.mjs +2 -28
- package/dist/statistic/Statistic.d.mts +21 -6
- package/dist/statistic/Statistic.mjs +1 -1
- package/dist/statistic/Timer.d.mts +5 -5
- package/dist/statistic/index.d.mts +5 -5
- package/dist/steps/context.mjs +5 -2
- package/dist/steps/index.d.mts +31 -9
- package/dist/steps/index.mjs +3 -3
- package/dist/style/motion/fade.mjs +25 -0
- package/dist/switch/index.d.mts +14 -7
- package/dist/switch/index.mjs +2 -2
- package/dist/table/Column.d.mts +3 -3
- package/dist/table/ColumnGroup.d.mts +3 -3
- package/dist/table/InternalTable.d.mts +35 -13
- package/dist/table/InternalTable.mjs +12 -6
- package/dist/table/Table.d.mts +3 -3
- package/dist/table/TableMeasureRowContext.mjs +20 -0
- package/dist/table/hooks/useFilter/FilterDropdown.mjs +17 -12
- package/dist/table/hooks/useSelection.mjs +1 -1
- package/dist/table/interface.d.mts +1 -2
- package/dist/table/style/virtual.mjs +1 -1
- package/dist/tabs/TabPane.d.mts +3 -3
- package/dist/tabs/index.d.mts +27 -11
- package/dist/tabs/index.mjs +5 -5
- package/dist/tag/CheckableTag.d.mts +3 -3
- package/dist/tag/CheckableTagGroup.d.mts +3 -3
- package/dist/tag/index.d.mts +16 -7
- package/dist/tag/index.mjs +1 -1
- package/dist/tag/style/index.mjs +1 -1
- package/dist/theme/index.d.mts +1 -2
- package/dist/theme/interface/maps/index.d.mts +0 -1
- package/dist/theme/useToken.mjs +3 -3
- package/dist/theme/util/genStyleUtils.mjs +3 -2
- package/dist/time-picker/index.d.mts +38 -14
- package/dist/time-picker/index.mjs +1 -1
- package/dist/timeline/Timeline.d.mts +49 -14
- package/dist/timeline/Timeline.mjs +82 -11
- package/dist/timeline/index.d.mts +1 -2
- package/dist/timeline/style/horizontal.mjs +73 -0
- package/dist/timeline/style/index.d.mts +10 -5
- package/dist/timeline/style/index.mjs +93 -137
- package/dist/timeline/useItems.mjs +52 -0
- package/dist/tooltip/PurePanel.d.mts +2 -2
- package/dist/tooltip/UniqueProvider/index.d.mts +2 -2
- package/dist/tooltip/index.d.mts +17 -8
- package/dist/tooltip/index.mjs +11 -3
- package/dist/tooltip/style/index.d.mts +7 -1
- package/dist/tooltip/style/index.mjs +3 -2
- package/dist/tour/index.d.mts +3 -3
- package/dist/tour/index.mjs +1 -1
- package/dist/tour/interface.d.mts +29 -3
- package/dist/transfer/Actions.d.mts +2 -2
- package/dist/transfer/ListItem.mjs +4 -4
- package/dist/transfer/Section.d.mts +2 -2
- package/dist/transfer/Transfer.d.mts +3 -3
- package/dist/transfer/Transfer.mjs +4 -4
- package/dist/transfer/index.d.mts +1 -1
- package/dist/transfer/interface.d.mts +32 -7
- package/dist/transfer/search.d.mts +3 -3
- package/dist/tree/DirectoryTree.d.mts +3 -3
- package/dist/tree/Tree.d.mts +18 -7
- package/dist/tree/index.d.mts +0 -1
- package/dist/tree-select/index.d.mts +41 -12
- package/dist/tree-select/style/index.d.mts +1 -1
- package/dist/typography/Editable.mjs +4 -4
- package/dist/typography/Link.d.mts +3 -3
- package/dist/typography/Paragraph.d.mts +3 -3
- package/dist/typography/Text.d.mts +3 -3
- package/dist/typography/Title.d.mts +3 -3
- package/dist/typography/Typography.d.mts +3 -3
- package/dist/typography/Typography.mjs +2 -12
- package/dist/typography/index.d.mts +9 -10
- package/dist/typography/interface.d.mts +0 -2
- package/dist/typography/style/mixins.mjs +3 -3
- package/dist/upload/Dragger.d.mts +3 -3
- package/dist/upload/Upload.d.mts +3 -4
- package/dist/upload/index.d.mts +3 -3
- package/dist/upload/interface.d.mts +13 -4
- package/dist/watermark/index.d.mts +2 -2
- package/dist/watermark/index.mjs +3 -3
- package/package.json +45 -41
- package/web-tags.json +1108 -1067
- package/web-types.json +3861 -4257
- package/dist/timeline/TimelineItem.d.mts +0 -20
- package/dist/timeline/TimelineItem.mjs +0 -115
- package/dist/timeline/TimelineItemList.mjs +0 -158
- /package/dist/{reset.css/reset.css → reset.css} +0 -0
|
@@ -10,6 +10,31 @@ const fadeOut = new Keyframes("antFadeOut", {
|
|
|
10
10
|
"0%": { opacity: 1 },
|
|
11
11
|
"100%": { opacity: 0 }
|
|
12
12
|
});
|
|
13
|
+
/**
|
|
14
|
+
* Initialize fade motion styles
|
|
15
|
+
*
|
|
16
|
+
* Generates CSS styles for fade in/out transition animations when elements are shown/hidden.
|
|
17
|
+
* Supports enter, appear, and leave animation states.
|
|
18
|
+
*
|
|
19
|
+
* @param token - Object containing design tokens and CSS class prefix
|
|
20
|
+
* @param sameLevel - Controls CSS selector nesting behavior:
|
|
21
|
+
* - `false` (default): Generates descendant selectors like `.ant-fade-enter`, `.ant-fade-appear`
|
|
22
|
+
* - `true`: Generates same-level selectors with `&` prefix like `&.ant-fade-enter`, `&.ant-fade-appear`
|
|
23
|
+
* Use `true` when the motion classes are applied to the same element as the parent selector,
|
|
24
|
+
* Use `false` when the motion classes are applied to child elements
|
|
25
|
+
* @returns CSS interpolation object containing fade motion styles
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // For child elements (default behavior)
|
|
30
|
+
* const fadeStyles = initFadeMotion(token);
|
|
31
|
+
* // Generates: .parent .ant-fade-enter { ... }
|
|
32
|
+
*
|
|
33
|
+
* // For same element
|
|
34
|
+
* const sameLevelFadeStyles = initFadeMotion(token, true);
|
|
35
|
+
* // Generates: .parent.ant-fade-enter { ... }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
13
38
|
function initFadeMotion(token, sameLevel = false) {
|
|
14
39
|
const { antCls } = token;
|
|
15
40
|
const motionCls = `${antCls}-fade`;
|
package/dist/switch/index.d.mts
CHANGED
|
@@ -2,15 +2,22 @@ import { VueNode } from "../_util/type.mjs";
|
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.mjs";
|
|
3
3
|
import "../_util/hooks/index.mjs";
|
|
4
4
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
5
|
-
import * as
|
|
6
|
-
import { SlotsType } from "vue";
|
|
5
|
+
import * as vue172 from "vue";
|
|
6
|
+
import { CSSProperties, SlotsType } from "vue";
|
|
7
7
|
import { SwitchChangeEventHandler, SwitchClickEventHandler } from "@v-c/switch";
|
|
8
8
|
|
|
9
9
|
//#region src/switch/index.d.ts
|
|
10
10
|
type SwitchSize = 'small' | 'default';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
interface SwitchSemanticClassNames {
|
|
12
|
+
root?: string;
|
|
13
|
+
content?: string;
|
|
14
|
+
}
|
|
15
|
+
interface SwitchSemanticStyles {
|
|
16
|
+
root?: CSSProperties;
|
|
17
|
+
content?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
type SwitchClassNamesType = SemanticClassNamesType<SwitchProps, SwitchSemanticClassNames>;
|
|
20
|
+
type SwitchStylesType = SemanticStylesType<SwitchProps, SwitchSemanticStyles>;
|
|
14
21
|
interface SwitchProps extends ComponentBaseProps {
|
|
15
22
|
size?: SwitchSize;
|
|
16
23
|
checked?: boolean;
|
|
@@ -47,8 +54,8 @@ interface SwitchSlots {
|
|
|
47
54
|
checkedChildren: () => any;
|
|
48
55
|
unCheckedChildren: () => any;
|
|
49
56
|
}
|
|
50
|
-
declare const Switch:
|
|
57
|
+
declare const Switch: vue172.DefineSetupFnComponent<SwitchProps, SwitchEmits, SlotsType<SwitchSlots>, SwitchProps & {
|
|
51
58
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
52
|
-
},
|
|
59
|
+
}, vue172.PublicProps>;
|
|
53
60
|
//#endregion
|
|
54
61
|
export { Switch, SwitchEmits, SwitchProps, SwitchSize, SwitchSlots };
|
package/dist/switch/index.mjs
CHANGED
|
@@ -61,7 +61,7 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
61
61
|
const unCheckedChildren = getSlotPropsFnRun(slots, props, "unCheckedChildren");
|
|
62
62
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
63
63
|
const loadingIcon = createVNode("div", { "class": `${prefixCls.value}-handle` }, [loading && createVNode(LoadingOutlined, { "class": `${prefixCls.value}-loading-icon` }, null)]);
|
|
64
|
-
const classes
|
|
64
|
+
const classes = clsx(contextClassName.value, {
|
|
65
65
|
[`${prefixCls.value}-small`]: mergedSize.value === "small",
|
|
66
66
|
[`${prefixCls.value}-loading`]: loading,
|
|
67
67
|
[`${prefixCls.value}-rtl`]: direction.value === "rtl"
|
|
@@ -81,7 +81,7 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
81
81
|
"checked": checked.value,
|
|
82
82
|
"onChange": changeHandler,
|
|
83
83
|
"prefixCls": prefixCls.value,
|
|
84
|
-
"className": classes
|
|
84
|
+
"className": classes,
|
|
85
85
|
"style": mergedStyle,
|
|
86
86
|
"disabled": mergedDisabled.value,
|
|
87
87
|
"loadingIcon": loadingIcon,
|
package/dist/table/Column.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyObject, EmptyEmit } from "../_util/type.mjs";
|
|
2
2
|
import { ColumnType } from "./interface.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue382 from "vue";
|
|
4
4
|
import { SlotsType } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/table/Column.d.ts
|
|
@@ -13,8 +13,8 @@ interface ColumnSlots {
|
|
|
13
13
|
/**
|
|
14
14
|
* Syntactic sugar for `columns` prop. HOC will not work on this.
|
|
15
15
|
*/
|
|
16
|
-
declare const Column:
|
|
16
|
+
declare const Column: vue382.DefineSetupFnComponent<ColumnProps<AnyObject>, EmptyEmit, SlotsType<ColumnSlots>, ColumnProps<AnyObject> & {
|
|
17
17
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
18
|
-
},
|
|
18
|
+
}, vue382.PublicProps>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { Column, ColumnProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyObject, EmptyEmit } from "../_util/type.mjs";
|
|
2
2
|
import { ColumnType } from "./interface.mjs";
|
|
3
3
|
import { ColumnProps } from "./Column.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as vue384 from "vue";
|
|
5
5
|
import { SlotsType } from "vue";
|
|
6
6
|
|
|
7
7
|
//#region src/table/ColumnGroup.d.ts
|
|
@@ -14,8 +14,8 @@ interface ColumnGroupSlots {
|
|
|
14
14
|
/**
|
|
15
15
|
* Syntactic sugar for `columns` prop. HOC will not work on this.
|
|
16
16
|
*/
|
|
17
|
-
declare const ColumnGroup:
|
|
17
|
+
declare const ColumnGroup: vue384.DefineSetupFnComponent<ColumnGroupProps<AnyObject>, EmptyEmit, SlotsType<ColumnGroupSlots>, ColumnGroupProps<AnyObject> & {
|
|
18
18
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
19
|
-
},
|
|
19
|
+
}, vue384.PublicProps>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { ColumnGroup };
|
|
@@ -1,26 +1,48 @@
|
|
|
1
1
|
import { SizeType } from "../config-provider/SizeContext.mjs";
|
|
2
2
|
import { AnyObject } from "../_util/type.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.mjs";
|
|
4
4
|
import "../_util/hooks/index.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { PaginationSemanticClassNames, PaginationSemanticStyles } from "../pagination/interface.mjs";
|
|
6
6
|
import { ColumnType, ColumnsType, FilterDropdownProps, FilterValue, GetPopupContainer, Key, SortOrder, SorterResult, SorterTooltipProps, TableCurrentDataSource, TableLocale, TablePaginationConfig, TableRowSelection } from "./interface.mjs";
|
|
7
7
|
import { SpinProps } from "../spin/index.mjs";
|
|
8
8
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
9
|
-
import { SlotsType } from "vue";
|
|
9
|
+
import { CSSProperties, SlotsType } from "vue";
|
|
10
10
|
import { TableProps } from "@v-c/table";
|
|
11
11
|
|
|
12
12
|
//#region src/table/InternalTable.d.ts
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
interface TableSemanticClassNames {
|
|
14
|
+
root?: string;
|
|
15
|
+
section?: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
footer?: string;
|
|
18
|
+
content?: string;
|
|
19
|
+
}
|
|
20
|
+
interface TableSemanticStyles {
|
|
21
|
+
root?: CSSProperties;
|
|
22
|
+
section?: CSSProperties;
|
|
23
|
+
title?: CSSProperties;
|
|
24
|
+
footer?: CSSProperties;
|
|
25
|
+
content?: CSSProperties;
|
|
26
|
+
}
|
|
27
|
+
interface ComponentsSemanticClassNames {
|
|
28
|
+
wrapper?: string;
|
|
29
|
+
cell?: string;
|
|
30
|
+
row?: string;
|
|
31
|
+
}
|
|
32
|
+
interface ComponentsSemanticStyles {
|
|
33
|
+
wrapper?: CSSProperties;
|
|
34
|
+
cell?: CSSProperties;
|
|
35
|
+
row?: CSSProperties;
|
|
36
|
+
}
|
|
37
|
+
type TableClassNamesType<RecordType = AnyObject> = SemanticClassNamesType<TableProps$1<RecordType>, TableSemanticClassNames, {
|
|
38
|
+
body?: ComponentsSemanticClassNames;
|
|
39
|
+
header?: ComponentsSemanticClassNames;
|
|
40
|
+
pagination?: PaginationSemanticClassNames;
|
|
19
41
|
}>;
|
|
20
|
-
type TableStylesType<RecordType = AnyObject> = SemanticStylesType<TableProps$1<RecordType>,
|
|
21
|
-
body?:
|
|
22
|
-
header?:
|
|
23
|
-
pagination?:
|
|
42
|
+
type TableStylesType<RecordType = AnyObject> = SemanticStylesType<TableProps$1<RecordType>, TableSemanticStyles, {
|
|
43
|
+
body?: ComponentsSemanticStyles;
|
|
44
|
+
header?: ComponentsSemanticStyles;
|
|
45
|
+
pagination?: PaginationSemanticStyles;
|
|
24
46
|
}>;
|
|
25
47
|
interface TableProps$1<RecordType = AnyObject> extends ComponentBaseProps, Omit<TableProps<RecordType>, 'transformColumns' | 'internalHooks' | 'internalRefs' | 'data' | 'columns' | 'scroll' | 'emptyText' | 'className' | 'style' | 'classNames' | 'styles' | 'getPopupContainer' | 'onUpdate:expandedRowKeys' | 'onScroll'> {
|
|
26
48
|
classes?: TableClassNamesType<RecordType>;
|
|
@@ -18,6 +18,7 @@ import pagination_default from "../pagination/index.mjs";
|
|
|
18
18
|
import useSelection from "./hooks/useSelection.mjs";
|
|
19
19
|
import ExpandIcon_default from "./ExpandIcon.mjs";
|
|
20
20
|
import useContainerWidth from "./hooks/useContainerWidth.mjs";
|
|
21
|
+
import { TableMeasureRowContextProvider } from "./TableMeasureRowContext.mjs";
|
|
21
22
|
import useFilter, { collectFilterStates, generateFilterInfo, getFilterData, getMergedFilterStates } from "./hooks/useFilter/index.mjs";
|
|
22
23
|
import useLazyKVMap from "./hooks/useLazyKVMap.mjs";
|
|
23
24
|
import usePagination, { DEFAULT_PAGE_SIZE, getPaginationParam } from "./hooks/usePagination.mjs";
|
|
@@ -40,7 +41,11 @@ function resolvePanelRender(slots, props, key) {
|
|
|
40
41
|
if (slots[key] || props[key]) return (data) => getSlotPropsFnRun(slots, props, key, true, data);
|
|
41
42
|
}
|
|
42
43
|
const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expose }) => {
|
|
43
|
-
const { prefixCls, direction, getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, renderEmpty, getPopupContainer: contextGetPopupContainer, virtual: contextVirtual, bodyCell: contextBodyCell, headerCell: contextHeaderCell } = useComponentBaseConfig("table", props, [
|
|
44
|
+
const { prefixCls, direction, getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, renderEmpty, getPopupContainer: contextGetPopupContainer, virtual: contextVirtual, bodyCell: contextBodyCell, headerCell: contextHeaderCell, rowKey: contextRowKey } = useComponentBaseConfig("table", props, [
|
|
45
|
+
"bodyCell",
|
|
46
|
+
"headerCell",
|
|
47
|
+
"rowKey"
|
|
48
|
+
]);
|
|
44
49
|
const configCtx = useConfig();
|
|
45
50
|
const { classes, styles } = toPropsRefs(props, "classes", "styles");
|
|
46
51
|
const mergedSize = useSize(computed(() => props.size));
|
|
@@ -115,7 +120,8 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
115
120
|
const childrenColumnName = computed(() => mergedExpandable.value.childrenColumnName || "children");
|
|
116
121
|
const getRowKey = computed(() => {
|
|
117
122
|
if (typeof props.rowKey === "function") return props.rowKey;
|
|
118
|
-
|
|
123
|
+
if (!props.rowKey && contextRowKey.value && typeof contextRowKey.value === "function") return contextRowKey.value;
|
|
124
|
+
const rowKey = props.rowKey || contextRowKey.value || "key";
|
|
119
125
|
return (record) => record?.[rowKey];
|
|
120
126
|
});
|
|
121
127
|
if (isDev) devUseWarning("Table")(!(typeof props.rowKey === "function" && props.rowKey.length > 1), "usage", "`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.");
|
|
@@ -157,10 +163,10 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
157
163
|
const filterStateWarning = isDev ? devUseWarning("Table") : void 0;
|
|
158
164
|
const mergedFilterStates = computed(() => getMergedFilterStates(mergedColumns.value, filterStates.value, filterStateWarning));
|
|
159
165
|
const filters = computed(() => generateFilterInfo(mergedFilterStates.value));
|
|
160
|
-
const onFilterChange = (filters
|
|
166
|
+
const onFilterChange = (filters, filterStates) => {
|
|
161
167
|
triggerOnChange({
|
|
162
|
-
filters
|
|
163
|
-
filterStates
|
|
168
|
+
filters,
|
|
169
|
+
filterStates
|
|
164
170
|
}, "filter", true);
|
|
165
171
|
};
|
|
166
172
|
const mergedData = computed(() => getFilterData(sortedData.value, mergedFilterStates.value, childrenColumnName.value));
|
|
@@ -386,7 +392,7 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
386
392
|
"transformColumns": transformColumns,
|
|
387
393
|
"getContainerWidth": getContainerWidth,
|
|
388
394
|
"scroll": mergedScroll.value,
|
|
389
|
-
"measureRowRender": (measureRow) => createVNode(config_provider_default, { "getPopupContainer": (node) => node }, _isSlot(measureRow) ? measureRow : { default: () => [measureRow] }),
|
|
395
|
+
"measureRowRender": (measureRow) => createVNode(TableMeasureRowContextProvider, { "value": true }, { default: () => [createVNode(config_provider_default, { "getPopupContainer": (node) => node }, _isSlot(measureRow) ? measureRow : { default: () => [measureRow] })] }),
|
|
390
396
|
"title": title,
|
|
391
397
|
"footer": footer,
|
|
392
398
|
"summary": summary,
|
package/dist/table/Table.d.mts
CHANGED
|
@@ -3,14 +3,14 @@ import { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE } fro
|
|
|
3
3
|
import { Column } from "./Column.mjs";
|
|
4
4
|
import { ColumnGroup } from "./ColumnGroup.mjs";
|
|
5
5
|
import { TableEmits, TableProps as TableProps$1, TableSlots } from "./InternalTable.mjs";
|
|
6
|
-
import * as
|
|
6
|
+
import * as vue387 from "vue";
|
|
7
7
|
import { SlotsType } from "vue";
|
|
8
8
|
import { EXPAND_COLUMN, Summary } from "@v-c/table";
|
|
9
9
|
|
|
10
10
|
//#region src/table/Table.d.ts
|
|
11
|
-
declare const Table:
|
|
11
|
+
declare const Table: vue387.DefineSetupFnComponent<TableProps$1<AnyObject>, TableEmits<AnyObject>, SlotsType<TableSlots<AnyObject>>, TableProps$1<AnyObject> & {
|
|
12
12
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
13
|
-
},
|
|
13
|
+
}, vue387.PublicProps>;
|
|
14
14
|
declare const ForwardTable: typeof Table & {
|
|
15
15
|
displayName?: string;
|
|
16
16
|
SELECTION_COLUMN: typeof SELECTION_COLUMN;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { computed, defineComponent, inject, provide, ref } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/table/TableMeasureRowContext.ts
|
|
4
|
+
const TableMeasureRowContextKey = Symbol("TableMeasureRowContextKey");
|
|
5
|
+
function useTableMeasureRowContext() {
|
|
6
|
+
return inject(TableMeasureRowContextKey, ref(false));
|
|
7
|
+
}
|
|
8
|
+
const TableMeasureRowContextProvider = defineComponent((props, { slots }) => {
|
|
9
|
+
provide(TableMeasureRowContextKey, computed(() => props.value));
|
|
10
|
+
return () => {
|
|
11
|
+
return slots?.default?.();
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
name: "TableMeasureRowContext",
|
|
15
|
+
inheritAttrs: false,
|
|
16
|
+
props: { value: Boolean }
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { TableMeasureRowContextProvider, useTableMeasureRowContext };
|
|
@@ -10,6 +10,7 @@ import dropdown_default from "../../../dropdown/index.mjs";
|
|
|
10
10
|
import radio_default from "../../../radio/index.mjs";
|
|
11
11
|
import checkbox_default from "../../../checkbox/index.mjs";
|
|
12
12
|
import tree_default from "../../../tree/index.mjs";
|
|
13
|
+
import { useTableMeasureRowContext } from "../../TableMeasureRowContext.mjs";
|
|
13
14
|
import FilterSearch_default from "./FilterSearch.mjs";
|
|
14
15
|
import FilterWrapper_default from "./FilterWrapper.mjs";
|
|
15
16
|
import { Fragment, computed, createVNode, defineComponent, isVNode, mergeDefaults, shallowRef, watch } from "vue";
|
|
@@ -53,11 +54,11 @@ function renderFilterItems({ filters, prefixCls, filteredKeys, filterMultiple, s
|
|
|
53
54
|
filterSearch
|
|
54
55
|
})
|
|
55
56
|
};
|
|
56
|
-
const Component
|
|
57
|
+
const Component = filterMultiple ? checkbox_default : radio_default;
|
|
57
58
|
const checked = filteredKeys.includes(key);
|
|
58
59
|
const item = {
|
|
59
60
|
key: filter.value !== void 0 ? key : index,
|
|
60
|
-
label: createVNode(Fragment, null, [createVNode(Component
|
|
61
|
+
label: createVNode(Fragment, null, [createVNode(Component, { "checked": checked }, null), createVNode("span", null, [filter.text])])
|
|
61
62
|
};
|
|
62
63
|
if (searchValue.trim()) {
|
|
63
64
|
if (typeof filterSearch === "function") return filterSearch(searchValue, filter) ? item : null;
|
|
@@ -80,6 +81,7 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
80
81
|
const { filterMode, filterSearch, column } = toPropsRefs(props, "filterSearch", "filterMode", "column");
|
|
81
82
|
const filterDropdownProps = computed(() => column?.value?.filterDropdownProps ?? {});
|
|
82
83
|
const visible = shallowRef(false);
|
|
84
|
+
const inMeasureRow = useTableMeasureRowContext();
|
|
83
85
|
const filtered = computed(() => {
|
|
84
86
|
const filterState = props.filterState;
|
|
85
87
|
return !!(filterState && (filterState.filteredKeys?.length || filterState.forceFiltered));
|
|
@@ -196,11 +198,12 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
196
198
|
});
|
|
197
199
|
return () => {
|
|
198
200
|
let _slot;
|
|
201
|
+
const { dropdownPrefixCls, prefixCls, tablePrefixCls } = props;
|
|
199
202
|
const renderEmpty = config.value.renderEmpty;
|
|
200
203
|
const getDropdownContent = () => {
|
|
201
|
-
let dropdownContent
|
|
204
|
+
let dropdownContent;
|
|
202
205
|
const baseDropdownProps = {
|
|
203
|
-
prefixCls: `${
|
|
206
|
+
prefixCls: `${dropdownPrefixCls}-custom`,
|
|
204
207
|
setSelectedKeys: (selectedKeys) => onSelectKeys({ selectedKeys }),
|
|
205
208
|
selectedKeys: filteredKeysSync.value,
|
|
206
209
|
confirm: doFilter,
|
|
@@ -225,9 +228,9 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
225
228
|
} else hasPropDropdownRender = false;
|
|
226
229
|
} else hasPropDropdownRender = false;
|
|
227
230
|
}
|
|
228
|
-
if (filterNode) dropdownContent
|
|
229
|
-
else if (typeof column.value.filterDropdown === "function") dropdownContent
|
|
230
|
-
else if (column.value.filterDropdown) dropdownContent
|
|
231
|
+
if (filterNode) dropdownContent = filterNode;
|
|
232
|
+
else if (typeof column.value.filterDropdown === "function") dropdownContent = column.value.filterDropdown({ ...baseDropdownProps });
|
|
233
|
+
else if (column.value.filterDropdown) dropdownContent = column.value.filterDropdown;
|
|
231
234
|
else {
|
|
232
235
|
const selectedKeys = filteredKeysSync.value || [];
|
|
233
236
|
const getFilterComponent = () => {
|
|
@@ -296,7 +299,7 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
296
299
|
if (column.value.filterResetToDefaultFilteredValue) return isEqual((column.value.defaultFilteredValue || []).map((key) => String(key)), selectedKeys, true);
|
|
297
300
|
return selectedKeys.length === 0;
|
|
298
301
|
};
|
|
299
|
-
dropdownContent
|
|
302
|
+
dropdownContent = createVNode(Fragment, null, [getFilterComponent(), createVNode("div", { "class": `${props.prefixCls}-dropdown-btns` }, [createVNode(button_default, {
|
|
300
303
|
"type": "link",
|
|
301
304
|
"size": "small",
|
|
302
305
|
"disabled": getResetDisabled(),
|
|
@@ -309,11 +312,11 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
309
312
|
}
|
|
310
313
|
if (filterDropdownDefined.value) {
|
|
311
314
|
const _dropdownContent = function() {
|
|
312
|
-
return dropdownContent
|
|
315
|
+
return dropdownContent;
|
|
313
316
|
}();
|
|
314
|
-
dropdownContent
|
|
317
|
+
dropdownContent = createVNode(OverrideProvider, { "value": { selectable: void 0 } }, _isSlot(dropdownContent) ? dropdownContent : { default: () => [_dropdownContent] });
|
|
315
318
|
}
|
|
316
|
-
return createVNode(FilterWrapper_default, { "className": `${props.prefixCls}-dropdown` }, _isSlot(dropdownContent
|
|
319
|
+
return createVNode(FilterWrapper_default, { "className": `${props.prefixCls}-dropdown` }, _isSlot(dropdownContent) ? dropdownContent : { default: () => [dropdownContent] });
|
|
317
320
|
};
|
|
318
321
|
const getDropdownTrigger = () => {
|
|
319
322
|
let filterIcon;
|
|
@@ -334,6 +337,8 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
334
337
|
}, [filterIcon]);
|
|
335
338
|
};
|
|
336
339
|
const getTitle = () => slots.default?.() ?? props.children;
|
|
340
|
+
const triggerNode = getDropdownTrigger();
|
|
341
|
+
if (inMeasureRow.value) return createVNode("div", { "class": `${prefixCls}-column` }, [createVNode("span", { "class": `${tablePrefixCls}-column-title` }, [getTitle()]), triggerNode]);
|
|
337
342
|
const dropdownContent = getDropdownContent();
|
|
338
343
|
const dropdownRootClassName = clsx(props.rootClassName, filterDropdownProps.value.rootClassName, filterDropdownProps.value.rootClass);
|
|
339
344
|
const mergedDropdownProps = extendsObject_default({
|
|
@@ -352,7 +357,7 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
352
357
|
return dropdownContent;
|
|
353
358
|
}
|
|
354
359
|
});
|
|
355
|
-
return createVNode("div", { "class": `${
|
|
360
|
+
return createVNode("div", { "class": `${prefixCls}-column` }, [createVNode("span", { "class": `${tablePrefixCls}-column-title` }, [getTitle()]), createVNode(dropdown_default, mergedDropdownProps, _isSlot(_slot = getDropdownTrigger()) ? _slot : { default: () => [_slot] })]);
|
|
356
361
|
};
|
|
357
362
|
}, { props: /* @__PURE__ */ mergeDefaults({
|
|
358
363
|
tablePrefixCls: {
|
|
@@ -248,7 +248,7 @@ function useSelection(config, rowSelection) {
|
|
|
248
248
|
checked: keySet.has(key),
|
|
249
249
|
...checkboxProps
|
|
250
250
|
};
|
|
251
|
-
}).filter(({ disabled
|
|
251
|
+
}).filter(({ disabled }) => disabled);
|
|
252
252
|
const allDisabled = !!allDisabledData.length && allDisabledData.length === flattedData.value.length;
|
|
253
253
|
const allDisabledAndChecked = allDisabled && allDisabledData.every(({ checked }) => checked);
|
|
254
254
|
const allDisabledSomeChecked = allDisabled && allDisabledData.some(({ checked }) => checked);
|
|
@@ -93,8 +93,7 @@ interface CoverableDropdownProps extends DropdownProps {
|
|
|
93
93
|
interface ColumnType<RecordType = AnyObject> extends Omit<_v_c_table0.ColumnType<RecordType>, 'title'> {
|
|
94
94
|
title?: ColumnTitle<RecordType>;
|
|
95
95
|
sorter?: boolean | CompareFn<RecordType> | {
|
|
96
|
-
compare?: CompareFn<RecordType>;
|
|
97
|
-
/** Config multiple sorter order priority */
|
|
96
|
+
compare?: CompareFn<RecordType>; /** Config multiple sorter order priority */
|
|
98
97
|
multiple?: number;
|
|
99
98
|
};
|
|
100
99
|
sortOrder?: SortOrder;
|
|
@@ -8,7 +8,7 @@ const genVirtualStyle = (token) => {
|
|
|
8
8
|
return { [`${componentCls}-wrapper`]: {
|
|
9
9
|
[`${componentCls}-tbody-virtual`]: {
|
|
10
10
|
[`${componentCls}-tbody-virtual-holder-inner`]: { [`
|
|
11
|
-
& > ${componentCls}-row,
|
|
11
|
+
& > ${componentCls}-row,
|
|
12
12
|
& > div:not(${componentCls}-row) > ${componentCls}-row
|
|
13
13
|
`]: {
|
|
14
14
|
display: "flex",
|
package/dist/tabs/TabPane.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmptyEmit } from "../_util/type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue352 from "vue";
|
|
3
3
|
import { CSSProperties, SlotsType } from "vue";
|
|
4
4
|
import { TabPaneProps } from "@v-c/tabs";
|
|
5
5
|
|
|
@@ -16,8 +16,8 @@ interface TabPaneSlots {
|
|
|
16
16
|
closeIcon?: () => any;
|
|
17
17
|
icon?: () => any;
|
|
18
18
|
}
|
|
19
|
-
declare const TabPane:
|
|
19
|
+
declare const TabPane: vue352.DefineSetupFnComponent<TabPaneProps$1, EmptyEmit, SlotsType<TabPaneSlots>, TabPaneProps$1 & {
|
|
20
20
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
21
|
-
},
|
|
21
|
+
}, vue352.PublicProps>;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { TabPane, TabPaneProps$1 as TabPaneProps };
|
package/dist/tabs/index.d.mts
CHANGED
|
@@ -1,24 +1,40 @@
|
|
|
1
1
|
import { SizeType } from "../config-provider/SizeContext.mjs";
|
|
2
2
|
import { VueNode } from "../_util/type.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.mjs";
|
|
4
4
|
import "../_util/hooks/index.mjs";
|
|
5
5
|
import { TabPane, TabPaneProps as TabPaneProps$1 } from "./TabPane.mjs";
|
|
6
6
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
7
|
-
import * as
|
|
8
|
-
import { SlotsType } from "vue";
|
|
7
|
+
import * as vue174 from "vue";
|
|
8
|
+
import { CSSProperties, SlotsType } from "vue";
|
|
9
9
|
import { GetIndicatorSize, MoreProps, Tab, TabsProps } from "@v-c/tabs";
|
|
10
10
|
|
|
11
11
|
//#region src/tabs/index.d.ts
|
|
12
12
|
type TabsType = 'line' | 'card' | 'editable-card';
|
|
13
13
|
type TabPosition = 'top' | 'right' | 'bottom' | 'left';
|
|
14
14
|
type TabPlacement = 'top' | 'end' | 'bottom' | 'start';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
interface TabsSemanticClassNames {
|
|
16
|
+
root?: string;
|
|
17
|
+
item?: string;
|
|
18
|
+
indicator?: string;
|
|
19
|
+
content?: string;
|
|
20
|
+
header?: string;
|
|
21
|
+
}
|
|
22
|
+
interface TabsSemanticStyles {
|
|
23
|
+
root?: CSSProperties;
|
|
24
|
+
item?: CSSProperties;
|
|
25
|
+
indicator?: CSSProperties;
|
|
26
|
+
content?: CSSProperties;
|
|
27
|
+
header?: CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
type TabsClassNamesType = SemanticClassNamesType<TabsProps$1, TabsSemanticClassNames, {
|
|
30
|
+
popup?: {
|
|
31
|
+
root?: string;
|
|
32
|
+
};
|
|
19
33
|
}>;
|
|
20
|
-
type TabsStylesType = SemanticStylesType<TabsProps$1,
|
|
21
|
-
popup?:
|
|
34
|
+
type TabsStylesType = SemanticStylesType<TabsProps$1, TabsSemanticStyles, {
|
|
35
|
+
popup?: {
|
|
36
|
+
root?: CSSProperties;
|
|
37
|
+
};
|
|
22
38
|
}>;
|
|
23
39
|
interface CompatibilityProps {
|
|
24
40
|
/** @deprecated Please use `destroyOnHidden` instead */
|
|
@@ -87,8 +103,8 @@ interface TabsSlots {
|
|
|
87
103
|
rightExtra?: () => any;
|
|
88
104
|
leftExtra?: () => any;
|
|
89
105
|
}
|
|
90
|
-
declare const Tabs:
|
|
106
|
+
declare const Tabs: vue174.DefineSetupFnComponent<TabsProps$1, TabsEmits, SlotsType<TabsSlots>, TabsProps$1 & {
|
|
91
107
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
92
|
-
},
|
|
108
|
+
}, vue174.PublicProps>;
|
|
93
109
|
//#endregion
|
|
94
110
|
export { Tab$1 as Tab, Tabs, TabsEmits, TabsProps$1 as TabsProps, TabsRef, TabsSlots };
|
package/dist/tabs/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import VcTabs from "@v-c/tabs";
|
|
|
19
19
|
//#region src/tabs/index.tsx
|
|
20
20
|
const Tabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emit, expose }) => {
|
|
21
21
|
const { classes, styles, type, size: customSize, tabPlacement: tabPlacementProp, tabPosition, hideAdd, centered, indicatorSize } = toPropsRefs(props, "classes", "styles", "type", "size", "tabPlacement", "tabPosition", "hideAdd", "centered", "indicatorSize");
|
|
22
|
-
const classNames
|
|
22
|
+
const classNames = toRef(props, "classes");
|
|
23
23
|
const more = toRef(props, "more");
|
|
24
24
|
const popupClassName = toRef(props, "popupClassName");
|
|
25
25
|
const indicator = toRef(props, "indicator");
|
|
@@ -43,7 +43,7 @@ const Tabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emit, expos
|
|
|
43
43
|
items: mergedItems.value
|
|
44
44
|
};
|
|
45
45
|
});
|
|
46
|
-
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classNames
|
|
46
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps), computed(() => ({ popup: { _default: "root" } })));
|
|
47
47
|
const mergedAnimated = computed(() => useAnimateConfig(prefixCls.value, props.animated));
|
|
48
48
|
const mergedIndicator = computed(() => ({
|
|
49
49
|
align: indicator.value?.align,
|
|
@@ -140,9 +140,9 @@ const Tabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emit, expos
|
|
|
140
140
|
...attrStyle
|
|
141
141
|
};
|
|
142
142
|
let renderTabBar;
|
|
143
|
-
if (slots.renderTabBar || props.renderTabBar) renderTabBar = (props
|
|
144
|
-
return getSlotPropsFnRun(slots, props
|
|
145
|
-
props
|
|
143
|
+
if (slots.renderTabBar || props.renderTabBar) renderTabBar = (props, TabNavListComponent) => {
|
|
144
|
+
return getSlotPropsFnRun(slots, props, "renderTabBar", true, {
|
|
145
|
+
props,
|
|
146
146
|
TabNavListComponent
|
|
147
147
|
});
|
|
148
148
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VueNode } from "../_util/type.mjs";
|
|
2
2
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue358 from "vue";
|
|
4
4
|
import { SlotsType } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/tag/CheckableTag.d.ts
|
|
@@ -27,8 +27,8 @@ interface CheckableTagSlots {
|
|
|
27
27
|
default: () => any;
|
|
28
28
|
icon: () => any;
|
|
29
29
|
}
|
|
30
|
-
declare const CheckableTag:
|
|
30
|
+
declare const CheckableTag: vue358.DefineSetupFnComponent<CheckableTagProps, CheckableTagEmits, SlotsType<CheckableTagSlots>, CheckableTagProps & {
|
|
31
31
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
32
|
-
},
|
|
32
|
+
}, vue358.PublicProps>;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { CheckableTag, CheckableTagProps };
|
|
@@ -2,7 +2,7 @@ import { VueNode } from "../_util/type.mjs";
|
|
|
2
2
|
import { SemanticClassNames, SemanticStyles } from "../_util/hooks/useMergeSemantic.mjs";
|
|
3
3
|
import "../_util/hooks/index.mjs";
|
|
4
4
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
5
|
-
import * as
|
|
5
|
+
import * as vue364 from "vue";
|
|
6
6
|
|
|
7
7
|
//#region src/tag/CheckableTagGroup.d.ts
|
|
8
8
|
type CheckableTagDefaultValue = string | number;
|
|
@@ -36,8 +36,8 @@ interface CheckableTagGroupEmits<CheckableTagValue = CheckableTagDefaultValue> {
|
|
|
36
36
|
'update:value': (value: CheckableTagValue | CheckableTagValue[] | null) => void;
|
|
37
37
|
[key: string]: (...args: any[]) => any;
|
|
38
38
|
}
|
|
39
|
-
declare const CheckableTagGroup:
|
|
39
|
+
declare const CheckableTagGroup: vue364.DefineSetupFnComponent<CheckableTagGroupProps<CheckableTagDefaultValue>, CheckableTagGroupEmits<CheckableTagDefaultValue>, {}, CheckableTagGroupProps<CheckableTagDefaultValue> & {
|
|
40
40
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
41
|
-
},
|
|
41
|
+
}, vue364.PublicProps>;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { CheckableTagGroup };
|
package/dist/tag/index.d.mts
CHANGED
|
@@ -6,14 +6,23 @@ import { ClosableType } from "../_util/hooks/useClosable.mjs";
|
|
|
6
6
|
import { CheckableTag, CheckableTagProps } from "./CheckableTag.mjs";
|
|
7
7
|
import { CheckableTagGroup } from "./CheckableTagGroup.mjs";
|
|
8
8
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
9
|
-
import * as
|
|
10
|
-
import { SlotsType } from "vue";
|
|
9
|
+
import * as vue176 from "vue";
|
|
10
|
+
import { CSSProperties, SlotsType } from "vue";
|
|
11
11
|
import { LiteralUnion } from "@v-c/util/dist/type";
|
|
12
12
|
|
|
13
13
|
//#region src/tag/index.d.ts
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
interface TagSemanticClassNames {
|
|
15
|
+
root?: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
content?: string;
|
|
18
|
+
}
|
|
19
|
+
interface TagSemanticStyles {
|
|
20
|
+
root?: CSSProperties;
|
|
21
|
+
icon?: CSSProperties;
|
|
22
|
+
content?: CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
type TagClassNamesType = SemanticClassNamesType<TagProps, TagSemanticClassNames>;
|
|
25
|
+
type TagStylesType = SemanticStylesType<TagProps, TagSemanticStyles>;
|
|
17
26
|
interface TagProps extends ComponentBaseProps {
|
|
18
27
|
color?: LiteralUnion<PresetColorType | PresetStatusColorType>;
|
|
19
28
|
/** Advised to use closeIcon instead. */
|
|
@@ -38,9 +47,9 @@ interface TagEmits {
|
|
|
38
47
|
close: (ev: MouseEvent) => void;
|
|
39
48
|
[key: string]: (...args: any[]) => any;
|
|
40
49
|
}
|
|
41
|
-
declare const InternalTag:
|
|
50
|
+
declare const InternalTag: vue176.DefineSetupFnComponent<TagProps, TagEmits, SlotsType<TagSlots>, TagProps & {
|
|
42
51
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
43
|
-
},
|
|
52
|
+
}, vue176.PublicProps>;
|
|
44
53
|
declare const Tag: typeof InternalTag & {
|
|
45
54
|
CheckableTag: typeof CheckableTag;
|
|
46
55
|
};
|
package/dist/tag/index.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import { useComponentBaseConfig, useConfig } from "../config-provider/context.mj
|
|
|
2
2
|
import { pureAttrs, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.mjs";
|
|
3
3
|
import "../_util/hooks/index.mjs";
|
|
4
4
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.mjs";
|
|
5
|
-
import { replaceElement } from "../_util/vueNode.mjs";
|
|
6
5
|
import { useDisabledContext } from "../config-provider/DisabledContext.mjs";
|
|
7
6
|
import wave_default from "../_util/wave/index.mjs";
|
|
7
|
+
import { replaceElement } from "../_util/vueNode.mjs";
|
|
8
8
|
import useClosable, { pickClosable } from "../_util/hooks/useClosable.mjs";
|
|
9
9
|
import style_default from "./style/index.mjs";
|
|
10
10
|
import CheckableTag_default from "./CheckableTag.mjs";
|
package/dist/tag/style/index.mjs
CHANGED
|
@@ -124,7 +124,7 @@ const prepareToken = (token) => {
|
|
|
124
124
|
const prepareComponentToken = (token) => {
|
|
125
125
|
const solidTextColor = isBright(new AggregationColor(token.colorBgSolid), "#fff") ? "#000" : "#fff";
|
|
126
126
|
return {
|
|
127
|
-
defaultBg: new FastColor(token.
|
|
127
|
+
defaultBg: new FastColor(token.colorFillTertiary).onBackground(token.colorBgContainer).toHexString(),
|
|
128
128
|
defaultColor: token.colorText,
|
|
129
129
|
solidTextColor
|
|
130
130
|
};
|