nve-designsystem 0.1.19 → 0.1.21

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.
@@ -1,9 +1,17 @@
1
1
  import { SlAlert } from '@shoelace-style/shoelace';
2
+ /**
3
+ * En Shoelace-alert med Nve styling
4
+ * Se https://shoelace.style/components/alert
5
+ */
2
6
  export default class NveAlert extends SlAlert {
3
7
  constructor();
8
+ /** Tykk tekst, vises helt til venstre */
4
9
  title: string;
10
+ /** Tynnere beskrivelse tekst */
5
11
  text: string;
12
+ /** Bestemmer sterkere bakgrunnsfarge */
6
13
  emphasized: boolean;
14
+ /** Ramme linje til venstre */
7
15
  leftStroke: boolean;
8
16
  static styles: import("lit").CSSResultGroup[];
9
17
  updated(changedProperties: any): void;
@@ -17615,7 +17615,7 @@ let ye = class extends bi {
17615
17615
  super(), this.title = "", this.text = "", this.emphasized = !1, this.leftStroke = !1;
17616
17616
  }
17617
17617
  updated(t) {
17618
- t.has("title") && this.style.setProperty("--nve-alert-title", `"${this.title}"`), t.has("text") && this.style.setProperty("--nve-alert-text", `"${this.text}"`);
17618
+ super.updated(t), t.has("title") && this.style.setProperty("--nve-alert-title", `"${this.title}"`), t.has("text") && this.style.setProperty("--nve-alert-text", `"${this.text}"`);
17619
17619
  }
17620
17620
  };
17621
17621
  ye.styles = [
@@ -7168,7 +7168,7 @@
7168
7168
  :host([leftStroke][emphasized]) .alert--warning {
7169
7169
  border-color: var(--feedback-background-default-warning);
7170
7170
  }
7171
- `;var nd=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,po=(t,e,o,r)=>{for(var i=r>1?void 0:r?ld(e,o):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&nd(e,o,i),i};_.NveAlert=class extends Zi{constructor(){super(),this.title="",this.text="",this.emphasized=!1,this.leftStroke=!1}updated(e){e.has("title")&&this.style.setProperty("--nve-alert-title",`"${this.title}"`),e.has("text")&&this.style.setProperty("--nve-alert-text",`"${this.text}"`)}},_.NveAlert.styles=[Zi.styles,ad],po([l({reflect:!0})],_.NveAlert.prototype,"title",2),po([l({reflect:!0})],_.NveAlert.prototype,"text",2),po([l({type:Boolean,reflect:!0})],_.NveAlert.prototype,"emphasized",2),po([l({type:Boolean,reflect:!0})],_.NveAlert.prototype,"leftStroke",2),_.NveAlert=po([nt("nve-alert")],_.NveAlert);const cd=C`
7171
+ `;var nd=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,po=(t,e,o,r)=>{for(var i=r>1?void 0:r?ld(e,o):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(i=(r?n(e,o,i):n(i))||i);return r&&i&&nd(e,o,i),i};_.NveAlert=class extends Zi{constructor(){super(),this.title="",this.text="",this.emphasized=!1,this.leftStroke=!1}updated(e){super.updated(e),e.has("title")&&this.style.setProperty("--nve-alert-title",`"${this.title}"`),e.has("text")&&this.style.setProperty("--nve-alert-text",`"${this.text}"`)}},_.NveAlert.styles=[Zi.styles,ad],po([l({reflect:!0})],_.NveAlert.prototype,"title",2),po([l({reflect:!0})],_.NveAlert.prototype,"text",2),po([l({type:Boolean,reflect:!0})],_.NveAlert.prototype,"emphasized",2),po([l({type:Boolean,reflect:!0})],_.NveAlert.prototype,"leftStroke",2),_.NveAlert=po([nt("nve-alert")],_.NveAlert);const cd=C`
7172
7172
  /* kan ikke bruke gap fordi den lager rom mellom slots selv om de er tomme */
7173
7173
  /* derfor setter margin på ::part(label) og substraherer margin verdi i horizontal padding i selve .button klassen */
7174
7174
  .button {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nve-designsystem",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "main": "./nve-designsystem.umd.cjs",
5
5
  "module": "./nve-designsystem.js",
6
6
  "type": "module",