fantasia-ui 0.2.48 → 0.2.49

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.
@@ -4436,8 +4436,184 @@ var __async = (__this, __arguments, generator) => {
4436
4436
  }
4437
4437
  });
4438
4438
  const FSteps = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a97e1683"]]);
4439
- const _hoisted_1$2 = { class: "f-message__content" };
4439
+ const _hoisted_1$2 = {
4440
+ key: 0,
4441
+ class: "f-dialog__icon"
4442
+ };
4443
+ const _hoisted_2$1 = { class: "f-dialog__title" };
4444
+ const _hoisted_3$1 = { class: "f-dialog__body" };
4445
+ const _hoisted_4 = { key: 0 };
4446
+ const _hoisted_5 = {
4447
+ key: 2,
4448
+ class: "f-dialog__footer"
4449
+ };
4440
4450
  const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
4451
+ __name: "FDialog",
4452
+ props: /* @__PURE__ */ vue.mergeModels({
4453
+ title: { default: "提示" },
4454
+ content: {},
4455
+ width: { default: "500px" },
4456
+ type: { default: "default" },
4457
+ confirmText: { default: "确定" },
4458
+ cancelText: { default: "取消" },
4459
+ showCancel: { type: Boolean, default: true },
4460
+ showClose: { type: Boolean, default: true },
4461
+ closeOnClickModal: { type: Boolean, default: true },
4462
+ closeOnEsc: { type: Boolean, default: true },
4463
+ center: { type: Boolean, default: false },
4464
+ fullscreen: { type: Boolean, default: false },
4465
+ destroyOnClose: { type: Boolean, default: false },
4466
+ beforeClose: {}
4467
+ }, {
4468
+ "modelValue": __spreadValues({ type: Boolean }, { required: true }),
4469
+ "modelModifiers": {}
4470
+ }),
4471
+ emits: /* @__PURE__ */ vue.mergeModels(["open", "close", "confirm", "cancel"], ["update:modelValue"]),
4472
+ setup(__props, { emit: __emit }) {
4473
+ const props = __props;
4474
+ const emit = __emit;
4475
+ const visible = vue.useModel(__props, "modelValue");
4476
+ const handleClose = () => {
4477
+ visible.value = false;
4478
+ emit("close");
4479
+ };
4480
+ const handleConfirm = () => {
4481
+ emit("confirm");
4482
+ if (props.beforeClose) {
4483
+ props.beforeClose(() => {
4484
+ visible.value = false;
4485
+ });
4486
+ } else {
4487
+ visible.value = false;
4488
+ }
4489
+ };
4490
+ const handleCancel = () => {
4491
+ emit("cancel");
4492
+ handleClose();
4493
+ };
4494
+ const handleOverlayClick = (e) => {
4495
+ if (props.closeOnClickModal && e.target === e.currentTarget) {
4496
+ handleClose();
4497
+ }
4498
+ };
4499
+ const handleKeydown = (e) => {
4500
+ if (props.closeOnEsc && e.key === "Escape") {
4501
+ handleClose();
4502
+ }
4503
+ };
4504
+ vue.onMounted(() => {
4505
+ if (props.closeOnEsc) {
4506
+ window.addEventListener("keydown", handleKeydown);
4507
+ }
4508
+ emit("open");
4509
+ });
4510
+ vue.onBeforeUnmount(() => {
4511
+ if (props.closeOnEsc) {
4512
+ window.removeEventListener("keydown", handleKeydown);
4513
+ }
4514
+ });
4515
+ const iconMap = {
4516
+ info: ionicons5.InformationCircleOutline,
4517
+ success: ionicons5.CheckmarkCircleOutline,
4518
+ warning: ionicons5.WarningOutline,
4519
+ failed: ionicons5.AlertCircleOutline,
4520
+ primary: ionicons5.InformationCircleOutline,
4521
+ default: ionicons5.InformationCircleOutline
4522
+ };
4523
+ const hasIcon = vue.computed(() => props.type && props.type !== "default");
4524
+ return (_ctx, _cache) => {
4525
+ return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
4526
+ vue.createVNode(vue.Transition, { name: "f-dialog-fade" }, {
4527
+ default: vue.withCtx(() => [
4528
+ visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
4529
+ key: 0,
4530
+ class: "f-dialog-overlay",
4531
+ onClick: handleOverlayClick
4532
+ }, [
4533
+ vue.createVNode(vue.Transition, { name: "f-dialog-zoom" }, {
4534
+ default: vue.withCtx(() => [
4535
+ visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
4536
+ key: 0,
4537
+ class: vue.normalizeClass(["f-dialog", [
4538
+ `f-dialog--${_ctx.type}`,
4539
+ {
4540
+ "is-center": _ctx.center,
4541
+ "is-fullscreen": _ctx.fullscreen
4542
+ }
4543
+ ]]),
4544
+ style: vue.normalizeStyle({ width: _ctx.fullscreen ? "100%" : _ctx.width })
4545
+ }, [
4546
+ _ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
4547
+ key: 0,
4548
+ type: "button",
4549
+ class: "f-dialog__close",
4550
+ onClick: handleClose
4551
+ }, [
4552
+ vue.createVNode(FIcon, null, {
4553
+ default: vue.withCtx(() => [
4554
+ vue.createVNode(vue.unref(ionicons5.CloseOutline))
4555
+ ]),
4556
+ _: 1
4557
+ })
4558
+ ])) : vue.createCommentVNode("", true),
4559
+ _ctx.$slots.header || _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", {
4560
+ key: 1,
4561
+ class: vue.normalizeClass(["f-dialog__header", { "has-icon": vue.unref(hasIcon) }])
4562
+ }, [
4563
+ vue.renderSlot(_ctx.$slots, "header", {}, () => [
4564
+ vue.unref(hasIcon) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
4565
+ vue.createVNode(FIcon, null, {
4566
+ default: vue.withCtx(() => [
4567
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(iconMap[_ctx.type])))
4568
+ ]),
4569
+ _: 1
4570
+ })
4571
+ ])) : vue.createCommentVNode("", true),
4572
+ vue.createElementVNode("h3", _hoisted_2$1, vue.toDisplayString(_ctx.title), 1)
4573
+ ], true)
4574
+ ], 2)) : vue.createCommentVNode("", true),
4575
+ vue.createElementVNode("div", _hoisted_3$1, [
4576
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
4577
+ _ctx.content ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_4, vue.toDisplayString(_ctx.content), 1)) : vue.createCommentVNode("", true)
4578
+ ], true)
4579
+ ]),
4580
+ _ctx.$slots.footer || _ctx.showCancel ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
4581
+ vue.renderSlot(_ctx.$slots, "footer", {}, () => [
4582
+ _ctx.showCancel ? (vue.openBlock(), vue.createBlock(FButton, {
4583
+ key: 0,
4584
+ onClick: handleCancel
4585
+ }, {
4586
+ default: vue.withCtx(() => [
4587
+ vue.createTextVNode(vue.toDisplayString(_ctx.cancelText), 1)
4588
+ ]),
4589
+ _: 1
4590
+ })) : vue.createCommentVNode("", true),
4591
+ vue.createVNode(FButton, {
4592
+ type: "primary",
4593
+ onClick: handleConfirm
4594
+ }, {
4595
+ default: vue.withCtx(() => [
4596
+ vue.createTextVNode(vue.toDisplayString(_ctx.confirmText), 1)
4597
+ ]),
4598
+ _: 1
4599
+ })
4600
+ ], true)
4601
+ ])) : vue.createCommentVNode("", true)
4602
+ ], 6)) : vue.createCommentVNode("", true)
4603
+ ]),
4604
+ _: 3
4605
+ })
4606
+ ])) : vue.createCommentVNode("", true)
4607
+ ]),
4608
+ _: 3
4609
+ })
4610
+ ]);
4611
+ };
4612
+ }
4613
+ });
4614
+ const FDialogComp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b88b4e96"]]);
4615
+ const _hoisted_1$1 = { class: "f-message__content" };
4616
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
4441
4617
  __name: "FMessage",
