@homebound/beam 2.401.0 → 2.403.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
@@ -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" | "tertiaryQuaternary" | "caution" | "danger" | "quaternary" | "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. */
@@ -7034,11 +7034,13 @@ type ToggleChipItemProps = {
7034
7034
  * If a ReactNode, it's treated as a "disabled reason" that's shown in a tooltip.
7035
7035
  */
7036
7036
  disabled?: boolean | ReactNode;
7037
+ readonly?: boolean;
7037
7038
  };
7038
7039
  interface ToggleChipGroupProps extends Pick<PresentationFieldProps, "labelStyle"> {
7039
7040
  label: string;
7040
7041
  options: ToggleChipItemProps[];
7041
7042
  values: string[];
7043
+ readonly?: boolean;
7042
7044
  required?: boolean;
7043
7045
  onChange: (values: string[]) => void;
7044
7046
  xss?: ToggleChipXss;
package/dist/index.d.ts CHANGED
@@ -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" | "tertiaryQuaternary" | "caution" | "danger" | "quaternary" | "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. */
@@ -7034,11 +7034,13 @@ type ToggleChipItemProps = {
7034
7034
  * If a ReactNode, it's treated as a "disabled reason" that's shown in a tooltip.
7035
7035
  */
7036
7036
  disabled?: boolean | ReactNode;
7037
+ readonly?: boolean;
7037
7038
  };
7038
7039
  interface ToggleChipGroupProps extends Pick<PresentationFieldProps, "labelStyle"> {
7039
7040
  label: string;
7040
7041
  options: ToggleChipItemProps[];
7041
7042
  values: string[];
7043
+ readonly?: boolean;
7042
7044
  required?: boolean;
7043
7045
  onChange: (values: string[]) => void;
7044
7046
  xss?: ToggleChipXss;
package/dist/index.js CHANGED
@@ -6849,13 +6849,6 @@ 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
- },
6859
6852
  danger: {
6860
6853
  baseStyles: Css.bgRed600.white.$,
6861
6854
  hoverStyles: Css.bgRed700.$,
@@ -6864,11 +6857,11 @@ var variantStyles = (contrast) => ({
6864
6857
  focusStyles: Css.bshDanger.if(contrast).boxShadow(`0 0 0 2px ${"rgba(255,255,255,1)" /* White */}`).$
6865
6858
  },
6866
6859
  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 */}`).$
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 */}`).$
6872
6865
  },
6873
6866
  caution: {
6874
6867
  baseStyles: Css.bgYellow200.gray900.$,
@@ -12111,8 +12104,16 @@ import { jsx as jsx76, jsxs as jsxs42 } from "@emotion/react/jsx-runtime";
12111
12104
  function ToggleChipGroup(props) {
12112
12105
  const { fieldProps } = usePresentationContext();
12113
12106
  const { labelLeftFieldWidth = "50%" } = fieldProps ?? {};
12114
- const { values, label, labelStyle = fieldProps?.labelStyle ?? "above", options, required, xss } = props;
12115
- const state = useCheckboxGroupState2({ ...props, value: values });
12107
+ const {
12108
+ values,
12109
+ label,
12110
+ labelStyle = fieldProps?.labelStyle ?? "above",
12111
+ options,
12112
+ required,
12113
+ xss,
12114
+ readonly = false
12115
+ } = props;
12116
+ const state = useCheckboxGroupState2({ ...props, isReadOnly: readonly, value: values });
12116
12117
  const { groupProps, labelProps } = useCheckboxGroup2(props, state);
12117
12118
  const tid = useTestIds(props, "toggleChip");
12118
12119
  const labelSuffix = useLabelSuffix(required, false);
@@ -12139,6 +12140,7 @@ function ToggleChipGroup(props) {
12139
12140
  selected: state.value.includes(o.value),
12140
12141
  label: o.label,
12141
12142
  disabled: o.disabled,
12143
+ readonly: o.readonly,
12142
12144
  startAdornment: o.startAdornment,
12143
12145
  xss,
12144
12146
  ...tid[o.value]
@@ -12150,10 +12152,21 @@ function ToggleChipGroup(props) {
12150
12152
  ] });
12151
12153
  }
12152
12154
  function ToggleChip2(props) {
12153
- const { label, value, groupState, selected: isSelected, disabled = false, startAdornment, xss, ...others } = props;
12155
+ const {
12156
+ label,
12157
+ value,
12158
+ groupState,
12159
+ selected: isSelected,
12160
+ disabled = false,
12161
+ readonly = false,
12162
+ startAdornment,
12163
+ xss,
12164
+ ...others
12165
+ } = props;
12154
12166
  const isDisabled = !!disabled;
12167
+ const isReadOnly = !!readonly;
12155
12168
  const ref = useRef34(null);
12156
- const { inputProps } = useCheckboxGroupItem2({ value, "aria-label": label, isDisabled }, groupState, ref);
12169
+ const { inputProps } = useCheckboxGroupItem2({ value, "aria-label": label, isReadOnly, isDisabled }, groupState, ref);
12157
12170
  const { isFocusVisible, focusProps } = useFocusRing9();
12158
12171
  const tooltip = resolveTooltip(disabled);
12159
12172
  return maybeTooltip({
@@ -12167,7 +12180,7 @@ function ToggleChip2(props) {
12167
12180
  ...isSelected ? {
12168
12181
  ...Css.color(xss?.color ?? "rgba(255,255,255,1)" /* White */).bgColor(xss?.backgroundColor ?? "rgba(29, 78, 216, 1)" /* Blue700 */).$,
12169
12182
  ":hover:not([data-disabled='true'])": Css.bgColor(xss?.backgroundColor ?? "rgba(30, 64, 175, 1)" /* Blue800 */).$
12170
- } : { ":hover:not([data-disabled='true'])": Css.bgGray300.$ },
12183
+ } : { ":hover:not([data-disabled='true'])": Css.if(!groupState.isReadOnly).bgGray300.$ },
12171
12184
  ...isFocusVisible ? Css.bshFocus.$ : {}
12172
12185
  },
12173
12186
  "data-selected": isSelected,
@@ -15505,7 +15518,7 @@ function PageHeader(props) {
15505
15518
  {
15506
15519
  label: cancelAction.label,
15507
15520
  onClick: cancelAction.onClick,
15508
- variant: "secondary",
15521
+ variant: "quaternary",
15509
15522
  disabled: cancelAction.disabled,
15510
15523
  tooltip: cancelAction.tooltip
15511
15524
  }
@@ -16134,7 +16147,7 @@ function FilterModal(props) {
16134
16147
  }
16135
16148
  ),
16136
16149
  /* @__PURE__ */ jsxs64("div", { css: Css.df.gap1.$, children: [
16137
- /* @__PURE__ */ jsx134(Button, { label: "Cancel", variant: "tertiary", onClick: closeModal, ...testId.modalClose }),
16150
+ /* @__PURE__ */ jsx134(Button, { label: "Cancel", variant: "quaternary", onClick: closeModal, ...testId.modalClose }),
16138
16151
  /* @__PURE__ */ jsx134(
16139
16152
  Button,
16140
16153
  {
@@ -17672,7 +17685,7 @@ function ConfirmCloseModal(props) {
17672
17685
  /* @__PURE__ */ jsx162(
17673
17686
  Button,
17674
17687
  {
17675
- variant: "tertiary",
17688
+ variant: "quaternary",
17676
17689
  label: discardText,
17677
17690
  onClick: () => {
17678
17691
  onClose();