cleek 1.8.9 → 2.0.0
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
|
@@ -11306,7 +11306,9 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11306
11306
|
], 10, _hoisted_1$g);
|
|
11307
11307
|
}
|
|
11308
11308
|
var ckButton_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11309
|
-
const
|
|
11309
|
+
const defaultType = "outlined";
|
|
11310
|
+
const defaultColor = "primary";
|
|
11311
|
+
const defaultAlign = "left";
|
|
11310
11312
|
const _sfc_main$i = {
|
|
11311
11313
|
name: "CkButton",
|
|
11312
11314
|
components: {
|
|
@@ -11314,9 +11316,10 @@ const _sfc_main$i = {
|
|
|
11314
11316
|
},
|
|
11315
11317
|
props: {
|
|
11316
11318
|
title: { type: String, default: void 0 },
|
|
11317
|
-
type: { type: String, default: defaults.type, validator: validators.buttonType },
|
|
11318
|
-
color: { type: String, default: "" },
|
|
11319
11319
|
disabled: { type: Boolean, default: false },
|
|
11320
|
+
type: { type: String, default: defaultType, validator: validators.buttonType },
|
|
11321
|
+
color: { type: String, default: defaultColor },
|
|
11322
|
+
align: { type: String, default: defaultAlign, validator: validators.align },
|
|
11320
11323
|
icon: { type: [String, Array], default: void 0 },
|
|
11321
11324
|
iconPack: { type: String, default: void 0 },
|
|
11322
11325
|
iconRight: { type: String, default: void 0 },
|
|
@@ -11331,13 +11334,16 @@ const _sfc_main$i = {
|
|
|
11331
11334
|
computedClass() {
|
|
11332
11335
|
const classList2 = [];
|
|
11333
11336
|
classList2.push(functions$1.getGroupClass(this));
|
|
11334
|
-
if (this.color) {
|
|
11337
|
+
if (this.color !== defaultColor) {
|
|
11335
11338
|
if (this.type === "filled") {
|
|
11336
11339
|
classList2.push(`ck-component__bg-color--${this.color}`);
|
|
11337
11340
|
} else {
|
|
11338
11341
|
classList2.push(`ck-component__border-color--${this.color}`);
|
|
11339
11342
|
}
|
|
11340
11343
|
}
|
|
11344
|
+
if (this.align !== defaultAlign) {
|
|
11345
|
+
classList2.push(`ck-button__align--${this.align}`);
|
|
11346
|
+
}
|
|
11341
11347
|
if (!this.$slots.default) {
|
|
11342
11348
|
if (this.icon || this.iconRight) {
|
|
11343
11349
|
if (!(this.icon && this.iconRight))
|
|
@@ -11346,7 +11352,7 @@ const _sfc_main$i = {
|
|
|
11346
11352
|
}
|
|
11347
11353
|
let type = this.type;
|
|
11348
11354
|
if (!validators.buttonType(this.type))
|
|
11349
|
-
type =
|
|
11355
|
+
type = defaultType;
|
|
11350
11356
|
classList2.push(`type-${type}`);
|
|
11351
11357
|
return classList2;
|
|
11352
11358
|
}
|
|
@@ -11357,8 +11363,8 @@ const _sfc_main$i = {
|
|
|
11357
11363
|
}
|
|
11358
11364
|
}
|
|
11359
11365
|
};
|
|
11360
|
-
var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", render$d], ["__scopeId", "data-v-
|
|
11361
|
-
const _withScopeId$2 = (n) => (pushScopeId("data-v-
|
|
11366
|
+
var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", render$d], ["__scopeId", "data-v-a687842a"]]);
|
|
11367
|
+
const _withScopeId$2 = (n) => (pushScopeId("data-v-69dfa524"), n = n(), popScopeId(), n);
|
|
11362
11368
|
const _hoisted_1$f = ["disabled", "checked"];
|
|
11363
11369
|
const _hoisted_2$7 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-checkbox__element" }, null, -1));
|
|
11364
11370
|
const _hoisted_3$5 = {
|
|
@@ -11425,7 +11431,7 @@ const _sfc_main$h = {
|
|
|
11425
11431
|
}
|
|
11426
11432
|
}
|
|
11427
11433
|
};
|
|
11428
|
-
var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", render$c], ["__scopeId", "data-v-
|
|
11434
|
+
var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", render$c], ["__scopeId", "data-v-69dfa524"]]);
|
|
11429
11435
|
const _hoisted_1$e = ["src"];
|
|
11430
11436
|
function render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11431
11437
|
return openBlock(), createElementBlock("div", {
|
|
@@ -11526,7 +11532,7 @@ const _sfc_main$g = {
|
|
|
11526
11532
|
}
|
|
11527
11533
|
}
|
|
11528
11534
|
};
|
|
11529
|
-
var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", render$b], ["__scopeId", "data-v-
|
|
11535
|
+
var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", render$b], ["__scopeId", "data-v-d2638d3c"]]);
|
|
11530
11536
|
const _hoisted_1$d = ["for"];
|
|
11531
11537
|
function render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11532
11538
|
return openBlock(), createElementBlock("label", {
|
|
@@ -11662,7 +11668,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11662
11668
|
};
|
|
11663
11669
|
}
|
|
11664
11670
|
});
|
|
11665
|
-
var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
11671
|
+
var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-61fababc"]]);
|
|
11666
11672
|
var ckPopup_vue_vue_type_style_index_0_lang = "";
|
|
11667
11673
|
const _hoisted_1$b = {
|
|
11668
11674
|
key: 0,
|
|
@@ -11980,6 +11986,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
11980
11986
|
return props.modelValue === null;
|
|
11981
11987
|
}
|
|
11982
11988
|
});
|
|
11989
|
+
function onClick(event) {
|
|
11990
|
+
emits("click", event);
|
|
11991
|
+
}
|
|
11992
|
+
const onChange = (event) => {
|
|
11993
|
+
emits("change", event);
|
|
11994
|
+
};
|
|
11983
11995
|
const getOptionKey = (option) => {
|
|
11984
11996
|
return realReduceFunction(option);
|
|
11985
11997
|
};
|
|
@@ -12010,7 +12022,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
12010
12022
|
}, 8, ["align"])) : createCommentVNode("", true),
|
|
12011
12023
|
withDirectives(createElementVNode("select", {
|
|
12012
12024
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(value) ? value.value = $event : null),
|
|
12013
|
-
class: normalizeClass(unref(computedClass))
|
|
12025
|
+
class: normalizeClass(unref(computedClass)),
|
|
12026
|
+
onClick: _cache[1] || (_cache[1] = ($event) => onClick($event)),
|
|
12027
|
+
onChange: _cache[2] || (_cache[2] = ($event) => onChange($event))
|
|
12014
12028
|
}, [
|
|
12015
12029
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredOptions), (option) => {
|
|
12016
12030
|
return openBlock(), createElementBlock("option", {
|
|
@@ -12018,15 +12032,15 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
12018
12032
|
key: option
|
|
12019
12033
|
}, toDisplayString(getOptionName(option)), 9, _hoisted_1$9);
|
|
12020
12034
|
}), 128))
|
|
12021
|
-
],
|
|
12035
|
+
], 34), [
|
|
12022
12036
|
[vModelSelect, unref(value)]
|
|
12023
12037
|
])
|
|
12024
12038
|
], 4);
|
|
12025
12039
|
};
|
|
12026
12040
|
}
|
|
12027
12041
|
});
|
|
12028
|
-
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
12029
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
12042
|
+
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-02fab5ba"]]);
|
|
12043
|
+
const _withScopeId = (n) => (pushScopeId("data-v-022b9f3c"), n = n(), popScopeId(), n);
|
|
12030
12044
|
const _hoisted_1$8 = ["disabled"];
|
|
12031
12045
|
const _hoisted_2$3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
|
|
12032
12046
|
const _hoisted_3$2 = {
|
|
@@ -12099,7 +12113,7 @@ const _sfc_main$a = {
|
|
|
12099
12113
|
}
|
|
12100
12114
|
}
|
|
12101
12115
|
};
|
|
12102
|
-
var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", render$8], ["__scopeId", "data-v-
|
|
12116
|
+
var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", render$8], ["__scopeId", "data-v-022b9f3c"]]);
|
|
12103
12117
|
const _hoisted_1$7 = { class: "ck-switch-options__container-exterior" };
|
|
12104
12118
|
const _hoisted_2$2 = ["onClick"];
|
|
12105
12119
|
function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -12177,7 +12191,7 @@ const _sfc_main$9 = {
|
|
|
12177
12191
|
}
|
|
12178
12192
|
}
|
|
12179
12193
|
};
|
|
12180
|
-
var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", render$7], ["__scopeId", "data-v-
|
|
12194
|
+
var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", render$7], ["__scopeId", "data-v-f0c51430"]]);
|
|
12181
12195
|
const _hoisted_1$6 = { class: "ck-tr" };
|
|
12182
12196
|
function render$6(_ctx, _cache) {
|
|
12183
12197
|
return openBlock(), createElementBlock("tr", _hoisted_1$6, [
|
|
@@ -12315,7 +12329,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
12315
12329
|
};
|
|
12316
12330
|
}
|
|
12317
12331
|
});
|
|
12318
|
-
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
12332
|
+
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-5c48aabc"]]);
|
|
12319
12333
|
var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12320
12334
|
const _hoisted_1$3 = { class: "ck-table__pagination" };
|
|
12321
12335
|
const _hoisted_2$1 = ["onClick"];
|
|
@@ -12443,7 +12457,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12443
12457
|
};
|
|
12444
12458
|
}
|
|
12445
12459
|
}));
|
|
12446
|
-
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
12460
|
+
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-7ad6042e"]]);
|
|
12447
12461
|
var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12448
12462
|
const _hoisted_1$2 = { class: "ck-table" };
|
|
12449
12463
|
const _hoisted_2 = {
|
|
@@ -12639,7 +12653,7 @@ const _sfc_main$1 = {
|
|
|
12639
12653
|
}
|
|
12640
12654
|
}
|
|
12641
12655
|
};
|
|
12642
|
-
var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", render$2], ["__scopeId", "data-v-
|
|
12656
|
+
var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", render$2], ["__scopeId", "data-v-ec889100"]]);
|
|
12643
12657
|
var top = "top";
|
|
12644
12658
|
var bottom = "bottom";
|
|
12645
12659
|
var right = "right";
|
|
@@ -15260,8 +15274,30 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
15260
15274
|
lockScroll,
|
|
15261
15275
|
unlockScroll
|
|
15262
15276
|
});
|
|
15277
|
+
function setDefaultColors(options) {
|
|
15278
|
+
var r = document.querySelector(":root");
|
|
15279
|
+
const colorList = [
|
|
15280
|
+
"primary",
|
|
15281
|
+
"secondary",
|
|
15282
|
+
"primary",
|
|
15283
|
+
"secondary",
|
|
15284
|
+
"success",
|
|
15285
|
+
"warning",
|
|
15286
|
+
"danger",
|
|
15287
|
+
"dark",
|
|
15288
|
+
"light"
|
|
15289
|
+
];
|
|
15290
|
+
if (options.colors) {
|
|
15291
|
+
colorList.forEach((colorName) => {
|
|
15292
|
+
const colorValue = options.colors[colorName];
|
|
15293
|
+
if (colorValue)
|
|
15294
|
+
r.style.setProperty(`--${colorName}`, colorValue);
|
|
15295
|
+
});
|
|
15296
|
+
}
|
|
15297
|
+
}
|
|
15263
15298
|
const install = function installCleek(app, options) {
|
|
15264
15299
|
console.log("arranco paquete", options);
|
|
15300
|
+
setDefaultColors(options);
|
|
15265
15301
|
Object.entries(components).forEach(([componentName, component]) => {
|
|
15266
15302
|
app.component(componentName, component);
|
|
15267
15303
|
});
|