@wfrog/vc-ui 1.1.0 → 1.2.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.
Files changed (132) hide show
  1. package/README.md +3 -3
  2. package/dist/es/chunk/{OEa4tYPF.mjs → -ga82G_B.mjs} +1 -1
  3. package/dist/es/chunk/B1BnPYNG.mjs +163 -0
  4. package/dist/es/chunk/{DFOLES4O.mjs → BA2yoAwy.mjs} +403 -502
  5. package/dist/es/chunk/{BpqBBo4z.mjs → BDyXj_90.mjs} +2 -2
  6. package/dist/es/chunk/{BI0vrXwX.mjs → BI-fNJhk.mjs} +6 -3
  7. package/dist/es/chunk/{BsGCX4td.mjs → BK4T_2ha.mjs} +1 -1
  8. package/dist/es/chunk/{73YgKz3H.mjs → BLLKi_0v.mjs} +1 -1
  9. package/dist/es/chunk/{DTLPXrjb.mjs → BTsEMnf_.mjs} +1 -1
  10. package/dist/es/chunk/{B5UQmWXg.mjs → BUf50Y7Y.mjs} +41 -21
  11. package/dist/es/chunk/{BzedaLtg.mjs → BYVaz5Or.mjs} +2 -2
  12. package/dist/es/chunk/BaJ7k5Lg.mjs +209 -0
  13. package/dist/es/chunk/{Bp9jXKX0.mjs → BambM7zX.mjs} +2 -2
  14. package/dist/es/chunk/{CizMbf5K.mjs → Bl0WQiki.mjs} +1 -1
  15. package/dist/es/chunk/{CLbj8G-F.mjs → Bnot0Gwc.mjs} +12 -4
  16. package/dist/es/chunk/{4eyJqDa9.mjs → BoGGHTrJ.mjs} +4 -2
  17. package/dist/es/chunk/C7Dgjpd1.mjs +242 -0
  18. package/dist/es/chunk/{D0LB3gF-.mjs → CKbkzlkO.mjs} +104 -72
  19. package/dist/es/chunk/{DrgvuOYH.mjs → CL5WTCB3.mjs} +4 -2
  20. package/dist/es/chunk/{XwSiBVsA.mjs → CM_I1FoA.mjs} +2 -2
  21. package/dist/es/chunk/{DouIsSPi.mjs → CNILa-hz.mjs} +1 -1
  22. package/dist/es/chunk/{DRoyW749.mjs → CcKUdl3e.mjs} +12 -6
  23. package/dist/es/chunk/CidLkmft.mjs +188 -0
  24. package/dist/es/chunk/{HAog8AWU.mjs → CitH0taR.mjs} +816 -539
  25. package/dist/es/chunk/{Cu6erWl4.mjs → CzqeSQn4.mjs} +73 -38
  26. package/dist/es/chunk/{CLCfXfvv.mjs → D7JQbDFE.mjs} +154 -118
  27. package/dist/es/chunk/{DaCDeO95.mjs → D9iEroQw.mjs} +1 -207
  28. package/dist/es/chunk/{cPBw23yt.mjs → DEPZhJ0Z.mjs} +21 -16
  29. package/dist/es/chunk/{CPERtDRX.mjs → DHpbQMGk.mjs} +32 -22
  30. package/dist/es/chunk/{BHsNc7jl.mjs → DKpRXDRE.mjs} +82 -55
  31. package/dist/es/chunk/{CLMc8GzD.mjs → DMYHOxhk.mjs} +462 -311
  32. package/dist/es/chunk/{CBSopeeE.mjs → DQHGjqG5.mjs} +9 -4
  33. package/dist/es/chunk/DTEM_vYZ.mjs +23 -0
  34. package/dist/es/chunk/{NQBKROII.mjs → DWcIzeMM.mjs} +1 -1
  35. package/dist/es/chunk/{FHvLvzEB.mjs → DX38FfmL.mjs} +1088 -697
  36. package/dist/es/chunk/{DZD-YnCt.mjs → Dcm-lOj8.mjs} +4 -4
  37. package/dist/es/chunk/{09Ec85_u.mjs → DdmNdV7I.mjs} +398 -278
  38. package/dist/es/chunk/{f0-vIQGp.mjs → DfHTA5LW.mjs} +3 -3
  39. package/dist/es/chunk/DgFT6snA.mjs +835 -0
  40. package/dist/es/chunk/{DwKWIlzw.mjs → DgSzI6Fw.mjs} +106 -71
  41. package/dist/es/chunk/{BcTuAX8r.mjs → Dsye5ZEp.mjs} +5 -3
  42. package/dist/es/chunk/{BsLJxiSC.mjs → Dw-yyl2m.mjs} +1 -1
  43. package/dist/es/chunk/{DXPWe_a5.mjs → U13Qpiki.mjs} +19 -13
  44. package/dist/es/chunk/{axpwSky6.mjs → _8u_XVHh.mjs} +168 -120
  45. package/dist/es/chunk/egk9EEzo.mjs +66 -0
  46. package/dist/es/chunk/{BUEEWLrd.mjs → ezK_XQQd.mjs} +15 -6
  47. package/dist/es/chunk/{Bl2KlMdP.mjs → oW98L-44.mjs} +8 -3
  48. package/dist/es/chunk/{Dk6Bx0KT.mjs → plK2vnjp.mjs} +8 -5
  49. package/dist/es/components/awesome-icon/awesome-icon.mjs +2 -1
  50. package/dist/es/components/backbottom/backbottom.mjs +2 -2
  51. package/dist/es/components/button/button.mjs +105 -76
  52. package/dist/es/components/choice/choice.mjs +2 -2
  53. package/dist/es/components/config-provider/config-provider.d.ts +1 -0
  54. package/dist/es/components/config-provider/config-provider.mjs +13 -5
  55. package/dist/es/components/cropper/cropper.mjs +44 -33
  56. package/dist/es/components/currency/currency.mjs +5 -5
  57. package/dist/es/components/daterange-picker/daterange-picker.mjs +2267 -1522
  58. package/dist/es/components/dialog/dialog.mjs +213 -172
  59. package/dist/es/components/dialog/index.css +1 -1
  60. package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +11 -11
  61. package/dist/es/components/dialog-map-point/dialog-map-point.mjs +5 -4
  62. package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +495 -314
  63. package/dist/es/components/dialog-upload-images/index.css +1 -1
  64. package/dist/es/components/drag-verify/drag-verify.mjs +3 -3
  65. package/dist/es/components/drawer/drawer.mjs +136 -94
  66. package/dist/es/components/drawer/index.css +1 -1
  67. package/dist/es/components/easy-pagination/easy-pagination.mjs +2 -2
  68. package/dist/es/components/el-icon/el-icon.mjs +1 -1
  69. package/dist/es/components/el-icon/index.css +3 -2
  70. package/dist/es/components/flag/flag.mjs +2 -1
  71. package/dist/es/components/icon/icon.mjs +10 -31
  72. package/dist/es/components/icon/icon.vue.d.ts +1 -1
  73. package/dist/es/components/icon/icon2.mjs +1 -1
  74. package/dist/es/components/icon/index.mjs +2 -2
  75. package/dist/es/components/icon-picker/components/collections.vue.d.ts +625 -0
  76. package/dist/es/components/icon-picker/components/panel.vue.d.ts +9 -0
  77. package/dist/es/components/icon-picker/icon-picker.d.ts +40 -0
  78. package/dist/es/components/icon-picker/icon-picker.mjs +1375 -0
  79. package/dist/es/components/icon-picker/icon-picker.vue.d.ts +9 -0
  80. package/dist/es/components/icon-picker/index.css +121 -0
  81. package/dist/es/components/icon-picker/index.d.ts +4 -0
  82. package/dist/es/components/icon-picker/index.mjs +6 -0
  83. package/dist/es/components/iconify-icon/iconify-icon.d.ts +5 -0
  84. package/dist/es/components/iconify-icon/iconify-icon.mjs +1860 -0
  85. package/dist/es/components/iconify-icon/iconify-icon.vue.d.ts +6 -0
  86. package/dist/es/components/iconify-icon/index.css +11 -0
  87. package/dist/es/components/iconify-icon/index.d.ts +4 -0
  88. package/dist/es/components/iconify-icon/index.mjs +6 -0
  89. package/dist/es/components/image/image.mjs +5 -5
  90. package/dist/es/components/input/input.mjs +4 -4
  91. package/dist/es/components/input/input.vue.d.ts +63 -54
  92. package/dist/es/components/input-number/input-number.mjs +5 -5
  93. package/dist/es/components/pca-picker/components/c.vue.d.ts +4 -4
  94. package/dist/es/components/pca-picker/index.css +1 -1
  95. package/dist/es/components/pca-picker/pca-picker.mjs +154 -160
  96. package/dist/es/components/pca-picker/pca-picker.vue.d.ts +12 -11
  97. package/dist/es/components/qr-code/qr-code.mjs +2 -1
  98. package/dist/es/components/screenfull/screenfull.mjs +6 -5
  99. package/dist/es/components/scrollbar/index.css +18 -0
  100. package/dist/es/components/scrollbar/index.d.ts +4 -0
  101. package/dist/es/components/scrollbar/index.mjs +6 -0
  102. package/dist/es/components/scrollbar/scrollbar.d.ts +4 -0
  103. package/dist/es/components/scrollbar/scrollbar.mjs +65 -0
  104. package/dist/es/components/scrollbar/scrollbar.vue.d.ts +588 -0
  105. package/dist/es/components/select/select.mjs +7 -7
  106. package/dist/es/components/single-player/index.css +1 -1
  107. package/dist/es/components/single-player/single-player.mjs +265 -166
  108. package/dist/es/components/svg-icon/index.css +3 -2
  109. package/dist/es/components/svg-icon/svg-icon.mjs +3 -3
  110. package/dist/es/components/switch/switch.mjs +2 -2
  111. package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
  112. package/dist/es/components/tags/tags.mjs +9 -9
  113. package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
  114. package/dist/es/components/thousand-input/thousand-input.mjs +5 -4
  115. package/dist/es/components/thousand-input/thousand-input.vue.d.ts +126 -108
  116. package/dist/es/components/tinymce/index.css +1 -1
  117. package/dist/es/components/tinymce/tinymce.mjs +9 -8
  118. package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +179 -141
  119. package/dist/es/components/tree-picker/popover-cascader.css +1 -1
  120. package/dist/es/components/tree-picker/tree-picker.mjs +10 -10
  121. package/dist/es/components/tree-picker/tree-picker.vue.d.ts +12 -11
  122. package/dist/es/components/upload-file/upload-file.mjs +3 -3
  123. package/dist/es/index.d.ts +3 -0
  124. package/dist/es/index.mjs +41 -31
  125. package/dist/global.d.ts +3 -0
  126. package/dist/index.css +166 -22
  127. package/package.json +8 -2
  128. package/dist/es/chunk/BtTIs3tG.mjs +0 -138
  129. package/dist/es/chunk/C7wQNvSS.mjs +0 -728
  130. package/dist/es/chunk/Cbhe4I9Z.mjs +0 -16
  131. package/dist/es/chunk/DihosKp1.mjs +0 -140
  132. package/dist/es/components/icon/index.css +0 -9
