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.
@@ -1236,6 +1236,7 @@
1236
1236
  PebbleIcon["Bedroom"] = "bedroom";
1237
1237
  PebbleIcon["Bolt"] = "bolt";
1238
1238
  PebbleIcon["BookmarkAdd"] = "bookmark-add";
1239
+ PebbleIcon["Building2"] = "building-2";
1239
1240
  PebbleIcon["Building"] = "building";
1240
1241
  PebbleIcon["Business"] = "business";
1241
1242
  PebbleIcon["Calculate"] = "calculate";
@@ -1447,6 +1448,7 @@
1447
1448
  PebbleIcon["Transfer"] = "transfer";
1448
1449
  PebbleIcon["Transferred"] = "transferred";
1449
1450
  PebbleIcon["Travel"] = "travel";
1451
+ PebbleIcon["Trophy2"] = "trophy-2";
1450
1452
  PebbleIcon["Trophy"] = "trophy";
1451
1453
  PebbleIcon["UncheckedRadio"] = "unchecked-radio";
1452
1454
  PebbleIcon["Undo"] = "undo";
@@ -1455,6 +1457,7 @@
1455
1457
  PebbleIcon["Updating"] = "updating";
1456
1458
  PebbleIcon["Upload"] = "upload";
1457
1459
  PebbleIcon["UserAlt"] = "user-alt";
1460
+ PebbleIcon["UserGroup"] = "user-group";
1458
1461
  PebbleIcon["User"] = "user";
1459
1462
  PebbleIcon["Videocam"] = "videocam";
1460
1463
  PebbleIcon["ViewDetails"] = "view-details";
@@ -15302,50 +15305,52 @@
15302
15305
  inherits(Switch, _React$PureComponent);
15303
15306
  var _super = _createSuper$o(Switch);
15304
15307
  function Switch() {
15308
+ var _this;
15305
15309
  classCallCheck(this, Switch);
15306
- return _super.apply(this, arguments);
15310
+ _this = _super.apply(this, arguments);
15311
+ _this.state = {
15312
+ value: _this.props.initialValue || false
15313
+ };
15314
+ return _this;
15307
15315
  }
15308
15316
  createClass(Switch, [{
15309
15317
  key: "render",
15310
15318
  value: function render() {
15311
15319
  var _cx3,
15312
- _this = this,
15320
+ _this2 = this,
15313
15321
  _cx4;
15314
15322
  var _this$props = this.props,
15315
- checked = _this$props.checked,
15316
15323
  _onChange = _this$props.onChange,
15317
15324
  className = _this$props.className,
15318
15325
  label = _this$props.label,
15319
15326
  disabled = _this$props.disabled;
15327
+ var value = this.state.value;
15320
15328
  return /*#__PURE__*/React.createElement("label", {
15321
15329
  className: cx(className, fixedLabelStyle, defineProperty({}, disabledStyle$1, !!disabled))
15322
15330
  }, /*#__PURE__*/React.createElement("span", {
15323
15331
  className: labelTextStyle
15324
15332
  }, label), /*#__PURE__*/React.createElement("div", {
15325
- className: cx(labelStyle$1, (_cx3 = {}, defineProperty(_cx3, selectedLabel, checked), defineProperty(_cx3, disabledStyle$1, !!disabled), _cx3))
15333
+ className: cx(labelStyle$1, (_cx3 = {}, defineProperty(_cx3, selectedLabel, value), defineProperty(_cx3, disabledStyle$1, !!disabled), _cx3))
15326
15334
  }, /*#__PURE__*/React.createElement("input", {
15327
15335
  type: "checkbox",
15328
- checked: checked,
15336
+ checked: value,
15329
15337
  className: inputStyle$3,
15330
- onChange: function onChange(e) {
15331
- _this.setState({
15332
- value: !checked
15338
+ onChange: function onChange() {
15339
+ _this2.setState({
15340
+ value: !value
15333
15341
  });
15334
15342
  if (_onChange) {
15335
- _onChange(!checked, e);
15343
+ _onChange(!value);
15336
15344
  }
15337
15345
  },
15338
15346
  disabled: disabled
15339
15347
  }), /*#__PURE__*/React.createElement("span", {
15340
- className: cx((_cx4 = {}, defineProperty(_cx4, switchStyle, true), defineProperty(_cx4, selectedSwitch, checked), _cx4))
15348
+ className: cx((_cx4 = {}, defineProperty(_cx4, switchStyle, true), defineProperty(_cx4, selectedSwitch, value), _cx4))
15341
15349
  })));
15342
15350
  }
15343
15351
  }]);
15344
15352
  return Switch;
15345
15353
  }(React.PureComponent);
15346
- Switch.defaultProps = {
15347
- checked: false
15348
- };
15349
15354
 
15350
15355
  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; }
15351
15356
  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; }