UNPKG

@anoki/fse-ui

Version:

FSE UI components library

111 lines (110 loc) 3.34 kB
import { j as e } from "./index.es278.js"; import { clsx as o } from "./index.es280.js"; import { ActionIconText as f } from "./index.es9.js"; import './components/ui/NotificationsSettingsHeader/NotificationsSettingsHeader.css';/* empty css */ import { Info as x } from "./index.es171.js"; const n = (a) => `notifications-settings-header-${a}`, u = ({ className: a, showEmail: r = !1, showSms: d = !1, ...c }) => { const s = [ { label: "Categoria notifica", noIcon: !0, isFlex: !0, key: "category", alwaysVisible: !0 }, { label: "SMS", fixedWidth: !0, key: "sms", visible: d, popupInfo: { title: "SMS", description: "SMS come metodo di notifica", isOpen: !1, onClickCloseBtn: () => { }, ariaLabel: "Informazioni SMS" } }, { label: "Email", fixedWidth: !0, key: "email", visible: r, popupInfo: { title: "Email", description: "Email come metodo di notifica", isOpen: !1, onClickCloseBtn: () => { }, ariaLabel: "Informazioni Email" } } ].filter( (i) => i.alwaysVisible || i.visible ); return /* @__PURE__ */ e.jsxs("div", { children: [ /* @__PURE__ */ e.jsx("div", { className: o(a), ...c, children: /* @__PURE__ */ e.jsxs("table", { className: "w-full flex", role: "table", children: [ /* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsx("tr", { className: "w-full flex", children: s.map((i, t) => { const l = n(i.key); return /* @__PURE__ */ e.jsx( "th", { id: l, scope: "col", "aria-colindex": t + 1, "data-column-key": i.key, className: o( "table-header-divider-cell w-full", i.isFlex ? "flex-1" : "flex-none" ), children: /* @__PURE__ */ e.jsx( "div", { className: o( "table__cell--header--content", i.fixedWidth ? "table-header-fixed-width " : "" ), children: /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx( f, { classNameText: "text-grey-black", noIcon: i.noIcon, icon: /* @__PURE__ */ e.jsx(x, {}), textLabel: i.label, iconPosition: "right", popupInfo: i.popupInfo, positionPopUp: s.length === t + 1 ? "left" : "right" } ) }) } ) }, l ); }) }) }), /* @__PURE__ */ e.jsx("tbody", { children: /* @__PURE__ */ e.jsx("tr", { className: "sr-only", children: s.map((i, t) => { const l = n(i.key); return /* @__PURE__ */ e.jsx( "td", { headers: l, "aria-colindex": t + 1 }, `${l}-data` ); }) }) }) ] }) }), /* @__PURE__ */ e.jsx("div", { className: "table-header-divider" }) ] }); }; export { u as NotificationsSettingsHeader, n as notificationsSettingsHeaderId }; //# sourceMappingURL=index.es202.js.map