@@ -1,24 +1,29 @@
1
1
  import { computed, inject, ref, useSlots, Text, defineComponent, createBlock, openBlock, resolveDynamicComponent, mergeProps, unref, withCtx, createElementBlock, createCommentVNode, Fragment, renderSlot, normalizeClass, provide, reactive, toRef } from 'vue';
2
- import { E as ElIcon } from './cPBw23yt.mjs';
3
- import { u as useDeprecated } from './Cbhe4I9Z.mjs';
4
- import { u as useGlobalConfig } from './B5UQmWXg.mjs';
5
- import { u as useFormItem, c as useFormSize, b as useFormDisabled } from './DXPWe_a5.mjs';
2
+ import { E as ElIcon } from './DEPZhJ0Z.mjs';
3
+ import { u as useDeprecated } from './DTEM_vYZ.mjs';
4
+ import { u as useGlobalConfig } from './BUf50Y7Y.mjs';
5
+ import { u as useFormItem, c as useFormSize, b as useFormDisabled } from './U13Qpiki.mjs';
6
6
  import { Loading } from '@element-plus/icons-vue';
7
- import { c as buildProps, d as definePropType, u as useNamespace } from './DRoyW749.mjs';
8
- import { u as useSizeProp } from './BsGCX4td.mjs';
7
+ import { c as buildProps, d as definePropType, u as useNamespace } from './CcKUdl3e.mjs';
8
+ import { u as useSizeProp } from './BK4T_2ha.mjs';
9
9
  import { i as iconPropType } from '../components/icon/icon2.mjs';
