kui-vue 6.3.1 → 6.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/ai/kui-components.json +619 -37
- package/dist/index.js +2 -2
- package/es/index.js +1575 -647
- package/es/locale/de.js +2 -3
- package/es/locale/el.js +2 -3
- package/es/locale/en.js +2 -3
- package/es/locale/fr.js +2 -3
- package/es/locale/it.js +2 -3
- package/es/locale/ja.js +2 -3
- package/es/locale/ko.js +2 -3
- package/es/locale/ru.js +2 -3
- package/es/locale/th.js +2 -3
- package/es/locale/uk.js +2 -3
- package/es/locale/vi.js +2 -3
- package/es/locale/zh-CN.js +2 -3
- package/es/locale/zh-TW.js +2 -3
- package/lib/index.cjs +2 -2
- package/lib/locale/de.cjs +1 -1
- package/lib/locale/el.cjs +1 -1
- package/lib/locale/en.cjs +1 -1
- package/lib/locale/fr.cjs +1 -1
- package/lib/locale/it.cjs +1 -1
- package/lib/locale/ja.cjs +1 -1
- package/lib/locale/ko.cjs +1 -1
- package/lib/locale/ru.cjs +1 -1
- package/lib/locale/th.cjs +1 -1
- package/lib/locale/uk.cjs +1 -1
- package/lib/locale/vi.cjs +1 -1
- package/lib/locale/zh-CN.cjs +1 -1
- package/lib/locale/zh-TW.cjs +1 -1
- package/package.json +22 -22
- package/style/base.css +1 -1
- package/style/components.css +2 -2
- package/style/index.css +2 -2
- package/style/motion.css +1 -1
- package/style/theme.css +1 -1
- package/types/color-picker/index.d.cts +5 -0
- package/types/color-picker/index.d.ts +5 -0
- package/types/components.d.cts +3 -0
- package/types/components.d.ts +3 -0
- package/types/global.d.cts +16 -0
- package/types/global.d.ts +16 -0
- package/types/gradient-picker/corners.d.cts +39 -0
- package/types/gradient-picker/corners.d.ts +39 -0
- package/types/gradient-picker/index.d.cts +87 -0
- package/types/gradient-picker/index.d.ts +87 -0
- package/types/gradient-picker/stops.d.cts +39 -0
- package/types/gradient-picker/stops.d.ts +39 -0
- package/types/gradient-picker/types.d.cts +34 -0
- package/types/gradient-picker/types.d.ts +34 -0
- package/types/input-number/drag.d.cts +9 -0
- package/types/input-number/drag.d.ts +9 -0
- package/types/input-number/index.d.cts +13 -0
- package/types/input-number/index.d.ts +13 -0
- package/types/menu/menu-context.d.cts +1 -0
- package/types/menu/menu-context.d.ts +1 -0
- package/types/menu/menu.d.cts +13 -0
- package/types/menu/menu.d.ts +13 -0
- package/types/popconfirm/index.d.cts +3 -0
- package/types/popconfirm/index.d.ts +3 -0
- package/types/poptip/index.d.cts +3 -0
- package/types/poptip/index.d.ts +3 -0
- package/types/popup/index.d.cts +4 -0
- package/types/popup/index.d.ts +4 -0
- package/types/segmented/index.d.cts +2 -2
- package/types/segmented/index.d.ts +2 -2
- package/types/splitter/controller.d.cts +49 -0
- package/types/splitter/controller.d.ts +49 -0
- package/types/splitter/splitter-panel.d.cts +37 -2
- package/types/splitter/splitter-panel.d.ts +37 -2
- package/types/splitter/splitter.d.cts +24 -5
- package/types/splitter/splitter.d.ts +24 -5
- package/types/tooltip/index.d.cts +3 -0
- package/types/tooltip/index.d.ts +3 -0
- package/types/utils/placement.d.cts +2 -1
- package/types/utils/placement.d.ts +2 -1
- package/types/utils/popup-arrow.d.cts +5 -0
- package/types/utils/popup-arrow.d.ts +5 -0
- package/vetur/attributes.json +340 -12
- package/vetur/tags.json +90 -4
- package/vetur/web-types.json +489 -13
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* kui-vue v6.
|
|
2
|
+
* kui-vue v6.5.0
|
|
3
3
|
* Copyright 2017-present, kui-vue.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://k-ui.cn
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
import en_default from "./locale/en.js";
|
|
10
10
|
import { Comment, Fragment, Teleport, Text, Transition, TransitionGroup, cloneVNode, computed, createTextVNode, createVNode, defineComponent, getCurrentInstance, h, inject, isRef, isVNode, mergeProps, nextTick, onBeforeUnmount, onMounted, onUnmounted, onUpdated, provide, reactive, readonly, ref, render, resolveDirective, shallowRef, toRaw, toRefs, useId, vShow, watch, withDirectives } from "vue";
|
|
11
11
|
import dayjs from "dayjs";
|
|
12
|
-
|
|
12
|
+
// \0rolldown/runtime.js
|
|
13
13
|
var __create = Object.create;
|
|
14
14
|
var __defProp = Object.defineProperty;
|
|
15
15
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
16
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
17
17
|
var __getProtoOf = Object.getPrototypeOf;
|
|
18
18
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
19
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
19
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
20
20
|
var __exportAll = (all, no_symbols) => {
|
|
21
21
|
let target = {};
|
|
22
22
|
for (var name in all) __defProp(target, name, {
|
|
@@ -40,8 +40,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
40
40
|
value: mod,
|
|
41
41
|
enumerable: true
|
|
42
42
|
}) : target, mod));
|
|
43
|
-
|
|
44
|
-
//#region components/affix/index.tsx
|
|
43
|
+
// components/affix/index.tsx
|
|
45
44
|
var Affix = /* @__PURE__ */ defineComponent({
|
|
46
45
|
name: "Affix",
|
|
47
46
|
props: {
|
|
@@ -166,8 +165,7 @@ var Affix = /* @__PURE__ */ defineComponent({
|
|
|
166
165
|
};
|
|
167
166
|
}
|
|
168
167
|
});
|
|
169
|
-
|
|
170
|
-
//#region components/config/popup.ts
|
|
168
|
+
// components/config/popup.ts
|
|
171
169
|
var popupContainerKey = Symbol("kui-popup-container");
|
|
172
170
|
var usePopupContainer = () => {
|
|
173
171
|
const injected = inject(popupContainerKey, void 0);
|
|
@@ -177,8 +175,7 @@ var usePopupContainer = () => {
|
|
|
177
175
|
return typeof document !== "undefined" ? document.body : null;
|
|
178
176
|
};
|
|
179
177
|
};
|
|
180
|
-
|
|
181
|
-
//#region components/config/popup-host.ts
|
|
178
|
+
// components/config/popup-host.ts
|
|
182
179
|
var popupHostKey = Symbol("kui-popup-host");
|
|
183
180
|
/** Creates an isolated popup scope for components whose overlays are teleported elsewhere. */
|
|
184
181
|
var providePopupHost = () => {
|
|
@@ -202,8 +199,43 @@ var usePopupHost = (close) => {
|
|
|
202
199
|
});
|
|
203
200
|
onBeforeUnmount(() => unregister?.());
|
|
204
201
|
};
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
// components/utils/popup-arrow.ts
|
|
203
|
+
var margins = /* @__PURE__ */ new WeakMap();
|
|
204
|
+
/** Measure the painted arrow after placement CSS has been applied, including rotation. */
|
|
205
|
+
function measurePopupArrow(popup, placement, enabled) {
|
|
206
|
+
const arrow = popup.querySelector("[data-popup-arrow]");
|
|
207
|
+
if (!arrow) return;
|
|
208
|
+
const saved = margins.get(arrow);
|
|
209
|
+
if (saved) {
|
|
210
|
+
arrow.style.marginLeft = saved.left;
|
|
211
|
+
arrow.style.marginTop = saved.top;
|
|
212
|
+
}
|
|
213
|
+
if (!enabled) return;
|
|
214
|
+
popup.setAttribute("k-placement", placement);
|
|
215
|
+
const rect = popup.getBoundingClientRect();
|
|
216
|
+
const arrowRect = arrow.getBoundingClientRect();
|
|
217
|
+
const horizontal = placement.startsWith("top") || placement.startsWith("bottom");
|
|
218
|
+
const scale = horizontal ? rect.width / popup.offsetWidth : rect.height / popup.offsetHeight;
|
|
219
|
+
if (!Number.isFinite(scale) || scale <= 0) return;
|
|
220
|
+
const center = horizontal ? (arrowRect.left + arrowRect.width / 2 - rect.left) / scale : (arrowRect.top + arrowRect.height / 2 - rect.top) / scale;
|
|
221
|
+
const half = (horizontal ? arrowRect.width : arrowRect.height) / scale / 2;
|
|
222
|
+
const style = getComputedStyle(arrow);
|
|
223
|
+
const margin = parseFloat(horizontal ? style.marginLeft : style.marginTop) || 0;
|
|
224
|
+
if (!saved) margins.set(arrow, {
|
|
225
|
+
left: arrow.style.marginLeft,
|
|
226
|
+
top: arrow.style.marginTop
|
|
227
|
+
});
|
|
228
|
+
return {
|
|
229
|
+
center,
|
|
230
|
+
shift(target) {
|
|
231
|
+
const size = horizontal ? popup.offsetWidth : popup.offsetHeight;
|
|
232
|
+
const safe = Math.max(half, Math.min(size - half, target));
|
|
233
|
+
if (horizontal) arrow.style.marginLeft = `${margin + safe - center}px`;
|
|
234
|
+
else arrow.style.marginTop = `${margin + safe - center}px`;
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
// components/utils/placement.ts
|
|
207
239
|
var popupAppearanceSources = /* @__PURE__ */ new Map();
|
|
208
240
|
var popupAppearanceObserver = null;
|
|
209
241
|
var inheritedAppearanceAttributes = ["theme-mode", "shape-mode"];
|
|
@@ -235,7 +267,7 @@ var inheritPopupAppearance = (popup, source) => {
|
|
|
235
267
|
subtree: true
|
|
236
268
|
});
|
|
237
269
|
};
|
|
238
|
-
function setPlacement({ refSelection, refPopper, currentPlacement, position = null, transOrigin, top, left, offset = 3 }) {
|
|
270
|
+
function setPlacement({ refSelection, refPopper, currentPlacement, position = null, transOrigin, top, left, offset = 3, arrowPointAtCenter = false }) {
|
|
239
271
|
if (!refPopper.value) return;
|
|
240
272
|
const sourceInstance = refSelection?.value;
|
|
241
273
|
const sourceElement = sourceInstance?.$el || sourceInstance;
|
|
@@ -332,12 +364,24 @@ function setPlacement({ refSelection, refPopper, currentPlacement, position = nu
|
|
|
332
364
|
calcLeft = rect.left + (rect.width - pickerW) / 2;
|
|
333
365
|
originX = "center";
|
|
334
366
|
}
|
|
367
|
+
const popupArrow = refPopper.value ? measurePopupArrow(refPopper.value, finalPlacement, arrowPointAtCenter && !isMouseMode) : void 0;
|
|
368
|
+
const horizontalArrow = side === "top" || side === "bottom";
|
|
369
|
+
if (popupArrow) {
|
|
370
|
+
if (horizontalArrow) calcLeft = rect.left + rect.width / 2 - popupArrow.center;
|
|
371
|
+
else calcTop = rect.top + rect.height / 2 - popupArrow.center;
|
|
372
|
+
}
|
|
335
373
|
if (rect.bottom > 0 && rect.top < clientHeight && rect.right > 0 && rect.left < clientWidth) {
|
|
336
374
|
if (calcLeft < 0) calcLeft = 0;
|
|
337
375
|
else if (calcLeft + pickerW > clientWidth) calcLeft = clientWidth - pickerW;
|
|
338
376
|
if (calcTop < 0) calcTop = 0;
|
|
339
377
|
else if (calcTop + pickerH > clientHeight) calcTop = clientHeight - pickerH;
|
|
340
378
|
}
|
|
379
|
+
if (popupArrow) {
|
|
380
|
+
const target = horizontalArrow ? rect.left + rect.width / 2 - calcLeft : rect.top + rect.height / 2 - calcTop;
|
|
381
|
+
popupArrow.shift(target);
|
|
382
|
+
if (horizontalArrow) originX = `${target}px`;
|
|
383
|
+
else originY = `${target}px`;
|
|
384
|
+
}
|
|
341
385
|
const offsetParent = refPopper.value.offsetParent;
|
|
342
386
|
if (!offsetParent || offsetParent === document.body || offsetParent === document.documentElement) {
|
|
343
387
|
top.value = calcTop + scrollTop;
|
|
@@ -350,8 +394,7 @@ function setPlacement({ refSelection, refPopper, currentPlacement, position = nu
|
|
|
350
394
|
transOrigin.value = `${originX} ${originY}`;
|
|
351
395
|
if (currentPlacement.value !== finalPlacement) currentPlacement.value = finalPlacement;
|
|
352
396
|
}
|
|
353
|
-
|
|
354
|
-
//#region components/utils/popup.ts
|
|
397
|
+
// components/utils/popup.ts
|
|
355
398
|
/** One pending frame per owner; callbacks are replaced by the latest request. */
|
|
356
399
|
function createFrameScheduler() {
|
|
357
400
|
let frame;
|
|
@@ -383,8 +426,7 @@ function isEventOutside(event, elements, requireAll = true) {
|
|
|
383
426
|
const path = event.composedPath();
|
|
384
427
|
return nodes.every((node) => !node || !node.contains(target) && !path.includes(node));
|
|
385
428
|
}
|
|
386
|
-
|
|
387
|
-
//#region components/utils/vnode.tsx
|
|
429
|
+
// components/utils/vnode.tsx
|
|
388
430
|
function cloneNodes(vnode, props, merge = false, cloneTransition) {
|
|
389
431
|
return vnode.length == 1 && vnode[0].type !== Text ? cloneVNode(vnode[0], props, merge) : cloneVNode(createVNode("span", null, [vnode]), props, merge, cloneTransition);
|
|
390
432
|
}
|
|
@@ -481,8 +523,7 @@ var toggleContainerScroll = (target, lock) => {
|
|
|
481
523
|
if (!state.hadLockClass) target.classList.remove("k-scroll-locked");
|
|
482
524
|
scrollLocks.delete(target);
|
|
483
525
|
};
|
|
484
|
-
|
|
485
|
-
//#region components/utils/overlay-order.ts
|
|
526
|
+
// components/utils/overlay-order.ts
|
|
486
527
|
/**
|
|
487
528
|
* 遮罩层(Modal / Drawer)与弹层(Popup)共用一个"打开顺序"时钟:数值越大越晚打开,也就越靠上。
|
|
488
529
|
* 两边各自有注册表(弹层要算子孙,语义不一样),但必须用同一个时钟才能互相比较谁压在上面。
|
|
@@ -490,8 +531,7 @@ var toggleContainerScroll = (target, lock) => {
|
|
|
490
531
|
*/
|
|
491
532
|
var order = 0;
|
|
492
533
|
var nextOverlayOrder = () => ++order;
|
|
493
|
-
|
|
494
|
-
//#region components/popup/layers.ts
|
|
534
|
+
// components/popup/layers.ts
|
|
495
535
|
var layers = [];
|
|
496
536
|
var openedAt = /* @__PURE__ */ new WeakMap();
|
|
497
537
|
function registerPopupLayer(layer) {
|
|
@@ -522,8 +562,7 @@ function closePopupChildren(popup) {
|
|
|
522
562
|
const layer = layers.find((item) => item.popup === popup);
|
|
523
563
|
if (layer) descendants(layer).reverse().forEach((child) => child.close());
|
|
524
564
|
}
|
|
525
|
-
|
|
526
|
-
//#region components/popup/index.tsx
|
|
565
|
+
// components/popup/index.tsx
|
|
527
566
|
var popupProps = {
|
|
528
567
|
open: {
|
|
529
568
|
type: Boolean,
|
|
@@ -539,6 +578,7 @@ var popupProps = {
|
|
|
539
578
|
default: "click"
|
|
540
579
|
},
|
|
541
580
|
arrow: Boolean,
|
|
581
|
+
arrowPointAtCenter: Boolean,
|
|
542
582
|
offset: {
|
|
543
583
|
type: Number,
|
|
544
584
|
default: 3
|
|
@@ -593,6 +633,7 @@ var popupProps = {
|
|
|
593
633
|
};
|
|
594
634
|
var PopupArrow = ({ prefixCls }) => createVNode("div", {
|
|
595
635
|
"class": `${prefixCls}-arrow`,
|
|
636
|
+
"data-popup-arrow": "",
|
|
596
637
|
"aria-hidden": "true"
|
|
597
638
|
}, [createVNode("svg", {
|
|
598
639
|
"style": { fill: "currentcolor" },
|
|
@@ -668,6 +709,7 @@ var popup_default = /* @__PURE__ */ defineComponent({
|
|
|
668
709
|
transOrigin,
|
|
669
710
|
currentPlacement,
|
|
670
711
|
offset: props.offset,
|
|
712
|
+
arrowPointAtCenter: props.arrowPointAtCenter,
|
|
671
713
|
position: props.getAnchorPosition?.() ?? (contextPoint ? {
|
|
672
714
|
x: rect.left + contextPoint.x,
|
|
673
715
|
y: rect.top + contextPoint.y
|
|
@@ -712,6 +754,7 @@ var popup_default = /* @__PURE__ */ defineComponent({
|
|
|
712
754
|
props.placement,
|
|
713
755
|
props.offset,
|
|
714
756
|
props.arrow,
|
|
757
|
+
props.arrowPointAtCenter,
|
|
715
758
|
props.matchTriggerWidth,
|
|
716
759
|
props.overlay
|
|
717
760
|
], () => {
|
|
@@ -913,8 +956,7 @@ var popup_default = /* @__PURE__ */ defineComponent({
|
|
|
913
956
|
};
|
|
914
957
|
}
|
|
915
958
|
});
|
|
916
|
-
|
|
917
|
-
//#region node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js
|
|
959
|
+
// node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js
|
|
918
960
|
/*!
|
|
919
961
|
* kui-icons v5.0.0
|
|
920
962
|
* Copyright 2017-present, kui-icons.
|
|
@@ -1093,8 +1135,7 @@ var X = [{
|
|
|
1093
1135
|
d: "M18 6L6 18 M6 6L18 18",
|
|
1094
1136
|
s: "fill:none;stroke:currentcolor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"
|
|
1095
1137
|
}];
|
|
1096
|
-
|
|
1097
|
-
//#region components/base/transition.ts
|
|
1138
|
+
// components/base/transition.ts
|
|
1098
1139
|
function getTransitionProp(name) {
|
|
1099
1140
|
return {
|
|
1100
1141
|
name,
|
|
@@ -1142,8 +1183,7 @@ function getTransitionProp(name) {
|
|
|
1142
1183
|
}
|
|
1143
1184
|
};
|
|
1144
1185
|
}
|
|
1145
|
-
|
|
1146
|
-
//#region components/config/context.ts
|
|
1186
|
+
// components/config/context.ts
|
|
1147
1187
|
/**
|
|
1148
1188
|
* 没有 ConfigProvider 兜底时用的语言。
|
|
1149
1189
|
* 默认值只有这一个出处,inject 的地方不许再各自写 zhCN 兜底;要改库级默认就改这里。
|
|
@@ -1235,8 +1275,7 @@ var getMousePoint = () => {
|
|
|
1235
1275
|
y: 0
|
|
1236
1276
|
};
|
|
1237
1277
|
};
|
|
1238
|
-
|
|
1239
|
-
//#region components/icon/index.tsx
|
|
1278
|
+
// components/icon/index.tsx
|
|
1240
1279
|
var parseStyle = (styleString) => {
|
|
1241
1280
|
const styles = {};
|
|
1242
1281
|
if (!styleString) return styles;
|
|
@@ -1308,8 +1347,7 @@ var Icon = /* @__PURE__ */ defineComponent({
|
|
|
1308
1347
|
};
|
|
1309
1348
|
}
|
|
1310
1349
|
});
|
|
1311
|
-
|
|
1312
|
-
//#region components/alert/index.tsx
|
|
1350
|
+
// components/alert/index.tsx
|
|
1313
1351
|
var PAINTED_THEMES$16 = [
|
|
1314
1352
|
"fill",
|
|
1315
1353
|
"outline",
|
|
@@ -1399,8 +1437,7 @@ var Alert = /* @__PURE__ */ defineComponent({
|
|
|
1399
1437
|
};
|
|
1400
1438
|
}
|
|
1401
1439
|
});
|
|
1402
|
-
|
|
1403
|
-
//#region components/form/context.ts
|
|
1440
|
+
// components/form/context.ts
|
|
1404
1441
|
var FORM_INJECTION_KEY = Symbol("KForm");
|
|
1405
1442
|
var FORM_FIELD_INJECTION_KEY = Symbol("KFormField");
|
|
1406
1443
|
var formFieldComponents = /* @__PURE__ */ new WeakSet();
|
|
@@ -1449,8 +1486,7 @@ var markFormFieldWrapper = (component) => {
|
|
|
1449
1486
|
return component;
|
|
1450
1487
|
};
|
|
1451
1488
|
var isFormFieldWrapper = (component) => (typeof component === "object" || typeof component === "function") && component !== null && formFieldWrappers.has(component);
|
|
1452
|
-
|
|
1453
|
-
//#region node_modules/.pnpm/big.js@7.0.1/node_modules/big.js/big.mjs
|
|
1489
|
+
// node_modules/.pnpm/big.js@7.0.1/node_modules/big.js/big.mjs
|
|
1454
1490
|
/************************************** EDITABLE DEFAULTS *****************************************/
|
|
1455
1491
|
var DP = 20;
|
|
1456
1492
|
var RM = 1;
|
|
@@ -1517,7 +1553,7 @@ function parse(x, n) {
|
|
|
1517
1553
|
}
|
|
1518
1554
|
return x;
|
|
1519
1555
|
}
|
|
1520
|
-
function round(x, sd, rm, more) {
|
|
1556
|
+
function round$3(x, sd, rm, more) {
|
|
1521
1557
|
var xc = x.c;
|
|
1522
1558
|
if (rm === UNDEFINED) rm = x.constructor.RM;
|
|
1523
1559
|
if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) throw Error(INVALID_RM);
|
|
@@ -1613,7 +1649,7 @@ P.div = function(y) {
|
|
|
1613
1649
|
q.e--;
|
|
1614
1650
|
p--;
|
|
1615
1651
|
}
|
|
1616
|
-
if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);
|
|
1652
|
+
if (qi > p) round$3(q, p, Big.RM, r[0] !== UNDEFINED);
|
|
1617
1653
|
return q;
|
|
1618
1654
|
};
|
|
1619
1655
|
P.eq = function(y) {
|
|
@@ -1769,12 +1805,12 @@ P.pow = function(n) {
|
|
|
1769
1805
|
};
|
|
1770
1806
|
P.prec = function(sd, rm) {
|
|
1771
1807
|
if (sd !== ~~sd || sd < 1 || sd > MAX_DP) throw Error(INVALID + "precision");
|
|
1772
|
-
return round(new this.constructor(this), sd, rm);
|
|
1808
|
+
return round$3(new this.constructor(this), sd, rm);
|
|
1773
1809
|
};
|
|
1774
1810
|
P.round = function(dp, rm) {
|
|
1775
1811
|
if (dp === UNDEFINED) dp = 0;
|
|
1776
1812
|
else if (dp !== ~~dp || dp < -1e6 || dp > MAX_DP) throw Error(INVALID_DP);
|
|
1777
|
-
return round(new this.constructor(this), dp + this.e + 1, rm);
|
|
1813
|
+
return round$3(new this.constructor(this), dp + this.e + 1, rm);
|
|
1778
1814
|
};
|
|
1779
1815
|
P.sqrt = function() {
|
|
1780
1816
|
var r, c, t, x = this, Big = x.constructor, s = x.s, e = x.e, half = new Big("0.5");
|
|
@@ -1793,7 +1829,7 @@ P.sqrt = function() {
|
|
|
1793
1829
|
t = r;
|
|
1794
1830
|
r = half.times(t.plus(x.div(t)));
|
|
1795
1831
|
} while (t.c.slice(0, e).join("") !== r.c.slice(0, e).join(""));
|
|
1796
|
-
return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);
|
|
1832
|
+
return round$3(r, (Big.DP -= 4) + r.e + 1, Big.RM);
|
|
1797
1833
|
};
|
|
1798
1834
|
P.times = P.mul = function(y) {
|
|
1799
1835
|
var c, x = this, Big = x.constructor, xc = x.c, yc = (y = new Big(y)).c, a = xc.length, b = yc.length, i = x.e, j = y.e;
|
|
@@ -1831,7 +1867,7 @@ P.toExponential = function(dp, rm) {
|
|
|
1831
1867
|
var x = this, n = x.c[0];
|
|
1832
1868
|
if (dp !== UNDEFINED) {
|
|
1833
1869
|
if (dp !== ~~dp || dp < 0 || dp > MAX_DP) throw Error(INVALID_DP);
|
|
1834
|
-
x = round(new x.constructor(x), ++dp, rm);
|
|
1870
|
+
x = round$3(new x.constructor(x), ++dp, rm);
|
|
1835
1871
|
for (; x.c.length < dp;) x.c.push(0);
|
|
1836
1872
|
}
|
|
1837
1873
|
return stringify(x, true, !!n);
|
|
@@ -1840,7 +1876,7 @@ P.toFixed = function(dp, rm) {
|
|
|
1840
1876
|
var x = this, n = x.c[0];
|
|
1841
1877
|
if (dp !== UNDEFINED) {
|
|
1842
1878
|
if (dp !== ~~dp || dp < 0 || dp > MAX_DP) throw Error(INVALID_DP);
|
|
1843
|
-
x = round(new x.constructor(x), dp + x.e + 1, rm);
|
|
1879
|
+
x = round$3(new x.constructor(x), dp + x.e + 1, rm);
|
|
1844
1880
|
for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);
|
|
1845
1881
|
}
|
|
1846
1882
|
return stringify(x, false, !!n);
|
|
@@ -1859,7 +1895,7 @@ P.toPrecision = function(sd, rm) {
|
|
|
1859
1895
|
var x = this, Big = x.constructor, n = x.c[0];
|
|
1860
1896
|
if (sd !== UNDEFINED) {
|
|
1861
1897
|
if (sd !== ~~sd || sd < 1 || sd > MAX_DP) throw Error(INVALID + "precision");
|
|
1862
|
-
x = round(new Big(x), sd, rm);
|
|
1898
|
+
x = round$3(new Big(x), sd, rm);
|
|
1863
1899
|
for (; x.c.length < sd;) x.c.push(0);
|
|
1864
1900
|
}
|
|
1865
1901
|
return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, !!n);
|
|
@@ -1870,8 +1906,7 @@ P.valueOf = function() {
|
|
|
1870
1906
|
return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);
|
|
1871
1907
|
};
|
|
1872
1908
|
var Big = _Big_();
|
|
1873
|
-
|
|
1874
|
-
//#region components/utils/number.ts
|
|
1909
|
+
// components/utils/number.ts
|
|
1875
1910
|
var isEmpty = (value) => {
|
|
1876
1911
|
return value == null || typeof value === "string" && value.trim() === "" || Array.isArray(value) && value.length === 0 || typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0;
|
|
1877
1912
|
};
|
|
@@ -2056,8 +2091,7 @@ var input_group_default = markFormFieldWrapper(/* @__PURE__ */ defineComponent({
|
|
|
2056
2091
|
};
|
|
2057
2092
|
}
|
|
2058
2093
|
}));
|
|
2059
|
-
|
|
2060
|
-
//#region components/input/input-base.tsx
|
|
2094
|
+
// components/input/input-base.tsx
|
|
2061
2095
|
var inputProps = {
|
|
2062
2096
|
clearable: {
|
|
2063
2097
|
type: Boolean,
|
|
@@ -2347,8 +2381,7 @@ var InputBase = /* @__PURE__ */ defineComponent({
|
|
|
2347
2381
|
};
|
|
2348
2382
|
}
|
|
2349
2383
|
});
|
|
2350
|
-
|
|
2351
|
-
//#region components/input/input.tsx
|
|
2384
|
+
// components/input/input.tsx
|
|
2352
2385
|
var FormInput = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
2353
2386
|
name: "Input",
|
|
2354
2387
|
inheritAttrs: false,
|
|
@@ -2385,8 +2418,7 @@ var FormInput = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
2385
2418
|
};
|
|
2386
2419
|
}
|
|
2387
2420
|
}));
|
|
2388
|
-
|
|
2389
|
-
//#region components/input/textarea.tsx
|
|
2421
|
+
// components/input/textarea.tsx
|
|
2390
2422
|
var FormTextArea = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
2391
2423
|
name: "TextArea",
|
|
2392
2424
|
props: {
|
|
@@ -2466,8 +2498,7 @@ var FormTextArea = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
2466
2498
|
};
|
|
2467
2499
|
}
|
|
2468
2500
|
}));
|
|
2469
|
-
|
|
2470
|
-
//#region components/input/index.ts
|
|
2501
|
+
// components/input/index.ts
|
|
2471
2502
|
var input_default = FormInput;
|
|
2472
2503
|
var auto_complete_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
2473
2504
|
name: "AutoComplete",
|
|
@@ -2781,11 +2812,9 @@ var auto_complete_default = markFormFieldComponent(/* @__PURE__ */ defineCompone
|
|
|
2781
2812
|
}, [option.label ?? option.value]))])]) })]]);
|
|
2782
2813
|
}
|
|
2783
2814
|
}));
|
|
2784
|
-
|
|
2785
|
-
//#region components/anchor/context.ts
|
|
2815
|
+
// components/anchor/context.ts
|
|
2786
2816
|
var anchorContextKey = Symbol("anchor-context");
|
|
2787
|
-
|
|
2788
|
-
//#region components/anchor/anchor.tsx
|
|
2817
|
+
// components/anchor/anchor.tsx
|
|
2789
2818
|
var Anchor = /* @__PURE__ */ defineComponent({
|
|
2790
2819
|
name: "Anchor",
|
|
2791
2820
|
inheritAttrs: false,
|
|
@@ -2996,8 +3025,7 @@ var Anchor = /* @__PURE__ */ defineComponent({
|
|
|
2996
3025
|
};
|
|
2997
3026
|
}
|
|
2998
3027
|
});
|
|
2999
|
-
|
|
3000
|
-
//#region components/anchor/anchor-link.tsx
|
|
3028
|
+
// components/anchor/anchor-link.tsx
|
|
3001
3029
|
var AnchorLink = /* @__PURE__ */ defineComponent({
|
|
3002
3030
|
name: "AnchorLink",
|
|
3003
3031
|
inheritAttrs: false,
|
|
@@ -3041,11 +3069,9 @@ var AnchorLink = /* @__PURE__ */ defineComponent({
|
|
|
3041
3069
|
};
|
|
3042
3070
|
}
|
|
3043
3071
|
});
|
|
3044
|
-
|
|
3045
|
-
//#region components/avatar/context.ts
|
|
3072
|
+
// components/avatar/context.ts
|
|
3046
3073
|
var avatarGroupContextKey = Symbol("avatar-group");
|
|
3047
|
-
|
|
3048
|
-
//#region components/avatar/avatar.tsx
|
|
3074
|
+
// components/avatar/avatar.tsx
|
|
3049
3075
|
var Avatar = /* @__PURE__ */ defineComponent({
|
|
3050
3076
|
name: "Avatar",
|
|
3051
3077
|
props: {
|
|
@@ -3145,8 +3171,7 @@ var Avatar = /* @__PURE__ */ defineComponent({
|
|
|
3145
3171
|
};
|
|
3146
3172
|
}
|
|
3147
3173
|
});
|
|
3148
|
-
|
|
3149
|
-
//#region components/avatar/avatar-group.tsx
|
|
3174
|
+
// components/avatar/avatar-group.tsx
|
|
3150
3175
|
var AvatarGroup = /* @__PURE__ */ defineComponent({
|
|
3151
3176
|
name: "AvatarGroup",
|
|
3152
3177
|
props: {
|
|
@@ -3195,8 +3220,7 @@ var AvatarGroup = /* @__PURE__ */ defineComponent({
|
|
|
3195
3220
|
};
|
|
3196
3221
|
}
|
|
3197
3222
|
});
|
|
3198
|
-
|
|
3199
|
-
//#region components/breadcrumb/breadcrumb.tsx
|
|
3223
|
+
// components/breadcrumb/breadcrumb.tsx
|
|
3200
3224
|
var Breadcrumb = /* @__PURE__ */ defineComponent({
|
|
3201
3225
|
name: "Breadcrumb",
|
|
3202
3226
|
props: { separator: {
|
|
@@ -3210,8 +3234,7 @@ var Breadcrumb = /* @__PURE__ */ defineComponent({
|
|
|
3210
3234
|
};
|
|
3211
3235
|
}
|
|
3212
3236
|
});
|
|
3213
|
-
|
|
3214
|
-
//#region components/breadcrumb/breadcrumb-item.tsx
|
|
3237
|
+
// components/breadcrumb/breadcrumb-item.tsx
|
|
3215
3238
|
var BreadcrumbItem = /* @__PURE__ */ defineComponent({
|
|
3216
3239
|
name: "BreadcrumbItem",
|
|
3217
3240
|
props: {
|
|
@@ -3243,8 +3266,7 @@ var BreadcrumbItem = /* @__PURE__ */ defineComponent({
|
|
|
3243
3266
|
};
|
|
3244
3267
|
}
|
|
3245
3268
|
});
|
|
3246
|
-
|
|
3247
|
-
//#region components/back-top/index.tsx
|
|
3269
|
+
// components/back-top/index.tsx
|
|
3248
3270
|
var defaultTarget = () => typeof document === "undefined" ? null : document.body;
|
|
3249
3271
|
var BackTop = /* @__PURE__ */ defineComponent({
|
|
3250
3272
|
name: "BackTop",
|
|
@@ -3337,8 +3359,7 @@ var BackTop = /* @__PURE__ */ defineComponent({
|
|
|
3337
3359
|
};
|
|
3338
3360
|
}
|
|
3339
3361
|
});
|
|
3340
|
-
|
|
3341
|
-
//#region components/const/var.ts
|
|
3362
|
+
// components/const/var.ts
|
|
3342
3363
|
/**
|
|
3343
3364
|
* 预设色值名,`Tag` / `Badge` / `Button` / `Tooltip` 的 `color` 共用这一套。
|
|
3344
3365
|
* 里面只有能上色的名字:不传 `color` 就是组件自己的那张表面,给它再取一个名字只会让人以为
|
|
@@ -3363,8 +3384,7 @@ var colors$1 = [
|
|
|
3363
3384
|
"brown",
|
|
3364
3385
|
"gray"
|
|
3365
3386
|
];
|
|
3366
|
-
|
|
3367
|
-
//#region components/stat-card/utils/odometer.ts
|
|
3387
|
+
// components/stat-card/utils/odometer.ts
|
|
3368
3388
|
/** Bounded digit tracks shared by statistical numbers and badges. */
|
|
3369
3389
|
var Odometer = class {
|
|
3370
3390
|
previous;
|
|
@@ -3480,8 +3500,7 @@ var Odometer = class {
|
|
|
3480
3500
|
});
|
|
3481
3501
|
}
|
|
3482
3502
|
};
|
|
3483
|
-
|
|
3484
|
-
//#region components/stat-card/rollup.tsx
|
|
3503
|
+
// components/stat-card/rollup.tsx
|
|
3485
3504
|
var rollup_default = /* @__PURE__ */ defineComponent({
|
|
3486
3505
|
name: "RollUp",
|
|
3487
3506
|
props: {
|
|
@@ -3532,8 +3551,7 @@ var rollup_default = /* @__PURE__ */ defineComponent({
|
|
|
3532
3551
|
}, [initialText]);
|
|
3533
3552
|
}
|
|
3534
3553
|
});
|
|
3535
|
-
|
|
3536
|
-
//#region node_modules/.pnpm/color-name@2.1.1/node_modules/color-name/index.js
|
|
3554
|
+
// node_modules/.pnpm/color-name@2.1.1/node_modules/color-name/index.js
|
|
3537
3555
|
var colors = {
|
|
3538
3556
|
aliceblue: [
|
|
3539
3557
|
240,
|
|
@@ -4278,8 +4296,7 @@ var colors = {
|
|
|
4278
4296
|
};
|
|
4279
4297
|
for (const key in colors) Object.freeze(colors[key]);
|
|
4280
4298
|
var color_name_default = Object.freeze(colors);
|
|
4281
|
-
|
|
4282
|
-
//#region node_modules/.pnpm/color-string@2.1.4/node_modules/color-string/index.js
|
|
4299
|
+
// node_modules/.pnpm/color-string@2.1.4/node_modules/color-string/index.js
|
|
4283
4300
|
var reverseNames = Object.create(null);
|
|
4284
4301
|
for (const name in color_name_default) if (Object.hasOwn(color_name_default, name)) reverseNames[color_name_default[name]] = name;
|
|
4285
4302
|
var cs = {
|
|
@@ -4356,8 +4373,8 @@ cs.get.rgb = function(string) {
|
|
|
4356
4373
|
rgb[3] = 1;
|
|
4357
4374
|
return rgb;
|
|
4358
4375
|
} else return null;
|
|
4359
|
-
for (i = 0; i < 3; i++) rgb[i] = clamp$
|
|
4360
|
-
rgb[3] = clamp$
|
|
4376
|
+
for (i = 0; i < 3; i++) rgb[i] = clamp$2(rgb[i], 0, 255);
|
|
4377
|
+
rgb[3] = clamp$2(rgb[3], 0, 1);
|
|
4361
4378
|
return rgb;
|
|
4362
4379
|
};
|
|
4363
4380
|
cs.get.hsl = function(string) {
|
|
@@ -4367,9 +4384,9 @@ cs.get.hsl = function(string) {
|
|
|
4367
4384
|
const alpha = Number.parseFloat(match[4]);
|
|
4368
4385
|
return [
|
|
4369
4386
|
(Number.parseFloat(match[1]) % 360 + 360) % 360,
|
|
4370
|
-
clamp$
|
|
4371
|
-
clamp$
|
|
4372
|
-
clamp$
|
|
4387
|
+
clamp$2(Number.parseFloat(match[2]), 0, 100),
|
|
4388
|
+
clamp$2(Number.parseFloat(match[3]), 0, 100),
|
|
4389
|
+
clamp$2(Number.isNaN(alpha) ? 1 : alpha, 0, 1)
|
|
4373
4390
|
];
|
|
4374
4391
|
}
|
|
4375
4392
|
return null;
|
|
@@ -4381,9 +4398,9 @@ cs.get.hwb = function(string) {
|
|
|
4381
4398
|
const alpha = Number.parseFloat(match[4]);
|
|
4382
4399
|
return [
|
|
4383
4400
|
(Number.parseFloat(match[1]) % 360 + 360) % 360,
|
|
4384
|
-
clamp$
|
|
4385
|
-
clamp$
|
|
4386
|
-
clamp$
|
|
4401
|
+
clamp$2(Number.parseFloat(match[2]), 0, 100),
|
|
4402
|
+
clamp$2(Number.parseFloat(match[3]), 0, 100),
|
|
4403
|
+
clamp$2(Number.isNaN(alpha) ? 1 : alpha, 0, 1)
|
|
4387
4404
|
];
|
|
4388
4405
|
}
|
|
4389
4406
|
return null;
|
|
@@ -4411,15 +4428,14 @@ cs.to.hwb = function(...hwba) {
|
|
|
4411
4428
|
cs.to.keyword = function(...rgb) {
|
|
4412
4429
|
return reverseNames[rgb.slice(0, 3)];
|
|
4413
4430
|
};
|
|
4414
|
-
function clamp$
|
|
4431
|
+
function clamp$2(number_, min, max) {
|
|
4415
4432
|
return Math.min(Math.max(min, number_), max);
|
|
4416
4433
|
}
|
|
4417
4434
|
function hexDouble(number_) {
|
|
4418
4435
|
const string_ = Math.round(number_).toString(16).toUpperCase();
|
|
4419
4436
|
return string_.length < 2 ? "0" + string_ : string_;
|
|
4420
4437
|
}
|
|
4421
|
-
|
|
4422
|
-
//#region node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/conversions.js
|
|
4438
|
+
// node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/conversions.js
|
|
4423
4439
|
var reverseKeywords = {};
|
|
4424
4440
|
for (const key of Object.keys(color_name_default)) reverseKeywords[color_name_default[key]] = key;
|
|
4425
4441
|
var convert$1 = {
|
|
@@ -5297,8 +5313,7 @@ convert$1.gray.hex = function(gray) {
|
|
|
5297
5313
|
convert$1.rgb.gray = function(rgb) {
|
|
5298
5314
|
return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
|
|
5299
5315
|
};
|
|
5300
|
-
|
|
5301
|
-
//#region node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/route.js
|
|
5316
|
+
// node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/route.js
|
|
5302
5317
|
function buildGraph() {
|
|
5303
5318
|
const graph = {};
|
|
5304
5319
|
const models = Object.keys(convert$1);
|
|
@@ -5355,8 +5370,7 @@ function route(fromModel) {
|
|
|
5355
5370
|
}
|
|
5356
5371
|
return conversion;
|
|
5357
5372
|
}
|
|
5358
|
-
|
|
5359
|
-
//#region node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/index.js
|
|
5373
|
+
// node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/index.js
|
|
5360
5374
|
var convert = {};
|
|
5361
5375
|
var models = Object.keys(convert$1);
|
|
5362
5376
|
function wrapRaw(fn) {
|
|
@@ -5393,8 +5407,7 @@ for (const fromModel of models) {
|
|
|
5393
5407
|
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
5394
5408
|
}
|
|
5395
5409
|
}
|
|
5396
|
-
|
|
5397
|
-
//#region node_modules/.pnpm/color@5.0.3/node_modules/color/index.js
|
|
5410
|
+
// node_modules/.pnpm/color@5.0.3/node_modules/color/index.js
|
|
5398
5411
|
var skippedModels = [
|
|
5399
5412
|
"keyword",
|
|
5400
5413
|
"gray",
|
|
@@ -5711,8 +5724,7 @@ function zeroArray(array, length) {
|
|
|
5711
5724
|
for (let i = 0; i < length; i++) if (typeof array[i] !== "number") array[i] = 0;
|
|
5712
5725
|
return array;
|
|
5713
5726
|
}
|
|
5714
|
-
|
|
5715
|
-
//#region components/utils/color.ts
|
|
5727
|
+
// components/utils/color.ts
|
|
5716
5728
|
function isColor(value) {
|
|
5717
5729
|
if (typeof value !== "string" || typeof CSS === "undefined" || !CSS.supports) return false;
|
|
5718
5730
|
return CSS.supports("color", value);
|
|
@@ -5739,8 +5751,7 @@ function wash(value, share) {
|
|
|
5739
5751
|
return;
|
|
5740
5752
|
}
|
|
5741
5753
|
}
|
|
5742
|
-
|
|
5743
|
-
//#region components/badge/index.tsx
|
|
5754
|
+
// components/badge/index.tsx
|
|
5744
5755
|
var Badge = /* @__PURE__ */ defineComponent({
|
|
5745
5756
|
name: "Badge",
|
|
5746
5757
|
props: {
|
|
@@ -5804,8 +5815,7 @@ var Badge = /* @__PURE__ */ defineComponent({
|
|
|
5804
5815
|
};
|
|
5805
5816
|
}
|
|
5806
5817
|
});
|
|
5807
|
-
|
|
5808
|
-
//#region components/button/button.tsx
|
|
5818
|
+
// components/button/button.tsx
|
|
5809
5819
|
var PAINTED_THEMES$15 = [
|
|
5810
5820
|
"fill",
|
|
5811
5821
|
"outline",
|
|
@@ -5905,8 +5915,7 @@ var Button = /* @__PURE__ */ defineComponent({
|
|
|
5905
5915
|
};
|
|
5906
5916
|
}
|
|
5907
5917
|
});
|
|
5908
|
-
|
|
5909
|
-
//#region components/button/button-group.tsx
|
|
5918
|
+
// components/button/button-group.tsx
|
|
5910
5919
|
var ButtonGroup = /* @__PURE__ */ defineComponent({
|
|
5911
5920
|
name: "ButtonGroup",
|
|
5912
5921
|
props: {
|
|
@@ -5932,8 +5941,7 @@ var ButtonGroup = /* @__PURE__ */ defineComponent({
|
|
|
5932
5941
|
};
|
|
5933
5942
|
}
|
|
5934
5943
|
});
|
|
5935
|
-
|
|
5936
|
-
//#region components/utils/model-value.ts
|
|
5944
|
+
// components/utils/model-value.ts
|
|
5937
5945
|
function useInitialValue(props) {
|
|
5938
5946
|
const initial = props.value;
|
|
5939
5947
|
const local = shallowRef(Array.isArray(initial) ? [...initial] : initial);
|
|
@@ -5944,8 +5952,7 @@ function useInitialValue(props) {
|
|
|
5944
5952
|
}
|
|
5945
5953
|
});
|
|
5946
5954
|
}
|
|
5947
|
-
|
|
5948
|
-
//#region components/empty/index.tsx
|
|
5955
|
+
// components/empty/index.tsx
|
|
5949
5956
|
var Empty = /* @__PURE__ */ defineComponent({
|
|
5950
5957
|
name: "Empty",
|
|
5951
5958
|
props: {
|
|
@@ -6435,8 +6442,7 @@ var cascader_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
6435
6442
|
};
|
|
6436
6443
|
}
|
|
6437
6444
|
}));
|
|
6438
|
-
|
|
6439
|
-
//#region components/card/card-meta.tsx
|
|
6445
|
+
// components/card/card-meta.tsx
|
|
6440
6446
|
var CardMeta = /* @__PURE__ */ defineComponent({
|
|
6441
6447
|
name: "CardMeta",
|
|
6442
6448
|
inheritAttrs: false,
|
|
@@ -6463,8 +6469,7 @@ var CardMeta = /* @__PURE__ */ defineComponent({
|
|
|
6463
6469
|
};
|
|
6464
6470
|
}
|
|
6465
6471
|
});
|
|
6466
|
-
|
|
6467
|
-
//#region components/card/index.tsx
|
|
6472
|
+
// components/card/index.tsx
|
|
6468
6473
|
var PAINTED_THEMES$14 = [
|
|
6469
6474
|
"fill",
|
|
6470
6475
|
"outline",
|
|
@@ -6542,8 +6547,7 @@ var Card = /* @__PURE__ */ defineComponent({
|
|
|
6542
6547
|
};
|
|
6543
6548
|
}
|
|
6544
6549
|
});
|
|
6545
|
-
|
|
6546
|
-
//#region components/calendar/index.tsx
|
|
6550
|
+
// components/calendar/index.tsx
|
|
6547
6551
|
var calendarProps = {
|
|
6548
6552
|
modelValue: String,
|
|
6549
6553
|
value: String,
|
|
@@ -6805,8 +6809,7 @@ var Calendar = /* @__PURE__ */ defineComponent({
|
|
|
6805
6809
|
};
|
|
6806
6810
|
}
|
|
6807
6811
|
});
|
|
6808
|
-
|
|
6809
|
-
//#region components/feature-card/index.tsx
|
|
6812
|
+
// components/feature-card/index.tsx
|
|
6810
6813
|
var featureCardProps = {
|
|
6811
6814
|
icon: Array,
|
|
6812
6815
|
title: String,
|
|
@@ -6903,8 +6906,7 @@ var FeatureCard = /* @__PURE__ */ defineComponent({
|
|
|
6903
6906
|
};
|
|
6904
6907
|
}
|
|
6905
6908
|
});
|
|
6906
|
-
|
|
6907
|
-
//#region components/flame-wrap/engine.ts
|
|
6909
|
+
// components/flame-wrap/engine.ts
|
|
6908
6910
|
var DEFAULTS$1 = {
|
|
6909
6911
|
color: [
|
|
6910
6912
|
.31,
|
|
@@ -7534,8 +7536,7 @@ function createFlameWrap(elements, options = {}) {
|
|
|
7534
7536
|
}
|
|
7535
7537
|
};
|
|
7536
7538
|
}
|
|
7537
|
-
|
|
7538
|
-
//#region components/utils/vue.ts
|
|
7539
|
+
// components/utils/vue.ts
|
|
7539
7540
|
var globalComponents = [
|
|
7540
7541
|
"message",
|
|
7541
7542
|
"modal",
|
|
@@ -7552,8 +7553,7 @@ var installGlobal = (app, component) => {
|
|
|
7552
7553
|
* belongs here instead of being repeated in every component prop declaration.
|
|
7553
7554
|
*/
|
|
7554
7555
|
var tuplePropType = () => Array;
|
|
7555
|
-
|
|
7556
|
-
//#region components/flame-wrap/index.tsx
|
|
7556
|
+
// components/flame-wrap/index.tsx
|
|
7557
7557
|
var flameWrapProps = {
|
|
7558
7558
|
color: {
|
|
7559
7559
|
type: tuplePropType(),
|
|
@@ -7695,8 +7695,7 @@ var FlameWrap = /* @__PURE__ */ defineComponent({
|
|
|
7695
7695
|
};
|
|
7696
7696
|
}
|
|
7697
7697
|
});
|
|
7698
|
-
|
|
7699
|
-
//#region components/list-panel/index.tsx
|
|
7698
|
+
// components/list-panel/index.tsx
|
|
7700
7699
|
var PAINTED_THEMES$12 = [
|
|
7701
7700
|
"fill",
|
|
7702
7701
|
"outline",
|
|
@@ -7766,8 +7765,7 @@ var ListPanel = /* @__PURE__ */ defineComponent({
|
|
|
7766
7765
|
};
|
|
7767
7766
|
}
|
|
7768
7767
|
});
|
|
7769
|
-
|
|
7770
|
-
//#region components/directives/resize.ts
|
|
7768
|
+
// components/directives/resize.ts
|
|
7771
7769
|
var resize = {
|
|
7772
7770
|
mounted(_, { value }) {
|
|
7773
7771
|
window.addEventListener("resize", value);
|
|
@@ -7776,8 +7774,7 @@ var resize = {
|
|
|
7776
7774
|
window.removeEventListener("resize", value);
|
|
7777
7775
|
}
|
|
7778
7776
|
};
|
|
7779
|
-
|
|
7780
|
-
//#region components/carousel/drag.ts
|
|
7777
|
+
// components/carousel/drag.ts
|
|
7781
7778
|
var swipeThreshold = 5;
|
|
7782
7779
|
var shortSwipeMs = 300;
|
|
7783
7780
|
var longSwipeRatio = .5;
|
|
@@ -7936,8 +7933,7 @@ function readCarouselOffset(root, vertical, position, size) {
|
|
|
7936
7933
|
const offset = transform.startsWith("matrix3d") ? values[vertical ? 13 : 12] : transform.startsWith("matrix") ? values[vertical ? 5 : 4] : transform.startsWith("translate3d") ? values[vertical ? 1 : 0] : void 0;
|
|
7937
7934
|
return Number.isFinite(offset) ? offset + position * size : 0;
|
|
7938
7935
|
}
|
|
7939
|
-
|
|
7940
|
-
//#region components/carousel/carousel.tsx
|
|
7936
|
+
// components/carousel/carousel.tsx
|
|
7941
7937
|
var Carousel = /* @__PURE__ */ defineComponent({
|
|
7942
7938
|
name: "Carousel",
|
|
7943
7939
|
directives: { resize },
|
|
@@ -8279,8 +8275,7 @@ var Carousel = /* @__PURE__ */ defineComponent({
|
|
|
8279
8275
|
};
|
|
8280
8276
|
}
|
|
8281
8277
|
});
|
|
8282
|
-
|
|
8283
|
-
//#region components/carousel/carousel-item.tsx
|
|
8278
|
+
// components/carousel/carousel-item.tsx
|
|
8284
8279
|
var CarouselItem = /* @__PURE__ */ defineComponent({
|
|
8285
8280
|
name: "CarouselItem",
|
|
8286
8281
|
setup(_, { slots }) {
|
|
@@ -8298,8 +8293,7 @@ var CarouselItem = /* @__PURE__ */ defineComponent({
|
|
|
8298
8293
|
};
|
|
8299
8294
|
}
|
|
8300
8295
|
});
|
|
8301
|
-
|
|
8302
|
-
//#region components/utils/checked.ts
|
|
8296
|
+
// components/utils/checked.ts
|
|
8303
8297
|
var getValueWithType = (checked, vType) => {
|
|
8304
8298
|
let value = checked;
|
|
8305
8299
|
switch (vType) {
|
|
@@ -8313,8 +8307,7 @@ var getValueWithType = (checked, vType) => {
|
|
|
8313
8307
|
}
|
|
8314
8308
|
return value;
|
|
8315
8309
|
};
|
|
8316
|
-
|
|
8317
|
-
//#region components/checkbox/checkbox.tsx
|
|
8310
|
+
// components/checkbox/checkbox.tsx
|
|
8318
8311
|
var PAINTED_THEMES$11 = ["fill", "outline"];
|
|
8319
8312
|
var FormCheckbox = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
8320
8313
|
name: "Checkbox",
|
|
@@ -8435,8 +8428,7 @@ var FormCheckbox = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
8435
8428
|
};
|
|
8436
8429
|
}
|
|
8437
8430
|
}));
|
|
8438
|
-
|
|
8439
|
-
//#region components/checkbox/checkbox-group.tsx
|
|
8431
|
+
// components/checkbox/checkbox-group.tsx
|
|
8440
8432
|
var FormCheckboxGroup = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
8441
8433
|
name: "CheckboxGroup",
|
|
8442
8434
|
props: {
|
|
@@ -8529,14 +8521,11 @@ var FormCheckboxGroup = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
8529
8521
|
};
|
|
8530
8522
|
}
|
|
8531
8523
|
}));
|
|
8532
|
-
|
|
8533
|
-
//#region components/checkbox/index.ts
|
|
8524
|
+
// components/checkbox/index.ts
|
|
8534
8525
|
var checkbox_default = FormCheckbox;
|
|
8535
|
-
|
|
8536
|
-
//#region components/check-card/context.ts
|
|
8526
|
+
// components/check-card/context.ts
|
|
8537
8527
|
var checkCardGroupKey = Symbol("check-card-group");
|
|
8538
|
-
|
|
8539
|
-
//#region components/check-card/check-card.tsx
|
|
8528
|
+
// components/check-card/check-card.tsx
|
|
8540
8529
|
var PAINTED_THEMES$10 = [
|
|
8541
8530
|
"fill",
|
|
8542
8531
|
"outline",
|
|
@@ -8786,11 +8775,9 @@ var check_card_group_default = markFormFieldComponent(/* @__PURE__ */ defineComp
|
|
|
8786
8775
|
}, null)) ?? slots.default?.()]);
|
|
8787
8776
|
}
|
|
8788
8777
|
}));
|
|
8789
|
-
|
|
8790
|
-
//#region components/collapse/context.ts
|
|
8778
|
+
// components/collapse/context.ts
|
|
8791
8779
|
var collapseContextKey = Symbol("collapse-context");
|
|
8792
|
-
|
|
8793
|
-
//#region components/collapse/collapse.tsx
|
|
8780
|
+
// components/collapse/collapse.tsx
|
|
8794
8781
|
var PAINTED_THEMES$9 = [
|
|
8795
8782
|
"fill",
|
|
8796
8783
|
"outline",
|
|
@@ -8850,8 +8837,7 @@ var Collapse = /* @__PURE__ */ defineComponent({
|
|
|
8850
8837
|
};
|
|
8851
8838
|
}
|
|
8852
8839
|
});
|
|
8853
|
-
|
|
8854
|
-
//#region components/collapse/collapse-panel.tsx
|
|
8840
|
+
// components/collapse/collapse-panel.tsx
|
|
8855
8841
|
var CollapsePanel = /* @__PURE__ */ defineComponent({
|
|
8856
8842
|
name: "CollapsePanel",
|
|
8857
8843
|
props: {
|
|
@@ -8917,14 +8903,12 @@ var CollapsePanel = /* @__PURE__ */ defineComponent({
|
|
|
8917
8903
|
};
|
|
8918
8904
|
}
|
|
8919
8905
|
});
|
|
8920
|
-
|
|
8921
|
-
//#region components/utils/share.ts
|
|
8906
|
+
// components/utils/share.ts
|
|
8922
8907
|
var assert = (condition, ...infos) => {
|
|
8923
8908
|
if (!condition) console.warn(...infos);
|
|
8924
8909
|
};
|
|
8925
|
-
var clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
8926
|
-
|
|
8927
|
-
//#region components/color-picker/alpha.tsx
|
|
8910
|
+
var clamp$1 = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
8911
|
+
// components/color-picker/alpha.tsx
|
|
8928
8912
|
var alpha_default = /* @__PURE__ */ defineComponent({
|
|
8929
8913
|
name: "Alpha",
|
|
8930
8914
|
props: {
|
|
@@ -8965,7 +8949,7 @@ var alpha_default = /* @__PURE__ */ defineComponent({
|
|
|
8965
8949
|
const canvas = refPaint.value;
|
|
8966
8950
|
if (!canvas) return;
|
|
8967
8951
|
const { width, left } = canvas.getBoundingClientRect();
|
|
8968
|
-
const x = clamp(e.clientX - left, 0, width);
|
|
8952
|
+
const x = clamp$1(e.clientX - left, 0, width);
|
|
8969
8953
|
emit("updateAlpha", parseFloat((x / width).toFixed(2)));
|
|
8970
8954
|
};
|
|
8971
8955
|
const onMouseDown = (e) => {
|
|
@@ -8994,7 +8978,7 @@ var alpha_default = /* @__PURE__ */ defineComponent({
|
|
|
8994
8978
|
else if (event.key === "End") value = 1;
|
|
8995
8979
|
else return;
|
|
8996
8980
|
event.preventDefault();
|
|
8997
|
-
emit("updateAlpha", Number(clamp(value, 0, 1).toFixed(2)));
|
|
8981
|
+
emit("updateAlpha", Number(clamp$1(value, 0, 1).toFixed(2)));
|
|
8998
8982
|
};
|
|
8999
8983
|
watch(() => props.modelValue, () => {
|
|
9000
8984
|
renderPaint();
|
|
@@ -9028,8 +9012,7 @@ var alpha_default = /* @__PURE__ */ defineComponent({
|
|
|
9028
9012
|
}, null)]);
|
|
9029
9013
|
}
|
|
9030
9014
|
});
|
|
9031
|
-
|
|
9032
|
-
//#region components/color-picker/hue.tsx
|
|
9015
|
+
// components/color-picker/hue.tsx
|
|
9033
9016
|
var hue_default = /* @__PURE__ */ defineComponent({
|
|
9034
9017
|
name: "Hue",
|
|
9035
9018
|
props: {
|
|
@@ -9066,7 +9049,7 @@ var hue_default = /* @__PURE__ */ defineComponent({
|
|
|
9066
9049
|
const canvas = refPaint.value;
|
|
9067
9050
|
if (!canvas) return;
|
|
9068
9051
|
const { width, left } = canvas.getBoundingClientRect();
|
|
9069
|
-
const newHue = clamp(e.clientX - left, 0, width) / width * 360;
|
|
9052
|
+
const newHue = clamp$1(e.clientX - left, 0, width) / width * 360;
|
|
9070
9053
|
emit("updateHue", Math.round(newHue));
|
|
9071
9054
|
};
|
|
9072
9055
|
const onMouseUp = () => {
|
|
@@ -9095,7 +9078,7 @@ var hue_default = /* @__PURE__ */ defineComponent({
|
|
|
9095
9078
|
else if (event.key === "End") value = 360;
|
|
9096
9079
|
else return;
|
|
9097
9080
|
event.preventDefault();
|
|
9098
|
-
emit("updateHue", clamp(value, 0, 360));
|
|
9081
|
+
emit("updateHue", clamp$1(value, 0, 360));
|
|
9099
9082
|
};
|
|
9100
9083
|
watch(() => props.hue, updatePos);
|
|
9101
9084
|
onMounted(() => {
|
|
@@ -9123,6 +9106,59 @@ var hue_default = /* @__PURE__ */ defineComponent({
|
|
|
9123
9106
|
}, null)]);
|
|
9124
9107
|
}
|
|
9125
9108
|
});
|
|
9109
|
+
// components/input-number/drag.ts
|
|
9110
|
+
/** Start-relative movement keeps speed independent of pointer-event frequency. */
|
|
9111
|
+
function startNumberDrag(event, options) {
|
|
9112
|
+
if (event.button !== 0 || event.isPrimary === false || options.blocked()) return () => {};
|
|
9113
|
+
event.preventDefault();
|
|
9114
|
+
const input = event.currentTarget.parentElement?.querySelector("input");
|
|
9115
|
+
const startX = event.clientX;
|
|
9116
|
+
const initial = new Big(options.value || 0);
|
|
9117
|
+
let step = new Big(1);
|
|
9118
|
+
try {
|
|
9119
|
+
const candidate = new Big(options.step);
|
|
9120
|
+
if (candidate.gt(0)) step = candidate;
|
|
9121
|
+
} catch {}
|
|
9122
|
+
let moved = false;
|
|
9123
|
+
let previous = initial.toFixed();
|
|
9124
|
+
const move = (next) => {
|
|
9125
|
+
if (next.pointerId !== event.pointerId) return;
|
|
9126
|
+
if (options.blocked()) {
|
|
9127
|
+
cleanup();
|
|
9128
|
+
return;
|
|
9129
|
+
}
|
|
9130
|
+
const delta = next.clientX - startX;
|
|
9131
|
+
if (!moved && Math.abs(delta) < 4) return;
|
|
9132
|
+
moved = true;
|
|
9133
|
+
if (next.cancelable) next.preventDefault();
|
|
9134
|
+
const distance = Math.abs(delta);
|
|
9135
|
+
const steps = Math.floor(distance / 4 * (1 + Math.min(9, distance / 80)));
|
|
9136
|
+
const value = initial.plus(step.times(delta < 0 ? -steps : steps)).toFixed();
|
|
9137
|
+
if (value !== previous) {
|
|
9138
|
+
previous = value;
|
|
9139
|
+
options.update(value);
|
|
9140
|
+
}
|
|
9141
|
+
};
|
|
9142
|
+
const up = (next) => {
|
|
9143
|
+
if (next.pointerId !== event.pointerId) return;
|
|
9144
|
+
cleanup();
|
|
9145
|
+
if (!moved && !options.blocked()) input?.focus();
|
|
9146
|
+
};
|
|
9147
|
+
const cancel = (next) => {
|
|
9148
|
+
if (next.pointerId === event.pointerId) cleanup();
|
|
9149
|
+
};
|
|
9150
|
+
const cleanup = () => {
|
|
9151
|
+
document.removeEventListener("pointermove", move);
|
|
9152
|
+
document.removeEventListener("pointerup", up);
|
|
9153
|
+
document.removeEventListener("pointercancel", cancel);
|
|
9154
|
+
window.removeEventListener("blur", cleanup);
|
|
9155
|
+
};
|
|
9156
|
+
document.addEventListener("pointermove", move, { passive: false });
|
|
9157
|
+
document.addEventListener("pointerup", up);
|
|
9158
|
+
document.addEventListener("pointercancel", cancel);
|
|
9159
|
+
window.addEventListener("blur", cleanup);
|
|
9160
|
+
return cleanup;
|
|
9161
|
+
}
|
|
9126
9162
|
var input_number_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
9127
9163
|
inheritAttrs: false,
|
|
9128
9164
|
name: "InputNumber",
|
|
@@ -9150,6 +9186,10 @@ var input_number_default = markFormFieldComponent(/* @__PURE__ */ defineComponen
|
|
|
9150
9186
|
type: Boolean,
|
|
9151
9187
|
default: true
|
|
9152
9188
|
},
|
|
9189
|
+
draggable: {
|
|
9190
|
+
type: Boolean,
|
|
9191
|
+
default: true
|
|
9192
|
+
},
|
|
9153
9193
|
keyboard: {
|
|
9154
9194
|
type: Boolean,
|
|
9155
9195
|
default: true
|
|
@@ -9188,6 +9228,12 @@ var input_number_default = markFormFieldComponent(/* @__PURE__ */ defineComponen
|
|
|
9188
9228
|
const parentSize = inject("size", void 0);
|
|
9189
9229
|
const innerValue = ref("");
|
|
9190
9230
|
const userInput = ref(null);
|
|
9231
|
+
const blocked = () => Boolean(props.disabled || field?.disabled.value || props.readonly || field?.readonly.value || !props.draggable);
|
|
9232
|
+
let stopDrag = () => {};
|
|
9233
|
+
onBeforeUnmount(() => stopDrag());
|
|
9234
|
+
watch(blocked, (value) => {
|
|
9235
|
+
if (value) stopDrag();
|
|
9236
|
+
});
|
|
9191
9237
|
const safePrecision = computed(() => props.precision === void 0 ? void 0 : Math.max(0, Math.trunc(props.precision)));
|
|
9192
9238
|
const clamp = (val) => {
|
|
9193
9239
|
if (!isValidBig(val)) return val === "" ? "" : innerValue.value;
|
|
@@ -9311,13 +9357,31 @@ var input_number_default = markFormFieldComponent(/* @__PURE__ */ defineComponen
|
|
|
9311
9357
|
prefix: () => slots.prefix?.(),
|
|
9312
9358
|
addonBefore: () => slots.addonBefore?.(),
|
|
9313
9359
|
addonAfter: () => slots.addonAfter?.(),
|
|
9314
|
-
controls: () =>
|
|
9360
|
+
controls: () => createVNode(Fragment, null, [!blocked() && createVNode("span", {
|
|
9361
|
+
"class": "k-input-number-drag",
|
|
9362
|
+
"aria-hidden": "true",
|
|
9363
|
+
"onDblclick": (event) => event.currentTarget.parentElement?.querySelector("input")?.select(),
|
|
9364
|
+
"onPointerdown": (event) => {
|
|
9365
|
+
stopDrag();
|
|
9366
|
+
stopDrag = startNumberDrag(event, {
|
|
9367
|
+
value: isValidBig(innerValue.value) ? innerValue.value : "0",
|
|
9368
|
+
step: props.step,
|
|
9369
|
+
blocked,
|
|
9370
|
+
update: (value) => {
|
|
9371
|
+
const next = clamp(value);
|
|
9372
|
+
if (next === innerValue.value) return;
|
|
9373
|
+
innerValue.value = next;
|
|
9374
|
+
userInput.value = null;
|
|
9375
|
+
emitValue(Number(next));
|
|
9376
|
+
}
|
|
9377
|
+
});
|
|
9378
|
+
}
|
|
9379
|
+
}, null), controls])
|
|
9315
9380
|
});
|
|
9316
9381
|
};
|
|
9317
9382
|
}
|
|
9318
9383
|
}));
|
|
9319
|
-
|
|
9320
|
-
//#region components/select/option.tsx
|
|
9384
|
+
// components/select/option.tsx
|
|
9321
9385
|
var Option = /* @__PURE__ */ defineComponent({
|
|
9322
9386
|
name: "Option",
|
|
9323
9387
|
props: {
|
|
@@ -9372,8 +9436,7 @@ var Option = /* @__PURE__ */ defineComponent({
|
|
|
9372
9436
|
};
|
|
9373
9437
|
}
|
|
9374
9438
|
});
|
|
9375
|
-
|
|
9376
|
-
//#region components/utils/css.ts
|
|
9439
|
+
// components/utils/css.ts
|
|
9377
9440
|
var numericLengthPattern = /^-?(?:\d+\.?\d*|\.\d+)$/;
|
|
9378
9441
|
var toCssLength = (value) => {
|
|
9379
9442
|
if (typeof value === "number") return Number.isFinite(value) ? `${value}px` : void 0;
|
|
@@ -9382,8 +9445,7 @@ var toCssLength = (value) => {
|
|
|
9382
9445
|
if (!normalized) return void 0;
|
|
9383
9446
|
return numericLengthPattern.test(normalized) ? `${normalized}px` : normalized;
|
|
9384
9447
|
};
|
|
9385
|
-
|
|
9386
|
-
//#region components/space/index.tsx
|
|
9448
|
+
// components/space/index.tsx
|
|
9387
9449
|
var Space = /* @__PURE__ */ defineComponent({
|
|
9388
9450
|
name: "Space",
|
|
9389
9451
|
inheritAttrs: false,
|
|
@@ -9461,8 +9523,7 @@ var Space = /* @__PURE__ */ defineComponent({
|
|
|
9461
9523
|
};
|
|
9462
9524
|
}
|
|
9463
9525
|
});
|
|
9464
|
-
|
|
9465
|
-
//#region components/tag/index.tsx
|
|
9526
|
+
// components/tag/index.tsx
|
|
9466
9527
|
var tagProps = {
|
|
9467
9528
|
closeable: Boolean,
|
|
9468
9529
|
compact: Boolean,
|
|
@@ -9544,8 +9605,7 @@ var Tag = /* @__PURE__ */ defineComponent({
|
|
|
9544
9605
|
};
|
|
9545
9606
|
}
|
|
9546
9607
|
});
|
|
9547
|
-
|
|
9548
|
-
//#region components/tooltip/index.tsx
|
|
9608
|
+
// components/tooltip/index.tsx
|
|
9549
9609
|
var tooltipProps = {
|
|
9550
9610
|
trigger: {
|
|
9551
9611
|
type: String,
|
|
@@ -9561,6 +9621,7 @@ var tooltipProps = {
|
|
|
9561
9621
|
color: String,
|
|
9562
9622
|
disabled: Boolean,
|
|
9563
9623
|
width: [Number, String],
|
|
9624
|
+
arrowPointAtCenter: Boolean,
|
|
9564
9625
|
placement: {
|
|
9565
9626
|
type: String,
|
|
9566
9627
|
default: "top"
|
|
@@ -9591,6 +9652,7 @@ var Tooltip = /* @__PURE__ */ defineComponent({
|
|
|
9591
9652
|
"disabled": props.disabled,
|
|
9592
9653
|
"trigger": props.trigger,
|
|
9593
9654
|
"placement": props.placement,
|
|
9655
|
+
"arrowPointAtCenter": props.arrowPointAtCenter,
|
|
9594
9656
|
"panelOnly": props.panelOnly,
|
|
9595
9657
|
"prefixCls": "k-tooltip",
|
|
9596
9658
|
"destroyOnClose": props.destroyOnClose,
|
|
@@ -9611,7 +9673,10 @@ var Tooltip = /* @__PURE__ */ defineComponent({
|
|
|
9611
9673
|
}, {
|
|
9612
9674
|
default: slots.default,
|
|
9613
9675
|
overlay: () => createVNode("div", { "class": "k-tooltip-title" }, [slots.title?.() ?? props.title]),
|
|
9614
|
-
arrow: () => createVNode("div", {
|
|
9676
|
+
arrow: () => createVNode("div", {
|
|
9677
|
+
"class": "k-tooltip-arrow",
|
|
9678
|
+
"data-popup-arrow": ""
|
|
9679
|
+
}, [createVNode("svg", {
|
|
9615
9680
|
"style": { fill: bgColor || "currentcolor" },
|
|
9616
9681
|
"viewBox": "0 0 24 7"
|
|
9617
9682
|
}, [createVNode("path", { "d": "M24 0V1C20 1 18.5 2 16.5 4C14.5 6 14 7 12 7C10 7 9.5 6 7.5 4C5.5 2 4 1 0 1V0H24Z" }, null), createVNode("path", {
|
|
@@ -9633,8 +9698,7 @@ var TooltipPanel = /* @__PURE__ */ defineComponent({
|
|
|
9633
9698
|
panelOnly: true
|
|
9634
9699
|
}, slots)
|
|
9635
9700
|
});
|
|
9636
|
-
|
|
9637
|
-
//#region components/utils/selection-tags.tsx
|
|
9701
|
+
// components/utils/selection-tags.tsx
|
|
9638
9702
|
function _isSlot$12(s) {
|
|
9639
9703
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
9640
9704
|
}
|
|
@@ -9675,8 +9739,7 @@ function renderSelectionTags({ labels, maxTagCount, size = "medium", shape, them
|
|
|
9675
9739
|
] })] }));
|
|
9676
9740
|
return tags;
|
|
9677
9741
|
}
|
|
9678
|
-
|
|
9679
|
-
//#region components/virtual-list/range.ts
|
|
9742
|
+
// components/virtual-list/range.ts
|
|
9680
9743
|
var normalizeItemHeight = (value) => Number.isFinite(value) && value > 0 ? value : 1;
|
|
9681
9744
|
var getVirtualRange = ({ count, scrollTop, viewportHeight, itemHeight, overscan }) => {
|
|
9682
9745
|
const safeCount = Number.isFinite(count) ? Math.max(0, Math.floor(count)) : 0;
|
|
@@ -9694,8 +9757,7 @@ var getVirtualRange = ({ count, scrollTop, viewportHeight, itemHeight, overscan
|
|
|
9694
9757
|
total: safeCount * safeHeight
|
|
9695
9758
|
};
|
|
9696
9759
|
};
|
|
9697
|
-
|
|
9698
|
-
//#region components/virtual-list/index.tsx
|
|
9760
|
+
// components/virtual-list/index.tsx
|
|
9699
9761
|
var VirtualList = /* @__PURE__ */ defineComponent({
|
|
9700
9762
|
name: "VirtualList",
|
|
9701
9763
|
inheritAttrs: false,
|
|
@@ -9819,8 +9881,7 @@ var VirtualList = /* @__PURE__ */ defineComponent({
|
|
|
9819
9881
|
};
|
|
9820
9882
|
}
|
|
9821
9883
|
});
|
|
9822
|
-
|
|
9823
|
-
//#region components/select/select.tsx
|
|
9884
|
+
// components/select/select.tsx
|
|
9824
9885
|
var FormSelect = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
9825
9886
|
name: "Select",
|
|
9826
9887
|
emits: {
|
|
@@ -10366,8 +10427,7 @@ var FormSelect = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
10366
10427
|
};
|
|
10367
10428
|
}
|
|
10368
10429
|
}));
|
|
10369
|
-
|
|
10370
|
-
//#region components/color-picker/mode.tsx
|
|
10430
|
+
// components/color-picker/mode.tsx
|
|
10371
10431
|
var mode_default = /* @__PURE__ */ defineComponent({
|
|
10372
10432
|
name: "Mode",
|
|
10373
10433
|
props: {
|
|
@@ -10529,8 +10589,7 @@ var mode_default = /* @__PURE__ */ defineComponent({
|
|
|
10529
10589
|
};
|
|
10530
10590
|
}
|
|
10531
10591
|
});
|
|
10532
|
-
|
|
10533
|
-
//#region components/color-picker/paint.tsx
|
|
10592
|
+
// components/color-picker/paint.tsx
|
|
10534
10593
|
var paint_default = /* @__PURE__ */ defineComponent({
|
|
10535
10594
|
name: "Paint",
|
|
10536
10595
|
props: {
|
|
@@ -10587,8 +10646,8 @@ var paint_default = /* @__PURE__ */ defineComponent({
|
|
|
10587
10646
|
const canvas = refPaint.value;
|
|
10588
10647
|
if (!canvas) return;
|
|
10589
10648
|
const { width, height, left, top } = canvas.getBoundingClientRect();
|
|
10590
|
-
const x = clamp(e.clientX - left, 0, width);
|
|
10591
|
-
const y = clamp(e.clientY - top, 0, height);
|
|
10649
|
+
const x = clamp$1(e.clientX - left, 0, width);
|
|
10650
|
+
const y = clamp$1(e.clientY - top, 0, height);
|
|
10592
10651
|
dotPos.x = x - 7;
|
|
10593
10652
|
dotPos.y = y - 7;
|
|
10594
10653
|
const s = x / width * 100;
|
|
@@ -10619,7 +10678,7 @@ var paint_default = /* @__PURE__ */ defineComponent({
|
|
|
10619
10678
|
else if (event.key === "ArrowDown") hsv.v -= step;
|
|
10620
10679
|
else return;
|
|
10621
10680
|
event.preventDefault();
|
|
10622
|
-
emit("updateRGB", Color().hsv(props.hue, clamp(hsv.s, 0, 100), clamp(hsv.v, 0, 100)).rgb().object());
|
|
10681
|
+
emit("updateRGB", Color().hsv(props.hue, clamp$1(hsv.s, 0, 100), clamp$1(hsv.v, 0, 100)).rgb().object());
|
|
10623
10682
|
};
|
|
10624
10683
|
watch([() => props.hue, () => props.modelValue], () => {
|
|
10625
10684
|
renderPaint();
|
|
@@ -10660,8 +10719,7 @@ var paint_default = /* @__PURE__ */ defineComponent({
|
|
|
10660
10719
|
}, null)]);
|
|
10661
10720
|
}
|
|
10662
10721
|
});
|
|
10663
|
-
|
|
10664
|
-
//#region components/color-picker/presets.tsx
|
|
10722
|
+
// components/color-picker/presets.tsx
|
|
10665
10723
|
var presets_default = /* @__PURE__ */ defineComponent({
|
|
10666
10724
|
name: "Presets",
|
|
10667
10725
|
props: {
|
|
@@ -10717,8 +10775,7 @@ var presets_default = /* @__PURE__ */ defineComponent({
|
|
|
10717
10775
|
};
|
|
10718
10776
|
}
|
|
10719
10777
|
});
|
|
10720
|
-
|
|
10721
|
-
//#region components/color-picker/index.tsx
|
|
10778
|
+
// components/color-picker/index.tsx
|
|
10722
10779
|
var colorPickerProps = {
|
|
10723
10780
|
modelValue: String,
|
|
10724
10781
|
value: String,
|
|
@@ -10727,6 +10784,7 @@ var colorPickerProps = {
|
|
|
10727
10784
|
readonly: Boolean,
|
|
10728
10785
|
disabledAlpha: Boolean,
|
|
10729
10786
|
showText: Boolean,
|
|
10787
|
+
arrowPointAtCenter: Boolean,
|
|
10730
10788
|
placement: {
|
|
10731
10789
|
type: String,
|
|
10732
10790
|
default: "bottom-left"
|
|
@@ -10931,7 +10989,10 @@ var ColorPicker = /* @__PURE__ */ defineComponent({
|
|
|
10931
10989
|
"modelValue": props.presets,
|
|
10932
10990
|
"color": currentColor.value
|
|
10933
10991
|
}, null)
|
|
10934
|
-
]), !props.panelOnly && createVNode("div", {
|
|
10992
|
+
]), !props.panelOnly && createVNode("div", {
|
|
10993
|
+
"class": `k-color-picker-arrow`,
|
|
10994
|
+
"data-popup-arrow": ""
|
|
10995
|
+
}, [createVNode("svg", {
|
|
10935
10996
|
"style": { fill: "currentcolor" },
|
|
10936
10997
|
"viewBox": "0 0 24 8"
|
|
10937
10998
|
}, [createVNode("path", {
|
|
@@ -10950,6 +11011,7 @@ var ColorPicker = /* @__PURE__ */ defineComponent({
|
|
|
10950
11011
|
"target": refSelection,
|
|
10951
11012
|
"trigger": "manual",
|
|
10952
11013
|
"placement": props.placement,
|
|
11014
|
+
"arrowPointAtCenter": props.arrowPointAtCenter,
|
|
10953
11015
|
"prefixCls": "k-color-picker-dropdown",
|
|
10954
11016
|
"destroyOnClose": props.destroyOnClose,
|
|
10955
11017
|
"transitionName": "k-color-picker",
|
|
@@ -11033,12 +11095,588 @@ var ColorPickerPanel = /* @__PURE__ */ defineComponent({
|
|
|
11033
11095
|
})
|
|
11034
11096
|
});
|
|
11035
11097
|
var color_picker_default = markFormFieldComponent(ColorPicker);
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11098
|
+
// components/gradient-picker/corners.tsx
|
|
11099
|
+
var positions = [
|
|
11100
|
+
"tl",
|
|
11101
|
+
"tr",
|
|
11102
|
+
"bl",
|
|
11103
|
+
"br"
|
|
11104
|
+
];
|
|
11105
|
+
var labels = [
|
|
11106
|
+
"Top left",
|
|
11107
|
+
"Top right",
|
|
11108
|
+
"Bottom left",
|
|
11109
|
+
"Bottom right"
|
|
11110
|
+
];
|
|
11111
|
+
var corners_default = /* @__PURE__ */ defineComponent({
|
|
11112
|
+
name: "GradientCorners",
|
|
11113
|
+
props: {
|
|
11114
|
+
disabled: Boolean,
|
|
11115
|
+
colors: {
|
|
11116
|
+
type: Array,
|
|
11117
|
+
required: true
|
|
11118
|
+
},
|
|
11119
|
+
selected: {
|
|
11120
|
+
type: Number,
|
|
11121
|
+
default: 0
|
|
11122
|
+
},
|
|
11123
|
+
gradient: {
|
|
11124
|
+
type: String,
|
|
11125
|
+
default: ""
|
|
11126
|
+
}
|
|
11127
|
+
},
|
|
11128
|
+
emits: { activate: (index, element) => typeof index === "number" && element instanceof HTMLElement },
|
|
11129
|
+
setup(props, { emit }) {
|
|
11130
|
+
return () => createVNode("div", { "class": "k-gradient-picker-corners" }, [createVNode("div", { "class": "k-gradient-picker-corners-fill" }, [createVNode("div", {
|
|
11131
|
+
"class": "k-gradient-picker-corners-color",
|
|
11132
|
+
"style": { backgroundImage: props.gradient }
|
|
11133
|
+
}, null)]), props.colors.map((color, index) => createVNode("button", {
|
|
11134
|
+
"type": "button",
|
|
11135
|
+
"class": [
|
|
11136
|
+
"k-gradient-picker-corner",
|
|
11137
|
+
`k-gradient-picker-corner-${positions[index]}`,
|
|
11138
|
+
{ "k-gradient-picker-corner-active": index === props.selected }
|
|
11139
|
+
],
|
|
11140
|
+
"aria-label": labels[index],
|
|
11141
|
+
"aria-pressed": index === props.selected,
|
|
11142
|
+
"aria-haspopup": "dialog",
|
|
11143
|
+
"aria-disabled": props.disabled || void 0,
|
|
11144
|
+
"disabled": props.disabled,
|
|
11145
|
+
"onClick": (event) => {
|
|
11146
|
+
if (props.disabled) return;
|
|
11147
|
+
emit("activate", index, event.currentTarget);
|
|
11148
|
+
}
|
|
11149
|
+
}, [createVNode("span", {
|
|
11150
|
+
"class": "k-gradient-picker-corner-color",
|
|
11151
|
+
"style": { backgroundColor: color }
|
|
11152
|
+
}, null)]))]);
|
|
11153
|
+
}
|
|
11154
|
+
});
|
|
11155
|
+
// components/gradient-picker/stops.tsx
|
|
11156
|
+
var round$2 = (value) => Math.round(value * 100) / 100;
|
|
11157
|
+
var touchStart = (event) => ({
|
|
11158
|
+
clientX: event.touches[0].clientX,
|
|
11159
|
+
clientY: event.touches[0].clientY,
|
|
11160
|
+
currentTarget: event.currentTarget,
|
|
11161
|
+
preventDefault: () => event.preventDefault(),
|
|
11162
|
+
stopPropagation: () => event.stopPropagation()
|
|
11163
|
+
});
|
|
11164
|
+
var stops_default = /* @__PURE__ */ defineComponent({
|
|
11165
|
+
name: "GradientStops",
|
|
11166
|
+
props: {
|
|
11167
|
+
disabled: Boolean,
|
|
11168
|
+
stops: {
|
|
11169
|
+
type: Array,
|
|
11170
|
+
required: true
|
|
11171
|
+
},
|
|
11172
|
+
selected: {
|
|
11173
|
+
type: Number,
|
|
11174
|
+
default: 0
|
|
11175
|
+
}
|
|
11176
|
+
},
|
|
11177
|
+
emits: {
|
|
11178
|
+
add: (offset) => typeof offset === "number",
|
|
11179
|
+
move: (index, offset) => typeof index === "number" && typeof offset === "number",
|
|
11180
|
+
remove: (index) => typeof index === "number",
|
|
11181
|
+
select: (index) => typeof index === "number",
|
|
11182
|
+
activate: (index, element) => typeof index === "number" && element instanceof HTMLElement
|
|
11183
|
+
},
|
|
11184
|
+
setup(props, { emit }) {
|
|
11185
|
+
const lane = ref();
|
|
11186
|
+
const removingIndex = ref(-1);
|
|
11187
|
+
let dragging = false;
|
|
11188
|
+
let moved = false;
|
|
11189
|
+
let dragIndex = -1;
|
|
11190
|
+
let dragElement = null;
|
|
11191
|
+
let startX = 0;
|
|
11192
|
+
let startY = 0;
|
|
11193
|
+
let minOffset = 0;
|
|
11194
|
+
let maxOffset = 100;
|
|
11195
|
+
const offsetAt = (clientX) => {
|
|
11196
|
+
const rect = lane.value?.getBoundingClientRect();
|
|
11197
|
+
if (!rect || !rect.width) return 0;
|
|
11198
|
+
return round$2(clamp$1((clientX - rect.left) / rect.width * 100, 0, 100));
|
|
11199
|
+
};
|
|
11200
|
+
const stopDrag = () => {
|
|
11201
|
+
dragging = false;
|
|
11202
|
+
moved = false;
|
|
11203
|
+
dragElement = null;
|
|
11204
|
+
removingIndex.value = -1;
|
|
11205
|
+
document.removeEventListener("mousemove", handleMove);
|
|
11206
|
+
document.removeEventListener("mouseup", handleUp);
|
|
11207
|
+
document.removeEventListener("touchmove", handleTouchMove);
|
|
11208
|
+
document.removeEventListener("touchend", handleUp);
|
|
11209
|
+
document.removeEventListener("touchcancel", stopDrag);
|
|
11210
|
+
};
|
|
11211
|
+
const handleMove = (event) => {
|
|
11212
|
+
if (!dragging) return;
|
|
11213
|
+
if (Math.abs(event.clientX - startX) > 2 || Math.abs(event.clientY - startY) > 2) moved = true;
|
|
11214
|
+
const offset = round$2(clamp$1(offsetAt(event.clientX), minOffset, maxOffset));
|
|
11215
|
+
emit("move", dragIndex, offset);
|
|
11216
|
+
removingIndex.value = event.clientY - startY > 24 && props.stops.length > 2 ? dragIndex : -1;
|
|
11217
|
+
};
|
|
11218
|
+
const handleTouchMove = (event) => {
|
|
11219
|
+
if (event.cancelable) event.preventDefault();
|
|
11220
|
+
if (event.touches[0]) handleMove(event.touches[0]);
|
|
11221
|
+
};
|
|
11222
|
+
const handleUp = () => {
|
|
11223
|
+
if (!dragging) return;
|
|
11224
|
+
const index = dragIndex;
|
|
11225
|
+
const element = dragElement;
|
|
11226
|
+
const removing = removingIndex.value >= 0;
|
|
11227
|
+
const activating = !removing && !moved && element !== null;
|
|
11228
|
+
stopDrag();
|
|
11229
|
+
if (removing) emit("remove", index);
|
|
11230
|
+
else if (activating) emit("activate", index, element);
|
|
11231
|
+
};
|
|
11232
|
+
const beginDrag = (index, event, min, max, element) => {
|
|
11233
|
+
dragging = true;
|
|
11234
|
+
moved = false;
|
|
11235
|
+
dragIndex = index;
|
|
11236
|
+
dragElement = element;
|
|
11237
|
+
startX = event.clientX;
|
|
11238
|
+
startY = event.clientY;
|
|
11239
|
+
minOffset = min;
|
|
11240
|
+
maxOffset = max;
|
|
11241
|
+
document.addEventListener("mousemove", handleMove);
|
|
11242
|
+
document.addEventListener("mouseup", handleUp);
|
|
11243
|
+
document.addEventListener("touchmove", handleTouchMove, { passive: false });
|
|
11244
|
+
document.addEventListener("touchend", handleUp);
|
|
11245
|
+
document.addEventListener("touchcancel", stopDrag);
|
|
11246
|
+
};
|
|
11247
|
+
const startLaneDrag = (event) => {
|
|
11248
|
+
if (props.disabled) return;
|
|
11249
|
+
event.preventDefault();
|
|
11250
|
+
const offset = offsetAt(event.clientX);
|
|
11251
|
+
const near = props.stops.findIndex((stop) => Math.abs(stop.offset - offset) <= 2);
|
|
11252
|
+
let index = near;
|
|
11253
|
+
if (near < 0) {
|
|
11254
|
+
index = props.stops.filter((stop) => stop.offset < offset).length;
|
|
11255
|
+
emit("add", offset);
|
|
11256
|
+
emit("select", index);
|
|
11257
|
+
}
|
|
11258
|
+
const previous = props.stops[index - 1];
|
|
11259
|
+
const next = near >= 0 ? props.stops[index + 1] : props.stops[index];
|
|
11260
|
+
const low = previous ? previous.offset + .1 : 0;
|
|
11261
|
+
const high = next ? next.offset - .1 : 100;
|
|
11262
|
+
const current = near >= 0 ? props.stops[index].offset : offset;
|
|
11263
|
+
beginDrag(index, event, Math.min(low, current), Math.max(high, current), null);
|
|
11264
|
+
};
|
|
11265
|
+
const startStopDrag = (event, index) => {
|
|
11266
|
+
if (props.disabled) return;
|
|
11267
|
+
event.preventDefault();
|
|
11268
|
+
event.stopPropagation();
|
|
11269
|
+
emit("select", index);
|
|
11270
|
+
const previous = props.stops[index - 1];
|
|
11271
|
+
const next = props.stops[index + 1];
|
|
11272
|
+
const low = previous ? previous.offset + .1 : 0;
|
|
11273
|
+
const high = next ? next.offset - .1 : 100;
|
|
11274
|
+
const current = props.stops[index].offset;
|
|
11275
|
+
const element = event.currentTarget;
|
|
11276
|
+
beginDrag(index, event, Math.min(low, current), Math.max(high, current), element);
|
|
11277
|
+
};
|
|
11278
|
+
const onKeydown = (event, index) => {
|
|
11279
|
+
if (props.disabled) return;
|
|
11280
|
+
const stop = props.stops[index];
|
|
11281
|
+
const previous = props.stops[index - 1];
|
|
11282
|
+
const next = props.stops[index + 1];
|
|
11283
|
+
const low = previous ? previous.offset + .1 : 0;
|
|
11284
|
+
const high = next ? next.offset - .1 : 100;
|
|
11285
|
+
const current = stop.offset;
|
|
11286
|
+
const lower = Math.min(low, current);
|
|
11287
|
+
const upper = Math.max(high, current);
|
|
11288
|
+
const step = event.shiftKey ? 10 : 1;
|
|
11289
|
+
if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
|
|
11290
|
+
event.preventDefault();
|
|
11291
|
+
emit("move", index, round$2(clamp$1(stop.offset + (event.key === "ArrowRight" ? step : -step), lower, upper)));
|
|
11292
|
+
} else if (event.key === "Home" || event.key === "End") {
|
|
11293
|
+
event.preventDefault();
|
|
11294
|
+
emit("move", index, round$2(event.key === "Home" ? lower : upper));
|
|
11295
|
+
} else if ((event.key === "Delete" || event.key === "Backspace") && props.stops.length > 2) {
|
|
11296
|
+
event.preventDefault();
|
|
11297
|
+
emit("remove", index);
|
|
11298
|
+
} else if (event.key === "Enter" || event.key === " ") {
|
|
11299
|
+
event.preventDefault();
|
|
11300
|
+
emit("select", index);
|
|
11301
|
+
emit("activate", index, event.currentTarget);
|
|
11302
|
+
}
|
|
11303
|
+
};
|
|
11304
|
+
watch(() => props.disabled, (disabled) => {
|
|
11305
|
+
if (disabled) stopDrag();
|
|
11306
|
+
});
|
|
11307
|
+
onBeforeUnmount(stopDrag);
|
|
11308
|
+
return () => createVNode("div", {
|
|
11309
|
+
"class": "k-gradient-picker-stops",
|
|
11310
|
+
"ref": lane,
|
|
11311
|
+
"onMousedown": startLaneDrag,
|
|
11312
|
+
"onTouchstart": (event) => {
|
|
11313
|
+
if (event.touches.length === 1) startLaneDrag(touchStart(event));
|
|
11314
|
+
}
|
|
11315
|
+
}, [props.stops.map((stop, index) => createVNode("span", {
|
|
11316
|
+
"class": ["k-gradient-picker-stop", {
|
|
11317
|
+
"k-gradient-picker-stop-active": index === props.selected,
|
|
11318
|
+
"k-gradient-picker-stop-removing": index === removingIndex.value
|
|
11319
|
+
}],
|
|
11320
|
+
"style": { left: `${stop.offset}%` },
|
|
11321
|
+
"role": "slider",
|
|
11322
|
+
"tabindex": props.disabled ? -1 : 0,
|
|
11323
|
+
"aria-label": `Color stop ${index + 1}`,
|
|
11324
|
+
"aria-haspopup": "dialog",
|
|
11325
|
+
"aria-valuemin": 0,
|
|
11326
|
+
"aria-valuemax": 100,
|
|
11327
|
+
"aria-valuenow": stop.offset,
|
|
11328
|
+
"aria-disabled": props.disabled || void 0,
|
|
11329
|
+
"onMousedown": (event) => startStopDrag(event, index),
|
|
11330
|
+
"onTouchstart": (event) => {
|
|
11331
|
+
if (event.touches.length === 1) startStopDrag(touchStart(event), index);
|
|
11332
|
+
},
|
|
11333
|
+
"onKeydown": (event) => onKeydown(event, index)
|
|
11334
|
+
}, [createVNode("span", {
|
|
11335
|
+
"class": "k-gradient-picker-stop-color",
|
|
11336
|
+
"style": { backgroundColor: stop.color }
|
|
11337
|
+
}, null)]))]);
|
|
11338
|
+
}
|
|
11339
|
+
});
|
|
11340
|
+
// components/gradient-picker/types.ts
|
|
11341
|
+
var clamp = (value, min, max) => Math.min(max, Math.max(min, Number.isFinite(value) ? value : min));
|
|
11342
|
+
var round$1 = (value) => Math.round(value * 100) / 100;
|
|
11343
|
+
var clampOffset = (value) => round$1(clamp(value, 0, 100));
|
|
11344
|
+
function createLinearGradient() {
|
|
11345
|
+
return [{
|
|
11346
|
+
color: "#ff0000",
|
|
11347
|
+
offset: 0
|
|
11348
|
+
}, {
|
|
11349
|
+
color: "#0000ff",
|
|
11350
|
+
offset: 100
|
|
11351
|
+
}];
|
|
11352
|
+
}
|
|
11353
|
+
function createCornerGradient() {
|
|
11354
|
+
return [
|
|
11355
|
+
"#ff0000",
|
|
11356
|
+
"#ffff00",
|
|
11357
|
+
"#00ff00",
|
|
11358
|
+
"#0000ff"
|
|
11359
|
+
];
|
|
11360
|
+
}
|
|
11361
|
+
function formatColor(color) {
|
|
11362
|
+
const instance = Color(color);
|
|
11363
|
+
return (instance.alpha() < 1 ? instance.hexa() : instance.hex()).toLowerCase();
|
|
11364
|
+
}
|
|
11365
|
+
function mixGradientColor(from, to, ratio) {
|
|
11366
|
+
const start = Color(from);
|
|
11367
|
+
const end = Color(to);
|
|
11368
|
+
const weight = clamp(ratio, 0, 1);
|
|
11369
|
+
const alpha = start.alpha() + (end.alpha() - start.alpha()) * weight;
|
|
11370
|
+
const channel = (a, b) => alpha === 0 ? 0 : Math.round((a * start.alpha() * (1 - weight) + b * end.alpha() * weight) / alpha);
|
|
11371
|
+
return formatColor(Color({
|
|
11372
|
+
r: channel(start.red(), end.red()),
|
|
11373
|
+
g: channel(start.green(), end.green()),
|
|
11374
|
+
b: channel(start.blue(), end.blue()),
|
|
11375
|
+
alpha: Math.round(alpha * 1e3) / 1e3
|
|
11376
|
+
}));
|
|
11377
|
+
}
|
|
11378
|
+
function normalizeStops(stops) {
|
|
11379
|
+
const list = (stops ?? []).filter((stop) => stop && typeof stop.color === "string").map((stop) => ({
|
|
11380
|
+
color: formatColor(stop.color),
|
|
11381
|
+
offset: clampOffset(stop.offset)
|
|
11382
|
+
})).sort((a, b) => a.offset - b.offset);
|
|
11383
|
+
if (list.length === 0) return createLinearGradient();
|
|
11384
|
+
if (list.length === 1) {
|
|
11385
|
+
const only = list[0];
|
|
11386
|
+
return only.offset <= 50 ? [only, {
|
|
11387
|
+
color: "#000000",
|
|
11388
|
+
offset: 100
|
|
11389
|
+
}] : [{
|
|
11390
|
+
color: "#000000",
|
|
11391
|
+
offset: 0
|
|
11392
|
+
}, only];
|
|
11393
|
+
}
|
|
11394
|
+
return list;
|
|
11395
|
+
}
|
|
11396
|
+
var isColorList = (value) => value.every((item) => typeof item === "string");
|
|
11397
|
+
var isStopList = (value) => value.some((item) => typeof item === "object" && item !== null);
|
|
11398
|
+
/**
|
|
11399
|
+
* Fill in a complete value of `type`. A value of the other shape is converted the way the panel
|
|
11400
|
+
* switches: stops → corner takes the two end colors for the left and right edges; corner → stops
|
|
11401
|
+
* runs the diagonal (top-left to bottom-right).
|
|
11402
|
+
*/
|
|
11403
|
+
function normalizeGradient(value, type = "linear") {
|
|
11404
|
+
const list = Array.isArray(value) ? value : [];
|
|
11405
|
+
if (type === "corner") {
|
|
11406
|
+
if (list.length && isColorList(list)) {
|
|
11407
|
+
const fallback = createCornerGradient();
|
|
11408
|
+
const colors = list.slice(0, 4).map((color) => formatColor(color));
|
|
11409
|
+
while (colors.length < 4) colors.push(fallback[colors.length]);
|
|
11410
|
+
return colors;
|
|
11411
|
+
}
|
|
11412
|
+
if (list.length) {
|
|
11413
|
+
const stops = normalizeStops(list);
|
|
11414
|
+
const first = stops[0].color;
|
|
11415
|
+
const last = stops[stops.length - 1].color;
|
|
11416
|
+
return [
|
|
11417
|
+
first,
|
|
11418
|
+
last,
|
|
11419
|
+
first,
|
|
11420
|
+
last
|
|
11421
|
+
];
|
|
11422
|
+
}
|
|
11423
|
+
return createCornerGradient();
|
|
11424
|
+
}
|
|
11425
|
+
if (list.length && isStopList(list)) return normalizeStops(list);
|
|
11426
|
+
if (list.length) {
|
|
11427
|
+
const colors = list;
|
|
11428
|
+
return [{
|
|
11429
|
+
color: formatColor(colors[0]),
|
|
11430
|
+
offset: 0
|
|
11431
|
+
}, {
|
|
11432
|
+
color: formatColor(colors[colors.length - 1]),
|
|
11433
|
+
offset: 100
|
|
11434
|
+
}];
|
|
11435
|
+
}
|
|
11436
|
+
return createLinearGradient();
|
|
11437
|
+
}
|
|
11438
|
+
function gradientColorAtOffset(value, offset) {
|
|
11439
|
+
const stops = value;
|
|
11440
|
+
if (!stops.length) return "#000000";
|
|
11441
|
+
const target = clampOffset(offset);
|
|
11442
|
+
if (target <= stops[0].offset) return stops[0].color;
|
|
11443
|
+
const last = stops[stops.length - 1];
|
|
11444
|
+
if (target >= last.offset) return last.color;
|
|
11445
|
+
for (let index = 1; index < stops.length; index++) {
|
|
11446
|
+
const previous = stops[index - 1];
|
|
11447
|
+
const next = stops[index];
|
|
11448
|
+
if (target <= next.offset) {
|
|
11449
|
+
const span = next.offset - previous.offset;
|
|
11450
|
+
return mixGradientColor(previous.color, next.color, span === 0 ? 0 : (target - previous.offset) / span);
|
|
11451
|
+
}
|
|
11452
|
+
}
|
|
11453
|
+
return last.color;
|
|
11454
|
+
}
|
|
11455
|
+
/**
|
|
11456
|
+
* CSS for the component's own preview and for demos: stops render left to right; the four-corner
|
|
11457
|
+
* value has no single native CSS gradient, so the default is a layered approximation. Consumers who
|
|
11458
|
+
* need another function (radial, conic, direction) build it from the value instead.
|
|
11459
|
+
*/
|
|
11460
|
+
function formatGradient(value) {
|
|
11461
|
+
if (Array.isArray(value) && value.length && isColorList(value)) {
|
|
11462
|
+
const [topLeft, topRight, bottomLeft, bottomRight] = value;
|
|
11463
|
+
const fade = (color) => {
|
|
11464
|
+
const instance = Color(color);
|
|
11465
|
+
return `rgba(${Math.round(instance.red())}, ${Math.round(instance.green())}, ${Math.round(instance.blue())}, 0)`;
|
|
11466
|
+
};
|
|
11467
|
+
return [
|
|
11468
|
+
`radial-gradient(at 0% 0%, ${topLeft} 0%, ${fade(topLeft)} 70%)`,
|
|
11469
|
+
`radial-gradient(at 100% 0%, ${topRight} 0%, ${fade(topRight)} 70%)`,
|
|
11470
|
+
`radial-gradient(at 0% 100%, ${bottomLeft} 0%, ${fade(bottomLeft)} 70%)`,
|
|
11471
|
+
`radial-gradient(at 100% 100%, ${bottomRight} 0%, ${fade(bottomRight)} 70%)`,
|
|
11472
|
+
`linear-gradient(135deg, ${topLeft} 0%, ${bottomRight} 100%)`
|
|
11473
|
+
].join(", ");
|
|
11474
|
+
}
|
|
11475
|
+
return `linear-gradient(90deg, ${[...value].sort((a, b) => a.offset - b.offset).map((stop) => `${stop.color} ${round$1(stop.offset)}%`).join(", ")})`;
|
|
11476
|
+
}
|
|
11477
|
+
var gradient_picker_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
11478
|
+
name: "GradientPicker",
|
|
11479
|
+
props: {
|
|
11480
|
+
modelValue: Array,
|
|
11481
|
+
/** 初始值,仅初始化时读取;后续更新使用 modelValue,同时传入时 modelValue 优先。 */
|
|
11482
|
+
value: Array,
|
|
11483
|
+
type: {
|
|
11484
|
+
type: String,
|
|
11485
|
+
default: "linear"
|
|
11486
|
+
},
|
|
11487
|
+
/** 颜色面板是否提供透明度调节;开启后色标颜色可以是 `#rrggbbaa` / `rgba()`。 */
|
|
11488
|
+
alpha: Boolean,
|
|
11489
|
+
arrowPointAtCenter: {
|
|
11490
|
+
type: Boolean,
|
|
11491
|
+
default: true
|
|
11492
|
+
},
|
|
11493
|
+
disabled: Boolean,
|
|
11494
|
+
readonly: Boolean,
|
|
11495
|
+
mode: {
|
|
11496
|
+
type: String,
|
|
11497
|
+
default: "hex"
|
|
11498
|
+
},
|
|
11499
|
+
/** 控件尺寸,与其它控件一样分三档;色条加色标或四角预览块的总高度与对应尺寸的控件一致。 */
|
|
11500
|
+
size: String
|
|
11501
|
+
},
|
|
11502
|
+
emits: {
|
|
11503
|
+
"update:modelValue": (value) => Array.isArray(value),
|
|
11504
|
+
"update:mode": (mode) => [
|
|
11505
|
+
"hex",
|
|
11506
|
+
"rgb",
|
|
11507
|
+
"hsl"
|
|
11508
|
+
].includes(mode),
|
|
11509
|
+
change: (value) => Array.isArray(value)
|
|
11510
|
+
},
|
|
11511
|
+
setup(props, { attrs, emit }) {
|
|
11512
|
+
const initialModel = useInitialValue(props);
|
|
11513
|
+
const field = useFormField(true);
|
|
11514
|
+
const appearance = useFormAppearance(props, field);
|
|
11515
|
+
const innerValue = ref(normalizeGradient(field?.prop ? field.value.value : initialModel.value, props.type));
|
|
11516
|
+
const selectedStop = ref(0);
|
|
11517
|
+
const selectedCorner = ref(0);
|
|
11518
|
+
const currentMode = ref(props.mode);
|
|
11519
|
+
const colorOpen = ref(false);
|
|
11520
|
+
const activeMarker = ref(null);
|
|
11521
|
+
const popup = ref();
|
|
11522
|
+
let lastCommitted = null;
|
|
11523
|
+
watch(() => field?.prop ? field.value.value : initialModel.value, (source) => {
|
|
11524
|
+
const next = normalizeGradient(source, props.type);
|
|
11525
|
+
const echo = JSON.stringify(next) === lastCommitted;
|
|
11526
|
+
lastCommitted = null;
|
|
11527
|
+
innerValue.value = next;
|
|
11528
|
+
if (!echo) colorOpen.value = false;
|
|
11529
|
+
}, { deep: true });
|
|
11530
|
+
watch(() => props.type, (type) => {
|
|
11531
|
+
innerValue.value = normalizeGradient(innerValue.value, type);
|
|
11532
|
+
selectedStop.value = 0;
|
|
11533
|
+
selectedCorner.value = 0;
|
|
11534
|
+
colorOpen.value = false;
|
|
11535
|
+
});
|
|
11536
|
+
watch(() => props.mode, (mode) => {
|
|
11537
|
+
currentMode.value = mode;
|
|
11538
|
+
});
|
|
11539
|
+
watch(innerValue, (value) => {
|
|
11540
|
+
if (props.type === "linear" && selectedStop.value > value.length - 1) selectedStop.value = Math.max(0, value.length - 1);
|
|
11541
|
+
}, { deep: true });
|
|
11542
|
+
const interactionBlocked = () => Boolean(props.disabled || field?.disabled.value || props.readonly || field?.readonly.value);
|
|
11543
|
+
watch(interactionBlocked, (blocked) => {
|
|
11544
|
+
if (blocked) colorOpen.value = false;
|
|
11545
|
+
});
|
|
11546
|
+
const commit = (next) => {
|
|
11547
|
+
if (interactionBlocked()) return;
|
|
11548
|
+
innerValue.value = next;
|
|
11549
|
+
lastCommitted = JSON.stringify(next);
|
|
11550
|
+
emit("update:modelValue", next);
|
|
11551
|
+
if (field?.prop) field.update(next);
|
|
11552
|
+
emit("change", next);
|
|
11553
|
+
};
|
|
11554
|
+
const selectedColor = computed(() => {
|
|
11555
|
+
const value = innerValue.value;
|
|
11556
|
+
return props.type === "corner" ? value[selectedCorner.value] ?? "#000000" : value[selectedStop.value]?.color ?? "#000000";
|
|
11557
|
+
});
|
|
11558
|
+
const writeSelectedColor = (color) => {
|
|
11559
|
+
if (interactionBlocked()) return;
|
|
11560
|
+
const next = formatColor(color);
|
|
11561
|
+
const value = innerValue.value;
|
|
11562
|
+
if (props.type === "corner") {
|
|
11563
|
+
const colors = [...value];
|
|
11564
|
+
colors[selectedCorner.value] = next;
|
|
11565
|
+
commit(colors);
|
|
11566
|
+
} else {
|
|
11567
|
+
const stops = value.map((stop, index) => index === selectedStop.value ? {
|
|
11568
|
+
...stop,
|
|
11569
|
+
color: next
|
|
11570
|
+
} : stop);
|
|
11571
|
+
commit(stops);
|
|
11572
|
+
}
|
|
11573
|
+
};
|
|
11574
|
+
const onUpdateMode = (mode) => {
|
|
11575
|
+
if (interactionBlocked()) return;
|
|
11576
|
+
currentMode.value = mode;
|
|
11577
|
+
emit("update:mode", mode);
|
|
11578
|
+
};
|
|
11579
|
+
const openColorPanel = (index, element) => {
|
|
11580
|
+
if (interactionBlocked()) return;
|
|
11581
|
+
if (props.type === "linear") selectedStop.value = index;
|
|
11582
|
+
else selectedCorner.value = index;
|
|
11583
|
+
activeMarker.value = element;
|
|
11584
|
+
colorOpen.value = true;
|
|
11585
|
+
nextTick(() => popup.value?.updatePosition());
|
|
11586
|
+
};
|
|
11587
|
+
const addStop = (offset) => {
|
|
11588
|
+
if (interactionBlocked() || props.type !== "linear") return;
|
|
11589
|
+
const stops = innerValue.value;
|
|
11590
|
+
const color = gradientColorAtOffset(stops, offset);
|
|
11591
|
+
const index = stops.filter((stop) => stop.offset < offset).length;
|
|
11592
|
+
const next = [...stops];
|
|
11593
|
+
next.splice(index, 0, {
|
|
11594
|
+
color,
|
|
11595
|
+
offset
|
|
11596
|
+
});
|
|
11597
|
+
commit(next);
|
|
11598
|
+
selectedStop.value = index;
|
|
11599
|
+
};
|
|
11600
|
+
const moveStop = (index, offset) => {
|
|
11601
|
+
if (interactionBlocked() || props.type !== "linear") return;
|
|
11602
|
+
const next = innerValue.value.map((stop, i) => i === index ? {
|
|
11603
|
+
...stop,
|
|
11604
|
+
offset
|
|
11605
|
+
} : stop);
|
|
11606
|
+
commit(next);
|
|
11607
|
+
};
|
|
11608
|
+
const removeStop = (index) => {
|
|
11609
|
+
if (interactionBlocked() || props.type !== "linear") return;
|
|
11610
|
+
const stops = innerValue.value;
|
|
11611
|
+
if (stops.length <= 2) return;
|
|
11612
|
+
const next = stops.filter((_, i) => i !== index);
|
|
11613
|
+
commit(next);
|
|
11614
|
+
selectedStop.value = Math.max(0, Math.min(index, next.length - 1));
|
|
11615
|
+
colorOpen.value = false;
|
|
11616
|
+
};
|
|
11617
|
+
const colorPanel = () => createVNode("div", { "class": "k-gradient-picker-color-popup k-color-picker-dropdown" }, [createVNode(ColorPickerPanel, {
|
|
11618
|
+
"modelValue": selectedColor.value,
|
|
11619
|
+
"disabled": interactionBlocked(),
|
|
11620
|
+
"disabledAlpha": !props.alpha,
|
|
11621
|
+
"mode": currentMode.value,
|
|
11622
|
+
"onChange": writeSelectedColor,
|
|
11623
|
+
"onUpdate:mode": onUpdateMode
|
|
11624
|
+
}, null), createVNode(PopupArrow, { "prefixCls": "k-color-picker" }, null)]);
|
|
11625
|
+
return () => {
|
|
11626
|
+
const value = innerValue.value;
|
|
11627
|
+
const cssText = formatGradient(value);
|
|
11628
|
+
const disabled = props.disabled || field?.disabled.value;
|
|
11629
|
+
const readonly = props.readonly || field?.readonly.value;
|
|
11630
|
+
const size = appearance.size.value;
|
|
11631
|
+
return createVNode("div", mergeProps(attrs, resolveFormControlAttrs(attrs, field), {
|
|
11632
|
+
class: ["k-gradient-picker", {
|
|
11633
|
+
"k-gradient-picker-disabled": disabled,
|
|
11634
|
+
"k-gradient-picker-readonly": readonly,
|
|
11635
|
+
"k-gradient-picker-sm": size === "small",
|
|
11636
|
+
"k-gradient-picker-lg": size === "large"
|
|
11637
|
+
}],
|
|
11638
|
+
"aria-disabled": disabled || void 0,
|
|
11639
|
+
"aria-readonly": readonly || void 0,
|
|
11640
|
+
onFocusout: () => field?.blur()
|
|
11641
|
+
}), [props.type === "linear" ? createVNode(Fragment, null, [createVNode("div", { "class": "k-gradient-picker-bar" }, [createVNode("div", {
|
|
11642
|
+
"class": "k-gradient-picker-bar-fill",
|
|
11643
|
+
"style": { backgroundImage: cssText }
|
|
11644
|
+
}, null)]), createVNode(stops_default, {
|
|
11645
|
+
"disabled": interactionBlocked(),
|
|
11646
|
+
"stops": value,
|
|
11647
|
+
"selected": selectedStop.value,
|
|
11648
|
+
"onAdd": addStop,
|
|
11649
|
+
"onMove": moveStop,
|
|
11650
|
+
"onRemove": removeStop,
|
|
11651
|
+
"onSelect": (index) => selectedStop.value = index,
|
|
11652
|
+
"onActivate": openColorPanel
|
|
11653
|
+
}, null)]) : createVNode(corners_default, {
|
|
11654
|
+
"disabled": interactionBlocked(),
|
|
11655
|
+
"colors": value,
|
|
11656
|
+
"selected": selectedCorner.value,
|
|
11657
|
+
"gradient": cssText,
|
|
11658
|
+
"onActivate": openColorPanel
|
|
11659
|
+
}, null), createVNode(popup_default, {
|
|
11660
|
+
"ref": popup,
|
|
11661
|
+
"raw": true,
|
|
11662
|
+
"arrowPointAtCenter": props.arrowPointAtCenter,
|
|
11663
|
+
"open": colorOpen.value,
|
|
11664
|
+
"target": activeMarker,
|
|
11665
|
+
"trigger": "manual",
|
|
11666
|
+
"placement": "bottom-left",
|
|
11667
|
+
"offset": 6,
|
|
11668
|
+
"destroyOnClose": true,
|
|
11669
|
+
"transitionName": "k-color-picker",
|
|
11670
|
+
"onOpenChange": (open) => colorOpen.value = open
|
|
11671
|
+
}, { overlay: colorPanel })]);
|
|
11672
|
+
};
|
|
11673
|
+
}
|
|
11674
|
+
}));
|
|
11675
|
+
// node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/customParseFormat.js
|
|
11676
|
+
var require_customParseFormat = /* @__PURE__ */ __commonJSMin(((exports, module, this$3) => {
|
|
11039
11677
|
(function(e, t) {
|
|
11040
11678
|
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t();
|
|
11041
|
-
})(
|
|
11679
|
+
})(this$3, (function() {
|
|
11042
11680
|
"use strict";
|
|
11043
11681
|
var e = {
|
|
11044
11682
|
LTS: "h:mm:ss A",
|
|
@@ -11196,12 +11834,11 @@ var require_customParseFormat = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
11196
11834
|
};
|
|
11197
11835
|
}));
|
|
11198
11836
|
}));
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
var require_isBetween = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11837
|
+
// node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/isBetween.js
|
|
11838
|
+
var require_isBetween = /* @__PURE__ */ __commonJSMin(((exports, module, this$2) => {
|
|
11202
11839
|
(function(e, i) {
|
|
11203
11840
|
"object" == typeof exports && "undefined" != typeof module ? module.exports = i() : "function" == typeof define && define.amd ? define(i) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isBetween = i();
|
|
11204
|
-
})(
|
|
11841
|
+
})(this$2, (function() {
|
|
11205
11842
|
"use strict";
|
|
11206
11843
|
return function(e, i, t) {
|
|
11207
11844
|
i.prototype.isBetween = function(e, i, s, f) {
|
|
@@ -11211,12 +11848,11 @@ var require_isBetween = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11211
11848
|
};
|
|
11212
11849
|
}));
|
|
11213
11850
|
}));
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
var require_localeData = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11851
|
+
// node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/localeData.js
|
|
11852
|
+
var require_localeData = /* @__PURE__ */ __commonJSMin(((exports, module, this$1) => {
|
|
11217
11853
|
(function(n, e) {
|
|
11218
11854
|
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (n = "undefined" != typeof globalThis ? globalThis : n || self).dayjs_plugin_localeData = e();
|
|
11219
|
-
})(
|
|
11855
|
+
})(this$1, (function() {
|
|
11220
11856
|
"use strict";
|
|
11221
11857
|
return function(n, e, t) {
|
|
11222
11858
|
var r = e.prototype, o = function(n) {
|
|
@@ -11309,8 +11945,7 @@ var require_localeData = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11309
11945
|
};
|
|
11310
11946
|
}));
|
|
11311
11947
|
}));
|
|
11312
|
-
|
|
11313
|
-
//#region components/date-picker/index.tsx
|
|
11948
|
+
// components/date-picker/index.tsx
|
|
11314
11949
|
var import_customParseFormat = /* @__PURE__ */ __toESM(require_customParseFormat(), 1);
|
|
11315
11950
|
var import_isBetween = /* @__PURE__ */ __toESM(require_isBetween(), 1);
|
|
11316
11951
|
var import_localeData = /* @__PURE__ */ __toESM(require_localeData(), 1);
|
|
@@ -12370,8 +13005,7 @@ var DatePickerPanel = /* @__PURE__ */ defineComponent({
|
|
|
12370
13005
|
}, slots)
|
|
12371
13006
|
});
|
|
12372
13007
|
var FormDatePicker = markFormFieldComponent(DatePicker);
|
|
12373
|
-
|
|
12374
|
-
//#region components/grid/useBreakpoint.ts
|
|
13008
|
+
// components/grid/useBreakpoint.ts
|
|
12375
13009
|
var breakpointMap = {
|
|
12376
13010
|
0: "xs",
|
|
12377
13011
|
576: "sm",
|
|
@@ -12408,8 +13042,7 @@ function useBreakpoint(elRef) {
|
|
|
12408
13042
|
});
|
|
12409
13043
|
return readonly(active);
|
|
12410
13044
|
}
|
|
12411
|
-
|
|
12412
|
-
//#region components/descriptions/descriptions-item.tsx
|
|
13045
|
+
// components/descriptions/descriptions-item.tsx
|
|
12413
13046
|
var DescriptionsItem = /* @__PURE__ */ defineComponent({
|
|
12414
13047
|
name: "DescriptionsItem",
|
|
12415
13048
|
props: {
|
|
@@ -12468,8 +13101,7 @@ var DescriptionsItem = /* @__PURE__ */ defineComponent({
|
|
|
12468
13101
|
};
|
|
12469
13102
|
}
|
|
12470
13103
|
});
|
|
12471
|
-
|
|
12472
|
-
//#region components/descriptions/descriptions.tsx
|
|
13104
|
+
// components/descriptions/descriptions.tsx
|
|
12473
13105
|
function _isSlot$11(s) {
|
|
12474
13106
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
12475
13107
|
}
|
|
@@ -12599,8 +13231,7 @@ var Descriptions = /* @__PURE__ */ defineComponent({
|
|
|
12599
13231
|
};
|
|
12600
13232
|
}
|
|
12601
13233
|
});
|
|
12602
|
-
|
|
12603
|
-
//#region components/utils/focus.ts
|
|
13234
|
+
// components/utils/focus.ts
|
|
12604
13235
|
var focusableSelector = [
|
|
12605
13236
|
"[autofocus]",
|
|
12606
13237
|
"button:not([disabled])",
|
|
@@ -12653,8 +13284,7 @@ var createFocusTrap = (getContainer) => {
|
|
|
12653
13284
|
handleKeydown
|
|
12654
13285
|
};
|
|
12655
13286
|
};
|
|
12656
|
-
|
|
12657
|
-
//#region components/utils/overlay-stack.ts
|
|
13287
|
+
// components/utils/overlay-stack.ts
|
|
12658
13288
|
var overlays = [];
|
|
12659
13289
|
function pushOverlay() {
|
|
12660
13290
|
const order = nextOverlayOrder();
|
|
@@ -12675,8 +13305,7 @@ function pushOverlay() {
|
|
|
12675
13305
|
}
|
|
12676
13306
|
};
|
|
12677
13307
|
}
|
|
12678
|
-
|
|
12679
|
-
//#region components/drawer/index.tsx
|
|
13308
|
+
// components/drawer/index.tsx
|
|
12680
13309
|
var Drawer = /* @__PURE__ */ defineComponent({
|
|
12681
13310
|
name: "Drawer",
|
|
12682
13311
|
props: {
|
|
@@ -12925,8 +13554,7 @@ var Drawer = /* @__PURE__ */ defineComponent({
|
|
|
12925
13554
|
};
|
|
12926
13555
|
}
|
|
12927
13556
|
});
|
|
12928
|
-
|
|
12929
|
-
//#region components/dropdown/dropdown-context.ts
|
|
13557
|
+
// components/dropdown/dropdown-context.ts
|
|
12930
13558
|
var DropdownContextKey = Symbol("dropdown-context");
|
|
12931
13559
|
var dropdown_default = /* @__PURE__ */ defineComponent({
|
|
12932
13560
|
name: "Dropdown",
|
|
@@ -13032,8 +13660,7 @@ var dropdown_default = /* @__PURE__ */ defineComponent({
|
|
|
13032
13660
|
});
|
|
13033
13661
|
}
|
|
13034
13662
|
});
|
|
13035
|
-
|
|
13036
|
-
//#region components/dropdown/trigger.tsx
|
|
13663
|
+
// components/dropdown/trigger.tsx
|
|
13037
13664
|
var trigger_default = /* @__PURE__ */ defineComponent({
|
|
13038
13665
|
name: "TriggerButton",
|
|
13039
13666
|
props: {
|
|
@@ -13060,8 +13687,7 @@ var trigger_default = /* @__PURE__ */ defineComponent({
|
|
|
13060
13687
|
};
|
|
13061
13688
|
}
|
|
13062
13689
|
});
|
|
13063
|
-
|
|
13064
|
-
//#region components/dropdown/dropdown-button.tsx
|
|
13690
|
+
// components/dropdown/dropdown-button.tsx
|
|
13065
13691
|
var DropdownButton = /* @__PURE__ */ defineComponent({
|
|
13066
13692
|
name: "DropdownButton",
|
|
13067
13693
|
props: {
|
|
@@ -13116,8 +13742,7 @@ var DropdownButton = /* @__PURE__ */ defineComponent({
|
|
|
13116
13742
|
};
|
|
13117
13743
|
}
|
|
13118
13744
|
});
|
|
13119
|
-
|
|
13120
|
-
//#region components/divider/index.tsx
|
|
13745
|
+
// components/divider/index.tsx
|
|
13121
13746
|
var Divider = /* @__PURE__ */ defineComponent({
|
|
13122
13747
|
name: "Divider",
|
|
13123
13748
|
props: {
|
|
@@ -13148,8 +13773,7 @@ var Divider = /* @__PURE__ */ defineComponent({
|
|
|
13148
13773
|
};
|
|
13149
13774
|
}
|
|
13150
13775
|
});
|
|
13151
|
-
|
|
13152
|
-
//#region components/form/form.tsx
|
|
13776
|
+
// components/form/form.tsx
|
|
13153
13777
|
var Form = /* @__PURE__ */ defineComponent({
|
|
13154
13778
|
name: "Form",
|
|
13155
13779
|
props: {
|
|
@@ -13302,8 +13926,7 @@ var Form = /* @__PURE__ */ defineComponent({
|
|
|
13302
13926
|
};
|
|
13303
13927
|
}
|
|
13304
13928
|
});
|
|
13305
|
-
|
|
13306
|
-
//#region components/row-col/col.tsx
|
|
13929
|
+
// components/row-col/col.tsx
|
|
13307
13930
|
var responsiveProp$1 = [Number, Object];
|
|
13308
13931
|
var Col = /* @__PURE__ */ defineComponent({
|
|
13309
13932
|
name: "Col",
|
|
@@ -13374,8 +13997,7 @@ var Col = /* @__PURE__ */ defineComponent({
|
|
|
13374
13997
|
};
|
|
13375
13998
|
}
|
|
13376
13999
|
});
|
|
13377
|
-
|
|
13378
|
-
//#region components/row-col/row.tsx
|
|
14000
|
+
// components/row-col/row.tsx
|
|
13379
14001
|
var Row = /* @__PURE__ */ defineComponent({
|
|
13380
14002
|
name: "Row",
|
|
13381
14003
|
props: {
|
|
@@ -13412,8 +14034,7 @@ var Row = /* @__PURE__ */ defineComponent({
|
|
|
13412
14034
|
};
|
|
13413
14035
|
}
|
|
13414
14036
|
});
|
|
13415
|
-
|
|
13416
|
-
//#region components/form/form-item.tsx
|
|
14037
|
+
// components/form/form-item.tsx
|
|
13417
14038
|
/**
|
|
13418
14039
|
* 判断某条规则是否应该在指定时机触发。
|
|
13419
14040
|
* 未设置 `trigger` 时默认在 `change` 时校验,以兼容历史行为。
|
|
@@ -13714,8 +14335,7 @@ var FormItem = /* @__PURE__ */ defineComponent({
|
|
|
13714
14335
|
};
|
|
13715
14336
|
}
|
|
13716
14337
|
});
|
|
13717
|
-
|
|
13718
|
-
//#region components/flex/index.tsx
|
|
14338
|
+
// components/flex/index.tsx
|
|
13719
14339
|
var Flex = /* @__PURE__ */ defineComponent({
|
|
13720
14340
|
name: "Flex",
|
|
13721
14341
|
props: {
|
|
@@ -13758,8 +14378,7 @@ var Flex = /* @__PURE__ */ defineComponent({
|
|
|
13758
14378
|
};
|
|
13759
14379
|
}
|
|
13760
14380
|
});
|
|
13761
|
-
|
|
13762
|
-
//#region components/grid/grid.tsx
|
|
14381
|
+
// components/grid/grid.tsx
|
|
13763
14382
|
var responsiveProp = [
|
|
13764
14383
|
Number,
|
|
13765
14384
|
String,
|
|
@@ -13854,8 +14473,7 @@ var Grid = /* @__PURE__ */ defineComponent({
|
|
|
13854
14473
|
};
|
|
13855
14474
|
}
|
|
13856
14475
|
});
|
|
13857
|
-
|
|
13858
|
-
//#region components/grid/grid-item.tsx
|
|
14476
|
+
// components/grid/grid-item.tsx
|
|
13859
14477
|
var responsiveNumberProp = [Number, Object];
|
|
13860
14478
|
var GridItem = /* @__PURE__ */ defineComponent({
|
|
13861
14479
|
name: "GridItem",
|
|
@@ -13904,11 +14522,9 @@ var GridItem = /* @__PURE__ */ defineComponent({
|
|
|
13904
14522
|
};
|
|
13905
14523
|
}
|
|
13906
14524
|
});
|
|
13907
|
-
|
|
13908
|
-
//#region components/image/context.ts
|
|
14525
|
+
// components/image/context.ts
|
|
13909
14526
|
var imageGroupKey = Symbol("ImageGroup");
|
|
13910
|
-
|
|
13911
|
-
//#region components/slider/thumb.tsx
|
|
14527
|
+
// components/slider/thumb.tsx
|
|
13912
14528
|
var thumb_default = /* @__PURE__ */ defineComponent({
|
|
13913
14529
|
props: {
|
|
13914
14530
|
id: String,
|
|
@@ -14017,14 +14633,12 @@ var thumb_default = /* @__PURE__ */ defineComponent({
|
|
|
14017
14633
|
};
|
|
14018
14634
|
}
|
|
14019
14635
|
});
|
|
14020
|
-
|
|
14021
|
-
//#region components/utils/mouse.ts
|
|
14636
|
+
// components/utils/mouse.ts
|
|
14022
14637
|
var getPosition = (e) => {
|
|
14023
14638
|
if ("touches" in e) return [e.touches[0].clientX, e.touches[0].clientY];
|
|
14024
14639
|
return [e.clientX, e.clientY];
|
|
14025
14640
|
};
|
|
14026
|
-
|
|
14027
|
-
//#region components/slider/index.tsx
|
|
14641
|
+
// components/slider/index.tsx
|
|
14028
14642
|
var FormSlider = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
14029
14643
|
name: "Slider",
|
|
14030
14644
|
props: {
|
|
@@ -14373,8 +14987,7 @@ var FormSlider = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
14373
14987
|
};
|
|
14374
14988
|
}
|
|
14375
14989
|
}));
|
|
14376
|
-
|
|
14377
|
-
//#region components/image/utils.ts
|
|
14990
|
+
// components/image/utils.ts
|
|
14378
14991
|
var loadImage = (src, callback, err) => {
|
|
14379
14992
|
if (!src) return () => {};
|
|
14380
14993
|
let image = new Image();
|
|
@@ -14403,8 +15016,7 @@ var loadImage = (src, callback, err) => {
|
|
|
14403
15016
|
image.src = src;
|
|
14404
15017
|
return cleanup;
|
|
14405
15018
|
};
|
|
14406
|
-
|
|
14407
|
-
//#region components/image/preview.tsx
|
|
15019
|
+
// components/image/preview.tsx
|
|
14408
15020
|
var ImagePreview = /* @__PURE__ */ defineComponent({
|
|
14409
15021
|
name: "ImagePreview",
|
|
14410
15022
|
props: {
|
|
@@ -14799,8 +15411,7 @@ var ImagePreview = /* @__PURE__ */ defineComponent({
|
|
|
14799
15411
|
};
|
|
14800
15412
|
}
|
|
14801
15413
|
});
|
|
14802
|
-
|
|
14803
|
-
//#region components/image/instance.ts
|
|
15414
|
+
// components/image/instance.ts
|
|
14804
15415
|
var seed = 0;
|
|
14805
15416
|
var createInstance$2 = (props = {}, slots) => {
|
|
14806
15417
|
const container = document.createElement("div");
|
|
@@ -14832,8 +15443,7 @@ var createInstance$2 = (props = {}, slots) => {
|
|
|
14832
15443
|
};
|
|
14833
15444
|
return instance;
|
|
14834
15445
|
};
|
|
14835
|
-
|
|
14836
|
-
//#region components/image/group.tsx
|
|
15446
|
+
// components/image/group.tsx
|
|
14837
15447
|
var ImageGroup = /* @__PURE__ */ defineComponent({
|
|
14838
15448
|
name: "ImageGroup",
|
|
14839
15449
|
props: { data: Array },
|
|
@@ -14880,8 +15490,7 @@ var ImageGroup = /* @__PURE__ */ defineComponent({
|
|
|
14880
15490
|
};
|
|
14881
15491
|
}
|
|
14882
15492
|
});
|
|
14883
|
-
|
|
14884
|
-
//#region components/image/image.tsx
|
|
15493
|
+
// components/image/image.tsx
|
|
14885
15494
|
var PAINTED_THEMES$7 = [
|
|
14886
15495
|
"fill",
|
|
14887
15496
|
"outline",
|
|
@@ -15227,8 +15836,7 @@ var input_tag_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
15227
15836
|
};
|
|
15228
15837
|
}
|
|
15229
15838
|
}));
|
|
15230
|
-
|
|
15231
|
-
//#region components/input-otp/index.ts
|
|
15839
|
+
// components/input-otp/index.ts
|
|
15232
15840
|
var input_otp_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
15233
15841
|
name: "InputOTP",
|
|
15234
15842
|
inheritAttrs: false,
|
|
@@ -15406,8 +16014,7 @@ var input_otp_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
15406
16014
|
}, null)]))]);
|
|
15407
16015
|
}
|
|
15408
16016
|
}));
|
|
15409
|
-
|
|
15410
|
-
//#region components/layout/index.tsx
|
|
16017
|
+
// components/layout/index.tsx
|
|
15411
16018
|
var SiderHookKey = Symbol("SiderHookKey");
|
|
15412
16019
|
var layoutProps = {
|
|
15413
16020
|
suffixCls: {
|
|
@@ -15499,8 +16106,7 @@ Layout.Header = Header;
|
|
|
15499
16106
|
Layout.Footer = Footer;
|
|
15500
16107
|
Layout.Content = Content;
|
|
15501
16108
|
Layout.Sider = Sider;
|
|
15502
|
-
|
|
15503
|
-
//#region components/loading/index.tsx
|
|
16109
|
+
// components/loading/index.tsx
|
|
15504
16110
|
var LoadingComponent = /* @__PURE__ */ defineComponent({
|
|
15505
16111
|
name: "LoadingBar",
|
|
15506
16112
|
props: { height: {
|
|
@@ -15619,12 +16225,10 @@ var loading = {
|
|
|
15619
16225
|
loadInstance?.destroy?.();
|
|
15620
16226
|
}
|
|
15621
16227
|
};
|
|
15622
|
-
|
|
15623
|
-
//#region components/menu/menu-context.ts
|
|
16228
|
+
// components/menu/menu-context.ts
|
|
15624
16229
|
var MenuContextKey = Symbol("menu-context");
|
|
15625
16230
|
var SubMenuContextKey = Symbol("sub-menu-context");
|
|
15626
|
-
|
|
15627
|
-
//#region components/menu/menu-keyboard.ts
|
|
16231
|
+
// components/menu/menu-keyboard.ts
|
|
15628
16232
|
var handleMenuItemKeydown = (event, activate) => {
|
|
15629
16233
|
if (event.key === "Enter" || event.key === " ") {
|
|
15630
16234
|
event.preventDefault();
|
|
@@ -15688,8 +16292,7 @@ var handleSubMenuListKeydown = (event, closeAndRefocusTrigger) => {
|
|
|
15688
16292
|
closeAndRefocusTrigger();
|
|
15689
16293
|
return true;
|
|
15690
16294
|
};
|
|
15691
|
-
|
|
15692
|
-
//#region components/menu/menu-item.tsx
|
|
16295
|
+
// components/menu/menu-item.tsx
|
|
15693
16296
|
function _isSlot$10(s) {
|
|
15694
16297
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
15695
16298
|
}
|
|
@@ -15761,8 +16364,7 @@ var MenuItem = /* @__PURE__ */ defineComponent({
|
|
|
15761
16364
|
};
|
|
15762
16365
|
}
|
|
15763
16366
|
});
|
|
15764
|
-
|
|
15765
|
-
//#region components/menu/sub-menu.tsx
|
|
16367
|
+
// components/menu/sub-menu.tsx
|
|
15766
16368
|
var SubMenu = /* @__PURE__ */ defineComponent({
|
|
15767
16369
|
name: "SubMenu",
|
|
15768
16370
|
props: {
|
|
@@ -15790,12 +16392,20 @@ var SubMenu = /* @__PURE__ */ defineComponent({
|
|
|
15790
16392
|
const dropdownContext = inject(DropdownContextKey, null);
|
|
15791
16393
|
const menuContext = inject(MenuContextKey, null);
|
|
15792
16394
|
const subMenuContext = inject(SubMenuContextKey, null);
|
|
15793
|
-
usePopupHost(() => {
|
|
15794
|
-
if (menuContext?.openKeys.includes(key)) menuContext.openKeysChange?.(key, false, subMenuContext?.keyPath || []);
|
|
15795
|
-
});
|
|
15796
16395
|
const currentPlacement = ref("bottom-left");
|
|
15797
16396
|
const transOrigin = ref("bottom left");
|
|
15798
16397
|
const popTimer = ref();
|
|
16398
|
+
let openTimer;
|
|
16399
|
+
let openRevision = 0;
|
|
16400
|
+
const cancelHoverOpen = () => {
|
|
16401
|
+
clearTimeout(openTimer);
|
|
16402
|
+
openTimer = void 0;
|
|
16403
|
+
openRevision++;
|
|
16404
|
+
};
|
|
16405
|
+
usePopupHost(() => {
|
|
16406
|
+
cancelHoverOpen();
|
|
16407
|
+
if (menuContext?.openKeys.includes(key)) menuContext.openKeysChange?.(key, false, subMenuContext?.keyPath || []);
|
|
16408
|
+
});
|
|
15799
16409
|
const preCls = menuContext?.dropdown ? "dropdown-menu-submenu" : "menu-submenu";
|
|
15800
16410
|
const idSeed = String(key ?? instance?.uid ?? "").replace(/[^a-zA-Z0-9_-]/g, "");
|
|
15801
16411
|
const triggerId = `k-menu-submenu-title-${idSeed}`;
|
|
@@ -15808,12 +16418,16 @@ var SubMenu = /* @__PURE__ */ defineComponent({
|
|
|
15808
16418
|
});
|
|
15809
16419
|
});
|
|
15810
16420
|
onBeforeUnmount(() => {
|
|
16421
|
+
cancelHoverOpen();
|
|
15811
16422
|
clearTimeout(popTimer.value);
|
|
15812
16423
|
});
|
|
15813
16424
|
const clearCurrentPopTimer = () => {
|
|
15814
16425
|
clearTimeout(popTimer.value);
|
|
15815
16426
|
};
|
|
15816
16427
|
const hideCurrentPopTimer = () => {
|
|
16428
|
+
cancelHoverOpen();
|
|
16429
|
+
clearCurrentPopTimer();
|
|
16430
|
+
if (!menuContext?.openKeys.includes(key)) return;
|
|
15817
16431
|
popTimer.value = setTimeout(() => {
|
|
15818
16432
|
menuContext?.openKeysChange?.(key, false, subMenuContext?.keyPath || []);
|
|
15819
16433
|
}, 200);
|
|
@@ -15824,8 +16438,12 @@ var SubMenu = /* @__PURE__ */ defineComponent({
|
|
|
15824
16438
|
hidePopTimer: hideCurrentPopTimer
|
|
15825
16439
|
});
|
|
15826
16440
|
const showPopper = () => {
|
|
16441
|
+
cancelHoverOpen();
|
|
16442
|
+
clearCurrentPopTimer();
|
|
16443
|
+
const revision = openRevision;
|
|
15827
16444
|
rendered.value = true;
|
|
15828
16445
|
nextTick(() => {
|
|
16446
|
+
if (revision !== openRevision || props.disabled) return;
|
|
15829
16447
|
menuContext?.openKeysChange?.(key, true, subMenuContext?.keyPath || []);
|
|
15830
16448
|
updatePosition();
|
|
15831
16449
|
});
|
|
@@ -15848,6 +16466,13 @@ var SubMenu = /* @__PURE__ */ defineComponent({
|
|
|
15848
16466
|
};
|
|
15849
16467
|
const usePopup = () => menuContext?.mode === "horizontal" || menuContext?.mode === "vertical" || menuContext?.popupInlineCollapsed;
|
|
15850
16468
|
const openedNow = computed(() => !!menuContext?.openKeys.includes(key));
|
|
16469
|
+
watch(() => [
|
|
16470
|
+
props.disabled,
|
|
16471
|
+
menuContext?.mode,
|
|
16472
|
+
menuContext?.popupInlineCollapsed,
|
|
16473
|
+
menuContext?.subMenuOpenDelay,
|
|
16474
|
+
subMenuContext?.keyPath.every((parent) => menuContext?.openKeys.includes(parent))
|
|
16475
|
+
], cancelHoverOpen);
|
|
15851
16476
|
const isMenubarItem = computed(() => menuContext?.mode === "horizontal" && !(subMenuContext?.keyPath.length ?? 0));
|
|
15852
16477
|
const focusFirstItem = () => {
|
|
15853
16478
|
const first = firstMenuItemOf(listRef.value);
|
|
@@ -15856,6 +16481,8 @@ var SubMenu = /* @__PURE__ */ defineComponent({
|
|
|
15856
16481
|
return true;
|
|
15857
16482
|
};
|
|
15858
16483
|
const activateTitle = () => {
|
|
16484
|
+
cancelHoverOpen();
|
|
16485
|
+
clearCurrentPopTimer();
|
|
15859
16486
|
if (props.disabled) return;
|
|
15860
16487
|
if (menuContext?.mode === "inline" && !menuContext.inlineCollapsed) {
|
|
15861
16488
|
menuContext.openKeysChange?.(key, !openedNow.value, subMenuContext?.keyPath || []);
|
|
@@ -15910,6 +16537,7 @@ var SubMenu = /* @__PURE__ */ defineComponent({
|
|
|
15910
16537
|
visibility: popup && !popupPositioned.value ? "hidden" : void 0
|
|
15911
16538
|
},
|
|
15912
16539
|
onMouseenter: () => {
|
|
16540
|
+
cancelHoverOpen();
|
|
15913
16541
|
clearCurrentPopTimer();
|
|
15914
16542
|
menuContext?.openKeysChange?.(key, true, subMenuContext?.keyPath || []);
|
|
15915
16543
|
subMenuContext?.clearPopTimer?.();
|
|
@@ -15980,13 +16608,17 @@ var SubMenu = /* @__PURE__ */ defineComponent({
|
|
|
15980
16608
|
titleProps.onMouseenter = () => {
|
|
15981
16609
|
if (props.disabled) return;
|
|
15982
16610
|
clearCurrentPopTimer();
|
|
15983
|
-
|
|
16611
|
+
cancelHoverOpen();
|
|
16612
|
+
subMenuContext?.clearPopTimer?.();
|
|
16613
|
+
dropdownContext?.clearPopTimer?.();
|
|
16614
|
+
if (openedNow.value) return;
|
|
16615
|
+
const configured = menuContext?.subMenuOpenDelay ?? 200;
|
|
16616
|
+
const delay = Number.isFinite(configured) ? Math.max(0, configured) : 200;
|
|
16617
|
+
if (delay === 0) showPopper();
|
|
16618
|
+
else openTimer = setTimeout(showPopper, delay);
|
|
15984
16619
|
};
|
|
15985
16620
|
titleProps.onMouseleave = () => {
|
|
15986
|
-
|
|
15987
|
-
popTimer.value = setTimeout(() => {
|
|
15988
|
-
menuContext?.openKeysChange?.(key, false, subMenuContext?.keyPath || []);
|
|
15989
|
-
}, 200);
|
|
16621
|
+
hideCurrentPopTimer();
|
|
15990
16622
|
};
|
|
15991
16623
|
}
|
|
15992
16624
|
if (subMenuContext?.keyPath.length && menuContext?.mode === "inline" && !menuContext?.inlineCollapsed) titleProps.style.paddingLeft = `${(subMenuContext?.keyPath || []).length * 16 + 16}px`;
|
|
@@ -16013,8 +16645,7 @@ var SubMenu = /* @__PURE__ */ defineComponent({
|
|
|
16013
16645
|
};
|
|
16014
16646
|
}
|
|
16015
16647
|
});
|
|
16016
|
-
|
|
16017
|
-
//#region components/menu/recursive-menu.tsx
|
|
16648
|
+
// components/menu/recursive-menu.tsx
|
|
16018
16649
|
function _isSlot$9(s) {
|
|
16019
16650
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
16020
16651
|
}
|
|
@@ -16046,8 +16677,7 @@ var RecursiveMenu = /* @__PURE__ */ defineComponent({
|
|
|
16046
16677
|
};
|
|
16047
16678
|
}
|
|
16048
16679
|
});
|
|
16049
|
-
|
|
16050
|
-
//#region components/menu/menu.tsx
|
|
16680
|
+
// components/menu/menu.tsx
|
|
16051
16681
|
function _isSlot$8(s) {
|
|
16052
16682
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
16053
16683
|
}
|
|
@@ -16072,6 +16702,10 @@ var menuProps = {
|
|
|
16072
16702
|
type: Boolean,
|
|
16073
16703
|
default: true
|
|
16074
16704
|
},
|
|
16705
|
+
subMenuOpenDelay: {
|
|
16706
|
+
type: Number,
|
|
16707
|
+
default: 200
|
|
16708
|
+
},
|
|
16075
16709
|
openKeys: {
|
|
16076
16710
|
type: Array,
|
|
16077
16711
|
default: () => []
|
|
@@ -16236,6 +16870,7 @@ var Menu = /* @__PURE__ */ defineComponent({
|
|
|
16236
16870
|
mode: currentMode,
|
|
16237
16871
|
inlineCollapsed: computed(() => !!props.inlineCollapsed),
|
|
16238
16872
|
collapsedTooltip: computed(() => props.collapsedTooltip),
|
|
16873
|
+
subMenuOpenDelay: computed(() => props.subMenuOpenDelay),
|
|
16239
16874
|
popupInlineCollapsed: computed(() => collapsedInline.value && popupInlineCollapsed.value),
|
|
16240
16875
|
inlineTransition,
|
|
16241
16876
|
inlineOpenKeys: tempOpenKeys,
|
|
@@ -16284,8 +16919,7 @@ var Menu = /* @__PURE__ */ defineComponent({
|
|
|
16284
16919
|
};
|
|
16285
16920
|
}
|
|
16286
16921
|
});
|
|
16287
|
-
|
|
16288
|
-
//#region components/menu/menu-divider.tsx
|
|
16922
|
+
// components/menu/menu-divider.tsx
|
|
16289
16923
|
var MenuDivider = /* @__PURE__ */ defineComponent({
|
|
16290
16924
|
name: "MenuDivider",
|
|
16291
16925
|
setup() {
|
|
@@ -16298,8 +16932,7 @@ var MenuDivider = /* @__PURE__ */ defineComponent({
|
|
|
16298
16932
|
};
|
|
16299
16933
|
}
|
|
16300
16934
|
});
|
|
16301
|
-
|
|
16302
|
-
//#region components/menu/menu-group.tsx
|
|
16935
|
+
// components/menu/menu-group.tsx
|
|
16303
16936
|
var MenuGroup = /* @__PURE__ */ defineComponent({
|
|
16304
16937
|
name: "MenuGroup",
|
|
16305
16938
|
props: { title: [
|
|
@@ -16321,8 +16954,7 @@ var MenuGroup = /* @__PURE__ */ defineComponent({
|
|
|
16321
16954
|
};
|
|
16322
16955
|
}
|
|
16323
16956
|
});
|
|
16324
|
-
|
|
16325
|
-
//#region components/notice/content.tsx
|
|
16957
|
+
// components/notice/content.tsx
|
|
16326
16958
|
var contentProps = {
|
|
16327
16959
|
type: { type: String },
|
|
16328
16960
|
title: String,
|
|
@@ -16410,8 +17042,7 @@ var NoticePanel = /* @__PURE__ */ defineComponent({
|
|
|
16410
17042
|
closable: false
|
|
16411
17043
|
}, slots)
|
|
16412
17044
|
});
|
|
16413
|
-
|
|
16414
|
-
//#region components/notice/container.tsx
|
|
17045
|
+
// components/notice/container.tsx
|
|
16415
17046
|
var count = 0;
|
|
16416
17047
|
function getUuid() {
|
|
16417
17048
|
return `k-message-${Date.now()}-${count++}`;
|
|
@@ -16481,8 +17112,7 @@ var container_default = /* @__PURE__ */ defineComponent({
|
|
|
16481
17112
|
};
|
|
16482
17113
|
}
|
|
16483
17114
|
});
|
|
16484
|
-
|
|
16485
|
-
//#region components/notice/instance.ts
|
|
17115
|
+
// components/notice/instance.ts
|
|
16486
17116
|
var createInstance = (type, context) => {
|
|
16487
17117
|
const containerId = `k-${type}-box`;
|
|
16488
17118
|
let container = document.getElementById(containerId);
|
|
@@ -16501,8 +17131,7 @@ var createInstance = (type, context) => {
|
|
|
16501
17131
|
};
|
|
16502
17132
|
return instance;
|
|
16503
17133
|
};
|
|
16504
|
-
|
|
16505
|
-
//#region components/message/index.ts
|
|
17134
|
+
// components/message/index.ts
|
|
16506
17135
|
var messageInstance = null;
|
|
16507
17136
|
var message = {
|
|
16508
17137
|
name: "message",
|
|
@@ -16914,8 +17543,7 @@ var mentions_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
16914
17543
|
]);
|
|
16915
17544
|
}
|
|
16916
17545
|
}));
|
|
16917
|
-
|
|
16918
|
-
//#region components/modal/modal.tsx
|
|
17546
|
+
// components/modal/modal.tsx
|
|
16919
17547
|
function _isSlot$7(s) {
|
|
16920
17548
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
16921
17549
|
}
|
|
@@ -17233,8 +17861,7 @@ var ModalPanel = /* @__PURE__ */ defineComponent({
|
|
|
17233
17861
|
panelOnly: true
|
|
17234
17862
|
}, slots)
|
|
17235
17863
|
});
|
|
17236
|
-
|
|
17237
|
-
//#region components/utils/promise.ts
|
|
17864
|
+
// components/utils/promise.ts
|
|
17238
17865
|
/**
|
|
17239
17866
|
* onOk / validate 这类回调允许返回 Promise,组件得先认出 thenable 才决定要不要挂 loading。
|
|
17240
17867
|
* 两个仓库这份实现逐字符相同。
|
|
@@ -17242,8 +17869,7 @@ var ModalPanel = /* @__PURE__ */ defineComponent({
|
|
|
17242
17869
|
function isPromiseLike(value) {
|
|
17243
17870
|
return typeof value === "object" && value !== null && typeof value.then === "function";
|
|
17244
17871
|
}
|
|
17245
|
-
|
|
17246
|
-
//#region components/modal/toast.tsx
|
|
17872
|
+
// components/modal/toast.tsx
|
|
17247
17873
|
var toast_default = /* @__PURE__ */ defineComponent({
|
|
17248
17874
|
name: "Toast",
|
|
17249
17875
|
props: {
|
|
@@ -17353,8 +17979,7 @@ var toast_default = /* @__PURE__ */ defineComponent({
|
|
|
17353
17979
|
};
|
|
17354
17980
|
}
|
|
17355
17981
|
});
|
|
17356
|
-
|
|
17357
|
-
//#region components/modal/index.ts
|
|
17982
|
+
// components/modal/index.ts
|
|
17358
17983
|
var modalList = [];
|
|
17359
17984
|
recordMousePoint();
|
|
17360
17985
|
var showModal = (props) => {
|
|
@@ -17429,8 +18054,7 @@ var modal = {
|
|
|
17429
18054
|
}
|
|
17430
18055
|
};
|
|
17431
18056
|
var modal_default = Modal;
|
|
17432
|
-
|
|
17433
|
-
//#region components/notice/index.ts
|
|
18057
|
+
// components/notice/index.ts
|
|
17434
18058
|
var noticeInstance = null;
|
|
17435
18059
|
var notice = {
|
|
17436
18060
|
name: "notice",
|
|
@@ -17474,8 +18098,7 @@ var notice = {
|
|
|
17474
18098
|
});
|
|
17475
18099
|
}
|
|
17476
18100
|
};
|
|
17477
|
-
|
|
17478
|
-
//#region components/page/responsive.ts
|
|
18101
|
+
// components/page/responsive.ts
|
|
17479
18102
|
function showLayout(root, layout) {
|
|
17480
18103
|
root.dataset.pageLayout = layout;
|
|
17481
18104
|
root.querySelectorAll("[data-page-pager]").forEach((pager) => {
|
|
@@ -17561,8 +18184,7 @@ function bindResponsivePage(root) {
|
|
|
17561
18184
|
delete root.dataset.pageLayout;
|
|
17562
18185
|
};
|
|
17563
18186
|
}
|
|
17564
|
-
|
|
17565
|
-
//#region components/page/index.tsx
|
|
18187
|
+
// components/page/index.tsx
|
|
17566
18188
|
var PAINTED_THEMES$6 = [
|
|
17567
18189
|
"fill",
|
|
17568
18190
|
"outline",
|
|
@@ -17956,8 +18578,7 @@ var Page = /* @__PURE__ */ defineComponent({
|
|
|
17956
18578
|
};
|
|
17957
18579
|
}
|
|
17958
18580
|
});
|
|
17959
|
-
|
|
17960
|
-
//#region components/page-header/index.tsx
|
|
18581
|
+
// components/page-header/index.tsx
|
|
17961
18582
|
var PageHeader = /* @__PURE__ */ defineComponent({
|
|
17962
18583
|
name: "PageHeader",
|
|
17963
18584
|
props: {
|
|
@@ -17983,8 +18604,7 @@ var PageHeader = /* @__PURE__ */ defineComponent({
|
|
|
17983
18604
|
};
|
|
17984
18605
|
}
|
|
17985
18606
|
});
|
|
17986
|
-
|
|
17987
|
-
//#region components/poptip/index.tsx
|
|
18607
|
+
// components/poptip/index.tsx
|
|
17988
18608
|
var poptipProps = {
|
|
17989
18609
|
dark: Boolean,
|
|
17990
18610
|
show: Boolean,
|
|
@@ -18000,6 +18620,7 @@ var poptipProps = {
|
|
|
18000
18620
|
type: String,
|
|
18001
18621
|
default: "hover"
|
|
18002
18622
|
},
|
|
18623
|
+
arrowPointAtCenter: Boolean,
|
|
18003
18624
|
placement: {
|
|
18004
18625
|
type: String,
|
|
18005
18626
|
default: "top"
|
|
@@ -18028,6 +18649,7 @@ var Poptip = /* @__PURE__ */ defineComponent({
|
|
|
18028
18649
|
"open": visible.value,
|
|
18029
18650
|
"trigger": props.trigger,
|
|
18030
18651
|
"placement": props.placement,
|
|
18652
|
+
"arrowPointAtCenter": props.arrowPointAtCenter,
|
|
18031
18653
|
"panelOnly": props.panelOnly,
|
|
18032
18654
|
"arrow": true,
|
|
18033
18655
|
"respectDefaultPrevented": false,
|
|
@@ -18057,8 +18679,7 @@ var PoptipPanel = /* @__PURE__ */ defineComponent({
|
|
|
18057
18679
|
panelOnly: true
|
|
18058
18680
|
}, slots)
|
|
18059
18681
|
});
|
|
18060
|
-
|
|
18061
|
-
//#region components/popconfirm/index.tsx
|
|
18682
|
+
// components/popconfirm/index.tsx
|
|
18062
18683
|
var popconfirmProps = {
|
|
18063
18684
|
dark: Boolean,
|
|
18064
18685
|
show: Boolean,
|
|
@@ -18071,6 +18692,7 @@ var popconfirmProps = {
|
|
|
18071
18692
|
width: [Number, String],
|
|
18072
18693
|
okText: { type: String },
|
|
18073
18694
|
cancelText: { type: String },
|
|
18695
|
+
arrowPointAtCenter: Boolean,
|
|
18074
18696
|
placement: {
|
|
18075
18697
|
type: String,
|
|
18076
18698
|
default: "top"
|
|
@@ -18102,6 +18724,7 @@ var Popconfirm = /* @__PURE__ */ defineComponent({
|
|
|
18102
18724
|
"open": visible.value,
|
|
18103
18725
|
"trigger": "click",
|
|
18104
18726
|
"placement": props.placement,
|
|
18727
|
+
"arrowPointAtCenter": props.arrowPointAtCenter,
|
|
18105
18728
|
"panelOnly": props.panelOnly,
|
|
18106
18729
|
"arrow": true,
|
|
18107
18730
|
"respectDefaultPrevented": false,
|
|
@@ -18143,8 +18766,7 @@ var PopconfirmPanel = /* @__PURE__ */ defineComponent({
|
|
|
18143
18766
|
panelOnly: true
|
|
18144
18767
|
}, slots)
|
|
18145
18768
|
});
|
|
18146
|
-
|
|
18147
|
-
//#region components/progress/index.tsx
|
|
18769
|
+
// components/progress/index.tsx
|
|
18148
18770
|
var Progress = /* @__PURE__ */ defineComponent({
|
|
18149
18771
|
name: "Progress",
|
|
18150
18772
|
props: {
|
|
@@ -18285,8 +18907,7 @@ var Progress = /* @__PURE__ */ defineComponent({
|
|
|
18285
18907
|
};
|
|
18286
18908
|
}
|
|
18287
18909
|
});
|
|
18288
|
-
|
|
18289
|
-
//#region components/ripple/engine.ts
|
|
18910
|
+
// components/ripple/engine.ts
|
|
18290
18911
|
var DEFAULTS = {
|
|
18291
18912
|
amplitude: .5,
|
|
18292
18913
|
speed: .65,
|
|
@@ -18762,8 +19383,7 @@ function createRipple(elements, options = {}) {
|
|
|
18762
19383
|
}
|
|
18763
19384
|
};
|
|
18764
19385
|
}
|
|
18765
|
-
|
|
18766
|
-
//#region components/ripple/index.tsx
|
|
19386
|
+
// components/ripple/index.tsx
|
|
18767
19387
|
var Ripple = /* @__PURE__ */ defineComponent({
|
|
18768
19388
|
name: "Ripple",
|
|
18769
19389
|
inheritAttrs: false,
|
|
@@ -18891,15 +19511,13 @@ var Ripple = /* @__PURE__ */ defineComponent({
|
|
|
18891
19511
|
};
|
|
18892
19512
|
}
|
|
18893
19513
|
});
|
|
18894
|
-
|
|
18895
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js
|
|
19514
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js
|
|
18896
19515
|
var require_can_promise = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
18897
19516
|
module.exports = function() {
|
|
18898
19517
|
return typeof Promise === "function" && Promise.prototype && Promise.prototype.then;
|
|
18899
19518
|
};
|
|
18900
19519
|
}));
|
|
18901
|
-
|
|
18902
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js
|
|
19520
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js
|
|
18903
19521
|
var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18904
19522
|
var toSJISFunction;
|
|
18905
19523
|
var CODEWORDS_COUNT = [
|
|
@@ -18990,8 +19608,7 @@ var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18990
19608
|
return toSJISFunction(kanji);
|
|
18991
19609
|
};
|
|
18992
19610
|
}));
|
|
18993
|
-
|
|
18994
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js
|
|
19611
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js
|
|
18995
19612
|
var require_error_correction_level = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18996
19613
|
exports.L = { bit: 1 };
|
|
18997
19614
|
exports.M = { bit: 0 };
|
|
@@ -19023,8 +19640,7 @@ var require_error_correction_level = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
19023
19640
|
}
|
|
19024
19641
|
};
|
|
19025
19642
|
}));
|
|
19026
|
-
|
|
19027
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js
|
|
19643
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js
|
|
19028
19644
|
var require_bit_buffer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
19029
19645
|
function BitBuffer() {
|
|
19030
19646
|
this.buffer = [];
|
|
@@ -19050,8 +19666,7 @@ var require_bit_buffer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
19050
19666
|
};
|
|
19051
19667
|
module.exports = BitBuffer;
|
|
19052
19668
|
}));
|
|
19053
|
-
|
|
19054
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js
|
|
19669
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js
|
|
19055
19670
|
var require_bit_matrix = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
19056
19671
|
/**
|
|
19057
19672
|
* Helper class to handle QR Code symbol modules
|
|
@@ -19111,8 +19726,7 @@ var require_bit_matrix = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
19111
19726
|
};
|
|
19112
19727
|
module.exports = BitMatrix;
|
|
19113
19728
|
}));
|
|
19114
|
-
|
|
19115
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js
|
|
19729
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js
|
|
19116
19730
|
var require_alignment_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19117
19731
|
/**
|
|
19118
19732
|
* Alignment pattern are fixed reference pattern in defined positions
|
|
@@ -19179,8 +19793,7 @@ var require_alignment_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19179
19793
|
return coords;
|
|
19180
19794
|
};
|
|
19181
19795
|
}));
|
|
19182
|
-
|
|
19183
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js
|
|
19796
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js
|
|
19184
19797
|
var require_finder_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19185
19798
|
var getSymbolSize = require_utils$1().getSymbolSize;
|
|
19186
19799
|
var FINDER_PATTERN_SIZE = 7;
|
|
@@ -19200,8 +19813,7 @@ var require_finder_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19200
19813
|
];
|
|
19201
19814
|
};
|
|
19202
19815
|
}));
|
|
19203
|
-
|
|
19204
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js
|
|
19816
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js
|
|
19205
19817
|
var require_mask_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19206
19818
|
/**
|
|
19207
19819
|
* Data mask pattern reference
|
|
@@ -19264,18 +19876,18 @@ var require_mask_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19264
19876
|
sameCountCol = sameCountRow = 0;
|
|
19265
19877
|
lastCol = lastRow = null;
|
|
19266
19878
|
for (let col = 0; col < size; col++) {
|
|
19267
|
-
let module
|
|
19268
|
-
if (module
|
|
19879
|
+
let module = data.get(row, col);
|
|
19880
|
+
if (module === lastCol) sameCountCol++;
|
|
19269
19881
|
else {
|
|
19270
19882
|
if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
|
|
19271
|
-
lastCol = module
|
|
19883
|
+
lastCol = module;
|
|
19272
19884
|
sameCountCol = 1;
|
|
19273
19885
|
}
|
|
19274
|
-
module
|
|
19275
|
-
if (module
|
|
19886
|
+
module = data.get(col, row);
|
|
19887
|
+
if (module === lastRow) sameCountRow++;
|
|
19276
19888
|
else {
|
|
19277
19889
|
if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
|
|
19278
|
-
lastRow = module
|
|
19890
|
+
lastRow = module;
|
|
19279
19891
|
sameCountRow = 1;
|
|
19280
19892
|
}
|
|
19281
19893
|
}
|
|
@@ -19391,8 +20003,7 @@ var require_mask_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19391
20003
|
return bestPattern;
|
|
19392
20004
|
};
|
|
19393
20005
|
}));
|
|
19394
|
-
|
|
19395
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js
|
|
20006
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js
|
|
19396
20007
|
var require_error_correction_code = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19397
20008
|
var ECLevel = require_error_correction_level();
|
|
19398
20009
|
var EC_BLOCKS_TABLE = [
|
|
@@ -19754,8 +20365,7 @@ var require_error_correction_code = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
19754
20365
|
}
|
|
19755
20366
|
};
|
|
19756
20367
|
}));
|
|
19757
|
-
|
|
19758
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js
|
|
20368
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js
|
|
19759
20369
|
var require_galois_field = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19760
20370
|
var EXP_TABLE = /* @__PURE__ */ new Uint8Array(512);
|
|
19761
20371
|
var LOG_TABLE = /* @__PURE__ */ new Uint8Array(256);
|
|
@@ -19800,8 +20410,7 @@ var require_galois_field = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19800
20410
|
return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]];
|
|
19801
20411
|
};
|
|
19802
20412
|
}));
|
|
19803
|
-
|
|
19804
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js
|
|
20413
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js
|
|
19805
20414
|
var require_polynomial = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19806
20415
|
var GF = require_galois_field();
|
|
19807
20416
|
/**
|
|
@@ -19847,8 +20456,7 @@ var require_polynomial = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19847
20456
|
return poly;
|
|
19848
20457
|
};
|
|
19849
20458
|
}));
|
|
19850
|
-
|
|
19851
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js
|
|
20459
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js
|
|
19852
20460
|
var require_reed_solomon_encoder = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
19853
20461
|
var Polynomial = require_polynomial();
|
|
19854
20462
|
function ReedSolomonEncoder(degree) {
|
|
@@ -19887,8 +20495,7 @@ var require_reed_solomon_encoder = /* @__PURE__ */ __commonJSMin(((exports, modu
|
|
|
19887
20495
|
};
|
|
19888
20496
|
module.exports = ReedSolomonEncoder;
|
|
19889
20497
|
}));
|
|
19890
|
-
|
|
19891
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js
|
|
20498
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js
|
|
19892
20499
|
var require_version_check = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19893
20500
|
/**
|
|
19894
20501
|
* Check if QR Code version is valid
|
|
@@ -19900,8 +20507,7 @@ var require_version_check = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19900
20507
|
return !isNaN(version) && version >= 1 && version <= 40;
|
|
19901
20508
|
};
|
|
19902
20509
|
}));
|
|
19903
|
-
|
|
19904
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js
|
|
20510
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js
|
|
19905
20511
|
var require_regex = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19906
20512
|
var numeric = "[0-9]+";
|
|
19907
20513
|
var alphanumeric = "[A-Z $%*+\\-./:]+";
|
|
@@ -19926,8 +20532,7 @@ var require_regex = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19926
20532
|
return TEST_ALPHANUMERIC.test(str);
|
|
19927
20533
|
};
|
|
19928
20534
|
}));
|
|
19929
|
-
|
|
19930
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js
|
|
20535
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js
|
|
19931
20536
|
var require_mode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19932
20537
|
var VersionCheck = require_version_check();
|
|
19933
20538
|
var Regex = require_regex();
|
|
@@ -20083,8 +20688,7 @@ var require_mode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20083
20688
|
}
|
|
20084
20689
|
};
|
|
20085
20690
|
}));
|
|
20086
|
-
|
|
20087
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js
|
|
20691
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js
|
|
20088
20692
|
var require_version = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20089
20693
|
var Utils = require_utils$1();
|
|
20090
20694
|
var ECCode = require_error_correction_code();
|
|
@@ -20180,8 +20784,7 @@ var require_version = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20180
20784
|
return version << 12 | d;
|
|
20181
20785
|
};
|
|
20182
20786
|
}));
|
|
20183
|
-
|
|
20184
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js
|
|
20787
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js
|
|
20185
20788
|
var require_format_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20186
20789
|
var Utils = require_utils$1();
|
|
20187
20790
|
var G15 = 1335;
|
|
@@ -20204,8 +20807,7 @@ var require_format_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20204
20807
|
return (data << 10 | d) ^ G15_MASK;
|
|
20205
20808
|
};
|
|
20206
20809
|
}));
|
|
20207
|
-
|
|
20208
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js
|
|
20810
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js
|
|
20209
20811
|
var require_numeric_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
20210
20812
|
var Mode = require_mode();
|
|
20211
20813
|
function NumericData(data) {
|
|
@@ -20237,8 +20839,7 @@ var require_numeric_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20237
20839
|
};
|
|
20238
20840
|
module.exports = NumericData;
|
|
20239
20841
|
}));
|
|
20240
|
-
|
|
20241
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js
|
|
20842
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js
|
|
20242
20843
|
var require_alphanumeric_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
20243
20844
|
var Mode = require_mode();
|
|
20244
20845
|
/**
|
|
@@ -20321,8 +20922,7 @@ var require_alphanumeric_data = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
20321
20922
|
};
|
|
20322
20923
|
module.exports = AlphanumericData;
|
|
20323
20924
|
}));
|
|
20324
|
-
|
|
20325
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js
|
|
20925
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js
|
|
20326
20926
|
var require_byte_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
20327
20927
|
var Mode = require_mode();
|
|
20328
20928
|
function ByteData(data) {
|
|
@@ -20344,8 +20944,7 @@ var require_byte_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20344
20944
|
};
|
|
20345
20945
|
module.exports = ByteData;
|
|
20346
20946
|
}));
|
|
20347
|
-
|
|
20348
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js
|
|
20947
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js
|
|
20349
20948
|
var require_kanji_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
20350
20949
|
var Mode = require_mode();
|
|
20351
20950
|
var Utils = require_utils$1();
|
|
@@ -20375,8 +20974,7 @@ var require_kanji_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20375
20974
|
};
|
|
20376
20975
|
module.exports = KanjiData;
|
|
20377
20976
|
}));
|
|
20378
|
-
|
|
20379
|
-
//#region node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js
|
|
20977
|
+
// node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js
|
|
20380
20978
|
var require_dijkstra = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
20381
20979
|
/******************************************************************************
|
|
20382
20980
|
* Created 2008-08-19.
|
|
@@ -20491,8 +21089,7 @@ var require_dijkstra = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20491
21089
|
};
|
|
20492
21090
|
if (typeof module !== "undefined") module.exports = dijkstra;
|
|
20493
21091
|
}));
|
|
20494
|
-
|
|
20495
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js
|
|
21092
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js
|
|
20496
21093
|
var require_segments = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20497
21094
|
var Mode = require_mode();
|
|
20498
21095
|
var NumericData = require_numeric_data();
|
|
@@ -20770,8 +21367,7 @@ var require_segments = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20770
21367
|
return exports.fromArray(getSegmentsFromString(data, Utils.isKanjiModeEnabled()));
|
|
20771
21368
|
};
|
|
20772
21369
|
}));
|
|
20773
|
-
|
|
20774
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js
|
|
21370
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js
|
|
20775
21371
|
var require_qrcode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20776
21372
|
var Utils = require_utils$1();
|
|
20777
21373
|
var ECLevel = require_error_correction_level();
|
|
@@ -21065,8 +21661,7 @@ var require_qrcode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21065
21661
|
return createSymbol(data, version, errorCorrectionLevel, mask);
|
|
21066
21662
|
};
|
|
21067
21663
|
}));
|
|
21068
|
-
|
|
21069
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js
|
|
21664
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js
|
|
21070
21665
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21071
21666
|
function hex2rgba(hex) {
|
|
21072
21667
|
if (typeof hex === "number") hex = hex.toString();
|
|
@@ -21133,8 +21728,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21133
21728
|
}
|
|
21134
21729
|
};
|
|
21135
21730
|
}));
|
|
21136
|
-
|
|
21137
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js
|
|
21731
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js
|
|
21138
21732
|
var require_canvas = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21139
21733
|
var Utils = require_utils();
|
|
21140
21734
|
function clearCanvas(ctx, canvas, size) {
|
|
@@ -21182,8 +21776,7 @@ var require_canvas = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21182
21776
|
return canvasEl.toDataURL(type, rendererOpts.quality);
|
|
21183
21777
|
};
|
|
21184
21778
|
}));
|
|
21185
|
-
|
|
21186
|
-
//#region node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js
|
|
21779
|
+
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js
|
|
21187
21780
|
var require_svg_tag = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21188
21781
|
var Utils = require_utils();
|
|
21189
21782
|
function getColorAttrib(color, attrib) {
|
|
@@ -21233,8 +21826,7 @@ var require_svg_tag = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21233
21826
|
return svgTag;
|
|
21234
21827
|
};
|
|
21235
21828
|
}));
|
|
21236
|
-
|
|
21237
|
-
//#region components/spin/index.tsx
|
|
21829
|
+
// components/spin/index.tsx
|
|
21238
21830
|
var import_browser = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21239
21831
|
var canPromise = require_can_promise();
|
|
21240
21832
|
var QRCode = require_qrcode();
|
|
@@ -21348,8 +21940,7 @@ var Spin = /* @__PURE__ */ defineComponent({
|
|
|
21348
21940
|
};
|
|
21349
21941
|
}
|
|
21350
21942
|
});
|
|
21351
|
-
|
|
21352
|
-
//#region components/qrcode/index.tsx
|
|
21943
|
+
// components/qrcode/index.tsx
|
|
21353
21944
|
var PAINTED_THEMES$5 = [
|
|
21354
21945
|
"fill",
|
|
21355
21946
|
"outline",
|
|
@@ -21608,8 +22199,7 @@ var QRCode = /* @__PURE__ */ defineComponent({
|
|
|
21608
22199
|
};
|
|
21609
22200
|
}
|
|
21610
22201
|
});
|
|
21611
|
-
|
|
21612
|
-
//#region components/radio/radio.tsx
|
|
22202
|
+
// components/radio/radio.tsx
|
|
21613
22203
|
var PAINTED_THEMES$4 = ["fill", "outline"];
|
|
21614
22204
|
var radio_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
21615
22205
|
name: "Radio",
|
|
@@ -21704,8 +22294,7 @@ var radio_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
21704
22294
|
};
|
|
21705
22295
|
}
|
|
21706
22296
|
}));
|
|
21707
|
-
|
|
21708
|
-
//#region components/radio/radio-button.tsx
|
|
22297
|
+
// components/radio/radio-button.tsx
|
|
21709
22298
|
function _isSlot$6(s) {
|
|
21710
22299
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
21711
22300
|
}
|
|
@@ -21783,8 +22372,7 @@ var radio_button_default = markFormFieldComponent(/* @__PURE__ */ defineComponen
|
|
|
21783
22372
|
};
|
|
21784
22373
|
}
|
|
21785
22374
|
}));
|
|
21786
|
-
|
|
21787
|
-
//#region components/radio/radio-group.tsx
|
|
22375
|
+
// components/radio/radio-group.tsx
|
|
21788
22376
|
var FormRadioGroup = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
21789
22377
|
name: "RadioGroup",
|
|
21790
22378
|
props: {
|
|
@@ -21893,8 +22481,7 @@ var FormRadioGroup = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
21893
22481
|
};
|
|
21894
22482
|
}
|
|
21895
22483
|
}));
|
|
21896
|
-
|
|
21897
|
-
//#region components/segmented/index.tsx
|
|
22484
|
+
// components/segmented/index.tsx
|
|
21898
22485
|
var isOptionObject = (option) => typeof option === "object" && option !== null;
|
|
21899
22486
|
var normalizeOptions = (options) => options.map((option) => isOptionObject(option) ? option : {
|
|
21900
22487
|
label: option,
|
|
@@ -21945,25 +22532,38 @@ var FormSegmented = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
21945
22532
|
const itemRefs = /* @__PURE__ */ new Map();
|
|
21946
22533
|
const indicatorStyle = ref({});
|
|
21947
22534
|
const ready = ref(false);
|
|
22535
|
+
const animating = ref(false);
|
|
21948
22536
|
const isVertical = computed(() => props.direction === "vertical");
|
|
21949
22537
|
let observer;
|
|
21950
|
-
let
|
|
22538
|
+
let measured;
|
|
21951
22539
|
const updateIndicator = () => {
|
|
21952
22540
|
const item = currentValue.value === void 0 ? void 0 : itemRefs.get(currentValue.value);
|
|
21953
|
-
if (!item) {
|
|
22541
|
+
if (!item || item.offsetWidth === 0 || item.offsetHeight === 0) {
|
|
21954
22542
|
ready.value = false;
|
|
22543
|
+
animating.value = false;
|
|
22544
|
+
measured = void 0;
|
|
21955
22545
|
indicatorStyle.value = {};
|
|
21956
22546
|
return;
|
|
21957
22547
|
}
|
|
22548
|
+
const next = {
|
|
22549
|
+
value: currentValue.value,
|
|
22550
|
+
vertical: isVertical.value,
|
|
22551
|
+
width: item.offsetWidth,
|
|
22552
|
+
height: item.offsetHeight,
|
|
22553
|
+
left: item.offsetLeft,
|
|
22554
|
+
top: item.offsetTop
|
|
22555
|
+
};
|
|
22556
|
+
if (measured && Object.keys(next).every((key) => next[key] === measured[key])) return;
|
|
22557
|
+
animating.value = !!measured && measured.vertical === next.vertical && !Object.is(measured.value, next.value);
|
|
21958
22558
|
indicatorStyle.value = isVertical.value ? {
|
|
21959
|
-
height: `${
|
|
21960
|
-
top: `${
|
|
22559
|
+
height: `${next.height}px`,
|
|
22560
|
+
top: `${next.top}px`
|
|
21961
22561
|
} : {
|
|
21962
|
-
width: `${
|
|
21963
|
-
left: `${
|
|
22562
|
+
width: `${next.width}px`,
|
|
22563
|
+
left: `${next.left}px`
|
|
21964
22564
|
};
|
|
21965
|
-
|
|
21966
|
-
|
|
22565
|
+
measured = next;
|
|
22566
|
+
ready.value = true;
|
|
21967
22567
|
};
|
|
21968
22568
|
const select = (option) => {
|
|
21969
22569
|
if (props.disabled || field?.disabled.value || props.readonly || field?.readonly.value || option.disabled || option.value === currentValue.value) return;
|
|
@@ -21995,9 +22595,10 @@ var FormSegmented = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
21995
22595
|
currentValue.value,
|
|
21996
22596
|
props.direction,
|
|
21997
22597
|
props.options
|
|
21998
|
-
],
|
|
21999
|
-
|
|
22000
|
-
|
|
22598
|
+
], updateIndicator, {
|
|
22599
|
+
deep: true,
|
|
22600
|
+
flush: "post"
|
|
22601
|
+
});
|
|
22001
22602
|
onMounted(() => {
|
|
22002
22603
|
if (typeof ResizeObserver !== "undefined") {
|
|
22003
22604
|
observer = new ResizeObserver(updateIndicator);
|
|
@@ -22007,7 +22608,6 @@ var FormSegmented = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
22007
22608
|
});
|
|
22008
22609
|
onUnmounted(() => {
|
|
22009
22610
|
observer?.disconnect();
|
|
22010
|
-
cancelAnimationFrame(frame);
|
|
22011
22611
|
});
|
|
22012
22612
|
return () => {
|
|
22013
22613
|
const size = appearance.size.value;
|
|
@@ -22034,6 +22634,11 @@ var FormSegmented = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
22034
22634
|
"onKeydown": move
|
|
22035
22635
|
}), [items.value.map((option) => {
|
|
22036
22636
|
const selected = option.value === currentValue.value;
|
|
22637
|
+
const label = slots.label?.({
|
|
22638
|
+
option,
|
|
22639
|
+
selected
|
|
22640
|
+
}) ?? option.label ?? (option.icon ? void 0 : option.value);
|
|
22641
|
+
const hasLabel = label !== void 0 && label !== null && label !== false && label !== "";
|
|
22037
22642
|
return createVNode("button", {
|
|
22038
22643
|
"key": option.value,
|
|
22039
22644
|
"ref": (el) => el ? itemRefs.set(option.value, el) : itemRefs.delete(option.value),
|
|
@@ -22041,22 +22646,23 @@ var FormSegmented = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
22041
22646
|
"class": ["k-segmented-item", { "k-segmented-item-active": selected }],
|
|
22042
22647
|
"role": "radio",
|
|
22043
22648
|
"aria-checked": selected,
|
|
22649
|
+
"aria-label": !hasLabel ? String(option.value) : void 0,
|
|
22044
22650
|
"disabled": props.disabled || field?.disabled.value || option.disabled,
|
|
22045
22651
|
"tabindex": option.value === focusValue.value ? 0 : -1,
|
|
22046
22652
|
"onClick": () => select(option)
|
|
22047
|
-
}, [option.icon && createVNode(Icon, { "type": option.icon }, null), createVNode("span", null, [
|
|
22048
|
-
option,
|
|
22049
|
-
selected
|
|
22050
|
-
}) ?? option.label ?? option.value])]);
|
|
22653
|
+
}, [option.icon && createVNode(Icon, { "type": option.icon }, null), hasLabel && createVNode("span", null, [label])]);
|
|
22051
22654
|
}), createVNode("span", {
|
|
22052
|
-
"class": [
|
|
22655
|
+
"class": [
|
|
22656
|
+
"k-segmented-indicator",
|
|
22657
|
+
ready.value && "is-ready",
|
|
22658
|
+
animating.value && "is-animating"
|
|
22659
|
+
],
|
|
22053
22660
|
"style": indicatorStyle.value
|
|
22054
22661
|
}, null)]);
|
|
22055
22662
|
};
|
|
22056
22663
|
}
|
|
22057
22664
|
}));
|
|
22058
|
-
|
|
22059
|
-
//#region components/rate/star.tsx
|
|
22665
|
+
// components/rate/star.tsx
|
|
22060
22666
|
function _isSlot$5(s) {
|
|
22061
22667
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
22062
22668
|
}
|
|
@@ -22245,8 +22851,7 @@ var rate_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
22245
22851
|
};
|
|
22246
22852
|
}
|
|
22247
22853
|
}));
|
|
22248
|
-
|
|
22249
|
-
//#region components/result/result.tsx
|
|
22854
|
+
// components/result/result.tsx
|
|
22250
22855
|
var resultProps = {
|
|
22251
22856
|
status: {
|
|
22252
22857
|
type: String,
|
|
@@ -22273,8 +22878,7 @@ var statusIcons = {
|
|
|
22273
22878
|
"404": Info,
|
|
22274
22879
|
"500": CircleX
|
|
22275
22880
|
};
|
|
22276
|
-
|
|
22277
|
-
//#region components/result/index.ts
|
|
22881
|
+
// components/result/index.ts
|
|
22278
22882
|
var result_default = /* @__PURE__ */ defineComponent({
|
|
22279
22883
|
name: "Result",
|
|
22280
22884
|
inheritAttrs: false,
|
|
@@ -22308,8 +22912,7 @@ var result_default = /* @__PURE__ */ defineComponent({
|
|
|
22308
22912
|
};
|
|
22309
22913
|
}
|
|
22310
22914
|
});
|
|
22311
|
-
|
|
22312
|
-
//#region components/feedback-panel/feedback-panel.tsx
|
|
22915
|
+
// components/feedback-panel/feedback-panel.tsx
|
|
22313
22916
|
var PAINTED_THEMES$3 = [
|
|
22314
22917
|
"fill",
|
|
22315
22918
|
"outline",
|
|
@@ -22349,8 +22952,7 @@ var symbols = {
|
|
|
22349
22952
|
caution: TriangleAlert,
|
|
22350
22953
|
neutral: Info
|
|
22351
22954
|
};
|
|
22352
|
-
|
|
22353
|
-
//#region components/feedback-panel/index.ts
|
|
22955
|
+
// components/feedback-panel/index.ts
|
|
22354
22956
|
var feedback_panel_default = /* @__PURE__ */ defineComponent({
|
|
22355
22957
|
name: "FeedbackPanel",
|
|
22356
22958
|
inheritAttrs: false,
|
|
@@ -22386,8 +22988,7 @@ var feedback_panel_default = /* @__PURE__ */ defineComponent({
|
|
|
22386
22988
|
};
|
|
22387
22989
|
}
|
|
22388
22990
|
});
|
|
22389
|
-
|
|
22390
|
-
//#region components/config/index.ts
|
|
22991
|
+
// components/config/index.ts
|
|
22391
22992
|
var ConfigProvider = defineComponent({
|
|
22392
22993
|
name: "ConfigProvider",
|
|
22393
22994
|
props: {
|
|
@@ -22423,8 +23024,7 @@ var ConfigProvider = defineComponent({
|
|
|
22423
23024
|
};
|
|
22424
23025
|
}
|
|
22425
23026
|
});
|
|
22426
|
-
|
|
22427
|
-
//#region components/skeleton/types.ts
|
|
23027
|
+
// components/skeleton/types.ts
|
|
22428
23028
|
var skeletonLoadingProps = {
|
|
22429
23029
|
animated: Boolean,
|
|
22430
23030
|
loading: Boolean,
|
|
@@ -22470,8 +23070,7 @@ var skeletonTextProps = {
|
|
|
22470
23070
|
width: Number,
|
|
22471
23071
|
size: String
|
|
22472
23072
|
};
|
|
22473
|
-
|
|
22474
|
-
//#region components/skeleton/use-skeleton-loading.ts
|
|
23073
|
+
// components/skeleton/use-skeleton-loading.ts
|
|
22475
23074
|
var useSkeletonLoading = (loading, delay) => {
|
|
22476
23075
|
const show = ref(false);
|
|
22477
23076
|
let timer;
|
|
@@ -22501,8 +23100,7 @@ var useSkeletonLoading = (loading, delay) => {
|
|
|
22501
23100
|
onBeforeUnmount(clearTimer);
|
|
22502
23101
|
return show;
|
|
22503
23102
|
};
|
|
22504
|
-
|
|
22505
|
-
//#region components/skeleton/skeleton.tsx
|
|
23103
|
+
// components/skeleton/skeleton.tsx
|
|
22506
23104
|
var Skeleton = /* @__PURE__ */ defineComponent({
|
|
22507
23105
|
name: "Skeleton",
|
|
22508
23106
|
props: skeletonProps,
|
|
@@ -22550,8 +23148,7 @@ var Skeleton = /* @__PURE__ */ defineComponent({
|
|
|
22550
23148
|
};
|
|
22551
23149
|
}
|
|
22552
23150
|
});
|
|
22553
|
-
|
|
22554
|
-
//#region components/skeleton/skeleton-avatar.tsx
|
|
23151
|
+
// components/skeleton/skeleton-avatar.tsx
|
|
22555
23152
|
var SkeletonAvatar = /* @__PURE__ */ defineComponent({
|
|
22556
23153
|
name: "SkeletonAvatar",
|
|
22557
23154
|
props: skeletonAvatarProps,
|
|
@@ -22579,8 +23176,7 @@ var SkeletonAvatar = /* @__PURE__ */ defineComponent({
|
|
|
22579
23176
|
};
|
|
22580
23177
|
}
|
|
22581
23178
|
});
|
|
22582
|
-
|
|
22583
|
-
//#region components/skeleton/skeleton-button.tsx
|
|
23179
|
+
// components/skeleton/skeleton-button.tsx
|
|
22584
23180
|
var SkeletonButton = /* @__PURE__ */ defineComponent({
|
|
22585
23181
|
name: "SkeletonButton",
|
|
22586
23182
|
props: skeletonButtonProps,
|
|
@@ -22606,8 +23202,7 @@ var SkeletonButton = /* @__PURE__ */ defineComponent({
|
|
|
22606
23202
|
};
|
|
22607
23203
|
}
|
|
22608
23204
|
});
|
|
22609
|
-
|
|
22610
|
-
//#region components/skeleton/skeleton-image.tsx
|
|
23205
|
+
// components/skeleton/skeleton-image.tsx
|
|
22611
23206
|
var SkeletonImage = /* @__PURE__ */ defineComponent({
|
|
22612
23207
|
name: "SkeletonImage",
|
|
22613
23208
|
props: skeletonImageProps,
|
|
@@ -22643,8 +23238,7 @@ var SkeletonImage = /* @__PURE__ */ defineComponent({
|
|
|
22643
23238
|
};
|
|
22644
23239
|
}
|
|
22645
23240
|
});
|
|
22646
|
-
|
|
22647
|
-
//#region components/skeleton/skeleton-text.tsx
|
|
23241
|
+
// components/skeleton/skeleton-text.tsx
|
|
22648
23242
|
var SkeletonText = /* @__PURE__ */ defineComponent({
|
|
22649
23243
|
name: "SkeletonText",
|
|
22650
23244
|
props: skeletonTextProps,
|
|
@@ -22666,8 +23260,7 @@ var SkeletonText = /* @__PURE__ */ defineComponent({
|
|
|
22666
23260
|
};
|
|
22667
23261
|
}
|
|
22668
23262
|
});
|
|
22669
|
-
|
|
22670
|
-
//#region components/stat-card/utils/countup.ts
|
|
23263
|
+
// components/stat-card/utils/countup.ts
|
|
22671
23264
|
/**
|
|
22672
23265
|
* Animates a number by counting to it.
|
|
22673
23266
|
* playground: stackblitz.com/edit/countup-typescript
|
|
@@ -22948,8 +23541,7 @@ var CountUp = class CountUp {
|
|
|
22948
23541
|
return parseFloat(num);
|
|
22949
23542
|
}
|
|
22950
23543
|
};
|
|
22951
|
-
|
|
22952
|
-
//#region components/stat-card/countup.tsx
|
|
23544
|
+
// components/stat-card/countup.tsx
|
|
22953
23545
|
var CountUpNumber = /* @__PURE__ */ defineComponent({
|
|
22954
23546
|
name: "CountUpNumber",
|
|
22955
23547
|
props: {
|
|
@@ -23019,8 +23611,7 @@ var CountUpNumber = /* @__PURE__ */ defineComponent({
|
|
|
23019
23611
|
}, null);
|
|
23020
23612
|
}
|
|
23021
23613
|
});
|
|
23022
|
-
|
|
23023
|
-
//#region components/stat-card/stat-number.tsx
|
|
23614
|
+
// components/stat-card/stat-number.tsx
|
|
23024
23615
|
var StatNumber = /* @__PURE__ */ defineComponent({
|
|
23025
23616
|
name: "StatNumber",
|
|
23026
23617
|
props: {
|
|
@@ -23078,8 +23669,7 @@ var StatNumber = /* @__PURE__ */ defineComponent({
|
|
|
23078
23669
|
};
|
|
23079
23670
|
}
|
|
23080
23671
|
});
|
|
23081
|
-
|
|
23082
|
-
//#region components/stat-card/utils/stat-item-key.ts
|
|
23672
|
+
// components/stat-card/utils/stat-item-key.ts
|
|
23083
23673
|
/**
|
|
23084
23674
|
* Identity of one `items` entry across renders.
|
|
23085
23675
|
*
|
|
@@ -23091,8 +23681,7 @@ var StatNumber = /* @__PURE__ */ defineComponent({
|
|
|
23091
23681
|
function statItemKey(item, index) {
|
|
23092
23682
|
return String(item.key ?? `kui-item-${index}`);
|
|
23093
23683
|
}
|
|
23094
|
-
|
|
23095
|
-
//#region components/stat-card/stat-card.tsx
|
|
23684
|
+
// components/stat-card/stat-card.tsx
|
|
23096
23685
|
var statCardProps = {
|
|
23097
23686
|
title: [
|
|
23098
23687
|
String,
|
|
@@ -23271,8 +23860,7 @@ var steps_default = /* @__PURE__ */ defineComponent({
|
|
|
23271
23860
|
};
|
|
23272
23861
|
}
|
|
23273
23862
|
});
|
|
23274
|
-
|
|
23275
|
-
//#region components/switch/index.tsx
|
|
23863
|
+
// components/switch/index.tsx
|
|
23276
23864
|
var FormSwitch = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
23277
23865
|
name: "Switch",
|
|
23278
23866
|
inheritAttrs: false,
|
|
@@ -23376,182 +23964,538 @@ var FormSwitch = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
23376
23964
|
};
|
|
23377
23965
|
}
|
|
23378
23966
|
}));
|
|
23967
|
+
var SplitterPanel = /* @__PURE__ */ defineComponent({
|
|
23968
|
+
name: "SplitterPanel",
|
|
23969
|
+
inheritAttrs: false,
|
|
23970
|
+
props: {
|
|
23971
|
+
size: { type: [Number, String] },
|
|
23972
|
+
min: { type: [Number, String] },
|
|
23973
|
+
max: { type: [Number, String] },
|
|
23974
|
+
resizable: {
|
|
23975
|
+
type: Boolean,
|
|
23976
|
+
default: true
|
|
23977
|
+
},
|
|
23978
|
+
collapsible: Boolean,
|
|
23979
|
+
collapsed: {
|
|
23980
|
+
type: Boolean,
|
|
23981
|
+
default: void 0
|
|
23982
|
+
}
|
|
23983
|
+
},
|
|
23984
|
+
emits: { "update:collapsed": (collapsed) => typeof collapsed === "boolean" },
|
|
23985
|
+
setup(_, { attrs, slots }) {
|
|
23986
|
+
return () => createVNode("div", mergeProps(attrs, { "class": ["k-splitter-panel", attrs.class] }), [slots.default?.()]);
|
|
23987
|
+
}
|
|
23988
|
+
});
|
|
23989
|
+
// components/splitter/controller.ts
|
|
23990
|
+
var emptyState = () => ({
|
|
23991
|
+
sizes: [],
|
|
23992
|
+
min: [],
|
|
23993
|
+
max: [],
|
|
23994
|
+
collapsed: [],
|
|
23995
|
+
dragging: null,
|
|
23996
|
+
preview: null
|
|
23997
|
+
});
|
|
23998
|
+
var finite = (value) => Number.isFinite(value) ? Math.max(0, value) : null;
|
|
23999
|
+
var parseSize = (value, total) => {
|
|
24000
|
+
if (value === void 0 || value === "") return null;
|
|
24001
|
+
if (typeof value === "number") return finite(value);
|
|
24002
|
+
if (typeof value !== "string") return null;
|
|
24003
|
+
const match = /^([+-]?(?:\d+\.?\d*|\.\d+))\s*(%|px)?$/.exec(value.trim());
|
|
24004
|
+
return match ? finite(Number(match[1]) * (match[2] === "%" ? total / 100 : 1)) : null;
|
|
24005
|
+
};
|
|
24006
|
+
var same = (a, b) => a.length === b.length && a.every((size, i) => Object.is(size, b[i]) || Math.abs(size - b[i]) < .001);
|
|
24007
|
+
var round = (sizes) => sizes.map((size) => Number(size.toFixed(3)));
|
|
24008
|
+
function fitSizes(requested, min, max, total) {
|
|
24009
|
+
const result = requested.map((size, i) => Math.max(min[i], Math.min(max[i], size)));
|
|
24010
|
+
for (let pass = 0; pass <= result.length; pass++) {
|
|
24011
|
+
const delta = total - result.reduce((sum, size) => sum + size, 0);
|
|
24012
|
+
if (Math.abs(delta) < .001) break;
|
|
24013
|
+
const available = result.map((size, i) => delta > 0 ? max[i] - size : size - min[i]);
|
|
24014
|
+
const count = available.filter((capacity) => capacity > .001).length;
|
|
24015
|
+
if (!count) break;
|
|
24016
|
+
result.forEach((size, i) => {
|
|
24017
|
+
if (available[i] > .001) result[i] = size + Math.sign(delta) * Math.min(available[i], Math.abs(delta) / count);
|
|
24018
|
+
});
|
|
24019
|
+
}
|
|
24020
|
+
return result;
|
|
24021
|
+
}
|
|
24022
|
+
function createSplitterController() {
|
|
24023
|
+
let options;
|
|
24024
|
+
let container;
|
|
24025
|
+
let observer;
|
|
24026
|
+
let state = emptyState();
|
|
24027
|
+
let signature = "";
|
|
24028
|
+
let previousPanels = [];
|
|
24029
|
+
let previousValue;
|
|
24030
|
+
let total = 0;
|
|
24031
|
+
let initialized = false;
|
|
24032
|
+
const remembered = /* @__PURE__ */ new Map();
|
|
24033
|
+
let drag;
|
|
24034
|
+
let frame = 0;
|
|
24035
|
+
let resizeFrame = 0;
|
|
24036
|
+
let pending;
|
|
24037
|
+
const publish = () => options.onState({
|
|
24038
|
+
...state,
|
|
24039
|
+
sizes: [...state.sizes],
|
|
24040
|
+
min: [...state.min],
|
|
24041
|
+
max: [...state.max],
|
|
24042
|
+
collapsed: [...state.collapsed]
|
|
24043
|
+
});
|
|
24044
|
+
const emitChange = () => options.onChange(round(state.sizes));
|
|
24045
|
+
const horizontal = () => options.direction === "horizontal";
|
|
24046
|
+
const coordinate = (event) => horizontal() ? event.clientX : event.clientY;
|
|
24047
|
+
const measure = () => {
|
|
24048
|
+
if (!container) return 0;
|
|
24049
|
+
const rect = container.getBoundingClientRect();
|
|
24050
|
+
const style = getComputedStyle(container);
|
|
24051
|
+
const num = (value) => Number.parseFloat(value) || 0;
|
|
24052
|
+
const border = (width, line) => !line || line === "none" || line === "hidden" ? 0 : num(width);
|
|
24053
|
+
const extent = horizontal() ? rect.width - border(style.borderLeftWidth, style.borderLeftStyle) - border(style.borderRightWidth, style.borderRightStyle) - num(style.paddingLeft) - num(style.paddingRight) : rect.height - border(style.borderTopWidth, style.borderTopStyle) - border(style.borderBottomWidth, style.borderBottomStyle) - num(style.paddingTop) - num(style.paddingBottom);
|
|
24054
|
+
return Math.max(0, extent - Math.max(0, options.panels.length - 1) * 4);
|
|
24055
|
+
};
|
|
24056
|
+
const bounds = (available, collapsed) => {
|
|
24057
|
+
const min = options.panels.map((p, i) => collapsed[i] ? 0 : parseSize(p.min, available) ?? 0);
|
|
24058
|
+
const max = options.panels.map((p, i) => collapsed[i] ? 0 : Math.max(min[i], parseSize(p.max, available) ?? available));
|
|
24059
|
+
const minimum = min.reduce((sum, size) => sum + size, 0);
|
|
24060
|
+
if (minimum > available) min.forEach((size, i) => {
|
|
24061
|
+
min[i] = size * available / minimum;
|
|
24062
|
+
});
|
|
24063
|
+
const maximum = max.reduce((sum, size) => sum + size, 0);
|
|
24064
|
+
const last = collapsed.lastIndexOf(false);
|
|
24065
|
+
if (maximum < available && last !== -1) max[last] += available - maximum;
|
|
24066
|
+
return {
|
|
24067
|
+
min,
|
|
24068
|
+
max
|
|
24069
|
+
};
|
|
24070
|
+
};
|
|
24071
|
+
const sync = () => {
|
|
24072
|
+
if (!container || !options) return;
|
|
24073
|
+
const nextTotal = measure();
|
|
24074
|
+
if (nextTotal <= 0 || !options.panels.length) return;
|
|
24075
|
+
const oldByKey = new Map(previousPanels.map((p, i) => [p.key, i]));
|
|
24076
|
+
const collapsed = options.panels.map((p) => {
|
|
24077
|
+
const old = oldByKey.get(p.key);
|
|
24078
|
+
return old === void 0 || p.collapsed !== previousPanels[old]?.collapsed ? !!p.collapsed : !!state.collapsed[old];
|
|
24079
|
+
});
|
|
24080
|
+
if (collapsed.every(Boolean)) collapsed[collapsed.length - 1] = false;
|
|
24081
|
+
const limits = bounds(nextTotal, collapsed);
|
|
24082
|
+
const valueChanged = options.value !== void 0 && (!previousValue || !same(options.value, previousValue));
|
|
24083
|
+
const raw = options.panels.map((p, i) => {
|
|
24084
|
+
const old = oldByKey.get(p.key);
|
|
24085
|
+
if (collapsed[i]) {
|
|
24086
|
+
if (old !== void 0 && state.sizes[old] > 0) remembered.set(p.key, state.sizes[old]);
|
|
24087
|
+
return 0;
|
|
24088
|
+
}
|
|
24089
|
+
if (valueChanged && options.value?.[i] !== void 0) return finite(options.value[i]) ?? null;
|
|
24090
|
+
if (!initialized || old === void 0 || p.size !== previousPanels[old]?.size) return parseSize(p.size, nextTotal);
|
|
24091
|
+
if (state.collapsed[old]) return remembered.get(p.key) ?? parseSize(p.size, nextTotal);
|
|
24092
|
+
return state.sizes[old];
|
|
24093
|
+
});
|
|
24094
|
+
const membershipChanged = previousPanels.length !== options.panels.length || options.panels.some((p) => !oldByKey.has(p.key));
|
|
24095
|
+
if (initialized && membershipChanged && !valueChanged) {
|
|
24096
|
+
const openCount = collapsed.filter((value) => !value).length;
|
|
24097
|
+
raw.forEach((size, i) => {
|
|
24098
|
+
if (size === null) raw[i] = nextTotal / openCount;
|
|
24099
|
+
});
|
|
24100
|
+
const flexible = options.panels.map((p, i) => oldByKey.has(p.key) && p.resizable && !collapsed[i] ? i : -1).filter((i) => i >= 0);
|
|
24101
|
+
const fixed = raw.reduce((sum, size, i) => sum + (flexible.includes(i) ? 0 : size ?? 0), 0);
|
|
24102
|
+
const previous = flexible.reduce((sum, i) => sum + (raw[i] ?? 0), 0);
|
|
24103
|
+
if (previous > 0) flexible.forEach((i) => {
|
|
24104
|
+
raw[i] = (raw[i] ?? 0) * Math.max(0, nextTotal - fixed) / previous;
|
|
24105
|
+
});
|
|
24106
|
+
}
|
|
24107
|
+
const expanding = options.panels.map((p, i) => {
|
|
24108
|
+
const old = oldByKey.get(p.key);
|
|
24109
|
+
return old !== void 0 && state.collapsed[old] && !collapsed[i];
|
|
24110
|
+
});
|
|
24111
|
+
if (initialized && expanding.some(Boolean) && !valueChanged) {
|
|
24112
|
+
const restored = raw.reduce((sum, size, i) => sum + (expanding[i] ? size ?? 0 : 0), 0);
|
|
24113
|
+
const remainder = raw.reduce((sum, size, i) => sum + (expanding[i] ? 0 : size ?? 0), 0);
|
|
24114
|
+
if (remainder > 0) raw.forEach((size, i) => {
|
|
24115
|
+
if (!expanding[i]) raw[i] = (size ?? 0) * Math.max(0, nextTotal - restored) / remainder;
|
|
24116
|
+
});
|
|
24117
|
+
}
|
|
24118
|
+
if (initialized && total !== nextTotal && total > 0 && !valueChanged) {
|
|
24119
|
+
const flexible = options.panels.map((p, i) => p.resizable && !collapsed[i] ? i : -1).filter((i) => i >= 0);
|
|
24120
|
+
const fixed = raw.reduce((sum, size, i) => sum + (flexible.includes(i) ? 0 : size ?? 0), 0);
|
|
24121
|
+
const oldFlexible = flexible.reduce((sum, i) => sum + (raw[i] ?? 0), 0);
|
|
24122
|
+
if (oldFlexible > 0) flexible.forEach((i) => {
|
|
24123
|
+
raw[i] = (raw[i] ?? 0) * Math.max(0, nextTotal - fixed) / oldFlexible;
|
|
24124
|
+
});
|
|
24125
|
+
}
|
|
24126
|
+
const undefinedCount = raw.filter((size) => size === null).length;
|
|
24127
|
+
const defined = raw.reduce((sum, size) => sum + (size ?? 0), 0);
|
|
24128
|
+
const automatic = undefinedCount ? Math.max(0, nextTotal - defined) / undefinedCount : 0;
|
|
24129
|
+
const sizes = fitSizes(raw.map((size) => size ?? automatic), limits.min, limits.max, nextTotal);
|
|
24130
|
+
const changed = !same(state.sizes, sizes);
|
|
24131
|
+
const resized = initialized && total !== nextTotal;
|
|
24132
|
+
total = nextTotal;
|
|
24133
|
+
state = {
|
|
24134
|
+
...state,
|
|
24135
|
+
sizes,
|
|
24136
|
+
...limits,
|
|
24137
|
+
collapsed
|
|
24138
|
+
};
|
|
24139
|
+
previousPanels = options.panels.map((p) => ({ ...p }));
|
|
24140
|
+
previousValue = options.value ? [...options.value] : void 0;
|
|
24141
|
+
initialized = true;
|
|
24142
|
+
publish();
|
|
24143
|
+
if (changed && (resized || options.value && !same(options.value, sizes))) emitChange();
|
|
24144
|
+
};
|
|
24145
|
+
const range = (index) => {
|
|
24146
|
+
if (!initialized) return {
|
|
24147
|
+
min: 0,
|
|
24148
|
+
max: 0
|
|
24149
|
+
};
|
|
24150
|
+
const pair = state.sizes[index] + state.sizes[index + 1];
|
|
24151
|
+
return {
|
|
24152
|
+
min: Math.max(state.min[index], pair - state.max[index + 1]),
|
|
24153
|
+
max: Math.min(state.max[index], pair - state.min[index + 1])
|
|
24154
|
+
};
|
|
24155
|
+
};
|
|
24156
|
+
const canResize = (index) => {
|
|
24157
|
+
if (!options || options.disabled || !options.panels[index]?.resizable || !options.panels[index + 1]?.resizable || state.collapsed[index] || state.collapsed[index + 1] || !initialized) return false;
|
|
24158
|
+
const limits = range(index);
|
|
24159
|
+
return limits.max - limits.min > .001;
|
|
24160
|
+
};
|
|
24161
|
+
const pairSizes = (index, requested) => {
|
|
24162
|
+
const limits = range(index);
|
|
24163
|
+
const next = [...state.sizes];
|
|
24164
|
+
next[index] = Math.max(limits.min, Math.min(limits.max, requested));
|
|
24165
|
+
next[index + 1] = state.sizes[index] + state.sizes[index + 1] - next[index];
|
|
24166
|
+
return next;
|
|
24167
|
+
};
|
|
24168
|
+
const commit = (sizes) => {
|
|
24169
|
+
if (same(state.sizes, sizes)) return false;
|
|
24170
|
+
state.sizes = sizes;
|
|
24171
|
+
emitChange();
|
|
24172
|
+
return true;
|
|
24173
|
+
};
|
|
24174
|
+
const flush = () => {
|
|
24175
|
+
cancelAnimationFrame(frame);
|
|
24176
|
+
frame = 0;
|
|
24177
|
+
if (!drag || pending === void 0) return;
|
|
24178
|
+
const next = pairSizes(drag.index, drag.sizes[drag.index] + pending - drag.start);
|
|
24179
|
+
pending = void 0;
|
|
24180
|
+
if (same(drag.proposed, next)) return;
|
|
24181
|
+
drag.proposed = next;
|
|
24182
|
+
if (options.lazy) state.preview = next[drag.index] - drag.sizes[drag.index];
|
|
24183
|
+
else commit(next);
|
|
24184
|
+
publish();
|
|
24185
|
+
options.onResize(round(next));
|
|
24186
|
+
};
|
|
24187
|
+
const move = (event) => {
|
|
24188
|
+
if (!drag || event.pointerId !== drag.id) return;
|
|
24189
|
+
event.preventDefault();
|
|
24190
|
+
pending = coordinate(event);
|
|
24191
|
+
if (!frame) frame = requestAnimationFrame(flush);
|
|
24192
|
+
};
|
|
24193
|
+
const finish = (cancel = false, emit = true) => {
|
|
24194
|
+
if (!drag) return;
|
|
24195
|
+
if (emit) flush();
|
|
24196
|
+
else {
|
|
24197
|
+
cancelAnimationFrame(frame);
|
|
24198
|
+
frame = 0;
|
|
24199
|
+
pending = void 0;
|
|
24200
|
+
}
|
|
24201
|
+
const current = drag;
|
|
24202
|
+
drag = void 0;
|
|
24203
|
+
window.removeEventListener("pointermove", move);
|
|
24204
|
+
window.removeEventListener("pointerup", up);
|
|
24205
|
+
window.removeEventListener("pointercancel", cancelDrag);
|
|
24206
|
+
window.removeEventListener("blur", cancelDrag);
|
|
24207
|
+
window.removeEventListener("keydown", escape);
|
|
24208
|
+
current.target.removeEventListener("lostpointercapture", cancelDrag);
|
|
24209
|
+
try {
|
|
24210
|
+
current.target.releasePointerCapture(current.id);
|
|
24211
|
+
} catch {}
|
|
24212
|
+
document.body.style.cursor = current.cursor;
|
|
24213
|
+
document.body.style.userSelect = current.userSelect;
|
|
24214
|
+
if (!current.hadClass) document.body.classList.remove("k-splitter-dragging");
|
|
24215
|
+
if (emit) commit(cancel ? current.sizes : current.proposed);
|
|
24216
|
+
state.dragging = null;
|
|
24217
|
+
state.preview = null;
|
|
24218
|
+
if (emit) {
|
|
24219
|
+
publish();
|
|
24220
|
+
options.onResizeEnd(round(state.sizes));
|
|
24221
|
+
}
|
|
24222
|
+
};
|
|
24223
|
+
const up = (event) => {
|
|
24224
|
+
if (!drag || event.pointerId !== drag.id) return;
|
|
24225
|
+
pending = coordinate(event);
|
|
24226
|
+
finish();
|
|
24227
|
+
};
|
|
24228
|
+
const cancelDrag = () => finish(true);
|
|
24229
|
+
const escape = (event) => {
|
|
24230
|
+
if (event.key === "Escape") {
|
|
24231
|
+
event.preventDefault();
|
|
24232
|
+
finish(true);
|
|
24233
|
+
}
|
|
24234
|
+
};
|
|
24235
|
+
const start = (index, event) => {
|
|
24236
|
+
if (event.button !== 0 || event.isPrimary === false || drag || !canResize(index)) return;
|
|
24237
|
+
event.preventDefault();
|
|
24238
|
+
const target = event.currentTarget;
|
|
24239
|
+
target.focus({ preventScroll: true });
|
|
24240
|
+
drag = {
|
|
24241
|
+
index,
|
|
24242
|
+
id: event.pointerId,
|
|
24243
|
+
start: coordinate(event),
|
|
24244
|
+
sizes: [...state.sizes],
|
|
24245
|
+
proposed: [...state.sizes],
|
|
24246
|
+
target,
|
|
24247
|
+
cursor: document.body.style.cursor,
|
|
24248
|
+
userSelect: document.body.style.userSelect,
|
|
24249
|
+
hadClass: document.body.classList.contains("k-splitter-dragging")
|
|
24250
|
+
};
|
|
24251
|
+
state.dragging = index;
|
|
24252
|
+
document.body.style.cursor = horizontal() ? "col-resize" : "row-resize";
|
|
24253
|
+
document.body.style.userSelect = "none";
|
|
24254
|
+
document.body.classList.add("k-splitter-dragging");
|
|
24255
|
+
try {
|
|
24256
|
+
target.setPointerCapture(event.pointerId);
|
|
24257
|
+
} catch {}
|
|
24258
|
+
window.addEventListener("pointermove", move, { passive: false });
|
|
24259
|
+
window.addEventListener("pointerup", up);
|
|
24260
|
+
window.addEventListener("pointercancel", cancelDrag);
|
|
24261
|
+
window.addEventListener("blur", cancelDrag);
|
|
24262
|
+
window.addEventListener("keydown", escape);
|
|
24263
|
+
target.addEventListener("lostpointercapture", cancelDrag);
|
|
24264
|
+
publish();
|
|
24265
|
+
options.onResizeStart(round(state.sizes));
|
|
24266
|
+
};
|
|
24267
|
+
const keydown = (index, event) => {
|
|
24268
|
+
if (event.target !== event.currentTarget || !canResize(index)) return;
|
|
24269
|
+
const previous = horizontal() ? "ArrowLeft" : "ArrowUp";
|
|
24270
|
+
if (![
|
|
24271
|
+
previous,
|
|
24272
|
+
horizontal() ? "ArrowRight" : "ArrowDown",
|
|
24273
|
+
"Home",
|
|
24274
|
+
"End"
|
|
24275
|
+
].includes(event.key)) return;
|
|
24276
|
+
event.preventDefault();
|
|
24277
|
+
const limits = range(index);
|
|
24278
|
+
const requested = event.key === "Home" ? limits.min : event.key === "End" ? limits.max : state.sizes[index] + (event.key === previous ? -1 : 1) * (event.shiftKey ? 1 : 10);
|
|
24279
|
+
const sizes = pairSizes(index, requested);
|
|
24280
|
+
if (same(sizes, state.sizes)) return;
|
|
24281
|
+
options.onResizeStart(round(state.sizes));
|
|
24282
|
+
commit(sizes);
|
|
24283
|
+
publish();
|
|
24284
|
+
options.onResize(round(state.sizes));
|
|
24285
|
+
options.onResizeEnd(round(state.sizes));
|
|
24286
|
+
};
|
|
24287
|
+
const collapseResult = (index, neighbor) => {
|
|
24288
|
+
if (!initialized || options.disabled || !options.panels[index]?.collapsible || !options.panels[index].resizable || !options.panels[neighbor]?.resizable || state.collapsed[neighbor]) return null;
|
|
24289
|
+
const collapsed = [...state.collapsed];
|
|
24290
|
+
collapsed[index] = !collapsed[index];
|
|
24291
|
+
const limits = bounds(total, collapsed);
|
|
24292
|
+
const pair = state.sizes[index] + state.sizes[neighbor];
|
|
24293
|
+
const desired = collapsed[index] ? 0 : remembered.get(options.panels[index].key) ?? parseSize(options.panels[index].size, total) ?? pair / 2;
|
|
24294
|
+
const lower = Math.max(limits.min[index], pair - limits.max[neighbor]);
|
|
24295
|
+
const upper = Math.min(limits.max[index], pair - limits.min[neighbor]);
|
|
24296
|
+
if (lower > upper || collapsed[index] && lower > .001 || !collapsed[index] && upper <= .001) return null;
|
|
24297
|
+
const sizes = [...state.sizes];
|
|
24298
|
+
sizes[index] = Math.max(lower, Math.min(upper, desired));
|
|
24299
|
+
sizes[neighbor] = pair - sizes[index];
|
|
24300
|
+
return {
|
|
24301
|
+
sizes,
|
|
24302
|
+
collapsed,
|
|
24303
|
+
...limits
|
|
24304
|
+
};
|
|
24305
|
+
};
|
|
24306
|
+
return {
|
|
24307
|
+
configure(next) {
|
|
24308
|
+
const nextSignature = JSON.stringify([
|
|
24309
|
+
next.direction,
|
|
24310
|
+
next.disabled,
|
|
24311
|
+
next.lazy,
|
|
24312
|
+
next.panels
|
|
24313
|
+
]);
|
|
24314
|
+
const valueChanged = next.value !== void 0 && (!previousValue || !same(next.value, previousValue)) && !same(next.value, state.sizes);
|
|
24315
|
+
options = next;
|
|
24316
|
+
if (next.value === void 0) previousValue = void 0;
|
|
24317
|
+
if (next.value && same(next.value, state.sizes)) previousValue = [...next.value];
|
|
24318
|
+
if (signature === nextSignature && !valueChanged) return;
|
|
24319
|
+
signature = nextSignature;
|
|
24320
|
+
finish(true);
|
|
24321
|
+
sync();
|
|
24322
|
+
},
|
|
24323
|
+
mount(element) {
|
|
24324
|
+
container = element;
|
|
24325
|
+
sync();
|
|
24326
|
+
observer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(() => {
|
|
24327
|
+
if (resizeFrame) return;
|
|
24328
|
+
resizeFrame = requestAnimationFrame(() => {
|
|
24329
|
+
resizeFrame = 0;
|
|
24330
|
+
if (measure() === total) return;
|
|
24331
|
+
finish(true);
|
|
24332
|
+
sync();
|
|
24333
|
+
});
|
|
24334
|
+
});
|
|
24335
|
+
observer?.observe(element);
|
|
24336
|
+
},
|
|
24337
|
+
dispose() {
|
|
24338
|
+
finish(true, false);
|
|
24339
|
+
observer?.disconnect();
|
|
24340
|
+
cancelAnimationFrame(resizeFrame);
|
|
24341
|
+
resizeFrame = 0;
|
|
24342
|
+
observer = void 0;
|
|
24343
|
+
container = void 0;
|
|
24344
|
+
},
|
|
24345
|
+
start,
|
|
24346
|
+
keydown,
|
|
24347
|
+
canResize,
|
|
24348
|
+
range,
|
|
24349
|
+
canCollapse: (index, neighbor) => !!collapseResult(index, neighbor),
|
|
24350
|
+
toggle(index, neighbor) {
|
|
24351
|
+
const next = collapseResult(index, neighbor);
|
|
24352
|
+
if (!next) return;
|
|
24353
|
+
finish(true);
|
|
24354
|
+
if (!state.collapsed[index]) remembered.set(options.panels[index].key, state.sizes[index]);
|
|
24355
|
+
state = {
|
|
24356
|
+
...state,
|
|
24357
|
+
...next
|
|
24358
|
+
};
|
|
24359
|
+
publish();
|
|
24360
|
+
emitChange();
|
|
24361
|
+
options.onCollapse(index, state.collapsed[index]);
|
|
24362
|
+
}
|
|
24363
|
+
};
|
|
24364
|
+
}
|
|
23379
24365
|
var Splitter = /* @__PURE__ */ defineComponent({
|
|
23380
24366
|
name: "Splitter",
|
|
23381
24367
|
inheritAttrs: false,
|
|
23382
|
-
props: {
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
24368
|
+
props: {
|
|
24369
|
+
direction: {
|
|
24370
|
+
type: String,
|
|
24371
|
+
default: "horizontal"
|
|
24372
|
+
},
|
|
24373
|
+
modelValue: Array,
|
|
24374
|
+
value: Array,
|
|
24375
|
+
disabled: Boolean,
|
|
24376
|
+
lazy: Boolean
|
|
24377
|
+
},
|
|
23386
24378
|
emits: {
|
|
24379
|
+
"update:modelValue": (sizes) => Array.isArray(sizes),
|
|
24380
|
+
change: (sizes) => Array.isArray(sizes),
|
|
23387
24381
|
resize: (sizes) => Array.isArray(sizes),
|
|
23388
24382
|
resizeStart: (sizes) => Array.isArray(sizes),
|
|
23389
|
-
resizeEnd: (sizes) => Array.isArray(sizes)
|
|
24383
|
+
resizeEnd: (sizes) => Array.isArray(sizes),
|
|
24384
|
+
collapse: (index, collapsed) => typeof index === "number" && typeof collapsed === "boolean"
|
|
23390
24385
|
},
|
|
23391
24386
|
setup(props, { attrs, slots, emit }) {
|
|
23392
|
-
const containerRef = ref(
|
|
23393
|
-
const
|
|
23394
|
-
const
|
|
23395
|
-
const
|
|
23396
|
-
|
|
23397
|
-
const
|
|
23398
|
-
|
|
23399
|
-
|
|
23400
|
-
|
|
23401
|
-
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
const initSizes = () => {
|
|
23409
|
-
if (!containerRef.value) return;
|
|
23410
|
-
const rect = containerRef.value.getBoundingClientRect();
|
|
23411
|
-
const children = slots.default?.() || [];
|
|
23412
|
-
const totalSize = (props.direction === "horizontal" ? rect.width : rect.height) - (children.length - 1) * 4;
|
|
23413
|
-
minSizes.value = children.map((c) => parseToPx(c.props?.min, totalSize) ?? 0);
|
|
23414
|
-
maxSizes.value = children.map((c) => parseToPx(c.props?.max, totalSize) ?? totalSize);
|
|
23415
|
-
const rawSizes = children.map((c) => parseToPx(c.props?.size, totalSize));
|
|
23416
|
-
const definedSum = rawSizes.reduce((acc, s) => (acc ?? 0) + (s ?? 0), 0) || 0;
|
|
23417
|
-
const undefinedCount = rawSizes.filter((s) => s === null).length;
|
|
23418
|
-
const spare = Math.max(0, totalSize - definedSum);
|
|
23419
|
-
const autoSize = undefinedCount > 0 ? spare / undefinedCount : 0;
|
|
23420
|
-
panelSizes.value = rawSizes.map((s) => s ?? autoSize);
|
|
23421
|
-
};
|
|
23422
|
-
const onMouseDown = (index, event) => {
|
|
23423
|
-
if (event.button !== 0) return;
|
|
23424
|
-
event.preventDefault();
|
|
23425
|
-
isDragging.value = true;
|
|
23426
|
-
activeResizerIndex.value = index;
|
|
23427
|
-
document.addEventListener("mousemove", onMouseMove);
|
|
23428
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
23429
|
-
previousBodyCursor = document.body.style.cursor;
|
|
23430
|
-
document.body.style.cursor = props.direction === "horizontal" ? "col-resize" : "row-resize";
|
|
23431
|
-
document.body.classList.add("k-splitter-dragging");
|
|
23432
|
-
emitSize("resizeStart");
|
|
23433
|
-
};
|
|
23434
|
-
const emitSize = (type) => {
|
|
23435
|
-
const sizes = panelSizes.value.map((x) => parseFloat(x.toFixed(3)));
|
|
23436
|
-
if (type === "resize") emit("resize", sizes);
|
|
23437
|
-
else if (type === "resizeStart") emit("resizeStart", sizes);
|
|
23438
|
-
else emit("resizeEnd", sizes);
|
|
23439
|
-
};
|
|
23440
|
-
const resizePair = (index, requestedSize) => {
|
|
23441
|
-
const pairTotal = panelSizes.value[index] + panelSizes.value[index + 1];
|
|
23442
|
-
const lower = Math.max(minSizes.value[index], pairTotal - maxSizes.value[index + 1]);
|
|
23443
|
-
const upper = Math.min(maxSizes.value[index], pairTotal - minSizes.value[index + 1]);
|
|
23444
|
-
const nextSize = Math.max(lower, Math.min(upper, requestedSize));
|
|
23445
|
-
panelSizes.value = panelSizes.value.map((size, panelIndex) => {
|
|
23446
|
-
if (panelIndex === index) return nextSize;
|
|
23447
|
-
if (panelIndex === index + 1) return pairTotal - nextSize;
|
|
23448
|
-
return size;
|
|
23449
|
-
});
|
|
23450
|
-
};
|
|
23451
|
-
const onMouseMove = (e) => {
|
|
23452
|
-
if (!isDragging.value || activeResizerIndex.value === null || !containerRef.value) return;
|
|
23453
|
-
const rect = containerRef.value.getBoundingClientRect();
|
|
23454
|
-
const idx = activeResizerIndex.value;
|
|
23455
|
-
const children = slots.default?.() || [];
|
|
23456
|
-
const resizerWidth = 4;
|
|
23457
|
-
const totalResizersWidth = (children.length - 1) * resizerWidth;
|
|
23458
|
-
const totalAvailableSize = (props.direction === "horizontal" ? rect.width : rect.height) - totalResizersWidth;
|
|
23459
|
-
const resizersBefore = idx * resizerWidth;
|
|
23460
|
-
let currentPos = (props.direction === "horizontal" ? e.clientX - rect.left : e.clientY - rect.top) - resizersBefore;
|
|
23461
|
-
currentPos = Math.max(0, Math.min(totalAvailableSize, currentPos));
|
|
23462
|
-
const offset = panelSizes.value.slice(0, idx).reduce((a, b) => a + b, 0);
|
|
23463
|
-
resizePair(idx, currentPos - offset);
|
|
23464
|
-
emitSize("resize");
|
|
23465
|
-
};
|
|
23466
|
-
const finishDragging = (emitEnd = true) => {
|
|
23467
|
-
if (!isDragging.value) return;
|
|
23468
|
-
isDragging.value = false;
|
|
23469
|
-
activeResizerIndex.value = null;
|
|
23470
|
-
document.removeEventListener("mousemove", onMouseMove);
|
|
23471
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
23472
|
-
document.body.style.cursor = previousBodyCursor;
|
|
23473
|
-
document.body.classList.remove("k-splitter-dragging");
|
|
23474
|
-
if (emitEnd) emitSize("resizeEnd");
|
|
23475
|
-
};
|
|
23476
|
-
const onMouseUp = () => finishDragging();
|
|
23477
|
-
const onResizerKeydown = (index, event) => {
|
|
23478
|
-
const previousKey = props.direction === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
23479
|
-
if (![
|
|
23480
|
-
previousKey,
|
|
23481
|
-
props.direction === "horizontal" ? "ArrowRight" : "ArrowDown",
|
|
23482
|
-
"Home",
|
|
23483
|
-
"End"
|
|
23484
|
-
].includes(event.key)) return;
|
|
23485
|
-
event.preventDefault();
|
|
23486
|
-
const pairTotal = panelSizes.value[index] + panelSizes.value[index + 1];
|
|
23487
|
-
const lower = Math.max(minSizes.value[index], pairTotal - maxSizes.value[index + 1]);
|
|
23488
|
-
const upper = Math.min(maxSizes.value[index], pairTotal - minSizes.value[index + 1]);
|
|
23489
|
-
const step = event.shiftKey ? 1 : 10;
|
|
23490
|
-
const current = panelSizes.value[index];
|
|
23491
|
-
const requested = event.key === "Home" ? lower : event.key === "End" ? upper : current + (event.key === previousKey ? -step : step);
|
|
23492
|
-
emitSize("resizeStart");
|
|
23493
|
-
resizePair(index, requested);
|
|
23494
|
-
emitSize("resize");
|
|
23495
|
-
emitSize("resizeEnd");
|
|
23496
|
-
};
|
|
23497
|
-
let ob = null;
|
|
23498
|
-
onMounted(() => {
|
|
23499
|
-
initSizes();
|
|
23500
|
-
ob = new ResizeObserver(() => initSizes());
|
|
23501
|
-
if (containerRef.value) ob.observe(containerRef.value);
|
|
24387
|
+
const containerRef = ref();
|
|
24388
|
+
const state = shallowRef(emptyState());
|
|
24389
|
+
const value = useInitialValue(props);
|
|
24390
|
+
const controller = createSplitterController();
|
|
24391
|
+
let nodes = [];
|
|
24392
|
+
const panelOptions = () => nodes.map((node, i) => {
|
|
24393
|
+
const p = node.props ?? {};
|
|
24394
|
+
return {
|
|
24395
|
+
key: String(node.key ?? i),
|
|
24396
|
+
size: p.size,
|
|
24397
|
+
min: p.min,
|
|
24398
|
+
max: p.max,
|
|
24399
|
+
resizable: p.resizable !== false,
|
|
24400
|
+
collapsible: p.collapsible === "" || p.collapsible === true,
|
|
24401
|
+
collapsed: p.collapsed === void 0 ? void 0 : p.collapsed !== false
|
|
24402
|
+
};
|
|
23502
24403
|
});
|
|
23503
|
-
|
|
23504
|
-
|
|
23505
|
-
|
|
24404
|
+
const configure = () => controller.configure({
|
|
24405
|
+
panels: panelOptions(),
|
|
24406
|
+
direction: props.direction,
|
|
24407
|
+
disabled: props.disabled,
|
|
24408
|
+
lazy: props.lazy,
|
|
24409
|
+
value: value.value,
|
|
24410
|
+
onState: (next) => {
|
|
24411
|
+
state.value = next;
|
|
24412
|
+
},
|
|
24413
|
+
onChange: (sizes) => {
|
|
24414
|
+
value.value = sizes;
|
|
24415
|
+
emit("update:modelValue", sizes);
|
|
24416
|
+
emit("change", sizes);
|
|
24417
|
+
},
|
|
24418
|
+
onResize: (sizes) => emit("resize", sizes),
|
|
24419
|
+
onResizeStart: (sizes) => emit("resizeStart", sizes),
|
|
24420
|
+
onResizeEnd: (sizes) => emit("resizeEnd", sizes),
|
|
24421
|
+
onCollapse: (index, collapsed) => {
|
|
24422
|
+
nodes[index]?.component?.emit("update:collapsed", collapsed);
|
|
24423
|
+
emit("collapse", index, collapsed);
|
|
24424
|
+
}
|
|
23506
24425
|
});
|
|
24426
|
+
onMounted(() => {
|
|
24427
|
+
configure();
|
|
24428
|
+
if (containerRef.value) controller.mount(containerRef.value);
|
|
24429
|
+
});
|
|
24430
|
+
onUpdated(configure);
|
|
24431
|
+
onBeforeUnmount(() => controller.dispose());
|
|
24432
|
+
const collapseButton = (index, neighbor, before) => {
|
|
24433
|
+
if (!panelOptions()[index]?.collapsible) return null;
|
|
24434
|
+
const collapsed = state.value.collapsed[index];
|
|
24435
|
+
const arrow = props.direction === "horizontal" ? before !== collapsed ? "‹" : "›" : before !== collapsed ? "↑" : "↓";
|
|
24436
|
+
return createVNode("button", {
|
|
24437
|
+
"type": "button",
|
|
24438
|
+
"class": "k-splitter-collapse",
|
|
24439
|
+
"disabled": !controller.canCollapse(index, neighbor),
|
|
24440
|
+
"aria-label": `${collapsed ? "Expand" : "Collapse"} panel ${index + 1}`,
|
|
24441
|
+
"aria-expanded": !collapsed,
|
|
24442
|
+
"onPointerdown": (event) => event.stopPropagation(),
|
|
24443
|
+
"onClick": () => controller.toggle(index, neighbor)
|
|
24444
|
+
}, [arrow]);
|
|
24445
|
+
};
|
|
23507
24446
|
return () => {
|
|
23508
|
-
|
|
24447
|
+
nodes = getChildren(slots.default?.()).filter((node) => node.type === SplitterPanel);
|
|
24448
|
+
const current = state.value;
|
|
23509
24449
|
return createVNode("div", mergeProps(attrs, {
|
|
23510
24450
|
"ref": containerRef,
|
|
23511
24451
|
"class": [
|
|
23512
24452
|
"k-splitter",
|
|
23513
24453
|
`is-${props.direction}`,
|
|
24454
|
+
{ "is-disabled": props.disabled },
|
|
23514
24455
|
attrs.class
|
|
23515
24456
|
]
|
|
23516
|
-
}), [
|
|
23517
|
-
const
|
|
23518
|
-
const
|
|
23519
|
-
|
|
23520
|
-
|
|
23521
|
-
|
|
23522
|
-
|
|
23523
|
-
|
|
23524
|
-
"
|
|
23525
|
-
|
|
23526
|
-
|
|
23527
|
-
|
|
23528
|
-
|
|
23529
|
-
|
|
23530
|
-
"
|
|
23531
|
-
"
|
|
23532
|
-
"
|
|
23533
|
-
|
|
23534
|
-
"
|
|
23535
|
-
|
|
23536
|
-
|
|
24457
|
+
}), [nodes.map((node, index) => {
|
|
24458
|
+
const draggable = controller.canResize(index);
|
|
24459
|
+
const limits = controller.range(index);
|
|
24460
|
+
const dragging = current.dragging === index;
|
|
24461
|
+
return createVNode(Fragment, { "key": node.key ?? index }, [createVNode("div", {
|
|
24462
|
+
"class": ["k-splitter-item", { "is-collapsed": current.collapsed[index] }],
|
|
24463
|
+
"aria-hidden": current.collapsed[index] || void 0,
|
|
24464
|
+
"inert": current.collapsed[index] || void 0,
|
|
24465
|
+
"style": {
|
|
24466
|
+
flexBasis: current.sizes[index] === void 0 ? void 0 : `${current.sizes[index]}px`,
|
|
24467
|
+
flexGrow: current.sizes[index] === void 0 ? 1 : 0,
|
|
24468
|
+
flexShrink: 0
|
|
24469
|
+
}
|
|
24470
|
+
}, [node]), index < nodes.length - 1 && createVNode("div", { "class": ["k-splitter-resizer", {
|
|
24471
|
+
"is-active": dragging,
|
|
24472
|
+
"is-after-collapsed": current.collapsed[index + 1],
|
|
24473
|
+
"is-restorable": current.collapsed[index] || current.collapsed[index + 1]
|
|
24474
|
+
}] }, [
|
|
24475
|
+
createVNode("div", {
|
|
24476
|
+
"class": "k-splitter-handle",
|
|
24477
|
+
"role": "separator",
|
|
24478
|
+
"tabindex": draggable ? 0 : -1,
|
|
24479
|
+
"aria-label": `Resize panels ${index + 1} and ${index + 2}`,
|
|
24480
|
+
"aria-orientation": props.direction === "horizontal" ? "vertical" : "horizontal",
|
|
24481
|
+
"aria-disabled": !draggable || void 0,
|
|
24482
|
+
"aria-valuemin": Math.round(limits.min),
|
|
24483
|
+
"aria-valuemax": Math.round(limits.max),
|
|
24484
|
+
"aria-valuenow": Math.round(current.sizes[index] ?? 0),
|
|
24485
|
+
"onPointerdown": (event) => controller.start(index, event),
|
|
24486
|
+
"onKeydown": (event) => controller.keydown(index, event)
|
|
24487
|
+
}, null),
|
|
24488
|
+
createVNode("div", { "class": "k-splitter-actions" }, [collapseButton(index, index + 1, true), collapseButton(index + 1, index, false)]),
|
|
24489
|
+
dragging && props.lazy && current.preview !== null && createVNode("div", {
|
|
24490
|
+
"class": "k-splitter-preview",
|
|
24491
|
+
"style": { transform: props.direction === "horizontal" ? `translateX(${current.preview}px)` : `translateY(${current.preview}px)` }
|
|
24492
|
+
}, null)
|
|
24493
|
+
])]);
|
|
23537
24494
|
})]);
|
|
23538
24495
|
};
|
|
23539
24496
|
}
|
|
23540
24497
|
});
|
|
23541
|
-
|
|
23542
|
-
name: "SplitterPanel",
|
|
23543
|
-
inheritAttrs: false,
|
|
23544
|
-
props: {
|
|
23545
|
-
size: { type: [Number, String] },
|
|
23546
|
-
min: { type: [Number, String] },
|
|
23547
|
-
max: { type: [Number, String] }
|
|
23548
|
-
},
|
|
23549
|
-
setup(_, { attrs, slots }) {
|
|
23550
|
-
return () => createVNode("div", mergeProps(attrs, { "class": ["k-splitter-panel", attrs.class] }), [slots.default?.()]);
|
|
23551
|
-
}
|
|
23552
|
-
});
|
|
23553
|
-
//#endregion
|
|
23554
|
-
//#region components/table/utils.ts
|
|
24498
|
+
// components/table/utils.ts
|
|
23555
24499
|
var flattenColumns = (columns) => columns.flatMap((column) => column.children?.length ? flattenColumns(column.children) : column);
|
|
23556
24500
|
var countColumnLeaves = (column) => column.children?.length ? column.children.reduce((sum, child) => sum + countColumnLeaves(child), 0) : 1;
|
|
23557
24501
|
/**
|
|
@@ -23711,8 +24655,7 @@ var resolveCellEllipsis = (columnValue, tableValue) => {
|
|
|
23711
24655
|
tooltip: options.tooltip
|
|
23712
24656
|
};
|
|
23713
24657
|
};
|
|
23714
|
-
|
|
23715
|
-
//#region components/table/column-setting.tsx
|
|
24658
|
+
// components/table/column-setting.tsx
|
|
23716
24659
|
var TableColumnSetting = /* @__PURE__ */ defineComponent({
|
|
23717
24660
|
name: "TableColumnSetting",
|
|
23718
24661
|
props: {
|
|
@@ -23786,8 +24729,7 @@ var TableColumnSetting = /* @__PURE__ */ defineComponent({
|
|
|
23786
24729
|
});
|
|
23787
24730
|
}
|
|
23788
24731
|
});
|
|
23789
|
-
|
|
23790
|
-
//#region components/table/index.tsx
|
|
24732
|
+
// components/table/index.tsx
|
|
23791
24733
|
/**
|
|
23792
24734
|
* 列宽基准,与 kui-react `components/table/index.tsx` 的同名常量保持一致。
|
|
23793
24735
|
*
|
|
@@ -24598,8 +25540,7 @@ var Table = /* @__PURE__ */ defineComponent({
|
|
|
24598
25540
|
};
|
|
24599
25541
|
}
|
|
24600
25542
|
});
|
|
24601
|
-
|
|
24602
|
-
//#region components/kanban/index.tsx
|
|
25543
|
+
// components/kanban/index.tsx
|
|
24603
25544
|
var toRenderKey = (value) => `${typeof value}:${String(value)}`;
|
|
24604
25545
|
var PAINTED_THEMES$1 = [
|
|
24605
25546
|
"fill",
|
|
@@ -24954,8 +25895,7 @@ var tour_default = /* @__PURE__ */ defineComponent({
|
|
|
24954
25895
|
};
|
|
24955
25896
|
}
|
|
24956
25897
|
});
|
|
24957
|
-
|
|
24958
|
-
//#region components/transfer/index.tsx
|
|
25898
|
+
// components/transfer/index.tsx
|
|
24959
25899
|
function _isSlot$3(s) {
|
|
24960
25900
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
24961
25901
|
}
|
|
@@ -25163,8 +26103,7 @@ var transfer_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
25163
26103
|
};
|
|
25164
26104
|
}
|
|
25165
26105
|
}));
|
|
25166
|
-
|
|
25167
|
-
//#region components/typography/index.tsx
|
|
26106
|
+
// components/typography/index.tsx
|
|
25168
26107
|
function _isSlot$2(s) {
|
|
25169
26108
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
25170
26109
|
}
|
|
@@ -25312,8 +26251,7 @@ var TypographyText = createTypography("TypographyText", "span");
|
|
|
25312
26251
|
var TypographyParagraph = createTypography("TypographyParagraph", "p");
|
|
25313
26252
|
var TypographyTitle = createTypography("TypographyTitle", "h2");
|
|
25314
26253
|
var Typography = createTypography("Typography", "span");
|
|
25315
|
-
|
|
25316
|
-
//#region components/tabs/tab-panel.tsx
|
|
26254
|
+
// components/tabs/tab-panel.tsx
|
|
25317
26255
|
var TabPanel = /* @__PURE__ */ defineComponent({
|
|
25318
26256
|
name: "TabPanel",
|
|
25319
26257
|
props: {
|
|
@@ -25341,8 +26279,7 @@ var TabPanel = /* @__PURE__ */ defineComponent({
|
|
|
25341
26279
|
};
|
|
25342
26280
|
}
|
|
25343
26281
|
});
|
|
25344
|
-
|
|
25345
|
-
//#region components/tabs/tabs.tsx
|
|
26282
|
+
// components/tabs/tabs.tsx
|
|
25346
26283
|
function _isSlot$1(s) {
|
|
25347
26284
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
25348
26285
|
}
|
|
@@ -25628,8 +26565,7 @@ var Tabs = /* @__PURE__ */ defineComponent({
|
|
|
25628
26565
|
};
|
|
25629
26566
|
}
|
|
25630
26567
|
});
|
|
25631
|
-
|
|
25632
|
-
//#region components/time-line/timeline.tsx
|
|
26568
|
+
// components/time-line/timeline.tsx
|
|
25633
26569
|
var TimeLine = /* @__PURE__ */ defineComponent({
|
|
25634
26570
|
name: "TimeLine",
|
|
25635
26571
|
props: { mode: {
|
|
@@ -25651,8 +26587,7 @@ var TimeLine = /* @__PURE__ */ defineComponent({
|
|
|
25651
26587
|
};
|
|
25652
26588
|
}
|
|
25653
26589
|
});
|
|
25654
|
-
|
|
25655
|
-
//#region components/time-line/timeline-item.tsx
|
|
26590
|
+
// components/time-line/timeline-item.tsx
|
|
25656
26591
|
var TimeLineItem = /* @__PURE__ */ defineComponent({
|
|
25657
26592
|
name: "TimeLineItem",
|
|
25658
26593
|
props: {
|
|
@@ -25691,11 +26626,9 @@ var TimeLineItem = /* @__PURE__ */ defineComponent({
|
|
|
25691
26626
|
};
|
|
25692
26627
|
}
|
|
25693
26628
|
});
|
|
25694
|
-
|
|
25695
|
-
//#region components/tree/context.ts
|
|
26629
|
+
// components/tree/context.ts
|
|
25696
26630
|
var treeSelectContextKey = Symbol("tree-select-context");
|
|
25697
|
-
|
|
25698
|
-
//#region components/tree/utils.ts
|
|
26631
|
+
// components/tree/utils.ts
|
|
25699
26632
|
var updateParentIndeterminate = (nodes, parentKey) => {
|
|
25700
26633
|
let parent;
|
|
25701
26634
|
for (let i = 0; i < nodes.length; i++) if (nodes[i].key === parentKey) {
|
|
@@ -25786,8 +26719,7 @@ var buildTree = ({ data, expandedKeys = [], selectedKeys = [], checkedKeys = [],
|
|
|
25786
26719
|
}
|
|
25787
26720
|
return result;
|
|
25788
26721
|
};
|
|
25789
|
-
|
|
25790
|
-
//#region components/tree/index.tsx
|
|
26722
|
+
// components/tree/index.tsx
|
|
25791
26723
|
function _isSlot(s) {
|
|
25792
26724
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
25793
26725
|
}
|
|
@@ -26440,8 +27372,7 @@ var Tree = /* @__PURE__ */ defineComponent({
|
|
|
26440
27372
|
};
|
|
26441
27373
|
}
|
|
26442
27374
|
});
|
|
26443
|
-
|
|
26444
|
-
//#region components/tree-select/index.tsx
|
|
27375
|
+
// components/tree-select/index.tsx
|
|
26445
27376
|
var FormTreeSelect = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
26446
27377
|
name: "TreeSelect",
|
|
26447
27378
|
props: {
|
|
@@ -26915,8 +27846,7 @@ var FormTreeSelect = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
26915
27846
|
};
|
|
26916
27847
|
}
|
|
26917
27848
|
}));
|
|
26918
|
-
|
|
26919
|
-
//#region components/upload/picture-sort.ts
|
|
27849
|
+
// components/upload/picture-sort.ts
|
|
26920
27850
|
/** Preview a reorder with transforms; commit data only after the card settles. */
|
|
26921
27851
|
function startPictureSort(event, card, onSort) {
|
|
26922
27852
|
const parent = card.parentElement;
|
|
@@ -27283,8 +28213,7 @@ var selector_default = /* @__PURE__ */ defineComponent({
|
|
|
27283
28213
|
};
|
|
27284
28214
|
}
|
|
27285
28215
|
});
|
|
27286
|
-
|
|
27287
|
-
//#region components/upload/index.tsx
|
|
28216
|
+
// components/upload/index.tsx
|
|
27288
28217
|
var uploadUid = 0;
|
|
27289
28218
|
var createUploadUid = () => globalThis.crypto?.randomUUID?.() ?? `k-upload-${Date.now().toString(36)}-${uploadUid++}`;
|
|
27290
28219
|
var upload_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
@@ -27795,8 +28724,7 @@ var upload_default = markFormFieldComponent(/* @__PURE__ */ defineComponent({
|
|
|
27795
28724
|
};
|
|
27796
28725
|
}
|
|
27797
28726
|
}));
|
|
27798
|
-
|
|
27799
|
-
//#region components/watermark/index.tsx
|
|
28727
|
+
// components/watermark/index.tsx
|
|
27800
28728
|
var Watermark = /* @__PURE__ */ defineComponent({
|
|
27801
28729
|
name: "Watermark",
|
|
27802
28730
|
props: {
|
|
@@ -28040,8 +28968,7 @@ var Watermark = /* @__PURE__ */ defineComponent({
|
|
|
28040
28968
|
};
|
|
28041
28969
|
}
|
|
28042
28970
|
});
|
|
28043
|
-
|
|
28044
|
-
//#region components/utils/theme.ts
|
|
28971
|
+
// components/utils/theme.ts
|
|
28045
28972
|
var THEME_KEY = "theme-mode";
|
|
28046
28973
|
var toggleTheme = () => {
|
|
28047
28974
|
const isDark = document.documentElement.getAttribute(THEME_KEY) === "dark";
|
|
@@ -28089,8 +29016,7 @@ var Theme = {
|
|
|
28089
29016
|
});
|
|
28090
29017
|
}
|
|
28091
29018
|
};
|
|
28092
|
-
|
|
28093
|
-
//#region components/components.ts
|
|
29019
|
+
// components/components.ts
|
|
28094
29020
|
var components_exports = /* @__PURE__ */ __exportAll({
|
|
28095
29021
|
Affix: () => Affix,
|
|
28096
29022
|
Alert: () => Alert,
|
|
@@ -28138,6 +29064,7 @@ var components_exports = /* @__PURE__ */ __exportAll({
|
|
|
28138
29064
|
Footer: () => Footer,
|
|
28139
29065
|
Form: () => Form,
|
|
28140
29066
|
FormItem: () => FormItem,
|
|
29067
|
+
GradientPicker: () => gradient_picker_default,
|
|
28141
29068
|
Grid: () => Grid,
|
|
28142
29069
|
GridItem: () => GridItem,
|
|
28143
29070
|
Header: () => Header,
|
|
@@ -28218,14 +29145,16 @@ var components_exports = /* @__PURE__ */ __exportAll({
|
|
|
28218
29145
|
Upload: () => upload_default,
|
|
28219
29146
|
VirtualList: () => VirtualList,
|
|
28220
29147
|
Watermark: () => Watermark,
|
|
29148
|
+
createCornerGradient: () => createCornerGradient,
|
|
29149
|
+
createLinearGradient: () => createLinearGradient,
|
|
29150
|
+
formatGradient: () => formatGradient,
|
|
28221
29151
|
loading: () => loading,
|
|
28222
29152
|
message: () => message,
|
|
28223
29153
|
modal: () => modal,
|
|
28224
29154
|
notice: () => notice,
|
|
28225
29155
|
theme: () => Theme
|
|
28226
29156
|
});
|
|
28227
|
-
|
|
28228
|
-
//#region components/index.ts
|
|
29157
|
+
// components/index.ts
|
|
28229
29158
|
var UI = {
|
|
28230
29159
|
version: void 0,
|
|
28231
29160
|
lang: {},
|
|
@@ -28242,5 +29171,4 @@ var UI = {
|
|
|
28242
29171
|
};
|
|
28243
29172
|
var install = UI.install;
|
|
28244
29173
|
var version = UI.version;
|
|
28245
|
-
|
|
28246
|
-
export { Affix, Alert, Anchor, AnchorLink, auto_complete_default as AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Calendar, Card, CardMeta, Carousel, CarouselItem, cascader_default as Cascader, check_card_default as CheckCard, check_card_group_default as CheckCardGroup, FormCheckbox as Checkbox, FormCheckboxGroup as CheckboxGroup, Col, Collapse, CollapsePanel, color_picker_default as ColorPicker, ColorPickerPanel, ConfigProvider, Content, FormDatePicker as DatePicker, DatePickerPanel, Descriptions, DescriptionsItem, Divider, Drawer, dropdown_default as Dropdown, DropdownButton, Empty, FeatureCard, feedback_panel_default as FeedbackPanel, FlameWrap, Flex, Footer, Form, FormItem, Grid, GridItem, Header, Icon, Image$1 as Image, ImageGroup, FormInput as Input, input_group_default as InputGroup, input_number_default as InputNumber, input_otp_default as InputOTP, input_tag_default as InputTag, Kanban, Layout, ListPanel, mentions_default as Mentions, Menu, MenuDivider, MenuGroup, MenuItem, MessagePanel, modal_default as Modal, ModalPanel, NoticePanel, Option, Page, PageHeader, Popconfirm, PopconfirmPanel, Poptip, PoptipPanel, popup_default as Popup, Progress, QRCode, radio_default as Radio, radio_button_default as RadioButton, FormRadioGroup as RadioGroup, rate_default as Rate, result_default as Result, Ripple, Row, FormSegmented as Segmented, FormSelect as Select, Sider, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonText, FormSlider as Slider, Space, Spin, Splitter, SplitterPanel, StatCard, StatNumber, Step, steps_default as Steps, SubMenu, FormSwitch as Switch, TabPanel, Table, TableColumnSetting, Tabs, Tag, FormTextArea as TextArea, TimeLine, TimeLineItem, Tooltip, TooltipPanel, tour_default as Tour, transfer_default as Transfer, Tree, FormTreeSelect as TreeSelect, Typography, TypographyParagraph, TypographyText, TypographyTitle, upload_default as Upload, VirtualList, Watermark, UI as default, install, loading, message, modal, notice, Theme as theme, version };
|
|
29174
|
+
export { Affix, Alert, Anchor, AnchorLink, auto_complete_default as AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Calendar, Card, CardMeta, Carousel, CarouselItem, cascader_default as Cascader, check_card_default as CheckCard, check_card_group_default as CheckCardGroup, FormCheckbox as Checkbox, FormCheckboxGroup as CheckboxGroup, Col, Collapse, CollapsePanel, color_picker_default as ColorPicker, ColorPickerPanel, ConfigProvider, Content, FormDatePicker as DatePicker, DatePickerPanel, Descriptions, DescriptionsItem, Divider, Drawer, dropdown_default as Dropdown, DropdownButton, Empty, FeatureCard, feedback_panel_default as FeedbackPanel, FlameWrap, Flex, Footer, Form, FormItem, gradient_picker_default as GradientPicker, Grid, GridItem, Header, Icon, Image$1 as Image, ImageGroup, FormInput as Input, input_group_default as InputGroup, input_number_default as InputNumber, input_otp_default as InputOTP, input_tag_default as InputTag, Kanban, Layout, ListPanel, mentions_default as Mentions, Menu, MenuDivider, MenuGroup, MenuItem, MessagePanel, modal_default as Modal, ModalPanel, NoticePanel, Option, Page, PageHeader, Popconfirm, PopconfirmPanel, Poptip, PoptipPanel, popup_default as Popup, Progress, QRCode, radio_default as Radio, radio_button_default as RadioButton, FormRadioGroup as RadioGroup, rate_default as Rate, result_default as Result, Ripple, Row, FormSegmented as Segmented, FormSelect as Select, Sider, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonText, FormSlider as Slider, Space, Spin, Splitter, SplitterPanel, StatCard, StatNumber, Step, steps_default as Steps, SubMenu, FormSwitch as Switch, TabPanel, Table, TableColumnSetting, Tabs, Tag, FormTextArea as TextArea, TimeLine, TimeLineItem, Tooltip, TooltipPanel, tour_default as Tour, transfer_default as Transfer, Tree, FormTreeSelect as TreeSelect, Typography, TypographyParagraph, TypographyText, TypographyTitle, upload_default as Upload, VirtualList, Watermark, createCornerGradient, createLinearGradient, UI as default, formatGradient, install, loading, message, modal, notice, Theme as theme, version };
|