@deskhero/dh_ui 1.53.3 → 1.54.1

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/dh_ui.es.js CHANGED
@@ -23891,6 +23891,11 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
23891
23891
  type: Boolean,
23892
23892
  required: false,
23893
23893
  default: false
23894
+ },
23895
+ icon: {
23896
+ type: String,
23897
+ required: false,
23898
+ default: ""
23894
23899
  }
23895
23900
  },
23896
23901
  setup(__props) {
@@ -23913,6 +23918,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
23913
23918
  const isSuccess = computed(() => {
23914
23919
  return props.color === "success";
23915
23920
  });
23921
+ const isGhost = computed(() => {
23922
+ return props.color === "ghost";
23923
+ });
23916
23924
  return (_ctx, _cache) => {
23917
23925
  return openBlock(), createElementBlock("button", {
23918
23926
  class: normalizeClass({
@@ -23921,25 +23929,33 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
23921
23929
  "dh-btn-secondary": unref(isSecondary),
23922
23930
  "dh-btn-danger": unref(isDanger),
23923
23931
  "dh-btn-success": unref(isSuccess),
23932
+ "dh-btn-ghost": unref(isGhost),
23924
23933
  "dh-btn-large": unref(isLarge),
23925
23934
  "dh-btn-small": unref(isSmall),
23935
+ "dh-btn-icon": __props.icon,
23926
23936
  disabled: __props.disabled
23927
23937
  }),
23928
23938
  disabled: __props.disabled || __props.loading
23929
23939
  }, [
23930
- __props.loading && !__props.disabled ? (openBlock(), createBlock(DhIcon, {
23940
+ __props.loading ? (openBlock(), createBlock(DhIcon, {
23931
23941
  key: 0,
23932
23942
  class: normalizeClass({
23933
23943
  "loading-spinner": true,
23934
23944
  "loading-spinner-danger": unref(isDanger),
23935
23945
  "loading-spinner-success": unref(isSuccess),
23936
- "loading-spinner-secondary": unref(isSecondary)
23946
+ "loading-spinner-secondary": unref(isSecondary) || unref(isGhost)
23937
23947
  }),
23938
23948
  iconName: "loader"
23939
- }, null, 8, ["class"])) : (openBlock(), createElementBlock("div", _hoisted_2$l, [
23949
+ }, null, 8, ["class"])) : createCommentVNode("", true),
23950
+ !__props.loading ? (openBlock(), createElementBlock("div", _hoisted_2$l, [
23940
23951
  renderSlot(_ctx.$slots, "prepend-icon", {}, void 0, true)
23941
- ])),
23942
- renderSlot(_ctx.$slots, "default", {}, void 0, true),
23952
+ ])) : createCommentVNode("", true),
23953
+ !__props.icon ? renderSlot(_ctx.$slots, "default", { key: 2 }, void 0, true) : createCommentVNode("", true),
23954
+ __props.icon && !__props.loading ? (openBlock(), createBlock(DhIcon, {
23955
+ key: 3,
23956
+ "icon-name": __props.icon,
23957
+ size: 24
23958
+ }, null, 8, ["icon-name"])) : createCommentVNode("", true),
23943
23959
  createElementVNode("div", _hoisted_3$c, [
23944
23960
  renderSlot(_ctx.$slots, "append-icon", {}, void 0, true)
23945
23961
  ])
@@ -23947,7 +23963,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
23947
23963
  };
23948
23964
  }
23949
23965
  });
23950
- var DhButton = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-3b917caa"]]);
23966
+ var DhButton = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-1ec95209"]]);
23951
23967
  const _sfc_main$l = defineComponent({
23952
23968
  props: {
23953
23969
  target: { type: String, required: true },
@@ -24217,7 +24233,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
24217
24233
  };
24218
24234
  }
24219
24235
  });
24220
- var DhDropdownMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-3a3f37c0"]]);
24236
+ var DhDropdownMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-5820c7e5"]]);
24221
24237
  var DropdownMenu_vue_vue_type_style_index_0_scoped_true_lang = "";
24222
24238
  const _hoisted_1$h = ["data-e2e", "onClick"];
24223
24239
  const _hoisted_2$g = {
@@ -24321,7 +24337,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
24321
24337
  };
24322
24338
  }
24323
24339
  });
24324
- var DropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-50b04dea"]]);
24340
+ var DropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-33982b87"]]);
24325
24341
  var Error_vue_vue_type_style_index_0_lang = "";
24326
24342
  const _hoisted_1$g = {
24327
24343
  key: 0,