4442
4618
  props: {
4443
4619
  type: { default: "info" },
@@ -4516,7 +4692,7 @@ var __async = (__this, __arguments, generator) => {
4516
4692
  ]),
4517
4693
  _: 1
4518
4694
  })) : vue.createCommentVNode("", true),
4519
- vue.createElementVNode("span", _hoisted_1$2, vue.toDisplayString(_ctx.message), 1),
4695
+ vue.createElementVNode("span", _hoisted_1$1, vue.toDisplayString(_ctx.message), 1),
4520
4696
  _ctx.closable ? (vue.openBlock(), vue.createElementBlock("button", {
4521
4697
  key: 1,
4522
4698
  type: "button",
@@ -4538,86 +4714,14 @@ var __async = (__this, __arguments, generator) => {
4538
4714
  };
4539
4715
  }
4540
4716
  });
4541
- const FMessageComp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-97556afa"]]);
4542
- const GAP$1 = 16;
4543
- const BASE_OFFSET$1 = 20;
4544
- let seed$1 = 0;
4545
- const instances = [];
4546
- const normalizeOptions$1 = (options) => {
4547
- return typeof options === "string" ? { message: options } : options;
4548
- };
4549
- const repositionAll = () => {
4550
- let offset = BASE_OFFSET$1;
4551
- instances.forEach((item) => {
4552
- const vm = item.vnode.component;
4553
- if (vm) {
4554
- vm.props.offset = offset;
4555
- }
4556
- offset += item.height + GAP$1;
4557
- });
4558
- };
4559
- const removeInstance$1 = (id) => {
4560
- const index = instances.findIndex((item) => item.id === id);
4561
- if (index === -1) return;
4562
- const { container } = instances[index];
4563
- vue.render(null, container);
4564
- container.remove();
4565
- instances.splice(index, 1);
4566
- repositionAll();
4567
- };
4568
- const createInstance$1 = (options) => {
4569
- var _a;
4570
- const id = seed$1++;
4571
- const container = document.createElement("div");
4572
- const offset = instances.length === 0 ? BASE_OFFSET$1 : (() => {
4573
- var _a2;
4574
- const last = instances[instances.length - 1];
4575
- return ((_a2 = last.vnode.component) == null ? void 0 : _a2.props.offset) + last.height + GAP$1;
4576
- })();
4577
- const vnode = vue.createVNode(FMessageComp, __spreadProps(__spreadValues({}, options), {
4578
- offset,
4579
- onClose: () => {
4580
- var _a2;
4581
- (_a2 = options.onClose) == null ? void 0 : _a2.call(options);
4582
- },
4583
- onDestroy: () => {
4584
- removeInstance$1(id);
4585
- }
4586
- }));
4587
- vue.render(vnode, container);
4588
- document.body.appendChild(container);
4589
- const el = vnode.el;
4590
- const height = (_a = el == null ? void 0 : el.offsetHeight) != null ? _a : 44;
4591
- instances.push({ id, vnode, container, height });
4592
- return {
4593
- id,
4594
- close: () => {
4595
- var _a2, _b, _c;
4596
- (_c = (_b = (_a2 = vnode.component) == null ? void 0 : _a2.exposed) == null ? void 0 : _b.close) == null ? void 0 : _c.call(_b);
4597
- }
4598
- };
4599
- };
4600
- const FMessage = (options) => {
4601
- return createInstance$1(normalizeOptions$1(options));
4602
- };
4603
- const withType$1 = (type) => (options) => createInstance$1(__spreadProps(__spreadValues({}, normalizeOptions$1(options)), { type }));
4604
- FMessage.info = withType$1("info");
4605
- FMessage.success = withType$1("success");
4606
- FMessage.warning = withType$1("warning");
4607
- FMessage.failed = withType$1("failed");
4608
- FMessage.closeAll = () => {
4609
- [...instances].forEach((item) => {
4610
- var _a, _b, _c;
4611
- (_c = (_b = (_a = item.vnode.component) == null ? void 0 : _a.exposed) == null ? void 0 : _b.close) == null ? void 0 : _c.call(_b);
4612
- });
4613
- };
4614
- const _hoisted_1$1 = { class: "f-notification__body" };
4615
- const _hoisted_2$1 = {
4717
+ const FMessageComp = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-97556afa"]]);
4718
+ const _hoisted_1 = { class: "f-notification__body" };
4719
+ const _hoisted_2 = {
4616
4720
  key: 0,
4617
4721
  class: "f-notification__title"
4618
4722
  };
4619
- const _hoisted_3$1 = { class: "f-notification__content" };
4620
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
4723
+ const _hoisted_3 = { class: "f-notification__content" };
4724
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4621
4725
  __name: "FNotification",
4622
4726
  props: {
4623
4727
  type: { default: "info" },
@@ -4703,9 +4807,9 @@ var __async = (__this, __arguments, generator) => {
4703
4807
  ]),
4704
4808
  _: 1
4705
4809
  })) : vue.createCommentVNode("", true),
