@onesy/ui-react 1.0.86 → 1.0.88
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.
@@ -406,16 +406,16 @@ const AudioPlayer = react_1.default.forwardRef((props_, ref) => {
|
|
406
406
|
};
|
407
407
|
const items = [];
|
408
408
|
if (openMenu) {
|
409
|
-
items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconBack, { size: 'very small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children:
|
409
|
+
items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconBack, { size: 'very small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: l('Back') }))), onClick: () => setOpenMenu(null) }, itemProps), 'back'));
|
410
410
|
}
|
411
411
|
if (!openMenu) {
|
412
412
|
if (playbackSpeed_)
|
413
|
-
items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconPlaybackSpeed, { size: 'small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children:
|
413
|
+
items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconPlaybackSpeed, { size: 'small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: l('Playback speed') }))), end: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3', priority: 'secondary' }, { children: playbackSpeed === 1 ? 'Normal' : playbackSpeed }))), onClick: () => setOpenMenu('playbackSpeed') }, itemProps), 'playbackSpeed'));
|
414
414
|
if (quality_)
|
415
|
-
items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconQuality, { size: 'small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children:
|
415
|
+
items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconQuality, { size: 'small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: l('Quality') }))), end: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3', priority: 'secondary' }, { children: !quality ? l('Original') : `${(_a = quality === null || quality === void 0 ? void 0 : quality.meta) === null || _a === void 0 ? void 0 : _a.resolution}p` }))), onClick: () => setOpenMenu('quality') }, itemProps), 'quality'));
|
416
416
|
}
|
417
417
|
else if (openMenu === 'quality') {
|
418
|
-
items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children:
|
418
|
+
items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: l('Original') }))), onClick: () => quality ? onQuality(null) : undefined, selected: !quality }, itemProps), 'original'));
|
419
419
|
}
|
420
420
|
else if (openMenu === 'playbackSpeed') {
|
421
421
|
const options = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
@@ -23,6 +23,8 @@ export declare type IWindowSplit = Omit<ILine, 'onChange'> & {
|
|
23
23
|
IconButtonProps?: IPropsAny;
|
24
24
|
DividerProps?: IPropsAny;
|
25
25
|
SeparatorProps?: IPropsAny;
|
26
|
+
StartProps?: IPropsAny;
|
27
|
+
EndProps?: IPropsAny;
|
26
28
|
};
|
27
29
|
declare const WindowSplit: React.FC<IWindowSplit>;
|
28
30
|
export default WindowSplit;
|
@@ -100,7 +100,7 @@ const WindowSplit = react_1.default.forwardRef((props_, ref) => {
|
|
100
100
|
const { tonal = false, color = 'inverted', valueDefault, value: value_ = 50, onChange: onChange_, padding, paddingStart, paddingEnd, iconButton, orientation = 'horizontal', noKeyboard, noDivider, focus: focus_ = false, onFocus: onFocus_, onBlur: onBlur_, onMouseEnter: onMouseEnter_, onMouseLeave: onMouseLeave_, iconButtonComponent, iconOrientationHorizontal = (0, jsx_runtime_1.jsx)(IconMaterialSwapHorizW100_1.default, {}), iconOrientationVertical = (0, jsx_runtime_1.jsx)(IconMaterialSwapVertW100_1.default, {}), IconButtonProps = {
|
101
101
|
version: 'filled',
|
102
102
|
elevation: false
|
103
|
-
}, SeparatorProps: SeparatorProps_, DividerProps = {}, className, children: children_ } = props, other = __rest(props, ["tonal", "color", "valueDefault", "value", "onChange", "padding", "paddingStart", "paddingEnd", "iconButton", "orientation", "noKeyboard", "noDivider", "focus", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "iconButtonComponent", "iconOrientationHorizontal", "iconOrientationVertical", "IconButtonProps", "SeparatorProps", "DividerProps", "className", "children"]);
|
103
|
+
}, SeparatorProps: SeparatorProps_, DividerProps = {}, StartProps, EndProps, className, children: children_ } = props, other = __rest(props, ["tonal", "color", "valueDefault", "value", "onChange", "padding", "paddingStart", "paddingEnd", "iconButton", "orientation", "noKeyboard", "noDivider", "focus", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "iconButtonComponent", "iconOrientationHorizontal", "iconOrientationVertical", "IconButtonProps", "SeparatorProps", "DividerProps", "StartProps", "EndProps", "className", "children"]);
|
104
104
|
const { classes } = useStyle();
|
105
105
|
const [init, setInit] = react_1.default.useState(false);
|
106
106
|
const [focus, setFocus] = react_1.default.useState();
|
@@ -299,19 +299,21 @@ const WindowSplit = react_1.default.forwardRef((props_, ref) => {
|
|
299
299
|
'onesy-WindowSplit-wrapper'
|
300
300
|
],
|
301
301
|
classes.wrapper
|
302
|
-
]) }, { children: [children[0] && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ direction: 'row', align: 'unset', justify: 'unset', className: (0, style_react_1.classNames)([
|
302
|
+
]) }, { children: [children[0] && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ direction: 'row', align: 'unset', justify: 'unset' }, StartProps, { className: (0, style_react_1.classNames)([
|
303
303
|
(0, utils_2.staticClassName)('WindowSplit', theme) && [
|
304
304
|
'onesy-WindowSplit-start'
|
305
305
|
],
|
306
|
+
StartProps === null || StartProps === void 0 ? void 0 : StartProps.className,
|
306
307
|
classes.item,
|
307
308
|
classes.start
|
308
|
-
]), style: Object.assign({}, styles.start) }, { children: children[0] }))), children[1] && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ direction: 'row', align: 'unset', justify: 'unset', className: (0, style_react_1.classNames)([
|
309
|
+
]), style: Object.assign(Object.assign({}, styles.start), StartProps === null || StartProps === void 0 ? void 0 : StartProps.style) }, { children: children[0] }))), children[1] && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ direction: 'row', align: 'unset', justify: 'unset' }, EndProps, { className: (0, style_react_1.classNames)([
|
309
310
|
(0, utils_2.staticClassName)('WindowSplit', theme) && [
|
310
311
|
'onesy-WindowSplit-end'
|
311
312
|
],
|
313
|
+
EndProps === null || EndProps === void 0 ? void 0 : EndProps.className,
|
312
314
|
classes.item,
|
313
315
|
classes.end
|
314
|
-
]), style: Object.assign({}, styles.end) }, { children: children[1] })))] })), !noDivider && ((0, jsx_runtime_1.jsx)(Divider, Object.assign({ onTouchStart: onTouchStart, onMouseDown: (event) => {
|
316
|
+
]), style: Object.assign(Object.assign({}, styles.end), EndProps === null || EndProps === void 0 ? void 0 : EndProps.style) }, { children: children[1] })))] })), !noDivider && ((0, jsx_runtime_1.jsx)(Divider, Object.assign({ onTouchStart: onTouchStart, onMouseDown: (event) => {
|
315
317
|
onMouseDown();
|
316
318
|
if ((0, utils_1.is)('function', DividerProps === null || DividerProps === void 0 ? void 0 : DividerProps.onMouseDown))
|
317
319
|
IconButtonProps.onMouseDown(event);
|
@@ -462,7 +462,7 @@ const AudioPlayer = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
462
462
|
}),
|
463
463
|
primary: /*#__PURE__*/React.createElement(Type, {
|
464
464
|
version: "b3"
|
465
|
-
},
|
465
|
+
}, l('Back')),
|
466
466
|
onClick: () => setOpenMenu(null)
|
467
467
|
}, itemProps)));
|
468
468
|
}
|
@@ -474,7 +474,7 @@ const AudioPlayer = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
474
474
|
}),
|
475
475
|
primary: /*#__PURE__*/React.createElement(Type, {
|
476
476
|
version: "b3"
|
477
|
-
},
|
477
|
+
}, l('Playback speed')),
|
478
478
|
end: /*#__PURE__*/React.createElement(Type, {
|
479
479
|
version: "b3",
|
480
480
|
priority: "secondary"
|
@@ -488,7 +488,7 @@ const AudioPlayer = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
488
488
|
}),
|
489
489
|
primary: /*#__PURE__*/React.createElement(Type, {
|
490
490
|
version: "b3"
|
491
|
-
},
|
491
|
+
}, l('Quality')),
|
492
492
|
end: /*#__PURE__*/React.createElement(Type, {
|
493
493
|
version: "b3",
|
494
494
|
priority: "secondary"
|
@@ -500,7 +500,7 @@ const AudioPlayer = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
500
500
|
key: "original",
|
501
501
|
primary: /*#__PURE__*/React.createElement(Type, {
|
502
502
|
version: "b3"
|
503
|
-
},
|
503
|
+
}, l('Original')),
|
504
504
|
onClick: () => quality ? onQuality(null) : undefined,
|
505
505
|
selected: !quality
|
506
506
|
}, itemProps)));
|
@@ -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 _defineProperty from "@babel/runtime/helpers/defineProperty";
|
4
|
-
const _excluded = ["tonal", "color", "valueDefault", "value", "onChange", "padding", "paddingStart", "paddingEnd", "iconButton", "orientation", "noKeyboard", "noDivider", "focus", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "iconButtonComponent", "iconOrientationHorizontal", "iconOrientationVertical", "IconButtonProps", "SeparatorProps", "DividerProps", "className", "children"];
|
4
|
+
const _excluded = ["tonal", "color", "valueDefault", "value", "onChange", "padding", "paddingStart", "paddingEnd", "iconButton", "orientation", "noKeyboard", "noDivider", "focus", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "iconButtonComponent", "iconOrientationHorizontal", "iconOrientationVertical", "IconButtonProps", "SeparatorProps", "DividerProps", "StartProps", "EndProps", "className", "children"];
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
7
7
|
import React from 'react';
|
@@ -115,6 +115,8 @@ const WindowSplit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
115
115
|
},
|
116
116
|
SeparatorProps: SeparatorProps_,
|
117
117
|
DividerProps = {},
|
118
|
+
StartProps,
|
119
|
+
EndProps,
|
118
120
|
className,
|
119
121
|
children: children_
|
120
122
|
} = props,
|
@@ -329,19 +331,21 @@ const WindowSplit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
329
331
|
align: "unset",
|
330
332
|
justify: "unset",
|
331
333
|
className: classNames([staticClassName('WindowSplit', theme) && ['onesy-WindowSplit-wrapper'], classes.wrapper])
|
332
|
-
}, children[0] && /*#__PURE__*/React.createElement(Line, {
|
334
|
+
}, children[0] && /*#__PURE__*/React.createElement(Line, _extends({
|
333
335
|
direction: "row",
|
334
336
|
align: "unset",
|
335
|
-
justify: "unset"
|
336
|
-
|
337
|
-
|
338
|
-
|
337
|
+
justify: "unset"
|
338
|
+
}, StartProps, {
|
339
|
+
className: classNames([staticClassName('WindowSplit', theme) && ['onesy-WindowSplit-start'], StartProps?.className, classes.item, classes.start]),
|
340
|
+
style: _objectSpread(_objectSpread({}, styles.start), StartProps?.style)
|
341
|
+
}), children[0]), children[1] && /*#__PURE__*/React.createElement(Line, _extends({
|
339
342
|
direction: "row",
|
340
343
|
align: "unset",
|
341
|
-
justify: "unset"
|
342
|
-
|
343
|
-
|
344
|
-
|
344
|
+
justify: "unset"
|
345
|
+
}, EndProps, {
|
346
|
+
className: classNames([staticClassName('WindowSplit', theme) && ['onesy-WindowSplit-end'], EndProps?.className, classes.item, classes.end]),
|
347
|
+
style: _objectSpread(_objectSpread({}, styles.end), EndProps?.style)
|
348
|
+
}), children[1])), !noDivider && /*#__PURE__*/React.createElement(Divider, _extends({
|
345
349
|
onTouchStart: onTouchStart,
|
346
350
|
onMouseDown: event => {
|
347
351
|
onMouseDown();
|
package/esm/index.js
CHANGED