10
- import { _ as _export_sfc, w as withInstall, a as withNoopInstall } from './DTLPXrjb.mjs';
10
+ import { _ as _export_sfc, w as withInstall, a as withNoopInstall } from './BTsEMnf_.mjs';
11
11
 
12
- const buttonGroupContextKey = Symbol("buttonGroupContextKey");
12
+ const buttonGroupContextKey = Symbol(
13
+ "buttonGroupContextKey"
14
+ );
13
15
 
14
16
  const useButton = (props, emit) => {
15
- useDeprecated({
16
- from: "type.text",
17
- replacement: "link",
18
- version: "3.0.0",
19
- scope: "props",
20
- ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
21
- }, computed(() => props.type === "text"));
17
+ useDeprecated(
18
+ {
19
+ from: "type.text",
20
+ replacement: "link",
21
+ version: "3.0.0",
22
+ scope: "props",
23
+ ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
24
+ },
25
+ computed(() => props.type === "text")
26
+ );
22
27
  const buttonGroupContext = inject(buttonGroupContextKey, void 0);
23
28
  const globalConfig = useGlobalConfig("button");
24
29
  const { form } = useFormItem();
@@ -26,22 +31,30 @@ const useButton = (props, emit) => {
26
31
  const _disabled = useFormDisabled();
27
32
  const _ref = ref();
28
33
  const slots = useSlots();
29
- const _type = computed(() => {
30
- var _a;
31
- return props.type || (buttonGroupContext == null ? void 0 : buttonGroupContext.type) || ((_a = globalConfig.value) == null ? void 0 : _a.type) || "";
32
- });
33
- const autoInsertSpace = computed(() => {
34
- var _a, _b, _c;
35
- return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.autoInsertSpace) != null ? _c : false;
36
- });
37
- const _plain = computed(() => {
38
- var _a, _b, _c;
39
- return (_c = (_b = props.plain) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.plain) != null ? _c : false;
40
- });
41
- const _round = computed(() => {
42
- var _a, _b, _c;
43
- return (_c = (_b = props.round) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.round) != null ? _c : false;
44
- });
34
+ const _type = computed(
35
+ () => {
36
+ var _a;
37
+ return props.type || (buttonGroupContext == null ? void 0 : buttonGroupContext.type) || ((_a = globalConfig.value) == null ? void 0 : _a.type) || "";
38
+ }
39
+ );
40
+ const autoInsertSpace = computed(
41
+ () => {
42
+ var _a, _b, _c;
43
+ return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.autoInsertSpace) != null ? _c : false;
44
+ }
45
+ );
46
+ const _plain = computed(
47
+ () => {
48
+ var _a, _b, _c;
49
+ return (_c = (_b = props.plain) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.plain) != null ? _c : false;
50
+ }
51
+ );
52
+ const _round = computed(
53
+ () => {
54
+ var _a, _b, _c;
55
+ return (_c = (_b = props.round) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.round) != null ? _c : false;
56
+ }
57
+ );
45
58
  const _text = computed(() => {
46
59
  var _a, _b, _c;
47
60
  return (_c = (_b = props.text) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.text) != null ? _c : false;
@@ -1352,15 +1365,16 @@ function useButtonCustomStyle(props) {
1352
1365
  });
1353
1366
  }
