antdv-next 1.5.3 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_util/PurePanel.js +2 -1
- package/dist/_util/hooks/useMergeSemantic.js +3 -2
- package/dist/_util/hooks/useMergedMask.js +1 -1
- package/dist/_util/styleUtils.d.ts +19 -1
- package/dist/_util/styleUtils.js +24 -1
- package/dist/_util/vnode/index.js +5 -5
- package/dist/_util/vueNode.d.ts +6 -2
- package/dist/_util/warning.d.ts +0 -1
- package/dist/affix/index.js +7 -18
- package/dist/alert/Alert.js +18 -19
- package/dist/anchor/Anchor.d.ts +1 -1
- package/dist/anchor/Anchor.js +16 -7
- package/dist/anchor/AnchorLink.d.ts +4 -3
- package/dist/anchor/AnchorLink.js +3 -2
- package/dist/antd-with-locales.esm.js +20087 -18146
- package/dist/antd-with-locales.js +83 -83
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +17212 -15798
- package/dist/antd.js +95 -95
- package/dist/app/App.js +1 -1
- package/dist/app/index.js +0 -3
- package/dist/auto-complete/index.d.ts +3 -3
- package/dist/auto-complete/index.js +15 -4
- package/dist/avatar/Avatar.d.ts +4 -1
- package/dist/avatar/Avatar.js +21 -13
- package/dist/avatar/AvatarGroup.js +2 -2
- package/dist/avatar/index.d.ts +2 -2
- package/dist/badge/Ribbon.js +3 -4
- package/dist/badge/index.js +11 -9
- package/dist/breadcrumb/Breadcrumb.js +10 -6
- package/dist/breadcrumb/BreadcrumbItem.js +5 -4
- package/dist/breadcrumb/useItemRender.js +5 -8
- package/dist/button/Button.js +2 -0
- package/dist/card/Card.d.ts +5 -1
- package/dist/card/Card.js +11 -9
- package/dist/carousel/index.d.ts +1 -1
- package/dist/carousel/index.js +7 -8
- package/dist/cascader/Panel.d.ts +1 -0
- package/dist/cascader/Panel.js +2 -1
- package/dist/cascader/index.d.ts +11 -10
- package/dist/cascader/index.js +17 -6
- package/dist/checkbox/Checkbox.js +14 -28
- package/dist/collapse/Collapse.d.ts +0 -3
- package/dist/collapse/Collapse.js +2 -2
- package/dist/color-picker/ColorPicker.js +9 -9
- package/dist/color-picker/components/ColorClear.d.ts +1 -0
- package/dist/color-picker/components/ColorClear.js +14 -4
- package/dist/color-picker/components/ColorPresets.js +4 -4
- package/dist/color-picker/components/ColorSlider.js +8 -2
- package/dist/color-picker/components/ColorTrigger.js +3 -2
- package/dist/color-picker/interface.d.ts +0 -2
- package/dist/color-picker/style/index.js +5 -6
- package/dist/components.d.ts +2 -2
- package/dist/config-provider/SizeContext.d.ts +1 -1
- package/dist/config-provider/SizeContext.js +1 -1
- package/dist/config-provider/context.d.ts +2 -5
- package/dist/config-provider/hooks/useTheme.js +2 -1
- package/dist/config-provider/index.d.ts +2 -2
- package/dist/date-picker/generatePicker/generateRangePicker.d.ts +4 -3
- package/dist/date-picker/generatePicker/generateRangePicker.js +18 -3
- package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +1 -0
- package/dist/date-picker/generatePicker/generateSinglePicker.js +17 -2
- package/dist/date-picker/generatePicker/index.d.ts +1 -1
- package/dist/date-picker/generatePicker/interface.d.ts +0 -2
- package/dist/date-picker/generatePicker/useComponents.d.ts +1 -1
- package/dist/date-picker/index.d.ts +3 -2
- package/dist/date-picker/locale/ar_EG.js +8 -0
- package/dist/date-picker/locale/bg_BG.js +8 -0
- package/dist/date-picker/locale/bn_BD.js +1 -0
- package/dist/date-picker/locale/ca_ES.js +8 -0
- package/dist/date-picker/locale/cs_CZ.js +8 -0
- package/dist/date-picker/locale/da_DK.js +8 -0
- package/dist/date-picker/locale/de_DE.js +11 -1
- package/dist/date-picker/locale/es_ES.js +8 -0
- package/dist/date-picker/locale/et_EE.js +8 -0
- package/dist/date-picker/locale/eu_ES.js +8 -0
- package/dist/date-picker/locale/fi_FI.js +8 -0
- package/dist/date-picker/locale/fr_BE.js +1 -0
- package/dist/date-picker/locale/fr_CA.js +1 -0
- package/dist/date-picker/locale/fr_FR.js +1 -0
- package/dist/date-picker/locale/ga_IE.js +1 -0
- package/dist/date-picker/locale/gl_ES.js +8 -0
- package/dist/date-picker/locale/he_IL.js +8 -0
- package/dist/date-picker/locale/hi_IN.js +1 -0
- package/dist/date-picker/locale/hr_HR.js +1 -0
- package/dist/date-picker/locale/hu_HU.js +8 -0
- package/dist/date-picker/locale/is_IS.js +8 -0
- package/dist/date-picker/locale/it_IT.js +8 -0
- package/dist/date-picker/locale/ka_GE.js +1 -0
- package/dist/date-picker/locale/kk_KZ.js +1 -0
- package/dist/date-picker/locale/km_KH.js +1 -0
- package/dist/date-picker/locale/kmr_IQ.js +8 -0
- package/dist/date-picker/locale/lv_LV.js +8 -0
- package/dist/date-picker/locale/mk_MK.js +8 -0
- package/dist/date-picker/locale/ml_IN.js +1 -0
- package/dist/date-picker/locale/mn_MN.js +8 -0
- package/dist/date-picker/locale/ms_MY.js +8 -0
- package/dist/date-picker/locale/nb_NO.js +1 -0
- package/dist/date-picker/locale/nl_BE.js +1 -0
- package/dist/date-picker/locale/nl_NL.js +1 -0
- package/dist/date-picker/locale/pl_PL.js +8 -0
- package/dist/date-picker/locale/pt_BR.js +8 -0
- package/dist/date-picker/locale/pt_PT.js +8 -0
- package/dist/date-picker/locale/ro_RO.js +8 -0
- package/dist/date-picker/locale/ru_RU.js +1 -0
- package/dist/date-picker/locale/sk_SK.js +8 -0
- package/dist/date-picker/locale/sl_SI.js +8 -0
- package/dist/date-picker/locale/sr_RS.js +1 -0
- package/dist/date-picker/locale/sv_SE.js +1 -0
- package/dist/date-picker/locale/ta_IN.js +1 -0
- package/dist/date-picker/locale/th_TH.js +1 -0
- package/dist/date-picker/locale/tr_TR.js +1 -0
- package/dist/date-picker/locale/uk_UA.js +1 -0
- package/dist/date-picker/locale/ur_PK.js +1 -0
- package/dist/date-picker/locale/uz_UZ.js +1 -0
- package/dist/date-picker/locale/zh_TW.js +1 -1
- package/dist/date-picker/util.d.ts +4 -4
- package/dist/descriptions/Row.js +7 -5
- package/dist/descriptions/hooks/useItems.d.ts +4 -4
- package/dist/descriptions/index.js +6 -3
- package/dist/divider/index.d.ts +0 -1
- package/dist/drawer/DrawerPanel.js +11 -5
- package/dist/drawer/index.d.ts +0 -3
- package/dist/drawer/index.js +17 -4
- package/dist/dropdown/dropdown.d.ts +3 -6
- package/dist/dropdown/dropdown.js +8 -4
- package/dist/dropdown/index.js +0 -3
- package/dist/empty/index.js +2 -1
- package/dist/float-button/BackTop.d.ts +4 -2
- package/dist/float-button/BackTop.js +12 -4
- package/dist/float-button/FloatButton.d.ts +2 -2
- package/dist/float-button/FloatButton.js +11 -4
- package/dist/float-button/FloatButtonGroup.d.ts +2 -2
- package/dist/float-button/FloatButtonGroup.js +10 -3
- package/dist/float-button/PurePanel.js +20 -8
- package/dist/float-button/style/group.js +31 -5
- package/dist/form/FormItem/index.js +4 -3
- package/dist/form/FormItemInput.js +4 -2
- 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/style/index.js +4 -1
- package/dist/grid/col.js +1 -1
- package/dist/grid/row.js +1 -1
- package/dist/image/PreviewGroup.js +7 -5
- package/dist/image/hooks/usePreviewConfig.d.ts +5 -5
- package/dist/image/hooks/usePreviewConfig.js +1 -1
- package/dist/image/index.js +3 -4
- package/dist/index.d.ts +2 -2
- package/dist/input/Input.d.ts +0 -1
- package/dist/input/Input.js +16 -4
- package/dist/input/OTP/OTPInput.js +16 -4
- package/dist/input/Password.js +14 -5
- package/dist/input/Search.js +17 -8
- package/dist/input/TextArea.d.ts +0 -1
- package/dist/input/TextArea.js +17 -2
- package/dist/input/style/index.d.ts +2 -1
- package/dist/input/style/index.js +12 -11
- package/dist/input/style/variants.js +1 -4
- package/dist/input-number/index.d.ts +11 -1
- package/dist/input-number/index.js +48 -6
- package/dist/input-number/style/index.js +13 -16
- package/dist/listy/index.js +17 -8
- package/dist/listy/interface.d.ts +2 -2
- package/dist/locale/ar_EG.js +4 -0
- package/dist/locale/az_AZ.js +4 -0
- package/dist/locale/bg_BG.js +4 -0
- package/dist/locale/bn_BD.js +4 -0
- package/dist/locale/by_BY.js +4 -0
- package/dist/locale/ca_ES.js +4 -0
- package/dist/locale/cs_CZ.js +4 -0
- package/dist/locale/da_DK.js +4 -0
- package/dist/locale/de_DE.js +4 -0
- package/dist/locale/el_GR.js +4 -0
- package/dist/locale/en_GB.js +4 -0
- package/dist/locale/es_ES.js +4 -0
- package/dist/locale/et_EE.js +4 -0
- package/dist/locale/eu_ES.js +4 -0
- package/dist/locale/fa_IR.js +4 -0
- package/dist/locale/fi_FI.js +4 -0
- package/dist/locale/fr_BE.js +4 -0
- package/dist/locale/fr_CA.js +4 -0
- package/dist/locale/fr_FR.js +4 -0
- package/dist/locale/ga_IE.js +4 -0
- package/dist/locale/gl_ES.js +4 -0
- package/dist/locale/he_IL.js +4 -0
- package/dist/locale/hi_IN.js +4 -0
- package/dist/locale/hr_HR.js +4 -0
- package/dist/locale/hu_HU.js +4 -0
- package/dist/locale/hy_AM.js +20 -2
- package/dist/locale/id_ID.js +4 -0
- package/dist/locale/is_IS.js +4 -0
- package/dist/locale/it_IT.js +4 -0
- package/dist/locale/ja_JP.js +4 -0
- package/dist/locale/ka_GE.js +4 -0
- package/dist/locale/kk_KZ.js +4 -0
- package/dist/locale/km_KH.js +4 -0
- package/dist/locale/kmr_IQ.js +4 -0
- package/dist/locale/kn_IN.js +4 -0
- package/dist/locale/ko_KR.js +4 -0
- package/dist/locale/ku_IQ.js +4 -0
- package/dist/locale/lt_LT.js +4 -0
- package/dist/locale/lv_LV.js +4 -0
- package/dist/locale/mk_MK.js +4 -0
- package/dist/locale/ml_IN.js +4 -0
- package/dist/locale/mn_MN.js +4 -0
- package/dist/locale/mr_IN.js +4 -0
- package/dist/locale/ms_MY.js +4 -0
- package/dist/locale/my_MM.js +4 -0
- package/dist/locale/nb_NO.js +4 -0
- package/dist/locale/ne_NP.js +4 -0
- package/dist/locale/nl_BE.js +4 -0
- package/dist/locale/nl_NL.js +4 -0
- package/dist/locale/pl_PL.js +4 -0
- package/dist/locale/pt_BR.js +4 -0
- package/dist/locale/pt_PT.js +4 -0
- package/dist/locale/ro_RO.js +4 -0
- package/dist/locale/ru_RU.js +4 -0
- package/dist/locale/si_LK.js +4 -0
- package/dist/locale/sk_SK.js +4 -0
- package/dist/locale/sl_SI.js +4 -0
- package/dist/locale/sq_AL.js +4 -0
- package/dist/locale/sr_RS.js +4 -0
- package/dist/locale/sv_SE.js +4 -0
- package/dist/locale/ta_IN.js +4 -0
- package/dist/locale/th_TH.js +4 -0
- package/dist/locale/tk_TK.js +4 -0
- package/dist/locale/tr_TR.js +4 -0
- package/dist/locale/uk_UA.js +4 -0
- package/dist/locale/ur_PK.js +4 -0
- package/dist/locale/uz_UZ.js +4 -0
- package/dist/locale/vi_VN.js +4 -0
- package/dist/locale/zh_HK.js +4 -0
- package/dist/locale/zh_TW.js +5 -1
- package/dist/masonry/Masonry.js +9 -1
- package/dist/mentions/index.d.ts +1 -1
- package/dist/mentions/index.js +7 -3
- package/dist/menu/MenuContext.js +4 -1
- package/dist/menu/MenuItem.js +2 -2
- package/dist/menu/OverrideContext.js +4 -1
- package/dist/menu/style/theme.js +1 -0
- package/dist/message/PurePanel.js +2 -1
- package/dist/message/index.js +14 -9
- package/dist/message/interface.d.ts +8 -0
- package/dist/message/useMessage.d.ts +1 -1
- package/dist/message/useMessage.js +26 -32
- package/dist/modal/ConfirmDialog.js +1 -1
- package/dist/modal/Modal.js +3 -2
- package/dist/modal/PurePanel.js +2 -2
- package/dist/modal/components/NormalCancelBtn.js +6 -1
- package/dist/modal/interface.d.ts +1 -6
- package/dist/modal/shared.js +2 -1
- package/dist/notification/PurePanel.d.ts +1 -1
- package/dist/notification/PurePanel.js +12 -10
- package/dist/notification/index.js +4 -1
- package/dist/notification/interface.d.ts +4 -0
- package/dist/notification/useNotification.js +20 -22
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.js +3 -4
- package/dist/popconfirm/PurePanel.js +1 -1
- package/dist/popconfirm/index.js +10 -7
- package/dist/popover/PurePanel.js +8 -2
- package/dist/popover/index.js +10 -7
- package/dist/qrcode/QrcodeStatus.js +4 -1
- package/dist/qrcode/index.js +2 -1
- package/dist/radio/group.js +2 -2
- package/dist/radio/radio.js +4 -3
- package/dist/rate/index.d.ts +1 -1
- package/dist/rate/index.js +1 -5
- package/dist/result/index.js +4 -3
- package/dist/segmented/index.js +9 -6
- package/dist/segmented/style/index.js +5 -1
- package/dist/select/index.d.ts +5 -5
- package/dist/select/index.js +10 -6
- package/dist/skeleton/Element.js +2 -2
- package/dist/skeleton/Image.js +3 -1
- package/dist/slider/SliderTooltip.js +4 -1
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/index.js +9 -3
- package/dist/spin/index.js +2 -2
- package/dist/splitter/Panel.js +12 -3
- package/dist/splitter/SplitBar.js +12 -1
- package/dist/splitter/Splitter.js +2 -1
- package/dist/splitter/hooks/sizeUtil.js +17 -1
- package/dist/splitter/interface.d.ts +3 -1
- package/dist/splitter/style/index.js +6 -1
- package/dist/statistic/Number.js +2 -1
- package/dist/statistic/Statistic.js +5 -4
- package/dist/steps/ProgressIcon.js +7 -10
- package/dist/steps/index.js +3 -4
- package/dist/switch/index.d.ts +0 -2
- package/dist/table/Column.d.ts +5 -1
- package/dist/table/Column.js +10 -1
- package/dist/table/ColumnGroup.js +5 -0
- package/dist/table/InternalTable.d.ts +4 -1
- package/dist/table/InternalTable.js +28 -18
- package/dist/table/Table.js +16 -5
- package/dist/table/hooks/useFilter/FilterDropdown.js +14 -14
- package/dist/table/hooks/useFilter/index.d.ts +3 -1
- package/dist/table/hooks/useFilter/index.js +2 -2
- package/dist/table/hooks/useSelection.js +7 -3
- package/dist/table/interface.d.ts +11 -4
- package/dist/table/style/index.js +30 -2
- package/dist/table/style/virtual.js +2 -1
- package/dist/table/util.d.ts +1 -1
- package/dist/table/utils.js +20 -2
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.js +15 -7
- package/dist/tag/CheckableTag.d.ts +0 -3
- package/dist/tag/CheckableTag.js +5 -3
- package/dist/tag/CheckableTagGroup.js +19 -3
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/tag/index.js +4 -3
- package/dist/theme/context.d.ts +0 -1
- package/dist/theme/util/alias.js +3 -0
- package/dist/theme/util/genStyleUtils.d.ts +4 -0
- package/dist/time-picker/index.d.ts +8 -3
- package/dist/time-picker/index.js +72 -8
- package/dist/timeline/TimelineItem.js +4 -1
- package/dist/timeline/useItems.js +2 -1
- package/dist/tooltip/PurePanel.js +4 -1
- package/dist/tooltip/index.d.ts +5 -2
- package/dist/tooltip/index.js +8 -5
- package/dist/tooltip/style/index.d.ts +0 -1
- package/dist/tour/index.js +2 -3
- package/dist/tour/interface.d.ts +7 -5
- package/dist/tour/panelRender.js +6 -6
- package/dist/transfer/ListBody.js +1 -1
- package/dist/transfer/Section.js +3 -2
- package/dist/transfer/Transfer.js +37 -13
- package/dist/transfer/hooks/useSelection.js +1 -1
- package/dist/transfer/interface.d.ts +1 -1
- package/dist/tree/DirectoryTree.js +3 -1
- package/dist/tree/Tree.js +6 -6
- package/dist/tree/utils/dictUtil.js +2 -2
- package/dist/tree-select/index.d.ts +6 -7
- package/dist/tree-select/index.js +20 -8
- package/dist/typography/Base/Ellipsis.js +2 -1
- package/dist/typography/Base/index.js +6 -3
- package/dist/typography/Editable.js +2 -1
- package/dist/upload/Dragger.js +2 -4
- package/dist/upload/Upload.d.ts +0 -1
- package/dist/upload/Upload.js +2 -2
- package/dist/upload/UploadList/ListItem.d.ts +1 -0
- package/dist/upload/UploadList/ListItem.js +15 -9
- package/dist/upload/UploadList/index.js +1 -0
- package/dist/upload/interface.d.ts +6 -7
- package/dist/version/token.json +1 -1
- package/dist/watermark/useClips.js +1 -0
- package/package.json +37 -37
- package/web-tags.json +1258 -1224
- package/web-types.json +4483 -4517
package/dist/app/App.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { devUseWarning } from "../_util/warning.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
|
+
import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
|
|
3
4
|
import { AppConfigProvider, useAppConfig, useAppContextProvider } from "./context.js";
|
|
4
5
|
import useMessage from "../message/useMessage.js";
|
|
5
6
|
import useModal from "../modal/useModal/index.js";
|
|
@@ -7,7 +8,6 @@ import useNotification from "../notification/useNotification.js";
|
|
|
7
8
|
import style_default from "./style/index.js";
|
|
8
9
|
import { Fragment, computed, createVNode, defineComponent } from "vue";
|
|
9
10
|
import { clsx } from "@v-c/util";
|
|
10
|
-
import { getAttrStyleAndClass } from "@v-c/util/dist/props-util";
|
|
11
11
|
//#region src/app/App.tsx
|
|
12
12
|
const App = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
|
|
13
13
|
const { direction, prefixCls, class: contextClassName, style: contextStyle } = useComponentBaseConfig("app", props);
|
package/dist/app/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMe
|
|
|
3
3
|
import "../_util/hooks/index.js";
|
|
4
4
|
import { InputStatus } from "../_util/statusUtils.js";
|
|
5
5
|
import { InternalSelectProps, SearchConfig, SelectPopupSemanticClassNames, SelectPopupSemanticStyles, SelectSlots } from "../select/index.js";
|
|
6
|
-
import { App, CSSProperties, SlotsType } from "vue";
|
|
6
|
+
import { App, CSSProperties, SlotsType, VNode, VNodeChild } from "vue";
|
|
7
7
|
import { Option, SelectProps } from "@v-c/select";
|
|
8
8
|
//#region src/auto-complete/index.d.ts
|
|
9
9
|
interface AutoCompleteSemanticClassNames {
|
|
@@ -48,8 +48,8 @@ interface AutoCompleteProps extends Omit<InternalSelectProps, 'loading' | 'mode'
|
|
|
48
48
|
styles?: AutoCompleteStylesType;
|
|
49
49
|
classes?: AutoCompleteClassNamesType;
|
|
50
50
|
/** @deprecated Please use `popupRender` instead */
|
|
51
|
-
dropdownRender?: (menu:
|
|
52
|
-
popupRender?: (menu:
|
|
51
|
+
dropdownRender?: (menu: VNode) => VNodeChild;
|
|
52
|
+
popupRender?: (menu: VNode) => VNodeChild;
|
|
53
53
|
/** @deprecated Please use `styles.popup.root` instead */
|
|
54
54
|
dropdownStyle?: CSSProperties;
|
|
55
55
|
showSearch?: boolean | Pick<SearchConfig, 'filterOption' | 'onSearch'>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
|
-
import { getAttrStyleAndClass
|
|
3
|
+
import { getAttrStyleAndClass, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
5
|
import genPurePanel from "../_util/PurePanel.js";
|
|
6
6
|
import Select from "../select/index.js";
|
|
7
|
-
import { Text, computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeProps } from "vue";
|
|
7
|
+
import { Text, computed, createVNode, defineComponent, getCurrentInstance, isVNode, mergeProps, shallowRef } from "vue";
|
|
8
8
|
import { clsx } from "@v-c/util";
|
|
9
9
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
10
10
|
import { omit } from "es-toolkit";
|
|
@@ -30,10 +30,16 @@ const omitKeys = [
|
|
|
30
30
|
"onOpenChange",
|
|
31
31
|
"onDropdownVisibleChange"
|
|
32
32
|
];
|
|
33
|
-
const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
|
|
33
|
+
const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expose }) => {
|
|
34
34
|
const { prefixCls } = useComponentBaseConfig("select", props);
|
|
35
35
|
const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
|
|
36
36
|
const instance = getCurrentInstance();
|
|
37
|
+
const selectRef = shallowRef();
|
|
38
|
+
expose({
|
|
39
|
+
focus: () => selectRef.value?.focus(),
|
|
40
|
+
blur: () => selectRef.value?.blur(),
|
|
41
|
+
scrollTo: (arg) => selectRef.value?.scrollTo(arg)
|
|
42
|
+
});
|
|
37
43
|
const mergedOnOpenChange = (open) => {
|
|
38
44
|
if (instance?.vnode.props?.onOpenChange) emit("openChange", open);
|
|
39
45
|
else emit("dropdownVisibleChange", open);
|
|
@@ -47,7 +53,7 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
47
53
|
});
|
|
48
54
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(classes), useToArr(styles), useToProps(mergedProps), computed(() => ({ popup: { _default: "root" } })));
|
|
49
55
|
return () => {
|
|
50
|
-
const { className, style, restAttrs } = getAttrStyleAndClass
|
|
56
|
+
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
51
57
|
const forwardedAttrs = omit(restAttrs, ["onOpenChange", "onDropdownVisibleChange"]);
|
|
52
58
|
const childNodes = toArray(filterEmpty(slots.default?.() ?? []));
|
|
53
59
|
const hasSelectOptions = !!childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0]);
|
|
@@ -173,6 +179,7 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
173
179
|
emit("search", value);
|
|
174
180
|
}
|
|
175
181
|
}, getInputElement ? { getInputElement } : {}, {
|
|
182
|
+
"ref": selectRef,
|
|
176
183
|
"prefixCls": prefixCls.value,
|
|
177
184
|
"classes": finalClassNames,
|
|
178
185
|
"styles": finalStyles,
|
|
@@ -384,6 +391,10 @@ const InternalAutoComplete = /* @__PURE__ */ defineComponent((props, { slots, em
|
|
|
384
391
|
required: false,
|
|
385
392
|
default: void 0
|
|
386
393
|
},
|
|
394
|
+
autoComplete: {
|
|
395
|
+
type: String,
|
|
396
|
+
required: false
|
|
397
|
+
},
|
|
387
398
|
placeholder: {
|
|
388
399
|
type: [
|
|
389
400
|
Object,
|
package/dist/avatar/Avatar.d.ts
CHANGED
|
@@ -34,6 +34,9 @@ interface AvatarSlots {
|
|
|
34
34
|
src: () => any;
|
|
35
35
|
default: () => any;
|
|
36
36
|
}
|
|
37
|
+
interface AvatarRef {
|
|
38
|
+
nativeElement: HTMLSpanElement;
|
|
39
|
+
}
|
|
37
40
|
declare const Avatar: import("vue").DefineSetupFnComponent<AvatarProps, AvatarEmits, SlotsType<AvatarSlots>, AvatarProps, import("vue").PublicProps>;
|
|
38
41
|
//#endregion
|
|
39
|
-
export { AvatarEmits, AvatarEmitsProps, AvatarProps, AvatarSlots, Avatar as default };
|
|
42
|
+
export { AvatarEmits, AvatarEmitsProps, AvatarProps, AvatarRef, AvatarSlots, Avatar as default };
|
package/dist/avatar/Avatar.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
2
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
3
|
-
import {
|
|
3
|
+
import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
4
|
+
import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
|
|
4
5
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
5
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
7
|
+
import { isRenderable } from "../_util/is.js";
|
|
6
8
|
import { responsiveArray } from "../_util/responsiveObserver.js";
|
|
7
9
|
import useBreakpoint from "../grid/hooks/useBreakpoint.js";
|
|
8
10
|
import { useAvatarContext } from "./AvatarContext.js";
|
|
@@ -12,12 +14,13 @@ import { clsx } from "@v-c/util";
|
|
|
12
14
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
13
15
|
import ResizeObserver from "@v-c/resize-observer";
|
|
14
16
|
//#region src/avatar/Avatar.tsx
|
|
15
|
-
const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
17
|
+
const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expose }) => {
|
|
16
18
|
const scale = shallowRef(1);
|
|
17
19
|
const mounted = shallowRef(false);
|
|
18
20
|
const isImgExist = shallowRef(true);
|
|
19
21
|
const avatarNodeRef = shallowRef();
|
|
20
22
|
const avatarChildrenRef = shallowRef();
|
|
23
|
+
expose({ nativeElement: avatarNodeRef });
|
|
21
24
|
const { class: contextClassName, style: contextStyle, prefixCls } = useComponentBaseConfig("avatar", props);
|
|
22
25
|
const avatarCtx = useAvatarContext();
|
|
23
26
|
const setScaleParam = () => {
|
|
@@ -32,6 +35,10 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
32
35
|
onMounted(() => {
|
|
33
36
|
mounted.value = true;
|
|
34
37
|
});
|
|
38
|
+
watch(() => [props.src, props.srcSet], () => {
|
|
39
|
+
isImgExist.value = true;
|
|
40
|
+
scale.value = 1;
|
|
41
|
+
}, { immediate: true });
|
|
35
42
|
watch(() => props.gap, async () => {
|
|
36
43
|
await nextTick();
|
|
37
44
|
setScaleParam();
|
|
@@ -39,6 +46,9 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
39
46
|
const handleImgLoadError = () => {
|
|
40
47
|
if (props.onError?.() !== false) isImgExist.value = false;
|
|
41
48
|
};
|
|
49
|
+
const handleClick = (e) => {
|
|
50
|
+
emit("click", e);
|
|
51
|
+
};
|
|
42
52
|
const size = useSize((ctxSize) => props?.size ?? avatarCtx.value?.size ?? ctxSize ?? "medium");
|
|
43
53
|
const screens = useBreakpoint(computed(() => {
|
|
44
54
|
return Object.keys(typeof size.value === "object" ? size.value || {} : {}).some((key) => responsiveArray.includes(key));
|
|
@@ -48,6 +58,7 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
48
58
|
return () => {
|
|
49
59
|
const children = filterEmpty(slots?.default?.() ?? []);
|
|
50
60
|
const icon = getSlotPropsFnRun(slots, props, "icon");
|
|
61
|
+
const hasIcon = isRenderable(icon);
|
|
51
62
|
const { shape, rootClass, draggable, srcSet, crossOrigin, alt } = props;
|
|
52
63
|
const responsiveSizeStyleFn = () => {
|
|
53
64
|
if (typeof size.value !== "object") return {};
|
|
@@ -56,7 +67,7 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
56
67
|
return currentSize ? {
|
|
57
68
|
width: `${currentSize}px`,
|
|
58
69
|
height: `${currentSize}px`,
|
|
59
|
-
fontSize: currentSize && (
|
|
70
|
+
fontSize: currentSize && (hasIcon || children.length) ? `${currentSize / 2}px` : "18px"
|
|
60
71
|
} : {};
|
|
61
72
|
};
|
|
62
73
|
const responsiveSizeStyle = responsiveSizeStyleFn();
|
|
@@ -65,21 +76,17 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
65
76
|
[`${prefixCls.value}-sm`]: size.value === "small"
|
|
66
77
|
});
|
|
67
78
|
const src = getSlotPropsFnRun(slots, props, "src");
|
|
68
|
-
if (src) {
|
|
69
|
-
isImgExist.value = true;
|
|
70
|
-
scale.value = 1;
|
|
71
|
-
}
|
|
72
79
|
const hasImageElement = isVNode(src);
|
|
73
80
|
const mergedShape = shape || avatarCtx?.value?.shape || "circle";
|
|
74
|
-
const { className, style, restAttrs } = getAttrStyleAndClass
|
|
81
|
+
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
75
82
|
const classString = clsx(prefixCls.value, sizeCls, contextClassName.value, `${prefixCls.value}-${mergedShape}`, {
|
|
76
83
|
[`${prefixCls.value}-image`]: hasImageElement || src && isImgExist.value,
|
|
77
|
-
[`${prefixCls.value}-icon`]:
|
|
84
|
+
[`${prefixCls.value}-icon`]: hasIcon
|
|
78
85
|
}, cssVarCls.value, rootCls.value, className, rootClass, hashId.value);
|
|
79
86
|
const sizeStyle = typeof size.value === "number" ? {
|
|
80
87
|
width: `${size.value}px`,
|
|
81
88
|
height: `${size.value}px`,
|
|
82
|
-
fontSize:
|
|
89
|
+
fontSize: hasIcon ? `${size.value / 2}px` : "18px"
|
|
83
90
|
} : {};
|
|
84
91
|
let childrenToRender;
|
|
85
92
|
if (typeof src === "string" && isImgExist.value) childrenToRender = createVNode("img", {
|
|
@@ -91,7 +98,7 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
91
98
|
"crossorigin": crossOrigin
|
|
92
99
|
}, null);
|
|
93
100
|
else if (hasImageElement) childrenToRender = src;
|
|
94
|
-
else if (
|
|
101
|
+
else if (hasIcon) childrenToRender = icon;
|
|
95
102
|
else if (mounted.value || scale.value !== 1) {
|
|
96
103
|
const transformString = `scale(${scale.value})`;
|
|
97
104
|
const childrenStyle = {
|
|
@@ -113,10 +120,11 @@ const Avatar = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
113
120
|
"style": {
|
|
114
121
|
...sizeStyle,
|
|
115
122
|
...responsiveSizeStyle,
|
|
116
|
-
...contextStyle.value,
|
|
117
|
-
...style
|
|
123
|
+
...normalizeStyle$1(contextStyle.value) || {},
|
|
124
|
+
...normalizeStyle$1(style) || {}
|
|
118
125
|
},
|
|
119
126
|
"class": classString,
|
|
127
|
+
"onClick": handleClick,
|
|
120
128
|
"ref": avatarNodeRef
|
|
121
129
|
}), [childrenToRender]);
|
|
122
130
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
|
-
import { getAttrStyleAndClass
|
|
2
|
+
import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
4
4
|
import { useAvatarProvider } from "./AvatarContext.js";
|
|
5
5
|
import style_default from "./style/index.js";
|
|
@@ -25,7 +25,7 @@ const AvatarGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, expo
|
|
|
25
25
|
return () => {
|
|
26
26
|
const { rootClass, max } = props;
|
|
27
27
|
const children = filterEmpty(slots?.default?.() ?? []);
|
|
28
|
-
const { className, style, restAttrs } = getAttrStyleAndClass
|
|
28
|
+
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
29
29
|
const cls = clsx(groupPrefixCls.value, { [`${groupPrefixCls.value}-rtl`]: direction.value === "rtl" }, cssVarCls.value, rootCls.value, className, rootClass, hashId.value);
|
|
30
30
|
const childrenWithProps = children.map((child, index) => {
|
|
31
31
|
if (isVNode(child)) return createVNode(child, { key: `avatar-key-${index}` });
|
package/dist/avatar/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Avatar$1, { AvatarEmits, AvatarProps, AvatarSlots } from "./Avatar.js";
|
|
1
|
+
import Avatar$1, { AvatarEmits, AvatarProps, AvatarRef, AvatarSlots } from "./Avatar.js";
|
|
2
2
|
import AvatarGroup, { AvatarGroupProps, AvatarGroupRef } from "./AvatarGroup.js";
|
|
3
3
|
//#region src/avatar/index.d.ts
|
|
4
4
|
type CompoundedComponent = typeof Avatar$1 & {
|
|
@@ -6,4 +6,4 @@ type CompoundedComponent = typeof Avatar$1 & {
|
|
|
6
6
|
};
|
|
7
7
|
declare const Avatar: CompoundedComponent;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { type AvatarEmits, AvatarGroup, type AvatarGroupProps, type AvatarGroupRef, type AvatarProps, type AvatarSlots, Avatar as default };
|
|
9
|
+
export { type AvatarEmits, AvatarGroup, type AvatarGroupProps, type AvatarGroupRef, type AvatarProps, type AvatarRef, type AvatarSlots, Avatar as default };
|
package/dist/badge/Ribbon.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
|
-
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
|
-
import { getSlotPropsFnRun, toPropsRefs
|
|
2
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
|
+
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
4
4
|
import { isPresetColor } from "../_util/colors.js";
|
|
5
5
|
import ribbon_default from "./style/ribbon.js";
|
|
6
6
|
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
|
|
7
7
|
import { clsx } from "@v-c/util";
|
|
8
|
-
import { getAttrStyleAndClass } from "@v-c/util/dist/props-util";
|
|
9
8
|
var Ribbon_default = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
|
|
10
|
-
const { styles, classes: ribbonClassNames } = toPropsRefs
|
|
9
|
+
const { styles, classes: ribbonClassNames } = toPropsRefs(props, "classes", "styles");
|
|
11
10
|
const { prefixCls, class: contextClassName, style: contextStyle, direction, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("ribbon", props);
|
|
12
11
|
const wrapperCls = computed(() => `${prefixCls.value}-wrapper`);
|
|
13
12
|
const [hashId, cssVarCls] = ribbon_default(prefixCls, wrapperCls);
|
package/dist/badge/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
|
+
import { formatUnit } from "../_util/styleUtils.js";
|
|
3
4
|
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
5
|
import { clsx as clsx$1, getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
6
|
import { isPresetColor } from "../_util/colors.js";
|
|
6
|
-
import {
|
|
7
|
+
import { isRenderable } from "../_util/is.js";
|
|
7
8
|
import style_default from "./style/index.js";
|
|
8
9
|
import Ribbon_default from "./Ribbon.js";
|
|
9
10
|
import ScrollNumber_default from "./ScrollNumber.js";
|
|
@@ -47,8 +48,7 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
|
|
|
47
48
|
const showAsDot = computed(() => props.dot && !isZero.value);
|
|
48
49
|
const mergedCount = computed(() => showAsDot.value ? "" : numberedDisplayCount.value);
|
|
49
50
|
const isHidden = computed(() => {
|
|
50
|
-
|
|
51
|
-
return ((mergedCount.value === null || mergedCount.value === void 0 || mergedCount.value === "") && countNodes.value.length === 0 || isZero.value && !props.showZero) && !showAsDot.value && textEmpty;
|
|
51
|
+
return (!isRenderable(mergedCount.value) && countNodes.value.length === 0 && !isRenderable(props.text) && textNodes.value.length === 0 || isZero.value && !props.showZero) && !showAsDot.value;
|
|
52
52
|
});
|
|
53
53
|
const displayCountRef = shallowRef(mergedCount.value);
|
|
54
54
|
const countCacheRef = shallowRef(props.count ?? null);
|
|
@@ -64,15 +64,14 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
|
|
|
64
64
|
});
|
|
65
65
|
const childrenNodes = computed(() => filterEmpty(slots.default?.() ?? []));
|
|
66
66
|
const hasTextSlot = computed(() => textNodes.value.length > 0);
|
|
67
|
-
const showStatusTextNode = computed(() => !isHidden.value && (hasTextSlot.value
|
|
68
|
-
const isStatusBadge = computed(() => Boolean(!childrenNodes.value.length && hasStatus.value && (
|
|
67
|
+
const showStatusTextNode = computed(() => !isHidden.value && (hasTextSlot.value || (props.text === 0 ? props.showZero : !!props.text && props.text !== true)));
|
|
68
|
+
const isStatusBadge = computed(() => Boolean(!childrenNodes.value.length && hasStatus.value && (hasTextSlot.value || !!props.text || hasStatusValue.value || !ignoreCount.value)));
|
|
69
69
|
const offsetStyle = computed(() => {
|
|
70
70
|
if (!props.offset) return;
|
|
71
|
-
const horizontalOffset = Number.
|
|
72
|
-
const insetInlineEnd = direction.value === "rtl" ? horizontalOffset : -horizontalOffset;
|
|
71
|
+
const horizontalOffset = Number.parseFloat(props.offset[0]);
|
|
73
72
|
return {
|
|
74
73
|
marginTop: formatUnit(props.offset[1]),
|
|
75
|
-
insetInlineEnd: formatUnit(
|
|
74
|
+
insetInlineEnd: formatUnit(-horizontalOffset)
|
|
76
75
|
};
|
|
77
76
|
});
|
|
78
77
|
const mergedStyle = computed(() => ({
|
|
@@ -197,7 +196,10 @@ const InternalBadge = /* @__PURE__ */ defineComponent((props, { slots, attrs, ex
|
|
|
197
196
|
type: String,
|
|
198
197
|
required: false
|
|
199
198
|
},
|
|
200
|
-
color: {
|
|
199
|
+
color: {
|
|
200
|
+
type: [String, Object],
|
|
201
|
+
required: false
|
|
202
|
+
},
|
|
201
203
|
text: {
|
|
202
204
|
type: [
|
|
203
205
|
Function,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
|
-
import { getAttrStyleAndClass
|
|
2
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
4
4
|
import { useBreadcrumbProvider } from "./BreadcrumbContext.js";
|
|
5
5
|
import BreadcrumbSeparator from "./BreadcrumbSeparator.js";
|
|
@@ -80,19 +80,20 @@ const Breadcrumb = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit,
|
|
|
80
80
|
const itemProps = {};
|
|
81
81
|
const isLastItem = index === mergedItems.value.length - 1;
|
|
82
82
|
if (menu) {
|
|
83
|
+
const mergedMenu = { ...menu };
|
|
83
84
|
const menuLabelRender = slots?.menuLabelRender ?? props.menuLabelRender;
|
|
84
|
-
if (menuLabelRender)
|
|
85
|
+
if (menuLabelRender) mergedMenu.labelRender = (menuItem) => menuLabelRender({
|
|
85
86
|
item,
|
|
86
87
|
index,
|
|
87
88
|
menu: menuItem
|
|
88
89
|
});
|
|
89
90
|
const menuExtraRender = slots?.menuExtraRender ?? props.menuExtraRender;
|
|
90
|
-
if (menuExtraRender)
|
|
91
|
+
if (menuExtraRender) mergedMenu.extraRender = (menuItem) => menuExtraRender({
|
|
91
92
|
item,
|
|
92
93
|
index,
|
|
93
94
|
menu: menuItem
|
|
94
95
|
});
|
|
95
|
-
itemProps.menu =
|
|
96
|
+
itemProps.menu = mergedMenu;
|
|
96
97
|
}
|
|
97
98
|
let { href } = item;
|
|
98
99
|
if (paths.length && mergedPath !== void 0) href = `#/${paths.join("/")}`;
|
|
@@ -123,7 +124,7 @@ const Breadcrumb = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit,
|
|
|
123
124
|
});
|
|
124
125
|
});
|
|
125
126
|
}
|
|
126
|
-
const { className, style, restAttrs } = getAttrStyleAndClass
|
|
127
|
+
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
127
128
|
const breadcrumbClassName = clsx(prefixCls.value, contextClassName.value, { [`${prefixCls}-rtl`]: direction.value === "rtl" }, className, rootClass, mergedClassNames.value?.root, hashId.value, cssVarCls.value);
|
|
128
129
|
const mergedStyle = {
|
|
129
130
|
...mergedStyles.value?.root,
|
|
@@ -141,7 +142,10 @@ const Breadcrumb = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit,
|
|
|
141
142
|
type: String,
|
|
142
143
|
required: false
|
|
143
144
|
},
|
|
144
|
-
params: {
|
|
145
|
+
params: {
|
|
146
|
+
type: Object,
|
|
147
|
+
required: false
|
|
148
|
+
},
|
|
145
149
|
separator: { required: false },
|
|
146
150
|
rootClass: {
|
|
147
151
|
type: String,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useBaseConfig } from "../config-provider/context.js";
|
|
2
2
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
3
|
+
import { isRenderable } from "../_util/is.js";
|
|
3
4
|
import isNonNullable from "../_util/isNonNullable.js";
|
|
4
5
|
import { checkRenderNode } from "../_util/vueNode.js";
|
|
5
|
-
import { isRenderable } from "../_util/is.js";
|
|
6
6
|
import { useBreadcrumbContext } from "./BreadcrumbContext.js";
|
|
7
7
|
import Dropdown from "../dropdown/index.js";
|
|
8
8
|
import BreadcrumbSeparator from "./BreadcrumbSeparator.js";
|
|
@@ -27,7 +27,7 @@ const InternalBreadcrumbItem = /* @__PURE__ */ defineComponent((props, { slots }
|
|
|
27
27
|
mergeDropDownProps.menu = {
|
|
28
28
|
...menuProps,
|
|
29
29
|
items: items?.map(({ key, title, label, path, ...itemProps }, index) => {
|
|
30
|
-
let mergedLabel = getSlotPropsFnRun({ label:
|
|
30
|
+
let mergedLabel = getSlotPropsFnRun({}, { label: isNonNullable(label) ? label : title }, "label");
|
|
31
31
|
if (path) {
|
|
32
32
|
(function() {
|
|
33
33
|
return mergedLabel;
|
|
@@ -47,13 +47,14 @@ const InternalBreadcrumbItem = /* @__PURE__ */ defineComponent((props, { slots }
|
|
|
47
47
|
return breadcrumbItem;
|
|
48
48
|
};
|
|
49
49
|
return () => {
|
|
50
|
-
const { separator = "/", prefixCls } = props;
|
|
50
|
+
const { separator = "/", prefixCls, onClick } = props;
|
|
51
51
|
const children = checkRenderNode(filterEmpty(slots?.default?.() ?? []));
|
|
52
52
|
const { classes: mergedClassNames, styles: mergedStyles } = breadcrumbContext.value;
|
|
53
53
|
const link = renderBreadcrumbNode(children);
|
|
54
54
|
if (isNonNullable(link)) return createVNode(Fragment, null, [createVNode("li", {
|
|
55
55
|
"class": clsx(`${prefixCls}-item`, mergedClassNames?.item),
|
|
56
|
-
"style": mergedStyles?.item
|
|
56
|
+
"style": mergedStyles?.item,
|
|
57
|
+
"onClick": onClick
|
|
57
58
|
}, [link]), isRenderable(separator) && createVNode(BreadcrumbSeparator, null, _isSlot(separator) ? separator : { default: () => [separator] })]);
|
|
58
59
|
return null;
|
|
59
60
|
};
|
|
@@ -17,14 +17,11 @@ function getBreadcrumbName(route, params, titleRender, index) {
|
|
|
17
17
|
}
|
|
18
18
|
function renderItem(prefixCls, item, children, href) {
|
|
19
19
|
if (children === null || children === void 0) return null;
|
|
20
|
-
const { class: className,
|
|
21
|
-
const passedProps = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
onClick
|
|
27
|
-
};
|
|
20
|
+
const { class: className, ...restItem } = item;
|
|
21
|
+
const passedProps = { ...pickAttrs(restItem, {
|
|
22
|
+
data: true,
|
|
23
|
+
aria: true
|
|
24
|
+
}) };
|
|
28
25
|
if (href !== void 0) return createVNode("a", mergeProps(passedProps, {
|
|
29
26
|
"class": clsx(`${prefixCls}-link`, className),
|
|
30
27
|
"href": href
|
package/dist/button/Button.js
CHANGED
|
@@ -65,7 +65,9 @@ const InternalCompoundedButton = /* @__PURE__ */ defineComponent((props, { slots
|
|
|
65
65
|
if (danger) return ["danger", colorVariantPair[1]];
|
|
66
66
|
return colorVariantPair;
|
|
67
67
|
}
|
|
68
|
+
if (variant === "solid") return ["primary", variant];
|
|
68
69
|
if (contextColor?.value && contextVariant?.value) return [contextColor.value, contextVariant.value];
|
|
70
|
+
if (contextVariant?.value === "solid") return ["primary", contextVariant.value];
|
|
69
71
|
return ["default", "outlined"];
|
|
70
72
|
});
|
|
71
73
|
const mergedColorVariant = computed(() => {
|
package/dist/card/Card.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { VueNode } from "../_util/type.js";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import "../_util/hooks/index.js";
|
|
4
|
+
import { SizeType } from "../config-provider/SizeContext.js";
|
|
4
5
|
import { Tab, TabsSlots } from "../tabs/index.js";
|
|
5
6
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
6
7
|
import { CSSProperties, SlotsType } from "vue";
|
|
7
8
|
//#region src/card/Card.d.ts
|
|
8
9
|
type CardType = 'inner';
|
|
9
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Note: `default` is deprecated and will be removed in later versions, please use `medium` instead.
|
|
12
|
+
*/
|
|
13
|
+
type CardSize = Exclude<SizeType, 'large'> | 'default';
|
|
10
14
|
interface CardTabListType extends Omit<Tab, 'label'> {
|
|
11
15
|
key: string;
|
|
12
16
|
/** @deprecated Please use `label` instead */
|
package/dist/card/Card.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
4
|
-
import { getAttrStyleAndClass
|
|
4
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
5
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
6
|
-
import skeleton_default from "../skeleton/index.js";
|
|
7
6
|
import { isRenderable } from "../_util/is.js";
|
|
7
|
+
import skeleton_default from "../skeleton/index.js";
|
|
8
8
|
import useVariant from "../form/hooks/useVariant.js";
|
|
9
9
|
import Tabs from "../tabs/index.js";
|
|
10
10
|
import style_default from "./style/index.js";
|
|
@@ -12,6 +12,9 @@ import { computed, createVNode, defineComponent, isVNode, mergeProps } from "vue
|
|
|
12
12
|
import { clsx } from "@v-c/util";
|
|
13
13
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
14
14
|
//#region src/card/Card.tsx
|
|
15
|
+
/**
|
|
16
|
+
* Note: `default` is deprecated and will be removed in later versions, please use `medium` instead.
|
|
17
|
+
*/
|
|
15
18
|
function _isSlot(s) {
|
|
16
19
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
17
20
|
}
|
|
@@ -52,7 +55,7 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
52
55
|
return {
|
|
53
56
|
...props,
|
|
54
57
|
size: mergedSize.value,
|
|
55
|
-
variant:
|
|
58
|
+
variant: variant.value
|
|
56
59
|
};
|
|
57
60
|
});
|
|
58
61
|
const contextStyleRoot = useSemanticRootStyle(contextStyle);
|
|
@@ -74,8 +77,8 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
74
77
|
};
|
|
75
78
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
76
79
|
return () => {
|
|
77
|
-
const { activeTabKey, tabProps, defaultActiveTabKey,
|
|
78
|
-
const { style, className, restAttrs } = getAttrStyleAndClass
|
|
80
|
+
const { activeTabKey, tabProps, defaultActiveTabKey, tabList, headStyle, bodyStyle, loading, rootClass, hoverable, type } = props;
|
|
81
|
+
const { style, className, restAttrs } = getAttrStyleAndClass(attrs);
|
|
79
82
|
const children = filterEmpty(slots?.default?.() ?? []);
|
|
80
83
|
const title = getSlotPropsFnRun(slots, props, "title");
|
|
81
84
|
const extra = getSlotPropsFnRun(slots, props, "extra");
|
|
@@ -90,11 +93,10 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
90
93
|
"title": false
|
|
91
94
|
}, _isSlot(children) ? children : { default: () => [children] });
|
|
92
95
|
const hasActiveTabKey = activeTabKey !== void 0;
|
|
93
|
-
const tabBarExtraContentSlot = typeof tabBarExtraContent === "object" && tabBarExtraContent ? tabBarExtraContent : getSlotPropsFnRun(slots, props, "tabBarExtraContent");
|
|
94
96
|
const extraProps = {
|
|
95
97
|
...tabProps,
|
|
96
98
|
[hasActiveTabKey ? "activeKey" : "defaultActiveKey"]: hasActiveTabKey ? activeTabKey : defaultActiveTabKey,
|
|
97
|
-
tabBarExtraContent:
|
|
99
|
+
tabBarExtraContent: getSlotPropsFnRun(slots, props, "tabBarExtraContent")
|
|
98
100
|
};
|
|
99
101
|
let head;
|
|
100
102
|
const tabSize = mergedSize.value === "small" ? mergedSize.value : "large";
|
|
@@ -102,7 +104,7 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
102
104
|
contentRender: slots?.tabContentRender,
|
|
103
105
|
labelRender: slots?.tabLabelRender
|
|
104
106
|
};
|
|
105
|
-
const tabs = tabList ? createVNode(Tabs, mergeProps({ "size": tabSize }, extraProps, { "class": `${prefixCls.value}-head-
|
|
107
|
+
const tabs = tabList ? createVNode(Tabs, mergeProps({ "size": tabSize }, extraProps, { "class": `${prefixCls.value}-head-tabs` }, { "onUpdate:activeKey": (key) => {
|
|
106
108
|
onTabChange(key);
|
|
107
109
|
} }, { "items": tabList.map(({ tab, ...item }) => {
|
|
108
110
|
return {
|
|
@@ -227,7 +229,7 @@ const Card = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
227
229
|
required: false
|
|
228
230
|
},
|
|
229
231
|
size: {
|
|
230
|
-
type: String,
|
|
232
|
+
type: [String, null],
|
|
231
233
|
required: false
|
|
232
234
|
},
|
|
233
235
|
type: {
|
package/dist/carousel/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { SlickProps } from "@v-c/slick";
|
|
|
5
5
|
//#region src/carousel/index.d.ts
|
|
6
6
|
type CarouselEffect = 'scrollx' | 'fade';
|
|
7
7
|
type DotPlacement = 'top' | 'bottom' | 'start' | 'end';
|
|
8
|
-
interface CarouselProps extends Omit<SlickProps, 'prevArrow' | 'nextArrow' | 'dots' | 'className' | 'style' | 'dotsClass' | 'autoplay' | 'onInit' | 'onReInit' | 'onEdge' | 'onSwipe' | 'onLazyLoad' | 'onLazyLoadError'>, ComponentBaseProps, CarouselEmitsProps {
|
|
8
|
+
interface CarouselProps extends Omit<SlickProps, 'prevArrow' | 'nextArrow' | 'dots' | 'className' | 'style' | 'dotsClass' | 'autoplay' | 'verticalSwiping' | 'onInit' | 'onReInit' | 'onEdge' | 'onSwipe' | 'onLazyLoad' | 'onLazyLoadError'>, ComponentBaseProps, CarouselEmitsProps {
|
|
9
9
|
effect?: CarouselEffect;
|
|
10
10
|
id?: string;
|
|
11
11
|
slickGoTo?: number;
|
package/dist/carousel/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
|
-
import { getAttrStyleAndClass
|
|
3
|
+
import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
5
5
|
import localeValues from "../locale/en_US.js";
|
|
6
6
|
import useLocale from "../locale/useLocale.js";
|
|
@@ -30,6 +30,7 @@ const omitKeys = [
|
|
|
30
30
|
"autoplaySpeed",
|
|
31
31
|
"rtl"
|
|
32
32
|
];
|
|
33
|
+
const ignoredAttrKeys = ["verticalSwiping", "vertical-swiping"];
|
|
33
34
|
const dotsClass = "slick-dots";
|
|
34
35
|
const ArrowButton = /* @__PURE__ */ defineComponent((_, { slots, attrs }) => {
|
|
35
36
|
return () => {
|
|
@@ -113,7 +114,7 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
|
|
|
113
114
|
const otherProps = omit(props, omitKeys);
|
|
114
115
|
const enableDots = !!dots;
|
|
115
116
|
const dsClass = clsx(dotsClass, `${dotsClass}-${mergedDotPlacement.value}`, typeof dots === "boolean" ? false : dots?.class);
|
|
116
|
-
const { className: customClassName, style, restAttrs } = getAttrStyleAndClass
|
|
117
|
+
const { className: customClassName, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
117
118
|
const newProps = {
|
|
118
119
|
vertical: mergedVertical.value,
|
|
119
120
|
className: clsx(customClassName, contextClassName.value),
|
|
@@ -125,6 +126,9 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
|
|
|
125
126
|
...otherProps
|
|
126
127
|
};
|
|
127
128
|
if (newProps.effect === "fade") newProps.fade = true;
|
|
129
|
+
delete newProps.effect;
|
|
130
|
+
delete newProps.prefixCls;
|
|
131
|
+
delete newProps.slickGoTo;
|
|
128
132
|
const className = clsx(prefixCls.value, {
|
|
129
133
|
[`${prefixCls.value}-rtl`]: isRTL.value,
|
|
130
134
|
[`${prefixCls.value}-vertical`]: newProps.vertical
|
|
@@ -135,7 +139,7 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
|
|
|
135
139
|
if (count.value !== childNodes.length) count.value = childNodes.length;
|
|
136
140
|
const prevArrow = getSlotPropsFnRun(slots, props, "prevArrow");
|
|
137
141
|
const nextArrow = getSlotPropsFnRun(slots, props, "nextArrow");
|
|
138
|
-
return createVNode("div", mergeProps({ "ref": nativeElementRef }, restAttrs, {
|
|
142
|
+
return createVNode("div", mergeProps({ "ref": nativeElementRef }, omit(restAttrs, ignoredAttrKeys), {
|
|
139
143
|
"class": className,
|
|
140
144
|
"id": id,
|
|
141
145
|
"style": dotDurationStyle
|
|
@@ -393,11 +397,6 @@ const Carousel = /* @__PURE__ */ defineComponent((props, { slots, emit, expose,
|
|
|
393
397
|
required: false,
|
|
394
398
|
default: void 0
|
|
395
399
|
},
|
|
396
|
-
verticalSwiping: {
|
|
397
|
-
type: Boolean,
|
|
398
|
-
required: false,
|
|
399
|
-
default: void 0
|
|
400
|
-
},
|
|
401
400
|
asNavFor: {
|
|
402
401
|
type: [Object, null],
|
|
403
402
|
required: false
|
package/dist/cascader/Panel.d.ts
CHANGED
package/dist/cascader/Panel.js
CHANGED
|
@@ -31,11 +31,12 @@ const CascaderPanel = /* @__PURE__ */ defineComponent((props, { attrs, emit, slo
|
|
|
31
31
|
const { rootClass, multiple, optionRender, expandIcon, prefixCls: _prefixCls, direction: _direction, loadingIcon, ...rest } = props;
|
|
32
32
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
33
33
|
const customExpandIcon = getSlotPropsFnRun(slots, props, "expandIcon", false) ?? expandIcon;
|
|
34
|
+
const customLoadingIcon = getSlotPropsFnRun(slots, props, "loadingIcon", false) ?? loadingIcon;
|
|
34
35
|
const { expandIcon: mergedExpandIcon, loadingIcon: mergedLoadingIcon } = useIcons({
|
|
35
36
|
contextExpandIcon: contextExpandIcon.value,
|
|
36
37
|
contextLoadingIcon: contextLoadingIcon.value,
|
|
37
38
|
expandIcon: customExpandIcon,
|
|
38
|
-
loadingIcon,
|
|
39
|
+
loadingIcon: customLoadingIcon,
|
|
39
40
|
isRtl: isRtl.value
|
|
40
41
|
});
|
|
41
42
|
const checkable = useCheckable(cascaderPrefixCls.value, multiple);
|