@homebound/beam 3.106.0 → 3.107.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 +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -6938,6 +6938,8 @@ type MenuItemBase = {
|
|
|
6938
6938
|
disabled?: boolean | ReactNode;
|
|
6939
6939
|
destructive?: boolean;
|
|
6940
6940
|
hasDivider?: boolean;
|
|
6941
|
+
/** Shows AiStar and styling on label. This ai icon and styling trumps all other subtypes. */
|
|
6942
|
+
ai?: boolean;
|
|
6941
6943
|
};
|
|
6942
6944
|
type IconMenuItemType = MenuItemBase & {
|
|
6943
6945
|
icon: IconProps["icon"];
|
package/dist/index.d.ts
CHANGED
|
@@ -6938,6 +6938,8 @@ type MenuItemBase = {
|
|
|
6938
6938
|
disabled?: boolean | ReactNode;
|
|
6939
6939
|
destructive?: boolean;
|
|
6940
6940
|
hasDivider?: boolean;
|
|
6941
|
+
/** Shows AiStar and styling on label. This ai icon and styling trumps all other subtypes. */
|
|
6942
|
+
ai?: boolean;
|
|
6941
6943
|
};
|
|
6942
6944
|
type IconMenuItemType = MenuItemBase & {
|
|
6943
6945
|
icon: IconProps["icon"];
|
package/dist/index.js
CHANGED
|
@@ -11375,7 +11375,7 @@ function MenuItemImpl(props) {
|
|
|
11375
11375
|
}
|
|
11376
11376
|
function renderMenuItem(menuItem, isSelected, isDisabled) {
|
|
11377
11377
|
return /* @__PURE__ */ jsxs27("div", { className: "df w100 aic jcsb gap2", children: [
|
|
11378
|
-
/* @__PURE__ */ jsx44("div", { className: "df aic", children: maybeWrapInLink(menuItem.onClick, isIconMenuItem(menuItem) ? /* @__PURE__ */ jsx44(IconMenuItem, { ...menuItem }) : isImageMenuItem(menuItem) ? /* @__PURE__ */ jsx44(ImageMenuItem, { ...menuItem }) : menuItem.label, isDisabled) }),
|
|
11378
|
+
/* @__PURE__ */ jsx44("div", { className: "df aic", children: maybeWrapInLink(menuItem.onClick, menuItem.ai ? /* @__PURE__ */ jsx44(AiMenuItem, { label: menuItem.label, isDisabled }) : isIconMenuItem(menuItem) ? /* @__PURE__ */ jsx44(IconMenuItem, { ...menuItem }) : isImageMenuItem(menuItem) ? /* @__PURE__ */ jsx44(ImageMenuItem, { ...menuItem }) : menuItem.label, isDisabled) }),
|
|
11379
11379
|
isSelected && /* @__PURE__ */ jsx44(Icon, { icon: "check", color: isDisabled ? "--b-text-disabled" /* TextDisabled */ : "--b-selection-indicator" /* SelectionIndicator */ })
|
|
11380
11380
|
] });
|
|
11381
11381
|
}
|
|
@@ -11391,6 +11391,21 @@ function ImageMenuItem(item) {
|
|
|
11391
11391
|
label
|
|
11392
11392
|
] });
|
|
11393
11393
|
}
|
|
11394
|
+
function AiMenuItem({
|
|
11395
|
+
label,
|
|
11396
|
+
isDisabled
|
|
11397
|
+
}) {
|
|
11398
|
+
return /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
11399
|
+
/* @__PURE__ */ jsx44("span", { className: "df aic jcc fs0 h_24px w_24px mr2", children: /* @__PURE__ */ jsx44(Icon, { icon: "aiStar", inc: 2.125 }) }),
|
|
11400
|
+
/* @__PURE__ */ jsx44("span", { ...trussProps32({
|
|
11401
|
+
...!isDisabled ? {
|
|
11402
|
+
color: ["color_var", {
|
|
11403
|
+
"--color": maybeCssVar15("rgba(124, 58, 237, 1)" /* Purple600 */)
|
|
11404
|
+
}]
|
|
11405
|
+
} : {}
|
|
11406
|
+
}), children: label })
|
|
11407
|
+
] });
|
|
11408
|
+
}
|
|
11394
11409
|
function IconMenuItem(item) {
|
|
11395
11410
|
const {
|
|
11396
11411
|
icon,
|