@homebound/beam 3.0.3 → 3.0.4

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.
package/dist/index.js CHANGED
@@ -20,8 +20,7 @@ import {
20
20
  } from "./chunk-ZPT2ZR5B.js";
21
21
 
22
22
  // src/Css.ts
23
- import { trussProps } from "@homebound/truss/runtime";
24
- import { RuntimeStyle, useRuntimeStyle } from "@homebound/truss/runtime";
23
+ import { trussProps, useRuntimeStyle as _useRuntimeStyle } from "@homebound/truss/runtime";
25
24
  var CssBuilder = class _CssBuilder {
26
25
  constructor(opts) {
27
26
  this.opts = opts;
@@ -3877,12 +3876,20 @@ var CssBuilder = class _CssBuilder {
3877
3876
  return this;
3878
3877
  }
3879
3878
  const newRules = typeof propOrStyles === "string" ? { [propOrStyles]: value } : propOrStyles;
3879
+ if (typeof propOrStyles !== "string" && newRules.$css) {
3880
+ throw new Error("add() received a Css expression \u2014 use with() to compose Css expressions");
3881
+ }
3880
3882
  const rules = this.selector ? { ...this.rules, [this.selector]: { ...this.rules[this.selector], ...newRules } } : { ...this.rules, ...newRules };
3881
3883
  return this.newCss({ rules });
3882
3884
  }
3883
- /** Inline a partial style hash, skipping any undefined values. */
3884
- addCss(props) {
3885
- return this.add(omitUndefinedValues(props));
3885
+ with(cssProp) {
3886
+ if (!this.enabled) {
3887
+ return this;
3888
+ }
3889
+ const { $css, ...rest } = cssProp;
3890
+ const filtered = omitUndefinedValues(rest);
3891
+ const rules = this.selector ? { ...this.rules, [this.selector]: { ...this.rules[this.selector], ...filtered } } : { ...this.rules, ...filtered };
3892
+ return this.newCss({ rules });
3886
3893
  }
3887
3894
  /** Marker for the build-time transform to append a raw className. */
3888
3895
  className(className) {
@@ -4016,6 +4023,16 @@ var Css = new CssBuilder({
4016
4023
  elseApplied: false,
4017
4024
  runtimeError: void 0
4018
4025
  });
4026
+ var RuntimeCss = new CssBuilder({
4027
+ rules: {},
4028
+ enabled: true,
4029
+ selector: void 0,
4030
+ elseApplied: false,
4031
+ runtimeError: void 0
4032
+ });
4033
+ function useRuntimeStyle(css2) {
4034
+ _useRuntimeStyle(css2);
4035
+ }
4019
4036
  var Breakpoints = /* @__PURE__ */ ((Breakpoints2) => {
4020
4037
  Breakpoints2["print"] = "@media print";
4021
4038
  Breakpoints2["sm"] = "@media screen and (max-width: 599px)";
@@ -4868,7 +4885,7 @@ function Chips(props) {
4868
4885
  whiteSpace: "whiteSpace_normal"
4869
4886
  },
4870
4887
  ...wrap !== false ? {
4871
- flexWrap: "flexWrap_wrap"
4888
+ flexWrap: "fww"
4872
4889
  } : {},
4873
4890
  ...xss
4874
4891
  }), children: values.map((value, i) => {
@@ -11363,7 +11380,7 @@ function ComboBoxInput(props) {
11363
11380
  });
11364
11381
  return /* @__PURE__ */ jsx55(TextFieldBase, { ...otherProps, ...multilineProps, unfocusedPlaceholder: showChipSelection && /* @__PURE__ */ jsx55(Chips, { compact: otherProps.compact, values: chipLabels, wrap: allowWrap }), inputRef, inputWrapRef, errorMsg, contrast, xss: otherProps.labelStyle !== "inline" && !inputProps.readOnly ? {
11365
11382
  fontWeight: "fw5"
11366
- } : {}, startAdornment: showNumSelection && /* @__PURE__ */ jsx55(Tooltip, { title: /* @__PURE__ */ jsx55(SelectedOptionBullets, { labels: chipLabels }), children: /* @__PURE__ */ jsx55(CountBadge, { count: isTree ? selectedOptionsLabels?.length ?? 0 : state.selectionManager.selectedKeys.size, "data-testid": "selectedOptionsCount" }) }) || showFieldDecoration && fieldDecoration(selectedOptions[0]), endAdornment: !inputProps.readOnly && /* @__PURE__ */ jsx55("button", { ...buttonProps, disabled: inputProps.disabled, ref: buttonRef, ...trussProps38({
11383
+ } : void 0, startAdornment: showNumSelection && /* @__PURE__ */ jsx55(Tooltip, { title: /* @__PURE__ */ jsx55(SelectedOptionBullets, { labels: chipLabels }), children: /* @__PURE__ */ jsx55(CountBadge, { count: isTree ? selectedOptionsLabels?.length ?? 0 : state.selectionManager.selectedKeys.size, "data-testid": "selectedOptionsCount" }) }) || showFieldDecoration && fieldDecoration(selectedOptions[0]), endAdornment: !inputProps.readOnly && /* @__PURE__ */ jsx55("button", { ...buttonProps, disabled: inputProps.disabled, ref: buttonRef, ...trussProps38({
11367
11384
  ...{
11368
11385
  borderRadius: "br4",
11369
11386
  outline: "outline0",
@@ -21523,7 +21540,7 @@ export {
21523
21540
  RightPaneProvider,
21524
21541
  RightSidebar,
21525
21542
  Row,
21526
- RuntimeStyle,
21543
+ RuntimeCss,
21527
21544
  ScrollShadows,
21528
21545
  ScrollableContent,
21529
21546
  ScrollableParent,