@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.cjs
CHANGED
|
@@ -78,6 +78,7 @@ __export(index_exports, {
|
|
|
78
78
|
SidePanel: () => SidePanel,
|
|
79
79
|
SidePanelGhost: () => SidePanelGhost,
|
|
80
80
|
Sidebar: () => Sidebar,
|
|
81
|
+
SidebarAccountMenu: () => SidebarAccountMenu,
|
|
81
82
|
SidebarBrand: () => SidebarBrand,
|
|
82
83
|
SidebarFooter: () => SidebarFooter,
|
|
83
84
|
SidebarGhost: () => SidebarGhost,
|
|
@@ -647,6 +648,7 @@ function Dropdown({
|
|
|
647
648
|
align = "left",
|
|
648
649
|
triggerContent,
|
|
649
650
|
label,
|
|
651
|
+
iconOnly = false,
|
|
650
652
|
noChevron = false,
|
|
651
653
|
size = "md",
|
|
652
654
|
triggerVariant = "outline",
|
|
@@ -727,6 +729,7 @@ function Dropdown({
|
|
|
727
729
|
"fractal-dropdown-trigger",
|
|
728
730
|
`fractal-dropdown-trigger--${size}`,
|
|
729
731
|
`fractal-dropdown-trigger--${triggerVariant}`,
|
|
732
|
+
iconOnly && "fractal-dropdown-trigger--icon-only",
|
|
730
733
|
triggerClassName
|
|
731
734
|
),
|
|
732
735
|
children: [
|
|
@@ -734,7 +737,7 @@ function Dropdown({
|
|
|
734
737
|
selected.icon != null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "fractal-dropdown-icon fractal-dropdown-icon--trigger", children: selected.icon }),
|
|
735
738
|
selected.description != null && (typeof selected.description !== "string" || selected.description !== "") && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "fractal-dropdown-selected-text", children: selected.description })
|
|
736
739
|
] }),
|
|
737
|
-
!noChevron && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "fractal-dropdown-chevron", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChevronIcon, { size: size === "sm" ? 14 : 16 }) })
|
|
740
|
+
!noChevron && !iconOnly && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "fractal-dropdown-chevron", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChevronIcon, { size: size === "sm" ? 14 : 16 }) })
|
|
738
741
|
]
|
|
739
742
|
}
|
|
740
743
|
),
|
|
@@ -1491,6 +1494,29 @@ var SidebarBrand = React11.forwardRef(
|
|
|
1491
1494
|
({ className, type = "button", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { ref, type, className: cn("fractal-sidebar__brand", className), ...props })
|
|
1492
1495
|
);
|
|
1493
1496
|
SidebarBrand.displayName = "SidebarBrand";
|
|
1497
|
+
function SidebarAccountMenu({
|
|
1498
|
+
name,
|
|
1499
|
+
items,
|
|
1500
|
+
onSelect,
|
|
1501
|
+
triggerLabel = "Account menu",
|
|
1502
|
+
className
|
|
1503
|
+
}) {
|
|
1504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1505
|
+
Dropdown,
|
|
1506
|
+
{
|
|
1507
|
+
align: "left",
|
|
1508
|
+
className: cn("fractal-sidebar__account", className),
|
|
1509
|
+
items,
|
|
1510
|
+
onSelect,
|
|
1511
|
+
panelClassName: "fractal-sidebar__account-panel",
|
|
1512
|
+
selectedValue: "",
|
|
1513
|
+
triggerClassName: "fractal-sidebar__account-trigger",
|
|
1514
|
+
triggerContent: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "fractal-sidebar__account-name", children: name }),
|
|
1515
|
+
triggerLabel,
|
|
1516
|
+
triggerVariant: "tertiary"
|
|
1517
|
+
}
|
|
1518
|
+
);
|
|
1519
|
+
}
|
|
1494
1520
|
var SidebarNav = React11.forwardRef(
|
|
1495
1521
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("nav", { ref, className: cn("fractal-sidebar__nav", className), ...props })
|
|
1496
1522
|
);
|
|
@@ -1799,6 +1825,7 @@ function Pagination({
|
|
|
1799
1825
|
SidePanel,
|
|
1800
1826
|
SidePanelGhost,
|
|
1801
1827
|
Sidebar,
|
|
1828
|
+
SidebarAccountMenu,
|
|
1802
1829
|
SidebarBrand,
|
|
1803
1830
|
SidebarFooter,
|
|
1804
1831
|
SidebarGhost,
|