@blateral/b.kit 1.5.18 → 1.5.20
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/lib/components/base/icons/External.d.ts +8 -0
- package/lib/components/base/icons/External.d.ts.map +1 -0
- package/lib/components/typography/Copy.d.ts +8 -2
- package/lib/components/typography/Copy.d.ts.map +1 -1
- package/lib/components/typography/Heading.d.ts +5 -3
- package/lib/components/typography/Heading.d.ts.map +1 -1
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.es.js +2 -2
- package/lib/index.es.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/LibThemeProvider.d.ts +22 -7
- package/lib/utils/LibThemeProvider.d.ts.map +1 -1
- package/lib/utils/clamp.d.ts +2 -0
- package/lib/utils/clamp.d.ts.map +1 -0
- package/lib/utils/dataURI.d.ts +3 -0
- package/lib/utils/dataURI.d.ts.map +1 -0
- package/lib/utils/styles.d.ts +34 -0
- package/lib/utils/styles.d.ts.map +1 -1
- package/lib/utils/types.d.ts +8 -0
- package/lib/utils/types.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
2
|
import { DefaultTheme } from 'styled-components';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { RecursivePartial } from './types';
|
|
4
|
+
export declare type ThemeMods = RecursivePartial<DefaultTheme>;
|
|
5
|
+
/**
|
|
6
|
+
* Combining Theme objects
|
|
7
|
+
* @param target Result theme object
|
|
8
|
+
* @param source Theme object that should be assigned to target
|
|
9
|
+
*/
|
|
10
|
+
export declare const assignTo: <T extends DefaultTheme | RecursivePartial<DefaultTheme>>(target: T, source?: RecursivePartial<DefaultTheme> | undefined) => T;
|
|
7
11
|
export declare const LibThemeProvider: FC<{
|
|
8
|
-
theme
|
|
12
|
+
theme?: ThemeMods;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const modifyTheme: (activeTheme?: DefaultTheme | undefined, modifications?: RecursivePartial<DefaultTheme> | undefined) => DefaultTheme;
|
|
16
|
+
export declare const useLibTheme: () => {
|
|
17
|
+
colors: import("./styles").Colors;
|
|
18
|
+
fonts: import("./styles").Fonts;
|
|
19
|
+
globals: import("./styles").GlobalSettings;
|
|
20
|
+
theme: DefaultTheme | import("./styles").GlobalSettings;
|
|
21
|
+
};
|
|
22
|
+
export declare const withLibTheme: <P extends Record<string, unknown>>(Component: React.ComponentType<P>) => React.FC<P & {
|
|
23
|
+
/** Component specific theme properties that overrides global theme settings */
|
|
24
|
+
theme?: RecursivePartial<DefaultTheme> | undefined;
|
|
9
25
|
}>;
|
|
10
|
-
export {};
|
|
11
26
|
//# sourceMappingURL=LibThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LibThemeProvider.d.ts","sourceRoot":"","sources":["../../src/utils/LibThemeProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LibThemeProvider.d.ts","sourceRoot":"","sources":["../../src/utils/LibThemeProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAC;AAS1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,oBAAY,SAAS,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;AAsCvD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,gIA4BpB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CAUA,CAAC;AAMF,eAAO,MAAM,WAAW,sHAuBvB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;CASvB,CAAC;AAEF,eAAO,MAAM,YAAY;IAKb,+EAA+E;;EAatF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clamp.d.ts","sourceRoot":"","sources":["../../src/utils/clamp.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,UAAW,MAAM,OAAO,MAAM,qCAMpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataURI.d.ts","sourceRoot":"","sources":["../../src/utils/dataURI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,aAAa,QACjB,MAAM,YAAY,uBAExB,MAkBF,CAAC"}
|
package/lib/utils/styles.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
import { XOR } from './types';
|
|
2
3
|
export declare type MediaQueryType = 'small' | 'medium' | 'semilarge' | 'large' | 'xlarge' | 'xxlarge' | 'xxxLarge';
|
|
3
4
|
export declare const mq: {
|
|
4
5
|
[key in Exclude<MediaQueryType, 'small'>]: string;
|
|
@@ -45,6 +46,7 @@ export interface FontProps {
|
|
|
45
46
|
letterSpacing?: string;
|
|
46
47
|
size: [number, number];
|
|
47
48
|
textTransform?: string;
|
|
49
|
+
textDecoration?: string;
|
|
48
50
|
color?: string;
|
|
49
51
|
colorInverted?: string;
|
|
50
52
|
colorGradient?: string;
|
|
@@ -68,6 +70,14 @@ export interface Fonts {
|
|
|
68
70
|
'heading-4': FontProps;
|
|
69
71
|
label: FontOptions;
|
|
70
72
|
callout: FontOptions;
|
|
73
|
+
link: {
|
|
74
|
+
color: string;
|
|
75
|
+
colorInverted: string;
|
|
76
|
+
colorHover: string;
|
|
77
|
+
colorHoverInverted: string;
|
|
78
|
+
textTransform?: string;
|
|
79
|
+
textDecoration?: string;
|
|
80
|
+
};
|
|
71
81
|
}
|
|
72
82
|
export declare type FontType = keyof Fonts;
|
|
73
83
|
/**
|
|
@@ -75,6 +85,27 @@ export declare type FontType = keyof Fonts;
|
|
|
75
85
|
*/
|
|
76
86
|
export declare type FontBase = FontProps;
|
|
77
87
|
/***** Global Settings *****/
|
|
88
|
+
interface LinkIcon {
|
|
89
|
+
isExternal?: boolean;
|
|
90
|
+
/** Patterns of Href value to show this icon (e.g. .svg, .png) */
|
|
91
|
+
patterns: string[];
|
|
92
|
+
/** Icon scale factor. 1 is default */
|
|
93
|
+
scale?: (props: {
|
|
94
|
+
type?: keyof Fonts;
|
|
95
|
+
size?: FontOptionType;
|
|
96
|
+
}) => number;
|
|
97
|
+
/** Set vertical alignment of icon in text */
|
|
98
|
+
vAlign?: 'bottom' | 'baseline' | 'middle' | 'top' | 'text-top' | 'text-bottom' | 'super' | 'sub';
|
|
99
|
+
}
|
|
100
|
+
export interface LinkUrlIcon extends LinkIcon {
|
|
101
|
+
iconUrl: (isInverted?: boolean) => string;
|
|
102
|
+
}
|
|
103
|
+
export interface LinkFontIcon extends LinkIcon {
|
|
104
|
+
/** Define font family for icon font */
|
|
105
|
+
iconFont: string;
|
|
106
|
+
/** Define icon font character */
|
|
107
|
+
iconChar: string;
|
|
108
|
+
}
|
|
78
109
|
export interface GlobalSettings {
|
|
79
110
|
sections: {
|
|
80
111
|
/** Radius of image and card edges */
|
|
@@ -86,6 +117,9 @@ export interface GlobalSettings {
|
|
|
86
117
|
newsTimeFormat: string;
|
|
87
118
|
newsLocaleKey: 'de' | 'en';
|
|
88
119
|
};
|
|
120
|
+
icons: {
|
|
121
|
+
linkIcons: Array<XOR<LinkUrlIcon, LinkFontIcon>>;
|
|
122
|
+
};
|
|
89
123
|
}
|
|
90
124
|
/***** Theme Helper *****/
|
|
91
125
|
export declare const getBaseTheme: () => DefaultTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":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AAQ,6CAIpB,CAAC;AAEF,eAAO,MAAM,iBAAiB,sDAI7B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare type RecursivePartial<T> = {
|
|
2
|
+
[P in keyof T]?: T[P] extends Array<infer I> ? Array<RecursivePartial<I>> : RecursivePartial<T[P]>;
|
|
3
|
+
};
|
|
4
|
+
export declare type Without<T, U> = {
|
|
5
|
+
[P in Exclude<keyof T, keyof U>]?: never;
|
|
6
|
+
};
|
|
7
|
+
export declare type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
|
|
8
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB,CAAC,CAAC,IAAI;KAC7B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GACtC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC1B,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC;AAEF,oBAAY,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK;CAAE,CAAC;AAGzE,oBAAY,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,MAAM,GACtC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GACzC,CAAC,GAAG,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blateral/b.kit",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.es.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"rollup-plugin-typescript2": "^0.29.0",
|
|
73
73
|
"slick-carousel": "1.8.1",
|
|
74
74
|
"styled-components": "^5.2.1",
|
|
75
|
-
"ttypescript": "^1.5.
|
|
75
|
+
"ttypescript": "^1.5.13",
|
|
76
76
|
"typescript": "^4.1.2"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|