@homebound/beam 3.78.0 → 3.79.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.cjs +34 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +34 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -7974,6 +7974,8 @@ type SelectCardView = "grid" | "list";
|
|
|
7974
7974
|
type SelectCardLayout = "vertical" | "horizontal";
|
|
7975
7975
|
type SelectCardGroupItemOptionBase<V extends Value> = {
|
|
7976
7976
|
label: string;
|
|
7977
|
+
/** Optional tag shown above the label (grid view) or next to it (list view). Not supported on icon cards. */
|
|
7978
|
+
tag?: CardTag;
|
|
7977
7979
|
/** Optional secondary copy shown beneath the label. */
|
|
7978
7980
|
description?: ReactNode;
|
|
7979
7981
|
disabled?: boolean;
|
|
@@ -7984,13 +7986,15 @@ type SelectCardGroupItemOptionBase<V extends Value> = {
|
|
|
7984
7986
|
/** For checkbox groups, selecting this option clears other options and cannot be combined. */
|
|
7985
7987
|
selectionBehavior?: "exclusive";
|
|
7986
7988
|
};
|
|
7987
|
-
/** Grid-view option; requires either `icon` or `image
|
|
7989
|
+
/** Grid-view option; requires either `icon` or `image`, and only image cards take a `tag`. */
|
|
7988
7990
|
type SelectCardGridGroupItemOption<V extends Value> = SelectCardGroupItemOptionBase<V> & ({
|
|
7989
7991
|
icon: IconProps["icon"];
|
|
7990
7992
|
image?: never;
|
|
7993
|
+
tag?: never;
|
|
7991
7994
|
} | {
|
|
7992
7995
|
image: string;
|
|
7993
7996
|
icon?: never;
|
|
7997
|
+
tag?: CardTag;
|
|
7994
7998
|
});
|
|
7995
7999
|
/** List-view option; `icon` is ignored when present. */
|
|
7996
8000
|
type SelectCardListGroupItemOption<V extends Value> = SelectCardGroupItemOptionBase<V> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -7974,6 +7974,8 @@ type SelectCardView = "grid" | "list";
|
|
|
7974
7974
|
type SelectCardLayout = "vertical" | "horizontal";
|
|
7975
7975
|
type SelectCardGroupItemOptionBase<V extends Value> = {
|
|
7976
7976
|
label: string;
|
|
7977
|
+
/** Optional tag shown above the label (grid view) or next to it (list view). Not supported on icon cards. */
|
|
7978
|
+
tag?: CardTag;
|
|
7977
7979
|
/** Optional secondary copy shown beneath the label. */
|
|
7978
7980
|
description?: ReactNode;
|
|
7979
7981
|
disabled?: boolean;
|
|
@@ -7984,13 +7986,15 @@ type SelectCardGroupItemOptionBase<V extends Value> = {
|
|
|
7984
7986
|
/** For checkbox groups, selecting this option clears other options and cannot be combined. */
|
|
7985
7987
|
selectionBehavior?: "exclusive";
|
|
7986
7988
|
};
|
|
7987
|
-
/** Grid-view option; requires either `icon` or `image
|
|
7989
|
+
/** Grid-view option; requires either `icon` or `image`, and only image cards take a `tag`. */
|
|
7988
7990
|
type SelectCardGridGroupItemOption<V extends Value> = SelectCardGroupItemOptionBase<V> & ({
|
|
7989
7991
|
icon: IconProps["icon"];
|
|
7990
7992
|
image?: never;
|
|
7993
|
+
tag?: never;
|
|
7991
7994
|
} | {
|
|
7992
7995
|
image: string;
|
|
7993
7996
|
icon?: never;
|
|
7997
|
+
tag?: CardTag;
|
|
7994
7998
|
});
|
|
7995
7999
|
/** List-view option; `icon` is ignored when present. */
|
|
7996
8000
|
type SelectCardListGroupItemOption<V extends Value> = SelectCardGroupItemOptionBase<V> & {
|
package/dist/index.js
CHANGED
|
@@ -14926,6 +14926,7 @@ function GridSelectCard(props) {
|
|
|
14926
14926
|
layout,
|
|
14927
14927
|
label,
|
|
14928
14928
|
description,
|
|
14929
|
+
tag,
|
|
14929
14930
|
selected: isSelected = false,
|
|
14930
14931
|
disabled: isDisabled = false,
|
|
14931
14932
|
tooltip,
|
|
@@ -14946,6 +14947,12 @@ function GridSelectCard(props) {
|
|
|
14946
14947
|
} : {}
|
|
14947
14948
|
}), ...tid.img }) : icon && /* @__PURE__ */ jsx76(Icon, { icon, inc: 4, color: isDisabled ? "--b-on-surface-disabled" /* OnSurfaceDisabled */ : "--b-on-surface" /* OnSurface */ }),
|
|
14948
14949
|
/* @__PURE__ */ jsxs43("span", { className: "df fdc gap_4px w100", children: [
|
|
14950
|
+
tag && /* @__PURE__ */ jsx76("span", { ...trussProps51({
|
|
14951
|
+
display: "df",
|
|
14952
|
+
...layout !== "horizontal" ? {
|
|
14953
|
+
justifyContent: "jcc"
|
|
14954
|
+
} : {}
|
|
14955
|
+
}), children: /* @__PURE__ */ jsx76(Tag, { type: tag.type, text: tag.text, ...tid.tag }) }),
|
|
14949
14956
|
/* @__PURE__ */ jsx76("span", { ...trussProps51({
|
|
14950
14957
|
fontWeight: "fw6",
|
|
14951
14958
|
fontSize: "fz_14px",
|
|
@@ -15015,6 +15022,7 @@ function ListSelectCard(props) {
|
|
|
15015
15022
|
const {
|
|
15016
15023
|
label,
|
|
15017
15024
|
description,
|
|
15025
|
+
tag,
|
|
15018
15026
|
selected: isSelected = false,
|
|
15019
15027
|
disabled: isDisabled = false,
|
|
15020
15028
|
tooltip,
|
|
@@ -15044,7 +15052,8 @@ function ListSelectCard(props) {
|
|
|
15044
15052
|
"--color": "var(--b-field-text-disabled)"
|
|
15045
15053
|
}]
|
|
15046
15054
|
} : {}
|
|
15047
|
-
}), children: label })
|
|
15055
|
+
}), children: label }),
|
|
15056
|
+
tag && /* @__PURE__ */ jsx78(Tag, { type: tag.type, text: tag.text, ...tid.tag })
|
|
15048
15057
|
] }),
|
|
15049
15058
|
description && /* @__PURE__ */ jsx78("span", { ...trussProps53({
|
|
15050
15059
|
marginLeft: "ml3",
|
|
@@ -15067,7 +15076,7 @@ function ListSelectCard(props) {
|
|
|
15067
15076
|
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
15068
15077
|
function SelectCardCheckboxGroupItem(props) {
|
|
15069
15078
|
const { option, groupState, isSelected, view, layout, ...others } = props;
|
|
15070
|
-
const { label, description, disabled, tooltip, value } = option;
|
|
15079
|
+
const { label, description, tag, disabled, tooltip, value } = option;
|
|
15071
15080
|
const ref = useRef32(null);
|
|
15072
15081
|
const { inputProps, isDisabled: isOptionDisabled } = useCheckboxGroupItem2(
|
|
15073
15082
|
{ value: valueToKey(value), "aria-label": label, isDisabled: disabled ?? false },
|
|
@@ -15076,6 +15085,7 @@ function SelectCardCheckboxGroupItem(props) {
|
|
|
15076
15085
|
);
|
|
15077
15086
|
const layoutProps = {
|
|
15078
15087
|
label,
|
|
15088
|
+
tag,
|
|
15079
15089
|
description,
|
|
15080
15090
|
selected: isSelected,
|
|
15081
15091
|
disabled: isOptionDisabled,
|
|
@@ -15087,7 +15097,16 @@ function SelectCardCheckboxGroupItem(props) {
|
|
|
15087
15097
|
return /* @__PURE__ */ jsx79(ListSelectCard, { ...layoutProps });
|
|
15088
15098
|
}
|
|
15089
15099
|
const gridOption = option;
|
|
15090
|
-
return /* @__PURE__ */ jsx79(
|
|
15100
|
+
return /* @__PURE__ */ jsx79(
|
|
15101
|
+
GridSelectCard,
|
|
15102
|
+
{
|
|
15103
|
+
...layoutProps,
|
|
15104
|
+
layout,
|
|
15105
|
+
icon: gridOption.icon,
|
|
15106
|
+
image: gridOption.image,
|
|
15107
|
+
tag: gridOption.tag
|
|
15108
|
+
}
|
|
15109
|
+
);
|
|
15091
15110
|
}
|
|
15092
15111
|
|
|
15093
15112
|
// src/inputs/SelectCard/utils.ts
|
|
@@ -15198,7 +15217,7 @@ import { useRadio as useRadio2 } from "react-aria";
|
|
|
15198
15217
|
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
15199
15218
|
function SelectCardRadioGroupItem(props) {
|
|
15200
15219
|
const { option, groupState, isSelected, view, layout, ...others } = props;
|
|
15201
|
-
const { label, description, disabled, tooltip, value } = option;
|
|
15220
|
+
const { label, description, tag, disabled, tooltip, value } = option;
|
|
15202
15221
|
const ref = useRef33(null);
|
|
15203
15222
|
const { inputProps, isDisabled: isOptionDisabled } = useRadio2(
|
|
15204
15223
|
{ value: valueToKey(value), "aria-label": label, isDisabled: disabled ?? false },
|
|
@@ -15207,6 +15226,7 @@ function SelectCardRadioGroupItem(props) {
|
|
|
15207
15226
|
);
|
|
15208
15227
|
const layoutProps = {
|
|
15209
15228
|
label,
|
|
15229
|
+
tag,
|
|
15210
15230
|
description,
|
|
15211
15231
|
selected: isSelected,
|
|
15212
15232
|
disabled: isOptionDisabled,
|
|
@@ -15218,7 +15238,16 @@ function SelectCardRadioGroupItem(props) {
|
|
|
15218
15238
|
return /* @__PURE__ */ jsx81(ListSelectCard, { ...layoutProps });
|
|
15219
15239
|
}
|
|
15220
15240
|
const gridOption = option;
|
|
15221
|
-
return /* @__PURE__ */ jsx81(
|
|
15241
|
+
return /* @__PURE__ */ jsx81(
|
|
15242
|
+
GridSelectCard,
|
|
15243
|
+
{
|
|
15244
|
+
...layoutProps,
|
|
15245
|
+
layout,
|
|
15246
|
+
icon: gridOption.icon,
|
|
15247
|
+
image: gridOption.image,
|
|
15248
|
+
tag: gridOption.tag
|
|
15249
|
+
}
|
|
15250
|
+
);
|
|
15222
15251
|
}
|
|
15223
15252
|
|
|
15224
15253
|
// src/inputs/SelectCard/SelectCardGroup.tsx
|