@wfrog/vc-ui 1.3.1 → 1.5.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/es/chunk/{CCmEeM7D.mjs → B3GxuXVE.mjs} +6 -6
- package/dist/es/chunk/BL8WhaLp.mjs +427 -0
- package/dist/es/chunk/{BiHWk71g.mjs → BPqrpkTb.mjs} +4 -4
- package/dist/es/chunk/{C_7t9blX.mjs → BZ1uhZQF.mjs} +1 -1
- package/dist/es/chunk/{-ga82G_B.mjs → BdVq9mV6.mjs} +1 -1
- package/dist/es/chunk/{DGGhWn1A.mjs → BfjuZmry.mjs} +6 -5
- package/dist/es/chunk/{BLLKi_0v.mjs → Bu3XHP55.mjs} +1 -1
- package/dist/es/chunk/{DEiqPcuO.mjs → BvNFaD5d.mjs} +3 -3
- package/dist/es/chunk/BxibBO68.mjs +5741 -0
- package/dist/es/chunk/{DO-mBaf5.mjs → By7FMB3I.mjs} +1 -43
- package/dist/es/chunk/{DATKTbFj.mjs → CGhekNBa.mjs} +5 -5
- package/dist/es/chunk/{plK2vnjp.mjs → CJ0afvkJ.mjs} +1 -1
- package/dist/es/chunk/{CtYp4FB7.mjs → CK5Bluh4.mjs} +2 -2
- package/dist/es/chunk/{Vv8g5_A1.mjs → CKZGL4_3.mjs} +9 -8
- package/dist/es/chunk/CNEMJL35.mjs +69 -0
- package/dist/es/chunk/{C9ldJ8Hh.mjs → CPCieLBG.mjs} +1 -1
- package/dist/es/chunk/{C50_dziC.mjs → CQz3lhyS.mjs} +2 -1
- package/dist/es/chunk/{Cekqdlxf.mjs → CbYM6R_O.mjs} +12 -77
- package/dist/es/chunk/{CQbpo0im.mjs → CboHfRXN.mjs} +5 -6
- package/dist/es/chunk/{BambM7zX.mjs → Cdh3HNZa.mjs} +2 -2
- package/dist/es/chunk/{aX4SRHmD.mjs → Cg-Krnly.mjs} +2 -1
- package/dist/es/chunk/{9qQNa4bM.mjs → Cjp0Czyu.mjs} +1 -1
- package/dist/es/chunk/Cmb_E8Ip.mjs +184 -0
- package/dist/es/chunk/{BIK5Djc_.mjs → Co77DVCw.mjs} +2 -2
- package/dist/es/chunk/CqTa_Vd-.mjs +375 -0
- package/dist/es/{components/dual-pane/dual-pane.mjs → chunk/CsjEhAYY.mjs} +11 -91
- package/dist/es/chunk/{BQyZW57B.mjs → CwXV7M2F.mjs} +3 -3
- package/dist/es/chunk/{b9dx0jdT.mjs → D1MHFKtN.mjs} +3 -3
- package/dist/es/chunk/{DskGUrkJ.mjs → D6m3vWpc.mjs} +2 -1
- package/dist/es/chunk/{4F1xxyju.mjs → D6nWUATi.mjs} +48 -2117
- package/dist/es/chunk/{C6bIuBQg.mjs → D7CQDxqy.mjs} +3 -3
- package/dist/es/chunk/{Dqk3gyUk.mjs → D9Lr0Bzb.mjs} +1 -374
- package/dist/es/chunk/{Xk5kfdyT.mjs → DAIuzoFs.mjs} +2 -1
- package/dist/es/chunk/{OVbHCQoq.mjs → DCS0eqqM.mjs} +3 -101
- package/dist/es/chunk/{BJTCqgn1.mjs → DDR6UjaC.mjs} +1 -1
- package/dist/es/chunk/{BKmk2ptO.mjs → DNsAO9iB.mjs} +2 -2
- package/dist/es/chunk/{-_x5oKYF.mjs → DQK0ezHm.mjs} +5 -4
- package/dist/es/chunk/{BQHHM_Gw.mjs → DQi1QPak.mjs} +30 -70
- package/dist/es/chunk/{BaqDgAvL.mjs → DSt2uDNE.mjs} +22 -434
- package/dist/es/chunk/DSw4GnC6.mjs +44 -0
- package/dist/es/chunk/DTbnchOm.mjs +94 -0
- package/dist/es/chunk/DViraU6I.mjs +45 -0
- package/dist/es/chunk/{C540ZOUa.mjs → DX84QR5M.mjs} +10 -9
- package/dist/es/chunk/DYKOYbzT.mjs +2003 -0
- package/dist/es/chunk/{D1PKXAql.mjs → D_F7nIja.mjs} +3 -4
- package/dist/es/chunk/{DcTh6n4x.mjs → D_Mvdscy.mjs} +5 -4
- package/dist/es/chunk/DhGOsWxx.mjs +6 -0
- package/dist/es/chunk/{DFxeI_lP.mjs → DhGcJR5p.mjs} +6 -6
- package/dist/es/chunk/DxxbB5jY.mjs +34 -0
- package/dist/es/chunk/EMeQxUfH.mjs +49 -0
- package/dist/es/chunk/{eN6VJ63C.mjs → F2ph6lWu.mjs} +9 -8
- package/dist/es/chunk/{Dn-BFXcJ.mjs → dN0VcQc2.mjs} +1 -1
- package/dist/es/chunk/{DTpr71Gd.mjs → e5i7OJY-.mjs} +4 -4
- package/dist/es/chunk/fueZ9sVu.mjs +890 -0
- package/dist/es/chunk/{CV2NA_2e.mjs → ipA7n6-J.mjs} +1 -1
- package/dist/es/chunk/{Dw-yyl2m.mjs → q2jRgbir.mjs} +2 -2
- package/dist/es/chunk/{C72pWnuz.mjs → w7VqVeWU.mjs} +5 -4
- package/dist/es/chunk/{DWcIzeMM.mjs → ytiKcA3H.mjs} +108 -10
- package/dist/es/chunk/{DFHjl3eL.mjs → yuIXvUxc.mjs} +1 -1
- package/dist/es/components/backbottom/backbottom.mjs +2 -2
- package/dist/es/components/button/button.d.ts +2 -1
- package/dist/es/components/button/button.mjs +68 -17
- package/dist/es/components/button/button.vue.d.ts +4 -1
- package/dist/es/components/choice/choice.mjs +3 -2
- package/dist/es/components/color-switcher/color-switcher.d.ts +15 -0
- package/dist/es/components/color-switcher/color-switcher.mjs +1215 -0
- package/dist/es/components/color-switcher/color-switcher.vue.d.ts +122 -0
- package/dist/es/components/color-switcher/index.css +5 -0
- package/dist/es/components/color-switcher/index.d.ts +4 -0
- package/dist/es/components/color-switcher/index.mjs +6 -0
- package/dist/es/components/cropper/cropper.mjs +12 -11
- package/dist/es/components/cropper/cropper.vue.d.ts +2 -2
- package/dist/es/components/currency/currency.mjs +7 -7
- package/dist/es/components/dark-switcher/dark-switcher.d.ts +10 -0
- package/dist/es/components/dark-switcher/dark-switcher.mjs +87 -0
- package/dist/es/components/dark-switcher/dark-switcher.vue.d.ts +12 -0
- package/dist/es/components/dark-switcher/index.css +11 -0
- package/dist/es/components/dark-switcher/index.d.ts +4 -0
- package/dist/es/components/dark-switcher/index.mjs +6 -0
- package/dist/es/components/daterange-picker/daterange-picker.mjs +21 -20
- package/dist/es/components/dialog/dialog.d.ts +1 -1
- package/dist/es/components/dialog/dialog.mjs +47 -62
- package/dist/es/components/dialog/dialog.vue.d.ts +2 -3
- package/dist/es/components/dialog/index.css +31 -32
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +12 -12
- package/dist/es/components/dialog-map-point/dialog-map-point.mjs +5 -5
- package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +14 -13
- package/dist/es/components/drag-verify/drag-verify.mjs +14 -14
- package/dist/es/components/drag-verify/drag-verify.vue.d.ts +1 -1
- package/dist/es/components/drag-verify/index.css +11 -11
- package/dist/es/components/drawer/drawer.mjs +14 -14
- package/dist/es/components/drawer/index.css +16 -15
- package/dist/es/components/easy-pagination/easy-pagination.mjs +4 -4
- package/dist/es/components/el-icon/el-icon.mjs +2 -2
- package/dist/es/components/explorer/docs/data.d.ts +13 -0
- package/dist/es/components/explorer/explorer.d.ts +12 -0
- package/dist/es/components/explorer/explorer.mjs +64 -0
- package/dist/es/components/explorer/explorer.vue.d.ts +183 -0
- package/dist/es/components/explorer/explorer2.mjs +6 -0
- package/dist/es/components/explorer/index.css +14 -0
- package/dist/es/components/explorer/index.d.ts +4 -0
- package/dist/es/components/explorer/index.mjs +6 -0
- package/dist/es/components/explorer-column-table/explorer-column-table.d.ts +23 -0
- package/dist/es/components/explorer-column-table/explorer-column-table.mjs +2948 -0
- package/dist/es/components/explorer-column-table/explorer-column-table.vue.d.ts +1486 -0
- package/dist/es/components/explorer-column-table/index.css +49 -0
- package/dist/es/components/explorer-column-table/index.d.ts +4 -0
- package/dist/es/components/explorer-column-table/index.mjs +6 -0
- package/dist/es/components/explorer-container/explorer-container.d.ts +5 -0
- package/dist/es/components/explorer-container/explorer-container.mjs +76 -0
- package/dist/es/components/explorer-container/explorer-container.vue.d.ts +23 -0
- package/dist/es/components/explorer-container/index.css +26 -0
- package/dist/es/components/explorer-container/index.d.ts +4 -0
- package/dist/es/components/explorer-container/index.mjs +6 -0
- package/dist/es/components/explorer-filter/explorer-filter.d.ts +12 -0
- package/dist/es/components/explorer-filter/explorer-filter.mjs +81 -0
- package/dist/es/components/explorer-filter/explorer-filter.vue.d.ts +14 -0
- package/dist/es/components/explorer-filter/index.css +7 -0
- package/dist/es/components/explorer-filter/index.d.ts +4 -0
- package/dist/es/components/explorer-filter/index.mjs +6 -0
- package/dist/es/components/explorer-footer/explorer-footer.d.ts +5 -0
- package/dist/es/components/explorer-footer/explorer-footer.mjs +92 -0
- package/dist/es/components/explorer-footer/explorer-footer.vue.d.ts +21 -0
- package/dist/es/components/explorer-footer/index.css +7 -0
- package/dist/es/components/explorer-footer/index.d.ts +4 -0
- package/dist/es/components/explorer-footer/index.mjs +6 -0
- package/dist/es/components/explorer-form/explorer-form.d.ts +19 -0
- package/dist/es/components/explorer-form/explorer-form.mjs +174 -0
- package/dist/es/components/explorer-form/explorer-form.vue.d.ts +33 -0
- package/dist/es/components/explorer-form/index.css +33 -0
- package/dist/es/components/explorer-form/index.d.ts +4 -0
- package/dist/es/components/explorer-form/index.mjs +6 -0
- package/dist/es/components/explorer-list/explorer-list.d.ts +23 -0
- package/dist/es/components/explorer-list/explorer-list.mjs +160 -0
- package/dist/es/components/explorer-list/explorer-list.vue.d.ts +38 -0
- package/dist/es/components/explorer-list/index.css +51 -0
- package/dist/es/components/explorer-list/index.d.ts +4 -0
- package/dist/es/components/explorer-list/index.mjs +6 -0
- package/dist/es/components/explorer-panel/explorer-panel.d.ts +14 -0
- package/dist/es/components/explorer-panel/explorer-panel.mjs +77 -0
- package/dist/es/components/explorer-panel/explorer-panel.vue.d.ts +253 -0
- package/dist/es/components/explorer-panel/explorer-panel2.mjs +6 -0
- package/dist/es/components/explorer-panel/index.css +12 -0
- package/dist/es/components/explorer-panel/index.d.ts +4 -0
- package/dist/es/components/explorer-panel/index.mjs +6 -0
- package/dist/es/components/explorer-query/explorer-query.d.ts +11 -0
- package/dist/es/components/explorer-query/explorer-query.mjs +2376 -0
- package/dist/es/components/explorer-query/explorer-query.vue.d.ts +396 -0
- package/dist/es/components/explorer-query/index.css +40 -0
- package/dist/es/components/explorer-query/index.d.ts +4 -0
- package/dist/es/components/explorer-query/index.mjs +6 -0
- package/dist/es/components/explorer-table/explorer-table.d.ts +11 -0
- package/dist/es/components/explorer-table/explorer-table.mjs +116 -0
- package/dist/es/components/explorer-table/explorer-table.vue.d.ts +25 -0
- package/dist/es/components/explorer-table/index.css +18 -0
- package/dist/es/components/explorer-table/index.d.ts +4 -0
- package/dist/es/components/explorer-table/index.mjs +6 -0
- package/dist/es/components/explorer-tools/components/column-setter.vue.d.ts +3028 -0
- package/dist/es/components/explorer-tools/explorer-tools.d.ts +35 -0
- package/dist/es/components/explorer-tools/explorer-tools.mjs +585 -0
- package/dist/es/components/explorer-tools/explorer-tools.vue.d.ts +43 -0
- package/dist/es/components/explorer-tools/index.css +60 -0
- package/dist/es/components/explorer-tools/index.d.ts +4 -0
- package/dist/es/components/explorer-tools/index.mjs +6 -0
- package/dist/es/components/explorer-tree/explorer-tree.d.ts +22 -0
- package/dist/es/components/explorer-tree/explorer-tree.mjs +177 -0
- package/dist/es/components/explorer-tree/explorer-tree.vue.d.ts +2055 -0
- package/dist/es/components/explorer-tree/index.css +58 -0
- package/dist/es/components/explorer-tree/index.d.ts +4 -0
- package/dist/es/components/explorer-tree/index.mjs +6 -0
- package/dist/es/components/icon/icon.mjs +4 -3
- package/dist/es/components/icon/icon2.mjs +2 -2
- package/dist/es/components/icon-picker/components/collections.vue.d.ts +245 -199
- package/dist/es/components/icon-picker/icon-picker.mjs +38 -921
- package/dist/es/components/icon-picker/index.css +31 -29
- package/dist/es/components/iconify-icon/iconify-icon.mjs +2 -2
- package/dist/es/components/image/image.mjs +5 -5
- package/dist/es/components/image/image.vue.d.ts +9 -9
- package/dist/es/components/input/index.css +4 -5
- package/dist/es/components/input/input.mjs +7 -7
- package/dist/es/components/input/input.vue.d.ts +6 -6
- package/dist/es/components/input-number/input-number.mjs +5 -5
- package/dist/es/components/pca-picker/components/c.vue.d.ts +3 -3
- package/dist/es/components/pca-picker/index.css +4 -4
- package/dist/es/components/pca-picker/pca-picker.mjs +21 -209
- package/dist/es/components/pca-picker/pca-picker.vue.d.ts +11 -11
- package/dist/es/components/screenfull/screenfull.mjs +4 -4
- package/dist/es/components/scrollbar/index.css +6 -5
- package/dist/es/components/scrollbar/scrollbar.d.ts +2 -0
- package/dist/es/components/scrollbar/scrollbar.mjs +17 -11
- package/dist/es/components/scrollbar/scrollbar.vue.d.ts +158 -136
- package/dist/es/components/select/select.mjs +7 -7
- package/dist/es/components/single-player/index.css +11 -11
- package/dist/es/components/single-player/single-player.mjs +20 -19
- package/dist/es/components/splitter/index.d.ts +4 -0
- package/dist/es/components/splitter/index.mjs +6 -0
- package/dist/es/components/splitter/splitter.d.ts +4 -0
- package/dist/es/components/splitter/splitter.mjs +28 -0
- package/dist/es/components/{dual-pane/dual-pane.vue.d.ts → splitter/splitter.vue.d.ts} +3 -5
- package/dist/es/components/splitter-panel/index.css +5 -0
- package/dist/es/components/splitter-panel/index.d.ts +4 -0
- package/dist/es/components/splitter-panel/index.mjs +6 -0
- package/dist/es/components/splitter-panel/splitter-panel.d.ts +3 -0
- package/dist/es/components/splitter-panel/splitter-panel.mjs +49 -0
- package/dist/es/components/splitter-panel/splitter-panel.vue.d.ts +20 -0
- package/dist/es/components/svg-icon/svg-icon.mjs +2 -2
- package/dist/es/components/switch/switch.mjs +2 -2
- package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
- package/dist/es/components/tags/tags.mjs +12 -11
- package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
- package/dist/es/components/text-ellipsis/text-ellipsis.vue.d.ts +1 -1
- package/dist/es/components/thousand-input/thousand-input.mjs +3 -3
- package/dist/es/components/thousand-input/thousand-input.vue.d.ts +14 -14
- package/dist/es/components/tinymce/index.css +1 -1
- package/dist/es/components/tinymce/tinymce.d.ts +1 -0
- package/dist/es/components/tinymce/tinymce.mjs +20 -11
- package/dist/es/components/tinymce/tinymce.vue.d.ts +3 -2
- package/dist/es/components/tree-picker/popover-cascader.css +1 -1
- package/dist/es/components/tree-picker/tree-picker.mjs +11 -10
- package/dist/es/components/tree-picker/tree-picker.vue.d.ts +11 -11
- package/dist/es/components/upload-file/upload-file.mjs +2 -2
- package/dist/es/index.d.ts +16 -1
- package/dist/es/index.mjs +73 -39
- package/dist/es/use/usePersistentModel/index.d.ts +4 -0
- package/dist/es/use/usePersistentModel/index.mjs +19 -0
- package/dist/global.d.ts +16 -1
- package/dist/index.css +520 -123
- package/package.json +4 -1
- package/dist/es/chunk/DVNTpOBR.mjs +0 -4
- package/dist/es/components/dual-pane/dual-pane.d.ts +0 -8
- package/dist/es/components/dual-pane/index.css +0 -8
- package/dist/es/components/dual-pane/index.d.ts +0 -4
- package/dist/es/components/dual-pane/index.mjs +0 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getCurrentInstance, inject, ref, computed, unref, provide } from 'vue';
|
|
2
|
-
import { u as useNamespace,
|
|
3
|
-
import { u as useZIndex, d as defaultInitialZIndex, z as zIndexContextKey } from './
|
|
4
|
-
import { u as useLocale, l as localeContextKey } from './
|
|
5
|
-
import { S as SIZE_INJECTION_KEY } from './
|
|
6
|
-
import { e as emptyValuesContextKey } from './
|
|
7
|
-
import { k as keysOf } from './
|
|
2
|
+
import { u as useNamespace, o as defaultNamespace, a as debugWarn, r as namespaceContextKey } from './By7FMB3I.mjs';
|
|
3
|
+
import { u as useZIndex, d as defaultInitialZIndex, z as zIndexContextKey } from './D6m3vWpc.mjs';
|
|
4
|
+
import { u as useLocale, l as localeContextKey } from './CJ0afvkJ.mjs';
|
|
5
|
+
import { S as SIZE_INJECTION_KEY } from './CPCieLBG.mjs';
|
|
6
|
+
import { e as emptyValuesContextKey } from './CK5Bluh4.mjs';
|
|
7
|
+
import { k as keysOf } from './EMeQxUfH.mjs';
|
|
8
8
|
|
|
9
9
|
const configProviderContextKey = Symbol();
|
|
10
10
|
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import { ref, inject, computed, defineComponent, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, withDirectives, withModifiers, isRef, vModelRadio, renderSlot, createTextVNode, toDisplayString, nextTick, normalizeStyle, onMounted, provide, reactive, toRefs, watch, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
|
+
import { b as buildProps, i as isString, u as useNamespace, d as definePropType, a as debugWarn } from './By7FMB3I.mjs';
|
|
3
|
+
import { u as useSizeProp } from './CPCieLBG.mjs';
|
|
4
|
+
import { C as CHANGE_EVENT, U as UPDATE_MODEL_EVENT } from './Ct6q2FXg.mjs';
|
|
5
|
+
import { b as isNumber, d as isBoolean, e as isPropAbsent } from './DViraU6I.mjs';
|
|
6
|
+
import { c as useFormSize, a as useFormDisabled, u as useFormItem, b as useFormItemInputId } from './BvNFaD5d.mjs';
|
|
7
|
+
import { u as useDeprecated } from './yuIXvUxc.mjs';
|
|
8
|
+
import { _ as _export_sfc, a as withNoopInstall, w as withInstall } from './dN0VcQc2.mjs';
|
|
9
|
+
import { u as useAriaProps } from './DCS0eqqM.mjs';
|
|
10
|
+
import { u as useId } from './Co77DVCw.mjs';
|
|
11
|
+
import { i as isEqual } from './q2jRgbir.mjs';
|
|
12
|
+
import { o as omit } from './e5i7OJY-.mjs';
|
|
13
|
+
|
|
14
|
+
const radioPropsBase = buildProps({
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: [String, Number, Boolean],
|
|
17
|
+
default: void 0
|
|
18
|
+
},
|
|
19
|
+
size: useSizeProp,
|
|
20
|
+
disabled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: void 0
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
type: [String, Number, Boolean],
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
value: {
|
|
29
|
+
type: [String, Number, Boolean],
|
|
30
|
+
default: void 0
|
|
31
|
+
},
|
|
32
|
+
name: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: void 0
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const radioProps = buildProps({
|
|
38
|
+
...radioPropsBase,
|
|
39
|
+
border: Boolean
|
|
40
|
+
});
|
|
41
|
+
const radioEmits = {
|
|
42
|
+
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
|
|
43
|
+
[CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const radioGroupKey = Symbol("radioGroupKey");
|
|
47
|
+
|
|
48
|
+
const useRadio = (props, emit) => {
|
|
49
|
+
const radioRef = ref();
|
|
50
|
+
const radioGroup = inject(radioGroupKey, void 0);
|
|
51
|
+
const isGroup = computed(() => !!radioGroup);
|
|
52
|
+
const actualValue = computed(() => {
|
|
53
|
+
if (!isPropAbsent(props.value)) {
|
|
54
|
+
return props.value;
|
|
55
|
+
}
|
|
56
|
+
return props.label;
|
|
57
|
+
});
|
|
58
|
+
const modelValue = computed({
|
|
59
|
+
get() {
|
|
60
|
+
return isGroup.value ? radioGroup.modelValue : props.modelValue;
|
|
61
|
+
},
|
|
62
|
+
set(val) {
|
|
63
|
+
if (isGroup.value) {
|
|
64
|
+
radioGroup.changeEvent(val);
|
|
65
|
+
} else {
|
|
66
|
+
emit && emit(UPDATE_MODEL_EVENT, val);
|
|
67
|
+
}
|
|
68
|
+
radioRef.value.checked = props.modelValue === actualValue.value;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
const size = useFormSize(computed(() => radioGroup == null ? void 0 : radioGroup.size));
|
|
72
|
+
const disabled = useFormDisabled(computed(() => radioGroup == null ? void 0 : radioGroup.disabled));
|
|
73
|
+
const focus = ref(false);
|
|
74
|
+
const tabIndex = computed(() => {
|
|
75
|
+
return disabled.value || isGroup.value && modelValue.value !== actualValue.value ? -1 : 0;
|
|
76
|
+
});
|
|
77
|
+
useDeprecated(
|
|
78
|
+
{
|
|
79
|
+
from: "label act as value",
|
|
80
|
+
replacement: "value",
|
|
81
|
+
version: "3.0.0",
|
|
82
|
+
scope: "el-radio",
|
|
83
|
+
ref: "https://element-plus.org/en-US/component/radio.html"
|
|
84
|
+
},
|
|
85
|
+
computed(() => isGroup.value && isPropAbsent(props.value))
|
|
86
|
+
);
|
|
87
|
+
return {
|
|
88
|
+
radioRef,
|
|
89
|
+
isGroup,
|
|
90
|
+
radioGroup,
|
|
91
|
+
focus,
|
|
92
|
+
size,
|
|
93
|
+
disabled,
|
|
94
|
+
tabIndex,
|
|
95
|
+
modelValue,
|
|
96
|
+
actualValue
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const _hoisted_1$2 = ["value", "name", "disabled", "checked"];
|
|
101
|
+
const _sfc_main$2 = defineComponent({
|
|
102
|
+
...{
|
|
103
|
+
name: "ElRadio"
|
|
104
|
+
},
|
|
105
|
+
__name: "radio",
|
|
106
|
+
props: radioProps,
|
|
107
|
+
emits: radioEmits,
|
|
108
|
+
setup(__props, { emit: __emit }) {
|
|
109
|
+
const props = __props;
|
|
110
|
+
const emit = __emit;
|
|
111
|
+
const ns = useNamespace("radio");
|
|
112
|
+
const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio(props, emit);
|
|
113
|
+
function handleChange() {
|
|
114
|
+
nextTick(() => emit(CHANGE_EVENT, modelValue.value));
|
|
115
|
+
}
|
|
116
|
+
return (_ctx, _cache) => {
|
|
117
|
+
var _a;
|
|
118
|
+
return openBlock(), createElementBlock(
|
|
119
|
+
"label",
|
|
120
|
+
{
|
|
121
|
+
class: normalizeClass([
|
|
122
|
+
unref(ns).b(),
|
|
123
|
+
unref(ns).is("disabled", unref(disabled)),
|
|
124
|
+
unref(ns).is("focus", unref(focus)),
|
|
125
|
+
unref(ns).is("bordered", _ctx.border),
|
|
126
|
+
unref(ns).is("checked", unref(modelValue) === unref(actualValue)),
|
|
127
|
+
unref(ns).m(unref(size))
|
|
128
|
+
])
|
|
129
|
+
},
|
|
130
|
+
[
|
|
131
|
+
createElementVNode(
|
|
132
|
+
"span",
|
|
133
|
+
{
|
|
134
|
+
class: normalizeClass([
|
|
135
|
+
unref(ns).e("input"),
|
|
136
|
+
unref(ns).is("disabled", unref(disabled)),
|
|
137
|
+
unref(ns).is("checked", unref(modelValue) === unref(actualValue))
|
|
138
|
+
])
|
|
139
|
+
},
|
|
140
|
+
[
|
|
141
|
+
withDirectives(createElementVNode("input", {
|
|
142
|
+
ref_key: "radioRef",
|
|
143
|
+
ref: radioRef,
|
|
144
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
145
|
+
class: normalizeClass(unref(ns).e("original")),
|
|
146
|
+
value: unref(actualValue),
|
|
147
|
+
name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
|
|
148
|
+
disabled: unref(disabled),
|
|
149
|
+
checked: unref(modelValue) === unref(actualValue),
|
|
150
|
+
type: "radio",
|
|
151
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
152
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
153
|
+
onChange: handleChange,
|
|
154
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
155
|
+
}, ["stop"]))
|
|
156
|
+
}, null, 42, _hoisted_1$2), [
|
|
157
|
+
[vModelRadio, unref(modelValue)]
|
|
158
|
+
]),
|
|
159
|
+
createElementVNode(
|
|
160
|
+
"span",
|
|
161
|
+
{
|
|
162
|
+
class: normalizeClass(unref(ns).e("inner"))
|
|
163
|
+
},
|
|
164
|
+
null,
|
|
165
|
+
2
|
|
166
|
+
)
|
|
167
|
+
],
|
|
168
|
+
2
|
|
169
|
+
),
|
|
170
|
+
createElementVNode(
|
|
171
|
+
"span",
|
|
172
|
+
{
|
|
173
|
+
class: normalizeClass(unref(ns).e("label")),
|
|
174
|
+
onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
175
|
+
}, ["stop"]))
|
|
176
|
+
},
|
|
177
|
+
[
|
|
178
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
179
|
+
createTextVNode(
|
|
180
|
+
toDisplayString(_ctx.label),
|
|
181
|
+
1
|
|
182
|
+
)
|
|
183
|
+
])
|
|
184
|
+
],
|
|
185
|
+
34
|
|
186
|
+
)
|
|
187
|
+
],
|
|
188
|
+
2
|
|
189
|
+
);
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);
|
|
194
|
+
|
|
195
|
+
const radioButtonProps = buildProps({
|
|
196
|
+
...radioPropsBase
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
const _hoisted_1$1 = ["value", "name", "disabled"];
|
|
200
|
+
const _sfc_main$1 = defineComponent({
|
|
201
|
+
...{
|
|
202
|
+
name: "ElRadioButton"
|
|
203
|
+
},
|
|
204
|
+
__name: "radio-button",
|
|
205
|
+
props: radioButtonProps,
|
|
206
|
+
setup(__props) {
|
|
207
|
+
const props = __props;
|
|
208
|
+
const ns = useNamespace("radio");
|
|
209
|
+
const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio(props);
|
|
210
|
+
const activeStyle = computed(() => {
|
|
211
|
+
return {
|
|
212
|
+
backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
213
|
+
borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
214
|
+
boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
|
|
215
|
+
color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
|
|
216
|
+
};
|
|
217
|
+
});
|
|
218
|
+
return (_ctx, _cache) => {
|
|
219
|
+
var _a;
|
|
220
|
+
return openBlock(), createElementBlock(
|
|
221
|
+
"label",
|
|
222
|
+
{
|
|
223
|
+
class: normalizeClass([
|
|
224
|
+
unref(ns).b("button"),
|
|
225
|
+
unref(ns).is("active", unref(modelValue) === unref(actualValue)),
|
|
226
|
+
unref(ns).is("disabled", unref(disabled)),
|
|
227
|
+
unref(ns).is("focus", unref(focus)),
|
|
228
|
+
unref(ns).bm("button", unref(size))
|
|
229
|
+
])
|
|
230
|
+
},
|
|
231
|
+
[
|
|
232
|
+
withDirectives(createElementVNode("input", {
|
|
233
|
+
ref_key: "radioRef",
|
|
234
|
+
ref: radioRef,
|
|
235
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
236
|
+
class: normalizeClass(unref(ns).be("button", "original-radio")),
|
|
237
|
+
value: unref(actualValue),
|
|
238
|
+
type: "radio",
|
|
239
|
+
name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
|
|
240
|
+
disabled: unref(disabled),
|
|
241
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
242
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
243
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
244
|
+
}, ["stop"]))
|
|
245
|
+
}, null, 42, _hoisted_1$1), [
|
|
246
|
+
[vModelRadio, unref(modelValue)]
|
|
247
|
+
]),
|
|
248
|
+
createElementVNode(
|
|
249
|
+
"span",
|
|
250
|
+
{
|
|
251
|
+
class: normalizeClass(unref(ns).be("button", "inner")),
|
|
252
|
+
style: normalizeStyle(unref(modelValue) === unref(actualValue) ? activeStyle.value : {}),
|
|
253
|
+
onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
254
|
+
}, ["stop"]))
|
|
255
|
+
},
|
|
256
|
+
[
|
|
257
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
258
|
+
createTextVNode(
|
|
259
|
+
toDisplayString(_ctx.label),
|
|
260
|
+
1
|
|
261
|
+
)
|
|
262
|
+
])
|
|
263
|
+
],
|
|
264
|
+
38
|
|
265
|
+
)
|
|
266
|
+
],
|
|
267
|
+
2
|
|
268
|
+
);
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
var RadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);
|
|
273
|
+
|
|
274
|
+
const radioGroupProps = buildProps({
|
|
275
|
+
id: {
|
|
276
|
+
type: String,
|
|
277
|
+
default: void 0
|
|
278
|
+
},
|
|
279
|
+
size: useSizeProp,
|
|
280
|
+
disabled: {
|
|
281
|
+
type: Boolean,
|
|
282
|
+
default: void 0
|
|
283
|
+
},
|
|
284
|
+
modelValue: {
|
|
285
|
+
type: [String, Number, Boolean],
|
|
286
|
+
default: void 0
|
|
287
|
+
},
|
|
288
|
+
fill: {
|
|
289
|
+
type: String,
|
|
290
|
+
default: ""
|
|
291
|
+
},
|
|
292
|
+
textColor: {
|
|
293
|
+
type: String,
|
|
294
|
+
default: ""
|
|
295
|
+
},
|
|
296
|
+
name: {
|
|
297
|
+
type: String,
|
|
298
|
+
default: void 0
|
|
299
|
+
},
|
|
300
|
+
validateEvent: {
|
|
301
|
+
type: Boolean,
|
|
302
|
+
default: true
|
|
303
|
+
},
|
|
304
|
+
options: {
|
|
305
|
+
type: definePropType(Array)
|
|
306
|
+
},
|
|
307
|
+
props: {
|
|
308
|
+
type: definePropType(Object),
|
|
309
|
+
default: () => radioDefaultProps
|
|
310
|
+
},
|
|
311
|
+
type: {
|
|
312
|
+
type: String,
|
|
313
|
+
values: ["radio", "button"],
|
|
314
|
+
default: "radio"
|
|
315
|
+
},
|
|
316
|
+
...useAriaProps(["ariaLabel"])
|
|
317
|
+
});
|
|
318
|
+
const radioGroupEmits = radioEmits;
|
|
319
|
+
const radioDefaultProps = {
|
|
320
|
+
label: "label",
|
|
321
|
+
value: "value",
|
|
322
|
+
disabled: "disabled"
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
const _hoisted_1 = ["id", "aria-label", "aria-labelledby"];
|
|
326
|
+
const _sfc_main = defineComponent({
|
|
327
|
+
...{
|
|
328
|
+
name: "ElRadioGroup"
|
|
329
|
+
},
|
|
330
|
+
__name: "radio-group",
|
|
331
|
+
props: radioGroupProps,
|
|
332
|
+
emits: radioGroupEmits,
|
|
333
|
+
setup(__props, { emit: __emit }) {
|
|
334
|
+
const props = __props;
|
|
335
|
+
const emit = __emit;
|
|
336
|
+
const ns = useNamespace("radio");
|
|
337
|
+
const radioId = useId();
|
|
338
|
+
const radioGroupRef = ref();
|
|
339
|
+
const { formItem } = useFormItem();
|
|
340
|
+
const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
|
|
341
|
+
formItemContext: formItem
|
|
342
|
+
});
|
|
343
|
+
const changeEvent = (value) => {
|
|
344
|
+
emit(UPDATE_MODEL_EVENT, value);
|
|
345
|
+
nextTick(() => emit(CHANGE_EVENT, value));
|
|
346
|
+
};
|
|
347
|
+
onMounted(() => {
|
|
348
|
+
const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
|
|
349
|
+
const firstLabel = radios[0];
|
|
350
|
+
if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
|
|
351
|
+
firstLabel.tabIndex = 0;
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
const name = computed(() => {
|
|
355
|
+
return props.name || radioId.value;
|
|
356
|
+
});
|
|
357
|
+
const aliasProps = computed(() => ({
|
|
358
|
+
...radioDefaultProps,
|
|
359
|
+
...props.props
|
|
360
|
+
}));
|
|
361
|
+
const getOptionProps = (option) => {
|
|
362
|
+
const { label, value, disabled } = aliasProps.value;
|
|
363
|
+
const base = {
|
|
364
|
+
label: option[label],
|
|
365
|
+
value: option[value],
|
|
366
|
+
disabled: option[disabled]
|
|
367
|
+
};
|
|
368
|
+
return { ...omit(option, [label, value, disabled]), ...base };
|
|
369
|
+
};
|
|
370
|
+
const optionComponent = computed(
|
|
371
|
+
() => props.type === "button" ? RadioButton : Radio
|
|
372
|
+
);
|
|
373
|
+
provide(
|
|
374
|
+
radioGroupKey,
|
|
375
|
+
reactive({
|
|
376
|
+
...toRefs(props),
|
|
377
|
+
changeEvent,
|
|
378
|
+
name
|
|
379
|
+
})
|
|
380
|
+
);
|
|
381
|
+
watch(
|
|
382
|
+
() => props.modelValue,
|
|
383
|
+
(newVal, oldValue) => {
|
|
384
|
+
if (props.validateEvent && !isEqual(newVal, oldValue)) {
|
|
385
|
+
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
);
|
|
389
|
+
return (_ctx, _cache) => {
|
|
390
|
+
return openBlock(), createElementBlock("div", {
|
|
391
|
+
id: unref(groupId),
|
|
392
|
+
ref_key: "radioGroupRef",
|
|
393
|
+
ref: radioGroupRef,
|
|
394
|
+
class: normalizeClass(unref(ns).b("group")),
|
|
395
|
+
role: "radiogroup",
|
|
396
|
+
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0,
|
|
397
|
+
"aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
|
|
398
|
+
}, [
|
|
399
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
400
|
+
(openBlock(true), createElementBlock(
|
|
401
|
+
Fragment,
|
|
402
|
+
null,
|
|
403
|
+
renderList(_ctx.options, (item, index) => {
|
|
404
|
+
return openBlock(), createBlock(
|
|
405
|
+
resolveDynamicComponent(optionComponent.value),
|
|
406
|
+
mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)),
|
|
407
|
+
null,
|
|
408
|
+
16
|
|
409
|
+
);
|
|
410
|
+
}),
|
|
411
|
+
128
|
|
412
|
+
))
|
|
413
|
+
])
|
|
414
|
+
], 10, _hoisted_1);
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);
|
|
419
|
+
|
|
420
|
+
const ElRadio = withInstall(Radio, {
|
|
421
|
+
RadioButton,
|
|
422
|
+
RadioGroup
|
|
423
|
+
});
|
|
424
|
+
const ElRadioGroup = withNoopInstall(RadioGroup);
|
|
425
|
+
const ElRadioButton = withNoopInstall(RadioButton);
|
|
426
|
+
|
|
427
|
+
export { ElRadioGroup as E, ElRadioButton as a, ElRadio as b };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as Stack,
|
|
2
|
-
import {
|
|
3
|
-
import { g as get } from './
|
|
4
|
-
import {
|
|
1
|
+
import { S as Stack, m as baseIsEqual, k as keys } from './q2jRgbir.mjs';
|
|
2
|
+
import { a as isObject, y as isKey, u as toKey, q as baseGet, f as isArray } from './ytiKcA3H.mjs';
|
|
3
|
+
import { g as get } from './CJ0afvkJ.mjs';
|
|
4
|
+
import { c as hasIn, i as identity } from './DCS0eqqM.mjs';
|
|
5
5
|
|
|
6
6
|
/** Used to compose bitmasks for value comparisons. */
|
|
7
7
|
var COMPARE_PARTIAL_FLAG$1 = 1,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { defineComponent, renderSlot, createBlock, openBlock, Teleport as Teleport$1, ref, computed, provide, inject, onBeforeUnmount, createElementBlock, normalizeStyle, normalizeClass, unref, withDirectives, cloneVNode, Comment, Fragment, Text, createVNode, onMounted, watch, createCommentVNode, mergeProps, withCtx, nextTick, shallowRef, getCurrentInstance, toRef, onBeforeMount, Transition, vShow, readonly, onDeactivated, toDisplayString } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import { _ as _export_sfc, w as withInstall } from './
|
|
2
|
+
import { b as buildProps, d as definePropType, u as useNamespace, N as NOOP, a as debugWarn, j as isObject, i as isString, k as fromPairs, l as buildProp, f as isFunction, c as isArray, m as useGetDerivedNamespace } from './By7FMB3I.mjs';
|
|
3
|
+
import { _ as _export_sfc, w as withInstall } from './dN0VcQc2.mjs';
|
|
4
4
|
import { unrefElement, isClient, tryOnScopeDispose, computedEager, onClickOutside } from '@vueuse/core';
|
|
5
|
-
import {
|
|
5
|
+
import { f as isElement, i as isNil, b as isNumber, d as isBoolean } from './DViraU6I.mjs';
|
|
6
|
+
import { u as useAriaProps } from './DCS0eqqM.mjs';
|
|
6
7
|
import { g as getEventCode, E as EVENT_CODE, c as composeEventHandlers } from './BTpNRPQW.mjs';
|
|
7
8
|
import { a as isFocusable, f as focusElement } from './CsLIbnzG.mjs';
|
|
8
|
-
import {
|
|
9
|
-
import { u as useZIndex } from './
|
|
9
|
+
import { a as formItemContextKey, b as useIdInjection, u as useId } from './Co77DVCw.mjs';
|
|
10
|
+
import { u as useZIndex } from './D6m3vWpc.mjs';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Checks if `value` is `undefined`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { inject, ref, getCurrentInstance, computed, onMounted, watch, toRef, onUnmounted, unref } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import { a as useGlobalSize } from './
|
|
2
|
+
import { f as formContextKey, a as formItemContextKey, u as useId } from './Co77DVCw.mjs';
|
|
3
|
+
import { a as useGlobalSize } from './CPCieLBG.mjs';
|
|
4
4
|
|
|
5
5
|
const useFormItem = () => {
|
|
6
6
|
const form = inject(formContextKey, void 0);
|
|
@@ -98,4 +98,4 @@ const useFormDisabled = (fallback) => {
|
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
export {
|
|
101
|
+
export { useFormDisabled as a, useFormItemInputId as b, useFormSize as c, useFormItem as u };
|