colibri-ui 0.7.142 → 0.7.144
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/Button/index.d.ts +1 -1
- package/Button/index.js +4 -3
- package/Button/index.props.d.ts +1 -0
- package/Calendar/components/Month/Month.js +1 -2
- package/Calendar/index.js +3 -1
- package/Calendar/index.module.css +13 -13
- package/Calendar/utils/getMonthWeeks.js +29 -29
- package/Calendar/utils/getNumberOfMonthsBetweenDates.js +3 -3
- package/Checkbox/Checkbox.module.css +8 -4
- package/Checkbox/index.js +4 -1
- package/Chip/index.js +4 -1
- package/Datepicker/components/TimePicker/Label/index.js +9 -5
- package/Dropdown/index.js +9 -5
- package/Icons/ArrowNext.d.ts +1 -1
- package/Icons/ArrowNext.js +3 -2
- package/Icons/Cart.d.ts +1 -1
- package/Icons/Cart.js +3 -2
- package/Icons/Check.d.ts +1 -1
- package/Icons/Check.js +3 -2
- package/Icons/Chevron.d.ts +1 -1
- package/Icons/Chevron.js +3 -2
- package/Icons/Close.d.ts +1 -1
- package/Icons/Close.js +3 -2
- package/Icons/CrossFill.d.ts +1 -1
- package/Icons/CrossFill.js +3 -2
- package/Icons/Edit.d.ts +1 -1
- package/Icons/Edit.js +3 -2
- package/Icons/Exit.d.ts +1 -1
- package/Icons/Exit.js +3 -2
- package/Icons/EyeClosed.d.ts +1 -1
- package/Icons/EyeClosed.js +3 -2
- package/Icons/EyeOpen.d.ts +1 -1
- package/Icons/EyeOpen.js +3 -2
- package/Icons/Help.d.ts +1 -1
- package/Icons/Help.js +3 -2
- package/Icons/Info.d.ts +1 -1
- package/Icons/Info.js +3 -2
- package/Icons/Minus.d.ts +1 -1
- package/Icons/Minus.js +3 -2
- package/Icons/More.d.ts +1 -1
- package/Icons/More.js +3 -2
- package/Icons/Plus.d.ts +1 -1
- package/Icons/Plus.js +3 -2
- package/Icons/Setting.d.ts +1 -1
- package/Icons/Setting.js +3 -2
- package/Icons/Trash.d.ts +1 -1
- package/Icons/Trash.js +3 -2
- package/Icons/User.d.ts +1 -1
- package/Icons/User.js +3 -2
- package/Icons/index.props.d.ts +1 -0
- package/Image/index.js +1 -2
- package/InputRadio/InputRadio.module.css +16 -16
- package/InputRadio/index.d.ts +2 -2
- package/InputRadio/index.js +40 -36
- package/Menu/components/MenuItem/index.d.ts +2 -3
- package/Menu/components/MenuItem/index.js +19 -14
- package/Menu/components/MenuItem/index.props.d.ts +1 -0
- package/Menu/index.js +3 -1
- package/Modal/components/Close/index.js +8 -4
- package/Modal/components/Content/index.js +1 -0
- package/Modal/components/Title/index.js +1 -0
- package/MultiSelect/components/MenuOverlay/index.js +4 -4
- package/MultiSelect/index.js +1 -2
- package/Portal/index.js +1 -1
- package/RadioGroup/RadioGroup.module.css +6 -5
- package/RadioGroup/index.d.ts +2 -2
- package/RadioGroup/index.js +2 -2
- package/Select/components/MenuOverlay/index.js +1 -2
- package/Select/components/MenuOverlayItem/index.js +1 -0
- package/TabsMenu/index.js +1 -0
- package/TabsPanes/index.js +1 -3
- package/TimeSelect/Label/index.js +9 -5
- package/Tooltip/index.js +3 -2
- package/Typography/index.d.ts +2 -2
- package/Typography/index.props.d.ts +1 -1
- package/base/BaseInput/index.d.ts +1 -1
- package/base/BaseInput/index.js +4 -3
- package/base/BaseInput/index.props.d.ts +1 -0
- package/base/FormField/index.d.ts +1 -3
- package/base/FormField/index.js +3 -2
- package/base/FormField/index.props.d.ts +4 -2
- package/base/InputRoot/index.d.ts +1 -3
- package/base/InputRoot/index.js +4 -3
- package/base/InputRoot/index.props.d.ts +4 -2
- package/esm/Button/index.d.ts +1 -1
- package/esm/Button/index.js +5 -4
- package/esm/Button/index.props.d.ts +1 -0
- package/esm/Calendar/components/Month/Month.js +1 -2
- package/esm/Calendar/index.js +3 -1
- package/esm/Calendar/index.module.css +13 -13
- package/esm/Calendar/utils/getMonthWeeks.js +29 -29
- package/esm/Calendar/utils/getNumberOfMonthsBetweenDates.js +3 -3
- package/esm/Checkbox/Checkbox.module.css +8 -4
- package/esm/Checkbox/index.js +4 -1
- package/esm/Chip/index.js +4 -1
- package/esm/Datepicker/components/TimePicker/Label/index.js +9 -5
- package/esm/Dropdown/index.js +9 -5
- package/esm/Icons/ArrowNext.d.ts +1 -1
- package/esm/Icons/ArrowNext.js +4 -3
- package/esm/Icons/Cart.d.ts +1 -1
- package/esm/Icons/Cart.js +4 -3
- package/esm/Icons/Check.d.ts +1 -1
- package/esm/Icons/Check.js +4 -3
- package/esm/Icons/Chevron.d.ts +1 -1
- package/esm/Icons/Chevron.js +4 -3
- package/esm/Icons/Close.d.ts +1 -1
- package/esm/Icons/Close.js +4 -3
- package/esm/Icons/CrossFill.d.ts +1 -1
- package/esm/Icons/CrossFill.js +4 -3
- package/esm/Icons/Edit.d.ts +1 -1
- package/esm/Icons/Edit.js +4 -3
- package/esm/Icons/Exit.d.ts +1 -1
- package/esm/Icons/Exit.js +4 -3
- package/esm/Icons/EyeClosed.d.ts +1 -1
- package/esm/Icons/EyeClosed.js +4 -3
- package/esm/Icons/EyeOpen.d.ts +1 -1
- package/esm/Icons/EyeOpen.js +4 -3
- package/esm/Icons/Help.d.ts +1 -1
- package/esm/Icons/Help.js +4 -3
- package/esm/Icons/Info.d.ts +1 -1
- package/esm/Icons/Info.js +4 -3
- package/esm/Icons/Minus.d.ts +1 -1
- package/esm/Icons/Minus.js +4 -3
- package/esm/Icons/More.d.ts +1 -1
- package/esm/Icons/More.js +4 -3
- package/esm/Icons/Plus.d.ts +1 -1
- package/esm/Icons/Plus.js +4 -3
- package/esm/Icons/Setting.d.ts +1 -1
- package/esm/Icons/Setting.js +4 -3
- package/esm/Icons/Trash.d.ts +1 -1
- package/esm/Icons/Trash.js +4 -3
- package/esm/Icons/User.d.ts +1 -1
- package/esm/Icons/User.js +4 -3
- package/esm/Icons/index.props.d.ts +1 -0
- package/esm/Image/index.js +1 -2
- package/esm/InputRadio/InputRadio.module.css +16 -16
- package/esm/InputRadio/index.d.ts +2 -2
- package/esm/InputRadio/index.js +40 -36
- package/esm/Menu/components/MenuItem/index.d.ts +2 -3
- package/esm/Menu/components/MenuItem/index.js +20 -15
- package/esm/Menu/components/MenuItem/index.props.d.ts +1 -0
- package/esm/Menu/index.js +3 -1
- package/esm/Modal/components/Close/index.js +8 -4
- package/esm/Modal/components/Content/index.js +1 -0
- package/esm/Modal/components/Title/index.js +1 -0
- package/esm/MultiSelect/components/MenuOverlay/index.js +4 -4
- package/esm/MultiSelect/index.js +1 -2
- package/esm/Portal/index.js +1 -1
- package/esm/RadioGroup/RadioGroup.module.css +6 -5
- package/esm/RadioGroup/index.d.ts +2 -2
- package/esm/RadioGroup/index.js +2 -2
- package/esm/Select/components/MenuOverlay/index.js +1 -2
- package/esm/Select/components/MenuOverlayItem/index.js +1 -0
- package/esm/TabsMenu/index.js +1 -0
- package/esm/TabsPanes/index.js +1 -3
- package/esm/TimeSelect/Label/index.js +9 -5
- package/esm/Tooltip/index.js +3 -2
- package/esm/Typography/index.d.ts +2 -2
- package/esm/Typography/index.props.d.ts +1 -1
- package/esm/base/BaseInput/index.d.ts +1 -1
- package/esm/base/BaseInput/index.js +5 -4
- package/esm/base/BaseInput/index.props.d.ts +1 -0
- package/esm/base/FormField/index.d.ts +1 -3
- package/esm/base/FormField/index.js +4 -3
- package/esm/base/FormField/index.props.d.ts +4 -2
- package/esm/base/InputRoot/index.d.ts +1 -3
- package/esm/base/InputRoot/index.js +5 -4
- package/esm/base/InputRoot/index.props.d.ts +4 -2
- package/esm/helpers/on.js +3 -1
- package/esm/hooks/useTrapFocus/index.js +7 -7
- package/esm/libs/requestIdleCallback/index.js +3 -1
- package/helpers/on.js +3 -1
- package/hooks/useTrapFocus/index.js +7 -7
- package/libs/requestIdleCallback/index.js +3 -1
- package/package.json +3 -5
- package/esm/helpers/generateUniqID.js +0 -6
- package/helpers/generateUniqID.js +0 -10
package/Button/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type ButtonProps } from "./index.props";
|
|
3
|
-
declare const Button:
|
|
3
|
+
declare const Button: ({ className, fullWidth, variant, iconStart, iconEnd, icon, size, children, disabled, onClick, type, ref, ...props }: ButtonProps) => React.JSX.Element;
|
|
4
4
|
export default Button;
|
package/Button/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
|
14
14
|
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
15
15
|
|
|
16
16
|
var clx = classNames__default.default.bind(styles__default.default);
|
|
17
|
-
var Button =
|
|
17
|
+
var Button = function Button(_a) {
|
|
18
18
|
var _b;
|
|
19
19
|
var className = _a.className,
|
|
20
20
|
_c = _a.fullWidth,
|
|
@@ -29,7 +29,8 @@ var Button = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
29
29
|
disabled = _a.disabled,
|
|
30
30
|
onClick = _a.onClick,
|
|
31
31
|
type = _a.type,
|
|
32
|
-
|
|
32
|
+
ref = _a.ref,
|
|
33
|
+
props = tslib.__rest(_a, ["className", "fullWidth", "variant", "iconStart", "iconEnd", "icon", "size", "children", "disabled", "onClick", "type", "ref"]);
|
|
33
34
|
return /*#__PURE__*/React__default.default.createElement("button", tslib.__assign({
|
|
34
35
|
onClick: onClick,
|
|
35
36
|
ref: ref,
|
|
@@ -50,6 +51,6 @@ var Button = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
50
51
|
}, children), iconEnd && /*#__PURE__*/React__default.default.createElement("span", {
|
|
51
52
|
className: clx(styles__default.default.icon)
|
|
52
53
|
}, iconEnd));
|
|
53
|
-
}
|
|
54
|
+
};
|
|
54
55
|
|
|
55
56
|
exports.default = Button;
|
package/Button/index.props.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ var classNames = require('classnames/bind');
|
|
|
6
6
|
var leadingZeros = require('../../../libs/numbers/leadingZeros.js');
|
|
7
7
|
var index = require('../../../Typography/index.js');
|
|
8
8
|
var index$1 = require('../../../helpers/date/index.js');
|
|
9
|
-
var generateUniqID = require('../../../helpers/generateUniqID.js');
|
|
10
9
|
var getMonthWeeks = require('../../utils/getMonthWeeks.js');
|
|
11
10
|
var styles = require('./index.module.css');
|
|
12
11
|
|
|
@@ -85,7 +84,7 @@ var Month = function Month(props) {
|
|
|
85
84
|
var index$2 = rest[0] + 1;
|
|
86
85
|
return /*#__PURE__*/React__namespace.createElement("li", {
|
|
87
86
|
className: clx(styles__default.default.day),
|
|
88
|
-
key:
|
|
87
|
+
key: index$2
|
|
89
88
|
}, /*#__PURE__*/React__namespace.createElement(index.default, {
|
|
90
89
|
style: {
|
|
91
90
|
opacity: index$2 > 5 ? 80 : 30,
|
package/Calendar/index.js
CHANGED
|
@@ -116,7 +116,9 @@ var Calendar = function Calendar(_a) {
|
|
|
116
116
|
return selectDate(date, 1, false);
|
|
117
117
|
}, idleCallbackOptions);
|
|
118
118
|
}
|
|
119
|
-
},
|
|
119
|
+
},
|
|
120
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
121
|
+
[canSelectRange, selectedDate, isRangeCompleted, selectDate]);
|
|
120
122
|
var handlePresetSelect = React.useCallback(function (preset) {
|
|
121
123
|
index$1.requestIdleCallback(function () {
|
|
122
124
|
return selectDate(preset.date, preset.period, true);
|
|
@@ -11,6 +11,19 @@
|
|
|
11
11
|
text-size-adjust: 100%;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
.month-control-prev-arrow {
|
|
15
|
+
color: var(--palette-black);
|
|
16
|
+
transform: rotate(180deg);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.month-control-next-arrow {
|
|
20
|
+
color: var(--palette-black);
|
|
21
|
+
position: absolute;
|
|
22
|
+
right: 16px;
|
|
23
|
+
top: 16px;
|
|
24
|
+
transform: rotate(360deg);
|
|
25
|
+
}
|
|
26
|
+
|
|
14
27
|
.month-control {
|
|
15
28
|
background: transparent;
|
|
16
29
|
border: 0;
|
|
@@ -68,19 +81,6 @@
|
|
|
68
81
|
width: 40px;
|
|
69
82
|
}
|
|
70
83
|
|
|
71
|
-
.month-control-prev-arrow {
|
|
72
|
-
color: var(--palette-black);
|
|
73
|
-
transform: rotate(180deg);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.month-control-next-arrow {
|
|
77
|
-
color: var(--palette-black);
|
|
78
|
-
position: absolute;
|
|
79
|
-
right: 16px;
|
|
80
|
-
top: 16px;
|
|
81
|
-
transform: rotate(360deg);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
84
|
.months {
|
|
85
85
|
min-height: 300px;
|
|
86
86
|
position: relative;
|
|
@@ -6,6 +6,35 @@ var dummyDay = {
|
|
|
6
6
|
day: 0,
|
|
7
7
|
isDummy: true
|
|
8
8
|
};
|
|
9
|
+
function getDateDayInWeek(date) {
|
|
10
|
+
var day = date.getDay() - 1;
|
|
11
|
+
return day >= 0 ? day : 6;
|
|
12
|
+
}
|
|
13
|
+
function doubleDigits(v) {
|
|
14
|
+
return leadingZeros.leadingZeros(v, 2);
|
|
15
|
+
}
|
|
16
|
+
function formatToComparable(date) {
|
|
17
|
+
return new Date([date.getFullYear(), doubleDigits(date.getMonth() + 1), doubleDigits(date.getDate())].join("-")).getTime();
|
|
18
|
+
}
|
|
19
|
+
function checkIfDateIsAvailable(date, options) {
|
|
20
|
+
var availableDates = options.availableDates,
|
|
21
|
+
today = options.today;
|
|
22
|
+
var todayCompatible = formatToComparable(new Date(today));
|
|
23
|
+
var availableDatesComparable = availableDates && availableDates.length > 0 && availableDates.map(function (_date) {
|
|
24
|
+
return formatToComparable(new Date(_date));
|
|
25
|
+
});
|
|
26
|
+
var isAvailableDate = availableDatesComparable ? availableDatesComparable.includes(date) : true;
|
|
27
|
+
return date >= todayCompatible && isAvailableDate;
|
|
28
|
+
}
|
|
29
|
+
function getSelectedDates(options) {
|
|
30
|
+
var period = options.selectedPeriod ? options.selectedPeriod - 1 : 0;
|
|
31
|
+
var dateFrom = options.selectedDate ? new Date(options.selectedDate) : undefined;
|
|
32
|
+
var dateTo = dateFrom ? new Date(dateFrom.getTime() + 24 * 60 * 60 * 1000 * period) : undefined;
|
|
33
|
+
return {
|
|
34
|
+
selectedDateFrom: dateFrom ? formatToComparable(dateFrom) : undefined,
|
|
35
|
+
selectedDateTo: dateTo ? formatToComparable(dateTo) : undefined
|
|
36
|
+
};
|
|
37
|
+
}
|
|
9
38
|
function getMonthWeeks(options) {
|
|
10
39
|
var _a = getSelectedDates(options),
|
|
11
40
|
selectedDateFrom = _a.selectedDateFrom,
|
|
@@ -48,34 +77,5 @@ function getMonthWeeks(options) {
|
|
|
48
77
|
}
|
|
49
78
|
return weeks;
|
|
50
79
|
}
|
|
51
|
-
function getDateDayInWeek(date) {
|
|
52
|
-
var day = date.getDay() - 1;
|
|
53
|
-
return day >= 0 ? day : 6;
|
|
54
|
-
}
|
|
55
|
-
function getSelectedDates(options) {
|
|
56
|
-
var period = options.selectedPeriod ? options.selectedPeriod - 1 : 0;
|
|
57
|
-
var dateFrom = options.selectedDate ? new Date(options.selectedDate) : undefined;
|
|
58
|
-
var dateTo = dateFrom ? new Date(dateFrom.getTime() + 24 * 60 * 60 * 1000 * period) : undefined;
|
|
59
|
-
return {
|
|
60
|
-
selectedDateFrom: dateFrom ? formatToComparable(dateFrom) : undefined,
|
|
61
|
-
selectedDateTo: dateTo ? formatToComparable(dateTo) : undefined
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
function formatToComparable(date) {
|
|
65
|
-
return new Date([date.getFullYear(), doubleDigits(date.getMonth() + 1), doubleDigits(date.getDate())].join("-")).getTime();
|
|
66
|
-
}
|
|
67
|
-
function doubleDigits(v) {
|
|
68
|
-
return leadingZeros.leadingZeros(v, 2);
|
|
69
|
-
}
|
|
70
|
-
function checkIfDateIsAvailable(date, options) {
|
|
71
|
-
var availableDates = options.availableDates,
|
|
72
|
-
today = options.today;
|
|
73
|
-
var todayCompatible = formatToComparable(new Date(today));
|
|
74
|
-
var availableDatesComparable = availableDates && availableDates.length > 0 && availableDates.map(function (_date) {
|
|
75
|
-
return formatToComparable(new Date(_date));
|
|
76
|
-
});
|
|
77
|
-
var isAvailableDate = availableDatesComparable ? availableDatesComparable.includes(date) : true;
|
|
78
|
-
return date >= todayCompatible && isAvailableDate;
|
|
79
|
-
}
|
|
80
80
|
|
|
81
81
|
exports.getMonthWeeks = getMonthWeeks;
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns number of months between dates
|
|
5
5
|
*/
|
|
6
|
+
function normalizeDate(date) {
|
|
7
|
+
return date.split("-").slice(0, 2).join("-");
|
|
8
|
+
}
|
|
6
9
|
function getNumberOfMonthsBetweenDates(startDate, activeDate) {
|
|
7
10
|
var start = new Date(normalizeDate(startDate));
|
|
8
11
|
var active = new Date(normalizeDate(activeDate));
|
|
@@ -14,8 +17,5 @@ function getNumberOfMonthsBetweenDates(startDate, activeDate) {
|
|
|
14
17
|
}
|
|
15
18
|
return count;
|
|
16
19
|
}
|
|
17
|
-
function normalizeDate(date) {
|
|
18
|
-
return date.split("-").slice(0, 2).join("-");
|
|
19
|
-
}
|
|
20
20
|
|
|
21
21
|
exports.getNumberOfMonthsBetweenDates = getNumberOfMonthsBetweenDates;
|
|
@@ -72,9 +72,17 @@
|
|
|
72
72
|
.control:hover:not(:disabled) + .fake-checkbox {
|
|
73
73
|
border-color: var(--palette-bg-3);
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
.control_variant_primary {
|
|
77
|
+
/* stylelint-disable-next-line no-descending-specificity */
|
|
78
|
+
}
|
|
75
79
|
.control_variant_primary:focus:not(:disabled) + .fake-checkbox {
|
|
76
80
|
box-shadow: 0 0 0 2px var(--checkbox-box-shadow-focused);
|
|
77
81
|
}
|
|
82
|
+
.control_variant_primary:disabled + .fake-checkbox {
|
|
83
|
+
background-color: var(--checkbox-bg-disabled);
|
|
84
|
+
z-index: 1;
|
|
85
|
+
}
|
|
78
86
|
.control_variant_primary:hover:not(:disabled) + .fake-checkbox {
|
|
79
87
|
background-color: var(--checkbox-bg-hovered);
|
|
80
88
|
}
|
|
@@ -82,8 +90,4 @@
|
|
|
82
90
|
background-color: var(--checkbox-bg-active);
|
|
83
91
|
border-color: var(--checkbox-border-color-active);
|
|
84
92
|
box-shadow: var(--checkbox-box-shadow-active);
|
|
85
|
-
}
|
|
86
|
-
.control_variant_primary:disabled + .fake-checkbox {
|
|
87
|
-
background-color: var(--checkbox-bg-disabled);
|
|
88
|
-
z-index: 1;
|
|
89
93
|
}
|
package/Checkbox/index.js
CHANGED
|
@@ -30,7 +30,10 @@ var Checkbox = function Checkbox(_a) {
|
|
|
30
30
|
className = _a.className,
|
|
31
31
|
disabled = _a.disabled,
|
|
32
32
|
isError = _a.isError;
|
|
33
|
-
var control =
|
|
33
|
+
var control =
|
|
34
|
+
/*#__PURE__*/
|
|
35
|
+
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
36
|
+
React__default.default.createElement("label", {
|
|
34
37
|
className: clx(styles__default.default.label)
|
|
35
38
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
36
39
|
className: clx(styles__default.default.wrapper)
|
package/Chip/index.js
CHANGED
|
@@ -42,7 +42,10 @@ var Chip = function Chip(_a) {
|
|
|
42
42
|
onClick: onClick
|
|
43
43
|
}, /*#__PURE__*/React__default.default.createElement("span", {
|
|
44
44
|
className: clx("content-inner")
|
|
45
|
-
}, children)), iconEnd && (
|
|
45
|
+
}, children)), iconEnd && (
|
|
46
|
+
/*#__PURE__*/
|
|
47
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
48
|
+
React__default.default.createElement("span", {
|
|
46
49
|
className: clx("icon-right"),
|
|
47
50
|
role: "button",
|
|
48
51
|
tabIndex: 0,
|
|
@@ -13,11 +13,15 @@ var OptionLabel = function OptionLabel(_a) {
|
|
|
13
13
|
onClick = _a.onClick,
|
|
14
14
|
onMouseEnter = _a.onMouseEnter;
|
|
15
15
|
var ref = React.useRef(null);
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
return (
|
|
17
|
+
/*#__PURE__*/
|
|
18
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
19
|
+
React__default.default.createElement("span", {
|
|
20
|
+
onClick: onClick,
|
|
21
|
+
onMouseEnter: onMouseEnter,
|
|
22
|
+
ref: ref
|
|
23
|
+
}, time)
|
|
24
|
+
);
|
|
21
25
|
};
|
|
22
26
|
|
|
23
27
|
exports.default = OptionLabel;
|
package/Dropdown/index.js
CHANGED
|
@@ -70,6 +70,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
70
70
|
update = _o.update;
|
|
71
71
|
var isNotComponent = typeof children === "string";
|
|
72
72
|
var reference = React.useMemo(function () {
|
|
73
|
+
if (!children) return null;
|
|
73
74
|
return React.Children.only(isNotComponent ? /*#__PURE__*/React__default.default.createElement("button", null, children) : children);
|
|
74
75
|
}, [children, isNotComponent]);
|
|
75
76
|
var onToggle = React.useCallback(function (event) {
|
|
@@ -87,8 +88,8 @@ var Dropdown = function Dropdown(_a) {
|
|
|
87
88
|
var onHide = React.useCallback(function () {
|
|
88
89
|
setVisible(false);
|
|
89
90
|
}, [setVisible]);
|
|
90
|
-
var onClickOutside = React.useCallback(function (
|
|
91
|
-
if (controlElement === null || controlElement === void 0 ? void 0 : controlElement.contains(
|
|
91
|
+
var onClickOutside = React.useCallback(function (event) {
|
|
92
|
+
if (controlElement === null || controlElement === void 0 ? void 0 : controlElement.contains(event.target)) return;
|
|
92
93
|
onHide();
|
|
93
94
|
}, [onHide, controlElement]);
|
|
94
95
|
var onClickOverlay = React.useCallback(function (event) {
|
|
@@ -96,7 +97,9 @@ var Dropdown = function Dropdown(_a) {
|
|
|
96
97
|
if (!preventAutoClose) {
|
|
97
98
|
onHide();
|
|
98
99
|
}
|
|
99
|
-
},
|
|
100
|
+
},
|
|
101
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
102
|
+
[onHide]);
|
|
100
103
|
React.useEffect(function () {
|
|
101
104
|
var unsubscribes = [];
|
|
102
105
|
if (trigger.includes("click")) {
|
|
@@ -126,6 +129,7 @@ var Dropdown = function Dropdown(_a) {
|
|
|
126
129
|
return un();
|
|
127
130
|
});
|
|
128
131
|
};
|
|
132
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
129
133
|
}, [controlElement, popperElement, onToggle, onShow, onHide]);
|
|
130
134
|
React.useEffect(function () {
|
|
131
135
|
if (onVisibleChange) onVisibleChange(visible);
|
|
@@ -133,10 +137,10 @@ var Dropdown = function Dropdown(_a) {
|
|
|
133
137
|
React.useEffect(function () {
|
|
134
138
|
if (update) update();
|
|
135
139
|
}, [update, visible]);
|
|
136
|
-
return /*#__PURE__*/React__default.default.createElement(React__default.default.Fragment, null, /*#__PURE__*/React__default.default.createElement(reference.type, tslib.__assign({
|
|
140
|
+
return /*#__PURE__*/React__default.default.createElement(React__default.default.Fragment, null, reference && (/*#__PURE__*/React__default.default.createElement(reference.type, tslib.__assign({
|
|
137
141
|
ref: setControlElement,
|
|
138
142
|
tabIndex: 0
|
|
139
|
-
}, reference.props)), isVisible && (/*#__PURE__*/React__default.default.createElement(index.default, null, /*#__PURE__*/React__default.default.createElement(index$1.default, {
|
|
143
|
+
}, reference.props))), isVisible && (/*#__PURE__*/React__default.default.createElement(index.default, null, /*#__PURE__*/React__default.default.createElement(index$1.default, {
|
|
140
144
|
onClick: onClickOutside
|
|
141
145
|
}, /*#__PURE__*/React__default.default.createElement("div", tslib.__assign({
|
|
142
146
|
ref: setPopperElement,
|
package/Icons/ArrowNext.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ fill, width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/ArrowNext.js
CHANGED
|
@@ -9,14 +9,15 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var ArrowNext =
|
|
12
|
+
var ArrowNext = (function (_a) {
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
16
|
width = _c === void 0 ? 10 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
18
|
height = _d === void 0 ? 16 : _d,
|
|
19
|
-
|
|
19
|
+
ref = _a.ref,
|
|
20
|
+
props = tslib.__rest(_a, ["fill", "width", "height", "ref"]);
|
|
20
21
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
22
|
ref: ref,
|
|
22
23
|
fill: "none",
|
package/Icons/Cart.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ fill, width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/Cart.js
CHANGED
|
@@ -9,14 +9,15 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var Cart =
|
|
12
|
+
var Cart = (function (_a) {
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
16
|
width = _c === void 0 ? 24 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
18
|
height = _d === void 0 ? 24 : _d,
|
|
19
|
-
|
|
19
|
+
ref = _a.ref,
|
|
20
|
+
props = tslib.__rest(_a, ["fill", "width", "height", "ref"]);
|
|
20
21
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
23
|
focusable: "false",
|
package/Icons/Check.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ fill, width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/Check.js
CHANGED
|
@@ -9,14 +9,15 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var Check =
|
|
12
|
+
var Check = (function (_a) {
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
16
|
width = _c === void 0 ? 24 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
18
|
height = _d === void 0 ? 24 : _d,
|
|
19
|
-
|
|
19
|
+
ref = _a.ref,
|
|
20
|
+
props = tslib.__rest(_a, ["fill", "width", "height", "ref"]);
|
|
20
21
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
23
|
width: width,
|
package/Icons/Chevron.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ fill, width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/Chevron.js
CHANGED
|
@@ -9,14 +9,15 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var Chevron =
|
|
12
|
+
var Chevron = (function (_a) {
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
16
|
width = _c === void 0 ? 24 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
18
|
height = _d === void 0 ? 24 : _d,
|
|
19
|
-
|
|
19
|
+
ref = _a.ref,
|
|
20
|
+
props = tslib.__rest(_a, ["fill", "width", "height", "ref"]);
|
|
20
21
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
23
|
fill: fill,
|
package/Icons/Close.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/Close.js
CHANGED
|
@@ -9,12 +9,13 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var CloseIcon =
|
|
12
|
+
var CloseIcon = (function (_a) {
|
|
13
13
|
var _b = _a.width,
|
|
14
14
|
width = _b === void 0 ? 24 : _b,
|
|
15
15
|
_c = _a.height,
|
|
16
16
|
height = _c === void 0 ? 24 : _c,
|
|
17
|
-
|
|
17
|
+
ref = _a.ref,
|
|
18
|
+
props = tslib.__rest(_a, ["width", "height", "ref"]);
|
|
18
19
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
19
20
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20
21
|
fill: "none",
|
package/Icons/CrossFill.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ fill, width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/CrossFill.js
CHANGED
|
@@ -9,14 +9,15 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var CrossFill =
|
|
12
|
+
var CrossFill = (function (_a) {
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
16
|
width = _c === void 0 ? 24 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
18
|
height = _d === void 0 ? 24 : _d,
|
|
19
|
-
|
|
19
|
+
ref = _a.ref,
|
|
20
|
+
props = tslib.__rest(_a, ["fill", "width", "height", "ref"]);
|
|
20
21
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
23
|
width: width,
|
package/Icons/Edit.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ fill, width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/Edit.js
CHANGED
|
@@ -9,14 +9,15 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var Edit =
|
|
12
|
+
var Edit = (function (_a) {
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
16
|
width = _c === void 0 ? 24 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
18
|
height = _d === void 0 ? 24 : _d,
|
|
19
|
-
|
|
19
|
+
ref = _a.ref,
|
|
20
|
+
props = tslib.__rest(_a, ["fill", "width", "height", "ref"]);
|
|
20
21
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
23
|
width: width,
|
package/Icons/Exit.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ fill, width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/Exit.js
CHANGED
|
@@ -9,14 +9,15 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var Exit =
|
|
12
|
+
var Exit = (function (_a) {
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
16
|
width = _c === void 0 ? 24 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
18
|
height = _d === void 0 ? 24 : _d,
|
|
19
|
-
|
|
19
|
+
ref = _a.ref,
|
|
20
|
+
props = tslib.__rest(_a, ["fill", "width", "height", "ref"]);
|
|
20
21
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
23
|
width: width,
|
package/Icons/EyeClosed.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ fill, width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/EyeClosed.js
CHANGED
|
@@ -9,14 +9,15 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var EyeClosed =
|
|
12
|
+
var EyeClosed = (function (_a) {
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
16
|
width = _c === void 0 ? 24 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
18
|
height = _d === void 0 ? 24 : _d,
|
|
19
|
-
|
|
19
|
+
ref = _a.ref,
|
|
20
|
+
props = tslib.__rest(_a, ["fill", "width", "height", "ref"]);
|
|
20
21
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
23
|
fill: fill,
|
package/Icons/EyeOpen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ fill, width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/EyeOpen.js
CHANGED
|
@@ -9,14 +9,15 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var EyeOpen =
|
|
12
|
+
var EyeOpen = (function (_a) {
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
16
|
width = _c === void 0 ? 24 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
18
|
height = _d === void 0 ? 24 : _d,
|
|
19
|
-
|
|
19
|
+
ref = _a.ref,
|
|
20
|
+
props = tslib.__rest(_a, ["fill", "width", "height", "ref"]);
|
|
20
21
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
23
|
fill: fill,
|
package/Icons/Help.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/Help.js
CHANGED
|
@@ -9,12 +9,13 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var Help =
|
|
12
|
+
var Help = (function (_a) {
|
|
13
13
|
var _b = _a.width,
|
|
14
14
|
width = _b === void 0 ? 24 : _b,
|
|
15
15
|
_c = _a.height,
|
|
16
16
|
height = _c === void 0 ? 24 : _c,
|
|
17
|
-
|
|
17
|
+
ref = _a.ref,
|
|
18
|
+
props = tslib.__rest(_a, ["width", "height", "ref"]);
|
|
18
19
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
19
20
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20
21
|
width: width,
|
package/Icons/Info.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Props } from "./index.props";
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: ({ fill, width, height, ref, ...props }: Props) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
package/Icons/Info.js
CHANGED
|
@@ -9,14 +9,15 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
-
var Info =
|
|
12
|
+
var Info = (function (_a) {
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
16
|
width = _c === void 0 ? 24 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
18
|
height = _d === void 0 ? 24 : _d,
|
|
19
|
-
|
|
19
|
+
ref = _a.ref,
|
|
20
|
+
props = tslib.__rest(_a, ["fill", "width", "height", "ref"]);
|
|
20
21
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
22
|
width: width,
|
|
22
23
|
height: height,
|