@politiet/sheriff-web-components 1.3.5 → 1.3.7

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 (93) hide show
  1. package/dist/sds-button/sds-button.component.d.ts +41 -0
  2. package/dist/sds-button/sds-button.component.d.ts.map +1 -0
  3. package/dist/sds-button/sds-button.component.js +155 -0
  4. package/dist/sds-button/sds-button.component.js.map +1 -0
  5. package/dist/sds-button/sds-button.d.ts +2 -39
  6. package/dist/sds-button/sds-button.d.ts.map +1 -1
  7. package/dist/sds-button/sds-button.js +2 -147
  8. package/dist/sds-button/sds-button.js.map +1 -1
  9. package/dist/sds-chip/sds-chip.d.ts +2 -0
  10. package/dist/sds-chip/sds-chip.d.ts.map +1 -1
  11. package/dist/sds-chip/sds-chip.js +14 -3
  12. package/dist/sds-chip/sds-chip.js.map +1 -1
  13. package/dist/sds-heading/sds-heading.component.d.ts +15 -0
  14. package/dist/sds-heading/sds-heading.component.d.ts.map +1 -0
  15. package/dist/sds-heading/sds-heading.component.js +53 -0
  16. package/dist/sds-heading/sds-heading.component.js.map +1 -0
  17. package/dist/sds-heading/sds-heading.d.ts +2 -13
  18. package/dist/sds-heading/sds-heading.d.ts.map +1 -1
  19. package/dist/sds-heading/sds-heading.js +2 -45
  20. package/dist/sds-heading/sds-heading.js.map +1 -1
  21. package/dist/sds-icon/sds-icon.component.d.ts +22 -0
  22. package/dist/sds-icon/sds-icon.component.d.ts.map +1 -0
  23. package/dist/sds-icon/sds-icon.component.js +81 -0
  24. package/dist/sds-icon/sds-icon.component.js.map +1 -0
  25. package/dist/sds-icon/sds-icon.d.ts +2 -20
  26. package/dist/sds-icon/sds-icon.d.ts.map +1 -1
  27. package/dist/sds-icon/sds-icon.js +3 -75
  28. package/dist/sds-icon/sds-icon.js.map +1 -1
  29. package/dist/sds-notification/sds-notification.component.d.ts +18 -0
  30. package/dist/sds-notification/sds-notification.component.d.ts.map +1 -0
  31. package/dist/sds-notification/sds-notification.component.js +71 -0
  32. package/dist/sds-notification/sds-notification.component.js.map +1 -0
  33. package/dist/sds-notification/sds-notification.d.ts +2 -14
  34. package/dist/sds-notification/sds-notification.d.ts.map +1 -1
  35. package/dist/sds-notification/sds-notification.js +2 -57
  36. package/dist/sds-notification/sds-notification.js.map +1 -1
  37. package/dist/sds-paragraph/sds-paragraph.component.d.ts +12 -0
  38. package/dist/sds-paragraph/sds-paragraph.component.d.ts.map +1 -0
  39. package/dist/{sds-tag/sds-tag.js → sds-paragraph/sds-paragraph.component.js} +17 -18
  40. package/dist/sds-paragraph/sds-paragraph.component.js.map +1 -0
  41. package/dist/sds-paragraph/sds-paragraph.d.ts +2 -5
  42. package/dist/sds-paragraph/sds-paragraph.d.ts.map +1 -1
  43. package/dist/sds-paragraph/sds-paragraph.js +2 -25
  44. package/dist/sds-paragraph/sds-paragraph.js.map +1 -1
  45. package/dist/sheriff-web-components.js +646 -554
  46. package/package.json +1 -1
  47. package/dist/react-wrappers/SDSAlertWrapper.d.ts +0 -5
  48. package/dist/react-wrappers/SDSAlertWrapper.d.ts.map +0 -1
  49. package/dist/react-wrappers/SDSAlertWrapper.js +0 -12
  50. package/dist/react-wrappers/SDSAlertWrapper.js.map +0 -1
  51. package/dist/react-wrappers/SDSCardWrapper.d.ts +0 -3
  52. package/dist/react-wrappers/SDSCardWrapper.d.ts.map +0 -1
  53. package/dist/react-wrappers/SDSCardWrapper.js +0 -10
  54. package/dist/react-wrappers/SDSCardWrapper.js.map +0 -1
  55. package/dist/react-wrappers/SDSTagWrapper.d.ts +0 -3
  56. package/dist/react-wrappers/SDSTagWrapper.d.ts.map +0 -1
  57. package/dist/react-wrappers/SDSTagWrapper.js +0 -10
  58. package/dist/react-wrappers/SDSTagWrapper.js.map +0 -1
  59. package/dist/sds-alert/sds-alert.d.ts +0 -29
  60. package/dist/sds-alert/sds-alert.d.ts.map +0 -1
  61. package/dist/sds-alert/sds-alert.js +0 -70
  62. package/dist/sds-alert/sds-alert.js.map +0 -1
  63. package/dist/sds-alert/sds-alert.styles.d.ts +0 -2
  64. package/dist/sds-alert/sds-alert.styles.d.ts.map +0 -1
  65. package/dist/sds-alert/sds-alert.styles.js +0 -153
  66. package/dist/sds-alert/sds-alert.styles.js.map +0 -1
  67. package/dist/sds-card/sds-card.d.ts +0 -18
  68. package/dist/sds-card/sds-card.d.ts.map +0 -1
  69. package/dist/sds-card/sds-card.js +0 -58
  70. package/dist/sds-card/sds-card.js.map +0 -1
  71. package/dist/sds-card/sds-card.styles.d.ts +0 -2
  72. package/dist/sds-card/sds-card.styles.d.ts.map +0 -1
  73. package/dist/sds-card/sds-card.styles.js +0 -124
  74. package/dist/sds-card/sds-card.styles.js.map +0 -1
  75. package/dist/sds-icon/sds-icon.system.d.ts +0 -6
  76. package/dist/sds-icon/sds-icon.system.d.ts.map +0 -1
  77. package/dist/sds-icon/sds-icon.system.js +0 -24
  78. package/dist/sds-icon/sds-icon.system.js.map +0 -1
  79. package/dist/sds-tag/sds-tag.d.ts +0 -18
  80. package/dist/sds-tag/sds-tag.d.ts.map +0 -1
  81. package/dist/sds-tag/sds-tag.js.map +0 -1
  82. package/dist/sds-tag/sds-tag.styles.d.ts +0 -2
  83. package/dist/sds-tag/sds-tag.styles.d.ts.map +0 -1
  84. package/dist/sds-tag/sds-tag.styles.js +0 -64
  85. package/dist/sds-tag/sds-tag.styles.js.map +0 -1
  86. package/dist/types.d.ts +0 -5
  87. package/dist/types.d.ts.map +0 -1
  88. package/dist/types.js +0 -2
  89. package/dist/types.js.map +0 -1
  90. package/dist/utils/slot-validator.d.ts +0 -2
  91. package/dist/utils/slot-validator.d.ts.map +0 -1
  92. package/dist/utils/slot-validator.js +0 -24
  93. package/dist/utils/slot-validator.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sds-heading.component.js","sourceRoot":"","sources":["../../src/sds-heading/sds-heading.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAA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AAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAGN;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAqB;AACpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAkB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-heading.styles';\n\ntype Level = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\ntype DisplaySize = 'xl' | 'l' | 'm' | 's' | 'xs';\n\nexport interface SDSHeadingProps {\n\tlevel?: Level;\n\tas?: DisplaySize;\n}\n\nexport class SDSHeadingComponent extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String }) level: Level = 'h1';\n\t@property({ type: String }) as?: DisplaySize;\n\n\toverride render() {\n\t\tconst headingClasses = {\n\t\t\t'sds-heading': true,\n\t\t\t'sds-heading--xl': this.as === 'xl',\n\t\t\t'sds-heading--l': this.as === 'l',\n\t\t\t'sds-heading--m': this.as === 'm',\n\t\t\t'sds-heading--s': this.as === 's',\n\t\t\t'sds-heading--xs': this.as === 'xs',\n\t\t};\n\n\t\tconst classes = classMap(headingClasses);\n\n\t\tswitch (this.level.toLowerCase()) {\n\t\t\tcase 'h1':\n\t\t\t\treturn html`<h1 class=${classes}><slot></slot></h1>`;\n\t\t\tcase 'h2':\n\t\t\t\treturn html`<h2 class=${classes}><slot></slot></h2>`;\n\t\t\tcase 'h3':\n\t\t\t\treturn html`<h3 class=${classes}><slot></slot></h3>`;\n\t\t\tcase 'h4':\n\t\t\t\treturn html`<h4 class=${classes}><slot></slot></h4>`;\n\t\t\tcase 'h5':\n\t\t\t\treturn html`<h5 class=${classes}><slot></slot></h5>`;\n\t\t\tcase 'h6':\n\t\t\t\treturn html`<h6 class=${classes}><slot></slot></h6>`;\n\t\t\tdefault:\n\t\t\t\treturn html`<h1 class=${classes}><slot></slot></h1>`;\n\t\t}\n\t}\n}\n"]}
