ywana-core8 0.0.868 → 0.0.869

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
@@ -923,7 +923,7 @@
923
923
  /**
924
924
  * Radio Button
925
925
  */
926
- var RadioButton = function RadioButton(props) {
926
+ var RadioButton$1 = function RadioButton(props) {
927
927
  var id = props.id,
928
928
  name = props.name,
929
929
  label = props.label,
@@ -1078,7 +1078,9 @@
1078
1078
  IMG: 'IMG',
1079
1079
  COLOR: 'COLOR',
1080
1080
  TOKENS: 'TOKENS',
1081
- PASSWORD: 'PASSWORD'
1081
+ PASSWORD: 'PASSWORD',
1082
+ RADIO: 'RADIO',
1083
+ CHECKBOX: 'CHECKBOX'
1082
1084
  };
1083
1085
 
1084
1086
  /**
@@ -5698,7 +5700,9 @@
5698
5700
  onChange = _ref10.onChange;
5699
5701
  var id = field.id,
5700
5702
  label = field.label,
5701
- options = field.options;
5703
+ options = field.options,
5704
+ _field$format = field.format,
5705
+ format = _field$format === void 0 ? FORMATS$1.CHECKBOX : _field$format;
5702
5706
  function change(v) {
5703
5707
  var index = value.indexOf(v);
5704
5708
  if (index >= 0) {
@@ -5716,13 +5720,32 @@
5716
5720
  className: "multiselection-editor"
5717
5721
  }, /*#__PURE__*/React__default["default"].createElement("label", null, label), buildOptions().map(function (option) {
5718
5722
  var checked = value.includes(option.value);
5719
- return /*#__PURE__*/React__default["default"].createElement(CheckBox, {
5720
- value: checked,
5721
- label: option.label,
5722
- onChange: function onChange() {
5723
- return change(option.value);
5724
- }
5725
- });
5723
+ switch (format) {
5724
+ case FORMATS$1.CHECKBOX:
5725
+ return /*#__PURE__*/React__default["default"].createElement(CheckBox, {
5726
+ value: checked,
5727
+ label: option.label,
5728
+ onChange: function onChange() {
5729
+ return change(option.value);
5730
+ }
5731
+ });
5732
+ case FORMATS$1.RADIO:
5733
+ return /*#__PURE__*/React__default["default"].createElement(RadioButton, {
5734
+ value: checked,
5735
+ label: option.label,
5736
+ onChange: function onChange() {
5737
+ return change(option.value);
5738
+ }
5739
+ });
5740
+ default:
5741
+ return /*#__PURE__*/React__default["default"].createElement(CheckBox, {
5742
+ value: checked,
5743
+ label: option.label,
5744
+ onChange: function onChange() {
5745
+ return change(option.value);
5746
+ }
5747
+ });
5748
+ }
5726
5749
  }));
5727
5750
  };
5728
5751
 
@@ -10922,7 +10945,7 @@
10922
10945
  exports.PasswordField = PasswordField;
10923
10946
  exports.Planner = Planner;
10924
10947
  exports.Property = Property;
10925
- exports.RadioButton = RadioButton;
10948
+ exports.RadioButton = RadioButton$1;
10926
10949
  exports.ResetPasswordBox = ResetPasswordBox;
10927
10950
  exports.Section = Section;
10928
10951
  exports.Session = Session;