@payfit/unity-components
Version:
38 lines (37 loc) • 1.4 kB
JavaScript
import { uyTv as e } from "@payfit/unity-themes";
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
import { Header as i } from "react-aria-components/Header";
import { Separator as a } from "react-aria-components/Separator";
import { ListBoxSection as o } from "react-aria-components/ListBox";
import { Collection as s } from "react-aria-components/Collection";
//#region src/components/multi-select/parts/MultiSelectOptGroup.tsx
var c = e({ slots: {
base: "uy:flex uy:flex-col uy:bg-surface-neutral",
label: "uy:px-150 uy:py-100 uy:typography-body-strong uy:text-content-neutral",
separator: "uy:my-100 uy:border-t uy:border-border-neutral uy:border-solid"
} });
function l(e) {
return "items" in e && Array.isArray(e.items) && typeof e.children == "function";
}
function u(e) {
let { base: u, label: d, separator: f } = c(), { label: p, withSeparator: m, className: h, ...g } = e;
return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r(o, {
...g,
id: p,
className: u({ className: h }),
children: [/* @__PURE__ */ n(i, {
className: d(),
children: p
}), l(e) ? /* @__PURE__ */ n(s, {
items: e.items,
children: e.children
}) : e.children]
}), m && /* @__PURE__ */ n(a, {
orientation: "horizontal",
className: f(),
"aria-hidden": !0
})] });
}
u.displayName = "MultiSelectOptGroup";
//#endregion
export { u as MultiSelectOptGroup };