@megafon/ui-shared 4.6.0 → 4.8.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/CHANGELOG.md +26 -0
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +2 -0
- package/dist/es/components/AccordionBox/AccordionBox.js +1 -0
- package/dist/es/components/AudioPlayer/AudioPlayer.d.ts +10 -0
- package/dist/es/components/AudioPlayer/AudioPlayer.js +116 -0
- package/dist/es/components/AudioPlayer/AudioProgress.d.ts +14 -0
- package/dist/es/components/AudioPlayer/AudioProgress.js +117 -0
- package/dist/es/components/AudioPlayer/AudioRange.d.ts +14 -0
- package/dist/es/components/AudioPlayer/AudioRange.js +31 -0
- package/dist/es/components/AudioPlayer/AudioVolume.d.ts +7 -0
- package/dist/es/components/AudioPlayer/AudioVolume.js +83 -0
- package/dist/es/components/AudioPlayer/style/AudioPlayer.css +58 -0
- package/dist/es/components/AudioPlayer/style/AudioProgress.css +35 -0
- package/dist/es/components/AudioPlayer/style/AudioRange.css +68 -0
- package/dist/es/components/AudioPlayer/style/AudioVolume.css +34 -0
- package/dist/es/components/AudioPlayer/timerFormatUtil.d.ts +2 -0
- package/dist/es/components/AudioPlayer/timerFormatUtil.js +33 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +0 -6
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +22 -12
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +43 -37
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.css +16 -0
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +29 -0
- package/dist/es/components/Breadcrumbs/components/BreadcrumbsItem.js +82 -0
- package/dist/es/components/FaqWrapper/FaqWrapper.d.ts +3 -0
- package/dist/es/components/FaqWrapper/FaqWrapper.js +11 -0
- package/dist/es/components/PageTitle/PageTitle.d.ts +2 -0
- package/dist/es/components/PageTitle/PageTitle.js +4 -0
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +2 -0
- package/dist/es/components/VideoBanner/VideoBanner.js +6 -2
- package/dist/es/index.d.ts +7 -0
- package/dist/es/index.js +7 -0
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +2 -0
- package/dist/lib/components/AccordionBox/AccordionBox.js +1 -0
- package/dist/lib/components/AudioPlayer/AudioPlayer.d.ts +10 -0
- package/dist/lib/components/AudioPlayer/AudioPlayer.js +133 -0
- package/dist/lib/components/AudioPlayer/AudioProgress.d.ts +14 -0
- package/dist/lib/components/AudioPlayer/AudioProgress.js +141 -0
- package/dist/lib/components/AudioPlayer/AudioRange.d.ts +14 -0
- package/dist/lib/components/AudioPlayer/AudioRange.js +42 -0
- package/dist/lib/components/AudioPlayer/AudioVolume.d.ts +7 -0
- package/dist/lib/components/AudioPlayer/AudioVolume.js +99 -0
- package/dist/lib/components/AudioPlayer/style/AudioPlayer.css +58 -0
- package/dist/lib/components/AudioPlayer/style/AudioProgress.css +35 -0
- package/dist/lib/components/AudioPlayer/style/AudioRange.css +68 -0
- package/dist/lib/components/AudioPlayer/style/AudioVolume.css +34 -0
- package/dist/lib/components/AudioPlayer/timerFormatUtil.d.ts +2 -0
- package/dist/lib/components/AudioPlayer/timerFormatUtil.js +42 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +0 -6
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +22 -12
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +51 -41
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.css +16 -0
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.d.ts +29 -0
- package/dist/lib/components/Breadcrumbs/components/BreadcrumbsItem.js +99 -0
- package/dist/lib/components/FaqWrapper/FaqWrapper.d.ts +3 -0
- package/dist/lib/components/FaqWrapper/FaqWrapper.js +21 -0
- package/dist/lib/components/PageTitle/PageTitle.d.ts +2 -0
- package/dist/lib/components/PageTitle/PageTitle.js +4 -0
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +2 -0
- package/dist/lib/components/VideoBanner/VideoBanner.js +6 -2
- package/dist/lib/index.d.ts +7 -0
- package/dist/lib/index.js +56 -0
- package/package.json +5 -5
@@ -0,0 +1,141 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports["default"] = exports.INTERVAL_DELAY = void 0;
|
7
|
+
|
8
|
+
require("core-js/modules/es.number.constructor");
|
9
|
+
|
10
|
+
require("core-js/modules/web.timers");
|
11
|
+
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
13
|
+
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
15
|
+
|
16
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
17
|
+
|
18
|
+
var _AudioRange = _interopRequireDefault(require("./AudioRange"));
|
19
|
+
|
20
|
+
var _timerFormatUtil = _interopRequireDefault(require("./timerFormatUtil"));
|
21
|
+
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
23
|
+
|
24
|
+
var INTERVAL_DELAY = 1000;
|
25
|
+
exports.INTERVAL_DELAY = INTERVAL_DELAY;
|
26
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-audio-progress');
|
27
|
+
|
28
|
+
var AudioProgress = function AudioProgress(_ref) {
|
29
|
+
var audioRef = _ref.audioRef,
|
30
|
+
audioTitle = _ref.audioTitle,
|
31
|
+
isPlaying = _ref.isPlaying,
|
32
|
+
isPause = _ref.isPause,
|
33
|
+
onChangeAudioCurrentTime = _ref.onChangeAudioCurrentTime,
|
34
|
+
onPLay = _ref.onPLay,
|
35
|
+
onSetIsPlaying = _ref.onSetIsPlaying;
|
36
|
+
|
37
|
+
var intervalId = _react["default"].useRef(null);
|
38
|
+
|
39
|
+
var _React$useState = _react["default"].useState(0),
|
40
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
41
|
+
trackDuration = _React$useState2[0],
|
42
|
+
setTrackDuration = _React$useState2[1];
|
43
|
+
|
44
|
+
var _React$useState3 = _react["default"].useState(0),
|
45
|
+
_React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
|
46
|
+
trackProgress = _React$useState4[0],
|
47
|
+
setTrackProgress = _React$useState4[1];
|
48
|
+
|
49
|
+
var progressColorPercent = _react["default"].useMemo(function () {
|
50
|
+
return trackProgress / trackDuration * 100;
|
51
|
+
}, [trackDuration, trackProgress]);
|
52
|
+
|
53
|
+
var progressValue = _react["default"].useMemo(function () {
|
54
|
+
return isPlaying || isPause ? trackProgress : trackDuration;
|
55
|
+
}, [isPause, isPlaying, trackDuration, trackProgress]);
|
56
|
+
|
57
|
+
var handleStartTimer = _react["default"].useCallback(function () {
|
58
|
+
intervalId.current && clearInterval(intervalId.current);
|
59
|
+
intervalId.current = setInterval(function () {
|
60
|
+
var _a, _b, _c;
|
61
|
+
|
62
|
+
if ((_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.ended) {
|
63
|
+
onSetIsPlaying(false);
|
64
|
+
setTrackProgress(Math.floor(((_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.duration) || 0));
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
|
68
|
+
setTrackProgress(Math.floor(((_c = audioRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) || 0));
|
69
|
+
}, INTERVAL_DELAY);
|
70
|
+
}, [audioRef, onSetIsPlaying]);
|
71
|
+
|
72
|
+
var handleScrubProgress = function handleScrubProgress(e) {
|
73
|
+
var currentTime = Number(e.target.value);
|
74
|
+
setTrackProgress(currentTime);
|
75
|
+
onChangeAudioCurrentTime(currentTime);
|
76
|
+
};
|
77
|
+
|
78
|
+
var handleScrubEndProgress = function handleScrubEndProgress() {
|
79
|
+
if (!isPlaying) {
|
80
|
+
onPLay();
|
81
|
+
}
|
82
|
+
|
83
|
+
handleStartTimer();
|
84
|
+
};
|
85
|
+
|
86
|
+
_react["default"].useEffect(function () {
|
87
|
+
var _a;
|
88
|
+
|
89
|
+
setTrackProgress(Math.floor(((_a = audioRef === null || audioRef === void 0 ? void 0 : audioRef.current) === null || _a === void 0 ? void 0 : _a.currentTime) || 0));
|
90
|
+
}, [audioRef]);
|
91
|
+
|
92
|
+
_react["default"].useEffect(function () {
|
93
|
+
var audioNode = audioRef.current;
|
94
|
+
|
95
|
+
if (audioNode) {
|
96
|
+
audioNode.onloadedmetadata = function () {
|
97
|
+
setTrackDuration(Math.round(audioNode.duration));
|
98
|
+
};
|
99
|
+
}
|
100
|
+
}, [audioRef]);
|
101
|
+
|
102
|
+
_react["default"].useEffect(function () {
|
103
|
+
if (isPlaying) {
|
104
|
+
handleStartTimer();
|
105
|
+
}
|
106
|
+
|
107
|
+
if (isPause) {
|
108
|
+
intervalId.current && clearInterval(intervalId.current);
|
109
|
+
}
|
110
|
+
}, [handleStartTimer, isPause, isPlaying]);
|
111
|
+
|
112
|
+
_react["default"].useEffect(function () {
|
113
|
+
return function () {
|
114
|
+
intervalId.current && clearInterval(intervalId.current);
|
115
|
+
};
|
116
|
+
}, []);
|
117
|
+
|
118
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
119
|
+
className: cn()
|
120
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
121
|
+
className: cn('info')
|
122
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
123
|
+
className: cn('title')
|
124
|
+
}, audioTitle), /*#__PURE__*/_react["default"].createElement("span", {
|
125
|
+
className: cn('value')
|
126
|
+
}, (0, _timerFormatUtil["default"])(progressValue))), /*#__PURE__*/_react["default"].createElement("div", {
|
127
|
+
className: cn('range-wrapper')
|
128
|
+
}, /*#__PURE__*/_react["default"].createElement(_AudioRange["default"], {
|
129
|
+
className: cn('range'),
|
130
|
+
maxValue: trackDuration,
|
131
|
+
value: trackProgress,
|
132
|
+
step: "1",
|
133
|
+
colorPercent: progressColorPercent || 0,
|
134
|
+
onChange: handleScrubProgress,
|
135
|
+
onMouseUp: handleScrubEndProgress,
|
136
|
+
onTouchEnd: handleScrubEndProgress
|
137
|
+
})));
|
138
|
+
};
|
139
|
+
|
140
|
+
var _default = AudioProgress;
|
141
|
+
exports["default"] = _default;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './style/AudioRange.less';
|
3
|
+
export interface IAudioRangeProps {
|
4
|
+
className?: string;
|
5
|
+
maxValue: number | string;
|
6
|
+
value: number;
|
7
|
+
step: string;
|
8
|
+
colorPercent: number;
|
9
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
10
|
+
onMouseUp?: () => void;
|
11
|
+
onTouchEnd?: () => void;
|
12
|
+
}
|
13
|
+
declare const AudioRange: React.FC<IAudioRangeProps>;
|
14
|
+
export default AudioRange;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
11
|
+
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
13
|
+
|
14
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-audio-range');
|
15
|
+
|
16
|
+
var AudioRange = function AudioRange(_ref) {
|
17
|
+
var className = _ref.className,
|
18
|
+
maxValue = _ref.maxValue,
|
19
|
+
value = _ref.value,
|
20
|
+
step = _ref.step,
|
21
|
+
colorPercent = _ref.colorPercent,
|
22
|
+
onChange = _ref.onChange,
|
23
|
+
onMouseUp = _ref.onMouseUp,
|
24
|
+
onTouchEnd = _ref.onTouchEnd;
|
25
|
+
return /*#__PURE__*/_react["default"].createElement("input", {
|
26
|
+
className: cn([className]),
|
27
|
+
style: {
|
28
|
+
backgroundSize: "".concat(colorPercent, "% 100%")
|
29
|
+
},
|
30
|
+
type: "range",
|
31
|
+
min: "0",
|
32
|
+
max: maxValue,
|
33
|
+
step: step,
|
34
|
+
value: value,
|
35
|
+
onChange: onChange,
|
36
|
+
onMouseUp: onMouseUp,
|
37
|
+
onTouchEnd: onTouchEnd
|
38
|
+
});
|
39
|
+
};
|
40
|
+
|
41
|
+
var _default = AudioRange;
|
42
|
+
exports["default"] = _default;
|
@@ -0,0 +1,99 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
require("core-js/modules/es.number.constructor");
|
9
|
+
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
|
+
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
13
|
+
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
15
|
+
|
16
|
+
var _uiCore = require("@megafon/ui-core");
|
17
|
+
|
18
|
+
var _uiHelpers = require("@megafon/ui-helpers");
|
19
|
+
|
20
|
+
var _AudioRange = _interopRequireDefault(require("./AudioRange"));
|
21
|
+
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
23
|
+
|
24
|
+
var NoVolumeIcon = function NoVolumeIcon(props) {
|
25
|
+
return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
|
26
|
+
viewBox: "0 0 24 24"
|
27
|
+
}, props), /*#__PURE__*/_react["default"].createElement("path", {
|
28
|
+
d: "M14 20.15c0 .322.299.56.606.467a9.004 9.004 0 004.96-13.493l-1.525 1.34a7.002 7.002 0 01-3.687 10.13.525.525 0 00-.354.488v1.069z"
|
29
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
30
|
+
d: "M16.094 10.174c.261.56.406 1.177.406 1.826 0 1.426-.7 2.701-1.8 3.548-.3.23-.7-.004-.7-.382v-3.152l2.094-1.84zm-1.225-1.586L14 9.35v-.517c0-.378.4-.613.7-.382.058.044.114.09.169.136zm1.923-1.69a6.998 6.998 0 00-2.438-1.491.525.525 0 01-.354-.489V3.849c0-.32.299-.559.606-.466a8.994 8.994 0 013.694 2.19l-1.508 1.325zM12 11.108V5.36a.5.5 0 00-.342-.474l-.822-.274a.5.5 0 00-.553.167L7.15 8.807A.5.5 0 016.756 9H3.707a.5.5 0 00-.353.146l-.207.208A.5.5 0 003 9.707v4.586a.5.5 0 00.147.353l.207.208a.5.5 0 00.353.146h3.049a.5.5 0 01.394.193l.082.105L12 11.108zM8.462 16.88l1.82 2.34a.5.5 0 00.554.168l.822-.274A.5.5 0 0012 18.64v-4.87l-3.538 3.11zm-5.488 3.563a.5.5 0 01.046-.705L21.497 3.503a.5.5 0 11.66.751L3.68 20.49a.5.5 0 01-.706-.046z"
|
31
|
+
}));
|
32
|
+
};
|
33
|
+
|
34
|
+
var VolumeIcon = function VolumeIcon(props) {
|
35
|
+
return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
|
36
|
+
viewBox: "0 0 24 24"
|
37
|
+
}, props), /*#__PURE__*/_react["default"].createElement("path", {
|
38
|
+
d: "M14 20.15c0 .322.299.56.606.467a9.004 9.004 0 000-17.234.475.475 0 00-.606.466v1.069c0 .221.146.414.354.489a7.002 7.002 0 010 13.186.525.525 0 00-.354.489v1.069zM3.146 14.646A.5.5 0 013 14.293V9.707a.5.5 0 01.146-.353l.208-.208A.5.5 0 013.707 9h3.048a.5.5 0 00.395-.193l3.133-4.028a.5.5 0 01.553-.167l.822.274A.5.5 0 0112 5.36v13.28a.5.5 0 01-.342.474l-.822.274a.5.5 0 01-.553-.167L7.15 15.193A.5.5 0 006.755 15H3.707a.5.5 0 01-.353-.146l-.208-.208z"
|
39
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
40
|
+
d: "M16.5 12c0 1.426-.7 2.701-1.8 3.548-.3.23-.7-.004-.7-.382V8.834c0-.378.4-.613.7-.382 1.1.847 1.8 2.122 1.8 3.548z"
|
41
|
+
}));
|
42
|
+
};
|
43
|
+
|
44
|
+
var cn = (0, _uiHelpers.cnCreate)('mfui-audio-volume');
|
45
|
+
|
46
|
+
var AudioVolume = function AudioVolume(_ref) {
|
47
|
+
var onChangeAudioVolume = _ref.onChangeAudioVolume;
|
48
|
+
|
49
|
+
var tooltipTrigger = _react["default"].useRef(null);
|
50
|
+
|
51
|
+
var _React$useState = _react["default"].useState(0.3),
|
52
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
53
|
+
trackVolume = _React$useState2[0],
|
54
|
+
setTrackVolume = _React$useState2[1];
|
55
|
+
|
56
|
+
var volumeColorPercent = _react["default"].useMemo(function () {
|
57
|
+
return trackVolume * 100;
|
58
|
+
}, [trackVolume]);
|
59
|
+
|
60
|
+
var handleScrubVolume = function handleScrubVolume(e) {
|
61
|
+
var currentVolume = Number(e.target.value);
|
62
|
+
setTrackVolume(currentVolume);
|
63
|
+
onChangeAudioVolume(currentVolume);
|
64
|
+
};
|
65
|
+
|
66
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
67
|
+
className: cn()
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
69
|
+
className: cn('icon-area'),
|
70
|
+
ref: tooltipTrigger
|
71
|
+
}, /*#__PURE__*/_react["default"].createElement(VolumeIcon, {
|
72
|
+
className: cn('icon', {
|
73
|
+
visible: !!trackVolume
|
74
|
+
})
|
75
|
+
}), /*#__PURE__*/_react["default"].createElement(NoVolumeIcon, {
|
76
|
+
className: cn('icon', {
|
77
|
+
visible: !trackVolume
|
78
|
+
})
|
79
|
+
})), /*#__PURE__*/_react["default"].createElement(_uiCore.Tooltip, {
|
80
|
+
classes: {
|
81
|
+
content: "".concat(cn('tooltip-content')),
|
82
|
+
contentShadow: "".concat(cn('tooltip-content-shadow'))
|
83
|
+
},
|
84
|
+
triggerElement: tooltipTrigger,
|
85
|
+
triggerEvent: "click",
|
86
|
+
placement: "top",
|
87
|
+
paddings: "none"
|
88
|
+
}, /*#__PURE__*/_react["default"].createElement(_AudioRange["default"], {
|
89
|
+
className: cn('range'),
|
90
|
+
maxValue: "1",
|
91
|
+
value: trackVolume,
|
92
|
+
step: "0.01",
|
93
|
+
colorPercent: volumeColorPercent || 0,
|
94
|
+
onChange: handleScrubVolume
|
95
|
+
})));
|
96
|
+
};
|
97
|
+
|
98
|
+
var _default = AudioVolume;
|
99
|
+
exports["default"] = _default;
|
@@ -0,0 +1,58 @@
|
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-audio-player {
|
9
|
+
margin-top: 32px;
|
10
|
+
}
|
11
|
+
.mfui-audio-player__player {
|
12
|
+
display: -webkit-box;
|
13
|
+
display: -ms-flexbox;
|
14
|
+
display: flex;
|
15
|
+
-webkit-box-align: center;
|
16
|
+
-ms-flex-align: center;
|
17
|
+
align-items: center;
|
18
|
+
-webkit-box-pack: justify;
|
19
|
+
-ms-flex-pack: justify;
|
20
|
+
justify-content: space-between;
|
21
|
+
-webkit-box-sizing: border-box;
|
22
|
+
box-sizing: border-box;
|
23
|
+
padding: 16px;
|
24
|
+
border-radius: 12px;
|
25
|
+
background: var(--spbSky0);
|
26
|
+
}
|
27
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
28
|
+
.mfui-audio-player__player {
|
29
|
+
max-width: 530px;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
@media screen and (min-width: 1024px) {
|
33
|
+
.mfui-audio-player__player {
|
34
|
+
max-width: 550px;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
.mfui-audio-player__playing-controls {
|
38
|
+
margin-right: 16px;
|
39
|
+
}
|
40
|
+
.mfui-audio-player_position_center .mfui-audio-player__player {
|
41
|
+
margin: 0 auto;
|
42
|
+
}
|
43
|
+
.mfui-audio-player_position_left .mfui-audio-player__player {
|
44
|
+
margin-right: auto;
|
45
|
+
}
|
46
|
+
.mfui-audio-player_position_right .mfui-audio-player__player {
|
47
|
+
margin-left: auto;
|
48
|
+
}
|
49
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
50
|
+
.mfui-audio-player_full-width .mfui-audio-player__player {
|
51
|
+
max-width: 100%;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
@media screen and (min-width: 1024px) {
|
55
|
+
.mfui-audio-player_full-width .mfui-audio-player__player {
|
56
|
+
max-width: 100%;
|
57
|
+
}
|
58
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-audio-progress {
|
9
|
+
width: 100%;
|
10
|
+
margin-right: 16px;
|
11
|
+
}
|
12
|
+
.mfui-audio-progress__info {
|
13
|
+
display: -webkit-box;
|
14
|
+
display: -ms-flexbox;
|
15
|
+
display: flex;
|
16
|
+
-webkit-box-align: center;
|
17
|
+
-ms-flex-align: center;
|
18
|
+
align-items: center;
|
19
|
+
-webkit-box-pack: justify;
|
20
|
+
-ms-flex-pack: justify;
|
21
|
+
justify-content: space-between;
|
22
|
+
}
|
23
|
+
.mfui-audio-progress__value {
|
24
|
+
color: var(-spbSky3);
|
25
|
+
font-size: 12px;
|
26
|
+
line-height: 18px;
|
27
|
+
}
|
28
|
+
.mfui-audio-progress__range-wrapper {
|
29
|
+
margin-top: -2px;
|
30
|
+
}
|
31
|
+
.mfui-audio-progress__title {
|
32
|
+
color: var(--stcBlack);
|
33
|
+
font-size: 12px;
|
34
|
+
line-height: 18px;
|
35
|
+
}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-audio-range {
|
9
|
+
width: 100%;
|
10
|
+
height: 4px;
|
11
|
+
border-radius: 2px;
|
12
|
+
background: var(--spbSky2);
|
13
|
+
background-image: -webkit-gradient(linear, left top, left bottom, from(#00B956), to(#00B956));
|
14
|
+
background-image: linear-gradient(#00B956, #00B956);
|
15
|
+
background-repeat: no-repeat;
|
16
|
+
cursor: pointer;
|
17
|
+
-webkit-appearance: none;
|
18
|
+
}
|
19
|
+
.mfui-audio-range:focus {
|
20
|
+
outline: none;
|
21
|
+
}
|
22
|
+
.mfui-audio-range::-webkit-slider-thumb {
|
23
|
+
width: 16px;
|
24
|
+
height: 16px;
|
25
|
+
border: none;
|
26
|
+
border-radius: 50%;
|
27
|
+
background: var(--stcWhite);
|
28
|
+
-webkit-box-shadow: 0 2px 9px rgba(0, 0, 0, 0.15);
|
29
|
+
box-shadow: 0 2px 9px rgba(0, 0, 0, 0.15);
|
30
|
+
-webkit-appearance: none;
|
31
|
+
}
|
32
|
+
.mfui-audio-range::-moz-range-thumb {
|
33
|
+
width: 16px;
|
34
|
+
height: 16px;
|
35
|
+
border: none;
|
36
|
+
border-radius: 50%;
|
37
|
+
background: var(--stcWhite);
|
38
|
+
box-shadow: 0 2px 9px rgba(0, 0, 0, 0.15);
|
39
|
+
-webkit-appearance: none;
|
40
|
+
}
|
41
|
+
.mfui-audio-range::-ms-thumb {
|
42
|
+
width: 16px;
|
43
|
+
height: 16px;
|
44
|
+
border: none;
|
45
|
+
border-radius: 50%;
|
46
|
+
background: var(--stcWhite);
|
47
|
+
box-shadow: 0 2px 9px rgba(0, 0, 0, 0.15);
|
48
|
+
-webkit-appearance: none;
|
49
|
+
}
|
50
|
+
.mfui-audio-range::-webkit-slider-runnable-track {
|
51
|
+
border: none;
|
52
|
+
background: transparent;
|
53
|
+
-webkit-box-shadow: none;
|
54
|
+
box-shadow: none;
|
55
|
+
-webkit-appearance: none;
|
56
|
+
}
|
57
|
+
.mfui-audio-range::-moz-range-track {
|
58
|
+
border: none;
|
59
|
+
background: transparent;
|
60
|
+
box-shadow: none;
|
61
|
+
-webkit-appearance: none;
|
62
|
+
}
|
63
|
+
.mfui-audio-range::-ms-track {
|
64
|
+
border: none;
|
65
|
+
background: transparent;
|
66
|
+
box-shadow: none;
|
67
|
+
-webkit-appearance: none;
|
68
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
h1,
|
2
|
+
h2,
|
3
|
+
h3,
|
4
|
+
h4,
|
5
|
+
h5 {
|
6
|
+
margin: 0;
|
7
|
+
}
|
8
|
+
.mfui-audio-volume {
|
9
|
+
width: 24px;
|
10
|
+
}
|
11
|
+
.mfui-audio-volume__tooltip-content {
|
12
|
+
padding: 7px 16px 14px;
|
13
|
+
border-radius: 12px;
|
14
|
+
}
|
15
|
+
.mfui-audio-volume__tooltip-content-shadow {
|
16
|
+
border-radius: 12px;
|
17
|
+
}
|
18
|
+
.mfui-audio-volume__icon {
|
19
|
+
display: none;
|
20
|
+
width: 24px;
|
21
|
+
min-width: 24px;
|
22
|
+
height: 24px;
|
23
|
+
cursor: pointer;
|
24
|
+
fill: var(--brandGreen);
|
25
|
+
}
|
26
|
+
.mfui-audio-volume__icon_visible {
|
27
|
+
display: block;
|
28
|
+
}
|
29
|
+
.mfui-audio-volume__icon:hover {
|
30
|
+
fill: var(--buttonHoverGreen);
|
31
|
+
}
|
32
|
+
.mfui-audio-volume__range {
|
33
|
+
max-width: 128px;
|
34
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
require("core-js/modules/es.array.concat");
|
9
|
+
|
10
|
+
require("core-js/modules/es.parse-int");
|
11
|
+
|
12
|
+
var getMinutes = function getMinutes(sec) {
|
13
|
+
var min = parseInt("".concat(sec / 60), 10);
|
14
|
+
|
15
|
+
if (min < 10) {
|
16
|
+
return "0".concat(min);
|
17
|
+
}
|
18
|
+
|
19
|
+
return "".concat(min);
|
20
|
+
};
|
21
|
+
/**
|
22
|
+
* @param {Number} sec
|
23
|
+
* @returns {String}
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
27
|
+
var getSeconds = function getSeconds(sec) {
|
28
|
+
if (sec < 10) {
|
29
|
+
return "0".concat(sec);
|
30
|
+
}
|
31
|
+
|
32
|
+
return "".concat(sec);
|
33
|
+
};
|
34
|
+
|
35
|
+
var timerFormat = function timerFormat(sec) {
|
36
|
+
var min = getMinutes(sec);
|
37
|
+
var seconds = getSeconds(sec % 60);
|
38
|
+
return "".concat(min, ":").concat(seconds);
|
39
|
+
};
|
40
|
+
|
41
|
+
var _default = timerFormat;
|
42
|
+
exports["default"] = _default;
|
@@ -21,12 +21,6 @@ h5 {
|
|
21
21
|
.mfui-breadcrumbs_color_white .mfui-breadcrumbs__item:before {
|
22
22
|
color: var(--stcWhite);
|
23
23
|
}
|
24
|
-
.mfui-breadcrumbs__icon {
|
25
|
-
position: relative;
|
26
|
-
width: 14px;
|
27
|
-
height: 3px;
|
28
|
-
margin-right: 10px;
|
29
|
-
}
|
30
24
|
.mfui-breadcrumbs__item {
|
31
25
|
position: relative;
|
32
26
|
margin-right: 10px;
|
@@ -1,27 +1,37 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { TextColor } from './components/BreadcrumbsItem';
|
2
3
|
import './Breadcrumbs.less';
|
3
4
|
declare type ItemObjectType = {
|
4
5
|
title?: string;
|
5
6
|
href?: string;
|
6
7
|
};
|
7
8
|
declare type ItemType = JSX.Element | ItemObjectType;
|
8
|
-
export declare
|
9
|
-
readonly DEFAULT: "default";
|
10
|
-
readonly BLACK: "black";
|
11
|
-
readonly WHITE: "white";
|
12
|
-
};
|
13
|
-
declare type TextColorType = typeof TextColor[keyof typeof TextColor];
|
9
|
+
export declare type TextColorType = typeof TextColor[keyof typeof TextColor];
|
14
10
|
export declare type Props = {
|
15
|
-
|
16
|
-
root?: Record<string, string>;
|
17
|
-
link?: Record<string, string>;
|
18
|
-
};
|
11
|
+
/** Дополнительный класс корневого элемента */
|
19
12
|
className?: string;
|
13
|
+
/** Список элементов */
|
14
|
+
items: ItemType[];
|
15
|
+
/** Цвет */
|
16
|
+
color?: TextColorType;
|
17
|
+
/** Включить микроразметку */
|
18
|
+
hasMicrodata?: boolean;
|
19
|
+
/** Дополнительные классы для корневого и внутренних элементов */
|
20
20
|
classes?: {
|
21
21
|
item?: string;
|
22
|
+
itemTitle?: string;
|
23
|
+
lastItemTitle?: string;
|
24
|
+
link?: string;
|
25
|
+
};
|
26
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
27
|
+
dataAttrs?: {
|
28
|
+
root?: Record<string, string>;
|
29
|
+
item?: Record<string, string>;
|
30
|
+
itemInner?: Record<string, string>;
|
31
|
+
itemTitle?: Record<string, string>;
|
32
|
+
itemMeta?: Record<string, string>;
|
33
|
+
link?: Record<string, string>;
|
22
34
|
};
|
23
|
-
items: ItemType[];
|
24
|
-
color?: TextColorType;
|
25
35
|
};
|
26
36
|
declare const Breadcrumbs: React.FC<Props>;
|
27
37
|
export default Breadcrumbs;
|