@homebound/beam 2.400.0 → 2.401.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.
package/dist/index.d.cts CHANGED
@@ -4197,7 +4197,7 @@ declare class CssBuilder<T extends Properties> {
4197
4197
  get transition(): CssBuilder<T & {
4198
4198
  transition: csstype.Property.Transition<string> | undefined;
4199
4199
  }>;
4200
- /** Sets `fontWeight: 500; fontSize: "14px"; lineHeight: "20px"; outline: 0; borderRadius: "4px"; display: "inline-flex"; alignItems: "center"; whiteSpace: "nowrap"; transition: "background-color 200ms, border-color 200ms, box-shadow 200ms, left 200ms, right 200ms, margin 200ms"`. */
4200
+ /** Sets `fontWeight: 500; fontSize: "14px"; lineHeight: "20px"; outline: 0; borderRadius: "8px"; display: "inline-flex"; alignItems: "center"; whiteSpace: "nowrap"; transition: "background-color 200ms, border-color 200ms, box-shadow 200ms, left 200ms, right 200ms, margin 200ms"`. */
4201
4201
  get buttonBase(): CssBuilder<T & {
4202
4202
  fontWeight: csstype.Property.FontWeight | undefined;
4203
4203
  } & {
@@ -5002,7 +5002,7 @@ interface ButtonProps extends BeamButtonProps, BeamFocusableProps {
5002
5002
  }
5003
5003
  declare function Button(props: ButtonProps): _emotion_react_jsx_runtime.JSX.Element;
5004
5004
  type ButtonSize = "sm" | "md" | "lg";
5005
- type ButtonVariant = "primary" | "secondary" | "tertiary" | "tertiaryDanger" | "caution" | "danger" | "text" | "textSecondary";
5005
+ type ButtonVariant = "primary" | "secondary" | "tertiary" | "tertiaryDanger" | "tertiaryQuaternary" | "caution" | "danger" | "quaternary" | "text" | "textSecondary";
5006
5006
 
5007
5007
  interface IconButtonProps extends BeamButtonProps, BeamFocusableProps {
5008
5008
  /** The icon to use within the button. */
@@ -6872,8 +6872,6 @@ interface RadioGroupFieldProps<K extends string> extends Pick<PresentationFieldP
6872
6872
  helperText?: string | ReactNode;
6873
6873
  onBlur?: () => void;
6874
6874
  onFocus?: () => void;
6875
- /** The group name for the radio group. Only for legacy pages with custom layouts - avoid using this. */
6876
- unsupportedNameHack?: string;
6877
6875
  }
6878
6876
  /**
6879
6877
  * Provides a radio group with label.
package/dist/index.d.ts CHANGED
@@ -4197,7 +4197,7 @@ declare class CssBuilder<T extends Properties> {
4197
4197
  get transition(): CssBuilder<T & {
4198
4198
  transition: csstype.Property.Transition<string> | undefined;
4199
4199
  }>;
4200
- /** Sets `fontWeight: 500; fontSize: "14px"; lineHeight: "20px"; outline: 0; borderRadius: "4px"; display: "inline-flex"; alignItems: "center"; whiteSpace: "nowrap"; transition: "background-color 200ms, border-color 200ms, box-shadow 200ms, left 200ms, right 200ms, margin 200ms"`. */
4200
+ /** Sets `fontWeight: 500; fontSize: "14px"; lineHeight: "20px"; outline: 0; borderRadius: "8px"; display: "inline-flex"; alignItems: "center"; whiteSpace: "nowrap"; transition: "background-color 200ms, border-color 200ms, box-shadow 200ms, left 200ms, right 200ms, margin 200ms"`. */
4201
4201
  get buttonBase(): CssBuilder<T & {
4202
4202
  fontWeight: csstype.Property.FontWeight | undefined;
4203
4203
  } & {
@@ -5002,7 +5002,7 @@ interface ButtonProps extends BeamButtonProps, BeamFocusableProps {
5002
5002
  }
5003
5003
  declare function Button(props: ButtonProps): _emotion_react_jsx_runtime.JSX.Element;
5004
5004
  type ButtonSize = "sm" | "md" | "lg";
5005
- type ButtonVariant = "primary" | "secondary" | "tertiary" | "tertiaryDanger" | "caution" | "danger" | "text" | "textSecondary";
5005
+ type ButtonVariant = "primary" | "secondary" | "tertiary" | "tertiaryDanger" | "tertiaryQuaternary" | "caution" | "danger" | "quaternary" | "text" | "textSecondary";
5006
5006
 
5007
5007
  interface IconButtonProps extends BeamButtonProps, BeamFocusableProps {
5008
5008
  /** The icon to use within the button. */
@@ -6872,8 +6872,6 @@ interface RadioGroupFieldProps<K extends string> extends Pick<PresentationFieldP
6872
6872
  helperText?: string | ReactNode;
6873
6873
  onBlur?: () => void;
6874
6874
  onFocus?: () => void;
6875
- /** The group name for the radio group. Only for legacy pages with custom layouts - avoid using this. */
6876
- unsupportedNameHack?: string;
6877
6875
  }
6878
6876
  /**
6879
6877
  * Provides a radio group with label.
package/dist/index.js CHANGED
@@ -3855,11 +3855,11 @@ var CssBuilder = class _CssBuilder {
3855
3855
  );
3856
3856
  }
3857
3857
  // buttonBase
3858
- /** Sets `fontWeight: 500; fontSize: "14px"; lineHeight: "20px"; outline: 0; borderRadius: "4px"; display: "inline-flex"; alignItems: "center"; whiteSpace: "nowrap"; transition: "background-color 200ms, border-color 200ms, box-shadow 200ms, left 200ms, right 200ms, margin 200ms"`. */
3858
+ /** Sets `fontWeight: 500; fontSize: "14px"; lineHeight: "20px"; outline: 0; borderRadius: "8px"; display: "inline-flex"; alignItems: "center"; whiteSpace: "nowrap"; transition: "background-color 200ms, border-color 200ms, box-shadow 200ms, left 200ms, right 200ms, margin 200ms"`. */
3859
3859
  get buttonBase() {
3860
3860
  return this.add("fontWeight", 500).add("fontSize", "14px").add("lineHeight", "20px").add("outline", 0).add(
3861
3861
  "borderRadius",
3862
- "4px"
3862
+ "8px"
3863
3863
  ).add("display", "inline-flex").add("alignItems", "center").add("whiteSpace", "nowrap").add(
3864
3864
  "transition",
3865
3865
  "background-color 200ms, border-color 200ms, box-shadow 200ms, left 200ms, right 200ms, margin 200ms"
@@ -6829,10 +6829,10 @@ var variantStyles = (contrast) => ({
6829
6829
  focusStyles: Css.bshFocus.if(contrast).boxShadow(`0 0 0 2px ${"rgba(255,255,255,1)" /* White */}`).$
6830
6830
  },
6831
6831
  secondary: {
6832
- baseStyles: Css.bgWhite.bcGray300.bw1.ba.gray800.$,
6832
+ baseStyles: Css.bgWhite.bcGray300.bw1.ba.blue600.$,
6833
6833
  hoverStyles: Css.bgGray100.if(contrast).bgGray300.$,
6834
6834
  pressedStyles: Css.bgGray200.if(contrast).bgGray100.$,
6835
- disabledStyles: Css.bgWhite.gray400.$,
6835
+ disabledStyles: Css.bgWhite.blue300.$,
6836
6836
  focusStyles: Css.bshFocus.if(contrast).boxShadow(`0 0 0 2px ${"rgba(255,255,255,1)" /* White */}`).$
6837
6837
  },
6838
6838
  tertiary: {
@@ -6849,6 +6849,13 @@ var variantStyles = (contrast) => ({
6849
6849
  disabledStyles: Css.gray400.if(contrast).gray700.$,
6850
6850
  focusStyles: Css.boxShadow(`0px 0px 0px 2px ${"rgba(255,255,255,1)" /* White */}, 0px 0px 0px 4px ${"rgba(239, 68, 68, 1)" /* Red500 */}`).if(contrast).boxShadow(`0px 0px 0px 2px ${"rgba(239, 68, 68, 1)" /* Red500 */}`).$
6851
6851
  },
6852
+ tertiaryQuaternary: {
6853
+ baseStyles: Css.bgTransparent.gray900.if(contrast).gray400.$,
6854
+ hoverStyles: Css.bgGray100.if(contrast).bgGray700.white.$,
6855
+ pressedStyles: Css.gray900.if(contrast).bgWhite.gray900.$,
6856
+ disabledStyles: Css.gray400.if(contrast).gray700.$,
6857
+ focusStyles: Css.boxShadow(`0px 0px 0px 2px ${"rgba(255,255,255,1)" /* White */}, 0px 0px 0px 4px ${"rgba(36, 36, 36, 1)" /* Gray900 */}`).if(contrast).boxShadow(`0px 0px 0px 2px ${"rgba(175, 175, 175, 1)" /* Gray500 */}`).$
6858
+ },
6852
6859
  danger: {
6853
6860
  baseStyles: Css.bgRed600.white.$,
6854
6861
  hoverStyles: Css.bgRed700.$,
@@ -6856,6 +6863,13 @@ var variantStyles = (contrast) => ({
6856
6863
  disabledStyles: Css.bgRed200.if(contrast).bgRed900.gray600.$,
6857
6864
  focusStyles: Css.bshDanger.if(contrast).boxShadow(`0 0 0 2px ${"rgba(255,255,255,1)" /* White */}`).$
6858
6865
  },
6866
+ quaternary: {
6867
+ baseStyles: Css.bgGray900.white.$,
6868
+ hoverStyles: Css.bgGray700.$,
6869
+ pressedStyles: Css.bgGray800.$,
6870
+ disabledStyles: Css.bgGray200.if(contrast).bgGray900.gray600.$,
6871
+ focusStyles: Css.bshDanger.if(contrast).boxShadow(`0 0 0 2px ${"rgba(255,255,255,1)" /* White */}`).$
6872
+ },
6859
6873
  caution: {
6860
6874
  baseStyles: Css.bgYellow200.gray900.$,
6861
6875
  hoverStyles: Css.bgYellow300.$,
@@ -6872,11 +6886,11 @@ var variantStyles = (contrast) => ({
6872
6886
  },
6873
6887
  // Todo: handle contrast variant
6874
6888
  textSecondary: {
6875
- baseStyles: Css.gray900.add("fontSize", "inherit").$,
6889
+ baseStyles: Css.blue600.add("fontSize", "inherit").$,
6876
6890
  hoverStyles: Css.bgGray100.$,
6877
- pressedStyles: Css.gray900.$,
6878
- disabledStyles: Css.bgWhite.gray400.$,
6879
- focusStyles: Css.gray900.$
6891
+ pressedStyles: Css.blue600.$,
6892
+ disabledStyles: Css.bgWhite.blue300.$,
6893
+ focusStyles: Css.blue600.$
6880
6894
  }
6881
6895
  });
6882
6896
  var sizeStyles = {
@@ -11458,28 +11472,17 @@ import { useRadioGroupState } from "react-stately";
11458
11472
  import { jsx as jsx68, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
11459
11473
  var nextNameId = 0;
11460
11474
  function RadioGroupField(props) {
11461
- const {
11462
- label,
11463
- labelStyle,
11464
- value,
11465
- onChange,
11466
- options,
11467
- disabled = false,
11468
- errorMsg,
11469
- helperText,
11470
- unsupportedNameHack,
11471
- ...otherProps
11472
- } = props;
11473
- const groupName = useMemo18(() => unsupportedNameHack ?? `radio-group-${++nextNameId}`, [unsupportedNameHack]);
11475
+ const { label, labelStyle, value, onChange, options, disabled = false, errorMsg, helperText, ...otherProps } = props;
11476
+ const name = useMemo18(() => `radio-group-${++nextNameId}`, []);
11474
11477
  const state = useRadioGroupState({
11475
- name: groupName,
11478
+ name,
11476
11479
  value,
11477
11480
  onChange: (value2) => onChange(value2),
11478
11481
  isDisabled: disabled,
11479
11482
  isReadOnly: false
11480
11483
  });
11481
11484
  const tid = useTestIds(props, defaultTestId(label));
11482
- const { labelProps, radioGroupProps } = useRadioGroup({ label, isDisabled: disabled, name: groupName }, state);
11485
+ const { labelProps, radioGroupProps } = useRadioGroup({ label, isDisabled: disabled }, state);
11483
11486
  return (
11484
11487
  // default styling to position `<Label />` above.
11485
11488
  /* @__PURE__ */ jsxs38("div", { css: Css.df.fdc.gap1.aifs.if(labelStyle === "left").fdr.gap2.jcsb.$, children: [
@@ -11493,7 +11496,7 @@ function RadioGroupField(props) {
11493
11496
  children: /* @__PURE__ */ jsx68(
11494
11497
  Radio,
11495
11498
  {
11496
- parentId: groupName,
11499
+ parentId: name,
11497
11500
  option,
11498
11501
  state: { ...state, isDisabled },
11499
11502
  ...otherProps,
@@ -11541,7 +11544,6 @@ function Radio(props) {
11541
11544
  disabled,
11542
11545
  "aria-labelledby": labelId,
11543
11546
  ...inputProps,
11544
- name: parentId,
11545
11547
  ...focusProps,
11546
11548
  ...others
11547
11549
  }