antdv-next 1.5.6 → 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/PurePanel.js +17 -14
- package/dist/_util/fallbackProp.d.ts +13 -0
- package/dist/_util/fallbackProp.js +15 -0
- package/dist/_util/hooks/useAllowClear.d.ts +35 -0
- package/dist/_util/hooks/useAllowClear.js +34 -0
- package/dist/_util/hooks/useClosable.js +1 -1
- package/dist/_util/hooks/useMergeSemantic.js +3 -2
- package/dist/_util/omitUndefined.d.ts +13 -0
- package/dist/_util/omitUndefined.js +20 -0
- package/dist/_util/tools.d.ts +3 -1
- package/dist/_util/tools.js +6 -1
- package/dist/_util/wave/index.js +4 -2
- package/dist/_util/wave/style.d.ts +5 -1
- package/dist/_util/wave/useWave.d.ts +2 -1
- package/dist/_util/wave/useWave.js +4 -3
- package/dist/affix/style/index.d.ts +5 -1
- package/dist/alert/Alert.d.ts +6 -2
- package/dist/alert/Alert.js +135 -129
- package/dist/alert/style/index.d.ts +7 -4
- package/dist/alert/style/index.js +12 -9
- package/dist/anchor/style/index.d.ts +5 -1
- package/dist/antd-with-locales.esm.js +21947 -18522
- package/dist/antd-with-locales.js +82 -82
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +19553 -16771
- package/dist/antd.js +82 -82
- package/dist/app/style/index.d.ts +5 -1
- 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/avatar/style/index.d.ts +5 -1
- package/dist/badge/index.js +1 -1
- package/dist/badge/style/index.d.ts +5 -1
- package/dist/badge/style/index.js +2 -9
- package/dist/badge/style/ribbon.d.ts +5 -1
- 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/border-beam/style/index.d.ts +5 -1
- package/dist/breadcrumb/BreadcrumbItem.js +2 -2
- package/dist/breadcrumb/style/index.d.ts +5 -1
- package/dist/button/style/index.d.ts +5 -1
- package/dist/calendar/style/index.d.ts +4 -1
- package/dist/card/Card.js +1 -1
- package/dist/card/style/index.d.ts +5 -1
- package/dist/card/style/index.js +2 -2
- package/dist/carousel/index.js +1 -1
- package/dist/carousel/style/index.d.ts +5 -1
- package/dist/carousel/style/index.js +1 -1
- package/dist/cascader/Panel.js +3 -3
- package/dist/cascader/index.js +14 -6
- package/dist/cascader/style/index.d.ts +5 -1
- package/dist/cascader/style/panel.d.ts +5 -1
- 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/checkbox/style/index.d.ts +4 -1
- package/dist/collapse/style/index.d.ts +4 -1
- package/dist/color-picker/ColorPicker.js +8 -12
- package/dist/color-picker/style/index.d.ts +5 -1
- package/dist/color-picker/style/input.js +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/config-provider/context.d.ts +16 -21
- package/dist/config-provider/context.js +32 -38
- package/dist/config-provider/define.d.ts +3 -1
- package/dist/config-provider/hooks/useCSSVarCls.d.ts +3 -0
- package/dist/config-provider/hooks/useCSSVarCls.js +4 -3
- package/dist/config-provider/index.d.ts +2 -2
- package/dist/config-provider/index.js +24 -1
- package/dist/date-picker/generatePicker/generateRangePicker.js +29 -4
- package/dist/date-picker/generatePicker/generateSinglePicker.js +32 -6
- package/dist/date-picker/generatePicker/interface.d.ts +4 -0
- package/dist/date-picker/generatePicker/useComponents.d.ts +3 -3
- package/dist/date-picker/style/index.d.ts +5 -1
- 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 +10 -12
- package/dist/date-picker/util.js +14 -7
- package/dist/descriptions/Cell.js +80 -75
- package/dist/descriptions/Row.js +14 -11
- package/dist/descriptions/hooks/useItems.d.ts +10 -10
- package/dist/descriptions/style/index.d.ts +5 -1
- package/dist/descriptions/style/index.js +11 -13
- package/dist/divider/style/index.d.ts +5 -1
- package/dist/divider/style/index.js +1 -1
- package/dist/drawer/DrawerPanel.js +7 -7
- package/dist/drawer/index.d.ts +0 -2
- package/dist/drawer/index.js +0 -1
- package/dist/drawer/style/index.d.ts +5 -1
- package/dist/dropdown/dropdown.d.ts +2 -0
- package/dist/dropdown/dropdown.js +11 -3
- package/dist/dropdown/style/index.d.ts +5 -1
- package/dist/dropdown/style/index.js +1 -1
- package/dist/empty/style/index.d.ts +5 -1
- package/dist/flex/index.js +1 -1
- package/dist/flex/style/index.d.ts +5 -1
- package/dist/float-button/FloatButtonGroup.js +1 -1
- package/dist/float-button/style/index.d.ts +5 -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 +38 -18
- package/dist/form/FormItemInput.js +1 -1
- package/dist/form/FormItemLabel.js +1 -1
- package/dist/form/context.d.ts +1 -1
- package/dist/form/hooks/useVariant.d.ts +1 -1
- package/dist/form/hooks/useVariant.js +1 -1
- package/dist/form/style/index.d.ts +5 -1
- package/dist/grid/style/index.d.ts +5 -2
- package/dist/image/hooks/useMergedPreviewConfig.d.ts +1 -0
- package/dist/image/hooks/useMergedPreviewConfig.js +2 -1
- package/dist/image/hooks/usePreviewConfig.d.ts +9 -9
- package/dist/image/style/index.d.ts +4 -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.d.ts +5 -2
- package/dist/input/style/index.js +1 -1
- package/dist/input/style/otp.d.ts +5 -1
- package/dist/input/style/search.d.ts +5 -1
- package/dist/input/style/textarea.d.ts +5 -1
- package/dist/input-number/index.d.ts +3 -6
- package/dist/input-number/index.js +8 -3
- package/dist/input-number/style/index.d.ts +5 -1
- package/dist/input-number/style/index.js +1 -5
- package/dist/layout/style/index.d.ts +5 -1
- package/dist/layout/style/sider.d.ts +5 -1
- 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.d.ts +5 -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 +7 -2
- 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/masonry/style/index.d.ts +4 -1
- package/dist/mentions/index.d.ts +2 -3
- package/dist/mentions/index.js +10 -5
- package/dist/mentions/style/index.d.ts +5 -1
- package/dist/mentions/style/index.js +1 -1
- package/dist/menu/MenuContext.d.ts +2 -0
- package/dist/menu/MenuItem.js +25 -7
- package/dist/menu/index.js +5 -0
- package/dist/menu/menu.d.ts +3 -0
- package/dist/menu/menu.js +7 -0
- package/dist/message/style/index.d.ts +5 -1
- package/dist/modal/ConfirmDialog.js +14 -7
- package/dist/modal/style/index.d.ts +3 -1
- package/dist/notification/PurePanel.js +7 -12
- package/dist/notification/interface.d.ts +8 -0
- package/dist/notification/style/index.d.ts +4 -1
- 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/style/index.d.ts +5 -1
- 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.d.ts +5 -1
- package/dist/popconfirm/style/index.js +1 -1
- package/dist/popover/index.js +5 -4
- package/dist/popover/style/index.d.ts +5 -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/progress/style/index.d.ts +5 -1
- package/dist/qrcode/index.js +4 -25
- package/dist/qrcode/interface.d.ts +1 -1
- package/dist/qrcode/style/index.d.ts +5 -1
- 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/radio/style/index.d.ts +5 -1
- package/dist/rate/style/index.d.ts +5 -1
- package/dist/result/index.js +3 -3
- package/dist/result/noFound.js +120 -140
- package/dist/result/serverError.js +132 -147
- package/dist/result/style/index.d.ts +5 -1
- package/dist/result/unauthorized.js +115 -129
- package/dist/segmented/index.js +1 -1
- package/dist/segmented/style/index.d.ts +5 -1
- package/dist/select/index.js +12 -5
- package/dist/select/style/dropdown.js +1 -1
- package/dist/select/style/index.d.ts +5 -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/skeleton/style/index.d.ts +5 -1
- package/dist/slider/index.d.ts +0 -3
- package/dist/slider/index.js +2 -2
- package/dist/slider/style/index.d.ts +5 -1
- package/dist/space/Compact.d.ts +1 -1
- package/dist/space/style/addon.d.ts +5 -1
- package/dist/space/style/compact.d.ts +5 -1
- package/dist/space/style/index.d.ts +5 -1
- package/dist/spin/style/index.d.ts +5 -1
- package/dist/splitter/SplitBar.js +9 -3
- package/dist/splitter/interface.d.ts +5 -1
- package/dist/splitter/style/index.d.ts +5 -1
- package/dist/statistic/style/index.d.ts +5 -1
- package/dist/steps/style/index.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/switch/style/index.d.ts +5 -1
- package/dist/table/ExpandIcon.d.ts +9 -4
- package/dist/table/ExpandIcon.js +42 -20
- package/dist/table/InternalTable.js +72 -62
- package/dist/table/hooks/useLazyKVMap.js +1 -1
- package/dist/table/hooks/useSelection.js +73 -15
- package/dist/table/interface.d.ts +8 -0
- package/dist/table/style/index.d.ts +5 -1
- package/dist/table/style/index.js +1 -1
- package/dist/table/style/selection.js +1 -1
- package/dist/table/style/sorter.js +2 -2
- package/dist/table/util.d.ts +1 -1
- package/dist/tabs/index.js +9 -2
- package/dist/tabs/style/index.d.ts +5 -1
- package/dist/tabs/style/index.js +1 -1
- package/dist/tag/CheckableTagGroup.d.ts +2 -2
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/tag/style/index.d.ts +5 -1
- package/dist/theme/context.js +2 -1
- package/dist/theme/useToken.d.ts +6 -2
- package/dist/theme/useToken.js +46 -14
- package/dist/theme/util/genStyleUtils.d.ts +13 -3
- package/dist/theme/util/genStyleUtils.js +42 -28
- package/dist/time-picker/index.js +34 -0
- package/dist/timeline/Timeline.js +1 -1
- package/dist/timeline/style/index.d.ts +5 -1
- package/dist/timeline/useItems.d.ts +2 -2
- package/dist/timeline/useItems.js +1 -1
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip/style/index.d.ts +2 -2
- package/dist/tooltip/style/index.js +1 -1
- package/dist/tour/panelRender.js +3 -2
- package/dist/tour/style/index.d.ts +5 -1
- package/dist/transfer/Section.js +2 -1
- package/dist/transfer/Transfer.js +3 -1
- package/dist/transfer/style/index.d.ts +5 -1
- package/dist/tree/DirectoryTree.js +1 -1
- package/dist/tree/style/index.d.ts +4 -1
- package/dist/tree/style/index.js +1 -1
- package/dist/tree-select/index.js +15 -9
- package/dist/tree-select/style/index.d.ts +2 -2
- 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.d.ts +5 -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/upload/style/index.d.ts +5 -1
- package/dist/version/token-meta.json +1 -1
- package/dist/version/token.json +1 -1
- package/dist/watermark/index.js +1 -1
- package/global.d.ts +5 -0
- package/package.json +17 -17
- package/web-tags.json +5053 -3004
- package/web-types.json +13207 -7299
- package/dist/_util/getAllowClear.d.ts +0 -6
- package/dist/_util/getAllowClear.js +0 -11
|
@@ -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";
|
|
@@ -31,6 +31,7 @@ function generateRangePicker(generateConfig) {
|
|
|
31
31
|
const { size: customizeSize, disabled: customDisabled, status: customStatus, variant: customVariant, classes, styles, rootClass, bordered } = toPropsRefs(props, "size", "disabled", "status", "variant", "classes", "styles", "rootClass", "bordered", "separator");
|
|
32
32
|
const pickerType = computed(() => props.picker === TIME ? "timePicker" : "datePicker");
|
|
33
33
|
const { prefixCls, direction, getPopupContainer, rootPrefixCls, class: contextClassName, style: contextStyle, separator: contextSeparator } = useComponentBaseConfig("rangePicker", props, ["separator"], "picker");
|
|
34
|
+
const { allowClear: contextAllowClear, clearIcon: contextClearIcon } = useComponentBaseConfig(pickerType.value, props, ["allowClear", "clearIcon"], "picker");
|
|
34
35
|
const { compactSize, compactItemClassnames } = useCompactItemContext(prefixCls, direction);
|
|
35
36
|
const mergedSize = useSize((ctx) => customizeSize.value ?? compactSize.value ?? ctx);
|
|
36
37
|
const disabled = useDisabledContext();
|
|
@@ -50,7 +51,7 @@ function generateRangePicker(generateConfig) {
|
|
|
50
51
|
const rootCls = useCSSVarCls(prefixCls);
|
|
51
52
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
52
53
|
const mergedRootClassName = computed(() => clsx(hashId.value, cssVarCls.value, rootCls.value, rootClass.value));
|
|
53
|
-
const [contextLocale] = useLocale("
|
|
54
|
+
const [contextLocale] = useLocale("DatePicker", locale);
|
|
54
55
|
const locale$1 = computed(() => ({
|
|
55
56
|
...contextLocale?.value,
|
|
56
57
|
...props.locale ?? {}
|
|
@@ -108,11 +109,17 @@ function generateRangePicker(generateConfig) {
|
|
|
108
109
|
nativeElement: computed(() => innerRef.value?.nativeElement)
|
|
109
110
|
});
|
|
110
111
|
return () => {
|
|
111
|
-
const { placeholder, components, placement, suffixIcon, prefix, allowClear, 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;
|
|
112
113
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs, void 0, props);
|
|
113
114
|
const mergedSuffixIcon = getSlotPropsFnRun(slots, { suffixIcon }, "suffixIcon", false);
|
|
114
115
|
const mergedPrefix = getSlotPropsFnRun(slots, { prefix }, "prefix", false);
|
|
115
|
-
const [mergedAllowClear] = useIcons({
|
|
116
|
+
const [mergedAllowClear] = useIcons({
|
|
117
|
+
allowClear,
|
|
118
|
+
clearIcon
|
|
119
|
+
}, prefixCls.value, {
|
|
120
|
+
allowClear: contextAllowClear?.value,
|
|
121
|
+
clearIcon: contextClearIcon?.value
|
|
122
|
+
});
|
|
116
123
|
const mergedComponents = useComponents(components);
|
|
117
124
|
const { hasFeedback, status: contextStatus, feedbackIcon } = useFormItemInputContext().value;
|
|
118
125
|
const mergedStatus = getMergedStatus(contextStatus, customStatus.value);
|
|
@@ -147,6 +154,7 @@ function generateRangePicker(generateConfig) {
|
|
|
147
154
|
const hasCustomSeparator = isNonNullable(mergedSeparator);
|
|
148
155
|
return createVNode(ContextIsolator, { "space": true }, { default: () => [createVNode(RangePicker, mergeProps(restAttrs, restProps, {
|
|
149
156
|
"ref": innerRef,
|
|
157
|
+
"autoComplete": autoComplete ?? autocomplete,
|
|
150
158
|
"separator": createVNode("span", {
|
|
151
159
|
"aria-hidden": hasCustomSeparator ? void 0 : true,
|
|
152
160
|
"class": `${prefixCls.value}-separator`
|
|
@@ -251,6 +259,10 @@ function generateRangePicker(generateConfig) {
|
|
|
251
259
|
type: [Object, Function],
|
|
252
260
|
required: false
|
|
253
261
|
},
|
|
262
|
+
autocomplete: {
|
|
263
|
+
type: String,
|
|
264
|
+
required: false
|
|
265
|
+
},
|
|
254
266
|
id: {
|
|
255
267
|
type: [String, Object],
|
|
256
268
|
required: false
|
|
@@ -405,6 +417,19 @@ function generateRangePicker(generateConfig) {
|
|
|
405
417
|
required: false,
|
|
406
418
|
default: void 0
|
|
407
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
|
+
},
|
|
408
433
|
order: {
|
|
409
434
|
type: Boolean,
|
|
410
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";
|
|
@@ -10,8 +11,8 @@ import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
|
10
11
|
import { useDisabledContext } from "../../config-provider/DisabledContext.js";
|
|
11
12
|
import locale from "../locale/en_US.js";
|
|
12
13
|
import useLocale from "../../locale/useLocale.js";
|
|
14
|
+
import { omitUndefined } from "../../_util/omitUndefined.js";
|
|
13
15
|
import { getMergedStatus, getStatusClassNames } from "../../_util/statusUtils.js";
|
|
14
|
-
import { useFormItemInputContext } from "../../form/context.js";
|
|
15
16
|
import { useVariants } from "../../form/hooks/useVariant.js";
|
|
16
17
|
import style_default from "../style/index.js";
|
|
17
18
|
import useMergedPickerSemantic from "../hooks/useMergedPickerSemantic.js";
|
|
@@ -22,7 +23,6 @@ import useComponents from "./useComponents.js";
|
|
|
22
23
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
23
24
|
import { clsx } from "@v-c/util";
|
|
24
25
|
import { getTransitionName } from "@v-c/util/dist/utils/transition";
|
|
25
|
-
import { omit } from "es-toolkit/compat";
|
|
26
26
|
import Picker from "@v-c/picker";
|
|
27
27
|
//#region src/date-picker/generatePicker/generateSinglePicker.tsx
|
|
28
28
|
function generatePicker(generateConfig) {
|
|
@@ -31,7 +31,11 @@ function generatePicker(generateConfig) {
|
|
|
31
31
|
const name = displayName ? `A${displayName}` : "ADatePicker";
|
|
32
32
|
return /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expose }) => {
|
|
33
33
|
const { getPopupContainer: customGetPopupContainer, size: customizeSize, disabled: customDisabled, status: customStatus, variant: customVariant, classes, styles, rootClass, bordered } = toPropsRefs(props, "prefixCls", "getPopupContainer", "size", "disabled", "status", "variant", "classes", "styles", "rootClass", "bordered");
|
|
34
|
-
const { prefixCls, direction, getPopupContainer, rootPrefixCls, class: contextClassName, style: contextStyle, suffixIcon: contextSuffixIcon } = useComponentBaseConfig(pickerType, props, [
|
|
34
|
+
const { prefixCls, direction, getPopupContainer, rootPrefixCls, class: contextClassName, style: contextStyle, suffixIcon: contextSuffixIcon, allowClear: contextAllowClear, clearIcon: contextClearIcon } = useComponentBaseConfig(pickerType, props, [
|
|
35
|
+
"suffixIcon",
|
|
36
|
+
"allowClear",
|
|
37
|
+
"clearIcon"
|
|
38
|
+
], "picker");
|
|
35
39
|
const { compactSize, compactItemClassnames } = useCompactItemContext(prefixCls, direction);
|
|
36
40
|
const mergedSize = useSize((ctx) => customizeSize.value ?? compactSize.value ?? ctx);
|
|
37
41
|
const disabled = useDisabledContext();
|
|
@@ -117,14 +121,18 @@ function generatePicker(generateConfig) {
|
|
|
117
121
|
nativeElement: computed(() => innerRef.value?.nativeElement)
|
|
118
122
|
});
|
|
119
123
|
return () => {
|
|
120
|
-
const { placeholder, components, placement, suffixIcon, prefix, allowClear, 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;
|
|
121
125
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs, void 0, props);
|
|
122
126
|
const mergedSuffixIcon = getSlotPropsFnRun(slots, { suffixIcon }, "suffixIcon", false);
|
|
123
127
|
const mergedPrefix = getSlotPropsFnRun(slots, { prefix }, "prefix", false);
|
|
124
128
|
const [mergedAllowClear, removeIcon] = useIcons({
|
|
125
129
|
allowClear,
|
|
130
|
+
clearIcon,
|
|
126
131
|
removeIcon: props.removeIcon
|
|
127
|
-
}, prefixCls.value
|
|
132
|
+
}, prefixCls.value, {
|
|
133
|
+
allowClear: contextAllowClear?.value,
|
|
134
|
+
clearIcon: contextClearIcon?.value
|
|
135
|
+
});
|
|
128
136
|
const mergedComponents = useComponents(components);
|
|
129
137
|
const { hasFeedback, status: contextStatus, feedbackIcon } = useFormItemInputContext().value;
|
|
130
138
|
const mergedStatus = getMergedStatus(contextStatus, customStatus.value);
|
|
@@ -154,8 +162,9 @@ function generatePicker(generateConfig) {
|
|
|
154
162
|
const renderExtraFooter = slots.renderExtraFooter || props.renderExtraFooter ? (mode) => resolveRender("renderExtraFooter", [mode], mode) : void 0;
|
|
155
163
|
const panelRender = slots.panelRender || props.panelRender ? (panel) => resolveRender("panelRender", [panel], panel) : void 0;
|
|
156
164
|
const inputRender = slots.inputRender || props.inputRender ? (inputProps) => resolveRender("inputRender", [inputProps], inputProps) : void 0;
|
|
157
|
-
return createVNode(ContextIsolator, { "space": true }, { default: () => [createVNode(Picker, mergeProps(restAttrs, additionalProps,
|
|
165
|
+
return createVNode(ContextIsolator, { "space": true }, { default: () => [createVNode(Picker, mergeProps(restAttrs, additionalProps, omitUndefined(restProps, ["onKeydown"]), {
|
|
158
166
|
"ref": innerRef,
|
|
167
|
+
"autoComplete": autoComplete ?? autocomplete,
|
|
159
168
|
"placeholder": getPlaceholder(locale$1.value, mergedPicker.value, placeholder),
|
|
160
169
|
"suffix": suffixNode,
|
|
161
170
|
"prefix": mergedPrefix,
|
|
@@ -257,6 +266,10 @@ function generatePicker(generateConfig) {
|
|
|
257
266
|
type: [Object, Function],
|
|
258
267
|
required: false
|
|
259
268
|
},
|
|
269
|
+
autocomplete: {
|
|
270
|
+
type: String,
|
|
271
|
+
required: false
|
|
272
|
+
},
|
|
260
273
|
use12Hours: {
|
|
261
274
|
type: Boolean,
|
|
262
275
|
required: false,
|
|
@@ -402,6 +415,19 @@ function generatePicker(generateConfig) {
|
|
|
402
415
|
required: false,
|
|
403
416
|
default: void 0
|
|
404
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
|
+
},
|
|
405
431
|
order: {
|
|
406
432
|
type: Boolean,
|
|
407
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'> {}
|
|
@@ -3,11 +3,11 @@ import "../../index.js";
|
|
|
3
3
|
import { Components } from "@v-c/picker";
|
|
4
4
|
//#region src/date-picker/generatePicker/useComponents.d.ts
|
|
5
5
|
declare function useComponents(components?: Components): {
|
|
6
|
-
date?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
7
6
|
time?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
8
|
-
week?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
9
|
-
month?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
10
7
|
year?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
8
|
+
month?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
9
|
+
date?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
10
|
+
week?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
11
11
|
quarter?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
12
12
|
decade?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
13
13
|
datetime?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { SeedToken } from "../../theme/interface/seeds.js";
|
|
2
|
+
import { AliasToken } from "../../theme/interface/alias.js";
|
|
1
3
|
import { ComponentToken, PanelComponentToken, PickerPanelToken, initPanelComponentToken, initPickerPanelToken } from "./token.js";
|
|
2
4
|
import { genPanelStyle } from "./panel.js";
|
|
5
|
+
import { ComponentTokenMap } from "../../theme/interface/components.js";
|
|
6
|
+
import "../../theme/interface/index.js";
|
|
3
7
|
//#region src/date-picker/style/index.d.ts
|
|
4
|
-
declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
|
|
8
|
+
declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>, tokenResult?: import("@antdv-next/cssinjs").UseTokenReturn<ComponentTokenMap, AliasToken, SeedToken> | undefined) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
|
|
5
9
|
//#endregion
|
|
6
10
|
export { type ComponentToken, type PanelComponentToken, type PickerPanelToken, _default as default, genPanelStyle, initPanelComponentToken, initPickerPanelToken };
|
|
@@ -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(),
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { RenderNodeFn } from "../_util/type.js";
|
|
1
|
+
import { RenderNodeFn, VueNode } from "../_util/type.js";
|
|
2
2
|
import "./generatePicker/index.js";
|
|
3
3
|
import { PickerLocale, PickerProps as PickerProps$1 } from "./generatePicker/interface.js";
|
|
4
|
+
import { AllowClear } from "../_util/hooks/useAllowClear.js";
|
|
4
5
|
import { PickerMode } from "@v-c/picker";
|
|
5
6
|
//#region src/date-picker/util.d.ts
|
|
6
7
|
declare function getPlaceholder(locale: PickerLocale, picker?: PickerMode, customizePlaceholder?: string): string;
|
|
7
8
|
declare function getRangePlaceholder(locale: PickerLocale, picker?: PickerMode, customizePlaceholder?: [string, string]): [string, string] | undefined;
|
|
8
|
-
declare function useIcons(props: Pick<PickerProps$1, 'allowClear' | 'removeIcon'>, prefixCls: string
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} | (string | number | boolean | void | import("vue").Component | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}> | null | undefined)[] | null | undefined;
|
|
9
|
+
declare function useIcons(props: Pick<PickerProps$1, 'allowClear' | 'clearIcon' | 'removeIcon'>, prefixCls: string, context?: {
|
|
10
|
+
allowClear?: AllowClear;
|
|
11
|
+
clearIcon?: VueNode;
|
|
12
|
+
}): readonly [false, string | number | boolean | import("vue/jsx-runtime").JSX.Element | RenderNodeFn<any[]> | null] | readonly [{
|
|
13
|
+
readonly disabled?: boolean;
|
|
14
|
+
readonly tabIndex?: number;
|
|
15
|
+
readonly label?: string;
|
|
16
|
+
readonly clearIcon: any;
|
|
19
17
|
}, string | number | boolean | import("vue/jsx-runtime").JSX.Element | RenderNodeFn<any[]> | null];
|
|
20
18
|
//#endregion
|
|
21
19
|
export { getPlaceholder, getRangePlaceholder, useIcons };
|
package/dist/date-picker/util.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import useIcons$1 from "../select/useIcons.js";
|
|
2
|
+
import useAllowClear from "../_util/hooks/useAllowClear.js";
|
|
2
3
|
import { cloneVNode, isVNode } from "vue";
|
|
3
4
|
//#region src/date-picker/util.ts
|
|
4
5
|
function getPlaceholder(locale, picker, customizePlaceholder) {
|
|
@@ -19,18 +20,24 @@ function getRangePlaceholder(locale, picker, customizePlaceholder) {
|
|
|
19
20
|
if (picker === "time" && locale.timePickerLocale.rangePlaceholder) return locale.timePickerLocale.rangePlaceholder;
|
|
20
21
|
return locale.lang.rangePlaceholder;
|
|
21
22
|
}
|
|
22
|
-
function useIcons(props, prefixCls) {
|
|
23
|
-
const {
|
|
24
|
-
const { clearIcon, removeIcon } = useIcons$1({
|
|
23
|
+
function useIcons(props, prefixCls, context) {
|
|
24
|
+
const { removeIcon } = useIcons$1({
|
|
25
25
|
...props,
|
|
26
26
|
prefixCls,
|
|
27
27
|
componentName: "DatePicker"
|
|
28
28
|
});
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const mergedAllowClear = useAllowClear({
|
|
30
|
+
allowClear: props.allowClear,
|
|
31
|
+
clearIcon: props.clearIcon,
|
|
32
|
+
contextAllowClear: context?.allowClear,
|
|
33
|
+
contextClearIcon: context?.clearIcon,
|
|
34
|
+
defaultAllowClear: true
|
|
35
|
+
});
|
|
36
|
+
if (!mergedAllowClear) return [false, removeIcon];
|
|
37
|
+
const { clearIcon: mergedClearIcon, ...rest } = mergedAllowClear;
|
|
31
38
|
return [{
|
|
32
|
-
clearIcon: isVNode(
|
|
33
|
-
...
|
|
39
|
+
clearIcon: isVNode(mergedClearIcon) ? cloneVNode(mergedClearIcon) : mergedClearIcon,
|
|
40
|
+
...rest
|
|
34
41
|
}, removeIcon];
|
|
35
42
|
}
|
|
36
43
|
//#endregion
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
1
2
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
3
|
+
import { isRenderable } from "../_util/is.js";
|
|
2
4
|
import { useDescriptionsCtx } from "./DescriptionsContext.js";
|
|
3
5
|
import { createVNode, defineComponent, mergeProps } from "vue";
|
|
4
6
|
import { classNames } from "@v-c/util";
|
|
5
7
|
//#region src/descriptions/Cell.tsx
|
|
6
|
-
function notEmpty(val) {
|
|
7
|
-
return val !== void 0 && val !== null;
|
|
8
|
-
}
|
|
9
8
|
const Cell = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
|
|
10
9
|
const descContext = useDescriptionsCtx();
|
|
11
10
|
return () => {
|
|
@@ -14,19 +13,22 @@ const Cell = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
|
|
|
14
13
|
const Component = component;
|
|
15
14
|
const label = getSlotPropsFnRun(slots, props, "label");
|
|
16
15
|
const content = getSlotPropsFnRun(slots, props, "content");
|
|
17
|
-
if (bordered)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
if (bordered) {
|
|
17
|
+
let typeStyle;
|
|
18
|
+
if (type === "label") typeStyle = styles?.label;
|
|
19
|
+
if (type === "content") typeStyle = styles?.content;
|
|
20
|
+
const mergedCellStyle = {
|
|
21
|
+
...normalizeStyle$1(attrs.style),
|
|
22
|
+
...typeStyle
|
|
23
|
+
};
|
|
24
|
+
return createVNode(Component, mergeProps({
|
|
25
|
+
"class": classNames({
|
|
26
|
+
[`${itemPrefixCls}-item-label`]: type === "label",
|
|
27
|
+
[`${itemPrefixCls}-item-content`]: type === "content"
|
|
28
|
+
}, type === "label" ? descriptionsClassNames?.label : void 0, type === "content" ? descriptionsClassNames?.content : void 0),
|
|
29
|
+
"colSpan": span
|
|
30
|
+
}, attrs, { "style": mergedCellStyle }), { default: () => [isRenderable(label) && createVNode("span", null, [label]), isRenderable(content) && createVNode("span", null, [content])] });
|
|
31
|
+
}
|
|
30
32
|
return createVNode(Component, mergeProps({ "class": classNames(`${itemPrefixCls}-item`) }, attrs, { "colSpan": span }), { default: () => [createVNode("div", { "class": `${itemPrefixCls}-item-container` }, [(label || label === 0) && createVNode("span", {
|
|
31
33
|
"class": classNames(`${itemPrefixCls}-item-label`, descriptionsClassNames?.label, { [`${itemPrefixCls}-item-no-colon`]: !colon }, classes?.label),
|
|
32
34
|
"style": styles?.label
|
|
@@ -35,65 +37,68 @@ const Cell = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
|
|
|
35
37
|
"style": styles?.content
|
|
36
38
|
}, [content])])] });
|
|
37
39
|
};
|
|
38
|
-
}, {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
}, {
|
|
41
|
+
props: {
|
|
42
|
+
itemPrefixCls: {
|
|
43
|
+
type: String,
|
|
44
|
+
required: true
|
|
45
|
+
},
|
|
46
|
+
span: {
|
|
47
|
+
type: Number,
|
|
48
|
+
required: true
|
|
49
|
+
},
|
|
50
|
+
component: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: true
|
|
53
|
+
},
|
|
54
|
+
classes: {
|
|
55
|
+
type: Object,
|
|
56
|
+
required: false
|
|
57
|
+
},
|
|
58
|
+
styles: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: false
|
|
61
|
+
},
|
|
62
|
+
bordered: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
required: false,
|
|
65
|
+
default: void 0
|
|
66
|
+
},
|
|
67
|
+
label: {
|
|
68
|
+
type: [
|
|
69
|
+
Function,
|
|
70
|
+
String,
|
|
71
|
+
Number,
|
|
72
|
+
null,
|
|
73
|
+
Object,
|
|
74
|
+
Boolean
|
|
75
|
+
],
|
|
76
|
+
required: false,
|
|
77
|
+
default: void 0
|
|
78
|
+
},
|
|
79
|
+
content: {
|
|
80
|
+
type: [
|
|
81
|
+
Function,
|
|
82
|
+
String,
|
|
83
|
+
Number,
|
|
84
|
+
null,
|
|
85
|
+
Object,
|
|
86
|
+
Boolean
|
|
87
|
+
],
|
|
88
|
+
required: false,
|
|
89
|
+
default: void 0
|
|
90
|
+
},
|
|
91
|
+
type: {
|
|
92
|
+
type: String,
|
|
93
|
+
required: false
|
|
94
|
+
},
|
|
95
|
+
colon: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
required: false,
|
|
98
|
+
default: void 0
|
|
99
|
+
}
|
|
42
100
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
required: true
|
|
46
|
-
},
|
|
47
|
-
component: {
|
|
48
|
-
type: String,
|
|
49
|
-
required: true
|
|
50
|
-
},
|
|
51
|
-
classes: {
|
|
52
|
-
type: Object,
|
|
53
|
-
required: false
|
|
54
|
-
},
|
|
55
|
-
styles: {
|
|
56
|
-
type: Object,
|
|
57
|
-
required: false
|
|
58
|
-
},
|
|
59
|
-
bordered: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
required: false,
|
|
62
|
-
default: void 0
|
|
63
|
-
},
|
|
64
|
-
label: {
|
|
65
|
-
type: [
|
|
66
|
-
Function,
|
|
67
|
-
String,
|
|
68
|
-
Number,
|
|
69
|
-
null,
|
|
70
|
-
Object,
|
|
71
|
-
Boolean
|
|
72
|
-
],
|
|
73
|
-
required: false,
|
|
74
|
-
default: void 0
|
|
75
|
-
},
|
|
76
|
-
content: {
|
|
77
|
-
type: [
|
|
78
|
-
Function,
|
|
79
|
-
String,
|
|
80
|
-
Number,
|
|
81
|
-
null,
|
|
82
|
-
Object,
|
|
83
|
-
Boolean
|
|
84
|
-
],
|
|
85
|
-
required: false,
|
|
86
|
-
default: void 0
|
|
87
|
-
},
|
|
88
|
-
type: {
|
|
89
|
-
type: String,
|
|
90
|
-
required: false
|
|
91
|
-
},
|
|
92
|
-
colon: {
|
|
93
|
-
type: Boolean,
|
|
94
|
-
required: false,
|
|
95
|
-
default: void 0
|
|
96
|
-
}
|
|
97
|
-
} });
|
|
101
|
+
inheritAttrs: false
|
|
102
|
+
});
|
|
98
103
|
//#endregion
|
|
99
104
|
export { Cell as default };
|
package/dist/descriptions/Row.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
2
1
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
3
2
|
import { useDescriptionsCtx } from "./DescriptionsContext.js";
|
|
4
3
|
import Cell from "./Cell.js";
|
|
@@ -55,14 +54,21 @@ function renderCells(items, { colon, prefixCls, bordered, labelRender, contentRe
|
|
|
55
54
|
"content": showContent ? children : null,
|
|
56
55
|
"type": type
|
|
57
56
|
}, null);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"class": className,
|
|
61
|
-
"style": {
|
|
57
|
+
const mergedStyles = {
|
|
58
|
+
label: {
|
|
62
59
|
...rootStyles?.label,
|
|
63
|
-
...normalizeStyle$1(style) || {},
|
|
64
60
|
...styles?.label
|
|
65
61
|
},
|
|
62
|
+
content: {
|
|
63
|
+
...rootStyles?.content,
|
|
64
|
+
...styles?.content
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return [createVNode(Cell, {
|
|
68
|
+
"key": `label-${mergedKey}`,
|
|
69
|
+
"class": className,
|
|
70
|
+
"style": style,
|
|
71
|
+
"styles": mergedStyles,
|
|
66
72
|
"span": 1,
|
|
67
73
|
"colon": colon,
|
|
68
74
|
"component": component[0],
|
|
@@ -73,11 +79,8 @@ function renderCells(items, { colon, prefixCls, bordered, labelRender, contentRe
|
|
|
73
79
|
}, null), createVNode(Cell, {
|
|
74
80
|
"key": `content-${mergedKey}`,
|
|
75
81
|
"class": className,
|
|
76
|
-
"style":
|
|
77
|
-
|
|
78
|
-
...normalizeStyle$1(style) || {},
|
|
79
|
-
...styles?.content
|
|
80
|
-
},
|
|
82
|
+
"style": style,
|
|
83
|
+
"styles": mergedStyles,
|
|
81
84
|
"span": span * 2 - 1,
|
|
82
85
|
"component": component[1],
|
|
83
86
|
"itemPrefixCls": itemPrefixCls,
|
|
@@ -8,23 +8,23 @@ declare function useItems(screens: Ref<ScreenMap>, items: Ref<DescriptionsItemTy
|
|
|
8
8
|
filled: boolean;
|
|
9
9
|
_$index: number;
|
|
10
10
|
key?: import("@v-c/util/dist/type").Key;
|
|
11
|
-
content?: VueNode;
|
|
12
|
-
styles?: CellSemanticStyles | undefined;
|
|
13
|
-
label?: VueNode;
|
|
14
|
-
style?: import("vue").CSSProperties | undefined;
|
|
15
11
|
class?: string | undefined;
|
|
16
|
-
|
|
12
|
+
style?: import("vue").CSSProperties | undefined;
|
|
13
|
+
label?: VueNode;
|
|
17
14
|
classes?: CellSemanticClassNames | undefined;
|
|
15
|
+
styles?: CellSemanticStyles | undefined;
|
|
16
|
+
rootClass?: string | undefined;
|
|
17
|
+
content?: VueNode;
|
|
18
18
|
} | {
|
|
19
19
|
span: number | undefined;
|
|
20
20
|
key?: import("@v-c/util/dist/type").Key;
|
|
21
|
-
content?: VueNode;
|
|
22
|
-
styles?: CellSemanticStyles | undefined;
|
|
23
|
-
label?: VueNode;
|
|
24
|
-
style?: import("vue").CSSProperties | undefined;
|
|
25
21
|
class?: string | undefined;
|
|
26
|
-
|
|
22
|
+
style?: import("vue").CSSProperties | undefined;
|
|
23
|
+
label?: VueNode;
|
|
27
24
|
classes?: CellSemanticClassNames | undefined;
|
|
25
|
+
styles?: CellSemanticStyles | undefined;
|
|
26
|
+
rootClass?: string | undefined;
|
|
27
|
+
content?: VueNode;
|
|
28
28
|
_$index: number;
|
|
29
29
|
})[]>;
|
|
30
30
|
//#endregion
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { SeedToken } from "../../theme/interface/seeds.js";
|
|
2
|
+
import { AliasToken } from "../../theme/interface/alias.js";
|
|
3
|
+
import { ComponentTokenMap } from "../../theme/interface/components.js";
|
|
1
4
|
import { GetDefaultToken } from "../../theme/interface/cssinjs-utils.js";
|
|
5
|
+
import "../../theme/interface/index.js";
|
|
2
6
|
import "../../theme/internal.js";
|
|
3
7
|
//#region src/descriptions/style/index.d.ts
|
|
4
8
|
/** Component only token. Which will handle additional calculation of alias token */
|
|
@@ -55,6 +59,6 @@ interface ComponentToken {
|
|
|
55
59
|
extraColor: string;
|
|
56
60
|
}
|
|
57
61
|
declare const prepareComponentToken: GetDefaultToken<'Descriptions'>;
|
|
58
|
-
declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
|
|
62
|
+
declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>, tokenResult?: import("@antdv-next/cssinjs").UseTokenReturn<ComponentTokenMap, AliasToken, SeedToken> | undefined) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
|
|
59
63
|
//#endregion
|
|
60
64
|
export { ComponentToken, _default as default, prepareComponentToken };
|