import { AKElement } from "@goauthentik/elements/Base"; import { CSSResult, TemplateResult, css, html } from "lit"; import { customElement, property } from "lit/decorators.js"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; import PFForm from "@patternfly/patternfly/components/Form/form.css"; import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; /** * Form Group * * Mostly visual effects, with a single interaction for opening/closing the view. * */ /** * TODO: Listen for custom events from its children about 'invalidation' events, and * trigger the `expanded` property as needed. */ @customElement("ak-form-group") export class FormGroup extends AKElement { @property({ type: Boolean, reflect: true }) expanded = false; @property({ type: String, attribute: "aria-label", reflect: true }) ariaLabel = "Details"; static get styles(): CSSResult[] { return [ PFBase, PFForm, PFButton, PFFormControl, css` slot[name="body"][hidden] { display: none !important; } `, ]; } render(): TemplateResult { return html`
`; } }