cleek 1.8.3 → 1.8.7
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-styles/tiny-tailwind/.custom.styl +4 -0
- package/dist/cleek.es.js +149 -175
- package/dist/cleek.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/cleek.es.js
CHANGED
|
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, computed, watch, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, renderSlot, mergeProps, withKeys, withModifiers, createElementVNode, pushScopeId, popScopeId, normalizeStyle, withCtx, createTextVNode, toDisplayString, withDirectives, isRef, unref,
|
|
20
|
+
import { defineComponent, computed, watch, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, renderSlot, mergeProps, withKeys, withModifiers, createElementVNode, pushScopeId, popScopeId, normalizeStyle, withCtx, createTextVNode, toDisplayString, withDirectives, isRef, unref, vModelDynamic, createVNode, Fragment, renderList, vModelRadio, ref, vModelSelect, vModelCheckbox, vModelText } from "vue";
|
|
21
21
|
var validators = {
|
|
22
22
|
size: (type) => {
|
|
23
23
|
return ["", "xs", "s", "m", "l", "xl"].includes(type);
|
|
@@ -34,6 +34,9 @@ var validators = {
|
|
|
34
34
|
buttonType: (type) => {
|
|
35
35
|
return ["filled", "outlined", "flat"].includes(type);
|
|
36
36
|
},
|
|
37
|
+
inputType: (type) => {
|
|
38
|
+
return ["text", "number", "date", "time", "password"].includes(type);
|
|
39
|
+
},
|
|
37
40
|
radioOptions: (options) => {
|
|
38
41
|
let isValid = true;
|
|
39
42
|
options.forEach((option) => {
|
|
@@ -11199,7 +11202,7 @@ defineComponent({
|
|
|
11199
11202
|
};
|
|
11200
11203
|
}
|
|
11201
11204
|
});
|
|
11202
|
-
function render$
|
|
11205
|
+
function render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11203
11206
|
const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
|
|
11204
11207
|
return openBlock(), createElementBlock("div", {
|
|
11205
11208
|
class: normalizeClass(["ck-icon", $options.computedClass]),
|
|
@@ -11275,9 +11278,9 @@ const _sfc_main$j = {
|
|
|
11275
11278
|
}
|
|
11276
11279
|
}
|
|
11277
11280
|
};
|
|
11278
|
-
var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", render$
|
|
11281
|
+
var ckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", render$e], ["__scopeId", "data-v-77d9963a"]]);
|
|
11279
11282
|
const _hoisted_1$g = ["title", "aria-label", "disabled"];
|
|
11280
|
-
function render$
|
|
11283
|
+
function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11281
11284
|
const _component_ck_icon = resolveComponent("ck-icon");
|
|
11282
11285
|
return openBlock(), createElementBlock("button", {
|
|
11283
11286
|
type: "button",
|
|
@@ -11354,15 +11357,15 @@ const _sfc_main$i = {
|
|
|
11354
11357
|
}
|
|
11355
11358
|
}
|
|
11356
11359
|
};
|
|
11357
|
-
var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", render$
|
|
11360
|
+
var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", render$d], ["__scopeId", "data-v-dfa2f586"]]);
|
|
11358
11361
|
const _withScopeId$2 = (n) => (pushScopeId("data-v-64a6608c"), n = n(), popScopeId(), n);
|
|
11359
11362
|
const _hoisted_1$f = ["disabled", "checked"];
|
|
11360
|
-
const _hoisted_2$
|
|
11361
|
-
const _hoisted_3$
|
|
11363
|
+
const _hoisted_2$7 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-checkbox__element" }, null, -1));
|
|
11364
|
+
const _hoisted_3$5 = {
|
|
11362
11365
|
key: 0,
|
|
11363
11366
|
class: "c-Checkbox__label"
|
|
11364
11367
|
};
|
|
11365
|
-
function render$
|
|
11368
|
+
function render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11366
11369
|
return openBlock(), createElementBlock("label", mergeProps({ class: "ck-checkbox" }, $options.checkboxAttributes, {
|
|
11367
11370
|
onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
|
|
11368
11371
|
}, ["prevent"]), ["space"])),
|
|
@@ -11382,8 +11385,8 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11382
11385
|
$options.onChange($event);
|
|
11383
11386
|
})
|
|
11384
11387
|
}, null, 40, _hoisted_1$f),
|
|
11385
|
-
_hoisted_2$
|
|
11386
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
11388
|
+
_hoisted_2$7,
|
|
11389
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$5, [
|
|
11387
11390
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
11388
11391
|
])) : createCommentVNode("", true)
|
|
11389
11392
|
], 16);
|
|
@@ -11422,9 +11425,9 @@ const _sfc_main$h = {
|
|
|
11422
11425
|
}
|
|
11423
11426
|
}
|
|
11424
11427
|
};
|
|
11425
|
-
var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", render$
|
|
11428
|
+
var ckCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", render$c], ["__scopeId", "data-v-64a6608c"]]);
|
|
11426
11429
|
const _hoisted_1$e = ["src"];
|
|
11427
|
-
function render$
|
|
11430
|
+
function render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11428
11431
|
return openBlock(), createElementBlock("div", {
|
|
11429
11432
|
class: normalizeClass(["ck-img", $options.computedClass]),
|
|
11430
11433
|
style: normalizeStyle($options.computedStyle),
|
|
@@ -11523,9 +11526,9 @@ const _sfc_main$g = {
|
|
|
11523
11526
|
}
|
|
11524
11527
|
}
|
|
11525
11528
|
};
|
|
11526
|
-
var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", render$
|
|
11529
|
+
var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", render$b], ["__scopeId", "data-v-38b603bf"]]);
|
|
11527
11530
|
const _hoisted_1$d = ["for"];
|
|
11528
|
-
function render$
|
|
11531
|
+
function render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11529
11532
|
return openBlock(), createElementBlock("label", {
|
|
11530
11533
|
class: normalizeClass(["ck-label", $options.computedClass]),
|
|
11531
11534
|
for: $props.for
|
|
@@ -11551,28 +11554,30 @@ const _sfc_main$f = {
|
|
|
11551
11554
|
}
|
|
11552
11555
|
}
|
|
11553
11556
|
};
|
|
11554
|
-
var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", render$
|
|
11555
|
-
var
|
|
11556
|
-
const _hoisted_1$c = { class: "ck-input
|
|
11557
|
-
const _hoisted_2$
|
|
11557
|
+
var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", render$a], ["__scopeId", "data-v-4b8b9ab4"]]);
|
|
11558
|
+
var ckInput_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11559
|
+
const _hoisted_1$c = { class: "ck-input" };
|
|
11560
|
+
const _hoisted_2$6 = ["type", "placeholder", "id", "disabled"];
|
|
11558
11561
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
11559
11562
|
props: {
|
|
11560
|
-
modelValue: {
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
+
modelValue: {},
|
|
11564
|
+
type: { type: String, validator: validators.inputType, default: "text" },
|
|
11565
|
+
disabled: { type: Boolean, default: false },
|
|
11566
|
+
placeholder: { type: String, default: void 0 },
|
|
11567
|
+
label: { type: String, default: void 0 },
|
|
11563
11568
|
labelAlign: { type: String, validator: validators.align, default: void 0 },
|
|
11564
11569
|
icon: { type: [String, Array], default: void 0 },
|
|
11565
11570
|
iconPack: { type: String, default: void 0 },
|
|
11566
11571
|
iconRight: { type: String, default: void 0 },
|
|
11567
|
-
group: { type: String, default:
|
|
11572
|
+
group: { type: String, default: void 0 },
|
|
11568
11573
|
groupBreak: { type: String, default: "s" },
|
|
11569
|
-
groupVertical: { type: String, default:
|
|
11574
|
+
groupVertical: { type: String, default: void 0 },
|
|
11570
11575
|
hideBorder: { type: Boolean, default: false },
|
|
11571
11576
|
width: { type: String, default: void 0 },
|
|
11572
11577
|
align: { type: String, validator: validators.align, default: void 0 },
|
|
11573
11578
|
autoSelect: { type: Boolean, default: false }
|
|
11574
11579
|
},
|
|
11575
|
-
emits: ["update:modelValue", "click", "change"],
|
|
11580
|
+
emits: ["update:modelValue", "click", "input", "change"],
|
|
11576
11581
|
setup(__props, { emit: emits }) {
|
|
11577
11582
|
const props = __props;
|
|
11578
11583
|
const value = computed({
|
|
@@ -11583,14 +11588,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11583
11588
|
emits("update:modelValue", val);
|
|
11584
11589
|
}
|
|
11585
11590
|
});
|
|
11586
|
-
const onChange = (event) => {
|
|
11587
|
-
emits("change", event);
|
|
11588
|
-
};
|
|
11589
11591
|
const onClick = (event) => {
|
|
11590
11592
|
if (props.autoSelect)
|
|
11591
11593
|
event.target.select();
|
|
11592
11594
|
emits("click", event);
|
|
11593
11595
|
};
|
|
11596
|
+
const onChange = (event) => {
|
|
11597
|
+
emits("change", event);
|
|
11598
|
+
};
|
|
11594
11599
|
const computedStyleInput = computed(() => {
|
|
11595
11600
|
const list = [];
|
|
11596
11601
|
if (props.width)
|
|
@@ -11615,7 +11620,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11615
11620
|
__props.label ? (openBlock(), createBlock(ckLabel, {
|
|
11616
11621
|
key: 0,
|
|
11617
11622
|
align: __props.labelAlign,
|
|
11618
|
-
for: "ck-input
|
|
11623
|
+
for: "ck-input"
|
|
11619
11624
|
}, {
|
|
11620
11625
|
default: withCtx(() => [
|
|
11621
11626
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
@@ -11631,15 +11636,16 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11631
11636
|
}, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true),
|
|
11632
11637
|
withDirectives(createElementVNode("input", {
|
|
11633
11638
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(value) ? value.value = $event : null),
|
|
11634
|
-
type:
|
|
11639
|
+
type: __props.type,
|
|
11635
11640
|
placeholder: __props.placeholder,
|
|
11636
11641
|
class: normalizeClass(unref(computedClassInput)),
|
|
11637
11642
|
style: normalizeStyle(unref(computedStyleInput)),
|
|
11638
|
-
id: __props.label ? "ck-input
|
|
11643
|
+
id: __props.label ? "ck-input" : "",
|
|
11644
|
+
disabled: __props.disabled,
|
|
11639
11645
|
onChange: _cache[1] || (_cache[1] = ($event) => onChange($event)),
|
|
11640
11646
|
onClick: _cache[2] || (_cache[2] = ($event) => onClick($event))
|
|
11641
|
-
}, null, 46, _hoisted_2$
|
|
11642
|
-
[
|
|
11647
|
+
}, null, 46, _hoisted_2$6), [
|
|
11648
|
+
[vModelDynamic, unref(value)]
|
|
11643
11649
|
]),
|
|
11644
11650
|
__props.iconRight ? (openBlock(), createBlock(ckIcon, {
|
|
11645
11651
|
key: 2,
|
|
@@ -11652,15 +11658,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11652
11658
|
};
|
|
11653
11659
|
}
|
|
11654
11660
|
});
|
|
11655
|
-
var
|
|
11661
|
+
var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-36850b72"]]);
|
|
11656
11662
|
var ckPopup_vue_vue_type_style_index_0_lang = "";
|
|
11657
11663
|
const _hoisted_1$b = {
|
|
11658
11664
|
key: 0,
|
|
11659
11665
|
class: "ck-popup"
|
|
11660
11666
|
};
|
|
11661
|
-
const _hoisted_2$
|
|
11662
|
-
const _hoisted_3$
|
|
11663
|
-
const _hoisted_4$
|
|
11667
|
+
const _hoisted_2$5 = /* @__PURE__ */ createElementVNode("div", { class: "blackout" }, null, -1);
|
|
11668
|
+
const _hoisted_3$4 = { class: "ck-popup__slot-header" };
|
|
11669
|
+
const _hoisted_4$2 = {
|
|
11664
11670
|
key: 0,
|
|
11665
11671
|
class: "ck-popup__title"
|
|
11666
11672
|
};
|
|
@@ -11715,7 +11721,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
11715
11721
|
setup(__props) {
|
|
11716
11722
|
return (_ctx, _cache) => {
|
|
11717
11723
|
return _ctx.value ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
11718
|
-
_hoisted_2$
|
|
11724
|
+
_hoisted_2$5,
|
|
11719
11725
|
createElementVNode("div", {
|
|
11720
11726
|
class: "popup-container",
|
|
11721
11727
|
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.onBgClick())
|
|
@@ -11725,8 +11731,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
11725
11731
|
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
11726
11732
|
}, ["stop"]))
|
|
11727
11733
|
}, [
|
|
11728
|
-
createElementVNode("div", _hoisted_3$
|
|
11729
|
-
__props.title ? (openBlock(), createElementBlock("h3", _hoisted_4$
|
|
11734
|
+
createElementVNode("div", _hoisted_3$4, [
|
|
11735
|
+
__props.title ? (openBlock(), createElementBlock("h3", _hoisted_4$2, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
11730
11736
|
renderSlot(_ctx.$slots, "header", { class: "ml-3" }),
|
|
11731
11737
|
!__props.notCloseBtn ? (openBlock(), createBlock(ckIcon, {
|
|
11732
11738
|
key: 1,
|
|
@@ -11769,13 +11775,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
11769
11775
|
}));
|
|
11770
11776
|
const _withScopeId$1 = (n) => (pushScopeId("data-v-73a891e8"), n = n(), popScopeId(), n);
|
|
11771
11777
|
const _hoisted_1$a = ["onKeyup"];
|
|
11772
|
-
const _hoisted_2$
|
|
11773
|
-
const _hoisted_3$
|
|
11774
|
-
const _hoisted_4$
|
|
11778
|
+
const _hoisted_2$4 = ["name", "value", "disabled"];
|
|
11779
|
+
const _hoisted_3$3 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "c-Radio__element" }, null, -1));
|
|
11780
|
+
const _hoisted_4$1 = {
|
|
11775
11781
|
key: 0,
|
|
11776
11782
|
class: "c-Radio__label"
|
|
11777
11783
|
};
|
|
11778
|
-
function render$
|
|
11784
|
+
function render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11779
11785
|
return openBlock(true), createElementBlock(Fragment, null, renderList($props.options, (item, index) => {
|
|
11780
11786
|
return openBlock(), createElementBlock("label", mergeProps({
|
|
11781
11787
|
key: `radio-${index}`,
|
|
@@ -11796,11 +11802,11 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11796
11802
|
name: $props.name,
|
|
11797
11803
|
value: item.value,
|
|
11798
11804
|
disabled: $props.disabled
|
|
11799
|
-
}, null, 8, _hoisted_2$
|
|
11805
|
+
}, null, 8, _hoisted_2$4), [
|
|
11800
11806
|
[vModelRadio, $options.value]
|
|
11801
11807
|
]),
|
|
11802
|
-
_hoisted_3$
|
|
11803
|
-
item.label ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
11808
|
+
_hoisted_3$3,
|
|
11809
|
+
item.label ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(item.label), 1)) : createCommentVNode("", true)
|
|
11804
11810
|
], 16, _hoisted_1$a);
|
|
11805
11811
|
}), 128);
|
|
11806
11812
|
}
|
|
@@ -11837,7 +11843,7 @@ const _sfc_main$c = {
|
|
|
11837
11843
|
}
|
|
11838
11844
|
}
|
|
11839
11845
|
};
|
|
11840
|
-
var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", render$
|
|
11846
|
+
var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", render$9], ["__scopeId", "data-v-73a891e8"]]);
|
|
11841
11847
|
const qmStr = {
|
|
11842
11848
|
capitalize(str) {
|
|
11843
11849
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
@@ -11874,53 +11880,11 @@ const qmStr = {
|
|
|
11874
11880
|
return joinArray;
|
|
11875
11881
|
}
|
|
11876
11882
|
};
|
|
11877
|
-
const _hoisted_1$9 = {
|
|
11878
|
-
class: "ck-select",
|
|
11879
|
-
action: "/action_page.php",
|
|
11880
|
-
method: "get"
|
|
11881
|
-
};
|
|
11882
|
-
const _hoisted_2$4 = ["placeholder"];
|
|
11883
|
-
const _hoisted_3$3 = { id: "ck-select__list" };
|
|
11884
|
-
const _hoisted_4$1 = ["value"];
|
|
11885
|
-
function render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11886
|
-
const _component_ck_label = resolveComponent("ck-label");
|
|
11887
|
-
return openBlock(), createElementBlock("form", _hoisted_1$9, [
|
|
11888
|
-
$props.label ? (openBlock(), createBlock(_component_ck_label, {
|
|
11889
|
-
key: 0,
|
|
11890
|
-
align: $props.labelAlign,
|
|
11891
|
-
for: "ck-select"
|
|
11892
|
-
}, {
|
|
11893
|
-
default: withCtx(() => [
|
|
11894
|
-
createTextVNode(toDisplayString($props.label), 1)
|
|
11895
|
-
]),
|
|
11896
|
-
_: 1
|
|
11897
|
-
}, 8, ["align"])) : createCommentVNode("", true),
|
|
11898
|
-
createElementVNode("input", {
|
|
11899
|
-
list: "ck-select__list",
|
|
11900
|
-
name: "ck-select",
|
|
11901
|
-
id: "ck-select",
|
|
11902
|
-
placeholder: $data.lastSelectedValue,
|
|
11903
|
-
class: normalizeClass($options.computedClass),
|
|
11904
|
-
onFocus: _cache[0] || (_cache[0] = ($event) => $options.onFocus($event)),
|
|
11905
|
-
onBlur: _cache[1] || (_cache[1] = ($event) => $options.onBlur($event))
|
|
11906
|
-
}, null, 42, _hoisted_2$4),
|
|
11907
|
-
createElementVNode("datalist", _hoisted_3$3, [
|
|
11908
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($props.options, (option) => {
|
|
11909
|
-
return openBlock(), createElementBlock("option", {
|
|
11910
|
-
value: option.name
|
|
11911
|
-
}, null, 8, _hoisted_4$1);
|
|
11912
|
-
}), 256))
|
|
11913
|
-
])
|
|
11914
|
-
]);
|
|
11915
|
-
}
|
|
11916
11883
|
var ckSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
11917
|
-
const
|
|
11918
|
-
|
|
11919
|
-
components: {
|
|
11920
|
-
ckLabel
|
|
11921
|
-
},
|
|
11884
|
+
const _hoisted_1$9 = ["value"];
|
|
11885
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
11922
11886
|
props: {
|
|
11923
|
-
modelValue: { default: null, type: [Boolean, Number, Object, Array] },
|
|
11887
|
+
modelValue: { default: null, type: [Boolean, Number, Object, Array, String] },
|
|
11924
11888
|
prop: { type: String, default: "name" },
|
|
11925
11889
|
autofocus: { type: Boolean, default: false },
|
|
11926
11890
|
noDataText: { type: String, default: "No se encontr\xF3 nada" },
|
|
@@ -11940,115 +11904,124 @@ const _sfc_main$b = {
|
|
|
11940
11904
|
label: { type: String, default: "" },
|
|
11941
11905
|
labelAlign: { type: String, default: "" }
|
|
11942
11906
|
},
|
|
11943
|
-
emits: ["update:modelValue"],
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
},
|
|
11950
|
-
computed: {
|
|
11951
|
-
value: {
|
|
11907
|
+
emits: ["update:modelValue", "click", "change"],
|
|
11908
|
+
setup(__props, { emit: emits }) {
|
|
11909
|
+
const props = __props;
|
|
11910
|
+
const search = ref("");
|
|
11911
|
+
ref(null);
|
|
11912
|
+
const value = computed({
|
|
11952
11913
|
get() {
|
|
11953
|
-
return
|
|
11914
|
+
return props.modelValue;
|
|
11954
11915
|
},
|
|
11955
11916
|
set(val) {
|
|
11956
11917
|
if (val === null)
|
|
11957
|
-
val =
|
|
11958
|
-
|
|
11918
|
+
val = realClearValue;
|
|
11919
|
+
emits("update:modelValue", val);
|
|
11959
11920
|
}
|
|
11960
|
-
}
|
|
11961
|
-
filteredOptions() {
|
|
11962
|
-
|
|
11963
|
-
const name =
|
|
11964
|
-
return qmStr.checkContainsStr(name,
|
|
11921
|
+
});
|
|
11922
|
+
const filteredOptions = computed(() => {
|
|
11923
|
+
const list = props.options.filter((option) => {
|
|
11924
|
+
const name = getOptionName(option);
|
|
11925
|
+
return qmStr.checkContainsStr(name, search.value);
|
|
11965
11926
|
});
|
|
11966
|
-
|
|
11967
|
-
|
|
11927
|
+
return list;
|
|
11928
|
+
});
|
|
11929
|
+
const computedClass = computed(() => {
|
|
11968
11930
|
const classList2 = [];
|
|
11969
|
-
classList2.push(functions$1.getGroupClass(
|
|
11931
|
+
classList2.push(functions$1.getGroupClass(props));
|
|
11970
11932
|
return classList2;
|
|
11971
|
-
}
|
|
11972
|
-
computedStyle() {
|
|
11933
|
+
});
|
|
11934
|
+
const computedStyle = computed(() => {
|
|
11973
11935
|
const list = [];
|
|
11974
|
-
if (
|
|
11975
|
-
list.push({ "min-width":
|
|
11936
|
+
if (props.minWidth)
|
|
11937
|
+
list.push({ "min-width": props.minWidth });
|
|
11976
11938
|
return list;
|
|
11977
|
-
}
|
|
11978
|
-
|
|
11979
|
-
if (
|
|
11980
|
-
if (
|
|
11939
|
+
});
|
|
11940
|
+
computed(() => {
|
|
11941
|
+
if (props.searchable === "auto") {
|
|
11942
|
+
if (props.options.length < 5)
|
|
11981
11943
|
return false;
|
|
11982
11944
|
return true;
|
|
11983
11945
|
}
|
|
11984
|
-
return
|
|
11985
|
-
}
|
|
11986
|
-
realClearValue() {
|
|
11987
|
-
switch (typeof
|
|
11946
|
+
return props.searchable;
|
|
11947
|
+
});
|
|
11948
|
+
const realClearValue = computed(() => {
|
|
11949
|
+
switch (typeof props.modelValue) {
|
|
11988
11950
|
case "number":
|
|
11989
11951
|
return 0;
|
|
11990
11952
|
case "string":
|
|
11991
11953
|
return "";
|
|
11992
11954
|
case "object":
|
|
11993
|
-
if (
|
|
11955
|
+
if (props.modelValue.constructor === Array)
|
|
11994
11956
|
return [];
|
|
11995
11957
|
return {};
|
|
11996
11958
|
default:
|
|
11997
11959
|
return null;
|
|
11998
11960
|
}
|
|
11999
|
-
}
|
|
12000
|
-
|
|
12001
|
-
switch (typeof
|
|
11961
|
+
});
|
|
11962
|
+
computed(() => {
|
|
11963
|
+
switch (typeof props.modelValue) {
|
|
12002
11964
|
case "number":
|
|
12003
|
-
return
|
|
11965
|
+
return props.modelValue === 0;
|
|
12004
11966
|
case "string":
|
|
12005
|
-
return
|
|
11967
|
+
return props.modelValue === "";
|
|
12006
11968
|
case "object":
|
|
12007
|
-
if (!
|
|
11969
|
+
if (!props.modelValue)
|
|
12008
11970
|
return null;
|
|
12009
|
-
if (
|
|
12010
|
-
return
|
|
11971
|
+
if (props.modelValue.constructor === Array) {
|
|
11972
|
+
return props.modelValue.length() === 0;
|
|
12011
11973
|
}
|
|
12012
|
-
return Object.keys(
|
|
11974
|
+
return Object.keys(props.modelValue).length === 0;
|
|
12013
11975
|
default:
|
|
12014
|
-
return
|
|
11976
|
+
return props.modelValue === null;
|
|
12015
11977
|
}
|
|
12016
|
-
}
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
if (!
|
|
12022
|
-
event.target.value = this.lastSelectedValue;
|
|
12023
|
-
this.lastSelectedValue = null;
|
|
12024
|
-
},
|
|
12025
|
-
onFocus(event) {
|
|
12026
|
-
this.lastSelectedValue = event.target.value;
|
|
12027
|
-
event.target.value = "";
|
|
12028
|
-
},
|
|
12029
|
-
checkOptionsIsValid(optionName) {
|
|
12030
|
-
if (!optionName)
|
|
12031
|
-
return;
|
|
12032
|
-
return this.options.some((i) => this.getOptionName(i) === optionName);
|
|
12033
|
-
},
|
|
12034
|
-
getOptionKey(option) {
|
|
12035
|
-
return this.realReduceFunction(option);
|
|
12036
|
-
},
|
|
12037
|
-
getOptionName(option) {
|
|
12038
|
-
if (!this.prop)
|
|
11978
|
+
});
|
|
11979
|
+
const getOptionKey = (option) => {
|
|
11980
|
+
return realReduceFunction(option);
|
|
11981
|
+
};
|
|
11982
|
+
const getOptionName = (option) => {
|
|
11983
|
+
if (!props.prop)
|
|
12039
11984
|
return option;
|
|
12040
|
-
return option[
|
|
12041
|
-
}
|
|
12042
|
-
realReduceFunction(option) {
|
|
12043
|
-
if (
|
|
11985
|
+
return option[props.prop];
|
|
11986
|
+
};
|
|
11987
|
+
const realReduceFunction = (option) => {
|
|
11988
|
+
if (props.notReduce)
|
|
12044
11989
|
return option;
|
|
12045
|
-
return
|
|
12046
|
-
}
|
|
12047
|
-
|
|
12048
|
-
|
|
11990
|
+
return props.reduceFunction(option);
|
|
11991
|
+
};
|
|
11992
|
+
return (_ctx, _cache) => {
|
|
11993
|
+
return openBlock(), createElementBlock("div", {
|
|
11994
|
+
class: "ck-select",
|
|
11995
|
+
style: normalizeStyle(unref(computedStyle))
|
|
11996
|
+
}, [
|
|
11997
|
+
__props.label ? (openBlock(), createBlock(ckLabel, {
|
|
11998
|
+
key: 0,
|
|
11999
|
+
align: __props.labelAlign,
|
|
12000
|
+
for: "ck-input"
|
|
12001
|
+
}, {
|
|
12002
|
+
default: withCtx(() => [
|
|
12003
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
12004
|
+
]),
|
|
12005
|
+
_: 1
|
|
12006
|
+
}, 8, ["align"])) : createCommentVNode("", true),
|
|
12007
|
+
withDirectives(createElementVNode("select", {
|
|
12008
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(value) ? value.value = $event : null),
|
|
12009
|
+
class: normalizeClass(unref(computedClass))
|
|
12010
|
+
}, [
|
|
12011
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredOptions), (option) => {
|
|
12012
|
+
return openBlock(), createElementBlock("option", {
|
|
12013
|
+
value: getOptionKey(option),
|
|
12014
|
+
key: option
|
|
12015
|
+
}, toDisplayString(getOptionName(option)), 9, _hoisted_1$9);
|
|
12016
|
+
}), 128))
|
|
12017
|
+
], 2), [
|
|
12018
|
+
[vModelSelect, unref(value)]
|
|
12019
|
+
])
|
|
12020
|
+
], 4);
|
|
12021
|
+
};
|
|
12049
12022
|
}
|
|
12050
|
-
};
|
|
12051
|
-
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["
|
|
12023
|
+
});
|
|
12024
|
+
var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-a7e7777c"]]);
|
|
12052
12025
|
const _withScopeId = (n) => (pushScopeId("data-v-5251135b"), n = n(), popScopeId(), n);
|
|
12053
12026
|
const _hoisted_1$8 = ["disabled"];
|
|
12054
12027
|
const _hoisted_2$3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
|
|
@@ -12323,7 +12296,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12323
12296
|
key: 1,
|
|
12324
12297
|
class: normalizeClass(["items-per-page", { "ck-component__group--left": !_ctx.hideSearch }])
|
|
12325
12298
|
}, toDisplayString(_ctx.itemsPerPageStart) + " - " + toDisplayString(_ctx.itemsPerPageEnd) + " de " + toDisplayString(__props.listLength), 3)) : createCommentVNode("", true),
|
|
12326
|
-
!_ctx.hideSearch ? (openBlock(), createBlock(
|
|
12299
|
+
!_ctx.hideSearch ? (openBlock(), createBlock(ckInput, {
|
|
12327
12300
|
key: 2,
|
|
12328
12301
|
modelValue: _ctx.searchLocal,
|
|
12329
12302
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(searchLocal) ? searchLocal.value = $event : null),
|
|
@@ -12336,7 +12309,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12336
12309
|
};
|
|
12337
12310
|
}
|
|
12338
12311
|
}));
|
|
12339
|
-
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
12312
|
+
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-4ce2fcee"]]);
|
|
12340
12313
|
var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12341
12314
|
const _hoisted_1$3 = { class: "ck-table__pagination" };
|
|
12342
12315
|
const _hoisted_2$1 = ["onClick"];
|
|
@@ -12436,9 +12409,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12436
12409
|
onClick: ($event) => _ctx.updateCurrentPage(num)
|
|
12437
12410
|
}, toDisplayString(num), 9, _hoisted_2$1);
|
|
12438
12411
|
}), 256)),
|
|
12439
|
-
createVNode(
|
|
12412
|
+
createVNode(ckInput, {
|
|
12440
12413
|
class: "ck-table__pagination-input",
|
|
12441
12414
|
autoSelect: "",
|
|
12415
|
+
type: "number",
|
|
12442
12416
|
width: "50px",
|
|
12443
12417
|
align: "center",
|
|
12444
12418
|
modelValue: _ctx.currentPageLocal2,
|
|
@@ -12463,7 +12437,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12463
12437
|
};
|
|
12464
12438
|
}
|
|
12465
12439
|
}));
|
|
12466
|
-
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
12440
|
+
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-3fc0d6c6"]]);
|
|
12467
12441
|
var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12468
12442
|
const _hoisted_1$2 = { class: "ck-table" };
|
|
12469
12443
|
const _hoisted_2 = {
|
|
@@ -12631,7 +12605,7 @@ const _sfc_main$2 = {
|
|
|
12631
12605
|
}
|
|
12632
12606
|
}
|
|
12633
12607
|
};
|
|
12634
|
-
var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", render$3], ["__scopeId", "data-v-
|
|
12608
|
+
var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", render$3], ["__scopeId", "data-v-70c634f2"]]);
|
|
12635
12609
|
const _hoisted_1$1 = { class: "ck-textarea" };
|
|
12636
12610
|
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12637
12611
|
const _component_ck_label = resolveComponent("ck-label");
|
|
@@ -15275,7 +15249,7 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
15275
15249
|
ckCheckbox,
|
|
15276
15250
|
ckIcon,
|
|
15277
15251
|
ckImg,
|
|
15278
|
-
|
|
15252
|
+
ckInput,
|
|
15279
15253
|
ckLabel,
|
|
15280
15254
|
ckPopup: _sfc_main$d,
|
|
15281
15255
|
ckRadio,
|
|
@@ -15299,4 +15273,4 @@ const install = function installCleek(app, options) {
|
|
|
15299
15273
|
app.component(componentName, component);
|
|
15300
15274
|
});
|
|
15301
15275
|
};
|
|
15302
|
-
export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckIcon, ckImg,
|
|
15276
|
+
export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckIcon, ckImg, ckInput, ckLabel, _sfc_main$d as ckPopup, ckRadio, ckSelect, ckSwitch, ckSwitchOptions, ckTable, ckTd, ckTextarea, ckTh, ckTooltip, ckTr, install as default, lockScroll, unlockScroll };
|