@payfit/unity-components
Version:
40 lines (39 loc) • 1.48 kB
JavaScript
import { forwardRef as e } from "react";
import { uyTv as t } from "@payfit/unity-themes";
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
import { Header as a } from "react-aria-components/Header";
import { Separator as o } from "react-aria-components/Separator";
import { ListBoxSection as s } from "react-aria-components/ListBox";
import { Collection as c } from "react-aria-components/Collection";
//#region src/components/autocomplete/parts/AutocompleteItemGroup.tsx
var l = t({ slots: {
base: "",
header: "uy:text-content-neutral-enabled uy:typography-body-strong uy:pt-100 uy:pb-100 uy:pl-150 uy:pr-150",
separator: "uy:h-[1px] uy:bg-surface-neutral-lowest uy:w-full uy:mb-100 uy:mt-100 uy:[section:last-child_&]:hidden"
} }), u = ({ label: e, children: t, items: u }, d) => {
let { base: f, header: p, separator: m } = l();
return /* @__PURE__ */ i(s, {
ref: d,
className: f(),
id: e,
items: u,
children: [/* @__PURE__ */ r(a, {
className: p(),
children: e
}), u ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(c, {
items: u,
children: t
}), /* @__PURE__ */ r(o, {
orientation: "horizontal",
className: m()
})] }) : /* @__PURE__ */ i(n, { children: [t, /* @__PURE__ */ r(o, {
orientation: "horizontal",
className: m()
})] })]
});
}, d = e(function(e, t) {
return u(e, t);
});
d.displayName = "AutocompleteItemGroup";
//#endregion
export { d as AutocompleteItemGroup, l as autocompleteItemGroup };