@janbox/storefront-ui 2.0.32 → 3.0.1
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/README.md +125 -99
- package/dist/constants/emotion.d.ts +0 -2
- package/dist/constants/emotion.js +0 -24
- package/dist/lib/accordion/accordion-summary/accordion-summary.d.ts +1 -1
- package/dist/lib/accordion/accordion-summary/accordion-summary.js +21 -13
- package/dist/lib/accordion/accordion-summary/types.d.ts +4 -3
- package/dist/lib/avatar/avatar.js +2 -2
- package/dist/lib/box/README.md +1 -11
- package/dist/lib/box/box.js +1 -3
- package/dist/lib/box/types.d.ts +1 -5
- package/dist/lib/button/button.js +2 -2
- package/dist/lib/cascader/cascader.js +9 -12
- package/dist/lib/cascader/types.d.ts +3 -2
- package/dist/lib/chip/chip.d.ts +1 -1
- package/dist/lib/chip/chip.js +35 -31
- package/dist/lib/chip/types.d.ts +5 -4
- package/dist/lib/container/README.md +7 -18
- package/dist/lib/container/container.d.ts +1 -1
- package/dist/lib/container/container.js +4 -88
- package/dist/lib/container/helpers.js +24 -1
- package/dist/lib/container/types.d.ts +2 -8
- package/dist/lib/date-picker/date-picker.js +1 -1
- package/dist/lib/flexbox/README.md +1 -2
- package/dist/lib/flexbox/flexbox/flexbox.d.ts +1 -1
- package/dist/lib/flexbox/flexbox/flexbox.js +1 -3
- package/dist/lib/flexbox/flexbox/types.d.ts +2 -6
- package/dist/lib/grid/cell/README.md +66 -0
- package/dist/lib/grid/{README.md → grid/README.md} +5 -6
- package/dist/lib/grid/grid/grid.js +1 -3
- package/dist/lib/grid/grid/types.d.ts +4 -5
- package/dist/lib/icon-button/icon-button.js +2 -2
- package/dist/lib/stepper/step.js +6 -6
- package/dist/lib/swiper/swiper-dots-paging/swiper-dots-paging.js +1 -1
- package/dist/lib/swiper/swiper-side-arrows-paging/swiper-side-arrows-paging.js +1 -1
- package/dist/lib/table/table/table.d.ts +1 -1
- package/dist/lib/table/table/table.js +7 -6
- package/dist/lib/table/table/types.d.ts +2 -2
- package/dist/lib/table/table-footer/table-footer.d.ts +1 -1
- package/dist/lib/table/table-footer/table-footer.js +4 -4
- package/dist/lib/table/table-footer/types.d.ts +2 -2
- package/dist/theme/palette.d.ts +7 -6
- package/dist/theme/palette.js +41 -24
- package/dist/utils/index.d.ts +2 -4
- package/dist/utils/index.js +14 -21
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export type TableFooterProps =
|
|
2
|
+
import { PrimitiveProps } from '../../primitive';
|
|
3
|
+
export type TableFooterProps = PrimitiveProps<JSX.IntrinsicElements['tfoot'], 'tfoot'>;
|
package/dist/theme/palette.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Paths } from 'type-fest';
|
|
2
2
|
export declare const getColorVar: (key: PaletteKey, fullVar?: boolean) => string;
|
|
3
3
|
type Scale = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
|
|
4
|
-
type ColorScale = Record<Scale, string
|
|
4
|
+
type ColorScale = Record<Scale, string> & {
|
|
5
|
+
contrast: string;
|
|
6
|
+
};
|
|
5
7
|
export interface Palette {
|
|
6
|
-
readonly
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly white: '#FFFFFF';
|
|
8
|
+
readonly common: {
|
|
9
|
+
readonly black: '#000000';
|
|
10
|
+
readonly white: '#FFFFFF';
|
|
11
|
+
};
|
|
11
12
|
background: {
|
|
12
13
|
subtle: string;
|
|
13
14
|
default: string;
|
package/dist/theme/palette.js
CHANGED
|
@@ -6,11 +6,10 @@ const getColorVar = (key, fullVar = true) => {
|
|
|
6
6
|
};
|
|
7
7
|
const prefix = "color";
|
|
8
8
|
const paletteVars = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
white: "#FFFFFF",
|
|
9
|
+
common: {
|
|
10
|
+
black: "#000000",
|
|
11
|
+
white: "#FFFFFF"
|
|
12
|
+
},
|
|
14
13
|
background: {
|
|
15
14
|
subtle: getColorVar("background.subtle"),
|
|
16
15
|
default: getColorVar("background.default"),
|
|
@@ -30,7 +29,8 @@ const paletteVars = {
|
|
|
30
29
|
500: getColorVar("primary.500"),
|
|
31
30
|
600: getColorVar("primary.600"),
|
|
32
31
|
700: getColorVar("primary.700"),
|
|
33
|
-
800: getColorVar("primary.800")
|
|
32
|
+
800: getColorVar("primary.800"),
|
|
33
|
+
contrast: getColorVar("primary.contrast")
|
|
34
34
|
// 900: getColorVar('primary.900'),
|
|
35
35
|
},
|
|
36
36
|
secondary: {
|
|
@@ -41,7 +41,8 @@ const paletteVars = {
|
|
|
41
41
|
500: getColorVar("secondary.500"),
|
|
42
42
|
600: getColorVar("secondary.600"),
|
|
43
43
|
700: getColorVar("secondary.700"),
|
|
44
|
-
800: getColorVar("secondary.800")
|
|
44
|
+
800: getColorVar("secondary.800"),
|
|
45
|
+
contrast: getColorVar("secondary.contrast")
|
|
45
46
|
// 900: getColorVar('secondary.900'),
|
|
46
47
|
},
|
|
47
48
|
red: {
|
|
@@ -52,7 +53,8 @@ const paletteVars = {
|
|
|
52
53
|
500: getColorVar("red.500"),
|
|
53
54
|
600: getColorVar("red.600"),
|
|
54
55
|
700: getColorVar("red.700"),
|
|
55
|
-
800: getColorVar("red.800")
|
|
56
|
+
800: getColorVar("red.800"),
|
|
57
|
+
contrast: getColorVar("red.contrast")
|
|
56
58
|
// 900: getColorVar('red.900'),
|
|
57
59
|
},
|
|
58
60
|
orange: {
|
|
@@ -63,7 +65,8 @@ const paletteVars = {
|
|
|
63
65
|
500: getColorVar("orange.500"),
|
|
64
66
|
600: getColorVar("orange.600"),
|
|
65
67
|
700: getColorVar("orange.700"),
|
|
66
|
-
800: getColorVar("orange.800")
|
|
68
|
+
800: getColorVar("orange.800"),
|
|
69
|
+
contrast: getColorVar("orange.contrast")
|
|
67
70
|
// 900: getColorVar('orange.900'),
|
|
68
71
|
},
|
|
69
72
|
yellow: {
|
|
@@ -74,7 +77,8 @@ const paletteVars = {
|
|
|
74
77
|
500: getColorVar("yellow.500"),
|
|
75
78
|
600: getColorVar("yellow.600"),
|
|
76
79
|
700: getColorVar("yellow.700"),
|
|
77
|
-
800: getColorVar("yellow.800")
|
|
80
|
+
800: getColorVar("yellow.800"),
|
|
81
|
+
contrast: getColorVar("yellow.contrast")
|
|
78
82
|
// 900: getColorVar('yellow.900'),
|
|
79
83
|
},
|
|
80
84
|
green: {
|
|
@@ -85,7 +89,8 @@ const paletteVars = {
|
|
|
85
89
|
500: getColorVar("green.500"),
|
|
86
90
|
600: getColorVar("green.600"),
|
|
87
91
|
700: getColorVar("green.700"),
|
|
88
|
-
800: getColorVar("green.800")
|
|
92
|
+
800: getColorVar("green.800"),
|
|
93
|
+
contrast: getColorVar("green.contrast")
|
|
89
94
|
// 900: getColorVar('green.900'),
|
|
90
95
|
},
|
|
91
96
|
blue: {
|
|
@@ -96,7 +101,8 @@ const paletteVars = {
|
|
|
96
101
|
500: getColorVar("blue.500"),
|
|
97
102
|
600: getColorVar("blue.600"),
|
|
98
103
|
700: getColorVar("blue.700"),
|
|
99
|
-
800: getColorVar("blue.800")
|
|
104
|
+
800: getColorVar("blue.800"),
|
|
105
|
+
contrast: getColorVar("blue.contrast")
|
|
100
106
|
// 900: getColorVar('blue.900'),
|
|
101
107
|
},
|
|
102
108
|
violet: {
|
|
@@ -107,7 +113,8 @@ const paletteVars = {
|
|
|
107
113
|
500: getColorVar("violet.500"),
|
|
108
114
|
600: getColorVar("violet.600"),
|
|
109
115
|
700: getColorVar("violet.700"),
|
|
110
|
-
800: getColorVar("violet.800")
|
|
116
|
+
800: getColorVar("violet.800"),
|
|
117
|
+
contrast: getColorVar("violet.contrast")
|
|
111
118
|
// 900: getColorVar('violet.900'),
|
|
112
119
|
},
|
|
113
120
|
neutral: {
|
|
@@ -118,14 +125,15 @@ const paletteVars = {
|
|
|
118
125
|
500: getColorVar("neutral.500"),
|
|
119
126
|
600: getColorVar("neutral.600"),
|
|
120
127
|
700: getColorVar("neutral.700"),
|
|
121
|
-
800: getColorVar("neutral.800")
|
|
128
|
+
800: getColorVar("neutral.800"),
|
|
129
|
+
contrast: getColorVar("neutral.contrast")
|
|
122
130
|
// 900: getColorVar('neutral.900'),
|
|
123
131
|
}
|
|
124
132
|
};
|
|
125
133
|
const groupedColors = [
|
|
126
134
|
{
|
|
127
135
|
name: "Basic",
|
|
128
|
-
colors: ["
|
|
136
|
+
colors: ["common.white", "common.black"]
|
|
129
137
|
},
|
|
130
138
|
{
|
|
131
139
|
name: "Background",
|
|
@@ -149,7 +157,8 @@ const groupedColors = [
|
|
|
149
157
|
"primary.500",
|
|
150
158
|
"primary.600",
|
|
151
159
|
"primary.700",
|
|
152
|
-
"primary.800"
|
|
160
|
+
"primary.800",
|
|
161
|
+
"primary.contrast"
|
|
153
162
|
// 'primary.900',
|
|
154
163
|
]
|
|
155
164
|
},
|
|
@@ -163,7 +172,8 @@ const groupedColors = [
|
|
|
163
172
|
"secondary.500",
|
|
164
173
|
"secondary.600",
|
|
165
174
|
"secondary.700",
|
|
166
|
-
"secondary.800"
|
|
175
|
+
"secondary.800",
|
|
176
|
+
"secondary.contrast"
|
|
167
177
|
// 'secondary.900',
|
|
168
178
|
]
|
|
169
179
|
},
|
|
@@ -177,7 +187,8 @@ const groupedColors = [
|
|
|
177
187
|
"red.500",
|
|
178
188
|
"red.600",
|
|
179
189
|
"red.700",
|
|
180
|
-
"red.800"
|
|
190
|
+
"red.800",
|
|
191
|
+
"red.contrast"
|
|
181
192
|
// 'red.900'
|
|
182
193
|
]
|
|
183
194
|
},
|
|
@@ -191,7 +202,8 @@ const groupedColors = [
|
|
|
191
202
|
"orange.500",
|
|
192
203
|
"orange.600",
|
|
193
204
|
"orange.700",
|
|
194
|
-
"orange.800"
|
|
205
|
+
"orange.800",
|
|
206
|
+
"orange.contrast"
|
|
195
207
|
// 'orange.900',
|
|
196
208
|
]
|
|
197
209
|
},
|
|
@@ -205,7 +217,8 @@ const groupedColors = [
|
|
|
205
217
|
"yellow.500",
|
|
206
218
|
"yellow.600",
|
|
207
219
|
"yellow.700",
|
|
208
|
-
"yellow.800"
|
|
220
|
+
"yellow.800",
|
|
221
|
+
"yellow.contrast"
|
|
209
222
|
// 'yellow.900',
|
|
210
223
|
]
|
|
211
224
|
},
|
|
@@ -219,7 +232,8 @@ const groupedColors = [
|
|
|
219
232
|
"green.500",
|
|
220
233
|
"green.600",
|
|
221
234
|
"green.700",
|
|
222
|
-
"green.800"
|
|
235
|
+
"green.800",
|
|
236
|
+
"green.contrast"
|
|
223
237
|
// 'green.900',
|
|
224
238
|
]
|
|
225
239
|
},
|
|
@@ -233,7 +247,8 @@ const groupedColors = [
|
|
|
233
247
|
"blue.500",
|
|
234
248
|
"blue.600",
|
|
235
249
|
"blue.700",
|
|
236
|
-
"blue.800"
|
|
250
|
+
"blue.800",
|
|
251
|
+
"blue.contrast"
|
|
237
252
|
// 'blue.900',
|
|
238
253
|
]
|
|
239
254
|
},
|
|
@@ -247,7 +262,8 @@ const groupedColors = [
|
|
|
247
262
|
"violet.500",
|
|
248
263
|
"violet.600",
|
|
249
264
|
"violet.700",
|
|
250
|
-
"violet.800"
|
|
265
|
+
"violet.800",
|
|
266
|
+
"violet.contrast"
|
|
251
267
|
// 'violet.900',
|
|
252
268
|
]
|
|
253
269
|
},
|
|
@@ -261,7 +277,8 @@ const groupedColors = [
|
|
|
261
277
|
"neutral.500",
|
|
262
278
|
"neutral.600",
|
|
263
279
|
"neutral.700",
|
|
264
|
-
"neutral.800"
|
|
280
|
+
"neutral.800",
|
|
281
|
+
"neutral.contrast"
|
|
265
282
|
// 'neutral.900',
|
|
266
283
|
]
|
|
267
284
|
}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export * from './query-params';
|
|
|
7
7
|
export { createUnderlineEffect } from './stylesheet';
|
|
8
8
|
export declare const getColorShadesByVariant: (variant?: ColorVariant) => {
|
|
9
9
|
main: string;
|
|
10
|
-
|
|
10
|
+
contrast: string;
|
|
11
11
|
dark: string;
|
|
12
12
|
light: string;
|
|
13
13
|
placeholder: string;
|
|
@@ -15,10 +15,9 @@ export declare const getColorShadesByVariant: (variant?: ColorVariant) => {
|
|
|
15
15
|
disabledText: string;
|
|
16
16
|
ariaDisabledSurface: string;
|
|
17
17
|
ariaDisabledText: string;
|
|
18
|
-
contrast: string;
|
|
19
18
|
} | {
|
|
20
19
|
main?: undefined;
|
|
21
|
-
|
|
20
|
+
contrast?: undefined;
|
|
22
21
|
dark?: undefined;
|
|
23
22
|
light?: undefined;
|
|
24
23
|
placeholder?: undefined;
|
|
@@ -26,7 +25,6 @@ export declare const getColorShadesByVariant: (variant?: ColorVariant) => {
|
|
|
26
25
|
disabledText?: undefined;
|
|
27
26
|
ariaDisabledSurface?: undefined;
|
|
28
27
|
ariaDisabledText?: undefined;
|
|
29
|
-
contrast?: undefined;
|
|
30
28
|
};
|
|
31
29
|
export declare const mergeComponentProps: <T extends object>(...args: Array<T | object | ((current: T) => T | object)>) => T;
|
|
32
30
|
export declare const flattenChildren: (children: React.ReactNode) => ReactElement[];
|
package/dist/utils/index.js
CHANGED
|
@@ -10,93 +10,86 @@ const getColorShadesByVariant = (variant) => {
|
|
|
10
10
|
case "primary":
|
|
11
11
|
return {
|
|
12
12
|
main: getColorVar("primary.600"),
|
|
13
|
-
|
|
13
|
+
contrast: getColorVar("primary.contrast"),
|
|
14
14
|
dark: getColorVar("primary.700"),
|
|
15
15
|
light: getColorVar("primary.100"),
|
|
16
16
|
placeholder: getColorVar("primary.400"),
|
|
17
17
|
disabledSurface: getColorVar("primary.300"),
|
|
18
18
|
disabledText: getColorVar("primary.500"),
|
|
19
19
|
ariaDisabledSurface: getColorVar("primary.300"),
|
|
20
|
-
ariaDisabledText: getColorVar("primary.300")
|
|
21
|
-
contrast: getColorVar("white")
|
|
20
|
+
ariaDisabledText: getColorVar("primary.300")
|
|
22
21
|
};
|
|
23
22
|
case "secondary":
|
|
24
23
|
return {
|
|
25
24
|
main: getColorVar("secondary.600"),
|
|
26
|
-
|
|
25
|
+
contrast: getColorVar("secondary.contrast"),
|
|
27
26
|
dark: getColorVar("secondary.700"),
|
|
28
27
|
light: getColorVar("secondary.100"),
|
|
29
28
|
placeholder: getColorVar("secondary.400"),
|
|
30
29
|
disabledSurface: getColorVar("secondary.300"),
|
|
31
30
|
disabledText: getColorVar("secondary.500"),
|
|
32
31
|
ariaDisabledSurface: getColorVar("secondary.300"),
|
|
33
|
-
ariaDisabledText: getColorVar("secondary.300")
|
|
34
|
-
contrast: getColorVar("white")
|
|
32
|
+
ariaDisabledText: getColorVar("secondary.300")
|
|
35
33
|
};
|
|
36
34
|
case "green":
|
|
37
35
|
return {
|
|
38
36
|
main: getColorVar("green.600"),
|
|
39
|
-
|
|
37
|
+
contrast: getColorVar("green.contrast"),
|
|
40
38
|
dark: getColorVar("green.700"),
|
|
41
39
|
light: getColorVar("green.100"),
|
|
42
40
|
placeholder: getColorVar("green.400"),
|
|
43
41
|
disabledSurface: getColorVar("green.300"),
|
|
44
42
|
disabledText: getColorVar("green.500"),
|
|
45
43
|
ariaDisabledSurface: getColorVar("green.300"),
|
|
46
|
-
ariaDisabledText: getColorVar("green.300")
|
|
47
|
-
contrast: getColorVar("white")
|
|
44
|
+
ariaDisabledText: getColorVar("green.300")
|
|
48
45
|
};
|
|
49
46
|
case "orange":
|
|
50
47
|
return {
|
|
51
48
|
main: getColorVar("orange.600"),
|
|
52
|
-
|
|
49
|
+
contrast: getColorVar("orange.contrast"),
|
|
53
50
|
dark: getColorVar("orange.700"),
|
|
54
51
|
light: getColorVar("orange.100"),
|
|
55
52
|
placeholder: getColorVar("orange.400"),
|
|
56
53
|
disabledSurface: getColorVar("orange.300"),
|
|
57
54
|
disabledText: getColorVar("orange.500"),
|
|
58
55
|
ariaDisabledSurface: getColorVar("orange.300"),
|
|
59
|
-
ariaDisabledText: getColorVar("orange.300")
|
|
60
|
-
contrast: getColorVar("white")
|
|
56
|
+
ariaDisabledText: getColorVar("orange.300")
|
|
61
57
|
};
|
|
62
58
|
case "red":
|
|
63
59
|
return {
|
|
64
60
|
main: getColorVar("red.600"),
|
|
65
|
-
|
|
61
|
+
contrast: getColorVar("red.contrast"),
|
|
66
62
|
dark: getColorVar("red.700"),
|
|
67
63
|
light: getColorVar("red.100"),
|
|
68
64
|
placeholder: getColorVar("red.400"),
|
|
69
65
|
disabledSurface: getColorVar("red.300"),
|
|
70
66
|
disabledText: getColorVar("red.500"),
|
|
71
67
|
ariaDisabledSurface: getColorVar("red.300"),
|
|
72
|
-
ariaDisabledText: getColorVar("red.300")
|
|
73
|
-
contrast: getColorVar("white")
|
|
68
|
+
ariaDisabledText: getColorVar("red.300")
|
|
74
69
|
};
|
|
75
70
|
case "blue":
|
|
76
71
|
return {
|
|
77
72
|
main: getColorVar("blue.600"),
|
|
78
|
-
|
|
73
|
+
contrast: getColorVar("blue.contrast"),
|
|
79
74
|
dark: getColorVar("blue.700"),
|
|
80
75
|
light: getColorVar("blue.100"),
|
|
81
76
|
placeholder: getColorVar("blue.400"),
|
|
82
77
|
disabledSurface: getColorVar("blue.300"),
|
|
83
78
|
disabledText: getColorVar("blue.500"),
|
|
84
79
|
ariaDisabledSurface: getColorVar("blue.300"),
|
|
85
|
-
ariaDisabledText: getColorVar("blue.300")
|
|
86
|
-
contrast: getColorVar("white")
|
|
80
|
+
ariaDisabledText: getColorVar("blue.300")
|
|
87
81
|
};
|
|
88
82
|
case "neutral":
|
|
89
83
|
return {
|
|
90
84
|
main: getColorVar("neutral.600"),
|
|
91
|
-
|
|
85
|
+
contrast: getColorVar("neutral.contrast"),
|
|
92
86
|
dark: getColorVar("neutral.700"),
|
|
93
87
|
light: getColorVar("neutral.100"),
|
|
94
88
|
placeholder: getColorVar("neutral.400"),
|
|
95
89
|
disabledSurface: getColorVar("neutral.300"),
|
|
96
90
|
disabledText: getColorVar("neutral.500"),
|
|
97
91
|
ariaDisabledSurface: getColorVar("neutral.300"),
|
|
98
|
-
ariaDisabledText: getColorVar("neutral.300")
|
|
99
|
-
contrast: getColorVar("white")
|
|
92
|
+
ariaDisabledText: getColorVar("neutral.300")
|
|
100
93
|
};
|
|
101
94
|
default:
|
|
102
95
|
return {};
|