cleek 1.8.2 → 1.8.3

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
@@ -4,7 +4,7 @@ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
8
  var __spreadValues = (a, b) => {
9
9
  for (var prop in b || (b = {}))
10
10
  if (__hasOwnProp.call(b, prop))
@@ -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, vModelText, createVNode, Fragment, renderList, vModelRadio, vModelCheckbox } from "vue";
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, vModelText, createVNode, Fragment, renderList, vModelRadio, vModelCheckbox } from "vue";
21
21
  var validators = {
22
22
  size: (type) => {
23
23
  return ["", "xs", "s", "m", "l", "xl"].includes(type);
@@ -106,16 +106,16 @@ function _createClass(Constructor, protoProps, staticProps) {
106
106
  _defineProperties(Constructor, staticProps);
107
107
  return Constructor;
108
108
  }
109
- function _defineProperty(obj, key, value2) {
109
+ function _defineProperty(obj, key, value) {
110
110
  if (key in obj) {
111
111
  Object.defineProperty(obj, key, {
112
- value: value2,
112
+ value,
113
113
  enumerable: true,
114
114
  configurable: true,
115
115
  writable: true
116
116
  });
117
117
  } else {
118
- obj[key] = value2;
118
+ obj[key] = value;
119
119
  }
120
120
  return obj;
121
121
  }
@@ -10877,16 +10877,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
10877
10877
  } : function(obj) {
10878
10878
  return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10879
10879
  };
10880
- var defineProperty = function(obj, key, value2) {
10880
+ var defineProperty = function(obj, key, value) {
10881
10881
  if (key in obj) {
10882
10882
  Object.defineProperty(obj, key, {
10883
- value: value2,
10883
+ value,
10884
10884
  enumerable: true,
10885
10885
  configurable: true,
10886
10886
  writable: true
10887
10887
  });
10888
10888
  } else {
10889
- obj[key] = value2;
10889
+ obj[key] = value;
10890
10890
  }
10891
10891
  return obj;
10892
10892
  };
@@ -10929,8 +10929,8 @@ function styleToObject(style) {
10929
10929
  }).reduce(function(output, pair) {
10930
10930
  var idx = pair.indexOf(":");
10931
10931
  var prop = humps.camelize(pair.slice(0, idx));
10932
- var value2 = pair.slice(idx + 1).trim();
10933
- output[prop] = value2;
10932
+ var value = pair.slice(idx + 1).trim();
10933
+ output[prop] = value;
10934
10934
  return output;
10935
10935
  }, {});
10936
10936
  }
@@ -10950,16 +10950,16 @@ function convert(abstractElement) {
10950
10950
  return convert(child);
10951
10951
  });
