UNPKG

@anoki/fse-ui

Version:

FSE UI components library

112 lines (111 loc) 3.36 kB
import { j as e } from "./index.es237.js"; import { clsx as o } from "./index.es239.js"; import { ActionIconText as f } from "./index.es18.js"; import './components/ui/NotificationsSettingsHeader/NotificationsSettingsHeader.css';/* empty css */ import { Info as x } from "./index.es208.js"; const n = (t) => `notifications-settings-header-${t}`, I = ({ className: t, 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(t), ...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, a) => { const l = n(i.key); return /* @__PURE__ */ e.jsx( "th", { id: l, scope: "col", "aria-colindex": a + 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 === a + 1 ? "left" : "right" } ) }) } ) }, l ); }) }) }), /* @__PURE__ */ e.jsx("tbody", { children: /* @__PURE__ */ e.jsx("tr", { className: "sr-only", children: s.map((i, a) => { const l = n(i.key); return /* @__PURE__ */ e.jsx( "td", { headers: l, "aria-colindex": a + 1 }, `${l}-data` ); }) }) }) ] }) }), /* @__PURE__ */ e.jsx("div", { className: "table-header-divider" }) ] }); }; export { I as NotificationsSettingsHeader, I as default, n as notificationsSettingsHeaderId }; //# sourceMappingURL=index.es112.js.map