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/steps/style/rtl.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
1
2
|
import { unit } from "@antdv-next/cssinjs";
|
|
2
3
|
|
|
3
4
|
//#region src/steps/style/rtl.ts
|
|
4
5
|
const genRTLStyle = (token) => {
|
|
5
|
-
const { componentCls, lineWidthBold } = token;
|
|
6
|
+
const { componentCls, lineWidthBold, antCls } = token;
|
|
6
7
|
const itemCls = `${componentCls}-item`;
|
|
8
|
+
const [, varRef] = genCssVar(antCls, "cmp-steps");
|
|
7
9
|
return { [`${componentCls}${componentCls}-rtl`]: {
|
|
8
10
|
direction: "rtl",
|
|
9
11
|
[`&${componentCls}-navigation${componentCls}-horizontal`]: { [`${itemCls}:after`]: { transform: "translateY(-50%) rotate(-45deg)" } },
|
|
10
12
|
[`&${componentCls}-panel`]: {
|
|
11
13
|
[`${componentCls}-panel-arrow`]: { transform: `scaleX(-1)` },
|
|
12
14
|
[`&${componentCls}-filled`]: { [itemCls]: { "&:not(:first-child)": { clipPath: `polygon(${[
|
|
13
|
-
`calc(0px -
|
|
15
|
+
`calc(0px - ${varRef("item-base-width")}) 0px`,
|
|
14
16
|
`calc(100% - ${unit(lineWidthBold)}) 0px`,
|
|
15
|
-
`calc(100% -
|
|
17
|
+
`calc(100% - ${varRef("item-base-width")} - ${unit(lineWidthBold)}) 50%`,
|
|
16
18
|
`calc(100% - ${unit(lineWidthBold)}) 100%`,
|
|
17
|
-
`calc(0px -
|
|
19
|
+
`calc(0px - ${varRef("item-base-width")}) 100%`
|
|
18
20
|
].join(",")})` } } }
|
|
19
21
|
}
|
|
20
22
|
} };
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
1
2
|
import { getItemWithWidthStyle } from "./util.js";
|
|
2
3
|
|
|
3
4
|
//#region src/steps/style/small.ts
|
|
4
5
|
const genSmallStyle = (token) => {
|
|
5
|
-
const { componentCls, iconSizeSM, fontSize, lineHeight, marginXS } = token;
|
|
6
|
+
const { componentCls, iconSizeSM, fontSize, lineHeight, marginXS, fontHeight, marginSM, paddingXS, antCls } = token;
|
|
7
|
+
const [varName] = genCssVar(antCls, "cmp-steps");
|
|
6
8
|
return { [`${componentCls}${componentCls}-small`]: {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
9
|
+
[varName("icon-size")]: iconSizeSM,
|
|
10
|
+
[varName("title-horizontal-item-margin")]: marginSM,
|
|
11
|
+
[varName("title-vertical-row-gap")]: paddingXS,
|
|
12
|
+
[varName("title-font-size")]: fontSize,
|
|
13
|
+
[varName("title-line-height")]: lineHeight,
|
|
14
|
+
[varName("title-horizontal-rail-margin")]: marginXS,
|
|
15
|
+
[varName("title-horizontal-title-height")]: fontHeight,
|
|
14
16
|
[`&${componentCls}-horizontal${componentCls}-title-vertical`]: getItemWithWidthStyle(token, marginXS)
|
|
15
17
|
} };
|
|
16
18
|
};
|
|
@@ -1,64 +1,67 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
2
|
+
|
|
1
3
|
//#region src/steps/style/status.ts
|
|
2
4
|
const STATUS_WAIT = "wait";
|
|
3
5
|
const STATUS_PROCESS = "process";
|
|
4
6
|
const STATUS_FINISH = "finish";
|
|
5
7
|
const STATUS_ERROR = "error";
|
|
6
8
|
const genStatusStyle = (token) => {
|
|
7
|
-
const { componentCls, colorTextDisabled, colorTextLightSolid, colorPrimary, colorTextLabel, colorError, colorText, colorTextDescription, colorBgContainer, colorPrimaryHover } = token;
|
|
9
|
+
const { componentCls, colorTextDisabled, colorTextLightSolid, colorPrimary, colorTextLabel, colorError, colorErrorHover, colorErrorBgFilledHover, colorFillTertiary, colorErrorBg, colorPrimaryBgHover, colorPrimaryBg, colorText, colorTextDescription, colorBgContainer, colorPrimaryHover, lineType, antCls } = token;
|
|
8
10
|
const itemCls = `${componentCls}-item`;
|
|
11
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
9
12
|
return { [componentCls]: [
|
|
10
13
|
{
|
|
11
14
|
[itemCls]: {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
15
|
+
[varName("item-solid-line-color")]: "#000",
|
|
16
|
+
[varName("item-title-color")]: "#000",
|
|
17
|
+
[varName("item-content-color")]: "#000",
|
|
18
|
+
[varName("item-subtitle-color")]: varRef("item-content-color"),
|
|
19
|
+
[varName("item-icon-custom-color")]: "#000",
|
|
20
|
+
[varName("item-icon-bg-color")]: "#000",
|
|
21
|
+
[varName("item-icon-border-color")]: "#000",
|
|
22
|
+
[varName("item-icon-text-color")]: "#fff",
|
|
23
|
+
[varName("item-icon-dot-color")]: "#000",
|
|
24
|
+
[varName("item-icon-dot-bg-color")]: varRef("item-icon-dot-color"),
|
|
25
|
+
[varName("item-icon-dot-border-color")]: varRef("item-icon-dot-color"),
|
|
26
|
+
[varName("item-text-hover-color")]: "#000",
|
|
27
|
+
[varName("item-icon-bg-hover-color")]: varRef("item-icon-bg-color"),
|
|
28
|
+
[varName("item-icon-border-hover-color")]: varRef("item-icon-border-color"),
|
|
29
|
+
[varName("item-icon-text-hover-color")]: varRef("item-icon-text-color"),
|
|
30
|
+
[varName("item-content-active-color")]: varRef("item-content-color"),
|
|
31
|
+
[varName("item-icon-active-bg-color")]: varRef("item-icon-bg-color"),
|
|
32
|
+
[varName("item-icon-active-border-color")]: varRef("item-icon-border-color"),
|
|
33
|
+
[varName("item-icon-active-text-color")]: varRef("item-icon-text-color"),
|
|
34
|
+
[varName("item-process-rail-line-style")]: lineType
|
|
32
35
|
},
|
|
33
|
-
[`${itemCls}-rail`]: { borderColor:
|
|
34
|
-
[`${itemCls}-custom ${itemCls}-icon`]: { color:
|
|
35
|
-
[`${itemCls}-title`]: { color:
|
|
36
|
-
[`${itemCls}-subtitle`]: { color:
|
|
37
|
-
[`${itemCls}-content`]: { color:
|
|
36
|
+
[`${itemCls}-rail`]: { borderColor: varRef("item-solid-line-color") },
|
|
37
|
+
[`${itemCls}-custom ${itemCls}-icon`]: { color: varRef("item-icon-custom-color") },
|
|
38
|
+
[`${itemCls}-title`]: { color: varRef("item-title-color") },
|
|
39
|
+
[`${itemCls}-subtitle`]: { color: varRef("item-subtitle-color") },
|
|
40
|
+
[`${itemCls}-content`]: { color: varRef("item-content-color") },
|
|
38
41
|
[`${itemCls}-active ${itemCls}-icon`]: {},
|
|
39
|
-
[`${itemCls}-active ${itemCls}-content`]: { color:
|
|
40
|
-
[`${itemCls}[role='button']:not(${itemCls}-active):hover`]: { [`${itemCls}-title, ${itemCls}-content`]: { color:
|
|
42
|
+
[`${itemCls}-active ${itemCls}-content`]: { color: varRef("item-content-active-color") },
|
|
43
|
+
[`${itemCls}[role='button']:not(${itemCls}-active):hover`]: { [`${itemCls}-title, ${itemCls}-content`]: { color: varRef("item-text-hover-color") } },
|
|
41
44
|
[`&:not(${componentCls}-dot)`]: { [`${itemCls}:not(${itemCls}-custom)`]: {
|
|
42
45
|
[`${itemCls}-icon`]: {
|
|
43
|
-
background:
|
|
44
|
-
borderColor:
|
|
45
|
-
color:
|
|
46
|
+
background: varRef("item-icon-bg-color"),
|
|
47
|
+
borderColor: varRef("item-icon-border-color"),
|
|
48
|
+
color: varRef("item-icon-text-color")
|
|
46
49
|
},
|
|
47
50
|
[`&[role='button']:not(${itemCls}-active):hover`]: { [`${itemCls}-icon`]: {
|
|
48
|
-
background:
|
|
49
|
-
borderColor:
|
|
50
|
-
color:
|
|
51
|
+
background: varRef("item-icon-bg-hover-color"),
|
|
52
|
+
borderColor: varRef("item-icon-border-hover-color"),
|
|
53
|
+
color: varRef("item-icon-text-hover-color")
|
|
51
54
|
} },
|
|
52
55
|
[`&${itemCls}-active`]: { [`${itemCls}-icon`]: {
|
|
53
|
-
background:
|
|
54
|
-
borderColor:
|
|
55
|
-
color:
|
|
56
|
+
background: varRef("item-icon-active-bg-color"),
|
|
57
|
+
borderColor: varRef("item-icon-active-border-color"),
|
|
58
|
+
color: varRef("item-icon-active-text-color")
|
|
56
59
|
} }
|
|
57
60
|
} },
|
|
58
61
|
[`&${componentCls}-dot`]: { [`${itemCls}-icon`]: {
|
|
59
|
-
background:
|
|
60
|
-
borderColor:
|
|
61
|
-
color:
|
|
62
|
+
background: varRef("item-icon-dot-bg-color"),
|
|
63
|
+
borderColor: varRef("item-icon-dot-border-color"),
|
|
64
|
+
color: varRef("item-icon-dot-color"),
|
|
62
65
|
[`&${itemCls}-icon-dot-custom`]: {
|
|
63
66
|
background: "transparent",
|
|
64
67
|
border: "none"
|
|
@@ -67,111 +70,111 @@ const genStatusStyle = (token) => {
|
|
|
67
70
|
},
|
|
68
71
|
{
|
|
69
72
|
[`${itemCls}-${STATUS_WAIT}`]: {
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
73
|
+
[varName("item-icon-custom-color")]: colorTextDisabled,
|
|
74
|
+
[varName("item-title-color")]: colorTextDescription,
|
|
75
|
+
[varName("item-content-color")]: colorTextDescription,
|
|
76
|
+
[varName("item-content-active-color")]: colorText,
|
|
77
|
+
[varName("item-text-hover-color")]: colorPrimaryHover
|
|
75
78
|
},
|
|
76
|
-
[`${itemCls}-rail-${STATUS_WAIT}`]: { "
|
|
79
|
+
[`${itemCls}-rail-${STATUS_WAIT}`]: { [varName("item-solid-line-color")]: colorTextDisabled },
|
|
77
80
|
[`${itemCls}-${STATUS_PROCESS}`]: {
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
81
|
+
[varName("item-icon-custom-color")]: colorPrimary,
|
|
82
|
+
[varName("item-title-color")]: colorText,
|
|
83
|
+
[varName("item-content-color")]: colorTextDescription,
|
|
84
|
+
[varName("item-content-active-color")]: colorText,
|
|
85
|
+
[varName("item-text-hover-color")]: colorPrimaryHover
|
|
83
86
|
},
|
|
84
87
|
[`${itemCls}-rail-${STATUS_PROCESS}`]: {
|
|
85
|
-
"
|
|
86
|
-
"
|
|
88
|
+
[varName("item-solid-line-color")]: colorPrimary,
|
|
89
|
+
[varName("rail-line-style")]: varRef("item-process-rail-line-style")
|
|
87
90
|
},
|
|
88
91
|
[`${itemCls}-${STATUS_FINISH}`]: {
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
92
|
+
[varName("item-icon-custom-color")]: colorPrimary,
|
|
93
|
+
[varName("item-title-color")]: colorText,
|
|
94
|
+
[varName("item-content-color")]: colorTextDescription,
|
|
95
|
+
[varName("item-content-active-color")]: colorText,
|
|
96
|
+
[varName("item-text-hover-color")]: colorPrimaryHover
|
|
94
97
|
},
|
|
95
|
-
[`${itemCls}-rail-${STATUS_FINISH}`]: { "
|
|
98
|
+
[`${itemCls}-rail-${STATUS_FINISH}`]: { [varName("item-solid-line-color")]: colorPrimary },
|
|
96
99
|
[`${itemCls}-${STATUS_ERROR}`]: {
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
100
|
+
[varName("item-icon-custom-color")]: colorError,
|
|
101
|
+
[varName("item-title-color")]: colorError,
|
|
102
|
+
[varName("item-content-color")]: colorError,
|
|
103
|
+
[varName("item-content-active-color")]: colorError,
|
|
104
|
+
[varName("item-text-hover-color")]: colorErrorHover
|
|
102
105
|
},
|
|
103
|
-
[`${itemCls}-rail-${STATUS_ERROR}`]: { "
|
|
106
|
+
[`${itemCls}-rail-${STATUS_ERROR}`]: { [varName("item-solid-line-color")]: colorError }
|
|
104
107
|
},
|
|
105
108
|
{ [`&${componentCls}-filled`]: {
|
|
106
|
-
[itemCls]: { "
|
|
109
|
+
[itemCls]: { [varName("item-icon-dot-border-color")]: "transparent" },
|
|
107
110
|
[`${itemCls}-${STATUS_WAIT}`]: {
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
111
|
+
[varName("item-icon-bg-color")]: colorFillTertiary,
|
|
112
|
+
[varName("item-icon-border-color")]: "transparent",
|
|
113
|
+
[varName("item-icon-text-color")]: colorTextLabel,
|
|
114
|
+
[varName("item-icon-dot-bg-color")]: colorTextDisabled,
|
|
115
|
+
[varName("item-icon-bg-hover-color")]: colorPrimaryBgHover,
|
|
116
|
+
[varName("item-icon-border-hover-color")]: "transparent",
|
|
117
|
+
[varName("item-icon-text-hover-color")]: colorPrimary,
|
|
118
|
+
[varName("item-icon-active-bg-color")]: colorPrimary,
|
|
119
|
+
[varName("item-icon-active-border-color")]: "transparent",
|
|
120
|
+
[varName("item-icon-active-text-color")]: colorTextLightSolid
|
|
118
121
|
},
|
|
119
122
|
[`${itemCls}-${STATUS_PROCESS}, ${itemCls}-${STATUS_FINISH}`]: {
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
123
|
+
[varName("item-icon-bg-color")]: colorPrimaryBg,
|
|
124
|
+
[varName("item-icon-border-color")]: "transparent",
|
|
125
|
+
[varName("item-icon-text-color")]: colorPrimary,
|
|
126
|
+
[varName("item-icon-dot-bg-color")]: colorPrimary,
|
|
127
|
+
[varName("item-icon-bg-hover-color")]: colorPrimaryBgHover,
|
|
128
|
+
[varName("item-icon-border-hover-color")]: "transparent",
|
|
129
|
+
[varName("item-icon-text-hover-color")]: colorPrimary,
|
|
130
|
+
[varName("item-icon-active-bg-color")]: colorPrimary,
|
|
131
|
+
[varName("item-icon-active-border-color")]: "transparent",
|
|
132
|
+
[varName("item-icon-active-text-color")]: colorTextLightSolid
|
|
130
133
|
},
|
|
131
134
|
[`${itemCls}-${STATUS_ERROR}`]: {
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
135
|
+
[varName("item-icon-bg-color")]: colorErrorBg,
|
|
136
|
+
[varName("item-icon-border-color")]: "transparent",
|
|
137
|
+
[varName("item-icon-text-color")]: colorError,
|
|
138
|
+
[varName("item-icon-dot-bg-color")]: colorError,
|
|
139
|
+
[varName("item-icon-bg-hover-color")]: colorErrorBgFilledHover,
|
|
140
|
+
[varName("item-icon-border-hover-color")]: "transparent",
|
|
141
|
+
[varName("item-icon-text-hover-color")]: colorError,
|
|
142
|
+
[varName("item-icon-active-bg-color")]: colorError,
|
|
143
|
+
[varName("item-icon-active-border-color")]: "transparent",
|
|
144
|
+
[varName("item-icon-active-text-color")]: colorTextLightSolid
|
|
142
145
|
}
|
|
143
146
|
} },
|
|
144
147
|
{ [`&${componentCls}-outlined`]: {
|
|
145
|
-
[itemCls]: { "
|
|
148
|
+
[itemCls]: { [varName("item-icon-dot-bg-color")]: "transparent" },
|
|
146
149
|
[`${itemCls}-${STATUS_WAIT}`]: {
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
150
|
+
[varName("item-icon-bg-color")]: colorBgContainer,
|
|
151
|
+
[varName("item-icon-border-color")]: colorTextDisabled,
|
|
152
|
+
[varName("item-icon-text-color")]: colorTextDisabled,
|
|
153
|
+
[varName("item-icon-dot-color")]: colorTextDisabled,
|
|
154
|
+
[varName("item-icon-bg-hover-color")]: "transparent",
|
|
155
|
+
[varName("item-icon-border-hover-color")]: colorPrimaryHover,
|
|
156
|
+
[varName("item-icon-text-hover-color")]: colorPrimaryHover,
|
|
157
|
+
[varName("item-icon-active-bg-color")]: colorFillTertiary
|
|
155
158
|
},
|
|
156
159
|
[`${itemCls}-${STATUS_PROCESS}, ${itemCls}-${STATUS_FINISH}`]: {
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"
|
|
160
|
+
[varName("item-icon-bg-color")]: colorBgContainer,
|
|
161
|
+
[varName("item-icon-border-color")]: colorPrimary,
|
|
162
|
+
[varName("item-icon-text-color")]: colorPrimary,
|
|
163
|
+
[varName("item-icon-dot-color")]: colorPrimary,
|
|
164
|
+
[varName("item-icon-bg-hover-color")]: "transparent",
|
|
165
|
+
[varName("item-icon-border-hover-color")]: colorPrimaryHover,
|
|
166
|
+
[varName("item-icon-text-hover-color")]: colorPrimaryHover,
|
|
167
|
+
[varName("item-icon-active-bg-color")]: colorPrimaryBg
|
|
165
168
|
},
|
|
166
169
|
[`${itemCls}-${STATUS_ERROR}`]: {
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
170
|
+
[varName("item-icon-bg-color")]: colorBgContainer,
|
|
171
|
+
[varName("item-icon-border-color")]: colorError,
|
|
172
|
+
[varName("item-icon-text-color")]: colorError,
|
|
173
|
+
[varName("item-icon-dot-color")]: colorError,
|
|
174
|
+
[varName("item-icon-bg-hover-color")]: "transparent",
|
|
175
|
+
[varName("item-icon-border-hover-color")]: colorErrorHover,
|
|
176
|
+
[varName("item-icon-text-hover-color")]: colorErrorHover,
|
|
177
|
+
[varName("item-icon-active-bg-color")]: colorErrorBg
|
|
175
178
|
}
|
|
176
179
|
} }
|
|
177
180
|
] };
|
package/dist/steps/style/util.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
2
|
+
|
|
1
3
|
//#region src/steps/style/util.ts
|
|
2
4
|
function withoutVar(cssVar) {
|
|
3
5
|
return (cssVar || "--ant-not-exist").replace(/var\((.*)\)/, "$1");
|
|
@@ -7,14 +9,15 @@ function withoutVar(cssVar) {
|
|
|
7
9
|
* This should be multiple since will conflict with other `rail` styles.
|
|
8
10
|
*/
|
|
9
11
|
function getItemWithWidthStyle(token, marginSize, optionalStyle) {
|
|
10
|
-
const { calc, componentCls, descriptionMaxWidth } = token;
|
|
12
|
+
const { calc, componentCls, descriptionMaxWidth, antCls } = token;
|
|
11
13
|
const itemCls = `${componentCls}-item`;
|
|
14
|
+
const [, varRef] = genCssVar(antCls, "cmp-steps");
|
|
12
15
|
return { [`@container style(${withoutVar(descriptionMaxWidth)})`]: [{
|
|
13
|
-
[`${itemCls}-icon`]: { marginInlineStart: calc(descriptionMaxWidth).sub(
|
|
16
|
+
[`${itemCls}-icon`]: { marginInlineStart: calc(descriptionMaxWidth).sub(varRef("icon-size")).div(2).equal() },
|
|
14
17
|
[`${itemCls}-rail`]: {
|
|
15
18
|
width: "auto",
|
|
16
|
-
insetInlineStart: calc(descriptionMaxWidth).add(
|
|
17
|
-
insetInlineEnd: calc(descriptionMaxWidth).sub(
|
|
19
|
+
insetInlineStart: calc(descriptionMaxWidth).add(varRef("icon-size")).div(2).add(marginSize).equal(),
|
|
20
|
+
insetInlineEnd: calc(descriptionMaxWidth).sub(varRef("icon-size")).div(2).sub(marginSize).mul(-1).equal()
|
|
18
21
|
}
|
|
19
22
|
}, optionalStyle] };
|
|
20
23
|
}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
+
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
2
|
+
|
|
1
3
|
//#region src/steps/style/vertical.ts
|
|
2
4
|
const genVerticalStyle = (token) => {
|
|
3
|
-
const { componentCls, calc } = token;
|
|
5
|
+
const { componentCls, marginXXS, paddingSM, controlHeight, antCls, calc } = token;
|
|
4
6
|
const itemCls = `${componentCls}-item`;
|
|
7
|
+
const [varName, varRef] = genCssVar(antCls, "cmp-steps");
|
|
5
8
|
return { [`${componentCls}-vertical`]: {
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
[varName("vertical-rail-margin")]: calc(marginXXS).mul(1.5).equal(),
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
alignItems: "stretch",
|
|
9
12
|
[`> ${itemCls}`]: {
|
|
10
|
-
"minHeight": calc(
|
|
11
|
-
"paddingBottom":
|
|
13
|
+
"minHeight": calc(controlHeight).mul(1.5).equal(),
|
|
14
|
+
"paddingBottom": paddingSM,
|
|
12
15
|
"&:last-child": { paddingBottom: 0 },
|
|
13
|
-
[`${itemCls}-icon`]: { marginInlineStart:
|
|
16
|
+
[`${itemCls}-icon`]: { marginInlineStart: `calc((${varRef("icon-size-max")} - ${varRef("icon-size")}) / 2)` },
|
|
14
17
|
[`${itemCls}-rail`]: {
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
[varName("rail-offset")]: calc(varRef("heading-height")).sub(varRef("icon-size")).div(2).equal(),
|
|
19
|
+
borderInlineStartWidth: varRef("rail-size"),
|
|
20
|
+
position: "absolute",
|
|
21
|
+
top: calc(varRef("icon-size")).add(varRef("item-wrapper-padding-top")).add(varRef("rail-offset")).add(varRef("vertical-rail-margin")).equal(),
|
|
22
|
+
insetInlineStart: calc(varRef("icon-size-max")).div(2).equal(),
|
|
23
|
+
bottom: calc(varRef("vertical-rail-margin")).sub(varRef("rail-offset")).equal(),
|
|
24
|
+
marginInlineStart: `calc(${varRef("rail-size")} / -2)`
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
27
|
} };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
1
2
|
import { genRoundedArrow } from "./roundedArrow.js";
|
|
2
3
|
import { unit } from "@antdv-next/cssinjs";
|
|
3
4
|
|
|
@@ -16,7 +17,8 @@ function isInject(valid, code) {
|
|
|
16
17
|
return code;
|
|
17
18
|
}
|
|
18
19
|
function getArrowStyle(token, colorBg, options) {
|
|
19
|
-
const { componentCls, boxShadowPopoverArrow, arrowOffsetVertical, arrowOffsetHorizontal } = token;
|
|
20
|
+
const { componentCls, boxShadowPopoverArrow, arrowOffsetVertical, arrowOffsetHorizontal, antCls } = token;
|
|
21
|
+
const [varName] = genCssVar(antCls, "tooltip");
|
|
20
22
|
const { arrowDistance = 0, arrowPlacement = {
|
|
21
23
|
left: true,
|
|
22
24
|
right: true,
|
|
@@ -48,14 +50,14 @@ function getArrowStyle(token, colorBg, options) {
|
|
|
48
50
|
transform: "translateX(-50%) translateY(100%) rotate(180deg)"
|
|
49
51
|
},
|
|
50
52
|
"&-placement-topLeft": {
|
|
51
|
-
"
|
|
53
|
+
[varName("arrow-offset-horizontal")]: arrowOffsetHorizontal,
|
|
52
54
|
[`> ${componentCls}-arrow`]: { left: {
|
|
53
55
|
_skip_check_: true,
|
|
54
56
|
value: arrowOffsetHorizontal
|
|
55
57
|
} }
|
|
56
58
|
},
|
|
57
59
|
"&-placement-topRight": {
|
|
58
|
-
"
|
|
60
|
+
[varName("arrow-offset-horizontal")]: `calc(100% - ${unit(arrowOffsetHorizontal)})`,
|
|
59
61
|
[`> ${componentCls}-arrow`]: { right: {
|
|
60
62
|
_skip_check_: true,
|
|
61
63
|
value: arrowOffsetHorizontal
|
|
@@ -79,14 +81,14 @@ function getArrowStyle(token, colorBg, options) {
|
|
|
79
81
|
transform: `translateX(-50%) translateY(-100%)`
|
|
80
82
|
},
|
|
81
83
|
"&-placement-bottomLeft": {
|
|
82
|
-
"
|
|
84
|
+
[varName("arrow-offset-horizontal")]: arrowOffsetHorizontal,
|
|
83
85
|
[`> ${componentCls}-arrow`]: { left: {
|
|
84
86
|
_skip_check_: true,
|
|
85
87
|
value: arrowOffsetHorizontal
|
|
86
88
|
} }
|
|
87
89
|
},
|
|
88
90
|
"&-placement-bottomRight": {
|
|
89
|
-
"
|
|
91
|
+
[varName("arrow-offset-horizontal")]: `calc(100% - ${unit(arrowOffsetHorizontal)})`,
|
|
90
92
|
[`> ${componentCls}-arrow`]: { right: {
|
|
91
93
|
_skip_check_: true,
|
|
92
94
|
value: arrowOffsetHorizontal
|
package/dist/switch/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { VueNode } from "../_util/type.js";
|
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } 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 vue173 from "vue";
|
|
6
6
|
import { SlotsType } from "vue";
|
|
7
7
|
import { SwitchChangeEventHandler, SwitchClickEventHandler } from "@v-c/switch";
|
|
8
8
|
|
|
@@ -47,8 +47,8 @@ interface SwitchSlots {
|
|
|
47
47
|
checkedChildren: () => any;
|
|
48
48
|
unCheckedChildren: () => any;
|
|
49
49
|
}
|
|
50
|
-
declare const Switch:
|
|
50
|
+
declare const Switch: vue173.DefineSetupFnComponent<SwitchProps, SwitchEmits, SlotsType<SwitchSlots>, SwitchProps & {
|
|
51
51
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
52
|
-
},
|
|
52
|
+
}, vue173.PublicProps>;
|
|
53
53
|
//#endregion
|
|
54
54
|
export { Switch, SwitchEmits, SwitchProps, SwitchSize, SwitchSlots };
|
package/dist/table/Column.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyObject, EmptyEmit } from "../_util/type.js";
|
|
2
2
|
import { ColumnType } from "./interface.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue383 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: vue383.DefineSetupFnComponent<ColumnProps<AnyObject>, EmptyEmit, SlotsType<ColumnSlots>, ColumnProps<AnyObject> & {
|
|
17
17
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
18
|
-
},
|
|
18
|
+
}, vue383.PublicProps>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { Column, ColumnProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyObject, EmptyEmit } from "../_util/type.js";
|
|
2
2
|
import { ColumnType } from "./interface.js";
|
|
3
3
|
import { ColumnProps } from "./Column.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as vue381 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: vue381.DefineSetupFnComponent<ColumnGroupProps<AnyObject>, EmptyEmit, SlotsType<ColumnGroupSlots>, ColumnGroupProps<AnyObject> & {
|
|
18
18
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
19
|
-
},
|
|
19
|
+
}, vue381.PublicProps>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { ColumnGroup };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
1
|
+
import { useComponentBaseConfig, useConfig } from "../config-provider/context.js";
|
|
2
2
|
import useToken from "../theme/useToken.js";
|
|
3
3
|
import "../theme/internal.js";
|
|
4
4
|
import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
@@ -11,8 +11,8 @@ import { useSize } from "../config-provider/hooks/useSize.js";
|
|
|
11
11
|
import config_provider_default from "../config-provider/index.js";
|
|
12
12
|
import en_US_default from "../locale/en_US.js";
|
|
13
13
|
import useLocale_default from "../locale/useLocale.js";
|
|
14
|
-
import { useBreakpoint } from "../grid/hooks/useBreakpoint.js";
|
|
15
14
|
import { DefaultRenderEmpty } from "../config-provider/defaultRenderEmpty.js";
|
|
15
|
+
import { useBreakpoint } from "../grid/hooks/useBreakpoint.js";
|
|
16
16
|
import spin_default from "../spin/index.js";
|
|
17
17
|
import pagination_default from "../pagination/index.js";
|
|
18
18
|
import useSelection from "./hooks/useSelection.js";
|
|
@@ -40,7 +40,8 @@ function resolvePanelRender(slots, props, key) {
|
|
|
40
40
|
if (slots[key] || props[key]) return (data) => getSlotPropsFnRun(slots, props, key, true, data);
|
|
41
41
|
}
|
|
42
42
|
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 } = useComponentBaseConfig("table", props);
|
|
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, ["bodyCell", "headerCell"]);
|
|
44
|
+
const configCtx = useConfig();
|
|
44
45
|
const { classes, styles } = toPropsRefs(props, "classes", "styles");
|
|
45
46
|
const mergedSize = useSize(computed(() => props.size));
|
|
46
47
|
const mergedProps = computed(() => {
|
|
@@ -236,6 +237,21 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
236
237
|
default: return padding * 2 + fontHeight + lineWidth;
|
|
237
238
|
}
|
|
238
239
|
});
|
|
240
|
+
const renderHeaderCell = (ctx) => {
|
|
241
|
+
const node = getSlotPropsFnRun(slots, props, "headerCell", true, ctx);
|
|
242
|
+
if (node === null || node === void 0) {
|
|
243
|
+
if (contextHeaderCell.value) return contextHeaderCell.value(ctx);
|
|
244
|
+
}
|
|
245
|
+
return node;
|
|
246
|
+
};
|
|
247
|
+
const renderBodyCell = (ctx) => {
|
|
248
|
+
const node = getSlotPropsFnRun(slots, props, "bodyCell", true, ctx);
|
|
249
|
+
if (node === null || node === void 0) {
|
|
250
|
+
if (contextBodyCell.value) return contextBodyCell.value(ctx);
|
|
251
|
+
else if (configCtx.value?.transformCellText) return configCtx.value.transformCellText(ctx);
|
|
252
|
+
}
|
|
253
|
+
return node;
|
|
254
|
+
};
|
|
239
255
|
return () => {
|
|
240
256
|
const columnTitlePropsFn = () => {
|
|
241
257
|
const mergedFilters = {};
|
|
@@ -248,8 +264,6 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
248
264
|
};
|
|
249
265
|
};
|
|
250
266
|
const [transformTitleColumns] = useTitleColumns(columnTitlePropsFn());
|
|
251
|
-
const renderHeaderCell = (ctx) => getSlotPropsFnRun(slots, props, "headerCell", true, ctx);
|
|
252
|
-
const renderBodyCell = (ctx) => getSlotPropsFnRun(slots, props, "bodyCell", true, ctx);
|
|
253
267
|
const renderExpandedRow = slots.expandedRowRender ? (record, index, indent, expanded) => getSlotPropsFnRun(slots, props, "expandedRowRender", true, {
|
|
254
268
|
record,
|
|
255
269
|
index,
|
|
@@ -261,7 +275,7 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
261
275
|
if (spinProps.value?.spinning && rawData.value === EMPTY_LIST) return null;
|
|
262
276
|
if (slots.emptyText) return getSlotPropsFnRun(slots, props, "emptyText");
|
|
263
277
|
if (typeof locale?.emptyText !== "undefined") return locale?.emptyText;
|
|
264
|
-
return renderEmpty?.("Table") || createVNode(DefaultRenderEmpty, { "componentName": "Table" }, null);
|
|
278
|
+
return renderEmpty?.value?.("Table") || createVNode(DefaultRenderEmpty, { "componentName": "Table" }, null);
|
|
265
279
|
};
|
|
266
280
|
const mergedEmptyNode = mergedEmptyNodeFn();
|
|
267
281
|
const mergedGetPopupContainer = props.getPopupContainer || contextGetPopupContainer;
|