pebble-web 2.11.1 → 2.12.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";
@@ -1419,6 +1420,7 @@
1419
1420
  PebbleIcon["Store"] = "store";
1420
1421
  PebbleIcon["System"] = "system";
1421
1422
  PebbleIcon["Table"] = "table";
1423
+ PebbleIcon["Tag"] = "tag";
1422
1424
  PebbleIcon["Team"] = "team";
1423
1425
  PebbleIcon["Training"] = "training";
1424
1426
  PebbleIcon["Transfer2"] = "transfer-2";
@@ -9149,10 +9151,14 @@
9149
9151
  height: 110
9150
9152
  }
9151
9153
  }, ";label:wrapperStyle;" + ( "" ));
9154
+ var inputWrapperStyle = /*#__PURE__*/css({
9155
+ display: "flex",
9156
+ alignItems: "baseline",
9157
+ borderBottom: "1px solid ".concat(colors.gray.lighter)
9158
+ }, ";label:inputWrapperStyle;" + ( "" ));
9152
9159
  var inputStyle = /*#__PURE__*/css(_objectSpread$7(_objectSpread$7(_objectSpread$7({
9153
9160
  outline: 0,
9154
9161
  border: 0,
9155
- borderBottom: "1px solid ".concat(colors.gray.lighter),
9156
9162
  padding: "24px 0 12px 0",
9157
9163
  height: 48,
9158
9164
  borderRadius: 0
@@ -9203,15 +9209,14 @@
9203
9209
  }
9204
9210
  }, ";label:labelStyle;" + ( "" ));
9205
9211
  var messageStyle = /*#__PURE__*/css(_objectSpread$7(_objectSpread$7({}, typography.s.regular), {}, {
9206
- marginTop: 10,
9212
+ marginTop: 9,
9207
9213
  lineHeight: "10px",
9208
9214
  textAlign: "left"
9209
9215
  }), ";label:messageStyle;" + ( "" ));
9210
- var loadingStyle = /*#__PURE__*/css({
9211
- right: -10,
9212
- top: 20,
9213
- position: "absolute"
9214
- }, ";label:loadingStyle;" + ( "" ));
9216
+ var loadingStyle = /*#__PURE__*/css( {
9217
+ name: "1vx6lh0-loadingStyle",
9218
+ styles: "position:relative;top:4px;;label:loadingStyle;"
9219
+ } );
9215
9220
 
9216
9221
  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
9222
  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 +9288,7 @@
9283
9288
  type = _this$props.type,
9284
9289
  placeholder = _this$props.placeholder,
9285
9290
  className = _this$props.className,
9291
+ inputWrapperClassName = _this$props.inputWrapperClassName,
9286
9292
  inputClassName = _this$props.inputClassName,
9287
9293
  highlightClassName = _this$props.highlightClassName,
9288
9294
  loadingClassName = _this$props.loadingClassName,
@@ -9296,9 +9302,12 @@
9296
9302
  textArea = _this$props.textArea,
9297
9303
  required = _this$props.required,
9298
9304
  onClick = _this$props.onClick,
9299
- loading = _this$props.loading;
9305
+ loading = _this$props.loading,
9306
+ leftElement = _this$props.leftElement,
9307
+ rightElement = _this$props.rightElement;
9300
9308
  var isFocused = this.state.isFocused;
9301
9309
  var _message = errorMessage || successMessage || message;
9310
+ var _inputWrapperClassName = cx(inputWrapperStyle, inputWrapperClassName);
9302
9311
  var _inputClassName = cx(inputStyle, (_cx2 = {}, defineProperty(_cx2, inputDisabledStyle, !!disabled), defineProperty(_cx2, inputReadOnlyStyle, !!readOnly), defineProperty(_cx2, inputTextAreaStyle, !!textArea), _cx2), inputClassName);
9303
9312
  var _inputProps = {
9304
9313
  "aria-label": placeholder ? placeholder : undefined,
@@ -9315,7 +9324,7 @@
9315
9324
  _pebble_input_highlight_disabled: !!disabled
9316
9325
  }, highlightClassName);
9317
9326
  var labelClassName = cx(labelStyle, {
9318
- _pebble_input_label_focused: !!(isFocused || !!value || fixLabelAtTop)
9327
+ _pebble_input_label_focused: !!(isFocused || value || fixLabelAtTop || leftElement)
9319
9328
  });
9320
9329
  var _wrapperStyle = cx(wrapperStyle$2, {
9321
9330
  _pebble_input_wrapper_textarea: !!textArea
@@ -9326,9 +9335,15 @@
9326
9335
  onFocus: this.addFocus,
9327
9336
  onBlur: this.removeFocus,
9328
9337
  onClick: onClick
9329
- }, this.props.textArea ? /*#__PURE__*/React.createElement("textarea", Object.assign({}, _inputProps, this.props.inputProps)) : /*#__PURE__*/React.createElement("input", Object.assign({
9338
+ }, /*#__PURE__*/React.createElement("div", {
9339
+ className: _inputWrapperClassName
9340
+ }, 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
9341
  type: type
9331
- }, _inputProps, this.props.inputProps)), !!placeholder && /*#__PURE__*/React.createElement("label", {
9342
+ }, _inputProps, this.props.inputProps)), loading && /*#__PURE__*/React.createElement(Loader, {
9343
+ color: colors.violet.base,
9344
+ scale: 0.6,
9345
+ className: _loadingStyle
9346
+ }), rightElement === null || rightElement === void 0 ? void 0 : rightElement()), !!placeholder && /*#__PURE__*/React.createElement("label", {
9332
9347
  className: labelClassName
9333
9348
  }, placeholder, required && /*#__PURE__*/React.createElement("span", {
9334
9349
  style: {
@@ -9339,10 +9354,6 @@
9339
9354
  style: {
9340
9355
  backgroundColor: getColor(errorMessage, successMessage, true)
9341
9356
  }
9342
- }), loading && /*#__PURE__*/React.createElement(Loader, {
9343
- color: colors.violet.base,
9344
- scale: 0.6,
9345
- className: _loadingStyle
9346
9357
  }), _message && /*#__PURE__*/React.createElement("div", {
9347
9358
  className: messageStyle,
9348
9359
  style: {
@@ -13285,7 +13296,7 @@
13285
13296
  }, textEllipsis), {}, {
13286
13297
  height: "48px"
13287
13298
  }), ";label:inputStyle;" + ( "" ));
13288
- var inputWrapperStyle = /*#__PURE__*/css({
13299
+ var inputWrapperStyle$1 = /*#__PURE__*/css({
13289
13300
  position: "relative",
13290
13301
  borderRadius: "3px",
13291
13302
  fontSize: "14px",
@@ -13366,7 +13377,7 @@
13366
13377
  className: inputStyle$2,
13367
13378
  onChange: this.handleChange
13368
13379
  };
13369
- var inputWrapperClassName = cx(inputWrapperStyle, (_cx2 = {}, defineProperty(_cx2, inputDisabledStyle$1, !!disabled), defineProperty(_cx2, inputReadOnlyStyle$1, !!readOnly), _cx2), inputClassName);
13380
+ var inputWrapperClassName = cx(inputWrapperStyle$1, (_cx2 = {}, defineProperty(_cx2, inputDisabledStyle$1, !!disabled), defineProperty(_cx2, inputReadOnlyStyle$1, !!readOnly), _cx2), inputClassName);
13370
13381
  var placeholderClassName = cx(placeholderStyle, {
13371
13382
  _pebble_secondary_input_label_focused: isFocused || !!value
13372
13383
  });