1354
1367
 
1355
- const __default__$1 = defineComponent({
1356
- name: "ElButton"
1357
- });
1358
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1359
- ...__default__$1,
1368
+ const _sfc_main$1 = defineComponent({
1369
+ ...{
1370
+ name: "ElButton"
1371
+ },
1372
+ __name: "button",
1360
1373
  props: buttonProps,
1361
1374
  emits: buttonEmits,
1362
- setup(__props, { expose, emit }) {
1375
+ setup(__props, { expose: __expose, emit: __emit }) {
1363
1376
  const props = __props;
1377
+ const emit = __emit;
1364
1378
  const buttonStyle = useButtonCustomStyle(props);
1365
1379
  const ns = useNamespace("button");
1366
1380
  const {
@@ -1388,7 +1402,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1388
1402
  ns.is("link", props.link),
1389
1403
  ns.is("has-bg", props.bg)
1390
1404
  ]);
1391
- expose({
1405
+ __expose({
1392
1406
  ref: _ref,
1393
1407
  size: _size,
1394
1408
  type: _type,
@@ -1400,40 +1414,50 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1400
1414
  ref_key: "_ref",
1401
1415
  ref: _ref
1402
1416
  }, unref(_props), {
1403
- class: unref(buttonKls),
1417
+ class: buttonKls.value,
1404
1418
  style: unref(buttonStyle),
1405
1419
  onClick: unref(handleClick)
1406
1420
  }), {
1407
1421
  default: withCtx(() => [
1408
- _ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1409
- _ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
1410
- key: 1,
1411
- class: normalizeClass(unref(ns).is("loading"))
1412
- }, {
1413
- default: withCtx(() => [
1414
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon)))
1415
- ]),
1416
- _: 1
1417
- }, 8, ["class"]))
1418
- ], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
1422
+ _ctx.loading ? (openBlock(), createElementBlock(
1423
+ Fragment,
1424
+ { key: 0 },
1425
+ [
1426
+ _ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
1427
+ key: 1,
1428
+ class: normalizeClass(unref(ns).is("loading"))
1429
+ }, {
1430
+ default: withCtx(() => [
1431
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon)))
1432
+ ]),
1433
+ _: 1
1434
+ }, 8, ["class"]))
1435
+ ],
1436
+ 64
1437
+ )) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
1419
1438
  default: withCtx(() => [
1420
1439
  _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })
