@swisspost/design-system-components 1.3.2 → 1.3.4
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/cjs/{index-a8b23f1b.js → index-126f28cf.js} +1 -11
- package/dist/cjs/index-126f28cf.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/{check-type-f24cf91d.js → package-3838cb5b.js} +4 -1
- package/dist/cjs/{check-type-f24cf91d.js.map → package-3838cb5b.js.map} +1 -1
- package/dist/cjs/post-collapsible.cjs.entry.js +6 -6
- package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
- package/dist/cjs/post-components.cjs.js +3 -3
- package/dist/cjs/post-components.cjs.js.map +1 -1
- package/dist/cjs/post-icon.cjs.entry.js +101 -62
- package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.css +184 -82
- package/dist/collection/components/post-collapsible/post-collapsible.js +3 -2
- package/dist/collection/components/post-collapsible/post-collapsible.js.map +1 -1
- package/dist/collection/components/post-icon/post-icon.css +10 -10
- package/dist/collection/components/post-icon/post-icon.js +119 -74
- package/dist/collection/components/post-icon/post-icon.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/get-element-height.js.map +1 -1
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/on-transition-end.js.map +1 -1
- package/dist/collection/utils/property-checkers/check-non-empty.js +7 -0
- package/dist/collection/utils/property-checkers/check-non-empty.js.map +1 -0
- package/dist/collection/utils/property-checkers/check-one-of.js.map +1 -1
- package/dist/collection/utils/property-checkers/check-type.js.map +1 -1
- package/dist/collection/utils/property-checkers/constants.js +2 -0
- package/dist/collection/utils/property-checkers/constants.js.map +1 -0
- package/dist/collection/utils/property-checkers/empty-or.js +1 -1
- package/dist/collection/utils/property-checkers/empty-or.js.map +1 -1
- package/dist/collection/utils/property-checkers/index.js +1 -0
- package/dist/collection/utils/property-checkers/index.js.map +1 -1
- package/dist/collection/utils/should-reduce-motion.js.map +1 -1
- package/dist/components/{check-type.js → package.js} +4 -2
- package/dist/components/package.js.map +1 -0
- package/dist/components/post-collapsible.js +4 -4
- package/dist/components/post-collapsible.js.map +1 -1
- package/dist/components/post-icon.js +99 -58
- package/dist/components/post-icon.js.map +1 -1
- package/dist/docs.json +35 -8
- package/dist/esm/{index-401f2d6a.js → index-286143e7.js} +1 -11
- package/dist/esm/index-286143e7.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/{check-type-67411ed3.js → package-fb4a74d0.js} +4 -2
- package/dist/esm/package-fb4a74d0.js.map +1 -0
- package/dist/esm/post-collapsible.entry.js +4 -4
- package/dist/esm/post-collapsible.entry.js.map +1 -1
- package/dist/esm/post-components.js +4 -4
- package/dist/esm/post-components.js.map +1 -1
- package/dist/esm/post-icon.entry.js +98 -59
- package/dist/esm/post-icon.entry.js.map +1 -1
- package/dist/post-components/{p-f214c52a.js → p-0c286590.js} +3 -3
- package/dist/post-components/p-0c286590.js.map +1 -0
- package/dist/post-components/p-6e225c16.entry.js +2 -0
- package/dist/post-components/p-6e225c16.entry.js.map +1 -0
- package/dist/post-components/p-7dd960f1.entry.js +2 -0
- package/dist/post-components/p-7dd960f1.entry.js.map +1 -0
- package/dist/post-components/p-87bf3416.js +2 -0
- package/dist/post-components/{p-f549b3fc.js.map → p-87bf3416.js.map} +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/post-components/post-components.esm.js.map +1 -1
- package/dist/types/components/post-icon/post-icon.d.ts +21 -12
- package/dist/types/components.d.ts +17 -17
- package/dist/types/utils/property-checkers/check-non-empty.d.ts +1 -0
- package/dist/types/utils/property-checkers/constants.d.ts +1 -0
- package/dist/types/utils/property-checkers/index.d.ts +1 -0
- package/package.json +16 -17
- package/dist/cjs/index-a8b23f1b.js.map +0 -1
- package/dist/components/check-type.js.map +0 -1
- package/dist/esm/check-type-67411ed3.js.map +0 -1
- package/dist/esm/index-401f2d6a.js.map +0 -1
- package/dist/post-components/p-07a51673.entry.js +0 -2
- package/dist/post-components/p-07a51673.entry.js.map +0 -1
- package/dist/post-components/p-416f1e74.entry.js +0 -2
- package/dist/post-components/p-416f1e74.entry.js.map +0 -1
- package/dist/post-components/p-f214c52a.js.map +0 -1
- package/dist/post-components/p-f549b3fc.js +0 -2
|
@@ -1,20 +1,26 @@
|
|
|
1
|
+
declare const ANIMATION_NAMES: readonly ["cylon", "cylon-vertical", "spin", "spin-reverse", "fade", "throb"];
|
|
2
|
+
type Animation = (typeof ANIMATION_NAMES)[number];
|
|
1
3
|
/**
|
|
2
4
|
* @class PostIcon - representing a stencil component
|
|
3
5
|
*/
|
|
4
6
|
export declare class PostIcon {
|
|
5
|
-
private initialPath;
|
|
6
7
|
private path;
|
|
8
|
+
private loadedPath;
|
|
7
9
|
private svgSource;
|
|
10
|
+
private svgElement;
|
|
11
|
+
host: HTMLPostIconElement;
|
|
12
|
+
pathForceCDN: boolean;
|
|
13
|
+
svgStyles: string;
|
|
8
14
|
svgOutput: string;
|
|
9
15
|
/**
|
|
10
|
-
* The name of the animation
|
|
16
|
+
* The name of the animation.
|
|
11
17
|
*/
|
|
12
|
-
readonly animation?:
|
|
13
|
-
validateAnimation(newValue?:
|
|
18
|
+
readonly animation?: Animation | null;
|
|
19
|
+
validateAnimation(newValue?: "cylon" | "cylon-vertical" | "spin" | "spin-reverse" | "fade" | "throb"): void;
|
|
14
20
|
/**
|
|
15
|
-
* The base path, where the icons are located (must be a public url).
|
|
21
|
+
* The base path, where the icons are located (must be a public url).<br/>Leave this field empty to use the default cdn url.
|
|
16
22
|
*/
|
|
17
|
-
readonly base?: string;
|
|
23
|
+
readonly base?: string | null;
|
|
18
24
|
validateBase(newValue?: string): void;
|
|
19
25
|
/**
|
|
20
26
|
* When set to `true`, the icon will be flipped horizontally.
|
|
@@ -32,19 +38,22 @@ export declare class PostIcon {
|
|
|
32
38
|
readonly name: string;
|
|
33
39
|
validateName(newValue?: string): void;
|
|
34
40
|
/**
|
|
35
|
-
* The
|
|
41
|
+
* The number of degree for the css rotate transformation.
|
|
36
42
|
*/
|
|
37
|
-
readonly rotate?: number;
|
|
43
|
+
readonly rotate?: number | null;
|
|
38
44
|
validateRotate(newValue?: number): void;
|
|
39
45
|
/**
|
|
40
|
-
* The
|
|
46
|
+
* The number for the css scale transformation.
|
|
41
47
|
*/
|
|
42
|
-
readonly scale?: number;
|
|
48
|
+
readonly scale?: number | null;
|
|
43
49
|
validateScale(newValue?: number): void;
|
|
44
|
-
connectedCallback(): void;
|
|
45
50
|
componentWillLoad(): void;
|
|
46
51
|
componentWillRender(): void;
|
|
47
|
-
private
|
|
52
|
+
private setPath;
|
|
48
53
|
private getPath;
|
|
54
|
+
private fetchIcon;
|
|
55
|
+
private createIconFromStorage;
|
|
56
|
+
private createIcon;
|
|
49
57
|
render(): any;
|
|
50
58
|
}
|
|
59
|
+
export {};
|
|
@@ -25,13 +25,13 @@ export namespace Components {
|
|
|
25
25
|
*/
|
|
26
26
|
interface PostIcon {
|
|
27
27
|
/**
|
|
28
|
-
* The name of the animation
|
|
28
|
+
* The name of the animation.
|
|
29
29
|
*/
|
|
30
|
-
"animation"?:
|
|
30
|
+
"animation"?: Animation | null;
|
|
31
31
|
/**
|
|
32
|
-
* The base path, where the icons are located (must be a public url).
|
|
32
|
+
* The base path, where the icons are located (must be a public url).<br/>Leave this field empty to use the default cdn url.
|
|
33
33
|
*/
|
|
34
|
-
"base"?: string;
|
|
34
|
+
"base"?: string | null;
|
|
35
35
|
/**
|
|
36
36
|
* When set to `true`, the icon will be flipped horizontally.
|
|
37
37
|
*/
|
|
@@ -45,13 +45,13 @@ export namespace Components {
|
|
|
45
45
|
*/
|
|
46
46
|
"name": string;
|
|
47
47
|
/**
|
|
48
|
-
* The
|
|
48
|
+
* The number of degree for the css rotate transformation.
|
|
49
49
|
*/
|
|
50
|
-
"rotate"?: number;
|
|
50
|
+
"rotate"?: number | null;
|
|
51
51
|
/**
|
|
52
|
-
* The
|
|
52
|
+
* The number for the css scale transformation.
|
|
53
53
|
*/
|
|
54
|
-
"scale"?: number;
|
|
54
|
+
"scale"?: number | null;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
declare global {
|
|
@@ -91,13 +91,13 @@ declare namespace LocalJSX {
|
|
|
91
91
|
*/
|
|
92
92
|
interface PostIcon {
|
|
93
93
|
/**
|
|
94
|
-
* The name of the animation
|
|
94
|
+
* The name of the animation.
|
|
95
95
|
*/
|
|
96
|
-
"animation"?:
|
|
96
|
+
"animation"?: Animation | null;
|
|
97
97
|
/**
|
|
98
|
-
* The base path, where the icons are located (must be a public url).
|
|
98
|
+
* The base path, where the icons are located (must be a public url).<br/>Leave this field empty to use the default cdn url.
|
|
99
99
|
*/
|
|
100
|
-
"base"?: string;
|
|
100
|
+
"base"?: string | null;
|
|
101
101
|
/**
|
|
102
102
|
* When set to `true`, the icon will be flipped horizontally.
|
|
103
103
|
*/
|
|
@@ -109,15 +109,15 @@ declare namespace LocalJSX {
|
|
|
109
109
|
/**
|
|
110
110
|
* The name/id of the icon (e.g. 1000, 1001, ...).
|
|
111
111
|
*/
|
|
112
|
-
"name"
|
|
112
|
+
"name": string;
|
|
113
113
|
/**
|
|
114
|
-
* The
|
|
114
|
+
* The number of degree for the css rotate transformation.
|
|
115
115
|
*/
|
|
116
|
-
"rotate"?: number;
|
|
116
|
+
"rotate"?: number | null;
|
|
117
117
|
/**
|
|
118
|
-
* The
|
|
118
|
+
* The number for the css scale transformation.
|
|
119
119
|
*/
|
|
120
|
-
"scale"?: number;
|
|
120
|
+
"scale"?: number | null;
|
|
121
121
|
}
|
|
122
122
|
interface IntrinsicElements {
|
|
123
123
|
"post-collapsible": PostCollapsible;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checkNonEmpty(value: unknown, error: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EMPTY_VALUES: string[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const checkEmptyOrOneOf: <T>(value: T, possibleValues: T[], error: string) => void;
|
|
2
2
|
export declare const checkEmptyOrType: (value: unknown, type: import("./check-type").PropertyType, error: string) => void;
|
|
3
|
+
export * from './check-non-empty';
|
|
3
4
|
export * from './check-one-of';
|
|
4
5
|
export * from './check-type';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -25,29 +25,29 @@
|
|
|
25
25
|
"linkDirectory": true
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@
|
|
29
|
-
"@stencil-community/eslint-plugin": "^0.5.0",
|
|
30
|
-
"@stencil/core": "3.1.0",
|
|
31
|
-
"@stencil/react-output-target": "0.4.0",
|
|
32
|
-
"@stencil/sass": "3.0.0",
|
|
33
|
-
"@swisspost/design-system-styles": "6.0.0",
|
|
34
|
-
"bootstrap": "5.2.3",
|
|
35
|
-
"eslint-plugin-react": "7.32.2",
|
|
36
|
-
"puppeteer": "19.7.4",
|
|
37
|
-
"sass": "1.59.2"
|
|
28
|
+
"@stencil/core": "3.2.0"
|
|
38
29
|
},
|
|
39
30
|
"devDependencies": {
|
|
40
|
-
"@percy/cli": "1.
|
|
31
|
+
"@percy/cli": "1.21.0",
|
|
41
32
|
"@percy/cypress": "3.1.2",
|
|
33
|
+
"@popperjs/core": "2.11.7",
|
|
34
|
+
"@stencil-community/eslint-plugin": "^0.5.0",
|
|
35
|
+
"@stencil/react-output-target": "0.5.0",
|
|
36
|
+
"@stencil/sass": "3.0.0",
|
|
37
|
+
"@swisspost/design-system-styles": "6.1.0",
|
|
42
38
|
"@types/jest": "27.5.2",
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
44
|
-
"@typescript-eslint/parser": "5.
|
|
45
|
-
"
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "5.57.1",
|
|
40
|
+
"@typescript-eslint/parser": "5.57.1",
|
|
41
|
+
"bootstrap": "5.2.3",
|
|
42
|
+
"cypress": "12.9.0",
|
|
46
43
|
"cypress-storybook": "0.5.1",
|
|
47
|
-
"eslint": "8.
|
|
44
|
+
"eslint": "8.37.0",
|
|
45
|
+
"eslint-plugin-react": "7.32.2",
|
|
48
46
|
"jest": "27.5.1",
|
|
49
47
|
"jest-cli": "27.5.1",
|
|
50
48
|
"npm-run-all": "4.1.5",
|
|
49
|
+
"puppeteer": "19.8.3",
|
|
50
|
+
"sass": "1.60.0",
|
|
51
51
|
"typescript": "4.9.5"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"unit:watch": "stencil test --spec --watchAll --silent",
|
|
59
59
|
"e2e": "cypress run",
|
|
60
60
|
"e2e:watch": "cypress open",
|
|
61
|
-
"snapshots": "percy exec -- cypress run --config-file ./cypress.snapshot.config.js",
|
|
62
61
|
"generate": "stencil generate",
|
|
63
62
|
"lint": "eslint src/**/*{.ts,.tsx}"
|
|
64
63
|
}
|