sprintify-ui 0.10.53 → 0.10.55

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.
@@ -4,6 +4,7 @@ interface ColorConfig {
4
4
  backgroundColor: string;
5
5
  textColor: string;
6
6
  borderColor: string;
7
+ color: string;
7
8
  }
8
9
  interface ColorPalette {
9
10
  low: ColorConfig;
@@ -3,4 +3,5 @@ import fileSizeFormat from './fileSizeFormat';
3
3
  import resizeImageFromURI from './resizeImageFromURI';
4
4
  import { disableScroll, enableScroll } from './scrollPreventer';
5
5
  import { blobToBase64, validateBase64, base64ToBlob } from './blob';
6
- export { toHumanList, fileSizeFormat, disableScroll, enableScroll, resizeImageFromURI, blobToBase64, validateBase64, base64ToBlob, };
6
+ import { getColorConfig } from './colors';
7
+ export { toHumanList, fileSizeFormat, disableScroll, enableScroll, resizeImageFromURI, blobToBase64, validateBase64, base64ToBlob, getColorConfig, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.10.53",
3
+ "version": "0.10.55",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -1,4 +1,4 @@
1
- import { darken, getContrast } from 'color2k';
1
+ import { darken, getContrast, lighten } from 'color2k';
2
2
  import defaultColors from 'tailwindcss/colors';
3
3
 
4
4
  const colors = defaultColors;
@@ -9,6 +9,7 @@ interface ColorConfig {
9
9
  backgroundColor: string;
10
10
  textColor: string;
11
11
  borderColor: string;
12
+ color: string;
12
13
  }
13
14
 
14
15
  interface ColorPalette {
@@ -22,11 +23,13 @@ export const palette: Record<string, ColorPalette> = {
22
23
  backgroundColor: colors.slate[200],
23
24
  textColor: colors.slate[800],
24
25
  borderColor: colors.slate[300],
26
+ color: colors.black,
25
27
  },
26
28
  high: {
27
29
  backgroundColor: colors.black,
28
30
  textColor: colors.white,
29
31
  borderColor: 'transparent',
32
+ color: colors.black,
30
33
  },
31
34
  },
32
35
  gray: {
@@ -34,11 +37,13 @@ export const palette: Record<string, ColorPalette> = {
34
37
  backgroundColor: colors.slate[200],
35
38
  textColor: colors.slate[800],
36
39
  borderColor: colors.slate[300],
40
+ color: colors.slate[500],
37
41
  },
38
42
  high: {
39
43
  backgroundColor: colors.slate[600],
40
44
  textColor: colors.white,
41
45
  borderColor: 'transparent',
46
+ color: colors.slate[500],
42
47
  },
43
48
  },
44
49
  red: {
@@ -46,11 +51,13 @@ export const palette: Record<string, ColorPalette> = {
46
51
  backgroundColor: colors.red[100],
47
52
  textColor: colors.red[800],
48
53
  borderColor: colors.red[300],
54
+ color: colors.red[500],
49
55
  },
50
56
  high: {
51
57
  backgroundColor: colors.red[600],
52
58
  textColor: colors.white,
53
59
  borderColor: 'transparent',
60
+ color: colors.red[500],
54
61
  },
55
62
  },
56
63
  orange: {
@@ -58,11 +65,13 @@ export const palette: Record<string, ColorPalette> = {
58
65
  backgroundColor: colors.orange[100],
59
66
  textColor: colors.orange[800],
60
67
  borderColor: colors.orange[300],
68
+ color: colors.orange[500],
61
69
  },
62
70
  high: {
63
71
  backgroundColor: colors.orange[500],
64
72
  textColor: colors.white,
65
73
  borderColor: 'transparent',
74
+ color: colors.orange[500],
66
75
  },
67
76
  },
68
77
  yellow: {
@@ -70,11 +79,13 @@ export const palette: Record<string, ColorPalette> = {
70
79
  backgroundColor: colors.yellow[100],
71
80
  textColor: colors.yellow[800],
72
81
  borderColor: colors.yellow[300],
82
+ color: colors.yellow[500],
73
83
  },
74
84
  high: {
75
85
  backgroundColor: colors.yellow[500],
76
86
  textColor: colors.white,
77
87
  borderColor: 'transparent',
88
+ color: colors.yellow[500],
78
89
  },
79
90
  },
80
91
  green: {
@@ -82,11 +93,13 @@ export const palette: Record<string, ColorPalette> = {
82
93
  backgroundColor: colors.green[100],
83
94
  textColor: colors.green[800],
84
95
  borderColor: colors.green[300],
96
+ color: colors.green[500],
85
97
  },
86
98
  high: {
87
99
  backgroundColor: colors.green[600],
88
100
  textColor: colors.white,
89
101
  borderColor: 'transparent',
102
+ color: colors.green[500],
90
103
  },
91
104
  },
92
105
  teal: {
@@ -94,11 +107,13 @@ export const palette: Record<string, ColorPalette> = {
94
107
  backgroundColor: colors.teal[100],
95
108
  textColor: colors.teal[800],
96
109
  borderColor: colors.teal[300],
110
+ color: colors.teal[500],
97
111
  },
98
112
  high: {
99
113
  backgroundColor: colors.teal[600],
100
114
  textColor: colors.white,
101
115
  borderColor: 'transparent',
116
+ color: colors.teal[500],
102
117
  },
103
118
  },
104
119
  cyan: {
@@ -106,11 +121,13 @@ export const palette: Record<string, ColorPalette> = {
106
121
  backgroundColor: colors.cyan[100],
107
122
  textColor: colors.cyan[800],
108
123
  borderColor: colors.cyan[300],
124
+ color: colors.cyan[500],
109
125
  },
110
126
  high: {
111
127
  backgroundColor: colors.cyan[600],
112
128
  textColor: colors.white,
113
129
  borderColor: 'transparent',
130
+ color: colors.cyan[500],
114
131
  },
115
132
  },
116
133
  blue: {
@@ -118,11 +135,13 @@ export const palette: Record<string, ColorPalette> = {
118
135
  backgroundColor: colors.blue[100],
119
136
  textColor: colors.blue[800],
120
137
  borderColor: colors.blue[300],
138
+ color: colors.blue[500],
121
139
  },
122
140
  high: {
123
141
  backgroundColor: colors.blue[600],
124
142
  textColor: colors.white,
125
143
  borderColor: 'transparent',
144
+ color: colors.blue[500],
126
145
  },
127
146
  },
128
147
  indigo: {
@@ -130,11 +149,13 @@ export const palette: Record<string, ColorPalette> = {
130
149
  backgroundColor: colors.indigo[100],
131
150
  textColor: colors.indigo[800],
132
151
  borderColor: colors.indigo[300],
152
+ color: colors.indigo[500],
133
153
  },
134
154
  high: {
135
155
  backgroundColor: colors.indigo[600],
136
156
  textColor: colors.white,
137
157
  borderColor: 'transparent',
158
+ color: colors.indigo[500],
138
159
  },
139
160
  },
140
161
  purple: {
@@ -142,11 +163,13 @@ export const palette: Record<string, ColorPalette> = {
142
163
  backgroundColor: colors.purple[100],
143
164
  textColor: colors.purple[800],
144
165
  borderColor: colors.purple[300],
166
+ color: colors.purple[500],
145
167
  },
146
168
  high: {
147
169
  backgroundColor: colors.purple[600],
148
170
  textColor: colors.white,
149
171
  borderColor: 'transparent',
172
+ color: colors.purple[500],
150
173
  },
151
174
  },
152
175
  pink: {
@@ -154,11 +177,13 @@ export const palette: Record<string, ColorPalette> = {
154
177
  backgroundColor: colors.pink[100],
155
178
  textColor: colors.pink[800],
156
179
  borderColor: colors.pink[300],
180
+ color: colors.pink[500],
157
181
  },
158
182
  high: {
159
183
  backgroundColor: colors.pink[600],
160
184
  textColor: colors.white,
161
185
  borderColor: 'transparent',
186
+ color: colors.pink[500],
162
187
  },
163
188
  },
164
189
  white: {
@@ -166,11 +191,13 @@ export const palette: Record<string, ColorPalette> = {
166
191
  backgroundColor: colors.white,
167
192
  textColor: colors.slate[600],
168
193
  borderColor: 'transparent',
194
+ color: colors.slate[100],
169
195
  },
170
196
  high: {
171
197
  backgroundColor: colors.white,
172
198
  textColor: colors.black,
173
199
  borderColor: 'transparent',
200
+ color: colors.slate[100],
174
201
  },
175
202
  },
176
203
  };
@@ -180,6 +207,7 @@ const colorNames = {
180
207
  success: 'green',
181
208
  warning: 'yellow',
182
209
  danger: 'red',
210
+ error: 'red',
183
211
  } as Record<string, string>;
184
212
 
185
213
  export function getColorConfig(color: string, contrast = false): ColorConfig {
@@ -206,5 +234,6 @@ export function getColorConfig(color: string, contrast = false): ColorConfig {
206
234
  backgroundColor: color,
207
235
  textColor: textColor,
208
236
  borderColor: borderColor,
237
+ color: color
209
238
  };
210
239
  }
@@ -3,6 +3,7 @@ import fileSizeFormat from './fileSizeFormat';
3
3
  import resizeImageFromURI from './resizeImageFromURI';
4
4
  import { disableScroll, enableScroll } from './scrollPreventer';
5
5
  import { blobToBase64, validateBase64, base64ToBlob } from './blob';
6
+ import { getColorConfig } from './colors';
6
7
 
7
8
  export {
8
9
  toHumanList,
@@ -13,4 +14,5 @@ export {
13
14
  blobToBase64,
14
15
  validateBase64,
15
16
  base64ToBlob,
17
+ getColorConfig,
16
18
  };