fantasia-ui 0.2.61 → 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 +15 -21
- package/dist/fantasia-ui.es.js +30 -28
- package/dist/fantasia-ui.umd.js +30 -28
- package/package.json +1 -1
package/dist/fantasia-ui.css
CHANGED
|
@@ -444,24 +444,18 @@ to {
|
|
|
444
444
|
}
|
|
445
445
|
.f-rate--readonly .f-rate__item[data-v-3b5c4f14]:hover {
|
|
446
446
|
transform: none;
|
|
447
|
-
}.f-dropdown-wrapper[data-v-
|
|
448
|
-
display:
|
|
449
|
-
align-items: center;
|
|
450
|
-
}
|
|
451
|
-
.f-dropdown-trigger-wrapper[data-v-ecac3ad8] {
|
|
452
|
-
display: inline-flex;
|
|
453
|
-
align-items: center;
|
|
454
|
-
cursor: pointer;
|
|
447
|
+
}.f-dropdown-trigger-wrapper[data-v-36eb6d2b] {
|
|
448
|
+
display: contents;
|
|
455
449
|
}
|
|
456
|
-
.f-dropdown-item[data-v-
|
|
450
|
+
.f-dropdown-item[data-v-36eb6d2b] {
|
|
457
451
|
position: fixed;
|
|
458
452
|
pointer-events: auto;
|
|
459
453
|
}
|
|
460
|
-
.f-dropdown-bridge[data-v-
|
|
454
|
+
.f-dropdown-bridge[data-v-36eb6d2b] {
|
|
461
455
|
position: absolute;
|
|
462
456
|
background: transparent;
|
|
463
457
|
}
|
|
464
|
-
.f-dropdown-content[data-v-
|
|
458
|
+
.f-dropdown-content[data-v-36eb6d2b] {
|
|
465
459
|
background: rgba(255, 255, 255, 0.96);
|
|
466
460
|
border-radius: 8px;
|
|
467
461
|
border: 1px solid rgba(148, 163, 184, 0.2);
|
|
@@ -471,7 +465,7 @@ to {
|
|
|
471
465
|
width: fit-content;
|
|
472
466
|
backdrop-filter: blur(6px);
|
|
473
467
|
}
|
|
474
|
-
.f-dropdown-content .f-dropdown-option[data-v-
|
|
468
|
+
.f-dropdown-content .f-dropdown-option[data-v-36eb6d2b] {
|
|
475
469
|
display: flex;
|
|
476
470
|
align-items: center;
|
|
477
471
|
padding: 7px 10px;
|
|
@@ -482,15 +476,15 @@ to {
|
|
|
482
476
|
font-size: 13px;
|
|
483
477
|
transition: background 0.15s ease, color 0.15s ease;
|
|
484
478
|
}
|
|
485
|
-
.f-dropdown-content .f-dropdown-option[data-v-
|
|
479
|
+
.f-dropdown-content .f-dropdown-option[data-v-36eb6d2b]:hover:not(.is-disabled) {
|
|
486
480
|
background: var(--surface3);
|
|
487
481
|
color: var(--text);
|
|
488
482
|
}
|
|
489
|
-
.f-dropdown-content .f-dropdown-option.is-disabled[data-v-
|
|
483
|
+
.f-dropdown-content .f-dropdown-option.is-disabled[data-v-36eb6d2b] {
|
|
490
484
|
opacity: 0.35;
|
|
491
485
|
cursor: not-allowed;
|
|
492
486
|
}
|
|
493
|
-
.f-dropdown-content .f-dropdown-option .opt-icon[data-v-
|
|
487
|
+
.f-dropdown-content .f-dropdown-option .opt-icon[data-v-36eb6d2b] {
|
|
494
488
|
display: inline-flex;
|
|
495
489
|
align-items: center;
|
|
496
490
|
width: 16px;
|
|
@@ -498,20 +492,20 @@ to {
|
|
|
498
492
|
flex-shrink: 0;
|
|
499
493
|
color: var(--text-dim);
|
|
500
494
|
}
|
|
501
|
-
.f-dropdown-content .f-dropdown-option .opt-icon[data-v-
|
|
495
|
+
.f-dropdown-content .f-dropdown-option .opt-icon[data-v-36eb6d2b] svg {
|
|
502
496
|
width: 100%;
|
|
503
497
|
height: 100%;
|
|
504
498
|
}
|
|
505
|
-
.f-dropdown-content .f-dropdown-option .opt-label[data-v-
|
|
499
|
+
.f-dropdown-content .f-dropdown-option .opt-label[data-v-36eb6d2b] {
|
|
506
500
|
flex: 1;
|
|
507
501
|
white-space: nowrap;
|
|
508
502
|
}
|
|
509
|
-
.f-dropdown-motion-enter-active[data-v-
|
|
510
|
-
.f-dropdown-motion-leave-active[data-v-
|
|
503
|
+
.f-dropdown-motion-enter-active[data-v-36eb6d2b],
|
|
504
|
+
.f-dropdown-motion-leave-active[data-v-36eb6d2b] {
|
|
511
505
|
transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
|
|
512
506
|
}
|
|
513
|
-
.f-dropdown-motion-enter-from[data-v-
|
|
514
|
-
.f-dropdown-motion-leave-to[data-v-
|
|
507
|
+
.f-dropdown-motion-enter-from[data-v-36eb6d2b],
|
|
508
|
+
.f-dropdown-motion-leave-to[data-v-36eb6d2b] {
|
|
515
509
|
opacity: 0;
|
|
516
510
|
transform: scale(0.92);
|
|
517
511
|
}.f-select[data-v-00ebc113] {
|
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",
|
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",
|