@sjts/web-theme 31.2.22

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/LICENCE ADDED
@@ -0,0 +1,5 @@
1
+
2
+ Copyright (C) Mr Stephen James - All Rights Reserved
3
+ Unauthorized copying of any files within this source code repository, via any medium is strictly prohibited
4
+ Proprietary and confidential
5
+ Written by Steve James <steve@stevejames.dev>, March 2019
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # @sjts/frontend
@@ -0,0 +1,13 @@
1
+ export type Color = {
2
+ 50: string;
3
+ 100: string;
4
+ 200: string;
5
+ 300: string;
6
+ 400: string;
7
+ 500: string;
8
+ 600: string;
9
+ 700: string;
10
+ 800: string;
11
+ 900: string;
12
+ };
13
+ //# sourceMappingURL=Color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../src/Color.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACX,CAAA"}
package/dist/Color.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Color } from './Color.js';
2
+ export type ColorTheme = {
3
+ grey: Color;
4
+ primary: Color;
5
+ secondary: Color;
6
+ tertiary: Color;
7
+ quaternary: Color;
8
+ success: Color;
9
+ warn: Color;
10
+ error: Color;
11
+ info: Color;
12
+ };
13
+ export type ColorThemeKey = keyof ColorTheme;
14
+ //# sourceMappingURL=ColorTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorTheme.d.ts","sourceRoot":"","sources":["../src/ColorTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,MAAM,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,KAAK,CAAA;IACX,OAAO,EAAE,KAAK,CAAA;IACd,SAAS,EAAE,KAAK,CAAA;IAChB,QAAQ,EAAE,KAAK,CAAA;IACf,UAAU,EAAE,KAAK,CAAA;IAEjB,OAAO,EAAE,KAAK,CAAA;IACd,IAAI,EAAE,KAAK,CAAA;IACX,KAAK,EAAE,KAAK,CAAA;IACZ,IAAI,EAAE,KAAK,CAAA;CACX,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,UAAU,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
1
+ import { Color } from './Color.js';
2
+ export type Palette = {
3
+ color0?: Color;
4
+ color1?: Color;
5
+ color2?: Color;
6
+ color3?: Color;
7
+ color4?: Color;
8
+ color5?: Color;
9
+ color6?: Color;
10
+ color7?: Color;
11
+ color8?: Color;
12
+ color9?: Color;
13
+ color10?: Color;
14
+ color11?: Color;
15
+ color12?: Color;
16
+ color13?: Color;
17
+ color14?: Color;
18
+ color15?: Color;
19
+ color16?: Color;
20
+ color17?: Color;
21
+ color18?: Color;
22
+ color19?: Color;
23
+ color20?: Color;
24
+ color21?: Color;
25
+ color22?: Color;
26
+ color23?: Color;
27
+ };
28
+ export type PaletteKey = keyof Palette;
29
+ //# sourceMappingURL=Palette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Palette.d.ts","sourceRoot":"","sources":["../src/Palette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,MAAM,MAAM,OAAO,GAAG;IACrB,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAA;CACf,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import { PaletteKey } from './Palette.js';
2
+ export type PaletteTheme = {
3
+ grey: PaletteKey;
4
+ primary: PaletteKey;
5
+ secondary: PaletteKey;
6
+ tertiary: PaletteKey;
7
+ quaternary?: PaletteKey;
8
+ success: PaletteKey;
9
+ warn: PaletteKey;
10
+ error: PaletteKey;
11
+ info: PaletteKey;
12
+ };
13
+ //# sourceMappingURL=PaletteTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaletteTheme.d.ts","sourceRoot":"","sources":["../src/PaletteTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;IACnB,SAAS,EAAE,UAAU,CAAA;IACrB,QAAQ,EAAE,UAAU,CAAA;IACpB,UAAU,CAAC,EAAE,UAAU,CAAA;IAEvB,OAAO,EAAE,UAAU,CAAA;IACnB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,UAAU,CAAA;IACjB,IAAI,EAAE,UAAU,CAAA;CAChB,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ColorTheme } from './ColorTheme.js';
2
+ export declare const ThemeData: {
3
+ colorTheme: ColorTheme;
4
+ };
5
+ export type IThemeData = typeof ThemeData;
6
+ export type IThemeActions = {
7
+ setColorTheme: (colorTheme: ColorTheme) => void;
8
+ };
9
+ export declare const ThemeContext: import("react").Context<{
10
+ colorTheme: ColorTheme;
11
+ }>;
12
+ export declare const ThemeActionsContext: import("react").Context<IThemeActions>;
13
+ //# sourceMappingURL=ThemeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../src/ThemeContext.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,eAAO,MAAM,SAAS;gBACH,UAAU;CAC5B,CAAA;AACD,MAAM,MAAM,UAAU,GAAG,OAAO,SAAS,CAAA;AAEzC,MAAM,MAAM,aAAa,GAAG;IAC3B,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,YAAY;gBARN,UAAU;EAQuB,CAAA;AACpD,eAAO,MAAM,mBAAmB,wCAAiE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { createContext } from 'react';
2
+ export const ThemeData = {
3
+ colorTheme: {},
4
+ };
5
+ export const ThemeContext = createContext(ThemeData);
6
+ export const ThemeActionsContext = createContext(null);
@@ -0,0 +1,5 @@
1
+ import { ColorTheme } from './ColorTheme.js';
2
+ export declare function useColorTheme(): ColorTheme;
3
+ export declare const useThemeActions: () => import("./ThemeContext.js").IThemeActions;
4
+ export declare function useThemed(fn: (p: ColorTheme) => any): any;
5
+ //# sourceMappingURL=ThemeHooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeHooks.d.ts","sourceRoot":"","sources":["../src/ThemeHooks.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAG5C,wBAAgB,aAAa,IAAI,UAAU,CAG1C;AAED,eAAO,MAAM,eAAe,iDAAwC,CAAA;AAEpE,wBAAgB,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,GAAG,OAQnD"}
@@ -0,0 +1,15 @@
1
+ import { useContext, useMemo } from 'react';
2
+ import { ThemeActionsContext, ThemeContext } from './ThemeContext.js';
3
+ export function useColorTheme() {
4
+ const { colorTheme } = useContext(ThemeContext);
5
+ return colorTheme;
6
+ }
7
+ export const useThemeActions = () => useContext(ThemeActionsContext);
8
+ export function useThemed(fn) {
9
+ const theme = useColorTheme();
10
+ if (!theme)
11
+ throw new Error('AMPX ThemeProvider required');
12
+ return useMemo(() => fn(theme),
13
+ // eslint-disable-next-line react-hooks/exhaustive-deps
14
+ []);
15
+ }
@@ -0,0 +1,11 @@
1
+ import { ColorTheme } from './ColorTheme.js';
2
+ import { Palette } from './Palette.js';
3
+ import { PaletteTheme } from './PaletteTheme.js';
4
+ export type ThemeProviderProps = {
5
+ children: React.ReactElement;
6
+ palette?: Palette;
7
+ paletteTheme?: PaletteTheme;
8
+ colorTheme?: ColorTheme;
9
+ };
10
+ export declare function ThemeProvider(props: ThemeProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=ThemeProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKhD,MAAM,MAAM,kBAAkB,GAAG;IAChC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,oDAiCtD"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
+ import { useCtrlActionsCtx, useCtrlCtx, useCtrlState } from '@sjts/react-ctrl';
3
+ import { useCallback, useRef } from 'react';
4
+ import { ThemeActionsContext, ThemeContext } from './ThemeContext.js';
5
+ import { defaultPalette } from './defaultPalette.js';
6
+ import { defaultPaletteTheme } from './defaultPaletteTheme.js';
7
+ export function ThemeProvider(props) {
8
+ const { children, colorTheme, palette = defaultPalette, paletteTheme = defaultPaletteTheme, } = props;
9
+ // INIT DATA
10
+ const _s = useCtrlState({
11
+ colorTheme: colorTheme ?? makeColorTheme(palette, paletteTheme),
12
+ });
13
+ // INIT ACTIONS
14
+ const _a = useRef({});
15
+ _a.current.setColorTheme = useCallback((colorTheme) => {
16
+ ;
17
+ (_s.current, (colorTheme = colorTheme));
18
+ _s.current.setChanged();
19
+ }, [_s, colorTheme]);
20
+ // CONTEXTS
21
+ const ctx = useCtrlCtx(_s);
22
+ const actionCtx = useCtrlActionsCtx(_a, 'Theme');
23
+ return (_jsx(ThemeContext.Provider, { value: ctx, children: _jsx(ThemeActionsContext.Provider, { value: actionCtx, children: children }) }));
24
+ }
25
+ function makeColorTheme(palette, paletteTheme) {
26
+ return {
27
+ grey: palette[paletteTheme.grey],
28
+ primary: palette[paletteTheme.primary],
29
+ secondary: palette[paletteTheme.secondary],
30
+ tertiary: palette[paletteTheme.tertiary],
31
+ quaternary: palette[paletteTheme.quaternary],
32
+ success: palette[paletteTheme.success],
33
+ warn: palette[paletteTheme.warn],
34
+ error: palette[paletteTheme.error],
35
+ info: palette[paletteTheme.info],
36
+ };
37
+ }
@@ -0,0 +1,3 @@
1
+ import { Palette } from './Palette.js';
2
+ export declare const defaultPalette: Palette;
3
+ //# sourceMappingURL=defaultPalette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultPalette.d.ts","sourceRoot":"","sources":["../src/defaultPalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,eAAO,MAAM,cAAc,EAAE,OAwT5B,CAAA"}
@@ -0,0 +1,290 @@
1
+ export const defaultPalette = {
2
+ color23: {
3
+ 50: '#FCFCFC',
4
+ 100: '#EEEEEE',
5
+ 200: '#DDDDDD',
6
+ 300: '#CCCCCC',
7
+ 400: '#BBBBBB',
8
+ 500: '#999999',
9
+ 600: '#777777',
10
+ 700: '#555555',
11
+ 800: '#333333',
12
+ 900: '#111111',
13
+ },
14
+ color0: {
15
+ '50': '#E1FFEA',
16
+ '100': '#C4FFD4',
17
+ '200': '#9CFFB8',
18
+ '300': '#74FF9B',
19
+ '400': '#57FF85',
20
+ '500': '#39FF70',
21
+ '600': '#30D95F',
22
+ '700': '#28B34E',
23
+ '800': '#1D8038',
24
+ '900': '#145927',
25
+ },
26
+ color1: {
27
+ '50': '#E1FFF1',
28
+ '100': '#C4FFE3',
29
+ '200': '#9CFFD0',
30
+ '300': '#74FFBD',
31
+ '400': '#57FFAF',
32
+ '500': '#39FFA1',
33
+ '600': '#30D989',
34
+ '700': '#28B371',
35
+ '800': '#1D8051',
36
+ '900': '#145938',
37
+ },
38
+ color2: {
39
+ '50': '#E1FFF8',
40
+ '100': '#C4FFF2',
41
+ '200': '#9CFFE9',
42
+ '300': '#74FFE0',
43
+ '400': '#57FFDA',
44
+ '500': '#39FFD3',
45
+ '600': '#30D9B3',
46
+ '700': '#28B394',
47
+ '800': '#1D806A',
48
+ '900': '#14594A',
49
+ },
50
+ color3: {
51
+ '50': '#E1FEFF',
52
+ '100': '#C4FDFF',
53
+ '200': '#9CFCFF',
54
+ '300': '#74FBFF',
55
+ '400': '#57FAFF',
56
+ '500': '#39F9FF',
57
+ '600': '#30D4D9',
58
+ '700': '#28AEB3',
59
+ '800': '#1D7D80',
60
+ '900': '#145759',
61
+ },
62
+ color4: {
63
+ '50': '#E1F7FF',
64
+ '100': '#C4EFFF',
65
+ '200': '#9CE4FF',
66
+ '300': '#74D9FF',
67
+ '400': '#57D0FF',
68
+ '500': '#39C8FF',
69
+ '600': '#30AAD9',
70
+ '700': '#288CB3',
71
+ '800': '#1D6480',
72
+ '900': '#144659',
73
+ },
74
+ color5: {
75
+ '50': '#E1EFFF',
76
+ '100': '#C4E0FF',
77
+ '200': '#9CCBFF',
78
+ '300': '#74B6FF',
79
+ '400': '#57A6FF',
80
+ '500': '#3996FF',
81
+ '600': '#3080D9',
82
+ '700': '#2869B3',
83
+ '800': '#1D4B80',
84
+ '900': '#143559',
85
+ },
86
+ color6: {
87
+ '50': '#E1E8FF',
88
+ '100': '#C4D1FF',
89
+ '200': '#9CB2FF',
90
+ '300': '#7493FF',
91
+ '400': '#577CFF',
92
+ '500': '#3965FF',
93
+ '600': '#3056D9',
94
+ '700': '#2847B3',
95
+ '800': '#1D3380',
96
+ '900': '#142359',
97
+ },
98
+ color7: {
99
+ '50': '#E2E1FF',
100
+ '100': '#C5C4FF',
101
+ '200': '#9F9CFF',
102
+ '300': '#7874FF',
103
+ '400': '#5B57FF',
104
+ '500': '#3E39FF',
105
+ '600': '#3530D9',
106
+ '700': '#2B28B3',
107
+ '800': '#1F1D80',
108
+ '900': '#161459',
109
+ },
110
+ color8: {
111
+ '50': '#EAE1FF',
112
+ '100': '#D4C4FF',
113
+ '200': '#B89CFF',
114
+ '300': '#9B74FF',
115
+ '400': '#8557FF',
116
+ '500': '#7039FF',
117
+ '600': '#5F30D9',
118
+ '700': '#4E28B3',
119
+ '800': '#381D80',
120
+ '900': '#271459',
121
+ },
122
+ color9: {
123
+ '50': '#F1E1FF',
124
+ '100': '#E3C4FF',
125
+ '200': '#D09CFF',
126
+ '300': '#BD74FF',
127
+ '400': '#AF57FF',
128
+ '500': '#A139FF',
129
+ '600': '#8930D9',
130
+ '700': '#7128B3',
131
+ '800': '#511D80',
132
+ '900': '#381459',
133
+ },
134
+ color10: {
135
+ '50': '#F8E1FF',
136
+ '100': '#F2C4FF',
137
+ '200': '#E99CFF',
138
+ '300': '#E074FF',
139
+ '400': '#DA57FF',
140
+ '500': '#D339FF',
141
+ '600': '#B330D9',
142
+ '700': '#9428B3',
143
+ '800': '#6A1D80',
144
+ '900': '#4A1459',
145
+ },
146
+ color11: {
147
+ '50': '#FFE1FE',
148
+ '100': '#FFC4FD',
149
+ '200': '#FF9CFC',
150
+ '300': '#FF74FB',
151
+ '400': '#FF57FA',
152
+ '500': '#FF39F9',
153
+ '600': '#D930D4',
154
+ '700': '#B328AE',
155
+ '800': '#801D7D',
156
+ '900': '#591457',
157
+ },
158
+ color12: {
159
+ '50': '#FFE1F7',
160
+ '100': '#FFC4EF',
161
+ '200': '#FF9CE4',
162
+ '300': '#FF74D9',
163
+ '400': '#FF57D0',
164
+ '500': '#FF39C8',
165
+ '600': '#D930AA',
166
+ '700': '#B3288C',
167
+ '800': '#801D64',
168
+ '900': '#591446',
169
+ },
170
+ color13: {
171
+ '50': '#FFE1EF',
172
+ '100': '#FFC4E0',
173
+ '200': '#FF9CCB',
174
+ '300': '#FF74B6',
175
+ '400': '#FF57A6',
176
+ '500': '#FF3996',
177
+ '600': '#D93080',
178
+ '700': '#B32869',
179
+ '800': '#801D4B',
180
+ '900': '#591435',
181
+ },
182
+ color14: {
183
+ '50': '#FFE1E8',
184
+ '100': '#FFC4D1',
185
+ '200': '#FF9CB2',
186
+ '300': '#FF7493',
187
+ '400': '#FF577C',
188
+ '500': '#FF3965',
189
+ '600': '#D93056',
190
+ '700': '#B32847',
191
+ '800': '#801D33',
192
+ '900': '#591423',
193
+ },
194
+ color15: {
195
+ '50': '#FFE2E1',
196
+ '100': '#FFC5C4',
197
+ '200': '#FF9F9C',
198
+ '300': '#FF7874',
199
+ '400': '#FF5B57',
200
+ '500': '#FF3E39',
201
+ '600': '#D93530',
202
+ '700': '#B32B28',
203
+ '800': '#801F1D',
204
+ '900': '#591614',
205
+ },
206
+ color16: {
207
+ '50': '#FFEAE1',
208
+ '100': '#FFD4C4',
209
+ '200': '#FFB89C',
210
+ '300': '#FF9B74',
211
+ '400': '#FF8557',
212
+ '500': '#FF7039',
213
+ '600': '#D95F30',
214
+ '700': '#B34E28',
215
+ '800': '#80381D',
216
+ '900': '#592714',
217
+ },
218
+ color17: {
219
+ '50': '#FFF1E1',
220
+ '100': '#FFE3C4',
221
+ '200': '#FFD09C',
222
+ '300': '#FFBD74',
223
+ '400': '#FFAF57',
224
+ '500': '#FFA139',
225
+ '600': '#D98930',
226
+ '700': '#B37128',
227
+ '800': '#80511D',
228
+ '900': '#593814',
229
+ },
230
+ color18: {
231
+ '50': '#FFF8E1',
232
+ '100': '#FFF2C4',
233
+ '200': '#FFE99C',
234
+ '300': '#FFE074',
235
+ '400': '#FFDA57',
236
+ '500': '#FFD339',
237
+ '600': '#D9B330',
238
+ '700': '#B39428',
239
+ '800': '#806A1D',
240
+ '900': '#594A14',
241
+ },
242
+ color19: {
243
+ '50': '#FEFFE1',
244
+ '100': '#FDFFC4',
245
+ '200': '#FCFF9C',
246
+ '300': '#FBFF74',
247
+ '400': '#FAFF57',
248
+ '500': '#F9FF39',
249
+ '600': '#D4D930',
250
+ '700': '#AEB328',
251
+ '800': '#7D801D',
252
+ '900': '#575914',
253
+ },
254
+ color20: {
255
+ '50': '#F7FFE1',
256
+ '100': '#EFFFC4',
257
+ '200': '#E4FF9C',
258
+ '300': '#D9FF74',
259
+ '400': '#D0FF57',
260
+ '500': '#C8FF39',
261
+ '600': '#AAD930',
262
+ '700': '#8CB328',
263
+ '800': '#64801D',
264
+ '900': '#465914',
265
+ },
266
+ color21: {
267
+ '50': '#EFFFE1',
268
+ '100': '#E0FFC4',
269
+ '200': '#CBFF9C',
270
+ '300': '#B6FF74',
271
+ '400': '#A6FF57',
272
+ '500': '#96FF39',
273
+ '600': '#80D930',
274
+ '700': '#69B328',
275
+ '800': '#4B801D',
276
+ '900': '#355914',
277
+ },
278
+ color22: {
279
+ '50': '#E8FFE1',
280
+ '100': '#D1FFC4',
281
+ '200': '#B2FF9C',
282
+ '300': '#93FF74',
283
+ '400': '#7CFF57',
284
+ '500': '#65FF39',
285
+ '600': '#56D930',
286
+ '700': '#47B328',
287
+ '800': '#33801D',
288
+ '900': '#235914',
289
+ },
290
+ };
@@ -0,0 +1,3 @@
1
+ import { PaletteTheme } from './PaletteTheme.js';
2
+ export declare const defaultPaletteTheme: PaletteTheme;
3
+ //# sourceMappingURL=defaultPaletteTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultPaletteTheme.d.ts","sourceRoot":"","sources":["../src/defaultPaletteTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,eAAO,MAAM,mBAAmB,EAAE,YAUjC,CAAA"}
@@ -0,0 +1,11 @@
1
+ export const defaultPaletteTheme = {
2
+ grey: 'color23',
3
+ primary: 'color0',
4
+ secondary: 'color4',
5
+ tertiary: 'color19',
6
+ quaternary: 'color21',
7
+ success: 'color20',
8
+ warn: 'color18',
9
+ error: 'color15',
10
+ info: 'color10',
11
+ };
@@ -0,0 +1,10 @@
1
+ export * from './Color.js';
2
+ export * from './ColorTheme.js';
3
+ export * from './Palette.js';
4
+ export * from './PaletteTheme.js';
5
+ export * from './ThemeContext.js';
6
+ export * from './ThemeHooks.js';
7
+ export * from './ThemeProvider.js';
8
+ export * from './defaultPalette.js';
9
+ export * from './defaultPaletteTheme.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ export * from './Color.js';
2
+ export * from './ColorTheme.js';
3
+ export * from './Palette.js';
4
+ export * from './PaletteTheme.js';
5
+ export * from './ThemeContext.js';
6
+ export * from './ThemeHooks.js';
7
+ export * from './ThemeProvider.js';
8
+ export * from './defaultPalette.js';
9
+ export * from './defaultPaletteTheme.js';
package/main.css ADDED
@@ -0,0 +1,45 @@
1
+ html, body, * {
2
+ padding: 0;
3
+ margin: 0;
4
+ -webkit-font-smoothing: antialiased;
5
+ }
6
+
7
+ html, body, #root, #root>div {
8
+ width: 100% !important;
9
+ height: 100% !important;
10
+ max-height: 100% !important;
11
+ overflow: hidden !important;
12
+ overscroll-behavior-x: none;
13
+ flex-direction: column;
14
+ display: flex;
15
+ flex: 1;
16
+ }
17
+
18
+
19
+ #loom-companion-mv3 {
20
+ display: none;
21
+ }
22
+
23
+ input::-webkit-outer-spin-button,
24
+ input::-webkit-inner-spin-button {
25
+ -webkit-appearance: none;
26
+ margin: 0;
27
+ }
28
+
29
+ .ModalBackground {
30
+ position: fixed;
31
+ top: 0;
32
+ left: 0;
33
+ width: 100%;
34
+ height: 100%;
35
+ background-color: rgba(0,0,0,0.5);
36
+ z-index: 1000;
37
+ display: flex;
38
+ }
39
+
40
+
41
+ .amplify-accordion__item__trigger {
42
+ &:focus, &:active {
43
+ box-shadow: none
44
+ }
45
+ }
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@sjts/web-theme",
3
+ "description": "The Steve James Typescript Web Theme package",
4
+ "version": "31.2.22",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "sideEffects": false,
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.js"
14
+ },
15
+ "./main.css": "./main.css",
16
+ "./tsconfig.frontend.json": "./tsconfig.frontend.json",
17
+ "./tsconfig.frontend.lib.json": "./tsconfig.frontend.lib.json",
18
+ "./tsconfig.frontend.node.json": "./tsconfig.frontend.node.json"
19
+ },
20
+ "scripts": {
21
+ "build": "tsc",
22
+ "build:clean": "yarn run clean && yarn run build",
23
+ "clean": "rm -rf dist",
24
+ "release:patch": "yarn version patch && yarn npm publish",
25
+ "release:minor": "yarn version minor && yarn npm publish",
26
+ "release:major": "yarn version major && yarn npm publish"
27
+ },
28
+ "prettier": "@sjts/lib-devops/prettier.json",
29
+ "devDependencies": {
30
+ "@sjts/lib-devops": "31.2.2",
31
+ "@types/react": "^18.2.21",
32
+ "react": "^18.3.1",
33
+ "typescript": "^5.8.3"
34
+ },
35
+ "peerDependencies": {
36
+ "react": "^18.3.1"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ }
41
+ }