xrk-components 2.0.0-beta.77 → 2.0.0-beta.79

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/lib/index.css CHANGED
@@ -20430,13 +20430,21 @@
20430
20430
  -webkit-transform: translateX(-100%);
20431
20431
  transform: translateX(-100%);
20432
20432
  }
20433
- .base-layout-menu .sub-menus .content .menu .sub-menu[data-v-1bea9a2a]:hover, .base-layout-menu .sub-menus .content .menu .sub-menu.active[data-v-1bea9a2a] {
20433
+ .base-layout-menu .sub-menus .content .menu .sub-menu[data-v-1bea9a2a]:not(.active):hover {
20434
+ color: var(--xrk-color-primary);
20435
+ -webkit-transition: all 0.15s;
20436
+ transition: all 0.15s;
20437
+ }
20438
+ .base-layout-menu .sub-menus .content .menu .sub-menu[data-v-1bea9a2a]:not(.active):hover::after {
20439
+ opacity: 0;
20440
+ }
20441
+ .base-layout-menu .sub-menus .content .menu .sub-menu.active[data-v-1bea9a2a] {
20434
20442
  color: var(--xrk-color-primary);
20435
20443
  background-color: var(--xrk-color-primary-light-9);
20436
20444
  -webkit-transition: all 0.15s;
20437
20445
  transition: all 0.15s;
20438
20446
  }
20439
- .base-layout-menu .sub-menus .content .menu .sub-menu[data-v-1bea9a2a]:hover::after, .base-layout-menu .sub-menus .content .menu .sub-menu.active[data-v-1bea9a2a]::after {
20447
+ .base-layout-menu .sub-menus .content .menu .sub-menu.active[data-v-1bea9a2a]::after {
20440
20448
  -webkit-transform: translateX(0);
20441
20449
  transform: translateX(0);
20442
20450
  }
@@ -20521,6 +20529,9 @@
20521
20529
  flex-shrink: 0;
20522
20530
  width: var(--base-layout-menu-width, 140px);
20523
20531
  background-color: #fff;
20532
+ z-index: 2;
20533
+ }
20534
+ .base-layout-main > .content > .menu[data-v-3f66cd84]:hover {
20524
20535
  z-index: 3;
20525
20536
  }
20526
20537
  .base-layout-main > .content > .body[data-v-3f66cd84] {
package/lib/index.esm.js CHANGED
@@ -864,7 +864,7 @@ function easeInOutCubic(t, b, c, d) {
864
864
  }
865
865
 
866
866
  /**
867
- * @vue/shared v3.5.13
867
+ * @vue/shared v3.5.17
868
868
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
869
869
  * @license MIT
870
870
  **/
@@ -21106,8 +21106,9 @@ function getOppositeAxis(axis) {
21106
21106
  function getAxisLength(axis) {
21107
21107
  return axis === 'y' ? 'height' : 'width';
21108
21108
  }
21109
+ const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
21109
21110
  function getSideAxis(placement) {
21110
- return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
21111
+ return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
21111
21112
  }
21112
21113
  function getAlignmentAxis(placement) {
21113
21114
  return getOppositeAxis(getSideAxis(placement));
@@ -21132,19 +21133,19 @@ function getExpandedPlacements(placement) {
21132
21133
  function getOppositeAlignmentPlacement(placement) {
21133
21134
  return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
21134
21135
  }
21136
+ const lrPlacement = ['left', 'right'];
21137
+ const rlPlacement = ['right', 'left'];
21138
+ const tbPlacement = ['top', 'bottom'];
21139
+ const btPlacement = ['bottom', 'top'];
21135
21140
  function getSideList(side, isStart, rtl) {
21136
- const lr = ['left', 'right'];
21137
- const rl = ['right', 'left'];
21138
- const tb = ['top', 'bottom'];
21139
- const bt = ['bottom', 'top'];
21140
21141
  switch (side) {
21141
21142
  case 'top':
21142
21143
  case 'bottom':
21143
- if (rtl) return isStart ? rl : lr;
21144
- return isStart ? lr : rl;
21144
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
21145
+ return isStart ? lrPlacement : rlPlacement;
21145
21146
  case 'left':
21146
21147
  case 'right':
21147
- return isStart ? tb : bt;
21148
+ return isStart ? tbPlacement : btPlacement;
21148
21149
  default:
21149
21150
  return [];
21150
21151
  }
@@ -21667,16 +21668,22 @@ const flip$1 = function (options) {
21667
21668
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
21668
21669
  const nextPlacement = placements[nextIndex];
21669
21670
  if (nextPlacement) {
21670
- // Try next placement and re-run the lifecycle.
21671
- return {
21672
- data: {
21673
- index: nextIndex,
21674
- overflows: overflowsData
21675
- },
21676
- reset: {
21677
- placement: nextPlacement
21678
- }
21679
- };
21671
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
21672
+ if (!ignoreCrossAxisOverflow ||
21673
+ // We leave the current main axis only if every placement on that axis
21674
+ // overflows the main axis.
21675
+ overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
21676
+ // Try next placement and re-run the lifecycle.
21677
+ return {
21678
+ data: {
21679
+ index: nextIndex,
21680
+ overflows: overflowsData
21681
+ },
21682
+ reset: {
21683
+ placement: nextPlacement
21684
+ }
21685
+ };
21686
+ }
21680
21687
  }
21681
21688
 
21682
21689
  // First, find the candidates that fit on the mainAxis side of overflow,
@@ -21922,6 +21929,8 @@ const inline = function (options) {
21922
21929
  };
21923
21930
  };
21924
21931
 
21932
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
21933
+
21925
21934
  // For type backwards-compatibility, the `OffsetOptions` type was also
21926
21935
  // Derivable.
21927
21936
 
@@ -21935,7 +21944,7 @@ async function convertValueToCoords(state, options) {
21935
21944
  const side = getSide(placement);
21936
21945
  const alignment = getAlignment(placement);
21937
21946
  const isVertical = getSideAxis(placement) === 'y';
21938
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
21947
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
21939
21948
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
21940
21949
  const rawValue = evaluate(options, state);
21941
21950
 
@@ -22135,7 +22144,7 @@ const limitShift = function (options) {
22135
22144
  if (checkCrossAxis) {
22136
22145
  var _middlewareData$offse, _middlewareData$offse2;
22137
22146
  const len = mainAxis === 'y' ? 'width' : 'height';
22138
- const isOriginSide = ['top', 'left'].includes(getSide(placement));
22147
+ const isOriginSide = originSides.has(getSide(placement));
22139
22148
  const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
22140
22149
  const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
22141
22150
  if (crossAxisCoord < limitMin) {
@@ -22280,6 +22289,7 @@ function isShadowRoot(value) {
22280
22289
  }
22281
22290
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
22282
22291
  }
22292
+ const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
22283
22293
  function isOverflowElement(element) {
22284
22294
  const {
22285
22295
  overflow,
@@ -22287,27 +22297,32 @@ function isOverflowElement(element) {
22287
22297
  overflowY,
22288
22298
  display
22289
22299
  } = getComputedStyle$1(element);
22290
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
22300
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
22291
22301
  }
22302
+ const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
22292
22303
  function isTableElement(element) {
22293
- return ['table', 'td', 'th'].includes(getNodeName(element));
22304
+ return tableElements.has(getNodeName(element));
22294
22305
  }
22306
+ const topLayerSelectors = [':popover-open', ':modal'];
22295
22307
  function isTopLayer(element) {
22296
- return [':popover-open', ':modal'].some(selector => {
22308
+ return topLayerSelectors.some(selector => {
22297
22309
  try {
22298
22310
  return element.matches(selector);
22299
- } catch (e) {
22311
+ } catch (_e) {
22300
22312
  return false;
22301
22313
  }
22302
22314
  });
22303
22315
  }
22316
+ const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
22317
+ const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
22318
+ const containValues = ['paint', 'layout', 'strict', 'content'];
22304
22319
  function isContainingBlock(elementOrCss) {
22305
22320
  const webkit = isWebKit();
22306
22321
  const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
22307
22322
 
22308
22323
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
22309
22324
  // https://drafts.csswg.org/css-transforms-2/#individual-transforms
22310
- return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
22325
+ return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
22311
22326
  }
22312
22327
  function getContainingBlock(element) {
22313
22328
  let currentNode = getParentNode(element);
@@ -22325,8 +22340,9 @@ function isWebKit() {
22325
22340
  if (typeof CSS === 'undefined' || !CSS.supports) return false;
22326
22341
  return CSS.supports('-webkit-backdrop-filter', 'none');
22327
22342
  }
22343
+ const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
22328
22344
  function isLastTraversableNode(node) {
22329
- return ['html', 'body', '#document'].includes(getNodeName(node));
22345
+ return lastTraversableNodeNames.has(getNodeName(node));
22330
22346
  }
22331
22347
  function getComputedStyle$1(element) {
22332
22348
  return getWindow(element).getComputedStyle(element);
@@ -22631,6 +22647,7 @@ function getViewportRect(element, strategy) {
22631
22647
  };
22632
22648
  }
22633
22649
 
22650
+ const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
22634
22651
  // Returns the inner client rect, subtracting scrollbars if present.
22635
22652
  function getInnerBoundingClientRect(element, strategy) {
22636
22653
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
@@ -22695,7 +22712,7 @@ function getClippingElementAncestors(element, cache) {
22695
22712
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
22696
22713
  currentContainingBlockComputedStyle = null;
22697
22714
  }
22698
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
22715
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
22699
22716
  if (shouldDropCurrentNode) {
22700
22717
  // Drop non-containing blocks.
22701
22718
  result = result.filter(ancestor => ancestor !== currentNode);
@@ -22758,6 +22775,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
22758
22775
  scrollTop: 0
22759
22776
  };
22760
22777
  const offsets = createCoords(0);
22778
+
22779
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
22780
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
22781
+ function setLeftRTLScrollbarOffset() {
22782
+ offsets.x = getWindowScrollBarX(documentElement);
22783
+ }
22761
22784
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
22762
22785
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
22763
22786
  scroll = getNodeScroll(offsetParent);
@@ -22767,11 +22790,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
22767
22790
  offsets.x = offsetRect.x + offsetParent.clientLeft;
22768
22791
  offsets.y = offsetRect.y + offsetParent.clientTop;
22769
22792
  } else if (documentElement) {
22770
- // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
22771
- // Firefox with layout.scrollbar.side = 3 in about:config to test this.
22772
- offsets.x = getWindowScrollBarX(documentElement);
22793
+ setLeftRTLScrollbarOffset();
22773
22794
  }
22774
22795
  }
22796
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
22797
+ setLeftRTLScrollbarOffset();
22798
+ }
22775
22799
  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
22776
22800
  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
22777
22801
  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
@@ -22948,7 +22972,7 @@ function observeMove(element, onMove) {
22948
22972
  // Handle <iframe>s
22949
22973
  root: root.ownerDocument
22950
22974
  });
22951
- } catch (e) {
22975
+ } catch (_e) {
22952
22976
  io = new IntersectionObserver(handleObserve, options);
22953
22977
  }
22954
22978
  io.observe(element);
@@ -74169,7 +74193,6 @@ var script$h = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$f
74169
74193
  render: { type: null, required: false },
74170
74194
  useDefaultRender: { type: Boolean, required: false, default: true }
74171
74195
  }, emits: ["update:modelValue", "change", "expand-change", "blur", "focus", "visible-change", "remove-tag"], setup: function (__props, _a) {
74172
- var _b;
74173
74196
  var expose = _a.expose, emits = _a.emit;
74174
74197
  var _props = __props;
74175
74198
  var cascaderProps = computed(function () {
@@ -74213,8 +74236,12 @@ var script$h = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$f
74213
74236
  var handleRemoveTag = function (val) {
74214
74237
  emits('remove-tag', val);
74215
74238
  };
74239
+ var getCheckedNodes = function () {
74240
+ var _a;
74241
+ return (_a = BaseCascaderRef.value) === null || _a === void 0 ? void 0 : _a.getCheckedNodes();
74242
+ };
74216
74243
  expose({
74217
- getCheckedNodes: (_b = BaseCascaderRef.value) === null || _b === void 0 ? void 0 : _b.getCheckedNodes
74244
+ getCheckedNodes: getCheckedNodes
74218
74245
  });
74219
74246
  return function (_ctx, _cache) {
74220
74247
  return (openBlock(), createBlock(unref(ElCascader), {
@@ -75078,7 +75105,10 @@ var script$b = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$b
75078
75105
  httpRequest: { type: Function, required: true },
75079
75106
  beforeSelected: { type: Function, required: false },
75080
75107
  beforeRemove: { type: Function, required: false },
75081
- onPreview: { type: Function, required: false }
75108
+ onPreview: { type: Function, required: false },
75109
+ keys: { type: Object, required: false, default: function () {
75110
+ return { name: 'name', url: 'url' };
75111
+ } }
75082
75112
  }, emits: ["update:fileList", "change", "error", "preview"], setup: function (__props, _a) {
75083
75113
  var _this = this;
75084
75114
  var _b;
@@ -75097,7 +75127,9 @@ var script$b = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$b
75097
75127
  return (((_a = props.accept) === null || _a === void 0 ? void 0 : _a.map(function (i) { return [i.toLocaleLowerCase(), i.toLocaleUpperCase()]; }).flat(1).join(',')) || '');
75098
75128
  });
75099
75129
  watch(function () { return props.fileList; }, function (newV) {
75100
- fileList.value = __spreadArray([], __read((newV || [])), false);
75130
+ fileList.value = __spreadArray([], __read((newV || []).map(function (item) {
75131
+ return __assign(__assign({}, item), { name: item[_props.keys.name], url: item[_props.keys.url] });
75132
+ })), false);
75101
75133
  }, { immediate: true, deep: true });
75102
75134
  var slots = (_b = getCurrentInstance()) === null || _b === void 0 ? void 0 : _b.slots;
75103
75135
  var onChooseFileClick = function () {
@@ -75163,7 +75195,10 @@ var script$b = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$b
75163
75195
  var url = (_k = (_h = (_f = (_c = (_b = (_a = item.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.fileUrl) !== null && _c !== void 0 ? _c : (_e = (_d = item.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.url) !== null && _f !== void 0 ? _f : (_g = item.response) === null || _g === void 0 ? void 0 : _g.fileUrl) !== null && _h !== void 0 ? _h : (_j = item.response) === null || _j === void 0 ? void 0 : _j.url) !== null && _k !== void 0 ? _k : '';
75164
75196
  return __assign(__assign({}, item), (url && { url: url }));
75165
75197
  });
75166
- emits('update:fileList', fileList.value);
75198
+ emits('update:fileList', fileList.value.map(function (item) {
75199
+ var _a;
75200
+ return __assign(__assign({}, item), (_a = {}, _a[_props.keys.name] = item.name, _a[_props.keys.url] = item.url, _a));
75201
+ }));
75167
75202
  };
75168
75203
  var handleBeforeUpload = function (rawFile) { return __awaiter(_this, void 0, void 0, function () {
75169
75204
  var error_2;
package/lib/index.umd.js CHANGED
@@ -867,7 +867,7 @@
867
867
  }
868
868
 
869
869
  /**
870
- * @vue/shared v3.5.13
870
+ * @vue/shared v3.5.17
871
871
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
872
872
  * @license MIT
873
873
  **/
@@ -21109,8 +21109,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
21109
21109
  function getAxisLength(axis) {
21110
21110
  return axis === 'y' ? 'height' : 'width';
21111
21111
  }
21112
+ const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
21112
21113
  function getSideAxis(placement) {
21113
- return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
21114
+ return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
21114
21115
  }
21115
21116
  function getAlignmentAxis(placement) {
21116
21117
  return getOppositeAxis(getSideAxis(placement));
@@ -21135,19 +21136,19 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
21135
21136
  function getOppositeAlignmentPlacement(placement) {
21136
21137
  return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
21137
21138
  }
21139
+ const lrPlacement = ['left', 'right'];
21140
+ const rlPlacement = ['right', 'left'];
21141
+ const tbPlacement = ['top', 'bottom'];
21142
+ const btPlacement = ['bottom', 'top'];
21138
21143
  function getSideList(side, isStart, rtl) {
21139
- const lr = ['left', 'right'];
21140
- const rl = ['right', 'left'];
21141
- const tb = ['top', 'bottom'];
21142
- const bt = ['bottom', 'top'];
21143
21144
  switch (side) {
21144
21145
  case 'top':
21145
21146
  case 'bottom':
21146
- if (rtl) return isStart ? rl : lr;
21147
- return isStart ? lr : rl;
21147
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
21148
+ return isStart ? lrPlacement : rlPlacement;
21148
21149
  case 'left':
21149
21150
  case 'right':
21150
- return isStart ? tb : bt;
21151
+ return isStart ? tbPlacement : btPlacement;
21151
21152
  default:
21152
21153
  return [];
21153
21154
  }
@@ -21670,16 +21671,22 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
21670
21671
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
21671
21672
  const nextPlacement = placements[nextIndex];
21672
21673
  if (nextPlacement) {
21673
- // Try next placement and re-run the lifecycle.
21674
- return {
21675
- data: {
21676
- index: nextIndex,
21677
- overflows: overflowsData
21678
- },
21679
- reset: {
21680
- placement: nextPlacement
21681
- }
21682
- };
21674
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
21675
+ if (!ignoreCrossAxisOverflow ||
21676
+ // We leave the current main axis only if every placement on that axis
21677
+ // overflows the main axis.
21678
+ overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
21679
+ // Try next placement and re-run the lifecycle.
21680
+ return {
21681
+ data: {
21682
+ index: nextIndex,
21683
+ overflows: overflowsData
21684
+ },
21685
+ reset: {
21686
+ placement: nextPlacement
21687
+ }
21688
+ };
21689
+ }
21683
21690
  }
21684
21691
 
21685
21692
  // First, find the candidates that fit on the mainAxis side of overflow,
@@ -21925,6 +21932,8 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
21925
21932
  };
21926
21933
  };
21927
21934
 
21935
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
21936
+
21928
21937
  // For type backwards-compatibility, the `OffsetOptions` type was also
21929
21938
  // Derivable.
21930
21939
 
@@ -21938,7 +21947,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
21938
21947
  const side = getSide(placement);
21939
21948
  const alignment = getAlignment(placement);
21940
21949
  const isVertical = getSideAxis(placement) === 'y';
21941
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
21950
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
21942
21951
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
21943
21952
  const rawValue = evaluate(options, state);
21944
21953
 
@@ -22138,7 +22147,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22138
22147
  if (checkCrossAxis) {
22139
22148
  var _middlewareData$offse, _middlewareData$offse2;
22140
22149
  const len = mainAxis === 'y' ? 'width' : 'height';
22141
- const isOriginSide = ['top', 'left'].includes(getSide(placement));
22150
+ const isOriginSide = originSides.has(getSide(placement));
22142
22151
  const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
22143
22152
  const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
22144
22153
  if (crossAxisCoord < limitMin) {
@@ -22283,6 +22292,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22283
22292
  }
22284
22293
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
22285
22294
  }
22295
+ const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
22286
22296
  function isOverflowElement(element) {
22287
22297
  const {
22288
22298
  overflow,
@@ -22290,27 +22300,32 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22290
22300
  overflowY,
22291
22301
  display
22292
22302
  } = getComputedStyle$1(element);
22293
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
22303
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
22294
22304
  }
22305
+ const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
22295
22306
  function isTableElement(element) {
22296
- return ['table', 'td', 'th'].includes(getNodeName(element));
22307
+ return tableElements.has(getNodeName(element));
22297
22308
  }
22309
+ const topLayerSelectors = [':popover-open', ':modal'];
22298
22310
  function isTopLayer(element) {
22299
- return [':popover-open', ':modal'].some(selector => {
22311
+ return topLayerSelectors.some(selector => {
22300
22312
  try {
22301
22313
  return element.matches(selector);
22302
- } catch (e) {
22314
+ } catch (_e) {
22303
22315
  return false;
22304
22316
  }
22305
22317
  });
22306
22318
  }
22319
+ const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
22320
+ const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
22321
+ const containValues = ['paint', 'layout', 'strict', 'content'];
22307
22322
  function isContainingBlock(elementOrCss) {
22308
22323
  const webkit = isWebKit();
22309
22324
  const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
22310
22325
 
22311
22326
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
22312
22327
  // https://drafts.csswg.org/css-transforms-2/#individual-transforms
22313
- return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
22328
+ return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
22314
22329
  }
22315
22330
  function getContainingBlock(element) {
22316
22331
  let currentNode = getParentNode(element);
@@ -22328,8 +22343,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22328
22343
  if (typeof CSS === 'undefined' || !CSS.supports) return false;
22329
22344
  return CSS.supports('-webkit-backdrop-filter', 'none');
22330
22345
  }
22346
+ const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
22331
22347
  function isLastTraversableNode(node) {
22332
- return ['html', 'body', '#document'].includes(getNodeName(node));
22348
+ return lastTraversableNodeNames.has(getNodeName(node));
22333
22349
  }
22334
22350
  function getComputedStyle$1(element) {
22335
22351
  return getWindow(element).getComputedStyle(element);
@@ -22634,6 +22650,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22634
22650
  };
22635
22651
  }
22636
22652
 
22653
+ const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
22637
22654
  // Returns the inner client rect, subtracting scrollbars if present.
22638
22655
  function getInnerBoundingClientRect(element, strategy) {
22639
22656
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
@@ -22698,7 +22715,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22698
22715
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
22699
22716
  currentContainingBlockComputedStyle = null;
22700
22717
  }
22701
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
22718
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
22702
22719
  if (shouldDropCurrentNode) {
22703
22720
  // Drop non-containing blocks.
22704
22721
  result = result.filter(ancestor => ancestor !== currentNode);
@@ -22761,6 +22778,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22761
22778
  scrollTop: 0
22762
22779
  };
22763
22780
  const offsets = createCoords(0);
22781
+
22782
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
22783
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
22784
+ function setLeftRTLScrollbarOffset() {
22785
+ offsets.x = getWindowScrollBarX(documentElement);
22786
+ }
22764
22787
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
22765
22788
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
22766
22789
  scroll = getNodeScroll(offsetParent);
@@ -22770,11 +22793,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22770
22793
  offsets.x = offsetRect.x + offsetParent.clientLeft;
22771
22794
  offsets.y = offsetRect.y + offsetParent.clientTop;
22772
22795
  } else if (documentElement) {
22773
- // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
22774
- // Firefox with layout.scrollbar.side = 3 in about:config to test this.
22775
- offsets.x = getWindowScrollBarX(documentElement);
22796
+ setLeftRTLScrollbarOffset();
22776
22797
  }
22777
22798
  }
22799
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
22800
+ setLeftRTLScrollbarOffset();
22801
+ }
22778
22802
  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
22779
22803
  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
22780
22804
  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
@@ -22951,7 +22975,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
22951
22975
  // Handle <iframe>s
22952
22976
  root: root.ownerDocument
22953
22977
  });
22954
- } catch (e) {
22978
+ } catch (_e) {
22955
22979
  io = new IntersectionObserver(handleObserve, options);
22956
22980
  }
22957
22981
  io.observe(element);
@@ -74172,7 +74196,6 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74172
74196
  render: { type: null, required: false },
74173
74197
  useDefaultRender: { type: Boolean, required: false, default: true }
74174
74198
  }, emits: ["update:modelValue", "change", "expand-change", "blur", "focus", "visible-change", "remove-tag"], setup: function (__props, _a) {
74175
- var _b;
74176
74199
  var expose = _a.expose, emits = _a.emit;
74177
74200
  var _props = __props;
74178
74201
  var cascaderProps = vue.computed(function () {
@@ -74216,8 +74239,12 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74216
74239
  var handleRemoveTag = function (val) {
74217
74240
  emits('remove-tag', val);
74218
74241
  };
74242
+ var getCheckedNodes = function () {
74243
+ var _a;
74244
+ return (_a = BaseCascaderRef.value) === null || _a === void 0 ? void 0 : _a.getCheckedNodes();
74245
+ };
74219
74246
  expose({
74220
- getCheckedNodes: (_b = BaseCascaderRef.value) === null || _b === void 0 ? void 0 : _b.getCheckedNodes
74247
+ getCheckedNodes: getCheckedNodes
74221
74248
  });
74222
74249
  return function (_ctx, _cache) {
74223
74250
  return (vue.openBlock(), vue.createBlock(vue.unref(ElCascader), {
@@ -75081,7 +75108,10 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
75081
75108
  httpRequest: { type: Function, required: true },
75082
75109
  beforeSelected: { type: Function, required: false },
75083
75110
  beforeRemove: { type: Function, required: false },
75084
- onPreview: { type: Function, required: false }
75111
+ onPreview: { type: Function, required: false },
75112
+ keys: { type: Object, required: false, default: function () {
75113
+ return { name: 'name', url: 'url' };
75114
+ } }
75085
75115
  }, emits: ["update:fileList", "change", "error", "preview"], setup: function (__props, _a) {
75086
75116
  var _this = this;
75087
75117
  var _b;
@@ -75100,7 +75130,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
75100
75130
  return (((_a = props.accept) === null || _a === void 0 ? void 0 : _a.map(function (i) { return [i.toLocaleLowerCase(), i.toLocaleUpperCase()]; }).flat(1).join(',')) || '');
75101
75131
  });
75102
75132
  vue.watch(function () { return props.fileList; }, function (newV) {
75103
- fileList.value = __spreadArray([], __read((newV || [])), false);
75133
+ fileList.value = __spreadArray([], __read((newV || []).map(function (item) {
75134
+ return __assign(__assign({}, item), { name: item[_props.keys.name], url: item[_props.keys.url] });
75135
+ })), false);
75104
75136
  }, { immediate: true, deep: true });
75105
75137
  var slots = (_b = vue.getCurrentInstance()) === null || _b === void 0 ? void 0 : _b.slots;
75106
75138
  var onChooseFileClick = function () {
@@ -75166,7 +75198,10 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
75166
75198
  var url = (_k = (_h = (_f = (_c = (_b = (_a = item.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.fileUrl) !== null && _c !== void 0 ? _c : (_e = (_d = item.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.url) !== null && _f !== void 0 ? _f : (_g = item.response) === null || _g === void 0 ? void 0 : _g.fileUrl) !== null && _h !== void 0 ? _h : (_j = item.response) === null || _j === void 0 ? void 0 : _j.url) !== null && _k !== void 0 ? _k : '';
75167
75199
  return __assign(__assign({}, item), (url && { url: url }));
75168
75200
  });
75169
- emits('update:fileList', fileList.value);
75201
+ emits('update:fileList', fileList.value.map(function (item) {
75202
+ var _a;
75203
+ return __assign(__assign({}, item), (_a = {}, _a[_props.keys.name] = item.name, _a[_props.keys.url] = item.url, _a));
75204
+ }));
75170
75205
  };
75171
75206
  var handleBeforeUpload = function (rawFile) { return __awaiter(_this, void 0, void 0, function () {
75172
75207
  var error_2;
@@ -82,6 +82,14 @@ declare const _default: import("vue").DefineComponent<{
82
82
  type: FunctionConstructor;
83
83
  required: false;
84
84
  };
85
+ keys: {
86
+ type: ObjectConstructor;
87
+ required: false;
88
+ default(): {
89
+ name: string;
90
+ url: string;
91
+ };
92
+ };
85
93
  }, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
86
94
  [key: string]: any;
87
95
  }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:fileList" | "change" | "error" | "preview")[], "update:fileList" | "change" | "error" | "preview", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -168,6 +176,14 @@ declare const _default: import("vue").DefineComponent<{
168
176
  type: FunctionConstructor;
169
177
  required: false;
170
178
  };
179
+ keys: {
180
+ type: ObjectConstructor;
181
+ required: false;
182
+ default(): {
183
+ name: string;
184
+ url: string;
185
+ };
186
+ };
171
187
  }>> & {
172
188
  onChange?: ((...args: any[]) => any) | undefined;
173
189
  onError?: ((...args: any[]) => any) | undefined;
@@ -185,5 +201,6 @@ declare const _default: import("vue").DefineComponent<{
185
201
  listType: string;
186
202
  fileIconSize: number;
187
203
  useSystemErrMsg: boolean;
204
+ keys: Record<string, any>;
188
205
  }>;
189
206
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xrk-components",
3
- "version": "2.0.0-beta.77",
3
+ "version": "2.0.0-beta.79",
4
4
  "description": "",
5
5
  "main": "lib/index.esm.js",
6
6
  "typings": "lib/packages/index.d.ts",