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.umd.js CHANGED
@@ -1412,6 +1412,30 @@
1412
1412
  return Content;
1413
1413
  }();
1414
1414
 
1415
+ var ColorField = function ColorField(props) {
1416
+ var id = props.id,
1417
+ _props$label = props.label,
1418
+ label = _props$label === void 0 ? "Color" : _props$label,
1419
+ value = props.value,
1420
+ onChange = props.onChange;
1421
+
1422
+ function change(event) {
1423
+ var color = event.target.value;
1424
+ if (onChange) onChange(id, color);
1425
+ }
1426
+
1427
+ return /*#__PURE__*/React__default["default"].createElement("div", {
1428
+ className: "color-field"
1429
+ }, /*#__PURE__*/React__default["default"].createElement("label", {
1430
+ htmlFor: id
1431
+ }, label), /*#__PURE__*/React__default["default"].createElement("input", {
1432
+ id: id,
1433
+ type: "color",
1434
+ onChange: change,
1435
+ value: value
1436
+ }));
1437
+ };
1438
+
1415
1439
  var isFunction$1 = function isFunction(value) {
1416
1440
  return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
1417
1441
  };
@@ -1811,6 +1835,13 @@
1811
1835
  var locale = window.navigator.userLanguage || window.navigator.language;
1812
1836
 
1813
1837
  switch (format) {
1838
+ case FORMATS.COLOR:
1839
+ text = /*#__PURE__*/React__default["default"].createElement("input", {
1840
+ type: "color",
1841
+ value: text,
1842
+ disabled: true
1843
+ });
1844
+
1814
1845
  case FORMATS.URL:
1815
1846
  text = /*#__PURE__*/React__default["default"].createElement("a", {
1816
1847
  href: text,
@@ -3741,30 +3772,6 @@
3741
3772
  });
3742
3773
  };
3743
3774
 
3744
- var ColorField = function ColorField(props) {
3745
- var id = props.id,
3746
- _props$label = props.label,
3747
- label = _props$label === void 0 ? "Color" : _props$label,
3748
- value = props.value,
3749
- onChange = props.onChange;
3750
-
3751
- function change(event) {
3752
- var color = event.target.value;
3753
- if (onChange) onChange(id, color);
3754
- }
3755
-
3756
- return /*#__PURE__*/React__default["default"].createElement("div", {
3757
- className: "color-field"
3758
- }, /*#__PURE__*/React__default["default"].createElement("label", {
3759
- htmlFor: id
3760
- }, label), /*#__PURE__*/React__default["default"].createElement("input", {
3761
- id: id,
3762
- type: "color",
3763
- onChange: change,
3764
- value: value
3765
- }));
3766
- };
3767
-
3768
3775
  /**
3769
3776
  * Content Editor
3770
3777
  */