1421
1440
  ]),
1422
1441
  _: 3
1423
1442
  })) : createCommentVNode("v-if", true),
1424
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
1425
- key: 2,
1426
- class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
1427
- }, [
1428
- renderSlot(_ctx.$slots, "default")
1429
- ], 2)) : createCommentVNode("v-if", true)
1443
+ _ctx.$slots.default ? (openBlock(), createElementBlock(
1444
+ "span",
1445
+ {
1446
+ key: 2,
1447
+ class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
1448
+ },
1449
+ [
1450
+ renderSlot(_ctx.$slots, "default")
1451
+ ],
1452
+ 2
1453
+ )) : createCommentVNode("v-if", true)
1430
1454
  ]),
1431
1455
  _: 3
1432
1456
  }, 16, ["class", "style", "onClick"]);
1433
1457
  };
1434
1458
  }
1435
1459
  });
1436
- var Button = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "button.vue"]]);
1460
+ var Button = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
1437
1461
 
1438
1462
  const buttonGroupProps = {
1439
1463
  size: buttonProps.size,
@@ -1445,29 +1469,37 @@ const buttonGroupProps = {
1445
1469
  }
1446
1470
  };
1447
1471
 
1448
- const __default__ = defineComponent({
1449
- name: "ElButtonGroup"
1450
- });
1451
- const _sfc_main = /* @__PURE__ */ defineComponent({
1452
- ...__default__,
1472
+ const _sfc_main = defineComponent({
1473
+ ...{
1474
+ name: "ElButtonGroup"
1475
+ },
1476
+ __name: "button-group",
1453
1477
  props: buttonGroupProps,
1454
1478
  setup(__props) {
1455
1479
  const props = __props;
1456
- provide(buttonGroupContextKey, reactive({
1457
- size: toRef(props, "size"),
1458
- type: toRef(props, "type")
1459
- }));
1480
+ provide(
1481
+ buttonGroupContextKey,
1482
+ reactive({
1483
+ size: toRef(props, "size"),
1484
+ type: toRef(props, "type")
1485
+ })
1486
+ );
1460
1487
  const ns = useNamespace("button");
1461
1488
  return (_ctx, _cache) => {
1462
- return openBlock(), createElementBlock("div", {
1463
- class: normalizeClass([unref(ns).b("group"), unref(ns).bm("group", props.direction)])
1464
- }, [
1465
- renderSlot(_ctx.$slots, "default")
1466
- ], 2);
1489
+ return openBlock(), createElementBlock(
1490
+ "div",
1491
+ {
1492
+ class: normalizeClass([unref(ns).b("group"), unref(ns).bm("group", props.direction)])
1493
+ },
1494
+ [
1495
+ renderSlot(_ctx.$slots, "default")
1496
+ ],
1497
+ 2
1498
+ );
1467
1499
  };
1468
1500
  }
1469
1501
  });
1470
- var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "button-group.vue"]]);
1502
+ var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
1471
1503
 
