pebble-web 2.11.1 → 2.13.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.
@@ -1237,6 +1237,7 @@
1237
1237
  PebbleIcon["BookmarkAdd"] = "bookmark-add";
1238
1238
  PebbleIcon["Building"] = "building";
1239
1239
  PebbleIcon["Business"] = "business";
1240
+ PebbleIcon["Calendar2"] = "calendar-2";
1240
1241
  PebbleIcon["Calendar"] = "calendar";
1241
1242
  PebbleIcon["CallCenter"] = "call-center";
1242
1243
  PebbleIcon["Call"] = "call";
@@ -1261,6 +1262,7 @@
1261
1262
  PebbleIcon["CloseCircle"] = "close-circle";
1262
1263
  PebbleIcon["Close"] = "close";
1263
1264
  PebbleIcon["CloudDownload"] = "cloud-download";
1265
+ PebbleIcon["CloudUploadFilled"] = "cloud-upload-filled";
1264
1266
  PebbleIcon["CloudUpload"] = "cloud-upload";
1265
1267
  PebbleIcon["ConfigureFloors"] = "configure-floors";
1266
1268
  PebbleIcon["ConfigureUnits"] = "configure-units";
@@ -1419,6 +1421,7 @@
1419
1421
  PebbleIcon["Store"] = "store";
1420
1422
  PebbleIcon["System"] = "system";
1421
1423
  PebbleIcon["Table"] = "table";
1424
+ PebbleIcon["Tag"] = "tag";
1422
1425
  PebbleIcon["Team"] = "team";
1423
1426
  PebbleIcon["Training"] = "training";
1424
1427
  PebbleIcon["Transfer2"] = "transfer-2";
@@ -1438,6 +1441,7 @@
1438
1441
  PebbleIcon["Videocam"] = "videocam";
1439
1442
  PebbleIcon["ViewDetails"] = "view-details";
1440
1443
  PebbleIcon["VpnKey"] = "vpn-key";
1444
+ PebbleIcon["WarningFilled"] = "warning-filled";
1441
1445
  PebbleIcon["WarningLine"] = "warning-line";
1442
1446
  PebbleIcon["Warning"] = "warning";
1443
1447
  PebbleIcon["WelcomeLetter"] = "welcome-letter";
@@ -1886,13 +1890,13 @@
1886
1890
  _ref$showRipple = _ref.showRipple,
1887
1891
  showRipple = _ref$showRipple === void 0 ? true : _ref$showRipple,
1888
1892
  loading = _ref.loading,
1889
- filled = _ref.filled,
1893
+ outline = _ref.outline,
1890
1894
  _ref$size = _ref.size,
1891
1895
  size = _ref$size === void 0 ? "small" : _ref$size,
1892
1896
  buttonProps = _ref.buttonProps;
1893
1897
  var disableAction = disabled || loading;
1894
- var _filled = size !== "x-small" && filled !== false;
1895
- var _className = cx(getButtonStyle(size, type, !!showShadow, _filled), className);
1898
+ var _outline = size === "x-small" || !!outline;
1899
+ var _className = cx(getButtonStyle(size, type, !!showShadow, !_outline), className);
1896
1900
  return /*#__PURE__*/React.createElement("button", Object.assign({
1897
1901
  className: _className,
1898
1902
  onClick: !disableAction ? onClick : undefined,
@@ -9149,10 +9153,14 @@
9149
9153
  height: 110
9150
9154
  }
9151
9155
  }, ";label:wrapperStyle;" + ( "" ));
