alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
30 lines (28 loc) • 595 B
JavaScript
import "../../chunks/chunk-U5RRZUYZ.js";
// src/input/tabs/Tabs.ts
import {
Field,
section,
type
} from "alinea/core";
import { entries, fromEntries } from "alinea/core/util/Objects";
var TabsSection = class {
constructor(types) {
this.types = types;
this.definition = fromEntries(types.flatMap(entries));
this.fields = fromEntries(
types.flatMap(entries).filter(([key, field]) => Field.isField(field))
);
}
definition;
fields;
};
function tabs(...types) {
return section(new TabsSection(types));
}
var tab = type;
export {
TabsSection,
tab,
tabs
};