ywana-core8 0.0.437 → 0.0.438

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/dist/index.cjs CHANGED
@@ -1417,6 +1417,30 @@ var Content = /*#__PURE__*/function () {
1417
1417
  return Content;
1418
1418
  }();
1419
1419
 
1420
+ var ColorField = function ColorField(props) {
1421
+ var id = props.id,
1422
+ _props$label = props.label,
1423
+ label = _props$label === void 0 ? "Color" : _props$label,
1424
+ value = props.value,
1425
+ onChange = props.onChange;
1426
+
1427
+ function change(event) {
1428
+ var color = event.target.value;
1429
+ if (onChange) onChange(id, color);
1430
+ }
1431
+
1432
+ return /*#__PURE__*/React__default["default"].createElement("div", {
1433
+ className: "color-field"
1434
+ }, /*#__PURE__*/React__default["default"].createElement("label", {
1435
+ htmlFor: id
1436
+ }, label), /*#__PURE__*/React__default["default"].createElement("input", {
1437
+ id: id,
1438
+ type: "color",
1439
+ onChange: change,
1440
+ value: value
1441
+ }));
1442
+ };
1443
+
1420
1444
  var isFunction$1 = function isFunction(value) {
1421
1445
  return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
1422
1446
  };
@@ -1816,6 +1840,13 @@ var StringCellViewer = function StringCellViewer(_ref7) {
1816
1840
  var locale = window.navigator.userLanguage || window.navigator.language;
1817
1841
 
1818
1842
  switch (format) {
1843
+ case FORMATS.COLOR:
1844
+ text = /*#__PURE__*/React__default["default"].createElement("input", {
1845
+ type: "color",
1846
+ value: text,
1847
+ disabled: true
1848
+ });
1849
+
1819
1850
  case FORMATS.URL:
1820
1851
  text = /*#__PURE__*/React__default["default"].createElement("a", {
1821
1852
  href: text,
@@ -3746,30 +3777,6 @@ var NumberField = function NumberField(_ref3) {
3746
3777
  });
3747
3778
  };
3748
3779
 
3749
- var ColorField = function ColorField(props) {
3750
- var id = props.id,
3751
- _props$label = props.label,
3752
- label = _props$label === void 0 ? "Color" : _props$label,
3753
- value = props.value,
3754
- onChange = props.onChange;
3755
-
3756
- function change(event) {
3757
- var color = event.target.value;
3758
- if (onChange) onChange(id, color);
3759
- }
3760
-
3761
- return /*#__PURE__*/React__default["default"].createElement("div", {
3762
- className: "color-field"
3763
- }, /*#__PURE__*/React__default["default"].createElement("label", {
3764
- htmlFor: id
3765
- }, label), /*#__PURE__*/React__default["default"].createElement("input", {
3766
- id: id,
3767
- type: "color",
3768
- onChange: change,
3769
- value: value
3770
- }));
3771
- };
3772
-
3773
3780
  /**
3774
3781
  * Content Editor
3775
3782
  */