norma-library 0.6.985 → 0.6.987
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/esm/components/TimeLine/TimeLine.js +2 -1
- package/dist/esm/components/TimeLine/TimeLine.js.map +1 -1
- package/dist/esm/helpers/colors.d.ts +113 -113
- package/dist/esm/helpers/colors.js +41 -3
- package/dist/esm/helpers/colors.js.map +1 -1
- package/dist/esm/index.d.ts +18 -14
- package/dist/esm/index.js +18 -14
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/Card.tsx +4 -4
- package/src/components/IconButton.tsx +10 -28
- package/src/components/RangerSlider.tsx +5 -17
- package/src/components/Tabs.tsx +11 -23
- package/src/components/Tag.tsx +1 -1
- package/src/components/TimeLine/TimeLine.tsx +10 -21
- package/src/components/UncontrolledTabs/UncontrolledTabs.style.tsx +8 -24
- package/src/helpers/colors.ts +45 -4
- package/src/index.ts +28 -46
- package/src/providers/NormaProvider.tsx +10 -5
|
@@ -6,7 +6,8 @@ import { palette } from '../../helpers';
|
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
var colorMap = {
|
|
8
8
|
inherit: palette.inherit,
|
|
9
|
-
primary: '#DB6619',
|
|
9
|
+
// primary: '#DB6619',
|
|
10
|
+
primary: palette.primary,
|
|
10
11
|
secondary: palette.secondary,
|
|
11
12
|
error: palette.error,
|
|
12
13
|
warning: palette.warning,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeLine.js","sourceRoot":"","sources":["../../../../src/components/TimeLine/TimeLine.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,mBAAmB,GACpB,MAAM,UAAU,CAAC;AAElB,OAAO,E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C,EAAE,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAC,8BAA8B,EAAC,OAAO,EAAC,OAAO,IACtF,IAAI,CAAC,WAAW,CACN,CACd;gBACA,IAAI,CAAC,QAAQ,CACE,CACL,CAChB,CAAC;IACJ,CAAC,CAAC,CACY,CACjB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,165 +1,165 @@
|
|
|
1
|
-
import { PaletteOptions } from '@mui/material/styles';
|
|
2
|
-
export declare const getPalette: () => {
|
|
3
|
-
primary:
|
|
4
|
-
primaryLight:
|
|
5
|
-
primaryMedium:
|
|
6
|
-
primaryDark:
|
|
7
|
-
inherit:
|
|
8
|
-
secondary:
|
|
9
|
-
error:
|
|
10
|
-
warning:
|
|
11
|
-
info:
|
|
12
|
-
success:
|
|
1
|
+
import { PaletteOptions, ThemeOptions } from '@mui/material/styles';
|
|
2
|
+
export declare const getPalette: (customPalette?: ThemeOptions) => {
|
|
3
|
+
primary: any;
|
|
4
|
+
primaryLight: any;
|
|
5
|
+
primaryMedium: any;
|
|
6
|
+
primaryDark: any;
|
|
7
|
+
inherit: any;
|
|
8
|
+
secondary: any;
|
|
9
|
+
error: any;
|
|
10
|
+
warning: any;
|
|
11
|
+
info: any;
|
|
12
|
+
success: any;
|
|
13
13
|
white: string;
|
|
14
|
-
black:
|
|
14
|
+
black: any;
|
|
15
15
|
helper: string;
|
|
16
|
-
secondaryLight:
|
|
17
|
-
secondaryMedium:
|
|
18
|
-
secondaryDark:
|
|
19
|
-
inheritLight:
|
|
20
|
-
inheritMedium:
|
|
21
|
-
inheritDark:
|
|
16
|
+
secondaryLight: any;
|
|
17
|
+
secondaryMedium: any;
|
|
18
|
+
secondaryDark: any;
|
|
19
|
+
inheritLight: any;
|
|
20
|
+
inheritMedium: any;
|
|
21
|
+
inheritDark: any;
|
|
22
22
|
whiteLight: string;
|
|
23
23
|
whiteMedium: string;
|
|
24
24
|
whiteDark: string;
|
|
25
|
-
successLight:
|
|
26
|
-
successMedium:
|
|
27
|
-
successDark:
|
|
28
|
-
errorLight:
|
|
29
|
-
errorMedium:
|
|
30
|
-
errorDark:
|
|
31
|
-
warningLight:
|
|
32
|
-
warningMedium:
|
|
33
|
-
warningDark:
|
|
25
|
+
successLight: any;
|
|
26
|
+
successMedium: any;
|
|
27
|
+
successDark: any;
|
|
28
|
+
errorLight: any;
|
|
29
|
+
errorMedium: any;
|
|
30
|
+
errorDark: any;
|
|
31
|
+
warningLight: any;
|
|
32
|
+
warningMedium: any;
|
|
33
|
+
warningDark: any;
|
|
34
34
|
helperLight: string;
|
|
35
35
|
helperMedium: string;
|
|
36
36
|
helperDark: string;
|
|
37
37
|
};
|
|
38
38
|
export declare const palette: {
|
|
39
|
-
primary:
|
|
40
|
-
primaryLight:
|
|
41
|
-
primaryMedium:
|
|
42
|
-
primaryDark:
|
|
43
|
-
inherit:
|
|
44
|
-
secondary:
|
|
45
|
-
error:
|
|
46
|
-
warning:
|
|
47
|
-
info:
|
|
48
|
-
success:
|
|
39
|
+
primary: any;
|
|
40
|
+
primaryLight: any;
|
|
41
|
+
primaryMedium: any;
|
|
42
|
+
primaryDark: any;
|
|
43
|
+
inherit: any;
|
|
44
|
+
secondary: any;
|
|
45
|
+
error: any;
|
|
46
|
+
warning: any;
|
|
47
|
+
info: any;
|
|
48
|
+
success: any;
|
|
49
49
|
white: string;
|
|
50
|
-
black:
|
|
50
|
+
black: any;
|
|
51
51
|
helper: string;
|
|
52
|
-
secondaryLight:
|
|
53
|
-
secondaryMedium:
|
|
54
|
-
secondaryDark:
|
|
55
|
-
inheritLight:
|
|
56
|
-
inheritMedium:
|
|
57
|
-
inheritDark:
|
|
52
|
+
secondaryLight: any;
|
|
53
|
+
secondaryMedium: any;
|
|
54
|
+
secondaryDark: any;
|
|
55
|
+
inheritLight: any;
|
|
56
|
+
inheritMedium: any;
|
|
57
|
+
inheritDark: any;
|
|
58
58
|
whiteLight: string;
|
|
59
59
|
whiteMedium: string;
|
|
60
60
|
whiteDark: string;
|
|
61
|
-
successLight:
|
|
62
|
-
successMedium:
|
|
63
|
-
successDark:
|
|
64
|
-
errorLight:
|
|
65
|
-
errorMedium:
|
|
66
|
-
errorDark:
|
|
67
|
-
warningLight:
|
|
68
|
-
warningMedium:
|
|
69
|
-
warningDark:
|
|
61
|
+
successLight: any;
|
|
62
|
+
successMedium: any;
|
|
63
|
+
successDark: any;
|
|
64
|
+
errorLight: any;
|
|
65
|
+
errorMedium: any;
|
|
66
|
+
errorDark: any;
|
|
67
|
+
warningLight: any;
|
|
68
|
+
warningMedium: any;
|
|
69
|
+
warningDark: any;
|
|
70
70
|
helperLight: string;
|
|
71
71
|
helperMedium: string;
|
|
72
72
|
helperDark: string;
|
|
73
73
|
};
|
|
74
74
|
export declare const textColors: {
|
|
75
|
-
inherit:
|
|
76
|
-
primary:
|
|
77
|
-
secondary:
|
|
78
|
-
error:
|
|
79
|
-
warning:
|
|
80
|
-
info:
|
|
81
|
-
success:
|
|
75
|
+
inherit: any;
|
|
76
|
+
primary: any;
|
|
77
|
+
secondary: any;
|
|
78
|
+
error: any;
|
|
79
|
+
warning: any;
|
|
80
|
+
info: any;
|
|
81
|
+
success: any;
|
|
82
82
|
white: string;
|
|
83
|
-
black:
|
|
83
|
+
black: any;
|
|
84
84
|
helper: string;
|
|
85
|
-
primaryLight:
|
|
86
|
-
primaryMedium:
|
|
87
|
-
primaryDark:
|
|
88
|
-
secondaryLight:
|
|
89
|
-
secondaryMedium:
|
|
90
|
-
secondaryDark:
|
|
91
|
-
inheritLight:
|
|
92
|
-
inheritMedium:
|
|
93
|
-
inheritDark:
|
|
85
|
+
primaryLight: any;
|
|
86
|
+
primaryMedium: any;
|
|
87
|
+
primaryDark: any;
|
|
88
|
+
secondaryLight: any;
|
|
89
|
+
secondaryMedium: any;
|
|
90
|
+
secondaryDark: any;
|
|
91
|
+
inheritLight: any;
|
|
92
|
+
inheritMedium: any;
|
|
93
|
+
inheritDark: any;
|
|
94
94
|
whiteLight: string;
|
|
95
95
|
whiteMedium: string;
|
|
96
96
|
whiteDark: string;
|
|
97
|
-
successLight:
|
|
98
|
-
successMedium:
|
|
99
|
-
successDark:
|
|
100
|
-
errorLight:
|
|
101
|
-
errorMedium:
|
|
102
|
-
errorDark:
|
|
103
|
-
warningLight:
|
|
104
|
-
warningMedium:
|
|
105
|
-
warningDark:
|
|
97
|
+
successLight: any;
|
|
98
|
+
successMedium: any;
|
|
99
|
+
successDark: any;
|
|
100
|
+
errorLight: any;
|
|
101
|
+
errorMedium: any;
|
|
102
|
+
errorDark: any;
|
|
103
|
+
warningLight: any;
|
|
104
|
+
warningMedium: any;
|
|
105
|
+
warningDark: any;
|
|
106
106
|
helperLight: string;
|
|
107
107
|
helperMedium: string;
|
|
108
108
|
helperDark: string;
|
|
109
109
|
};
|
|
110
110
|
export declare const backgroundColors: {
|
|
111
|
-
inherit:
|
|
112
|
-
primary:
|
|
113
|
-
secondary:
|
|
114
|
-
error:
|
|
115
|
-
warning:
|
|
116
|
-
info:
|
|
117
|
-
success:
|
|
111
|
+
inherit: any;
|
|
112
|
+
primary: any;
|
|
113
|
+
secondary: any;
|
|
114
|
+
error: any;
|
|
115
|
+
warning: any;
|
|
116
|
+
info: any;
|
|
117
|
+
success: any;
|
|
118
118
|
white: string;
|
|
119
|
-
black:
|
|
120
|
-
primaryLight:
|
|
121
|
-
primaryMedium:
|
|
122
|
-
primaryDark:
|
|
123
|
-
secondaryLight:
|
|
124
|
-
secondaryMedium:
|
|
125
|
-
secondaryDark:
|
|
126
|
-
inheritLight:
|
|
127
|
-
inheritMedium:
|
|
128
|
-
inheritDark:
|
|
119
|
+
black: any;
|
|
120
|
+
primaryLight: any;
|
|
121
|
+
primaryMedium: any;
|
|
122
|
+
primaryDark: any;
|
|
123
|
+
secondaryLight: any;
|
|
124
|
+
secondaryMedium: any;
|
|
125
|
+
secondaryDark: any;
|
|
126
|
+
inheritLight: any;
|
|
127
|
+
inheritMedium: any;
|
|
128
|
+
inheritDark: any;
|
|
129
129
|
whiteLight: string;
|
|
130
130
|
whiteMedium: string;
|
|
131
131
|
whiteDark: string;
|
|
132
|
-
successLight:
|
|
133
|
-
successMedium:
|
|
134
|
-
successDark:
|
|
135
|
-
errorLight:
|
|
136
|
-
errorMedium:
|
|
137
|
-
errorDark:
|
|
138
|
-
warningLight:
|
|
139
|
-
warningMedium:
|
|
140
|
-
warningDark:
|
|
132
|
+
successLight: any;
|
|
133
|
+
successMedium: any;
|
|
134
|
+
successDark: any;
|
|
135
|
+
errorLight: any;
|
|
136
|
+
errorMedium: any;
|
|
137
|
+
errorDark: any;
|
|
138
|
+
warningLight: any;
|
|
139
|
+
warningMedium: any;
|
|
140
|
+
warningDark: any;
|
|
141
141
|
helperLight: string;
|
|
142
142
|
helperMedium: string;
|
|
143
143
|
helperDark: string;
|
|
144
144
|
};
|
|
145
145
|
export declare const olosPalette: {
|
|
146
146
|
primary: {
|
|
147
|
-
main:
|
|
147
|
+
main: any;
|
|
148
148
|
};
|
|
149
149
|
secondary: {
|
|
150
|
-
main:
|
|
150
|
+
main: any;
|
|
151
151
|
};
|
|
152
152
|
error: {
|
|
153
|
-
main:
|
|
153
|
+
main: any;
|
|
154
154
|
};
|
|
155
155
|
warning: {
|
|
156
|
-
main:
|
|
156
|
+
main: any;
|
|
157
157
|
};
|
|
158
158
|
info: {
|
|
159
|
-
main:
|
|
159
|
+
main: any;
|
|
160
160
|
};
|
|
161
161
|
success: {
|
|
162
|
-
main:
|
|
162
|
+
main: any;
|
|
163
163
|
};
|
|
164
164
|
};
|
|
165
165
|
export declare const newOlosPalette: PaletteOptions;
|
|
@@ -175,4 +175,4 @@ type PaletteKey = keyof typeof getPalette;
|
|
|
175
175
|
declare const getColor: (key: PaletteKey) => string;
|
|
176
176
|
declare const extractRGB: (rgbString: string) => string | null;
|
|
177
177
|
declare const lightenRGB: (rgbString: string, amount?: number) => string | null;
|
|
178
|
-
export {
|
|
178
|
+
export { extractRGB, getColor, lightenRGB };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import { createTheme } from '@mui/material/styles';
|
|
3
|
-
export var getPalette = function () {
|
|
4
|
-
|
|
3
|
+
export var getPalette = function (customPalette) {
|
|
4
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27;
|
|
5
|
+
var defaultPalette = {
|
|
5
6
|
primary: '#fc7f29',
|
|
6
7
|
primaryLight: '#FFDB9F',
|
|
7
8
|
primaryMedium: '#FFA84C',
|
|
@@ -37,6 +38,43 @@ export var getPalette = function () {
|
|
|
37
38
|
helperMedium: '#BF82D6',
|
|
38
39
|
helperDark: '#250D46',
|
|
39
40
|
};
|
|
41
|
+
var customPaletteAdapted = {
|
|
42
|
+
primary: ((_b = (_a = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b.main) || defaultPalette.primary,
|
|
43
|
+
primaryLight: ((_d = (_c = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _c === void 0 ? void 0 : _c.primary) === null || _d === void 0 ? void 0 : _d.light) || defaultPalette.primaryLight,
|
|
44
|
+
primaryMedium: ((_f = (_e = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _e === void 0 ? void 0 : _e.primary) === null || _f === void 0 ? void 0 : _f['500']) || defaultPalette.primaryMedium,
|
|
45
|
+
primaryDark: ((_h = (_g = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _g === void 0 ? void 0 : _g.primary) === null || _h === void 0 ? void 0 : _h.dark) || defaultPalette.primaryDark,
|
|
46
|
+
inherit: ((_k = (_j = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _j === void 0 ? void 0 : _j.info) === null || _k === void 0 ? void 0 : _k.main) || defaultPalette.inherit,
|
|
47
|
+
secondary: ((_m = (_l = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _l === void 0 ? void 0 : _l.secondary) === null || _m === void 0 ? void 0 : _m.main) || defaultPalette.secondary,
|
|
48
|
+
error: ((_p = (_o = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _o === void 0 ? void 0 : _o.error) === null || _p === void 0 ? void 0 : _p.main) || defaultPalette.error,
|
|
49
|
+
warning: ((_r = (_q = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _q === void 0 ? void 0 : _q.warning) === null || _r === void 0 ? void 0 : _r.main) || defaultPalette.warning,
|
|
50
|
+
info: ((_t = (_s = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _s === void 0 ? void 0 : _s.info) === null || _t === void 0 ? void 0 : _t.main) || defaultPalette.info,
|
|
51
|
+
success: ((_v = (_u = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _u === void 0 ? void 0 : _u.success) === null || _v === void 0 ? void 0 : _v.main) || defaultPalette.success,
|
|
52
|
+
white: defaultPalette.white,
|
|
53
|
+
black: ((_x = (_w = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _w === void 0 ? void 0 : _w.text) === null || _x === void 0 ? void 0 : _x.primary) || defaultPalette.black,
|
|
54
|
+
helper: defaultPalette.helper,
|
|
55
|
+
secondaryLight: ((_z = (_y = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _y === void 0 ? void 0 : _y.secondary) === null || _z === void 0 ? void 0 : _z.light) || defaultPalette.secondaryLight,
|
|
56
|
+
secondaryMedium: ((_1 = (_0 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _0 === void 0 ? void 0 : _0.secondary) === null || _1 === void 0 ? void 0 : _1['500']) || defaultPalette.secondaryMedium,
|
|
57
|
+
secondaryDark: ((_3 = (_2 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _2 === void 0 ? void 0 : _2.secondary) === null || _3 === void 0 ? void 0 : _3.dark) || defaultPalette.secondaryDark,
|
|
58
|
+
inheritLight: ((_5 = (_4 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _4 === void 0 ? void 0 : _4.info) === null || _5 === void 0 ? void 0 : _5.light) || defaultPalette.inheritLight,
|
|
59
|
+
inheritMedium: ((_7 = (_6 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _6 === void 0 ? void 0 : _6.info) === null || _7 === void 0 ? void 0 : _7['500']) || defaultPalette.inheritMedium,
|
|
60
|
+
inheritDark: ((_9 = (_8 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _8 === void 0 ? void 0 : _8.info) === null || _9 === void 0 ? void 0 : _9.dark) || defaultPalette.inheritDark,
|
|
61
|
+
whiteLight: defaultPalette.whiteLight,
|
|
62
|
+
whiteMedium: defaultPalette.whiteMedium,
|
|
63
|
+
whiteDark: defaultPalette.whiteDark,
|
|
64
|
+
successLight: ((_11 = (_10 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _10 === void 0 ? void 0 : _10.success) === null || _11 === void 0 ? void 0 : _11.light) || defaultPalette.successLight,
|
|
65
|
+
successMedium: ((_13 = (_12 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _12 === void 0 ? void 0 : _12.success) === null || _13 === void 0 ? void 0 : _13['500']) || defaultPalette.successMedium,
|
|
66
|
+
successDark: ((_15 = (_14 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _14 === void 0 ? void 0 : _14.success) === null || _15 === void 0 ? void 0 : _15.dark) || defaultPalette.successDark,
|
|
67
|
+
errorLight: ((_17 = (_16 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _16 === void 0 ? void 0 : _16.error) === null || _17 === void 0 ? void 0 : _17.light) || defaultPalette.errorLight,
|
|
68
|
+
errorMedium: ((_19 = (_18 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _18 === void 0 ? void 0 : _18.error) === null || _19 === void 0 ? void 0 : _19['500']) || defaultPalette.errorMedium,
|
|
69
|
+
errorDark: ((_21 = (_20 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _20 === void 0 ? void 0 : _20.error) === null || _21 === void 0 ? void 0 : _21.dark) || defaultPalette.errorDark,
|
|
70
|
+
warningLight: ((_23 = (_22 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _22 === void 0 ? void 0 : _22.warning) === null || _23 === void 0 ? void 0 : _23.light) || defaultPalette.warningLight,
|
|
71
|
+
warningMedium: ((_25 = (_24 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _24 === void 0 ? void 0 : _24.warning) === null || _25 === void 0 ? void 0 : _25['500']) || defaultPalette.warningMedium,
|
|
72
|
+
warningDark: ((_27 = (_26 = customPalette === null || customPalette === void 0 ? void 0 : customPalette.palette) === null || _26 === void 0 ? void 0 : _26.warning) === null || _27 === void 0 ? void 0 : _27.dark) || defaultPalette.warningDark,
|
|
73
|
+
helperLight: defaultPalette.helperLight,
|
|
74
|
+
helperMedium: defaultPalette.helperMedium,
|
|
75
|
+
helperDark: defaultPalette.helperDark,
|
|
76
|
+
};
|
|
77
|
+
return customPalette ? customPaletteAdapted : defaultPalette;
|
|
40
78
|
};
|
|
41
79
|
export var palette = getPalette();
|
|
42
80
|
export var textColors = {
|
|
@@ -233,5 +271,5 @@ var lightenRGB = function (rgbString, amount) {
|
|
|
233
271
|
}
|
|
234
272
|
return null;
|
|
235
273
|
};
|
|
236
|
-
export {
|
|
274
|
+
export { extractRGB, getColor, lightenRGB };
|
|
237
275
|
//# sourceMappingURL=colors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/helpers/colors.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,
|
|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,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;YACvC,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;YACvC,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;YAEvC,OAAO,cAAO,IAAI,cAAI,IAAI,cAAI,IAAI,MAAG,CAAC;QACxC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
1
|
import { Accordion } from './components/Accordion';
|
|
2
|
+
import Box from './components/Box';
|
|
3
|
+
import Breadcrumb from './components/Breadcrumb';
|
|
2
4
|
import { Button } from './components/Button';
|
|
3
5
|
import { Card } from './components/Card';
|
|
6
|
+
import { ChatMessage } from './components/ChatMessage';
|
|
7
|
+
import { ChatMessageBalloon } from './components/ChatMessageBalloon/ChatMessageBalloon';
|
|
4
8
|
import { CheckBox } from './components/CheckBox';
|
|
9
|
+
import DateInput from './components/DateInput';
|
|
10
|
+
import { DatePicker } from './components/DatePicker';
|
|
5
11
|
import { IconButton } from './components/IconButton';
|
|
6
12
|
import { Icons } from './components/Icons';
|
|
7
13
|
import { Modal } from './components/Modal';
|
|
14
|
+
import MultiSelectInput from './components/MultiSelectInput';
|
|
15
|
+
import { NormaChatMessageBalloon } from './components/NormaChatMessageBalloon';
|
|
8
16
|
import { Paper } from './components/Paper';
|
|
17
|
+
import { ProductCard } from './components/ProductCard/ProductCard';
|
|
9
18
|
import { ProgressBar } from './components/ProgressBar';
|
|
10
19
|
import { RadioGroup } from './components/RadioGroup';
|
|
11
20
|
import { RangerSlider } from './components/RangerSlider';
|
|
12
21
|
import { Select } from './components/Select';
|
|
22
|
+
import SelectInput from './components/SelectInput';
|
|
23
|
+
import { ServiceCard } from './components/ServiceCard/ServiceCard';
|
|
24
|
+
import { ModalStatus } from './components/StatusModal/StatusModal';
|
|
25
|
+
import Table from './components/Table';
|
|
13
26
|
import { Tabs } from './components/Tabs';
|
|
14
27
|
import { Tag } from './components/Tag';
|
|
15
28
|
import { TextField } from './components/TextField';
|
|
16
|
-
import { DatePicker } from './components/DatePicker';
|
|
17
|
-
import { ChatMessage, ChatMessageBalloon, NormaChatMessageBalloon, ProductCard, ServiceCard } from './components';
|
|
18
|
-
import { NormaProvider } from './providers/NormaProvider';
|
|
19
|
-
import { themes, getPalette } from './helpers';
|
|
20
|
-
import DateInput from './components/DateInput';
|
|
21
|
-
import Box from './components/Box';
|
|
22
|
-
import Breadcrumb from './components/Breadcrumb';
|
|
23
|
-
import SelectInput from './components/SelectInput';
|
|
24
|
-
import MultiSelectInput from './components/MultiSelectInput';
|
|
25
|
-
import { Title, Text } from './components/Typography';
|
|
26
29
|
import TextInput from './components/TextInput';
|
|
27
|
-
import
|
|
30
|
+
import { TimeLine, type TimeLineData } from './components/TimeLine/TimeLine';
|
|
31
|
+
import { Text, Title } from './components/Typography';
|
|
28
32
|
import UncontrolledTable from './components/UncontrolledTable/UncontrolledTable';
|
|
29
33
|
import UncontrolledTabs from './components/UncontrolledTabs/UncontrolledTabs';
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
34
|
+
import { getPalette, themes } from './helpers';
|
|
35
|
+
import { NormaProvider } from './providers/NormaProvider';
|
|
32
36
|
import { breakpoints } from './utils/styledBreakpoints';
|
|
33
37
|
import { useTheme } from '@mui/material';
|
|
34
|
-
export { Accordion, Button, Card, ChatMessage, ChatMessageBalloon, CheckBox, DatePicker, getPalette, IconButton, Icons, Modal,
|
|
38
|
+
export { Accordion, Box, Breadcrumb, breakpoints, Button, Card, ChatMessage, ChatMessageBalloon, CheckBox, DateInput, DatePicker, getPalette, IconButton, Icons, Modal, ModalStatus, MultiSelectInput, NormaChatMessageBalloon, NormaProvider, Paper, ProductCard, ProgressBar, RadioGroup, RangerSlider, Select, SelectInput, ServiceCard, Table, Tabs, Tag, Text, TextField, TextInput, themes, TimeLine, TimeLineData, Title, UncontrolledTable, UncontrolledTabs, useTheme };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
import { Accordion } from './components/Accordion';
|
|
2
|
+
import Box from './components/Box';
|
|
3
|
+
import Breadcrumb from './components/Breadcrumb';
|
|
2
4
|
import { Button } from './components/Button';
|
|
3
5
|
import { Card } from './components/Card';
|
|
6
|
+
import { ChatMessage } from './components/ChatMessage';
|
|
7
|
+
import { ChatMessageBalloon } from './components/ChatMessageBalloon/ChatMessageBalloon';
|
|
4
8
|
import { CheckBox } from './components/CheckBox';
|
|
9
|
+
import DateInput from './components/DateInput';
|
|
10
|
+
import { DatePicker } from './components/DatePicker';
|
|
5
11
|
import { IconButton } from './components/IconButton';
|
|
6
12
|
import { Icons } from './components/Icons';
|
|
7
13
|
import { Modal } from './components/Modal';
|
|
14
|
+
import MultiSelectInput from './components/MultiSelectInput';
|
|
15
|
+
import { NormaChatMessageBalloon } from './components/NormaChatMessageBalloon';
|
|
8
16
|
import { Paper } from './components/Paper';
|
|
17
|
+
import { ProductCard } from './components/ProductCard/ProductCard';
|
|
9
18
|
import { ProgressBar } from './components/ProgressBar';
|
|
10
19
|
import { RadioGroup } from './components/RadioGroup';
|
|
11
20
|
import { RangerSlider } from './components/RangerSlider';
|
|
12
21
|
import { Select } from './components/Select';
|
|
22
|
+
import SelectInput from './components/SelectInput';
|
|
23
|
+
import { ServiceCard } from './components/ServiceCard/ServiceCard';
|
|
24
|
+
import { ModalStatus } from './components/StatusModal/StatusModal';
|
|
25
|
+
import Table from './components/Table';
|
|
13
26
|
import { Tabs } from './components/Tabs';
|
|
14
27
|
import { Tag } from './components/Tag';
|
|
15
28
|
import { TextField } from './components/TextField';
|
|
16
|
-
import { DatePicker } from './components/DatePicker';
|
|
17
|
-
import { ChatMessage, ChatMessageBalloon, NormaChatMessageBalloon, ProductCard, ServiceCard } from './components';
|
|
18
|
-
import { NormaProvider } from './providers/NormaProvider';
|
|
19
|
-
import { themes, getPalette } from './helpers';
|
|
20
|
-
import DateInput from './components/DateInput';
|
|
21
|
-
import Box from './components/Box';
|
|
22
|
-
import Breadcrumb from './components/Breadcrumb';
|
|
23
|
-
import SelectInput from './components/SelectInput';
|
|
24
|
-
import MultiSelectInput from './components/MultiSelectInput';
|
|
25
|
-
import { Title, Text } from './components/Typography';
|
|
26
29
|
import TextInput from './components/TextInput';
|
|
27
|
-
import
|
|
30
|
+
import { TimeLine } from './components/TimeLine/TimeLine';
|
|
31
|
+
import { Text, Title } from './components/Typography';
|
|
28
32
|
import UncontrolledTable from './components/UncontrolledTable/UncontrolledTable';
|
|
29
33
|
import UncontrolledTabs from './components/UncontrolledTabs/UncontrolledTabs';
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
34
|
+
import { getPalette, themes } from './helpers';
|
|
35
|
+
import { NormaProvider } from './providers/NormaProvider';
|
|
32
36
|
import { breakpoints } from './utils/styledBreakpoints';
|
|
33
37
|
import { useTheme } from '@mui/material';
|
|
34
|
-
export { Accordion, Button, Card, ChatMessage, ChatMessageBalloon, CheckBox, DatePicker, getPalette, IconButton, Icons, Modal,
|
|
38
|
+
export { Accordion, Box, Breadcrumb, breakpoints, Button, Card, ChatMessage, ChatMessageBalloon, CheckBox, DateInput, DatePicker, getPalette, IconButton, Icons, Modal, ModalStatus, MultiSelectInput, NormaChatMessageBalloon, NormaProvider, Paper, ProductCard, ProgressBar, RadioGroup, RangerSlider, Select, SelectInput, ServiceCard, Table, Tabs, Tag, Text, TextField, TextInput, themes, TimeLine, Title, UncontrolledTable, UncontrolledTabs, useTheme };
|
|
35
39
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "norma-library",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.987",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.",
|
|
6
6
|
"scripts": {
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"path": "^0.12.7",
|
|
67
67
|
"postcss": "^8.4.29",
|
|
68
68
|
"postcss-prettify": "^0.3.4",
|
|
69
|
-
"react": "^19
|
|
70
|
-
"react-dom": "^19
|
|
69
|
+
"react": "^16 || ^17 || ^18 || ^19",
|
|
70
|
+
"react-dom": "^16 || ^17 || ^18 || ^19",
|
|
71
71
|
"rimraf": "^5.0.5",
|
|
72
72
|
"storybook": "^8.5.6",
|
|
73
73
|
"storybook-dark-mode": "^4.0.2",
|
package/src/components/Card.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ColorVariant } from '@/types';
|
|
2
2
|
import { Card as MuiCard } from '@mui/material';
|
|
3
|
-
import
|
|
4
|
-
import { palette } from '../helpers';
|
|
3
|
+
import React from 'react';
|
|
5
4
|
import styled from 'styled-components';
|
|
6
|
-
import {
|
|
5
|
+
import { palette } from '../helpers';
|
|
6
|
+
import { CardBaseProps } from '../interfaces';
|
|
7
7
|
|
|
8
8
|
const colorMap: Record<ColorVariant, string> = {
|
|
9
9
|
inherit: palette.inherit,
|
|
@@ -1,37 +1,19 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { IconButton as MuiIconButton } from '@mui/material';
|
|
2
|
+
import { styled, ThemeOptions, useTheme } from '@mui/material/styles';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import { IconButtonBaseProps } from '../interfaces';
|
|
4
|
-
import { palette } from '../helpers';
|
|
5
|
-
import { styled } from '@mui/material/styles';
|
|
6
|
-
import { ButtonVariant, ColorVariant } from '@/types';
|
|
7
|
-
|
|
8
|
-
const colorMap: Record<ColorVariant, string> = {
|
|
9
|
-
inherit: palette.inherit,
|
|
10
|
-
primary: palette.primary,
|
|
11
|
-
secondary: palette.secondary,
|
|
12
|
-
error: palette.error,
|
|
13
|
-
warning: palette.warning,
|
|
14
|
-
info: palette.info,
|
|
15
|
-
success: palette.success,
|
|
16
|
-
};
|
|
17
5
|
|
|
18
6
|
const IconButtonStyled = styled(MuiIconButton)<{
|
|
19
|
-
|
|
20
|
-
color: ColorVariant;
|
|
21
|
-
variant: ButtonVariant;
|
|
7
|
+
theme: ThemeOptions;
|
|
22
8
|
cursor: string;
|
|
23
|
-
}>(({
|
|
24
|
-
borderRadius:
|
|
25
|
-
border:
|
|
26
|
-
backgroundColor:
|
|
9
|
+
}>(({ theme, cursor }) => ({
|
|
10
|
+
borderRadius: '50%',
|
|
11
|
+
border: `1px solid ${theme.palette.primary.main}`,
|
|
12
|
+
backgroundColor: theme.palette.primary.main,
|
|
27
13
|
cursor: cursor,
|
|
28
14
|
}));
|
|
29
15
|
|
|
30
|
-
export const IconButton = ({
|
|
31
|
-
|
|
32
|
-
return
|
|
33
|
-
<IconButtonStyled circle={`${circle}`} color="primary" variant="text" cursor="default" {...props}>
|
|
34
|
-
{children}
|
|
35
|
-
</IconButtonStyled>
|
|
36
|
-
);
|
|
16
|
+
export const IconButton = ({ children, cursor = 'pointer', ...props }: IconButtonBaseProps) => {
|
|
17
|
+
const muiTheme = useTheme();
|
|
18
|
+
return <IconButtonStyled theme={muiTheme} cursor={cursor} {...props}>{children}</IconButtonStyled>;
|
|
37
19
|
};
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box, Slider as MuiSlider, Typography } from '@mui/material';
|
|
3
|
-
import { palette } from '../helpers';
|
|
4
3
|
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { ColorVariant } from '@/types';
|
|
6
4
|
import { RangerSliderBaseProps } from '@/interfaces/RangerSlider';
|
|
7
5
|
|
|
8
|
-
const
|
|
9
|
-
inherit: palette.inherit,
|
|
10
|
-
primary: palette.primary,
|
|
11
|
-
secondary: palette.secondary,
|
|
12
|
-
error: palette.error,
|
|
13
|
-
warning: palette.warning,
|
|
14
|
-
info: palette.info,
|
|
15
|
-
success: palette.success,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const RangerSliderStyled = styled(MuiSlider)(() => ({
|
|
6
|
+
const RangerSliderStyled = styled(MuiSlider)(({ theme }) => ({
|
|
19
7
|
height: 8,
|
|
20
|
-
|
|
8
|
+
color: theme.palette.primary.main,
|
|
21
9
|
'& .MuiSlider-track': {
|
|
22
10
|
border: 'none',
|
|
23
11
|
},
|
|
@@ -25,7 +13,7 @@ const RangerSliderStyled = styled(MuiSlider)(() => ({
|
|
|
25
13
|
height: 18,
|
|
26
14
|
width: 18,
|
|
27
15
|
backgroundColor: '#FFF',
|
|
28
|
-
border: `2px solid ${
|
|
16
|
+
border: `2px solid ${theme.palette.primary.main}`,
|
|
29
17
|
'&:focus, &:hover, &.Mui-active, &.Mui-focusVisible': {
|
|
30
18
|
boxShadow: 'inherit',
|
|
31
19
|
},
|
|
@@ -34,7 +22,7 @@ const RangerSliderStyled = styled(MuiSlider)(() => ({
|
|
|
34
22
|
height: '8px',
|
|
35
23
|
position: 'absolute',
|
|
36
24
|
display: 'block',
|
|
37
|
-
background:
|
|
25
|
+
background: theme.palette.primary.main,
|
|
38
26
|
},
|
|
39
27
|
},
|
|
40
28
|
'& .MuiSlider-valueLabel': {
|
|
@@ -43,7 +31,7 @@ const RangerSliderStyled = styled(MuiSlider)(() => ({
|
|
|
43
31
|
top: 48,
|
|
44
32
|
position: 'absolute',
|
|
45
33
|
transition: 'none',
|
|
46
|
-
color:
|
|
34
|
+
color: theme.palette.primary.main,
|
|
47
35
|
'&:before': {
|
|
48
36
|
bottom: 'inherit',
|
|
49
37
|
top: '-8px',
|
package/src/components/Tabs.tsx
CHANGED
|
@@ -1,29 +1,17 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Box, Tabs as MuiTabs, Tab } from '@mui/material';
|
|
2
|
+
import { styled, ThemeOptions, useTheme } from '@mui/material/styles';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import { TabPanelProps, TabsBaseProps } from '../interfaces';
|
|
4
|
-
import { palette } from '../helpers';
|
|
5
|
-
import { styled } from '@mui/material/styles';
|
|
6
|
-
import { ColorVariant } from '@/types';
|
|
7
|
-
|
|
8
|
-
const colorMap: Record<ColorVariant, string> = {
|
|
9
|
-
inherit: palette.inherit,
|
|
10
|
-
primary: palette.primary,
|
|
11
|
-
secondary: palette.secondary,
|
|
12
|
-
error: palette.error,
|
|
13
|
-
warning: palette.warning,
|
|
14
|
-
info: palette.info,
|
|
15
|
-
success: palette.success,
|
|
16
|
-
};
|
|
17
5
|
|
|
18
6
|
const TabsStyled = styled(MuiTabs)<{
|
|
19
|
-
|
|
20
|
-
}>(({
|
|
7
|
+
theme: ThemeOptions;
|
|
8
|
+
}>(({ theme }) => ({
|
|
21
9
|
borderBottom: '1px solid #e8e8e8',
|
|
22
10
|
'& .Mui-selected': {
|
|
23
|
-
color:
|
|
11
|
+
color: theme.palette.primary.main,
|
|
24
12
|
},
|
|
25
13
|
'& .MuiTabs-indicator': {
|
|
26
|
-
backgroundColor:
|
|
14
|
+
backgroundColor: theme.palette.primary.main,
|
|
27
15
|
},
|
|
28
16
|
'& .MuiButtonBase-root': {
|
|
29
17
|
textTransform: 'none',
|
|
@@ -32,10 +20,9 @@ const TabsStyled = styled(MuiTabs)<{
|
|
|
32
20
|
|
|
33
21
|
interface StyledTabProps {
|
|
34
22
|
label: string;
|
|
35
|
-
color: ColorVariant;
|
|
36
23
|
}
|
|
37
24
|
|
|
38
|
-
const TabStyled = styled((props: StyledTabProps) => <Tab disableRipple {...props} />)(({ theme
|
|
25
|
+
const TabStyled = styled((props: StyledTabProps) => <Tab disableRipple {...props} />)(({ theme }) => ({
|
|
39
26
|
textTransform: 'none',
|
|
40
27
|
fontWeight: theme.typography.fontWeightRegular,
|
|
41
28
|
fontSize: theme.typography.pxToRem(15),
|
|
@@ -45,7 +32,7 @@ const TabStyled = styled((props: StyledTabProps) => <Tab disableRipple {...props
|
|
|
45
32
|
top: '5px',
|
|
46
33
|
minWidth: '60px',
|
|
47
34
|
'&.Mui-selected': {
|
|
48
|
-
color:
|
|
35
|
+
color: theme.palette.primary.main,
|
|
49
36
|
},
|
|
50
37
|
'&.Mui-focusVisible': {
|
|
51
38
|
backgroundColor: 'rgba(100, 95, 228, 0.32)',
|
|
@@ -80,6 +67,7 @@ function a11yProps(index: number) {
|
|
|
80
67
|
}
|
|
81
68
|
|
|
82
69
|
export const Tabs = ({ data = [], color = 'primary', onChange, ...props }: TabsBaseProps) => {
|
|
70
|
+
const muiTheme = useTheme()
|
|
83
71
|
const [value, setValue] = React.useState(0);
|
|
84
72
|
|
|
85
73
|
const handleChange = (event: React.SyntheticEvent, newValue: number) => {
|
|
@@ -90,8 +78,8 @@ export const Tabs = ({ data = [], color = 'primary', onChange, ...props }: TabsB
|
|
|
90
78
|
return (
|
|
91
79
|
<Box sx={{ width: '100%' }}>
|
|
92
80
|
<Box>
|
|
93
|
-
<TabsStyled value={value}
|
|
94
|
-
{data && data.map((item, key) => <TabStyled label={item.label}
|
|
81
|
+
<TabsStyled value={value} onChange={handleChange} aria-label="basic tabs example" {...props} theme={muiTheme}>
|
|
82
|
+
{data && data.map((item, key) => <TabStyled label={item.label} {...a11yProps(key)} />)}
|
|
95
83
|
</TabsStyled>
|
|
96
84
|
</Box>
|
|
97
85
|
{data &&
|
package/src/components/Tag.tsx
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { Typography } from '@mui/material';
|
|
4
3
|
import {
|
|
5
4
|
Timeline,
|
|
6
|
-
TimelineItem,
|
|
7
|
-
TimelineSeparator,
|
|
8
5
|
TimelineConnector,
|
|
9
6
|
TimelineContent,
|
|
10
7
|
TimelineDot,
|
|
8
|
+
TimelineItem,
|
|
11
9
|
timelineItemClasses,
|
|
10
|
+
TimelineSeparator,
|
|
12
11
|
} from '@mui/lab';
|
|
12
|
+
import { Typography } from '@mui/material';
|
|
13
13
|
|
|
14
|
-
import {
|
|
15
|
-
import { ColorVariant } from '@/types';
|
|
14
|
+
import { ThemeOptions, useTheme } from '@mui/material/styles';
|
|
16
15
|
import styled from 'styled-components';
|
|
17
16
|
|
|
18
17
|
export interface TimeLineData {
|
|
@@ -23,22 +22,12 @@ export interface TimeLineData {
|
|
|
23
22
|
|
|
24
23
|
interface TimeLineProps {
|
|
25
24
|
data: TimeLineData[];
|
|
26
|
-
theme?:
|
|
27
|
-
color?: string;
|
|
25
|
+
theme?: ThemeOptions;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
const
|
|
31
|
-
inherit: palette.inherit,
|
|
32
|
-
primary: '#DB6619',
|
|
33
|
-
secondary: palette.secondary,
|
|
34
|
-
error: palette.error,
|
|
35
|
-
warning: palette.warning,
|
|
36
|
-
info: palette.info,
|
|
37
|
-
success: palette.success,
|
|
38
|
-
};
|
|
28
|
+
export const TimeLine: React.FC<TimeLineProps> = ({ data }) => {
|
|
39
29
|
|
|
40
|
-
|
|
41
|
-
const _mainColor = color || colorMap[theme];
|
|
30
|
+
const muiTheme = useTheme();
|
|
42
31
|
|
|
43
32
|
const NormaTimeLine = styled(Timeline)`
|
|
44
33
|
.${timelineItemClasses.root} {
|
|
@@ -55,7 +44,7 @@ export const TimeLine: React.FC<TimeLineProps> = ({ data, theme = 'primary', col
|
|
|
55
44
|
content: '';
|
|
56
45
|
width: 70%;
|
|
57
46
|
height: 70%;
|
|
58
|
-
background: ${
|
|
47
|
+
background: ${muiTheme.palette.primary.main};
|
|
59
48
|
position: absolute;
|
|
60
49
|
border-radius: 50%;
|
|
61
50
|
top: 50%;
|
|
@@ -72,7 +61,7 @@ export const TimeLine: React.FC<TimeLineProps> = ({ data, theme = 'primary', col
|
|
|
72
61
|
boxShadow: 'none',
|
|
73
62
|
padding: '6px',
|
|
74
63
|
margin: '0',
|
|
75
|
-
border: `3px solid ${
|
|
64
|
+
border: `3px solid ${muiTheme.palette.primary.main}`,
|
|
76
65
|
};
|
|
77
66
|
|
|
78
67
|
const lastStyle = {
|
|
@@ -92,7 +81,7 @@ export const TimeLine: React.FC<TimeLineProps> = ({ data, theme = 'primary', col
|
|
|
92
81
|
<TimelineItem key={key} sx={{ minHeight: 'auto' }}>
|
|
93
82
|
<TimelineSeparator>
|
|
94
83
|
<TimelineDot sx={_getDotStyle(!last)} />
|
|
95
|
-
{last && <TimelineConnector sx={{ bgcolor:
|
|
84
|
+
{last && <TimelineConnector sx={{ bgcolor: muiTheme.palette.primary.main, width: '5px' }} />}
|
|
96
85
|
</TimelineSeparator>
|
|
97
86
|
<TimelineContent sx={{ py: 0, pl: 2, pb: '35px' }}>
|
|
98
87
|
<Typography sx={{ m: 'auto 0' }} className="TimelineContent__Date" variant="body1">
|
|
@@ -1,35 +1,19 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { styled } from '@mui/material/styles';
|
|
3
|
-
import
|
|
2
|
+
import React from 'react';
|
|
4
3
|
|
|
5
4
|
import { Tab, Tabs } from '@mui/material';
|
|
6
|
-
import { ColorVariant } from '@/types';
|
|
7
|
-
import { palette } from '../../helpers';
|
|
8
|
-
|
|
9
|
-
const colorMap: Record<ColorVariant, string> = {
|
|
10
|
-
inherit: palette.inherit,
|
|
11
|
-
primary: palette.primary,
|
|
12
|
-
secondary: palette.secondary,
|
|
13
|
-
error: palette.error,
|
|
14
|
-
warning: palette.warning,
|
|
15
|
-
info: palette.info,
|
|
16
|
-
success: palette.success,
|
|
17
|
-
};
|
|
18
5
|
|
|
19
6
|
interface StyledTabProps {
|
|
20
7
|
label: string;
|
|
21
|
-
color: ColorVariant;
|
|
22
8
|
}
|
|
23
9
|
|
|
24
|
-
export const NormaTabs
|
|
25
|
-
|
|
26
|
-
}>(({ color }) => ({
|
|
27
|
-
borderBottom: '1px solid #e8e8e8',
|
|
10
|
+
export const NormaTabs = styled(Tabs)(({ theme }) => ({
|
|
11
|
+
borderBottom: `1px solid ${theme.palette.background.paper}`,
|
|
28
12
|
'& .Mui-selected': {
|
|
29
|
-
color:
|
|
13
|
+
color: theme.palette.primary.main,
|
|
30
14
|
},
|
|
31
15
|
'& .MuiTabs-indicator': {
|
|
32
|
-
backgroundColor:
|
|
16
|
+
backgroundColor: theme.palette.primary.main,
|
|
33
17
|
},
|
|
34
18
|
'& .MuiButtonBase-root': {
|
|
35
19
|
textTransform: 'none',
|
|
@@ -38,7 +22,7 @@ export const NormaTabs: React.ComponentType<TabsProps & { color: ColorVariant }>
|
|
|
38
22
|
|
|
39
23
|
export const NormaTab: React.ComponentType<StyledTabProps> = styled((props: StyledTabProps) => (
|
|
40
24
|
<Tab disableRipple {...props} />
|
|
41
|
-
))(({ theme
|
|
25
|
+
))(({ theme }) => ({
|
|
42
26
|
textTransform: 'none',
|
|
43
27
|
fontWeight: theme.typography.fontWeightRegular,
|
|
44
28
|
fontSize: theme.typography.pxToRem(15),
|
|
@@ -48,10 +32,10 @@ export const NormaTab: React.ComponentType<StyledTabProps> = styled((props: Styl
|
|
|
48
32
|
top: '5px',
|
|
49
33
|
minWidth: '60px',
|
|
50
34
|
'&.Mui-selected': {
|
|
51
|
-
color:
|
|
35
|
+
color: theme.palette.primary.main,
|
|
52
36
|
},
|
|
53
37
|
'&.Mui-focusVisible': {
|
|
54
|
-
backgroundColor:
|
|
38
|
+
backgroundColor: theme.palette.background.default,
|
|
55
39
|
},
|
|
56
40
|
}));
|
|
57
41
|
|
package/src/helpers/colors.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { createTheme, PaletteOptions } from '@mui/material/styles';
|
|
1
|
+
import { createTheme, PaletteOptions, ThemeOptions } from '@mui/material/styles';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
|
|
4
|
+
export const getPalette = (customPalette?: ThemeOptions) => {
|
|
5
|
+
const defaultPalette = {
|
|
5
6
|
primary: '#fc7f29',
|
|
6
7
|
primaryLight: '#FFDB9F',
|
|
7
8
|
primaryMedium: '#FFA84C',
|
|
@@ -37,6 +38,45 @@ export const getPalette = () => {
|
|
|
37
38
|
helperMedium: '#BF82D6',
|
|
38
39
|
helperDark: '#250D46',
|
|
39
40
|
};
|
|
41
|
+
|
|
42
|
+
const customPaletteAdapted = {
|
|
43
|
+
primary: (customPalette?.palette?.primary as any)?.main || defaultPalette.primary,
|
|
44
|
+
primaryLight: (customPalette?.palette?.primary as any)?.light || defaultPalette.primaryLight,
|
|
45
|
+
primaryMedium: (customPalette?.palette?.primary as any)?.['500'] || defaultPalette.primaryMedium,
|
|
46
|
+
primaryDark: (customPalette?.palette?.primary as any)?.dark || defaultPalette.primaryDark,
|
|
47
|
+
inherit: (customPalette?.palette?.info as any)?.main || defaultPalette.inherit,
|
|
48
|
+
secondary: (customPalette?.palette?.secondary as any)?.main || defaultPalette.secondary,
|
|
49
|
+
error: (customPalette?.palette?.error as any)?.main || defaultPalette.error,
|
|
50
|
+
warning: (customPalette?.palette?.warning as any)?.main || defaultPalette.warning,
|
|
51
|
+
info: (customPalette?.palette?.info as any)?.main || defaultPalette.info,
|
|
52
|
+
success: (customPalette?.palette?.success as any)?.main || defaultPalette.success,
|
|
53
|
+
white: defaultPalette.white,
|
|
54
|
+
black: (customPalette?.palette?.text as any)?.primary || defaultPalette.black,
|
|
55
|
+
helper: defaultPalette.helper,
|
|
56
|
+
secondaryLight: (customPalette?.palette?.secondary as any)?.light || defaultPalette.secondaryLight,
|
|
57
|
+
secondaryMedium: (customPalette?.palette?.secondary as any)?.['500'] || defaultPalette.secondaryMedium,
|
|
58
|
+
secondaryDark: (customPalette?.palette?.secondary as any)?.dark || defaultPalette.secondaryDark,
|
|
59
|
+
inheritLight: (customPalette?.palette?.info as any)?.light || defaultPalette.inheritLight,
|
|
60
|
+
inheritMedium: (customPalette?.palette?.info as any)?.['500'] || defaultPalette.inheritMedium,
|
|
61
|
+
inheritDark: (customPalette?.palette?.info as any)?.dark || defaultPalette.inheritDark,
|
|
62
|
+
whiteLight: defaultPalette.whiteLight,
|
|
63
|
+
whiteMedium: defaultPalette.whiteMedium,
|
|
64
|
+
whiteDark: defaultPalette.whiteDark,
|
|
65
|
+
successLight: (customPalette?.palette?.success as any)?.light || defaultPalette.successLight,
|
|
66
|
+
successMedium: (customPalette?.palette?.success as any)?.['500'] || defaultPalette.successMedium,
|
|
67
|
+
successDark: (customPalette?.palette?.success as any)?.dark || defaultPalette.successDark,
|
|
68
|
+
errorLight: (customPalette?.palette?.error as any)?.light || defaultPalette.errorLight,
|
|
69
|
+
errorMedium: (customPalette?.palette?.error as any)?.['500'] || defaultPalette.errorMedium,
|
|
70
|
+
errorDark: (customPalette?.palette?.error as any)?.dark || defaultPalette.errorDark,
|
|
71
|
+
warningLight: (customPalette?.palette?.warning as any)?.light || defaultPalette.warningLight,
|
|
72
|
+
warningMedium: (customPalette?.palette?.warning as any)?.['500'] || defaultPalette.warningMedium,
|
|
73
|
+
warningDark: (customPalette?.palette?.warning as any)?.dark || defaultPalette.warningDark,
|
|
74
|
+
helperLight: defaultPalette.helperLight,
|
|
75
|
+
helperMedium: defaultPalette.helperMedium,
|
|
76
|
+
helperDark: defaultPalette.helperDark,
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return customPalette ? customPaletteAdapted : defaultPalette;
|
|
40
80
|
};
|
|
41
81
|
|
|
42
82
|
export const palette = getPalette();
|
|
@@ -260,4 +300,5 @@ const lightenRGB = (rgbString: string, amount = 20) => {
|
|
|
260
300
|
return null;
|
|
261
301
|
};
|
|
262
302
|
|
|
263
|
-
export {
|
|
303
|
+
export { extractRGB, getColor, lightenRGB };
|
|
304
|
+
|
package/src/index.ts
CHANGED
|
@@ -1,77 +1,59 @@
|
|
|
1
1
|
import { Accordion } from './components/Accordion';
|
|
2
|
+
import Box from './components/Box';
|
|
3
|
+
import Breadcrumb from './components/Breadcrumb';
|
|
2
4
|
import { Button } from './components/Button';
|
|
3
5
|
import { Card } from './components/Card';
|
|
6
|
+
import { ChatMessage } from './components/ChatMessage';
|
|
7
|
+
import { ChatMessageBalloon } from './components/ChatMessageBalloon/ChatMessageBalloon';
|
|
4
8
|
import { CheckBox } from './components/CheckBox';
|
|
9
|
+
import DateInput from './components/DateInput';
|
|
10
|
+
import { DatePicker } from './components/DatePicker';
|
|
5
11
|
import { IconButton } from './components/IconButton';
|
|
6
12
|
import { Icons } from './components/Icons';
|
|
7
13
|
import { Modal } from './components/Modal';
|
|
14
|
+
import MultiSelectInput from './components/MultiSelectInput';
|
|
15
|
+
import { NormaChatMessageBalloon } from './components/NormaChatMessageBalloon';
|
|
8
16
|
import { Paper } from './components/Paper';
|
|
17
|
+
import { ProductCard } from './components/ProductCard/ProductCard';
|
|
9
18
|
import { ProgressBar } from './components/ProgressBar';
|
|
10
19
|
import { RadioGroup } from './components/RadioGroup';
|
|
11
20
|
import { RangerSlider } from './components/RangerSlider';
|
|
12
21
|
import { Select } from './components/Select';
|
|
22
|
+
import SelectInput from './components/SelectInput';
|
|
23
|
+
import { ServiceCard } from './components/ServiceCard/ServiceCard';
|
|
24
|
+
import { ModalStatus } from './components/StatusModal/StatusModal';
|
|
25
|
+
import Table from './components/Table';
|
|
13
26
|
import { Tabs } from './components/Tabs';
|
|
14
27
|
import { Tag } from './components/Tag';
|
|
15
28
|
import { TextField } from './components/TextField';
|
|
16
|
-
import { DatePicker } from './components/DatePicker';
|
|
17
|
-
import { ChatMessage, ChatMessageBalloon, NormaChatMessageBalloon, ProductCard, ServiceCard } from './components';
|
|
18
|
-
import { NormaProvider } from './providers/NormaProvider';
|
|
19
|
-
import { themes, getPalette } from './helpers';
|
|
20
|
-
import DateInput from './components/DateInput';
|
|
21
|
-
import Box from './components/Box';
|
|
22
|
-
import Breadcrumb from './components/Breadcrumb';
|
|
23
|
-
import SelectInput from './components/SelectInput';
|
|
24
|
-
import MultiSelectInput from './components/MultiSelectInput';
|
|
25
|
-
import { Title, Text } from './components/Typography';
|
|
26
29
|
import TextInput from './components/TextInput';
|
|
27
|
-
import
|
|
30
|
+
import { TimeLine, type TimeLineData } from './components/TimeLine/TimeLine';
|
|
31
|
+
import { Text, Title } from './components/Typography';
|
|
28
32
|
import UncontrolledTable from './components/UncontrolledTable/UncontrolledTable';
|
|
29
33
|
import UncontrolledTabs from './components/UncontrolledTabs/UncontrolledTabs';
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
34
|
+
import { getPalette, themes } from './helpers';
|
|
35
|
+
import { NormaProvider } from './providers/NormaProvider';
|
|
32
36
|
import { breakpoints } from './utils/styledBreakpoints';
|
|
33
37
|
|
|
34
38
|
import { useTheme } from '@mui/material';
|
|
35
39
|
|
|
36
40
|
export {
|
|
37
|
-
Accordion,
|
|
38
|
-
Button,
|
|
41
|
+
Accordion, Box,
|
|
42
|
+
Breadcrumb, breakpoints, Button,
|
|
39
43
|
Card,
|
|
40
44
|
ChatMessage,
|
|
41
45
|
ChatMessageBalloon,
|
|
42
|
-
CheckBox,
|
|
43
|
-
DatePicker,
|
|
46
|
+
CheckBox, DateInput, DatePicker,
|
|
44
47
|
getPalette,
|
|
45
48
|
IconButton,
|
|
46
49
|
Icons,
|
|
47
|
-
Modal,
|
|
48
|
-
Paper,
|
|
49
|
-
ProgressBar,
|
|
50
|
-
ProductCard,
|
|
51
|
-
RadioGroup,
|
|
50
|
+
Modal, ModalStatus, MultiSelectInput,
|
|
51
|
+
NormaChatMessageBalloon, NormaProvider, Paper, ProductCard, ProgressBar, RadioGroup,
|
|
52
52
|
RangerSlider,
|
|
53
|
-
Select,
|
|
54
|
-
Tabs,
|
|
55
|
-
Tag,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
themes,
|
|
59
|
-
DateInput,
|
|
60
|
-
Box,
|
|
61
|
-
Breadcrumb,
|
|
62
|
-
SelectInput,
|
|
63
|
-
ServiceCard,
|
|
64
|
-
MultiSelectInput,
|
|
65
|
-
NormaChatMessageBalloon,
|
|
66
|
-
Text,
|
|
67
|
-
Title,
|
|
68
|
-
TextInput,
|
|
69
|
-
Table,
|
|
70
|
-
UncontrolledTable,
|
|
71
|
-
UncontrolledTabs,
|
|
72
|
-
ModalStatus,
|
|
73
|
-
breakpoints,
|
|
74
|
-
useTheme,
|
|
75
|
-
TimeLine,
|
|
76
|
-
TimeLineData,
|
|
53
|
+
Select, SelectInput,
|
|
54
|
+
ServiceCard, Table, Tabs,
|
|
55
|
+
Tag, Text, TextField, TextInput, themes, TimeLine,
|
|
56
|
+
TimeLineData, Title, UncontrolledTable,
|
|
57
|
+
UncontrolledTabs, useTheme
|
|
77
58
|
};
|
|
59
|
+
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ThemeProvider } from '@mui/material';
|
|
1
|
+
import { createTheme, ThemeProvider } from '@mui/material';
|
|
3
2
|
import { ThemeProviderProps } from "@mui/material/styles/ThemeProvider";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { newOlosPalette } from '../helpers';
|
|
4
5
|
|
|
5
|
-
export const NormaProvider = (props:ThemeProviderProps) => {
|
|
6
|
+
export const NormaProvider = (props: ThemeProviderProps) => {
|
|
6
7
|
const { theme, children } = props;
|
|
7
|
-
|
|
8
|
+
|
|
9
|
+
const newOlosTheme = createTheme({
|
|
10
|
+
palette: newOlosPalette,
|
|
11
|
+
})
|
|
12
|
+
|
|
8
13
|
return (
|
|
9
|
-
<ThemeProvider theme={theme}>
|
|
14
|
+
<ThemeProvider theme={theme ? theme : newOlosTheme}>
|
|
10
15
|
{children}
|
|
11
16
|
</ThemeProvider>
|
|
12
17
|
);
|