@atls-ui-parts/datepicker 0.0.10 → 0.0.13
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/datepicker.stories.d.ts +123 -0
- package/dist/datepicker.stories.js +123 -0
- package/dist/styles/appearance/appearance.interfaces.d.ts +2 -0
- package/dist/styles/appearance/appearance.styles.d.ts +15 -3
- package/dist/styles/appearance/appearance.styles.js +11 -5
- package/dist/styles/datepicker.styles.d.ts +1 -1
- package/dist/styles/datepicker.styles.js +11 -1
- package/dist/styles/shape/shape.interfaces.d.ts +9 -0
- package/dist/styles/shape/shape.styles.d.ts +38 -8
- package/dist/styles/shape/shape.styles.js +25 -5
- package/package.json +15 -12
|
@@ -8,6 +8,7 @@ export declare const Datepicker: {
|
|
|
8
8
|
args: {
|
|
9
9
|
arrowColor: string;
|
|
10
10
|
arrowHoverColor: string;
|
|
11
|
+
showPopperArrow: boolean;
|
|
11
12
|
cellColor: null;
|
|
12
13
|
cellFontColor: string;
|
|
13
14
|
cellActiveColor: string;
|
|
@@ -34,6 +35,16 @@ export declare const Datepicker: {
|
|
|
34
35
|
inputBorderWidth: number;
|
|
35
36
|
inputBorderRadius: number;
|
|
36
37
|
inputPadding: string;
|
|
38
|
+
currentMonthPadding: number;
|
|
39
|
+
currentMonthFontFamily: string;
|
|
40
|
+
currentMonthFontStyle: string;
|
|
41
|
+
currentMonthFontWeight: number;
|
|
42
|
+
currentMonthFontSize: number;
|
|
43
|
+
currentMonthFontColor: string;
|
|
44
|
+
dayNameFontFamily: string;
|
|
45
|
+
dayNameFontStyle: string;
|
|
46
|
+
dayNameFontWeight: number;
|
|
47
|
+
dayNameFontColor: string;
|
|
37
48
|
};
|
|
38
49
|
argTypes: {
|
|
39
50
|
arrowColor: {
|
|
@@ -58,6 +69,16 @@ export declare const Datepicker: {
|
|
|
58
69
|
type: string;
|
|
59
70
|
};
|
|
60
71
|
};
|
|
72
|
+
showPopperArrow: {
|
|
73
|
+
name: string;
|
|
74
|
+
description: string;
|
|
75
|
+
table: {
|
|
76
|
+
category: string;
|
|
77
|
+
};
|
|
78
|
+
control: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
61
82
|
cellColor: {
|
|
62
83
|
name: string;
|
|
63
84
|
description: string;
|
|
@@ -124,6 +145,108 @@ export declare const Datepicker: {
|
|
|
124
145
|
type: string;
|
|
125
146
|
};
|
|
126
147
|
};
|
|
148
|
+
currentMonthPadding: {
|
|
149
|
+
name: string;
|
|
150
|
+
description: string;
|
|
151
|
+
table: {
|
|
152
|
+
category: string;
|
|
153
|
+
};
|
|
154
|
+
control: {
|
|
155
|
+
type: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
currentMonthFontFamily: {
|
|
159
|
+
name: string;
|
|
160
|
+
description: string;
|
|
161
|
+
table: {
|
|
162
|
+
category: string;
|
|
163
|
+
};
|
|
164
|
+
control: {
|
|
165
|
+
type: string;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
currentMonthFontStyle: {
|
|
169
|
+
name: string;
|
|
170
|
+
description: string;
|
|
171
|
+
table: {
|
|
172
|
+
category: string;
|
|
173
|
+
};
|
|
174
|
+
control: {
|
|
175
|
+
type: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
currentMonthFontWeight: {
|
|
179
|
+
name: string;
|
|
180
|
+
description: string;
|
|
181
|
+
table: {
|
|
182
|
+
category: string;
|
|
183
|
+
};
|
|
184
|
+
control: {
|
|
185
|
+
type: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
currentMonthFontSize: {
|
|
189
|
+
name: string;
|
|
190
|
+
description: string;
|
|
191
|
+
table: {
|
|
192
|
+
category: string;
|
|
193
|
+
};
|
|
194
|
+
control: {
|
|
195
|
+
type: string;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
currentMonthFontColor: {
|
|
199
|
+
name: string;
|
|
200
|
+
description: string;
|
|
201
|
+
table: {
|
|
202
|
+
category: string;
|
|
203
|
+
subcategory: string;
|
|
204
|
+
};
|
|
205
|
+
control: {
|
|
206
|
+
type: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
dayNameFontFamily: {
|
|
210
|
+
name: string;
|
|
211
|
+
description: string;
|
|
212
|
+
table: {
|
|
213
|
+
category: string;
|
|
214
|
+
};
|
|
215
|
+
control: {
|
|
216
|
+
type: string;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
dayNameFontStyle: {
|
|
220
|
+
name: string;
|
|
221
|
+
description: string;
|
|
222
|
+
table: {
|
|
223
|
+
category: string;
|
|
224
|
+
};
|
|
225
|
+
control: {
|
|
226
|
+
type: string;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
dayNameFontColor: {
|
|
230
|
+
name: string;
|
|
231
|
+
description: string;
|
|
232
|
+
table: {
|
|
233
|
+
category: string;
|
|
234
|
+
subcategory: string;
|
|
235
|
+
};
|
|
236
|
+
control: {
|
|
237
|
+
type: string;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
dayNameFontWeight: {
|
|
241
|
+
name: string;
|
|
242
|
+
description: string;
|
|
243
|
+
table: {
|
|
244
|
+
category: string;
|
|
245
|
+
};
|
|
246
|
+
control: {
|
|
247
|
+
type: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
127
250
|
cellMargin: {
|
|
128
251
|
name: string;
|
|
129
252
|
description: string;
|
|
@@ -31,6 +31,7 @@ exports.Datepicker = Datepicker;
|
|
|
31
31
|
exports.Datepicker.args = {
|
|
32
32
|
arrowColor: '#376EFF',
|
|
33
33
|
arrowHoverColor: '#376EFF',
|
|
34
|
+
showPopperArrow: true,
|
|
34
35
|
cellColor: null,
|
|
35
36
|
cellFontColor: '#262C34',
|
|
36
37
|
cellActiveColor: '#376EFF',
|
|
@@ -57,6 +58,16 @@ exports.Datepicker.args = {
|
|
|
57
58
|
inputBorderWidth: 1,
|
|
58
59
|
inputBorderRadius: 6,
|
|
59
60
|
inputPadding: '12px 14px',
|
|
61
|
+
currentMonthPadding: 10,
|
|
62
|
+
currentMonthFontFamily: 'Gordita, sans-serif',
|
|
63
|
+
currentMonthFontStyle: 'normal',
|
|
64
|
+
currentMonthFontWeight: 400,
|
|
65
|
+
currentMonthFontSize: 20,
|
|
66
|
+
currentMonthFontColor: '#000000',
|
|
67
|
+
dayNameFontFamily: 'Gordita, sans-serif',
|
|
68
|
+
dayNameFontStyle: 'normal',
|
|
69
|
+
dayNameFontWeight: 400,
|
|
70
|
+
dayNameFontColor: '#000000',
|
|
60
71
|
};
|
|
61
72
|
exports.Datepicker.argTypes = {
|
|
62
73
|
arrowColor: {
|
|
@@ -81,6 +92,16 @@ exports.Datepicker.argTypes = {
|
|
|
81
92
|
type: 'color',
|
|
82
93
|
},
|
|
83
94
|
},
|
|
95
|
+
showPopperArrow: {
|
|
96
|
+
name: 'Показывать стрелку',
|
|
97
|
+
description: 'Показывать стрелку',
|
|
98
|
+
table: {
|
|
99
|
+
category: 'Форма',
|
|
100
|
+
},
|
|
101
|
+
control: {
|
|
102
|
+
type: 'boolean',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
84
105
|
cellColor: {
|
|
85
106
|
name: 'Цвет ячейки',
|
|
86
107
|
description: 'Цвет ячейки',
|
|
@@ -147,6 +168,108 @@ exports.Datepicker.argTypes = {
|
|
|
147
168
|
type: 'color',
|
|
148
169
|
},
|
|
149
170
|
},
|
|
171
|
+
currentMonthPadding: {
|
|
172
|
+
name: 'Внешний отступ текущего месяца',
|
|
173
|
+
description: 'Внешний отступ текущего месяца',
|
|
174
|
+
table: {
|
|
175
|
+
category: 'Форма',
|
|
176
|
+
},
|
|
177
|
+
control: {
|
|
178
|
+
type: 'number',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
currentMonthFontFamily: {
|
|
182
|
+
name: 'Форма шрифта текущего месяца',
|
|
183
|
+
description: 'Форма шрифта текущего месяца',
|
|
184
|
+
table: {
|
|
185
|
+
category: 'Форма',
|
|
186
|
+
},
|
|
187
|
+
control: {
|
|
188
|
+
type: 'text',
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
currentMonthFontStyle: {
|
|
192
|
+
name: 'Стиль шрифта текущего месяца',
|
|
193
|
+
description: 'Стиль шрифта текущего месяца',
|
|
194
|
+
table: {
|
|
195
|
+
category: 'Форма',
|
|
196
|
+
},
|
|
197
|
+
control: {
|
|
198
|
+
type: 'text',
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
currentMonthFontWeight: {
|
|
202
|
+
name: 'Толщина шрифта текущего месяца',
|
|
203
|
+
description: 'Толщина шрифта текущего месяца',
|
|
204
|
+
table: {
|
|
205
|
+
category: 'Форма',
|
|
206
|
+
},
|
|
207
|
+
control: {
|
|
208
|
+
type: 'number',
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
currentMonthFontSize: {
|
|
212
|
+
name: 'Размер шрифта текущего месяца',
|
|
213
|
+
description: 'Размер шрифта текущего месяца',
|
|
214
|
+
table: {
|
|
215
|
+
category: 'Форма',
|
|
216
|
+
},
|
|
217
|
+
control: {
|
|
218
|
+
type: 'text',
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
currentMonthFontColor: {
|
|
222
|
+
name: 'Цвет шрифта текущего месяца',
|
|
223
|
+
description: 'Цвет шрифта текущего месяца',
|
|
224
|
+
table: {
|
|
225
|
+
category: 'Представление',
|
|
226
|
+
subcategory: 'Цвет',
|
|
227
|
+
},
|
|
228
|
+
control: {
|
|
229
|
+
type: 'color',
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
dayNameFontFamily: {
|
|
233
|
+
name: 'Форма шрифта дня недели',
|
|
234
|
+
description: 'Форма шрифта дня недели',
|
|
235
|
+
table: {
|
|
236
|
+
category: 'Форма',
|
|
237
|
+
},
|
|
238
|
+
control: {
|
|
239
|
+
type: 'text',
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
dayNameFontStyle: {
|
|
243
|
+
name: 'Стиль шрифта дня недели',
|
|
244
|
+
description: 'Стиль шрифта дня недели',
|
|
245
|
+
table: {
|
|
246
|
+
category: 'Форма',
|
|
247
|
+
},
|
|
248
|
+
control: {
|
|
249
|
+
type: 'text',
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
dayNameFontColor: {
|
|
253
|
+
name: 'Цвет шрифта дня недели',
|
|
254
|
+
description: 'Цвет шрифта дня недели',
|
|
255
|
+
table: {
|
|
256
|
+
category: 'Представление',
|
|
257
|
+
subcategory: 'Цвет',
|
|
258
|
+
},
|
|
259
|
+
control: {
|
|
260
|
+
type: 'color',
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
dayNameFontWeight: {
|
|
264
|
+
name: 'Толщина шрифта дня недели',
|
|
265
|
+
description: 'Толщина шрифта дня недели',
|
|
266
|
+
table: {
|
|
267
|
+
category: 'Форма',
|
|
268
|
+
},
|
|
269
|
+
control: {
|
|
270
|
+
type: 'number',
|
|
271
|
+
},
|
|
272
|
+
},
|
|
150
273
|
cellMargin: {
|
|
151
274
|
name: 'Внешний отступ ячейки',
|
|
152
275
|
description: 'Внешний отступ ячейки',
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { AppearanceStyles } from './appearance.interfaces';
|
|
2
|
-
export declare const createCellColorStyles: (backgroundColor?: string | undefined, color?: string | undefined, activeColor?: string | undefined, activeFontColor?: string | undefined, hoverColor?: string | undefined, hoverFontColor?: string | undefined, inRangeColor?: string | undefined, inRangeFontColor?: string | undefined, inRangeHoverColor?: string | undefined, inRangeHoverFontColor?: string | undefined) => {
|
|
2
|
+
export declare const createCellColorStyles: (backgroundColor?: string | undefined, color?: string | undefined, activeColor?: string | undefined, activeFontColor?: string | undefined, hoverColor?: string | undefined, hoverFontColor?: string | undefined, inRangeColor?: string | undefined, inRangeFontColor?: string | undefined, inRangeHoverColor?: string | undefined, inRangeHoverFontColor?: string | undefined, dayNameFontColor?: string | undefined) => {
|
|
3
|
+
'.react-datepicker__day-name': {
|
|
4
|
+
color: string | undefined;
|
|
5
|
+
};
|
|
3
6
|
'.react-datepicker__day': {
|
|
4
7
|
backgroundColor: string | undefined;
|
|
5
8
|
color: string | undefined;
|
|
@@ -33,11 +36,14 @@ export declare const createArrowColorStyles: (borderColor?: string | undefined,
|
|
|
33
36
|
borderColor: string | undefined;
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
|
-
export declare const createHeaderColorStyles: (backgroundColor?: string | undefined, borderColor?: string | undefined) => {
|
|
39
|
+
export declare const createHeaderColorStyles: (backgroundColor?: string | undefined, borderColor?: string | undefined, fontColor?: string | undefined) => {
|
|
37
40
|
'.react-datepicker__header ': {
|
|
38
41
|
backgroundColor: string | undefined;
|
|
39
42
|
borderColor: string | undefined;
|
|
40
43
|
};
|
|
44
|
+
'.react-datepicker__current-month': {
|
|
45
|
+
color: string | undefined;
|
|
46
|
+
};
|
|
41
47
|
};
|
|
42
48
|
export declare const createDividerColorStyles: (borderColor?: string | undefined) => {
|
|
43
49
|
'.react-datepicker__day-names': {
|
|
@@ -53,7 +59,7 @@ export declare const createInputColorStyles: (backgroundColor?: string | undefin
|
|
|
53
59
|
borderColor: string | undefined;
|
|
54
60
|
};
|
|
55
61
|
};
|
|
56
|
-
export declare const createAppearanceStyles: ({ arrowColor, arrowHoverColor, cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, dividerColor, headerBackgroundColor, inputBackgroundColor, inputBorderColor, inputActiveBorderColor, }: AppearanceStyles) => {
|
|
62
|
+
export declare const createAppearanceStyles: ({ arrowColor, arrowHoverColor, cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, dividerColor, headerBackgroundColor, inputBackgroundColor, inputBorderColor, inputActiveBorderColor, dayNameFontColor, currentMonthFontColor, }: AppearanceStyles) => {
|
|
57
63
|
'.react-datepicker__input-container>input': {
|
|
58
64
|
backgroundColor: string | undefined;
|
|
59
65
|
borderColor: string | undefined;
|
|
@@ -68,12 +74,18 @@ export declare const createAppearanceStyles: ({ arrowColor, arrowHoverColor, cel
|
|
|
68
74
|
backgroundColor: string | undefined;
|
|
69
75
|
borderColor: string | undefined;
|
|
70
76
|
};
|
|
77
|
+
'.react-datepicker__current-month': {
|
|
78
|
+
color: string | undefined;
|
|
79
|
+
};
|
|
71
80
|
'.react-datepicker__navigation-icon::before': {
|
|
72
81
|
borderColor: string | undefined;
|
|
73
82
|
};
|
|
74
83
|
'.react-datepicker__navigation:hover *::before': {
|
|
75
84
|
borderColor: string | undefined;
|
|
76
85
|
};
|
|
86
|
+
'.react-datepicker__day-name': {
|
|
87
|
+
color: string | undefined;
|
|
88
|
+
};
|
|
77
89
|
'.react-datepicker__day': {
|
|
78
90
|
backgroundColor: string | undefined;
|
|
79
91
|
color: string | undefined;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createAppearanceStyles = exports.createInputColorStyles = exports.createDividerColorStyles = exports.createHeaderColorStyles = exports.createArrowColorStyles = exports.createCellColorStyles = void 0;
|
|
4
|
-
const createCellColorStyles = (backgroundColor, color, activeColor, activeFontColor, hoverColor, hoverFontColor, inRangeColor, inRangeFontColor, inRangeHoverColor, inRangeHoverFontColor) => ({
|
|
4
|
+
const createCellColorStyles = (backgroundColor, color, activeColor, activeFontColor, hoverColor, hoverFontColor, inRangeColor, inRangeFontColor, inRangeHoverColor, inRangeHoverFontColor, dayNameFontColor) => ({
|
|
5
|
+
'.react-datepicker__day-name': {
|
|
6
|
+
color: dayNameFontColor,
|
|
7
|
+
},
|
|
5
8
|
'.react-datepicker__day': {
|
|
6
9
|
backgroundColor,
|
|
7
10
|
color,
|
|
@@ -37,11 +40,14 @@ const createArrowColorStyles = (borderColor, borderHoverColor) => ({
|
|
|
37
40
|
},
|
|
38
41
|
});
|
|
39
42
|
exports.createArrowColorStyles = createArrowColorStyles;
|
|
40
|
-
const createHeaderColorStyles = (backgroundColor, borderColor) => ({
|
|
43
|
+
const createHeaderColorStyles = (backgroundColor, borderColor, fontColor) => ({
|
|
41
44
|
'.react-datepicker__header ': {
|
|
42
45
|
backgroundColor,
|
|
43
46
|
borderColor,
|
|
44
47
|
},
|
|
48
|
+
'.react-datepicker__current-month': {
|
|
49
|
+
color: fontColor,
|
|
50
|
+
},
|
|
45
51
|
});
|
|
46
52
|
exports.createHeaderColorStyles = createHeaderColorStyles;
|
|
47
53
|
const createDividerColorStyles = (borderColor) => ({
|
|
@@ -60,10 +66,10 @@ const createInputColorStyles = (backgroundColor, borderColor, activeBorderColor)
|
|
|
60
66
|
},
|
|
61
67
|
});
|
|
62
68
|
exports.createInputColorStyles = createInputColorStyles;
|
|
63
|
-
const createAppearanceStyles = ({ arrowColor, arrowHoverColor, cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, dividerColor, headerBackgroundColor, inputBackgroundColor, inputBorderColor, inputActiveBorderColor, }) => ({
|
|
64
|
-
...(0, exports.createCellColorStyles)(cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor),
|
|
69
|
+
const createAppearanceStyles = ({ arrowColor, arrowHoverColor, cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, dividerColor, headerBackgroundColor, inputBackgroundColor, inputBorderColor, inputActiveBorderColor, dayNameFontColor, currentMonthFontColor, }) => ({
|
|
70
|
+
...(0, exports.createCellColorStyles)(cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, dayNameFontColor),
|
|
65
71
|
...(0, exports.createArrowColorStyles)(arrowColor, arrowHoverColor),
|
|
66
|
-
...(0, exports.createHeaderColorStyles)(headerBackgroundColor, dividerColor),
|
|
72
|
+
...(0, exports.createHeaderColorStyles)(headerBackgroundColor, dividerColor, currentMonthFontColor),
|
|
67
73
|
...(0, exports.createDividerColorStyles)(dividerColor),
|
|
68
74
|
...(0, exports.createInputColorStyles)(inputBackgroundColor, inputBorderColor, inputActiveBorderColor),
|
|
69
75
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DatepickerStyles } from './datepicker-styles.interfaces';
|
|
2
2
|
export declare const injectBaseStyles: () => void;
|
|
3
|
-
export declare const createAndInjectDatepickerStyles: ({ arrowColor, arrowHoverColor, cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, cellInRangeBorderRadius, cellMargin, cellPadding, cellBorderRadius, dividerPosition, dividerWidth, dividerColor, fontSize, fontFamily, fontStyle, fontWeight, headerBackgroundColor, inputBackgroundColor, inputBorderColor, inputBorderRadius, inputActiveBorderColor, inputSize, inputBorderWidth, inputPadding, }: DatepickerStyles) => void;
|
|
3
|
+
export declare const createAndInjectDatepickerStyles: ({ arrowColor, arrowHoverColor, cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, cellInRangeBorderRadius, cellMargin, cellPadding, cellBorderRadius, dividerPosition, dividerWidth, dividerColor, fontSize, fontFamily, fontStyle, fontWeight, headerBackgroundColor, inputBackgroundColor, inputBorderColor, inputBorderRadius, inputActiveBorderColor, inputSize, inputBorderWidth, inputPadding, currentMonthPadding, currentMonthFontFamily, currentMonthFontSize, currentMonthFontStyle, currentMonthFontWeight, currentMonthFontColor, dayNameFontFamily, dayNameFontWeight, dayNameFontStyle, dayNameFontColor, }: DatepickerStyles) => void;
|
|
@@ -6,7 +6,7 @@ const appearance_1 = require("./appearance");
|
|
|
6
6
|
const base_1 = require("./base");
|
|
7
7
|
const shape_1 = require("./shape");
|
|
8
8
|
exports.injectBaseStyles = (0, base_1.createInjectableBaseStyles)();
|
|
9
|
-
const createAndInjectDatepickerStyles = ({ arrowColor, arrowHoverColor, cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, cellInRangeBorderRadius, cellMargin, cellPadding, cellBorderRadius, dividerPosition, dividerWidth, dividerColor, fontSize, fontFamily, fontStyle, fontWeight, headerBackgroundColor, inputBackgroundColor, inputBorderColor, inputBorderRadius, inputActiveBorderColor, inputSize, inputBorderWidth, inputPadding, }) => {
|
|
9
|
+
const createAndInjectDatepickerStyles = ({ arrowColor, arrowHoverColor, cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, cellInRangeBorderRadius, cellMargin, cellPadding, cellBorderRadius, dividerPosition, dividerWidth, dividerColor, fontSize, fontFamily, fontStyle, fontWeight, headerBackgroundColor, inputBackgroundColor, inputBorderColor, inputBorderRadius, inputActiveBorderColor, inputSize, inputBorderWidth, inputPadding, currentMonthPadding, currentMonthFontFamily, currentMonthFontSize, currentMonthFontStyle, currentMonthFontWeight, currentMonthFontColor, dayNameFontFamily, dayNameFontWeight, dayNameFontStyle, dayNameFontColor, }) => {
|
|
10
10
|
(0, exports.injectBaseStyles)();
|
|
11
11
|
(0, css_1.injectGlobal)((0, appearance_1.createAppearanceStyles)({
|
|
12
12
|
arrowColor,
|
|
@@ -26,6 +26,8 @@ const createAndInjectDatepickerStyles = ({ arrowColor, arrowHoverColor, cellColo
|
|
|
26
26
|
inputBackgroundColor,
|
|
27
27
|
inputBorderColor,
|
|
28
28
|
inputActiveBorderColor,
|
|
29
|
+
dayNameFontColor,
|
|
30
|
+
currentMonthFontColor,
|
|
29
31
|
}));
|
|
30
32
|
(0, css_1.injectGlobal)((0, shape_1.createShapeStyles)({
|
|
31
33
|
cellMargin,
|
|
@@ -42,6 +44,14 @@ const createAndInjectDatepickerStyles = ({ arrowColor, arrowHoverColor, cellColo
|
|
|
42
44
|
inputBorderWidth,
|
|
43
45
|
inputBorderRadius,
|
|
44
46
|
inputPadding,
|
|
47
|
+
currentMonthPadding,
|
|
48
|
+
currentMonthFontFamily,
|
|
49
|
+
currentMonthFontSize,
|
|
50
|
+
currentMonthFontStyle,
|
|
51
|
+
currentMonthFontWeight,
|
|
52
|
+
dayNameFontFamily,
|
|
53
|
+
dayNameFontWeight,
|
|
54
|
+
dayNameFontStyle,
|
|
45
55
|
}));
|
|
46
56
|
};
|
|
47
57
|
exports.createAndInjectDatepickerStyles = createAndInjectDatepickerStyles;
|
|
@@ -13,4 +13,13 @@ export interface ShapeStyles {
|
|
|
13
13
|
inputBorderWidth?: number | string;
|
|
14
14
|
inputBorderRadius?: number | string;
|
|
15
15
|
inputPadding?: number | string;
|
|
16
|
+
dayNameFontFamily?: string;
|
|
17
|
+
dayNameFontStyle?: string;
|
|
18
|
+
dayNameFontWeight?: string;
|
|
19
|
+
dayNameFontSize?: number | string;
|
|
20
|
+
currentMonthPadding?: number | string;
|
|
21
|
+
currentMonthFontFamily?: string;
|
|
22
|
+
currentMonthFontWeight?: string;
|
|
23
|
+
currentMonthFontStyle?: string;
|
|
24
|
+
currentMonthFontSize?: number | string;
|
|
16
25
|
}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { ShapeStyles } from './shape.interfaces';
|
|
2
|
-
export declare const
|
|
3
|
-
'.react-
|
|
2
|
+
export declare const createHeaderShapeStyles: (padding?: string | number | undefined, fontFamily?: string | undefined, fontWeight?: string | undefined, fontStyle?: string | undefined, fontSize?: string | number | undefined) => {
|
|
3
|
+
'.react-datepicker__current-month': {
|
|
4
|
+
paddingTop: string | number | undefined;
|
|
5
|
+
paddingBottom: string | number | undefined;
|
|
6
|
+
fontFamily: string | undefined;
|
|
7
|
+
fontWeight: string | undefined;
|
|
8
|
+
fontSize: string | number | undefined;
|
|
9
|
+
fontStyle: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const createCellShapeStyles: (margin?: string | number | undefined, padding?: string | number | undefined, borderRadius?: string | number | undefined, inRangeBorderRadius?: string | number | undefined, fontSize?: string | number | undefined, fontFamily?: string | undefined, fontStyle?: string | undefined, fontWeight?: string | undefined, dayNameFontFamily?: string | undefined, dayNameFontStyle?: string | undefined, dayNameFontWeight?: string | undefined, dayNameFontSize?: string | number | undefined) => {
|
|
13
|
+
'.react-datepicker__day-name': {
|
|
14
|
+
margin: string | number | undefined;
|
|
15
|
+
padding: string | number | undefined;
|
|
16
|
+
fontFamily: string | undefined;
|
|
17
|
+
fontStyle: string | undefined;
|
|
18
|
+
fontWeight: string | undefined;
|
|
19
|
+
fontSize: string | number | undefined;
|
|
20
|
+
};
|
|
21
|
+
'.react-datepicker__day, .react-datepicker__time-name': {
|
|
4
22
|
margin: string | number | undefined;
|
|
5
23
|
padding: string | number | undefined;
|
|
6
24
|
borderRadius: string | number | undefined;
|
|
@@ -46,7 +64,15 @@ export declare const createInputShapeStyles: (size?: number | undefined, borderW
|
|
|
46
64
|
borderRadius: string | number | undefined;
|
|
47
65
|
};
|
|
48
66
|
};
|
|
49
|
-
export declare const createShapeStyles: ({ dividerPosition, dividerWidth, cellMargin, cellPadding, cellBorderRadius, cellInRangeBorderRadius, inputSize, inputBorderWidth, inputBorderRadius, inputPadding, fontSize, fontFamily, fontStyle, fontWeight, }: ShapeStyles) => {
|
|
67
|
+
export declare const createShapeStyles: ({ dividerPosition, dividerWidth, cellMargin, cellPadding, cellBorderRadius, cellInRangeBorderRadius, inputSize, inputBorderWidth, inputBorderRadius, inputPadding, fontSize, fontFamily, fontStyle, fontWeight, dayNameFontFamily, dayNameFontStyle, dayNameFontWeight, dayNameFontSize, currentMonthFontFamily, currentMonthFontStyle, currentMonthFontWeight, currentMonthFontSize, currentMonthPadding, }: ShapeStyles) => {
|
|
68
|
+
'.react-datepicker__current-month': {
|
|
69
|
+
paddingTop: string | number | undefined;
|
|
70
|
+
paddingBottom: string | number | undefined;
|
|
71
|
+
fontFamily: string | undefined;
|
|
72
|
+
fontWeight: string | undefined;
|
|
73
|
+
fontSize: string | number | undefined;
|
|
74
|
+
fontStyle: string | undefined;
|
|
75
|
+
};
|
|
50
76
|
'.react-datepicker__input-container>input': {
|
|
51
77
|
height: number | undefined;
|
|
52
78
|
borderWidth: string | number | undefined;
|
|
@@ -66,7 +92,15 @@ export declare const createShapeStyles: ({ dividerPosition, dividerWidth, cellMa
|
|
|
66
92
|
borderWidth: number;
|
|
67
93
|
borderTopWidth: string | number | undefined;
|
|
68
94
|
};
|
|
69
|
-
'.react-datepicker__day-name
|
|
95
|
+
'.react-datepicker__day-name': {
|
|
96
|
+
margin: string | number | undefined;
|
|
97
|
+
padding: string | number | undefined;
|
|
98
|
+
fontFamily: string | undefined;
|
|
99
|
+
fontStyle: string | undefined;
|
|
100
|
+
fontWeight: string | undefined;
|
|
101
|
+
fontSize: string | number | undefined;
|
|
102
|
+
};
|
|
103
|
+
'.react-datepicker__day, .react-datepicker__time-name': {
|
|
70
104
|
margin: string | number | undefined;
|
|
71
105
|
padding: string | number | undefined;
|
|
72
106
|
borderRadius: string | number | undefined;
|
|
@@ -81,10 +115,6 @@ export declare const createShapeStyles: ({ dividerPosition, dividerWidth, cellMa
|
|
|
81
115
|
'.react-datepicker__day-name:hover, .react-datepicker__day:hover, .react-datepicker__time-name:hover, .react-datepicker__day--range-start, .react-datepicker__day--range-end': {
|
|
82
116
|
borderRadius: string | number | undefined;
|
|
83
117
|
};
|
|
84
|
-
'.react-datepicker__current-month': {
|
|
85
|
-
paddingTop: string | number | undefined;
|
|
86
|
-
paddingBottom: string | number | undefined;
|
|
87
|
-
};
|
|
88
118
|
'.react-datepicker__navigation': {
|
|
89
119
|
marginTop: string | number | undefined;
|
|
90
120
|
};
|
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createShapeStyles = exports.createInputShapeStyles = exports.createDividerShapeStyles = exports.createCellShapeStyles = void 0;
|
|
4
|
-
const
|
|
5
|
-
'.react-
|
|
3
|
+
exports.createShapeStyles = exports.createInputShapeStyles = exports.createDividerShapeStyles = exports.createCellShapeStyles = exports.createHeaderShapeStyles = void 0;
|
|
4
|
+
const createHeaderShapeStyles = (padding, fontFamily, fontWeight, fontStyle, fontSize) => ({
|
|
5
|
+
'.react-datepicker__current-month': {
|
|
6
|
+
paddingTop: padding,
|
|
7
|
+
paddingBottom: padding,
|
|
8
|
+
fontFamily,
|
|
9
|
+
fontWeight,
|
|
10
|
+
fontSize,
|
|
11
|
+
fontStyle,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
exports.createHeaderShapeStyles = createHeaderShapeStyles;
|
|
15
|
+
const createCellShapeStyles = (margin, padding, borderRadius, inRangeBorderRadius, fontSize, fontFamily, fontStyle, fontWeight, dayNameFontFamily, dayNameFontStyle, dayNameFontWeight, dayNameFontSize) => ({
|
|
16
|
+
'.react-datepicker__day-name': {
|
|
17
|
+
margin,
|
|
18
|
+
padding,
|
|
19
|
+
fontFamily: dayNameFontFamily,
|
|
20
|
+
fontStyle: dayNameFontStyle,
|
|
21
|
+
fontWeight: dayNameFontWeight,
|
|
22
|
+
fontSize: dayNameFontSize || fontSize,
|
|
23
|
+
},
|
|
24
|
+
'.react-datepicker__day, .react-datepicker__time-name': {
|
|
6
25
|
margin,
|
|
7
26
|
padding,
|
|
8
27
|
borderRadius,
|
|
@@ -51,9 +70,10 @@ const createInputShapeStyles = (size, borderWidth, padding, fontSize, fontWeight
|
|
|
51
70
|
},
|
|
52
71
|
});
|
|
53
72
|
exports.createInputShapeStyles = createInputShapeStyles;
|
|
54
|
-
const createShapeStyles = ({ dividerPosition, dividerWidth, cellMargin, cellPadding, cellBorderRadius, cellInRangeBorderRadius, inputSize, inputBorderWidth, inputBorderRadius, inputPadding, fontSize, fontFamily, fontStyle, fontWeight, }) => ({
|
|
55
|
-
...(0, exports.createCellShapeStyles)(cellMargin, cellPadding, cellBorderRadius, cellInRangeBorderRadius, fontSize, fontFamily, fontStyle, fontWeight),
|
|
73
|
+
const createShapeStyles = ({ dividerPosition, dividerWidth, cellMargin, cellPadding, cellBorderRadius, cellInRangeBorderRadius, inputSize, inputBorderWidth, inputBorderRadius, inputPadding, fontSize, fontFamily, fontStyle, fontWeight, dayNameFontFamily, dayNameFontStyle, dayNameFontWeight, dayNameFontSize, currentMonthFontFamily, currentMonthFontStyle, currentMonthFontWeight, currentMonthFontSize, currentMonthPadding, }) => ({
|
|
74
|
+
...(0, exports.createCellShapeStyles)(cellMargin, cellPadding, cellBorderRadius, cellInRangeBorderRadius, fontSize, fontFamily, fontStyle, fontWeight, dayNameFontFamily, dayNameFontStyle, dayNameFontWeight, dayNameFontSize),
|
|
56
75
|
...(0, exports.createDividerShapeStyles)(dividerPosition, dividerWidth),
|
|
57
76
|
...(0, exports.createInputShapeStyles)(inputSize, inputBorderWidth, inputPadding, fontSize, fontWeight, fontFamily, inputBorderRadius),
|
|
77
|
+
...(0, exports.createHeaderShapeStyles)(currentMonthPadding, currentMonthFontFamily, currentMonthFontWeight, currentMonthFontStyle, currentMonthFontSize),
|
|
58
78
|
});
|
|
59
79
|
exports.createShapeStyles = createShapeStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atls-ui-parts/datepicker",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -12,20 +12,23 @@
|
|
|
12
12
|
"postpack": "rm -rf dist"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"date-fns": "^2.22.1",
|
|
18
|
-
"react": "^17.0.1",
|
|
19
|
-
"react-datepicker": "^4.1.1",
|
|
20
|
-
"styled-system": "^5.1.5"
|
|
15
|
+
"date-fns": "2.22.1",
|
|
16
|
+
"react-datepicker": "4.8.0"
|
|
21
17
|
},
|
|
22
18
|
"devDependencies": {
|
|
23
|
-
"@atls-ui-proto/input": "0.0.
|
|
24
|
-
"@emotion/
|
|
25
|
-
"@
|
|
19
|
+
"@atls-ui-proto/input": "0.0.12",
|
|
20
|
+
"@emotion/css": "^11.9.0",
|
|
21
|
+
"@emotion/styled": "^11.9.3",
|
|
22
|
+
"@types/react": "^18.0.14",
|
|
26
23
|
"@types/react-datepicker": "^3.1.8",
|
|
27
|
-
"@types/styled-system": "^5.1.
|
|
28
|
-
"react": "^
|
|
24
|
+
"@types/styled-system": "^5.1.15",
|
|
25
|
+
"react": "^18.2.0",
|
|
26
|
+
"styled-system": "^5.1.5"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@emotion/css": "^11.9.0",
|
|
30
|
+
"@emotion/styled": "^11.8.1",
|
|
31
|
+
"react": "^18.1.0",
|
|
29
32
|
"styled-system": "^5.1.5"
|
|
30
33
|
},
|
|
31
34
|
"publishConfig": {
|