@onesy/ui-react 1.0.41 → 1.0.43

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/Medias/Medias.js CHANGED
@@ -186,7 +186,7 @@ const Medias = react_1.default.forwardRef((props_, ref) => {
186
186
  other: [],
187
187
  embed: []
188
188
  };
189
- values.filter(Boolean).forEach(item => {
189
+ values.filter(item => (item === null || item === void 0 ? void 0 : item.value) && !!Object.keys(item.value).length).forEach(item => {
190
190
  var _a, _b, _c;
191
191
  const media = item.value;
192
192
  if (media) {
@@ -259,7 +259,10 @@ const Medias = react_1.default.forwardRef((props_, ref) => {
259
259
  return ((0, jsx_runtime_1.jsx)(Link, Object.assign({}, otherProps, { href: item === null || item === void 0 ? void 0 : item.urlEmbed, target: 'blank' }, { children: item.name || item.urlEmbed })));
260
260
  }
261
261
  // custom embed code
262
- return ((0, jsx_runtime_1.jsx)(Line, Object.assign({}, otherProps, { className: classes.customEmbed, fullWidth: true, dangerouslySetInnerHTML: {
262
+ return ((0, jsx_runtime_1.jsx)(Line, Object.assign({}, otherProps, { className: (0, style_react_1.classNames)([
263
+ otherProps === null || otherProps === void 0 ? void 0 : otherProps.className,
264
+ classes.customEmbed
265
+ ]), fullWidth: true, dangerouslySetInnerHTML: {
263
266
  __html: urlEmbed
264
267
  } })));
265
268
  }, [EmbedProps]);
@@ -203,7 +203,7 @@ const Medias = /*#__PURE__*/React.forwardRef((props_, ref) => {
203
203
  other: [],
204
204
  embed: []
205
205
  };
206
- values.filter(Boolean).forEach(item => {
206
+ values.filter(item => item?.value && !!Object.keys(item.value).length).forEach(item => {
207
207
  const media = item.value;
208
208
  if (media) {
209
209
  if (media.urlEmbed !== undefined) items_.embed.push(item);else if (media.mime?.startsWith('image')) items_.image.push(item);else if (media.mime?.startsWith('audio')) items_.audio.push(item);else if (media.mime?.startsWith('video')) items_.video.push(item);else items_.other.push(item);
@@ -272,7 +272,7 @@ const Medias = /*#__PURE__*/React.forwardRef((props_, ref) => {
272
272
 
273
273
  // custom embed code
274
274
  return /*#__PURE__*/React.createElement(Line, _extends({}, otherProps, {
275
- className: classes.customEmbed,
275
+ className: classNames([otherProps?.className, classes.customEmbed]),
276
276
  fullWidth: true,
277
277
  dangerouslySetInnerHTML: {
278
278
  __html: urlEmbed
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.41
1
+ /** @license UiReact v1.0.43
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesy/ui-react",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar <lazareric2@gmail.com>",