pebble-web 2.21.0-alpha.0 → 2.23.0

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.
@@ -1372,6 +1372,7 @@
1372
1372
  PebbleIcon["Bedroom"] = "bedroom";
1373
1373
  PebbleIcon["Bolt"] = "bolt";
1374
1374
  PebbleIcon["BookmarkAdd"] = "bookmark-add";
1375
+ PebbleIcon["Building2"] = "building-2";
1375
1376
  PebbleIcon["Building"] = "building";
1376
1377
  PebbleIcon["Business"] = "business";
1377
1378
  PebbleIcon["Calculate"] = "calculate";
@@ -1583,6 +1584,7 @@
1583
1584
  PebbleIcon["Transfer"] = "transfer";
1584
1585
  PebbleIcon["Transferred"] = "transferred";
1585
1586
  PebbleIcon["Travel"] = "travel";
1587
+ PebbleIcon["Trophy2"] = "trophy-2";
1586
1588
  PebbleIcon["Trophy"] = "trophy";
1587
1589
  PebbleIcon["UncheckedRadio"] = "unchecked-radio";
1588
1590
  PebbleIcon["Undo"] = "undo";
@@ -1591,6 +1593,7 @@
1591
1593
  PebbleIcon["Updating"] = "updating";
1592
1594
  PebbleIcon["Upload"] = "upload";
1593
1595
  PebbleIcon["UserAlt"] = "user-alt";
1596
+ PebbleIcon["UserGroup"] = "user-group";
1594
1597
  PebbleIcon["User"] = "user";
1595
1598
  PebbleIcon["Videocam"] = "videocam";
1596
1599
  PebbleIcon["ViewDetails"] = "view-details";
@@ -16155,50 +16158,52 @@
16155
16158
  inherits(Switch, _React$PureComponent);
16156
16159
  var _super = _createSuper$o(Switch);
16157
16160
  function Switch() {
16161
+ var _this;
16158
16162
  classCallCheck(this, Switch);
16159
- return _super.apply(this, arguments);
16163
+ _this = _super.apply(this, arguments);
16164
+ _this.state = {
16165
+ value: _this.props.initialValue || false
16166
+ };
16167
+ return _this;
16160
16168
  }
16161
16169
  createClass(Switch, [{
16162
16170
  key: "render",
16163
16171
  value: function render() {
16164
16172
  var _cx3,
16165
- _this = this,
16173
+ _this2 = this,
16166
16174
  _cx4;
16167
16175
  var _this$props = this.props,
16168
- checked = _this$props.checked,
16169
16176
  _onChange = _this$props.onChange,
16170
16177
  className = _this$props.className,
16171
16178
  label = _this$props.label,
16172
16179
  disabled = _this$props.disabled;
16180
+ var value = this.state.value;
16173
16181
  return /*#__PURE__*/React.createElement("label", {
16174
16182
  className: cx(className, fixedLabelStyle, defineProperty({}, disabledStyle$1, !!disabled))
16175
16183
  }, /*#__PURE__*/React.createElement("span", {
16176
16184
  className: labelTextStyle
16177
16185
  }, label), /*#__PURE__*/React.createElement("div", {
16178
- className: cx(labelStyle$1, (_cx3 = {}, defineProperty(_cx3, selectedLabel, checked), defineProperty(_cx3, disabledStyle$1, !!disabled), _cx3))
16186
+ className: cx(labelStyle$1, (_cx3 = {}, defineProperty(_cx3, selectedLabel, value), defineProperty(_cx3, disabledStyle$1, !!disabled), _cx3))
16179
16187
  }, /*#__PURE__*/React.createElement("input", {
16180
16188
  type: "checkbox",
16181
- checked: checked,
16189
+ checked: value,
16182
16190
  className: inputStyle$3,
16183
- onChange: function onChange(e) {
16184
- _this.setState({
16185
- value: !checked
16191
+ onChange: function onChange() {
16192
+ _this2.setState({
16193
+ value: !value
16186
16194
  });
16187
16195
  if (_onChange) {
16188
- _onChange(!checked, e);
16196
+ _onChange(!value);
16189
16197
  }
16190
16198
  },
16191
16199
  disabled: disabled
16192
16200
  }), /*#__PURE__*/React.createElement("span", {
16193
- className: cx((_cx4 = {}, defineProperty(_cx4, switchStyle, true), defineProperty(_cx4, selectedSwitch, checked), _cx4))
16201
+ className: cx((_cx4 = {}, defineProperty(_cx4, switchStyle, true), defineProperty(_cx4, selectedSwitch, value), _cx4))
16194
16202
  })));
16195
16203
  }
16196
16204
  }]);
16197
16205
  return Switch;
16198
16206
  }(React.PureComponent);
16199
- Switch.defaultProps = {
16200
- checked: false
16201
- };
16202
16207
 
16203
16208
  function ownKeys$r(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
16204
16209
  function _objectSpread$r(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$r(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$r(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }