@proximus/lavender-color-option 1.4.17-beta.2 → 1.4.17-beta.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/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PxElement as e, checkName as t, createTemplate as n, log as r, renderTemplate as i } from "@proximus/lavender-common";
2
- //#region src/color-option.css?inline
2
+ // src/color-option.css?inline
3
3
  var a = ":host{line-height:0;display:inline-block}:host *{box-sizing:border-box}.color-option{border-radius:var(--px-radius-pill);background-color:var(--color-option-device-color);border:var(--px-size-border-m) var(--px-color-border-main-default) solid;width:32px;display:inline-block;height:32px!important}.color-option[unavailable]{position:relative}.color-option[unavailable]:before{content:\"\";width:44px;height:var(--px-size-border-m);background-color:var(--px-color-border-neutral-default);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-45deg)}.color-option--size-small{border-width:var(--px-size-border-s);width:16px;height:16px!important}.color-option--size-small[unavailable]:before{width:22px;height:var(--px-size-border-s)}", o = new CSSStyleSheet();
4
4
  o.replaceSync(a);
5
5
  var s = [
@@ -39,11 +39,7 @@ var s = [
39
39
  }
40
40
  }
41
41
  updateSize(e, n, i, a) {
42
- if (!t(a, i)) {
43
- r(`"${i}" is not a valid ${e} value for a color option. Allowed values are: "${a.join("\", \"")}".`);
44
- return;
45
- }
46
- n !== null && n !== "" && n !== "default" && this.$el.classList.toggle(`color-option--size-${n}`), i !== null && i !== "" && i !== "default" && this.$el.classList.toggle(`color-option--size-${i}`);
42
+ t(a, i) ? (n !== null && n !== "" && n !== "default" && this.$el.classList.toggle(`color-option--size-${n}`), i !== null && i !== "" && i !== "default" && this.$el.classList.toggle(`color-option--size-${i}`)) : r(`"${i}" is not a valid ${e} value for a color option. Allowed values are: "${a.join("\", \"")}".`);
47
43
  }
48
44
  updateDeviceColor(e, t, n) {
49
45
  t !== null && t !== "" && this.$el.style.setProperty("--color-option-device-color", t), n !== null && n !== "" && this.$el.style.setProperty("--color-option-device-color", n);
@@ -68,8 +64,7 @@ var s = [
68
64
  }
69
65
  };
70
66
  customElements.get("px-color-option") || customElements.define("px-color-option", c);
71
- //#endregion
72
- //#region src/color-option-link.css?inline
67
+ // src/color-option-link.css?inline
73
68
  var l = ":host{line-height:0;display:inline-block}:host *{box-sizing:border-box}.color-option-link{padding:var(--px-padding-2xs-mobile);border-radius:var(--px-radius-pill);--btn-transition:all .2s ease-in-out 0s;transition:var(--btn-transition);text-decoration:none;display:inline-block}.color-option-link[selected]{box-shadow:inset 0px 0px 0px var(--px-size-border-m) var(--px-color-border-brand-default)}.color-option-link:hover{box-shadow:inset 0px 0px 0px var(--px-size-border-s) var(--px-color-border-neutral-default)}.color-option-link:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}@media screen and (width>=48rem){.color-option-link{padding:var(--px-padding-2xs-tablet)}.color-option-link:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}}@media screen and (width>=64.0625rem){.color-option-link{padding:var(--px-padding-2xs-laptop)}.color-option-link:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}}@media screen and (width>=90.0625rem){.color-option-link{padding:var(--px-padding-2xs-desktop)}.color-option-link:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}", u = new CSSStyleSheet();
74
69
  u.replaceSync(l);
75
70
  var d = "px.lavender.color-option-link.click", f = class t extends e {
@@ -138,5 +133,4 @@ var d = "px.lavender.color-option-link.click", f = class t extends e {
138
133
  }
139
134
  };
140
135
  customElements.get("px-color-option-link") || customElements.define("px-color-option-link", f);
141
- //#endregion
142
136
  export { c as ColorOption, f as ColorOptionLink, s as colorOptionSizeValues };
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@proximus/lavender-color-option",
4
- "version": "1.4.17-beta.2",
4
+ "version": "1.4.17-beta.3",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "px-color-option",
11
- "description": "\n\n---\n",
11
+ "description": "\n---\n",
12
12
  "doc-url": "",
13
13
  "attributes": [
14
14
  { "name": "size", "value": { "type": "string" } },
@@ -27,7 +27,7 @@
27
27
  },
28
28
  {
29
29
  "name": "px-color-option-link",
30
- "description": "\n\n---\n\n\n### **Events:**\n - **CLICK_EVENT**",
30
+ "description": "\n---\n\n\n### **Events:**\n - **CLICK_EVENT**",
31
31
  "doc-url": "",
32
32
  "attributes": [
33
33
  { "name": "device-color", "value": { "type": "string" } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-color-option",
3
- "version": "1.4.17-beta.2",
3
+ "version": "1.4.17-beta.3",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",