@proximus/lavender-color-option 1.4.18-beta.1 → 1.4.18
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 +9 -3
- package/dist/web-types.json +3 -3
- package/package.json +1 -1
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
|
-
|
|
2
|
+
//#region 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,7 +39,11 @@ var s = [
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
updateSize(e, n, i, a) {
|
|
42
|
-
t(a, i)
|
|
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}`);
|
|
43
47
|
}
|
|
44
48
|
updateDeviceColor(e, t, n) {
|
|
45
49
|
t !== null && t !== "" && this.$el.style.setProperty("--color-option-device-color", t), n !== null && n !== "" && this.$el.style.setProperty("--color-option-device-color", n);
|
|
@@ -64,7 +68,8 @@ var s = [
|
|
|
64
68
|
}
|
|
65
69
|
};
|
|
66
70
|
customElements.get("px-color-option") || customElements.define("px-color-option", c);
|
|
67
|
-
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/color-option-link.css?inline
|
|
68
73
|
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();
|
|
69
74
|
u.replaceSync(l);
|
|
70
75
|
var d = "px.lavender.color-option-link.click", f = class t extends e {
|
|
@@ -133,4 +138,5 @@ var d = "px.lavender.color-option-link.click", f = class t extends e {
|
|
|
133
138
|
}
|
|
134
139
|
};
|
|
135
140
|
customElements.get("px-color-option-link") || customElements.define("px-color-option-link", f);
|
|
141
|
+
//#endregion
|
|
136
142
|
export { c as ColorOption, f as ColorOptionLink, s as colorOptionSizeValues };
|
package/dist/web-types.json
CHANGED
|
@@ -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.18
|
|
4
|
+
"version": "1.4.18",
|
|
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",
|
|
11
|
+
"description": "\n\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### **Events:**\n - **CLICK_EVENT**",
|
|
30
|
+
"description": "\n\n---\n\n\n### **Events:**\n - **CLICK_EVENT**",
|
|
31
31
|
"doc-url": "",
|
|
32
32
|
"attributes": [
|
|
33
33
|
{ "name": "device-color", "value": { "type": "string" } },
|