cleek 2.4.4 → 2.4.5
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 +69 -22
- 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
|
/*!
|
|
@@ -18802,6 +18808,18 @@ var functions = {
|
|
|
18802
18808
|
classList2.push(`ck-component__group-vertical--${groupVertical}`);
|
|
18803
18809
|
return classList2;
|
|
18804
18810
|
},
|
|
18811
|
+
getRoundedValue(propIsRounded, cleekOptions2) {
|
|
18812
|
+
var _a, _b;
|
|
18813
|
+
if (typeof propIsRounded !== "undefined")
|
|
18814
|
+
return propIsRounded;
|
|
18815
|
+
if (typeof ((_a = cleekOptions2 == null ? void 0 : cleekOptions2.styles) == null ? void 0 : _a.rounded) !== "undefined") {
|
|
18816
|
+
return cleekOptions2.styles.rounded;
|
|
18817
|
+
}
|
|
18818
|
+
if (typeof ((_b = cleekOptions2 == null ? void 0 : cleekOptions2.button) == null ? void 0 : _b.rounded) !== "undefined") {
|
|
18819
|
+
return cleekOptions2.button.rounded;
|
|
18820
|
+
}
|
|
18821
|
+
return false;
|
|
18822
|
+
},
|
|
18805
18823
|
getWidthByWidthBreaks(widthBreaks, windowWidth) {
|
|
18806
18824
|
if (widthBreaks) {
|
|
18807
18825
|
let realWidthBreaks = [...widthBreaks];
|
|
@@ -20882,15 +20900,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
20882
20900
|
const defaultButtonType = "outlined";
|
|
20883
20901
|
const defaultColor = "primary";
|
|
20884
20902
|
const defaultAlign = "left";
|
|
20885
|
-
let
|
|
20886
|
-
const isMounted = ref(false);
|
|
20903
|
+
let cleekOptions2;
|
|
20887
20904
|
const realButtonType = computed$2(() => {
|
|
20888
20905
|
if (props.type)
|
|
20889
20906
|
return props.type;
|
|
20890
|
-
if (
|
|
20891
|
-
|
|
20892
|
-
return $cleekOptions.button.type;
|
|
20893
|
-
}
|
|
20907
|
+
if (cleekOptions2)
|
|
20908
|
+
return cleekOptions2.button.type;
|
|
20894
20909
|
return defaultButtonType;
|
|
20895
20910
|
});
|
|
20896
20911
|
const computedClass = computed$2(() => {
|
|
@@ -20908,9 +20923,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
20908
20923
|
if (align === "center" || align === "right") {
|
|
20909
20924
|
list.push(`ck-button__align--${props.align}`);
|
|
20910
20925
|
}
|
|
20911
|
-
if (props.rounded)
|
|
20912
|
-
console.log("rounded");
|
|
20913
|
-
if (props.rounded)
|
|
20926
|
+
if (functions.getRoundedValue(props.rounded, cleekOptions2))
|
|
20914
20927
|
list.push("rounded");
|
|
20915
20928
|
list.push(`type-${realButtonType.value}`);
|
|
20916
20929
|
if (props.size)
|
|
@@ -20935,8 +20948,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
20935
20948
|
emits("click", event);
|
|
20936
20949
|
}
|
|
20937
20950
|
onMounted(() => {
|
|
20938
|
-
|
|
20939
|
-
isMounted.value = true;
|
|
20951
|
+
cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
|
|
20940
20952
|
});
|
|
20941
20953
|
functions.preventUnusedError([
|
|
20942
20954
|
onClick2,
|
|
@@ -20970,7 +20982,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
20970
20982
|
};
|
|
20971
20983
|
}
|
|
20972
20984
|
});
|
|
20973
|
-
var CkButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-
|
|
20985
|
+
var CkButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-39c8f698"]]);
|
|
20974
20986
|
var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
20975
20987
|
const _hoisted_1$h = ["for"];
|
|
20976
20988
|
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
@@ -21024,6 +21036,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21024
21036
|
width: null,
|
|
21025
21037
|
align: null,
|
|
21026
21038
|
rounded: { type: Boolean },
|
|
21039
|
+
borderColor: null,
|
|
21027
21040
|
autoSelect: { type: Boolean },
|
|
21028
21041
|
delayChangeTime: null
|
|
21029
21042
|
},
|
|
@@ -21031,6 +21044,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21031
21044
|
setup(__props, { expose, emit: emits }) {
|
|
21032
21045
|
const props = __props;
|
|
21033
21046
|
expose({ setFocus, setSelect });
|
|
21047
|
+
let cleekOptions2;
|
|
21034
21048
|
const defaultType = "text";
|
|
21035
21049
|
const defaultDelayChangeTime = 300;
|
|
21036
21050
|
const realInput = ref(null);
|
|
@@ -21074,10 +21088,20 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21074
21088
|
list.push(`align--${props.align}`);
|
|
21075
21089
|
if (props.hideBorder)
|
|
21076
21090
|
list.push("no-border");
|
|
21077
|
-
if (props.rounded)
|
|
21091
|
+
if (functions.getRoundedValue(props.rounded, cleekOptions2))
|
|
21078
21092
|
list.push("rounded");
|
|
21079
21093
|
if (props.size)
|
|
21080
21094
|
list.push(`ck-input-size__${props.size}`);
|
|
21095
|
+
if (props.borderColor && functions.isColorTemplateVariable(props.borderColor)) {
|
|
21096
|
+
list.push(`ck-input--border-color__${props.borderColor}`);
|
|
21097
|
+
}
|
|
21098
|
+
return list;
|
|
21099
|
+
});
|
|
21100
|
+
const computedStyleInput = computed$2(() => {
|
|
21101
|
+
const list = [];
|
|
21102
|
+
if (props.borderColor && !functions.isColorTemplateVariable(props.borderColor)) {
|
|
21103
|
+
list.push({ "border-color": props.borderColor });
|
|
21104
|
+
}
|
|
21081
21105
|
return list;
|
|
21082
21106
|
});
|
|
21083
21107
|
const computedStyle = computed$2(() => {
|
|
@@ -21114,6 +21138,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21114
21138
|
onInput,
|
|
21115
21139
|
onClick2
|
|
21116
21140
|
]);
|
|
21141
|
+
onMounted(() => {
|
|
21142
|
+
cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
|
|
21143
|
+
});
|
|
21117
21144
|
return (_ctx, _cache) => {
|
|
21118
21145
|
return openBlock(), createElementBlock("div", {
|
|
21119
21146
|
class: "ck-input",
|
|
@@ -21145,11 +21172,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21145
21172
|
type: __props.type || defaultType,
|
|
21146
21173
|
placeholder: __props.placeholder,
|
|
21147
21174
|
class: normalizeClass(unref$1(computedClassInput)),
|
|
21175
|
+
style: normalizeStyle(unref$1(computedStyleInput)),
|
|
21148
21176
|
disabled: __props.disabled,
|
|
21149
21177
|
onChange: _cache[1] || (_cache[1] = ($event) => onChange2($event)),
|
|
21150
21178
|
onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
|
|
21151
21179
|
onClick: _cache[3] || (_cache[3] = ($event) => onClick2($event))
|
|
21152
|
-
}, null,
|
|
21180
|
+
}, null, 46, _hoisted_1$g), [
|
|
21153
21181
|
[vModelDynamic, unref$1(value)]
|
|
21154
21182
|
]),
|
|
21155
21183
|
__props.iconRight ? (openBlock(), createBlock(CkIcon, {
|
|
@@ -21163,7 +21191,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21163
21191
|
};
|
|
21164
21192
|
}
|
|
21165
21193
|
});
|
|
21166
|
-
var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-
|
|
21194
|
+
var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-076ee92e"]]);
|
|
21167
21195
|
var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
21168
21196
|
const _hoisted_1$f = { class: "ck-table__header-items" };
|
|
21169
21197
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
@@ -22419,7 +22447,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
22419
22447
|
};
|
|
22420
22448
|
}
|
|
22421
22449
|
});
|
|
22422
|
-
var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
22450
|
+
var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-31e8c81c"]]);
|
|
22423
22451
|
var ckTable_vue_vue_type_style_index_0_lang = "";
|
|
22424
22452
|
var ckTable_vue_vue_type_style_index_1_scoped_true_lang = "";
|
|
22425
22453
|
const _hoisted_1$a = { class: "ck-table" };
|
|
@@ -22915,6 +22943,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
22915
22943
|
searchable: { type: [Boolean, String] },
|
|
22916
22944
|
minWidth: null,
|
|
22917
22945
|
noBorder: { type: Boolean },
|
|
22946
|
+
rounded: { type: Boolean },
|
|
22947
|
+
borderColor: null,
|
|
22918
22948
|
bgTransparent: { type: Boolean },
|
|
22919
22949
|
disabled: { type: Boolean },
|
|
22920
22950
|
group: null,
|
|
@@ -22926,6 +22956,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
22926
22956
|
emits: ["update:modelValue", "click", "change"],
|
|
22927
22957
|
setup(__props, { expose, emit: emits }) {
|
|
22928
22958
|
const props = __props;
|
|
22959
|
+
let cleekOptions2;
|
|
22929
22960
|
expose({
|
|
22930
22961
|
setFocus
|
|
22931
22962
|
});
|
|
@@ -22963,8 +22994,20 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
22963
22994
|
const computedClassSelect = computed$2(() => {
|
|
22964
22995
|
const list = [];
|
|
22965
22996
|
list.push(functions.getGroupClass(props, windowWidth.value));
|
|
22997
|
+
if (functions.getRoundedValue(props.rounded, cleekOptions2))
|
|
22998
|
+
list.push("rounded");
|
|
22966
22999
|
if (isClearBtnVisible.value)
|
|
22967
23000
|
list.push("clear-able");
|
|
23001
|
+
if (props.borderColor && functions.isColorTemplateVariable(props.borderColor)) {
|
|
23002
|
+
list.push(`ck-input--border-color__${props.borderColor}`);
|
|
23003
|
+
}
|
|
23004
|
+
return list;
|
|
23005
|
+
});
|
|
23006
|
+
const computedStyleSelect = computed$2(() => {
|
|
23007
|
+
const list = [];
|
|
23008
|
+
if (props.borderColor && !functions.isColorTemplateVariable(props.borderColor)) {
|
|
23009
|
+
list.push({ "border-color": props.borderColor });
|
|
23010
|
+
}
|
|
22968
23011
|
return list;
|
|
22969
23012
|
});
|
|
22970
23013
|
const computedStyle = computed$2(() => {
|
|
@@ -23045,6 +23088,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
23045
23088
|
}
|
|
23046
23089
|
function setFocus() {
|
|
23047
23090
|
}
|
|
23091
|
+
onMounted(() => {
|
|
23092
|
+
cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
|
|
23093
|
+
});
|
|
23048
23094
|
functions.preventUnusedError([
|
|
23049
23095
|
computedStyle,
|
|
23050
23096
|
computedClassSelect,
|
|
@@ -23078,6 +23124,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
23078
23124
|
withDirectives(createElementVNode("select", {
|
|
23079
23125
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(value) ? value.value = $event : null),
|
|
23080
23126
|
class: normalizeClass(unref$1(computedClassSelect)),
|
|
23127
|
+
style: normalizeStyle(unref$1(computedStyleSelect)),
|
|
23081
23128
|
disabled: __props.disabled,
|
|
23082
23129
|
onClick: _cache[2] || (_cache[2] = ($event) => onClick2($event)),
|
|
23083
23130
|
onChange: _cache[3] || (_cache[3] = ($event) => onChange2($event))
|
|
@@ -23088,14 +23135,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
23088
23135
|
key: option
|
|
23089
23136
|
}, toDisplayString(getOptionName(option)), 9, _hoisted_2$4);
|
|
23090
23137
|
}), 128))
|
|
23091
|
-
],
|
|
23138
|
+
], 46, _hoisted_1$6), [
|
|
23092
23139
|
[vModelSelect, unref$1(value)]
|
|
23093
23140
|
])
|
|
23094
23141
|
], 4);
|
|
23095
23142
|
};
|
|
23096
23143
|
}
|
|
23097
23144
|
});
|
|
23098
|
-
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
23145
|
+
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-1a65447e"]]);
|
|
23099
23146
|
var ckSidebar_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
23100
23147
|
const _hoisted_1$5 = {
|
|
23101
23148
|
key: 1,
|
|
@@ -23588,8 +23635,8 @@ function setRootColors(colors) {
|
|
|
23588
23635
|
}
|
|
23589
23636
|
}
|
|
23590
23637
|
function getCleekOptions(userOptions) {
|
|
23591
|
-
const options =
|
|
23592
|
-
for (const category in
|
|
23638
|
+
const options = cleekOptions;
|
|
23639
|
+
for (const category in cleekOptions) {
|
|
23593
23640
|
if (userOptions[category]) {
|
|
23594
23641
|
for (const key in userOptions[category]) {
|
|
23595
23642
|
const value = userOptions[category][key];
|