@onesy/ui-react 1.0.168 → 1.0.170
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/CalendarMonth/CalendarMonth.js +1 -1
- package/Carousel/Carousel.js +1 -1
- package/DragAndDropList/DragAndDropList.js +1 -1
- package/Markdown/Markdown.js +1 -1
- package/Switch/Switch.js +7 -19
- package/esm/CalendarMonth/CalendarMonth.js +1 -1
- package/esm/Carousel/Carousel.js +1 -1
- package/esm/DragAndDropList/DragAndDropList.js +1 -1
- package/esm/Markdown/Markdown.js +1 -1
- package/esm/Switch/Switch.js +7 -19
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -524,7 +524,7 @@ const CalendarMonth = /*#__PURE__*/_react.default.forwardRef((props__, ref) => {
|
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
return items;
|
|
527
|
-
}, [month,
|
|
527
|
+
}, [month, rangesValue, rangesSelected]);
|
|
528
528
|
const colorSelectedTheme = _react.default.useMemo(() => {
|
|
529
529
|
return theme.palette.color[colorSelected] || theme.methods.color(colorSelected);
|
|
530
530
|
}, [colorSelected, theme]);
|
package/Carousel/Carousel.js
CHANGED
|
@@ -741,7 +741,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
741
741
|
}, [index_]);
|
|
742
742
|
_react.default.useEffect(() => {
|
|
743
743
|
if ((0, _utils.is)('function', onUpdateItems)) onUpdateItems();
|
|
744
|
-
}, [items,
|
|
744
|
+
}, [items, theme.palette.light]);
|
|
745
745
|
_react.default.useEffect(() => {
|
|
746
746
|
setItems(items_);
|
|
747
747
|
}, [id, items_]);
|
|
@@ -66,7 +66,7 @@ const DragAndDropList = /*#__PURE__*/_react.default.forwardRef((props_, ref) =>
|
|
|
66
66
|
rootDocument.body.removeEventListener('mouseup', onMouseUp);
|
|
67
67
|
rootDocument.body.removeEventListener('touchend', onMouseUp);
|
|
68
68
|
};
|
|
69
|
-
}, [
|
|
69
|
+
}, []);
|
|
70
70
|
const img = _react.default.useMemo(() => {
|
|
71
71
|
var _refs$root$current2;
|
|
72
72
|
const rootDocument_0 = (0, _utils.isEnvironment)('browser') ? ((_refs$root$current2 = refs.root.current) === null || _refs$root$current2 === void 0 ? void 0 : _refs$root$current2.ownerDocument) || window.document : undefined;
|
package/Markdown/Markdown.js
CHANGED
|
@@ -685,7 +685,7 @@ ${listItem(other_, level_1)}
|
|
|
685
685
|
}
|
|
686
686
|
if ((0, _utils.is)('function', onUpdate)) onUpdate();
|
|
687
687
|
}
|
|
688
|
-
}, [init, value
|
|
688
|
+
}, [init, value]);
|
|
689
689
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
|
|
690
690
|
ref: item_15 => {
|
|
691
691
|
if (ref) {
|
package/Switch/Switch.js
CHANGED
|
@@ -215,28 +215,16 @@ const Icon = props => {
|
|
|
215
215
|
other = $[2];
|
|
216
216
|
style = $[3];
|
|
217
217
|
}
|
|
218
|
-
const size = ["
|
|
218
|
+
const size = ["small", "regular", "large"].includes(props.size) ? props.size : "small";
|
|
219
219
|
let fontSize = 24;
|
|
220
|
-
if (size === "
|
|
221
|
-
fontSize =
|
|
220
|
+
if (size === "small") {
|
|
221
|
+
fontSize = 18;
|
|
222
222
|
} else {
|
|
223
|
-
if (size === "
|
|
224
|
-
fontSize =
|
|
223
|
+
if (size === "regular") {
|
|
224
|
+
fontSize = 24;
|
|
225
225
|
} else {
|
|
226
|
-
if (size === "
|
|
227
|
-
fontSize =
|
|
228
|
-
} else {
|
|
229
|
-
if (size === "medium") {
|
|
230
|
-
fontSize = 30;
|
|
231
|
-
} else {
|
|
232
|
-
if (size === "large") {
|
|
233
|
-
fontSize = 38;
|
|
234
|
-
} else {
|
|
235
|
-
if (size === "very large") {
|
|
236
|
-
fontSize = 42;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
226
|
+
if (size === "large") {
|
|
227
|
+
fontSize = 30;
|
|
240
228
|
}
|
|
241
229
|
}
|
|
242
230
|
}
|
|
@@ -514,7 +514,7 @@ const CalendarMonth = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
return items;
|
|
517
|
-
}, [month,
|
|
517
|
+
}, [month, rangesValue, rangesSelected]);
|
|
518
518
|
const colorSelectedTheme = React.useMemo(() => {
|
|
519
519
|
return theme.palette.color[colorSelected] || theme.methods.color(colorSelected);
|
|
520
520
|
}, [colorSelected, theme]);
|
package/esm/Carousel/Carousel.js
CHANGED
|
@@ -712,7 +712,7 @@ const Carousel = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
712
712
|
}, [index_]);
|
|
713
713
|
React.useEffect(() => {
|
|
714
714
|
if (is('function', onUpdateItems)) onUpdateItems();
|
|
715
|
-
}, [items,
|
|
715
|
+
}, [items, theme.palette.light]);
|
|
716
716
|
React.useEffect(() => {
|
|
717
717
|
setItems(items_);
|
|
718
718
|
}, [id, items_]);
|
|
@@ -57,7 +57,7 @@ const DragAndDropList = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
57
57
|
rootDocument.body.removeEventListener('mouseup', onMouseUp);
|
|
58
58
|
rootDocument.body.removeEventListener('touchend', onMouseUp);
|
|
59
59
|
};
|
|
60
|
-
}, [
|
|
60
|
+
}, []);
|
|
61
61
|
const img = React.useMemo(() => {
|
|
62
62
|
const rootDocument_0 = isEnvironment('browser') ? refs.root.current?.ownerDocument || window.document : undefined;
|
|
63
63
|
const element = rootDocument_0.createElement('img');
|
package/esm/Markdown/Markdown.js
CHANGED
|
@@ -677,7 +677,7 @@ ${listItem(other_, level_1)}
|
|
|
677
677
|
}
|
|
678
678
|
if (is('function', onUpdate)) onUpdate();
|
|
679
679
|
}
|
|
680
|
-
}, [init, value
|
|
680
|
+
}, [init, value]);
|
|
681
681
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
682
682
|
ref: item_15 => {
|
|
683
683
|
if (ref) {
|
package/esm/Switch/Switch.js
CHANGED
|
@@ -208,28 +208,16 @@ const Icon = props => {
|
|
|
208
208
|
other = $[2];
|
|
209
209
|
style = $[3];
|
|
210
210
|
}
|
|
211
|
-
const size = ["
|
|
211
|
+
const size = ["small", "regular", "large"].includes(props.size) ? props.size : "small";
|
|
212
212
|
let fontSize = 24;
|
|
213
|
-
if (size === "
|
|
214
|
-
fontSize =
|
|
213
|
+
if (size === "small") {
|
|
214
|
+
fontSize = 18;
|
|
215
215
|
} else {
|
|
216
|
-
if (size === "
|
|
217
|
-
fontSize =
|
|
216
|
+
if (size === "regular") {
|
|
217
|
+
fontSize = 24;
|
|
218
218
|
} else {
|
|
219
|
-
if (size === "
|
|
220
|
-
fontSize =
|
|
221
|
-
} else {
|
|
222
|
-
if (size === "medium") {
|
|
223
|
-
fontSize = 30;
|
|
224
|
-
} else {
|
|
225
|
-
if (size === "large") {
|
|
226
|
-
fontSize = 38;
|
|
227
|
-
} else {
|
|
228
|
-
if (size === "very large") {
|
|
229
|
-
fontSize = 42;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
219
|
+
if (size === "large") {
|
|
220
|
+
fontSize = 30;
|
|
233
221
|
}
|
|
234
222
|
}
|
|
235
223
|
}
|
package/esm/index.js
CHANGED
package/index.js
CHANGED