cleek 2.6.112 → 2.7.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.
@@ -84,6 +84,10 @@ unselectable()
84
84
  -webkit-user-select none
85
85
  -o-user-select none
86
86
 
87
+ dynamic-rgba(rgb-variable, opacity = 1)
88
+ // return rgba as a string so it doesn't get interpolated by stylus compiler
89
+ s('rgba(var(%s), %s)', rgb-variable, opacity)
90
+
87
91
  //
88
92
  //
89
93
  //
package/dist/cleek.es.js CHANGED
@@ -89870,7 +89870,7 @@ const _sfc_main$b = defineComponent$2({
89870
89870
  style: normalizeStyle$2(computedStyle.value),
89871
89871
  onClick: _cache[0] || (_cache[0] = ($event) => emits("click", $event))
89872
89872
  }, [
89873
- _ctx.icon && !_ctx.iconRight ? (openBlock$2(), createBlock$2(CkIcon, {
89873
+ _ctx.icon ? (openBlock$2(), createBlock$2(CkIcon, {
89874
89874
  key: 0,
89875
89875
  class: "pr-2",
89876
89876
  icon: _ctx.icon,
@@ -89879,17 +89879,17 @@ const _sfc_main$b = defineComponent$2({
89879
89879
  createElementVNode("span", null, [
89880
89880
  renderSlot$2(_ctx.$slots, "default", {}, void 0, true)
89881
89881
  ]),
89882
- _ctx.icon && _ctx.iconRight ? (openBlock$2(), createBlock$2(CkIcon, {
89882
+ _ctx.iconRight ? (openBlock$2(), createBlock$2(CkIcon, {
89883
89883
  key: 1,
89884
89884
  class: "pl-2",
89885
- icon: _ctx.icon,
89885
+ icon: _ctx.iconRight,
89886
89886
  "icon-pack": _ctx.iconPack
89887
89887
  }, null, 8, ["icon", "icon-pack"])) : createCommentVNode$2("", true)
89888
89888
  ], 14, _hoisted_1$a);
89889
89889
  };
89890
89890
  }
89891
89891
  });
89892
- var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-2ac3d820"]]);
89892
+ var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-1f111567"]]);
89893
89893
  var ckDiv_vue_vue_type_style_index_0_lang = "";
89894
89894
  const _sfc_main$a = defineComponent$2({
89895
89895
  __name: "ck-div",
@@ -91184,11 +91184,20 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
91184
91184
  library$1$2.add(icons$2);
91185
91185
  library$1$2.add(icons$1);
91186
91186
  library$1$2.add(icons);
91187
+ function hexToRgb(hex) {
91188
+ hex = hex.replace(/^#/, "");
91189
+ const r = parseInt(hex.substring(0, 2), 16);
91190
+ const g2 = parseInt(hex.substring(2, 4), 16);
91191
+ const b4 = parseInt(hex.substring(4, 6), 16);
91192
+ return { r, g: g2, b: b4 };
91193
+ }
91187
91194
  function setRootColors(colors) {
91188
- var r = document.querySelector(":root");
91195
+ const r = document.querySelector(":root");
91189
91196
  for (const key in colors) {
91190
- const colorValue = colors[key];
91191
- r.style.setProperty(`--${key}`, colorValue);
91197
+ const colorHex = colors[key];
91198
+ const rgbColor = hexToRgb(colors[key]);
91199
+ r.style.setProperty(`--${key}`, colorHex);
91200
+ r.style.setProperty(`--${key}-rgb`, `${rgbColor.r}, ${rgbColor.g}, ${rgbColor.b}`);
91192
91201
  }
91193
91202
  }
91194
91203
  function getCleekOptions(userOptions) {