@pie-element/shared-theming 0.1.0 → 0.1.1-next.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/constants.d.ts +28 -29
- package/dist/css-variables.d.ts +2 -3
- package/dist/index.d.ts +4 -8
- package/dist/index.js +473 -851
- package/dist/pie-themes.d.ts +2 -3
- package/dist/types.d.ts +0 -36
- package/package.json +15 -13
- package/dist/constants.d.ts.map +0 -1
- package/dist/css-variables.d.ts.map +0 -1
- package/dist/hooks.d.ts +0 -109
- package/dist/hooks.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/mui-integration.d.ts +0 -39
- package/dist/mui-integration.d.ts.map +0 -1
- package/dist/pie-themes.d.ts.map +0 -1
- package/dist/provider.d.ts +0 -30
- package/dist/provider.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
package/dist/constants.d.ts
CHANGED
|
@@ -6,21 +6,21 @@ export declare const PIE_COLOR_DEFAULTS: {
|
|
|
6
6
|
readonly TEXT: "black";
|
|
7
7
|
readonly DISABLED: "grey";
|
|
8
8
|
readonly DISABLED_SECONDARY: "#ABABAB";
|
|
9
|
-
readonly CORRECT: "#
|
|
10
|
-
readonly CORRECT_SECONDARY: "#
|
|
9
|
+
readonly CORRECT: "#4CAF50";
|
|
10
|
+
readonly CORRECT_SECONDARY: "#E8F5E9";
|
|
11
11
|
readonly CORRECT_TERTIARY: "#0EA449";
|
|
12
12
|
readonly CORRECT_WITH_ICON: "#087D38";
|
|
13
|
-
readonly INCORRECT: "#
|
|
14
|
-
readonly INCORRECT_SECONDARY: "#
|
|
13
|
+
readonly INCORRECT: "#FF9800";
|
|
14
|
+
readonly INCORRECT_SECONDARY: "#FFEBEE";
|
|
15
15
|
readonly INCORRECT_WITH_ICON: "#BF0D00";
|
|
16
|
-
readonly MISSING: "#
|
|
16
|
+
readonly MISSING: "#D32F2F";
|
|
17
17
|
readonly MISSING_WITH_ICON: "#6A78A1";
|
|
18
|
-
readonly PRIMARY: "#
|
|
19
|
-
readonly PRIMARY_LIGHT: "#
|
|
18
|
+
readonly PRIMARY: "#3F51B5";
|
|
19
|
+
readonly PRIMARY_LIGHT: "#9FA8DA";
|
|
20
20
|
readonly PRIMARY_DARK: "#283593";
|
|
21
|
-
readonly SECONDARY: "#
|
|
22
|
-
readonly SECONDARY_LIGHT: "#
|
|
23
|
-
readonly SECONDARY_DARK: "#
|
|
21
|
+
readonly SECONDARY: "#F50057";
|
|
22
|
+
readonly SECONDARY_LIGHT: "#F48FB1";
|
|
23
|
+
readonly SECONDARY_DARK: "#880E4F";
|
|
24
24
|
readonly TERTIARY: "#146EB3";
|
|
25
25
|
readonly TERTIARY_LIGHT: "#D0E2F0";
|
|
26
26
|
readonly BACKGROUND: "rgba(255,255,255,0)";
|
|
@@ -44,15 +44,15 @@ export declare const PIE_COLOR_DEFAULTS: {
|
|
|
44
44
|
readonly BLUE_GREY900: "#152452";
|
|
45
45
|
readonly FADED_PRIMARY: "#DCDAFB";
|
|
46
46
|
readonly CHOICE_INPUT_COLOR: "black";
|
|
47
|
-
readonly CHOICE_INPUT_SELECTED_COLOR: "#
|
|
47
|
+
readonly CHOICE_INPUT_SELECTED_COLOR: "#3F51B5";
|
|
48
48
|
readonly CHOICE_INPUT_DISABLED_COLOR: "grey";
|
|
49
|
-
readonly FEEDBACK_CORRECT_BG: "#
|
|
50
|
-
readonly FEEDBACK_INCORRECT_BG: "#
|
|
49
|
+
readonly FEEDBACK_CORRECT_BG: "#4CAF50";
|
|
50
|
+
readonly FEEDBACK_INCORRECT_BG: "#FF9800";
|
|
51
51
|
readonly ANNOTATION_POINTER_RIGHT: "100%";
|
|
52
52
|
readonly ANNOTATION_POINTER_TOP: "5px";
|
|
53
53
|
readonly ANNOTATION_POINTER_BORDER_WIDTH: "7px";
|
|
54
54
|
readonly ANNOTATION_POINTER_BORDER_COLOR: "rgb(153, 255, 153)";
|
|
55
|
-
readonly ARROW_COLOR: "#
|
|
55
|
+
readonly ARROW_COLOR: "#FF9800";
|
|
56
56
|
readonly TICK_COLOR: "#ffffff";
|
|
57
57
|
readonly LINE_STROKE: "#ffffff";
|
|
58
58
|
readonly POINT_FILL: "#000000";
|
|
@@ -87,11 +87,11 @@ export declare const DEFAULT_CSS_MAPPINGS: readonly [{
|
|
|
87
87
|
}, {
|
|
88
88
|
readonly variableName: "--pie-primary";
|
|
89
89
|
readonly themeKey: "primary";
|
|
90
|
-
readonly fallback: "#
|
|
90
|
+
readonly fallback: "#3F51B5";
|
|
91
91
|
}, {
|
|
92
92
|
readonly variableName: "--pie-primary-light";
|
|
93
93
|
readonly themeKey: "primary-light";
|
|
94
|
-
readonly fallback: "#
|
|
94
|
+
readonly fallback: "#9FA8DA";
|
|
95
95
|
}, {
|
|
96
96
|
readonly variableName: "--pie-primary-dark";
|
|
97
97
|
readonly themeKey: "primary-dark";
|
|
@@ -103,15 +103,15 @@ export declare const DEFAULT_CSS_MAPPINGS: readonly [{
|
|
|
103
103
|
}, {
|
|
104
104
|
readonly variableName: "--pie-secondary";
|
|
105
105
|
readonly themeKey: "secondary";
|
|
106
|
-
readonly fallback: "#
|
|
106
|
+
readonly fallback: "#F50057";
|
|
107
107
|
}, {
|
|
108
108
|
readonly variableName: "--pie-secondary-light";
|
|
109
109
|
readonly themeKey: "secondary-light";
|
|
110
|
-
readonly fallback: "#
|
|
110
|
+
readonly fallback: "#F48FB1";
|
|
111
111
|
}, {
|
|
112
112
|
readonly variableName: "--pie-secondary-dark";
|
|
113
113
|
readonly themeKey: "secondary-dark";
|
|
114
|
-
readonly fallback: "#
|
|
114
|
+
readonly fallback: "#880E4F";
|
|
115
115
|
}, {
|
|
116
116
|
readonly variableName: "--pie-tertiary";
|
|
117
117
|
readonly themeKey: "tertiary";
|
|
@@ -123,11 +123,11 @@ export declare const DEFAULT_CSS_MAPPINGS: readonly [{
|
|
|
123
123
|
}, {
|
|
124
124
|
readonly variableName: "--pie-correct";
|
|
125
125
|
readonly themeKey: "success";
|
|
126
|
-
readonly fallback: "#
|
|
126
|
+
readonly fallback: "#4CAF50";
|
|
127
127
|
}, {
|
|
128
128
|
readonly variableName: "--pie-correct-secondary";
|
|
129
129
|
readonly themeKey: "correct-secondary";
|
|
130
|
-
readonly fallback: "#
|
|
130
|
+
readonly fallback: "#E8F5E9";
|
|
131
131
|
}, {
|
|
132
132
|
readonly variableName: "--pie-correct-tertiary";
|
|
133
133
|
readonly themeKey: "correct-tertiary";
|
|
@@ -139,11 +139,11 @@ export declare const DEFAULT_CSS_MAPPINGS: readonly [{
|
|
|
139
139
|
}, {
|
|
140
140
|
readonly variableName: "--pie-incorrect";
|
|
141
141
|
readonly themeKey: "error";
|
|
142
|
-
readonly fallback: "#
|
|
142
|
+
readonly fallback: "#FF9800";
|
|
143
143
|
}, {
|
|
144
144
|
readonly variableName: "--pie-incorrect-secondary";
|
|
145
145
|
readonly themeKey: "incorrect-secondary";
|
|
146
|
-
readonly fallback: "#
|
|
146
|
+
readonly fallback: "#FFEBEE";
|
|
147
147
|
}, {
|
|
148
148
|
readonly variableName: "--pie-incorrect-icon";
|
|
149
149
|
readonly themeKey: "incorrect-icon";
|
|
@@ -151,7 +151,7 @@ export declare const DEFAULT_CSS_MAPPINGS: readonly [{
|
|
|
151
151
|
}, {
|
|
152
152
|
readonly variableName: "--pie-missing";
|
|
153
153
|
readonly themeKey: "warning";
|
|
154
|
-
readonly fallback: "#
|
|
154
|
+
readonly fallback: "#D32F2F";
|
|
155
155
|
}, {
|
|
156
156
|
readonly variableName: "--pie-missing-icon";
|
|
157
157
|
readonly themeKey: "missing-icon";
|
|
@@ -227,7 +227,7 @@ export declare const DEFAULT_CSS_MAPPINGS: readonly [{
|
|
|
227
227
|
}, {
|
|
228
228
|
readonly variableName: "--choice-input-selected-color";
|
|
229
229
|
readonly themeKey: "choice-input-selected-color";
|
|
230
|
-
readonly fallback: "#
|
|
230
|
+
readonly fallback: "#3F51B5";
|
|
231
231
|
}, {
|
|
232
232
|
readonly variableName: "--choice-input-disabled-color";
|
|
233
233
|
readonly themeKey: "choice-input-disabled-color";
|
|
@@ -235,11 +235,11 @@ export declare const DEFAULT_CSS_MAPPINGS: readonly [{
|
|
|
235
235
|
}, {
|
|
236
236
|
readonly variableName: "--feedback-correct-bg-color";
|
|
237
237
|
readonly themeKey: "feedback-correct-bg";
|
|
238
|
-
readonly fallback: "#
|
|
238
|
+
readonly fallback: "#4CAF50";
|
|
239
239
|
}, {
|
|
240
240
|
readonly variableName: "--feedback-incorrect-bg-color";
|
|
241
241
|
readonly themeKey: "feedback-incorrect-bg";
|
|
242
|
-
readonly fallback: "#
|
|
242
|
+
readonly fallback: "#FF9800";
|
|
243
243
|
}, {
|
|
244
244
|
readonly variableName: "--before-right";
|
|
245
245
|
readonly themeKey: "annotation-pointer-right";
|
|
@@ -259,7 +259,7 @@ export declare const DEFAULT_CSS_MAPPINGS: readonly [{
|
|
|
259
259
|
}, {
|
|
260
260
|
readonly variableName: "--arrow-color";
|
|
261
261
|
readonly themeKey: "arrow-color";
|
|
262
|
-
readonly fallback: "#
|
|
262
|
+
readonly fallback: "#FF9800";
|
|
263
263
|
}, {
|
|
264
264
|
readonly variableName: "--tick-color";
|
|
265
265
|
readonly themeKey: "tick-color";
|
|
@@ -285,4 +285,3 @@ export declare const DEFAULT_CSS_MAPPINGS: readonly [{
|
|
|
285
285
|
readonly themeKey: "primary-text";
|
|
286
286
|
readonly fallback: "black";
|
|
287
287
|
}];
|
|
288
|
-
//# sourceMappingURL=constants.d.ts.map
|
package/dist/css-variables.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PieThemeExtended, CssVariableMapping } from './types';
|
|
1
|
+
import type { PieThemeExtended, CssVariableMapping } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Generate CSS variables from a PIE theme
|
|
4
4
|
* Maps theme properties to CSS variables with fallbacks
|
|
@@ -47,7 +47,7 @@ export declare function cssVariablesToStyleString(cssVars: Record<string, string
|
|
|
47
47
|
* <div style={style}>...</div>
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
export declare function cssVariablesToReactStyle(cssVars: Record<string, string>):
|
|
50
|
+
export declare function cssVariablesToReactStyle(cssVars: Record<string, string>): Record<string, string | number | undefined>;
|
|
51
51
|
/**
|
|
52
52
|
* Inject CSS variables into a DOM element
|
|
53
53
|
* Modifies the element's style property to set CSS custom properties
|
|
@@ -78,4 +78,3 @@ export declare function injectCssVariables(cssVars: Record<string, string>, targ
|
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
80
|
export declare function removeCssVariables(cssVars: Record<string, string>, target?: HTMLElement): void;
|
|
81
|
-
//# sourceMappingURL=css-variables.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export type { PieThemeExtended, CssVariableMapping,
|
|
2
|
-
export { PIE_COLOR_DEFAULTS, DEFAULT_CSS_MAPPINGS } from './constants';
|
|
3
|
-
export { PIE_ORANGE, PIE_LIGHT_THEME, PIE_DARK_THEME, getPieTheme, PIE_THEME_NAMES, type PieThemeName, } from './pie-themes';
|
|
4
|
-
export { generateCssVariables, cssVariablesToStyleString, cssVariablesToReactStyle, injectCssVariables, removeCssVariables, } from './css-variables';
|
|
5
|
-
export { createPieMuiTheme, updateMuiThemeFromPie } from './mui-integration';
|
|
6
|
-
export { PieThemeProvider, PieThemeContext } from './provider';
|
|
7
|
-
export { usePieTheme, usePieThemeVariables, usePieThemeStyle, usePieThemeColors, usePieMuiTheme, useSetPieTheme, } from './hooks';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export type { PieThemeExtended, CssVariableMapping, } from './types.js';
|
|
2
|
+
export { PIE_COLOR_DEFAULTS, DEFAULT_CSS_MAPPINGS } from './constants.js';
|
|
3
|
+
export { PIE_ORANGE, PIE_LIGHT_THEME, PIE_DARK_THEME, getPieTheme, PIE_THEME_NAMES, type PieThemeName, } from './pie-themes.js';
|
|
4
|
+
export { generateCssVariables, cssVariablesToStyleString, cssVariablesToReactStyle, injectCssVariables, removeCssVariables, } from './css-variables.js';
|