@homebound/beam 4.3.1 → 4.5.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 +142 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +145 -25
- package/dist/index.js.map +1 -1
- package/dist/truss.css +23 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5858,10 +5858,10 @@ function Loader({
|
|
|
5858
5858
|
borderWidth: ["bw_var", {
|
|
5859
5859
|
"--borderWidth": (0, import_runtime8.maybeCssVar)(`${borderSize}px`)
|
|
5860
5860
|
}],
|
|
5861
|
-
height: ["
|
|
5861
|
+
height: ["sq_var", {
|
|
5862
5862
|
"--height": `${dimensions}px`
|
|
5863
5863
|
}],
|
|
5864
|
-
width: ["
|
|
5864
|
+
width: ["sq_var", {
|
|
5865
5865
|
"--width": `${dimensions}px`
|
|
5866
5866
|
}],
|
|
5867
5867
|
borderColor: ["bc_var", {
|
|
@@ -6156,8 +6156,8 @@ var variantStyles = {
|
|
|
6156
6156
|
// Blue100/200 hover fills have no semantic tokens — keep palette for those.
|
|
6157
6157
|
base: {
|
|
6158
6158
|
borderRadius: "br100",
|
|
6159
|
-
width: "w_48px",
|
|
6160
6159
|
height: "h_48px",
|
|
6160
|
+
width: "w_48px",
|
|
6161
6161
|
borderColor: ["bc_var", {
|
|
6162
6162
|
"--borderColor": "var(--b-field-border-default)"
|
|
6163
6163
|
}],
|
|
@@ -10564,12 +10564,12 @@ function Avatar({
|
|
|
10564
10564
|
const [showFallback, setShowFallback] = (0, import_react33.useState)(src === void 0);
|
|
10565
10565
|
const styles = {
|
|
10566
10566
|
borderRadius: "br100",
|
|
10567
|
-
|
|
10568
|
-
"--width": `${px2}px`
|
|
10569
|
-
}],
|
|
10570
|
-
height: ["h_var", {
|
|
10567
|
+
height: ["sq_var", {
|
|
10571
10568
|
"--height": `${px2}px`
|
|
10572
10569
|
}],
|
|
10570
|
+
width: ["sq_var", {
|
|
10571
|
+
"--width": `${px2}px`
|
|
10572
|
+
}],
|
|
10573
10573
|
minWidth: ["mw_var", {
|
|
10574
10574
|
"--minWidth": `${px2}px`
|
|
10575
10575
|
}],
|
|
@@ -10686,6 +10686,7 @@ function MenuItemImpl(props) {
|
|
|
10686
10686
|
},
|
|
10687
10687
|
onClose
|
|
10688
10688
|
}, state, ref);
|
|
10689
|
+
const itemTid = useTestIds(tid[defaultTestId(menuItem?.label ?? "item")]);
|
|
10689
10690
|
if (!menuItem) {
|
|
10690
10691
|
return null;
|
|
10691
10692
|
}
|
|
@@ -10751,18 +10752,30 @@ function MenuItemImpl(props) {
|
|
|
10751
10752
|
fontWeight: "fw5"
|
|
10752
10753
|
} : {}
|
|
10753
10754
|
}),
|
|
10754
|
-
...
|
|
10755
|
+
...itemTid,
|
|
10755
10756
|
children: maybeTooltip({
|
|
10756
10757
|
title: resolveTooltip(disabled),
|
|
10757
10758
|
placement: "right",
|
|
10758
|
-
children: renderMenuItem(menuItem, isSelected, isDisabled)
|
|
10759
|
+
children: renderMenuItem(menuItem, isSelected, isDisabled, itemTid)
|
|
10759
10760
|
})
|
|
10760
10761
|
}
|
|
10761
10762
|
);
|
|
10762
10763
|
}
|
|
10763
|
-
function renderMenuItem(menuItem, isSelected, isDisabled) {
|
|
10764
|
+
function renderMenuItem(menuItem, isSelected, isDisabled, itemTid) {
|
|
10765
|
+
const showDescription = menuItem.description != null;
|
|
10766
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { ...(0, import_runtime27.trussProps)(showDescription ? {
|
|
10767
|
+
display: "df",
|
|
10768
|
+
flexDirection: "fdc",
|
|
10769
|
+
width: "w100"
|
|
10770
|
+
} : {
|
|
10771
|
+
display: "df",
|
|
10772
|
+
alignItems: "aic"
|
|
10773
|
+
}), children: [
|
|
10774
|
+
menuItem.ai ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(AiMenuItem, { label: menuItem.label, isDisabled }) : isIconMenuItem(menuItem) ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconMenuItem, { ...menuItem }) : isImageMenuItem(menuItem) ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ImageMenuItem, { ...menuItem }) : menuItem.label,
|
|
10775
|
+
showDescription && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "fw4 fz_10px lh_14px", ...itemTid.description, children: menuItem.description })
|
|
10776
|
+
] });
|
|
10764
10777
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "df w100 aic jcsb gap2", children: [
|
|
10765
|
-
|
|
10778
|
+
maybeWrapInLink(menuItem.onClick, body, isDisabled),
|
|
10766
10779
|
isSelected && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { icon: "check", color: isDisabled ? "--b-text-disabled" /* TextDisabled */ : "--b-selection-indicator" /* SelectionIndicator */ })
|
|
10767
10780
|
] });
|
|
10768
10781
|
}
|
|
@@ -10817,7 +10830,8 @@ function maybeWrapInLink(onClick, content2, disabled) {
|
|
|
10817
10830
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "fs0 ml2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { icon: "linkExternal" }) })
|
|
10818
10831
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_router_dom3.Link, { ...(0, import_runtime27.mergeProps)("navLink", void 0, {
|
|
10819
10832
|
display: "df",
|
|
10820
|
-
alignItems: "aic"
|
|
10833
|
+
alignItems: "aic",
|
|
10834
|
+
width: "w100"
|
|
10821
10835
|
}), to: onClick, children: content2 });
|
|
10822
10836
|
}
|
|
10823
10837
|
function wantsNewTab(e) {
|
|
@@ -11605,7 +11619,8 @@ function Menu(props) {
|
|
|
11605
11619
|
onClose,
|
|
11606
11620
|
searchable,
|
|
11607
11621
|
selectedItem,
|
|
11608
|
-
onChange
|
|
11622
|
+
onChange,
|
|
11623
|
+
header
|
|
11609
11624
|
} = props;
|
|
11610
11625
|
const tree = (0, import_react_stately3.useTreeData)({
|
|
11611
11626
|
initialItems: [items, persistentItems ? persistentItems : []].map((i, idx) => ({
|
|
@@ -11694,6 +11709,18 @@ function Menu(props) {
|
|
|
11694
11709
|
overflow: "h_oa"
|
|
11695
11710
|
}),
|
|
11696
11711
|
children: [
|
|
11712
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { ...(0, import_runtime32.trussProps)({
|
|
11713
|
+
paddingLeft: "pl2",
|
|
11714
|
+
paddingRight: "pr2",
|
|
11715
|
+
paddingTop: "pt_12px",
|
|
11716
|
+
paddingBottom: "pb_12px",
|
|
11717
|
+
borderBottomStyle: "bbs_solid",
|
|
11718
|
+
borderBottomWidth: "bbw_1px",
|
|
11719
|
+
borderColor: ["bc_var", {
|
|
11720
|
+
"--borderColor": "var(--b-surface-separator)"
|
|
11721
|
+
}],
|
|
11722
|
+
minWidth: "mw_240px"
|
|
11723
|
+
}), ...tid.header, children: header }),
|
|
11697
11724
|
searchable && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MenuSearchField, { label: "", value: search, placeholder: "Search...", labelStyle: "inline", onChange: setSearch, ...tid }),
|
|
11698
11725
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("ul", { className: "p_0 m_0 lis_none outline0", ...menuProps, ref: menuRef, ...tid.menu, children: [...state.collection].map((item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MenuSectionImpl, { section: item, state, onClose, ...tid }, item.key)) })
|
|
11699
11726
|
]
|
|
@@ -11824,6 +11851,7 @@ function Button(props) {
|
|
|
11824
11851
|
forceFocusStyles = false,
|
|
11825
11852
|
active = false,
|
|
11826
11853
|
labelInFlight,
|
|
11854
|
+
colorScheme,
|
|
11827
11855
|
...otherProps
|
|
11828
11856
|
} = props;
|
|
11829
11857
|
const asLink = typeof onPress === "string";
|
|
@@ -11875,7 +11903,7 @@ function Button(props) {
|
|
|
11875
11903
|
disabledStyles: disabledStyles3,
|
|
11876
11904
|
pressedStyles: pressedStyles2,
|
|
11877
11905
|
focusStyles: focusStyles2
|
|
11878
|
-
} = (0, import_react41.useMemo)(() => getButtonStyles(variant, size), [variant, size]);
|
|
11906
|
+
} = (0, import_react41.useMemo)(() => getButtonStyles(variant, size, colorScheme), [variant, size, colorScheme]);
|
|
11879
11907
|
const buttonContent = /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
11880
11908
|
icon && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { xss: iconStyles[size], icon }),
|
|
11881
11909
|
labelInFlight && asyncInProgress ? labelInFlight : label,
|
|
@@ -11918,8 +11946,8 @@ function Button(props) {
|
|
|
11918
11946
|
children: getButtonOrLink(buttonContent, onPress, buttonAttrs, openInNew, download)
|
|
11919
11947
|
});
|
|
11920
11948
|
}
|
|
11921
|
-
function getButtonStyles(variant, size) {
|
|
11922
|
-
const styles = variantStyles2[variant];
|
|
11949
|
+
function getButtonStyles(variant, size, colorScheme) {
|
|
11950
|
+
const styles = variant === "secondary" && colorScheme ? colorSchemeStyles[colorScheme] : variantStyles2[variant];
|
|
11923
11951
|
if (variant === "text") {
|
|
11924
11952
|
return styles;
|
|
11925
11953
|
}
|
|
@@ -12275,6 +12303,95 @@ var variantStyles2 = {
|
|
|
12275
12303
|
}
|
|
12276
12304
|
}
|
|
12277
12305
|
};
|
|
12306
|
+
var colorSchemeStyles = {
|
|
12307
|
+
neutral: {
|
|
12308
|
+
baseStyles: {
|
|
12309
|
+
backgroundColor: "bgGray100",
|
|
12310
|
+
borderColor: "bcGray600",
|
|
12311
|
+
borderWidth: "bw1",
|
|
12312
|
+
borderStyle: "bss",
|
|
12313
|
+
color: ["color_var", {
|
|
12314
|
+
"--color": "var(--b-on-surface)"
|
|
12315
|
+
}]
|
|
12316
|
+
},
|
|
12317
|
+
hoverStyles: {
|
|
12318
|
+
backgroundColor: "bgGray200",
|
|
12319
|
+
borderColor: "bcGray700"
|
|
12320
|
+
},
|
|
12321
|
+
pressedStyles: {
|
|
12322
|
+
backgroundColor: "bgGray300",
|
|
12323
|
+
borderColor: "bcGray800"
|
|
12324
|
+
},
|
|
12325
|
+
disabledStyles: {
|
|
12326
|
+
backgroundColor: "bgGray100",
|
|
12327
|
+
borderColor: "bcGray400",
|
|
12328
|
+
color: ["color_var", {
|
|
12329
|
+
"--color": "var(--b-text-link-disabled)"
|
|
12330
|
+
}]
|
|
12331
|
+
},
|
|
12332
|
+
focusStyles: {
|
|
12333
|
+
boxShadow: "bshFocus"
|
|
12334
|
+
}
|
|
12335
|
+
},
|
|
12336
|
+
info: {
|
|
12337
|
+
baseStyles: {
|
|
12338
|
+
backgroundColor: "bgBlue50",
|
|
12339
|
+
borderColor: "bcBlue600",
|
|
12340
|
+
borderWidth: "bw1",
|
|
12341
|
+
borderStyle: "bss",
|
|
12342
|
+
color: ["color_var", {
|
|
12343
|
+
"--color": "var(--b-on-surface)"
|
|
12344
|
+
}]
|
|
12345
|
+
},
|
|
12346
|
+
hoverStyles: {
|
|
12347
|
+
backgroundColor: "bgBlue100",
|
|
12348
|
+
borderColor: "bcBlue700"
|
|
12349
|
+
},
|
|
12350
|
+
pressedStyles: {
|
|
12351
|
+
backgroundColor: "bgBlue200",
|
|
12352
|
+
borderColor: "bcBlue800"
|
|
12353
|
+
},
|
|
12354
|
+
disabledStyles: {
|
|
12355
|
+
backgroundColor: "bgBlue50",
|
|
12356
|
+
borderColor: "bcBlue300",
|
|
12357
|
+
color: ["color_var", {
|
|
12358
|
+
"--color": "var(--b-text-link-disabled)"
|
|
12359
|
+
}]
|
|
12360
|
+
},
|
|
12361
|
+
focusStyles: {
|
|
12362
|
+
boxShadow: "bshFocus"
|
|
12363
|
+
}
|
|
12364
|
+
},
|
|
12365
|
+
success: {
|
|
12366
|
+
baseStyles: {
|
|
12367
|
+
backgroundColor: "bgGreen50",
|
|
12368
|
+
borderColor: "bcGreen600",
|
|
12369
|
+
borderWidth: "bw1",
|
|
12370
|
+
borderStyle: "bss",
|
|
12371
|
+
color: ["color_var", {
|
|
12372
|
+
"--color": "var(--b-on-surface)"
|
|
12373
|
+
}]
|
|
12374
|
+
},
|
|
12375
|
+
hoverStyles: {
|
|
12376
|
+
backgroundColor: "bgGreen100",
|
|
12377
|
+
borderColor: "bcGreen700"
|
|
12378
|
+
},
|
|
12379
|
+
pressedStyles: {
|
|
12380
|
+
backgroundColor: "bgGreen200",
|
|
12381
|
+
borderColor: "bcGreen800"
|
|
12382
|
+
},
|
|
12383
|
+
disabledStyles: {
|
|
12384
|
+
backgroundColor: "bgGreen50",
|
|
12385
|
+
borderColor: "bcGreen300",
|
|
12386
|
+
color: ["color_var", {
|
|
12387
|
+
"--color": "var(--b-text-link-disabled)"
|
|
12388
|
+
}]
|
|
12389
|
+
},
|
|
12390
|
+
focusStyles: {
|
|
12391
|
+
boxShadow: "bshFocus"
|
|
12392
|
+
}
|
|
12393
|
+
}
|
|
12394
|
+
};
|
|
12278
12395
|
var sizeStyles = {
|
|
12279
12396
|
sm: {
|
|
12280
12397
|
height: "h_32px",
|
|
@@ -12634,7 +12751,7 @@ function labelOr(trigger, fallback) {
|
|
|
12634
12751
|
// src/components/ButtonMenu.tsx
|
|
12635
12752
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
12636
12753
|
function ButtonMenu(props) {
|
|
12637
|
-
const { defaultOpen, disabled, items, persistentItems, trigger, searchable } = props;
|
|
12754
|
+
const { defaultOpen, disabled, items, persistentItems, trigger, searchable, header } = props;
|
|
12638
12755
|
let selectedItem, onChange;
|
|
12639
12756
|
if (isSelectionButtonMenuProps(props)) {
|
|
12640
12757
|
selectedItem = props.selectedItem;
|
|
@@ -12657,6 +12774,7 @@ function ButtonMenu(props) {
|
|
|
12657
12774
|
searchable,
|
|
12658
12775
|
selectedItem,
|
|
12659
12776
|
onChange,
|
|
12777
|
+
header,
|
|
12660
12778
|
...tid
|
|
12661
12779
|
}
|
|
12662
12780
|
) });
|
|
@@ -15233,8 +15351,8 @@ function Day(props) {
|
|
|
15233
15351
|
...(0, import_runtime56.trussProps)({
|
|
15234
15352
|
position: "absolute",
|
|
15235
15353
|
bottom: "bot_4px",
|
|
15236
|
-
width: "w_4px",
|
|
15237
15354
|
height: "h_4px",
|
|
15355
|
+
width: "w_4px",
|
|
15238
15356
|
backgroundColor: ["bgColor_var", {
|
|
15239
15357
|
"--backgroundColor": "var(--b-primary)"
|
|
15240
15358
|
}],
|
|
@@ -25963,9 +26081,9 @@ function StepIcon({
|
|
|
25963
26081
|
if (state === "complete") {
|
|
25964
26082
|
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(Icon, { icon: "check" });
|
|
25965
26083
|
}
|
|
25966
|
-
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "w_24px
|
|
25967
|
-
width: "w_10px",
|
|
26084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "h_24px w_24px df aic jcc", children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { ...(0, import_runtime128.trussProps)({
|
|
25968
26085
|
height: "h_10px",
|
|
26086
|
+
width: "w_10px",
|
|
25969
26087
|
borderStyle: "bss",
|
|
25970
26088
|
borderWidth: "bw2",
|
|
25971
26089
|
borderRadius: "br100",
|
|
@@ -28920,9 +29038,11 @@ function PageHeader2(props) {
|
|
|
28920
29038
|
...otherProps
|
|
28921
29039
|
} = props;
|
|
28922
29040
|
const tid = useTestIds(otherProps, "header");
|
|
28923
|
-
|
|
29041
|
+
const hasActions = !!actions && actions.length > 0;
|
|
29042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(BaseHeader, { ...otherProps, rightSlot: /* @__PURE__ */ (0, import_jsx_runtime231.jsxs)("div", { className: "df gap1 fs0", ...tid.actions, children: [
|
|
29043
|
+
/* @__PURE__ */ (0, import_jsx_runtime231.jsx)(AutoSaveIndicator, { hideOnIdle: true }),
|
|
28924
29044
|
rightSlot,
|
|
28925
|
-
|
|
29045
|
+
hasActions && /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(HeaderActions, { actions, collapseOnSm: true })
|
|
28926
29046
|
] }), bottomSlot: tabs && /* @__PURE__ */ (0, import_jsx_runtime231.jsx)("div", { ...(0, import_runtime151.trussProps)(pageContentPaddingX), children: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(Tabs, { ...tabs, ...tid.tabs }) }) });
|
|
28927
29047
|
}
|
|
28928
29048
|
|