@@ -1,20 +1,9 @@
1
- import { LitElement } from 'lit';
2
- type Level = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
3
- type DisplaySize = 'xl' | 'l' | 'm' | 's' | 'xs';
4
- export interface SDSHeadingProps {
5
- level?: Level;
6
- as?: DisplaySize;
7
- }
8
- export declare class SDSHeading extends LitElement {
9
- static styles: import("lit").CSSResult[];
10
- level: Level;
11
- as?: DisplaySize;
12
- render(): import("lit-html").TemplateResult<1>;
1
+ import { SDSHeadingComponent } from './sds-heading.component';
2
+ export declare class SDSHeading extends SDSHeadingComponent {
13
3
  }
14
4
  declare global {
15
5
  interface HTMLElementTagNameMap {
16
6
  'sds-heading': SDSHeading;
17
7
  }
18
8
  }
19
- export {};
20
9
  //# sourceMappingURL=sds-heading.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-heading.d.ts","sourceRoot":"","sources":["../../src/sds-heading/sds-heading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,KAAK,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACrD,KAAK,WAAW,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,EAAE,CAAC,EAAE,WAAW,CAAC;CACjB;AAED,qBACa,UAAW,SAAQ,UAAU;IAEzC,OAAgB,MAAM,4BAAY;IAGN,KAAK,EAAE,KAAK,CAAQ;IACpB,EAAE,CAAC,EAAE,WAAW,CAAC;IAEpC,MAAM;CA6Bf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,aAAa,EAAE,UAAU,CAAC;KAC1B;CACD"}
1
+ {"version":3,"file":"sds-heading.d.ts","sourceRoot":"","sources":["../../src/sds-heading/sds-heading.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,qBACa,UAAW,SAAQ,mBAAmB;CAAG;AAEtD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,aAAa,EAAE,UAAU,CAAC;KAC1B;CACD"}
@@ -4,53 +4,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { LitElement, html } from 'lit';
8
- import { property } from 'lit/decorators.js';
9
- import { classMap } from 'lit/directives/class-map.js';
10
7
  import { guardedCustomElement } from '../utils/guarded-custom-element';
11
- import { styles } from './sds-heading.styles';
12
- let SDSHeading = class SDSHeading extends LitElement {
13
- constructor() {
14
- super(...arguments);
15
- // Reactive Props
16
- this.level = 'h1';
17
- }
18
- render() {
19
- const headingClasses = {
20
- 'sds-heading': true,
21
- 'sds-heading--xl': this.as === 'xl',
22
- 'sds-heading--l': this.as === 'l',
23
- 'sds-heading--m': this.as === 'm',
24
- 'sds-heading--s': this.as === 's',
25
- 'sds-heading--xs': this.as === 'xs',
26
- };
27
- const classes = classMap(headingClasses);
28
- switch (this.level.toLowerCase()) {
29
- case 'h1':
30
- return html `<h1 class=${classes}><slot></slot></h1>`;
31
- case 'h2':
32
- return html `<h2 class=${classes}><slot></slot></h2>`;
33
- case 'h3':
34
- return html `<h3 class=${classes}><slot></slot></h3>`;
35
- case 'h4':
36
- return html `<h4 class=${classes}><slot></slot></h4>`;
37
- case 'h5':
38
- return html `<h5 class=${classes}><slot></slot></h5>`;
39
- case 'h6':
40
- return html `<h6 class=${classes}><slot></slot></h6>`;
41
- default:
42
- return html `<h1 class=${classes}><slot></slot></h1>`;
43
- }
44
- }
8
+ import { SDSHeadingComponent } from './sds-heading.component';
9
+ let SDSHeading = class SDSHeading extends SDSHeadingComponent {
45
10
  };
46
- // Styling
47
- SDSHeading.styles = [styles];
48
- __decorate([
49
- property({ type: String })
50
- ], SDSHeading.prototype, "level", void 0);
51
- __decorate([
52
- property({ type: String })
53
- ], SDSHeading.prototype, "as", void 0);
54
11
  SDSHeading = __decorate([
55
12
  guardedCustomElement('sds-heading')
56
13
  ], SDSHeading);
@@ -1 +1 @@
1
- {"version":3,"file":"sds-heading.js","sourceRoot":"","sources":["../../src/sds-heading/sds-heading.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAWvC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAIN,iBAAiB;QACW,UAAK,GAAU,IAAI,CAAC;IAgCjD,CAAC;IA7BS,MAAM;QACd,MAAM,cAAc,GAAG;YACtB,aAAa,EAAE,IAAI;YACnB,iBAAiB,EAAE,IAAI,CAAC,EAAE,KAAK,IAAI;YACnC,gBAAgB,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG;YACjC,gBAAgB,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG;YACjC,gBAAgB,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG;YACjC,iBAAiB,EAAE,IAAI,CAAC,EAAE,KAAK,IAAI;SACnC,CAAC;QAEF,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;QAEzC,QAAQ,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YAClC,KAAK,IAAI;gBACR,OAAO,IAAI,CAAA,aAAa,OAAO,qBAAqB,CAAC;YACtD,KAAK,IAAI;gBACR,OAAO,IAAI,CAAA,aAAa,OAAO,qBAAqB,CAAC;YACtD,KAAK,IAAI;gBACR,OAAO,IAAI,CAAA,aAAa,OAAO,qBAAqB,CAAC;YACtD,KAAK,IAAI;gBACR,OAAO,IAAI,CAAA,aAAa,OAAO,qBAAqB,CAAC;YACtD,KAAK,IAAI;gBACR,OAAO,IAAI,CAAA,aAAa,OAAO,qBAAqB,CAAC;YACtD,KAAK,IAAI;gBACR,OAAO,IAAI,CAAA,aAAa,OAAO,qBAAqB,CAAC;YACtD;gBACC,OAAO,IAAI,CAAA,aAAa,OAAO,qBAAqB,CAAC;QACvD,CAAC;IACF,CAAC;;AAnCD,UAAU;AACM,iBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAGN;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAqB;AACpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCAAkB;AANjC,UAAU;IADtB,oBAAoB,CAAC,aAAa,CAAC;GACvB,UAAU,CAqCtB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { styles } from './sds-heading.styles';\n\ntype Level = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\ntype DisplaySize = 'xl' | 'l' | 'm' | 's' | 'xs';\n\nexport interface SDSHeadingProps {\n\tlevel?: Level;\n\tas?: DisplaySize;\n}\n\n@guardedCustomElement('sds-heading')\nexport class SDSHeading extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String }) level: Level = 'h1';\n\t@property({ type: String }) as?: DisplaySize;\n\n\toverride render() {\n\t\tconst headingClasses = {\n\t\t\t'sds-heading': true,\n\t\t\t'sds-heading--xl': this.as === 'xl',\n\t\t\t'sds-heading--l': this.as === 'l',\n\t\t\t'sds-heading--m': this.as === 'm',\n\t\t\t'sds-heading--s': this.as === 's',\n\t\t\t'sds-heading--xs': this.as === 'xs',\n\t\t};\n\n\t\tconst classes = classMap(headingClasses);\n\n\t\tswitch (this.level.toLowerCase()) {\n\t\t\tcase 'h1':\n\t\t\t\treturn html`<h1 class=${classes}><slot></slot></h1>`;\n\t\t\tcase 'h2':\n\t\t\t\treturn html`<h2 class=${classes}><slot></slot></h2>`;\n\t\t\tcase 'h3':\n\t\t\t\treturn html`<h3 class=${classes}><slot></slot></h3>`;\n\t\t\tcase 'h4':\n\t\t\t\treturn html`<h4 class=${classes}><slot></slot></h4>`;\n\t\t\tcase 'h5':\n\t\t\t\treturn html`<h5 class=${classes}><slot></slot></h5>`;\n\t\t\tcase 'h6':\n\t\t\t\treturn html`<h6 class=${classes}><slot></slot></h6>`;\n\t\t\tdefault:\n\t\t\t\treturn html`<h1 class=${classes}><slot></slot></h1>`;\n\t\t}\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-heading': SDSHeading;\n\t}\n}\n"]}
1
+ {"version":3,"file":"sds-heading.js","sourceRoot":"","sources":["../../src/sds-heading/sds-heading.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAGvD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,mBAAmB;CAAG,CAAA;AAAzC,UAAU;IADtB,oBAAoB,CAAC,aAAa,CAAC;GACvB,UAAU,CAA+B","sourcesContent":["import { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { SDSHeadingComponent } from './sds-heading.component';\n\n@guardedCustomElement('sds-heading')\nexport class SDSHeading extends SDSHeadingComponent {}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-heading': SDSHeading;\n\t}\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { LitElement } from 'lit';
2
+ import { type IconPromise } from './sds-icon-loader';
3
+ export declare class SDSIconComponent extends LitElement {
4
+ static styles: import("lit").CSSResult[];
5
+ private static readonly iconLoader;
6
+ static setLoadLocal(loadLocal: boolean): void;
7
+ static registerResolver(resolver: IconPromise): void;
8
+ name: string;
9
+ size: 's' | 'm';
10
+ color: string;
11
+ label: string;
12
+ private svg;
13
+ render(): import("lit-html").TemplateResult<1>;
14
+ /**
15
+ * Wraps the icon loader's callback in a promise. Even if the loader
16
+ * calls the callback synchronously, awaiting the promise defers the
17
+ * property update to the next microtask.
18
+ */
19
+ private fetchIcon;
20
+ updated(changedProperties: Map<string | number | symbol, unknown>): void;
21
+ }
22
+ //# sourceMappingURL=sds-icon.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sds-icon.component.d.ts","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGpE,qBAAa,gBAAiB,SAAQ,UAAU;IAC/C,OAAgB,MAAM,4BAAY;IAElC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAEzD,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAI7C,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI;IAIT,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,GAAG,GAAG,GAAG,CAAO;IACtB,KAAK,EAAE,MAAM,CAAM;IACnB,KAAK,EAAE,MAAM,CAAM;IAErD,OAAO,CAAC,GAAG,CAAc;IAEzB,MAAM;IAef;;;;OAIG;YACW,SAAS;IAWd,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;CAMjF"}
@@ -0,0 +1,81 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html } from 'lit';
8
+ import { property, state } from 'lit/decorators.js';
9
+ import { ifDefined } from 'lit/directives/if-defined.js';
10
+ import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
11
+ import { SDSIconLoader } from './sds-icon-loader';
12
+ import { styles } from './sds-icon.styles';
13
+ export class SDSIconComponent extends LitElement {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.name = '';
17
+ this.size = 'm';
18
+ this.color = '';
19
+ this.label = '';
20
+ this.svg = '';
21
+ }
22
+ static setLoadLocal(loadLocal) {
23
+ this.iconLoader.loadLocal = loadLocal;
24
+ }
25
+ static registerResolver(resolver) {
26
+ this.iconLoader.resolver = resolver;
27
+ }
28
+ render() {
29
+ return html `
30
+ <div
31
+ class="sds-icon"
32
+ role="${ifDefined(this.label ? 'img' : undefined)}"
33
+ style="${ifDefined(this.color ? `color:${this.color}` : undefined)}"
34
+ aria-label="${ifDefined(this.label)}"
35
+ >
36
+ ${this.name
37
+ ? html `<slot aria-hidden="true">${unsafeSVG(this.svg)}</slot>`
38
+ : html `<slot aria-hidden="true"></slot>`}
39
+ </div>
40
+ `;
41
+ }
42
+ /**
43
+ * Wraps the icon loader's callback in a promise. Even if the loader
44
+ * calls the callback synchronously, awaiting the promise defers the
45
+ * property update to the next microtask.
46
+ */
47
+ async fetchIcon() {
48
+ if (!this.name) {
49
+ this.svg = '';
50
+ return;
51
+ }
52
+ const svg = await new Promise((resolve) => {
53
+ SDSIconComponent.iconLoader.resolve(this.name, resolve);
54
+ });
55
+ this.svg = svg;
56
+ }
57
+ updated(changedProperties) {
58
+ super.updated(changedProperties);
59
+ if (changedProperties.has('name') && this.name) {
60
+ void this.fetchIcon();
61
+ }
62
+ }
63
+ }
64
+ SDSIconComponent.styles = [styles];
65
+ SDSIconComponent.iconLoader = new SDSIconLoader();
66
+ __decorate([
67
+ property({ type: String, reflect: true })
68
+ ], SDSIconComponent.prototype, "name", void 0);
69
+ __decorate([
70
+ property({ type: String, reflect: true })
71
+ ], SDSIconComponent.prototype, "size", void 0);
72
+ __decorate([
73
+ property({ type: String, reflect: true })
74
+ ], SDSIconComponent.prototype, "color", void 0);
75
+ __decorate([
76
+ property({ type: String, reflect: true })
77
+ ], SDSIconComponent.prototype, "label", void 0);
78
+ __decorate([
79
+ state()
80
+ ], SDSIconComponent.prototype, "svg", void 0);
81
+ //# sourceMappingURL=sds-icon.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sds-icon.component.js","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAoB,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QAa4C,SAAI,GAAW,EAAE,CAAC;QAClB,SAAI,GAAc,GAAG,CAAC;QACtB,UA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,IAAI,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAChD,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;QACvB,CAAC;IACF,CAAC;;AAvDe,uBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAEV,2BAAU,GAAG,IAAI,aAAa,EAAE,AAAtB,CAAuB;AAUd;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAmB;AAClB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAuB;AACtB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAoB;AACnB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAoB;AAE7C;IAAhB,KAAK,EAAE;6CAA0B","sourcesContent":["import { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { unsafeSVG } from 'lit/directives/unsafe-svg.js';\nimport { SDSIconLoader, type IconPromise } from './sds-icon-loader';\nimport { styles } from './sds-icon.styles';\n\nexport class SDSIconComponent extends LitElement {\n\tstatic override styles = [styles];\n\n\tprivate static readonly iconLoader = new SDSIconLoader();\n\n\tstatic setLoadLocal(loadLocal: boolean): void {\n\t\tthis.iconLoader.loadLocal = loadLocal;\n\t}\n\n\tstatic registerResolver(resolver: IconPromise): void {\n\t\tthis.iconLoader.resolver = resolver;\n\t}\n\n\t@property({ type: String, reflect: true }) name: string = '';\n\t@property({ type: String, reflect: true }) size: 's' | 'm' = 'm';\n\t@property({ type: String, reflect: true }) color: string = '';\n\t@property({ type: String, reflect: true }) label: string = '';\n\n\t@state() private svg: string = '';\n\n\toverride render() {\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"sds-icon\"\n\t\t\t\trole=\"${ifDefined(this.label ? 'img' : undefined)}\"\n\t\t\t\tstyle=\"${ifDefined(this.color ? `color:${this.color}` : undefined)}\"\n\t\t\t\taria-label=\"${ifDefined(this.label)}\"\n\t\t\t>\n\t\t\t\t${this.name\n\t\t\t\t\t? html`<slot aria-hidden=\"true\">${unsafeSVG(this.svg)}</slot>`\n\t\t\t\t\t: html`<slot aria-hidden=\"true\"></slot>`}\n\t\t\t</div>\n\t\t`;\n\t}\n\n\t/**\n\t * Wraps the icon loader's callback in a promise. Even if the loader\n\t * calls the callback synchronously, awaiting the promise defers the\n\t * property update to the next microtask.\n\t */\n\tprivate async fetchIcon() {\n\t\tif (!this.name) {\n\t\t\tthis.svg = '';\n\t\t\treturn;\n\t\t}\n\t\tconst svg = await new Promise<string>((resolve) => {\n\t\t\tSDSIconComponent.iconLoader.resolve(this.name, resolve);\n\t\t});\n\t\tthis.svg = svg;\n\t}\n\n\toverride updated(changedProperties: Map<string | number | symbol, unknown>): void {\n\t\tsuper.updated(changedProperties);\n\t\tif (changedProperties.has('name') && this.name) {\n\t\t\tvoid this.fetchIcon();\n\t\t}\n\t}\n}\n"]}
@@ -1,23 +1,5 @@
1
- import { LitElement } from 'lit';
2
- import { type IconPromise } from './sds-icon-loader';
3
- export declare class SDSIcon extends LitElement {
4
- static styles: import("lit").CSSResult[];
5
- private static readonly iconLoader;
6
- static setLoadLocal(loadLocal: boolean): void;
7
- static registerResolver(resolver: IconPromise): void;
8
- name: string;
9
- size: 's' | 'm';
10
- color: string;
11
- label: string;
12
- private svg;
13
- render(): import("lit-html").TemplateResult<1>;
14
- /**
15
- * Wraps the icon loader's callback in a promise. Even if the loader
16
- * calls the callback synchronously, awaiting the promise defers the
17
- * property update to the next microtask.
18
- */
19
- private fetchIcon;
20
- updated(changedProperties: Map<string | number | symbol, unknown>): void;
1
+ import { SDSIconComponent } from './sds-icon.component';
2
+ export declare class SDSIcon extends SDSIconComponent {
21
3
  }
22
4
  declare global {
23
5
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"sds-icon.d.ts","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIpE,qBACa,OAAQ,SAAQ,UAAU;IACtC,OAAgB,MAAM,4BAAY;IAElC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAEzD,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAI7C,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI;IAIT,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,GAAG,GAAG,GAAG,CAAO;IACtB,KAAK,EAAE,MAAM,CAAM;IACnB,KAAK,EAAE,MAAM,CAAM;IAErD,OAAO,CAAC,GAAG,CAAc;IAEzB,MAAM;IAef;;;;OAIG;YACW,SAAS;IAWd,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;CAMjF;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,UAAU,EAAE,OAAO,CAAC;KACpB;CACD"}
1
+ {"version":3,"file":"sds-icon.d.ts","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,qBACa,OAAQ,SAAQ,gBAAgB;CAAG;AAEhD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,UAAU,EAAE,OAAO,CAAC;KACpB;CACD"}
@@ -4,83 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- var SDSIcon_1;
8
- import { LitElement, html } from 'lit';
9
- import { property, state } from 'lit/decorators.js';
10
- import { ifDefined } from 'lit/directives/if-defined.js';
11
- import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
12
- import { SDSIconLoader } from './sds-icon-loader';
13
7
  import { guardedCustomElement } from '../utils/guarded-custom-element';
14
- import { styles } from './sds-icon.styles';
15
- let SDSIcon = SDSIcon_1 = class SDSIcon extends LitElement {
16
- constructor() {
17
- super(...arguments);
18
- this.name = '';
19
- this.size = 'm';
20
- this.color = '';
21
- this.label = '';
22
- this.svg = '';
23
- }
24
- static setLoadLocal(loadLocal) {
25
- this.iconLoader.loadLocal = loadLocal;
26
- }
27
- static registerResolver(resolver) {
28
- this.iconLoader.resolver = resolver;
29
- }
30
- render() {
31
- return html `
32
- <div
33
- class="sds-icon"
34
- role="${ifDefined(this.label ? 'img' : undefined)}"
35
- style="${ifDefined(this.color ? `color:${this.color}` : undefined)}"
36
- aria-label="${ifDefined(this.label)}"
37
- >
38
- ${this.name
39
- ? html `<slot aria-hidden="true">${unsafeSVG(this.svg)}</slot>`
40
- : html `<slot aria-hidden="true"></slot>`}
41
- </div>
42
- `;
43
- }
44
- /**
45
- * Wraps the icon loader's callback in a promise. Even if the loader
46
- * calls the callback synchronously, awaiting the promise defers the
47
- * property update to the next microtask.
48
- */
49
- async fetchIcon() {
50
- if (!this.name) {
51
- this.svg = '';
52
- return;
53
- }
54
- const svg = await new Promise((resolve) => {
55
- SDSIcon_1.iconLoader.resolve(this.name, resolve);
56
- });
57
- this.svg = svg;
58
- }
59
- updated(changedProperties) {
60
- super.updated(changedProperties);
61
- if (changedProperties.has('name') && this.name) {
62
- void this.fetchIcon();
63
- }
64
- }
8
+ import { SDSIconComponent } from './sds-icon.component';
9
+ let SDSIcon = class SDSIcon extends SDSIconComponent {
65
10
  };
66
- SDSIcon.styles = [styles];
67
- SDSIcon.iconLoader = new SDSIconLoader();
68
- __decorate([
69
- property({ type: String, reflect: true })
70
- ], SDSIcon.prototype, "name", void 0);
71
- __decorate([
72
- property({ type: String, reflect: true })
73
- ], SDSIcon.prototype, "size", void 0);
74
- __decorate([
75
- property({ type: String, reflect: true })
76
- ], SDSIcon.prototype, "color", void 0);
77
- __decorate([
78
- property({ type: String, reflect: true })
79
- ], SDSIcon.prototype, "label", void 0);
80
- __decorate([
81
- state()
82
- ], SDSIcon.prototype, "svg", void 0);
83
- SDSIcon = SDSIcon_1 = __decorate([
11
+ SDSIcon = __decorate([
84
12
  guardedCustomElement('sds-icon')
85
13
  ], SDSIcon);
86
14
  export { SDSIcon };
@@ -1 +1 @@
1
- {"version":3,"file":"sds-icon.js","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAoB,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGpC,IAAM,OAAO,eAAb,MAAM,OAAQ,SAAQ,UAAU;IAAhC;;QAaqC,SAAI,GAAW,EAAE,CAAC;QAClB,SAAI,GAAc,GAAG,CAAC;QACtB,UAAK,GAAW,EAAE,CAAC;QACnB,UAAK,GAAW,EAAE,CAAC;QAE7C,QAAG,GAAW,EAAE,CAAC;IAuCnC,C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AAI,CAAC,SAAS,EAAE,CAAC;QACvB,CAAC;IACF,CAAC;;AAvDe,cAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAEV,kBAAU,GAAG,IAAI,aAAa,EAAE,AAAtB,CAAuB;AAUd;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAAmB;AAClB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAAuB;AACtB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAAoB;AACnB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAAoB;AAE7C;IAAhB,KAAK,EAAE;oCAA0B;AAlBtB,OAAO;IADnB,oBAAoB,CAAC,UAAU,CAAC;GACpB,OAAO,CAyDnB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { unsafeSVG } from 'lit/directives/unsafe-svg.js';\nimport { SDSIconLoader, type IconPromise } from './sds-icon-loader';\nimport { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { styles } from './sds-icon.styles';\n\n@guardedCustomElement('sds-icon')\nexport class SDSIcon extends LitElement {\n\tstatic override styles = [styles];\n\n\tprivate static readonly iconLoader = new SDSIconLoader();\n\n\tstatic setLoadLocal(loadLocal: boolean): void {\n\t\tthis.iconLoader.loadLocal = loadLocal;\n\t}\n\n\tstatic registerResolver(resolver: IconPromise): void {\n\t\tthis.iconLoader.resolver = resolver;\n\t}\n\n\t@property({ type: String, reflect: true }) name: string = '';\n\t@property({ type: String, reflect: true }) size: 's' | 'm' = 'm';\n\t@property({ type: String, reflect: true }) color: string = '';\n\t@property({ type: String, reflect: true }) label: string = '';\n\n\t@state() private svg: string = '';\n\n\toverride render() {\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"sds-icon\"\n\t\t\t\trole=\"${ifDefined(this.label ? 'img' : undefined)}\"\n\t\t\t\tstyle=\"${ifDefined(this.color ? `color:${this.color}` : undefined)}\"\n\t\t\t\taria-label=\"${ifDefined(this.label)}\"\n\t\t\t>\n\t\t\t\t${this.name\n\t\t\t\t\t? html`<slot aria-hidden=\"true\">${unsafeSVG(this.svg)}</slot>`\n\t\t\t\t\t: html`<slot aria-hidden=\"true\"></slot>`}\n\t\t\t</div>\n\t\t`;\n\t}\n\n\t/**\n\t * Wraps the icon loader's callback in a promise. Even if the loader\n\t * calls the callback synchronously, awaiting the promise defers the\n\t * property update to the next microtask.\n\t */\n\tprivate async fetchIcon() {\n\t\tif (!this.name) {\n\t\t\tthis.svg = '';\n\t\t\treturn;\n\t\t}\n\t\tconst svg = await new Promise<string>((resolve) => {\n\t\t\tSDSIcon.iconLoader.resolve(this.name, resolve);\n\t\t});\n\t\tthis.svg = svg;\n\t}\n\n\toverride updated(changedProperties: Map<string | number | symbol, unknown>): void {\n\t\tsuper.updated(changedProperties);\n\t\tif (changedProperties.has('name') && this.name) {\n\t\t\tvoid this.fetchIcon();\n\t\t}\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-icon': SDSIcon;\n\t}\n}\n"]}
1
+ {"version":3,"file":"sds-icon.js","sourceRoot":"","sources":["../../src/sds-icon/sds-icon.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGjD,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,gBAAgB;CAAG,CAAA;AAAnC,OAAO;IADnB,oBAAoB,CAAC,UAAU,CAAC;GACpB,OAAO,CAA4B","sourcesContent":["import { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { SDSIconComponent } from './sds-icon.component';\n\n@guardedCustomElement('sds-icon')\nexport class SDSIcon extends SDSIconComponent {}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-icon': SDSIcon;\n\t}\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import { LitElement } from 'lit';
2
+ type NotificationVariant = 'info' | 'success' | 'attention' | 'warning' | 'critical';
3
+ export interface SDSNotificationProps {
4
+ variant?: NotificationVariant;
5
+ 'removable-label'?: string;
6
+ onSdsRemove?: (event: CustomEvent) => void;
7
+ }
8
+ export declare class SDSNotificationComponent extends LitElement {
9
+ static styles: import("lit").CSSResult[];
10
+ iconTag: import("lit-html/static").StaticValue;
11
+ variant: NotificationVariant;
12
+ removableLabel?: string;
13
+ private readonly _remove;
14
+ private readonly _renderIcon;
15
+ render(): import("lit-html").TemplateResult<1>;
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=sds-notification.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sds-notification.component.d.ts","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAMhD,KAAK,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;AAUrF,MAAM,WAAW,oBAAoB;IACpC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CAC3C;AAED,qBAAa,wBAAyB,SAAQ,UAAU;IAEvD,OAAgB,MAAM,4BAAY;IAClC,OAAO,wCAAqB;IAGe,OAAO,EAAE,mBAAmB,CAAU;IACR,cAAc,CAAC,EAAE,MAAM,CAAC;IAEjG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAOtB;IAEF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAE1B;IAEO,MAAM;CA4Bf"}
@@ -0,0 +1,71 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, nothing } from 'lit';
8
+ import { property } from 'lit/decorators.js';
9
+ import { classMap } from 'lit/directives/class-map.js';
10
+ import { html as staticHtml, literal } from 'lit/static-html.js';
11
+ import { styles } from './sds-notification.styles';
12
+ const notificationIcons = {
13
+ info: 'info-material-filled',
14
+ success: 'check_circle-material-filled',
15
+ attention: 'error-material-filled',
16
+ warning: 'warning-material-filled',
17
+ critical: 'dangerous-material-filled',
18
+ };
19
+ export class SDSNotificationComponent extends LitElement {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.iconTag = literal `sds-icon`;
23
+ // Reactive Props
24
+ this.variant = 'info';
25
+ this._remove = () => {
26
+ this.dispatchEvent(new CustomEvent('sds-remove', {
27
+ bubbles: true,
28
+ composed: true,
29
+ }));
30
+ };
31
+ this._renderIcon = (iconName, size, cls) => {
32
+ return staticHtml `<${this.iconTag} ${cls ? `class=${cls}` : ''} name="${iconName}" size=${size}></${this.iconTag}>`;
33
+ };
34
+ }
35
+ render() {
36
+ const notificationClasses = {
37
+ 'sds-notification': true,
38
+ [`sds-notification--${this.variant}`]: true,
39
+ };
40
+ return html `<div class="${classMap(notificationClasses)}">
41
+ <div class="sds-notification__type">
42
+ <!-- ${staticHtml `<${this.iconTag}>Wow</${this.iconTag}>`} -->
43
+ ${this._renderIcon(notificationIcons[this.variant], 'm', 'sds-notification__icon')}
44
+ </div>
45
+ <div class="sds-notification__content">
46
+ <div class="sds-notification__content-text">
47
+ <slot name="title"></slot>
48
+ <slot name="message"></slot>
49
+ </div>
50
+ ${this.removableLabel
51
+ ? html `<button
52
+ class="sds-notification__remove-btn"
53
+ @click=${this._remove}
54
+ aria-label="${this.removableLabel}"
55
+ >
56
+ ${this._renderIcon('close-material-outlined', 's')}
57
+ </button>`
58
+ : nothing}
59
+ </div>
60
+ </div>`;
61
+ }
62
+ }
63
+ // Styling
64
+ SDSNotificationComponent.styles = [styles];
65
+ __decorate([
66
+ property({ type: String, reflect: true })
67
+ ], SDSNotificationComponent.prototype, "variant", void 0);
68
+ __decorate([
69
+ property({ type: String, attribute: 'removable-label', reflect: true })
70
+ ], SDSNotificationComponent.prototype, "removableLabel", void 0);
71
+ //# sourceMappingURL=sds-notification.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sds-notification.component.js","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAInD,MAAM,iBAAiB,GAAwC;IAC9D,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,8BAA8B;IACvC,SAAS,EAAE,uBAAuB;IAClC,OAAO,EAAE,yBAAyB;IAClC,QAAQ,EAAE,2BAA2B;CACrC,CAAC;AAQF,MAAM,OAAO,wBAAyB,SAAQ,UAAU;IAAxD;;QAGC,YAAO,GAAG,OAAO,CAAA,UAAU,CAAC;QAE5B,iBAAiB;QAC0B,YAAO,GAAwB,MA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C;AACR;IAAxE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gEAAyB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html as staticHtml, literal } from 'lit/static-html.js';\nimport { styles } from './sds-notification.styles';\n\ntype NotificationVariant = 'info' | 'success' | 'attention' | 'warning' | 'critical';\n\nconst notificationIcons: Record<NotificationVariant, string> = {\n\tinfo: 'info-material-filled',\n\tsuccess: 'check_circle-material-filled',\n\tattention: 'error-material-filled',\n\twarning: 'warning-material-filled',\n\tcritical: 'dangerous-material-filled',\n};\n\nexport interface SDSNotificationProps {\n\tvariant?: NotificationVariant;\n\t'removable-label'?: string;\n\tonSdsRemove?: (event: CustomEvent) => void;\n}\n\nexport class SDSNotificationComponent extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\ticonTag = literal`sds-icon`;\n\n\t// Reactive Props\n\t@property({ type: String, reflect: true }) variant: NotificationVariant = 'info';\n\t@property({ type: String, attribute: 'removable-label', reflect: true }) removableLabel?: string;\n\n\tprivate readonly _remove = () => {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('sds-remove', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\tprivate readonly _renderIcon = (iconName: string, size: string, cls?: string) => {\n\t\treturn staticHtml`<${this.iconTag} ${cls ? `class=${cls}` : ''} name=\"${iconName}\" size=${size}></${this.iconTag}>`;\n\t};\n\n\toverride render() {\n\t\tconst notificationClasses = {\n\t\t\t'sds-notification': true,\n\t\t\t[`sds-notification--${this.variant}`]: true,\n\t\t};\n\n\t\treturn html`<div class=\"${classMap(notificationClasses)}\">\n\t\t\t<div class=\"sds-notification__type\">\n\t\t\t\t<!-- ${staticHtml`<${this.iconTag}>Wow</${this.iconTag}>`} -->\n\t\t\t\t${this._renderIcon(notificationIcons[this.variant], 'm', 'sds-notification__icon')}\n\t\t\t</div>\n\t\t\t<div class=\"sds-notification__content\">\n\t\t\t\t<div class=\"sds-notification__content-text\">\n\t\t\t\t\t<slot name=\"title\"></slot>\n\t\t\t\t\t<slot name=\"message\"></slot>\n\t\t\t\t</div>\n\t\t\t\t${this.removableLabel\n\t\t\t\t\t? html`<button\n\t\t\t\t\t\t\tclass=\"sds-notification__remove-btn\"\n\t\t\t\t\t\t\t@click=${this._remove}\n\t\t\t\t\t\t\taria-label=\"${this.removableLabel}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t${this._renderIcon('close-material-outlined', 's')}\n\t\t\t\t\t\t</button>`\n\t\t\t\t\t: nothing}\n\t\t\t</div>\n\t\t</div>`;\n\t}\n}\n"]}
@@ -1,22 +1,10 @@
1
- import { LitElement } from 'lit';
2
1
  import '../sds-icon/sds-icon';
3
- type NotificationVariant = 'info' | 'success' | 'attention' | 'warning' | 'critical';
4
- export interface SDSNotificationProps {
5
- variant?: NotificationVariant;
6
- 'removable-label'?: string;
7
- onSdsRemove?: (event: CustomEvent) => void;
8
- }
9
- export declare class SDSNotification extends LitElement {
10
- static styles: import("lit").CSSResult[];
11
- variant: NotificationVariant;
12
- removableLabel?: string;
13
- private readonly _remove;
14
- render(): import("lit-html").TemplateResult<1>;
2
+ import { SDSNotificationComponent } from './sds-notification.component';
3
+ export declare class SDSNotification extends SDSNotificationComponent {
15
4
  }
16
5
  declare global {
17
6
  interface HTMLElementTagNameMap {
18
7
  'sds-notification': SDSNotification;
19
8
  }
20
9
  }
21
- export {};
22
10
  //# sourceMappingURL=sds-notification.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-notification.d.ts","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAMhD,OAAO,sBAAsB,CAAC;AAE9B,KAAK,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;AAUrF,MAAM,WAAW,oBAAoB;IACpC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CAC3C;AAED,qBACa,eAAgB,SAAQ,UAAU;IAE9C,OAAgB,MAAM,4BAAY;IAGS,OAAO,EAAE,mBAAmB,CAAU;IACR,cAAc,CAAC,EAAE,MAAM,CAAC;IAEjG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAOtB;IAEO,MAAM;CA2Bf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,kBAAkB,EAAE,eAAe,CAAC;KACpC;CACD"}
1
+ {"version":3,"file":"sds-notification.d.ts","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.ts"],"names":[],"mappings":"AACA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE,qBACa,eAAgB,SAAQ,wBAAwB;CAAG;AAEhE,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,kBAAkB,EAAE,eAAe,CAAC;KACpC;CACD"}
@@ -4,66 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { LitElement, html, nothing } from 'lit';
8
- import { property } from 'lit/decorators.js';
9
- import { classMap } from 'lit/directives/class-map.js';
10
7
  import { guardedCustomElement } from '../utils/guarded-custom-element';
11
- import { styles } from './sds-notification.styles';
12
8
  import '../sds-icon/sds-icon';
13
- const notificationIcons = {
14
- info: 'info-material-filled',
15
- success: 'check_circle-material-filled',
16
- attention: 'error-material-filled',
17
- warning: 'warning-material-filled',
18
- critical: 'dangerous-material-filled',
9
+ import { SDSNotificationComponent } from './sds-notification.component';
10
+ let SDSNotification = class SDSNotification extends SDSNotificationComponent {
19
11
  };
20
- let SDSNotification = class SDSNotification extends LitElement {
21
- constructor() {
22
- super(...arguments);
23
- // Reactive Props
24
- this.variant = 'info';
25
- this._remove = () => {
26
- this.dispatchEvent(new CustomEvent('sds-remove', {
27
- bubbles: true,
28
- composed: true,
29
- }));
30
- };
31
- }
32
- render() {
33
- const notificationClasses = {
34
- 'sds-notification': true,
35
- [`sds-notification--${this.variant}`]: true,
36
- };
37
- return html `<div class="${classMap(notificationClasses)}">
38
- <div class="sds-notification__type">
39
- <sds-icon class="sds-notification__icon" name="${notificationIcons[this.variant]}" size="m"></sds-icon>
40
- </div>
41
- <div class="sds-notification__content">
42
- <div class="sds-notification__content-text">
43
- <slot name="title"></slot>
44
- <slot name="message"></slot>
45
- </div>
46
- ${this.removableLabel
47
- ? html `<button
48
- class="sds-notification__remove-btn"
49
- @click=${this._remove}
50
- aria-label="${this.removableLabel}"
51
- >
52
- <sds-icon name="close-material-outlined" size="s"></sds-icon>
53
- </button>`
54
- : nothing}
55
- </div>
56
- </div>`;
57
- }
58
- };
59
- // Styling
60
- SDSNotification.styles = [styles];
61
- __decorate([
62
- property({ type: String, reflect: true })
63
- ], SDSNotification.prototype, "variant", void 0);
64
- __decorate([
65
- property({ type: String, attribute: 'removable-label', reflect: true })
66
- ], SDSNotification.prototype, "removableLabel", void 0);
67
12
  SDSNotification = __decorate([
68
13
  guardedCustomElement('sds-notification')
69
14
  ], SDSNotification);
@@ -1 +1 @@
1
- {"version":3,"file":"sds-notification.js","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE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E,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAuC;AACR;IAAxE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDAAyB;AANrF,eAAe;IAD3B,oBAAoB,CAAC,kBAAkB,CAAC;GAC5B,eAAe,CA4C3B","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { styles } from './sds-notification.styles';\n\nimport '../sds-icon/sds-icon';\n\ntype NotificationVariant = 'info' | 'success' | 'attention' | 'warning' | 'critical';\n\nconst notificationIcons: Record<NotificationVariant, string> = {\n\tinfo: 'info-material-filled',\n\tsuccess: 'check_circle-material-filled',\n\tattention: 'error-material-filled',\n\twarning: 'warning-material-filled',\n\tcritical: 'dangerous-material-filled',\n};\n\nexport interface SDSNotificationProps {\n\tvariant?: NotificationVariant;\n\t'removable-label'?: string;\n\tonSdsRemove?: (event: CustomEvent) => void;\n}\n\n@guardedCustomElement('sds-notification')\nexport class SDSNotification extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String, reflect: true }) variant: NotificationVariant = 'info';\n\t@property({ type: String, attribute: 'removable-label', reflect: true }) removableLabel?: string;\n\n\tprivate readonly _remove = () => {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('sds-remove', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\toverride render() {\n\t\tconst notificationClasses = {\n\t\t\t'sds-notification': true,\n\t\t\t[`sds-notification--${this.variant}`]: true,\n\t\t};\n\n\t\treturn html`<div class=\"${classMap(notificationClasses)}\">\n\t\t\t<div class=\"sds-notification__type\">\n\t\t\t\t<sds-icon class=\"sds-notification__icon\" name=\"${notificationIcons[this.variant]}\" size=\"m\"></sds-icon>\n\t\t\t</div>\n\t\t\t<div class=\"sds-notification__content\">\n\t\t\t\t<div class=\"sds-notification__content-text\">\n\t\t\t\t\t<slot name=\"title\"></slot>\n\t\t\t\t\t<slot name=\"message\"></slot>\n\t\t\t\t</div>\n\t\t\t\t${this.removableLabel\n\t\t\t\t\t? html`<button\n\t\t\t\t\t\t\tclass=\"sds-notification__remove-btn\"\n\t\t\t\t\t\t\t@click=${this._remove}\n\t\t\t\t\t\t\taria-label=\"${this.removableLabel}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<sds-icon name=\"close-material-outlined\" size=\"s\"></sds-icon>\n\t\t\t\t\t\t</button>`\n\t\t\t\t\t: nothing}\n\t\t\t</div>\n\t\t</div>`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-notification': SDSNotification;\n\t}\n}\n"]}
1
+ {"version":3,"file":"sds-notification.js","sourceRoot":"","sources":["../../src/sds-notification/sds-notification.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,wBAAwB;CAAG,CAAA;AAAnD,eAAe;IAD3B,oBAAoB,CAAC,kBAAkB,CAAC;GAC5B,eAAe,CAAoC","sourcesContent":["import { guardedCustomElement } from '../utils/guarded-custom-element';\nimport '../sds-icon/sds-icon';\nimport { SDSNotificationComponent } from './sds-notification.component';\n\n@guardedCustomElement('sds-notification')\nexport class SDSNotification extends SDSNotificationComponent {}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-notification': SDSNotification;\n\t}\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { LitElement } from 'lit';
2
+ type Size = 'xl' | 'l' | 'm';
3
+ export interface SDSParagraphProps {
4
+ size?: Size;
5
+ }
6
+ export declare class SDSParagraphComponent extends LitElement {
7
+ static styles: import("lit").CSSResult[];
8
+ size: Size;
9
+ render(): import("lit-html").TemplateResult<1>;
10
+ }
11
+ export {};
12
+ //# sourceMappingURL=sds-paragraph.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sds-paragraph.component.d.ts","sourceRoot":"","sources":["../../src/sds-paragraph/sds-paragraph.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7B,MAAM,WAAW,iBAAiB;IACjC,IAAI,CAAC,EAAE,IAAI,CAAC;CACZ;AAED,qBAAa,qBAAsB,SAAQ,UAAU;IAEpD,OAAgB,MAAM,4BAAY;IAGN,IAAI,EAAE,IAAI,CAAQ;IAErC,MAAM;CAYf"}