@kausal/themes 0.5.1 → 0.5.3
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/package.json +1 -1
- package/props.js +19 -3
- package/types.ts +5 -0
package/package.json
CHANGED
package/props.js
CHANGED
|
@@ -5,9 +5,19 @@ const { number, exact, string, oneOfType, bool, array, object } = PropTypes;
|
|
|
5
5
|
export function makeThemePropType(cssv = null) {
|
|
6
6
|
if (!cssv) {
|
|
7
7
|
// No CSS validation
|
|
8
|
-
cssv = (
|
|
8
|
+
cssv = () => {
|
|
9
|
+
const validate = () => null;
|
|
10
|
+
validate.allowEmpty = () => null;
|
|
11
|
+
validate.isRequired = (props, propName) => {
|
|
12
|
+
const val = props[propName];
|
|
13
|
+
if (val === null || val === undefined) {
|
|
14
|
+
return new Error(`${propName} missing or null`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return validate;
|
|
18
|
+
}
|
|
9
19
|
}
|
|
10
|
-
|
|
20
|
+
const props = {
|
|
11
21
|
actionColor: cssv("color").isRequired,
|
|
12
22
|
actionColorFg: cssv("color").isRequired,
|
|
13
23
|
actionCompletedColor: cssv("color").isRequired,
|
|
@@ -57,6 +67,7 @@ export function makeThemePropType(cssv = null) {
|
|
|
57
67
|
fontWeightNormal: cssv("font-weight").isRequired,
|
|
58
68
|
navLogoVisible: bool.isRequired,
|
|
59
69
|
navTitleVisible: bool.isRequired,
|
|
70
|
+
navLinkIcons: bool,
|
|
60
71
|
footerLogoPlacement: string.isRequired,
|
|
61
72
|
footerLogoSize: string,
|
|
62
73
|
footerLogoLink: string,
|
|
@@ -159,6 +170,9 @@ export function makeThemePropType(cssv = null) {
|
|
|
159
170
|
showResponsibles: bool.isRequired,
|
|
160
171
|
showIndicators: bool.isRequired,
|
|
161
172
|
}),
|
|
173
|
+
multiplan: exact({
|
|
174
|
+
hideLongPlanNames: bool,
|
|
175
|
+
}),
|
|
162
176
|
categories: exact({
|
|
163
177
|
filterIndicatorsByAllLevels: bool.isRequired,
|
|
164
178
|
}),
|
|
@@ -174,7 +188,9 @@ export function makeThemePropType(cssv = null) {
|
|
|
174
188
|
}),
|
|
175
189
|
frontHero: exact({
|
|
176
190
|
cardPlacement: string,
|
|
191
|
+
color: string,
|
|
177
192
|
}),
|
|
178
193
|
}),
|
|
179
|
-
}
|
|
194
|
+
};
|
|
195
|
+
return exact(props);
|
|
180
196
|
}
|
package/types.ts
CHANGED
|
@@ -54,6 +54,7 @@ export interface Theme {
|
|
|
54
54
|
fontWeightNormal: number;
|
|
55
55
|
navLogoVisible: boolean;
|
|
56
56
|
navTitleVisible: boolean;
|
|
57
|
+
navLinkIcons?: boolean;
|
|
57
58
|
footerLogoPlacement: string;
|
|
58
59
|
footerLogoSize?: string;
|
|
59
60
|
footerLogoLink?: string;
|
|
@@ -156,6 +157,9 @@ export interface Theme {
|
|
|
156
157
|
showResponsibles: boolean;
|
|
157
158
|
showIndicators: boolean;
|
|
158
159
|
};
|
|
160
|
+
multiplan?: {
|
|
161
|
+
hideLongPlanNames: boolean;
|
|
162
|
+
};
|
|
159
163
|
categories: {
|
|
160
164
|
filterIndicatorsByAllLevels: boolean;
|
|
161
165
|
};
|
|
@@ -171,6 +175,7 @@ export interface Theme {
|
|
|
171
175
|
};
|
|
172
176
|
frontHero?: {
|
|
173
177
|
cardPlacement?: string;
|
|
178
|
+
color?: string;
|
|
174
179
|
};
|
|
175
180
|
};
|
|
176
181
|
}
|