cleek 2.4.29 → 2.4.32

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/cleek.es.js CHANGED
@@ -2906,7 +2906,9 @@ const cleekOptions = {
2906
2906
  headerAlign: "",
2907
2907
  headerColor: "",
2908
2908
  acceptBtnType: "",
2909
- cancelBtnType: ""
2909
+ cancelBtnType: "",
2910
+ maxWidth: "",
2911
+ fontSize: ""
2910
2912
  },
2911
2913
  styles: {
2912
2914
  layout: "base",
@@ -22343,7 +22345,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
22343
22345
  layout: null,
22344
22346
  textColor: null,
22345
22347
  headerColor: null,
22346
- headerAlign: null
22348
+ headerAlign: null,
22349
+ fontSize: null
22347
22350
  },
22348
22351
  emits: ["update:modelValue", "cancel", "accept"],
22349
22352
  setup(__props, { emit: emits }) {
@@ -22370,13 +22373,17 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
22370
22373
  return list;
22371
22374
  });
22372
22375
  const computedStyleContent = computed$2(() => {
22373
- var _a;
22376
+ var _a, _b, _c;
22374
22377
  const list = [];
22375
- if (props.maxWidth)
22376
- list.push({ maxWidth: props.maxWidth });
22378
+ const maxWidth = props.maxWidth || ((_a = cleekOptions2.value) == null ? void 0 : _a.popup.maxWidth);
22379
+ if (maxWidth)
22380
+ list.push({ "max-width": maxWidth });
22381
+ const fontSize = props.fontSize || ((_b = cleekOptions2.value) == null ? void 0 : _b.popup.fontSize);
22382
+ if (fontSize)
22383
+ list.push({ "font-size": fontSize });
22377
22384
  if (props.width)
22378
22385
  list.push({ width: props.width });
22379
- const textColor = props.textColor || ((_a = cleekOptions2.value) == null ? void 0 : _a.popup.textColor);
22386
+ const textColor = props.textColor || ((_c = cleekOptions2.value) == null ? void 0 : _c.popup.textColor);
22380
22387
  if (textColor && !hooks8.isColorTemplateVariable(textColor)) {
22381
22388
  list.push(`ck-component__color--${textColor}`);
22382
22389
  list.push({ color: textColor });
@@ -22405,17 +22412,19 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
22405
22412
  return list;
22406
22413
  });
22407
22414
  const realAcceptBtnType = computed$2(() => {
22415
+ var _a, _b;
22408
22416
  if (props.acceptBtnType)
22409
22417
  return props.acceptBtnType;
22410
- if (cleekOptions2.popup.acceptBtnType)
22411
- return cleekOptions2.popup.acceptBtnType;
22418
+ if ((_a = cleekOptions2.value) == null ? void 0 : _a.popup.acceptBtnType)
22419
+ return (_b = cleekOptions2.value) == null ? void 0 : _b.popup.acceptBtnType;
22412
22420
  return "flat";
22413
22421
  });
22414
22422
  const realCancelBtnType = computed$2(() => {
22423
+ var _a, _b;
22415
22424
  if (props.cancelBtnType)
22416
22425
  return props.cancelBtnType;
22417
- if (cleekOptions2.popup.cancelBtnType)
22418
- return cleekOptions2.popup.cancelBtnType;
22426
+ if ((_a = cleekOptions2.value) == null ? void 0 : _a.popup.cancelBtnType)
22427
+ return (_b = cleekOptions2.value) == null ? void 0 : _b.popup.cancelBtnType;
22419
22428
  return "outlined";
22420
22429
  });
22421
22430
  function onCancel() {
@@ -23737,7 +23746,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23737
23746
  var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-667c806b"]]);
23738
23747
  const defaultDuration = 2e3;
23739
23748
  var ckNotify = {
23740
- confirm({
23749
+ confirmOptions({
23741
23750
  title = "\xBFEst\xE1s seguro?",
23742
23751
  msg = "",
23743
23752
  acceptText = "Aceptar",
@@ -23763,6 +23772,13 @@ var ckNotify = {
23763
23772
  };
23764
23773
  document.body.appendChild(instance.$el);
23765
23774
  },
23775
+ confirm(msg, success, failure) {
23776
+ this.confirmOptions({
23777
+ msg,
23778
+ success,
23779
+ failure
23780
+ });
23781
+ },
23766
23782
  notify({ text: text2 = "", title = "", color = "#ccc", duration = defaultDuration }) {
23767
23783
  const tempDiv = document.createElement("div");
23768
23784
  const instance = createApp(CkNotifyComponent).mount(tempDiv);