1472
1504
  const ElButton = withInstall(Button, {
1473
1505
  ButtonGroup
@@ -1,5 +1,5 @@
1
1
  import { isClient } from '@vueuse/core';
2
- import { i as isArray, n as isElement } from './DRoyW749.mjs';
2
+ import { i as isArray, n as isElement } from './CcKUdl3e.mjs';
3
3
 
4
4
  const nodeList = /* @__PURE__ */ new Map();
5
5
  if (isClient) {
@@ -54,7 +54,9 @@ const ClickOutside = {
54
54
  nodeList.set(el, []);
55
55
  }
56
56
  const handlers = nodeList.get(el);
57
- const oldHandlerIndex = handlers.findIndex((item) => item.bindingFn === binding.oldValue);
57
+ const oldHandlerIndex = handlers.findIndex(
58
+ (item) => item.bindingFn === binding.oldValue
59
+ );
58
60
  const newHandler = {
59
61
  documentHandler: createDocumentHandler(el, binding),
60
62
  bindingFn: binding.value
@@ -1,6 +1,6 @@
1
1
  import { getCurrentInstance, shallowRef, ref, watch, unref, onMounted, nextTick } from 'vue';
2
2
  import { useEventListener } from '@vueuse/core';
3
- import { n as isElement, j as isFunction } from './DRoyW749.mjs';
3
+ import { n as isElement, j as isFunction } from './CcKUdl3e.mjs';
4
4
  import { a as isFocusable } from './CsLIbnzG.mjs';
5
5
 
6
6
  function useFocusController(target, {
@@ -49,7 +49,7 @@ function useFocusController(target, {
49
49
  useEventListener(wrapperRef, "focus", handleFocus, true);
50
50
  useEventListener(wrapperRef, "blur", handleBlur, true);
51
51
  useEventListener(wrapperRef, "click", handleClick, true);
52
- if (typeof process !== "undefined" && process.env.NODE_ENV === "test") {
52
+ if (process.env.NODE_ENV === "test") {
53
53
  onMounted(() => {
54
54
  const targetEl = isElement(target.value) ? target.value : document.querySelector("input,textarea");
55
55
  if (targetEl) {
@@ -1,4 +1,4 @@
1
- import { b as baseClone } from './f0-vIQGp.mjs';
1
+ import { b as baseClone } from './DfHTA5LW.mjs';
2
2
 
3
3
  /** Used to compose bitmasks for cloning. */
4
4
  var CLONE_DEEP_FLAG = 1,
@@ -194,7 +194,7 @@ function throwError(scope, m) {
194
194
  throw new ElementPlusError(`[${scope}] ${m}`);
195
195
  }
196
196
  function debugWarn(scope, message) {
197
- if (typeof process !== "undefined" && process.env.NODE_ENV !== "production") {
197
+ if (process.env.NODE_ENV !== "production") {
198
198
  const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
199
199
  console.warn(error);
200
200
  }
@@ -221,7 +221,11 @@ const buildProp = (prop, key) => {
221
221
  valid || (valid = validator(val));
222
222
  if (!valid && allowedValues.length > 0) {
223
223
  const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
224
- warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
224
+ warn(
225
+ `Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(
226
+ val
227
+ )}.`
228
+ );
225
229
  }
226
230
  return valid;
227
231
  } : void 0;
@@ -235,9 +239,11 @@ const buildProp = (prop, key) => {
235
239
  epProp.default = defaultValue;
236
240
  return epProp;
237
241
  };
238
- const buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [
239
- key,
240
- buildProp(option, key)
241
- ]));
242
+ const buildProps = (props) => fromPairs(
243
+ Object.entries(props).map(([key, option]) => [
244
+ key,
245
+ buildProp(option, key)
246
+ ])
247
+ );
242
248
 
243
249
  export { isStringNumber as A, camelize as B, namespaceContextKey as C, NOOP as N, isEmpty as a, isDate as b, buildProps as c, definePropType as d, debugWarn as e, isNumber as f, isUndefined as g, isString as h, isArray as i, isFunction as j, isNil as k, isPlainObject as l, fromPairs as m, isElement as n, isWindow as o, isObject as p, isBoolean as q, buildProp as r, useGetDerivedNamespace as s, throwError as t, useNamespace as u, isPropAbsent as v, hyphenate as w, defaultNamespace as x, isPromise as y, hasOwn as z };
@@ -0,0 +1,188 @@
1
+ import { defineComponent, useSlots, ref, computed, createBlock, openBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, createCommentVNode, renderSlot, resolveDynamicComponent, createElementBlock, createTextVNode, toDisplayString, Fragment, createVNode, vShow } from 'vue';
2
+ import { E as ElIcon } from './DEPZhJ0Z.mjs';
3
+ import { T as TypeComponentsMap, a as TypeComponents } from '../components/icon/icon2.mjs';
4
+ import { c as buildProps, u as useNamespace, e as debugWarn } from './CcKUdl3e.mjs';
5
+ import { k as keysOf } from './DVNTpOBR.mjs';
6
+ import { _ as _export_sfc, w as withInstall } from './BTsEMnf_.mjs';
7
+ import { f as flattedChildren, b as isComment } from './BYVaz5Or.mjs';
8
+
9
+ const alertEffects = ["light", "dark"];
10
+ const alertProps = buildProps({
11
+ title: {
12
+ type: String,
13
+ default: ""
14
+ },
15
+ description: {
16
+ type: String,
17
+ default: ""
18
+ },
19
+ type: {
20
+ type: String,
21
+ values: keysOf(TypeComponentsMap),
22
+ default: "info"
23
+ },
24
+ closable: {
25
+ type: Boolean,
26
+ default: true
27
+ },
28
+ closeText: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ showIcon: Boolean,
33
+ center: Boolean,
34
+ effect: {
35
+ type: String,
36
+ values: alertEffects,
37
+ default: "light"
38
+ },
39
+ showAfter: Number,
40
+ hideAfter: Number,
41
+ autoClose: Number
42
+ });
43
+ const alertEmits = {
44
+ close: (evt) => evt instanceof MouseEvent
45
+ };
46
+
47
+ const _sfc_main = defineComponent({
48
+ ...{
49
+ name: "ElAlert"
50
+ },
51
+ __name: "alert",
52
+ props: alertProps,
53
+ emits: alertEmits,
54
+ setup(__props, { emit: __emit }) {
55
+ const { Close } = TypeComponents;
56
+ const props = __props;
57
+ const emit = __emit;
58
+ const slots = useSlots();
59
+ const ns = useNamespace("alert");
60
+ const visible = ref(true);
61
+ const iconComponent = computed(() => TypeComponentsMap[props.type]);
62
+ const hasDesc = computed(() => {
63
+ var _a;
64
+ if (props.description)
65
+ return true;
66
+ const slotContent = (_a = slots.default) == null ? void 0 : _a.call(slots);
67
+ if (!slotContent)
68
+ return false;
69
+ const children = flattedChildren(slotContent);
70
+ return children.some((child) => !isComment(child));
71
+ });
72
+ const close = (evt) => {
73
+ visible.value = false;
74
+ emit("close", evt);
75
+ };
76
+ if (props.showAfter || props.hideAfter || props.autoClose) {
77
+ debugWarn(
78
+ "el-alert",
79
+ "The `show-after`, `hide-after`, and `auto-close` attributes were removed after 2.11.8. Please use `v-if` and `v-show` to manually replace them, visit: https://github.com/element-plus/element-plus/pull/22560"
80
+ );
81
+ }
82
+ return (_ctx, _cache) => {
83
+ return openBlock(), createBlock(Transition, {
84
+ name: unref(ns).b("fade"),
85
+ persisted: ""
86
+ }, {
87
+ default: withCtx(() => [
88
+ withDirectives(createElementVNode(
89
+ "div",
90
+ {
91
+ class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.type), unref(ns).is("center", _ctx.center), unref(ns).is(_ctx.effect)]),
92
+ role: "alert"
93
+ },
94
+ [
95
+ _ctx.showIcon && (_ctx.$slots.icon || iconComponent.value) ? (openBlock(), createBlock(unref(ElIcon), {
96
+ key: 0,
97
+ class: normalizeClass([unref(ns).e("icon"), unref(ns).is("big", hasDesc.value)])
98
+ }, {
99
+ default: withCtx(() => [
100
+ renderSlot(_ctx.$slots, "icon", {}, () => [
101
+ (openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))
102
+ ])
103
+ ]),
104
+ _: 3
105
+ }, 8, ["class"])) : createCommentVNode("v-if", true),
106
+ createElementVNode(
107
+ "div",
108
+ {
109
+ class: normalizeClass(unref(ns).e("content"))
110
+ },
111
+ [
112
+ _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock(
113
+ "span",
114
+ {
115
+ key: 0,
116
+ class: normalizeClass([unref(ns).e("title"), { "with-description": hasDesc.value }])
117
+ },
118
+ [
119
+ renderSlot(_ctx.$slots, "title", {}, () => [
120
+ createTextVNode(
121
+ toDisplayString(_ctx.title),
122
+ 1
123
+ )
124
+ ])
125
+ ],
126
+ 2
127
+ )) : createCommentVNode("v-if", true),
128
+ hasDesc.value ? (openBlock(), createElementBlock(
129
+ "p",
130
+ {
131
+ key: 1,
132
+ class: normalizeClass(unref(ns).e("description"))
133
+ },
134
+ [
135
+ renderSlot(_ctx.$slots, "default", {}, () => [
136
+ createTextVNode(
137
+ toDisplayString(_ctx.description),
138
+ 1
139
+ )
140
+ ])
141
+ ],
142
+ 2
143
+ )) : createCommentVNode("v-if", true),
144
+ _ctx.closable ? (openBlock(), createElementBlock(
145
+ Fragment,
146
+ { key: 2 },
147
+ [
148
+ _ctx.closeText ? (openBlock(), createElementBlock(
149
+ "div",
150
+ {
151
+ key: 0,
152
+ class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")]),
153
+ onClick: close
154
+ },
155
+ toDisplayString(_ctx.closeText),
156
+ 3
157
+ )) : (openBlock(), createBlock(unref(ElIcon), {
158
+ key: 1,
159
+ class: normalizeClass(unref(ns).e("close-btn")),
160
+ onClick: close
161
+ }, {
162
+ default: withCtx(() => [
163
+ createVNode(unref(Close))
164
+ ]),
165
+ _: 1
166
+ }, 8, ["class"]))
167
+ ],
168
+ 64
169
+ )) : createCommentVNode("v-if", true)
170
+ ],
171
+ 2
172
+ )
173
+ ],
174
+ 2
175
+ ), [
176
+ [vShow, visible.value]
177
+ ])
178
+ ]),
179
+ _: 3
180
+ }, 8, ["name"]);
181
+ };
182
+ }
183
+ });
184
+ var Alert = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/alert/src/alert.vue"]]);
185
+
186
+ const ElAlert = withInstall(Alert);
187
+
188
+ export { ElAlert as E };