@homebound/beam 3.78.0 → 3.80.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/Css.json +8 -1
- package/dist/index.cjs +108 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +47 -4
- package/dist/index.d.ts +47 -4
- package/dist/index.js +108 -7
- package/dist/index.js.map +1 -1
- package/dist/truss.css +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23,6 +23,8 @@ import {
|
|
|
23
23
|
// src/Css.ts
|
|
24
24
|
import { __invertTrussMediaQuery, trussProps, useRuntimeStyle as _useRuntimeStyle } from "@homebound/truss/runtime";
|
|
25
25
|
var Tokens = /* @__PURE__ */ ((Tokens4) => {
|
|
26
|
+
Tokens4["AiFieldBg"] = "--b-ai-field-bg";
|
|
27
|
+
Tokens4["AiFieldFg"] = "--b-ai-field-fg";
|
|
26
28
|
Tokens4["ButtonCautionDisabledBg"] = "--b-button-caution-disabled-bg";
|
|
27
29
|
Tokens4["ButtonCautionDisabledFg"] = "--b-button-caution-disabled-fg";
|
|
28
30
|
Tokens4["ButtonDangerDisabledBg"] = "--b-button-danger-disabled-bg";
|
|
@@ -76,8 +78,8 @@ var Tokens = /* @__PURE__ */ ((Tokens4) => {
|
|
|
76
78
|
Tokens4["NeutralSurfacePressed"] = "--b-neutral-surface-pressed";
|
|
77
79
|
Tokens4["OnPrimary"] = "--b-on-primary";
|
|
78
80
|
Tokens4["OnSurface"] = "--b-on-surface";
|
|
79
|
-
Tokens4["OnSurfaceMuted"] = "--b-on-surface-muted";
|
|
80
81
|
Tokens4["OnSurfaceDisabled"] = "--b-on-surface-disabled";
|
|
82
|
+
Tokens4["OnSurfaceMuted"] = "--b-on-surface-muted";
|
|
81
83
|
Tokens4["OnSurfaceRaisedHover"] = "--b-on-surface-raised-hover";
|
|
82
84
|
Tokens4["OnSurfaceRaisedPressed"] = "--b-on-surface-raised-pressed";
|
|
83
85
|
Tokens4["Primary"] = "--b-primary";
|
|
@@ -87,11 +89,11 @@ var Tokens = /* @__PURE__ */ ((Tokens4) => {
|
|
|
87
89
|
Tokens4["SelectionFill"] = "--b-selection-fill";
|
|
88
90
|
Tokens4["SelectionIndicator"] = "--b-selection-indicator";
|
|
89
91
|
Tokens4["Surface"] = "--b-surface";
|
|
92
|
+
Tokens4["SurfaceDisabled"] = "--b-surface-disabled";
|
|
90
93
|
Tokens4["SurfaceHover"] = "--b-surface-hover";
|
|
91
94
|
Tokens4["SurfaceRaised"] = "--b-surface-raised";
|
|
92
95
|
Tokens4["SurfaceRaisedHover"] = "--b-surface-raised-hover";
|
|
93
96
|
Tokens4["SurfaceRaisedPressed"] = "--b-surface-raised-pressed";
|
|
94
|
-
Tokens4["SurfaceDisabled"] = "--b-surface-disabled";
|
|
95
97
|
Tokens4["SurfaceSeparator"] = "--b-surface-separator";
|
|
96
98
|
Tokens4["SurfaceSubtle"] = "--b-surface-subtle";
|
|
97
99
|
Tokens4["TextDisabled"] = "--b-text-disabled";
|
|
@@ -143,6 +145,10 @@ var CssBuilder = class _CssBuilder {
|
|
|
143
145
|
get bcTransparent() {
|
|
144
146
|
return this.add("borderColor", "rgba(0,0,0,0)");
|
|
145
147
|
}
|
|
148
|
+
/** Sets `borderColor: "rgba(0, 0, 0, 1)"`. */
|
|
149
|
+
get bcBlack() {
|
|
150
|
+
return this.add("borderColor", "rgba(0, 0, 0, 1)");
|
|
151
|
+
}
|
|
146
152
|
/** Sets `borderColor: "rgba(255, 253, 253, 1)"`. */
|
|
147
153
|
get bcGray50() {
|
|
148
154
|
return this.add("borderColor", "rgba(255, 253, 253, 1)");
|
|
@@ -1803,6 +1809,10 @@ var CssBuilder = class _CssBuilder {
|
|
|
1803
1809
|
get transparent() {
|
|
1804
1810
|
return this.add("color", "rgba(0,0,0,0)");
|
|
1805
1811
|
}
|
|
1812
|
+
/** Sets `color: "rgba(0, 0, 0, 1)"`. */
|
|
1813
|
+
get black() {
|
|
1814
|
+
return this.add("color", "rgba(0, 0, 0, 1)");
|
|
1815
|
+
}
|
|
1806
1816
|
/** Sets `color: "rgba(255, 253, 253, 1)"`. */
|
|
1807
1817
|
get gray50() {
|
|
1808
1818
|
return this.add("color", "rgba(255, 253, 253, 1)");
|
|
@@ -2095,6 +2105,10 @@ var CssBuilder = class _CssBuilder {
|
|
|
2095
2105
|
get bgTransparent() {
|
|
2096
2106
|
return this.add("backgroundColor", "rgba(0,0,0,0)");
|
|
2097
2107
|
}
|
|
2108
|
+
/** Sets `backgroundColor: "rgba(0, 0, 0, 1)"`. */
|
|
2109
|
+
get bgBlack() {
|
|
2110
|
+
return this.add("backgroundColor", "rgba(0, 0, 0, 1)");
|
|
2111
|
+
}
|
|
2098
2112
|
/** Sets `backgroundColor: "rgba(255, 253, 253, 1)"`. */
|
|
2099
2113
|
get bgGray50() {
|
|
2100
2114
|
return this.add("backgroundColor", "rgba(255, 253, 253, 1)");
|
|
@@ -2387,6 +2401,10 @@ var CssBuilder = class _CssBuilder {
|
|
|
2387
2401
|
get fTransparent() {
|
|
2388
2402
|
return this.add("fill", "rgba(0,0,0,0)");
|
|
2389
2403
|
}
|
|
2404
|
+
/** Sets `fill: "rgba(0, 0, 0, 1)"`. */
|
|
2405
|
+
get fBlack() {
|
|
2406
|
+
return this.add("fill", "rgba(0, 0, 0, 1)");
|
|
2407
|
+
}
|
|
2390
2408
|
/** Sets `fill: "rgba(255, 253, 253, 1)"`. */
|
|
2391
2409
|
get fGray50() {
|
|
2392
2410
|
return this.add("fill", "rgba(255, 253, 253, 1)");
|
|
@@ -3841,6 +3859,28 @@ var CssBuilder = class _CssBuilder {
|
|
|
3841
3859
|
z(value) {
|
|
3842
3860
|
return this.add("zIndex", value);
|
|
3843
3861
|
}
|
|
3862
|
+
// ai
|
|
3863
|
+
/** Sets `backgroundImage: "radial-gradient(40% 1000% at 35.83% 62.18%, rgba(239, 246, 255, 1) 0%, rgba(237, 233, 254, 1) 100%)"`. */
|
|
3864
|
+
get aiBackground() {
|
|
3865
|
+
return this.add(
|
|
3866
|
+
"backgroundImage",
|
|
3867
|
+
"radial-gradient(40% 1000% at 35.83% 62.18%, rgba(239, 246, 255, 1) 0%, rgba(237, 233, 254, 1) 100%)"
|
|
3868
|
+
);
|
|
3869
|
+
}
|
|
3870
|
+
/** Sets `backgroundImage: "linear-gradient(270deg, rgba(29, 78, 216, 1) 2.97%, rgba(109, 40, 217, 1) 87.08%)"`. */
|
|
3871
|
+
get aiBoldBg() {
|
|
3872
|
+
return this.add(
|
|
3873
|
+
"backgroundImage",
|
|
3874
|
+
"linear-gradient(270deg, rgba(29, 78, 216, 1) 2.97%, rgba(109, 40, 217, 1) 87.08%)"
|
|
3875
|
+
);
|
|
3876
|
+
}
|
|
3877
|
+
/** Sets `color: "rgba(109, 40, 217, 1)"; backgroundImage: "linear-gradient(270deg, rgba(29, 78, 216, 1) 2.97%, rgba(109, 40, 217, 1) 87.08%)"; backgroundClip: "text"; WebkitBackgroundClip: "text"; WebkitTextFillColor: "transparent"`. */
|
|
3878
|
+
get aiBoldText() {
|
|
3879
|
+
return this.add("color", "rgba(109, 40, 217, 1)").add(
|
|
3880
|
+
"backgroundImage",
|
|
3881
|
+
"linear-gradient(270deg, rgba(29, 78, 216, 1) 2.97%, rgba(109, 40, 217, 1) 87.08%)"
|
|
3882
|
+
).add("backgroundClip", "text").add("WebkitBackgroundClip", "text").add("WebkitTextFillColor", "transparent");
|
|
3883
|
+
}
|
|
3844
3884
|
// fontFamily
|
|
3845
3885
|
/** Sets `fontFamily: "'Inter', sans-serif"`. */
|
|
3846
3886
|
get sansSerif() {
|
|
@@ -4121,6 +4161,7 @@ function omitUndefinedValues(value) {
|
|
|
4121
4161
|
var Palette = /* @__PURE__ */ ((Palette2) => {
|
|
4122
4162
|
Palette2["White"] = "rgba(255, 255, 255, 1)";
|
|
4123
4163
|
Palette2["Transparent"] = "rgba(0,0,0,0)";
|
|
4164
|
+
Palette2["Black"] = "rgba(0, 0, 0, 1)";
|
|
4124
4165
|
Palette2["Gray50"] = "rgba(255, 253, 253, 1)";
|
|
4125
4166
|
Palette2["Gray100"] = "rgba(247, 245, 245, 1)";
|
|
4126
4167
|
Palette2["Gray200"] = "rgba(236, 235, 235, 1)";
|
|
@@ -10321,6 +10362,37 @@ function getButtonStyles(variant, size) {
|
|
|
10321
10362
|
};
|
|
10322
10363
|
}
|
|
10323
10364
|
var variantStyles2 = {
|
|
10365
|
+
// Design applies their "AI Bold" ramp to the existing primary button. They haven't specified
|
|
10366
|
+
// hover/pressed/disabled, so those ramps are extrapolated from it rather than design-sourced.
|
|
10367
|
+
ai: {
|
|
10368
|
+
baseStyles: {
|
|
10369
|
+
backgroundImage: "aiBoldBg",
|
|
10370
|
+
color: ["color_var", {
|
|
10371
|
+
"--color": "var(--b-on-primary)"
|
|
10372
|
+
}]
|
|
10373
|
+
},
|
|
10374
|
+
hoverStyles: {
|
|
10375
|
+
backgroundImage: ["backgroundImage_var", {
|
|
10376
|
+
"--backgroundImage": maybeCssVar14(`linear-gradient(270deg, ${"rgba(30, 64, 175, 1)" /* Blue800 */}, ${"rgba(91, 33, 182, 1)" /* Purple800 */})`)
|
|
10377
|
+
}]
|
|
10378
|
+
},
|
|
10379
|
+
pressedStyles: {
|
|
10380
|
+
backgroundImage: ["backgroundImage_var", {
|
|
10381
|
+
"--backgroundImage": maybeCssVar14(`linear-gradient(270deg, ${"rgba(30, 58, 138, 1)" /* Blue900 */}, ${"rgba(76, 29, 149, 1)" /* Purple900 */})`)
|
|
10382
|
+
}]
|
|
10383
|
+
},
|
|
10384
|
+
disabledStyles: {
|
|
10385
|
+
backgroundImage: ["backgroundImage_var", {
|
|
10386
|
+
"--backgroundImage": maybeCssVar14(`linear-gradient(270deg, ${"rgba(191, 219, 254, 1)" /* Blue200 */}, ${"rgba(221, 214, 254, 1)" /* Purple200 */})`)
|
|
10387
|
+
}],
|
|
10388
|
+
color: ["color_var", {
|
|
10389
|
+
"--color": "var(--b-button-primary-disabled-fg)"
|
|
10390
|
+
}]
|
|
10391
|
+
},
|
|
10392
|
+
focusStyles: {
|
|
10393
|
+
boxShadow: "bshFocus"
|
|
10394
|
+
}
|
|
10395
|
+
},
|
|
10324
10396
|
primary: {
|
|
10325
10397
|
baseStyles: {
|
|
10326
10398
|
backgroundColor: ["bgColor_var", {
|
|
@@ -14926,6 +14998,7 @@ function GridSelectCard(props) {
|
|
|
14926
14998
|
layout,
|
|
14927
14999
|
label,
|
|
14928
15000
|
description,
|
|
15001
|
+
tag,
|
|
14929
15002
|
selected: isSelected = false,
|
|
14930
15003
|
disabled: isDisabled = false,
|
|
14931
15004
|
tooltip,
|
|
@@ -14946,6 +15019,12 @@ function GridSelectCard(props) {
|
|
|
14946
15019
|
} : {}
|
|
14947
15020
|
}), ...tid.img }) : icon && /* @__PURE__ */ jsx76(Icon, { icon, inc: 4, color: isDisabled ? "--b-on-surface-disabled" /* OnSurfaceDisabled */ : "--b-on-surface" /* OnSurface */ }),
|
|
14948
15021
|
/* @__PURE__ */ jsxs43("span", { className: "df fdc gap_4px w100", children: [
|
|
15022
|
+
tag && /* @__PURE__ */ jsx76("span", { ...trussProps51({
|
|
15023
|
+
display: "df",
|
|
15024
|
+
...layout !== "horizontal" ? {
|
|
15025
|
+
justifyContent: "jcc"
|
|
15026
|
+
} : {}
|
|
15027
|
+
}), children: /* @__PURE__ */ jsx76(Tag, { type: tag.type, text: tag.text, ...tid.tag }) }),
|
|
14949
15028
|
/* @__PURE__ */ jsx76("span", { ...trussProps51({
|
|
14950
15029
|
fontWeight: "fw6",
|
|
14951
15030
|
fontSize: "fz_14px",
|
|
@@ -15015,6 +15094,7 @@ function ListSelectCard(props) {
|
|
|
15015
15094
|
const {
|
|
15016
15095
|
label,
|
|
15017
15096
|
description,
|
|
15097
|
+
tag,
|
|
15018
15098
|
selected: isSelected = false,
|
|
15019
15099
|
disabled: isDisabled = false,
|
|
15020
15100
|
tooltip,
|
|
@@ -15044,7 +15124,8 @@ function ListSelectCard(props) {
|
|
|
15044
15124
|
"--color": "var(--b-field-text-disabled)"
|
|
15045
15125
|
}]
|
|
15046
15126
|
} : {}
|
|
15047
|
-
}), children: label })
|
|
15127
|
+
}), children: label }),
|
|
15128
|
+
tag && /* @__PURE__ */ jsx78(Tag, { type: tag.type, text: tag.text, ...tid.tag })
|
|
15048
15129
|
] }),
|
|
15049
15130
|
description && /* @__PURE__ */ jsx78("span", { ...trussProps53({
|
|
15050
15131
|
marginLeft: "ml3",
|
|
@@ -15067,7 +15148,7 @@ function ListSelectCard(props) {
|
|
|
15067
15148
|
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
15068
15149
|
function SelectCardCheckboxGroupItem(props) {
|
|
15069
15150
|
const { option, groupState, isSelected, view, layout, ...others } = props;
|
|
15070
|
-
const { label, description, disabled, tooltip, value } = option;
|
|
15151
|
+
const { label, description, tag, disabled, tooltip, value } = option;
|
|
15071
15152
|
const ref = useRef32(null);
|
|
15072
15153
|
const { inputProps, isDisabled: isOptionDisabled } = useCheckboxGroupItem2(
|
|
15073
15154
|
{ value: valueToKey(value), "aria-label": label, isDisabled: disabled ?? false },
|
|
@@ -15076,6 +15157,7 @@ function SelectCardCheckboxGroupItem(props) {
|
|
|
15076
15157
|
);
|
|
15077
15158
|
const layoutProps = {
|
|
15078
15159
|
label,
|
|
15160
|
+
tag,
|
|
15079
15161
|
description,
|
|
15080
15162
|
selected: isSelected,
|
|
15081
15163
|
disabled: isOptionDisabled,
|
|
@@ -15087,7 +15169,16 @@ function SelectCardCheckboxGroupItem(props) {
|
|
|
15087
15169
|
return /* @__PURE__ */ jsx79(ListSelectCard, { ...layoutProps });
|
|
15088
15170
|
}
|
|
15089
15171
|
const gridOption = option;
|
|
15090
|
-
return /* @__PURE__ */ jsx79(
|
|
15172
|
+
return /* @__PURE__ */ jsx79(
|
|
15173
|
+
GridSelectCard,
|
|
15174
|
+
{
|
|
15175
|
+
...layoutProps,
|
|
15176
|
+
layout,
|
|
15177
|
+
icon: gridOption.icon,
|
|
15178
|
+
image: gridOption.image,
|
|
15179
|
+
tag: gridOption.tag
|
|
15180
|
+
}
|
|
15181
|
+
);
|
|
15091
15182
|
}
|
|
15092
15183
|
|
|
15093
15184
|
// src/inputs/SelectCard/utils.ts
|
|
@@ -15198,7 +15289,7 @@ import { useRadio as useRadio2 } from "react-aria";
|
|
|
15198
15289
|
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
15199
15290
|
function SelectCardRadioGroupItem(props) {
|
|
15200
15291
|
const { option, groupState, isSelected, view, layout, ...others } = props;
|
|
15201
|
-
const { label, description, disabled, tooltip, value } = option;
|
|
15292
|
+
const { label, description, tag, disabled, tooltip, value } = option;
|
|
15202
15293
|
const ref = useRef33(null);
|
|
15203
15294
|
const { inputProps, isDisabled: isOptionDisabled } = useRadio2(
|
|
15204
15295
|
{ value: valueToKey(value), "aria-label": label, isDisabled: disabled ?? false },
|
|
@@ -15207,6 +15298,7 @@ function SelectCardRadioGroupItem(props) {
|
|
|
15207
15298
|
);
|
|
15208
15299
|
const layoutProps = {
|
|
15209
15300
|
label,
|
|
15301
|
+
tag,
|
|
15210
15302
|
description,
|
|
15211
15303
|
selected: isSelected,
|
|
15212
15304
|
disabled: isOptionDisabled,
|
|
@@ -15218,7 +15310,16 @@ function SelectCardRadioGroupItem(props) {
|
|
|
15218
15310
|
return /* @__PURE__ */ jsx81(ListSelectCard, { ...layoutProps });
|
|
15219
15311
|
}
|
|
15220
15312
|
const gridOption = option;
|
|
15221
|
-
return /* @__PURE__ */ jsx81(
|
|
15313
|
+
return /* @__PURE__ */ jsx81(
|
|
15314
|
+
GridSelectCard,
|
|
15315
|
+
{
|
|
15316
|
+
...layoutProps,
|
|
15317
|
+
layout,
|
|
15318
|
+
icon: gridOption.icon,
|
|
15319
|
+
image: gridOption.image,
|
|
15320
|
+
tag: gridOption.tag
|
|
15321
|
+
}
|
|
15322
|
+
);
|
|
15222
15323
|
}
|
|
15223
15324
|
|
|
15224
15325
|
// src/inputs/SelectCard/SelectCardGroup.tsx
|