4706
- vue.createElementVNode("div", _hoisted_1$1, [
4707
- _ctx.title ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2$1, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
4708
- vue.createElementVNode("p", _hoisted_3$1, vue.toDisplayString(_ctx.message), 1)
4810
+ vue.createElementVNode("div", _hoisted_1, [
4811
+ _ctx.title ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
4812
+ vue.createElementVNode("p", _hoisted_3, vue.toDisplayString(_ctx.message), 1)
4709
4813
  ]),
4710
4814
  _ctx.closable ? (vue.openBlock(), vue.createElementBlock("button", {
4711
4815
  key: 1,
@@ -4728,7 +4832,79 @@ var __async = (__this, __arguments, generator) => {
4728
4832
  };
4729
4833
  }
4730
4834
  });
4731
- const FNotificationComp = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-0a7315d6"]]);
4835
+ const FNotificationComp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0a7315d6"]]);
4836
+ const GAP$1 = 16;
4837
+ const BASE_OFFSET$1 = 20;
4838
+ let seed$1 = 0;
4839
+ const instances = [];
4840
+ const normalizeOptions$1 = (options) => {
4841
+ return typeof options === "string" ? { message: options } : options;
4842
+ };
4843
+ const repositionAll = () => {
4844
+ let offset = BASE_OFFSET$1;
4845
+ instances.forEach((item) => {
4846
+ const vm = item.vnode.component;
4847
+ if (vm) {
4848
+ vm.props.offset = offset;
4849
+ }
4850
+ offset += item.height + GAP$1;
4851
+ });
4852
+ };
4853
+ const removeInstance$1 = (id) => {
4854
+ const index = instances.findIndex((item) => item.id === id);
4855
+ if (index === -1) return;
4856
+ const { container } = instances[index];
4857
+ vue.render(null, container);
4858
+ container.remove();
4859
+ instances.splice(index, 1);
4860
+ repositionAll();
4861
+ };
4862
+ const createInstance$1 = (options) => {
4863
+ var _a;
4864
+ const id = seed$1++;
4865
+ const container = document.createElement("div");
4866
+ const offset = instances.length === 0 ? BASE_OFFSET$1 : (() => {
4867
+ var _a2;
4868
+ const last = instances[instances.length - 1];
4869
+ return ((_a2 = last.vnode.component) == null ? void 0 : _a2.props.offset) + last.height + GAP$1;
4870
+ })();
4871
+ const vnode = vue.createVNode(FMessageComp, __spreadProps(__spreadValues({}, options), {
4872
+ offset,
4873
+ onClose: () => {
4874
+ var _a2;
4875
+ (_a2 = options.onClose) == null ? void 0 : _a2.call(options);
4876
+ },
4877
+ onDestroy: () => {
4878
+ removeInstance$1(id);
4879
+ }
4880
+ }));
4881
+ vue.render(vnode, container);
4882
+ document.body.appendChild(container);
4883
+ const el = vnode.el;
4884
+ const height = (_a = el == null ? void 0 : el.offsetHeight) != null ? _a : 44;
4885
+ instances.push({ id, vnode, container, height });
4886
+ return {
4887
+ id,
4888
+ close: () => {
4889
+ var _a2, _b, _c;
4890
+ (_c = (_b = (_a2 = vnode.component) == null ? void 0 : _a2.exposed) == null ? void 0 : _b.close) == null ? void 0 : _c.call(_b);
4891
+ }
4892
+ };
4893
+ };
4894
+ const FMessage = (options) => {
4895
+ return createInstance$1(normalizeOptions$1(options));
4896
+ };
4897
+ const withType$1 = (type) => (options) => createInstance$1(__spreadProps(__spreadValues({}, normalizeOptions$1(options)), { type }));
4898
+ FMessage.info = withType$1("info");
4899
+ FMessage.success = withType$1("success");
4900
+ FMessage.warning = withType$1("warning");
4901
+ FMessage.failed = withType$1("failed");
4902
+ FMessage.closeAll = () => {
4903
+ [...instances].forEach((item) => {
4904
+ var _a, _b, _c;
4905
+ (_c = (_b = (_a = item.vnode.component) == null ? void 0 : _a.exposed) == null ? void 0 : _b.close) == null ? void 0 : _c.call(_b);
4906
+ });
4907
+ };
4732
4908
  const GAP = 16;
4733
4909
  const BASE_OFFSET = 20;
4734
4910
  let seed = 0;
@@ -4817,182 +4993,6 @@ var __async = (__this, __arguments, generator) => {
4817
4993
  });
4818
4994
  });
