antdv-next 1.0.0-alpha.4 → 1.0.0-beta.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.js +106 -0
- package/dist/_util/hooks/useMergeSemantic.js +3 -3
- package/dist/_util/styleUtils.js +10 -0
- package/dist/_util/tools.js +2 -1
- package/dist/_util/wave/WaveEffect.js +6 -1
- package/dist/_util/wave/style.js +4 -3
- package/dist/affix/index.d.ts +3 -3
- package/dist/alert/Alert.d.ts +4 -3
- package/dist/alert/Alert.js +1 -1
- package/dist/anchor/Anchor.d.ts +5 -5
- package/dist/anchor/AnchorLink.js +2 -2
- package/dist/anchor/index.d.ts +1 -1
- package/dist/antd.js +123 -115
- package/dist/app/App.d.ts +2 -2
- package/dist/auto-complete/index.d.ts +78 -0
- package/dist/auto-complete/index.js +634 -0
- package/dist/avatar/Avatar.d.ts +3 -3
- package/dist/avatar/AvatarGroup.d.ts +2 -2
- package/dist/badge/Ribbon.d.ts +3 -3
- package/dist/badge/ScrollNumber.js +1 -1
- package/dist/badge/SingleNumber.js +1 -1
- package/dist/badge/index.d.ts +3 -3
- package/dist/badge/index.js +5 -3
- package/dist/badge/style/index.js +1 -1
- package/dist/breadcrumb/Breadcrumb.d.ts +5 -5
- package/dist/breadcrumb/Breadcrumb.js +0 -8
- package/dist/breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/breadcrumb/BreadcrumbItem.js +1 -17
- package/dist/breadcrumb/index.d.ts +1 -1
- package/dist/button/Button.d.ts +3 -3
- package/dist/button/style/variant.js +116 -104
- package/dist/calendar/Header.js +1 -1
- package/dist/calendar/generateCalendar.d.ts +3 -3
- package/dist/calendar/index.d.ts +3 -3
- package/dist/calendar/style/index.d.ts +1 -1
- package/dist/calendar/style/index.js +1 -1
- package/dist/card/Card.d.ts +3 -3
- package/dist/card/CardGrid.d.ts +2 -2
- package/dist/card/CardMeta.d.ts +3 -3
- package/dist/card/style/index.js +11 -2
- package/dist/carousel/index.d.ts +3 -3
- package/dist/cascader/Panel.d.ts +3 -3
- package/dist/cascader/index.d.ts +4 -3
- package/dist/cascader/index.js +3 -1
- package/dist/checkbox/Checkbox.d.ts +3 -3
- package/dist/checkbox/Group.d.ts +3 -3
- package/dist/checkbox/style/index.d.ts +1 -1
- package/dist/collapse/Collapse.d.ts +3 -3
- package/dist/color-picker/ColorPicker.d.ts +3 -3
- package/dist/color-picker/ColorPicker.js +13 -2
- package/dist/components.d.ts +11 -8
- package/dist/components.js +7 -4
- package/dist/config-provider/context.d.ts +2 -1
- package/dist/config-provider/context.js +3 -3
- package/dist/config-provider/define.d.ts +14 -0
- package/dist/config-provider/index.d.ts +3 -3
- package/dist/config-provider/index.js +21 -2
- package/dist/date-picker/generatePicker/generateRangePicker.js +2 -2
- package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -2
- package/dist/date-picker/generatePicker/index.d.ts +17 -17
- package/dist/date-picker/index.d.ts +29 -27
- package/dist/date-picker/index.js +3 -0
- package/dist/date-picker/style/panel.js +4 -4
- package/dist/descriptions/index.d.ts +3 -3
- package/dist/divider/index.d.ts +2 -2
- package/dist/drawer/index.d.ts +6 -4
- package/dist/drawer/index.js +17 -5
- package/dist/drawer/useFocusable.d.ts +10 -0
- package/dist/drawer/useFocusable.js +18 -0
- package/dist/dropdown/dropdown.d.ts +4 -4
- package/dist/dropdown/dropdown.js +12 -3
- package/dist/empty/index.d.ts +3 -3
- package/dist/flex/index.d.ts +3 -3
- package/dist/flex/index.js +1 -1
- package/dist/float-button/BackTop.d.ts +3 -3
- package/dist/float-button/BackTop.js +4 -1
- package/dist/float-button/FloatButton.d.ts +3 -3
- package/dist/float-button/FloatButtonGroup.d.ts +3 -3
- package/dist/float-button/PurePanel.js +5 -5
- package/dist/float-button/style/button.js +4 -4
- package/dist/float-button/style/group.js +12 -12
- package/dist/form/ErrorList.js +4 -7
- package/dist/form/Form.d.ts +7 -3
- package/dist/form/Form.js +39 -22
- package/dist/form/FormItem/ItemHolder.js +0 -1
- package/dist/form/FormItem/index.d.ts +5 -5
- package/dist/form/FormItem/index.js +48 -29
- package/dist/form/FormItemInput.js +17 -19
- package/dist/form/style/index.js +3 -2
- package/dist/form/utils/valueUtil.js +4 -1
- package/dist/grid/col.js +7 -2
- package/dist/grid/index.d.ts +2 -2
- package/dist/grid/row.d.ts +2 -2
- package/dist/grid/style/index.js +7 -5
- package/dist/image/PreviewGroup.d.ts +2 -2
- package/dist/image/index.d.ts +7 -4
- package/dist/image/index.js +2 -0
- package/dist/image/style/index.d.ts +1 -1
- package/dist/index.d.ts +16 -12
- package/dist/index.js +7 -4
- package/dist/input/Input.js +1 -1
- package/dist/input/OTP/index.js +1 -1
- package/dist/input/TextArea.d.ts +3 -3
- package/dist/input/TextArea.js +1 -1
- package/dist/input/index.d.ts +11 -11
- package/dist/input/style/index.d.ts +2 -2
- package/dist/input-number/index.d.ts +4 -4
- package/dist/input-number/index.js +2 -6
- package/dist/input-number/style/index.js +18 -17
- package/dist/layout/index.d.ts +6 -6
- package/dist/layout/layout.d.ts +2 -2
- package/dist/layout/style/sider.js +1 -1
- package/dist/masonry/Masonry.d.ts +3 -3
- package/dist/masonry/Masonry.js +8 -6
- package/dist/mentions/index.d.ts +4 -3
- package/dist/mentions/index.js +4 -2
- package/dist/mentions/style/index.js +18 -17
- package/dist/menu/MenuDivider.d.ts +2 -2
- package/dist/menu/MenuItem.d.ts +3 -3
- package/dist/menu/index.d.ts +5 -5
- package/dist/menu/style/horizontal.js +1 -1
- package/dist/menu/style/index.js +5 -5
- package/dist/message/PurePanel.d.ts +2 -2
- package/dist/message/useMessage.d.ts +1 -0
- package/dist/modal/ConfirmDialog.js +1 -1
- package/dist/modal/Modal.d.ts +3 -3
- package/dist/modal/Modal.js +17 -6
- package/dist/modal/PurePanel.js +305 -0
- package/dist/modal/index.js +2 -0
- package/dist/modal/interface.d.ts +3 -1
- package/dist/notification/PurePanel.d.ts +2 -2
- package/dist/notification/PurePanel.js +4 -3
- package/dist/notification/style/index.d.ts +1 -1
- package/dist/notification/useNotification.d.ts +2 -1
- package/dist/notification/useNotification.js +7 -7
- package/dist/package.d.ts +143 -3
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.d.ts +3 -3
- package/dist/pagination/Pagination.js +1 -1
- package/dist/pagination/style/index.js +61 -50
- package/dist/popconfirm/PurePanel.d.ts +2 -2
- package/dist/popconfirm/PurePanel.js +2 -1
- package/dist/popconfirm/index.d.ts +3 -3
- package/dist/popover/PurePanel.js +4 -2
- package/dist/popover/index.d.ts +9 -6
- package/dist/popover/index.js +2 -1
- package/dist/popover/style/index.js +11 -8
- package/dist/progress/progress.d.ts +3 -3
- package/dist/qrcode/index.d.ts +3 -3
- package/dist/radio/index.d.ts +5 -5
- package/dist/radio/radio.d.ts +3 -3
- package/dist/radio/style/index.js +1 -1
- package/dist/rate/index.d.ts +3 -3
- package/dist/rate/style/index.d.ts +1 -1
- package/dist/result/index.d.ts +3 -3
- package/dist/result/noFound.d.ts +2 -2
- package/dist/result/serverError.d.ts +2 -2
- package/dist/segmented/index.d.ts +3 -3
- package/dist/select/index.d.ts +6 -6
- package/dist/select/index.js +5 -3
- package/dist/select/style/dropdown.js +1 -1
- package/dist/select/style/select-input-multiple.js +31 -29
- package/dist/select/style/select-input.js +50 -44
- package/dist/skeleton/Avatar.d.ts +2 -2
- package/dist/skeleton/Button.d.ts +2 -2
- package/dist/skeleton/Image.d.ts +2 -2
- package/dist/skeleton/Input.d.ts +2 -2
- package/dist/skeleton/Node.d.ts +3 -3
- package/dist/skeleton/Skeleton.d.ts +3 -3
- package/dist/skeleton/Skeleton.js +1 -1
- package/dist/skeleton/Title.d.ts +1 -2
- package/dist/skeleton/Title.js +0 -5
- package/dist/slider/index.d.ts +3 -3
- package/dist/space/Compact.d.ts +2 -0
- package/dist/space/Compact.js +17 -4
- package/dist/space/index.d.ts +5 -5
- package/dist/space/style/addon.js +20 -19
- package/dist/spin/index.d.ts +3 -3
- package/dist/spin/index.js +7 -6
- package/dist/splitter/SplitBar.js +9 -2
- package/dist/splitter/Splitter.d.ts +3 -3
- package/dist/splitter/Splitter.js +2 -1
- package/dist/splitter/index.d.ts +2 -2
- package/dist/splitter/style/index.js +6 -6
- package/dist/statistic/Statistic.d.ts +3 -3
- package/dist/statistic/Timer.d.ts +5 -5
- package/dist/statistic/index.d.ts +5 -5
- package/dist/steps/ProgressIcon.js +9 -2
- package/dist/steps/index.d.ts +3 -3
- package/dist/steps/index.js +7 -4
- package/dist/steps/style/horizontal.js +13 -10
- package/dist/steps/style/icon.js +12 -9
- package/dist/steps/style/index.js +19 -18
- package/dist/steps/style/inline.js +20 -17
- package/dist/steps/style/label-placement.js +22 -20
- package/dist/steps/style/nav.js +7 -5
- package/dist/steps/style/panel.js +34 -32
- package/dist/steps/style/progress-dot.js +10 -8
- package/dist/steps/style/progress.js +29 -58
- package/dist/steps/style/rtl.js +6 -4
- package/dist/steps/style/small.js +10 -8
- package/dist/steps/style/status.js +124 -121
- package/dist/steps/style/util.js +7 -4
- package/dist/steps/style/vertical.js +17 -14
- package/dist/style/placementArrow.js +7 -5
- package/dist/switch/index.d.ts +3 -3
- package/dist/table/Column.d.ts +3 -3
- package/dist/table/ColumnGroup.d.ts +3 -3
- package/dist/table/InternalTable.js +20 -6
- package/dist/table/Table.d.ts +3 -3
- package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
- package/dist/table/style/index.js +3 -3
- package/dist/table/style/radius.js +6 -0
- package/dist/table/style/virtual.js +1 -1
- package/dist/tabs/TabPane.d.ts +3 -3
- package/dist/tabs/index.d.ts +3 -3
- package/dist/tag/CheckableTag.d.ts +3 -3
- package/dist/tag/CheckableTagGroup.d.ts +3 -3
- package/dist/tag/CheckableTagGroup.js +3 -3
- package/dist/tag/index.d.ts +3 -3
- package/dist/theme/context.d.ts +2 -2
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/useToken.d.ts +2 -2
- package/dist/theme/useToken.js +1 -1
- package/dist/theme/util/genStyleUtils.d.ts +2 -2
- package/dist/theme/util/genStyleUtils.js +8 -5
- package/dist/theme/util/useResetIconStyle.js +1 -1
- package/dist/time-picker/index.d.ts +8 -7
- package/dist/time-picker/index.js +17 -13
- package/dist/timeline/Timeline.d.ts +3 -3
- package/dist/tooltip/PurePanel.d.ts +2 -2
- package/dist/tooltip/PurePanel.js +12 -8
- package/dist/tooltip/UniqueProvider/index.d.ts +2 -2
- package/dist/tooltip/index.d.ts +3 -3
- package/dist/tooltip/index.js +2 -3
- package/dist/tooltip/style/index.js +10 -8
- package/dist/tooltip/util.js +5 -3
- package/dist/tour/PurePanel.js +243 -0
- package/dist/tour/index.d.ts +3 -3
- package/dist/tour/index.js +2 -0
- package/dist/tour/style/index.js +5 -4
- package/dist/transfer/Actions.d.ts +2 -2
- package/dist/transfer/Section.d.ts +2 -2
- package/dist/transfer/Transfer.d.ts +3 -3
- package/dist/transfer/Transfer.js +2 -2
- package/dist/transfer/search.d.ts +3 -3
- package/dist/tree/DirectoryTree.d.ts +3 -3
- package/dist/tree/Tree.d.ts +3 -3
- package/dist/tree/style/index.d.ts +1 -1
- package/dist/tree-select/index.d.ts +5 -4
- package/dist/tree-select/index.js +3 -1
- package/dist/typography/Link.d.ts +3 -3
- package/dist/typography/Paragraph.d.ts +3 -3
- package/dist/typography/Text.d.ts +3 -3
- package/dist/typography/Title.d.ts +3 -3
- package/dist/typography/Typography.d.ts +3 -3
- package/dist/typography/index.d.ts +9 -9
- package/dist/upload/Dragger.d.ts +6 -3
- package/dist/upload/Upload.d.ts +3 -3
- package/dist/upload/Upload.js +15 -1
- package/dist/upload/index.d.ts +6 -3
- package/dist/upload/interface.d.ts +4 -4
- package/global.d.ts +3 -0
- package/package.json +69 -17
- package/web-tags.json +5069 -0
- package/web-types.json +14335 -0
package/dist/table/Table.d.ts
CHANGED
|
@@ -3,14 +3,14 @@ import { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE } fro
|
|
|
3
3
|
import { Column } from "./Column.js";
|
|
4
4
|
import { ColumnGroup } from "./ColumnGroup.js";
|
|
5
5
|
import { TableEmits, TableProps as TableProps$1, TableSlots } from "./InternalTable.js";
|
|
6
|
-
import * as
|
|
6
|
+
import * as vue386 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: vue386.DefineSetupFnComponent<TableProps$1<AnyObject>, TableEmits<AnyObject>, SlotsType<TableSlots<AnyObject>>, TableProps$1<AnyObject> & {
|
|
12
12
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
13
|
-
},
|
|
13
|
+
}, vue386.PublicProps>;
|
|
14
14
|
declare const ForwardTable: typeof Table & {
|
|
15
15
|
displayName?: string;
|
|
16
16
|
SELECTION_COLUMN: typeof SELECTION_COLUMN;
|
|
@@ -3,11 +3,11 @@ import { devUseWarning, isDev } from "../../../_util/warning.js";
|
|
|
3
3
|
import { toPropsRefs } from "../../../_util/tools.js";
|
|
4
4
|
import button_default from "../../../button/index.js";
|
|
5
5
|
import extendsObject_default from "../../../_util/extendsObject.js";
|
|
6
|
+
import empty_default from "../../../empty/index.js";
|
|
6
7
|
import { OverrideProvider } from "../../../menu/OverrideContext.js";
|
|
7
8
|
import menu_default from "../../../menu/index.js";
|
|
8
9
|
import dropdown_default from "../../../dropdown/index.js";
|
|
9
10
|
import radio_default from "../../../radio/index.js";
|
|
10
|
-
import empty_default from "../../../empty/index.js";
|
|
11
11
|
import checkbox_default from "../../../checkbox/index.js";
|
|
12
12
|
import tree_default from "../../../tree/index.js";
|
|
13
13
|
import FilterSearch_default from "./FilterSearch.js";
|
|
@@ -66,7 +66,7 @@ const genTableStyle = (token) => {
|
|
|
66
66
|
"textAlign": "start",
|
|
67
67
|
"background": tableHeaderBg,
|
|
68
68
|
"borderBottom": tableBorder,
|
|
69
|
-
"transition": `background ${motionDurationMid} ease`,
|
|
69
|
+
"transition": `background-color ${motionDurationMid} ease`,
|
|
70
70
|
"&[colspan]:not([colspan='1'])": { textAlign: "center" },
|
|
71
71
|
[`&:not(:last-child):not(${componentCls}-selection-column):not(${componentCls}-row-expand-icon-cell):not([colspan])::before`]: {
|
|
72
72
|
position: "absolute",
|
|
@@ -84,7 +84,7 @@ const genTableStyle = (token) => {
|
|
|
84
84
|
},
|
|
85
85
|
[`${componentCls}-tbody`]: { "> tr": {
|
|
86
86
|
"> th, > td": {
|
|
87
|
-
transition: `background ${motionDurationMid}, border-color ${motionDurationMid}`,
|
|
87
|
+
transition: `background-color ${motionDurationMid}, border-color ${motionDurationMid}`,
|
|
88
88
|
borderBottom: tableBorder,
|
|
89
89
|
[`
|
|
90
90
|
> ${componentCls}-wrapper:only-child,
|
|
@@ -106,7 +106,7 @@ const genTableStyle = (token) => {
|
|
|
106
106
|
textAlign: "start",
|
|
107
107
|
background: tableHeaderBg,
|
|
108
108
|
borderBottom: tableBorder,
|
|
109
|
-
transition: `background ${motionDurationMid} ease`
|
|
109
|
+
transition: `background-color ${motionDurationMid} ease`
|
|
110
110
|
},
|
|
111
111
|
[`& > ${componentCls}-measure-cell`]: {
|
|
112
112
|
paddingBlock: `0 !important`,
|
|
@@ -14,6 +14,12 @@ const genRadiusStyle = (token) => {
|
|
|
14
14
|
"&-container": {
|
|
15
15
|
"borderStartStartRadius": tableRadius,
|
|
16
16
|
"borderStartEndRadius": tableRadius,
|
|
17
|
+
"&::before": { borderStartStartRadius: tableRadius },
|
|
18
|
+
"&::after": { borderStartEndRadius: tableRadius },
|
|
19
|
+
[`> ${componentCls}-content`]: {
|
|
20
|
+
borderStartStartRadius: tableRadius,
|
|
21
|
+
borderStartEndRadius: tableRadius
|
|
22
|
+
},
|
|
17
23
|
"table > thead > tr:first-child": {
|
|
18
24
|
"> *:first-child": { borderStartStartRadius: tableRadius },
|
|
19
25
|
"> *:last-child": { borderStartEndRadius: tableRadius }
|
|
@@ -17,7 +17,7 @@ const genVirtualStyle = (token) => {
|
|
|
17
17
|
} },
|
|
18
18
|
[`${componentCls}-cell`]: {
|
|
19
19
|
borderBottom: tableBorder,
|
|
20
|
-
transition: `background ${motionDurationMid}`
|
|
20
|
+
transition: `background-color ${motionDurationMid}`
|
|
21
21
|
},
|
|
22
22
|
[`${componentCls}-expanded-row`]: { [`${rowCellCls}${rowCellCls}-fixed`]: {
|
|
23
23
|
position: "sticky",
|
package/dist/tabs/TabPane.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmptyEmit } from "../_util/type.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue302 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: vue302.DefineSetupFnComponent<TabPaneProps$1, EmptyEmit, SlotsType<TabPaneSlots>, TabPaneProps$1 & {
|
|
20
20
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
21
|
-
},
|
|
21
|
+
}, vue302.PublicProps>;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { TabPane, TabPaneProps$1 as TabPaneProps };
|
package/dist/tabs/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { SemanticClassNames, SemanticClassNamesType, SemanticStyles, SemanticSty
|
|
|
4
4
|
import "../_util/hooks/index.js";
|
|
5
5
|
import { TabPane, TabPaneProps as TabPaneProps$1 } from "./TabPane.js";
|
|
6
6
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
7
|
-
import * as
|
|
7
|
+
import * as vue162 from "vue";
|
|
8
8
|
import { SlotsType } from "vue";
|
|
9
9
|
import { GetIndicatorSize, MoreProps, Tab, TabsProps } from "@v-c/tabs";
|
|
10
10
|
|
|
@@ -87,8 +87,8 @@ interface TabsSlots {
|
|
|
87
87
|
rightExtra?: () => any;
|
|
88
88
|
leftExtra?: () => any;
|
|
89
89
|
}
|
|
90
|
-
declare const Tabs:
|
|
90
|
+
declare const Tabs: vue162.DefineSetupFnComponent<TabsProps$1, TabsEmits, SlotsType<TabsSlots>, TabsProps$1 & {
|
|
91
91
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
92
|
-
},
|
|
92
|
+
}, vue162.PublicProps>;
|
|
93
93
|
//#endregion
|
|
94
94
|
export { Tab$1 as Tab, Tabs, TabsEmits, TabsProps$1 as TabsProps, TabsRef, TabsSlots };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VueNode } from "../_util/type.js";
|
|
2
2
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue330 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: vue330.DefineSetupFnComponent<CheckableTagProps, CheckableTagEmits, SlotsType<CheckableTagSlots>, CheckableTagProps & {
|
|
31
31
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
32
|
-
},
|
|
32
|
+
}, vue330.PublicProps>;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { CheckableTag, CheckableTagProps };
|
|
@@ -2,7 +2,7 @@ import { VueNode } from "../_util/type.js";
|
|
|
2
2
|
import { SemanticClassNames, SemanticStyles } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import "../_util/hooks/index.js";
|
|
4
4
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as vue328 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: vue328.DefineSetupFnComponent<CheckableTagGroupProps<CheckableTagDefaultValue>, CheckableTagGroupEmits<CheckableTagDefaultValue>, {}, CheckableTagGroupProps<CheckableTagDefaultValue> & {
|
|
40
40
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
41
|
-
},
|
|
41
|
+
}, vue328.PublicProps>;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { CheckableTagGroup };
|
|
@@ -49,9 +49,9 @@ const CheckableTagGroup = /* @__PURE__ */ defineComponent((props, { emit, attrs,
|
|
|
49
49
|
aria: true,
|
|
50
50
|
data: true
|
|
51
51
|
}), {
|
|
52
|
-
"class": clsx(groupPrefixCls, rootClass, {
|
|
53
|
-
[`${groupPrefixCls}-disabled`]: disabled,
|
|
54
|
-
[`${groupPrefixCls}-rtl`]: direction.value === "rtl"
|
|
52
|
+
"class": clsx(groupPrefixCls.value, rootClass, {
|
|
53
|
+
[`${groupPrefixCls.value}-disabled`]: disabled,
|
|
54
|
+
[`${groupPrefixCls.value}-rtl`]: direction.value === "rtl"
|
|
55
55
|
}, hashId.value, cssVarCls.value, attrs.class, mergedClassNames.value.root),
|
|
56
56
|
"style": [mergedStyles.value.root, attrs.style],
|
|
57
57
|
"id": id,
|
package/dist/tag/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { ClosableType } from "../_util/hooks/useClosable.js";
|
|
|
6
6
|
import { CheckableTag, CheckableTagProps } from "./CheckableTag.js";
|
|
7
7
|
import { CheckableTagGroup } from "./CheckableTagGroup.js";
|
|
8
8
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
9
|
-
import * as
|
|
9
|
+
import * as vue177 from "vue";
|
|
10
10
|
import { SlotsType } from "vue";
|
|
11
11
|
import { LiteralUnion } from "@v-c/util/dist/type";
|
|
12
12
|
|
|
@@ -38,9 +38,9 @@ interface TagEmits {
|
|
|
38
38
|
close: (ev: MouseEvent) => void;
|
|
39
39
|
[key: string]: (...args: any[]) => any;
|
|
40
40
|
}
|
|
41
|
-
declare const InternalTag:
|
|
41
|
+
declare const InternalTag: vue177.DefineSetupFnComponent<TagProps, TagEmits, SlotsType<TagSlots>, TagProps & {
|
|
42
42
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
43
|
-
},
|
|
43
|
+
}, vue177.PublicProps>;
|
|
44
44
|
declare const Tag: typeof InternalTag & {
|
|
45
45
|
CheckableTag: typeof CheckableTag;
|
|
46
46
|
};
|
package/dist/theme/context.d.ts
CHANGED
package/dist/theme/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { GlobalToken } from "./interface/cssinjs-utils.js";
|
|
|
5
5
|
import "./interface/index.js";
|
|
6
6
|
import { getDesignToken } from "./getDesignToken.js";
|
|
7
7
|
import { derivative } from "./themes/default/index.js";
|
|
8
|
-
import * as vue2 from "vue";
|
|
9
8
|
import * as _antdv_next_cssinjs0 from "@antdv-next/cssinjs";
|
|
9
|
+
import * as vue2 from "vue";
|
|
10
10
|
|
|
11
11
|
//#region src/theme/index.d.ts
|
|
12
12
|
/** Get current context Design Token. Will be different if you are using nest theme config. */
|
package/dist/theme/useToken.d.ts
CHANGED
package/dist/theme/useToken.js
CHANGED
|
@@ -3,8 +3,8 @@ import seed_default from "./themes/seed.js";
|
|
|
3
3
|
import theme_default from "./themes/default/theme.js";
|
|
4
4
|
import { useDesignToken } from "./context.js";
|
|
5
5
|
import formatToken from "./util/alias.js";
|
|
6
|
-
import { computed } from "vue";
|
|
7
6
|
import { useCacheToken } from "@antdv-next/cssinjs";
|
|
7
|
+
import { computed } from "vue";
|
|
8
8
|
|
|
9
9
|
//#region src/theme/useToken.ts
|
|
10
10
|
const unitless = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../interface/index.js";
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
2
|
+
import "@antdv-next/cssinjs";
|
|
3
|
+
import "vue";
|
|
@@ -45,12 +45,15 @@ const { genComponentStyleHook, genStyleHooks, genSubStyleComponent } = genStyleU
|
|
|
45
45
|
getCommonStyle: genCommonStyle,
|
|
46
46
|
getCompUnitless: (() => unitless)
|
|
47
47
|
});
|
|
48
|
-
function genCssVar(antCls,
|
|
49
|
-
const cssPrefix = `--${antCls.replace(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return withVar ? `var(${raw})` : raw;
|
|
48
|
+
function genCssVar(antCls, component) {
|
|
49
|
+
const cssPrefix = `--${antCls.replace(/\./g, "")}-${component}-`;
|
|
50
|
+
const varName = (name) => {
|
|
51
|
+
return `${cssPrefix}${name}`;
|
|
53
52
|
};
|
|
53
|
+
const varRef = (name, fallback) => {
|
|
54
|
+
return fallback ? `var(${cssPrefix}${name}, ${fallback})` : `var(${cssPrefix}${name})`;
|
|
55
|
+
};
|
|
56
|
+
return [varName, varRef];
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import useToken from "../useToken.js";
|
|
2
2
|
import { genIconStyle } from "../../style/index.js";
|
|
3
|
-
import { computed } from "vue";
|
|
4
3
|
import { useStyleRegister } from "@antdv-next/cssinjs";
|
|
4
|
+
import { computed } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/theme/util/useResetIconStyle.ts
|
|
7
7
|
function useResetIconStyle(iconPrefixCls, csp) {
|
|
@@ -4,7 +4,7 @@ import "../_util/hooks/index.js";
|
|
|
4
4
|
import { InputStatus } from "../_util/statusUtils.js";
|
|
5
5
|
import "../date-picker/generatePicker/index.js";
|
|
6
6
|
import { PickerProps as PickerProps$1, RangePickerProps as RangePickerProps$1 } from "../date-picker/generatePicker/interface.js";
|
|
7
|
-
import * as
|
|
7
|
+
import * as vue51 from "vue";
|
|
8
8
|
import { CSSProperties, SlotsType } from "vue";
|
|
9
9
|
import { PickerMode } from "@v-c/picker";
|
|
10
10
|
|
|
@@ -46,9 +46,9 @@ interface TimeRangePickerEmits<DateType = AnyObject> {
|
|
|
46
46
|
'keydown': (e: KeyboardEvent, preventDefault: VoidFunction) => void;
|
|
47
47
|
[key: string]: (...args: any[]) => void;
|
|
48
48
|
}
|
|
49
|
-
declare const RangePicker$1:
|
|
49
|
+
declare const RangePicker$1: vue51.DefineSetupFnComponent<TimeRangePickerProps, TimeRangePickerEmits<AnyObject>, {}, TimeRangePickerProps & {
|
|
50
50
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
51
|
-
},
|
|
51
|
+
}, vue51.PublicProps>;
|
|
52
52
|
interface TimePickerProps extends Omit<PickerTimeProps<AnyObject>, 'picker' | 'classes' | 'styles'> {
|
|
53
53
|
addon?: () => VueNode;
|
|
54
54
|
status?: InputStatus;
|
|
@@ -79,15 +79,16 @@ interface TimePickerEmits<DateType = AnyObject> {
|
|
|
79
79
|
'keydown': (e: KeyboardEvent, preventDefault: VoidFunction) => void;
|
|
80
80
|
[key: string]: (...args: any[]) => void;
|
|
81
81
|
}
|
|
82
|
-
declare const TimePicker:
|
|
82
|
+
declare const TimePicker: vue51.DefineSetupFnComponent<TimePickerProps, TimePickerEmits<AnyObject>, SlotsType<TimePickerSlots>, TimePickerProps & {
|
|
83
83
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
84
|
-
},
|
|
84
|
+
}, vue51.PublicProps>;
|
|
85
85
|
type MergedTimePicker = typeof TimePicker & {
|
|
86
86
|
RangePicker: typeof RangePicker$1;
|
|
87
|
+
_InternalPanelDoNotUseOrYouWillBeFired: any;
|
|
87
88
|
};
|
|
88
89
|
declare const _default: MergedTimePicker;
|
|
89
|
-
declare const TimeRangePicker:
|
|
90
|
+
declare const TimeRangePicker: vue51.DefineSetupFnComponent<TimeRangePickerProps, TimeRangePickerEmits<AnyObject>, {}, TimeRangePickerProps & {
|
|
90
91
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
91
|
-
},
|
|
92
|
+
}, vue51.PublicProps>;
|
|
92
93
|
//#endregion
|
|
93
94
|
export { TimePickerLocale, TimePickerProps, TimeRangePicker, TimeRangePickerProps, _default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
2
|
import { toPropsRefs } from "../_util/tools.js";
|
|
3
|
+
import PurePanel_default from "../_util/PurePanel.js";
|
|
3
4
|
import { useVariants } from "../form/hooks/useVariant.js";
|
|
4
5
|
import useMergedPickerSemantic from "../date-picker/hooks/useMergedPickerSemantic.js";
|
|
5
6
|
import date_picker_default from "../date-picker/index.js";
|
|
@@ -39,19 +40,21 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
39
40
|
blur: () => rangeRef.value?.blur?.(),
|
|
40
41
|
nativeElement: computed(() => rangeRef.value?.nativeElement)
|
|
41
42
|
});
|
|
42
|
-
return () =>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
43
|
+
return () => {
|
|
44
|
+
return createVNode(InternalRangePicker, mergeProps(attrs, props, {
|
|
45
|
+
"ref": rangeRef,
|
|
46
|
+
"picker": "time",
|
|
47
|
+
"mode": void 0,
|
|
48
|
+
"onChange": onChange,
|
|
49
|
+
"onCalendarChange": onCalendarChange,
|
|
50
|
+
"onPanelChange": onPanelChange,
|
|
51
|
+
"onOpenChange": onOpenChange,
|
|
52
|
+
"onOk": onOk,
|
|
53
|
+
"onFocus": onFocus,
|
|
54
|
+
"onBlur": onBlur,
|
|
55
|
+
"onKeydown": onKeyDown
|
|
56
|
+
}), slots);
|
|
57
|
+
};
|
|
55
58
|
}, {
|
|
56
59
|
emits: [
|
|
57
60
|
"change",
|
|
@@ -2967,6 +2970,7 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
2967
2970
|
name: "ATimePicker",
|
|
2968
2971
|
inheritAttrs: false
|
|
2969
2972
|
});
|
|
2973
|
+
TimePicker._InternalPanelDoNotUseOrYouWillBeFired = PurePanel_default(TimePicker, "popupAlign", void 0, "picker");
|
|
2970
2974
|
TimePicker.RangePicker = RangePicker;
|
|
2971
2975
|
TimePicker.install = (app) => {
|
|
2972
2976
|
app.component(TimePicker.name, TimePicker);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EmptyEmit, VueNode } from "../_util/type.js";
|
|
2
2
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
3
3
|
import { TimelineItemProps } from "./TimelineItem.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as vue314 from "vue";
|
|
5
5
|
import { SlotsType } from "vue";
|
|
6
6
|
|
|
7
7
|
//#region src/timeline/Timeline.d.ts
|
|
@@ -40,8 +40,8 @@ interface TimelineSlots {
|
|
|
40
40
|
index: number;
|
|
41
41
|
}) => void;
|
|
42
42
|
}
|
|
43
|
-
declare const Timeline:
|
|
43
|
+
declare const Timeline: vue314.DefineSetupFnComponent<TimelineProps, EmptyEmit, SlotsType<TimelineSlots>, TimelineProps & {
|
|
44
44
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
45
|
-
},
|
|
45
|
+
}, vue314.PublicProps>;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { Timeline, TimelineProps };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TooltipProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue318 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/tooltip/PurePanel.d.ts
|
|
5
5
|
interface PurePanelProps extends TooltipProps {}
|
|
6
6
|
/** @private Internal Component. Do not use in your production. */
|
|
7
|
-
declare const PurePanel:
|
|
7
|
+
declare const PurePanel: vue318.DefineSetupFnComponent<PurePanelProps, {}, {}, PurePanelProps & {}, vue318.PublicProps>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { PurePanel };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
2
|
import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import "../_util/hooks/index.js";
|
|
4
|
-
import { toPropsRefs } from "../_util/tools.js";
|
|
4
|
+
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
5
|
+
import useCSSVarCls_default from "../config-provider/hooks/useCSSVarCls.js";
|
|
5
6
|
import style_default from "./style/index.js";
|
|
6
7
|
import { parseColor } from "./util.js";
|
|
7
8
|
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps } from "vue";
|
|
8
9
|
import { clsx } from "@v-c/util";
|
|
10
|
+
import { omit } from "es-toolkit";
|
|
9
11
|
import { Popup } from "@v-c/tooltip";
|
|
10
12
|
|
|
11
13
|
//#region src/tooltip/PurePanel.tsx
|
|
@@ -13,26 +15,28 @@ function _isSlot(s) {
|
|
|
13
15
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
14
16
|
}
|
|
15
17
|
/** @private Internal Component. Do not use in your production. */
|
|
16
|
-
const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
17
|
-
const { prefixCls,
|
|
18
|
-
const rootCls =
|
|
18
|
+
const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
|
|
19
|
+
const { prefixCls, rootPrefixCls } = useComponentBaseConfig("tooltip", props);
|
|
20
|
+
const rootCls = useCSSVarCls_default(prefixCls);
|
|
19
21
|
const { placement, classes, styles } = toPropsRefs(props, "placement", "classes", "styles");
|
|
20
22
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
21
23
|
const mergedProps = computed(() => ({
|
|
22
24
|
...props,
|
|
23
25
|
placement: placement.value
|
|
24
26
|
}));
|
|
25
|
-
const colorInfo = computed(() => parseColor(prefixCls.value, props.color));
|
|
26
|
-
const innerStyles = computed(() =>
|
|
27
|
+
const colorInfo = computed(() => parseColor(rootPrefixCls.value, prefixCls.value, props.color));
|
|
28
|
+
const innerStyles = computed(() => {
|
|
29
|
+
return { container: { ...colorInfo.value.overlayStyle } };
|
|
30
|
+
});
|
|
27
31
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(classes), useToArr(innerStyles, styles), useToProps(mergedProps));
|
|
28
32
|
return () => {
|
|
29
33
|
const arrowContentStyle = colorInfo.value.arrowStyle;
|
|
30
|
-
const
|
|
34
|
+
const title = getSlotPropsFnRun(slots, props, "title");
|
|
31
35
|
const rootClassName = clsx(rootCls.value, hashId.value, cssVarCls.value, prefixCls.value, `${prefixCls.value}-pure`, `${prefixCls.value}-placement-${placement.value}`, attrs.class, colorInfo.value.className);
|
|
32
36
|
return createVNode("div", {
|
|
33
37
|
"class": rootClassName,
|
|
34
38
|
"style": arrowContentStyle
|
|
35
|
-
}, [createVNode("div", { "class": `${prefixCls.value}-arrow` }, null), createVNode(Popup, mergeProps(props, {
|
|
39
|
+
}, [createVNode("div", { "class": `${prefixCls.value}-arrow` }, null), createVNode(Popup, mergeProps(omit(props, ["class"]), {
|
|
36
40
|
"className": hashId.value,
|
|
37
41
|
"prefixCls": prefixCls.value,
|
|
38
42
|
"classNames": mergedClassNames.value,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue316 from "vue";
|
|
2
2
|
|
|
3
3
|
//#region src/tooltip/UniqueProvider/index.d.ts
|
|
4
|
-
declare const UniqueProvider:
|
|
4
|
+
declare const UniqueProvider: vue316.DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, vue316.PublicProps>;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { UniqueProvider };
|
package/dist/tooltip/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { AdjustOverflow } from "../_util/placements.js";
|
|
|
6
6
|
import { PurePanel } from "./PurePanel.js";
|
|
7
7
|
import { UniqueProvider as UniqueProvider$1 } from "./UniqueProvider/index.js";
|
|
8
8
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
9
|
-
import * as
|
|
9
|
+
import * as vue175 from "vue";
|
|
10
10
|
import { SlotsType } from "vue";
|
|
11
11
|
import { TooltipProps, placements } from "@v-c/tooltip";
|
|
12
12
|
import { ActionType, AlignType } from "@v-c/trigger";
|
|
@@ -84,9 +84,9 @@ interface TooltipSlots {
|
|
|
84
84
|
interface InternalTooltipProps extends TooltipProps$1 {
|
|
85
85
|
dataPopoverInject?: boolean;
|
|
86
86
|
}
|
|
87
|
-
declare const InternalTooltip:
|
|
87
|
+
declare const InternalTooltip: vue175.DefineSetupFnComponent<InternalTooltipProps, TooltipEmits, SlotsType<TooltipSlots>, InternalTooltipProps & {
|
|
88
88
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
89
|
-
},
|
|
89
|
+
}, vue175.PublicProps>;
|
|
90
90
|
declare const _default: typeof InternalTooltip & {
|
|
91
91
|
UniqueProvider: typeof UniqueProvider$1;
|
|
92
92
|
_InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
|
package/dist/tooltip/index.js
CHANGED
|
@@ -30,7 +30,7 @@ function _isSlot(s) {
|
|
|
30
30
|
}
|
|
31
31
|
const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
|
|
32
32
|
const [, token] = useToken();
|
|
33
|
-
const {
|
|
33
|
+
const { prefixCls, rootPrefixCls, direction, arrow: contextArrow, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, getPopupContainer: getContextPopupContainer } = useComponentBaseConfig("tooltip", props, ["arrow"]);
|
|
34
34
|
const { arrow: tooltipArrow, builtinPlacements, autoAdjustOverflow, classes, styles } = toPropsRefs(props, "arrow", "builtinPlacements", "autoAdjustOverflow", "classes", "styles");
|
|
35
35
|
const mergedArrow = useMergedArrow_default(tooltipArrow, contextArrow);
|
|
36
36
|
const mergedShowArrow = computed(() => mergedArrow.value?.show);
|
|
@@ -69,7 +69,6 @@ const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
69
69
|
return props;
|
|
70
70
|
});
|
|
71
71
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, styles), useToProps(mergedProps));
|
|
72
|
-
const rootPrefixCls = computed(() => getPrefixCls());
|
|
73
72
|
const injectFromPopover = props.dataPopoverInject;
|
|
74
73
|
const rootCls = useCSSVarCls_default(prefixCls);
|
|
75
74
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls, !injectFromPopover);
|
|
@@ -85,7 +84,7 @@ const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
85
84
|
child = isVNode(child) ? child : createVNode("span", null, [child]);
|
|
86
85
|
const childProps = child?.props ?? {};
|
|
87
86
|
const childCls = !childProps?.class || typeof childProps?.class === "string" ? clsx(childProps.class, openClass || `${prefixCls.value}-open`) : childProps.class;
|
|
88
|
-
const colorInfo = parseColor(prefixCls.value, color);
|
|
87
|
+
const colorInfo = parseColor(rootPrefixCls.value, prefixCls.value, color);
|
|
89
88
|
const arrowContentStyle = colorInfo.arrowStyle;
|
|
90
89
|
const themeCls = clsx(rootCls.value, hashId.value, cssVarCls.value);
|
|
91
90
|
const rootClassNames = clsx({ [`${prefixCls.value}-rtl`]: direction.value === "rtl" }, colorInfo.className, rootClass, themeCls, contextClassName.value, mergedClassNames.value.root);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import genPresetColor from "../../theme/util/genPresetColor.js";
|
|
2
2
|
import { resetComponent } from "../../style/index.js";
|
|
3
|
-
import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
3
|
+
import { genCssVar, genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
4
4
|
import { mergeToken } from "../../theme/internal.js";
|
|
5
5
|
import { getArrowToken } from "../../style/roundedArrow.js";
|
|
6
6
|
import getArrowStyle, { MAX_VERTICAL_CONTENT_RADIUS, getArrowOffsetToken } from "../../style/placementArrow.js";
|
|
@@ -10,14 +10,16 @@ import "../../style/motion/index.js";
|
|
|
10
10
|
import { unit } from "@antdv-next/cssinjs";
|
|
11
11
|
|
|
12
12
|
//#region src/tooltip/style/index.ts
|
|
13
|
+
const FALL_BACK_ORIGIN = "50%";
|
|
13
14
|
const genTooltipStyle = (token) => {
|
|
14
|
-
const { calc, componentCls, tooltipMaxWidth, tooltipColor, tooltipBg, tooltipBorderRadius, zIndexPopup, controlHeight, boxShadowSecondary, paddingSM, paddingXS, arrowOffsetHorizontal, sizePopupArrow } = token;
|
|
15
|
+
const { calc, componentCls, tooltipMaxWidth, tooltipColor, tooltipBg, tooltipBorderRadius, zIndexPopup, controlHeight, boxShadowSecondary, paddingSM, paddingXS, arrowOffsetHorizontal, sizePopupArrow, antCls } = token;
|
|
16
|
+
const [varName, varRef] = genCssVar(antCls, "tooltip");
|
|
15
17
|
const edgeAlignMinWidth = calc(tooltipBorderRadius).add(sizePopupArrow).add(arrowOffsetHorizontal).equal();
|
|
16
18
|
const sharedBodyStyle = {
|
|
17
19
|
minWidth: calc(tooltipBorderRadius).mul(2).add(sizePopupArrow).equal(),
|
|
18
20
|
minHeight: controlHeight,
|
|
19
21
|
padding: `${unit(token.calc(paddingSM).div(2).equal())} ${unit(paddingXS)}`,
|
|
20
|
-
color:
|
|
22
|
+
color: varRef("overlay-color", tooltipColor),
|
|
21
23
|
textAlign: "start",
|
|
22
24
|
textDecoration: "none",
|
|
23
25
|
wordWrap: "break-word",
|
|
@@ -27,8 +29,8 @@ const genTooltipStyle = (token) => {
|
|
|
27
29
|
boxSizing: "border-box"
|
|
28
30
|
};
|
|
29
31
|
const sharedTransformOrigin = {
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
+
[varName("valid-offset-x")]: varRef("arrow-offset-horizontal", "var(--arrow-x)"),
|
|
33
|
+
transformOrigin: [varRef("valid-offset-x", FALL_BACK_ORIGIN), `var(--arrow-y, ${FALL_BACK_ORIGIN})`].join(" ")
|
|
32
34
|
};
|
|
33
35
|
return [
|
|
34
36
|
{ [componentCls]: {
|
|
@@ -41,7 +43,7 @@ const genTooltipStyle = (token) => {
|
|
|
41
43
|
"visibility": "visible",
|
|
42
44
|
...sharedTransformOrigin,
|
|
43
45
|
"&-hidden": { display: "none" },
|
|
44
|
-
"
|
|
46
|
+
[varName("arrow-background-color")]: tooltipBg,
|
|
45
47
|
[`${componentCls}-container`]: [sharedBodyStyle, initFadeMotion(token, true)],
|
|
46
48
|
[`&:has(~ ${componentCls}-unique-container)`]: { [`${componentCls}-container`]: {
|
|
47
49
|
border: "none",
|
|
@@ -65,11 +67,11 @@ const genTooltipStyle = (token) => {
|
|
|
65
67
|
[`${componentCls}-content`]: { position: "relative" },
|
|
66
68
|
...genPresetColor(token, (colorKey, { darkColor }) => ({ [`&${componentCls}-${colorKey}`]: {
|
|
67
69
|
[`${componentCls}-container`]: { backgroundColor: darkColor },
|
|
68
|
-
[`${componentCls}-arrow`]: { "
|
|
70
|
+
[`${componentCls}-arrow`]: { [varName("arrow-background-color")]: darkColor }
|
|
69
71
|
} })),
|
|
70
72
|
"&-rtl": { direction: "rtl" }
|
|
71
73
|
} },
|
|
72
|
-
getArrowStyle(token, "
|
|
74
|
+
getArrowStyle(token, varRef("arrow-background-color")),
|
|
73
75
|
{ [`${componentCls}-pure`]: {
|
|
74
76
|
position: "relative",
|
|
75
77
|
maxWidth: "none",
|
package/dist/tooltip/util.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
1
2
|
import { isPresetColor } from "../_util/colors.js";
|
|
2
3
|
import { generateColor } from "../color-picker/util.js";
|
|
3
4
|
import { classNames } from "@v-c/util";
|
|
4
5
|
|
|
5
6
|
//#region src/tooltip/util.ts
|
|
6
|
-
function parseColor(prefixCls, color) {
|
|
7
|
+
function parseColor(rootPrefixCls, prefixCls, color) {
|
|
7
8
|
const isInternalColor = isPresetColor(color);
|
|
9
|
+
const [varName] = genCssVar(rootPrefixCls, "tooltip");
|
|
8
10
|
const className = classNames({ [`${prefixCls}-${color}`]: color && isInternalColor });
|
|
9
11
|
const overlayStyle = {};
|
|
10
12
|
const arrowStyle = {};
|
|
@@ -12,8 +14,8 @@ function parseColor(prefixCls, color) {
|
|
|
12
14
|
const textColor = (.299 * rgb.r + .587 * rgb.g + .114 * rgb.b) / 255 < .5 ? "#FFF" : "#000";
|
|
13
15
|
if (color && !isInternalColor) {
|
|
14
16
|
overlayStyle.background = color;
|
|
15
|
-
overlayStyle["
|
|
16
|
-
arrowStyle["
|
|
17
|
+
overlayStyle[varName("overlay-color")] = textColor;
|
|
18
|
+
arrowStyle[varName("arrow-background-color")] = color;
|
|
17
19
|
}
|
|
18
20
|
return {
|
|
19
21
|
className,
|