antdv-next 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_util/ContextIsolator.js +12 -3
- package/dist/_util/hooks/useAllowClear.d.ts +22 -6
- package/dist/_util/hooks/useAllowClear.js +24 -6
- package/dist/_util/hooks/useClosable.js +1 -1
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/tools.d.ts +3 -1
- package/dist/_util/tools.js +6 -1
- package/dist/_util/vueNode.d.ts +6 -2
- package/dist/alert/Alert.js +4 -1
- package/dist/alert/style/index.d.ts +3 -3
- package/dist/alert/style/index.js +3 -3
- package/dist/antd-with-locales.esm.js +16773 -15780
- package/dist/antd-with-locales.js +78 -78
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +14353 -14003
- package/dist/antd.js +80 -80
- package/dist/auto-complete/index.js +1 -0
- package/dist/avatar/Avatar.js +2 -4
- package/dist/avatar/AvatarContext.d.ts +2 -2
- package/dist/border-beam/BorderBeam.d.ts +8 -1
- package/dist/border-beam/BorderBeam.js +28 -14
- package/dist/border-beam/index.d.ts +2 -2
- package/dist/breadcrumb/BreadcrumbItem.js +1 -1
- package/dist/card/style/index.js +2 -2
- package/dist/cascader/Panel.js +3 -3
- package/dist/cascader/index.js +12 -5
- package/dist/checkbox/Checkbox.js +6 -4
- package/dist/checkbox/Group.d.ts +19 -1
- package/dist/checkbox/Group.js +34 -5
- package/dist/checkbox/GroupContext.d.ts +3 -0
- package/dist/checkbox/index.d.ts +2 -2
- package/dist/color-picker/ColorPicker.js +1 -1
- package/dist/color-picker/style/input.js +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/date-picker/generatePicker/generateRangePicker.js +20 -2
- package/dist/date-picker/generatePicker/generateSinglePicker.js +20 -2
- package/dist/date-picker/generatePicker/interface.d.ts +4 -0
- package/dist/date-picker/style/panel.js +1 -1
- package/dist/date-picker/style/util.js +1 -1
- package/dist/date-picker/util.d.ts +2 -0
- package/dist/descriptions/hooks/useItems.d.ts +6 -6
- package/dist/descriptions/style/index.js +11 -13
- package/dist/divider/style/index.js +1 -1
- package/dist/drawer/DrawerPanel.js +1 -1
- package/dist/dropdown/dropdown.d.ts +2 -0
- package/dist/dropdown/dropdown.js +9 -2
- package/dist/dropdown/style/index.js +1 -1
- package/dist/form/ErrorList.js +1 -1
- package/dist/form/Form.js +1 -1
- package/dist/form/FormItem/ItemHolder.js +1 -1
- package/dist/form/FormItem/index.js +2 -2
- package/dist/form/FormItemInput.js +1 -1
- package/dist/form/FormItemLabel.js +1 -1
- package/dist/form/hooks/useVariant.js +1 -1
- package/dist/image/hooks/useMergedPreviewConfig.d.ts +1 -0
- package/dist/image/hooks/useMergedPreviewConfig.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/input/Group.js +1 -1
- package/dist/input/Input.d.ts +2 -1
- package/dist/input/Input.js +8 -5
- package/dist/input/OTP/OTPInput.d.ts +2 -1
- package/dist/input/OTP/OTPInput.js +12 -3
- package/dist/input/OTP/index.d.ts +3 -1
- package/dist/input/OTP/index.js +15 -6
- package/dist/input/Password.js +7 -5
- package/dist/input/Search.js +4 -2
- package/dist/input/TextArea.d.ts +3 -1
- package/dist/input/TextArea.js +13 -8
- package/dist/input/style/index.js +1 -1
- package/dist/input-number/index.d.ts +3 -6
- package/dist/input-number/index.js +8 -3
- package/dist/input-number/style/index.js +1 -5
- package/dist/listy/index.d.ts +1 -1
- package/dist/listy/index.js +9 -7
- package/dist/listy/interface.d.ts +6 -1
- package/dist/listy/style/index.js +4 -2
- package/dist/locale/ar_EG.js +9 -0
- package/dist/locale/az_AZ.js +9 -0
- package/dist/locale/bg_BG.js +9 -0
- package/dist/locale/bn_BD.js +9 -0
- package/dist/locale/by_BY.js +9 -0
- package/dist/locale/ca_ES.js +9 -0
- package/dist/locale/cs_CZ.js +9 -0
- package/dist/locale/da_DK.js +9 -0
- package/dist/locale/de_DE.js +9 -0
- package/dist/locale/el_GR.js +9 -0
- package/dist/locale/en_GB.js +11 -1
- package/dist/locale/en_US.js +11 -1
- package/dist/locale/es_ES.js +9 -0
- package/dist/locale/et_EE.js +9 -0
- package/dist/locale/eu_ES.js +9 -0
- package/dist/locale/fa_IR.js +9 -0
- package/dist/locale/fi_FI.js +10 -1
- package/dist/locale/fr_BE.js +9 -0
- package/dist/locale/fr_CA.js +9 -0
- package/dist/locale/fr_FR.js +9 -0
- package/dist/locale/ga_IE.js +9 -0
- package/dist/locale/gl_ES.js +9 -0
- package/dist/locale/he_IL.js +9 -0
- package/dist/locale/hi_IN.js +9 -0
- package/dist/locale/hr_HR.js +9 -0
- package/dist/locale/hu_HU.js +9 -0
- package/dist/locale/hy_AM.js +9 -0
- package/dist/locale/id_ID.js +9 -0
- package/dist/locale/index.d.ts +3 -0
- package/dist/locale/is_IS.js +9 -0
- package/dist/locale/it_IT.js +9 -0
- package/dist/locale/ja_JP.js +9 -0
- package/dist/locale/ka_GE.js +9 -0
- package/dist/locale/kk_KZ.js +9 -0
- package/dist/locale/km_KH.js +9 -0
- package/dist/locale/kmr_IQ.js +9 -0
- package/dist/locale/kn_IN.js +9 -0
- package/dist/locale/ko_KR.js +9 -0
- package/dist/locale/ku_IQ.js +9 -0
- package/dist/locale/lt_LT.js +9 -0
- package/dist/locale/lv_LV.js +9 -0
- package/dist/locale/mk_MK.js +9 -0
- package/dist/locale/ml_IN.js +9 -0
- package/dist/locale/mn_MN.js +9 -0
- package/dist/locale/mr_IN.js +9 -0
- package/dist/locale/ms_MY.js +9 -0
- package/dist/locale/my_MM.js +9 -0
- package/dist/locale/nb_NO.js +9 -0
- package/dist/locale/ne_NP.js +9 -0
- package/dist/locale/nl_BE.js +9 -0
- package/dist/locale/nl_NL.js +9 -0
- package/dist/locale/pl_PL.js +9 -0
- package/dist/locale/pt_BR.js +9 -0
- package/dist/locale/pt_PT.js +9 -0
- package/dist/locale/ro_RO.js +19 -10
- package/dist/locale/ru_RU.js +9 -0
- package/dist/locale/si_LK.js +9 -0
- package/dist/locale/sk_SK.js +9 -0
- package/dist/locale/sl_SI.js +9 -0
- package/dist/locale/sq_AL.js +9 -0
- package/dist/locale/sr_RS.js +9 -0
- package/dist/locale/sv_SE.js +9 -0
- package/dist/locale/ta_IN.js +10 -1
- package/dist/locale/th_TH.js +9 -0
- package/dist/locale/tk_TK.js +9 -0
- package/dist/locale/tr_TR.js +9 -0
- package/dist/locale/uk_UA.js +9 -0
- package/dist/locale/ur_PK.js +9 -0
- package/dist/locale/useLocale.d.ts +6 -1
- package/dist/locale/useLocale.js +12 -1
- package/dist/locale/uz_UZ.js +9 -0
- package/dist/locale/vi_VN.js +9 -0
- package/dist/locale/zh_CN.js +13 -3
- package/dist/locale/zh_HK.js +11 -1
- package/dist/locale/zh_TW.js +11 -1
- package/dist/masonry/Masonry.js +1 -1
- package/dist/mentions/index.d.ts +2 -3
- package/dist/mentions/index.js +9 -4
- package/dist/mentions/style/index.js +1 -1
- package/dist/menu/MenuContext.d.ts +2 -0
- package/dist/menu/MenuItem.js +23 -6
- package/dist/menu/index.js +5 -0
- package/dist/menu/menu.d.ts +3 -0
- package/dist/menu/menu.js +7 -0
- package/dist/modal/ConfirmDialog.js +14 -7
- package/dist/notification/PurePanel.js +7 -12
- package/dist/notification/interface.d.ts +8 -0
- package/dist/notification/style/index.js +1 -1
- package/dist/notification/style/placement.js +10 -7
- package/dist/notification/useNotification.js +5 -15
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.js +2 -2
- package/dist/pagination/useShowSizeChanger.d.ts +3 -0
- package/dist/pagination/useShowSizeChanger.js +1 -1
- package/dist/popconfirm/index.js +5 -5
- package/dist/popconfirm/style/index.js +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/popover/style/index.js +2 -2
- package/dist/progress/Circle.js +0 -8
- package/dist/progress/Line.js +1 -9
- package/dist/progress/Steps.js +0 -8
- package/dist/progress/progress.js +2 -14
- package/dist/qrcode/index.js +4 -4
- package/dist/radio/group.js +40 -7
- package/dist/radio/index.d.ts +2 -2
- package/dist/radio/interface.d.ts +19 -1
- package/dist/radio/radio.js +5 -3
- package/dist/result/index.js +3 -3
- package/dist/result/noFound.js +120 -140
- package/dist/result/serverError.js +132 -147
- package/dist/result/unauthorized.js +115 -129
- package/dist/segmented/index.js +1 -1
- package/dist/select/index.js +10 -3
- package/dist/select/style/dropdown.js +1 -1
- package/dist/select/style/index.js +2 -2
- package/dist/select/style/select-input-multiple.js +1 -1
- package/dist/select/usePopupRender.js +4 -1
- package/dist/slider/index.d.ts +0 -3
- package/dist/slider/index.js +2 -2
- package/dist/splitter/SplitBar.js +9 -3
- package/dist/splitter/interface.d.ts +5 -1
- package/dist/steps/style/index.js +1 -1
- package/dist/steps/style/inline.js +1 -1
- package/dist/style/motion/collapse.js +4 -10
- package/dist/table/ExpandIcon.d.ts +9 -4
- package/dist/table/ExpandIcon.js +42 -20
- package/dist/table/InternalTable.js +21 -15
- package/dist/table/hooks/useLazyKVMap.js +1 -1
- package/dist/table/hooks/useSelection.js +54 -9
- package/dist/table/interface.d.ts +8 -0
- package/dist/table/style/index.js +1 -1
- package/dist/table/style/sorter.js +2 -2
- package/dist/tabs/index.js +9 -2
- package/dist/tabs/style/index.js +1 -1
- package/dist/time-picker/index.js +34 -0
- package/dist/timeline/Timeline.js +1 -1
- package/dist/tooltip/style/index.js +1 -1
- package/dist/tour/panelRender.js +3 -2
- package/dist/transfer/Section.js +2 -1
- package/dist/transfer/Transfer.js +1 -1
- package/dist/tree/style/index.js +1 -1
- package/dist/tree-select/index.js +14 -8
- package/dist/typography/Base/index.js +23 -2
- package/dist/typography/Link.js +5 -0
- package/dist/typography/Paragraph.js +5 -0
- package/dist/typography/Text.js +5 -0
- package/dist/typography/Title.js +5 -0
- package/dist/typography/hooks/useMergedConfig.js +1 -1
- package/dist/typography/interface.d.ts +8 -1
- package/dist/typography/style/index.js +2 -1
- package/dist/typography/style/mixins.d.ts +2 -1
- package/dist/typography/style/mixins.js +26 -3
- package/dist/upload/Upload.d.ts +1 -0
- package/dist/upload/Upload.js +10 -3
- package/dist/upload/UploadList/ListItem.js +8 -3
- package/dist/upload/interface.d.ts +1 -0
- package/dist/version/token-meta.json +1 -1
- package/dist/version/token.json +1 -1
- package/dist/watermark/index.js +1 -1
- package/package.json +9 -9
- package/web-tags.json +74 -14
- package/web-types.json +186 -22
- package/dist/_util/getAllowClear.d.ts +0 -6
- package/dist/_util/getAllowClear.js +0 -11
|
@@ -128,6 +128,7 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
130
|
const selectProps = omit(props, omitKeys);
|
|
131
|
+
selectProps.allowClear = props.allowClear ?? false;
|
|
131
132
|
if (selectProps.placeholder === void 0 && customizeInputPlaceholder !== void 0) selectProps.placeholder = customizeInputPlaceholder;
|
|
132
133
|
return createVNode(Select, mergeProps(forwardedAttrs, selectProps, {
|
|
133
134
|
onSelect: (value, option) => {
|
package/dist/avatar/Avatar.js
CHANGED
|
@@ -5,7 +5,7 @@ import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
|
|
|
5
5
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
6
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
7
7
|
import { isRenderable } from "../_util/is.js";
|
|
8
|
-
import { responsiveArray } from "../_util/responsiveObserver.js";
|
|
8
|
+
import { matchScreen, responsiveArray } from "../_util/responsiveObserver.js";
|
|
9
9
|
import useBreakpoint from "../grid/hooks/useBreakpoint.js";
|
|
10
10
|
import { useAvatarContext } from "./AvatarContext.js";
|
|
11
11
|
import style_default from "./style/index.js";
|
|
@@ -62,8 +62,7 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, exp
|
|
|
62
62
|
const { shape, rootClass, draggable, srcSet, crossOrigin, alt } = props;
|
|
63
63
|
const responsiveSizeStyleFn = () => {
|
|
64
64
|
if (typeof size.value !== "object") return {};
|
|
65
|
-
const
|
|
66
|
-
const currentSize = size.value[currentBreakpoint] || size.value;
|
|
65
|
+
const currentSize = matchScreen(screens.value ?? {}, size.value);
|
|
67
66
|
return currentSize ? {
|
|
68
67
|
width: `${currentSize}px`,
|
|
69
68
|
height: `${currentSize}px`,
|
|
@@ -102,7 +101,6 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, exp
|
|
|
102
101
|
else if (mounted.value || scale.value !== 1) {
|
|
103
102
|
const transformString = `scale(${scale.value})`;
|
|
104
103
|
const childrenStyle = {
|
|
105
|
-
msTransform: transformString,
|
|
106
104
|
WebkitTransform: transformString,
|
|
107
105
|
transform: transformString
|
|
108
106
|
};
|
|
@@ -11,7 +11,7 @@ interface AvatarContextType {
|
|
|
11
11
|
shape?: 'circle' | 'square';
|
|
12
12
|
}
|
|
13
13
|
declare function useAvatarContext(): Ref<{
|
|
14
|
-
size?: number | "default" |
|
|
14
|
+
size?: number | SizeType | "default" | {
|
|
15
15
|
xxxl?: number | undefined;
|
|
16
16
|
xxl?: number | undefined;
|
|
17
17
|
xl?: number | undefined;
|
|
@@ -22,7 +22,7 @@ declare function useAvatarContext(): Ref<{
|
|
|
22
22
|
};
|
|
23
23
|
shape?: "circle" | "square" | undefined;
|
|
24
24
|
}, AvatarContextType | {
|
|
25
|
-
size?: number | "default" |
|
|
25
|
+
size?: number | SizeType | "default" | {
|
|
26
26
|
xxxl?: number | undefined;
|
|
27
27
|
xxl?: number | undefined;
|
|
28
28
|
xl?: number | undefined;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { BorderBeamColor, BorderBeamGradient } from "./util.js";
|
|
2
2
|
import { SlotsType } from "vue";
|
|
3
3
|
//#region src/border-beam/BorderBeam.d.ts
|
|
4
|
+
interface BorderBeamItem {
|
|
5
|
+
color?: BorderBeamColor;
|
|
6
|
+
lineWidth?: number | string;
|
|
7
|
+
outset?: number | string;
|
|
8
|
+
size?: number | string;
|
|
9
|
+
}
|
|
4
10
|
interface BorderBeamProps {
|
|
5
11
|
prefixCls?: string;
|
|
6
12
|
rootClass?: string;
|
|
7
13
|
color?: BorderBeamColor;
|
|
8
14
|
count?: number;
|
|
9
15
|
duration?: number;
|
|
16
|
+
items?: BorderBeamItem[];
|
|
10
17
|
lineWidth?: number | string;
|
|
11
18
|
outset?: number | string;
|
|
12
19
|
size?: number | string;
|
|
@@ -18,4 +25,4 @@ declare const BorderBeam: import("vue").DefineSetupFnComponent<BorderBeamProps,
|
|
|
18
25
|
[x: `on${Capitalize<string>}`]: ((...args: unknown[]) => any) | undefined;
|
|
19
26
|
}, import("vue").PublicProps>;
|
|
20
27
|
//#endregion
|
|
21
|
-
export { type BorderBeamColor, type BorderBeamGradient, BorderBeamProps, BorderBeamSlots, BorderBeam as default };
|
|
28
|
+
export { type BorderBeamColor, type BorderBeamGradient, BorderBeamItem, BorderBeamProps, BorderBeamSlots, BorderBeam as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
1
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
3
|
import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
3
4
|
import { isNonNullable, isNumber } from "../_util/is.js";
|
|
@@ -26,8 +27,8 @@ const BorderBeam = /* @__PURE__ */ defineComponent((props, { attrs, slots }) =>
|
|
|
26
27
|
const borderWidth = useBorderSize(hostDom);
|
|
27
28
|
const beamGradient = computed(() => getBorderBeamGradient(props.color));
|
|
28
29
|
const mergedCount = computed(() => {
|
|
29
|
-
const { count
|
|
30
|
-
return isNumber(count) && Number.isFinite(count) && count >= 1 ? Math.floor(count) : 1;
|
|
30
|
+
const { count, items } = props;
|
|
31
|
+
return items?.length ?? (isNumber(count) && Number.isFinite(count) && count >= 1 ? Math.floor(count) : 1);
|
|
31
32
|
});
|
|
32
33
|
const mergedDuration = computed(() => {
|
|
33
34
|
const { duration } = props;
|
|
@@ -43,22 +44,31 @@ const BorderBeam = /* @__PURE__ */ defineComponent((props, { attrs, slots }) =>
|
|
|
43
44
|
};
|
|
44
45
|
return () => {
|
|
45
46
|
let _slot;
|
|
46
|
-
const { duration, lineWidth, size } = props;
|
|
47
|
+
const { duration, lineWidth, size, items } = props;
|
|
47
48
|
const children = filterEmpty(slots.default?.() ?? []);
|
|
48
49
|
const count = mergedCount.value;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
if (isDev) devUseWarning("BorderBeam")(!isNonNullable(items) || !isNonNullable(props.count), "usage", "`count` is ignored when `items` is provided.");
|
|
51
|
+
const getBeamStyle = (index) => {
|
|
52
|
+
const item = items?.[index] ?? {};
|
|
53
|
+
const beamPhase = index / count;
|
|
54
|
+
const itemBeamGradient = item.color ? getBorderBeamGradient(item.color) : beamGradient.value;
|
|
55
|
+
const itemLineWidth = item.lineWidth ?? lineWidth;
|
|
56
|
+
const itemSize = item.size ?? size;
|
|
57
|
+
const itemInsetOffset = isNonNullable(item.outset) ? getInset(item.outset) : insetOffset.value;
|
|
58
|
+
return {
|
|
59
|
+
...contextStyle?.value ?? {},
|
|
60
|
+
...attrs.style ?? {},
|
|
61
|
+
...itemBeamGradient && { [varName.value("beam-gradient")]: itemBeamGradient },
|
|
62
|
+
...isNumber(duration) && duration > 0 && { [varName.value("duration")]: `${duration}s` },
|
|
63
|
+
...isNonNullable(itemLineWidth) && { [varName.value("line-width")]: unit(itemLineWidth) },
|
|
64
|
+
...isNonNullable(itemSize) && { [varName.value("size")]: unit(itemSize) },
|
|
65
|
+
...beamPhase > 0 && { [varName.value("delay")]: `${-mergedDuration.value * beamPhase}s` },
|
|
66
|
+
[varName.value("inset-offset")]: itemInsetOffset
|
|
67
|
+
};
|
|
68
|
+
};
|
|
59
69
|
const beamCls = clsx(prefixCls.value, contextClassName?.value, props.rootClass, attrs.class, hashId.value, cssVarCls.value);
|
|
60
70
|
const beamNode = hostDom.value ? createVNode(Teleport, { "to": hostDom.value }, _isSlot(_slot = Array.from({ length: count }, (_, index) => createVNode("div", {
|
|
61
|
-
"key": index
|
|
71
|
+
"key": `${count}-${index / count}`,
|
|
62
72
|
"aria-hidden": "true",
|
|
63
73
|
"class": beamCls,
|
|
64
74
|
"style": getBeamStyle(index)
|
|
@@ -92,6 +102,10 @@ const BorderBeam = /* @__PURE__ */ defineComponent((props, { attrs, slots }) =>
|
|
|
92
102
|
type: Number,
|
|
93
103
|
required: false
|
|
94
104
|
},
|
|
105
|
+
items: {
|
|
106
|
+
type: Array,
|
|
107
|
+
required: false
|
|
108
|
+
},
|
|
95
109
|
lineWidth: {
|
|
96
110
|
type: [Number, String],
|
|
97
111
|
required: false
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BorderBeamColor, BorderBeamGradient } from "./util.js";
|
|
2
|
-
import BorderBeam, { BorderBeamProps } from "./BorderBeam.js";
|
|
3
|
-
export { type BorderBeamColor, type BorderBeamGradient, type BorderBeamProps, BorderBeam as default };
|
|
2
|
+
import BorderBeam, { BorderBeamItem, BorderBeamProps } from "./BorderBeam.js";
|
|
3
|
+
export { type BorderBeamColor, type BorderBeamGradient, type BorderBeamItem, type BorderBeamProps, BorderBeam as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useBaseConfig } from "../config-provider/context.js";
|
|
2
2
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
3
3
|
import { isRenderable } from "../_util/is.js";
|
|
4
|
-
import isNonNullable from "../_util/isNonNullable.js";
|
|
5
4
|
import { checkRenderNode } from "../_util/vueNode.js";
|
|
5
|
+
import isNonNullable from "../_util/isNonNullable.js";
|
|
6
6
|
import { useBreadcrumbContext } from "./BreadcrumbContext.js";
|
|
7
7
|
import Dropdown from "../dropdown/index.js";
|
|
8
8
|
import BreadcrumbSeparator from "./BreadcrumbSeparator.js";
|
package/dist/card/style/index.js
CHANGED
|
@@ -41,7 +41,7 @@ const genCardHeadStyle = (token) => {
|
|
|
41
41
|
clear: "both",
|
|
42
42
|
marginBottom: tabsMarginBottom,
|
|
43
43
|
color: token.colorText,
|
|
44
|
-
fontWeight:
|
|
44
|
+
fontWeight: 400,
|
|
45
45
|
fontSize: token.fontSize,
|
|
46
46
|
"&-bar": { borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}` }
|
|
47
47
|
}
|
|
@@ -161,7 +161,7 @@ const genCardStyle = (token) => {
|
|
|
161
161
|
[`${componentCls}-extra`]: {
|
|
162
162
|
marginInlineStart: "auto",
|
|
163
163
|
color: extraColor,
|
|
164
|
-
fontWeight:
|
|
164
|
+
fontWeight: 400,
|
|
165
165
|
fontSize: token.fontSize
|
|
166
166
|
},
|
|
167
167
|
[`${componentCls}-body`]: {
|
package/dist/cascader/Panel.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
2
|
import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
|
|
3
|
-
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
3
|
+
import { getSlotPropsFnRun, getSlotPropsFnRunWithFallback, toPropsRefs } from "../_util/tools.js";
|
|
4
4
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
5
5
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
6
6
|
import { DefaultRenderEmpty } from "../config-provider/defaultRenderEmpty.js";
|
|
@@ -30,8 +30,8 @@ const CascaderPanel = /* @__PURE__ */ defineComponent((props, { attrs, emit, slo
|
|
|
30
30
|
return () => {
|
|
31
31
|
const { rootClass, multiple, optionRender, expandIcon, prefixCls: _prefixCls, direction: _direction, loadingIcon, ...rest } = props;
|
|
32
32
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
33
|
-
const customExpandIcon =
|
|
34
|
-
const customLoadingIcon =
|
|
33
|
+
const customExpandIcon = getSlotPropsFnRunWithFallback(slots, props, "expandIcon");
|
|
34
|
+
const customLoadingIcon = getSlotPropsFnRunWithFallback(slots, props, "loadingIcon");
|
|
35
35
|
const { expandIcon: mergedExpandIcon, loadingIcon: mergedLoadingIcon } = useIcons({
|
|
36
36
|
contextExpandIcon: contextExpandIcon.value,
|
|
37
37
|
contextLoadingIcon: contextLoadingIcon.value,
|
package/dist/cascader/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
|
+
import { useFormItemInputContext } from "../form/context.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
4
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
4
5
|
import { useCompactItemContext } from "../space/Compact.js";
|
|
5
6
|
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
6
7
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
7
|
-
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
8
|
+
import { getSlotPropsFnRun, getSlotPropsFnRunWithFallback, toPropsRefs } from "../_util/tools.js";
|
|
8
9
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
9
10
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
11
|
+
import { useLocaleGetter } from "../locale/useLocale.js";
|
|
10
12
|
import genPurePanel from "../_util/PurePanel.js";
|
|
11
13
|
import { getMergedStatus, getStatusClassNames } from "../_util/statusUtils.js";
|
|
12
14
|
import { DefaultRenderEmpty } from "../config-provider/defaultRenderEmpty.js";
|
|
13
|
-
import { useFormItemInputContext } from "../form/context.js";
|
|
14
15
|
import { useVariants } from "../form/hooks/useVariant.js";
|
|
15
16
|
import mergedBuiltinPlacements from "../select/mergedBuiltinPlacements.js";
|
|
16
17
|
import style_default from "../select/style/index.js";
|
|
@@ -74,6 +75,7 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
74
75
|
"removeIcon",
|
|
75
76
|
"suffixIcon"
|
|
76
77
|
]);
|
|
78
|
+
const getGlobalLocale = useLocaleGetter("global");
|
|
77
79
|
const { prefixCls: customizePrefixCls, direction: propDirection, variant: customizeVariant, bordered, size: customizeSize, disabled: customDisabled, status: customStatus, classes, styles } = toPropsRefs(props, "prefixCls", "direction", "variant", "bordered", "size", "disabled", "status", "classes", "styles");
|
|
78
80
|
const { prefixCls, cascaderPrefixCls, direction: mergedDirection, renderEmpty } = useBase(customizePrefixCls, propDirection);
|
|
79
81
|
const isRtl = computed(() => mergedDirection.value === "rtl");
|
|
@@ -179,11 +181,16 @@ const InternalCascader = /* @__PURE__ */ defineComponent((props, { attrs, emit,
|
|
|
179
181
|
componentName: "Cascader"
|
|
180
182
|
});
|
|
181
183
|
const mergedClearIcon = rest.clearIcon ?? contextClearIcon.value ?? clearIcon;
|
|
182
|
-
const
|
|
184
|
+
const finalAllowClear = allowClear ?? true;
|
|
185
|
+
const mergedAllowClear = finalAllowClear ? {
|
|
186
|
+
clearIcon: mergedClearIcon,
|
|
187
|
+
label: getGlobalLocale().clear,
|
|
188
|
+
...typeof finalAllowClear === "object" ? finalAllowClear : {}
|
|
189
|
+
} : finalAllowClear;
|
|
183
190
|
const mergedPopupRender = usePopupRender((slots.popupRender ?? popupRender) || dropdownRender);
|
|
184
191
|
const mergedPopupMenuColumnStyle = popupMenuColumnStyle ?? dropdownMenuColumnStyle;
|
|
185
|
-
const customExpandIcon =
|
|
186
|
-
const customLoadingIcon =
|
|
192
|
+
const customExpandIcon = getSlotPropsFnRunWithFallback(slots, props, "expandIcon");
|
|
193
|
+
const customLoadingIcon = getSlotPropsFnRunWithFallback(slots, props, "loadingIcon");
|
|
187
194
|
const { expandIcon: mergedExpandIcon, loadingIcon: mergedLoadingIcon } = useIcons$1({
|
|
188
195
|
contextExpandIcon: contextExpandIcon.value,
|
|
189
196
|
contextLoadingIcon: contextLoadingIcon.value,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
|
+
import { useFormItemContext, useFormItemInputContext } from "../form/context.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
4
|
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
5
|
import { toPropsRefs } from "../_util/tools.js";
|
|
5
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
6
7
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
7
|
-
import isNonNullable from "../_util/isNonNullable.js";
|
|
8
8
|
import { TARGET_CLS } from "../_util/wave/interface.js";
|
|
9
9
|
import wave_default from "../_util/wave/index.js";
|
|
10
10
|
import { checkRenderNode } from "../_util/vueNode.js";
|
|
11
|
-
import
|
|
11
|
+
import isNonNullable from "../_util/isNonNullable.js";
|
|
12
12
|
import useBubbleLock from "./useBubbleLock.js";
|
|
13
13
|
import style_default from "./style/index.js";
|
|
14
14
|
import { isValueEqual } from "../_util/isEqual.js";
|
|
15
15
|
import { useGroupContext } from "./GroupContext.js";
|
|
16
|
-
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, nextTick, shallowRef, watch } from "vue";
|
|
16
|
+
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, nextTick, shallowRef, toRef, watch } from "vue";
|
|
17
17
|
import { clsx } from "@v-c/util";
|
|
18
18
|
import { omit } from "es-toolkit";
|
|
19
19
|
import VcCheckbox from "@v-c/checkbox";
|
|
@@ -45,7 +45,9 @@ const InternalCheckbox = /* @__PURE__ */ defineComponent((props, { slots, emit,
|
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
47
|
const contextStyleRoot = useSemanticRootStyle(contextStyle);
|
|
48
|
-
const
|
|
48
|
+
const groupClassNames = toRef(() => props.skipGroup ? void 0 : checkboxGroup?.value?.classes);
|
|
49
|
+
const groupStyles = toRef(() => props.skipGroup ? void 0 : checkboxGroup?.value?.styles);
|
|
50
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, groupClassNames, classes), useToArr(contextStyles, contextStyleRoot, groupStyles, styles), useToProps(mergedProps));
|
|
49
51
|
const checkboxRef = shallowRef();
|
|
50
52
|
if (isDev) devUseWarning("Checkbox")("checked" in props || !!checkboxGroup?.value || !("value" in props), "usage", "`value` is not a valid prop, do you mean `checked`?");
|
|
51
53
|
watch([() => props.value, () => props.skipGroup], ([value, skipGroup], _prev, onCleanup) => {
|
package/dist/checkbox/Group.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { VueNode } from "../_util/type.js";
|
|
2
|
+
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
|
+
import "../_util/hooks/index.js";
|
|
2
4
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
3
5
|
import { CSSProperties, SlotsType } from "vue";
|
|
4
6
|
import { CheckboxChangeEvent } from "@v-c/checkbox";
|
|
@@ -18,6 +20,20 @@ interface AbstractCheckboxGroupProps extends ComponentBaseProps {
|
|
|
18
20
|
options?: (CheckboxOptionType | string | number)[];
|
|
19
21
|
disabled?: boolean;
|
|
20
22
|
}
|
|
23
|
+
interface CheckboxGroupSemanticClassNames {
|
|
24
|
+
root?: string;
|
|
25
|
+
item?: string;
|
|
26
|
+
itemIcon?: string;
|
|
27
|
+
itemLabel?: string;
|
|
28
|
+
}
|
|
29
|
+
interface CheckboxGroupSemanticStyles {
|
|
30
|
+
root?: CSSProperties;
|
|
31
|
+
item?: CSSProperties;
|
|
32
|
+
itemIcon?: CSSProperties;
|
|
33
|
+
itemLabel?: CSSProperties;
|
|
34
|
+
}
|
|
35
|
+
type CheckboxGroupClassNamesType = SemanticClassNamesType<CheckboxGroupProps, CheckboxGroupSemanticClassNames>;
|
|
36
|
+
type CheckboxGroupStylesType = SemanticStylesType<CheckboxGroupProps, CheckboxGroupSemanticStyles>;
|
|
21
37
|
interface CheckboxGroupProps extends AbstractCheckboxGroupProps, CheckboxGroupEmitsProps {
|
|
22
38
|
name?: string;
|
|
23
39
|
defaultValue?: any[];
|
|
@@ -27,6 +43,8 @@ interface CheckboxGroupProps extends AbstractCheckboxGroupProps, CheckboxGroupEm
|
|
|
27
43
|
index: number;
|
|
28
44
|
}) => any;
|
|
29
45
|
role?: string;
|
|
46
|
+
classes?: CheckboxGroupClassNamesType;
|
|
47
|
+
styles?: CheckboxGroupStylesType;
|
|
30
48
|
'onUpdate:value'?: (value: any[]) => void;
|
|
31
49
|
}
|
|
32
50
|
interface CheckboxGroupEmits {
|
|
@@ -44,4 +62,4 @@ interface CheckboxGroupSlots {
|
|
|
44
62
|
}
|
|
45
63
|
declare const CheckboxGroup: import("vue").DefineSetupFnComponent<CheckboxGroupProps, CheckboxGroupEmits, SlotsType<CheckboxGroupSlots>, CheckboxGroupProps, import("vue").PublicProps>;
|
|
46
64
|
//#endregion
|
|
47
|
-
export { AbstractCheckboxGroupProps, CheckboxGroupEmits, CheckboxGroupEmitsProps, CheckboxGroupProps, CheckboxGroupSlots, CheckboxOptionType, CheckboxGroup as default };
|
|
65
|
+
export { AbstractCheckboxGroupProps, CheckboxGroupClassNamesType, CheckboxGroupEmits, CheckboxGroupEmitsProps, CheckboxGroupProps, CheckboxGroupSemanticClassNames, CheckboxGroupSemanticStyles, CheckboxGroupSlots, CheckboxGroupStylesType, CheckboxOptionType, CheckboxGroup as default };
|
package/dist/checkbox/Group.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useBaseConfig } from "../config-provider/context.js";
|
|
2
|
-
import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { getAttrStyleAndClass, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
4
|
+
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
4
5
|
import style_default from "./style/index.js";
|
|
5
6
|
import { useGroupContextProvider } from "./GroupContext.js";
|
|
6
7
|
import InternalCheckbox from "./Checkbox.js";
|
|
7
|
-
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, shallowRef, watch } from "vue";
|
|
8
|
+
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, shallowRef, toRef, watch } from "vue";
|
|
8
9
|
import { clsx } from "@v-c/util";
|
|
9
10
|
import { omit } from "es-toolkit";
|
|
10
11
|
//#region src/checkbox/Group.tsx
|
|
@@ -48,12 +49,30 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
48
49
|
const groupPrefixCls = computed(() => `${prefixCls.value}-group`);
|
|
49
50
|
const rootCls = useCSSVarCls(prefixCls);
|
|
50
51
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
52
|
+
const contextDisabled = useDisabledContext();
|
|
53
|
+
const mergedProps = computed(() => ({
|
|
54
|
+
...props,
|
|
55
|
+
options: props.options,
|
|
56
|
+
value: value.value,
|
|
57
|
+
disabled: props.disabled ?? contextDisabled.value
|
|
58
|
+
}));
|
|
59
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(toRef(() => props.classes)), useToArr(toRef(() => props.styles)), useToProps(mergedProps));
|
|
51
60
|
useGroupContextProvider(computed(() => {
|
|
52
61
|
return {
|
|
53
62
|
toggleOption,
|
|
54
63
|
value: value.value,
|
|
55
64
|
disabled: props.disabled,
|
|
56
65
|
name: props.name,
|
|
66
|
+
classes: {
|
|
67
|
+
root: mergedClassNames.value.item,
|
|
68
|
+
icon: mergedClassNames.value.itemIcon,
|
|
69
|
+
label: mergedClassNames.value.itemLabel
|
|
70
|
+
},
|
|
71
|
+
styles: {
|
|
72
|
+
root: mergedStyles.value.item,
|
|
73
|
+
icon: mergedStyles.value.itemIcon,
|
|
74
|
+
label: mergedStyles.value.itemLabel
|
|
75
|
+
},
|
|
57
76
|
registerValue,
|
|
58
77
|
cancelValue
|
|
59
78
|
};
|
|
@@ -64,7 +83,9 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
64
83
|
"options",
|
|
65
84
|
"rootClass",
|
|
66
85
|
"defaultValue",
|
|
67
|
-
"prefixCls"
|
|
86
|
+
"prefixCls",
|
|
87
|
+
"classes",
|
|
88
|
+
"styles"
|
|
68
89
|
]);
|
|
69
90
|
const children = slots?.default?.();
|
|
70
91
|
const { restAttrs, className, style } = getAttrStyleAndClass(attrs);
|
|
@@ -89,9 +110,9 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
89
110
|
}), _isSlot(_label) ? _label : { default: () => [_label] });
|
|
90
111
|
}) : children;
|
|
91
112
|
return createVNode("div", mergeProps({
|
|
92
|
-
"class": clsx(groupPrefixCls.value, { [`${groupPrefixCls.value}-rtl`]: direction.value === "rtl" }, className, rootClass, cssVarCls.value, rootCls.value, hashId.value),
|
|
113
|
+
"class": clsx(groupPrefixCls.value, { [`${groupPrefixCls.value}-rtl`]: direction.value === "rtl" }, className, rootClass, mergedClassNames.value.root, cssVarCls.value, rootCls.value, hashId.value),
|
|
93
114
|
"role": role,
|
|
94
|
-
"style": style
|
|
115
|
+
"style": [mergedStyles.value.root, style]
|
|
95
116
|
}, restAttrs), [childrenNode]);
|
|
96
117
|
};
|
|
97
118
|
}, {
|
|
@@ -116,6 +137,14 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
116
137
|
type: String,
|
|
117
138
|
required: false
|
|
118
139
|
},
|
|
140
|
+
classes: {
|
|
141
|
+
type: [Object, Function],
|
|
142
|
+
required: false
|
|
143
|
+
},
|
|
144
|
+
styles: {
|
|
145
|
+
type: [Object, Function],
|
|
146
|
+
required: false
|
|
147
|
+
},
|
|
119
148
|
"onUpdate:value": {
|
|
120
149
|
type: Function,
|
|
121
150
|
required: false
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CheckboxSemanticClassNames, CheckboxSemanticStyles } from "./Checkbox.js";
|
|
1
2
|
import { CheckboxOptionType } from "./Group.js";
|
|
2
3
|
import { Ref } from "vue";
|
|
3
4
|
//#region src/checkbox/GroupContext.d.ts
|
|
@@ -6,6 +7,8 @@ interface CheckboxGroupContext {
|
|
|
6
7
|
toggleOption?: (option: CheckboxOptionType) => void;
|
|
7
8
|
value?: any;
|
|
8
9
|
disabled?: boolean;
|
|
10
|
+
classes?: CheckboxSemanticClassNames;
|
|
11
|
+
styles?: CheckboxSemanticStyles;
|
|
9
12
|
registerValue: (val: any) => void;
|
|
10
13
|
cancelValue: (val: any) => void;
|
|
11
14
|
}
|
package/dist/checkbox/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import InternalCheckbox, { CheckboxEmits, CheckboxProps, CheckboxSlots } from "./Checkbox.js";
|
|
2
|
-
import CheckboxGroup, { CheckboxGroupEmits, CheckboxGroupProps, CheckboxGroupSlots, CheckboxOptionType } from "./Group.js";
|
|
3
|
-
export { type CheckboxEmits, CheckboxGroup, type CheckboxGroupEmits, type CheckboxGroupProps, type CheckboxGroupSlots, type CheckboxOptionType, type CheckboxProps, type CheckboxSlots, InternalCheckbox as default };
|
|
2
|
+
import CheckboxGroup, { CheckboxGroupClassNamesType, CheckboxGroupEmits, CheckboxGroupProps, CheckboxGroupSemanticClassNames, CheckboxGroupSemanticStyles, CheckboxGroupSlots, CheckboxGroupStylesType, CheckboxOptionType } from "./Group.js";
|
|
3
|
+
export { type CheckboxEmits, CheckboxGroup, type CheckboxGroupClassNamesType, type CheckboxGroupEmits, type CheckboxGroupProps, type CheckboxGroupSemanticClassNames, type CheckboxGroupSemanticStyles, type CheckboxGroupSlots, type CheckboxGroupStylesType, type CheckboxOptionType, type CheckboxProps, type CheckboxSlots, InternalCheckbox as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useFormItemInputContext } from "../form/context.js";
|
|
1
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
3
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
3
4
|
import { useCompactItemContext } from "../space/Compact.js";
|
|
@@ -11,7 +12,6 @@ import { formatColorValue, genAlphaColor, generateColor, getColorAlpha } from ".
|
|
|
11
12
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
12
13
|
import genPurePanel from "../_util/PurePanel.js";
|
|
13
14
|
import { getStatusClassNames } from "../_util/statusUtils.js";
|
|
14
|
-
import { useFormItemInputContext } from "../form/context.js";
|
|
15
15
|
import Popover from "../popover/index.js";
|
|
16
16
|
import ColorPickerPanel_default from "./ColorPickerPanel.js";
|
|
17
17
|
import ColorTrigger_default from "./components/ColorTrigger.js";
|
|
@@ -12,7 +12,7 @@ const genInputStyle = (token) => {
|
|
|
12
12
|
paddingInlineStart: paddingXXS,
|
|
13
13
|
paddingInlineEnd: 0
|
|
14
14
|
},
|
|
15
|
-
[`${antCls}-input-number-
|
|
15
|
+
[`${antCls}-input-number-actions`]: { width: colorPickerInputNumberHandleWidth }
|
|
16
16
|
},
|
|
17
17
|
[`${componentCls}-steppers${componentCls}-alpha-input`]: {
|
|
18
18
|
flex: `0 0 ${unit(colorPickerAlphaInputWidth)}`,
|
package/dist/components.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import Pagination from "./pagination/Pagination.js";
|
|
|
18
18
|
import { PaginationProps } from "./pagination/index.js";
|
|
19
19
|
import Popover, { PopoverEmits, PopoverProps, PopoverRef, PopoverSlots } from "./popover/index.js";
|
|
20
20
|
import Popconfirm, { PopconfirmEmits, PopconfirmProps, PopconfirmSlots } from "./popconfirm/index.js";
|
|
21
|
+
import { SplitterEmits, SplitterSlots } from "./splitter/interface.js";
|
|
21
22
|
import _default$11, { SpinProps, SpinRef, SpinSlots } from "./spin/index.js";
|
|
22
23
|
import InternalCheckbox, { CheckboxEmits, CheckboxProps, CheckboxSlots } from "./checkbox/Checkbox.js";
|
|
23
24
|
import CheckboxGroup, { CheckboxGroupEmits, CheckboxGroupProps, CheckboxGroupSlots, CheckboxOptionType } from "./checkbox/Group.js";
|
|
@@ -110,7 +111,6 @@ import "./skeleton/index.js";
|
|
|
110
111
|
import Slider, { SliderEmits, SliderProps, SliderRef } from "./slider/index.js";
|
|
111
112
|
import { SpaceCompactProps, SpaceCompactRef } from "./space/Compact.js";
|
|
112
113
|
import Space, { SpaceAddon, SpaceCompact, SpaceProps, SpaceSize, SpaceSlots } from "./space/index.js";
|
|
113
|
-
import { SplitterEmits, SplitterSlots } from "./splitter/interface.js";
|
|
114
114
|
import Splitter, { SplitterRef } from "./splitter/Splitter.js";
|
|
115
115
|
import { SplitterPanel, SplitterProps } from "./splitter/index.js";
|
|
116
116
|
import { StatisticRef } from "./statistic/Statistic.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../../_util/warning.js";
|
|
2
|
+
import { useFormItemInputContext } from "../../form/context.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../../config-provider/context.js";
|
|
3
4
|
import { useSize } from "../../config-provider/hooks/useSize.js";
|
|
4
5
|
import { useCompactItemContext } from "../../space/Compact.js";
|
|
@@ -12,7 +13,6 @@ import { isNonNullable } from "../../_util/is.js";
|
|
|
12
13
|
import locale from "../locale/en_US.js";
|
|
13
14
|
import useLocale from "../../locale/useLocale.js";
|
|
14
15
|
import { getMergedStatus, getStatusClassNames } from "../../_util/statusUtils.js";
|
|
15
|
-
import { useFormItemInputContext } from "../../form/context.js";
|
|
16
16
|
import { useVariants } from "../../form/hooks/useVariant.js";
|
|
17
17
|
import style_default from "../style/index.js";
|
|
18
18
|
import useMergedPickerSemantic from "../hooks/useMergedPickerSemantic.js";
|
|
@@ -109,7 +109,7 @@ function generateRangePicker(generateConfig) {
|
|
|
109
109
|
nativeElement: computed(() => innerRef.value?.nativeElement)
|
|
110
110
|
});
|
|
111
111
|
return () => {
|
|
112
|
-
const { placeholder, components, placement, suffixIcon, prefix, allowClear, clearIcon, popupClassName: _popupClassName, dropdownClassName: _dropdownClassName, popupStyle: _popupStyle, rootClass: _rootClass, classes: _classes, styles: _styles, status: _status, variant: _variant, bordered: _bordered, size: _size, disabled: _disabled, locale: _locale, getPopupContainer: _getPopupContainer, ...restProps } = props;
|
|
112
|
+
const { placeholder, components, placement, suffixIcon, prefix, allowClear, clearIcon, popupClassName: _popupClassName, dropdownClassName: _dropdownClassName, popupStyle: _popupStyle, rootClass: _rootClass, classes: _classes, styles: _styles, status: _status, variant: _variant, bordered: _bordered, size: _size, disabled: _disabled, locale: _locale, getPopupContainer: _getPopupContainer, autoComplete, autocomplete, ...restProps } = props;
|
|
113
113
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs, void 0, props);
|
|
114
114
|
const mergedSuffixIcon = getSlotPropsFnRun(slots, { suffixIcon }, "suffixIcon", false);
|
|
115
115
|
const mergedPrefix = getSlotPropsFnRun(slots, { prefix }, "prefix", false);
|
|
@@ -154,6 +154,7 @@ function generateRangePicker(generateConfig) {
|
|
|
154
154
|
const hasCustomSeparator = isNonNullable(mergedSeparator);
|
|
155
155
|
return createVNode(ContextIsolator, { "space": true }, { default: () => [createVNode(RangePicker, mergeProps(restAttrs, restProps, {
|
|
156
156
|
"ref": innerRef,
|
|
157
|
+
"autoComplete": autoComplete ?? autocomplete,
|
|
157
158
|
"separator": createVNode("span", {
|
|
158
159
|
"aria-hidden": hasCustomSeparator ? void 0 : true,
|
|
159
160
|
"class": `${prefixCls.value}-separator`
|
|
@@ -258,6 +259,10 @@ function generateRangePicker(generateConfig) {
|
|
|
258
259
|
type: [Object, Function],
|
|
259
260
|
required: false
|
|
260
261
|
},
|
|
262
|
+
autocomplete: {
|
|
263
|
+
type: String,
|
|
264
|
+
required: false
|
|
265
|
+
},
|
|
261
266
|
id: {
|
|
262
267
|
type: [String, Object],
|
|
263
268
|
required: false
|
|
@@ -412,6 +417,19 @@ function generateRangePicker(generateConfig) {
|
|
|
412
417
|
required: false,
|
|
413
418
|
default: void 0
|
|
414
419
|
},
|
|
420
|
+
name: {
|
|
421
|
+
type: String,
|
|
422
|
+
required: false
|
|
423
|
+
},
|
|
424
|
+
required: {
|
|
425
|
+
type: Boolean,
|
|
426
|
+
required: false,
|
|
427
|
+
default: void 0
|
|
428
|
+
},
|
|
429
|
+
autoComplete: {
|
|
430
|
+
type: String,
|
|
431
|
+
required: false
|
|
432
|
+
},
|
|
415
433
|
order: {
|
|
416
434
|
type: Boolean,
|
|
417
435
|
required: false,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../../_util/warning.js";
|
|
2
|
+
import { useFormItemInputContext } from "../../form/context.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../../config-provider/context.js";
|
|
3
4
|
import { useSize } from "../../config-provider/hooks/useSize.js";
|
|
4
5
|
import { useCompactItemContext } from "../../space/Compact.js";
|
|
@@ -12,7 +13,6 @@ import locale from "../locale/en_US.js";
|
|
|
12
13
|
import useLocale from "../../locale/useLocale.js";
|
|
13
14
|
import { omitUndefined } from "../../_util/omitUndefined.js";
|
|
14
15
|
import { getMergedStatus, getStatusClassNames } from "../../_util/statusUtils.js";
|
|
15
|
-
import { useFormItemInputContext } from "../../form/context.js";
|
|
16
16
|
import { useVariants } from "../../form/hooks/useVariant.js";
|
|
17
17
|
import style_default from "../style/index.js";
|
|
18
18
|
import useMergedPickerSemantic from "../hooks/useMergedPickerSemantic.js";
|
|
@@ -121,7 +121,7 @@ function generatePicker(generateConfig) {
|
|
|
121
121
|
nativeElement: computed(() => innerRef.value?.nativeElement)
|
|
122
122
|
});
|
|
123
123
|
return () => {
|
|
124
|
-
const { placeholder, components, placement, suffixIcon, prefix, allowClear, clearIcon, popupClassName: _popupClassName, dropdownClassName: _dropdownClassName, popupStyle: _popupStyle, rootClass: _rootClass, classes: _classes, styles: _styles, status: _status, variant: _variant, bordered: _bordered, size: _size, disabled: _disabled, locale: _locale, getPopupContainer: _getPopupContainer, ...restProps } = props;
|
|
124
|
+
const { placeholder, components, placement, suffixIcon, prefix, allowClear, clearIcon, popupClassName: _popupClassName, dropdownClassName: _dropdownClassName, popupStyle: _popupStyle, rootClass: _rootClass, classes: _classes, styles: _styles, status: _status, variant: _variant, bordered: _bordered, size: _size, disabled: _disabled, locale: _locale, getPopupContainer: _getPopupContainer, autoComplete, autocomplete, ...restProps } = props;
|
|
125
125
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs, void 0, props);
|
|
126
126
|
const mergedSuffixIcon = getSlotPropsFnRun(slots, { suffixIcon }, "suffixIcon", false);
|
|
127
127
|
const mergedPrefix = getSlotPropsFnRun(slots, { prefix }, "prefix", false);
|
|
@@ -164,6 +164,7 @@ function generatePicker(generateConfig) {
|
|
|
164
164
|
const inputRender = slots.inputRender || props.inputRender ? (inputProps) => resolveRender("inputRender", [inputProps], inputProps) : void 0;
|
|
165
165
|
return createVNode(ContextIsolator, { "space": true }, { default: () => [createVNode(Picker, mergeProps(restAttrs, additionalProps, omitUndefined(restProps, ["onKeydown"]), {
|
|
166
166
|
"ref": innerRef,
|
|
167
|
+
"autoComplete": autoComplete ?? autocomplete,
|
|
167
168
|
"placeholder": getPlaceholder(locale$1.value, mergedPicker.value, placeholder),
|
|
168
169
|
"suffix": suffixNode,
|
|
169
170
|
"prefix": mergedPrefix,
|
|
@@ -265,6 +266,10 @@ function generatePicker(generateConfig) {
|
|
|
265
266
|
type: [Object, Function],
|
|
266
267
|
required: false
|
|
267
268
|
},
|
|
269
|
+
autocomplete: {
|
|
270
|
+
type: String,
|
|
271
|
+
required: false
|
|
272
|
+
},
|
|
268
273
|
use12Hours: {
|
|
269
274
|
type: Boolean,
|
|
270
275
|
required: false,
|
|
@@ -410,6 +415,19 @@ function generatePicker(generateConfig) {
|
|
|
410
415
|
required: false,
|
|
411
416
|
default: void 0
|
|
412
417
|
},
|
|
418
|
+
name: {
|
|
419
|
+
type: String,
|
|
420
|
+
required: false
|
|
421
|
+
},
|
|
422
|
+
required: {
|
|
423
|
+
type: Boolean,
|
|
424
|
+
required: false,
|
|
425
|
+
default: void 0
|
|
426
|
+
},
|
|
427
|
+
autoComplete: {
|
|
428
|
+
type: String,
|
|
429
|
+
required: false
|
|
430
|
+
},
|
|
413
431
|
order: {
|
|
414
432
|
type: Boolean,
|
|
415
433
|
required: false,
|
|
@@ -148,6 +148,10 @@ interface BaseDefaultProps<Props> {
|
|
|
148
148
|
popupStyle?: CSSProperties;
|
|
149
149
|
classes?: DatePickerClassNamesType<Props>;
|
|
150
150
|
styles?: DatePickerStylesType<Props>;
|
|
151
|
+
/**
|
|
152
|
+
* Lowercase alias of `autoComplete`, matching the native `autocomplete` attribute in templates
|
|
153
|
+
*/
|
|
154
|
+
autocomplete?: string;
|
|
151
155
|
}
|
|
152
156
|
/** Base Single Picker props */
|
|
153
157
|
interface PickerProps<DateType extends AnyObject = any> extends BaseDefaultProps<DateType>, Omit<PickerProps$1, 'placement' | 'locale' | 'generateConfig' | 'hideHeader' | 'classNames' | 'styles' | RcEventKeys | 'className' | 'style' | 'rootClassName'> {}
|
|
@@ -193,7 +193,7 @@ const genPanelStyle = (token) => {
|
|
|
193
193
|
"th, td": {
|
|
194
194
|
position: "relative",
|
|
195
195
|
minWidth: cellHeight,
|
|
196
|
-
fontWeight:
|
|
196
|
+
fontWeight: 400
|
|
197
197
|
},
|
|
198
198
|
th: {
|
|
199
199
|
height: token.calc(cellHeight).add(token.calc(pickerCellPaddingVertical).mul(2)).equal(),
|