@rio-cloud/rio-uikit 0.15.0-beta-46 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +197 -192
- package/lib/components/actionBarItem/ActionBarItem.js +9 -0
- package/lib/components/actionBarItem/ActionBarItemList.js +38 -0
- package/lib/components/actionBarItem/ActionBarItemListItem.js +51 -0
- package/lib/components/actionBarItem/ActionBarItemListSeparator.js +37 -0
- package/lib/components/actionBarItem/ActionBarOverlay.js +2 -2
- package/lib/components/animatedNumber/AnimatedNumber.js +81 -0
- package/lib/components/applicationHeader/ApplicationHeader.js +4 -1
- package/lib/components/applicationLayout/ApplicationLayoutBody.js +3 -1
- package/lib/components/assetTree/AssetTree.less +3 -2
- package/lib/components/assetTree/Tree.js +3 -3
- package/lib/components/autosuggest/AutoSuggest.js +5 -3
- package/lib/components/bottomSheet/BottomSheet.js +157 -0
- package/lib/components/browserWarning/BrowserWarningMessageDE.js +1 -1
- package/lib/components/browserWarning/BrowserWarningMessageEN.js +1 -1
- package/lib/components/button/Button.js +127 -7
- package/lib/components/button/ToggleButton.js +11 -108
- package/lib/components/charts/BarChart.js +4 -3
- package/lib/components/charts/ChartNeedle.js +2 -2
- package/lib/components/charts/PieChart.js +11 -6
- package/lib/components/charts/RadialBarChart.js +4 -1
- package/lib/components/charts/chartHelper.js +3 -3
- package/lib/components/checkbox/Checkbox.js +127 -171
- package/lib/components/checkbox/Checkbox.less +4 -2
- package/lib/components/clearableInput/ClearableInput.js +2 -2
- package/lib/components/clearableInput/ClearableInput.less +2 -1
- package/lib/components/dataTabs/DataTabs.js +78 -120
- package/lib/components/datepicker/DatePicker.js +41 -72
- package/lib/components/datepicker/DatePicker.less +35 -5
- package/lib/components/datepicker/DateRangePicker.js +3 -3
- package/lib/components/dialog/Dialog.js +2 -2
- package/lib/components/dialog/InfoDialog.js +2 -2
- package/lib/components/dialog/MediaDialog.js +2 -2
- package/lib/components/dialog/SaveDialog.js +2 -2
- package/lib/components/dialog/SimpleDialog.js +2 -2
- package/lib/components/dialog/SplitDialog.js +2 -2
- package/lib/components/driverName/DriverName.js +1 -1
- package/lib/components/dropdown/ButtonDropdown.js +2 -2
- package/lib/components/dropdown/DropdownSubmenu.less +2 -2
- package/lib/components/fade/Fade.js +2 -2
- package/lib/components/filepicker/FilePicker.js +2 -2
- package/lib/components/listMenu/ListMenu.js +2 -2
- package/lib/components/loadMore/LoadMoreButton.js +1 -1
- package/lib/components/map/components/Map.js +2 -2
- package/lib/components/map/components/constants.js +1 -1
- package/lib/components/map/components/features/Route.js +2 -2
- package/lib/components/map/components/features/basics/MapLayerGroup.js +2 -2
- package/lib/components/map/components/features/basics/marker/Marker.js +2 -1
- package/lib/components/map/components/features/basics/marker/TextMarker.js +1 -1
- package/lib/components/map/components/features/layers/MarkerLayer.js +2 -2
- package/lib/components/map/components/features/layers/clustering/SimpleClusterLayer.js +2 -2
- package/lib/components/map/utils/eventHandling.js +5 -4
- package/lib/components/map/utils/hooks.js +1 -1
- package/lib/components/map/utils/validation.js +1 -1
- package/lib/components/numberControl/NumberControl.js +165 -145
- package/lib/components/numberInput/NumberInput.js +152 -233
- package/lib/components/onboarding/OnboardingTip.js +1 -1
- package/lib/components/overlay/OverlayTrigger.js +2 -1
- package/lib/components/radiobutton/RadioButton.js +116 -148
- package/lib/components/radiobutton/RadioButton.less +10 -6
- package/lib/components/resizer/Resizer.less +2 -2
- package/lib/components/selects/BaseDropdownMenu.js +2 -2
- package/lib/components/selects/DropdownHeader.js +2 -6
- package/lib/components/spinner/Spinner.js +1 -1
- package/lib/components/spinner/Spinner.less +2 -2
- package/lib/components/states/MaintenanceState.js +25 -0
- package/lib/components/states/baseStatePropTypes.js +1 -1
- package/lib/components/supportMarker/toggleSupportMarker.js +1 -1
- package/lib/components/table/SortArrows.js +1 -1
- package/lib/components/table/TableCardsSorting.js +7 -7
- package/lib/components/table/TableSettingsDialog.js +2 -2
- package/lib/components/table/TableSettingsListItem.js +1 -1
- package/lib/components/teaser/Teaser.js +1 -1
- package/lib/components/timepicker/TimePicker.js +10 -2
- package/lib/components/tooltip/Tooltip.js +4 -4
- package/lib/components/tooltip/Tooltip.less +0 -10
- package/lib/es/ActionBarItem.d.ts +6 -0
- package/lib/es/ActionBarItemList.d.ts +5 -0
- package/lib/es/ActionBarItemList.js +15 -0
- package/lib/es/ActionBarItemListItem.d.ts +5 -0
- package/lib/es/ActionBarItemListItem.js +15 -0
- package/lib/es/ActionBarItemListSeparator.d.ts +5 -0
- package/lib/es/ActionBarItemListSeparator.js +15 -0
- package/lib/es/AnimatedNumber.d.ts +5 -0
- package/lib/es/AnimatedNumber.js +15 -0
- package/lib/es/BottomSheet.d.ts +5 -0
- package/lib/es/BottomSheet.js +15 -0
- package/lib/es/DeviceUtils.d.ts +5 -0
- package/lib/es/MaintenanceState.d.ts +5 -0
- package/lib/es/MaintenanceState.js +15 -0
- package/lib/es/SortDirection.d.ts +6 -0
- package/lib/es/SortDirection.js +13 -0
- package/lib/es/SortUtils.d.ts +6 -0
- package/lib/es/SortUtils.js +19 -0
- package/lib/es/SupportMarker.js +15 -0
- package/lib/es/deviceUtils.js +14 -2
- package/lib/es/routeUtils.js +6 -6
- package/lib/es/useAfterMount.d.ts +4 -0
- package/lib/es/useAfterMount.js +15 -0
- package/lib/es/useClickOutside.d.ts +4 -0
- package/lib/es/useClickOutside.js +15 -0
- package/lib/es/useClipboard.d.ts +4 -0
- package/lib/es/useClipboard.js +15 -0
- package/lib/es/useDebugInfo.d.ts +4 -0
- package/lib/es/useDebugInfo.js +15 -0
- package/lib/es/useEffectOnce.d.ts +4 -0
- package/lib/es/useEffectOnce.js +15 -0
- package/lib/es/useElementSize.d.ts +4 -0
- package/lib/es/useElementSize.js +15 -0
- package/lib/es/useEsc.d.ts +4 -0
- package/lib/es/useEsc.js +15 -0
- package/lib/es/useEvent.d.ts +4 -0
- package/lib/es/useEvent.js +15 -0
- package/lib/es/useInterval.d.ts +4 -0
- package/lib/es/useInterval.js +15 -0
- package/lib/es/useKey.d.ts +4 -0
- package/lib/es/useKey.js +15 -0
- package/lib/es/useLocalStorage.d.ts +4 -0
- package/lib/es/useLocalStorage.js +13 -0
- package/lib/es/useOnMount.js +15 -0
- package/lib/es/useOnScreen.d.ts +4 -0
- package/lib/es/useOnScreen.js +15 -0
- package/lib/es/useOnlineStatus.d.ts +4 -0
- package/lib/es/useOnlineStatus.js +15 -0
- package/lib/es/useRenderCount.d.ts +4 -0
- package/lib/es/useRenderCount.js +15 -0
- package/lib/es/useSessionStorage.d.ts +4 -0
- package/lib/es/useSessionStorage.js +13 -0
- package/lib/es/useStateWithValidation.d.ts +4 -0
- package/lib/es/useStateWithValidation.js +15 -0
- package/lib/es/useTimeout.d.ts +4 -0
- package/lib/es/useTimeout.js +15 -0
- package/lib/es/useWindowResize.d.ts +4 -0
- package/lib/es/useWindowResize.js +15 -0
- package/lib/hooks/useDebugInfo.js +55 -0
- package/lib/hooks/useInterval.js +30 -0
- package/lib/hooks/useOnScreen.js +46 -0
- package/lib/hooks/useOnlineStatus.js +30 -0
- package/lib/hooks/useRenderCount.js +17 -0
- package/lib/hooks/useStateWithValidation.js +33 -0
- package/lib/hooks/useStorage.js +53 -0
- package/lib/hooks/useTimeout.js +9 -6
- package/lib/index.js +274 -266
- package/lib/mapIndex.js +72 -72
- package/lib/style/css/_exports/man-uikit.less +1 -0
- package/lib/style/css/_exports/rio-buyButton.less +5 -0
- package/lib/style/css/_exports/rio-uikit-core.less +2 -2
- package/lib/style/css/_exports/rio-uikit-print-utilities.less +21 -0
- package/lib/style/css/_exports/rio-uikit-responsive-utilities.less +2 -1
- package/lib/style/css/_exports/rio-uikit.less +1 -0
- package/lib/style/css/_exports/rio-website.less +131 -0
- package/lib/style/css/_exports/vw-uikit.less +2 -1
- package/lib/style/css/bootstrap/badges.less +0 -12
- package/lib/style/css/bootstrap/dropdowns.less +13 -13
- package/lib/style/css/bootstrap/type.less +11 -4
- package/lib/style/css/rio-theme/badges.less +48 -1
- package/lib/style/css/rio-theme/button-groups.less +1 -1
- package/lib/style/css/rio-theme/buttons.less +58 -16
- package/lib/style/css/rio-theme/carousel.less +1 -1
- package/lib/style/css/rio-theme/dropdowns.less +6 -26
- package/lib/style/css/rio-theme/navbar.less +46 -3
- package/lib/style/css/rio-theme/navs.less +19 -0
- package/lib/style/css/rio-theme/pagination.less +1 -1
- package/lib/style/css/utils/_imports.less +82 -0
- package/lib/style/css/utils/animations/translate.less +4 -1
- package/lib/style/css/utils/responsive/border.less +27 -19
- package/lib/style/css/utils/responsive/display.less +2 -0
- package/lib/style/css/utils/responsive/grid.less +6 -0
- package/lib/style/css/utils/responsive/sizing.less +1 -1
- package/lib/style/css/utils/text.less +3 -0
- package/lib/style/fonts/rioglyph/rioglyph.less +74 -14
- package/lib/style/fonts/rioglyph/rioglyph.svg +106 -34
- package/lib/style/fonts/rioglyph/rioglyph.ttf +0 -0
- package/lib/style/fonts/rioglyph/rioglyph.woff +0 -0
- package/lib/types.ts +139 -22
- package/lib/utils/SortUtils.js +54 -0
- package/lib/utils/buttonEffect.js +68 -0
- package/lib/utils/deviceUtils.js +1 -5
- package/lib/utils/logDeprecatedWarnings.js +1 -1
- package/lib/utils/logPropError.js +1 -1
- package/lib/utils/routeUtils.js +7 -6
- package/lib/utils/scrollItemIntoView.js +1 -1
- package/lib/version.json +1 -1
- package/package.json +73 -75
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = exports.AnimatedNumber = void 0;
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _useInterval = _interopRequireDefault(require("../../hooks/useInterval"));
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
var TIMER = 10;
|
|
25
|
+
|
|
26
|
+
var AnimatedNumber = function AnimatedNumber(props) {
|
|
27
|
+
var start = props.start,
|
|
28
|
+
end = props.end,
|
|
29
|
+
prefix = props.prefix,
|
|
30
|
+
unit = props.unit,
|
|
31
|
+
speed = props.speed,
|
|
32
|
+
decreasing = props.decreasing,
|
|
33
|
+
onEnd = props.onEnd,
|
|
34
|
+
className = props.className;
|
|
35
|
+
|
|
36
|
+
var _useState = (0, _react.useState)(start),
|
|
37
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
38
|
+
value = _useState2[0],
|
|
39
|
+
setValue = _useState2[1];
|
|
40
|
+
|
|
41
|
+
if (typeof start !== 'number' || typeof end !== 'number' || typeof speed !== 'number') {
|
|
42
|
+
throw new Error('Props "start", "end" and "speed" need to be of type number.');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
var shallContiueToRun = decreasing ? value > end : value < end;
|
|
46
|
+
(0, _useInterval.default)(function () {
|
|
47
|
+
setValue(function (currentValue) {
|
|
48
|
+
return decreasing ? currentValue - 1 : currentValue + 1;
|
|
49
|
+
});
|
|
50
|
+
}, shallContiueToRun ? speed : null);
|
|
51
|
+
(0, _react.useEffect)(function () {
|
|
52
|
+
if (!shallContiueToRun) {
|
|
53
|
+
onEnd();
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
57
|
+
className: className
|
|
58
|
+
}, "".concat(prefix).concat(value).concat(unit));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
exports.AnimatedNumber = AnimatedNumber;
|
|
62
|
+
AnimatedNumber.defaultProps = {
|
|
63
|
+
prefix: '',
|
|
64
|
+
unit: '',
|
|
65
|
+
speed: TIMER,
|
|
66
|
+
decreasing: false,
|
|
67
|
+
onEnd: function onEnd() {},
|
|
68
|
+
className: ''
|
|
69
|
+
};
|
|
70
|
+
AnimatedNumber.propTypes = {
|
|
71
|
+
start: _propTypes.default.number,
|
|
72
|
+
end: _propTypes.default.number,
|
|
73
|
+
prefix: _propTypes.default.string,
|
|
74
|
+
unit: _propTypes.default.string,
|
|
75
|
+
speed: _propTypes.default.number,
|
|
76
|
+
decreasing: _propTypes.default.bool,
|
|
77
|
+
onEnd: _propTypes.default.func,
|
|
78
|
+
className: _propTypes.default.string
|
|
79
|
+
};
|
|
80
|
+
var _default = AnimatedNumber;
|
|
81
|
+
exports.default = _default;
|
|
@@ -144,6 +144,7 @@ var ApplicationHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
144
144
|
|
|
145
145
|
var _this$props = this.props,
|
|
146
146
|
homeRoute = _this$props.homeRoute,
|
|
147
|
+
showHomeIcon = _this$props.showHomeIcon,
|
|
147
148
|
label = _this$props.label,
|
|
148
149
|
className = _this$props.className,
|
|
149
150
|
appNavigator = _this$props.appNavigator,
|
|
@@ -179,7 +180,7 @@ var ApplicationHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
179
180
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
180
181
|
className: "navbar-header"
|
|
181
182
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
182
|
-
className: "navbar-brand"
|
|
183
|
+
className: "navbar-brand ".concat(showHomeIcon ? 'home-icon' : '')
|
|
183
184
|
}, homeRoute)), label && /*#__PURE__*/_react.default.createElement(_AppMenu.AppMenu, {
|
|
184
185
|
label: label,
|
|
185
186
|
key: "AppMenu",
|
|
@@ -197,6 +198,7 @@ var _default = ApplicationHeader;
|
|
|
197
198
|
exports.default = _default;
|
|
198
199
|
ApplicationHeader.defaultProps = {
|
|
199
200
|
homeRoute: '',
|
|
201
|
+
showHomeIcon: true,
|
|
200
202
|
actionBarItems: [],
|
|
201
203
|
onMount: function onMount() {},
|
|
202
204
|
onUnmount: function onUnmount() {}
|
|
@@ -205,6 +207,7 @@ ApplicationHeader.propTypes = {
|
|
|
205
207
|
label: _propTypes.default.node,
|
|
206
208
|
className: _propTypes.default.string,
|
|
207
209
|
homeRoute: _propTypes.default.node.isRequired,
|
|
210
|
+
showHomeIcon: _propTypes.default.bool,
|
|
208
211
|
appMenuItems: _propTypes.default.arrayOf(_modulePropTypes.default),
|
|
209
212
|
appNavigator: _propTypes.default.node,
|
|
210
213
|
appNavigatorClassName: _propTypes.default.string,
|
|
@@ -42,7 +42,9 @@ var ApplicationLayoutBody = function ApplicationLayoutBody(props) {
|
|
|
42
42
|
|
|
43
43
|
var moduleContentRef = (0, _react.useRef)();
|
|
44
44
|
var handleScroll = (0, _debounce.default)(RESIZE_THROTTELING)(function () {
|
|
45
|
-
|
|
45
|
+
if (moduleContentRef.current) {
|
|
46
|
+
setOffset(moduleContentRef.current.scrollTop);
|
|
47
|
+
}
|
|
46
48
|
});
|
|
47
49
|
|
|
48
50
|
var handleToTop = function handleToTop() {
|
|
@@ -289,6 +289,7 @@
|
|
|
289
289
|
.TreeRoot {
|
|
290
290
|
flex: 1 0 auto;
|
|
291
291
|
overflow: auto;
|
|
292
|
+
contain: content;
|
|
292
293
|
|
|
293
294
|
.TreeNodeContainer {
|
|
294
295
|
font-size: 14px;
|
|
@@ -348,7 +349,7 @@
|
|
|
348
349
|
}
|
|
349
350
|
|
|
350
351
|
.TreeLabelName {
|
|
351
|
-
align-items: start;
|
|
352
|
+
align-items: flex-start;
|
|
352
353
|
display: flex;
|
|
353
354
|
flex: 1 1 0;
|
|
354
355
|
font-weight: @text-normal;
|
|
@@ -422,7 +423,7 @@
|
|
|
422
423
|
}
|
|
423
424
|
|
|
424
425
|
.TreeLeaf {
|
|
425
|
-
align-items: start;
|
|
426
|
+
align-items: flex-start;
|
|
426
427
|
|
|
427
428
|
.TreeCheckbox {
|
|
428
429
|
margin: 9px 7px 0 0;
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.excludeFromList = exports.default = void 0;
|
|
11
11
|
|
|
12
12
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
13
|
|
|
@@ -77,9 +77,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
77
77
|
|
|
78
78
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
79
79
|
|
|
80
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
80
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
81
81
|
|
|
82
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
82
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
83
83
|
|
|
84
84
|
var SEARCH_DEBOUNCE = 100;
|
|
85
85
|
var otherwise = _stubTrue.default;
|
|
@@ -63,9 +63,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
63
63
|
|
|
64
64
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
65
65
|
|
|
66
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
66
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
67
67
|
|
|
68
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
68
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
69
69
|
|
|
70
70
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
71
71
|
|
|
@@ -152,7 +152,9 @@ var AutoSuggest = /*#__PURE__*/function (_Component) {
|
|
|
152
152
|
}
|
|
153
153
|
}, {
|
|
154
154
|
key: "openMenu",
|
|
155
|
-
value: function
|
|
155
|
+
value: function
|
|
156
|
+
/*event*/
|
|
157
|
+
openMenu() {
|
|
156
158
|
var dropDirection = {};
|
|
157
159
|
|
|
158
160
|
if (this.refDropdownMenu && this.isAutoDropActive() && !this.state.open) {
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
|
|
20
|
+
var _reactMotion = require("react-motion");
|
|
21
|
+
|
|
22
|
+
var _isFunction = _interopRequireDefault(require("lodash/fp/isFunction"));
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
var BottomSheet = function BottomSheet(props) {
|
|
29
|
+
var show = props.show,
|
|
30
|
+
onClose = props.onClose,
|
|
31
|
+
width = props.width,
|
|
32
|
+
height = props.height,
|
|
33
|
+
title = props.title,
|
|
34
|
+
detatch = props.detatch,
|
|
35
|
+
useBackdrop = props.useBackdrop,
|
|
36
|
+
showCloseButton = props.showCloseButton,
|
|
37
|
+
showMaximizeButton = props.showMaximizeButton,
|
|
38
|
+
onHeightChange = props.onHeightChange,
|
|
39
|
+
bodyRef = props.bodyRef,
|
|
40
|
+
bodyClassName = props.bodyClassName,
|
|
41
|
+
className = props.className,
|
|
42
|
+
children = props.children;
|
|
43
|
+
|
|
44
|
+
var _useState = (0, _react.useState)(show),
|
|
45
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
46
|
+
isShown = _useState2[0],
|
|
47
|
+
setIsShown = _useState2[1];
|
|
48
|
+
|
|
49
|
+
var _useState3 = (0, _react.useState)(false),
|
|
50
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
51
|
+
isMaxHeight = _useState4[0],
|
|
52
|
+
setIsMaxHeight = _useState4[1];
|
|
53
|
+
|
|
54
|
+
(0, _react.useEffect)(function () {
|
|
55
|
+
return setIsShown(show);
|
|
56
|
+
}, [show]);
|
|
57
|
+
|
|
58
|
+
var handleToggle = function handleToggle() {
|
|
59
|
+
var newValue = !isShown;
|
|
60
|
+
|
|
61
|
+
if ((0, _isFunction.default)(onClose)) {
|
|
62
|
+
onClose(newValue);
|
|
63
|
+
} else {
|
|
64
|
+
setIsShown(newValue);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var handleMaximize = function handleMaximize() {
|
|
69
|
+
var newValue = !isMaxHeight;
|
|
70
|
+
setIsMaxHeight(newValue);
|
|
71
|
+
onHeightChange();
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
var sheetClasses = (0, _classnames.default)('bottom-sheet', 'position-fixed left-0', !width && 'width-100pct', !height && !isMaxHeight && 'height-auto', 'bg-white z-index-max', 'shadow-hard', detatch ? 'margin-15 rounded' : 'rounded-top-left rounded-top-right', className && className);
|
|
75
|
+
var sheetBodyCasses = (0, _classnames.default)('bottom-sheet-body', 'height-100pct', bodyClassName && bodyClassName);
|
|
76
|
+
var backdropClassNames = (0, _classnames.default)('modal-backdrop', 'bg-black opacity-50');
|
|
77
|
+
var sheetHeight = isMaxHeight ? window.innerHeight : height;
|
|
78
|
+
var motionStyles = {}; // Animate the bottom position
|
|
79
|
+
|
|
80
|
+
motionStyles.bottom = (0, _reactMotion.spring)(isShown ? 0 : -1000, {
|
|
81
|
+
stiffness: 210,
|
|
82
|
+
damping: 25
|
|
83
|
+
}); // Animate the max height if a height value is given via prop
|
|
84
|
+
|
|
85
|
+
if (height) {
|
|
86
|
+
motionStyles.height = (0, _reactMotion.spring)(sheetHeight, {
|
|
87
|
+
stiffness: isMaxHeight ? 210 : 180,
|
|
88
|
+
damping: isMaxHeight ? 26 : 15
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactMotion.Motion, {
|
|
93
|
+
defaultStyle: {
|
|
94
|
+
bottom: -1000,
|
|
95
|
+
height: height
|
|
96
|
+
},
|
|
97
|
+
style: motionStyles
|
|
98
|
+
}, function (style) {
|
|
99
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
100
|
+
className: sheetClasses,
|
|
101
|
+
width: width,
|
|
102
|
+
style: {
|
|
103
|
+
bottom: style.bottom,
|
|
104
|
+
height: style.height
|
|
105
|
+
}
|
|
106
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, title && /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
+
className: "bottom-sheet-title display-flex justify-content-between padding-15 border border-top-none border-left-none border-right-none border-color-lighter"
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
109
|
+
className: "text-size-18"
|
|
110
|
+
}, title)), showCloseButton && /*#__PURE__*/_react.default.createElement("div", {
|
|
111
|
+
className: "bottom-sheet-close position-absolute top-10 right-10"
|
|
112
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
113
|
+
className: "btn btn-muted btn-sm btn-icon-only",
|
|
114
|
+
onClick: handleToggle
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
116
|
+
className: "rioglyph rioglyph-remove"
|
|
117
|
+
}))), showMaximizeButton && /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
+
className: "bottom-sheet-maximize height-30 position-absolute top-5 left-50pct translate-x-50 cursor-pointer",
|
|
119
|
+
onClick: handleMaximize
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
121
|
+
className: "height-5 width-40 rounded bg-lighter"
|
|
122
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
+
className: sheetBodyCasses,
|
|
124
|
+
ref: bodyRef
|
|
125
|
+
}, children));
|
|
126
|
+
}), useBackdrop && isShown && /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
+
className: backdropClassNames,
|
|
128
|
+
onClick: handleToggle
|
|
129
|
+
}));
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
BottomSheet.defaultProps = {
|
|
133
|
+
show: false,
|
|
134
|
+
detatch: false,
|
|
135
|
+
useBackdrop: false,
|
|
136
|
+
showCloseButton: true,
|
|
137
|
+
showMaximizeButton: false,
|
|
138
|
+
onHeightChange: function onHeightChange() {}
|
|
139
|
+
};
|
|
140
|
+
BottomSheet.propTypes = {
|
|
141
|
+
show: _propTypes.default.bool.isRequired,
|
|
142
|
+
onClose: _propTypes.default.func,
|
|
143
|
+
width: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
144
|
+
height: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
145
|
+
title: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.string]),
|
|
146
|
+
showCloseButton: _propTypes.default.bool,
|
|
147
|
+
showMaximizeButton: _propTypes.default.bool,
|
|
148
|
+
onHeightChange: _propTypes.default.func,
|
|
149
|
+
detatch: _propTypes.default.bool,
|
|
150
|
+
useBackdrop: _propTypes.default.bool,
|
|
151
|
+
onBackdropClick: _propTypes.default.func,
|
|
152
|
+
bodyRef: _propTypes.default.object,
|
|
153
|
+
bodyClassName: _propTypes.default.string,
|
|
154
|
+
className: _propTypes.default.string
|
|
155
|
+
};
|
|
156
|
+
var _default = BottomSheet;
|
|
157
|
+
exports.default = _default;
|
|
@@ -23,7 +23,7 @@ var BrowserWarningMessageDE = function BrowserWarningMessageDE(_ref) {
|
|
|
23
23
|
className: 'text-size-18 margin-bottom-25'
|
|
24
24
|
}, 'Der ', /*#__PURE__*/_react.default.createElement("b", null, 'Internet Explorer'), ' ist mit seinen knapp 7 Jahren nun langsam ins hohe Alter gekommen und kann ', 'in Sachen ', /*#__PURE__*/_react.default.createElement("b", null, 'Schnelligkeit'), ', ', /*#__PURE__*/_react.default.createElement("b", null, 'Features'), ' aber vor allem in Punkto ', /*#__PURE__*/_react.default.createElement("b", null, 'Sicherheit'), ', nicht mehr mit modernen Browsern mithalten.'), /*#__PURE__*/_react.default.createElement("p", {
|
|
25
25
|
className: 'text-size-18 margin-bottom-25'
|
|
26
|
-
}, 'Wir bei RIO haben uns das Ziel gesetzt, Ihnen die ', /*#__PURE__*/_react.default.createElement("b", null, 'bestmögliche Software'), ' bereitzustellen um Ihnen ein ', /*#__PURE__*/_react.default.createElement("b", null, 'optimales Nutzungserlebnis'), ' zu bieten. Daher haben wir uns dazu entschlossen den Support für ', 'den IE11
|
|
26
|
+
}, 'Wir bei RIO haben uns das Ziel gesetzt, Ihnen die ', /*#__PURE__*/_react.default.createElement("b", null, 'bestmögliche Software'), ' bereitzustellen um Ihnen ein ', /*#__PURE__*/_react.default.createElement("b", null, 'optimales Nutzungserlebnis'), ' zu bieten. Daher haben wir uns dazu entschlossen den Support für ', 'den IE11 einzustellen.'), /*#__PURE__*/_react.default.createElement("p", {
|
|
27
27
|
className: 'text-size-18'
|
|
28
28
|
}, /*#__PURE__*/_react.default.createElement("b", null, 'Erleben Sie RIO von einer ganz neuen Seite, z.B. mit einem der folgenden Browser:'))), /*#__PURE__*/_react.default.createElement("div", {
|
|
29
29
|
className: "display-flex justify-content-center justify-content-around flex-wrap\n padding-right-2pct-ls padding-left-2pct-ls"
|
|
@@ -23,7 +23,7 @@ var BrowserWarningMessageEN = function BrowserWarningMessageEN(_ref) {
|
|
|
23
23
|
className: 'text-size-18 margin-bottom-25'
|
|
24
24
|
}, 'With just under 7 years the ', /*#__PURE__*/_react.default.createElement("b", null, 'Internet Explorer'), ' is slowly getting old and can no longer keep up with modern browsers in terms of ', /*#__PURE__*/_react.default.createElement("b", null, 'speed'), ', ', /*#__PURE__*/_react.default.createElement("b", null, 'functionality'), ' but above all in terms of ', /*#__PURE__*/_react.default.createElement("b", null, 'security'), '.'), /*#__PURE__*/_react.default.createElement("p", {
|
|
25
25
|
className: 'text-size-18 margin-bottom-25'
|
|
26
|
-
}, 'We at RIO, have set ourselves the goal of providing you with the ', /*#__PURE__*/_react.default.createElement("b", null, 'best possible software'), ' to offer you the ', /*#__PURE__*/_react.default.createElement("b", null, 'best possible user experience'), '. Therefore, we have decided to end the support for the IE11
|
|
26
|
+
}, 'We at RIO, have set ourselves the goal of providing you with the ', /*#__PURE__*/_react.default.createElement("b", null, 'best possible software'), ' to offer you the ', /*#__PURE__*/_react.default.createElement("b", null, 'best possible user experience'), '. Therefore, we have decided to end the support for the IE11.'), /*#__PURE__*/_react.default.createElement("p", {
|
|
27
27
|
className: 'text-size-18'
|
|
28
28
|
}, /*#__PURE__*/_react.default.createElement("b", null, 'Experience RIO from a whole new side with a modern browser:'))), /*#__PURE__*/_react.default.createElement("div", {
|
|
29
29
|
className: "display-flex justify-content-center justify-content-around flex-wrap\n padding-right-2pct-ls padding-left-2pct-ls"
|
|
@@ -2,14 +2,134 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
+
|
|
20
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
+
|
|
22
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
23
|
+
|
|
24
|
+
var _buttonEffect = require("../../utils/buttonEffect");
|
|
25
|
+
|
|
26
|
+
var _excluded = ["active", "disabled", "asToggle", "onClick", "bsStyle", "bsSize", "variant", "iconOnly", "multiline", "block", "className", "children"];
|
|
27
|
+
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
+
|
|
32
|
+
var Button = function Button(props) {
|
|
33
|
+
var active = props.active,
|
|
34
|
+
disabled = props.disabled,
|
|
35
|
+
asToggle = props.asToggle,
|
|
36
|
+
onClick = props.onClick,
|
|
37
|
+
bsStyle = props.bsStyle,
|
|
38
|
+
bsSize = props.bsSize,
|
|
39
|
+
variant = props.variant,
|
|
40
|
+
iconOnly = props.iconOnly,
|
|
41
|
+
multiline = props.multiline,
|
|
42
|
+
block = props.block,
|
|
43
|
+
className = props.className,
|
|
44
|
+
children = props.children,
|
|
45
|
+
remainingProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
46
|
+
|
|
47
|
+
var _useState = (0, _react.useState)(active),
|
|
48
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
49
|
+
isToggled = _useState2[0],
|
|
50
|
+
setIsToggled = _useState2[1];
|
|
51
|
+
|
|
52
|
+
var btnRef = (0, _react.useRef)(); // Update internal toggle state when used as controlled component
|
|
53
|
+
// and outside toggle state changes
|
|
54
|
+
|
|
55
|
+
(0, _react.useEffect)(function () {
|
|
56
|
+
return setIsToggled(active);
|
|
57
|
+
}, [active]); // Register a dedicated click event on the button to interrupt
|
|
58
|
+
// the actual 'onClick' callback passed into the component from outside
|
|
59
|
+
|
|
60
|
+
(0, _react.useEffect)(function () {
|
|
61
|
+
if (!btnRef.current) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var mouseListener = btnRef.current.addEventListener('mousedown', _buttonEffect.createButtonRipple, false);
|
|
66
|
+
var touchListener = btnRef.current.addEventListener('touchstart', _buttonEffect.createButtonRipple, false);
|
|
67
|
+
return function () {
|
|
68
|
+
mouseListener && btnRef.current.removeEventListener('mousedown', _buttonEffect.createButtonRipple, false);
|
|
69
|
+
touchListener && btnRef.current.removeEventListener('touchstart', _buttonEffect.createButtonRipple, false);
|
|
70
|
+
};
|
|
71
|
+
}, [btnRef.current]); // Intercept click handler only for toggle button to update
|
|
72
|
+
// internal state and blur after click
|
|
73
|
+
|
|
74
|
+
var handleClick = function handleClick() {
|
|
75
|
+
var newIsToggled = !isToggled;
|
|
76
|
+
setIsToggled(newIsToggled);
|
|
77
|
+
btnRef.current && newIsToggled && btnRef.current.blur();
|
|
78
|
+
onClick(isToggled);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
var buttonClassNames = (0, _classnames.default)('btn', "btn-".concat(bsStyle), variant === Button.VARIANT_LINK && 'btn-link', variant === Button.VARIANT_LINK_INLINE && 'btn-link btn-link-inline', variant === Button.VARIANT_OUTLINE && 'btn-outline', variant === Button.VARIANT_ACTION && 'btn-action', bsSize && "btn-".concat(bsSize), asToggle && 'btn-toggle', isToggled && 'active', iconOnly && 'btn-icon-only', disabled && 'disabled', multiline && 'btn-multiline', block && 'btn-block', 'btn-component', className);
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement("button", (0, _extends2.default)({
|
|
83
|
+
ref: btnRef,
|
|
84
|
+
type: 'button'
|
|
85
|
+
}, remainingProps, {
|
|
86
|
+
className: buttonClassNames,
|
|
87
|
+
onClick: asToggle ? handleClick : onClick
|
|
88
|
+
}), children);
|
|
89
|
+
}; // Button styles
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
Button.DEFAULT = 'default';
|
|
93
|
+
Button.PRIMARY = 'primary';
|
|
94
|
+
Button.SECONDARY = 'secondary';
|
|
95
|
+
Button.INFO = 'info';
|
|
96
|
+
Button.WARNING = 'warning';
|
|
97
|
+
Button.DANGER = 'danger';
|
|
98
|
+
Button.SUCCESS = 'success';
|
|
99
|
+
Button.MUTED = 'muted'; // Button Type
|
|
100
|
+
|
|
101
|
+
Button.VARIANT_LINK = 'link';
|
|
102
|
+
Button.VARIANT_LINK_INLINE = 'link-inline';
|
|
103
|
+
Button.VARIANT_OUTLINE = 'outline';
|
|
104
|
+
Button.VARIANT_ACTION = 'action'; // Button Size
|
|
14
105
|
|
|
15
|
-
|
|
106
|
+
Button.XS = 'xs';
|
|
107
|
+
Button.SM = 'sm';
|
|
108
|
+
Button.MD = 'md';
|
|
109
|
+
Button.LG = 'lg';
|
|
110
|
+
Button.defaultProps = {
|
|
111
|
+
active: false,
|
|
112
|
+
disabled: false,
|
|
113
|
+
asToggle: false,
|
|
114
|
+
iconOnly: false,
|
|
115
|
+
multiline: false,
|
|
116
|
+
block: false,
|
|
117
|
+
onClick: function onClick() {},
|
|
118
|
+
className: '',
|
|
119
|
+
bsStyle: 'default'
|
|
120
|
+
};
|
|
121
|
+
Button.propTypes = {
|
|
122
|
+
active: _propTypes.default.bool,
|
|
123
|
+
disabled: _propTypes.default.bool,
|
|
124
|
+
asToggle: _propTypes.default.bool,
|
|
125
|
+
iconOnly: _propTypes.default.bool,
|
|
126
|
+
multiline: _propTypes.default.bool,
|
|
127
|
+
block: _propTypes.default.bool,
|
|
128
|
+
onClick: _propTypes.default.func.isRequired,
|
|
129
|
+
bsStyle: _propTypes.default.oneOf([Button.DEFAULT, Button.PRIMARY, Button.SECONDARY, Button.INFO, Button.WARNING, Button.DANGER, Button.SUCCESS, Button.MUTED]),
|
|
130
|
+
bsSize: _propTypes.default.oneOf([Button.XS, Button.SM, Button.MD, Button.LG]),
|
|
131
|
+
variant: _propTypes.default.oneOf([Button.VARIANT_LINK, Button.VARIANT_LINK_INLINE, Button.VARIANT_OUTLINE, Button.VARIANT_ACTION]),
|
|
132
|
+
className: _propTypes.default.string
|
|
133
|
+
};
|
|
134
|
+
var _default = Button;
|
|
135
|
+
exports.default = _default;
|