@vtx/components 4.0.0-beta.58 → 4.0.0-beta.59

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.
@@ -26,6 +26,7 @@ import { VtxProvider, useIntl } from "../vtx-provider";
26
26
  import { jsx as _jsx } from "react/jsx-runtime";
27
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
28
28
  var VtxSelect = /*#__PURE__*/forwardRef(function (props, ref) {
29
+ var _props$options;
29
30
  var intl = useIntl();
30
31
  var _useState = useState(0),
31
32
  _useState2 = _slicedToArray(_useState, 2),
@@ -92,7 +93,15 @@ var VtxSelect = /*#__PURE__*/forwardRef(function (props, ref) {
92
93
  };
93
94
  }
94
95
  }, [mode]);
95
- var newChildren = props.children ? Array.isArray(props.children) ? props.children : [props.children] : [];
96
+ console.log(props.options, props.children);
97
+ var newChildren = props.children ? Array.isArray(props.children) ? props.children : [props.children] : ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.map(function (v) {
98
+ return _objectSpread(_objectSpread({}, v), {}, {
99
+ key: v.value,
100
+ props: {
101
+ children: v.label
102
+ }
103
+ });
104
+ })) || [];
96
105
  var getContent = function getContent() {
97
106
  var child = {};
98
107
  newChildren.forEach(function (item) {
@@ -34,6 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
34
34
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
35
35
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
36
36
  var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
37
+ var _props$options;
37
38
  var intl = (0, _vtxProvider.useIntl)();
38
39
  var _useState = (0, _react.useState)(0),
39
40
  _useState2 = _slicedToArray(_useState, 2),
@@ -100,7 +101,15 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
100
101
  };
101
102
  }
102
103
  }, [mode]);
103
- var newChildren = props.children ? Array.isArray(props.children) ? props.children : [props.children] : [];
104
+ console.log(props.options, props.children);
105
+ var newChildren = props.children ? Array.isArray(props.children) ? props.children : [props.children] : ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.map(function (v) {
106
+ return _objectSpread(_objectSpread({}, v), {}, {
107
+ key: v.value,
108
+ props: {
109
+ children: v.label
110
+ }
111
+ });
112
+ })) || [];
104
113
  var getContent = function getContent() {
105
114
  var child = {};
106
115
  newChildren.forEach(function (item) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtx/components",
3
- "version": "4.0.0-beta.58",
3
+ "version": "4.0.0-beta.59",
4
4
  "description": "React components for Vortex",
5
5
  "keywords": [
6
6
  "react",