@atls-ui-parts/datepicker 0.0.9 → 0.0.10

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.
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { DatepickerProps } from './datepicker.interface';
3
+ declare const Datepicker: FC<DatepickerProps>;
4
+ export { Datepicker };
@@ -0,0 +1,4 @@
1
+ import { ReactDatePickerProps } from 'react-datepicker';
2
+ import { DatepickerStyles } from './styles';
3
+ export interface DatepickerProps extends DatepickerStyles, ReactDatePickerProps {
4
+ }
@@ -0,0 +1,339 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const Datepicker: {
7
+ (props: any): JSX.Element;
8
+ args: {
9
+ arrowColor: string;
10
+ arrowHoverColor: string;
11
+ cellColor: null;
12
+ cellFontColor: string;
13
+ cellActiveColor: string;
14
+ cellActiveFontColor: string;
15
+ cellHoverColor: null;
16
+ cellHoverFontColor: null;
17
+ cellInRangeBorderRadius: number;
18
+ cellInRangeColor: string;
19
+ cellInRangeFontColor: string;
20
+ cellInRangeHoverColor: string;
21
+ cellInRangeHoverFontColor: string;
22
+ cellMargin: number;
23
+ cellPadding: number;
24
+ cellBorderRadius: number;
25
+ dividerPosition: string;
26
+ dividerWidth: string;
27
+ dividerColor: string;
28
+ fontFamily: string;
29
+ fontStyle: string;
30
+ fontWeight: number;
31
+ headerBackgroundColor: string;
32
+ inputActiveBorderColor: string;
33
+ inputBorderColor: string;
34
+ inputBorderWidth: number;
35
+ inputBorderRadius: number;
36
+ inputPadding: string;
37
+ };
38
+ argTypes: {
39
+ arrowColor: {
40
+ name: string;
41
+ description: string;
42
+ table: {
43
+ category: string;
44
+ subcategory: string;
45
+ };
46
+ control: {
47
+ type: string;
48
+ };
49
+ };
50
+ arrowHoverColor: {
51
+ name: string;
52
+ description: string;
53
+ table: {
54
+ category: string;
55
+ subcategory: string;
56
+ };
57
+ control: {
58
+ type: string;
59
+ };
60
+ };
61
+ cellColor: {
62
+ name: string;
63
+ description: string;
64
+ table: {
65
+ category: string;
66
+ subcategory: string;
67
+ };
68
+ control: {
69
+ type: string;
70
+ };
71
+ };
72
+ cellFontColor: {
73
+ name: string;
74
+ description: string;
75
+ table: {
76
+ category: string;
77
+ subcategory: string;
78
+ };
79
+ control: {
80
+ type: string;
81
+ };
82
+ };
83
+ cellActiveColor: {
84
+ name: string;
85
+ description: string;
86
+ table: {
87
+ category: string;
88
+ subcategory: string;
89
+ };
90
+ control: {
91
+ type: string;
92
+ };
93
+ };
94
+ cellActiveFontColor: {
95
+ name: string;
96
+ description: string;
97
+ table: {
98
+ category: string;
99
+ subcategory: string;
100
+ };
101
+ control: {
102
+ type: string;
103
+ };
104
+ };
105
+ cellHoverColor: {
106
+ name: string;
107
+ description: string;
108
+ table: {
109
+ category: string;
110
+ subcategory: string;
111
+ };
112
+ control: {
113
+ type: string;
114
+ };
115
+ };
116
+ cellHoverFontColor: {
117
+ name: string;
118
+ description: string;
119
+ table: {
120
+ category: string;
121
+ subcategory: string;
122
+ };
123
+ control: {
124
+ type: string;
125
+ };
126
+ };
127
+ cellMargin: {
128
+ name: string;
129
+ description: string;
130
+ table: {
131
+ category: string;
132
+ };
133
+ control: {
134
+ type: string;
135
+ };
136
+ };
137
+ cellPadding: {
138
+ name: string;
139
+ description: string;
140
+ table: {
141
+ category: string;
142
+ };
143
+ control: {
144
+ type: string;
145
+ };
146
+ };
147
+ cellBorderRadius: {
148
+ name: string;
149
+ description: string;
150
+ table: {
151
+ category: string;
152
+ };
153
+ control: {
154
+ type: string;
155
+ };
156
+ };
157
+ cellInRangeBorderRadius: {
158
+ name: string;
159
+ description: string;
160
+ table: {
161
+ category: string;
162
+ };
163
+ control: {
164
+ type: string;
165
+ };
166
+ };
167
+ cellInRangeColor: {
168
+ name: string;
169
+ description: string;
170
+ table: {
171
+ category: string;
172
+ subcategory: string;
173
+ };
174
+ control: {
175
+ type: string;
176
+ };
177
+ };
178
+ cellInRangeFontColor: {
179
+ name: string;
180
+ description: string;
181
+ table: {
182
+ category: string;
183
+ subcategory: string;
184
+ };
185
+ control: {
186
+ type: string;
187
+ };
188
+ };
189
+ cellInRangeHoverColor: {
190
+ name: string;
191
+ description: string;
192
+ table: {
193
+ category: string;
194
+ subcategory: string;
195
+ };
196
+ control: {
197
+ type: string;
198
+ };
199
+ };
200
+ cellInRangeHoverFontColor: {
201
+ name: string;
202
+ description: string;
203
+ table: {
204
+ category: string;
205
+ subcategory: string;
206
+ };
207
+ control: {
208
+ type: string;
209
+ };
210
+ };
211
+ headerBackgroundColor: {
212
+ name: string;
213
+ description: string;
214
+ table: {
215
+ category: string;
216
+ subcategory: string;
217
+ };
218
+ control: {
219
+ type: string;
220
+ };
221
+ };
222
+ inputBorderColor: {
223
+ name: string;
224
+ description: string;
225
+ table: {
226
+ category: string;
227
+ subcategory: string;
228
+ };
229
+ control: {
230
+ type: string;
231
+ };
232
+ };
233
+ inputActiveBorderColor: {
234
+ name: string;
235
+ description: string;
236
+ table: {
237
+ category: string;
238
+ subcategory: string;
239
+ };
240
+ control: {
241
+ type: string;
242
+ };
243
+ };
244
+ inputBorderWidth: {
245
+ name: string;
246
+ description: string;
247
+ table: {
248
+ category: string;
249
+ };
250
+ control: {
251
+ type: string;
252
+ };
253
+ };
254
+ inputBorderRadius: {
255
+ name: string;
256
+ description: string;
257
+ table: {
258
+ category: string;
259
+ };
260
+ control: {
261
+ type: string;
262
+ };
263
+ };
264
+ inputPadding: {
265
+ name: string;
266
+ description: string;
267
+ table: {
268
+ category: string;
269
+ };
270
+ control: {
271
+ type: string;
272
+ };
273
+ };
274
+ dividerPosition: {
275
+ name: string;
276
+ description: string;
277
+ table: {
278
+ category: string;
279
+ };
280
+ control: {
281
+ type: string;
282
+ options: string[];
283
+ };
284
+ };
285
+ dividerWidth: {
286
+ name: string;
287
+ description: string;
288
+ table: {
289
+ category: string;
290
+ };
291
+ control: {
292
+ type: string;
293
+ };
294
+ };
295
+ dividerColor: {
296
+ name: string;
297
+ description: string;
298
+ table: {
299
+ category: string;
300
+ subcategory: string;
301
+ };
302
+ control: {
303
+ type: string;
304
+ };
305
+ };
306
+ fontFamily: {
307
+ name: string;
308
+ description: string;
309
+ table: {
310
+ category: string;
311
+ };
312
+ control: {
313
+ type: string;
314
+ };
315
+ };
316
+ fontWeight: {
317
+ name: string;
318
+ description: string;
319
+ table: {
320
+ category: string;
321
+ };
322
+ control: {
323
+ type: string;
324
+ options: string[];
325
+ };
326
+ };
327
+ fontStyle: {
328
+ name: string;
329
+ description: string;
330
+ table: {
331
+ category: string;
332
+ };
333
+ control: {
334
+ type: string;
335
+ options: string[];
336
+ };
337
+ };
338
+ };
339
+ };
@@ -0,0 +1,4 @@
1
+ export * from './datepicker.component';
2
+ export * from './datepicker.interface';
3
+ export * from './styles';
4
+ export * from './locales';
package/dist/index.js CHANGED
@@ -1 +1,20 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./datepicker.component"), exports);
18
+ __exportStar(require("./datepicker.interface"), exports);
19
+ __exportStar(require("./styles"), exports);
20
+ __exportStar(require("./locales"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './locales';
2
+ export * from './register-locales';
@@ -0,0 +1,3 @@
1
+ import enAU from 'date-fns/locale/en-AU';
2
+ import ru from 'date-fns/locale/ru';
3
+ export { ru, enAU };
@@ -0,0 +1,2 @@
1
+ declare const registerLocales: () => void;
2
+ export { registerLocales };
@@ -0,0 +1,19 @@
1
+ export interface AppearanceStyles {
2
+ arrowColor?: string;
3
+ arrowHoverColor?: string;
4
+ cellColor?: string;
5
+ cellFontColor?: string;
6
+ cellActiveColor?: string;
7
+ cellActiveFontColor?: string;
8
+ cellHoverColor?: string;
9
+ cellHoverFontColor?: string;
10
+ cellInRangeColor?: string;
11
+ cellInRangeFontColor?: string;
12
+ cellInRangeHoverColor?: string;
13
+ cellInRangeHoverFontColor?: string;
14
+ dividerColor?: string;
15
+ headerBackgroundColor?: string;
16
+ inputBackgroundColor?: string;
17
+ inputBorderColor?: string;
18
+ inputActiveBorderColor?: string;
19
+ }
@@ -0,0 +1,101 @@
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) => {
3
+ '.react-datepicker__day': {
4
+ backgroundColor: string | undefined;
5
+ color: string | undefined;
6
+ };
7
+ '.react-datepicker__day--selected': {
8
+ backgroundColor: string | undefined;
9
+ color: string | undefined;
10
+ };
11
+ '.react-datepicker__day:hover': {
12
+ backgroundColor: string | undefined;
13
+ color: string | undefined;
14
+ };
15
+ '.react-datepicker__day--in-range, .react-datepicker__day--in-selecting-range': {
16
+ backgroundColor: string | undefined;
17
+ color: string | undefined;
18
+ };
19
+ '.react-datepicker__day--selected:hover, .react-datepicker__day--keyboard-selected, .react-datepicker__day--range-start, .react-datepicker__day--range-end': {
20
+ backgroundColor: string | undefined;
21
+ color: string | undefined;
22
+ };
23
+ '.react-datepicker__day--in-range:hover, .react-datepicker__day--in-selecting-range:hover': {
24
+ backgroundColor: string | undefined;
25
+ color: string | undefined;
26
+ };
27
+ };
28
+ export declare const createArrowColorStyles: (borderColor?: string | undefined, borderHoverColor?: string | undefined) => {
29
+ '.react-datepicker__navigation-icon::before': {
30
+ borderColor: string | undefined;
31
+ };
32
+ '.react-datepicker__navigation:hover *::before': {
33
+ borderColor: string | undefined;
34
+ };
35
+ };
36
+ export declare const createHeaderColorStyles: (backgroundColor?: string | undefined, borderColor?: string | undefined) => {
37
+ '.react-datepicker__header ': {
38
+ backgroundColor: string | undefined;
39
+ borderColor: string | undefined;
40
+ };
41
+ };
42
+ export declare const createDividerColorStyles: (borderColor?: string | undefined) => {
43
+ '.react-datepicker__day-names': {
44
+ borderTopColor: string | undefined;
45
+ };
46
+ };
47
+ export declare const createInputColorStyles: (backgroundColor?: string | undefined, borderColor?: string | undefined, activeBorderColor?: string | undefined) => {
48
+ '.react-datepicker__input-container>input': {
49
+ backgroundColor: string | undefined;
50
+ borderColor: string | undefined;
51
+ };
52
+ '.react-datepicker__input-container>input:focus': {
53
+ borderColor: string | undefined;
54
+ };
55
+ };
56
+ export declare const createAppearanceStyles: ({ arrowColor, arrowHoverColor, cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, dividerColor, headerBackgroundColor, inputBackgroundColor, inputBorderColor, inputActiveBorderColor, }: AppearanceStyles) => {
57
+ '.react-datepicker__input-container>input': {
58
+ backgroundColor: string | undefined;
59
+ borderColor: string | undefined;
60
+ };
61
+ '.react-datepicker__input-container>input:focus': {
62
+ borderColor: string | undefined;
63
+ };
64
+ '.react-datepicker__day-names': {
65
+ borderTopColor: string | undefined;
66
+ };
67
+ '.react-datepicker__header ': {
68
+ backgroundColor: string | undefined;
69
+ borderColor: string | undefined;
70
+ };
71
+ '.react-datepicker__navigation-icon::before': {
72
+ borderColor: string | undefined;
73
+ };
74
+ '.react-datepicker__navigation:hover *::before': {
75
+ borderColor: string | undefined;
76
+ };
77
+ '.react-datepicker__day': {
78
+ backgroundColor: string | undefined;
79
+ color: string | undefined;
80
+ };
81
+ '.react-datepicker__day--selected': {
82
+ backgroundColor: string | undefined;
83
+ color: string | undefined;
84
+ };
85
+ '.react-datepicker__day:hover': {
86
+ backgroundColor: string | undefined;
87
+ color: string | undefined;
88
+ };
89
+ '.react-datepicker__day--in-range, .react-datepicker__day--in-selecting-range': {
90
+ backgroundColor: string | undefined;
91
+ color: string | undefined;
92
+ };
93
+ '.react-datepicker__day--selected:hover, .react-datepicker__day--keyboard-selected, .react-datepicker__day--range-start, .react-datepicker__day--range-end': {
94
+ backgroundColor: string | undefined;
95
+ color: string | undefined;
96
+ };
97
+ '.react-datepicker__day--in-range:hover, .react-datepicker__day--in-selecting-range:hover': {
98
+ backgroundColor: string | undefined;
99
+ color: string | undefined;
100
+ };
101
+ };
@@ -0,0 +1,2 @@
1
+ export * from './appearance.styles';
2
+ export * from './appearance.interfaces';
@@ -0,0 +1 @@
1
+ export declare const createInjectableBaseStyles: () => () => void;
@@ -0,0 +1 @@
1
+ export * from './base.styles';
@@ -0,0 +1,4 @@
1
+ import { AppearanceStyles } from './appearance';
2
+ import { ShapeStyles } from './shape';
3
+ export interface DatepickerStyles extends AppearanceStyles, ShapeStyles {
4
+ }
@@ -0,0 +1,3 @@
1
+ import { DatepickerStyles } from './datepicker-styles.interfaces';
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;
@@ -0,0 +1,5 @@
1
+ export * from './datepicker.styles';
2
+ export * from './datepicker-styles.interfaces';
3
+ export * from './appearance';
4
+ export * from './base';
5
+ export * from './shape';
@@ -0,0 +1,2 @@
1
+ export * from './shape.styles';
2
+ export * from './shape.interfaces';
@@ -0,0 +1,16 @@
1
+ export interface ShapeStyles {
2
+ dividerPosition?: 'middle' | 'bottom' | 'none';
3
+ dividerWidth?: number | string;
4
+ cellMargin?: number | string;
5
+ cellPadding?: number | string;
6
+ cellBorderRadius?: number | string;
7
+ cellInRangeBorderRadius?: number | string;
8
+ fontSize?: number | string;
9
+ fontFamily?: string;
10
+ fontStyle?: string;
11
+ fontWeight?: string;
12
+ inputSize?: number;
13
+ inputBorderWidth?: number | string;
14
+ inputBorderRadius?: number | string;
15
+ inputPadding?: number | string;
16
+ }
@@ -0,0 +1,91 @@
1
+ import { ShapeStyles } from './shape.interfaces';
2
+ 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) => {
3
+ '.react-datepicker__day-name, .react-datepicker__day, .react-datepicker__time-name': {
4
+ margin: string | number | undefined;
5
+ padding: string | number | undefined;
6
+ borderRadius: string | number | undefined;
7
+ fontFamily: string | undefined;
8
+ fontStyle: string | undefined;
9
+ fontWeight: string | undefined;
10
+ fontSize: string | number | undefined;
11
+ };
12
+ '.react-datepicker__day--in-range': {
13
+ borderRadius: string | number | undefined;
14
+ };
15
+ '.react-datepicker__day-name:hover, .react-datepicker__day:hover, .react-datepicker__time-name:hover, .react-datepicker__day--range-start, .react-datepicker__day--range-end': {
16
+ borderRadius: string | number | undefined;
17
+ };
18
+ '.react-datepicker__current-month': {
19
+ paddingTop: string | number | undefined;
20
+ paddingBottom: string | number | undefined;
21
+ };
22
+ '.react-datepicker__navigation': {
23
+ marginTop: string | number | undefined;
24
+ };
25
+ };
26
+ export declare const createDividerShapeStyles: (position?: "none" | "bottom" | "middle" | undefined, borderWidth?: string | number | undefined) => {
27
+ '.react-datepicker__header': {
28
+ borderStyle: string;
29
+ borderWidth: number;
30
+ borderBottomWidth: string | number | undefined;
31
+ };
32
+ '.react-datepicker__day-names': {
33
+ borderStyle: string;
34
+ borderWidth: number;
35
+ borderTopWidth: string | number | undefined;
36
+ };
37
+ };
38
+ export declare const createInputShapeStyles: (size?: number | undefined, borderWidth?: string | number | undefined, padding?: string | number | undefined, fontSize?: string | number | undefined, fontWeight?: string | undefined, fontFamily?: string | undefined, borderRadius?: string | number | undefined) => {
39
+ '.react-datepicker__input-container>input': {
40
+ height: number | undefined;
41
+ borderWidth: string | number | undefined;
42
+ fontSize: string | number | undefined;
43
+ fontWeight: string | undefined;
44
+ fontFamily: string | undefined;
45
+ padding: string | number | undefined;
46
+ borderRadius: string | number | undefined;
47
+ };
48
+ };
49
+ export declare const createShapeStyles: ({ dividerPosition, dividerWidth, cellMargin, cellPadding, cellBorderRadius, cellInRangeBorderRadius, inputSize, inputBorderWidth, inputBorderRadius, inputPadding, fontSize, fontFamily, fontStyle, fontWeight, }: ShapeStyles) => {
50
+ '.react-datepicker__input-container>input': {
51
+ height: number | undefined;
52
+ borderWidth: string | number | undefined;
53
+ fontSize: string | number | undefined;
54
+ fontWeight: string | undefined;
55
+ fontFamily: string | undefined;
56
+ padding: string | number | undefined;
57
+ borderRadius: string | number | undefined;
58
+ };
59
+ '.react-datepicker__header': {
60
+ borderStyle: string;
61
+ borderWidth: number;
62
+ borderBottomWidth: string | number | undefined;
63
+ };
64
+ '.react-datepicker__day-names': {
65
+ borderStyle: string;
66
+ borderWidth: number;
67
+ borderTopWidth: string | number | undefined;
68
+ };
69
+ '.react-datepicker__day-name, .react-datepicker__day, .react-datepicker__time-name': {
70
+ margin: string | number | undefined;
71
+ padding: string | number | undefined;
72
+ borderRadius: string | number | undefined;
73
+ fontFamily: string | undefined;
74
+ fontStyle: string | undefined;
75
+ fontWeight: string | undefined;
76
+ fontSize: string | number | undefined;
77
+ };
78
+ '.react-datepicker__day--in-range': {
79
+ borderRadius: string | number | undefined;
80
+ };
81
+ '.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
+ borderRadius: string | number | undefined;
83
+ };
84
+ '.react-datepicker__current-month': {
85
+ paddingTop: string | number | undefined;
86
+ paddingBottom: string | number | undefined;
87
+ };
88
+ '.react-datepicker__navigation': {
89
+ marginTop: string | number | undefined;
90
+ };
91
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atls-ui-parts/datepicker",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "license": "BSD-3-Clause",
5
5
  "main": "dist/index.js",
6
6
  "files": [