@rio-cloud/rio-uikit 0.16.3-beta.6 → 0.16.3-beta.8
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/CalendarStripe.d.ts +5 -0
- package/CalendarStripe.js +2 -0
- package/Multiselect.d.ts +2 -2
- package/Select.d.ts +1 -1
- package/components/calendarStripe/CalendarStripe.js +214 -0
- package/components/dataTabs/DataTab.js +1 -0
- package/components/dataTabs/DataTabs.js +54 -31
- package/components/responsiveColumnStripe/ResponsiveColumnStripe.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/lib/.DS_Store +0 -0
- package/lib/es/CalendarStripe.d.ts +5 -0
- package/lib/es/CalendarStripe.js +13 -0
- package/lib/es/Multiselect.d.ts +2 -2
- package/lib/es/Select.d.ts +1 -1
- package/lib/es/components/calendarStripe/CalendarStripe.js +225 -0
- package/lib/es/components/dataTabs/DataTab.js +1 -0
- package/lib/es/components/dataTabs/DataTabs.js +54 -31
- package/lib/es/components/responsiveColumnStripe/ResponsiveColumnStripe.js +1 -1
- package/lib/es/index.d.ts +2 -0
- package/lib/es/index.js +8 -0
- package/lib/es/styles/components/DataTabs.less +29 -8
- package/lib/es/styles/components/DatePicker.less +1 -1
- package/lib/es/styles/components/Dialog.less +1 -0
- package/lib/es/styles/components/Switch.less +1 -1
- package/lib/es/styles/design/buttons.less +5 -0
- package/lib/es/styles/design/colors.less +1 -0
- package/lib/es/styles/design/text.less +1 -0
- package/lib/es/styles/mapping/color-map.less +1 -0
- package/lib/es/styles/variables/dark_colors.less +4 -3
- package/lib/es/styles/variables/dark_css_variables_map.less +1 -0
- package/lib/es/styles/variables/light_colors.less +5 -4
- package/lib/es/styles/variables/light_css_variables_map.less +1 -0
- package/lib/es/themes/Website/styles/rio-website.less +42 -26
- package/lib/es/types.ts +31 -14
- package/lib/es/utils/colorScheme.js +28 -5
- package/lib/es/utils/darkModeCDN.js +49 -0
- package/lib/es/utils/init.js +1 -0
- package/lib/es/version.json +1 -1
- package/package.json +1 -1
- package/styles/components/DataTabs.less +29 -8
- package/styles/components/DatePicker.less +1 -1
- package/styles/components/Dialog.less +1 -0
- package/styles/components/Switch.less +1 -1
- package/styles/design/buttons.less +5 -0
- package/styles/design/colors.less +1 -0
- package/styles/design/text.less +1 -0
- package/styles/mapping/color-map.less +1 -0
- package/styles/variables/dark_colors.less +4 -3
- package/styles/variables/dark_css_variables_map.less +1 -0
- package/styles/variables/light_colors.less +5 -4
- package/styles/variables/light_css_variables_map.less +1 -0
- package/themes/Website/styles/rio-website.less +42 -26
- package/types.ts +31 -14
- package/utils/colorScheme.js +25 -4
- package/utils/darkModeCDN.js +46 -0
- package/utils/init.js +2 -1
- package/version.json +1 -1
package/Multiselect.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MultiselectProps } from './types';
|
|
2
|
+
import { MultiselectProps, MultiselectOption } from './types';
|
|
3
3
|
|
|
4
4
|
export { MultiselectOption } from './types';
|
|
5
5
|
export { MultiselectCounterMessage } from './types';
|
|
6
6
|
|
|
7
|
-
export default class Multiselect extends React.Component<MultiselectProps
|
|
7
|
+
export default class Multiselect<T extends MultiselectOption> extends React.Component<MultiselectProps<T>> {
|
|
8
8
|
static SIZE_SM = 'sm';
|
|
9
9
|
static SIZE_LG = 'lg';
|
|
10
10
|
static SIZE_SMALL = 'small';
|
package/Select.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import { SelectProps } from './types';
|
|
3
3
|
|
|
4
4
|
export { SelectOption } from './types';
|
|
5
|
-
export default class Select extends React.Component<SelectProps
|
|
5
|
+
export default class Select<T extends SelectOption> extends React.Component<SelectProps<T>> {}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
+
import React, { useLayoutEffect, useState, useRef, forwardRef } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { AnimatePresence, motion } from 'framer-motion';
|
|
7
|
+
import useAfterMount from '../../hooks/useAfterMount';
|
|
8
|
+
import useElementSize from '../../hooks/useElementSize';
|
|
9
|
+
import usePrevious from '../../hooks/usePrevious';
|
|
10
|
+
var DEFAULT_MIN_WITH = 200;
|
|
11
|
+
var DEFAULT_MIN_DAYS = 1;
|
|
12
|
+
var DEFAULT_MAX_DAYS = 7;
|
|
13
|
+
var ANIMATION_DURATION = 0.2;
|
|
14
|
+
var ANIMATION_NEXT = 'page';
|
|
15
|
+
var ANIMATION_BACK = 'pageBack';
|
|
16
|
+
var ITEM_NAME = 'ColumnItem';
|
|
17
|
+
var variants = {
|
|
18
|
+
pageEnter: function pageEnter(pageDirection) {
|
|
19
|
+
return {
|
|
20
|
+
x: pageDirection === ANIMATION_NEXT ? '60%' : '-60%',
|
|
21
|
+
opacity: 0
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
pageCenter: function pageCenter() {
|
|
25
|
+
return {
|
|
26
|
+
x: 0,
|
|
27
|
+
opacity: 1
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var getDateString = function getDateString(date) {
|
|
32
|
+
return date.toISOString().split('T').at(0);
|
|
33
|
+
};
|
|
34
|
+
var getFirstColumnItem = function getFirstColumnItem(node) {
|
|
35
|
+
if (_toConsumableArray(node.classList).includes(ITEM_NAME)) {
|
|
36
|
+
return node;
|
|
37
|
+
}
|
|
38
|
+
return getFirstColumnItem(node.children[0]);
|
|
39
|
+
};
|
|
40
|
+
var CalendarStripe = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
41
|
+
var _props$minDayWith = props.minDayWith,
|
|
42
|
+
minDayWith = _props$minDayWith === void 0 ? DEFAULT_MIN_WITH : _props$minDayWith,
|
|
43
|
+
_props$minDays = props.minDays,
|
|
44
|
+
minDays = _props$minDays === void 0 ? DEFAULT_MIN_DAYS : _props$minDays,
|
|
45
|
+
_props$maxDays = props.maxDays,
|
|
46
|
+
maxDays = _props$maxDays === void 0 ? DEFAULT_MAX_DAYS : _props$maxDays,
|
|
47
|
+
render = props.render,
|
|
48
|
+
skipWeekends = props.skipWeekends,
|
|
49
|
+
_props$startDate = props.startDate,
|
|
50
|
+
startDate = _props$startDate === void 0 ? new Date() : _props$startDate,
|
|
51
|
+
onNextClick = props.onNextClick,
|
|
52
|
+
onPreviousClick = props.onPreviousClick,
|
|
53
|
+
buttonClassName = props.buttonClassName,
|
|
54
|
+
className = props.className;
|
|
55
|
+
var _useState = useState(startDate),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
firstDate = _useState2[0],
|
|
58
|
+
setFirstDate = _useState2[1];
|
|
59
|
+
var _useState3 = useState(1),
|
|
60
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
61
|
+
amountOfDaysToShow = _useState4[0],
|
|
62
|
+
setAmountOfDaysToShow = _useState4[1];
|
|
63
|
+
var _useState5 = useState(false),
|
|
64
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
65
|
+
enableInitialAnimation = _useState6[0],
|
|
66
|
+
setEnableInitialAnimation = _useState6[1];
|
|
67
|
+
|
|
68
|
+
// The base for reacting on changing width of the wrapping element.
|
|
69
|
+
// It uses a ResizeObserver under the hood.
|
|
70
|
+
var columnWrapperRef = useRef();
|
|
71
|
+
var _useElementSize = useElementSize(columnWrapperRef),
|
|
72
|
+
_useElementSize2 = _slicedToArray(_useElementSize, 1),
|
|
73
|
+
columnWrapperWidth = _useElementSize2[0];
|
|
74
|
+
var previous = usePrevious(getDateString(firstDate));
|
|
75
|
+
var animationDirection = getDateString(firstDate) > previous ? ANIMATION_NEXT : ANIMATION_BACK;
|
|
76
|
+
|
|
77
|
+
// Update startDate from outside
|
|
78
|
+
var _useState7 = useState(startDate),
|
|
79
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
80
|
+
previousStartDate = _useState8[0],
|
|
81
|
+
setPreviousStartDate = _useState8[1];
|
|
82
|
+
if (getDateString(startDate) !== getDateString(previousStartDate)) {
|
|
83
|
+
setFirstDate(startDate);
|
|
84
|
+
setPreviousStartDate(startDate);
|
|
85
|
+
}
|
|
86
|
+
useAfterMount(function () {
|
|
87
|
+
setEnableInitialAnimation(true);
|
|
88
|
+
});
|
|
89
|
+
useLayoutEffect(function () {
|
|
90
|
+
if (!columnWrapperRef.current) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
var firstItem = getFirstColumnItem(columnWrapperRef.current.children[0]);
|
|
94
|
+
if (!firstItem) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Get the width of the first column to calculate how many columns fit on one page
|
|
99
|
+
// according to the given minWidth per column
|
|
100
|
+
var columnWidth = firstItem.getBoundingClientRect().width;
|
|
101
|
+
|
|
102
|
+
// Limit columns per page for given min and max values
|
|
103
|
+
var allowForLessColumns = amountOfDaysToShow - 1 >= minDays;
|
|
104
|
+
var allowForMoreColumns = amountOfDaysToShow + 1 <= maxDays;
|
|
105
|
+
var goSmaller = allowForLessColumns && columnWidth <= minDayWith;
|
|
106
|
+
var goBigger = allowForMoreColumns && (amountOfDaysToShow + 1) * minDayWith <= columnWrapperWidth;
|
|
107
|
+
if (goBigger) {
|
|
108
|
+
var newValue = amountOfDaysToShow + 1;
|
|
109
|
+
setAmountOfDaysToShow(newValue);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (goSmaller) {
|
|
113
|
+
var _newValue = amountOfDaysToShow - 1;
|
|
114
|
+
setAmountOfDaysToShow(_newValue);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
}, [columnWrapperWidth, columnWrapperRef.current, amountOfDaysToShow, firstDate]);
|
|
118
|
+
var handleNext = function handleNext() {
|
|
119
|
+
var newFirstDate = new Date(firstDate);
|
|
120
|
+
newFirstDate.setDate(newFirstDate.getDate() + amountOfDaysToShow);
|
|
121
|
+
setFirstDate(newFirstDate);
|
|
122
|
+
onNextClick(newFirstDate);
|
|
123
|
+
};
|
|
124
|
+
var handlePrev = function handlePrev() {
|
|
125
|
+
var newFirstDate = new Date(firstDate);
|
|
126
|
+
newFirstDate.setDate(newFirstDate.getDate() - amountOfDaysToShow);
|
|
127
|
+
setFirstDate(newFirstDate);
|
|
128
|
+
onPreviousClick(newFirstDate);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
// Re-calculate the dates to show depending on the amount of days to show
|
|
132
|
+
var dates = [];
|
|
133
|
+
var addDays = true;
|
|
134
|
+
var index = 1;
|
|
135
|
+
while (addDays) {
|
|
136
|
+
var currentDate = new Date(firstDate);
|
|
137
|
+
currentDate.setDate(firstDate.getDate() + index);
|
|
138
|
+
var isSaturday = currentDate.getDay() === 6;
|
|
139
|
+
var isSunday = currentDate.getDay() === 0;
|
|
140
|
+
var isWeekend = isSaturday || isSunday;
|
|
141
|
+
if (isWeekend && !skipWeekends) {
|
|
142
|
+
dates.push(currentDate);
|
|
143
|
+
} else if (!isWeekend) {
|
|
144
|
+
dates.push(currentDate);
|
|
145
|
+
}
|
|
146
|
+
index++;
|
|
147
|
+
if (dates.length === amountOfDaysToShow) {
|
|
148
|
+
addDays = false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
var wrapperClassName = classNames('CalenderStripe', 'display-flex', 'align-items-center', 'overflow-hidden', 'bg-white', 'border', 'rounded', className);
|
|
152
|
+
var baseButtonClassName = classNames('align-items-center', 'align-self-stretch', 'display-flex', 'hover-scale-105', 'hover-text-color-darkest', 'padding-10', 'cursor-pointer', 'text-color-darker', 'text-size-12', buttonClassName);
|
|
153
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
154
|
+
ref: ref,
|
|
155
|
+
className: wrapperClassName
|
|
156
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
157
|
+
className: baseButtonClassName,
|
|
158
|
+
onClick: handlePrev
|
|
159
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
160
|
+
className: "rioglyph rioglyph-chevron-left"
|
|
161
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
className: "flex-1-1 overflow-hidden",
|
|
163
|
+
ref: columnWrapperRef
|
|
164
|
+
}, /*#__PURE__*/React.createElement(AnimatePresence, {
|
|
165
|
+
exitBeforeEnter: true,
|
|
166
|
+
custom: animationDirection
|
|
167
|
+
}, /*#__PURE__*/React.createElement(motion.div, {
|
|
168
|
+
key: getDateString(firstDate),
|
|
169
|
+
variants: variants,
|
|
170
|
+
initial: enableInitialAnimation ? 'pageEnter' : false,
|
|
171
|
+
animate: "pageCenter",
|
|
172
|
+
custom: animationDirection,
|
|
173
|
+
transition: {
|
|
174
|
+
duration: ANIMATION_DURATION
|
|
175
|
+
}
|
|
176
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
177
|
+
className: "ColumnWrapper display-flex space-x--1 user-select-none"
|
|
178
|
+
}, dates.map(function (date) {
|
|
179
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
180
|
+
className: "".concat(ITEM_NAME, " flex-1-1"),
|
|
181
|
+
key: "".concat(getDateString(date))
|
|
182
|
+
}, /*#__PURE__*/React.cloneElement(render, {
|
|
183
|
+
date: date
|
|
184
|
+
}));
|
|
185
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
186
|
+
className: baseButtonClassName,
|
|
187
|
+
onClick: handleNext
|
|
188
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
189
|
+
className: "rioglyph rioglyph-chevron-right"
|
|
190
|
+
})));
|
|
191
|
+
});
|
|
192
|
+
CalendarStripe.defaultProps = {
|
|
193
|
+
minDayWith: DEFAULT_MIN_WITH,
|
|
194
|
+
minDays: DEFAULT_MIN_DAYS,
|
|
195
|
+
maxDays: DEFAULT_MAX_DAYS,
|
|
196
|
+
skipWeekends: false,
|
|
197
|
+
onNextClick: function onNextClick() {},
|
|
198
|
+
onPreviousClick: function onPreviousClick() {},
|
|
199
|
+
buttonClassName: '',
|
|
200
|
+
className: ''
|
|
201
|
+
};
|
|
202
|
+
CalendarStripe.propTypes = {
|
|
203
|
+
minDayWith: PropTypes.number,
|
|
204
|
+
minDays: PropTypes.number,
|
|
205
|
+
maxDays: PropTypes.number,
|
|
206
|
+
render: PropTypes.node.isRequired,
|
|
207
|
+
skipWeekends: PropTypes.bool,
|
|
208
|
+
startDate: PropTypes.instanceOf(Date),
|
|
209
|
+
onNextClick: PropTypes.func,
|
|
210
|
+
onPreviousClick: PropTypes.func,
|
|
211
|
+
buttonClassName: PropTypes.string,
|
|
212
|
+
className: PropTypes.string
|
|
213
|
+
};
|
|
214
|
+
export default CalendarStripe;
|
|
@@ -47,6 +47,7 @@ DataTab.defaultProps = {
|
|
|
47
47
|
DataTab.propTypes = {
|
|
48
48
|
// Props are injected from the wrapping DataTabs component
|
|
49
49
|
disableTransition: PropTypes.bool,
|
|
50
|
+
className: PropTypes.string,
|
|
50
51
|
active: PropTypes.bool,
|
|
51
52
|
tabKey: PropTypes.string.isRequired,
|
|
52
53
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.string])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
-
var _excluded = ["
|
|
4
|
+
var _excluded = ["activeKey", "bordered", "children", "className", "commonTabContent", "disableTransition", "arrowClassname", "onSelectTab", "tabActiveBgColor", "tabActiveClassName", "tabBgColor", "tabClassName", "tabContentClassName", "tabFirstChildClassName", "tabHoverBgColor", "tabHoverClassName", "tabLastChildClassName", "tabsWrapperClassName", "vertical"];
|
|
5
5
|
import React, { useEffect, useState } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import classNames from 'classnames';
|
|
@@ -13,18 +13,24 @@ var getFirstTabKey = function getFirstTabKey() {
|
|
|
13
13
|
return firstItem && firstItem.props.tabKey;
|
|
14
14
|
};
|
|
15
15
|
var DataTabs = function DataTabs(props) {
|
|
16
|
-
var
|
|
17
|
-
activeKey = props.activeKey,
|
|
18
|
-
activeTextColor = props.activeTextColor,
|
|
16
|
+
var activeKey = props.activeKey,
|
|
19
17
|
bordered = props.bordered,
|
|
20
18
|
children = props.children,
|
|
21
19
|
wrapperClassName = props.className,
|
|
22
20
|
commonTabContent = props.commonTabContent,
|
|
23
21
|
disableTransition = props.disableTransition,
|
|
24
|
-
|
|
25
|
-
hoverTextColor = props.hoverTextColor,
|
|
22
|
+
arrowClassname = props.arrowClassname,
|
|
26
23
|
onSelectTab = props.onSelectTab,
|
|
24
|
+
tabActiveBgColor = props.tabActiveBgColor,
|
|
25
|
+
tabActiveClassName = props.tabActiveClassName,
|
|
26
|
+
tabBgColor = props.tabBgColor,
|
|
27
|
+
tabClassName = props.tabClassName,
|
|
27
28
|
tabContentClassName = props.tabContentClassName,
|
|
29
|
+
tabFirstChildClassName = props.tabFirstChildClassName,
|
|
30
|
+
tabHoverBgColor = props.tabHoverBgColor,
|
|
31
|
+
tabHoverClassName = props.tabHoverClassName,
|
|
32
|
+
tabLastChildClassName = props.tabLastChildClassName,
|
|
33
|
+
tabsWrapperClassName = props.tabsWrapperClassName,
|
|
28
34
|
vertical = props.vertical,
|
|
29
35
|
remainingProps = _objectWithoutProperties(props, _excluded);
|
|
30
36
|
var _useState = useState(activeKey || getFirstTabKey(children)),
|
|
@@ -37,7 +43,7 @@ var DataTabs = function DataTabs(props) {
|
|
|
37
43
|
var handleSelectTab = function handleSelectTab(event) {
|
|
38
44
|
onSelectTab(event.currentTarget.getAttribute('data-tabkey'));
|
|
39
45
|
};
|
|
40
|
-
var wrapperClassNames = classNames('DataTabsContainer', bordered && 'DataTab-bordered', wrapperClassName, vertical
|
|
46
|
+
var wrapperClassNames = classNames('DataTabsContainer', bordered && 'DataTab-bordered', wrapperClassName, vertical ? 'DataTabs-vertical' : 'DataTabs-horizontal');
|
|
41
47
|
var enrichChildren = function enrichChildren() {
|
|
42
48
|
if (disableTransition) {
|
|
43
49
|
return React.Children.map(children, function (child) {
|
|
@@ -63,24 +69,34 @@ var DataTabs = function DataTabs(props) {
|
|
|
63
69
|
return /*#__PURE__*/React.createElement("div", _extends({}, remainingProps, {
|
|
64
70
|
className: wrapperClassNames
|
|
65
71
|
}), /*#__PURE__*/React.createElement("div", {
|
|
66
|
-
className: "DataTabsWrapper"
|
|
72
|
+
className: "DataTabsWrapper ".concat(tabsWrapperClassName)
|
|
67
73
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
68
74
|
className: "DataTabs",
|
|
69
75
|
role: "tabList"
|
|
70
|
-
}, React.Children.map(children, function (child) {
|
|
76
|
+
}, React.Children.map(children, function (child, index) {
|
|
77
|
+
var _useState3 = useState(false),
|
|
78
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
79
|
+
isHovering = _useState4[0],
|
|
80
|
+
setIsHovering = _useState4[1];
|
|
71
81
|
var _child$props = child.props,
|
|
72
82
|
tabKey = _child$props.tabKey,
|
|
73
|
-
|
|
74
|
-
|
|
83
|
+
title = _child$props.title,
|
|
84
|
+
className = _child$props.className;
|
|
75
85
|
var isActive = tabKey === internalActiveKey;
|
|
76
|
-
var tabClassNames = classNames('DataTab', 'tab',
|
|
86
|
+
var tabClassNames = classNames('DataTab', 'tab', index === 0 && tabFirstChildClassName, index === children.length - 1 && tabLastChildClassName, !isHovering && !isActive && tabClassName, isHovering && !isActive && tabHoverClassName, isActive && "active ".concat(tabActiveClassName), !isActive && 'cursor-pointer', className && className);
|
|
77
87
|
return /*#__PURE__*/React.createElement("li", {
|
|
78
88
|
key: tabKey,
|
|
79
89
|
className: tabClassNames,
|
|
80
90
|
onClick: handleSelectTab,
|
|
81
|
-
"data-tabkey": tabKey
|
|
91
|
+
"data-tabkey": tabKey,
|
|
92
|
+
onMouseEnter: function onMouseEnter() {
|
|
93
|
+
return setIsHovering(true);
|
|
94
|
+
},
|
|
95
|
+
onMouseLeave: function onMouseLeave() {
|
|
96
|
+
return setIsHovering(false);
|
|
97
|
+
}
|
|
82
98
|
}, title, /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
className: "arrow ".concat(isActive ? 'in' : '')
|
|
99
|
+
className: "arrow ".concat(arrowClassname, " ").concat(isActive ? 'in' : '')
|
|
84
100
|
}));
|
|
85
101
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
86
102
|
className: "tab-content ".concat(tabContentClassName),
|
|
@@ -89,31 +105,38 @@ var DataTabs = function DataTabs(props) {
|
|
|
89
105
|
};
|
|
90
106
|
DataTabs.defaultProps = {
|
|
91
107
|
activeKey: '',
|
|
92
|
-
onSelectTab: function onSelectTab() {},
|
|
93
|
-
className: '',
|
|
94
|
-
tabContentClassName: '',
|
|
95
|
-
hoverTextColor: 'hover-text-color-darkest',
|
|
96
|
-
hoverBgColor: 'hover-bg-highlight-decent',
|
|
97
|
-
activeTextColor: 'text-color-white',
|
|
98
|
-
activeBgColor: 'bg-highlight-dark',
|
|
99
108
|
bordered: true,
|
|
100
|
-
disableTransition: false,
|
|
101
109
|
children: [],
|
|
110
|
+
className: '',
|
|
111
|
+
disableTransition: false,
|
|
112
|
+
arrowClassname: 'bg-highlight-dark border-color-transparent',
|
|
113
|
+
onSelectTab: function onSelectTab() {},
|
|
114
|
+
tabActiveClassName: 'bg-highlight-dark text-color-white',
|
|
115
|
+
tabClassName: '',
|
|
116
|
+
tabContentClassName: '',
|
|
117
|
+
tabFirstChildClassName: '',
|
|
118
|
+
tabHoverClassName: 'bg-highlight-decent text-color-darkest',
|
|
119
|
+
tabLastChildClassName: '',
|
|
120
|
+
tabsWrapperClassName: '',
|
|
102
121
|
vertical: false
|
|
103
122
|
};
|
|
104
123
|
DataTabs.propTypes = {
|
|
105
124
|
activeKey: PropTypes.string,
|
|
106
|
-
onSelectTab: PropTypes.func.isRequired,
|
|
107
|
-
tabContentClassName: PropTypes.string,
|
|
108
|
-
hoverTextColor: PropTypes.string,
|
|
109
|
-
hoverBgColor: PropTypes.string,
|
|
110
|
-
activeTextColor: PropTypes.string,
|
|
111
|
-
activeBgColor: PropTypes.string,
|
|
112
125
|
bordered: PropTypes.bool,
|
|
113
|
-
|
|
126
|
+
children: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
114
127
|
className: PropTypes.string,
|
|
115
|
-
vertical: PropTypes.bool,
|
|
116
128
|
commonTabContent: PropTypes.node,
|
|
117
|
-
|
|
129
|
+
disableTransition: PropTypes.bool,
|
|
130
|
+
arrowClassname: PropTypes.string,
|
|
131
|
+
onSelectTab: PropTypes.func.isRequired,
|
|
132
|
+
tabActiveClassName: PropTypes.string,
|
|
133
|
+
tabClassName: PropTypes.string,
|
|
134
|
+
tabContentClassName: PropTypes.string,
|
|
135
|
+
tabFirstChildClassName: PropTypes.string,
|
|
136
|
+
tabHoverClassName: PropTypes.string,
|
|
137
|
+
tabLastChildClassName: PropTypes.string,
|
|
138
|
+
tabsWrapperClassName: PropTypes.string,
|
|
139
|
+
variant: PropTypes.string,
|
|
140
|
+
vertical: PropTypes.bool
|
|
118
141
|
};
|
|
119
142
|
export default DataTabs;
|
|
@@ -165,7 +165,7 @@ var ResponsiveColumnStripe = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
165
165
|
updatePageOnColumnsSizeChange(firstItem, _newValue, children);
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
|
-
}, [columnWrapperWidth, columnWrapperRef.current, children]);
|
|
168
|
+
}, [columnWrapperWidth, columnWrapperRef.current, children, columnsPerPage]);
|
|
169
169
|
var handlePrevClick = function handlePrevClick() {
|
|
170
170
|
setIsResizePage(false);
|
|
171
171
|
var pageNumber = currentPage - 1;
|
package/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ declare module '@rio-cloud/rio-uikit' {
|
|
|
28
28
|
ButtonDropdownProps,
|
|
29
29
|
CheckboxProps,
|
|
30
30
|
ClearableInputProps,
|
|
31
|
+
CalendarStripeProps,
|
|
31
32
|
CollapseProps,
|
|
32
33
|
ConfirmationDialogProps,
|
|
33
34
|
ContentLoaderProps,
|
|
@@ -147,6 +148,7 @@ declare module '@rio-cloud/rio-uikit' {
|
|
|
147
148
|
export class BrowserWarning extends React.Component<BrowserWarningProps> {}
|
|
148
149
|
export class Checkbox extends React.Component<CheckboxProps> {}
|
|
149
150
|
export class ClearableInput extends React.Component<ClearableInputProps> {}
|
|
151
|
+
export class CalendarStripe extends React.Component<CalendarStripeProps> {}
|
|
150
152
|
export class ConfirmationDialog extends React.Component<ConfirmationDialogProps> {}
|
|
151
153
|
export class Collapse extends React.Component<CollapseProps> {}
|
|
152
154
|
export class ContentLoader extends React.Component<ContentLoaderProps> {}
|
package/index.js
CHANGED
|
@@ -219,6 +219,8 @@ import { default as _RuleContainer } from './components/rules/RuleContainer';
|
|
|
219
219
|
export { _RuleContainer as RuleContainer };
|
|
220
220
|
import { default as _RulesWrapper } from './components/rules/RulesWrapper';
|
|
221
221
|
export { _RulesWrapper as RulesWrapper };
|
|
222
|
+
import { default as _CalendarStripe } from './components/calendarStripe/CalendarStripe';
|
|
223
|
+
export { _CalendarStripe as CalendarStripe };
|
|
222
224
|
import { toggleSupportMarker as _toggleSupportMarker, enableSupportMarker as _enableSupportMarker, SUPPORT_MARKER_CLASS as _SUPPORT_MARKER_CLASS } from './components/supportMarker/toggleSupportMarker';
|
|
223
225
|
export { _toggleSupportMarker as toggleSupportMarker, _enableSupportMarker as enableSupportMarker, _SUPPORT_MARKER_CLASS as SUPPORT_MARKER_CLASS };
|
|
224
226
|
import { default as _Carousel } from './components/carousel/Carousel';
|
package/lib/.DS_Store
CHANGED
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _CalendarStripe2["default"];
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _CalendarStripe2 = _interopRequireDefault(require("./components/calendarStripe/CalendarStripe"));
|
package/lib/es/Multiselect.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MultiselectProps } from './types';
|
|
2
|
+
import { MultiselectProps, MultiselectOption } from './types';
|
|
3
3
|
|
|
4
4
|
export { MultiselectOption } from './types';
|
|
5
5
|
export { MultiselectCounterMessage } from './types';
|
|
6
6
|
|
|
7
|
-
export default class Multiselect extends React.Component<MultiselectProps
|
|
7
|
+
export default class Multiselect<T extends MultiselectOption> extends React.Component<MultiselectProps<T>> {
|
|
8
8
|
static SIZE_SM = 'sm';
|
|
9
9
|
static SIZE_LG = 'lg';
|
|
10
10
|
static SIZE_SMALL = 'small';
|
package/lib/es/Select.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import { SelectProps } from './types';
|
|
3
3
|
|
|
4
4
|
export { SelectOption } from './types';
|
|
5
|
-
export default class Select extends React.Component<SelectProps
|
|
5
|
+
export default class Select<T extends SelectOption> extends React.Component<SelectProps<T>> {}
|