cleek 2.4.3 → 2.4.6
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 +99 -29
- package/dist/cleek.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/cleek.es.js
CHANGED
|
@@ -2889,16 +2889,22 @@ const plugin = {
|
|
|
2889
2889
|
install: install$1,
|
|
2890
2890
|
options: config$2
|
|
2891
2891
|
};
|
|
2892
|
-
|
|
2892
|
+
const cleekOptions = {
|
|
2893
2893
|
colors: {
|
|
2894
2894
|
primary: "#559933",
|
|
2895
2895
|
secondary: "#559933"
|
|
2896
2896
|
},
|
|
2897
2897
|
button: {
|
|
2898
|
-
type: "outlined"
|
|
2898
|
+
type: "outlined",
|
|
2899
|
+
rounded: false
|
|
2899
2900
|
},
|
|
2900
2901
|
img: {
|
|
2901
2902
|
basePath: ""
|
|
2903
|
+
},
|
|
2904
|
+
styles: {
|
|
2905
|
+
type: "outlined",
|
|
2906
|
+
rounded: false,
|
|
2907
|
+
borderColor: "#dae1e7"
|
|
2902
2908
|
}
|
|
2903
2909
|
};
|
|
2904
2910
|
/*!
|
|
@@ -18786,6 +18792,15 @@ var ckTr_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
|
18786
18792
|
const _sfc_main$o = {};
|
|
18787
18793
|
var CkTr = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", render2], ["__scopeId", "data-v-519cf874"]]);
|
|
18788
18794
|
var functions = {
|
|
18795
|
+
getBorderColorValue(propBorderColor, cleekOptions2) {
|
|
18796
|
+
var _a;
|
|
18797
|
+
if (typeof propBorderColor !== "undefined")
|
|
18798
|
+
return propBorderColor;
|
|
18799
|
+
if (typeof ((_a = cleekOptions2 == null ? void 0 : cleekOptions2.styles) == null ? void 0 : _a.borderColor) !== "undefined") {
|
|
18800
|
+
return cleekOptions2.styles.borderColor;
|
|
18801
|
+
}
|
|
18802
|
+
return "";
|
|
18803
|
+
},
|
|
18789
18804
|
getCleekOptions(getCurrentInstance2) {
|
|
18790
18805
|
return getCurrentInstance2().appContext.app.config.globalProperties.$cleekOptions;
|
|
18791
18806
|
},
|
|
@@ -18802,6 +18817,15 @@ var functions = {
|
|
|
18802
18817
|
classList2.push(`ck-component__group-vertical--${groupVertical}`);
|
|
18803
18818
|
return classList2;
|
|
18804
18819
|
},
|
|
18820
|
+
getRoundedValue(propIsRounded, cleekOptions2) {
|
|
18821
|
+
var _a;
|
|
18822
|
+
if (typeof propIsRounded !== "undefined")
|
|
18823
|
+
return propIsRounded;
|
|
18824
|
+
if (typeof ((_a = cleekOptions2 == null ? void 0 : cleekOptions2.styles) == null ? void 0 : _a.rounded) !== "undefined") {
|
|
18825
|
+
return cleekOptions2.styles.rounded;
|
|
18826
|
+
}
|
|
18827
|
+
return false;
|
|
18828
|
+
},
|
|
18805
18829
|
getWidthByWidthBreaks(widthBreaks, windowWidth) {
|
|
18806
18830
|
if (widthBreaks) {
|
|
18807
18831
|
let realWidthBreaks = [...widthBreaks];
|
|
@@ -20882,15 +20906,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
20882
20906
|
const defaultButtonType = "outlined";
|
|
20883
20907
|
const defaultColor = "primary";
|
|
20884
20908
|
const defaultAlign = "left";
|
|
20885
|
-
let
|
|
20886
|
-
const isMounted = ref(false);
|
|
20909
|
+
let cleekOptions2;
|
|
20887
20910
|
const realButtonType = computed$2(() => {
|
|
20888
20911
|
if (props.type)
|
|
20889
20912
|
return props.type;
|
|
20890
|
-
if (
|
|
20891
|
-
|
|
20892
|
-
return $cleekOptions.button.type;
|
|
20893
|
-
}
|
|
20913
|
+
if (cleekOptions2)
|
|
20914
|
+
return cleekOptions2.button.type;
|
|
20894
20915
|
return defaultButtonType;
|
|
20895
20916
|
});
|
|
20896
20917
|
const computedClass = computed$2(() => {
|
|
@@ -20908,9 +20929,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
20908
20929
|
if (align === "center" || align === "right") {
|
|
20909
20930
|
list.push(`ck-button__align--${props.align}`);
|
|
20910
20931
|
}
|
|
20911
|
-
if (props.rounded)
|
|
20912
|
-
console.log("rounded");
|
|
20913
|
-
if (props.rounded)
|
|
20932
|
+
if (functions.getRoundedValue(props.rounded, cleekOptions2))
|
|
20914
20933
|
list.push("rounded");
|
|
20915
20934
|
list.push(`type-${realButtonType.value}`);
|
|
20916
20935
|
if (props.size)
|
|
@@ -20935,8 +20954,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
20935
20954
|
emits("click", event);
|
|
20936
20955
|
}
|
|
20937
20956
|
onMounted(() => {
|
|
20938
|
-
|
|
20939
|
-
isMounted.value = true;
|
|
20957
|
+
cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
|
|
20940
20958
|
});
|
|
20941
20959
|
functions.preventUnusedError([
|
|
20942
20960
|
onClick2,
|
|
@@ -20970,7 +20988,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
20970
20988
|
};
|
|
20971
20989
|
}
|
|
20972
20990
|
});
|
|
20973
|
-
var CkButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-
|
|
20991
|
+
var CkButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-39c8f698"]]);
|
|
20974
20992
|
var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
20975
20993
|
const _hoisted_1$h = ["for"];
|
|
20976
20994
|
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
@@ -21024,6 +21042,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21024
21042
|
width: null,
|
|
21025
21043
|
align: null,
|
|
21026
21044
|
rounded: { type: Boolean },
|
|
21045
|
+
borderColor: null,
|
|
21027
21046
|
autoSelect: { type: Boolean },
|
|
21028
21047
|
delayChangeTime: null
|
|
21029
21048
|
},
|
|
@@ -21031,6 +21050,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21031
21050
|
setup(__props, { expose, emit: emits }) {
|
|
21032
21051
|
const props = __props;
|
|
21033
21052
|
expose({ setFocus, setSelect });
|
|
21053
|
+
let cleekOptions2;
|
|
21034
21054
|
const defaultType = "text";
|
|
21035
21055
|
const defaultDelayChangeTime = 300;
|
|
21036
21056
|
const realInput = ref(null);
|
|
@@ -21074,10 +21094,20 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21074
21094
|
list.push(`align--${props.align}`);
|
|
21075
21095
|
if (props.hideBorder)
|
|
21076
21096
|
list.push("no-border");
|
|
21077
|
-
if (props.rounded)
|
|
21097
|
+
if (functions.getRoundedValue(props.rounded, cleekOptions2))
|
|
21078
21098
|
list.push("rounded");
|
|
21079
21099
|
if (props.size)
|
|
21080
21100
|
list.push(`ck-input-size__${props.size}`);
|
|
21101
|
+
if (props.borderColor && functions.isColorTemplateVariable(props.borderColor)) {
|
|
21102
|
+
list.push(`ck-input--border-color__${props.borderColor}`);
|
|
21103
|
+
}
|
|
21104
|
+
return list;
|
|
21105
|
+
});
|
|
21106
|
+
const computedStyleInput = computed$2(() => {
|
|
21107
|
+
const list = [];
|
|
21108
|
+
if (props.borderColor && !functions.isColorTemplateVariable(props.borderColor)) {
|
|
21109
|
+
list.push({ "border-color": props.borderColor });
|
|
21110
|
+
}
|
|
21081
21111
|
return list;
|
|
21082
21112
|
});
|
|
21083
21113
|
const computedStyle = computed$2(() => {
|
|
@@ -21114,6 +21144,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21114
21144
|
onInput,
|
|
21115
21145
|
onClick2
|
|
21116
21146
|
]);
|
|
21147
|
+
onMounted(() => {
|
|
21148
|
+
cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
|
|
21149
|
+
});
|
|
21117
21150
|
return (_ctx, _cache) => {
|
|
21118
21151
|
return openBlock(), createElementBlock("div", {
|
|
21119
21152
|
class: "ck-input",
|
|
@@ -21145,11 +21178,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21145
21178
|
type: __props.type || defaultType,
|
|
21146
21179
|
placeholder: __props.placeholder,
|
|
21147
21180
|
class: normalizeClass(unref$1(computedClassInput)),
|
|
21181
|
+
style: normalizeStyle(unref$1(computedStyleInput)),
|
|
21148
21182
|
disabled: __props.disabled,
|
|
21149
21183
|
onChange: _cache[1] || (_cache[1] = ($event) => onChange2($event)),
|
|
21150
21184
|
onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
|
|
21151
21185
|
onClick: _cache[3] || (_cache[3] = ($event) => onClick2($event))
|
|
21152
|
-
}, null,
|
|
21186
|
+
}, null, 46, _hoisted_1$g), [
|
|
21153
21187
|
[vModelDynamic, unref$1(value)]
|
|
21154
21188
|
]),
|
|
21155
21189
|
__props.iconRight ? (openBlock(), createBlock(CkIcon, {
|
|
@@ -21163,7 +21197,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21163
21197
|
};
|
|
21164
21198
|
}
|
|
21165
21199
|
});
|
|
21166
|
-
var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-
|
|
21200
|
+
var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-076ee92e"]]);
|
|
21167
21201
|
var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
21168
21202
|
const _hoisted_1$f = { class: "ck-table__header-items" };
|
|
21169
21203
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
@@ -22419,7 +22453,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
22419
22453
|
};
|
|
22420
22454
|
}
|
|
22421
22455
|
});
|
|
22422
|
-
var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
22456
|
+
var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-31e8c81c"]]);
|
|
22423
22457
|
var ckTable_vue_vue_type_style_index_0_lang = "";
|
|
22424
22458
|
var ckTable_vue_vue_type_style_index_1_scoped_true_lang = "";
|
|
22425
22459
|
const _hoisted_1$a = { class: "ck-table" };
|
|
@@ -22915,6 +22949,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
22915
22949
|
searchable: { type: [Boolean, String] },
|
|
22916
22950
|
minWidth: null,
|
|
22917
22951
|
noBorder: { type: Boolean },
|
|
22952
|
+
rounded: { type: Boolean },
|
|
22953
|
+
borderColor: null,
|
|
22918
22954
|
bgTransparent: { type: Boolean },
|
|
22919
22955
|
disabled: { type: Boolean },
|
|
22920
22956
|
group: null,
|
|
@@ -22926,6 +22962,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
22926
22962
|
emits: ["update:modelValue", "click", "change"],
|
|
22927
22963
|
setup(__props, { expose, emit: emits }) {
|
|
22928
22964
|
const props = __props;
|
|
22965
|
+
let cleekOptions2;
|
|
22929
22966
|
expose({
|
|
22930
22967
|
setFocus
|
|
22931
22968
|
});
|
|
@@ -22963,8 +23000,25 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
22963
23000
|
const computedClassSelect = computed$2(() => {
|
|
22964
23001
|
const list = [];
|
|
22965
23002
|
list.push(functions.getGroupClass(props, windowWidth.value));
|
|
23003
|
+
if (functions.getRoundedValue(props.rounded, cleekOptions2))
|
|
23004
|
+
list.push("rounded");
|
|
22966
23005
|
if (isClearBtnVisible.value)
|
|
22967
23006
|
list.push("clear-able");
|
|
23007
|
+
const borderColor = functions.getBorderColorValue(props.borderColor, cleekOptions2);
|
|
23008
|
+
if (borderColor && functions.isColorTemplateVariable(borderColor)) {
|
|
23009
|
+
list.push(`ck-input--border-color__${props.borderColor}`);
|
|
23010
|
+
}
|
|
23011
|
+
return list;
|
|
23012
|
+
});
|
|
23013
|
+
const computedStyleSelect = computed$2(() => {
|
|
23014
|
+
const list = [];
|
|
23015
|
+
const borderColor = functions.getBorderColorValue(props.borderColor, cleekOptions2);
|
|
23016
|
+
if (borderColor && functions.isColorTemplateVariable(borderColor)) {
|
|
23017
|
+
list.push(`ck-input--border-color__${props.borderColor}`);
|
|
23018
|
+
}
|
|
23019
|
+
if (props.borderColor && !functions.isColorTemplateVariable(props.borderColor)) {
|
|
23020
|
+
list.push({ "border-color": props.borderColor });
|
|
23021
|
+
}
|
|
22968
23022
|
return list;
|
|
22969
23023
|
});
|
|
22970
23024
|
const computedStyle = computed$2(() => {
|
|
@@ -23045,6 +23099,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
23045
23099
|
}
|
|
23046
23100
|
function setFocus() {
|
|
23047
23101
|
}
|
|
23102
|
+
onMounted(() => {
|
|
23103
|
+
cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
|
|
23104
|
+
});
|
|
23048
23105
|
functions.preventUnusedError([
|
|
23049
23106
|
computedStyle,
|
|
23050
23107
|
computedClassSelect,
|
|
@@ -23078,6 +23135,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
23078
23135
|
withDirectives(createElementVNode("select", {
|
|
23079
23136
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(value) ? value.value = $event : null),
|
|
23080
23137
|
class: normalizeClass(unref$1(computedClassSelect)),
|
|
23138
|
+
style: normalizeStyle(unref$1(computedStyleSelect)),
|
|
23081
23139
|
disabled: __props.disabled,
|
|
23082
23140
|
onClick: _cache[2] || (_cache[2] = ($event) => onClick2($event)),
|
|
23083
23141
|
onChange: _cache[3] || (_cache[3] = ($event) => onChange2($event))
|
|
@@ -23088,14 +23146,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
23088
23146
|
key: option
|
|
23089
23147
|
}, toDisplayString(getOptionName(option)), 9, _hoisted_2$4);
|
|
23090
23148
|
}), 128))
|
|
23091
|
-
],
|
|
23149
|
+
], 46, _hoisted_1$6), [
|
|
23092
23150
|
[vModelSelect, unref$1(value)]
|
|
23093
23151
|
])
|
|
23094
23152
|
], 4);
|
|
23095
23153
|
};
|
|
23096
23154
|
}
|
|
23097
23155
|
});
|
|
23098
|
-
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
23156
|
+
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-67207918"]]);
|
|
23099
23157
|
var ckSidebar_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
23100
23158
|
const _hoisted_1$5 = {
|
|
23101
23159
|
key: 1,
|
|
@@ -23459,10 +23517,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23459
23517
|
const title = ref("");
|
|
23460
23518
|
const text2 = ref("");
|
|
23461
23519
|
const color = ref("");
|
|
23520
|
+
const duration = ref(0);
|
|
23521
|
+
const closeCallback = ref(() => {
|
|
23522
|
+
});
|
|
23462
23523
|
expose({
|
|
23463
23524
|
title,
|
|
23464
23525
|
text: text2,
|
|
23465
|
-
color
|
|
23526
|
+
color,
|
|
23527
|
+
duration,
|
|
23528
|
+
closeCallback
|
|
23529
|
+
});
|
|
23530
|
+
onMounted(() => {
|
|
23531
|
+
setTimeout(() => {
|
|
23532
|
+
closeCallback.value();
|
|
23533
|
+
}, duration.value);
|
|
23466
23534
|
});
|
|
23467
23535
|
return (_ctx, _cache) => {
|
|
23468
23536
|
return isActive.value ? (openBlock(), createBlock(Teleport, {
|
|
@@ -23473,7 +23541,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23473
23541
|
createElementVNode("div", {
|
|
23474
23542
|
class: "ck-notify",
|
|
23475
23543
|
style: normalizeStyle({ "background-color": color.value }),
|
|
23476
|
-
onClick: _cache[0] || (_cache[0] = ($event) =>
|
|
23544
|
+
onClick: _cache[0] || (_cache[0] = ($event) => {
|
|
23545
|
+
isActive.value = false;
|
|
23546
|
+
closeCallback.value();
|
|
23547
|
+
})
|
|
23477
23548
|
}, [
|
|
23478
23549
|
createElementVNode("div", _hoisted_2, [
|
|
23479
23550
|
createElementVNode("div", _hoisted_3, [
|
|
@@ -23488,7 +23559,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23488
23559
|
};
|
|
23489
23560
|
}
|
|
23490
23561
|
});
|
|
23491
|
-
var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
23562
|
+
var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-667c806b"]]);
|
|
23492
23563
|
const defaultDuration = 2e3;
|
|
23493
23564
|
var ckNotify = {
|
|
23494
23565
|
confirm({
|
|
@@ -23523,11 +23594,10 @@ var ckNotify = {
|
|
|
23523
23594
|
instance.title = title;
|
|
23524
23595
|
instance.text = text2;
|
|
23525
23596
|
instance.color = color;
|
|
23526
|
-
|
|
23527
|
-
|
|
23528
|
-
console.log("cierro");
|
|
23597
|
+
instance.duration = duration;
|
|
23598
|
+
instance.closeCallback = () => {
|
|
23529
23599
|
instance.$el.remove();
|
|
23530
|
-
}
|
|
23600
|
+
};
|
|
23531
23601
|
},
|
|
23532
23602
|
notifySuccess(text2 = "", title = "\xC9xito") {
|
|
23533
23603
|
this.notify({ text: text2, title, color: "#66CC00" });
|
|
@@ -23576,8 +23646,8 @@ function setRootColors(colors) {
|
|
|
23576
23646
|
}
|
|
23577
23647
|
}
|
|
23578
23648
|
function getCleekOptions(userOptions) {
|
|
23579
|
-
const options =
|
|
23580
|
-
for (const category in
|
|
23649
|
+
const options = cleekOptions;
|
|
23650
|
+
for (const category in cleekOptions) {
|
|
23581
23651
|
if (userOptions[category]) {
|
|
23582
23652
|
for (const key in userOptions[category]) {
|
|
23583
23653
|
const value = userOptions[category][key];
|