@atls-ui-parts/datepicker 0.0.8 → 0.0.9

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.
@@ -5,19 +5,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Datepicker = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
- const react_2 = require("react");
9
8
  const react_datepicker_1 = __importDefault(require("react-datepicker"));
9
+ const react_2 = require("react");
10
10
  const react_datepicker_2 = require("react-datepicker");
11
11
  const locales_1 = require("./locales");
12
12
  const styles_1 = require("./styles");
13
13
  const Datepicker = (props) => {
14
- react_2.useEffect(() => {
15
- locales_1.registerLocales();
16
- react_datepicker_2.setDefaultLocale('ru');
14
+ (0, react_2.useEffect)(() => {
15
+ (0, locales_1.registerLocales)();
16
+ (0, react_datepicker_2.setDefaultLocale)('ru');
17
17
  }, []);
18
- react_2.useEffect(() => {
19
- styles_1.createAndInjectDatepickerStyles(props);
18
+ (0, react_2.useEffect)(() => {
19
+ (0, styles_1.createAndInjectDatepickerStyles)(props);
20
20
  }, [props]);
21
- return react_1.default.createElement(react_datepicker_1.default, Object.assign({}, props));
21
+ return react_1.default.createElement(react_datepicker_1.default, { ...props });
22
22
  };
23
23
  exports.Datepicker = Datepicker;
@@ -1,36 +1,21 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
20
4
  };
21
5
  Object.defineProperty(exports, "__esModule", { value: true });
22
6
  exports.Datepicker = void 0;
23
- const react_1 = __importStar(require("react"));
7
+ const react_1 = __importDefault(require("react"));
24
8
  const react_2 = require("react");
9
+ const react_3 = require("react");
25
10
  const input_1 = require("@atls-ui-proto/input");
26
11
  const datepicker_component_1 = require("./datepicker.component");
27
12
  exports.default = {
28
13
  title: 'Components/Datepicker',
29
14
  };
30
- const CustomInput = react_1.forwardRef(({ value, onClick, customValue }, ref) => (react_1.default.createElement(input_1.Input, { ref: ref, value: customValue, onClick: onClick })));
15
+ const CustomInput = (0, react_2.forwardRef)(({ value, onClick, customValue }, ref) => (react_1.default.createElement(input_1.Input, { ref: ref, value: customValue, onClick: onClick })));
31
16
  const Datepicker = (props) => {
32
- const [startDate, setStartDate] = react_2.useState(new Date('2021/06/07'));
33
- const [endDate, setEndDate] = react_2.useState(new Date('2021/06/17'));
17
+ const [startDate, setStartDate] = (0, react_3.useState)(new Date('2021/06/07'));
18
+ const [endDate, setEndDate] = (0, react_3.useState)(new Date('2021/06/17'));
34
19
  const handleDateChange = (date) => {
35
20
  if (date.getTime() > endDate.getTime()) {
36
21
  setStartDate(endDate);
@@ -40,7 +25,7 @@ const Datepicker = (props) => {
40
25
  setStartDate(date);
41
26
  };
42
27
  const dateRangeValue = `${Intl.DateTimeFormat('ru').format(startDate)}-${Intl.DateTimeFormat('ru').format(endDate)}`;
43
- return (react_1.default.createElement(datepicker_component_1.Datepicker, Object.assign({ isClearable: true, strictParsing: true, dateFormat: 'dd.MM.yy', startDate: startDate, endDate: endDate, selected: startDate, onChange: handleDateChange, customInput: react_1.default.createElement(CustomInput, { customValue: dateRangeValue }) }, props)));
28
+ return (react_1.default.createElement(datepicker_component_1.Datepicker, { isClearable: true, strictParsing: true, dateFormat: 'dd.MM.yy', startDate: startDate, endDate: endDate, selected: startDate, onChange: handleDateChange, customInput: react_1.default.createElement(CustomInput, { customValue: dateRangeValue }), ...props }));
44
29
  };
45
30
  exports.Datepicker = Datepicker;
46
31
  exports.Datepicker.args = {
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.enAU = exports.ru = void 0;
7
- const ru_1 = __importDefault(require("date-fns/locale/ru"));
8
- exports.ru = ru_1.default;
9
7
  const en_AU_1 = __importDefault(require("date-fns/locale/en-AU"));
10
8
  exports.enAU = en_AU_1.default;
9
+ const ru_1 = __importDefault(require("date-fns/locale/ru"));
10
+ exports.ru = ru_1.default;
@@ -5,7 +5,7 @@ const react_datepicker_1 = require("react-datepicker");
5
5
  const locales_1 = require("./locales");
6
6
  const locales_2 = require("./locales");
7
7
  const registerLocales = () => {
8
- react_datepicker_1.registerLocale('ru', locales_1.ru);
9
- react_datepicker_1.registerLocale('en-AU', locales_2.enAU);
8
+ (0, react_datepicker_1.registerLocale)('ru', locales_1.ru);
9
+ (0, react_datepicker_1.registerLocale)('en-AU', locales_2.enAU);
10
10
  };
11
11
  exports.registerLocales = registerLocales;
@@ -60,5 +60,11 @@ const createInputColorStyles = (backgroundColor, borderColor, activeBorderColor)
60
60
  },
61
61
  });
62
62
  exports.createInputColorStyles = createInputColorStyles;
63
- const createAppearanceStyles = ({ arrowColor, arrowHoverColor, cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor, dividerColor, headerBackgroundColor, inputBackgroundColor, inputBorderColor, inputActiveBorderColor, }) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, exports.createCellColorStyles(cellColor, cellFontColor, cellActiveColor, cellActiveFontColor, cellHoverColor, cellHoverFontColor, cellInRangeColor, cellInRangeFontColor, cellInRangeHoverColor, cellInRangeHoverFontColor)), exports.createArrowColorStyles(arrowColor, arrowHoverColor)), exports.createHeaderColorStyles(headerBackgroundColor, dividerColor)), exports.createDividerColorStyles(dividerColor)), exports.createInputColorStyles(inputBackgroundColor, inputBorderColor, inputActiveBorderColor)));
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),
65
+ ...(0, exports.createArrowColorStyles)(arrowColor, arrowHoverColor),
66
+ ...(0, exports.createHeaderColorStyles)(headerBackgroundColor, dividerColor),
67
+ ...(0, exports.createDividerColorStyles)(dividerColor),
68
+ ...(0, exports.createInputColorStyles)(inputBackgroundColor, inputBorderColor, inputActiveBorderColor),
69
+ });
64
70
  exports.createAppearanceStyles = createAppearanceStyles;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createInjectableBaseStyles = void 0;
