@payfit/unity-components
Version:
31 lines (30 loc) • 972 B
JavaScript
import { SelectListOption as e } from "./SelectListOption.js";
import { jsx as t, jsxs as n } from "react/jsx-runtime";
import { Collection as r, Header as i, ListBox as a } from "react-aria-components/ListBox";
//#region src/components/select-list/parts/SelectedItemsSection.tsx
function o({ items: o, selectedKeys: s, onSelectionChange: c, selectionMode: l, selectionBehavior: u, label: d, className: f, ...p }) {
return o.length === 0 ? null : /* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t(i, {
className: "uy:sr-only",
children: d
}), /* @__PURE__ */ t(a, {
"aria-label": d,
className: f,
items: o,
selectedKeys: s,
onSelectionChange: c,
selectionMode: l,
selectionBehavior: u,
escapeKeyBehavior: "none",
shouldFocusWrap: !1,
...p,
children: /* @__PURE__ */ t(r, {
items: o,
children: (n) => /* @__PURE__ */ t(e, {
id: n.id,
children: n.label
})
})
})] });
}
//#endregion
export { o as SelectedItemsSection };