@proximus/lavender-common 1.0.0-alpha.63 → 1.0.0-alpha.64

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.
Files changed (2) hide show
  1. package/dist/index.js +44 -54
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- const b = ":host([grow]){flex-grow:var(--grow-value)}:host([shrink]){flex-shrink:var(--shrink-value)}:host([basis]){flex-basis:var(--basis-value)}:host([align-self]){align-self:var(--align-self-value)}:host([col-span]){grid-column:span var(--col-span-value) / span var(--col-span-value)}:host([justify-self]){justify-self:var(--justify-value)}:host([order]){order:var(--order--value)}:host([hidden]){display:none}::slotted(*[shown--sr]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media screen and (max-width: 767px){:host([hidden--mobile]){display:none}:host([grow--mobile]){flex-grow:var(--grow--mobile-value)!important}:host([shrink--mobile]){flex-shrink:var(--shrink--mobile-value)!important}:host([basis--mobile]){flex-basis:var(--basis--mobile-value)!important}:host([align-self--mobile]){align-self:var(--align-self--mobile-value)!important}:host([col-span--mobile]){grid-column:span var(--col-span--mobile-value) / span var(--col-span--tablet-value)!important}:host([justify-self--mobile]){justify-self:var(--justify-self--mobile-value)!important}:host([order--mobile]){order:var(--order--mobile-value)!important}}@media screen and (min-width: 768px) and (max-width: 1024px){:host([hidden--tablet]){display:none}:host([grow--tablet]){flex-grow:var(--grow--tablet-value)!important}:host([shrink--tablet]){flex-shrink:var(--shrink--tablet-value)!important}:host([basis--tablet]){flex-basis:var(--basis--tablet-value)!important}:host([align-self--tablet]){align-self:var(--align-self--tablet-value)!important}:host([col-span--tablet]){grid-column:span var(--col-span--tablet-value) / span var(--col-span--tablet-value)!important}:host([justify-self--tablet]){justify-self:var(--justify-self--tablet-value)!important}:host([order--tablet]){order:var(--order--tablet-value)!important}}@media screen and (min-width: 1025px) and (max-width: 1440px){:host([hidden--laptop]){display:none!important}:host([grow--laptop]){flex-grow:var(--grow--laptop-value)!important}:host([shrink--laptop]){flex-shrink:var(--shrink--laptop-value)!important}:host([basis--laptop]){flex-basis:var(--basis--laptop-value)!important}:host([align-self--laptop]){align-self:var(--align-self--laptop-value)!important}:host([col-span--laptop]){grid-column:span var(--col-span--laptop-value) / span var(--col-span--laptop-value)!important}:host([justify-self--laptop]){justify-self:var(--justify-self--laptop-value)!important}:host([order--laptop]){order:var(--order--laptop-value)!important}}@media screen and (min-width: 1441px){:host([col-span--desktop]){grid-column:span var(--col-span--desktop-value) / span var(--col-span--desktop-value)!important}:host([justify-self--desktop]){justify-self:var(--justify-self--desktop-value)!important}:host([order--desktop]){order:var(--order--desktop-value)!important}:host([hidden--desktop]){display:none!important}:host([grow--desktop]){flex-grow:var(--grow--desktop-value)!important}:host([shrink--desktop]){flex-shrink:var(--shrink--desktop-value)!important}:host([basis--desktop]){flex-basis:var(--basis--desktop-value)!important}:host([align-self--desktop]){align-self:var(--align-self--desktop-value)!important}}";
2
- function u(i) {
1
+ const b = ":host([grow]){flex-grow:var(--grow-value)}:host([shrink]){flex-shrink:var(--shrink-value)}:host([basis]){flex-basis:var(--basis-value)}:host([align-self]){align-self:var(--align-self-value)}:host([col-span]){grid-column:span var(--col-span-value) / span var(--col-span-value)}:host([justify-self]){justify-self:var(--justify-value)}:host([order]){order:var(--order--value)}:host([hidden]){display:none}::slotted(*[shown--sr]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media screen and (max-width: 767px){:host([hidden--mobile]){display:none}:host([grow--mobile]){flex-grow:var(--grow--mobile-value)!important}:host([shrink--mobile]){flex-shrink:var(--shrink--mobile-value)!important}:host([basis--mobile]){flex-basis:var(--basis--mobile-value)!important}:host([align-self--mobile]){align-self:var(--align-self--mobile-value)!important}:host([col-span--mobile]){grid-column:span var(--col-span--mobile-value) / span var(--col-span--mobile-value)!important}:host([justify-self--mobile]){justify-self:var(--justify-self--mobile-value)!important}:host([order--mobile]){order:var(--order--mobile-value)!important}::slotted(*[shown--sr--mobile]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 768px) and (max-width: 1024px){:host([hidden--tablet]){display:none}:host([grow--tablet]){flex-grow:var(--grow--tablet-value)!important}:host([shrink--tablet]){flex-shrink:var(--shrink--tablet-value)!important}:host([basis--tablet]){flex-basis:var(--basis--tablet-value)!important}:host([align-self--tablet]){align-self:var(--align-self--tablet-value)!important}:host([col-span--tablet]){grid-column:span var(--col-span--tablet-value) / span var(--col-span--tablet-value)!important}:host([justify-self--tablet]){justify-self:var(--justify-self--tablet-value)!important}:host([order--tablet]){order:var(--order--tablet-value)!important}::slotted(*[shown--sr--tablet]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 1025px){::slotted(*[shown--sr--laptop]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 1025px) and (max-width: 1440px){:host([hidden--laptop]){display:none!important}:host([grow--laptop]){flex-grow:var(--grow--laptop-value)!important}:host([shrink--laptop]){flex-shrink:var(--shrink--laptop-value)!important}:host([basis--laptop]){flex-basis:var(--basis--laptop-value)!important}:host([align-self--laptop]){align-self:var(--align-self--laptop-value)!important}:host([col-span--laptop]){grid-column:span var(--col-span--laptop-value) / span var(--col-span--laptop-value)!important}:host([justify-self--laptop]){justify-self:var(--justify-self--laptop-value)!important}:host([order--laptop]){order:var(--order--laptop-value)!important}}@media screen and (min-width: 1441px){:host([col-span--desktop]){grid-column:span var(--col-span--desktop-value) / span var(--col-span--desktop-value)!important}:host([justify-self--desktop]){justify-self:var(--justify-self--desktop-value)!important}:host([order--desktop]){order:var(--order--desktop-value)!important}:host([hidden--desktop]){display:none!important}:host([grow--desktop]){flex-grow:var(--grow--desktop-value)!important}:host([shrink--desktop]){flex-shrink:var(--shrink--desktop-value)!important}:host([basis--desktop]){flex-basis:var(--basis--desktop-value)!important}:host([align-self--desktop]){align-self:var(--align-self--desktop-value)!important}}";
2
+ function h(i) {
3
3
  const t = document.createElement(i), s = Object.getPrototypeOf(t);
4
4
  return Object.getOwnPropertyNames(s);
5
5
  }
6
- const h = new CSSStyleSheet();
7
- h.replaceSync(b);
6
+ const u = new CSSStyleSheet();
7
+ u.replaceSync(b);
8
8
  class p extends HTMLElement {
9
9
  static get observedAttributes() {
10
10
  return [
@@ -53,7 +53,7 @@ class p extends HTMLElement {
53
53
  }
54
54
  constructor(...t) {
55
55
  super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [
56
- h,
56
+ u,
57
57
  ...t
58
58
  ];
59
59
  }
@@ -122,32 +122,22 @@ class p extends HTMLElement {
122
122
  console.error(`Bad ${t} value for`, this.$el);
123
123
  return;
124
124
  }
125
- const a = t.indexOf("--") > -1, l = a ? t.split("--")[0] : t, n = [];
125
+ const a = t.indexOf("--") > -1, l = a ? t.split("--")[0] : t;
126
126
  if (!a)
127
- this.getAttribute(l + "--mobile") || n.push("mobile"), this.getAttribute(l + "--tablet") || n.push("tablet"), this.getAttribute(l + "--laptop") || n.push("laptop"), this.getAttribute(l + "--desktop") || n.push("desktop"), n.forEach((r) => {
128
- p.prototype.updateStyle.call(
129
- this,
130
- l,
131
- r,
132
- s
133
- ), p.prototype.updateStyle.call(
134
- this,
135
- l,
136
- r,
137
- e
138
- );
139
- });
127
+ this.style.setProperty(
128
+ `--${l}-value`,
129
+ s
130
+ ), this.style.setProperty(
131
+ `--${l}-value`,
132
+ e
133
+ );
140
134
  else {
141
- const r = t.split("--")[1];
142
- p.prototype.updateStyle.call(
143
- this,
144
- l,
145
- r,
135
+ const n = t.split("--")[1];
136
+ this.style.setProperty(
137
+ `--${l}--${n}-value`,
146
138
  s
147
- ), p.prototype.updateStyle.call(
148
- this,
149
- l,
150
- r,
139
+ ), this.style.setProperty(
140
+ `--${l}--${n}-value`,
151
141
  e
152
142
  );
153
143
  }
@@ -413,7 +403,7 @@ class k extends p {
413
403
  static get observedAttributes() {
414
404
  return [
415
405
  ...super.observedAttributes,
416
- ...u(this.nativeName)
406
+ ...h(this.nativeName)
417
407
  ];
418
408
  }
419
409
  attributeChangedCallback(t, s, e) {
@@ -424,7 +414,7 @@ class k extends p {
424
414
  }
425
415
  connectedCallback() {
426
416
  var t;
427
- for (const s of u(this.nativeName))
417
+ for (const s of h(this.nativeName))
428
418
  s !== "constructor" && Object.defineProperty(this, s, {
429
419
  get() {
430
420
  return this.$el[s];
@@ -523,7 +513,7 @@ const v = [
523
513
  "heading-l",
524
514
  "heading-m",
525
515
  "heading-s"
526
- ], S = [
516
+ ], w = [
527
517
  "",
528
518
  "default",
529
519
  "inherit",
@@ -541,7 +531,7 @@ const v = [
541
531
  "purpose-error",
542
532
  "purpose-unlimited",
543
533
  "purpose-promo"
544
- ], w = [
534
+ ], S = [
545
535
  "",
546
536
  "default",
547
537
  "inherit",
@@ -689,28 +679,28 @@ const v = [
689
679
  "right",
690
680
  "bottom",
691
681
  "left"
692
- ], R = [
682
+ ], E = [
693
683
  "",
694
684
  "default",
695
685
  "xs",
696
686
  "s",
697
687
  "l",
698
688
  "2xl"
699
- ], z = ["", "default", "s", "m", "l"];
700
- function H(i) {
689
+ ], R = ["", "default", "s", "m", "l"];
690
+ function z(i) {
701
691
  const t = document.createElement("style");
702
692
  t.innerHTML = i, document.head.appendChild(t);
703
693
  }
704
- function E(i) {
694
+ function _(i) {
705
695
  return typeof i == "string" && (i === "false" || i === "0" || i === "null") || typeof i == "boolean" && !i;
706
696
  }
707
- function F() {
697
+ function H() {
708
698
  return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
709
699
  }
710
- function I(i, t) {
700
+ function P(i, t) {
711
701
  return i.includes(t);
712
702
  }
713
- function J(i, t) {
703
+ function F(i, t) {
714
704
  var e;
715
705
  [
716
706
  "aria-label",
@@ -752,7 +742,7 @@ function J(i, t) {
752
742
  const s = `px-${((e = t.localName) == null ? void 0 : e.toLowerCase()) ?? "component"}-${Math.random().toString(36).substring(2, 15)}`;
753
743
  t.setAttribute("id", s), i.setAttribute("aria-labelledby", s);
754
744
  }
755
- function U(i, t, s, e = "", o) {
745
+ function I(i, t, s, e = "", o) {
756
746
  const a = new CSSStyleSheet(), l = s.reduce(
757
747
  (n, r) => n + `
758
748
  ${t(i, r)} {
@@ -770,7 +760,7 @@ function U(i, t, s, e = "", o) {
770
760
  }
771
761
  }
772
762
  ${t(i, r, "tablet")} {
773
- @media only screen and (min-width: 768px) {
763
+ @media only screen and (min-width: 768px) and (max-width: 1024px) {
774
764
  ${i}: var(--${e}-${r}-desktop) !important;
775
765
  ${o ? `${o}: var(--${e}-${r}-desktop)` : ""}
776
766
  }
@@ -791,7 +781,7 @@ function U(i, t, s, e = "", o) {
791
781
  );
792
782
  return a.replaceSync(l), a;
793
783
  }
794
- class K {
784
+ class J {
795
785
  constructor(t, s, e, o) {
796
786
  this.component = t, this.attributeName = s, this.cssVariable = o, this.attributeNameMobile = `${this.attributeName}--mobile`, this.attributeNameTablet = `${this.attributeName}--tablet`, this.attributeNameLaptop = `${this.attributeName}--laptop`, this.attributeNameDesktop = `${this.attributeName}--desktop`, this._attributeValue = e, Object.defineProperty(
797
787
  this.component,
@@ -872,12 +862,12 @@ class K {
872
862
  }
873
863
  }
874
864
  export {
875
- K as AttributeBreakpointHandlerDelegate,
865
+ J as AttributeBreakpointHandlerDelegate,
876
866
  k as PxElement,
877
867
  p as WithExtraAttributes,
878
- H as addGlobalStylesheet,
879
- R as assetContainerIconSizeValues,
880
- z as assetContainerImgWidthValues,
868
+ z as addGlobalStylesheet,
869
+ E as assetContainerIconSizeValues,
870
+ R as assetContainerImgWidthValues,
881
871
  D as backgroundColorValues,
882
872
  N as backgroundSizeValues,
883
873
  L as borderColorValues,
@@ -885,27 +875,27 @@ export {
885
875
  T as borderSideValues,
886
876
  C as borderValues,
887
877
  G as boxShadowValues,
888
- I as checkName,
889
- S as colorValues,
878
+ P as checkName,
879
+ w as colorValues,
890
880
  c as cssGridAlignSelfValues,
891
881
  f as cssGridColSpanValues,
892
882
  g as cssGridJustifySelfValues,
893
883
  m as cssGridOrderValues,
894
884
  y as cssGridPlaceSelfValues,
895
- U as cssTokenBreakpoints,
885
+ I as cssTokenBreakpoints,
896
886
  d as flexboxAlignSelfValues,
897
887
  A as fontsizeValues,
898
- w as fontweightValues,
888
+ S as fontweightValues,
899
889
  V as gapValues,
900
- u as getSupportedAttributeNames,
901
- F as getViewportFormat,
890
+ h as getSupportedAttributeNames,
891
+ H as getViewportFormat,
902
892
  q as gradientValues,
903
893
  v as gridGapValues,
904
894
  O as headingValues,
905
895
  $ as iconSizeValues,
906
- E as isFalsy,
896
+ _ as isFalsy,
907
897
  B as noBorderRadiusValues,
908
898
  j as paddingValues,
909
899
  x as textalignValues,
910
- J as transferAccessibilityAttributes
900
+ F as transferAccessibilityAttributes
911
901
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-common",
3
- "version": "1.0.0-alpha.63",
3
+ "version": "1.0.0-alpha.64",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -24,7 +24,7 @@
24
24
  "publishConfig": {
25
25
  "access": "public"
26
26
  },
27
- "gitHead": "2b9483c5b64a064d0565f622a10b344397d25b59",
27
+ "gitHead": "ee5ec31f1093c03eab455e20db8e1a8832f5123d",
28
28
  "lerna": {
29
29
  "command": {
30
30
  "publish": {