4
4
  const css_1 = require("@emotion/css");
5
- const createInjectableBaseStyles = () => () => css_1.injectGlobal `
5
+ const createInjectableBaseStyles = () => () => (0, css_1.injectGlobal) `
6
6
  .react-datepicker__input-container>input {
7
7
  box-sizing: border-box;
8
8
  box-shadow: none;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createAndInjectDatepickerStyles = exports.injectBaseStyles = void 0;
4
4
  const css_1 = require("@emotion/css");
5
- const base_1 = require("./base");
6
5
  const appearance_1 = require("./appearance");
6
+ const base_1 = require("./base");
7
7
  const shape_1 = require("./shape");
8
- exports.injectBaseStyles = base_1.createInjectableBaseStyles();
8
+ exports.injectBaseStyles = (0, base_1.createInjectableBaseStyles)();
9
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, }) => {
10
- exports.injectBaseStyles();
11
- css_1.injectGlobal(appearance_1.createAppearanceStyles({
10
+ (0, exports.injectBaseStyles)();
11
+ (0, css_1.injectGlobal)((0, appearance_1.createAppearanceStyles)({
12
12
  arrowColor,
13
13
  arrowHoverColor,
14
14
  cellColor,
@@ -27,7 +27,7 @@ const createAndInjectDatepickerStyles = ({ arrowColor, arrowHoverColor, cellColo
27
27
  inputBorderColor,
28
28
  inputActiveBorderColor,
29
29
  }));
30
- css_1.injectGlobal(shape_1.createShapeStyles({
30
+ (0, css_1.injectGlobal)((0, shape_1.createShapeStyles)({
31
31
  cellMargin,
32
32
  cellPadding,
33
33
  cellBorderRadius,
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -51,5 +51,9 @@ const createInputShapeStyles = (size, borderWidth, padding, fontSize, fontWeight
51
51
  },
52
52
  });
53
53
  exports.createInputShapeStyles = createInputShapeStyles;
54
- const createShapeStyles = ({ dividerPosition, dividerWidth, cellMargin, cellPadding, cellBorderRadius, cellInRangeBorderRadius, inputSize, inputBorderWidth, inputBorderRadius, inputPadding, fontSize, fontFamily, fontStyle, fontWeight, }) => (Object.assign(Object.assign(Object.assign({}, exports.createCellShapeStyles(cellMargin, cellPadding, cellBorderRadius, cellInRangeBorderRadius, fontSize, fontFamily, fontStyle, fontWeight)), exports.createDividerShapeStyles(dividerPosition, dividerWidth)), exports.createInputShapeStyles(inputSize, inputBorderWidth, inputPadding, fontSize, fontWeight, fontFamily, inputBorderRadius)));
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),
56
+ ...(0, exports.createDividerShapeStyles)(dividerPosition, dividerWidth),
57
+ ...(0, exports.createInputShapeStyles)(inputSize, inputBorderWidth, inputPadding, fontSize, fontWeight, fontFamily, inputBorderRadius),
58
+ });
55
59
  exports.createShapeStyles = createShapeStyles;
package/package.json CHANGED
@@ -1,24 +1,15 @@
1
1
  {
2
2
  "name": "@atls-ui-parts/datepicker",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "license": "BSD-3-Clause",
5
5
  "main": "dist/index.js",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "scripts": {
10
- "build": "yarn app library build",
11
- "postpack": "rm -rf dist",
12
- "prepack": "yarn run build"
13
- },
14
- "devDependencies": {
15
- "@atls-ui-proto/input": "0.0.9",
16
- "@emotion/styled": "^11.3.0",
17
- "@types/react": "^17.0.3",
18
- "@types/react-datepicker": "^3.1.8",
19
- "@types/styled-system": "^5.1.11",
20
- "react": "^17.0.2",
21
- "styled-system": "^5.1.5"
10
+ "build": "yarn library build",
11
+ "prepack": "yarn run build",
12
+ "postpack": "rm -rf dist"
22
13
  },
23
14
  "dependencies": {
24
15
  "@emotion/css": "^11.1.3",
@@ -28,6 +19,15 @@
28
19
  "react-datepicker": "^4.1.1",
29
20
  "styled-system": "^5.1.5"
30
21
  },
22
+ "devDependencies": {
23
+ "@atls-ui-proto/input": "0.0.10",
24
+ "@emotion/styled": "^11.3.0",
25
+ "@types/react": "^18.0.7",
26
+ "@types/react-datepicker": "^3.1.8",
27
+ "@types/styled-system": "^5.1.11",
28
+ "react": "^17.0.2",
29
+ "styled-system": "^5.1.5"
30
+ },
31
31
  "publishConfig": {
32
32
  "access": "public",
33
33
  "main": "dist/index.js",
@@ -1,4 +0,0 @@
1
- import { FC } from 'react';
2
- import { DatepickerProps } from './datepicker.interface';
3
- declare const Datepicker: FC<DatepickerProps>;
4
- export { Datepicker };
@@ -1,4 +0,0 @@
1
- import { ReactDatePickerProps } from 'react-datepicker';
2
- import { DatepickerStyles } from './styles';
3
- export interface DatepickerProps extends DatepickerStyles, ReactDatePickerProps {
4
- }
@@ -1,338 +0,0 @@
1
- declare const _default: {
2
- title: string;
3
- };
4
- export default _default;
5
- export declare const Datepicker: {
6
- (props: any): JSX.Element;
7
- args: {
8
- arrowColor: string;
9
- arrowHoverColor: string;
10
- cellColor: null;
11
- cellFontColor: string;
12
- cellActiveColor: string;
13
- cellActiveFontColor: string;
14
- cellHoverColor: null;
15
- cellHoverFontColor: null;
16
- cellInRangeBorderRadius: number;
17
- cellInRangeColor: string;
18
- cellInRangeFontColor: string;
19
- cellInRangeHoverColor: string;
20
- cellInRangeHoverFontColor: string;
21
- cellMargin: number;
22
- cellPadding: number;
23
- cellBorderRadius: number;
24
- dividerPosition: string;
25
- dividerWidth: string;
26
- dividerColor: string;
27
- fontFamily: string;
28
- fontStyle: string;
29
- fontWeight: number;
30
- headerBackgroundColor: string;
31
- inputActiveBorderColor: string;
32
- inputBorderColor: string;
33
- inputBorderWidth: number;
34
- inputBorderRadius: number;
35
- inputPadding: string;
36
- };
37
- argTypes: {
38
- arrowColor: {
39
- name: string;
40
- description: string;
41
- table: {
42
- category: string;
43
- subcategory: string;
44
- };
45
- control: {
46
- type: string;
47
- };
48
- };
49
- arrowHoverColor: {
50
- name: string;
51
- description: string;
52
- table: {
53
- category: string;
54
- subcategory: string;
55
- };
56
- control: {
57
- type: string;
58
- };
59
- };
60
- cellColor: {
61
- name: string;
62
- description: string;
63
- table: {
64
- category: string;
65
- subcategory: string;
66
- };
67
- control: {
68
- type: string;
69
- };
70
- };
71
- cellFontColor: {
72
- name: string;
73
- description: string;
74
- table: {
75
- category: string;
76
- subcategory: string;
77
- };
78
- control: {
79
- type: string;
80
- };
81
- };
82
- cellActiveColor: {
83
- name: string;
84
- description: string;
85
- table: {
86
- category: string;
87
- subcategory: string;
88
- };
89
- control: {
90
- type: string;
91
- };
92
- };
93
- cellActiveFontColor: {
94
- name: string;
95
- description: string;
96
- table: {
97
- category: string;
98
- subcategory: string;
99
- };
100
- control: {
101
- type: string;
102
- };
103
- };
104
- cellHoverColor: {
105
- name: string;
106
- description: string;
107
- table: {
108
- category: string;
109
- subcategory: string;
110
- };
111
- control: {
112
- type: string;
113
- };
114
- };
115
- cellHoverFontColor: {
116
- name: string;
117
- description: string;
118
- table: {
119
- category: string;
120
- subcategory: string;
121
- };
122
- control: {
123
- type: string;
124
- };
125
- };
126
- cellMargin: {
127
- name: string;
128
- description: string;
129
- table: {
130
- category: string;
131
- };
132
- control: {
133
- type: string;
134
- };
135
- };
136
- cellPadding: {
137
- name: string;
138
- description: string;
139
- table: {
140
- category: string;
141
- };
142
- control: {
143
- type: string;
144
- };
145
- };
146
- cellBorderRadius: {
147
- name: string;
148
- description: string;
149
- table: {
150
- category: string;
151
- };
152
- control: {
153
- type: string;
154
- };
155
- };
156
- cellInRangeBorderRadius: {
157
- name: string;
158
- description: string;
159
- table: {
160
- category: string;
161
- };
162
- control: {
163
- type: string;
164
- };
165
- };
166
- cellInRangeColor: {
167
- name: string;
168
- description: string;
169
- table: {
170
- category: string;
171
- subcategory: string;
172
- };
173
- control: {
174
- type: string;
175
- };
176
- };
177
- cellInRangeFontColor: {
178
- name: string;
179
- description: string;
180
- table: {
181
- category: string;
182
- subcategory: string;
183
- };
184
- control: {
185
- type: string;
186
- };
187
- };
188
- cellInRangeHoverColor: {
189
- name: string;
190
- description: string;
191
- table: {
192
- category: string;
193
- subcategory: string;
194
- };
195
- control: {
196
- type: string;
197
- };
198
- };
199
- cellInRangeHoverFontColor: {
200
- name: string;
201
- description: string;
202
- table: {
203
- category: string;
204
- subcategory: string;
205
- };
206
- control: {
207
- type: string;
208
- };
209
- };
210
- headerBackgroundColor: {
211
- name: string;
212
- description: string;
213
- table: {
214
- category: string;
215
- subcategory: string;
216
- };
217
- control: {
218
- type: string;
219
- };
220
- };
221
- inputBorderColor: {
222
- name: string;
223
- description: string;
224
- table: {
225
- category: string;
226
- subcategory: string;
227
- };
228
- control: {
229
- type: string;
230
- };
231
- };
232
- inputActiveBorderColor: {
233
- name: string;
234
- description: string;
235
- table: {
236
- category: string;
237
- subcategory: string;
238
- };
239
- control: {
240
- type: string;
241
- };
242
- };
243
- inputBorderWidth: {
244
- name: string;
245
- description: string;
246
- table: {
247
- category: string;
248
- };
249
- control: {
250
- type: string;
251
- };
252
- };
253
- inputBorderRadius: {
254
- name: string;
255
- description: string;
256
- table: {
257
- category: string;
258
- };
259
- control: {
260
- type: string;
261
- };
262
- };
263
- inputPadding: {
264
- name: string;
265
- description: string;
266
- table: {
267
- category: string;
268
- };
269
- control: {
270
- type: string;
271
- };
272
- };
273
- dividerPosition: {
274
- name: string;
275
- description: string;
276
- table: {
277
- category: string;
278
- };
279
- control: {
280
- type: string;
281
- options: string[];
282
- };
283
- };
284
- dividerWidth: {
285
- name: string;
286
- description: string;
287
- table: {
288
- category: string;
289
- };
290
- control: {
291
- type: string;
292
- };
293
- };
294
- dividerColor: {
295
- name: string;
296
- description: string;
297
- table: {
298
- category: string;
299
- subcategory: string;
300
- };
301
- control: {
302
- type: string;
303
- };
304
- };
305
- fontFamily: {
306
- name: string;
307
- description: string;
308
- table: {
309
- category: string;
310
- };
311
- control: {
312
- type: string;
313
- };
314
- };
315
- fontWeight: {
316
- name: string;
317
- description: string;
318
- table: {
319
- category: string;
320
- };
321
- control: {
322
- type: string;
323
- options: string[];
324
- };
325
- };
326
- fontStyle: {
327
- name: string;
328
- description: string;
329
- table: {
330
- category: string;
331
- };
332
- control: {
333
- type: string;
334
- options: string[];
335
- };
336
- };
337
- };
338
- };
package/dist/index.d.ts DELETED
File without changes
@@ -1,2 +0,0 @@
1
- export * from './locales';
2
- export * from './register-locales';
@@ -1,3 +0,0 @@
1
- import ru from 'date-fns/locale/ru';
2
- import enAU from 'date-fns/locale/en-AU';
3
- export { ru, enAU };
@@ -1,2 +0,0 @@
1
- declare const registerLocales: () => void;
2
- export { registerLocales };
@@ -1,19 +0,0 @@
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
- }
@@ -1,101 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
1
- export * from './appearance.styles';
2
- export * from './appearance.interfaces';
@@ -1 +0,0 @@
1
- export declare const createInjectableBaseStyles: () => () => void;
@@ -1 +0,0 @@
1
- export * from './base.styles';
@@ -1,4 +0,0 @@
1
- import { AppearanceStyles } from './appearance';
2
- import { ShapeStyles } from './shape';
3
- export interface DatepickerStyles extends AppearanceStyles, ShapeStyles {
4
- }
@@ -1,3 +0,0 @@
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;
@@ -1,5 +0,0 @@
1
- export * from './datepicker.styles';
2
- export * from './datepicker-styles.interfaces';
3
- export * from './appearance';
4
- export * from './base';
5
- export * from './shape';
@@ -1,2 +0,0 @@
1
- export * from './shape.styles';
2
- export * from './shape.interfaces';
@@ -1,16 +0,0 @@
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
- }
@@ -1,91 +0,0 @@
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
- };