@alfalab/core-components-calendar-with-skeleton 3.0.7

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 ADDED
@@ -0,0 +1,165 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [3.0.7](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.0.6...@alfalab/core-components-calendar-with-skeleton@3.0.7) (2021-09-14)
7
+
8
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.0.6](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.0.5...@alfalab/core-components-calendar-with-skeleton@3.0.6) (2021-08-27)
15
+
16
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
17
+
18
+
19
+
20
+
21
+
22
+ ## [3.0.5](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.0.4...@alfalab/core-components-calendar-with-skeleton@3.0.5) (2021-08-13)
23
+
24
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
25
+
26
+
27
+
28
+
29
+
30
+ ## [3.0.4](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.0.3...@alfalab/core-components-calendar-with-skeleton@3.0.4) (2021-08-04)
31
+
32
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
33
+
34
+
35
+
36
+
37
+
38
+ ## [3.0.3](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.0.2...@alfalab/core-components-calendar-with-skeleton@3.0.3) (2021-07-23)
39
+
40
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
41
+
42
+
43
+
44
+
45
+
46
+ ## [3.0.2](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.0.1...@alfalab/core-components-calendar-with-skeleton@3.0.2) (2021-07-19)
47
+
48
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
49
+
50
+
51
+
52
+
53
+
54
+ ## [3.0.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@3.0.0...@alfalab/core-components-calendar-with-skeleton@3.0.1) (2021-07-09)
55
+
56
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
57
+
58
+
59
+
60
+
61
+
62
+ # [3.0.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@2.0.5...@alfalab/core-components-calendar-with-skeleton@3.0.0) (2021-07-08)
63
+
64
+
65
+ ### Features
66
+
67
+ * upgrade storybook ([#696](https://github.com/alfa-laboratory/core-components/issues/696))
68
+
69
+ ## [2.0.5](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@2.0.4...@alfalab/core-components-calendar-with-skeleton@2.0.5) (2021-06-28)
70
+
71
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
72
+
73
+
74
+
75
+
76
+
77
+ ## [2.0.4](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@2.0.3...@alfalab/core-components-calendar-with-skeleton@2.0.4) (2021-06-22)
78
+
79
+
80
+ ### Bug Fixes
81
+
82
+ * **calendar-with-skeleton:** ref & six weeks height issues ([#705](https://github.com/alfa-laboratory/core-components/issues/705)) ([907ebe1](https://github.com/alfa-laboratory/core-components/commit/907ebe18641ee2e7e91fc4622527404c20867a54))
83
+
84
+
85
+
86
+
87
+
88
+ ## [2.0.3](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@2.0.2...@alfalab/core-components-calendar-with-skeleton@2.0.3) (2021-06-09)
89
+
90
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
91
+
92
+
93
+
94
+
95
+
96
+ ## [2.0.2](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@2.0.1...@alfalab/core-components-calendar-with-skeleton@2.0.2) (2021-06-08)
97
+
98
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
99
+
100
+
101
+
102
+
103
+
104
+ ## [2.0.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@2.0.0...@alfalab/core-components-calendar-with-skeleton@2.0.1) (2021-05-31)
105
+
106
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
107
+
108
+
109
+
110
+
111
+
112
+ # [2.0.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@1.1.4...@alfalab/core-components-calendar-with-skeleton@2.0.0) (2021-05-25)
113
+
114
+
115
+ ### Features
116
+
117
+ * **button:** add inverted ([#649](https://github.com/alfa-laboratory/core-components/issues/649)) ([be321b0](https://github.com/alfa-laboratory/core-components/commit/be321b07e99d20824138ad65141f3fbed1b6e315)), closes [#658](https://github.com/alfa-laboratory/core-components/issues/658) [#657](https://github.com/alfa-laboratory/core-components/issues/657)
118
+
119
+
120
+ ### BREAKING CHANGES
121
+
122
+ * **button:** remove inverted themes
123
+
124
+
125
+
126
+
127
+
128
+ ## [1.1.4](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@1.1.3...@alfalab/core-components-calendar-with-skeleton@1.1.4) (2021-05-25)
129
+
130
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
131
+
132
+
133
+
134
+
135
+
136
+ ## [1.1.3](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@1.1.2...@alfalab/core-components-calendar-with-skeleton@1.1.3) (2021-05-18)
137
+
138
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
139
+
140
+
141
+
142
+
143
+
144
+ ## [1.1.2](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@1.1.1...@alfalab/core-components-calendar-with-skeleton@1.1.2) (2021-05-07)
145
+
146
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
147
+
148
+
149
+
150
+
151
+
152
+ ## [1.1.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-calendar-with-skeleton@1.1.0...@alfalab/core-components-calendar-with-skeleton@1.1.1) (2021-04-26)
153
+
154
+ **Note:** Version bump only for package @alfalab/core-components-calendar-with-skeleton
155
+
156
+
157
+
158
+
159
+
160
+ # 1.1.0 (2021-04-09)
161
+
162
+
163
+ ### Features
164
+
165
+ * **calendar-with-skeleton:** add component ([e940c88](https://github.com/alfa-laboratory/core-components/commit/e940c88703a7434e0db4ce0efc27a234455b449c))
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { CalendarProps } from "@alfalab/core-components-calendar";
4
+ type CalendarWithSkeletonProps = CalendarProps & {
5
+ /**
6
+ * Флаг включения анимации скелета
7
+ */
8
+ animate?: boolean;
9
+ /**
10
+ * Флаг управлением видимостью календаря
11
+ */
12
+ calendarVisible?: boolean;
13
+ };
14
+ declare const CalendarWithSkeleton: React.ForwardRefExoticComponent<CalendarProps & {
15
+ /**
16
+ * Флаг включения анимации скелета
17
+ */
18
+ animate?: boolean | undefined;
19
+ /**
20
+ * Флаг управлением видимостью календаря
21
+ */
22
+ calendarVisible?: boolean | undefined;
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ export { CalendarWithSkeletonProps, CalendarWithSkeleton };
@@ -0,0 +1,77 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var cn = require('classnames');
7
+ var reactTransitionGroup = require('react-transition-group');
8
+ var coreComponentsSkeleton = require('@alfalab/core-components-skeleton');
9
+ var coreComponentsCalendar = require('@alfalab/core-components-calendar');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
+ var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
15
+
16
+ /*! *****************************************************************************
17
+ Copyright (c) Microsoft Corporation.
18
+
19
+ Permission to use, copy, modify, and/or distribute this software for any
20
+ purpose with or without fee is hereby granted.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
23
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
24
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
25
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
26
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
27
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28
+ PERFORMANCE OF THIS SOFTWARE.
29
+ ***************************************************************************** */
30
+ var __assign = function () {
31
+ __assign = Object.assign || function __assign(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s)
35
+ if (Object.prototype.hasOwnProperty.call(s, p))
36
+ t[p] = s[p];
37
+ }
38
+ return t;
39
+ };
40
+ return __assign.apply(this, arguments);
41
+ };
42
+ function __rest(s, e) {
43
+ var t = {};
44
+ for (var p in s)
45
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
46
+ t[p] = s[p];
47
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
48
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
49
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
50
+ t[p[i]] = s[p[i]];
51
+ }
52
+ return t;
53
+ }
54
+
55
+ var styles = {"component":"calendar-with-skeleton__component_tfm97","calendarVisible":"calendar-with-skeleton__calendarVisible_tfm97","skeleton":"calendar-with-skeleton__skeleton_tfm97","header":"calendar-with-skeleton__header_tfm97","weekDays":"calendar-with-skeleton__weekDays_tfm97","row":"calendar-with-skeleton__row_tfm97","enter":"calendar-with-skeleton__enter_tfm97","enterActive":"calendar-with-skeleton__enterActive_tfm97","exit":"calendar-with-skeleton__exit_tfm97","exitActive":"calendar-with-skeleton__exitActive_tfm97"};
56
+ require('./index.css')
57
+
58
+ var CalendarWithSkeleton = React.forwardRef(function (_a, ref) {
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"]);
61
+ var skeletonProps = { visible: true, animate: animate };
62
+ return (React__default['default'].createElement("div", { className: cn__default['default'](styles.component, (_b = {},
63
+ _b[styles.calendarVisible] = calendarVisible,
64
+ _b)) },
65
+ calendarVisible && React__default['default'].createElement(coreComponentsCalendar.Calendar, __assign({ ref: ref }, restProps)),
66
+ React__default['default'].createElement(reactTransitionGroup.CSSTransition, { in: !calendarVisible, timeout: 200, unmountOnExit: true, classNames: styles },
67
+ React__default['default'].createElement("div", { className: styles.skeleton, ref: calendarVisible ? undefined : ref },
68
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles.header })),
69
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles.weekDays })),
70
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles.row })),
71
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles.row })),
72
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles.row })),
73
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles.row })),
74
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles.row }))))));
75
+ });
76
+
77
+ exports.CalendarWithSkeleton = CalendarWithSkeleton;
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { CalendarProps } from "@alfalab/core-components-calendar";
4
+ type CalendarWithSkeletonProps = CalendarProps & {
5
+ /**
6
+ * Флаг включения анимации скелета
7
+ */
8
+ animate?: boolean;
9
+ /**
10
+ * Флаг управлением видимостью календаря
11
+ */
12
+ calendarVisible?: boolean;
13
+ };
14
+ declare const CalendarWithSkeleton: React.ForwardRefExoticComponent<CalendarProps & {
15
+ /**
16
+ * Флаг включения анимации скелета
17
+ */
18
+ animate?: boolean | undefined;
19
+ /**
20
+ * Флаг управлением видимостью календаря
21
+ */
22
+ calendarVisible?: boolean | undefined;
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ export { CalendarWithSkeletonProps, CalendarWithSkeleton };
@@ -0,0 +1,76 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var cn = require('classnames');
7
+ var reactTransitionGroup = require('react-transition-group');
8
+ var coreComponentsSkeleton = require('@alfalab/core-components-skeleton/dist/cssm');
9
+ var coreComponentsCalendar = require('@alfalab/core-components-calendar/dist/cssm');
10
+ var styles = require('./index.module.css');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
+ var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
16
+ var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
17
+
18
+ /*! *****************************************************************************
19
+ Copyright (c) Microsoft Corporation.
20
+
21
+ Permission to use, copy, modify, and/or distribute this software for any
22
+ purpose with or without fee is hereby granted.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
25
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
26
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
27
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
28
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
29
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
30
+ PERFORMANCE OF THIS SOFTWARE.
31
+ ***************************************************************************** */
32
+ var __assign = function () {
33
+ __assign = Object.assign || function __assign(t) {
34
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
35
+ s = arguments[i];
36
+ for (var p in s)
37
+ if (Object.prototype.hasOwnProperty.call(s, p))
38
+ t[p] = s[p];
39
+ }
40
+ return t;
41
+ };
42
+ return __assign.apply(this, arguments);
43
+ };
44
+ function __rest(s, e) {
45
+ var t = {};
46
+ for (var p in s)
47
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ }
56
+
57
+ var CalendarWithSkeleton = React.forwardRef(function (_a, ref) {
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"]);
60
+ var skeletonProps = { visible: true, animate: animate };
61
+ return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].component, (_b = {},
62
+ _b[styles__default['default'].calendarVisible] = calendarVisible,
63
+ _b)) },
64
+ calendarVisible && React__default['default'].createElement(coreComponentsCalendar.Calendar, __assign({ ref: ref }, restProps)),
65
+ React__default['default'].createElement(reactTransitionGroup.CSSTransition, { in: !calendarVisible, timeout: 200, unmountOnExit: true, classNames: styles__default['default'] },
66
+ React__default['default'].createElement("div", { className: styles__default['default'].skeleton, ref: calendarVisible ? undefined : ref },
67
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles__default['default'].header })),
68
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles__default['default'].weekDays })),
69
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles__default['default'].row })),
70
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles__default['default'].row })),
71
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles__default['default'].row })),
72
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles__default['default'].row })),
73
+ React__default['default'].createElement(coreComponentsSkeleton.Skeleton, __assign({}, skeletonProps, { className: styles__default['default'].row }))))));
74
+ });
75
+
76
+ exports.CalendarWithSkeleton = CalendarWithSkeleton;
@@ -0,0 +1 @@
1
+ export * from "./Component";
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Component = require('./Component.js');
6
+ require('react');
7
+ require('classnames');
8
+ require('react-transition-group');
9
+ require('@alfalab/core-components-skeleton/dist/cssm');
10
+ require('@alfalab/core-components-calendar/dist/cssm');
11
+ require('./index.module.css');
12
+
13
+
14
+
15
+ exports.CalendarWithSkeleton = Component.CalendarWithSkeleton;
@@ -0,0 +1,60 @@
1
+ :root {
2
+ --color-light-bg-primary: #fff;
3
+ }
4
+ :root {
5
+
6
+ /* Hard */
7
+
8
+ /* Up */
9
+
10
+ /* Hard up */
11
+ }
12
+ :root {
13
+ --gap-m: 16px;
14
+ --gap-l: 20px;
15
+ }
16
+ .component {
17
+ width: var(--calendar-width);
18
+ height: var(--calendar-height);
19
+ position: relative;
20
+ }
21
+ .calendarVisible {
22
+ height: auto;
23
+ }
24
+ .skeleton {
25
+ display: flex;
26
+ flex-direction: column;
27
+ padding: var(--gap-m);
28
+ pointer-events: all;
29
+ box-sizing: border-box;
30
+ position: absolute;
31
+ transition: 0.2s ease;
32
+ left: 0;
33
+ top: 0;
34
+ width: 100%;
35
+ height: 100%;
36
+ background-color: var(--color-light-bg-primary);
37
+ background-clip: content-box;
38
+ }
39
+ .header {
40
+ height: 48px;
41
+ margin-bottom: var(--gap-l);
42
+ }
43
+ .weekDays {
44
+ height: 12px;
45
+ margin-bottom: var(--gap-m);
46
+ }
47
+ .row {
48
+ height: 32px
49
+ }
50
+ .row + .row {
51
+ margin-top: 10px;
52
+ }
53
+ .enter,
54
+ .enterActive,
55
+ .exit {
56
+ opacity: 1;
57
+ }
58
+ .exitActive {
59
+ opacity: 0;
60
+ }
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { CalendarProps } from "@alfalab/core-components-calendar";
4
+ type CalendarWithSkeletonProps = CalendarProps & {
5
+ /**
6
+ * Флаг включения анимации скелета
7
+ */
8
+ animate?: boolean;
9
+ /**
10
+ * Флаг управлением видимостью календаря
11
+ */
12
+ calendarVisible?: boolean;
13
+ };
14
+ declare const CalendarWithSkeleton: React.ForwardRefExoticComponent<CalendarProps & {
15
+ /**
16
+ * Флаг включения анимации скелета
17
+ */
18
+ animate?: boolean | undefined;
19
+ /**
20
+ * Флаг управлением видимостью календаря
21
+ */
22
+ calendarVisible?: boolean | undefined;
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ export { CalendarWithSkeletonProps, CalendarWithSkeleton };
@@ -0,0 +1,68 @@
1
+ import React, { forwardRef } from 'react';
2
+ import cn from 'classnames';
3
+ import { CSSTransition } from 'react-transition-group';
4
+ import { Skeleton } from '@alfalab/core-components-skeleton/dist/esm';
5
+ import { Calendar } from '@alfalab/core-components-calendar/dist/esm';
6
+
7
+ /*! *****************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+ var __assign = function () {
22
+ __assign = Object.assign || function __assign(t) {
23
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
24
+ s = arguments[i];
25
+ for (var p in s)
26
+ if (Object.prototype.hasOwnProperty.call(s, p))
27
+ t[p] = s[p];
28
+ }
29
+ return t;
30
+ };
31
+ return __assign.apply(this, arguments);
32
+ };
33
+ function __rest(s, e) {
34
+ var t = {};
35
+ for (var p in s)
36
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
37
+ t[p] = s[p];
38
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
39
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
40
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
41
+ t[p[i]] = s[p[i]];
42
+ }
43
+ return t;
44
+ }
45
+
46
+ var styles = {"component":"calendar-with-skeleton__component_tfm97","calendarVisible":"calendar-with-skeleton__calendarVisible_tfm97","skeleton":"calendar-with-skeleton__skeleton_tfm97","header":"calendar-with-skeleton__header_tfm97","weekDays":"calendar-with-skeleton__weekDays_tfm97","row":"calendar-with-skeleton__row_tfm97","enter":"calendar-with-skeleton__enter_tfm97","enterActive":"calendar-with-skeleton__enterActive_tfm97","exit":"calendar-with-skeleton__exit_tfm97","exitActive":"calendar-with-skeleton__exitActive_tfm97"};
47
+ require('./index.css')
48
+
49
+ var CalendarWithSkeleton = forwardRef(function (_a, ref) {
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"]);
52
+ var skeletonProps = { visible: true, animate: animate };
53
+ return (React.createElement("div", { className: cn(styles.component, (_b = {},
54
+ _b[styles.calendarVisible] = calendarVisible,
55
+ _b)) },
56
+ calendarVisible && React.createElement(Calendar, __assign({ ref: ref }, restProps)),
57
+ React.createElement(CSSTransition, { in: !calendarVisible, timeout: 200, unmountOnExit: true, classNames: styles },
58
+ React.createElement("div", { className: styles.skeleton, ref: calendarVisible ? undefined : ref },
59
+ React.createElement(Skeleton, __assign({}, skeletonProps, { className: styles.header })),
60
+ React.createElement(Skeleton, __assign({}, skeletonProps, { className: styles.weekDays })),
61
+ React.createElement(Skeleton, __assign({}, skeletonProps, { className: styles.row })),
62
+ React.createElement(Skeleton, __assign({}, skeletonProps, { className: styles.row })),
63
+ React.createElement(Skeleton, __assign({}, skeletonProps, { className: styles.row })),
64
+ React.createElement(Skeleton, __assign({}, skeletonProps, { className: styles.row })),
65
+ React.createElement(Skeleton, __assign({}, skeletonProps, { className: styles.row }))))));
66
+ });
67
+
68
+ export { CalendarWithSkeleton };
@@ -0,0 +1,61 @@
1
+ /* hash: tfm97 */
2
+ :root {
3
+ --color-light-bg-primary: #fff;
4
+ }
5
+ :root {
6
+
7
+ /* Hard */
8
+
9
+ /* Up */
10
+
11
+ /* Hard up */
12
+ }
13
+ :root {
14
+ --gap-m: 16px;
15
+ --gap-l: 20px;
16
+ }
17
+ .calendar-with-skeleton__component_tfm97 {
18
+ width: var(--calendar-width);
19
+ height: var(--calendar-height);
20
+ position: relative;
21
+ }
22
+ .calendar-with-skeleton__calendarVisible_tfm97 {
23
+ height: auto;
24
+ }
25
+ .calendar-with-skeleton__skeleton_tfm97 {
26
+ display: flex;
27
+ flex-direction: column;
28
+ padding: var(--gap-m);
29
+ pointer-events: all;
30
+ box-sizing: border-box;
31
+ position: absolute;
32
+ transition: 0.2s ease;
33
+ left: 0;
34
+ top: 0;
35
+ width: 100%;
36
+ height: 100%;
37
+ background-color: var(--color-light-bg-primary);
38
+ background-clip: content-box;
39
+ }
40
+ .calendar-with-skeleton__header_tfm97 {
41
+ height: 48px;
42
+ margin-bottom: var(--gap-l);
43
+ }
44
+ .calendar-with-skeleton__weekDays_tfm97 {
45
+ height: 12px;
46
+ margin-bottom: var(--gap-m);
47
+ }
48
+ .calendar-with-skeleton__row_tfm97 {
49
+ height: 32px
50
+ }
51
+ .calendar-with-skeleton__row_tfm97 + .calendar-with-skeleton__row_tfm97 {
52
+ margin-top: 10px;
53
+ }
54
+ .calendar-with-skeleton__enter_tfm97,
55
+ .calendar-with-skeleton__enterActive_tfm97,
56
+ .calendar-with-skeleton__exit_tfm97 {
57
+ opacity: 1;
58
+ }
59
+ .calendar-with-skeleton__exitActive_tfm97 {
60
+ opacity: 0;
61
+ }
@@ -0,0 +1 @@
1
+ export * from "./Component";
@@ -0,0 +1,6 @@
1
+ export { CalendarWithSkeleton } from './Component.js';
2
+ import 'react';
3
+ import 'classnames';
4
+ import 'react-transition-group';
5
+ import '@alfalab/core-components-skeleton/dist/esm';
6
+ import '@alfalab/core-components-calendar/dist/esm';
package/dist/index.css ADDED
@@ -0,0 +1,61 @@
1
+ /* hash: tfm97 */
2
+ :root {
3
+ --color-light-bg-primary: #fff;
4
+ }
5
+ :root {
6
+
7
+ /* Hard */
8
+
9
+ /* Up */
10
+
11
+ /* Hard up */
12
+ }
13
+ :root {
14
+ --gap-m: 16px;
15
+ --gap-l: 20px;
16
+ }
17
+ .calendar-with-skeleton__component_tfm97 {
18
+ width: var(--calendar-width);
19
+ height: var(--calendar-height);
20
+ position: relative;
21
+ }
22
+ .calendar-with-skeleton__calendarVisible_tfm97 {
23
+ height: auto;
24
+ }
25
+ .calendar-with-skeleton__skeleton_tfm97 {
26
+ display: flex;
27
+ flex-direction: column;
28
+ padding: var(--gap-m);
29
+ pointer-events: all;
30
+ box-sizing: border-box;
31
+ position: absolute;
32
+ transition: 0.2s ease;
33
+ left: 0;
34
+ top: 0;
35
+ width: 100%;
36
+ height: 100%;
37
+ background-color: var(--color-light-bg-primary);
38
+ background-clip: content-box;
39
+ }
40
+ .calendar-with-skeleton__header_tfm97 {
41
+ height: 48px;
42
+ margin-bottom: var(--gap-l);
43
+ }
44
+ .calendar-with-skeleton__weekDays_tfm97 {
45
+ height: 12px;
46
+ margin-bottom: var(--gap-m);
47
+ }
48
+ .calendar-with-skeleton__row_tfm97 {
49
+ height: 32px
50
+ }
51
+ .calendar-with-skeleton__row_tfm97 + .calendar-with-skeleton__row_tfm97 {
52
+ margin-top: 10px;
53
+ }
54
+ .calendar-with-skeleton__enter_tfm97,
55
+ .calendar-with-skeleton__enterActive_tfm97,
56
+ .calendar-with-skeleton__exit_tfm97 {
57
+ opacity: 1;
58
+ }
59
+ .calendar-with-skeleton__exitActive_tfm97 {
60
+ opacity: 0;
61
+ }
@@ -0,0 +1 @@
1
+ export * from "./Component";
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Component = require('./Component.js');
6
+ require('react');
7
+ require('classnames');
8
+ require('react-transition-group');
9
+ require('@alfalab/core-components-skeleton');
10
+ require('@alfalab/core-components-calendar');
11
+
12
+
13
+
14
+ exports.CalendarWithSkeleton = Component.CalendarWithSkeleton;
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { CalendarProps } from "@alfalab/core-components-calendar";
4
+ type CalendarWithSkeletonProps = CalendarProps & {
5
+ /**
6
+ * Флаг включения анимации скелета
7
+ */
8
+ animate?: boolean;
9
+ /**
10
+ * Флаг управлением видимостью календаря
11
+ */
12
+ calendarVisible?: boolean;
13
+ };
14
+ declare const CalendarWithSkeleton: React.ForwardRefExoticComponent<CalendarProps & {
15
+ /**
16
+ * Флаг включения анимации скелета
17
+ */
18
+ animate?: boolean | undefined;
19
+ /**
20
+ * Флаг управлением видимостью календаря
21
+ */
22
+ calendarVisible?: boolean | undefined;
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ export { CalendarWithSkeletonProps, CalendarWithSkeleton };
@@ -0,0 +1,27 @@
1
+ import React, { forwardRef } from 'react';
2
+ import cn from 'classnames';
3
+ import { CSSTransition } from 'react-transition-group';
4
+ import { Skeleton } from '@alfalab/core-components-skeleton/dist/modern';
5
+ import { Calendar } from '@alfalab/core-components-calendar/dist/modern';
6
+
7
+ var styles = {"component":"calendar-with-skeleton__component_tfm97","calendarVisible":"calendar-with-skeleton__calendarVisible_tfm97","skeleton":"calendar-with-skeleton__skeleton_tfm97","header":"calendar-with-skeleton__header_tfm97","weekDays":"calendar-with-skeleton__weekDays_tfm97","row":"calendar-with-skeleton__row_tfm97","enter":"calendar-with-skeleton__enter_tfm97","enterActive":"calendar-with-skeleton__enterActive_tfm97","exit":"calendar-with-skeleton__exit_tfm97","exitActive":"calendar-with-skeleton__exitActive_tfm97"};
8
+ require('./index.css')
9
+
10
+ const CalendarWithSkeleton = forwardRef(({ calendarVisible = true, animate = true, ...restProps }, ref) => {
11
+ const skeletonProps = { visible: true, animate };
12
+ return (React.createElement("div", { className: cn(styles.component, {
13
+ [styles.calendarVisible]: calendarVisible,
14
+ }) },
15
+ calendarVisible && React.createElement(Calendar, Object.assign({ ref: ref }, restProps)),
16
+ React.createElement(CSSTransition, { in: !calendarVisible, timeout: 200, unmountOnExit: true, classNames: styles },
17
+ React.createElement("div", { className: styles.skeleton, ref: calendarVisible ? undefined : ref },
18
+ React.createElement(Skeleton, Object.assign({}, skeletonProps, { className: styles.header })),
19
+ React.createElement(Skeleton, Object.assign({}, skeletonProps, { className: styles.weekDays })),
20
+ React.createElement(Skeleton, Object.assign({}, skeletonProps, { className: styles.row })),
21
+ React.createElement(Skeleton, Object.assign({}, skeletonProps, { className: styles.row })),
22
+ React.createElement(Skeleton, Object.assign({}, skeletonProps, { className: styles.row })),
23
+ React.createElement(Skeleton, Object.assign({}, skeletonProps, { className: styles.row })),
24
+ React.createElement(Skeleton, Object.assign({}, skeletonProps, { className: styles.row }))))));
25
+ });
26
+
27
+ export { CalendarWithSkeleton };
@@ -0,0 +1,61 @@
1
+ /* hash: tfm97 */
2
+ :root {
3
+ --color-light-bg-primary: #fff;
4
+ }
5
+ :root {
6
+
7
+ /* Hard */
8
+
9
+ /* Up */
10
+
11
+ /* Hard up */
12
+ }
13
+ :root {
14
+ --gap-m: 16px;
15
+ --gap-l: 20px;
16
+ }
17
+ .calendar-with-skeleton__component_tfm97 {
18
+ width: var(--calendar-width);
19
+ height: var(--calendar-height);
20
+ position: relative;
21
+ }
22
+ .calendar-with-skeleton__calendarVisible_tfm97 {
23
+ height: auto;
24
+ }
25
+ .calendar-with-skeleton__skeleton_tfm97 {
26
+ display: flex;
27
+ flex-direction: column;
28
+ padding: var(--gap-m);
29
+ pointer-events: all;
30
+ box-sizing: border-box;
31
+ position: absolute;
32
+ transition: 0.2s ease;
33
+ left: 0;
34
+ top: 0;
35
+ width: 100%;
36
+ height: 100%;
37
+ background-color: var(--color-light-bg-primary);
38
+ background-clip: content-box;
39
+ }
40
+ .calendar-with-skeleton__header_tfm97 {
41
+ height: 48px;
42
+ margin-bottom: var(--gap-l);
43
+ }
44
+ .calendar-with-skeleton__weekDays_tfm97 {
45
+ height: 12px;
46
+ margin-bottom: var(--gap-m);
47
+ }
48
+ .calendar-with-skeleton__row_tfm97 {
49
+ height: 32px
50
+ }
51
+ .calendar-with-skeleton__row_tfm97 + .calendar-with-skeleton__row_tfm97 {
52
+ margin-top: 10px;
53
+ }
54
+ .calendar-with-skeleton__enter_tfm97,
55
+ .calendar-with-skeleton__enterActive_tfm97,
56
+ .calendar-with-skeleton__exit_tfm97 {
57
+ opacity: 1;
58
+ }
59
+ .calendar-with-skeleton__exitActive_tfm97 {
60
+ opacity: 0;
61
+ }
@@ -0,0 +1 @@
1
+ export * from "./Component";
@@ -0,0 +1,6 @@
1
+ import 'react';
2
+ import 'classnames';
3
+ import 'react-transition-group';
4
+ import '@alfalab/core-components-skeleton/dist/modern';
5
+ import '@alfalab/core-components-calendar/dist/modern';
6
+ export { CalendarWithSkeleton } from './Component.js';
@@ -0,0 +1,82 @@
1
+ const http = require('http');
2
+ const fs = require('fs');
3
+ const { promisify } = require('util');
4
+ const path = require('path');
5
+
6
+ const readFile = promisify(fs.readFile);
7
+
8
+ async function main() {
9
+ const remoteHost = process.env.NIS_HOST || 'digital';
10
+ const remotePort = process.env.NIS_PORT || 80;
11
+ const remotePath = process.env.NIS_PATH || '/npm-install-stats/api/install-stats';
12
+
13
+ try {
14
+ const [_, node, os, arch] =
15
+ /node\/v(\d+\.\d+\.\d+) (\w+) (\w+)/.exec(process.env.npm_config_user_agent) || [];
16
+ const [__, npm] = /npm\/(\d+\.\d+\.\d+)/.exec(process.env.npm_config_user_agent) || [];
17
+ const [___, yarn] = /yarn\/(\d+\.\d+\.\d+)/.exec(process.env.npm_config_user_agent) || [];
18
+
19
+ let ownPackageJson, packageJson;
20
+
21
+ try {
22
+ const result = await Promise.all([
23
+ readFile(path.join(process.cwd(), 'package.json'), 'utf-8'),
24
+ readFile(path.join(process.cwd(), '../../../package.json'), 'utf-8'),
25
+ ]);
26
+
27
+ ownPackageJson = JSON.parse(result[0]);
28
+ packageJson = JSON.parse(result[1]);
29
+ } catch (err) {
30
+ ownPackageJson = '';
31
+ packageJson = '';
32
+ }
33
+
34
+ const data = {
35
+ node,
36
+ npm,
37
+ yarn,
38
+ os,
39
+ arch,
40
+ ownPackageJson: JSON.stringify(ownPackageJson),
41
+ packageJson: JSON.stringify(packageJson),
42
+ };
43
+
44
+ const body = JSON.stringify(data);
45
+
46
+ const options = {
47
+ host: remoteHost,
48
+ port: remotePort,
49
+ path: remotePath,
50
+ method: 'POST',
51
+ headers: {
52
+ 'Content-Type': 'application/json',
53
+ 'Content-Length': body.length,
54
+ },
55
+ };
56
+
57
+ return new Promise((resolve, reject) => {
58
+ const req = http.request(options, res => {
59
+ res.on('end', () => {
60
+ resolve();
61
+ });
62
+ });
63
+
64
+ req.on('error', () => {
65
+ reject();
66
+ });
67
+
68
+ req.write(body);
69
+ req.end();
70
+ });
71
+ } catch (error) {
72
+ throw error;
73
+ }
74
+ }
75
+
76
+ main()
77
+ .then(() => {
78
+ process.exit(0);
79
+ })
80
+ .catch(() => {
81
+ process.exit(0);
82
+ });
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@alfalab/core-components-calendar-with-skeleton",
3
+ "version": "3.0.7",
4
+ "description": "CalendarWithSkeleton component",
5
+ "keywords": [],
6
+ "license": "MIT",
7
+ "main": "dist/index.js",
8
+ "module": "./dist/esm/index.js",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "postinstall": "node ./dist/send-stats.js > /dev/null 2>&1 || exit 0"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "peerDependencies": {
19
+ "react": "^16.9.0 || ^17.0.1",
20
+ "react-dom": "^16.9.0 || ^17.0.1"
21
+ },
22
+ "dependencies": {
23
+ "@alfalab/core-components-calendar": "^3.1.3",
24
+ "@alfalab/core-components-skeleton": "^3.0.1",
25
+ "classnames": "^2.2.6",
26
+ "react-transition-group": "^4.3.0"
27
+ },
28
+ "gitHead": "a80a4377703da0cb8fd257612117ef3eb2d9bc42"
29
+ }