@homebound/beam 4.17.0 → 4.18.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 +58 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +58 -2
- package/dist/index.js.map +1 -1
- package/dist/truss.css +12 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5367,12 +5367,12 @@ declare function ProposedValue$1(props: ProposedValueProps): React$1.JSX.Element
|
|
|
5367
5367
|
|
|
5368
5368
|
type TagXss = Margin | "backgroundColor" | "color";
|
|
5369
5369
|
type TagType = "info" | "update" | "warning" | "error" | "success" | "neutral" | "ai" | "strikethrough";
|
|
5370
|
-
type TagVariant = "primary" | "secondary";
|
|
5370
|
+
type TagVariant = "primary" | "secondary" | "bold";
|
|
5371
5371
|
type TagPropsBase<X> = {
|
|
5372
5372
|
/** Required even if using `iconOnly + preventTooltip`. In those cases an accessibility friendly message is expected */
|
|
5373
5373
|
text: ReactNode;
|
|
5374
5374
|
type?: TagType;
|
|
5375
|
-
/** Defaults to "primary". Secondary is intended for use in TagGroup. */
|
|
5375
|
+
/** Defaults to "primary". Secondary is intended for use in TagGroup. Bold is a darker fill with white text. */
|
|
5376
5376
|
variant?: TagVariant;
|
|
5377
5377
|
xss?: X;
|
|
5378
5378
|
/** A tooltip will automatically be displayed if the text is truncated. Set to true to prevent this behavior.
|
|
@@ -5393,10 +5393,11 @@ declare function Tag<X extends Only<Xss<TagXss>, X>>(props: TagProps<X>): React$
|
|
|
5393
5393
|
type CardSlotBase<K extends string> = {
|
|
5394
5394
|
kind: K;
|
|
5395
5395
|
};
|
|
5396
|
-
/** Tag props for badge slots — mirrors Tag (type, icon, iconOnly) with string-only text. */
|
|
5396
|
+
/** Tag props for badge slots — mirrors Tag (type, variant, icon, iconOnly) with string-only text. */
|
|
5397
5397
|
type CardBadgeTag = {
|
|
5398
5398
|
text: string;
|
|
5399
5399
|
type?: TagType;
|
|
5400
|
+
variant?: TagVariant;
|
|
5400
5401
|
} & ({
|
|
5401
5402
|
iconOnly?: false;
|
|
5402
5403
|
icon?: IconKey;
|
|
@@ -7520,6 +7521,7 @@ type ImageFitType = "contain" | "cover";
|
|
|
7520
7521
|
type CardTag = {
|
|
7521
7522
|
text: string;
|
|
7522
7523
|
type?: TagType;
|
|
7524
|
+
variant?: TagVariant;
|
|
7523
7525
|
};
|
|
7524
7526
|
type CardProps = {
|
|
7525
7527
|
title: string;
|
|
@@ -8351,6 +8353,7 @@ type InlineFeedbackBannerAction = ActionButtonProps | ({
|
|
|
8351
8353
|
type InlineFeedbackBannerProps = {
|
|
8352
8354
|
type: InlineFeedbackBannerType;
|
|
8353
8355
|
tagText?: TagProps<any>["text"];
|
|
8356
|
+
tagVariant?: TagVariant;
|
|
8354
8357
|
description: ReactNode;
|
|
8355
8358
|
/** Rendered in order, always as text buttons (menu triggers included). */
|
|
8356
8359
|
actions?: InlineFeedbackBannerAction[];
|
package/dist/index.d.ts
CHANGED
|
@@ -5367,12 +5367,12 @@ declare function ProposedValue$1(props: ProposedValueProps): React$1.JSX.Element
|
|
|
5367
5367
|
|
|
5368
5368
|
type TagXss = Margin | "backgroundColor" | "color";
|
|
5369
5369
|
type TagType = "info" | "update" | "warning" | "error" | "success" | "neutral" | "ai" | "strikethrough";
|
|
5370
|
-
type TagVariant = "primary" | "secondary";
|
|
5370
|
+
type TagVariant = "primary" | "secondary" | "bold";
|
|
5371
5371
|
type TagPropsBase<X> = {
|
|
5372
5372
|
/** Required even if using `iconOnly + preventTooltip`. In those cases an accessibility friendly message is expected */
|
|
5373
5373
|
text: ReactNode;
|
|
5374
5374
|
type?: TagType;
|
|
5375
|
-
/** Defaults to "primary". Secondary is intended for use in TagGroup. */
|
|
5375
|
+
/** Defaults to "primary". Secondary is intended for use in TagGroup. Bold is a darker fill with white text. */
|
|
5376
5376
|
variant?: TagVariant;
|
|
5377
5377
|
xss?: X;
|
|
5378
5378
|
/** A tooltip will automatically be displayed if the text is truncated. Set to true to prevent this behavior.
|
|
@@ -5393,10 +5393,11 @@ declare function Tag<X extends Only<Xss<TagXss>, X>>(props: TagProps<X>): React$
|
|
|
5393
5393
|
type CardSlotBase<K extends string> = {
|
|
5394
5394
|
kind: K;
|
|
5395
5395
|
};
|
|
5396
|
-
/** Tag props for badge slots — mirrors Tag (type, icon, iconOnly) with string-only text. */
|
|
5396
|
+
/** Tag props for badge slots — mirrors Tag (type, variant, icon, iconOnly) with string-only text. */
|
|
5397
5397
|
type CardBadgeTag = {
|
|
5398
5398
|
text: string;
|
|
5399
5399
|
type?: TagType;
|
|
5400
|
+
variant?: TagVariant;
|
|
5400
5401
|
} & ({
|
|
5401
5402
|
iconOnly?: false;
|
|
5402
5403
|
icon?: IconKey;
|
|
@@ -7520,6 +7521,7 @@ type ImageFitType = "contain" | "cover";
|
|
|
7520
7521
|
type CardTag = {
|
|
7521
7522
|
text: string;
|
|
7522
7523
|
type?: TagType;
|
|
7524
|
+
variant?: TagVariant;
|
|
7523
7525
|
};
|
|
7524
7526
|
type CardProps = {
|
|
7525
7527
|
title: string;
|
|
@@ -8351,6 +8353,7 @@ type InlineFeedbackBannerAction = ActionButtonProps | ({
|
|
|
8351
8353
|
type InlineFeedbackBannerProps = {
|
|
8352
8354
|
type: InlineFeedbackBannerType;
|
|
8353
8355
|
tagText?: TagProps<any>["text"];
|
|
8356
|
+
tagVariant?: TagVariant;
|
|
8354
8357
|
description: ReactNode;
|
|
8355
8358
|
/** Rendered in order, always as text buttons (menu triggers included). */
|
|
8356
8359
|
actions?: InlineFeedbackBannerAction[];
|
package/dist/index.js
CHANGED
|
@@ -13051,6 +13051,27 @@ function getVariantStyles(variant, type) {
|
|
|
13051
13051
|
}
|
|
13052
13052
|
};
|
|
13053
13053
|
}
|
|
13054
|
+
if (variant === "bold") {
|
|
13055
|
+
return {
|
|
13056
|
+
background: {
|
|
13057
|
+
...getBoldBackground(type),
|
|
13058
|
+
...{
|
|
13059
|
+
color: "white"
|
|
13060
|
+
}
|
|
13061
|
+
},
|
|
13062
|
+
iconColor: "rgba(255, 255, 255, 1)" /* White */,
|
|
13063
|
+
typography: {
|
|
13064
|
+
fontWeight: "fw6",
|
|
13065
|
+
fontSize: "fz_10px",
|
|
13066
|
+
lineHeight: "lh_14px",
|
|
13067
|
+
textTransform: "ttu"
|
|
13068
|
+
},
|
|
13069
|
+
padding: {
|
|
13070
|
+
paddingLeft: "pl_6px",
|
|
13071
|
+
paddingRight: "pr_6px"
|
|
13072
|
+
}
|
|
13073
|
+
};
|
|
13074
|
+
}
|
|
13054
13075
|
return {
|
|
13055
13076
|
...getPrimaryStyles(type),
|
|
13056
13077
|
typography: {
|
|
@@ -13065,6 +13086,38 @@ function getVariantStyles(variant, type) {
|
|
|
13065
13086
|
}
|
|
13066
13087
|
};
|
|
13067
13088
|
}
|
|
13089
|
+
function getBoldBackground(type) {
|
|
13090
|
+
switch (type) {
|
|
13091
|
+
case "info":
|
|
13092
|
+
return {
|
|
13093
|
+
backgroundColor: "bgBlue600"
|
|
13094
|
+
};
|
|
13095
|
+
case "update":
|
|
13096
|
+
return {
|
|
13097
|
+
backgroundColor: "bgYellow600"
|
|
13098
|
+
};
|
|
13099
|
+
case "warning":
|
|
13100
|
+
return {
|
|
13101
|
+
backgroundColor: "bgOrange600"
|
|
13102
|
+
};
|
|
13103
|
+
case "error":
|
|
13104
|
+
return {
|
|
13105
|
+
backgroundColor: "bgRed600"
|
|
13106
|
+
};
|
|
13107
|
+
case "success":
|
|
13108
|
+
return {
|
|
13109
|
+
backgroundColor: "bgGreen600"
|
|
13110
|
+
};
|
|
13111
|
+
case "ai":
|
|
13112
|
+
return {
|
|
13113
|
+
backgroundColor: "bgPurple600"
|
|
13114
|
+
};
|
|
13115
|
+
default:
|
|
13116
|
+
return {
|
|
13117
|
+
backgroundColor: "bgGray600"
|
|
13118
|
+
};
|
|
13119
|
+
}
|
|
13120
|
+
}
|
|
13068
13121
|
function getPrimaryStyles(type) {
|
|
13069
13122
|
switch (type) {
|
|
13070
13123
|
case "info":
|
|
@@ -16045,9 +16098,9 @@ function Card(props) {
|
|
|
16045
16098
|
icon: "verticalDots",
|
|
16046
16099
|
color: isList ? "--b-on-surface-muted" /* OnSurfaceMuted */ : "--b-on-primary" /* OnPrimary */
|
|
16047
16100
|
}, items: buttonMenuItems }) }),
|
|
16048
|
-
tag && !isList && /* @__PURE__ */ jsx79("div", { className: "absolute l_1 tp_4px", children: /* @__PURE__ */ jsx79(Tag, { type: tag.type, text: tag.text, ...tid.tag }) }),
|
|
16101
|
+
tag && !isList && /* @__PURE__ */ jsx79("div", { className: "absolute l_1 tp_4px", children: /* @__PURE__ */ jsx79(Tag, { type: tag.type, variant: tag.variant, text: tag.text, ...tid.tag }) }),
|
|
16049
16102
|
/* @__PURE__ */ jsxs51("div", { className: "df fdc aifs g_1", children: [
|
|
16050
|
-
tag && isList && /* @__PURE__ */ jsx79(Tag, { type: tag.type, text: tag.text, ...tid.tag }),
|
|
16103
|
+
tag && isList && /* @__PURE__ */ jsx79(Tag, { type: tag.type, variant: tag.variant, text: tag.text, ...tid.tag }),
|
|
16051
16104
|
/* @__PURE__ */ jsxs51("div", { children: [
|
|
16052
16105
|
/* @__PURE__ */ jsx79("div", { ...trussProps52({
|
|
16053
16106
|
fontWeight: "fw6",
|
|
@@ -19695,6 +19748,7 @@ function InlineFeedbackBanner(props) {
|
|
|
19695
19748
|
const {
|
|
19696
19749
|
type,
|
|
19697
19750
|
tagText,
|
|
19751
|
+
tagVariant,
|
|
19698
19752
|
description,
|
|
19699
19753
|
actions = []
|
|
19700
19754
|
} = props;
|
|
@@ -19707,10 +19761,12 @@ function InlineFeedbackBanner(props) {
|
|
|
19707
19761
|
const tid = useTestIds(props, "inlineFeedbackBanner");
|
|
19708
19762
|
const tagProps = tagText ? {
|
|
19709
19763
|
type: tagType,
|
|
19764
|
+
variant: tagVariant,
|
|
19710
19765
|
icon,
|
|
19711
19766
|
text: tagText
|
|
19712
19767
|
} : {
|
|
19713
19768
|
type: tagType,
|
|
19769
|
+
variant: tagVariant,
|
|
19714
19770
|
icon,
|
|
19715
19771
|
text: fallbackTagText,
|
|
19716
19772
|
iconOnly: true
|