@mirror-physics/fractal-ui 0.2.0-next.29 → 0.2.0-next.30
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 +28 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +43 -8
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -544,6 +544,7 @@ function Dropdown({
|
|
|
544
544
|
align = "left",
|
|
545
545
|
triggerContent,
|
|
546
546
|
label,
|
|
547
|
+
iconOnly = false,
|
|
547
548
|
noChevron = false,
|
|
548
549
|
size = "md",
|
|
549
550
|
triggerVariant = "outline",
|
|
@@ -624,6 +625,7 @@ function Dropdown({
|
|
|
624
625
|
"fractal-dropdown-trigger",
|
|
625
626
|
`fractal-dropdown-trigger--${size}`,
|
|
626
627
|
`fractal-dropdown-trigger--${triggerVariant}`,
|
|
628
|
+
iconOnly && "fractal-dropdown-trigger--icon-only",
|
|
627
629
|
triggerClassName
|
|
628
630
|
),
|
|
629
631
|
children: [
|
|
@@ -631,7 +633,7 @@ function Dropdown({
|
|
|
631
633
|
selected.icon != null && /* @__PURE__ */ jsx10("span", { className: "fractal-dropdown-icon fractal-dropdown-icon--trigger", children: selected.icon }),
|
|
632
634
|
selected.description != null && (typeof selected.description !== "string" || selected.description !== "") && /* @__PURE__ */ jsx10("span", { className: "fractal-dropdown-selected-text", children: selected.description })
|
|
633
635
|
] }),
|
|
634
|
-
!noChevron && /* @__PURE__ */ jsx10("span", { className: "fractal-dropdown-chevron", "aria-hidden": true, children: /* @__PURE__ */ jsx10(ChevronIcon, { size: size === "sm" ? 14 : 16 }) })
|
|
636
|
+
!noChevron && !iconOnly && /* @__PURE__ */ jsx10("span", { className: "fractal-dropdown-chevron", "aria-hidden": true, children: /* @__PURE__ */ jsx10(ChevronIcon, { size: size === "sm" ? 14 : 16 }) })
|
|
635
637
|
]
|
|
636
638
|
}
|
|
637
639
|
),
|
|
@@ -1388,6 +1390,29 @@ var SidebarBrand = React11.forwardRef(
|
|
|
1388
1390
|
({ className, type = "button", ...props }, ref) => /* @__PURE__ */ jsx20("button", { ref, type, className: cn("fractal-sidebar__brand", className), ...props })
|
|
1389
1391
|
);
|
|
1390
1392
|
SidebarBrand.displayName = "SidebarBrand";
|
|
1393
|
+
function SidebarAccountMenu({
|
|
1394
|
+
name,
|
|
1395
|
+
items,
|
|
1396
|
+
onSelect,
|
|
1397
|
+
triggerLabel = "Account menu",
|
|
1398
|
+
className
|
|
1399
|
+
}) {
|
|
1400
|
+
return /* @__PURE__ */ jsx20(
|
|
1401
|
+
Dropdown,
|
|
1402
|
+
{
|
|
1403
|
+
align: "left",
|
|
1404
|
+
className: cn("fractal-sidebar__account", className),
|
|
1405
|
+
items,
|
|
1406
|
+
onSelect,
|
|
1407
|
+
panelClassName: "fractal-sidebar__account-panel",
|
|
1408
|
+
selectedValue: "",
|
|
1409
|
+
triggerClassName: "fractal-sidebar__account-trigger",
|
|
1410
|
+
triggerContent: /* @__PURE__ */ jsx20("span", { className: "fractal-sidebar__account-name", children: name }),
|
|
1411
|
+
triggerLabel,
|
|
1412
|
+
triggerVariant: "tertiary"
|
|
1413
|
+
}
|
|
1414
|
+
);
|
|
1415
|
+
}
|
|
1391
1416
|
var SidebarNav = React11.forwardRef(
|
|
1392
1417
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx20("nav", { ref, className: cn("fractal-sidebar__nav", className), ...props })
|
|
1393
1418
|
);
|
|
@@ -1695,6 +1720,7 @@ export {
|
|
|
1695
1720
|
SidePanel,
|
|
1696
1721
|
SidePanelGhost,
|
|
1697
1722
|
Sidebar,
|
|
1723
|
+
SidebarAccountMenu,
|
|
1698
1724
|
SidebarBrand,
|
|
1699
1725
|
SidebarFooter,
|
|
1700
1726
|
SidebarGhost,
|