fantasia-ui 0.2.60 → 0.2.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fantasia-ui.css +94 -2066
- package/dist/fantasia-ui.es.js +32 -30
- package/dist/fantasia-ui.umd.js +32 -30
- package/package.json +1 -1
package/dist/fantasia-ui.es.js
CHANGED
|
@@ -369,14 +369,13 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
371
|
const FRate = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-3b5c4f14"]]);
|
|
372
|
-
const _hoisted_1$A = { class: "f-dropdown-
|
|
373
|
-
const _hoisted_2$s =
|
|
374
|
-
const _hoisted_3$p =
|
|
375
|
-
const _hoisted_4$g = {
|
|
372
|
+
const _hoisted_1$A = { class: "f-dropdown-content" };
|
|
373
|
+
const _hoisted_2$s = ["onClick"];
|
|
374
|
+
const _hoisted_3$p = {
|
|
376
375
|
key: 0,
|
|
377
376
|
class: "opt-icon"
|
|
378
377
|
};
|
|
379
|
-
const
|
|
378
|
+
const _hoisted_4$g = { class: "opt-label" };
|
|
380
379
|
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
381
380
|
__name: "FDropdown",
|
|
382
381
|
props: {
|
|
@@ -397,6 +396,13 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
397
396
|
const dropdownRef = ref(null);
|
|
398
397
|
const dropdownHeight = ref(0);
|
|
399
398
|
const dropdownWidth = ref(0);
|
|
399
|
+
const getAnchorRect = () => {
|
|
400
|
+
var _a;
|
|
401
|
+
const root = triggerRef.value;
|
|
402
|
+
if (!root) return null;
|
|
403
|
+
const el = (_a = root.firstElementChild) != null ? _a : root;
|
|
404
|
+
return el.getBoundingClientRect();
|
|
405
|
+
};
|
|
400
406
|
const bridgeStyle = computed(() => {
|
|
401
407
|
const [side] = props.placement.split("-");
|
|
402
408
|
const gap = Array.isArray(props.offset) ? props.offset[0] : props.offset;
|
|
@@ -494,7 +500,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
494
500
|
if (props.trigger !== "click" || props.disabled) return;
|
|
495
501
|
e.stopPropagation();
|
|
496
502
|
if (!show.value) {
|
|
497
|
-
anchorRect.value =
|
|
503
|
+
anchorRect.value = getAnchorRect();
|
|
498
504
|
show.value = true;
|
|
499
505
|
} else {
|
|
500
506
|
show.value = false;
|
|
@@ -504,9 +510,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
504
510
|
if (props.trigger !== "hover" || props.disabled) return;
|
|
505
511
|
clearLeaveTimer();
|
|
506
512
|
showTimer = setTimeout(() => {
|
|
507
|
-
|
|
508
|
-
anchorRect.value = triggerRef.value.getBoundingClientRect();
|
|
509
|
-
}
|
|
513
|
+
anchorRect.value = getAnchorRect();
|
|
510
514
|
show.value = true;
|
|
511
515
|
}, 400);
|
|
512
516
|
};
|
|
@@ -520,7 +524,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
520
524
|
show.value = false;
|
|
521
525
|
}, 400);
|
|
522
526
|
};
|
|
523
|
-
const handleWindowClick = (
|
|
527
|
+
const handleWindowClick = () => {
|
|
524
528
|
if (props.trigger !== "click" || !show.value) return;
|
|
525
529
|
show.value = false;
|
|
526
530
|
};
|
|
@@ -532,7 +536,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
532
536
|
watch(show, (val) => __async(null, null, function* () {
|
|
533
537
|
var _a, _b;
|
|
534
538
|
if (val) {
|
|
535
|
-
anchorRect.value =
|
|
539
|
+
anchorRect.value = getAnchorRect();
|
|
536
540
|
yield nextTick();
|
|
537
541
|
dropdownHeight.value = ((_a = dropdownRef.value) == null ? void 0 : _a.offsetHeight) || 200;
|
|
538
542
|
dropdownWidth.value = ((_b = dropdownRef.value) == null ? void 0 : _b.offsetWidth) || 160;
|
|
@@ -549,17 +553,15 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
549
553
|
});
|
|
550
554
|
useEventListener(window, "click", handleWindowClick);
|
|
551
555
|
return (_ctx, _cache) => {
|
|
552
|
-
return openBlock(), createElementBlock("div",
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
},
|
|
561
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
562
|
-
], 544),
|
|
556
|
+
return openBlock(), createElementBlock("div", {
|
|
557
|
+
ref_key: "triggerRef",
|
|
558
|
+
ref: triggerRef,
|
|
559
|
+
class: "f-dropdown-trigger-wrapper",
|
|
560
|
+
onMouseenter: handleMouseEnter,
|
|
561
|
+
onMouseleave: handleMouseLeave,
|
|
562
|
+
onClick: handleTriggerClick
|
|
563
|
+
}, [
|
|
564
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
563
565
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
564
566
|
createVNode(Transition, { name: "f-dropdown-motion" }, {
|
|
565
567
|
default: withCtx(() => [
|
|
@@ -579,18 +581,18 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
579
581
|
class: "f-dropdown-bridge",
|
|
580
582
|
style: normalizeStyle(unref(bridgeStyle))
|
|
581
583
|
}, null, 4)) : createCommentVNode("", true),
|
|
582
|
-
createElementVNode("div",
|
|
584
|
+
createElementVNode("div", _hoisted_1$A, [
|
|
583
585
|
_ctx.options && _ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (opt) => {
|
|
584
586
|
return openBlock(), createElementBlock("div", {
|
|
585
587
|
key: opt.key,
|
|
586
588
|
class: normalizeClass(["f-dropdown-option", { "is-disabled": opt.disabled }]),
|
|
587
589
|
onClick: ($event) => handleOptionClick(opt)
|
|
588
590
|
}, [
|
|
589
|
-
opt.icon ? (openBlock(), createElementBlock("span",
|
|
591
|
+
opt.icon ? (openBlock(), createElementBlock("span", _hoisted_3$p, [
|
|
590
592
|
(openBlock(), createBlock(resolveDynamicComponent(opt.icon)))
|
|
591
593
|
])) : createCommentVNode("", true),
|
|
592
|
-
createElementVNode("span",
|
|
593
|
-
], 10,
|
|
594
|
+
createElementVNode("span", _hoisted_4$g, toDisplayString(opt.label), 1)
|
|
595
|
+
], 10, _hoisted_2$s);
|
|
594
596
|
}), 128)) : renderSlot(_ctx.$slots, "content", { key: 1 }, void 0, true)
|
|
595
597
|
])
|
|
596
598
|
], 36)) : createCommentVNode("", true)
|
|
@@ -598,11 +600,11 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
598
600
|
_: 3
|
|
599
601
|
})
|
|
600
602
|
]))
|
|
601
|
-
]);
|
|
603
|
+
], 544);
|
|
602
604
|
};
|
|
603
605
|
}
|
|
604
606
|
});
|
|
605
|
-
const FDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-
|
|
607
|
+
const FDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-36eb6d2b"]]);
|
|
606
608
|
const _hoisted_1$z = { class: "f-select__suffix" };
|
|
607
609
|
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
608
610
|
__name: "FSelect",
|
|
@@ -698,7 +700,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
698
700
|
};
|
|
699
701
|
}
|
|
700
702
|
});
|
|
701
|
-
const FSelect = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-
|
|
703
|
+
const FSelect = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-00ebc113"]]);
|
|
702
704
|
const _hoisted_1$y = {
|
|
703
705
|
key: 0,
|
|
704
706
|
class: "f-pagination"
|
|
@@ -3194,7 +3196,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
3194
3196
|
};
|
|
3195
3197
|
}
|
|
3196
3198
|
});
|
|
3197
|
-
const FUpload = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-
|
|
3199
|
+
const FUpload = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-072c5bc2"]]);
|
|
3198
3200
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
3199
3201
|
__name: "FButtonGroup",
|
|
3200
3202
|
props: {
|
package/dist/fantasia-ui.umd.js
CHANGED
|
@@ -370,14 +370,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
370
370
|
}
|
|
371
371
|
});
|
|
372
372
|
const FRate = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-3b5c4f14"]]);
|
|
373
|
-
const _hoisted_1$A = { class: "f-dropdown-
|
|
374
|
-
const _hoisted_2$s =
|
|
375
|
-
const _hoisted_3$p =
|
|
376
|
-
const _hoisted_4$g = {
|
|
373
|
+
const _hoisted_1$A = { class: "f-dropdown-content" };
|
|
374
|
+
const _hoisted_2$s = ["onClick"];
|
|
375
|
+
const _hoisted_3$p = {
|
|
377
376
|
key: 0,
|
|
378
377
|
class: "opt-icon"
|
|
379
378
|
};
|
|
380
|
-
const
|
|
379
|
+
const _hoisted_4$g = { class: "opt-label" };
|
|
381
380
|
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
382
381
|
__name: "FDropdown",
|
|
383
382
|
props: {
|
|
@@ -398,6 +397,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
398
397
|
const dropdownRef = vue.ref(null);
|
|
399
398
|
const dropdownHeight = vue.ref(0);
|
|
400
399
|
const dropdownWidth = vue.ref(0);
|
|
400
|
+
const getAnchorRect = () => {
|
|
401
|
+
var _a;
|
|
402
|
+
const root = triggerRef.value;
|
|
403
|
+
if (!root) return null;
|
|
404
|
+
const el = (_a = root.firstElementChild) != null ? _a : root;
|
|
405
|
+
return el.getBoundingClientRect();
|
|
406
|
+
};
|
|
401
407
|
const bridgeStyle = vue.computed(() => {
|
|
402
408
|
const [side] = props.placement.split("-");
|
|
403
409
|
const gap = Array.isArray(props.offset) ? props.offset[0] : props.offset;
|
|
@@ -495,7 +501,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
495
501
|
if (props.trigger !== "click" || props.disabled) return;
|
|
496
502
|
e.stopPropagation();
|
|
497
503
|
if (!show.value) {
|
|
498
|
-
anchorRect.value =
|
|
504
|
+
anchorRect.value = getAnchorRect();
|
|
499
505
|
show.value = true;
|
|
500
506
|
} else {
|
|
501
507
|
show.value = false;
|
|
@@ -505,9 +511,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
505
511
|
if (props.trigger !== "hover" || props.disabled) return;
|
|
506
512
|
clearLeaveTimer();
|
|
507
513
|
showTimer = setTimeout(() => {
|
|
508
|
-
|
|
509
|
-
anchorRect.value = triggerRef.value.getBoundingClientRect();
|
|
510
|
-
}
|
|
514
|
+
anchorRect.value = getAnchorRect();
|
|
511
515
|
show.value = true;
|
|
512
516
|
}, 400);
|
|
513
517
|
};
|
|
@@ -521,7 +525,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
521
525
|
show.value = false;
|
|
522
526
|
}, 400);
|
|
523
527
|
};
|
|
524
|
-
const handleWindowClick = (
|
|
528
|
+
const handleWindowClick = () => {
|
|
525
529
|
if (props.trigger !== "click" || !show.value) return;
|
|
526
530
|
show.value = false;
|
|
527
531
|
};
|
|
@@ -533,7 +537,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
533
537
|
vue.watch(show, (val) => __async(null, null, function* () {
|
|
534
538
|
var _a, _b;
|
|
535
539
|
if (val) {
|
|
536
|
-
anchorRect.value =
|
|
540
|
+
anchorRect.value = getAnchorRect();
|
|
537
541
|
yield vue.nextTick();
|
|
538
542
|
dropdownHeight.value = ((_a = dropdownRef.value) == null ? void 0 : _a.offsetHeight) || 200;
|
|
539
543
|
dropdownWidth.value = ((_b = dropdownRef.value) == null ? void 0 : _b.offsetWidth) || 160;
|
|
@@ -550,17 +554,15 @@ var __async = (__this, __arguments, generator) => {
|
|
|
550
554
|
});
|
|
551
555
|
core.useEventListener(window, "click", handleWindowClick);
|
|
552
556
|
return (_ctx, _cache) => {
|
|
553
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
},
|
|
562
|
-
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
563
|
-
], 544),
|
|
557
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
558
|
+
ref_key: "triggerRef",
|
|
559
|
+
ref: triggerRef,
|
|
560
|
+
class: "f-dropdown-trigger-wrapper",
|
|
561
|
+
onMouseenter: handleMouseEnter,
|
|
562
|
+
onMouseleave: handleMouseLeave,
|
|
563
|
+
onClick: handleTriggerClick
|
|
564
|
+
}, [
|
|
565
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
564
566
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
565
567
|
vue.createVNode(vue.Transition, { name: "f-dropdown-motion" }, {
|
|
566
568
|
default: vue.withCtx(() => [
|
|
@@ -580,18 +582,18 @@ var __async = (__this, __arguments, generator) => {
|
|
|
580
582
|
class: "f-dropdown-bridge",
|
|
581
583
|
style: vue.normalizeStyle(vue.unref(bridgeStyle))
|
|
582
584
|
}, null, 4)) : vue.createCommentVNode("", true),
|
|
583
|
-
vue.createElementVNode("div",
|
|
585
|
+
vue.createElementVNode("div", _hoisted_1$A, [
|
|
584
586
|
_ctx.options && _ctx.options.length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.options, (opt) => {
|
|
585
587
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
586
588
|
key: opt.key,
|
|
587
589
|
class: vue.normalizeClass(["f-dropdown-option", { "is-disabled": opt.disabled }]),
|
|
588
590
|
onClick: ($event) => handleOptionClick(opt)
|
|
589
591
|
}, [
|
|
590
|
-
opt.icon ? (vue.openBlock(), vue.createElementBlock("span",
|
|
592
|
+
opt.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$p, [
|
|
591
593
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(opt.icon)))
|
|
592
594
|
])) : vue.createCommentVNode("", true),
|
|
593
|
-
vue.createElementVNode("span",
|
|
594
|
-
], 10,
|
|
595
|
+
vue.createElementVNode("span", _hoisted_4$g, vue.toDisplayString(opt.label), 1)
|
|
596
|
+
], 10, _hoisted_2$s);
|
|
595
597
|
}), 128)) : vue.renderSlot(_ctx.$slots, "content", { key: 1 }, void 0, true)
|
|
596
598
|
])
|
|
597
599
|
], 36)) : vue.createCommentVNode("", true)
|
|
@@ -599,11 +601,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
599
601
|
_: 3
|
|
600
602
|
})
|
|
601
603
|
]))
|
|
602
|
-
]);
|
|
604
|
+
], 544);
|
|
603
605
|
};
|
|
604
606
|
}
|
|
605
607
|
});
|
|
606
|
-
const FDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-
|
|
608
|
+
const FDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-36eb6d2b"]]);
|
|
607
609
|
const _hoisted_1$z = { class: "f-select__suffix" };
|
|
608
610
|
const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
609
611
|
__name: "FSelect",
|
|
@@ -699,7 +701,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
699
701
|
};
|
|
700
702
|
}
|
|
701
703
|
});
|
|
702
|
-
const FSelect = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-
|
|
704
|
+
const FSelect = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-00ebc113"]]);
|
|
703
705
|
const _hoisted_1$y = {
|
|
704
706
|
key: 0,
|
|
705
707
|
class: "f-pagination"
|
|
@@ -3195,7 +3197,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3195
3197
|
};
|
|
3196
3198
|
}
|
|
3197
3199
|
});
|
|
3198
|
-
const FUpload = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-
|
|
3200
|
+
const FUpload = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-072c5bc2"]]);
|
|
3199
3201
|
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
3200
3202
|
__name: "FButtonGroup",
|
|
3201
3203
|
props: {
|