@homebound/beam 2.400.0 → 2.402.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" | "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" | "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: {
@@ -6856,6 +6856,13 @@ var variantStyles = (contrast) => ({
6856
6856
  disabledStyles: Css.bgRed200.if(contrast).bgRed900.gray600.$,
6857
6857
  focusStyles: Css.bshDanger.if(contrast).boxShadow(`0 0 0 2px ${"rgba(255,255,255,1)" /* White */}`).$
6858
6858
  },
6859
+ quaternary: {
6860
+ baseStyles: Css.bgTransparent.gray900.if(contrast).gray400.$,
6861
+ hoverStyles: Css.bgGray100.if(contrast).bgGray700.white.$,
6862
+ pressedStyles: Css.gray900.if(contrast).bgWhite.gray900.$,
6863
+ disabledStyles: Css.gray400.if(contrast).gray700.$,
6864
+ 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 */}`).$
6865
+ },
6859
6866
  caution: {
6860
6867
  baseStyles: Css.bgYellow200.gray900.$,
6861
6868
  hoverStyles: Css.bgYellow300.$,
@@ -6872,11 +6879,11 @@ var variantStyles = (contrast) => ({
6872
6879
  },
6873
6880
  // Todo: handle contrast variant
6874
6881
  textSecondary: {
6875
- baseStyles: Css.gray900.add("fontSize", "inherit").$,
6882
+ baseStyles: Css.blue600.add("fontSize", "inherit").$,
6876
6883
  hoverStyles: Css.bgGray100.$,
6877
- pressedStyles: Css.gray900.$,
6878
- disabledStyles: Css.bgWhite.gray400.$,
6879
- focusStyles: Css.gray900.$
6884
+ pressedStyles: Css.blue600.$,
6885
+ disabledStyles: Css.bgWhite.blue300.$,
6886
+ focusStyles: Css.blue600.$
6880
6887
  }
6881
6888
  });
6882
6889
  var sizeStyles = {
@@ -11458,28 +11465,17 @@ import { useRadioGroupState } from "react-stately";
11458
11465
  import { jsx as jsx68, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
11459
11466
  var nextNameId = 0;
11460
11467
  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]);
11468
+ const { label, labelStyle, value, onChange, options, disabled = false, errorMsg, helperText, ...otherProps } = props;
11469
+ const name = useMemo18(() => `radio-group-${++nextNameId}`, []);
11474
11470
  const state = useRadioGroupState({
11475
- name: groupName,
11471
+ name,
11476
11472
  value,
11477
11473
  onChange: (value2) => onChange(value2),
11478
11474
  isDisabled: disabled,
11479
11475
  isReadOnly: false
11480
11476
  });
11481
11477
  const tid = useTestIds(props, defaultTestId(label));
11482
- const { labelProps, radioGroupProps } = useRadioGroup({ label, isDisabled: disabled, name: groupName }, state);
11478
+ const { labelProps, radioGroupProps } = useRadioGroup({ label, isDisabled: disabled }, state);
11483
11479
  return (
11484
11480
  // default styling to position `<Label />` above.
11485
11481
  /* @__PURE__ */ jsxs38("div", { css: Css.df.fdc.gap1.aifs.if(labelStyle === "left").fdr.gap2.jcsb.$, children: [
@@ -11493,7 +11489,7 @@ function RadioGroupField(props) {
11493
11489
  children: /* @__PURE__ */ jsx68(
11494
11490
  Radio,
11495
11491
  {
11496
- parentId: groupName,
11492
+ parentId: name,
11497
11493
  option,
11498
11494
  state: { ...state, isDisabled },
11499
11495
  ...otherProps,
@@ -11541,7 +11537,6 @@ function Radio(props) {
11541
11537
  disabled,
11542
11538
  "aria-labelledby": labelId,
11543
11539
  ...inputProps,
11544
- name: parentId,
11545
11540
  ...focusProps,
11546
11541
  ...others
11547
11542
  }
@@ -15503,7 +15498,7 @@ function PageHeader(props) {
15503
15498
  {
15504
15499
  label: cancelAction.label,
15505
15500
  onClick: cancelAction.onClick,
15506
- variant: "secondary",
15501
+ variant: "quaternary",
15507
15502
  disabled: cancelAction.disabled,
15508
15503
  tooltip: cancelAction.tooltip
15509
15504
  }
@@ -16132,7 +16127,7 @@ function FilterModal(props) {
16132
16127
  }
16133
16128
  ),
16134
16129
  /* @__PURE__ */ jsxs64("div", { css: Css.df.gap1.$, children: [
16135
- /* @__PURE__ */ jsx134(Button, { label: "Cancel", variant: "tertiary", onClick: closeModal, ...testId.modalClose }),
16130
+ /* @__PURE__ */ jsx134(Button, { label: "Cancel", variant: "quaternary", onClick: closeModal, ...testId.modalClose }),
16136
16131
  /* @__PURE__ */ jsx134(
16137
16132
  Button,
16138
16133
  {
@@ -17670,7 +17665,7 @@ function ConfirmCloseModal(props) {
17670
17665
  /* @__PURE__ */ jsx162(
17671
17666
  Button,
17672
17667
  {
17673
- variant: "tertiary",
17668
+ variant: "quaternary",
17674
17669
  label: discardText,
17675
17670
  onClick: () => {
17676
17671
  onClose();