@politiet/sheriff-web-components 0.6.0 → 0.6.2
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.d.ts +18 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/sds-button/sds-button.d.ts +17 -0
- package/dist/sds-button/sds-button.d.ts.map +1 -1
- package/dist/sds-button/sds-button.js +23 -3
- package/dist/sds-button/sds-button.js.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.d.ts +24 -0
- package/dist/sds-checkbox/sds-checkbox.d.ts.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.js +21 -0
- package/dist/sds-checkbox/sds-checkbox.js.map +1 -1
- package/dist/sds-checkbox-group/sds-checkbox-group.d.ts +14 -0
- package/dist/sds-checkbox-group/sds-checkbox-group.d.ts.map +1 -1
- package/dist/sds-checkbox-group/sds-checkbox-group.js +23 -2
- package/dist/sds-checkbox-group/sds-checkbox-group.js.map +1 -1
- package/dist/sds-chip/sds-chip.d.ts +18 -0
- package/dist/sds-chip/sds-chip.d.ts.map +1 -1
- package/dist/sds-chip/sds-chip.js +24 -2
- package/dist/sds-chip/sds-chip.js.map +1 -1
- package/dist/sds-detail/sds-detail.d.ts +8 -0
- package/dist/sds-detail/sds-detail.d.ts.map +1 -1
- package/dist/sds-detail/sds-detail.js +21 -0
- package/dist/sds-detail/sds-detail.js.map +1 -1
- package/dist/sds-heading/sds-heading.d.ts +9 -0
- package/dist/sds-heading/sds-heading.d.ts.map +1 -1
- package/dist/sds-heading/sds-heading.js +21 -0
- package/dist/sds-heading/sds-heading.js.map +1 -1
- package/dist/sds-icon/sds-icon.d.ts +11 -0
- package/dist/sds-icon/sds-icon.d.ts.map +1 -1
- package/dist/sds-icon/sds-icon.js +21 -0
- package/dist/sds-icon/sds-icon.js.map +1 -1
- package/dist/sds-label/sds-label.d.ts +9 -0
- package/dist/sds-label/sds-label.d.ts.map +1 -1
- package/dist/sds-label/sds-label.js +22 -3
- package/dist/sds-label/sds-label.js.map +1 -1
- package/dist/sds-link/sds-link.d.ts +10 -0
- package/dist/sds-link/sds-link.d.ts.map +1 -1
- package/dist/sds-link/sds-link.js +21 -0
- package/dist/sds-link/sds-link.js.map +1 -1
- package/dist/sds-loader/sds-loader.d.ts +9 -0
- package/dist/sds-loader/sds-loader.d.ts.map +1 -1
- package/dist/sds-loader/sds-loader.js +22 -1
- package/dist/sds-loader/sds-loader.js.map +1 -1
- package/dist/sds-nav-card/sds-nav-card.d.ts +16 -11
- package/dist/sds-nav-card/sds-nav-card.d.ts.map +1 -1
- package/dist/sds-nav-card/sds-nav-card.js +21 -11
- package/dist/sds-nav-card/sds-nav-card.js.map +1 -1
- package/dist/sds-notification/sds-notification.d.ts +10 -0
- package/dist/sds-notification/sds-notification.d.ts.map +1 -1
- package/dist/sds-notification/sds-notification.js +21 -0
- package/dist/sds-notification/sds-notification.js.map +1 -1
- package/dist/sds-paragraph/sds-paragraph.d.ts +8 -0
- package/dist/sds-paragraph/sds-paragraph.d.ts.map +1 -1
- package/dist/sds-paragraph/sds-paragraph.js +21 -0
- package/dist/sds-paragraph/sds-paragraph.js.map +1 -1
- package/dist/sds-radio/sds-radio.d.ts +25 -6
- package/dist/sds-radio/sds-radio.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.js +23 -9
- package/dist/sds-radio/sds-radio.js.map +1 -1
- package/dist/sds-radio-group/sds-radio-group.d.ts +14 -0
- package/dist/sds-radio-group/sds-radio-group.d.ts.map +1 -1
- package/dist/sds-radio-group/sds-radio-group.js +23 -6
- package/dist/sds-radio-group/sds-radio-group.js.map +1 -1
- package/dist/sds-switch/sds-switch.d.ts +3 -13
- package/dist/sds-switch/sds-switch.d.ts.map +1 -1
- package/dist/sds-switch/sds-switch.js +24 -54
- package/dist/sds-switch/sds-switch.js.map +1 -1
- package/dist/sds-text/sds-text.d.ts +8 -0
- package/dist/sds-text/sds-text.d.ts.map +1 -1
- package/dist/sds-text/sds-text.js +21 -0
- package/dist/sds-text/sds-text.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.d.ts +35 -3
- package/dist/sds-textfield/sds-textfield.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.js +21 -0
- package/dist/sds-textfield/sds-textfield.js.map +1 -1
- package/package.json +91 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-detail.js","sourceRoot":"","sources":["../../src/sds-detail/sds-detail.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"sds-detail.js","sourceRoot":"","sources":["../../src/sds-detail/sds-detail.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAStC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAIN,iBAAiB;QACW,cAAS,GAAc,MAAM,CAAC;IAa3D,CAAC;IAXS,MAAM;QACd,MAAM,YAAY,GAAG;YACpB,YAAY,EAAE,IAAI;YAClB,kBAAkB,EAAE,IAAI,CAAC,SAAS,KAAK,MAAM;YAC7C,mBAAmB,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO;SAC/C,CAAC;QAEF,MAAM,OAAO,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;QAEvC,OAAO,IAAI,CAAA,YAAY,OAAO,oBAAoB,CAAC;IACpD,CAAC;;AAhBD,UAAU;AACM,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAGN;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAA+B;AAL9C,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAkBrB;;AAgBD;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-detail.styles';\n\ntype Variation = 'text' | 'label';\n\ninterface SDSDetailProps {\n\tvariation?: Variation;\n}\n\n@customElement('sds-detail')\nexport class SDSDetail extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String }) variation: Variation = 'text';\n\n\toverride render() {\n\t\tconst styleClasses = {\n\t\t\t'sds-detail': true,\n\t\t\t'sds-detail--text': this.variation === 'text',\n\t\t\t'sds-detail--label': this.variation === 'label',\n\t\t};\n\n\t\tconst classes = classMap(styleClasses);\n\n\t\treturn html`<p class=${classes}><slot></slot></p>`;\n\t}\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-detail': SDSDetail;\n\t}\n\n\t// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-detail': SDSDetailProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-detail': SDSDetailProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-detail': SDSDetailProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-detail'?: SDSDetailProps;\n\t}\n} */\n"]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
type Level = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
3
3
|
type DisplaySize = 'xl' | 'l' | 'm' | 's' | 'xs';
|
|
4
|
+
interface SDSHeadingProps {
|
|
5
|
+
level?: Level;
|
|
6
|
+
as?: DisplaySize;
|
|
7
|
+
}
|
|
4
8
|
export declare class SDSHeading extends LitElement {
|
|
5
9
|
static styles: import("lit").CSSResult[];
|
|
6
10
|
level: Level;
|
|
@@ -11,6 +15,11 @@ declare global {
|
|
|
11
15
|
interface HTMLElementTagNameMap {
|
|
12
16
|
'sds-heading': SDSHeading;
|
|
13
17
|
}
|
|
18
|
+
namespace JSX {
|
|
19
|
+
interface IntrinsicElements {
|
|
20
|
+
'sds-heading': SDSHeadingProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
14
23
|
}
|
|
15
24
|
export {};
|
|
16
25
|
//# 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;AAKvC,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,qBACa,UAAW,SAAQ,UAAU;IAEzC,OAAgB,MAAM,4BAAY;
|
|
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;AAKvC,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,UAAU,eAAe;IACxB,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;IAEd,UAAU,qBAAqB;QAC9B,aAAa,EAAE,UAAU,CAAC;KAC1B;IAGD,UAAU,GAAG,CAAC;QACb,UAAU,iBAAiB;YAC1B,aAAa,EAAE,eAAe,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;SACzG;KACD;CACD"}
|
|
@@ -54,4 +54,25 @@ SDSHeading = __decorate([
|
|
|
54
54
|
customElement('sds-heading')
|
|
55
55
|
], SDSHeading);
|
|
56
56
|
export { SDSHeading };
|
|
57
|
+
/*
|
|
58
|
+
// Angular
|
|
59
|
+
declare module '@angular/core' {
|
|
60
|
+
interface IntrinsicElements {
|
|
61
|
+
'sds-heading': SDSHeadingProps;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Vue
|
|
66
|
+
declare module 'vue' {
|
|
67
|
+
export interface GlobalComponents {
|
|
68
|
+
'sds-heading': SDSHeadingProps;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Svelte
|
|
73
|
+
declare namespace svelteHTML {
|
|
74
|
+
interface HTMLAttributes<T> {
|
|
75
|
+
'sds-heading'?: SDSHeadingProps;
|
|
76
|
+
}
|
|
77
|
+
} */
|
|
57
78
|
//# sourceMappingURL=sds-heading.js.map
|
|
@@ -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,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;
|
|
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,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,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,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAqCtB;;AAgBD;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, 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\ninterface SDSHeadingProps {\n\tlevel?: Level;\n\tas?: DisplaySize;\n}\n\n@customElement('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\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-heading': SDSHeading;\n\t}\n\n\t// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-heading': SDSHeadingProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-heading': SDSHeadingProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-heading': SDSHeadingProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-heading'?: SDSHeadingProps;\n\t}\n} */\n"]}
|
|
@@ -5,6 +5,12 @@ import { type ColorType } from './sds-icon.color-types';
|
|
|
5
5
|
type IconSize = 's' | 'm';
|
|
6
6
|
type IconTypes = IconType | '';
|
|
7
7
|
type IconColors = ColorType | '';
|
|
8
|
+
interface SDSIconProps {
|
|
9
|
+
name?: IconTypes;
|
|
10
|
+
size?: IconSize;
|
|
11
|
+
color?: IconColors;
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
8
14
|
export declare class SDSIcon extends LitElement {
|
|
9
15
|
static styles: import("lit").CSSResult[];
|
|
10
16
|
private static readonly iconLoader;
|
|
@@ -22,6 +28,11 @@ declare global {
|
|
|
22
28
|
interface HTMLElementTagNameMap {
|
|
23
29
|
'sds-icon': SDSIcon;
|
|
24
30
|
}
|
|
31
|
+
namespace JSX {
|
|
32
|
+
interface IntrinsicElements {
|
|
33
|
+
'sds-icon': SDSIconProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
25
36
|
}
|
|
26
37
|
export {};
|
|
27
38
|
//# sourceMappingURL=sds-icon.d.ts.map
|
|
@@ -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,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,KAAK,QAAQ,GAAG,GAAG,GAAG,GAAG,CAAC;AAC1B,KAAK,SAAS,GAAG,QAAQ,GAAG,EAAE,CAAC;AAC/B,KAAK,UAAU,GAAG,SAAS,GAAG,EAAE,CAAC;AAEjC,qBACa,OAAQ,SAAQ,UAAU;IAEtC,OAAgB,MAA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Yf;AAED,OAAO,CAAC,MAAM,CAAC;IAEd,UAAU,qBAAqB;QAC9B,UAAU,EAAE,OAAO,CAAC;KACpB;IAGD,UAAU,GAAG,CAAC;QACb,UAAU,iBAAiB;YAC1B,UAAU,EAAE,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;SACnG;KACD;CACD"}
|
|
@@ -80,4 +80,25 @@ SDSIcon = SDSIcon_1 = __decorate([
|
|
|
80
80
|
customElement('sds-icon')
|
|
81
81
|
], SDSIcon);
|
|
82
82
|
export { SDSIcon };
|
|
83
|
+
/*
|
|
84
|
+
// Angular
|
|
85
|
+
declare module '@angular/core' {
|
|
86
|
+
interface IntrinsicElements {
|
|
87
|
+
'sds-icon': SDSIconProps;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Vue
|
|
92
|
+
declare module 'vue' {
|
|
93
|
+
export interface GlobalComponents {
|
|
94
|
+
'sds-icon': SDSIconProps;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Svelte
|
|
99
|
+
declare namespace svelteHTML {
|
|
100
|
+
interface HTMLAttributes<T> {
|
|
101
|
+
'sds-icon'?: SDSIconProps;
|
|
102
|
+
}
|
|
103
|
+
} */
|
|
83
104
|
//# sourceMappingURL=sds-icon.js.map
|
|
@@ -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,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D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EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAAwB;AACvB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAAoB;AAE7C;IAAhB,KAAK,EAAE;oCAA0B;AAftB,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CAsDnB;;AAgBD;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { SDSIconLoader, type IconPromise } from './sds-icon-loader';\nimport { styles } from './sds-icon.styles';\n\n// Types\nimport { type IconType } from './sds-icon.icon-types';\nimport { type ColorType } from './sds-icon.color-types';\ntype IconSize = 's' | 'm';\ntype IconTypes = IconType | '';\ntype IconColors = ColorType | '';\n\ninterface SDSIconProps {\n\tname?: IconTypes;\n\tsize?: IconSize;\n\tcolor?: IconColors;\n\tlabel?: string;\n}\n\n@customElement('sds-icon')\nexport class SDSIcon extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\tprivate static readonly iconLoader = new SDSIconLoader();\n\n\tstatic registerResolver(resolver: IconPromise): void {\n\t\tthis.iconLoader.resolver = resolver;\n\t}\n\n\t@property({ type: String, reflect: true }) name: IconTypes = '';\n\t@property({ type: String, reflect: true }) size: IconSize = 'm';\n\t@property({ type: String, reflect: true }) color: IconColors = '';\n\t@property({ type: String, reflect: true }) label: string = '';\n\n\t@state() private svg: string = '';\n\n\tprivate async fetchIcon() {\n\t\tif (!this.name) {\n\t\t\tthis.svg = '';\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst svg = await new Promise<string>((resolve) => {\n\t\t\t\tSDSIcon.iconLoader.resolve(this.name, resolve);\n\t\t\t});\n\t\t\tthis.svg = svg;\n\t\t} catch (error) {\n\t\t\tconsole.error(`Failed to fetch SVG for icon '${this.name}':`, error);\n\t\t\tthis.svg = '';\n\t\t}\n\t}\n\n\toverride updated(changedProperties: Map<string | number | symbol, unknown>): void {\n\t\tsuper.updated(changedProperties);\n\n\t\tif (changedProperties.has('name') && this.name) {\n\t\t\tvoid this.fetchIcon();\n\t\t}\n\t}\n\n\toverride render() {\n\t\treturn html`<div\n\t\t\tclass=\"sds-icon\"\n\t\t\trole=\"${ifDefined(this.label ? 'img' : undefined)}\"\n\t\t\tstyle=\"${ifDefined(this.color ? `color:${this.color}` : undefined)}\"\n\t\t\taria-label=\"${ifDefined(this.label)}\"\n\t\t>\n\t\t\t${this.name\n\t\t\t\t? html`<slot aria-hidden=\"true\">${unsafeHTML(this.svg)}</slot>`\n\t\t\t\t: html`<slot aria-hidden=\"true\"></slot>`}\n\t\t</div>`;\n\t}\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-icon': SDSIcon;\n\t}\n\n\t// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-icon': SDSIconProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-icon': SDSIconProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-icon': SDSIconProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-icon'?: SDSIconProps;\n\t}\n} */\n"]}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
type Size = 'l' | 'm' | 's';
|
|
3
|
+
interface SDSLabelProps {
|
|
4
|
+
size?: Size;
|
|
5
|
+
for?: string;
|
|
6
|
+
}
|
|
3
7
|
export declare class SDSLabel extends LitElement {
|
|
4
8
|
static styles: import("lit").CSSResult[];
|
|
5
9
|
size: Size;
|
|
@@ -10,6 +14,11 @@ declare global {
|
|
|
10
14
|
interface HTMLElementTagNameMap {
|
|
11
15
|
'sds-label': SDSLabel;
|
|
12
16
|
}
|
|
17
|
+
namespace JSX {
|
|
18
|
+
interface IntrinsicElements {
|
|
19
|
+
'sds-label': SDSLabelProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
13
22
|
}
|
|
14
23
|
export {};
|
|
15
24
|
//# sourceMappingURL=sds-label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-label.d.ts","sourceRoot":"","sources":["../../src/sds-label/sds-label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE5B,qBACa,QAAS,SAAQ,UAAU;IAEvC,OAAgB,MAAM,4BAAY;
|
|
1
|
+
{"version":3,"file":"sds-label.d.ts","sourceRoot":"","sources":["../../src/sds-label/sds-label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE5B,UAAU,aAAa;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED,qBACa,QAAS,SAAQ,UAAU;IAEvC,OAAgB,MAAM,4BAAY;IAGN,IAAI,EAAE,IAAI,CAAO;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IAEhC,MAAM;CAYf;AAED,OAAO,CAAC,MAAM,CAAC;IAEd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;IAED,UAAU,GAAG,CAAC;QACb,UAAU,iBAAiB;YAC1B,WAAW,EAAE,aAAa,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;SACrG;KACD;CACD"}
|
|
@@ -23,9 +23,7 @@ let SDSLabel = class SDSLabel extends LitElement {
|
|
|
23
23
|
'sds-label--s': this.size === 's',
|
|
24
24
|
};
|
|
25
25
|
const classes = classMap(styleClasses);
|
|
26
|
-
return html `<label for="${ifDefined(this.for)}" class=${classes}
|
|
27
|
-
><slot></slot
|
|
28
|
-
></label>`;
|
|
26
|
+
return html `<label for="${ifDefined(this.for)}" class=${classes}><slot></slot></label>`;
|
|
29
27
|
}
|
|
30
28
|
};
|
|
31
29
|
// Styling
|
|
@@ -40,4 +38,25 @@ SDSLabel = __decorate([
|
|
|
40
38
|
customElement('sds-label')
|
|
41
39
|
], SDSLabel);
|
|
42
40
|
export { SDSLabel };
|
|
41
|
+
/*
|
|
42
|
+
// Angular
|
|
43
|
+
declare module '@angular/core' {
|
|
44
|
+
interface IntrinsicElements {
|
|
45
|
+
'sds-label': SDSLabelProps;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Vue
|
|
50
|
+
declare module 'vue' {
|
|
51
|
+
export interface GlobalComponents {
|
|
52
|
+
'sds-label': SDSLabelProps;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Svelte
|
|
57
|
+
declare namespace svelteHTML {
|
|
58
|
+
interface HTMLAttributes<T> {
|
|
59
|
+
'sds-label'?: SDSLabelProps;
|
|
60
|
+
}
|
|
61
|
+
} */
|
|
43
62
|
//# sourceMappingURL=sds-label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-label.js","sourceRoot":"","sources":["../../src/sds-label/sds-label.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ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,CAAC;qCAAc;AAN7B,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAoBpB;;AAeD;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-label.styles';\n\ntype Size = 'l' | 'm' | 's';\n\ninterface SDSLabelProps {\n\tsize?: Size;\n\tfor?: string;\n}\n\n@customElement('sds-label')\nexport class SDSLabel extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String }) size: Size = 'l';\n\t@property({ type: String }) for?: string;\n\n\toverride render() {\n\t\tconst styleClasses = {\n\t\t\t'sds-label': true,\n\t\t\t'sds-label--l': this.size === 'l',\n\t\t\t'sds-label--m': this.size === 'm',\n\t\t\t'sds-label--s': this.size === 's',\n\t\t};\n\n\t\tconst classes = classMap(styleClasses);\n\n\t\treturn html`<label for=\"${ifDefined(this.for)}\" class=${classes}><slot></slot></label>`;\n\t}\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-label': SDSLabel;\n\t}\n\t// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-label': SDSLabelProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-label': SDSLabelProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-label': SDSLabelProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-label'?: SDSLabelProps;\n\t}\n} */\n"]}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
type Size = 'l' | 'm' | 's';
|
|
3
3
|
type Target = '_blank' | '_self' | '_parent' | '_top';
|
|
4
|
+
interface SDSLinkProps {
|
|
5
|
+
href?: string;
|
|
6
|
+
size?: Size;
|
|
7
|
+
target?: Target;
|
|
8
|
+
}
|
|
4
9
|
export declare class SDSLink extends LitElement {
|
|
5
10
|
static styles: import("lit").CSSResult[];
|
|
6
11
|
href?: string;
|
|
@@ -12,6 +17,11 @@ declare global {
|
|
|
12
17
|
interface HTMLElementTagNameMap {
|
|
13
18
|
'sds-link': SDSLink;
|
|
14
19
|
}
|
|
20
|
+
namespace JSX {
|
|
21
|
+
interface IntrinsicElements {
|
|
22
|
+
'sds-link': SDSLinkProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
15
25
|
}
|
|
16
26
|
export {};
|
|
17
27
|
//# sourceMappingURL=sds-link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-link.d.ts","sourceRoot":"","sources":["../../src/sds-link/sds-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAC5B,KAAK,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEtD,qBACa,OAAQ,SAAQ,UAAU;IAEtC,OAAgB,MAAM,4BAAY;
|
|
1
|
+
{"version":3,"file":"sds-link.d.ts","sourceRoot":"","sources":["../../src/sds-link/sds-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAC5B,KAAK,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEtD,UAAU,YAAY;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,OAAQ,SAAQ,UAAU;IAEtC,OAAgB,MAAM,4BAAY;IAGN,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAO;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEnC,MAAM;CAcf;AAED,OAAO,CAAC,MAAM,CAAC;IAEd,UAAU,qBAAqB;QAC9B,UAAU,EAAE,OAAO,CAAC;KACpB;IAED,UAAU,GAAG,CAAC;QACb,UAAU,iBAAiB;YAC1B,UAAU,EAAE,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;SACnG;KACD;CACD"}
|
|
@@ -42,4 +42,25 @@ SDSLink = __decorate([
|
|
|
42
42
|
customElement('sds-link')
|
|
43
43
|
], SDSLink);
|
|
44
44
|
export { SDSLink };
|
|
45
|
+
/*
|
|
46
|
+
// Angular
|
|
47
|
+
declare module '@angular/core' {
|
|
48
|
+
interface IntrinsicElements {
|
|
49
|
+
'sds-link': SDSLinkProps;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Vue
|
|
54
|
+
declare module 'vue' {
|
|
55
|
+
export interface GlobalComponents {
|
|
56
|
+
'sds-link': SDSLinkProps;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Svelte
|
|
61
|
+
declare namespace svelteHTML {
|
|
62
|
+
interface HTMLAttributes<T> {
|
|
63
|
+
'sds-link'?: SDSLinkProps;
|
|
64
|
+
}
|
|
65
|
+
} */
|
|
45
66
|
//# sourceMappingURL=sds-link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-link.js","sourceRoot":"","sources":["../../src/sds-link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AAC,MAAM,CAAC,AAAX,CAAY;AAGN;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAiB;AAPhC,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CAuBnB;;AAeD;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-link.styles';\n\ntype Size = 'l' | 'm' | 's';\ntype Target = '_blank' | '_self' | '_parent' | '_top';\n\ninterface SDSLinkProps {\n\thref?: string;\n\tsize?: Size;\n\ttarget?: Target;\n}\n\n@customElement('sds-link')\nexport class SDSLink extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String }) href?: string;\n\t@property({ type: String }) size: Size = 'm';\n\t@property({ type: String }) target?: Target;\n\n\toverride render() {\n\t\tconst styleClasses = {\n\t\t\t'sds-link': true,\n\t\t\t'sds-link--l': this.size === 'l',\n\t\t\t'sds-link--m': this.size === 'm',\n\t\t\t'sds-link--s': this.size === 's',\n\t\t};\n\n\t\tconst classes = classMap(styleClasses);\n\n\t\treturn html`<a href=\"${ifDefined(this.href)}\" target=\"${ifDefined(this.target)}\" class=${classes}\n\t\t\t><slot></slot\n\t\t></a>`;\n\t}\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-link': SDSLink;\n\t}\n\t// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-link': SDSLinkProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-link': SDSLinkProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-link': SDSLinkProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-link'?: SDSLinkProps;\n\t}\n} */\n"]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import { type ColorType } from '../sds-icon/sds-icon.color-types';
|
|
3
3
|
type LoaderSize = 'large' | 'medium' | 'small';
|
|
4
|
+
interface SDSLoaderProps {
|
|
5
|
+
size?: LoaderSize;
|
|
6
|
+
color?: ColorType;
|
|
7
|
+
}
|
|
4
8
|
export declare class SDSLoader extends LitElement {
|
|
5
9
|
static styles: import("lit").CSSResult[];
|
|
6
10
|
size: LoaderSize;
|
|
@@ -11,6 +15,11 @@ declare global {
|
|
|
11
15
|
interface HTMLElementTagNameMap {
|
|
12
16
|
'sds-loader': SDSLoader;
|
|
13
17
|
}
|
|
18
|
+
namespace JSX {
|
|
19
|
+
interface IntrinsicElements {
|
|
20
|
+
'sds-loader': SDSLoaderProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
14
23
|
}
|
|
15
24
|
export {};
|
|
16
25
|
//# sourceMappingURL=sds-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-loader.d.ts","sourceRoot":"","sources":["../../src/sds-loader/sds-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,KAAK,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/C,qBACa,SAAU,SAAQ,UAAU;IAExC,OAAgB,MAAM,4BAAY;
|
|
1
|
+
{"version":3,"file":"sds-loader.d.ts","sourceRoot":"","sources":["../../src/sds-loader/sds-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,KAAK,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/C,UAAU,cAAc;IACvB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,qBACa,SAAU,SAAQ,UAAU;IAExC,OAAgB,MAAM,4BAAY;IAGS,IAAI,EAAE,UAAU,CAAW;IAC3B,KAAK,EAAE,SAAS,CAAkB;IAEpE,MAAM;CASf;AAED,OAAO,CAAC,MAAM,CAAC;IAEd,UAAU,qBAAqB;QAC9B,YAAY,EAAE,SAAS,CAAC;KACxB;IAED,UAAU,GAAG,CAAC;QACb,UAAU,iBAAiB;YAC1B,YAAY,EAAE,cAAc,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;SACvG;KACD;CACD"}
|
|
@@ -21,7 +21,7 @@ let SDSLoader = class SDSLoader extends LitElement {
|
|
|
21
21
|
'sds-loader--medium': this.size === 'medium',
|
|
22
22
|
'sds-loader--small': this.size === 'small',
|
|
23
23
|
};
|
|
24
|
-
return html `<span class="${classMap(loaderClasses)}" style="${`color:${this.color}`}"></span
|
|
24
|
+
return html `<span class="${classMap(loaderClasses)}" style="${`color:${this.color}`}"></span>`;
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
// Styling
|
|
@@ -36,4 +36,25 @@ SDSLoader = __decorate([
|
|
|
36
36
|
customElement('sds-loader')
|
|
37
37
|
], SDSLoader);
|
|
38
38
|
export { SDSLoader };
|
|
39
|
+
/*
|
|
40
|
+
// Angular
|
|
41
|
+
declare module '@angular/core' {
|
|
42
|
+
interface IntrinsicElements {
|
|
43
|
+
'sds-loader': SDSLoaderProps;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Vue
|
|
48
|
+
declare module 'vue' {
|
|
49
|
+
export interface GlobalComponents {
|
|
50
|
+
'sds-loader': SDSLoaderProps;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Svelte
|
|
55
|
+
declare namespace svelteHTML {
|
|
56
|
+
interface HTMLAttributes<T> {
|
|
57
|
+
'sds-loader'?: SDSLoaderProps;
|
|
58
|
+
}
|
|
59
|
+
} */
|
|
39
60
|
//# sourceMappingURL=sds-loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-loader.js","sourceRoot":"","sources":["../../src/sds-loader/sds-loader.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"sds-loader.js","sourceRoot":"","sources":["../../src/sds-loader/sds-loader.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAWtC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAIN,iBAAiB;QAC0B,SAAI,GAAe,OAAO,CAAC;QAC3B,UAAK,GAAc,cAAc,CAAC;IAW9E,CAAC;IATS,MAAM;QACd,MAAM,aAAa,GAAG;YACrB,YAAY,EAAE,IAAI;YAClB,oBAAoB,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;YAC5C,mBAAmB,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;SAC1C,CAAC;QAEF,OAAO,IAAI,CAAA,gBAAgB,QAAQ,CAAC,aAAa,CAAC,YAAY,SAAS,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC;IAChG,CAAC;;AAfD,UAAU;AACM,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAGS;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAA4B;AAC3B;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAmC;AANjE,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAiBrB;;AAeD;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-loader.styles';\nimport { type ColorType } from '../sds-icon/sds-icon.color-types';\n\ntype LoaderSize = 'large' | 'medium' | 'small';\n\ninterface SDSLoaderProps {\n\tsize?: LoaderSize;\n\tcolor?: ColorType;\n}\n\n@customElement('sds-loader')\nexport class SDSLoader extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String, reflect: true }) size: LoaderSize = 'large';\n\t@property({ type: String, reflect: true }) color: ColorType = 'currentColor';\n\n\toverride render() {\n\t\tconst loaderClasses = {\n\t\t\t'sds-loader': true,\n\t\t\t'sds-loader--medium': this.size === 'medium',\n\t\t\t'sds-loader--small': this.size === 'small',\n\t\t};\n\n\t\treturn html`<span class=\"${classMap(loaderClasses)}\" style=\"${`color:${this.color}`}\"></span>`;\n\t}\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-loader': SDSLoader;\n\t}\n\t// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-loader': SDSLoaderProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-loader': SDSLoaderProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-loader': SDSLoaderProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-loader'?: SDSLoaderProps;\n\t}\n} */\n"]}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
type Size = 'large' | 'medium' | 'small';
|
|
3
|
+
type HeadingLevel = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
|
+
interface SDSNavCardProps {
|
|
5
|
+
size?: Size;
|
|
6
|
+
heading: string;
|
|
7
|
+
level?: HeadingLevel;
|
|
8
|
+
link: string;
|
|
9
|
+
}
|
|
2
10
|
export declare class SDSNavCard extends LitElement {
|
|
3
|
-
/**
|
|
4
|
-
* This is the navigation card component
|
|
5
|
-
*
|
|
6
|
-
* @remarks The way the icon is handled now, causes a double update/side effect when loading the webpage.
|
|
7
|
-
* The svg that should be placed inside the slot, currently needs have its stroke attribute manually removed,
|
|
8
|
-
* in order for the components CSS to insert its own stroke color.
|
|
9
|
-
* This should be looked more into.
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
11
|
static styles: import("lit").CSSResult[];
|
|
13
|
-
size:
|
|
12
|
+
size: Size;
|
|
14
13
|
heading: string;
|
|
15
|
-
level:
|
|
14
|
+
level: HeadingLevel;
|
|
16
15
|
link: string;
|
|
17
16
|
private hasIcon;
|
|
18
17
|
private iconSlot;
|
|
@@ -27,5 +26,11 @@ declare global {
|
|
|
27
26
|
interface HTMLElementTagNameMap {
|
|
28
27
|
'sds-nav-card': SDSNavCard;
|
|
29
28
|
}
|
|
29
|
+
namespace JSX {
|
|
30
|
+
interface IntrinsicElements {
|
|
31
|
+
'sds-nav-card': SDSNavCardProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
30
34
|
}
|
|
35
|
+
export {};
|
|
31
36
|
//# sourceMappingURL=sds-nav-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-nav-card.d.ts","sourceRoot":"","sources":["../../src/sds-nav-card/sds-nav-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,
|
|
1
|
+
{"version":3,"file":"sds-nav-card.d.ts","sourceRoot":"","sources":["../../src/sds-nav-card/sds-nav-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,KAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACzC,KAAK,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAErD,UAAU,eAAe;IACxB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,qBACa,UAAW,SAAQ,UAAU;IAEzC,OAAgB,MAAM,4BAAY;IAGS,IAAI,EAAE,IAAI,CAAW;IACrB,OAAO,EAAG,MAAM,CAAC;IACjB,KAAK,EAAE,YAAY,CAAQ;IAC3B,IAAI,EAAG,MAAM,CAAC;IAGhD,OAAO,CAAC,OAAO,CAAkB;IAC3B,OAAO,CAAC,QAAQ,CAAmB;IAEzC,YAAY;IAIrB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,wBAAwB;IAUhC,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,cAAc;IAmBb,MAAM;CAmBf;AAED,OAAO,CAAC,MAAM,CAAC;IAEd,UAAU,qBAAqB;QAC9B,cAAc,EAAE,UAAU,CAAC;KAC3B;IAGD,UAAU,GAAG,CAAC;QACb,UAAU,iBAAiB;YAC1B,cAAc,EAAE,eAAe,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;SAC1G;KACD;CACD"}
|
|
@@ -10,15 +10,6 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
|
10
10
|
import { styles } from './sds-nav-card.styles';
|
|
11
11
|
let SDSNavCard = class SDSNavCard extends LitElement {
|
|
12
12
|
constructor() {
|
|
13
|
-
/**
|
|
14
|
-
* This is the navigation card component
|
|
15
|
-
*
|
|
16
|
-
* @remarks The way the icon is handled now, causes a double update/side effect when loading the webpage.
|
|
17
|
-
* The svg that should be placed inside the slot, currently needs have its stroke attribute manually removed,
|
|
18
|
-
* in order for the components CSS to insert its own stroke color.
|
|
19
|
-
* This should be looked more into.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
13
|
super(...arguments);
|
|
23
14
|
// Reactive Props
|
|
24
15
|
this.size = 'large';
|
|
@@ -32,7 +23,6 @@ let SDSNavCard = class SDSNavCard extends LitElement {
|
|
|
32
23
|
_handleSlotChange() {
|
|
33
24
|
this._checkSlotContent();
|
|
34
25
|
}
|
|
35
|
-
// Filters out text nodes that only contain whitespace
|
|
36
26
|
_filterToMeaningfulNodes(nodes) {
|
|
37
27
|
return nodes.filter((node) => {
|
|
38
28
|
if (node.nodeType === Node.TEXT_NODE) {
|
|
@@ -42,7 +32,6 @@ let SDSNavCard = class SDSNavCard extends LitElement {
|
|
|
42
32
|
return true;
|
|
43
33
|
});
|
|
44
34
|
}
|
|
45
|
-
// Checks if the icon slot has content and updates the state variable
|
|
46
35
|
_checkSlotContent() {
|
|
47
36
|
const assignedNodes = this.iconSlot.assignedNodes({ flatten: true });
|
|
48
37
|
const meaningfulNodes = this._filterToMeaningfulNodes(assignedNodes);
|
|
@@ -108,4 +97,25 @@ SDSNavCard = __decorate([
|
|
|
108
97
|
customElement('sds-nav-card')
|
|
109
98
|
], SDSNavCard);
|
|
110
99
|
export { SDSNavCard };
|
|
100
|
+
/*
|
|
101
|
+
// Angular
|
|
102
|
+
declare module '@angular/core' {
|
|
103
|
+
interface IntrinsicElements {
|
|
104
|
+
'sds-nav-card': SDSNavCardProps;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Vue
|
|
109
|
+
declare module 'vue' {
|
|
110
|
+
export interface GlobalComponents {
|
|
111
|
+
'sds-nav-card': SDSNavCardProps;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Svelte
|
|
116
|
+
declare namespace svelteHTML {
|
|
117
|
+
interface HTMLAttributes<T> {
|
|
118
|
+
'sds-nav-card'?: SDSNavCardProps;
|
|
119
|
+
}
|
|
120
|
+
} */
|
|
111
121
|
//# sourceMappingURL=sds-nav-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-nav-card.js","sourceRoot":"","sources":["../../src/sds-nav-card/sds-nav-card.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"sds-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E,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAsB;AACrB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAkB;AACjB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAA4B;AAC3B;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAe;AAGxC;IAAhB,KAAK,EAAE;2CAAkC;AACnB;IAAtB,KAAK,CAAC,MAAM,CAAC;4CAAoC;AAZtC,UAAU;IADtB,aAAa,CAAC,cAAc,CAAC;GACjB,UAAU,CA4EtB;;AAgBD;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-nav-card.styles';\n\ntype Size = 'large' | 'medium' | 'small';\ntype HeadingLevel = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\ninterface SDSNavCardProps {\n\tsize?: Size;\n\theading: string;\n\tlevel?: HeadingLevel;\n\tlink: string;\n}\n\n@customElement('sds-nav-card')\nexport class SDSNavCard extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String, reflect: true }) size: Size = 'large';\n\t@property({ type: String, reflect: true }) heading!: string;\n\t@property({ type: String, reflect: true }) level: HeadingLevel = 'h2';\n\t@property({ type: String, reflect: true }) link!: string;\n\n\t// Managing the icon slot\n\t@state() private hasIcon: boolean = false;\n\t@query('slot') private iconSlot!: HTMLSlotElement;\n\n\toverride firstUpdated() {\n\t\tthis._checkSlotContent();\n\t}\n\n\tprivate _handleSlotChange() {\n\t\tthis._checkSlotContent();\n\t}\n\n\tprivate _filterToMeaningfulNodes(nodes: Node[]) {\n\t\treturn nodes.filter((node) => {\n\t\t\tif (node.nodeType === Node.TEXT_NODE) {\n\t\t\t\tconst textContent = (node as Text).textContent;\n\t\t\t\treturn textContent !== null && textContent.trim().length > 0;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t}\n\n\tprivate _checkSlotContent() {\n\t\tconst assignedNodes = this.iconSlot.assignedNodes({ flatten: true });\n\t\tconst meaningfulNodes = this._filterToMeaningfulNodes(assignedNodes);\n\t\tthis.hasIcon = meaningfulNodes.length !== 0;\n\t}\n\n\tprivate _renderHeading() {\n\t\tconst headingClass = 'sds-nav-card__heading';\n\n\t\tswitch (this.level) {\n\t\t\tcase 'h2':\n\t\t\t\treturn html`<h2 class=\"${headingClass}\">${this.heading}</h2>`;\n\t\t\tcase 'h3':\n\t\t\t\treturn html`<h3 class=\"${headingClass}\">${this.heading}</h3>`;\n\t\t\tcase 'h4':\n\t\t\t\treturn html`<h4 class=\"${headingClass}\">${this.heading}</h4>`;\n\t\t\tcase 'h5':\n\t\t\t\treturn html`<h5 class=\"${headingClass}\">${this.heading}</h5>`;\n\t\t\tcase 'h6':\n\t\t\t\treturn html`<h6 class=\"${headingClass}\">${this.heading}</h6>`;\n\t\t\tdefault:\n\t\t\t\treturn html`<h2 class=\"${headingClass}\">${this.heading}</h2>`;\n\t\t}\n\t}\n\n\toverride render() {\n\t\tconst navCardClasses = {\n\t\t\t'sds-nav-card': true,\n\t\t\t'sds-nav-card--hasIcon': this.hasIcon,\n\t\t\t'sds-nav-card--small': this.size === 'small',\n\t\t\t'sds-nav-card--medium': this.size === 'medium',\n\t\t\t'sds-nav-card--large': this.size === 'large',\n\t\t};\n\n\t\treturn html`\n\t\t\t<a class=\"${classMap(navCardClasses)}\" href=\"${this.link}\">\n\t\t\t\t<slot name=\"before\" @slotchange=${this._handleSlotChange}></slot>\n\t\t\t\t<div class=\"sds-nav-card__content\">\n\t\t\t\t\t${this._renderHeading()}\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-nav-card': SDSNavCard;\n\t}\n\n\t// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-nav-card': SDSNavCardProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-nav-card': SDSNavCardProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-nav-card': SDSNavCardProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-nav-card'?: SDSNavCardProps;\n\t}\n} */\n"]}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import '../sds-icon/sds-icon';
|
|
3
3
|
type NotificationVariant = 'info' | 'success' | 'attention' | 'warning' | 'critical';
|
|
4
|
+
interface SDSNotificationProps {
|
|
5
|
+
variant?: NotificationVariant;
|
|
6
|
+
'removable-label'?: string;
|
|
7
|
+
onSdsRemove?: (event: CustomEvent) => void;
|
|
8
|
+
}
|
|
4
9
|
export declare class SDSNotification extends LitElement {
|
|
5
10
|
static styles: import("lit").CSSResult[];
|
|
6
11
|
variant: NotificationVariant;
|
|
@@ -12,6 +17,11 @@ declare global {
|
|
|
12
17
|
interface HTMLElementTagNameMap {
|
|
13
18
|
'sds-notification': SDSNotification;
|
|
14
19
|
}
|
|
20
|
+
namespace JSX {
|
|
21
|
+
interface IntrinsicElements {
|
|
22
|
+
'sds-notification': SDSNotificationProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
15
25
|
}
|
|
16
26
|
export {};
|
|
17
27
|
//# 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,qBACa,eAAgB,SAAQ,UAAU;IAE9C,OAAgB,MAAM,4BAAY;
|
|
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,UAAU,oBAAoB;IAC7B,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;IAEd,UAAU,qBAAqB;QAC9B,kBAAkB,EAAE,eAAe,CAAC;KACpC;IAGD,UAAU,GAAG,CAAC;QACb,UAAU,iBAAiB;YAC1B,kBAAkB,EAAE,oBAAoB,GACvC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;SACzE;KACD;CACD"}
|
|
@@ -67,4 +67,25 @@ SDSNotification = __decorate([
|
|
|
67
67
|
customElement('sds-notification')
|
|
68
68
|
], SDSNotification);
|
|
69
69
|
export { SDSNotification };
|
|
70
|
+
/*
|
|
71
|
+
// Angular
|
|
72
|
+
declare module '@angular/core' {
|
|
73
|
+
interface IntrinsicElements {
|
|
74
|
+
'sds-notification': SDSNotificationProps;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Vue
|
|
79
|
+
declare module 'vue' {
|
|
80
|
+
export interface GlobalComponents {
|
|
81
|
+
'sds-notification': SDSNotificationProps;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Svelte
|
|
86
|
+
declare namespace svelteHTML {
|
|
87
|
+
interface HTMLAttributes<T> {
|
|
88
|
+
'sds-notification'?: SDSNotificationProps;
|
|
89
|
+
}
|
|
90
|
+
} */
|
|
70
91
|
//# sourceMappingURL=sds-notification.js.map
|