vxe-pc-ui 4.16.21 → 4.16.22

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 (59) hide show
  1. package/dist/all.esm.js +316 -66
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/color-picker/index.js +14 -0
  5. package/es/color-picker/src/color-picker.js +40 -28
  6. package/es/color-picker/src/util.js +252 -36
  7. package/es/date-picker/src/date-picker.js +2 -1
  8. package/es/date-range-picker/src/date-range-picker.js +2 -1
  9. package/es/icon/style.css +1 -1
  10. package/es/select/src/select.js +2 -1
  11. package/es/style.css +1 -1
  12. package/es/style.min.css +1 -1
  13. package/es/ui/index.js +1 -1
  14. package/es/ui/src/log.js +1 -1
  15. package/lib/color-picker/index.js +14 -0
  16. package/lib/color-picker/index.min.js +1 -1
  17. package/lib/color-picker/src/color-picker.js +38 -27
  18. package/lib/color-picker/src/color-picker.min.js +1 -1
  19. package/lib/color-picker/src/util.js +272 -49
  20. package/lib/color-picker/src/util.min.js +1 -1
  21. package/lib/date-picker/src/date-picker.js +2 -1
  22. package/lib/date-picker/src/date-picker.min.js +1 -1
  23. package/lib/date-range-picker/src/date-range-picker.js +2 -1
  24. package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
  25. package/lib/icon/style/style.css +1 -1
  26. package/lib/icon/style/style.min.css +1 -1
  27. package/lib/index.umd.js +324 -80
  28. package/lib/index.umd.min.js +1 -1
  29. package/lib/select/src/select.js +2 -1
  30. package/lib/select/src/select.min.js +1 -1
  31. package/lib/style.css +1 -1
  32. package/lib/style.min.css +1 -1
  33. package/lib/ui/index.js +1 -1
  34. package/lib/ui/index.min.js +1 -1
  35. package/lib/ui/src/log.js +1 -1
  36. package/lib/ui/src/log.min.js +1 -1
  37. package/package.json +1 -1
  38. package/packages/color-picker/index.ts +15 -0
  39. package/packages/color-picker/src/color-picker.ts +40 -29
  40. package/packages/color-picker/src/util.ts +267 -42
  41. package/packages/date-picker/src/date-picker.ts +3 -2
  42. package/packages/date-range-picker/src/date-range-picker.ts +3 -2
  43. package/packages/select/src/select.ts +3 -2
  44. package/types/components/color-picker.d.ts +93 -0
  45. package/types/components/grid.d.ts +6 -0
  46. package/types/components/table.d.ts +2 -2
  47. package/types/ui/index.d.ts +2 -0
  48. /package/es/icon/{iconfont.1784868322028.ttf → iconfont.1784893283450.ttf} +0 -0
  49. /package/es/icon/{iconfont.1784868322028.woff → iconfont.1784893283450.woff} +0 -0
  50. /package/es/icon/{iconfont.1784868322028.woff2 → iconfont.1784893283450.woff2} +0 -0
  51. /package/es/{iconfont.1784868322028.ttf → iconfont.1784893283450.ttf} +0 -0
  52. /package/es/{iconfont.1784868322028.woff → iconfont.1784893283450.woff} +0 -0
  53. /package/es/{iconfont.1784868322028.woff2 → iconfont.1784893283450.woff2} +0 -0
  54. /package/lib/icon/style/{iconfont.1784868322028.ttf → iconfont.1784893283450.ttf} +0 -0
  55. /package/lib/icon/style/{iconfont.1784868322028.woff → iconfont.1784893283450.woff} +0 -0
  56. /package/lib/icon/style/{iconfont.1784868322028.woff2 → iconfont.1784893283450.woff2} +0 -0
  57. /package/lib/{iconfont.1784868322028.ttf → iconfont.1784893283450.ttf} +0 -0
  58. /package/lib/{iconfont.1784868322028.woff → iconfont.1784893283450.woff} +0 -0
  59. /package/lib/{iconfont.1784868322028.woff2 → iconfont.1784893283450.woff2} +0 -0
package/dist/all.esm.js CHANGED
@@ -81,7 +81,7 @@ function checkDynamic() {
81
81
  }
82
82
 
83
83
  const { log } = VxeUI;
