vue-devui 1.3.3 → 1.3.4-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/checkbox/index.es.js +6 -5
  2. package/checkbox/index.umd.js +7 -7
  3. package/notification/index.es.js +2 -2
  4. package/notification/index.umd.js +1 -1
  5. package/package.json +1 -1
  6. package/pagination/index.es.js +8 -7
  7. package/pagination/index.umd.js +4 -4
  8. package/radio/index.es.js +6 -5
  9. package/radio/index.umd.js +4 -4
  10. package/select/index.es.js +8 -7
  11. package/select/index.umd.js +12 -12
  12. package/style.css +1 -1
  13. package/switch/index.es.js +14 -10
  14. package/switch/index.umd.js +2 -2
  15. package/switch/style.css +1 -1
  16. package/table/index.es.js +6 -5
  17. package/table/index.umd.js +9 -9
  18. package/time-select/index.es.js +8 -7
  19. package/time-select/index.umd.js +11 -11
  20. package/tree/index.es.js +6 -5
  21. package/tree/index.umd.js +4 -4
  22. package/types/checkbox/src/checkbox-button.d.ts +0 -3
  23. package/types/checkbox/src/checkbox-group.d.ts +0 -3
  24. package/types/checkbox/src/checkbox-types.d.ts +1 -3
  25. package/types/checkbox/src/checkbox.d.ts +0 -3
  26. package/types/color-picker/src/components/color-picker-panel/color-picker-panel.d.ts +2 -2
  27. package/types/color-picker/src/utils/{composeable.d.ts → composable.d.ts} +0 -0
  28. package/types/radio/src/radio-button.d.ts +0 -3
  29. package/types/radio/src/radio-group.d.ts +0 -3
  30. package/types/radio/src/radio-types.d.ts +0 -2
  31. package/types/radio/src/radio.d.ts +0 -3
  32. package/types/select/src/select-types.d.ts +1 -1
  33. package/types/select/src/select.d.ts +2 -2
  34. package/types/shared/hooks/use-namespace.d.ts +0 -1
  35. package/types/switch/src/switch-types.d.ts +0 -1
  36. package/types/switch/src/switch.d.ts +0 -3
  37. package/upload/index.es.js +2 -2
  38. package/upload/index.umd.js +1 -1
  39. package/vue-devui.es.js +88 -81
  40. package/vue-devui.umd.js +12 -12
package/vue-devui.es.js CHANGED
@@ -35,7 +35,7 @@ var __publicField = (obj, key, value) => {
35
35
  };
36
36
  import { createVNode, getCurrentInstance, defineComponent, toRefs, inject, computed, Fragment, mergeProps, resolveComponent, isVNode, ref, reactive, createTextVNode, provide, onMounted, watch, Transition, withDirectives, vShow, nextTick, onUnmounted, unref, withModifiers, Comment as Comment$1, Text, h, cloneVNode, Teleport, onBeforeUnmount, render, resolveDirective, resolveDynamicComponent, toRef, shallowRef, onUpdated, onBeforeMount, readonly, toRaw, watchEffect, renderSlot, useSlots, createApp, shallowReactive, effect, TransitionGroup } from "vue";
37
37
  import { useRoute } from "vue-router";
38
- import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
38
+ import { offset, autoPlacement, arrow, shift, computePosition, flip } from "@floating-ui/dom";
39
39
  import { onClickOutside, useResizeObserver } from "@vueuse/core";
