@proximus/lavender-common 0.1.0-alpha.60 → 1.0.0-alpha.62

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 +75 -68
  2. package/package.json +4 -3
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ function d(o) {
5
5
  }
6
6
  const b = new CSSStyleSheet();
7
7
  b.replaceSync(u);
8
- class n extends HTMLElement {
8
+ class p extends HTMLElement {
9
9
  static get observedAttributes() {
10
10
  return [
11
11
  "grow",
@@ -58,7 +58,7 @@ class n extends HTMLElement {
58
58
  ];
59
59
  }
60
60
  attributeChangedCallback(t, s, e) {
61
- if (n.observedAttributes.indexOf(t) !== -1)
61
+ if (p.observedAttributes.indexOf(t) !== -1)
62
62
  switch (t) {
63
63
  case "grow":
64
64
  case "grow--mobile":
@@ -122,32 +122,32 @@ class n extends HTMLElement {
122
122
  console.error(`Bad ${t} value for`, this.$el);
123
123
  return;
124
124
  }
125
- const a = t.indexOf("--") > -1, r = a ? t.split("--")[0] : t, l = [];
125
+ const a = t.indexOf("--") > -1, r = a ? t.split("--")[0] : t, n = [];
126
126
  if (!a)
127
- this.getAttribute(r + "--mobile") || l.push("mobile"), this.getAttribute(r + "--tablet") || l.push("tablet"), this.getAttribute(r + "--laptop") || l.push("laptop"), this.getAttribute(r + "--desktop") || l.push("desktop"), l.forEach((p) => {
128
- n.prototype.updateStyle.call(
127
+ this.getAttribute(r + "--mobile") || n.push("mobile"), this.getAttribute(r + "--tablet") || n.push("tablet"), this.getAttribute(r + "--laptop") || n.push("laptop"), this.getAttribute(r + "--desktop") || n.push("desktop"), n.forEach((l) => {
128
+ p.prototype.updateStyle.call(
129
129
  this,
130
130
  r,
131
- p,
131
+ l,
132
132
  s
133
- ), n.prototype.updateStyle.call(
133
+ ), p.prototype.updateStyle.call(
134
134
  this,
135
135
  r,
136
- p,
136
+ l,
137
137
  e
138
138
  );
139
139
  });
140
140
  else {
141
- const p = t.split("--")[1];
142
- n.prototype.updateStyle.call(
141
+ const l = t.split("--")[1];
142
+ p.prototype.updateStyle.call(
143
143
  this,
144
144
  r,
145
- p,
145
+ l,
146
146
  s
147
- ), n.prototype.updateStyle.call(
147
+ ), p.prototype.updateStyle.call(
148
148
  this,
149
149
  r,
150
- p,
150
+ l,
151
151
  e
152
152
  );
153
153
  }
@@ -409,7 +409,7 @@ class n extends HTMLElement {
409
409
  this.setAttribute("order--desktop", t);
410
410
  }
411
411
  }
412
- class k extends n {
412
+ class k extends p {
413
413
  static get observedAttributes() {
414
414
  return [
415
415
  ...super.observedAttributes,
@@ -523,7 +523,7 @@ const y = [
523
523
  "heading-l",
524
524
  "heading-m",
525
525
  "heading-s"
526
- ], S = [
526
+ ], v = [
527
527
  "",
528
528
  "default",
529
529
  "inherit",
@@ -541,7 +541,7 @@ const y = [
541
541
  "purpose-error",
542
542
  "purpose-unlimited",
543
543
  "purpose-promo"
544
- ], v = [
544
+ ], S = [
545
545
  "",
546
546
  "default",
547
547
  "inherit",
@@ -549,7 +549,7 @@ const y = [
549
549
  "bold",
550
550
  "extrabold",
551
551
  "light"
552
- ], x = [
552
+ ], $ = [
553
553
  "",
554
554
  "default",
555
555
  "2xs",
@@ -559,7 +559,7 @@ const y = [
559
559
  "l",
560
560
  "xl",
561
561
  "2xl"
562
- ], j = ["", "default", "left", "center", "right"], $ = ["", "none", "2xs", "xs", "s", "m", "l"], C = ["", "none", "s", "m", "l"], N = ["", "none", "main", "pill"], M = [
562
+ ], j = ["", "default", "left", "center", "right"], x = ["", "none", "2xs", "xs", "s", "m", "l"], C = ["", "none", "s", "m", "l"], M = ["", "none", "main", "pill"], L = [
563
563
  "none",
564
564
  "container-main",
565
565
  "container-brand",
@@ -570,7 +570,7 @@ const y = [
570
570
  "purpose-warning",
571
571
  "purpose-error",
572
572
  "purpose-unlimited"
573
- ], L = [
573
+ ], T = [
574
574
  "",
575
575
  "all",
576
576
  "top",
@@ -579,7 +579,7 @@ const y = [
579
579
  "left",
580
580
  "block",
581
581
  "inline"
582
- ], T = [
582
+ ], D = [
583
583
  "",
584
584
  "none",
585
585
  "container-neutral-bare",
@@ -587,6 +587,7 @@ const y = [
587
587
  "container-light",
588
588
  "container-soft",
589
589
  "container-neutral-rich",
590
+ "container-brand-primary",
590
591
  "container-brand-secondary",
591
592
  "action-primary",
592
593
  "action-secondary",
@@ -605,7 +606,7 @@ const y = [
605
606
  "purpose-info",
606
607
  "purpose-eco",
607
608
  "purpose-notification"
608
- ], D = ["", "cover", "contain", "default"], P = ["", "none", "s", "m", "l", "xl"], V = [
609
+ ], N = ["", "cover", "contain", "default"], G = ["", "none", "s", "m", "l", "xl"], O = [
609
610
  "",
610
611
  "default",
611
612
  "title-4xl",
@@ -616,7 +617,7 @@ const y = [
616
617
  "title-m",
617
618
  "title-s",
618
619
  "subtitle"
619
- ], G = [
620
+ ], q = [
620
621
  "",
621
622
  "purple-top-red",
622
623
  "purple-top-magenta",
@@ -666,7 +667,7 @@ const y = [
666
667
  "color-bottom-right-blue",
667
668
  "color-bottom-right-turquoise",
668
669
  "color-bottom-right-green"
669
- ], O = [
670
+ ], V = [
670
671
  "after-element-none",
671
672
  "after-element-2xs",
672
673
  "after-element-xs",
@@ -681,35 +682,35 @@ const y = [
681
682
  "inside-section-default",
682
683
  "inside-section-l",
683
684
  "between-sections"
684
- ], q = [
685
+ ], B = [
685
686
  "",
686
687
  "all",
687
688
  "top",
688
689
  "right",
689
690
  "bottom",
690
691
  "left"
691
- ], B = [
692
+ ], R = [
692
693
  "",
693
694
  "default",
694
695
  "xs",
695
696
  "s",
696
697
  "l",
697
698
  "2xl"
698
- ], R = ["", "default", "s", "m", "l"];
699
- function z(o) {
699
+ ], z = ["", "default", "s", "m", "l"];
700
+ function H(o) {
700
701
  const t = document.createElement("style");
701
702
  t.innerHTML = o, document.head.appendChild(t);
702
703
  }
703
- function H(o) {
704
+ function E(o) {
704
705
  return typeof o == "string" && (o === "false" || o === "0" || o === "null") || typeof o == "boolean" && !o;
705
706
  }
706
- function E() {
707
+ function F() {
707
708
  return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
708
709
  }
709
- function F(o, t) {
710
+ function I(o, t) {
710
711
  return o.includes(t);
711
712
  }
712
- function I(o, t) {
713
+ function J(o, t) {
713
714
  var e;
714
715
  [
715
716
  "aria-label",
@@ -751,40 +752,46 @@ function I(o, t) {
751
752
  const s = `px-${((e = t.localName) == null ? void 0 : e.toLowerCase()) ?? "component"}-${Math.random().toString(36).substring(2, 15)}`;
752
753
  t.setAttribute("id", s), o.setAttribute("aria-labelledby", s);
753
754
  }
754
- function J(o, t, s, e = "") {
755
- const i = new CSSStyleSheet(), a = s.reduce(
756
- (r, l) => r + `
755
+ function U(o, t, s, e = "", i) {
756
+ const a = new CSSStyleSheet(), r = s.reduce(
757
+ (n, l) => n + `
757
758
  ${t(o, l)} {
758
- ${o}: var(--${e}-${l}-desktop);
759
- @media only screen and (max-width: 768px) {
759
+ @media only screen and (max-width: 767px) {
760
760
  ${o}: var(--${e}-${l}-mobile);
761
+ ${i ? `${i}: var(--${e}-${l}-mobile)` : ""}
761
762
  }
763
+ ${o}: var(--${e}-${l}-desktop);
764
+ ${i ? `${i}:var(--${e}-${l}-desktop)` : ""}
762
765
  }
763
766
  ${t(o, l, "mobile")} {
764
- @media only screen and (max-width: 768px) {
767
+ @media only screen and (max-width: 767px) {
765
768
  ${o}: var(--${e}-${l}-mobile) !important;
769
+ ${i ? `${i}: var(--${e}-${l}-mobile)` : ""}
766
770
  }
767
771
  }
768
772
  ${t(o, l, "tablet")} {
769
- @media only screen and (min-width: 769px) {
770
- ${o}: var(--${e}-${l}-tablet) !important;
773
+ @media only screen and (min-width: 768px) {
774
+ ${o}: var(--${e}-${l}-desktop) !important;
775
+ ${i ? `${i}: var(--${e}-${l}-desktop)` : ""}
771
776
  }
772
777
  }
773
778
  ${t(o, l, "laptop")} {
774
- @media only screen and (min-width: 769px) {
775
- ${o}: var(--${e}-${l}-laptop) !important;
779
+ @media only screen and (min-width: 768px) {
780
+ ${o}: var(--${e}-${l}-desktop) !important;
781
+ ${i ? `${i}: var(--${e}-${l}-desktop)` : ""}
776
782
  }
777
783
  }
778
784
  ${t(o, l, "desktop")} {
779
- @media only screen and (min-width: 769px) {
785
+ @media only screen and (min-width: 768px) {
780
786
  ${o}: var(--${e}-${l}-desktop) !important;
787
+ ${i ? `${i}: var(--${e}-${l}-desktop)` : ""}
781
788
  }
782
789
  }`,
783
790
  ""
784
791
  );
785
- return i.replaceSync(a), i;
792
+ return a.replaceSync(r), a;
786
793
  }
787
- class U {
794
+ class K {
788
795
  constructor(t, s, e, i) {
789
796
  this.component = t, this.attributeName = s, this.cssVariable = i, 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(
790
797
  this.component,
@@ -865,40 +872,40 @@ class U {
865
872
  }
866
873
  }
867
874
  export {
868
- U as AttributeBreakpointHandlerDelegate,
875
+ K as AttributeBreakpointHandlerDelegate,
869
876
  k as PxElement,
870
- n as WithExtraAttributes,
871
- z as addGlobalStylesheet,
872
- B as assetContainerIconSizeValues,
873
- R as assetContainerImgWidthValues,
874
- T as backgroundColorValues,
875
- D as backgroundSizeValues,
876
- M as borderColorValues,
877
- N as borderRadiusValues,
878
- L as borderSideValues,
877
+ p as WithExtraAttributes,
878
+ H as addGlobalStylesheet,
879
+ R as assetContainerIconSizeValues,
880
+ z as assetContainerImgWidthValues,
881
+ D as backgroundColorValues,
882
+ N as backgroundSizeValues,
883
+ L as borderColorValues,
884
+ M as borderRadiusValues,
885
+ T as borderSideValues,
879
886
  C as borderValues,
880
- P as boxShadowValues,
881
- F as checkName,
882
- S as colorValues,
887
+ G as boxShadowValues,
888
+ I as checkName,
889
+ v as colorValues,
883
890
  c as cssGridAlignSelfValues,
884
891
  f as cssGridColSpanValues,
885
892
  g as cssGridJustifySelfValues,
886
893
  m as cssGridOrderValues,
887
894
  A as cssGridPlaceSelfValues,
888
- J as cssTokenBreakpoints,
895
+ U as cssTokenBreakpoints,
889
896
  h as flexboxAlignSelfValues,
890
897
  w as fontsizeValues,
891
- v as fontweightValues,
892
- O as gapValues,
898
+ S as fontweightValues,
899
+ V as gapValues,
893
900
  d as getSupportedAttributeNames,
894
- E as getViewportFormat,
895
- G as gradientValues,
901
+ F as getViewportFormat,
902
+ q as gradientValues,
896
903
  y as gridGapValues,
897
- V as headingValues,
898
- x as iconSizeValues,
899
- H as isFalsy,
900
- q as noBorderRadiusValues,
901
- $ as paddingValues,
904
+ O as headingValues,
905
+ $ as iconSizeValues,
906
+ E as isFalsy,
907
+ B as noBorderRadiusValues,
908
+ x as paddingValues,
902
909
  j as textalignValues,
903
- I as transferAccessibilityAttributes
910
+ J as transferAccessibilityAttributes
904
911
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-common",
3
- "version": "0.1.0-alpha.60",
3
+ "version": "1.0.0-alpha.62",
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": "6d1c890b588cd289da6cdae5d4884eaecfab5bc5",
27
+ "gitHead": "ea5946118576717674836f6a121d6daea77d2a09",
28
28
  "lerna": {
29
29
  "command": {
30
30
  "publish": {
@@ -37,7 +37,8 @@
37
37
  "dist/js/**/*.js",
38
38
  "dist/*.svg",
39
39
  "dist/*.ttf",
40
- "dist/glyphmap.json"
40
+ "dist/glyphmap.json",
41
+ "dist/*.d.ts"
41
42
  ]
42
43
  }
43
44
  }