4819
4995
  };
4820
- const _hoisted_1 = {
4821
- key: 0,
4822
- class: "f-dialog__icon"
4823
- };
4824
- const _hoisted_2 = { class: "f-dialog__title" };
4825
- const _hoisted_3 = { class: "f-dialog__body" };
4826
- const _hoisted_4 = { key: 0 };
4827
- const _hoisted_5 = {
4828
- key: 2,
4829
- class: "f-dialog__footer"
4830
- };
4831
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4832
- __name: "FDialog",
4833
- props: /* @__PURE__ */ vue.mergeModels({
4834
- title: { default: "提示" },
4835
- content: {},
4836
- width: { default: "500px" },
4837
- type: { default: "default" },
4838
- confirmText: { default: "确定" },
4839
- cancelText: { default: "取消" },
4840
- showCancel: { type: Boolean, default: true },
4841
- showClose: { type: Boolean, default: true },
4842
- closeOnClickModal: { type: Boolean, default: true },
4843
- closeOnEsc: { type: Boolean, default: true },
4844
- center: { type: Boolean, default: false },
4845
- fullscreen: { type: Boolean, default: false },
4846
- destroyOnClose: { type: Boolean, default: false },
4847
- beforeClose: {}
4848
- }, {
4849
- "modelValue": __spreadValues({ type: Boolean }, { required: true }),
4850
- "modelModifiers": {}
4851
- }),
4852
- emits: /* @__PURE__ */ vue.mergeModels(["open", "close", "confirm", "cancel"], ["update:modelValue"]),
4853
- setup(__props, { emit: __emit }) {
4854
- const props = __props;
4855
- const emit = __emit;
4856
- const visible = vue.useModel(__props, "modelValue");
4857
- const handleClose = () => {
4858
- visible.value = false;
4859
- emit("close");
4860
- };
4861
- const handleConfirm = () => {
4862
- emit("confirm");
4863
- if (props.beforeClose) {
4864
- props.beforeClose(() => {
4865
- visible.value = false;
4866
- });
4867
- } else {
4868
- visible.value = false;
4869
- }
4870
- };
4871
- const handleCancel = () => {
4872
- emit("cancel");
4873
- handleClose();
4874
- };
4875
- const handleOverlayClick = (e) => {
4876
- if (props.closeOnClickModal && e.target === e.currentTarget) {
4877
- handleClose();
4878
- }
4879
- };
4880
- const handleKeydown = (e) => {
4881
- if (props.closeOnEsc && e.key === "Escape") {
4882
- handleClose();
4883
- }
4884
- };
4885
- vue.onMounted(() => {
4886
- if (props.closeOnEsc) {
4887
- window.addEventListener("keydown", handleKeydown);
4888
- }
4889
- emit("open");
4890
- });
4891
- vue.onBeforeUnmount(() => {
4892
- if (props.closeOnEsc) {
4893
- window.removeEventListener("keydown", handleKeydown);
4894
- }
4895
- });
4896
- const iconMap = {
4897
- info: ionicons5.InformationCircleOutline,
4898
- success: ionicons5.CheckmarkCircleOutline,
4899
- warning: ionicons5.WarningOutline,
4900
- failed: ionicons5.AlertCircleOutline,
4901
- primary: ionicons5.InformationCircleOutline,
4902
- default: ionicons5.InformationCircleOutline
4903
- };
4904
- const hasIcon = vue.computed(() => props.type && props.type !== "default");
4905
- return (_ctx, _cache) => {
4906
- return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
4907
- vue.createVNode(vue.Transition, { name: "f-dialog-fade" }, {
4908
- default: vue.withCtx(() => [
4909
- visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
4910
- key: 0,
4911
- class: "f-dialog-overlay",
4912
- onClick: handleOverlayClick
4913
- }, [
4914
- vue.createVNode(vue.Transition, { name: "f-dialog-zoom" }, {
4915
- default: vue.withCtx(() => [
4916
- visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
4917
- key: 0,
4918
- class: vue.normalizeClass(["f-dialog", [
4919
- `f-dialog--${_ctx.type}`,
4920
- {
4921
- "is-center": _ctx.center,
4922
- "is-fullscreen": _ctx.fullscreen
4923
- }
4924
- ]]),
4925
- style: vue.normalizeStyle({ width: _ctx.fullscreen ? "100%" : _ctx.width })
4926
- }, [
4927
- _ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
4928
- key: 0,
4929
- type: "button",
4930
- class: "f-dialog__close",
4931
- onClick: handleClose
4932
- }, [
4933
- vue.createVNode(FIcon, null, {
4934
- default: vue.withCtx(() => [
4935
- vue.createVNode(vue.unref(ionicons5.CloseOutline))
4936
- ]),
4937
- _: 1
4938
- })
4939
- ])) : vue.createCommentVNode("", true),
4940
- _ctx.$slots.header || _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", {
4941
- key: 1,
4942
- class: vue.normalizeClass(["f-dialog__header", { "has-icon": vue.unref(hasIcon) }])
4943
- }, [
4944
- vue.renderSlot(_ctx.$slots, "header", {}, () => [
4945
- vue.unref(hasIcon) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
4946
- vue.createVNode(FIcon, null, {
4947
- default: vue.withCtx(() => [
4948
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(iconMap[_ctx.type])))
4949
- ]),
4950
- _: 1
4951
- })
4952
- ])) : vue.createCommentVNode("", true),
4953
- vue.createElementVNode("h3", _hoisted_2, vue.toDisplayString(_ctx.title), 1)
4954
- ], true)
4955
- ], 2)) : vue.createCommentVNode("", true),
4956
- vue.createElementVNode("div", _hoisted_3, [
4957
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
4958
- _ctx.content ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_4, vue.toDisplayString(_ctx.content), 1)) : vue.createCommentVNode("", true)
4959
- ], true)
4960
- ]),
4961
- _ctx.$slots.footer || _ctx.showCancel ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
4962
- vue.renderSlot(_ctx.$slots, "footer", {}, () => [
4963
- _ctx.showCancel ? (vue.openBlock(), vue.createBlock(FButton, {
4964
- key: 0,
4965
- onClick: handleCancel
4966
- }, {
4967
- default: vue.withCtx(() => [
4968
- vue.createTextVNode(vue.toDisplayString(_ctx.cancelText), 1)
4969
- ]),
4970
- _: 1
4971
- })) : vue.createCommentVNode("", true),
4972
- vue.createVNode(FButton, {
4973
- type: "primary",
4974
- onClick: handleConfirm
4975
- }, {
4976
- default: vue.withCtx(() => [
4977
- vue.createTextVNode(vue.toDisplayString(_ctx.confirmText), 1)
4978
- ]),
4979
- _: 1
4980
- })
4981
- ], true)
4982
- ])) : vue.createCommentVNode("", true)
4983
- ], 6)) : vue.createCommentVNode("", true)
4984
- ]),
4985
- _: 3
4986
- })
4987
- ])) : vue.createCommentVNode("", true)
4988
- ]),
4989
- _: 3
4990
- })
4991
- ]);
4992
- };
4993
- }
4994
- });
4995
- const FDialogComp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b88b4e96"]]);
4996
4996
  const showDialog = (options) => {
4997
4997
  return new Promise((resolve) => {
4998
4998
  const container = document.createElement("div");
@@ -5090,6 +5090,7 @@ var __async = (__this, __arguments, generator) => {
5090
5090
  FColorPicker: _sfc_main$b,
5091
5091
  FContainer,
5092
5092
  FDialog,
5093
+ FDialogComponent: FDialogComp,
5093
5094
  FDivider,
5094
5095
  FDropdown,
5095
5096
  FEditor,
@@ -5105,7 +5106,9 @@ var __async = (__this, __arguments, generator) => {
5105
5106
  FMarquee,
5106
5107
  FMask,
5107
5108
  FMessage,
5109
+ FMessageComponent: FMessageComp,
5108
5110
  FNotification,
5111
+ FNotificationComponent: FNotificationComp,
5109
5112
  FPagination,
5110
5113
  FProgress,
5111
5114
  FRadio,
@@ -5149,6 +5152,7 @@ var __async = (__this, __arguments, generator) => {
5149
5152
  exports2.FColorPicker = _sfc_main$b;
5150
5153
  exports2.FContainer = FContainer;
5151
5154
  exports2.FDialog = FDialog;
5155
+ exports2.FDialogComponent = FDialogComp;
5152
5156
  exports2.FDivider = FDivider;
5153
5157
  exports2.FDropdown = FDropdown;
5154
5158
  exports2.FEditor = FEditor;
@@ -5164,7 +5168,9 @@ var __async = (__this, __arguments, generator) => {
5164
5168
  exports2.FMarquee = FMarquee;
5165
5169
  exports2.FMask = FMask;
5166
5170
  exports2.FMessage = FMessage;
5171
+ exports2.FMessageComponent = FMessageComp;
5167
5172
  exports2.FNotification = FNotification;
5173
+ exports2.FNotificationComponent = FNotificationComp;
5168
5174
  exports2.FPagination = FPagination;
5169
5175
  exports2.FProgress = FProgress;
5170
5176
  exports2.FRadio = FRadio;
@@ -20,7 +20,7 @@ declare module '@vue/runtime-core' {
20
20
  FTransfer: typeof components.FTransfer
21
21
  FCol: typeof components.FCol
22
22
  FContainer: typeof components.FContainer
23
- FDialog: typeof components.FDialog
23
+ FDialog: typeof components.FDialogComponent
24
24
  FDivider: typeof components.FDivider
25
25
  FDropdown: typeof components.FDropdown
26
26
  FEditor: typeof components.FEditor
@@ -55,6 +55,9 @@ declare module '@vue/runtime-core' {
55
55
  FMask: typeof components.FMask
56
56
  FMarquee: typeof components.FMarquee
57
57
  FSteps: typeof components.FSteps
58
+ FMessage: typeof components.FMessageComponent
59
+ FNotification: typeof components.FNotificationComponent
60
+ FResult: typeof components.FResult
58
61
  }
59
62
  }
60
63
 
@@ -48,6 +48,9 @@ export { default as FResult } from './modules/FResult.vue';
48
48
  export { default as FMask } from './modules/FMask.vue';
49
49
  export { default as FMarquee } from './modules/FMarquee.vue';
50
50
  export { default as FSteps } from './modules/FSteps.vue';
51
+ export { default as FDialogComponent } from './modules/FDialog.vue';
52
+ export { default as FMessageComponent } from './modules/FMessage.vue';
53
+ export { default as FNotificationComponent } from './modules/FNotification.vue';
51
54
  import FMessageDefault from '../composables/FMessage.js';
52
55
  import FNotificationDefault from '../composables/FNotification.js';
53
56
  import FDialogDefault from '../composables/FDialog.js';
@@ -56,3 +59,4 @@ export { FNotificationDefault as FNotification };
56
59
  export { FDialogDefault as FDialog };
57
60
  export type { FMessageFn, FMessageOptions, FMessageInstance } from '@/types';
58
61
  export type { FNotificationFn, FNotificationOptions, FNotificationInstance } from '@/types';
62
+ export type { FDialogFn, FDialogOptions } from '@/types';
@@ -20,7 +20,7 @@ declare module '@vue/runtime-core' {
20
20
  FTransfer: typeof components.FTransfer
21
21
  FCol: typeof components.FCol
22
22
  FContainer: typeof components.FContainer
23
- FDialog: typeof components.FDialog
23
+ FDialog: typeof components.FDialogComponent
24
24
  FDivider: typeof components.FDivider
25
25
  FDropdown: typeof components.FDropdown
26
26
  FEditor: typeof components.FEditor
@@ -55,6 +55,9 @@ declare module '@vue/runtime-core' {
55
55
  FMask: typeof components.FMask
56
56
  FMarquee: typeof components.FMarquee
57
57
  FSteps: typeof components.FSteps
58
+ FMessage: typeof components.FMessageComponent
59
+ FNotification: typeof components.FNotificationComponent
60
+ FResult: typeof components.FResult
58
61
  }
59
62
  }
60
63
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fantasia-ui",
3
3
  "private": false,
4
- "version": "0.2.48",
4
+ "version": "0.2.49",
5
5
  "type": "module",
6
6
  "main": "dist/fantasia-ui.umd.js",
7
7
  "module": "dist/fantasia-ui.es.js",
@@ -77,6 +77,9 @@
77
77
  "vite-plugin-dts": "^4.5.4",
78
78
  "vitest": "^4.1.8",
79
79
  "vue": "^3.5.13",
80
- "vue-tsc": "^2.2.8"
80
+ "vue-tsc": "^2.2.8",
81
+ "vue-docgen-api": "^4.79.2",
82
+ "@vue/compiler-sfc": "^3.5.42",
83
+ "glob": "^8.1.0"
81
84
  }
82
85
  }