colibri-ui 0.7.59 → 0.7.60
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/Calendar/index.js +8 -2
- package/Calendar/index.module.css +26 -30
- package/Icons/ArrowNext.d.ts +4 -0
- package/Icons/ArrowNext.js +35 -0
- package/Icons/index.d.ts +1 -0
- package/Icons/index.js +2 -0
- package/esm/Calendar/index.js +8 -2
- package/esm/Calendar/index.module.css +26 -30
- package/esm/Icons/ArrowNext.d.ts +4 -0
- package/esm/Icons/ArrowNext.js +27 -0
- package/esm/Icons/index.d.ts +1 -0
- package/esm/Icons/index.js +1 -0
- package/esm/index.js +1 -0
- package/index.js +2 -0
- package/package.json +1 -1
package/Calendar/index.js
CHANGED
|
@@ -7,12 +7,14 @@ var React = require('react');
|
|
|
7
7
|
var classNames = require('classnames/bind');
|
|
8
8
|
var index$1 = require('../libs/requestIdleCallback/index.js');
|
|
9
9
|
var index = require('../helpers/date/index.js');
|
|
10
|
+
require('../Icons/index.js');
|
|
10
11
|
var Month = require('./components/Month/Month.js');
|
|
11
12
|
var getStartMonth = require('./utils/getStartMonth.js');
|
|
12
13
|
var index$2 = require('./components/Presets/index.js');
|
|
13
14
|
var getNumberOfMonthsBetweenDates = require('./utils/getNumberOfMonthsBetweenDates.js');
|
|
14
15
|
var index$3 = require('./components/ContinueButton/index.js');
|
|
15
16
|
var styles = require('./index.module.css');
|
|
17
|
+
var ArrowNext = require('../Icons/ArrowNext.js');
|
|
16
18
|
|
|
17
19
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
20
|
|
|
@@ -177,11 +179,15 @@ var Calendar = function Calendar(_a) {
|
|
|
177
179
|
className: clx(styles__default.default["month-control"], styles__default.default["month-control-prev"]),
|
|
178
180
|
onClick: showPrevMonth,
|
|
179
181
|
disabled: currentMonthOffset <= 0
|
|
180
|
-
}
|
|
182
|
+
}, /*#__PURE__*/React__default.default.createElement(ArrowNext.default, {
|
|
183
|
+
className: clx(styles__default.default["month-control-prev-arrow"])
|
|
184
|
+
})), /*#__PURE__*/React__default.default.createElement("button", {
|
|
181
185
|
className: clx(styles__default.default["month-control"], styles__default.default["month-control-next"]),
|
|
182
186
|
onClick: showNextMonth,
|
|
183
187
|
disabled: currentMonthOffset >= 11
|
|
184
|
-
}
|
|
188
|
+
}, /*#__PURE__*/React__default.default.createElement(ArrowNext.default, {
|
|
189
|
+
className: clx(styles__default.default["month-control-next-arrow"])
|
|
190
|
+
}))), datePresets && ( /*#__PURE__*/React__default.default.createElement(index$2.Presets, {
|
|
185
191
|
presets: datePresets,
|
|
186
192
|
onPresetSelect: handlePresetSelect
|
|
187
193
|
})), withContinueButton && ( /*#__PURE__*/React__default.default.createElement(index$3.ContinueButton, {
|
|
@@ -27,34 +27,13 @@
|
|
|
27
27
|
top: 0;
|
|
28
28
|
width: 80px;
|
|
29
29
|
}
|
|
30
|
-
.month-control::before {
|
|
31
|
-
border: 0 solid #fff;
|
|
32
|
-
content: "";
|
|
33
|
-
display: block;
|
|
34
|
-
height: 100%;
|
|
35
|
-
position: absolute;
|
|
36
|
-
top: 0;
|
|
37
|
-
width: 40px;
|
|
38
|
-
}
|
|
39
|
-
.month-control::after {
|
|
40
|
-
background-repeat: no-repeat;
|
|
41
|
-
background-size: 10px 16px;
|
|
42
|
-
content: "";
|
|
43
|
-
display: inline-block;
|
|
44
|
-
height: 16px;
|
|
45
|
-
opacity: 0.8;
|
|
46
|
-
position: relative;
|
|
47
|
-
transition: opacity 0.3s ease;
|
|
48
|
-
width: 10px;
|
|
49
|
-
}
|
|
50
|
-
.month-control:hover::after {
|
|
51
|
-
opacity: 1;
|
|
52
|
-
}
|
|
53
30
|
.month-control[disabled] {
|
|
54
31
|
cursor: default;
|
|
32
|
+
}
|
|
33
|
+
.month-control[disabled] .month-control-prev-arrow {
|
|
55
34
|
opacity: 0.3;
|
|
56
35
|
}
|
|
57
|
-
.month-control[disabled]
|
|
36
|
+
.month-control[disabled] .month-control-next-arrow {
|
|
58
37
|
opacity: 0.3;
|
|
59
38
|
}
|
|
60
39
|
|
|
@@ -65,12 +44,15 @@
|
|
|
65
44
|
}
|
|
66
45
|
.month-control-prev::before {
|
|
67
46
|
background: linear-gradient(to right, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0) 100%);
|
|
47
|
+
border: 0 solid #fff;
|
|
68
48
|
border-left-width: 26px;
|
|
49
|
+
content: "";
|
|
50
|
+
display: block;
|
|
51
|
+
height: 100%;
|
|
69
52
|
left: 0;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
transform: rotate(180deg);
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 0;
|
|
55
|
+
width: 40px;
|
|
74
56
|
}
|
|
75
57
|
|
|
76
58
|
.month-control-next {
|
|
@@ -80,11 +62,25 @@
|
|
|
80
62
|
}
|
|
81
63
|
.month-control-next::before {
|
|
82
64
|
background: linear-gradient(to left, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0) 100%);
|
|
65
|
+
border: 0 solid #fff;
|
|
83
66
|
border-right-width: 26px;
|
|
67
|
+
content: "";
|
|
68
|
+
display: block;
|
|
69
|
+
height: 100%;
|
|
70
|
+
position: absolute;
|
|
84
71
|
right: 0;
|
|
72
|
+
top: 0;
|
|
73
|
+
width: 40px;
|
|
85
74
|
}
|
|
86
|
-
|
|
87
|
-
|
|
75
|
+
|
|
76
|
+
.month-control-prev-arrow {
|
|
77
|
+
color: var(--palette-black);
|
|
78
|
+
transform: rotate(180deg);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.month-control-next-arrow {
|
|
82
|
+
color: var(--palette-black);
|
|
83
|
+
transform: rotate(360deg);
|
|
88
84
|
}
|
|
89
85
|
|
|
90
86
|
.months {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
|
+
|
|
12
|
+
var ArrowNext = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
13
|
+
var _b = _a.fill,
|
|
14
|
+
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
|
+
_c = _a.width,
|
|
16
|
+
width = _c === void 0 ? 10 : _c,
|
|
17
|
+
_d = _a.height,
|
|
18
|
+
height = _d === void 0 ? 16 : _d,
|
|
19
|
+
props = tslib.__rest(_a, ["fill", "width", "height"]);
|
|
20
|
+
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
|
+
ref: ref,
|
|
22
|
+
fill: "none",
|
|
23
|
+
width: width,
|
|
24
|
+
height: height,
|
|
25
|
+
viewBox: "0 0 10 16",
|
|
26
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
27
|
+
}, props), /*#__PURE__*/React__default.default.createElement("path", {
|
|
28
|
+
d: "M1 1L8 8L1 15",
|
|
29
|
+
stroke: fill,
|
|
30
|
+
strokeWidth: "2",
|
|
31
|
+
strokeLinecap: "round"
|
|
32
|
+
}));
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
exports.default = ArrowNext;
|
package/Icons/index.d.ts
CHANGED
package/Icons/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var ArrowNext = require('./ArrowNext.js');
|
|
3
4
|
var Cart = require('./Cart.js');
|
|
4
5
|
var Chevron = require('./Chevron.js');
|
|
5
6
|
var Close = require('./Close.js');
|
|
@@ -15,6 +16,7 @@ var User = require('./User.js');
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
exports.ArrowNext = ArrowNext.default;
|
|
18
20
|
exports.Cart = Cart.default;
|
|
19
21
|
exports.Chevron = Chevron.default;
|
|
20
22
|
exports.Close = Close.default;
|
package/esm/Calendar/index.js
CHANGED
|
@@ -3,12 +3,14 @@ import React__default, { useRef, useState, useEffect, useCallback } from 'react'
|
|
|
3
3
|
import classNames from 'classnames/bind';
|
|
4
4
|
import { requestIdleCallback } from '../libs/requestIdleCallback/index.js';
|
|
5
5
|
import { getDaysDiff } from '../helpers/date/index.js';
|
|
6
|
+
import '../Icons/index.js';
|
|
6
7
|
import { Month } from './components/Month/Month.js';
|
|
7
8
|
import { getStartMonth } from './utils/getStartMonth.js';
|
|
8
9
|
import { Presets } from './components/Presets/index.js';
|
|
9
10
|
import { getNumberOfMonthsBetweenDates } from './utils/getNumberOfMonthsBetweenDates.js';
|
|
10
11
|
import { ContinueButton } from './components/ContinueButton/index.js';
|
|
11
12
|
import styles from './index.module.css';
|
|
13
|
+
import ArrowNext from '../Icons/ArrowNext.js';
|
|
12
14
|
|
|
13
15
|
var clx = classNames.bind(styles);
|
|
14
16
|
var idleCallbackOptions = {
|
|
@@ -167,11 +169,15 @@ var Calendar = function Calendar(_a) {
|
|
|
167
169
|
className: clx(styles["month-control"], styles["month-control-prev"]),
|
|
168
170
|
onClick: showPrevMonth,
|
|
169
171
|
disabled: currentMonthOffset <= 0
|
|
170
|
-
}
|
|
172
|
+
}, /*#__PURE__*/React__default.createElement(ArrowNext, {
|
|
173
|
+
className: clx(styles["month-control-prev-arrow"])
|
|
174
|
+
})), /*#__PURE__*/React__default.createElement("button", {
|
|
171
175
|
className: clx(styles["month-control"], styles["month-control-next"]),
|
|
172
176
|
onClick: showNextMonth,
|
|
173
177
|
disabled: currentMonthOffset >= 11
|
|
174
|
-
}
|
|
178
|
+
}, /*#__PURE__*/React__default.createElement(ArrowNext, {
|
|
179
|
+
className: clx(styles["month-control-next-arrow"])
|
|
180
|
+
}))), datePresets && ( /*#__PURE__*/React__default.createElement(Presets, {
|
|
175
181
|
presets: datePresets,
|
|
176
182
|
onPresetSelect: handlePresetSelect
|
|
177
183
|
})), withContinueButton && ( /*#__PURE__*/React__default.createElement(ContinueButton, {
|
|
@@ -27,34 +27,13 @@
|
|
|
27
27
|
top: 0;
|
|
28
28
|
width: 80px;
|
|
29
29
|
}
|
|
30
|
-
.month-control::before {
|
|
31
|
-
border: 0 solid #fff;
|
|
32
|
-
content: "";
|
|
33
|
-
display: block;
|
|
34
|
-
height: 100%;
|
|
35
|
-
position: absolute;
|
|
36
|
-
top: 0;
|
|
37
|
-
width: 40px;
|
|
38
|
-
}
|
|
39
|
-
.month-control::after {
|
|
40
|
-
background-repeat: no-repeat;
|
|
41
|
-
background-size: 10px 16px;
|
|
42
|
-
content: "";
|
|
43
|
-
display: inline-block;
|
|
44
|
-
height: 16px;
|
|
45
|
-
opacity: 0.8;
|
|
46
|
-
position: relative;
|
|
47
|
-
transition: opacity 0.3s ease;
|
|
48
|
-
width: 10px;
|
|
49
|
-
}
|
|
50
|
-
.month-control:hover::after {
|
|
51
|
-
opacity: 1;
|
|
52
|
-
}
|
|
53
30
|
.month-control[disabled] {
|
|
54
31
|
cursor: default;
|
|
32
|
+
}
|
|
33
|
+
.month-control[disabled] .month-control-prev-arrow {
|
|
55
34
|
opacity: 0.3;
|
|
56
35
|
}
|
|
57
|
-
.month-control[disabled]
|
|
36
|
+
.month-control[disabled] .month-control-next-arrow {
|
|
58
37
|
opacity: 0.3;
|
|
59
38
|
}
|
|
60
39
|
|
|
@@ -65,12 +44,15 @@
|
|
|
65
44
|
}
|
|
66
45
|
.month-control-prev::before {
|
|
67
46
|
background: linear-gradient(to right, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0) 100%);
|
|
47
|
+
border: 0 solid #fff;
|
|
68
48
|
border-left-width: 26px;
|
|
49
|
+
content: "";
|
|
50
|
+
display: block;
|
|
51
|
+
height: 100%;
|
|
69
52
|
left: 0;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
transform: rotate(180deg);
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 0;
|
|
55
|
+
width: 40px;
|
|
74
56
|
}
|
|
75
57
|
|
|
76
58
|
.month-control-next {
|
|
@@ -80,11 +62,25 @@
|
|
|
80
62
|
}
|
|
81
63
|
.month-control-next::before {
|
|
82
64
|
background: linear-gradient(to left, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0) 100%);
|
|
65
|
+
border: 0 solid #fff;
|
|
83
66
|
border-right-width: 26px;
|
|
67
|
+
content: "";
|
|
68
|
+
display: block;
|
|
69
|
+
height: 100%;
|
|
70
|
+
position: absolute;
|
|
84
71
|
right: 0;
|
|
72
|
+
top: 0;
|
|
73
|
+
width: 40px;
|
|
85
74
|
}
|
|
86
|
-
|
|
87
|
-
|
|
75
|
+
|
|
76
|
+
.month-control-prev-arrow {
|
|
77
|
+
color: var(--palette-black);
|
|
78
|
+
transform: rotate(180deg);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.month-control-next-arrow {
|
|
82
|
+
color: var(--palette-black);
|
|
83
|
+
transform: rotate(360deg);
|
|
88
84
|
}
|
|
89
85
|
|
|
90
86
|
.months {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
|
|
4
|
+
var ArrowNext = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
5
|
+
var _b = _a.fill,
|
|
6
|
+
fill = _b === void 0 ? "currentColor" : _b,
|
|
7
|
+
_c = _a.width,
|
|
8
|
+
width = _c === void 0 ? 10 : _c,
|
|
9
|
+
_d = _a.height,
|
|
10
|
+
height = _d === void 0 ? 16 : _d,
|
|
11
|
+
props = __rest(_a, ["fill", "width", "height"]);
|
|
12
|
+
return /*#__PURE__*/React__default.createElement("svg", __assign({
|
|
13
|
+
ref: ref,
|
|
14
|
+
fill: "none",
|
|
15
|
+
width: width,
|
|
16
|
+
height: height,
|
|
17
|
+
viewBox: "0 0 10 16",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
19
|
+
}, props), /*#__PURE__*/React__default.createElement("path", {
|
|
20
|
+
d: "M1 1L8 8L1 15",
|
|
21
|
+
stroke: fill,
|
|
22
|
+
strokeWidth: "2",
|
|
23
|
+
strokeLinecap: "round"
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export { ArrowNext as default };
|
package/esm/Icons/index.d.ts
CHANGED
package/esm/Icons/index.js
CHANGED
package/esm/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export { THEMES } from './Theme/index.js';
|
|
|
22
22
|
export { default as Typography } from './Typography/index.js';
|
|
23
23
|
export { default as useMediaSizes } from './hooks/useMediaSizes/index.js';
|
|
24
24
|
import './Icons/index.js';
|
|
25
|
+
export { default as ArrowNext } from './Icons/ArrowNext.js';
|
|
25
26
|
export { default as Cart } from './Icons/Cart.js';
|
|
26
27
|
export { default as Chevron } from './Icons/Chevron.js';
|
|
27
28
|
export { default as Close } from './Icons/Close.js';
|
package/index.js
CHANGED
|
@@ -24,6 +24,7 @@ var index$k = require('./Theme/index.js');
|
|
|
24
24
|
var index$l = require('./Typography/index.js');
|
|
25
25
|
var index$m = require('./hooks/useMediaSizes/index.js');
|
|
26
26
|
require('./Icons/index.js');
|
|
27
|
+
var ArrowNext = require('./Icons/ArrowNext.js');
|
|
27
28
|
var Cart = require('./Icons/Cart.js');
|
|
28
29
|
var Chevron = require('./Icons/Chevron.js');
|
|
29
30
|
var Close = require('./Icons/Close.js');
|
|
@@ -63,6 +64,7 @@ exports.Switch = index$j.default;
|
|
|
63
64
|
exports.THEMES = index$k.THEMES;
|
|
64
65
|
exports.Typography = index$l.default;
|
|
65
66
|
exports.useMediaSizes = index$m.default;
|
|
67
|
+
exports.ArrowNext = ArrowNext.default;
|
|
66
68
|
exports.Cart = Cart.default;
|
|
67
69
|
exports.Chevron = Chevron.default;
|
|
68
70
|
exports.Close = Close.default;
|