84
- const uiVersion = `ui v${"4.16.21"}`;
84
+ const uiVersion = `ui v${"4.16.22"}`;
85
85
  function createComponentLog(name) {
86
86
  const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
87
87
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -95,7 +95,7 @@ function createComponentLog(name) {
95
95
  const warnLog$h = log.create('warn', uiVersion);
96
96
  log.create('error', uiVersion);
97
97
 
98
- const version = "4.16.21";
98
+ const version = "4.16.22";
99
99
  VxeUI.uiVersion = version;
100
100
  VxeUI.dynamicApp = dynamicApp;
101
101
  function config(options) {
@@ -14689,8 +14689,143 @@ const hexAlphaNumMaps = {};
14689
14689
  hexAlphaNumMaps[num] = key;
14690
14690
  });
14691
14691
  const rgbRE = /^rgb(a?)\((\d{1,3})[,\s]+(\d{1,3})[,\s]+(\d{1,3})([,//\s]+([0-9.]{1,4})(%?))?\)$/;
14692
+ function hasRgb(value) {
14693
+ return !!(value && rgbRE.test(value));
14694
+ }
14692
14695
  const hexRE = /^(#?)([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;
14693
- function parseColor(value) {
14696
+ function hasHex(value) {
14697
+ return !!(value && hexRE.test(value));
14698
+ }
14699
+ function toRgb(value) {
14700
+ if (value) {
14701
+ if (hexRE.test(value)) {
14702
+ return hexToRgb(value);
14703
+ }
14704
+ return parseRgbVal(value);
14705
+ }
14706
+ return null;
14707
+ }
14708
+ function toRgbString(value) {
14709
+ const rgbRest = toRgb(value);
14710
+ if (rgbRest) {
14711
+ return rgbRest.label;
14712
+ }
14713
+ return '';
14714
+ }
14715
+ function toHex(value) {
14716
+ if (value) {
14717
+ if (rgbRE.test(value)) {
14718
+ return rgbValToHex(value);
14719
+ }
14720
+ return parseHexVal(value);
14721
+ }
14722
+ return null;
14723
+ }
14724
+ function toHexString(value) {
14725
+ const hexRest = toHex(value);
14726
+ if (hexRest) {
14727
+ return hexRest.label;
14728
+ }
14729
+ return '';
14730
+ }
14731
+ function toHsl(value) {
14732
+ const rgbRest = toRgb(value);
14733
+ if (rgbRest) {
14734
+ const hslRest = rgbToHsl(rgbRest);
14735
+ if (hslRest) {
14736
+ const rest = Object.assign({ value, type: 'hsl' }, hslRest);
14737
+ return rest;
14738
+ }
14739
+ }
14740
+ return null;
14741
+ }
14742
+ function toHsv(value) {
14743
+ const rgbRest = toRgb(value);
14744
+ if (rgbRest) {
14745
+ const hslRest = rgbToHsv(rgbRest);
14746
+ if (hslRest) {
14747
+ const rest = Object.assign({ value, type: 'hsv' }, hslRest);
14748
+ return rest;
14749
+ }
14750
+ }
14751
+ return null;
14752
+ }
14753
+ function parseColor(val, format) {
14754
+ if (val) {
14755
+ if (format === 'hex') {
14756
+ return toHex(val);
14757
+ }
14758
+ if (format === 'hsl') {
14759
+ return toHsl(val);
14760
+ }
14761
+ if (format === 'hsv') {
14762
+ return toHsv(val);
14763
+ }
14764
+ return toRgb(val);
14765
+ }
14766
+ return null;
14767
+ }
14768
+ function handleNumClamp(val) {
14769
+ return Math.min(1, Math.max(0, val));
14770
+ }
14771
+ function createLightenDarken(isAdd) {
14772
+ return function (val, ratio) {
14773
+ const colorRest = parseColor(val);
14774
+ const hslRest = toHsl(val);
14775
+ if (colorRest && hslRest) {
14776
+ ratio = ratio === 0 ? 0 : ratio || 10;
14777
+ hslRest.l += (isAdd ? ratio : -ratio) / 100;
14778
+ hslRest.l = handleNumClamp(hslRest.l);
14779
+ const rgbRest = hslToRgb(hslRest);
14780
+ if (rgbRest) {
14781
+ if ((colorRest === null || colorRest === void 0 ? void 0 : colorRest.type) === 'hex') {
14782
+ return rgbToHexVal(rgbRest.r, rgbRest.g, rgbRest.b, hslRest.a);
14783
+ }
14784
+ return toValRgb(rgbRest.r, rgbRest.g, rgbRest.b, hslRest.a);
14785
+ }
14786
+ }
14787
+ return val;
14788
+ };
14789
+ }
14790
+ const lighten = createLightenDarken(1);
14791
+ const darken = createLightenDarken(0);
14792
+ function parseHexVal(value) {
14793
+ if (value) {
14794
+ const hexRest = value.match(hexRE);
14795
+ if (hexRest) {
14796
+ const rest = {
14797
+ value,
14798
+ label: value,
14799
+ type: 'hex',
14800
+ hex: value,
14801
+ hexV: hexRest[2],
14802
+ hexA: hexRest[3] || '',
14803
+ a: (hexRest[3] ? hexAlphaKeyMaps[hexRest[3].toUpperCase()] : 1) || 1
14804
+ };
14805
+ return rest;
14806
+ }
14807
+ }
14808
+ return null;
14809
+ }
14810
+ function parseRgbVal(value) {
14811
+ if (value) {
14812
+ const rgbRest = value.match(rgbRE);
14813
+ if (rgbRest) {
14814
+ const rest = {
14815
+ value,
14816
+ label: value,
14817
+ type: (rgbRest[6] ? 'rgba' : 'rgb'),
14818
+ r: parseInt(rgbRest[2]),
14819
+ g: parseInt(rgbRest[3]),
14820
+ b: parseInt(rgbRest[4]),
14821
+ a: rgbRest[7] ? parseInt(rgbRest[6]) / 100 : (rgbRest[6] ? parseFloat(rgbRest[6]) : 1)
14822
+ };
14823
+ return rest;
14824
+ }
14825
+ }
14826
+ return null;
14827
+ }
14828
+ function parseValColor(value) {
14694
14829
  const rest = {
14695
14830
  value: '',
14696
14831
  type: '',
@@ -14703,49 +14838,44 @@ function parseColor(value) {
14703
14838
  a: 1
14704
14839
  };
14705
14840
  if (value) {
14706
- const hexRest = value.match(hexRE);
14707
- if (hexRest) {
14708
- rest.value = value;
14709
- rest.type = 'hex';
14710
- rest.hex = value;
14711
- rest.hexV = hexRest[2];
14712
- rest.hexA = hexRest[3] || '';
14713
- rest.a = (hexRest[3] ? hexAlphaKeyMaps[hexRest[3].toUpperCase()] : 1) || 1;
14841
+ if (hexRE.test(value)) {
14842
+ return Object.assign(rest, parseHexVal(value));
14714
14843
  }
14715
- const rgbRest = value.match(rgbRE);
14716
- if (rgbRest) {
14717
- rest.value = value;
14718
- rest.type = rgbRest[6] ? 'rgba' : 'rgb';
14719
- rest.r = parseInt(rgbRest[2]);
14720
- rest.g = parseInt(rgbRest[3]);
14721
- rest.b = parseInt(rgbRest[4]);
14722
- rest.a = rgbRest[7] ? parseInt(rgbRest[6]) / 100 : (rgbRest[6] ? parseFloat(rgbRest[6]) : 1);
14844
+ else if (rgbRE.test(value)) {
14845
+ return Object.assign(rest, parseRgbVal(value));
14723
14846
  }
14724
14847
  }
14725
14848
  return rest;
14726
14849
  }
14727
14850
  function updateColorAlpha(value, alpha = 1) {
14728
- const colorRest = parseColor(value);
14729
- const { type, hexV, r, g, b } = colorRest;
14730
- if (type === 'rgb' || type === 'rgba') {
14731
- return toRgb(r, g, b, alpha);
14732
- }
14733
- if (type === 'hex') {
14734
- return `#${hexV}${alpha === 1 ? '' : (hexAlphaNumMaps[alpha] || '')}`;
14851
+ const colorRest = parseValColor(value);
14852
+ if (colorRest) {
14853
+ const { type } = colorRest;
14854
+ if (type === 'hex') {
14855
+ return `#${colorRest.hexV}${alpha === 1 ? '' : (hexAlphaNumMaps[alpha] || '')}`;
14856
+ }
14857
+ return toValRgb(colorRest.r, colorRest.g, colorRest.b, alpha);
14735
14858
  }
14736
14859
  return '';
14737
14860
  }
14738
- function toRgb(r, g, b, a) {
14739
- if (XEUtils.eqNull(a)) {
14861
+ function toValRgb(r, g, b, a) {
14862
+ if (XEUtils.eqNull(a) || a === 1) {
14740
14863
  return `rgb(${r},${g},${b})`;
14741
14864
  }
14742
14865
  return `rgba(${r},${g},${b},${a})`;
14743
14866
  }
14744
- function rgbToHex(rgbRest) {
14745
- if (!rgbRest) {
14746
- return '';
14867
+ function rgbValToHex(value) {
14868
+ const rgbRest = parseRgbVal(value);
14869
+ if (rgbRest) {
14870
+ const hexVal = rgbToHexVal(rgbRest.r, rgbRest.g, rgbRest.b, rgbRest.a);
14871
+ if (hexVal) {
14872
+ return parseHexVal(hexVal);
14873
+ }
14747
14874
  }
14748
- const { r, g, b, a = 1 } = rgbRest;
14875
+ return null;
14876
+ }
14877
+ function rgbToHexVal(r, g, b, a) {
14878
+ a = XEUtils.isNumber(a) ? a : 1;
14749
14879
  const hexR = r.toString(16).padStart(2, '0');
14750
14880
  const hexG = g.toString(16).padStart(2, '0');
14751
14881
  const hexB = b.toString(16).padStart(2, '0');
@@ -14796,6 +14926,91 @@ function rgbToHsv(rgbRest) {
14796
14926
  v: XEUtils.round(val, 2)
14797
14927
  };
14798
14928
  }
14929
+ function rgbToHsl(rgbRest) {
14930
+ if (!rgbRest) {
14931
+ return null;
14932
+ }
14933
+ const { r, g, b, a } = rgbRest;
14934
+ const rNorm = r / 255;
14935
+ const gNorm = g / 255;
14936
+ const bNorm = b / 255;
14937
+ const max = Math.max(rNorm, gNorm, bNorm);
14938
+ const min = Math.min(rNorm, gNorm, bNorm);
14939
+ const delta = max - min;
14940
+ let h = 0;
14941
+ let s = 0;
14942
+ const l = (max + min) / 2;
14943
+ if (delta !== 0) {
14944
+ s = l > 0.5 ? delta / (2 - max - min) : delta / (max + min);
14945
+ if (max === rNorm) {
14946
+ h = ((gNorm - bNorm) / delta) % 6;
14947
+ }
14948
+ else if (max === gNorm) {
14949
+ h = (bNorm - rNorm) / delta + 2;
14950
+ }
14951
+ else {
14952
+ h = (rNorm - gNorm) / delta + 4;
14953
+ }
14954
+ h *= 60;
14955
+ if (h < 0) {
14956
+ h += 360;
14957
+ }
14958
+ }
14959
+ return {
14960
+ h,
14961
+ s,
14962
+ l,
14963
+ a: XEUtils.isNumber(a) ? a : 1
14964
+ };
14965
+ }
14966
+ function hslToRgb(slRest) {
14967
+ if (!slRest) {
14968
+ return null;
14969
+ }
14970
+ let { h, s, l } = slRest;
14971
+ const sNorm = s;
14972
+ const lNorm = l;
14973
+ h = ((h % 360) + 360) % 360;
14974
+ const c = (1 - Math.abs(2 * lNorm - 1)) * sNorm;
14975
+ const x = c * (1 - Math.abs((h / 60) % 2 - 1));
14976
+ const m = lNorm - c / 2;
14977
+ let r, g, b;
14978
+ if (h >= 0 && h < 60) {
14979
+ r = c;
14980
+ g = x;
14981
+ b = 0;
14982
+ }
14983
+ else if (h >= 60 && h < 120) {
14984
+ r = x;
14985
+ g = c;
14986
+ b = 0;
14987
+ }
14988
+ else if (h >= 120 && h < 180) {
14989
+ r = 0;
14990
+ g = c;
14991
+ b = x;
14992
+ }
14993
+ else if (h >= 180 && h < 240) {
14994
+ r = 0;
14995
+ g = x;
14996
+ b = c;
14997
+ }
14998
+ else if (h >= 240 && h < 300) {
14999
+ r = x;
15000
+ g = 0;
15001
+ b = c;
15002
+ }
15003
+ else {
15004
+ r = c;
15005
+ g = 0;
15006
+ b = x;
15007
+ }
15008
+ return {
15009
+ r: Math.round((r + m) * 255),
15010
+ g: Math.round((g + m) * 255),
15011
+ b: Math.round((b + m) * 255)
15012
+ };
15013
+ }
14799
15014
  function hsvToRgb(h, s, v) {
14800
15015
  let r = 0;
14801
15016
  let g = 0;
@@ -14854,11 +15069,18 @@ function hexToRgb(str) {
14854
15069
  if (str) {
14855
15070
  const rests = str.match(/^(#?)([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})?$/);
14856
15071
  if (rests) {
15072
+ const r = parseInt(rests[2], 16);
15073
+ const g = parseInt(rests[3], 16);
15074
+ const b = parseInt(rests[4], 16);
15075
+ const a = (rests[5] ? hexAlphaKeyMaps[rests[5].toUpperCase()] : 1) || 1;
14857
15076
  return {
14858
- r: parseInt(rests[2], 16),
14859
- g: parseInt(rests[3], 16),
14860
- b: parseInt(rests[4], 16),
14861
- a: (rests[5] ? hexAlphaKeyMaps[rests[5].toUpperCase()] : 1) || 1
15077
+ value: str,
15078
+ label: toValRgb(r, g, b, rests[5] ? a : null),
15079
+ type: (rests[5] ? 'rgba' : 'rgb'),
15080
+ r,
15081
+ g,
15082
+ b,
15083
+ a
14862
15084
  };
14863
15085
  }
14864
15086
  }
@@ -15973,6 +16195,7 @@ var VxeColorPickerComponent = defineVxeComponent({
15973
16195
  const $xeModal = inject('$xeModal', null);
15974
16196
  const $xeDrawer = inject('$xeDrawer', null);
15975
16197
  const $xeTable = inject('$xeTable', null);
16198
+ const $xeCard = inject('$xeCard', null);
15976
16199
  const $xeForm = inject('$xeForm', null);
15977
16200
  const formItemInfo = inject('xeFormItemInfo', null);
15978
16201
  const WinEyeDropper = typeof window !== 'undefined' ? window.EyeDropper : null;
@@ -16039,7 +16262,7 @@ var VxeColorPickerComponent = defineVxeComponent({
16039
16262
  if (XEUtils.isBoolean(globalTransfer)) {
16040
16263
  return globalTransfer;
16041
16264
  }
16042
- if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
16265
+ if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
16043
16266
  return true;
16044
16267
  }
16045
16268
  }
@@ -16108,32 +16331,43 @@ var VxeColorPickerComponent = defineVxeComponent({
16108
16331
  const isRgb = computeIsRgb.value;
16109
16332
  const hueSliderEl = refHueSliderElem.value;
16110
16333
  const alphaSliderEl = refAlphaSliderElem.value;
16111
- const colorRest = parseColor(selectColor);
16112
- reactData.hexValue = colorRest.hex;
16113
- reactData.rValue = colorRest.r;
16114
- reactData.gValue = colorRest.g;
16115
- reactData.bValue = colorRest.b;
16116
- reactData.aValue = colorRest.a;
16117
- if (colorRest.value) {
16118
- if (isRgb) {
16119
- if (colorRest.type === 'hex') {
16120
- const rgbRest = hexToRgb(colorRest.hex);
16121
- if (rgbRest) {
16122
- reactData.rValue = rgbRest.r;
16123
- reactData.gValue = rgbRest.g;
16124
- reactData.bValue = rgbRest.b;
16125
- reactData.aValue = rgbRest.a;
16126
- }
16127
- }
16334
+ const colorRest = parseValColor(selectColor);
16335
+ reactData.hexValue = '';
16336
+ reactData.rValue = 0;
16337
+ reactData.gValue = 0;
16338
+ reactData.bValue = 0;
16339
+ reactData.aValue = 1;
16340
+ if (colorRest) {
16341
+ if (colorRest.type === 'hex') {
16342
+ reactData.hexValue = colorRest.hex;
16128
16343
  }
16129
16344
  else {
16130
- if (colorRest.type !== 'hex') {
16131
- reactData.hexValue = rgbToHex(colorRest);
16345
+ reactData.rValue = colorRest.r;
16346
+ reactData.gValue = colorRest.g;
16347
+ reactData.bValue = colorRest.b;
16348
+ reactData.aValue = colorRest.a;
16349
+ }
16350
+ if (colorRest.value) {
16351
+ if (isRgb) {
16352
+ if (colorRest.type === 'hex') {
16353
+ const rgbRest = hexToRgb(colorRest.hex);
16354
+ if (rgbRest) {
16355
+ reactData.rValue = rgbRest.r;
16356
+ reactData.gValue = rgbRest.g;
16357
+ reactData.bValue = rgbRest.b;
16358
+ reactData.aValue = rgbRest.a;
16359
+ }
16360
+ }
16361
+ }
16362
+ else {
16363
+ if (colorRest.type !== 'hex') {
16364
+ reactData.hexValue = rgbToHexVal(colorRest.r, colorRest.g, colorRest.b, colorRest.a);
16365
+ }
16132
16366
  }
16133
16367
  }
16134
16368
  }
16135
16369
  if (isAniVisible) {
16136
- const hsvRest = colorRest.type === 'hex' ? hexToHsv(colorRest.hex) : rgbToHsv(colorRest);
16370
+ const hsvRest = colorRest ? (colorRest.type === 'hex' ? hexToHsv(colorRest.hex) : rgbToHsv(colorRest)) : null;
16137
16371
  const colorPanelEl = refColorPanelElem.value;
16138
16372
  if (hsvRest) {
16139
16373
  if (colorPanelEl) {
@@ -16146,7 +16380,7 @@ var VxeColorPickerComponent = defineVxeComponent({
16146
16380
  }
16147
16381
  }
16148
16382
  if (alphaSliderEl) {
16149
- handleAlphaColor(alphaSliderEl.clientWidth * colorRest.a);
16383
+ handleAlphaColor(alphaSliderEl.clientWidth * reactData.aValue);
16150
16384
  }
16151
16385
  }
16152
16386
  };
@@ -16309,7 +16543,7 @@ var VxeColorPickerComponent = defineVxeComponent({
16309
16543
  gNum = itemNum - offsetNum;
16310
16544
  break;
16311
16545
  }
16312
- reactData.panelColor = toRgb(rNum, gNum, bNum);
16546
+ reactData.panelColor = toValRgb(rNum, gNum, bNum);
16313
16547
  hueSliderBtnEl.style.left = toCssUnit(offsetLeft);
16314
16548
  }
16315
16549
  };
@@ -16379,7 +16613,7 @@ var VxeColorPickerComponent = defineVxeComponent({
16379
16613
  };
16380
16614
  const handleInputRgbEvent = () => {
16381
16615
  const { rValue, gValue, bValue, aValue } = reactData;
16382
- reactData.selectColor = toRgb(rValue, gValue, bValue, aValue);
16616
+ reactData.selectColor = toValRgb(rValue, gValue, bValue, aValue);
16383
16617
  updateModelColor();
16384
16618
  };
16385
16619
  const handleInputAlphaEvent = () => {
@@ -16430,12 +16664,12 @@ var VxeColorPickerComponent = defineVxeComponent({
16430
16664
  const colorPanelRect = colorPanelEl.getBoundingClientRect();
16431
16665
  const offsetTop = Math.min(clientHeight, Math.max(0, clientY - colorPanelRect.y));
16432
16666
  const offsetLeft = Math.min(clientWidth, Math.max(0, clientX - colorPanelRect.x));
16433
- const colorRest = parseColor(panelColor);
16667
+ const colorRest = parseValColor(panelColor);
16434
16668
  if (colorRest) {
16435
16669
  const hsvRest = colorRest.type === 'hex' ? hexToHsv(colorRest.hex) : rgbToHsv(colorRest);
16436
16670
  if (hsvRest) {
16437
16671
  const ragRest = hsvToRgb(hsvRest.h, offsetLeft / clientWidth, (1 - offsetTop / clientHeight));
16438
- reactData.selectColor = toRgb(ragRest.r, ragRest.g, ragRest.b, showAlpha ? aValue : null);
16672
+ reactData.selectColor = toValRgb(ragRest.r, ragRest.g, ragRest.b, showAlpha ? aValue : null);
16439
16673
  updateModelColor();
16440
16674
  }
16441
16675
  }
@@ -16771,7 +17005,7 @@ var VxeColorPickerComponent = defineVxeComponent({
16771
17005
  reactData.hexValue = val;
16772
17006
  },
16773
17007
  onChange() {
16774
- const colorRest = parseColor(reactData.hexValue);
17008
+ const colorRest = parseValColor(reactData.hexValue);
16775
17009
  if (colorRest) {
16776
17010
  if (colorRest.value) {
16777
17011
  reactData.selectColor = colorRest.value;
@@ -16940,6 +17174,19 @@ const VxeColorPicker = Object.assign({}, VxeColorPickerComponent, {
16940
17174
  });
16941
17175
  dynamicApp.use(VxeColorPicker);
16942
17176
  VxeUI.component(VxeColorPickerComponent);
17177
+ VxeUI.color = {
17178
+ parseColor,
17179
+ hasRgb,
17180
+ hasHex,
17181
+ toRgb,
17182
+ toRgbString,
17183
+ toHex,
17184
+ toHexString,
17185
+ toHsl,
17186
+ toHsv,
17187
+ lighten,
17188
+ darken
17189
+ };
16943
17190
  const ColorPicker = VxeColorPicker;
16944
17191
 
16945
17192
  function createInternalData$f() {
@@ -20026,6 +20273,7 @@ var VxeDatePickerComponent = defineVxeComponent({
20026
20273
  const $xeModal = inject('$xeModal', null);
20027
20274
  const $xeDrawer = inject('$xeDrawer', null);
20028
20275
  const $xeTable = inject('$xeTable', null);
20276
+ const $xeCard = inject('$xeCard', null);
20029
20277
  const $xeForm = inject('$xeForm', null);
20030
20278
  const formItemInfo = inject('xeFormItemInfo', null);
20031
20279
  const xID = XEUtils.uniqueId();
@@ -20060,7 +20308,7 @@ var VxeDatePickerComponent = defineVxeComponent({
20060
20308
  if (XEUtils.isBoolean(globalTransfer)) {
20061
20309
  return globalTransfer;
20062
20310
  }
20063
- if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
20311
+ if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
20064
20312
  return true;
20065
20313
  }
20066
20314
  }
@@ -21642,6 +21890,7 @@ var VxeDateRangePickerComponent = defineVxeComponent({
21642
21890
  const $xeModal = inject('$xeModal', null);
21643
21891
  const $xeDrawer = inject('$xeDrawer', null);
21644
21892
  const $xeTable = inject('$xeTable', null);
21893
+ const $xeCard = inject('$xeCard', null);
21645
21894
  const $xeForm = inject('$xeForm', null);
21646
21895
  const formItemInfo = inject('xeFormItemInfo', null);
21647
21896
  const xID = XEUtils.uniqueId();
@@ -21678,7 +21927,7 @@ var VxeDateRangePickerComponent = defineVxeComponent({
21678
21927
  if (XEUtils.isBoolean(globalTransfer)) {
21679
21928
  return globalTransfer;
21680
21929
  }
21681
- if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
21930
+ if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
21682
21931
  return true;
21683
21932
  }
21684
21933
  }
@@ -31218,6 +31467,7 @@ var VxeSelectComponent = defineVxeComponent({
31218
31467
  const $xeModal = inject('$xeModal', null);
31219
31468
  const $xeDrawer = inject('$xeDrawer', null);
31220
31469
  const $xeTable = inject('$xeTable', null);
31470
+ const $xeCard = inject('$xeCard', null);
31221
31471
  const $xeForm = inject('$xeForm', null);
31222
31472
  const formItemInfo = inject('xeFormItemInfo', null);
31223
31473
  const xID = XEUtils.uniqueId();
@@ -31272,7 +31522,7 @@ var VxeSelectComponent = defineVxeComponent({
31272
31522
  if (XEUtils.isBoolean(globalTransfer)) {
31273
31523
  return globalTransfer;
31274
31524
  }
31275
- if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
31525
+ if ($xeTable || $xeModal || $xeDrawer || $xeCard || $xeForm) {
31276
31526
  return true;
31277
31527
  }
31278
31528
  }