@axelor/aos-mobile-ui 8.2.7 → 8.3.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.
- package/lib/components/atoms/HorizontalRule/HorizontalRule.js +1 -1
- package/lib/components/atoms/HorizontalRule/HorizontalRule.js.map +1 -1
- package/lib/components/atoms/Icon/Icon.js +1 -1
- package/lib/components/atoms/Icon/Icon.js.map +1 -1
- package/lib/components/atoms/Input/Input.d.ts +2 -1
- package/lib/components/atoms/Input/Input.js +16 -3
- package/lib/components/atoms/Input/Input.js.map +1 -1
- package/lib/components/atoms/Text/Text.js +1 -2
- package/lib/components/atoms/Text/Text.js.map +1 -1
- package/lib/components/molecules/Breadcrumb/Breadcrumb.d.ts +13 -0
- package/lib/components/molecules/Breadcrumb/Breadcrumb.js +87 -0
- package/lib/components/molecules/Breadcrumb/Breadcrumb.js.map +1 -0
- package/lib/components/molecules/Button/Button.d.ts +1 -1
- package/lib/components/molecules/Button/Button.js +1 -1
- package/lib/components/molecules/Button/Button.js.map +1 -1
- package/lib/components/molecules/CircleButton/CircleButton.d.ts +1 -1
- package/lib/components/molecules/ClearableCard/ClearableCard.js +1 -1
- package/lib/components/molecules/ClearableCard/ClearableCard.js.map +1 -1
- package/lib/components/molecules/DropdownCard/DropdownCard.d.ts +2 -1
- package/lib/components/molecules/DropdownCard/DropdownCard.js +3 -3
- package/lib/components/molecules/DropdownCard/DropdownCard.js.map +1 -1
- package/lib/components/molecules/EditableHtmlInput/EditableHtmlInput.d.ts +9 -0
- package/lib/components/molecules/EditableHtmlInput/EditableHtmlInput.js +56 -0
- package/lib/components/molecules/EditableHtmlInput/EditableHtmlInput.js.map +1 -0
- package/lib/components/molecules/EditableInput/EditableInput.js +1 -1
- package/lib/components/molecules/EditableInput/EditableInput.js.map +1 -1
- package/lib/components/molecules/FormHtmlInput/FormHtmlInput.js +1 -1
- package/lib/components/molecules/FormHtmlInput/FormHtmlInput.js.map +1 -1
- package/lib/components/molecules/FormInput/FormInput.js +1 -1
- package/lib/components/molecules/FormInput/FormInput.js.map +1 -1
- package/lib/components/molecules/FromTo/FromTo.js +1 -1
- package/lib/components/molecules/FromTo/FromTo.js.map +1 -1
- package/lib/components/molecules/HorizontalRuleText/HorizontalRuleText.d.ts +10 -0
- package/lib/components/molecules/HorizontalRuleText/HorizontalRuleText.js +51 -0
- package/lib/components/molecules/HorizontalRuleText/HorizontalRuleText.js.map +1 -0
- package/lib/components/molecules/IconInput/IconInput.d.ts +2 -1
- package/lib/components/molecules/IconInput/IconInput.js +3 -3
- package/lib/components/molecules/IconInput/IconInput.js.map +1 -1
- package/lib/components/molecules/Image/Image.js +1 -1
- package/lib/components/molecules/Image/Image.js.map +1 -1
- package/lib/components/molecules/LoadingIndicator/LoadingIndicator.js +1 -1
- package/lib/components/molecules/LoadingIndicator/LoadingIndicator.js.map +1 -1
- package/lib/components/molecules/NotesCard/NotesCard.js +1 -1
- package/lib/components/molecules/NotesCard/NotesCard.js.map +1 -1
- package/lib/components/molecules/PanelTabs/PanelTabs.js +1 -1
- package/lib/components/molecules/PanelTabs/PanelTabs.js.map +1 -1
- package/lib/components/molecules/StarScore/StarScore.d.ts +1 -1
- package/lib/components/molecules/StarScore/StarScore.js +1 -1
- package/lib/components/molecules/StarScore/StarScore.js.map +1 -1
- package/lib/components/molecules/index.d.ts +3 -0
- package/lib/components/molecules/index.js +3 -0
- package/lib/components/molecules/index.js.map +1 -1
- package/lib/components/organisms/ActionCard/ActionCard.d.ts +3 -2
- package/lib/components/organisms/ActionCard/ActionCard.js +25 -14
- package/lib/components/organisms/ActionCard/ActionCard.js.map +1 -1
- package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.d.ts +2 -1
- package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.js +2 -2
- package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.js.map +1 -1
- package/lib/components/organisms/ChipSelect/ChipSelect.d.ts +3 -2
- package/lib/components/organisms/ChipSelect/ChipSelect.js +19 -3
- package/lib/components/organisms/ChipSelect/ChipSelect.js.map +1 -1
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.d.ts +1 -0
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.js +1 -1
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.js.map +1 -1
- package/lib/components/organisms/ProgressBar/ProgressBar.js +1 -1
- package/lib/components/organisms/ProgressBar/ProgressBar.js.map +1 -1
- package/lib/components/organisms/ScrollList/DottedButton.d.ts +1 -1
- package/lib/components/organisms/ScrollList/DottedButton.js +1 -1
- package/lib/components/organisms/ScrollList/DottedButton.js.map +1 -1
- package/lib/components/organisms/SearchBar/SearchBar.d.ts +2 -1
- package/lib/components/organisms/SearchBar/SearchBar.js +2 -2
- package/lib/components/organisms/SearchBar/SearchBar.js.map +1 -1
- package/lib/components/organisms/ToggleButton/ToggleButton.d.ts +1 -1
- package/lib/components/organisms/ToggleButton/ToggleButton.js +1 -1
- package/lib/components/organisms/ToggleButton/ToggleButton.js.map +1 -1
- package/lib/components/organisms/index.d.ts +1 -1
- package/lib/components/organisms/index.js +1 -1
- package/lib/components/organisms/index.js.map +1 -1
- package/lib/components/templates/Dashboard/Chart/PieChart/PieChart.js +1 -1
- package/lib/components/templates/Dashboard/Chart/PieChart/PieChart.js.map +1 -1
- package/lib/components/templates/TreeView/Branch.d.ts +5 -2
- package/lib/components/templates/TreeView/Branch.js +5 -5
- package/lib/components/templates/TreeView/Branch.js.map +1 -1
- package/lib/components/templates/TreeView/BranchCard.d.ts +7 -3
- package/lib/components/templates/TreeView/BranchCard.js +21 -23
- package/lib/components/templates/TreeView/BranchCard.js.map +1 -1
- package/lib/components/templates/TreeView/TreeView.d.ts +8 -3
- package/lib/components/templates/TreeView/TreeView.js +2 -2
- package/lib/components/templates/TreeView/TreeView.js.map +1 -1
- package/lib/config/ConfigContext.d.ts +2 -3
- package/lib/config/ConfigContext.js +12 -27
- package/lib/config/ConfigContext.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/theme/{ThemeContext.d.ts → color/ThemeContext.d.ts} +2 -1
- package/lib/theme/{ThemeContext.js → color/ThemeContext.js} +25 -14
- package/lib/theme/color/ThemeContext.js.map +1 -0
- package/lib/theme/color/color.defaults.d.ts +105 -0
- package/lib/theme/color/color.defaults.js +184 -0
- package/lib/theme/color/color.defaults.js.map +1 -0
- package/lib/theme/color/content.helpers.d.ts +4 -0
- package/lib/theme/color/content.helpers.js +147 -0
- package/lib/theme/color/content.helpers.js.map +1 -0
- package/lib/theme/color/index.d.ts +5 -0
- package/lib/theme/{theme-context.helper.js → color/index.js} +5 -7
- package/lib/theme/color/index.js.map +1 -0
- package/lib/theme/color/themes.d.ts +4 -0
- package/lib/theme/{themes.js → color/themes.js} +4 -102
- package/lib/theme/color/themes.js.map +1 -0
- package/lib/theme/{themes.d.ts → color/types.d.ts} +39 -3
- package/lib/theme/color/types.js +19 -0
- package/lib/theme/color/types.js.map +1 -0
- package/lib/theme/index.d.ts +2 -4
- package/lib/theme/index.js +2 -4
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/writing/WritingThemeContext.js.map +1 -0
- package/lib/theme/writing/index.d.ts +2 -0
- package/lib/theme/writing/index.js +20 -0
- package/lib/theme/writing/index.js.map +1 -0
- package/lib/theme/{writing-theme-context.helper.js → writing/writing-theme-context.helper.js} +1 -1
- package/lib/theme/writing/writing-theme-context.helper.js.map +1 -0
- package/lib/theme/writing/writingTheme.js.map +1 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +20 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/keyboard.d.ts +8 -0
- package/lib/types/keyboard.js +26 -0
- package/lib/types/keyboard.js.map +1 -0
- package/lib/utils/commons-utlis.d.ts +5 -1
- package/lib/utils/commons-utlis.js +23 -0
- package/lib/utils/commons-utlis.js.map +1 -1
- package/package.json +1 -1
- package/lib/theme/ThemeContext.js.map +0 -1
- package/lib/theme/WritingThemeContext.js.map +0 -1
- package/lib/theme/theme-context.helper.d.ts +0 -2
- package/lib/theme/theme-context.helper.js.map +0 -1
- package/lib/theme/themes.js.map +0 -1
- package/lib/theme/writing-theme-context.helper.js.map +0 -1
- package/lib/theme/writingTheme.js.map +0 -1
- /package/lib/theme/{WritingThemeContext.d.ts → writing/WritingThemeContext.d.ts} +0 -0
- /package/lib/theme/{WritingThemeContext.js → writing/WritingThemeContext.js} +0 -0
- /package/lib/theme/{writing-theme-context.helper.d.ts → writing/writing-theme-context.helper.d.ts} +0 -0
- /package/lib/theme/{writingTheme.d.ts → writing/writingTheme.d.ts} +0 -0
- /package/lib/theme/{writingTheme.js → writing/writingTheme.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigContext.js","sourceRoot":"","sources":["../../src/config/ConfigContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,OAAO,EACP,UAAU,GACX,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigContext.js","sourceRoot":"","sources":["../../src/config/ConfigContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,OAAO,EACP,UAAU,GACX,MAAM,OAAO,CAAC;AAEf,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AA6ClC,MAAM,oBAAoB,GAAG;IAC3B,UAAU,EAAE,IAAI;IAChB,yBAAyB,EAAE,QAAQ,CAAC,UAAU,CAAC,MAAM;IACrD,qBAAqB,EAAE,KAAK;IAC5B,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,EAAE;IAChB,sBAAsB,EAAE;QACtB,OAAO,EAAE,KAAK;QACd,OAA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CAAC,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,EACtD,EAAE,CACH,CAAC;IACF,MAAM,kBAAkB,GAAG,OAAO,CAChC,GAAG,EAAE,CAAC,CAAC;QACL,GAAG,KAAK;QACR,uBAAuB;QACvB,6BAA6B;QAC7B,oBAAoB;QACpB,gBAAgB;QAChB,cAAc;QACd,eAAe;QACf,kBAAkB;QAClB,4BAA4B;QAC5B,eAAe;QACf,yBAAyB;QACzB,kBAAkB;KACnB,CAAC,EACF;QACE,KAAK;QACL,uBAAuB;QACvB,6BAA6B;QAC7B,oBAAoB;QACpB,gBAAgB;QAChB,cAAc;QACd,eAAe;QACf,kBAAkB;QAClB,4BAA4B;QAC5B,eAAe;QACf,yBAAyB;QACzB,kBAAkB;KACnB,CACF,CAAC;IAEF,OAAO,CACL,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAChD;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,aAAa,CAAC,QAAQ,CAAC,CAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAuB,EAAE,CAChD,UAAU,CAAqB,aAAa,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './components';
|
|
2
2
|
export * from './theme';
|
|
3
3
|
export * from './utils';
|
|
4
|
-
export
|
|
4
|
+
export * from './types';
|
|
5
5
|
export { ConfigProvider, useConfig } from './config/ConfigContext';
|
|
6
6
|
export { OutsideAlerterProvider, useClickOutside, OUTSIDE_INDICATOR, } from './hooks/use-click-outside';
|
|
7
7
|
export { animationUtil } from './tools/AnimationUtil';
|
package/lib/index.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
export * from './components';
|
|
19
19
|
export * from './theme';
|
|
20
20
|
export * from './utils';
|
|
21
|
-
export
|
|
21
|
+
export * from './types';
|
|
22
22
|
export { ConfigProvider, useConfig } from './config/ConfigContext';
|
|
23
23
|
export { OutsideAlerterProvider, useClickOutside, OUTSIDE_INDICATOR, } from './hooks/use-click-outside';
|
|
24
24
|
export { animationUtil } from './tools/AnimationUtil';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,cAAc,EAAE,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjE,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAC,cAAc,EAAC,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAC,cAAc,EAAC,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { Theme, ThemeColors } from './
|
|
2
|
+
import { ConfigurableTheme, Theme, ThemeColors } from './types';
|
|
3
3
|
interface ThemeContextState {
|
|
4
4
|
activeTheme: Theme;
|
|
5
5
|
isColorBlind: boolean;
|
|
6
6
|
themes: Theme[];
|
|
7
7
|
changeTheme: (themeKey: string) => void;
|
|
8
|
+
addThemes: (themes: (ConfigurableTheme | Theme)[]) => void;
|
|
8
9
|
activateColorBlind: () => void;
|
|
9
10
|
desactivateColorBlind: () => void;
|
|
10
11
|
}
|
|
@@ -16,23 +16,21 @@
|
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
import React, { createContext, useCallback, useContext, useMemo, useReducer, } from 'react';
|
|
19
|
-
import { lightTheme, purpleTheme, colorBlindTheme
|
|
20
|
-
import { getActiveTheme } from './
|
|
19
|
+
import { lightTheme, purpleTheme, colorBlindTheme } from './themes';
|
|
20
|
+
import { getActiveTheme, registerThemes } from './content.helpers';
|
|
21
|
+
function throwError(action) {
|
|
22
|
+
throw new Error(`Theme provider should be mounted to ${action}`);
|
|
23
|
+
}
|
|
21
24
|
const DEFAULT_THEME = purpleTheme;
|
|
22
25
|
const COLORBLIND_THEME = colorBlindTheme;
|
|
23
26
|
const defaultThemeContext = {
|
|
24
27
|
activeTheme: DEFAULT_THEME,
|
|
25
28
|
isColorBlind: DEFAULT_THEME === COLORBLIND_THEME,
|
|
26
29
|
themes: [lightTheme, purpleTheme],
|
|
27
|
-
changeTheme: () =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
throw new Error('ThemeProvider should be mounted to activate color blind');
|
|
32
|
-
},
|
|
33
|
-
desactivateColorBlind() {
|
|
34
|
-
throw new Error('ThemeProvider should be mounted to desactivate color blind');
|
|
35
|
-
},
|
|
30
|
+
changeTheme: () => throwError('change theme'),
|
|
31
|
+
addThemes: () => throwError('add themes'),
|
|
32
|
+
activateColorBlind: () => throwError('activate color blind'),
|
|
33
|
+
desactivateColorBlind: () => throwError('desactivate color blind'),
|
|
36
34
|
};
|
|
37
35
|
const getInitialThemeState = (additionalThemes = [], defaultTheme = DEFAULT_THEME, themeColorsConfig) => {
|
|
38
36
|
return {
|
|
@@ -44,6 +42,7 @@ const getInitialThemeState = (additionalThemes = [], defaultTheme = DEFAULT_THEM
|
|
|
44
42
|
const ThemeContext = createContext(defaultThemeContext);
|
|
45
43
|
const actionTypes = {
|
|
46
44
|
changeTheme: 'changeTheme',
|
|
45
|
+
addThemes: 'addThemes',
|
|
47
46
|
activateColorBlind: 'activateColorBlind',
|
|
48
47
|
desactivateColorBlind: 'desactivateColorBlind',
|
|
49
48
|
};
|
|
@@ -60,6 +59,12 @@ const themeReducer = (state, action) => {
|
|
|
60
59
|
isColorBlind: newActiveTheme === COLORBLIND_THEME,
|
|
61
60
|
};
|
|
62
61
|
}
|
|
62
|
+
case actionTypes.addThemes: {
|
|
63
|
+
return {
|
|
64
|
+
...state,
|
|
65
|
+
themes: registerThemes(state.themes, action.payload),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
63
68
|
case actionTypes.activateColorBlind: {
|
|
64
69
|
return {
|
|
65
70
|
...state,
|
|
@@ -77,10 +82,14 @@ const themeReducer = (state, action) => {
|
|
|
77
82
|
}
|
|
78
83
|
};
|
|
79
84
|
const actions = {
|
|
80
|
-
changeTheme: themeKey => ({
|
|
85
|
+
changeTheme: (themeKey) => ({
|
|
81
86
|
type: actionTypes.changeTheme,
|
|
82
87
|
payload: themeKey,
|
|
83
88
|
}),
|
|
89
|
+
addThemes: (themes) => ({
|
|
90
|
+
type: actionTypes.addThemes,
|
|
91
|
+
payload: themes,
|
|
92
|
+
}),
|
|
84
93
|
activateColorBlind: () => ({
|
|
85
94
|
type: actionTypes.activateColorBlind,
|
|
86
95
|
}),
|
|
@@ -90,15 +99,17 @@ const actions = {
|
|
|
90
99
|
};
|
|
91
100
|
export const ThemeProvider = ({ children, themes, defaultTheme, themeColorsConfig, }) => {
|
|
92
101
|
const [state, dispatch] = useReducer(themeReducer, getInitialThemeState(themes, defaultTheme, themeColorsConfig));
|
|
93
|
-
const changeTheme = useCallback(themeKey => dispatch(actions.changeTheme(themeKey)), []);
|
|
102
|
+
const changeTheme = useCallback((themeKey) => dispatch(actions.changeTheme(themeKey)), []);
|
|
103
|
+
const addThemes = useCallback((configurableThemes) => dispatch(actions.addThemes(configurableThemes)), []);
|
|
94
104
|
const activateColorBlind = useCallback(() => dispatch(actions.activateColorBlind()), []);
|
|
95
105
|
const desactivateColorBlind = useCallback(() => dispatch(actions.desactivateColorBlind()), []);
|
|
96
106
|
const themeContextState = useMemo(() => ({
|
|
97
107
|
...state,
|
|
98
108
|
changeTheme,
|
|
109
|
+
addThemes,
|
|
99
110
|
activateColorBlind,
|
|
100
111
|
desactivateColorBlind,
|
|
101
|
-
}), [activateColorBlind, changeTheme, desactivateColorBlind, state]);
|
|
112
|
+
}), [activateColorBlind, addThemes, changeTheme, desactivateColorBlind, state]);
|
|
102
113
|
return (<ThemeContext.Provider value={themeContextState}>
|
|
103
114
|
{children}
|
|
104
115
|
</ThemeContext.Provider>);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../../../src/theme/color/ThemeContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EACZ,aAAa,EAEb,WAAW,EACX,UAAU,EACV,OAAO,EACP,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,UAAU,EAAE,WAAW,EAAE,eAAe,EAAC,MAAM,UAAU,CAAC;AAElE,OAAO,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAEjE,SAAS,UAAU,CAAC,MAAc;IAChC,MAAM,IAAI,KAAK,CAAC,uCAAuC,MAAM,EAAE,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,aAAa,GAAG,WAAW,CAAC;AAClC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAiBzC,MAAM,mBAAmB,GAAG;IAC1B,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,aAAa,KAAK,gBAAgB;IAChD,MAAM,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,WAAW,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC;IAC7C,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC;IACzC,kBAAk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
5
|
+
background_light: string;
|
|
6
|
+
foreground: string;
|
|
7
|
+
};
|
|
8
|
+
pink: {
|
|
9
|
+
background: string;
|
|
10
|
+
background_light: string;
|
|
11
|
+
foreground: string;
|
|
12
|
+
};
|
|
13
|
+
purple: {
|
|
14
|
+
background: string;
|
|
15
|
+
background_light: string;
|
|
16
|
+
foreground: string;
|
|
17
|
+
};
|
|
18
|
+
deepPurple: {
|
|
19
|
+
background: string;
|
|
20
|
+
background_light: string;
|
|
21
|
+
foreground: string;
|
|
22
|
+
};
|
|
23
|
+
indigo: {
|
|
24
|
+
background: string;
|
|
25
|
+
background_light: string;
|
|
26
|
+
foreground: string;
|
|
27
|
+
};
|
|
28
|
+
blue: {
|
|
29
|
+
background: string;
|
|
30
|
+
background_light: string;
|
|
31
|
+
foreground: string;
|
|
32
|
+
};
|
|
33
|
+
lightBlue: {
|
|
34
|
+
background: string;
|
|
35
|
+
background_light: string;
|
|
36
|
+
foreground: string;
|
|
37
|
+
};
|
|
38
|
+
cyan: {
|
|
39
|
+
background: string;
|
|
40
|
+
background_light: string;
|
|
41
|
+
foreground: string;
|
|
42
|
+
};
|
|
43
|
+
teal: {
|
|
44
|
+
background: string;
|
|
45
|
+
background_light: string;
|
|
46
|
+
foreground: string;
|
|
47
|
+
};
|
|
48
|
+
green: {
|
|
49
|
+
background: string;
|
|
50
|
+
background_light: string;
|
|
51
|
+
foreground: string;
|
|
52
|
+
};
|
|
53
|
+
lightGreen: {
|
|
54
|
+
background: string;
|
|
55
|
+
background_light: string;
|
|
56
|
+
foreground: string;
|
|
57
|
+
};
|
|
58
|
+
lime: {
|
|
59
|
+
background: string;
|
|
60
|
+
background_light: string;
|
|
61
|
+
foreground: string;
|
|
62
|
+
};
|
|
63
|
+
yellow: {
|
|
64
|
+
background: string;
|
|
65
|
+
background_light: string;
|
|
66
|
+
foreground: string;
|
|
67
|
+
};
|
|
68
|
+
amber: {
|
|
69
|
+
background: string;
|
|
70
|
+
background_light: string;
|
|
71
|
+
foreground: string;
|
|
72
|
+
};
|
|
73
|
+
orange: {
|
|
74
|
+
background: string;
|
|
75
|
+
background_light: string;
|
|
76
|
+
foreground: string;
|
|
77
|
+
};
|
|
78
|
+
deepOrange: {
|
|
79
|
+
background: string;
|
|
80
|
+
background_light: string;
|
|
81
|
+
foreground: string;
|
|
82
|
+
};
|
|
83
|
+
brown: {
|
|
84
|
+
background: string;
|
|
85
|
+
background_light: string;
|
|
86
|
+
foreground: string;
|
|
87
|
+
};
|
|
88
|
+
grey: {
|
|
89
|
+
background: string;
|
|
90
|
+
background_light: string;
|
|
91
|
+
foreground: string;
|
|
92
|
+
};
|
|
93
|
+
blueGrey: {
|
|
94
|
+
background: string;
|
|
95
|
+
background_light: string;
|
|
96
|
+
foreground: string;
|
|
97
|
+
};
|
|
98
|
+
black: {
|
|
99
|
+
background: string;
|
|
100
|
+
background_light: string;
|
|
101
|
+
foreground: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
export declare const defaultLightColors: ConfigurablePalette;
|
|
105
|
+
export declare const defaultDarkColors: ConfigurablePalette;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export const bootstrapColors = {
|
|
19
|
+
red: {
|
|
20
|
+
background: '#DC3545',
|
|
21
|
+
background_light: '#EA868F',
|
|
22
|
+
foreground: '#000000',
|
|
23
|
+
},
|
|
24
|
+
pink: {
|
|
25
|
+
background: '#D63384',
|
|
26
|
+
background_light: '#E685B5',
|
|
27
|
+
foreground: '#000000',
|
|
28
|
+
},
|
|
29
|
+
purple: {
|
|
30
|
+
background: '#6F42C1',
|
|
31
|
+
background_light: '#A98EDA',
|
|
32
|
+
foreground: '#000000',
|
|
33
|
+
},
|
|
34
|
+
deepPurple: {
|
|
35
|
+
background: '#673AB7',
|
|
36
|
+
background_light: '#A489D4',
|
|
37
|
+
foreground: '#000000',
|
|
38
|
+
},
|
|
39
|
+
indigo: {
|
|
40
|
+
background: '#6610F2',
|
|
41
|
+
background_light: '#A370F7',
|
|
42
|
+
foreground: '#000000',
|
|
43
|
+
},
|
|
44
|
+
blue: {
|
|
45
|
+
background: '#0D6EFD',
|
|
46
|
+
background_light: '#6EA8FE',
|
|
47
|
+
foreground: '#000000',
|
|
48
|
+
},
|
|
49
|
+
lightBlue: {
|
|
50
|
+
background: '#03A9F4',
|
|
51
|
+
background_light: '#68CBF8',
|
|
52
|
+
foreground: '#000000',
|
|
53
|
+
},
|
|
54
|
+
cyan: {
|
|
55
|
+
background: '#0DCAF0',
|
|
56
|
+
background_light: '#6EDFF6',
|
|
57
|
+
foreground: '#000000',
|
|
58
|
+
},
|
|
59
|
+
teal: {
|
|
60
|
+
background: '#20C997',
|
|
61
|
+
background_light: '#79DFC1',
|
|
62
|
+
foreground: '#000000',
|
|
63
|
+
},
|
|
64
|
+
green: {
|
|
65
|
+
background: '#198754',
|
|
66
|
+
background_light: '#75B798',
|
|
67
|
+
foreground: '#000000',
|
|
68
|
+
},
|
|
69
|
+
lightGreen: {
|
|
70
|
+
background: '#8BC34A',
|
|
71
|
+
background_light: '#B9DB92',
|
|
72
|
+
foreground: '#000000',
|
|
73
|
+
},
|
|
74
|
+
lime: {
|
|
75
|
+
background: '#CDDC39',
|
|
76
|
+
background_light: '#E1EA88',
|
|
77
|
+
foreground: '#000000',
|
|
78
|
+
},
|
|
79
|
+
yellow: {
|
|
80
|
+
background: '#FFC107',
|
|
81
|
+
background_light: '#FFDA6A',
|
|
82
|
+
foreground: '#000000',
|
|
83
|
+
},
|
|
84
|
+
amber: {
|
|
85
|
+
background: '#FFC107',
|
|
86
|
+
background_light: '#FFDA6A',
|
|
87
|
+
foreground: '#000000',
|
|
88
|
+
},
|
|
89
|
+
orange: {
|
|
90
|
+
background: '#FD7E14',
|
|
91
|
+
background_light: '#FEB272',
|
|
92
|
+
foreground: '#000000',
|
|
93
|
+
},
|
|
94
|
+
deepOrange: {
|
|
95
|
+
background: '#FF5722',
|
|
96
|
+
background_light: '#FF9A7A',
|
|
97
|
+
foreground: '#000000',
|
|
98
|
+
},
|
|
99
|
+
brown: {
|
|
100
|
+
background: '#795548',
|
|
101
|
+
background_light: '#AF9991',
|
|
102
|
+
foreground: '#FFFFFF',
|
|
103
|
+
},
|
|
104
|
+
grey: {
|
|
105
|
+
background: '#6C757D',
|
|
106
|
+
background_light: '#A7ACB1',
|
|
107
|
+
foreground: '#000000',
|
|
108
|
+
},
|
|
109
|
+
blueGrey: {
|
|
110
|
+
background: '#607D8B',
|
|
111
|
+
background_light: '#A0B1B9',
|
|
112
|
+
foreground: '#000000',
|
|
113
|
+
},
|
|
114
|
+
black: {
|
|
115
|
+
background: '#000000',
|
|
116
|
+
background_light: '#666666',
|
|
117
|
+
foreground: '#FFFFFF',
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
export const defaultLightColors = {
|
|
121
|
+
mode: 'light',
|
|
122
|
+
colors: {
|
|
123
|
+
primary: '#6C67FA',
|
|
124
|
+
secondary: '#6C757D',
|
|
125
|
+
success: '#3ECF8E',
|
|
126
|
+
warning: '#FFBE4E',
|
|
127
|
+
danger: '#DD514C',
|
|
128
|
+
info: '#26C6F9',
|
|
129
|
+
dark: '#212529',
|
|
130
|
+
},
|
|
131
|
+
body: {
|
|
132
|
+
color: '#5A5A7C',
|
|
133
|
+
placeholder: '#ACACBD',
|
|
134
|
+
background: '#FFFFFF',
|
|
135
|
+
sidebar: '#F8F8FF',
|
|
136
|
+
},
|
|
137
|
+
web: {
|
|
138
|
+
blue: '#6C67FA',
|
|
139
|
+
indigo: '#6610F2',
|
|
140
|
+
purple: '#C354F2',
|
|
141
|
+
pink: '#D63384',
|
|
142
|
+
red: '#DD514C',
|
|
143
|
+
orange: '#FD7E14',
|
|
144
|
+
yellow: '#FFBE4E',
|
|
145
|
+
green: '#3ECF8E',
|
|
146
|
+
teal: '#20C997',
|
|
147
|
+
cyan: '#26C6F9',
|
|
148
|
+
black: '#333333',
|
|
149
|
+
grey: '#6C757D',
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
export const defaultDarkColors = {
|
|
153
|
+
mode: 'dark',
|
|
154
|
+
colors: {
|
|
155
|
+
primary: '#666CFF',
|
|
156
|
+
secondary: '#6D788D',
|
|
157
|
+
success: '#3ECF8E',
|
|
158
|
+
warning: '#FDB528',
|
|
159
|
+
danger: '#E04440',
|
|
160
|
+
info: '#26C6F9',
|
|
161
|
+
dark: '#212529',
|
|
162
|
+
},
|
|
163
|
+
body: {
|
|
164
|
+
color: '#C7C8DC',
|
|
165
|
+
placeholder: '#7C7D94',
|
|
166
|
+
background: '#31334D',
|
|
167
|
+
sidebar: '#292A41',
|
|
168
|
+
},
|
|
169
|
+
web: {
|
|
170
|
+
blue: '#666CFF',
|
|
171
|
+
indigo: '#6610F2',
|
|
172
|
+
purple: '#C354F2',
|
|
173
|
+
pink: '#D63384',
|
|
174
|
+
red: '#E04440',
|
|
175
|
+
orange: '#FD7E14',
|
|
176
|
+
yellow: '#FDB528',
|
|
177
|
+
green: '#3ECF8E',
|
|
178
|
+
teal: '#20C997',
|
|
179
|
+
cyan: '#26C6F9',
|
|
180
|
+
black: '#333333',
|
|
181
|
+
grey: '#6D788D',
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
//# sourceMappingURL=color.defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.defaults.js","sourceRoot":"","sources":["../../../src/theme/color/color.defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,GAAG,EAAE;QACH,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;KACtB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;KACtB;IACD,MAAM,EAAE;QACN,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;KACtB;IACD,UAAU,EAAE;QACV,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;KACtB;IACD,MAAM,EAAE;QACN,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;KACtB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;KACtB;IACD,SAAS,EAAE;QACT,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;KACtB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;KACtB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;KACtB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;KACtB;IACD,UAAU,EAA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IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,SAAS;QACtB,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,SAAS;KACnB;IACD,GAAG,EAAE;QACH,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,SAAS;QACd,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAwB;IACpD,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE;QACN,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;KAChB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,SAAS;QACtB,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,SAAS;KACnB;IACD,GAAG,EAAE;QACH,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,SAAS;QACd,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB;CACF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ConfigurableTheme, Theme, ThemeColors } from './types';
|
|
2
|
+
export declare const getActiveTheme: (defaultTheme: Theme, themeColorsConfig: ThemeColors) => any;
|
|
3
|
+
export declare function formatColor(color: string): string;
|
|
4
|
+
export declare function registerThemes(existing: Theme[], newThemes: (ConfigurableTheme | Theme)[]): Theme[];
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { addOpacityToHex, deepCopy, getBestForegroundColor, rgbaStringToHex, } from '../../utils';
|
|
19
|
+
import { bootstrapColors, defaultDarkColors, defaultLightColors, } from './color.defaults';
|
|
20
|
+
export const getActiveTheme = (defaultTheme, themeColorsConfig) => {
|
|
21
|
+
const activeTheme = deepCopy(defaultTheme);
|
|
22
|
+
Object.assign(activeTheme.colors, themeColorsConfig);
|
|
23
|
+
return activeTheme;
|
|
24
|
+
};
|
|
25
|
+
export function formatColor(color) {
|
|
26
|
+
if (color == null) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
if (color.includes('#')) {
|
|
30
|
+
if (color.length === 4) {
|
|
31
|
+
return `#${color
|
|
32
|
+
.replace('#', '')
|
|
33
|
+
.split('')
|
|
34
|
+
.map(char => char + char)
|
|
35
|
+
.join('')}`;
|
|
36
|
+
}
|
|
37
|
+
return color;
|
|
38
|
+
}
|
|
39
|
+
if (color.includes('rgb')) {
|
|
40
|
+
return rgbaStringToHex(color);
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const extendColor = (color) => {
|
|
45
|
+
const _hexColor = formatColor(color);
|
|
46
|
+
return {
|
|
47
|
+
background: _hexColor,
|
|
48
|
+
background_light: addOpacityToHex(_hexColor, 0.7),
|
|
49
|
+
foreground: getBestForegroundColor(_hexColor),
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
function formatPalette(theme) {
|
|
53
|
+
const mode = theme.palette?.mode ?? 'light';
|
|
54
|
+
const _default = mode === 'light' ? defaultLightColors : defaultDarkColors;
|
|
55
|
+
return {
|
|
56
|
+
mode,
|
|
57
|
+
colors: {
|
|
58
|
+
primary: formatColor(theme.palette?.primary) ?? _default.colors.primary,
|
|
59
|
+
secondary: formatColor(theme.palette?.secondary) ?? _default.colors.secondary,
|
|
60
|
+
success: formatColor(theme.palette?.success) ?? _default.colors.success,
|
|
61
|
+
warning: formatColor(theme.palette?.warning) ?? _default.colors.warning,
|
|
62
|
+
danger: formatColor(theme.palette?.danger) ?? _default.colors.danger,
|
|
63
|
+
info: formatColor(theme.palette?.info) ?? _default.colors.info,
|
|
64
|
+
dark: formatColor(theme.palette?.dark) ?? _default.colors.dark,
|
|
65
|
+
},
|
|
66
|
+
body: {
|
|
67
|
+
color: formatColor(theme.palette?.body_color) ?? _default.body.color,
|
|
68
|
+
placeholder: formatColor(theme.components?.Input?.placeholder?.color) ??
|
|
69
|
+
_default.body.placeholder,
|
|
70
|
+
background: formatColor(theme.palette?.body_bg) ?? _default.body.background,
|
|
71
|
+
sidebar: formatColor(theme.components?.Shell?.sidebar?.bg) ??
|
|
72
|
+
_default.body.sidebar,
|
|
73
|
+
},
|
|
74
|
+
web: {
|
|
75
|
+
blue: formatColor(theme.palette?.blue) ?? _default.web.blue,
|
|
76
|
+
indigo: formatColor(theme.palette?.indigo) ?? _default.web.indigo,
|
|
77
|
+
purple: formatColor(theme.palette?.purple) ?? _default.web.purple,
|
|
78
|
+
pink: formatColor(theme.palette?.pink) ?? _default.web.pink,
|
|
79
|
+
red: formatColor(theme.palette?.red) ?? _default.web.red,
|
|
80
|
+
orange: formatColor(theme.palette?.orange) ?? _default.web.orange,
|
|
81
|
+
yellow: formatColor(theme.palette?.yellow) ?? _default.web.yellow,
|
|
82
|
+
green: formatColor(theme.palette?.green) ?? _default.web.green,
|
|
83
|
+
teal: formatColor(theme.palette?.teal) ?? _default.web.teal,
|
|
84
|
+
cyan: formatColor(theme.palette?.cyan) ?? _default.web.cyan,
|
|
85
|
+
black: formatColor(theme.palette?.black) ?? _default.web.black,
|
|
86
|
+
grey: formatColor(theme.palette?.gray) ?? _default.web.grey,
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function mapPaletteColors(theme) {
|
|
91
|
+
const _content = formatPalette(JSON.parse(theme.content));
|
|
92
|
+
return {
|
|
93
|
+
...bootstrapColors,
|
|
94
|
+
screenBackgroundColor: _content.body.sidebar,
|
|
95
|
+
backgroundColor: _content.body.background,
|
|
96
|
+
text: _content.body.color,
|
|
97
|
+
placeholderTextColor: _content.body.placeholder,
|
|
98
|
+
primaryColor: extendColor(_content.colors.primary),
|
|
99
|
+
secondaryColor: extendColor(_content.colors.secondary),
|
|
100
|
+
secondaryColor_dark: extendColor(_content.colors.dark),
|
|
101
|
+
errorColor: extendColor(_content.colors.danger),
|
|
102
|
+
cautionColor: extendColor(_content.colors.warning),
|
|
103
|
+
plannedColor: extendColor(_content.web.purple),
|
|
104
|
+
progressColor: extendColor(_content.web.yellow),
|
|
105
|
+
priorityColor: extendColor(_content.colors.info),
|
|
106
|
+
defaultColor: extendColor(_content.web.grey),
|
|
107
|
+
importantColor: extendColor(_content.colors.danger),
|
|
108
|
+
successColor: extendColor(_content.colors.success),
|
|
109
|
+
warningColor: extendColor(_content.colors.warning),
|
|
110
|
+
inverseColor: extendColor(_content.web.grey),
|
|
111
|
+
infoColor: extendColor(_content.colors.info),
|
|
112
|
+
red: extendColor(_content.web.red),
|
|
113
|
+
pink: extendColor(_content.web.pink),
|
|
114
|
+
purple: extendColor(_content.web.purple),
|
|
115
|
+
indigo: extendColor(_content.web.indigo),
|
|
116
|
+
blue: extendColor(_content.web.blue),
|
|
117
|
+
cyan: extendColor(_content.web.cyan),
|
|
118
|
+
teal: extendColor(_content.web.teal),
|
|
119
|
+
green: extendColor(_content.web.green),
|
|
120
|
+
yellow: extendColor(_content.web.yellow),
|
|
121
|
+
orange: extendColor(_content.web.orange),
|
|
122
|
+
grey: extendColor(_content.web.grey),
|
|
123
|
+
black: extendColor(_content.web.black),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export function registerThemes(existing, newThemes) {
|
|
127
|
+
if (!Array.isArray(newThemes) || newThemes.length === 0) {
|
|
128
|
+
return existing;
|
|
129
|
+
}
|
|
130
|
+
let result = existing.filter(_t => !_t.isCustom);
|
|
131
|
+
newThemes.forEach(_theme => {
|
|
132
|
+
if (_theme.id != null) {
|
|
133
|
+
const _t = _theme;
|
|
134
|
+
result.push({
|
|
135
|
+
key: _t.id,
|
|
136
|
+
name: _t.label ?? _t.name,
|
|
137
|
+
colors: mapPaletteColors(_t),
|
|
138
|
+
isCustom: true,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
result.push(_theme);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
return result;
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=content.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.helpers.js","sourceRoot":"","sources":["../../../src/theme/color/content.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,eAAe,EACf,QAAQ,EACR,sBAAsB,EACtB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,iBA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,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QACvD,OAAO,QAAQ,CAAC;KACjB;IAED,IAAI,MAAM,GAAY,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAE1D,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACzB,IAAK,MAA4B,CAAC,EAAE,IAAI,IAAI,EAAE;YAC5C,MAAM,EAAE,GAAG,MAA2B,CAAC;YACvC,MAAM,CAAC,IAAI,CAAC;gBACV,GAAG,EAAE,EAAE,CAAC,EAAE;gBACV,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,IAAI;gBACzB,MAAM,EAAE,gBAAgB,CAAC,EAAE,CAAC;gBAC5B,QAAQ,EAAE,IAAI;aACf,CAAC,CAAC;SACJ;aAAM;YACL,MAAM,CAAC,IAAI,CAAC,MAAe,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=theme-context.helper.js.map
|
|
18
|
+
export * from './color.defaults';
|
|
19
|
+
export * from './content.helpers';
|
|
20
|
+
export { ThemeProvider, useTheme, useThemeColor } from './ThemeContext';
|
|
21
|
+
export { lightTheme, purpleTheme, colorBlindTheme } from './themes';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|