@alfalab/core-components-calendar-with-skeleton 3.1.3 → 4.0.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,89 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [4.0.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.2.0...@alfalab/core-components-calendar-with-skeleton@4.0.0) (2022-02-17)
7
+
8
+
9
+ * refactor/calendar-range (#984) ([714f615](https://github.com/alfa-laboratory/core-components/commit/714f61590586bafe1060e652943e95c133ed002a)), closes [#984](https://github.com/alfa-laboratory/core-components/issues/984)
10
+
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ * Большое обновление CalendarRange
15
+
16
+ * feat(date-input): add some improvements
17
+
18
+ * feat(date-input): some updates
19
+
20
+ * feat(date-input): validation
21
+
22
+ * feat(calendar): change period selection logic
23
+
24
+ * fix(calendar): range styles
25
+
26
+ * fix(calendar): fix styles, add rangeComplete flag
27
+
28
+ * refactor(calendar-range): temporary
29
+
30
+ * fix(calendar-range): fix hook
31
+
32
+ * fix(calendar-range): fix period
33
+
34
+ * fix(calendar-range): fix tests, fix max date
35
+
36
+ * fix: update exports
37
+
38
+ * feat(calendar): allow empty values for PeriodSlider, update today
39
+
40
+ * fix(calendar-range): hide error icon
41
+
42
+ * chore(calendar-range): demo
43
+
44
+ * feat(calendar): use IconButton
45
+
46
+ * feat(calendar-range): add onChange, update demo
47
+
48
+ * fix(calendar-range): update width
49
+
50
+ * test(calendar-range): update snapshot
51
+
52
+ * fix: import date-fns separately
53
+
54
+ * fix(calendar-range): fix rest props
55
+
56
+ Co-authored-by: dmitrsavk <dmitrsavk@yandex.ru>
57
+
58
+
59
+
60
+
61
+
62
+ # [3.2.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.1.5...@alfalab/core-components-calendar-with-skeleton@3.2.0) (2022-02-17)
63
+
64
+
65
+ ### Features
66
+
67
+ * **calendar:** design & logic updates ([#991](https://github.com/alfa-laboratory/core-components/issues/991)) ([358142c](https://github.com/alfa-laboratory/core-components/commit/358142c6d259e1463954139cc648787cdf461f76)), closes [#993](https://github.com/alfa-laboratory/core-components/issues/993) [#990](https://github.com/alfa-laboratory/core-components/issues/990)
68
+
69
+
70
+
71
+
72
+
73
+ ## [3.1.5](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.1.4...@alfalab/core-components-calendar-with-skeleton@3.1.5) (2022-02-15)
74
+
75
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
76
+
77
+
78
+
79
+
80
+
81
+ ## [3.1.4](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.1.3...@alfalab/core-components-calendar-with-skeleton@3.1.4) (2022-02-09)
82
+
83
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
84
+
85
+
86
+
87
+
88
+
6
89
  ## [3.1.3](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.1.2...@alfalab/core-components-calendar-with-skeleton@3.1.3) (2022-02-03)
7
90
 
8
91
  **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
package/dist/Component.js CHANGED
@@ -52,14 +52,14 @@ function __rest(s, e) {
52
52
  return t;
53
53
  }
54
54
 
55
- var styles = {"component":"calendar-with-skeleton__component_1icqk","calendarVisible":"calendar-with-skeleton__calendarVisible_1icqk","skeleton":"calendar-with-skeleton__skeleton_1icqk","header":"calendar-with-skeleton__header_1icqk","weekDays":"calendar-with-skeleton__weekDays_1icqk","row":"calendar-with-skeleton__row_1icqk","enter":"calendar-with-skeleton__enter_1icqk","enterActive":"calendar-with-skeleton__enterActive_1icqk","exit":"calendar-with-skeleton__exit_1icqk","exitActive":"calendar-with-skeleton__exitActive_1icqk"};
55
+ var styles = {"component":"calendar-with-skeleton__component_1i8o5","calendarVisible":"calendar-with-skeleton__calendarVisible_1i8o5","skeleton":"calendar-with-skeleton__skeleton_1i8o5","header":"calendar-with-skeleton__header_1i8o5","weekDays":"calendar-with-skeleton__weekDays_1i8o5","row":"calendar-with-skeleton__row_1i8o5","enter":"calendar-with-skeleton__enter_1i8o5","enterActive":"calendar-with-skeleton__enterActive_1i8o5","exit":"calendar-with-skeleton__exit_1i8o5","exitActive":"calendar-with-skeleton__exitActive_1i8o5"};
56
56
  require('./index.css')
57
57
 
58
58
  var CalendarWithSkeleton = React.forwardRef(function (_a, ref) {
59
59
  var _b;
60
- var _c = _a.calendarVisible, calendarVisible = _c === void 0 ? true : _c, _d = _a.animate, animate = _d === void 0 ? true : _d, restProps = __rest(_a, ["calendarVisible", "animate"]);
60
+ var _c = _a.calendarVisible, calendarVisible = _c === void 0 ? true : _c, _d = _a.animate, animate = _d === void 0 ? true : _d, className = _a.className, restProps = __rest(_a, ["calendarVisible", "animate", "className"]);
61
61
  var skeletonProps = { visible: true, animate: animate };
62
- return (React__default['default'].createElement("div", { className: cn__default['default'](styles.component, (_b = {},
62
+ return (React__default['default'].createElement("div", { className: cn__default['default'](styles.component, className, (_b = {},
63
63
  _b[styles.calendarVisible] = calendarVisible,
64
64
  _b)) },
65
65
  calendarVisible && React__default['default'].createElement(coreComponentsCalendar.Calendar, __assign({ ref: ref }, restProps)),
@@ -56,9 +56,9 @@ function __rest(s, e) {
56
56
 
57
57
  var CalendarWithSkeleton = React.forwardRef(function (_a, ref) {
58
58
  var _b;
59
- var _c = _a.calendarVisible, calendarVisible = _c === void 0 ? true : _c, _d = _a.animate, animate = _d === void 0 ? true : _d, restProps = __rest(_a, ["calendarVisible", "animate"]);
59
+ var _c = _a.calendarVisible, calendarVisible = _c === void 0 ? true : _c, _d = _a.animate, animate = _d === void 0 ? true : _d, className = _a.className, restProps = __rest(_a, ["calendarVisible", "animate", "className"]);
60
60
  var skeletonProps = { visible: true, animate: animate };
61
- return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].component, (_b = {},
61
+ return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].component, className, (_b = {},
62
62
  _b[styles__default['default'].calendarVisible] = calendarVisible,
63
63
  _b)) },
64
64
  calendarVisible && React__default['default'].createElement(coreComponentsCalendar.Calendar, __assign({ ref: ref }, restProps)),
@@ -43,14 +43,14 @@ function __rest(s, e) {
43
43
  return t;
44
44
  }
45
45
 
46
- var styles = {"component":"calendar-with-skeleton__component_1icqk","calendarVisible":"calendar-with-skeleton__calendarVisible_1icqk","skeleton":"calendar-with-skeleton__skeleton_1icqk","header":"calendar-with-skeleton__header_1icqk","weekDays":"calendar-with-skeleton__weekDays_1icqk","row":"calendar-with-skeleton__row_1icqk","enter":"calendar-with-skeleton__enter_1icqk","enterActive":"calendar-with-skeleton__enterActive_1icqk","exit":"calendar-with-skeleton__exit_1icqk","exitActive":"calendar-with-skeleton__exitActive_1icqk"};
46
+ var styles = {"component":"calendar-with-skeleton__component_1i8o5","calendarVisible":"calendar-with-skeleton__calendarVisible_1i8o5","skeleton":"calendar-with-skeleton__skeleton_1i8o5","header":"calendar-with-skeleton__header_1i8o5","weekDays":"calendar-with-skeleton__weekDays_1i8o5","row":"calendar-with-skeleton__row_1i8o5","enter":"calendar-with-skeleton__enter_1i8o5","enterActive":"calendar-with-skeleton__enterActive_1i8o5","exit":"calendar-with-skeleton__exit_1i8o5","exitActive":"calendar-with-skeleton__exitActive_1i8o5"};
47
47
  require('./index.css')
48
48
 
49
49
  var CalendarWithSkeleton = forwardRef(function (_a, ref) {
50
50
  var _b;
51
- var _c = _a.calendarVisible, calendarVisible = _c === void 0 ? true : _c, _d = _a.animate, animate = _d === void 0 ? true : _d, restProps = __rest(_a, ["calendarVisible", "animate"]);
51
+ var _c = _a.calendarVisible, calendarVisible = _c === void 0 ? true : _c, _d = _a.animate, animate = _d === void 0 ? true : _d, className = _a.className, restProps = __rest(_a, ["calendarVisible", "animate", "className"]);
52
52
  var skeletonProps = { visible: true, animate: animate };
53
- return (React.createElement("div", { className: cn(styles.component, (_b = {},
53
+ return (React.createElement("div", { className: cn(styles.component, className, (_b = {},
54
54
  _b[styles.calendarVisible] = calendarVisible,
55
55
  _b)) },
56
56
  calendarVisible && React.createElement(Calendar, __assign({ ref: ref }, restProps)),
@@ -1,4 +1,4 @@
1
- /* hash: 9x38g */
1
+ /* hash: 1gexr */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  }
@@ -14,15 +14,15 @@
14
14
  --gap-m: 16px;
15
15
  --gap-l: 20px;
16
16
  }
17
- .calendar-with-skeleton__component_1icqk {
17
+ .calendar-with-skeleton__component_1i8o5 {
18
18
  width: var(--calendar-width);
19
19
  height: var(--calendar-height);
20
20
  position: relative;
21
21
  }
22
- .calendar-with-skeleton__calendarVisible_1icqk {
22
+ .calendar-with-skeleton__calendarVisible_1i8o5 {
23
23
  height: auto;
24
24
  }
25
- .calendar-with-skeleton__skeleton_1icqk {
25
+ .calendar-with-skeleton__skeleton_1i8o5 {
26
26
  display: flex;
27
27
  flex-direction: column;
28
28
  padding: var(--gap-m);
@@ -37,25 +37,25 @@
37
37
  background-color: var(--color-light-bg-primary);
38
38
  background-clip: content-box;
39
39
  }
40
- .calendar-with-skeleton__header_1icqk {
40
+ .calendar-with-skeleton__header_1i8o5 {
41
41
  height: 48px;
42
42
  margin-bottom: var(--gap-l);
43
43
  }
44
- .calendar-with-skeleton__weekDays_1icqk {
44
+ .calendar-with-skeleton__weekDays_1i8o5 {
45
45
  height: 12px;
46
46
  margin-bottom: var(--gap-m);
47
47
  }
48
- .calendar-with-skeleton__row_1icqk {
48
+ .calendar-with-skeleton__row_1i8o5 {
49
49
  height: 32px
50
50
  }
51
- .calendar-with-skeleton__row_1icqk + .calendar-with-skeleton__row_1icqk {
51
+ .calendar-with-skeleton__row_1i8o5 + .calendar-with-skeleton__row_1i8o5 {
52
52
  margin-top: 10px;
53
53
  }
54
- .calendar-with-skeleton__enter_1icqk,
55
- .calendar-with-skeleton__enterActive_1icqk,
56
- .calendar-with-skeleton__exit_1icqk {
54
+ .calendar-with-skeleton__enter_1i8o5,
55
+ .calendar-with-skeleton__enterActive_1i8o5,
56
+ .calendar-with-skeleton__exit_1i8o5 {
57
57
  opacity: 1;
58
58
  }
59
- .calendar-with-skeleton__exitActive_1icqk {
59
+ .calendar-with-skeleton__exitActive_1i8o5 {
60
60
  opacity: 0;
61
61
  }
package/dist/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 9x38g */
1
+ /* hash: 1gexr */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  }
@@ -14,15 +14,15 @@
14
14
  --gap-m: 16px;
15
15
  --gap-l: 20px;
16
16
  }
17
- .calendar-with-skeleton__component_1icqk {
17
+ .calendar-with-skeleton__component_1i8o5 {
18
18
  width: var(--calendar-width);
19
19
  height: var(--calendar-height);
20
20
  position: relative;
21
21
  }
22
- .calendar-with-skeleton__calendarVisible_1icqk {
22
+ .calendar-with-skeleton__calendarVisible_1i8o5 {
23
23
  height: auto;
24
24
  }
25
- .calendar-with-skeleton__skeleton_1icqk {
25
+ .calendar-with-skeleton__skeleton_1i8o5 {
26
26
  display: flex;
27
27
  flex-direction: column;
28
28
  padding: var(--gap-m);
@@ -37,25 +37,25 @@
37
37
  background-color: var(--color-light-bg-primary);
38
38
  background-clip: content-box;
39
39
  }
40
- .calendar-with-skeleton__header_1icqk {
40
+ .calendar-with-skeleton__header_1i8o5 {
41
41
  height: 48px;
42
42
  margin-bottom: var(--gap-l);
43
43
  }
44
- .calendar-with-skeleton__weekDays_1icqk {
44
+ .calendar-with-skeleton__weekDays_1i8o5 {
45
45
  height: 12px;
46
46
  margin-bottom: var(--gap-m);
47
47
  }
48
- .calendar-with-skeleton__row_1icqk {
48
+ .calendar-with-skeleton__row_1i8o5 {
49
49
  height: 32px
50
50
  }
51
- .calendar-with-skeleton__row_1icqk + .calendar-with-skeleton__row_1icqk {
51
+ .calendar-with-skeleton__row_1i8o5 + .calendar-with-skeleton__row_1i8o5 {
52
52
  margin-top: 10px;
53
53
  }
54
- .calendar-with-skeleton__enter_1icqk,
55
- .calendar-with-skeleton__enterActive_1icqk,
56
- .calendar-with-skeleton__exit_1icqk {
54
+ .calendar-with-skeleton__enter_1i8o5,
55
+ .calendar-with-skeleton__enterActive_1i8o5,
56
+ .calendar-with-skeleton__exit_1i8o5 {
57
57
  opacity: 1;
58
58
  }
59
- .calendar-with-skeleton__exitActive_1icqk {
59
+ .calendar-with-skeleton__exitActive_1i8o5 {
60
60
  opacity: 0;
61
61
  }
@@ -4,12 +4,12 @@ import { CSSTransition } from 'react-transition-group';
4
4
  import { Skeleton } from '@alfalab/core-components-skeleton/dist/modern';
5
5
  import { Calendar } from '@alfalab/core-components-calendar/dist/modern';
6
6
 
7
- var styles = {"component":"calendar-with-skeleton__component_1icqk","calendarVisible":"calendar-with-skeleton__calendarVisible_1icqk","skeleton":"calendar-with-skeleton__skeleton_1icqk","header":"calendar-with-skeleton__header_1icqk","weekDays":"calendar-with-skeleton__weekDays_1icqk","row":"calendar-with-skeleton__row_1icqk","enter":"calendar-with-skeleton__enter_1icqk","enterActive":"calendar-with-skeleton__enterActive_1icqk","exit":"calendar-with-skeleton__exit_1icqk","exitActive":"calendar-with-skeleton__exitActive_1icqk"};
7
+ var styles = {"component":"calendar-with-skeleton__component_1i8o5","calendarVisible":"calendar-with-skeleton__calendarVisible_1i8o5","skeleton":"calendar-with-skeleton__skeleton_1i8o5","header":"calendar-with-skeleton__header_1i8o5","weekDays":"calendar-with-skeleton__weekDays_1i8o5","row":"calendar-with-skeleton__row_1i8o5","enter":"calendar-with-skeleton__enter_1i8o5","enterActive":"calendar-with-skeleton__enterActive_1i8o5","exit":"calendar-with-skeleton__exit_1i8o5","exitActive":"calendar-with-skeleton__exitActive_1i8o5"};
8
8
  require('./index.css')
9
9
 
10
- const CalendarWithSkeleton = forwardRef(({ calendarVisible = true, animate = true, ...restProps }, ref) => {
10
+ const CalendarWithSkeleton = forwardRef(({ calendarVisible = true, animate = true, className, ...restProps }, ref) => {
11
11
  const skeletonProps = { visible: true, animate };
12
- return (React.createElement("div", { className: cn(styles.component, {
12
+ return (React.createElement("div", { className: cn(styles.component, className, {
13
13
  [styles.calendarVisible]: calendarVisible,
14
14
  }) },
15
15
  calendarVisible && React.createElement(Calendar, Object.assign({ ref: ref }, restProps)),
@@ -1,4 +1,4 @@
1
- /* hash: 9x38g */
1
+ /* hash: 1gexr */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  }
@@ -14,15 +14,15 @@
14
14
  --gap-m: 16px;
15
15
  --gap-l: 20px;
16
16
  }
17
- .calendar-with-skeleton__component_1icqk {
17
+ .calendar-with-skeleton__component_1i8o5 {
18
18
  width: var(--calendar-width);
19
19
  height: var(--calendar-height);
20
20
  position: relative;
21
21
  }
22
- .calendar-with-skeleton__calendarVisible_1icqk {
22
+ .calendar-with-skeleton__calendarVisible_1i8o5 {
23
23
  height: auto;
24
24
  }
25
- .calendar-with-skeleton__skeleton_1icqk {
25
+ .calendar-with-skeleton__skeleton_1i8o5 {
26
26
  display: flex;
27
27
  flex-direction: column;
28
28
  padding: var(--gap-m);
@@ -37,25 +37,25 @@
37
37
  background-color: var(--color-light-bg-primary);
38
38
  background-clip: content-box;
39
39
  }
40
- .calendar-with-skeleton__header_1icqk {
40
+ .calendar-with-skeleton__header_1i8o5 {
41
41
  height: 48px;
42
42
  margin-bottom: var(--gap-l);
43
43
  }
44
- .calendar-with-skeleton__weekDays_1icqk {
44
+ .calendar-with-skeleton__weekDays_1i8o5 {
45
45
  height: 12px;
46
46
  margin-bottom: var(--gap-m);
47
47
  }
48
- .calendar-with-skeleton__row_1icqk {
48
+ .calendar-with-skeleton__row_1i8o5 {
49
49
  height: 32px
50
50
  }
51
- .calendar-with-skeleton__row_1icqk + .calendar-with-skeleton__row_1icqk {
51
+ .calendar-with-skeleton__row_1i8o5 + .calendar-with-skeleton__row_1i8o5 {
52
52
  margin-top: 10px;
53
53
  }
54
- .calendar-with-skeleton__enter_1icqk,
55
- .calendar-with-skeleton__enterActive_1icqk,
56
- .calendar-with-skeleton__exit_1icqk {
54
+ .calendar-with-skeleton__enter_1i8o5,
55
+ .calendar-with-skeleton__enterActive_1i8o5,
56
+ .calendar-with-skeleton__exit_1i8o5 {
57
57
  opacity: 1;
58
58
  }
59
- .calendar-with-skeleton__exitActive_1icqk {
59
+ .calendar-with-skeleton__exitActive_1i8o5 {
60
60
  opacity: 0;
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-calendar-with-skeleton",
3
- "version": "3.1.3",
3
+ "version": "4.0.0",
4
4
  "description": "CalendarWithSkeleton component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -20,10 +20,10 @@
20
20
  "react-dom": "^16.9.0 || ^17.0.1"
21
21
  },
22
22
  "dependencies": {
23
- "@alfalab/core-components-calendar": "^4.2.2",
23
+ "@alfalab/core-components-calendar": "^5.0.0",
24
24
  "@alfalab/core-components-skeleton": "^3.0.2",
25
25
  "classnames": "^2.2.6",
26
26
  "react-transition-group": "^4.3.0"
27
27
  },
28
- "gitHead": "48cb31b47c9ac5d7ff92314684699edb9d6d68f0"
28
+ "gitHead": "c807c08f187316e93147175be6feffc3492989c8"
29
29
  }