@homebound/beam 2.137.0 → 2.137.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.
@@ -18,7 +18,7 @@ function TextFieldBase(props) {
18
18
  var _a, _b, _c, _d, _e, _f, _g;
19
19
  const { fieldProps } = (0, PresentationContext_1.usePresentationContext)();
20
20
  const { label, required, labelProps, hideLabel = (_a = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.hideLabel) !== null && _a !== void 0 ? _a : false, inputProps, inputRef, inputWrapRef, groupProps, compact = (_b = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.compact) !== null && _b !== void 0 ? _b : false, errorMsg, helperText, multiline = false, onChange, onBlur, onFocus, xss, endAdornment, startAdornment, inlineLabel, contrast = false, borderless = (_c = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.borderless) !== null && _c !== void 0 ? _c : false, textAreaMinHeight = 96, clearable = false, tooltip, visuallyDisabled = (_d = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.visuallyDisabled) !== null && _d !== void 0 ? _d : true, } = props;
21
- const typeScale = (_e = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.typeScale) !== null && _e !== void 0 ? _e : "sm";
21
+ const typeScale = (_e = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.typeScale) !== null && _e !== void 0 ? _e : (inputProps.readOnly && !hideLabel ? "smEm" : "sm");
22
22
  const errorInTooltip = (_f = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.errorInTooltip) !== null && _f !== void 0 ? _f : false;
23
23
  const internalProps = props.internalProps || {};
24
24
  const { compound = false, forceFocus = false, forceHover = false } = internalProps;
@@ -52,11 +52,12 @@ function TextFieldBase(props) {
52
52
  ...(!compound ? Css_1.Css.ba.$ : {}),
53
53
  },
54
54
  inputWrapperReadOnly: {
55
- ...Css_1.Css[typeScale].df.aic.w100
56
- .mhPx(fieldHeight - maybeSmaller)
57
- .if(compact)
58
- .mhPx(compactFieldHeight - maybeSmaller).$,
59
- ...Css_1.Css.gray900.if(contrast).white.$,
55
+ ...Css_1.Css[typeScale].df.aic.w100.gray900.if(contrast).white.$,
56
+ // If we are hiding the label, then we are typically in a table. Keep the `mh` in this case to ensure editable and non-editable fields in a single table row line up properly
57
+ ...(hideLabel &&
58
+ Css_1.Css.mhPx(fieldHeight - maybeSmaller)
59
+ .if(compact)
60
+ .mhPx(compactFieldHeight - maybeSmaller).$),
60
61
  },
61
62
  input: {
62
63
  ...Css_1.Css.w100.mw0.outline0.fg1.if(multiline).br4.$,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.137.0",
3
+ "version": "2.137.1",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",