40
40
  const accordionProps = {
41
41
  data: {
@@ -5771,7 +5771,7 @@ var lodash = { exports: {} };
5771
5771
  var delay = baseRest(function(func, wait, args) {
5772
5772
  return baseDelay(func, toNumber(wait) || 0, args);
5773
5773
  });
5774
- function flip(func) {
5774
+ function flip2(func) {
5775
5775
  return createWrap(func, WRAP_FLIP_FLAG);
5776
5776
  }
5777
5777
  function memoize(func, resolver) {
@@ -6895,7 +6895,7 @@ var lodash = { exports: {} };
6895
6895
  lodash2.flatten = flatten;
6896
6896
  lodash2.flattenDeep = flattenDeep;
6897
6897
  lodash2.flattenDepth = flattenDepth;
6898
- lodash2.flip = flip;
6898
+ lodash2.flip = flip2;
6899
6899
  lodash2.flow = flow;
6900
6900
  lodash2.flowRight = flowRight;
6901
6901
  lodash2.fromPairs = fromPairs;
@@ -12089,8 +12089,7 @@ const commonProps$1 = {
12089
12089
  default: void 0
12090
12090
  },
12091
12091
  size: {
12092
- type: String,
12093
- default: "md"
12092
+ type: String
12094
12093
  }
12095
12094
  };
12096
12095
  const checkboxProps = __spreadProps(__spreadValues({}, commonProps$1), {
@@ -12219,7 +12218,7 @@ function useCheckbox(props, ctx2) {
12219
12218
  $event.stopPropagation();
12220
12219
  canChange(!isChecked.value, props.label).then((res) => res && toggle());
12221
12220
  };
12222
- const size = computed(() => (formContext == null ? void 0 : formContext.size) || (checkboxGroupConf == null ? void 0 : checkboxGroupConf.size.value) || props.size);
12221
+ const size = computed(() => props.size || (checkboxGroupConf == null ? void 0 : checkboxGroupConf.size.value) || (formContext == null ? void 0 : formContext.size) || "md");
12223
12222
  const border = computed(() => {
12224
12223
  var _a;
12225
12224
  return (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.border.value) != null ? _a : props.border;
@@ -12241,6 +12240,7 @@ function useCheckbox(props, ctx2) {
12241
12240
  };
12242
12241
  }
12243
12242
  function useCheckboxGroup(props, ctx2) {
12243
+ const formContext = inject(FORM_TOKEN, void 0);
12244
12244
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
12245
12245
  const valList = toRef(props, "modelValue");
12246
12246
  const defaultOpt = {
@@ -12284,6 +12284,7 @@ function useCheckboxGroup(props, ctx2) {
12284
12284
  watch(() => props.modelValue, () => {
12285
12285
  formItemContext == null ? void 0 : formItemContext.validate("change").catch((err) => console.warn(err));
12286
12286
  }, { deep: true });
12287
+ const checkboxGroupSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "");
12287
12288
  provide(checkboxGroupInjectionKey, {
12288
12289
  disabled: toRef(props, "disabled"),
12289
12290
  isShowTitle: toRef(props, "isShowTitle"),
@@ -12294,7 +12295,7 @@ function useCheckboxGroup(props, ctx2) {
12294
12295
  toggleGroupVal,
12295
12296
  itemWidth: toRef(props, "itemWidth"),
12296
12297
  direction: toRef(props, "direction"),
12297
- size: toRef(props, "size"),
12298
+ size: checkboxGroupSize,
12298
12299
  border: toRef(props, "border"),
12299
12300
  max: toRef(props, "max"),
12300
12301
  modelValue: toRef(props, "modelValue"),
@@ -12360,7 +12361,7 @@ var Checkbox = defineComponent({
12360
12361
  [ns2.m("no-animation")]: !mergedShowAnimation.value
12361
12362
  };
12362
12363
  const labelCls = {
12363
- [ns2.m(size.value)]: border.value,
12364
+ [ns2.m(size.value)]: size.value,
12364
12365
  [ns2.m("bordered")]: border.value
12365
12366
  };
12366
12367
  const stopPropagation = ($event) => $event.stopPropagation();
@@ -14479,7 +14480,7 @@ const colorPickerPaletteProps = {
14479
14480
  };
14480
14481
  var colorPalette$1 = "";
14481
14482
  var colorPalette = defineComponent({
14482
- name: "ColorPallete",
14483
+ name: "ColorPalette",
14483
14484
  props: colorPickerPaletteProps,
14484
14485
  emits: ["update:modelValue", "changeTextColor"],
14485
14486
  setup(props, ctx2) {
@@ -14487,7 +14488,7 @@ var colorPalette = defineComponent({
14487
14488
  transition: "all 0.3s ease"
14488
14489
  };
14489
14490
  const dotSizeInject = inject("provideData");
14490
- const clickTransfrom = ref(DEFAULT_TRANSITION);
14491
+ const clickTransform = ref(DEFAULT_TRANSITION);
14491
14492
  const paletteElement = ref(null);
14492
14493
  const canvasElement = ref(null);
14493
14494
  const handlerElement = ref(null);
@@ -14505,7 +14506,7 @@ var colorPalette = defineComponent({
14505
14506
  return __spreadValues({
14506
14507
  top: cursorTop.value + "px",
14507
14508
  left: cursorLeft.value + "px"
14508
- }, clickTransfrom.value);
14509
+ }, clickTransform.value);
14509
14510
  });
14510
14511
  function renderCanvas() {
14511
14512
  var _a;
@@ -14575,11 +14576,11 @@ var colorPalette = defineComponent({
14575
14576
  if (paletteInstance && paletteInstance.vnode.el && handlerElement.value) {
14576
14577
  DOMUtils.triggerDragEvent(paletteInstance.vnode.el, {
14577
14578
  drag: (event) => {
14578
- clickTransfrom.value = null;
14579
+ clickTransform.value = null;
14579
14580
  handleDrag(event);
14580
14581
  },
14581
14582
  end: (event) => {
14582
- clickTransfrom.value = DEFAULT_TRANSITION;
14583
+ clickTransform.value = DEFAULT_TRANSITION;
14583
14584
  handleDrag(event);
14584
14585
  }
14585
14586
  });
@@ -14636,7 +14637,7 @@ var colorHueSlider = defineComponent({
14636
14637
  };
14637
14638
  const barElement = ref(null);
14638
14639
  const cursorElement = ref(null);
14639
- const clickTransfrom = ref(DEFAULT_TRANSITION);
14640
+ const clickTransform = ref(DEFAULT_TRANSITION);
14640
14641
  const getCursorLeft = () => {
14641
14642
  var _a;
14642
14643
  if (barElement.value && cursorElement.value) {
@@ -14654,7 +14655,7 @@ var colorHueSlider = defineComponent({
14654
14655
  return __spreadValues({
14655
14656
  left: left + "px",
14656
14657
  top: 0
14657
- }, clickTransfrom.value);
14658
+ }, clickTransform.value);
14658
14659
  });
14659
14660
  const onMoveBar = (event) => {
14660
14661
  event.stopPropagation();
@@ -14682,11 +14683,11 @@ var colorHueSlider = defineComponent({
14682
14683
  onMounted(() => {
14683
14684
  const dragConfig = {
14684
14685
  drag: (event) => {
14685
- clickTransfrom.value = null;
14686
+ clickTransform.value = null;
14686
14687
  onMoveBar(event);
14687
14688
  },
14688
14689
  end: (event) => {
14689
- clickTransfrom.value = DEFAULT_TRANSITION;
14690
+ clickTransform.value = DEFAULT_TRANSITION;
14690
14691
  onMoveBar(event);
14691
14692
  }
14692
14693
  };
@@ -14741,7 +14742,7 @@ var colorAlphaSlider = defineComponent({
14741
14742
  const DEFAULT_TRANSITION = {
14742
14743
  transition: "all 0.3s ease"
14743
14744
  };
14744
- const clickTransfrom = ref(DEFAULT_TRANSITION);
14745
+ const clickTransform = ref(DEFAULT_TRANSITION);
14745
14746
  const barElement = ref(null);
14746
14747
  const cursorElement = ref(null);
14747
14748
  const onMoveBar = (event) => {
@@ -14783,16 +14784,16 @@ var colorAlphaSlider = defineComponent({
14783
14784
  return __spreadValues({
14784
14785
  left: left + "px",
14785
14786
  top: 0
14786
- }, clickTransfrom.value);
14787
+ }, clickTransform.value);
14787
14788
  });
14788
14789
  onMounted(() => {
14789
14790
  const dragConfig = {
14790
14791
  drag: (event) => {
14791
- clickTransfrom.value = null;
14792
+ clickTransform.value = null;
14792
14793
  onMoveBar(event);
14793
14794
  },
14794
14795
  end: (event) => {
14795
- clickTransfrom.value = DEFAULT_TRANSITION;
14796
+ clickTransform.value = DEFAULT_TRANSITION;
14796
14797
  onMoveBar(event);
14797
14798
  }
14798
14799
  };
@@ -14834,7 +14835,7 @@ const colorPickerEditProps = {
14834
14835
  }
14835
14836
  };
14836
14837
  var colorEdit$1 = "";
14837
- const DEFAUTL_MODE = "rgb";
14838
+ const DEFAULT_MODE = "rgb";
14838
14839
  const MODE_SUPPORT = ["rgb", "hex", "hsl", "hsv"];
14839
14840
  const colorRules = {
14840
14841
  alpha: [{
@@ -14952,12 +14953,12 @@ var colorEdit = defineComponent({
14952
14953
  const isShowAlpha = inject("provideData");
14953
14954
  const modelValue = computed(() => {
14954
14955
  var _a;
14955
- return `${(_a = props.mode) != null ? _a : DEFAUTL_MODE}${isShowAlpha.showAlpha ? "a" : ""}`;
14956
+ return `${(_a = props.mode) != null ? _a : DEFAULT_MODE}${isShowAlpha.showAlpha ? "a" : ""}`;
14956
14957
  });
14957
14958
  const colorValue = ref(props.color);
14958
14959
  const modelValueType = computed(() => {
14959
14960
  var _a;
14960
- return ((_a = props.mode) != null ? _a : DEFAUTL_MODE) === "hex" ? "string" : "number";
14961
+ return ((_a = props.mode) != null ? _a : DEFAULT_MODE) === "hex" ? "string" : "number";
14961
14962
  });
14962
14963
  function getValidColor(color2) {
14963
14964
  const validator = new Schema(colorRules);
@@ -15176,7 +15177,7 @@ const colorPickerHistoryProps = {
15176
15177
  };
15177
15178
  var colorHistory$1 = "";
15178
15179
  const STORAGE_KEY = "STORAGE_COLOR_PICKER_HISTORY_KEY";
15179
- const MAX_HISOTRY_COUNT = 8;
15180
+ const MAX_HISTORY_COUNT = 8;
15180
15181
  function useStore$1(v, {
15181
15182
  storage
15182
15183
  } = {}) {
@@ -15214,7 +15215,7 @@ var colorHistory = defineComponent({
15214
15215
  if (index2 >= 0) {
15215
15216
  history2.value.splice(index2, 1);
15216
15217
  }
15217
- history2.value = [alphaInject.showAlpha ? value.hexa : value.hex, ...history2.value].slice(0, MAX_HISOTRY_COUNT);
15218
+ history2.value = [alphaInject.showAlpha ? value.hexa : value.hex, ...history2.value].slice(0, MAX_HISTORY_COUNT);
15218
15219
  }, 100);
15219
15220
  watch(props.color, (value) => {
15220
15221
  updateHistory(value);
@@ -15245,7 +15246,7 @@ var colorPanel = defineComponent({
15245
15246
  colorHistory
15246
15247
  },
15247
15248
  props: colorPickerProps,
15248
- emits: ["update:modelValue", "changeTextColor", "changeTiggerColor", "changePaletteColor", "changeTextModeType"],
15249
+ emits: ["update:modelValue", "changeTextColor", "changeTriggerColor", "changePaletteColor", "changeTextModeType"],
15249
15250
  setup(props, {
15250
15251
  emit
15251
15252
  }) {
@@ -15326,7 +15327,7 @@ var ColorPicker = defineComponent({
15326
15327
  emit
15327
15328
  }) {
15328
15329
  var _a;
15329
- const DEFAUTL_MODE2 = "rgb";
15330
+ const DEFAULT_MODE2 = "rgb";
15330
15331
  const provideData = {
15331
15332
  showAlpha: useReactive(() => props.showAlpha),
15332
15333
  swatches: useReactive(() => props.swatches),
@@ -15342,7 +15343,7 @@ var ColorPicker = defineComponent({
15342
15343
  const top = ref(0);
15343
15344
  const isChangeTextColor = ref(true);
15344
15345
  const showColorPicker = ref(false);
15345
- const formItemText = ref(`${(_a = props.mode) != null ? _a : DEFAUTL_MODE2}`);
15346
+ const formItemText = ref(`${(_a = props.mode) != null ? _a : DEFAULT_MODE2}`);
15346
15347
  const mode = ref(unref(props.mode));
15347
15348
  function updateUserColor(color2) {
15348
15349
  initialColor.value = color2;
@@ -15359,15 +15360,7 @@ var ColorPicker = defineComponent({
15359
15360
  window.addEventListener("resize", resize2);
15360
15361
  window.addEventListener("click", isExhibition, true);
15361
15362
  });
15362
- const colorPickerPostion = computed(() => {
15363
- if (colorCubeRef.value) {
15364
- return {
15365
- transform: `translate(${left.value}px, ${top.value}px)`
15366
- };
15367
- }
15368
- return {};
15369
- });
15370
- const tiggerColor = computed(() => {
15363
+ const triggerColor = computed(() => {
15371
15364
  const currentColor = initialColor.value.rgba;
15372
15365
  const trigger = __spreadProps(__spreadValues({}, currentColor), {
15373
15366
  a: props.showAlpha ? currentColor.a : 1
@@ -15392,12 +15385,26 @@ var ColorPicker = defineComponent({
15392
15385
  mode.value = type4;
15393
15386
  formItemText.value = type4;
15394
15387
  }
15388
+ function handleWindowScroll() {
15389
+ computePosition(colorCubeRef.value, pickerRef.value, {
15390
+ middleware: [flip()]
15391
+ }).then(({
15392
+ y
15393
+ }) => {
15394
+ var _a2;
15395
+ Object.assign((_a2 = pickerRef.value) == null ? void 0 : _a2.style, {
15396
+ top: `${y}px`
15397
+ });
15398
+ });
15399
+ }
15400
+ const scroll = lodash.exports.throttle(handleWindowScroll, 200);
15395
15401
  watch(() => showColorPicker.value, (newValue) => {
15396
- var _a2;
15397
- const textPalette = (_a2 = colorCubeRef.value) == null ? void 0 : _a2.getBoundingClientRect();
15402
+ if (!newValue) {
15403
+ window.removeEventListener("scroll", scroll);
15404
+ }
15398
15405
  newValue && nextTick(() => {
15399
15406
  if (pickerRef.value) {
15400
- pickerRef.value.style.transform = `translate(${(textPalette == null ? void 0 : textPalette.left) + "px"}, ${((textPalette == null ? void 0 : textPalette.top) || 0) + window.scrollY + ((textPalette == null ? void 0 : textPalette.height) || 0) + "px"})`;
15407
+ window.addEventListener("scroll", scroll);
15401
15408
  }
15402
15409
  });
15403
15410
  });
@@ -15416,33 +15423,28 @@ var ColorPicker = defineComponent({
15416
15423
  "class": "devui-color-picker-container-wrap"
15417
15424
  }, [createVNode("div", {
15418
15425
  "class": "devui-color-picker-container-wrap-current-color",
15419
- "style": tiggerColor.value
15426
+ "style": triggerColor.value
15420
15427
  }, null), createVNode("div", {
15421
15428
  "class": ["devui-color-picker-container-wrap-transparent", "devui-color-picker-container-wrap-current-color-transparent"]
15422
15429
  }, null), createVNode("div", {
15423
15430
  "class": "devui-color-picker-color-value"
15424
15431
  }, [createVNode("p", {
15425
15432
  "style": textColor.value
15426
- }, [formItemValue.value])])])]), createVNode(Teleport, {
15427
- "to": "body"
15433
+ }, [formItemValue.value])])])]), createVNode(Transition, {
15434
+ "name": "color-picker-transition"
15428
15435
  }, {
15429
- default: () => [createVNode(Transition, {
15430
- "name": "color-picker-transition"
15431
- }, {
15432
- default: () => [showColorPicker.value ? createVNode("div", {
15433
- "ref": pickerRef,
15434
- "style": colorPickerPostion.value,
15435
- "class": ["devui-color-picker-position"]
15436
- }, [createVNode(resolveComponent("color-panel"), {
15437
- "modelValue": initialColor.value,
15438
- "onUpdate:modelValue": ($event) => initialColor.value = $event,
15439
- "ref": containerRef,
15440
- "mode": mode.value,
15441
- "onChangeTextColor": changeTextColor,
15442
- "onChangePaletteColor": changePaletteColor,
15443
- "onChangeTextModeType": changeTextModeType
15444
- }, null)]) : null]
15445
- })]
15436
+ default: () => [showColorPicker.value ? createVNode("div", {
15437
+ "ref": pickerRef,
15438
+ "class": ["devui-color-picker-position"]
15439
+ }, [createVNode(resolveComponent("color-panel"), {
15440
+ "modelValue": initialColor.value,
15441
+ "onUpdate:modelValue": ($event) => initialColor.value = $event,
15442
+ "ref": containerRef,
15443
+ "mode": mode.value,
15444
+ "onChangeTextColor": changeTextColor,
15445
+ "onChangePaletteColor": changePaletteColor,
15446
+ "onChangeTextModeType": changeTextModeType
15447
+ }, null)]) : null]
15446
15448
  })]);
15447
15449
  };
15448
15450
  }
@@ -25201,13 +25203,13 @@ function useEvent(props, emit) {
25201
25203
  emit("update:modelValue", false);
25202
25204
  };
25203
25205
  const interrupt = () => {
25204
- if (timer) {
25206
+ if (timer && props.duration) {
25205
25207
  clearTimeout(timer);
25206
25208
  timer = null;
25207
25209
  }
25208
25210
  };
25209
25211
  const removeReset = () => {
25210
- if (props.modelValue) {
25212
+ if (props.modelValue && props.duration) {
25211
25213
  const remainTime = props.duration - (Date.now() - timestamp);
25212
25214
  timer = setTimeout(close2, remainTime);
25213
25215
  }
@@ -25359,7 +25361,7 @@ function useSelect$2(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
25359
25361
  const ns2 = useNamespace("select");
25360
25362
  const dropdownRef = ref();
25361
25363
  const selectDisabled = computed(() => (formContext == null ? void 0 : formContext.disabled) || props.disabled);
25362
- const selectSize = computed(() => (formContext == null ? void 0 : formContext.size) || props.size);
25364
+ const selectSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
25363
25365
  const isObjectOption = ref(false);
25364
25366
  const originRef = ref();
25365
25367
  const isOpen = ref(false);
@@ -25675,7 +25677,7 @@ const selectProps = {
25675
25677
  },
25676
25678
  size: {
25677
25679
  type: String,
25678
- default: "md"
25680
+ default: ""
25679
25681
  },
25680
25682
  overview: {
25681
25683
  type: String,
@@ -27779,8 +27781,7 @@ const radioCommonProps = {
27779
27781
  default: false
27780
27782
  },
27781
27783
  size: {
27782
- type: String,
27783
- default: "md"
27784
+ type: String
27784
27785
  }
27785
27786
  };
27786
27787
  const radioProps = __spreadProps(__spreadValues({}, radioCommonProps), {
@@ -27862,7 +27863,7 @@ function useRadio(props, ctx2) {
27862
27863
  return (radioGroupConf == null ? void 0 : radioGroupConf.border.value) || props.border;
27863
27864
  });
27864
27865
  const size = computed(() => {
27865
- return (formContext == null ? void 0 : formContext.size) || (radioGroupConf == null ? void 0 : radioGroupConf.size.value) || props.size;
27866
+ return props.size || (radioGroupConf == null ? void 0 : radioGroupConf.size.value) || (formContext == null ? void 0 : formContext.size) || "md";
27866
27867
  });
27867
27868
  watch(() => props.modelValue, () => {
27868
27869
  formItemContext == null ? void 0 : formItemContext.validate("change").catch((err) => console.warn(err));
@@ -27877,6 +27878,7 @@ function useRadio(props, ctx2) {
27877
27878
  };
27878
27879
  }
27879
27880
  function useRadioGroup(props, ctx2) {
27881
+ const formContext = inject(FORM_TOKEN, void 0);
27880
27882
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
27881
27883
  const emitChange = (radioValue) => {
27882
27884
  ctx2.emit("update:modelValue", radioValue);
@@ -27885,12 +27887,13 @@ function useRadioGroup(props, ctx2) {
27885
27887
  watch(() => props.modelValue, () => {
27886
27888
  formItemContext == null ? void 0 : formItemContext.validate("change").catch((err) => console.warn(err));
27887
27889
  });
27890
+ const radioGroupSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "");
27888
27891
  provide(radioGroupInjectionKey, {
27889
27892
  modelValue: toRef(props, "modelValue"),
27890
27893
  name: toRef(props, "name"),
27891
27894
  disabled: toRef(props, "disabled"),
27892
27895
  border: toRef(props, "border"),
27893
- size: toRef(props, "size"),
27896
+ size: radioGroupSize,
27894
27897
  beforeChange: props.beforeChange,
27895
27898
  emitChange,
27896
27899
  fill: toRef(props, "fill"),
@@ -27937,7 +27940,7 @@ var Radio = defineComponent({
27937
27940
  disabled: isDisabled.value,
27938
27941
  [ns2.b()]: true,
27939
27942
  [ns2.m("bordered")]: border.value,
27940
- [ns2.m(size.value)]: border.value
27943
+ [ns2.m(size.value)]: size.value
27941
27944
  };
27942
27945
  return createVNode("div", {
27943
27946
  "class": radioCls
@@ -30962,8 +30965,7 @@ const switchProps = {
30962
30965
  default: false
30963
30966
  },
30964
30967
  size: {
30965
- type: String,
30966
- default: "md"
30968
+ type: String
30967
30969
  },
30968
30970
  color: {
30969
30971
  type: String,
@@ -30993,7 +30995,7 @@ const switchProps = {
30993
30995
  function useSwitch(props, ctx2) {
30994
30996
  const formContext = inject(FORM_TOKEN, void 0);
30995
30997
  const switchDisabled = computed(() => (formContext == null ? void 0 : formContext.disabled) || props.disabled);
30996
- const switchSize = computed(() => (formContext == null ? void 0 : formContext.size) || props.size);
30998
+ const switchSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
30997
30999
  const canChange = () => {
30998
31000
  if (switchDisabled.value) {
30999
31001
  return Promise.resolve(false);
@@ -31038,24 +31040,29 @@ var Switch = defineComponent({
31038
31040
  switchSize
31039
31041
  } = useSwitch(props, ctx2);
31040
31042
  return () => {
31041
- const outerCls = {
31043
+ const switchCls = {
31042
31044
  [ns2.b()]: true,
31043
- [ns2.m(switchSize.value)]: true,
31045
+ [ns2.m(switchSize.value)]: true
31046
+ };
31047
+ const switchWrapperCls = {
31048
+ [ns2.e("wrapper")]: true,
31044
31049
  [ns2.m("checked")]: checked.value,
31045
31050
  [ns2.m("disabled")]: switchDisabled.value
31046
31051
  };
31047
- const outerStyle = [`background: ${checked.value && !switchDisabled.value ? props.color : ""}`, `border-color: ${checked.value && !switchDisabled.value ? props.color : ""}`];
31052
+ const switchWrapperStyle = [`background: ${checked.value && !switchDisabled.value ? props.color : ""}`, `border-color: ${checked.value && !switchDisabled.value ? props.color : ""}`];
31048
31053
  const checkedContent = renderSlot(useSlots(), "checkedContent");
31049
31054
  const uncheckedContent = renderSlot(useSlots(), "uncheckedContent");
31050
- return createVNode("span", {
31051
- "class": outerCls,
31052
- "style": outerStyle,
31055
+ return createVNode("div", {
31056
+ "class": switchCls
31057
+ }, [createVNode("span", {
31058
+ "class": switchWrapperCls,
31059
+ "style": switchWrapperStyle,
31053
31060
  "onClick": toggle
31054
31061
  }, [createVNode("span", {
31055
31062
  "class": ns2.e("inner-wrapper")
31056
31063
  }, [createVNode("div", {
31057
31064
  "class": ns2.e("inner")
31058
- }, [checked.value ? checkedContent : uncheckedContent])]), createVNode("small", null, null)]);
31065
+ }, [checked.value ? checkedContent : uncheckedContent])]), createVNode("small", null, null)])]);
31059
31066
  };
31060
31067
  }
31061
31068
  });
@@ -38725,7 +38732,7 @@ const installs = [
38725
38732
  VirtualListInstall
38726
38733
  ];
38727
38734
  var vueDevui = {
38728
- version: "1.3.3",
38735
+ version: "1.3.4-alpha.1",
38729
38736
  install(app) {
38730
38737
  installs.forEach((p) => app.use(p));
38731
38738
  }