@spscommerce/ds-web-components 5.0.0-rc1 → 5.0.0

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 (71) hide show
  1. package/dist/README.md +3 -0
  2. package/dist/global.d.ts +15 -0
  3. package/dist/lib/components/file-upload/file-upload.d.ts +119 -0
  4. package/dist/lib/components/file-upload/file-upload.examples.d.ts +2 -0
  5. package/dist/lib/components/file-upload/mime-type.enum.d.ts +75 -0
  6. package/dist/lib/components/index.d.ts +11 -0
  7. package/dist/lib/components/insight-card/insight-card.d.ts +40 -0
  8. package/dist/lib/components/insight-card/insight-card.examples.d.ts +51 -0
  9. package/dist/lib/components/insight-card/insights.d.ts +18 -0
  10. package/dist/lib/components/nav-tabs/nav-tab-set.d.ts +7 -0
  11. package/dist/lib/components/nav-tabs/nav-tab.d.ts +24 -0
  12. package/dist/lib/components/nav-tabs/nav-tabs.examples.d.ts +11 -0
  13. package/dist/lib/components/photo/photo.d.ts +42 -0
  14. package/dist/lib/components/photo/photo.examples.d.ts +2 -0
  15. package/dist/lib/decorators/component.d.ts +33 -0
  16. package/dist/lib/decorators/content.d.ts +7 -0
  17. package/dist/lib/decorators/event-dispatcher.d.ts +9 -0
  18. package/dist/lib/decorators/event-listener.d.ts +5 -0
  19. package/dist/lib/decorators/index.d.ts +7 -0
  20. package/dist/lib/decorators/prop.d.ts +6 -0
  21. package/dist/lib/decorators/query-selector.d.ts +19 -0
  22. package/dist/lib/decorators/watch.d.ts +2 -0
  23. package/dist/lib/index.cjs.js +829 -0
  24. package/dist/lib/index.d.ts +6 -0
  25. package/dist/lib/index.es.js +2802 -0
  26. package/dist/lib/manifest.d.ts +2 -0
  27. package/dist/lib/utils/comment.d.ts +2 -0
  28. package/dist/lib/utils/i18n.d.ts +3 -0
  29. package/dist/lib/utils/index.d.ts +5 -0
  30. package/dist/lib/utils/metadata.d.ts +22 -0
  31. package/dist/lib/utils/pragma.d.ts +6 -0
  32. package/dist/lib/utils/register.d.ts +13 -0
  33. package/dist/package.json +36 -0
  34. package/global.d.ts +10 -10
  35. package/lib/components/file-upload/file-upload.d.ts +119 -107
  36. package/lib/components/file-upload/file-upload.examples.d.ts +2 -2
  37. package/lib/components/file-upload/mime-type.enum.d.ts +75 -75
  38. package/lib/components/index.d.ts +11 -11
  39. package/lib/components/insight-card/insight-card.d.ts +40 -36
  40. package/lib/components/insight-card/insight-card.examples.d.ts +51 -51
  41. package/lib/components/insight-card/insights.d.ts +18 -18
  42. package/lib/components/nav-tabs/nav-tab-set.d.ts +7 -7
  43. package/lib/components/nav-tabs/nav-tab.d.ts +24 -24
  44. package/lib/components/nav-tabs/nav-tabs.examples.d.ts +11 -11
  45. package/lib/components/photo/photo.d.ts +42 -42
  46. package/lib/components/photo/photo.examples.d.ts +2 -2
  47. package/lib/decorators/component.d.ts +33 -32
  48. package/lib/decorators/content.d.ts +7 -6
  49. package/lib/decorators/event-dispatcher.d.ts +9 -8
  50. package/lib/decorators/event-listener.d.ts +5 -4
  51. package/lib/decorators/index.d.ts +7 -7
  52. package/lib/decorators/prop.d.ts +6 -5
  53. package/lib/decorators/query-selector.d.ts +19 -16
  54. package/lib/decorators/watch.d.ts +2 -2
  55. package/lib/index.cjs.js +661 -3009
  56. package/lib/index.d.ts +6 -7
  57. package/lib/index.es.js +2802 -0
  58. package/lib/manifest.d.ts +2 -2
  59. package/lib/utils/comment.d.ts +2 -2
  60. package/lib/utils/i18n.d.ts +3 -3
  61. package/lib/utils/index.d.ts +5 -5
  62. package/lib/utils/metadata.d.ts +22 -22
  63. package/lib/utils/pragma.d.ts +6 -6
  64. package/lib/utils/register.d.ts +13 -11
  65. package/package.json +18 -17
  66. package/vite.config.js +20 -0
  67. package/lib/components/file-upload/file-upload.test-unit.d.ts +0 -1
  68. package/lib/components/insight-card/insight-card.test-unit.d.ts +0 -1
  69. package/lib/components/nav-tabs/nav-tabs.test-unit.d.ts +0 -1
  70. package/lib/components/photo/photo.test-unit.d.ts +0 -1
  71. package/lib/index.esm.js +0 -3148