9156
+ var inputWrapperStyle = /*#__PURE__*/css({
9157
+ display: "flex",
9158
+ alignItems: "baseline",
9159
+ borderBottom: "1px solid ".concat(colors.gray.lighter)
9160
+ }, ";label:inputWrapperStyle;" + ( "" ));
9152
9161
  var inputStyle = /*#__PURE__*/css(_objectSpread$7(_objectSpread$7(_objectSpread$7({
9153
9162
  outline: 0,
9154
9163
  border: 0,
9155
- borderBottom: "1px solid ".concat(colors.gray.lighter),
9156
9164
  padding: "24px 0 12px 0",
9157
9165
  height: 48,
9158
9166
  borderRadius: 0
@@ -9203,15 +9211,14 @@
9203
9211
  }
9204
9212
  }, ";label:labelStyle;" + ( "" ));
9205
9213
  var messageStyle = /*#__PURE__*/css(_objectSpread$7(_objectSpread$7({}, typography.s.regular), {}, {
9206
- marginTop: 10,
9214
+ marginTop: 9,
9207
9215
  lineHeight: "10px",
9208
9216
  textAlign: "left"
9209
9217
  }), ";label:messageStyle;" + ( "" ));
9210
- var loadingStyle = /*#__PURE__*/css({
9211
- right: -10,
9212
- top: 20,
9213
- position: "absolute"
9214
- }, ";label:loadingStyle;" + ( "" ));
9218
+ var loadingStyle = /*#__PURE__*/css( {
9219
+ name: "1vx6lh0-loadingStyle",
9220
+ styles: "position:relative;top:4px;;label:loadingStyle;"
9221
+ } );
9215
9222
 
9216
9223
  function ownKeys$8(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; }
9217
9224
  function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$8(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -9283,6 +9290,7 @@
9283
9290
  type = _this$props.type,
9284
9291
  placeholder = _this$props.placeholder,
9285
9292
  className = _this$props.className,
9293
+ inputWrapperClassName = _this$props.inputWrapperClassName,
9286
9294
  inputClassName = _this$props.inputClassName,
9287
9295
  highlightClassName = _this$props.highlightClassName,
9288
9296
  loadingClassName = _this$props.loadingClassName,
@@ -9296,9 +9304,12 @@
9296
9304
  textArea = _this$props.textArea,
9297
9305
  required = _this$props.required,
9298
9306
  onClick = _this$props.onClick,
9299
- loading = _this$props.loading;
9307
+ loading = _this$props.loading,
9308
+ leftElement = _this$props.leftElement,
9309
+ rightElement = _this$props.rightElement;
9300
9310
  var isFocused = this.state.isFocused;
9301
9311
  var _message = errorMessage || successMessage || message;
9312
+ var _inputWrapperClassName = cx(inputWrapperStyle, inputWrapperClassName);
9302
9313
  var _inputClassName = cx(inputStyle, (_cx2 = {}, defineProperty(_cx2, inputDisabledStyle, !!disabled), defineProperty(_cx2, inputReadOnlyStyle, !!readOnly), defineProperty(_cx2, inputTextAreaStyle, !!textArea), _cx2), inputClassName);
9303
9314
  var _inputProps = {
9304
9315
  "aria-label": placeholder ? placeholder : undefined,
@@ -9315,7 +9326,7 @@
9315
9326
  _pebble_input_highlight_disabled: !!disabled
9316
9327
  }, highlightClassName);
9317
9328
  var labelClassName = cx(labelStyle, {
9318
- _pebble_input_label_focused: !!(isFocused || !!value || fixLabelAtTop)
9329
+ _pebble_input_label_focused: !!(isFocused || value || fixLabelAtTop || leftElement)
9319
9330
  });
9320
9331
  var _wrapperStyle = cx(wrapperStyle$2, {
9321
9332
  _pebble_input_wrapper_textarea: !!textArea
@@ -9326,9 +9337,15 @@
9326
9337
  onFocus: this.addFocus,
9327
9338
  onBlur: this.removeFocus,
9328
9339
  onClick: onClick
9329
- }, this.props.textArea ? /*#__PURE__*/React.createElement("textarea", Object.assign({}, _inputProps, this.props.inputProps)) : /*#__PURE__*/React.createElement("input", Object.assign({
9340
+ }, /*#__PURE__*/React.createElement("div", {
9341
+ className: _inputWrapperClassName
9342
+ }, leftElement === null || leftElement === void 0 ? void 0 : leftElement(), this.props.textArea ? /*#__PURE__*/React.createElement("textarea", Object.assign({}, _inputProps, this.props.inputProps)) : /*#__PURE__*/React.createElement("input", Object.assign({
9330
9343
  type: type
9331
- }, _inputProps, this.props.inputProps)), !!placeholder && /*#__PURE__*/React.createElement("label", {
9344
+ }, _inputProps, this.props.inputProps)), loading && /*#__PURE__*/React.createElement(Loader, {
9345
+ color: colors.violet.base,
9346
+ scale: 0.6,
9347
+ className: _loadingStyle
9348
+ }), rightElement === null || rightElement === void 0 ? void 0 : rightElement()), !!placeholder && /*#__PURE__*/React.createElement("label", {
9332
9349
  className: labelClassName
9333
9350
  }, placeholder, required && /*#__PURE__*/React.createElement("span", {
9334
9351
  style: {
@@ -9339,10 +9356,6 @@
9339
9356
  style: {
9340
9357
  backgroundColor: getColor(errorMessage, successMessage, true)
9341
9358
  }
9342
- }), loading && /*#__PURE__*/React.createElement(Loader, {
9343
- color: colors.violet.base,
9344
- scale: 0.6,
9345
- className: _loadingStyle
9346
9359
  }), _message && /*#__PURE__*/React.createElement("div", {
9347
9360
  className: messageStyle,
9348
9361
  style: {
@@ -13285,7 +13298,7 @@
13285
13298
  }, textEllipsis), {}, {
13286
13299
  height: "48px"
13287
13300
  }), ";label:inputStyle;" + ( "" ));
13288
- var inputWrapperStyle = /*#__PURE__*/css({
13301
+ var inputWrapperStyle$1 = /*#__PURE__*/css({
13289
13302
  position: "relative",
13290
13303
  borderRadius: "3px",
13291
13304
  fontSize: "14px",
@@ -13366,7 +13379,7 @@
13366
13379
  className: inputStyle$2,
13367
13380
  onChange: this.handleChange
13368
13381
  };
13369
- var inputWrapperClassName = cx(inputWrapperStyle, (_cx2 = {}, defineProperty(_cx2, inputDisabledStyle$1, !!disabled), defineProperty(_cx2, inputReadOnlyStyle$1, !!readOnly), _cx2), inputClassName);
13382
+ var inputWrapperClassName = cx(inputWrapperStyle$1, (_cx2 = {}, defineProperty(_cx2, inputDisabledStyle$1, !!disabled), defineProperty(_cx2, inputReadOnlyStyle$1, !!readOnly), _cx2), inputClassName);
13370
13383
  var placeholderClassName = cx(placeholderStyle, {
13371
13384
  _pebble_secondary_input_label_focused: isFocused || !!value
13372
13385
  });