norma-library 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/button.d.ts +3 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/types.d.ts +18 -0
- package/dist/components/card/card-header.d.ts +3 -0
- package/dist/components/card/card.d.ts +3 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/styles.d.ts +811 -0
- package/dist/components/card/types.d.ts +12 -0
- package/dist/components/checkbox/checkbox.d.ts +3 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/types.d.ts +23 -0
- package/dist/components/icon/default.d.ts +210 -0
- package/dist/components/icon/defaultIcon.d.ts +5 -0
- package/dist/components/icon/icons-ia.d.ts +71 -0
- package/dist/components/icon/index.d.ts +234 -0
- package/dist/components/icon/norma.d.ts +30 -0
- package/dist/components/icon/normaIcon.d.ts +13 -0
- package/dist/components/icon/styles.d.ts +481 -0
- package/dist/components/icon/svg.d.ts +6 -0
- package/dist/components/icon/types.d.ts +12 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/modal.d.ts +3 -0
- package/dist/components/modal/modalFooter.d.ts +3 -0
- package/dist/components/modal/modalHeader.d.ts +3 -0
- package/dist/components/modal/styles.d.ts +540 -0
- package/dist/components/modal/types.d.ts +27 -0
- package/dist/components/progress-bar/index.d.ts +1 -0
- package/dist/components/progress-bar/progress-bar.d.ts +7 -0
- package/dist/components/progress-bar/styles.d.ts +272 -0
- package/dist/components/progress-bar/types.d.ts +22 -0
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/radio.d.ts +3 -0
- package/dist/components/radio/types.d.ts +16 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/tag.d.ts +3 -0
- package/dist/components/tag/types.d.ts +25 -0
- package/dist/components/textfield/index.d.ts +1 -0
- package/dist/components/textfield/textfield.d.ts +3 -0
- package/dist/components/textfield/types.d.ts +42 -0
- package/dist/helpers/clients.d.ts +5 -0
- package/dist/helpers/colors.d.ts +174 -0
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/sizes.d.ts +6 -0
- package/dist/helpers/variants.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/norma-library.cjs.development.js +1286 -0
- package/dist/norma-library.cjs.development.js.map +1 -0
- package/dist/norma-library.cjs.production.min.js +2 -0
- package/dist/norma-library.cjs.production.min.js.map +1 -0
- package/dist/norma-library.esm.js +1274 -0
- package/dist/norma-library.esm.js.map +1 -0
- package/package.json +1 -1
- package/src/components/button/button.stories.tsx +44 -0
- package/src/components/button/button.tsx +18 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button/types.ts +48 -0
- package/src/components/card/card-header.tsx +8 -0
- package/src/components/card/card.stories.tsx +28 -0
- package/src/components/card/card.tsx +13 -0
- package/src/components/card/index.ts +1 -0
- package/src/components/card/styles.tsx +29 -0
- package/src/components/card/types.ts +14 -0
- package/src/components/checkbox/checkbox.stories.tsx +66 -0
- package/src/components/checkbox/checkbox.tsx +13 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/checkbox/types.ts +30 -0
- package/src/components/icon/default.tsx +1459 -0
- package/src/components/icon/defaultIcon.tsx +82 -0
- package/src/components/icon/icon.stories.tsx +44 -0
- package/src/components/icon/icons-ia.tsx +107 -0
- package/src/components/icon/index.ts +11 -0
- package/src/components/icon/norma.tsx +523 -0
- package/src/components/icon/normaIcon.tsx +94 -0
- package/src/components/icon/styles.ts +11 -0
- package/src/components/icon/svg.tsx +24 -0
- package/src/components/icon/types.ts +14 -0
- package/src/components/index.ts +8 -0
- package/src/components/modal/index.ts +1 -0
- package/src/components/modal/modal.stories.tsx +55 -0
- package/src/components/modal/modal.tsx +42 -0
- package/src/components/modal/modalFooter.tsx +32 -0
- package/src/components/modal/modalHeader.tsx +46 -0
- package/src/components/modal/styles.tsx +13 -0
- package/src/components/modal/types.ts +47 -0
- package/src/components/progress-bar/index.ts +1 -0
- package/src/components/progress-bar/progress-bar.stories.tsx +68 -0
- package/src/components/progress-bar/progress-bar.tsx +38 -0
- package/src/components/progress-bar/styles.tsx +27 -0
- package/src/components/progress-bar/types.ts +35 -0
- package/src/components/radio/index.ts +1 -0
- package/src/components/radio/radio.stories.tsx +150 -0
- package/src/components/radio/radio.tsx +13 -0
- package/src/components/radio/types.ts +27 -0
- package/src/components/tag/index.ts +1 -0
- package/src/components/tag/tag.stories.tsx +80 -0
- package/src/components/tag/tag.tsx +13 -0
- package/src/components/tag/types.ts +47 -0
- package/src/components/textfield/index.ts +1 -0
- package/src/components/textfield/textfield.stories.tsx +376 -0
- package/src/components/textfield/textfield.tsx +23 -0
- package/src/components/textfield/types.ts +93 -0
- package/src/helpers/clients.ts +6 -0
- package/src/helpers/colors.ts +209 -0
- package/src/helpers/index.ts +3 -0
- package/src/helpers/sizes.ts +26 -0
- package/src/helpers/variants.ts +3 -0
- package/src/index.tsx +1 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { createTheme } from '@mui/material/styles';
|
|
2
|
+
|
|
3
|
+
export type IconsColors =
|
|
4
|
+
| 'inherit'
|
|
5
|
+
| 'primary'
|
|
6
|
+
| 'secondary'
|
|
7
|
+
| 'error'
|
|
8
|
+
| 'info'
|
|
9
|
+
| 'success'
|
|
10
|
+
| 'warning'
|
|
11
|
+
| 'white'
|
|
12
|
+
| 'black';
|
|
13
|
+
|
|
14
|
+
export type BtnColors =
|
|
15
|
+
| 'inherit'
|
|
16
|
+
| 'primary'
|
|
17
|
+
| 'secondary'
|
|
18
|
+
| 'success'
|
|
19
|
+
| 'error'
|
|
20
|
+
| 'info'
|
|
21
|
+
| 'warning';
|
|
22
|
+
|
|
23
|
+
export const getPalette = () => {
|
|
24
|
+
// const storedColor = localStorage.getItem('primaryColor') || '#FF7F11';
|
|
25
|
+
// const primaryColors = storedColor ? JSON.parse(storedColor) : false;
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
primary: '#FF7F11',
|
|
29
|
+
primaryLight: '#FFDB9F',
|
|
30
|
+
primaryMedium: '#FFA84C',
|
|
31
|
+
primaryDark: '#B74608',
|
|
32
|
+
|
|
33
|
+
inherit: '#000000',
|
|
34
|
+
secondary: '#43BBF2',
|
|
35
|
+
error: '#D63643',
|
|
36
|
+
warning: '#FFC300',
|
|
37
|
+
info: '#71D5F7',
|
|
38
|
+
success: '#6BC235',
|
|
39
|
+
white: '#ffffff',
|
|
40
|
+
black: '#666666',
|
|
41
|
+
helper: '#5A2A79',
|
|
42
|
+
secondaryLight: '#D9FCFE',
|
|
43
|
+
secondaryMedium: '#71D5F7',
|
|
44
|
+
secondaryDark: '#154F8C',
|
|
45
|
+
inheritLight: '#A3A3A3',
|
|
46
|
+
inheritMedium: '#666666',
|
|
47
|
+
inheritDark: '#292929',
|
|
48
|
+
whiteLight: '#F5F5F5',
|
|
49
|
+
whiteMedium: '#E0E0E0',
|
|
50
|
+
whiteDark: '#CCCCCC',
|
|
51
|
+
successLight: '#D9F8B0',
|
|
52
|
+
successMedium: '#B9EC85',
|
|
53
|
+
successDark: '#247010',
|
|
54
|
+
errorLight: '#FABEAF',
|
|
55
|
+
errorMedium: '#F29085',
|
|
56
|
+
errorDark: '#F29085',
|
|
57
|
+
warningLight: '#FFF7CC',
|
|
58
|
+
warningMedium: '#FFE266',
|
|
59
|
+
warningDark: '#936600',
|
|
60
|
+
helperLight: '#F3D7F8',
|
|
61
|
+
helperMedium: '#BF82D6',
|
|
62
|
+
helperDark: '#250D46',
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const palette = getPalette();
|
|
67
|
+
|
|
68
|
+
export const textColors = {
|
|
69
|
+
inherit: palette.inherit,
|
|
70
|
+
primary: palette.primary,
|
|
71
|
+
secondary: palette.secondary,
|
|
72
|
+
error: palette.error,
|
|
73
|
+
warning: palette.warning,
|
|
74
|
+
info: palette.info,
|
|
75
|
+
success: palette.success,
|
|
76
|
+
white: palette.white,
|
|
77
|
+
black: palette.black,
|
|
78
|
+
helper: palette.helper,
|
|
79
|
+
primaryLight: palette.primaryLight,
|
|
80
|
+
primaryMedium: palette.primaryMedium,
|
|
81
|
+
primaryDark: palette.primaryDark,
|
|
82
|
+
secondaryLight: palette.secondaryLight,
|
|
83
|
+
secondaryMedium: palette.secondaryMedium,
|
|
84
|
+
secondaryDark: palette.secondaryDark,
|
|
85
|
+
inheritLight: palette.inheritLight,
|
|
86
|
+
inheritMedium: palette.inheritMedium,
|
|
87
|
+
inheritDark: palette.inheritDark,
|
|
88
|
+
whiteLight: palette.whiteLight,
|
|
89
|
+
whiteMedium: palette.whiteMedium,
|
|
90
|
+
whiteDark: palette.whiteDark,
|
|
91
|
+
successLight: palette.successLight,
|
|
92
|
+
successMedium: palette.successMedium,
|
|
93
|
+
successDark: palette.successDark,
|
|
94
|
+
errorLight: palette.errorLight,
|
|
95
|
+
errorMedium: palette.errorMedium,
|
|
96
|
+
errorDark: palette.errorDark,
|
|
97
|
+
warningLight: palette.warningLight,
|
|
98
|
+
warningMedium: palette.warningMedium,
|
|
99
|
+
warningDark: palette.warningDark,
|
|
100
|
+
helperLight: palette.helperLight,
|
|
101
|
+
helperMedium: palette.helperMedium,
|
|
102
|
+
helperDark: palette.helperDark,
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export const backgroundColors = {
|
|
106
|
+
inherit: palette.inherit,
|
|
107
|
+
primary: palette.primary,
|
|
108
|
+
secondary: palette.secondary,
|
|
109
|
+
error: palette.error,
|
|
110
|
+
warning: palette.warning,
|
|
111
|
+
info: palette.info,
|
|
112
|
+
success: palette.success,
|
|
113
|
+
white: palette.white,
|
|
114
|
+
black: palette.black,
|
|
115
|
+
primaryLight: palette.primaryLight,
|
|
116
|
+
primaryMedium: palette.primaryMedium,
|
|
117
|
+
primaryDark: palette.primaryDark,
|
|
118
|
+
secondaryLight: palette.secondaryLight,
|
|
119
|
+
secondaryMedium: palette.secondaryMedium,
|
|
120
|
+
secondaryDark: palette.secondaryDark,
|
|
121
|
+
inheritLight: palette.inheritLight,
|
|
122
|
+
inheritMedium: palette.inheritMedium,
|
|
123
|
+
inheritDark: palette.inheritDark,
|
|
124
|
+
whiteLight: palette.whiteLight,
|
|
125
|
+
whiteMedium: palette.whiteMedium,
|
|
126
|
+
whiteDark: palette.whiteDark,
|
|
127
|
+
successLight: palette.successLight,
|
|
128
|
+
successMedium: palette.successMedium,
|
|
129
|
+
successDark: palette.successDark,
|
|
130
|
+
errorLight: palette.errorLight,
|
|
131
|
+
errorMedium: palette.errorMedium,
|
|
132
|
+
errorDark: palette.errorDark,
|
|
133
|
+
warningLight: palette.warningLight,
|
|
134
|
+
warningMedium: palette.warningMedium,
|
|
135
|
+
warningDark: palette.warningDark,
|
|
136
|
+
helperLight: palette.helperLight,
|
|
137
|
+
helperMedium: palette.helperMedium,
|
|
138
|
+
helperDark: palette.helperDark,
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export const colors: Record<IconsColors, string> = {
|
|
142
|
+
inherit: palette.inherit,
|
|
143
|
+
primary: palette.primary,
|
|
144
|
+
secondary: palette.secondary,
|
|
145
|
+
error: palette.error,
|
|
146
|
+
warning: palette.warning,
|
|
147
|
+
info: palette.info,
|
|
148
|
+
success: palette.success,
|
|
149
|
+
white: palette.white,
|
|
150
|
+
black: palette.black,
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export const olosPalette = {
|
|
154
|
+
primary: {
|
|
155
|
+
main: palette.primary,
|
|
156
|
+
},
|
|
157
|
+
secondary: {
|
|
158
|
+
main: palette.secondary,
|
|
159
|
+
},
|
|
160
|
+
error: {
|
|
161
|
+
main: palette.error,
|
|
162
|
+
},
|
|
163
|
+
warning: {
|
|
164
|
+
main: palette.warning,
|
|
165
|
+
},
|
|
166
|
+
info: {
|
|
167
|
+
main: palette.info,
|
|
168
|
+
},
|
|
169
|
+
success: {
|
|
170
|
+
main: palette.success,
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export const lightTheme = createTheme({
|
|
175
|
+
palette: {
|
|
176
|
+
mode: 'light',
|
|
177
|
+
...olosPalette,
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export const darkTheme = createTheme({
|
|
182
|
+
palette: {
|
|
183
|
+
mode: 'dark',
|
|
184
|
+
...olosPalette,
|
|
185
|
+
background: {
|
|
186
|
+
default: palette.inheritLight,
|
|
187
|
+
paper: palette.inheritDark,
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
export const themes = {
|
|
193
|
+
light: lightTheme,
|
|
194
|
+
dark: darkTheme,
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export function getIconsColorsArray(): IconsColors[] {
|
|
198
|
+
return Object.keys(colors) as IconsColors[];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export const getBtnColorsArray: BtnColors[] = [
|
|
202
|
+
'inherit',
|
|
203
|
+
'primary',
|
|
204
|
+
'secondary',
|
|
205
|
+
'success',
|
|
206
|
+
'error',
|
|
207
|
+
'info',
|
|
208
|
+
'warning',
|
|
209
|
+
];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type IconsSizes = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge' | '3xlarge'
|
|
2
|
+
export type BtnSizes = 'small' | 'medium' | 'large'
|
|
3
|
+
|
|
4
|
+
export const iconsSizes: Record<IconsSizes, number> = {
|
|
5
|
+
xsmall: 14,
|
|
6
|
+
small: 20,
|
|
7
|
+
medium: 24,
|
|
8
|
+
large: 28,
|
|
9
|
+
xlarge: 32,
|
|
10
|
+
'2xlarge': 36,
|
|
11
|
+
'3xlarge': 40,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const btnSizes: Record<BtnSizes, string> = {
|
|
15
|
+
small: 'small',
|
|
16
|
+
medium: 'medium',
|
|
17
|
+
large: 'large',
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function getIconsSizesArray(): IconsSizes[] {
|
|
21
|
+
return Object.keys(iconsSizes) as IconsSizes[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function getBtnSizesArray(): BtnSizes[] {
|
|
25
|
+
return Object.keys(btnSizes) as BtnSizes[]
|
|
26
|
+
}
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|