@@ -0,0 +1,2 @@
1
+ import type { ComponentManifest } from "@spscommerce/ds-shared";
2
+ export declare const MANIFEST: ComponentManifest;
@@ -0,0 +1,2 @@
1
+ /** docs:ignore */
2
+ export declare function comment(content: string): any;
@@ -0,0 +1,3 @@
1
+ import type { I18nObject } from "@spscommerce/ds-shared";
2
+ export declare function webComponentsUseI18n(i18n: I18nObject): void;
3
+ export declare function getI18n(): I18nObject;
@@ -0,0 +1,5 @@
1
+ export * from "./comment";
2
+ export * from "./i18n";
3
+ export * from "./metadata";
4
+ export * from "./pragma";
5
+ export * from "./register";
@@ -0,0 +1,22 @@
1
+ export interface ComponentConfig {
2
+ tag: string;
3
+ }
4
+ /** docs:ignore */
5
+ export interface ComponentChildQuery {
6
+ key: string;
7
+ selector: string;
8
+ refresh: boolean;
9
+ all: boolean;
10
+ }
11
+ /** docs:ignore */
12
+ export interface ComponentMetadata extends ComponentConfig {
13
+ childQueries?: ComponentChildQuery[];
14
+ contentProp?: PropertyKey;
15
+ eventListeners?: Array<[string, PropertyKey]>;
16
+ }
17
+ /** docs:ignore */
18
+ export declare const Metadata: Readonly<{
19
+ has(target: any, key: string): boolean;
20
+ add(target: any, metadata: Partial<ComponentMetadata>): void;
21
+ get<T = any>(target: any, key: string, defaultValue?: T): T;
22
+ }>;
@@ -0,0 +1,6 @@
1
+ /** docs:ignore */
2
+ export declare const MARK_CONTENT_START = "idom-pragma:content-begin";
3
+ /** docs:ignore */
4
+ export declare const MARK_CONTENT_END = "idom-pragma:content-end";
5
+ /** JSX pragma that utilizes incremental-dom. */
6
+ export declare function h(tagName: string, attrs: any, ...children: any[]): () => void;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Register a list of DS web components so that they can be used. Should be done
3
+ * just once in your app, at init/bootstrap time.
4
+ */
5
+ export declare function register(...Components: any[]): void;
6
+ /**
7
+ * If for some reason you have a tag name conflict between a DS web component and
8
+ * another component in your app, you can use this to override the "sps" namespace
9
+ * for the DS web component(s). You pass in the new namespace, and it returns a customized
10
+ * `register()` function that you can pass DS web components to. For example, you could
11
+ * use this to make `<sps-photo>` become `<foo-photo>` instead.
12
+ */
13
+ export declare function namespaceOverrideRegistrar(overrideNamespace: string): (...Components: any[]) => void;
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@spscommerce/ds-web-components",
3
+ "description": "SPS Design System Native Web Components",
4
+ "version": "5.0.0",
5
+ "author": "SPS Commerce",
6
+ "license": "UNLICENSED",
7
+ "repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-web-components",
8
+ "homepage": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-web-components#readme",
9
+ "scripts": {
10
+ "build": "pnpm run build:js && pnpm run build:types && pnpm run build:create-dist && pnpm run build:copy-dist",
11
+ "build:js": "vite build",
12
+ "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir lib",
13
+ "watch": "vite build --watch",
14
+ "clean": "git clean -fdX",
15
+ "pub": "pnpm pack && node ../../scripts/publish-package.js",
16
+ "build:create-dist": "mkdir -p dist && cp -r lib dist/ && cp package.json dist/ && cp README.md dist/ && cp global.d.ts dist/",
17
+ "build:copy-dist": "node ../../scripts/copy-built-package.js ../../node_modules/@spscommerce/ds-web-components"
18
+ },
19
+ "main": "./lib/index.cjs.js",
20
+ "module": "./lib/index.es.js",
21
+ "types": "./lib/index.d.ts",
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "dependencies": {
26
+ "incremental-dom": "^0.6.0"
27
+ },
28
+ "peerDependencies": {
29
+ "@spscommerce/ds-shared": "workspace:*",
30
+ "@spscommerce/utils": "workspace:*"
31
+ },
32
+ "devDependencies": {
33
+ "@spscommerce/ds-shared": "workspace:*",
34
+ "@spscommerce/utils": "workspace:*"
35
+ }
36
+ }
package/global.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  export {};
2
2
 
