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
package/dist/radio/group.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import { useFormItemContext, useFormItemInputContext } from "../form/context.js";
|
|
1
2
|
import { useOrientation } from "../_util/hooks/useOrientation.js";
|
|
2
3
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
4
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
4
|
-
import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
|
|
5
|
+
import { getAttrStyleAndClass, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
6
|
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
6
7
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
8
|
+
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
7
9
|
import { checkRenderNode } from "../_util/vueNode.js";
|
|
8
|
-
import { useFormItemContext, useFormItemInputContext } from "../form/context.js";
|
|
9
10
|
import { toNamePathStr } from "../form/hooks/useForm.js";
|
|
10
11
|
import { useRadioGroupContextProvider } from "./context.js";
|
|
11
12
|
import style_default from "./style/index.js";
|
|
12
13
|
import InternalRadio from "./radio.js";
|
|
13
|
-
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, ref, useId, watch } from "vue";
|
|
14
|
+
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps, ref, toRef, useId, watch } from "vue";
|
|
14
15
|
import { clsx } from "@v-c/util";
|
|
15
16
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
16
17
|
import pickAttrs from "@v-c/util/dist/pickAttrs";
|
|
@@ -40,7 +41,21 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
40
41
|
const rootCls = useCSSVarCls(prefixCls);
|
|
41
42
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
42
43
|
const mergedSize = useSize(customizeSize);
|
|
43
|
-
const [, mergedVertical] = useOrientation(orientation, vertical);
|
|
44
|
+
const [mergedOrientation, mergedVertical] = useOrientation(orientation, vertical);
|
|
45
|
+
const contextDisabled = useDisabledContext();
|
|
46
|
+
const mergedProps = computed(() => ({
|
|
47
|
+
...props,
|
|
48
|
+
value: value.value,
|
|
49
|
+
disabled: props.disabled ?? contextDisabled.value,
|
|
50
|
+
size: mergedSize.value,
|
|
51
|
+
buttonStyle: props.buttonStyle,
|
|
52
|
+
block: props.block,
|
|
53
|
+
name: name.value,
|
|
54
|
+
optionType: props.optionType ?? "default",
|
|
55
|
+
orientation: mergedOrientation.value,
|
|
56
|
+
vertical: mergedVertical.value
|
|
57
|
+
}));
|
|
58
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(toRef(() => props.classes)), useToArr(toRef(() => props.styles)), useToProps(mergedProps));
|
|
44
59
|
useRadioGroupContextProvider(computed(() => {
|
|
45
60
|
return {
|
|
46
61
|
onChange: onRadioChange,
|
|
@@ -48,7 +63,17 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
48
63
|
disabled: props?.disabled,
|
|
49
64
|
name: name.value,
|
|
50
65
|
optionType: props?.optionType,
|
|
51
|
-
block: props?.block
|
|
66
|
+
block: props?.block,
|
|
67
|
+
classes: {
|
|
68
|
+
root: mergedClassNames.value.item,
|
|
69
|
+
icon: mergedClassNames.value.itemIcon,
|
|
70
|
+
label: mergedClassNames.value.itemLabel
|
|
71
|
+
},
|
|
72
|
+
styles: {
|
|
73
|
+
root: mergedStyles.value.item,
|
|
74
|
+
icon: mergedStyles.value.itemIcon,
|
|
75
|
+
label: mergedStyles.value.itemLabel
|
|
76
|
+
}
|
|
52
77
|
};
|
|
53
78
|
}));
|
|
54
79
|
return () => {
|
|
@@ -60,7 +85,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
60
85
|
[`${groupPrefixCls.value}-small`]: mergedSize.value === "small",
|
|
61
86
|
[`${groupPrefixCls.value}-rtl`]: direction.value === "rtl",
|
|
62
87
|
[`${groupPrefixCls.value}-block`]: block
|
|
63
|
-
}, className, rootClass, hashId.value, cssVarCls.value, rootCls.value);
|
|
88
|
+
}, className, rootClass, mergedClassNames.value.root, hashId.value, cssVarCls.value, rootCls.value);
|
|
64
89
|
let childrenToRender = children;
|
|
65
90
|
const labelRender = slots?.labelRender ?? props?.labelRender;
|
|
66
91
|
if (options && options.length) childrenToRender = options.map((option, index) => {
|
|
@@ -102,7 +127,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
102
127
|
data: true
|
|
103
128
|
}), {
|
|
104
129
|
"class": clsx(classString, { [`${prefixCls.value}-group-vertical`]: mergedVertical.value }),
|
|
105
|
-
"style": style,
|
|
130
|
+
"style": [mergedStyles.value.root, style],
|
|
106
131
|
"onMouseenter": (e) => {
|
|
107
132
|
emit("mouseenter", e);
|
|
108
133
|
},
|
|
@@ -166,6 +191,14 @@ const RadioGroup = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
166
191
|
type: Function,
|
|
167
192
|
required: false
|
|
168
193
|
},
|
|
194
|
+
classes: {
|
|
195
|
+
type: [Object, Function],
|
|
196
|
+
required: false
|
|
197
|
+
},
|
|
198
|
+
styles: {
|
|
199
|
+
type: [Object, Function],
|
|
200
|
+
required: false
|
|
201
|
+
},
|
|
169
202
|
"onUpdate:value": {
|
|
170
203
|
type: Function,
|
|
171
204
|
required: false
|
package/dist/radio/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CheckboxEmits, CheckboxSlots } from "../checkbox/Checkbox.js";
|
|
2
2
|
import { CheckboxOptionType } from "../checkbox/Group.js";
|
|
3
3
|
import "../checkbox/index.js";
|
|
4
|
-
import { RadioChangeEvent, RadioEmits, RadioGroupEmits, RadioGroupOptionType, RadioGroupSlots, RadioSlots } from "./interface.js";
|
|
4
|
+
import { RadioChangeEvent, RadioEmits, RadioGroupClassNamesType, RadioGroupEmits, RadioGroupOptionType, RadioGroupSemanticClassNames, RadioGroupSemanticStyles, RadioGroupSlots, RadioGroupStylesType, RadioSlots } from "./interface.js";
|
|
5
5
|
import { InternalRadioButtonProps } from "./radioButton.js";
|
|
6
6
|
import "../index.js";
|
|
7
7
|
import { InternalRadioGroupProps } from "./group.js";
|
|
@@ -13,4 +13,4 @@ type RadioOptionType = CheckboxOptionType;
|
|
|
13
13
|
declare const RadioGroup: import("vue").DefineSetupFnComponent<InternalRadioGroupProps, RadioGroupEmits, import("vue").SlotsType<RadioGroupSlots>, InternalRadioGroupProps, import("vue").PublicProps>;
|
|
14
14
|
declare const RadioButton: import("vue").DefineSetupFnComponent<InternalRadioButtonProps, CheckboxEmits, import("vue").SlotsType<CheckboxSlots>, InternalRadioButtonProps, import("vue").PublicProps>;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { RadioButton, type RadioChangeEvent, type RadioEmits, RadioGroup, type RadioGroupEmits, type RadioGroupOptionType, RadioGroupProps, type RadioGroupSlots, RadioOptionType, RadioProps, type RadioSlots, InternalRadio as default };
|
|
16
|
+
export { RadioButton, type RadioChangeEvent, type RadioEmits, RadioGroup, type RadioGroupClassNamesType, type RadioGroupEmits, type RadioGroupOptionType, RadioGroupProps, type RadioGroupSemanticClassNames, type RadioGroupSemanticStyles, type RadioGroupSlots, type RadioGroupStylesType, RadioOptionType, RadioProps, type RadioSlots, InternalRadio as default };
|
|
@@ -8,6 +8,20 @@ import { CSSProperties } from "vue";
|
|
|
8
8
|
//#region src/radio/interface.d.ts
|
|
9
9
|
type RadioGroupButtonStyle = 'outline' | 'solid';
|
|
10
10
|
type RadioGroupOptionType = 'default' | 'button';
|
|
11
|
+
interface RadioGroupSemanticClassNames {
|
|
12
|
+
root?: string;
|
|
13
|
+
item?: string;
|
|
14
|
+
itemIcon?: string;
|
|
15
|
+
itemLabel?: string;
|
|
16
|
+
}
|
|
17
|
+
interface RadioGroupSemanticStyles {
|
|
18
|
+
root?: CSSProperties;
|
|
19
|
+
item?: CSSProperties;
|
|
20
|
+
itemIcon?: CSSProperties;
|
|
21
|
+
itemLabel?: CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
type RadioGroupClassNamesType = SemanticClassNamesType<RadioGroupProps, RadioGroupSemanticClassNames>;
|
|
24
|
+
type RadioGroupStylesType = SemanticStylesType<RadioGroupProps, RadioGroupSemanticStyles>;
|
|
11
25
|
interface RadioGroupProps extends AbstractCheckboxGroupProps {
|
|
12
26
|
defaultValue?: any;
|
|
13
27
|
value?: any;
|
|
@@ -24,6 +38,8 @@ interface RadioGroupProps extends AbstractCheckboxGroupProps {
|
|
|
24
38
|
item: CheckboxOptionType;
|
|
25
39
|
index: number;
|
|
26
40
|
}) => any;
|
|
41
|
+
classes?: RadioGroupClassNamesType;
|
|
42
|
+
styles?: RadioGroupStylesType;
|
|
27
43
|
'onUpdate:value'?: (value: any) => void;
|
|
28
44
|
}
|
|
29
45
|
interface RadioGroupEmits {
|
|
@@ -53,6 +69,8 @@ interface RadioGroupContextProps {
|
|
|
53
69
|
*/
|
|
54
70
|
optionType?: RadioGroupOptionType;
|
|
55
71
|
block?: boolean;
|
|
72
|
+
classes?: RadioSemanticClassNames;
|
|
73
|
+
styles?: RadioSemanticStyles;
|
|
56
74
|
}
|
|
57
75
|
type RadioSemanticName = keyof RadioSemanticClassNames & keyof RadioSemanticStyles;
|
|
58
76
|
interface RadioSemanticClassNames {
|
|
@@ -93,4 +111,4 @@ interface RadioChangeEvent {
|
|
|
93
111
|
}
|
|
94
112
|
type RadioOptionTypeContextProps = RadioGroupOptionType;
|
|
95
113
|
//#endregion
|
|
96
|
-
export { RadioChangeEvent, RadioChangeEventTarget, RadioClassNamesType, RadioEmits, RadioGroupButtonStyle, RadioGroupContextProps, RadioGroupEmits, RadioGroupOptionType, RadioGroupProps, RadioGroupSlots, RadioOptionTypeContextProps, RadioProps, RadioSemanticClassNames, RadioSemanticName, RadioSemanticStyles, RadioSlots, RadioStylesType };
|
|
114
|
+
export { RadioChangeEvent, RadioChangeEventTarget, RadioClassNamesType, RadioEmits, RadioGroupButtonStyle, RadioGroupClassNamesType, RadioGroupContextProps, RadioGroupEmits, RadioGroupOptionType, RadioGroupProps, RadioGroupSemanticClassNames, RadioGroupSemanticStyles, RadioGroupSlots, RadioGroupStylesType, RadioOptionTypeContextProps, RadioProps, RadioSemanticClassNames, RadioSemanticName, RadioSemanticStyles, RadioSlots, RadioStylesType };
|
package/dist/radio/radio.js
CHANGED
|
@@ -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 { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
5
|
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
@@ -7,11 +8,10 @@ import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
|
7
8
|
import { TARGET_CLS } from "../_util/wave/interface.js";
|
|
8
9
|
import wave_default from "../_util/wave/index.js";
|
|
9
10
|
import { checkRenderNode } from "../_util/vueNode.js";
|
|
10
|
-
import { useFormItemInputContext } from "../form/context.js";
|
|
11
11
|
import { useRadioGroupContext, useRadioOptionTypeContext } from "./context.js";
|
|
12
12
|
import useBubbleLock from "../checkbox/useBubbleLock.js";
|
|
13
13
|
import style_default from "./style/index.js";
|
|
14
|
-
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
14
|
+
import { computed, createVNode, defineComponent, mergeProps, shallowRef, toRef } from "vue";
|
|
15
15
|
import { clsx } from "@v-c/util";
|
|
16
16
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
17
17
|
import { omit } from "es-toolkit";
|
|
@@ -64,7 +64,9 @@ const InternalRadio = /* @__PURE__ */ defineComponent((props, { slots, expose, a
|
|
|
64
64
|
};
|
|
65
65
|
});
|
|
66
66
|
const contextStyleRoot = useSemanticRootStyle(contextStyle);
|
|
67
|
-
const
|
|
67
|
+
const groupClassNames = toRef(() => groupContext?.value?.classes);
|
|
68
|
+
const groupStyles = toRef(() => groupContext?.value?.styles);
|
|
69
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, groupClassNames, classes), useToArr(contextStyles, contextStyleRoot, groupStyles, styles), useToProps(mergedProps));
|
|
68
70
|
const [onLabelClick, onInputClick] = useBubbleLock((e) => {
|
|
69
71
|
emit("click", e);
|
|
70
72
|
});
|
|
@@ -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/radio/style/index.d.ts
|
|
4
8
|
interface ComponentToken {
|
|
@@ -78,6 +82,6 @@ interface ComponentToken {
|
|
|
78
82
|
radioBgColor: string;
|
|
79
83
|
}
|
|
80
84
|
declare const prepareComponentToken: GetDefaultToken<'Radio'>;
|
|
81
|
-
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>];
|
|
85
|
+
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>];
|
|
82
86
|
//#endregion
|
|
83
87
|
export { ComponentToken, _default as default, prepareComponentToken };
|
|
@@ -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
|
import { CSSObject } from "@antdv-next/cssinjs";
|
|
4
8
|
//#region src/rate/style/index.d.ts
|
|
@@ -35,6 +39,6 @@ interface ComponentToken {
|
|
|
35
39
|
starBg: string;
|
|
36
40
|
}
|
|
37
41
|
declare const prepareComponentToken: GetDefaultToken<'Rate'>;
|
|
38
|
-
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>];
|
|
42
|
+
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>];
|
|
39
43
|
//#endregion
|
|
40
44
|
export { ComponentToken, _default as default, prepareComponentToken };
|
package/dist/result/index.js
CHANGED
|
@@ -57,7 +57,7 @@ const Icon = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
57
57
|
const Extra = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
58
58
|
return () => {
|
|
59
59
|
const extra = getSlotPropsFnRun(slots, props, "extra");
|
|
60
|
-
if (!extra) return null;
|
|
60
|
+
if (!isRenderable(extra)) return null;
|
|
61
61
|
return createVNode("div", attrs, [extra]);
|
|
62
62
|
};
|
|
63
63
|
}, {
|
|
@@ -112,11 +112,11 @@ const Result = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose })
|
|
|
112
112
|
"icon": icon,
|
|
113
113
|
"style": mergedStyles.value.icon
|
|
114
114
|
}, null),
|
|
115
|
-
|
|
115
|
+
isRenderable(title) && createVNode("div", {
|
|
116
116
|
"class": titleClassNames,
|
|
117
117
|
"style": mergedStyles.value.title
|
|
118
118
|
}, [title]),
|
|
119
|
-
|
|
119
|
+
isRenderable(subTitle) && createVNode("div", {
|
|
120
120
|
"class": subTitleClassNames,
|
|
121
121
|
"style": mergedStyles.value.subTitle
|
|
122
122
|
}, [subTitle]),
|