@salemcobalt/ui 0.2.0-rc.18 → 0.2.0-rc.19
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.d.ts +5 -2
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1013,8 +1013,11 @@ declare function Item({ icon, trailing, tone, className, children, ...rest }: Me
|
|
|
1013
1013
|
interface MenuLinkItemProps extends Omit<Menu$1.LinkItem.Props, 'className'>, ItemSlots {
|
|
1014
1014
|
className?: string | undefined;
|
|
1015
1015
|
}
|
|
1016
|
-
/**
|
|
1017
|
-
|
|
1016
|
+
/**
|
|
1017
|
+
* An item that navigates: renders an `<a href>`. Closes the menu when chosen, like `Menu.Item`: with client-side
|
|
1018
|
+
* routing the page stays mounted, so an open menu would sit over the new page. Pass `closeOnClick={false}` to keep it.
|
|
1019
|
+
*/
|
|
1020
|
+
declare function LinkItem({ icon, trailing, tone, className, closeOnClick, children, ...rest }: MenuLinkItemProps): react.JSX.Element;
|
|
1018
1021
|
interface MenuCheckboxItemProps extends Omit<Menu$1.CheckboxItem.Props, 'className' | 'onCheckedChange'> {
|
|
1019
1022
|
/** Called with the next checked state. */
|
|
1020
1023
|
onCheckedChange?: ((checked: boolean) => void) | undefined;
|
package/dist/index.js
CHANGED
|
@@ -710,8 +710,25 @@ function ItemBody({
|
|
|
710
710
|
function Item({ icon, trailing, tone = "default", className, children, ...rest }) {
|
|
711
711
|
return /* @__PURE__ */ jsx9(BaseMenu.Item, { className: cx("sc-menu__item", className), "data-tone": tone, ...rest, children: /* @__PURE__ */ jsx9(ItemBody, { icon, trailing, children }) });
|
|
712
712
|
}
|
|
713
|
-
function LinkItem({
|
|
714
|
-
|
|
713
|
+
function LinkItem({
|
|
714
|
+
icon,
|
|
715
|
+
trailing,
|
|
716
|
+
tone = "default",
|
|
717
|
+
className,
|
|
718
|
+
closeOnClick = true,
|
|
719
|
+
children,
|
|
720
|
+
...rest
|
|
721
|
+
}) {
|
|
722
|
+
return /* @__PURE__ */ jsx9(
|
|
723
|
+
BaseMenu.LinkItem,
|
|
724
|
+
{
|
|
725
|
+
className: cx("sc-menu__item", className),
|
|
726
|
+
"data-tone": tone,
|
|
727
|
+
closeOnClick,
|
|
728
|
+
...rest,
|
|
729
|
+
children: /* @__PURE__ */ jsx9(ItemBody, { icon, trailing, children })
|
|
730
|
+
}
|
|
731
|
+
);
|
|
715
732
|
}
|
|
716
733
|
function CheckboxItem({ trailing, onCheckedChange, className, children, ...rest }) {
|
|
717
734
|
return /* @__PURE__ */ jsxs8(
|