3
3
  declare global {
4
- namespace JSX {
5
- interface IntrinsicElements {
6
- 'frag': { children?: any };
7
- 'sps-file-upload': any;
8
- 'sps-insight-card': any;
9
- 'sps-insights': any;
10
- 'sps-nav-tab': any;
11
- 'sps-nav-tab-set': any;
12
- 'sps-photo': any;
13
- }
4
+ namespace JSX {
5
+ interface IntrinsicElements {
6
+ "frag": { children?: any };
7
+ "sps-file-upload": any;
8
+ "sps-insight-card": any;
9
+ "sps-insights": any;
10
+ "sps-nav-tab": any;
11
+ "sps-nav-tab-set": any;
12
+ "sps-photo": any;
14
13
  }
14
+ }
15
15
  }
@@ -1,107 +1,119 @@
1
- import { ClassBindings, Dispatcher } from '../../decorators/index';
2
- export declare class SpsFileUploadComponent extends HTMLElement {
3
- static readonly displayName = "sps-file-upload";
4
- static readonly props: {
5
- description: string;
6
- multiple: string;
7
- dismissable: string;
8
- processing: string;
9
- mini: string;
10
- downloadLabel: string;
11
- acceptExtensions: string;
12
- maxSize: string;
13
- selection: {
14
- event: boolean;
15
- type: string;
16
- };
17
- dismissal: {
18
- event: boolean;
19
- type: string;
20
- };
21
- download: {
22
- event: boolean;
23
- type: string;
24
- };
25
- };
26
- /** The "term" for what the user should upload. Defaults to "File" or "Files",
27
- * but if you set the `acceptExtensions` prop you might set this to something
28
- * more specific, such as "Spreadsheet" or "Images".
29
- */
30
- description: any;
31
- /** If true, the component will accept multiple files at once. By default, you can
32
- * only select one file at a time.
33
- */
34
- multiple: boolean;
35
- /** Controls whether the component is visible. */
36
- shown: boolean;
37
- /** Controls whether the user can hide the component from view. */
38
- dismissable: boolean;
39
- /** Puts the component in "processing" state, where it displays a spinner and
40
- * does not allow any files to be selected.
41
- */
42
- processing: boolean;
43
- /** Specifies that the component should be displayed in the "mini" style. */
44
- mini: boolean;
45
- /** If provided, the content area width will be set to 50% of the overall width. */
46
- constrainContentWidth: boolean;
47
- /** If provided, a button will be rendered with this text as its label. */
48
- downloadLabel: string;
49
- private accept;
50
- private acceptMIMETypes;
51
- private acceptExtensionsDescription;
52
- /** A list of extensions, provided either as an array of strings or a
53
- * string containing comma-separates extensions. Only files with the MIME types
54
- * associated with those extensions will be able to be selected. The case of
55
- * the extensions does not matter; neither does whether you prefix them with a
56
- * dot. That is, ".doc", "DOCX", and "jpg" are all valid extensions for this prop.
57
- */
58
- acceptExtensions: Array<string> | string;
59
- private maxSizeBytes;
60
- /** The maximum allowable size in bytes for files selected by the component. */
61
- maxSize: string;
62
- /** Event which emits when a file or files have been selected by the user. The
63
- * event detail will be an array of Files.
64
- */
65
- selection: Dispatcher<Array<File>>;
66
- /** If the `dismissable` prop has been set, this event will fire when the user
67
- * opts to hide the component.
68
- */
69
- dismissal: Dispatcher<void>;
70
- /** If the `downloadLabel` prop has been provided, this event will fire when the
71
- * user clicks the download button that is rendered.
72
- */
73
- download: Dispatcher<void>;
74
- /** The HTML file input element within the component. */
75
- fileInput: HTMLInputElement;
76
- private active;
77
- private error;
78
- /** The list of selected files. If the `multiple` prop has not been provided,
79
- * it is still an array; it will simply be an array of one when the user selects
80
- * a file.
81
- */
82
- files: Array<File>;
83
- private namesOfUnsupportedFiles;
84
- get [ClassBindings](): string[];
85
- constructor();
86
- private parseAndValidateMaxSize;
87
- private processAcceptExtensions;
88
- connectedCallback(): void;
89
- attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
90
- private selectFiles;
91
- private handleDragOver;
92
- private handleDragEnter;
93
- private handleDragLeave;
94
- private handleDrop;
95
- private handleBrowseLinkClick;
96
- private handleDownloadButtonClick;
97
- private handleFileInputChange;
98
- /** If the `dismissable` prop has been set, this will programmatically
99
- * dismiss the component and fire the "dismissal" event.
100
- */
101
- dismiss(): void;
102
- /** If the `dismissable` prop has been set, this will programmatically show the component. */
103
- show(): void;
104
- render({ t }: {
105
- t: any;
106
- }): JSX.Element;
107
- }
1
+ import { ClassBindings, Dispatcher } from "../../decorators/index";
2
+ export declare class SpsFileUploadComponent extends HTMLElement {
3
+ static readonly displayName = "sps-file-upload";
4
+ static readonly props: {
5
+ description: string;
6
+ multiple: string;
7
+ dismissable: string;
8
+ processing: string;
9
+ mini: string;
10
+ downloadLabel: string;
11
+ acceptExtensions: string;
12
+ maxSize: string;
13
+ customRequirement: string;
14
+ selection: {
15
+ event: boolean;
16
+ type: string;
17
+ };
18
+ dismissal: {
19
+ event: boolean;
20
+ type: string;
21
+ };
22
+ download: {
23
+ event: boolean;
24
+ type: string;
25
+ };
26
+ };
27
+ /**
28
+ * The "term" for what the user should upload. Defaults to "File" or "Files",
29
+ * but if you set the `acceptExtensions` prop you might set this to something
30
+ * more specific, such as "Spreadsheet" or "Images".
31
+ */
32
+ description: any;
33
+ /**
34
+ * If true, the component will accept multiple files at once. By default, you can
35
+ * only select one file at a time.
36
+ */
37
+ multiple: boolean;
38
+ /** Controls whether the component is visible. */
39
+ shown: boolean;
40
+ /** Controls whether the user can hide the component from view. */
41
+ dismissable: boolean;
42
+ /**
43
+ * Puts the component in "processing" state, where it displays a spinner and
44
+ * does not allow any files to be selected.
45
+ */
46
+ processing: boolean;
47
+ /** Specifies that the component should be displayed in the "mini" style. */
48
+ mini: boolean;
49
+ /** If provided, the content area width will be set to 50% of the overall width. */
50
+ constrainContentWidth: boolean;
51
+ /** If provided, a button will be rendered with this text as its label. */
52
+ downloadLabel: string;
53
+ /**
54
+ * A list of extensions, provided either as an array of strings or a
55
+ * string containing comma-separates extensions. Only files with the MIME types
56
+ * associated with those extensions will be able to be selected. The case of
57
+ * the extensions does not matter; neither does whether you prefix them with a
58
+ * dot. That is, ".doc", "DOCX", and "jpg" are all valid extensions for this prop.
59
+ */
60
+ acceptExtensions: string[] | string;
61
+ /** The maximum allowable size in bytes for files selected by the component. */
62
+ maxSize: string;
63
+ /** custom label in requirements place. */
64
+ customRequirement: string;
65
+ /**
66
+ * Event which emits when a file or files have been selected by the user. The
67
+ * event detail will be an array of Files.
68
+ */
69
+ selection: Dispatcher<File[]>;
70
+ /**
71
+ * If the `dismissable` prop has been set, this event will fire when the user
72
+ * opts to hide the component.
73
+ */
74
+ dismissal: Dispatcher<void>;
75
+ /**
76
+ * If the `downloadLabel` prop has been provided, this event will fire when the
77
+ * user clicks the download button that is rendered.
78
+ */
79
+ download: Dispatcher<void>;
80
+ /** The HTML file input element within the component. */
81
+ fileInput: HTMLInputElement;
82
+ /**
83
+ * The list of selected files. If the `multiple` prop has not been provided,
84
+ * it is still an array; it will simply be an array of one when the user selects
85
+ * a file.
86
+ */
87
+ files: File[];
88
+ private accept;
89
+ private acceptMIMETypes;
90
+ private acceptExtensionsDescription;
91
+ private maxSizeBytes;
92
+ private active;
93
+ private error;
94
+ private namesOfUnsupportedFiles;
95
+ get [ClassBindings](): string[];
96
+ constructor();
97
+ connectedCallback(): void;
98
+ attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void;
99
+ /**
100
+ * If the `dismissable` prop has been set, this will programmatically
101
+ * dismiss the component and fire the "dismissal" event.
102
+ */
103
+ dismiss(): void;
104
+ /** If the `dismissable` prop has been set, this will programmatically show the component. */
105
+ show(): void;
106
+ render({ t }: {
107
+ t: any;
108
+ }): JSX.Element;
109
+ private parseAndValidateMaxSize;
110
+ private processAcceptExtensions;
111
+ private selectFiles;
112
+ private handleDragOver;
113
+ private handleDragEnter;
114
+ private handleDragLeave;
115
+ private handleDrop;
116
+ private handleBrowseLinkClick;
117
+ private handleDownloadButtonClick;
118
+ private handleFileInputChange;
119
+ }
@@ -1,2 +1,2 @@
1
- import { DSReactExamples } from '@spscommerce/ds-shared';
2
- export declare const SpsFileUploadExamples: DSReactExamples;
1
+ import type { DSReactExamples } from "@spscommerce/ds-shared";
2
+ export declare const SpsFileUploadExamples: DSReactExamples;
@@ -1,75 +1,75 @@
1
- export declare enum MIMEType {
2
- '7Z' = "application/x-7z-compressed",
3
- AAC = "audio/aac",
4
- ABW = "application/x-abiword",
5
- ARC = "application/octet-stream",
6
- AVI = "video/x-msvideo",
7
- AZW = "application/vnd.amazon.ebook",
8
- BIN = "application/octet-stream",
9
- BMP = "image/bmp",
10
- BZ = "application/x-bzip",
11
- BZ2 = "application/x-bzip2",
12
- CSH = "application/x-csh",
13
- CSS = "text/css",
14
- CSV = "text/csv,application/vnd.ms-excel",
15
- DOC = "application/msword",
16
- DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
17
- EOT = "application/vnd.ms-fontobject",
18
- EPUB = "application/epub+zip",
19
- ES = "application/ecmascript",
20
- FLV = "video/x-flv",
21
- GIF = "image/gif",
22
- GZ = "application/x-gzip",
23
- HTM = "text/html",
24
- HTML = "text/html",
25
- ICO = "image/x-icon",
26
- ICS = "text/calendar",
27
- JAR = "application/java-archive",
28
- JPEG = "image/jpeg",
29
- JPG = "image/jpeg",
30
- JS = "application/javascript",
31
- JSON = "application/json",
32
- M3U = "audio/x-mpequrl",
33
- MID = "audio/midi",
34
- MIDI = "audio/midi",
35
- MOV = "video/quicktime",
36
- MP3 = "audio/mpeg3",
37
- MP4 = "video/mp4",
38
- MPEG = "video/mpeg",
39
- MPKG = "application/vnd.apple.installer+xml",
40
- ODP = "application/vnd.oasis.opendocument.presentation",
41
- ODS = "application/vnd.oasis.opendocument.spreadsheet",
42
- ODT = "application/vnd.oasis.opendocument.text",
43
- OGA = "audio/ogg",
44
- OGV = "video/ogg",
45
- OGX = "application/ogg",
46
- OTF = "font/otf",
47
- PNG = "image/png",
48
- PDF = "application/pdf",
49
- PPT = "application/vnd.ms-powerpoint",
50
- PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
51
- RAR = "application/x-rar-compressed",
52
- RTF = "application/rtf",
53
- SH = "application/x-sh",
54
- SVG = "image/svg+xml",
55
- SWF = "application/x-shockwave-flash",
56
- TAR = "application/x-tar",
57
- TIF = "image/tiff",
58
- TIFF = "image/tiff",
59
- TS = "application/typescript",
60
- TTF = "font/ttf",
61
- TXT = "text/plain",
62
- VSD = "application/vnd.visio",
63
- WAV = "audio/wav",
64
- WEBA = "audio/webm",
65
- WEBM = "video/webm",
66
- WEBP = "image/webp",
67
- WOFF = "font/woff",
68
- WOFF2 = "font/woff2",
69
- XHTML = "application/xhtml+xml",
70
- XLS = "application/vnd.ms-excel",
71
- XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
72
- XML = "application/xml",
73
- XUL = "application/vnd.mozilla.xul+xml",
74
- ZIP = "application/zip"
75
- }
1
+ export declare enum MIMEType {
2
+ "7Z" = "application/x-7z-compressed",
3
+ AAC = "audio/aac",
4
+ ABW = "application/x-abiword",
5
+ ARC = "application/octet-stream",
6
+ AVI = "video/x-msvideo",
7
+ AZW = "application/vnd.amazon.ebook",
8
+ BIN = "application/octet-stream",
9
+ BMP = "image/bmp",
10
+ BZ = "application/x-bzip",
11
+ BZ2 = "application/x-bzip2",
12
+ CSH = "application/x-csh",
13
+ CSS = "text/css",
14
+ CSV = "text/csv,application/vnd.ms-excel",
15
+ DOC = "application/msword",
16
+ DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
17
+ EOT = "application/vnd.ms-fontobject",
18
+ EPUB = "application/epub+zip",
19
+ ES = "application/ecmascript",
20
+ FLV = "video/x-flv",
21
+ GIF = "image/gif",
22
+ GZ = "application/x-gzip",
23
+ HTM = "text/html",
24
+ HTML = "text/html",
25
+ ICO = "image/x-icon",
26
+ ICS = "text/calendar",
27
+ JAR = "application/java-archive",
28
+ JPEG = "image/jpeg",
29
+ JPG = "image/jpeg",
30
+ JS = "application/javascript",
31
+ JSON = "application/json",
32
+ M3U = "audio/x-mpequrl",
33
+ MID = "audio/midi",
34
+ MIDI = "audio/midi",
35
+ MOV = "video/quicktime",
36
+ MP3 = "audio/mpeg3",
37
+ MP4 = "video/mp4",
38
+ MPEG = "video/mpeg",
39
+ MPKG = "application/vnd.apple.installer+xml",
40
+ ODP = "application/vnd.oasis.opendocument.presentation",
41
+ ODS = "application/vnd.oasis.opendocument.spreadsheet",
42
+ ODT = "application/vnd.oasis.opendocument.text",
43
+ OGA = "audio/ogg",
44
+ OGV = "video/ogg",
45
+ OGX = "application/ogg",
46
+ OTF = "font/otf",
47
+ PNG = "image/png",
48
+ PDF = "application/pdf",
49
+ PPT = "application/vnd.ms-powerpoint",
50
+ PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
51
+ RAR = "application/x-rar-compressed",
52
+ RTF = "application/rtf",
53
+ SH = "application/x-sh",
54
+ SVG = "image/svg+xml",
55
+ SWF = "application/x-shockwave-flash",
56
+ TAR = "application/x-tar",
57
+ TIF = "image/tiff",
58
+ TIFF = "image/tiff",
59
+ TS = "application/typescript",
60
+ TTF = "font/ttf",
61
+ TXT = "text/plain",
62
+ VSD = "application/vnd.visio",
63
+ WAV = "audio/wav",
64
+ WEBA = "audio/webm",
65
+ WEBM = "video/webm",
66
+ WEBP = "image/webp",
67
+ WOFF = "font/woff",
68
+ WOFF2 = "font/woff2",
69
+ XHTML = "application/xhtml+xml",
70
+ XLS = "application/vnd.ms-excel",
71
+ XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
72
+ XML = "application/xml",
73
+ XUL = "application/vnd.mozilla.xul+xml",
74
+ ZIP = "application/zip"
75
+ }
@@ -1,11 +1,11 @@
1
- export * from './file-upload/file-upload';
2
- export * from './file-upload/file-upload.examples';
3
- export * from './file-upload/mime-type.enum';
4
- export * from './insight-card/insight-card';
5
- export * from './insight-card/insights';
6
- export * from './insight-card/insight-card.examples';
7
- export * from './nav-tabs/nav-tab';
8
- export * from './nav-tabs/nav-tab-set';
9
- export * from './nav-tabs/nav-tabs.examples';
10
- export * from './photo/photo';
11
- export * from './photo/photo.examples';
1
+ export * from "./file-upload/file-upload";
2
+ export * from "./file-upload/file-upload.examples";
3
+ export * from "./file-upload/mime-type.enum";
4
+ export * from "./insight-card/insight-card";
5
+ export * from "./insight-card/insights";
6
+ export * from "./insight-card/insight-card.examples";
7
+ export * from "./nav-tabs/nav-tab";
8
+ export * from "./nav-tabs/nav-tab-set";
9
+ export * from "./nav-tabs/nav-tabs.examples";
10
+ export * from "./photo/photo";
11
+ export * from "./photo/photo.examples";
@@ -1,36 +1,40 @@
1
- /** @jsx h */
2
- import { SpsInsightCardKind, SpsIcon } from '@spscommerce/ds-shared';
3
- import { ClassBindings } from '../../decorators/index';
4
- export declare class SpsInsightCardComponent extends HTMLElement {
5
- static readonly displayName = "sps-insight-card";
6
- static readonly props: {
7
- icon: string;
8
- kind: string;
9
- title: string;
10
- metric: string;
11
- partnerCount: string;
12
- totalPartners: string;
13
- secondary: string;
14
- };
15
- /** If icon is provided then it will override the default icon associated with kind */
16
- icon: SpsIcon;
17
- /** Specifies which of the visual styling variants of the Insight Card to use. */
18
- kind: SpsInsightCardKind;
19
- title: string;
20
- /** The main number representing the metric that the Insight Card is intended to surface. */
21
- metric: number;
22
- /** The number of partners this insight applies to.
23
- * Must be used together with `totalPartners`. */
24
- partnerCount: number;
25
- /** The total number of partners. Must be used together with `partnerCount`. */
26
- totalPartners: number;
27
- /** Whether this is a "secondary" Insight Card,
28
- * meaning it will be displayed in a compact layout. */
29
- secondary: boolean;
30
- private content;
31
- private detail;
32
- get [ClassBindings](): string[];
33
- render({ t }: {
34
- t: any;
35
- }): JSX.Element;
36
- }
1
+ /** @jsx h */
2
+ import { SpsInsightCardKind, SpsIcon } from "@spscommerce/ds-shared";
3
+ import { ClassBindings } from "../../decorators/index";
4
+ export declare class SpsInsightCardComponent extends HTMLElement {
5
+ static readonly displayName = "sps-insight-card";
6
+ static readonly props: {
7
+ icon: string;
8
+ kind: string;
9
+ title: string;
10
+ metric: string;
11
+ partnerCount: string;
12
+ totalPartners: string;
13
+ secondary: string;
14
+ };
15
+ /** If icon is provided then it will override the default icon associated with kind */
16
+ icon: SpsIcon;
17
+ /** Specifies which of the visual styling variants of the Insight Card to use. */
18
+ kind: SpsInsightCardKind;
19
+ title: string;
20
+ /** The main number representing the metric that the Insight Card is intended to surface. */
21
+ metric: number;
22
+ /**
23
+ * The number of partners this insight applies to.
24
+ * Must be used together with `totalPartners`.
25
+ */
26
+ partnerCount: number;
27
+ /** The total number of partners. Must be used together with `partnerCount`. */
28
+ totalPartners: number;
29
+ /**
30
+ * Whether this is a "secondary" Insight Card,
31
+ * meaning it will be displayed in a compact layout.
32
+ */
33
+ secondary: boolean;
34
+ private content;
35
+ private detail;
36
+ get [ClassBindings](): string[];
37
+ render({ t }: {
38
+ t: any;
39
+ }): JSX.Element;
40
+ }