10952
10952
  var mixins = Object.keys(abstractElement.attributes || {}).reduce(function(mixins2, key) {
10953
- var value2 = abstractElement.attributes[key];
10953
+ var value = abstractElement.attributes[key];
10954
10954
  switch (key) {
10955
10955
  case "class":
10956
- mixins2.class = classToObject(value2);
10956
+ mixins2.class = classToObject(value);
10957
10957
  break;
10958
10958
  case "style":
10959
- mixins2.style = styleToObject(value2);
10959
+ mixins2.style = styleToObject(value);
10960
10960
  break;
10961
10961
  default:
10962
- mixins2.attrs[key] = value2;
10962
+ mixins2.attrs[key] = value;
10963
10963
  }
10964
10964
  return mixins2;
10965
10965
  }, {
@@ -10985,8 +10985,8 @@ function log() {
10985
10985
  (_console = console).error.apply(_console, arguments);
10986
10986
  }
10987
10987
  }
10988
- function objectWithKey(key, value2) {
10989
- return Array.isArray(value2) && value2.length > 0 || !Array.isArray(value2) && value2 ? defineProperty({}, key, value2) : {};
10988
+ function objectWithKey(key, value) {
10989
+ return Array.isArray(value) && value.length > 0 || !Array.isArray(value) && value ? defineProperty({}, key, value) : {};
10990
10990
  }
10991
10991
  function classList(props) {
10992
10992
  var _classes;
@@ -11034,8 +11034,8 @@ var FontAwesomeIcon = defineComponent({
11034
11034
  flip: {
11035
11035
  type: String,
11036
11036
  default: null,
11037
- validator: function validator(value2) {
11038
- return ["horizontal", "vertical", "both"].indexOf(value2) > -1;
11037
+ validator: function validator(value) {
11038
+ return ["horizontal", "vertical", "both"].indexOf(value) > -1;
11039
11039
  }
11040
11040
  },
11041
11041
  icon: {
@@ -11053,8 +11053,8 @@ var FontAwesomeIcon = defineComponent({
11053
11053
  pull: {
11054
11054
  type: String,
11055
11055
  default: null,
11056
- validator: function validator2(value2) {
11057
- return ["right", "left"].indexOf(value2) > -1;
11056
+ validator: function validator2(value) {
11057
+ return ["right", "left"].indexOf(value) > -1;
11058
11058
  }
11059
11059
  },
11060
11060
  pulse: {
@@ -11064,8 +11064,8 @@ var FontAwesomeIcon = defineComponent({
11064
11064
  rotation: {
11065
11065
  type: [String, Number],
11066
11066
  default: null,
11067
- validator: function validator3(value2) {
11068
- return [90, 180, 270].indexOf(Number.parseInt(value2, 10)) > -1;
11067
+ validator: function validator3(value) {
11068
+ return [90, 180, 270].indexOf(Number.parseInt(value, 10)) > -1;
11069
11069
  }
11070
11070
  },
11071
11071
  swapOpacity: {
@@ -11075,8 +11075,8 @@ var FontAwesomeIcon = defineComponent({
11075
11075
  size: {
11076
11076
  type: String,
11077
11077
  default: null,
11078
- validator: function validator4(value2) {
11079
- return ["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x"].indexOf(value2) > -1;
11078
+ validator: function validator4(value) {
11079
+ return ["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x"].indexOf(value) > -1;
11080
11080
  }
11081
11081
  },
11082
11082
  spin: {
@@ -11120,8 +11120,8 @@ var FontAwesomeIcon = defineComponent({
11120
11120
  title: props.title
11121
11121
  }));
11122
11122
  });
11123
- watch(renderedIcon, function(value2) {
11124
- if (!value2) {
11123
+ watch(renderedIcon, function(value) {
11124
+ if (!value) {
11125
11125
  return log("Could not find one or more icon(s)", icon$$1.value, mask.value);
11126
11126
  }
11127
11127
  }, { immediate: true });
@@ -11170,8 +11170,8 @@ defineComponent({
11170
11170
  position: {
11171
11171
  type: String,
11172
11172
  default: null,
11173
- validator: function validator5(value2) {
11174
- return ["bottom-left", "bottom-right", "top-left", "top-right"].indexOf(value2) > -1;
11173
+ validator: function validator5(value) {
11174
+ return ["bottom-left", "bottom-right", "top-left", "top-right"].indexOf(value) > -1;
11175
11175
  }
11176
11176
  }
11177
11177
  },
@@ -11555,7 +11555,7 @@ var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", render$b], ["
11555
11555
  var ckInputText_vue_vue_type_style_index_0_scoped_true_lang = "";
11556
11556
  const _hoisted_1$c = { class: "ck-input-text" };
11557
11557
  const _hoisted_2$7 = ["placeholder", "id"];
11558
- const __default__$4 = {
11558
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
11559
11559
  props: {
11560
11560
  modelValue: { type: [String, Number], default: "" },
11561
11561
  placeholder: { type: String, default: "" },
@@ -11572,49 +11572,44 @@ const __default__$4 = {
11572
11572
  align: { type: String, validator: validators.align, default: void 0 },
11573
11573
  autoSelect: { type: Boolean, default: false }
11574
11574
  },
11575
- emits: ["update:modelValue", "change", "click"],
11576
- computed: {
11577
- value: {
11575
+ emits: ["update:modelValue", "click", "change"],
11576
+ setup(__props, { emit: emits }) {
11577
+ const props = __props;
11578
+ const value = computed({
11578
11579
  get() {
11579
- return this.modelValue;
11580
+ return props.modelValue;
11580
11581
  },
11581
11582
  set(val) {
11582
- this.$emit("update:modelValue", val);
11583
+ emits("update:modelValue", val);
11583
11584
  }
11584
- },
11585
- computedStyleInput() {
11585
+ });
11586
+ const onChange = (event) => {
11587
+ emits("change", event);
11588
+ };
11589
+ const onClick = (event) => {
11590
+ if (props.autoSelect)
11591
+ event.target.select();
11592
+ emits("click", event);
11593
+ };
11594
+ const computedStyleInput = computed(() => {
11586
11595
  const list = [];
11587
- if (this.width)
11588
- list.push({ width: this.width });
11596
+ if (props.width)
11597
+ list.push({ width: props.width });
11589
11598
  return list;
11590
- },
11591
- computedClassInput() {
11599
+ });
11600
+ const computedClassInput = computed(() => {
11592
11601
  const list = [];
11593
- list.push(functions$1.getGroupClass(this));
11594
- if (this.icon)
11602
+ list.push(functions$1.getGroupClass(props));
11603
+ if (props.icon)
11595
11604
  list.push("has-icon-left");
11596
- if (this.iconRight)
11605
+ if (props.iconRight)
11597
11606
  list.push("has-icon-right");
11598
- if (this.align)
11599
- list.push(`align--${this.align}`);
11600
- if (this.hideBorder)
11607
+ if (props.align)
11608
+ list.push(`align--${props.align}`);
11609
+ if (props.hideBorder)
11601
11610
  list.push("no-border");
11602
11611
  return list;
11603
- }
11604
- },
11605
- methods: {
11606
- onChange(event) {
11607
- this.$emit("change", event);
11608
- },
11609
- onClick(event) {
11610
- if (this.autoSelect)
11611
- event.target.select();
11612
- this.$emit("click", event);
11613
- }
11614
- }
11615
- };
11616
- const _sfc_main$e = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$4), {
11617
- setup(__props) {
11612
+ });
11618
11613
  return (_ctx, _cache) => {
11619
11614
  return openBlock(), createElementBlock("div", _hoisted_1$c, [
11620
11615
  __props.label ? (openBlock(), createBlock(ckLabel, {
@@ -11638,13 +11633,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
11638
11633
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(value) ? value.value = $event : null),
11639
11634
  type: "text",
11640
11635
  placeholder: __props.placeholder,
11641
- class: normalizeClass(_ctx.computedClassInput),
11642
- style: normalizeStyle(_ctx.computedStyleInput),
11636
+ class: normalizeClass(unref(computedClassInput)),
11637
+ style: normalizeStyle(unref(computedStyleInput)),
11643
11638
  id: __props.label ? "ck-input-text" : "",
11644
- onChange: _cache[1] || (_cache[1] = ($event) => _ctx.onChange($event)),
11645
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.onClick($event))
11639
+ onChange: _cache[1] || (_cache[1] = ($event) => onChange($event)),
11640
+ onClick: _cache[2] || (_cache[2] = ($event) => onClick($event))
11646
11641
  }, null, 46, _hoisted_2$7), [
11647
- [vModelText, _ctx.value]
11642
+ [vModelText, unref(value)]
11648
11643
  ]),
11649
11644
  __props.iconRight ? (openBlock(), createBlock(ckIcon, {
11650
11645
  key: 2,
@@ -11656,8 +11651,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
11656
11651
  ]);
11657
11652
  };
11658
11653
  }
11659
- }));
11660
- var ckInputText = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-aee99f3c"]]);
11654
+ });
11655
+ var ckInputText = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-154e1097"]]);
11661
11656
  var ckPopup_vue_vue_type_style_index_0_lang = "";
11662
11657
  const _hoisted_1$b = {
11663
11658
  key: 0,
@@ -11836,9 +11831,9 @@ const _sfc_main$c = {
11836
11831
  }
11837
11832
  },
11838
11833
  methods: {
11839
- handleChange(value2) {
11840
- this.value = value2;
11841
- this.$emit("change", value2);
11834
+ handleChange(value) {
11835
+ this.value = value;
11836
+ this.$emit("change", value);
11842
11837
  }
11843
11838
  }
11844
11839
  };
@@ -12307,10 +12302,10 @@ const __default__$2 = {
12307
12302
  itemsPerPageEnd() {
12308
12303
  console.log("this.currentPage", this.currentPage);
12309
12304
  console.log("this.itemsPerPage", this.itemsPerPage);
12310
- const value2 = this.currentPage * this.itemsPerPage;
12311
- if (value2 > this.listLength)
12305
+ const value = this.currentPage * this.itemsPerPage;
12306
+ if (value > this.listLength)
12312
12307
  return this.listLength;
12313
- return value2;
12308
+ return value;
12314
12309
  }
12315
12310
  }
12316
12311
  };
@@ -12745,11 +12740,11 @@ function applyStyles(_ref2) {
12745
12740
  }
12746
12741
  Object.assign(element.style, style);
12747
12742
  Object.keys(attributes).forEach(function(name2) {
12748
- var value2 = attributes[name2];
12749
- if (value2 === false) {
12743
+ var value = attributes[name2];
12744
+ if (value === false) {
12750
12745
  element.removeAttribute(name2);
12751
12746
  } else {
12752
- element.setAttribute(name2, value2 === true ? "" : value2);
12747
+ element.setAttribute(name2, value === true ? "" : value);
12753
12748
  }
12754
12749
  });
12755
12750
  });
@@ -12921,11 +12916,11 @@ function getOffsetParent(element) {
12921
12916
  function getMainAxisFromPlacement(placement) {
12922
12917
  return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
12923
12918
  }
12924
- function within(min$1, value2, max$1) {
12925
- return max(min$1, min(value2, max$1));
12919
+ function within(min$1, value, max$1) {
12920
+ return max(min$1, min(value, max$1));
12926
12921
  }
12927
- function withinMaxClamp(min2, value2, max2) {
12928
- var v = within(min2, value2, max2);
12922
+ function withinMaxClamp(min2, value, max2) {
12923
+ var v = within(min2, value, max2);
12929
12924
  return v > max2 ? max2 : v;
12930
12925
  }
12931
12926
  function getFreshSideObject() {
@@ -12939,9 +12934,9 @@ function getFreshSideObject() {
12939
12934
  function mergePaddingObject(paddingObject) {
12940
12935
  return Object.assign({}, getFreshSideObject(), paddingObject);
12941
12936
  }
12942
- function expandToHashMap(value2, keys) {
12937
+ function expandToHashMap(value, keys) {
12943
12938
  return keys.reduce(function(hashMap, key) {
12944
- hashMap[key] = value2;
12939
+ hashMap[key] = value;
12945
12940
  return hashMap;
12946
12941
  }, {});
12947
12942
  }
@@ -13991,19 +13986,19 @@ var TOUCH_OPTIONS = {
13991
13986
  var TIPPY_DEFAULT_APPEND_TO = function TIPPY_DEFAULT_APPEND_TO2() {
13992
13987
  return document.body;
13993
13988
  };
13994
- function getValueAtIndexOrReturn(value2, index, defaultValue) {
13995
- if (Array.isArray(value2)) {
13996
- var v = value2[index];
13989
+ function getValueAtIndexOrReturn(value, index, defaultValue) {
13990
+ if (Array.isArray(value)) {
13991
+ var v = value[index];
13997
13992
  return v == null ? Array.isArray(defaultValue) ? defaultValue[index] : defaultValue : v;
13998
13993
  }
13999
- return value2;
13994
+ return value;
14000
13995
  }
14001
- function isType(value2, type) {
14002
- var str = {}.toString.call(value2);
13996
+ function isType(value, type) {
13997
+ var str = {}.toString.call(value);
14003
13998
  return str.indexOf("[object") === 0 && str.indexOf(type + "]") > -1;
14004
13999
  }
14005
- function invokeWithArgsOrReturn(value2, args) {
14006
- return typeof value2 === "function" ? value2.apply(void 0, args) : value2;
14000
+ function invokeWithArgsOrReturn(value, args) {
14001
+ return typeof value === "function" ? value.apply(void 0, args) : value;
14007
14002
  }
14008
14003
  function debounce(fn2, ms) {
14009
14004
  if (ms === 0) {
@@ -14017,15 +14012,15 @@ function debounce(fn2, ms) {
14017
14012
  }, ms);
14018
14013
  };
14019
14014
  }
14020
- function splitBySpaces(value2) {
14021
- return value2.split(/\s+/).filter(Boolean);
14015
+ function splitBySpaces(value) {
14016
+ return value.split(/\s+/).filter(Boolean);
14022
14017
  }
14023
- function normalizeToArray(value2) {
14024
- return [].concat(value2);
14018
+ function normalizeToArray(value) {
14019
+ return [].concat(value);
14025
14020
  }
14026
- function pushIfUnique(arr, value2) {
14027
- if (arr.indexOf(value2) === -1) {
14028
- arr.push(value2);
14021
+ function pushIfUnique(arr, value) {
14022
+ if (arr.indexOf(value) === -1) {
14023
+ arr.push(value);
14029
14024
  }
14030
14025
  }
14031
14026
  function unique(arr) {
@@ -14036,8 +14031,8 @@ function unique(arr) {
14036
14031
  function getBasePlacement(placement) {
14037
14032
  return placement.split("-")[0];
14038
14033
  }
14039
- function arrayFrom(value2) {
14040
- return [].slice.call(value2);
14034
+ function arrayFrom(value) {
14035
+ return [].slice.call(value);
14041
14036
  }
14042
14037
  function removeUndefinedProps(obj) {
14043
14038
  return Object.keys(obj).reduce(function(acc, key) {
@@ -14050,36 +14045,36 @@ function removeUndefinedProps(obj) {
14050
14045
  function div() {
14051
14046
  return document.createElement("div");
14052
14047
  }
14053
- function isElement(value2) {
14048
+ function isElement(value) {
14054
14049
  return ["Element", "Fragment"].some(function(type) {
14055
- return isType(value2, type);
14050
+ return isType(value, type);
14056
14051
  });
14057
14052
  }
14058
- function isNodeList(value2) {
14059
- return isType(value2, "NodeList");
14053
+ function isNodeList(value) {
14054
+ return isType(value, "NodeList");
14060
14055
  }
14061
- function isMouseEvent(value2) {
14062
- return isType(value2, "MouseEvent");
14056
+ function isMouseEvent(value) {
14057
+ return isType(value, "MouseEvent");
14063
14058
  }
14064
- function isReferenceElement(value2) {
14065
- return !!(value2 && value2._tippy && value2._tippy.reference === value2);
14059
+ function isReferenceElement(value) {
14060
+ return !!(value && value._tippy && value._tippy.reference === value);
14066
14061
  }
14067
- function getArrayOfElements(value2) {
14068
- if (isElement(value2)) {
14069
- return [value2];
14062
+ function getArrayOfElements(value) {
14063
+ if (isElement(value)) {
14064
+ return [value];
14070
14065
  }
14071
- if (isNodeList(value2)) {
14072
- return arrayFrom(value2);
14066
+ if (isNodeList(value)) {
14067
+ return arrayFrom(value);
14073
14068
  }
14074
- if (Array.isArray(value2)) {
14075
- return value2;
14069
+ if (Array.isArray(value)) {
14070
+ return value;
14076
14071
  }
14077
- return arrayFrom(document.querySelectorAll(value2));
14072
+ return arrayFrom(document.querySelectorAll(value));
14078
14073
  }
14079
- function setTransitionDuration(els, value2) {
14074
+ function setTransitionDuration(els, value) {
14080
14075
  els.forEach(function(el) {
14081
14076
  if (el) {
14082
- el.style.transitionDuration = value2 + "ms";
14077
+ el.style.transitionDuration = value + "ms";
14083
14078
  }
14084
14079
  });
14085
14080
  }
@@ -14293,16 +14288,16 @@ var innerHTML = function innerHTML2() {
14293
14288
  function dangerouslySetInnerHTML(element, html) {
14294
14289
  element[innerHTML()] = html;
14295
14290
  }
14296
- function createArrowElement(value2) {
14291
+ function createArrowElement(value) {
14297
14292
  var arrow2 = div();
14298
- if (value2 === true) {
14293
+ if (value === true) {
14299
14294
  arrow2.className = ARROW_CLASS;
14300
14295
  } else {
14301
14296
  arrow2.className = SVG_ARROW_CLASS;
14302
- if (isElement(value2)) {
14303
- arrow2.appendChild(value2);
14297
+ if (isElement(value)) {
14298
+ arrow2.appendChild(value);
14304
14299
  } else {
14305
- dangerouslySetInnerHTML(arrow2, value2);
14300
+ dangerouslySetInnerHTML(arrow2, value);
14306
14301
  }
14307
14302
  }
14308
14303
  return arrow2;