pebble-web 2.21.0-alpha.0 → 2.22.1

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";
@@ -16155,50 +16157,52 @@
16155
16157
  inherits(Switch, _React$PureComponent);
16156
16158
  var _super = _createSuper$o(Switch);
16157
16159
  function Switch() {
16160
+ var _this;
16158
16161
  classCallCheck(this, Switch);
16159
- return _super.apply(this, arguments);
16162
+ _this = _super.apply(this, arguments);
16163
+ _this.state = {
16164
+ value: _this.props.initialValue || false
16165
+ };
16166
+ return _this;
16160
16167
  }
16161
16168
  createClass(Switch, [{
16162
16169
  key: "render",
16163
16170
  value: function render() {
16164
16171
  var _cx3,
16165
- _this = this,
16172
+ _this2 = this,
16166
16173
  _cx4;
16167
16174
  var _this$props = this.props,
16168
- checked = _this$props.checked,
16169
16175
  _onChange = _this$props.onChange,
16170
16176
  className = _this$props.className,
16171
16177
  label = _this$props.label,
16172
16178
  disabled = _this$props.disabled;
16179
+ var value = this.state.value;
16173
16180
  return /*#__PURE__*/React.createElement("label", {
16174
16181
  className: cx(className, fixedLabelStyle, defineProperty({}, disabledStyle$1, !!disabled))
16175
16182
  }, /*#__PURE__*/React.createElement("span", {
16176
16183
  className: labelTextStyle
16177
16184
  }, label), /*#__PURE__*/React.createElement("div", {
16178
- className: cx(labelStyle$1, (_cx3 = {}, defineProperty(_cx3, selectedLabel, checked), defineProperty(_cx3, disabledStyle$1, !!disabled), _cx3))
16185
+ className: cx(labelStyle$1, (_cx3 = {}, defineProperty(_cx3, selectedLabel, value), defineProperty(_cx3, disabledStyle$1, !!disabled), _cx3))
16179
16186
  }, /*#__PURE__*/React.createElement("input", {
16180
16187
  type: "checkbox",
16181
- checked: checked,
16188
+ checked: value,
16182
16189
  className: inputStyle$3,
16183
- onChange: function onChange(e) {
16184
- _this.setState({
16185
- value: !checked
16190
+ onChange: function onChange() {
16191
+ _this2.setState({
16192
+ value: !value
16186
16193
  });
16187
16194
  if (_onChange) {
16188
- _onChange(!checked, e);
16195
+ _onChange(!value);
16189
16196
  }
16190
16197
  },
16191
16198
  disabled: disabled
16192
16199
  }), /*#__PURE__*/React.createElement("span", {
16193
- className: cx((_cx4 = {}, defineProperty(_cx4, switchStyle, true), defineProperty(_cx4, selectedSwitch, checked), _cx4))
16200
+ className: cx((_cx4 = {}, defineProperty(_cx4, switchStyle, true), defineProperty(_cx4, selectedSwitch, value), _cx4))
16194
16201
  })));
16195
16202
  }
16196
16203
  }]);
16197
16204
  return Switch;
16198
16205
  }(React.PureComponent);
16199
- Switch.defaultProps = {
16200
- checked: false
16201
- };
16202
16206
 
16203
16207
  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
16208
  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; }