/** * Copyright 2026 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ import { CSSResultGroup } from '@spectrum-web-components/base'; import { Color, FragmentName, FragmentType, ProvideLang, Scale, SettableFragmentTypes, ShadowRootWithAdoptedStyleSheets, SystemVariant, ThemeFragmentMap, ThemeKindProvider } from './theme-interfaces.js'; export type { ProvideLang, ThemeFragmentMap, Color, Scale, SystemVariant }; /** * @element sp-theme * @attr {string} [lang=""] - The language of the content scoped to this `sp-theme` element, see: MDN reference. * * @slot - Content on which to apply the CSS Custom Properties defined by the current theme configuration */ export declare class Theme extends HTMLElement implements ThemeKindProvider { private static themeFragmentsByKind; private static defaultFragments; private static templateElement?; private static instances; static VERSION: string; static CORE_VERSION: string; static get observedAttributes(): string[]; protected attributeChangedCallback(attrName: SettableFragmentTypes | 'lang', old: string | null, value: string | null): void; private requestUpdate; shadowRoot: ShadowRootWithAdoptedStyleSheets; private _system; /** * The Spectrum system that is applied to the content scoped to this `sp-theme` element. * * A value is required. * * @type {"spectrum" | "express" } * @attr */ get system(): SystemVariant | ''; set system(newValue: SystemVariant | ''); private _color; /** * The Spectrum color stops to apply to content scoped by this `sp-theme` element. * * A value is required. * * @type {"lightest" | "light" | "dark" | "darkest" | ""} * @attr */ get color(): Color | ''; set color(newValue: Color | ''); private _scale; /** * The Spectrum platform scale to apply to content scoped by this `sp-theme` element. * * A value is required. * * @type {"medium" | "large" | ""} * @attr */ get scale(): Scale | ''; set scale(newValue: Scale | ''); private get styles(); private static get template(); constructor(); private _systemContextConsumers; private _handleSystemContext; updateComplete: Promise; private __resolve; private __createDeferredPromise; protected connectedCallback(): void; protected disconnectedCallback(): void; private _updateRequested; private shouldAdoptStyles; protected adoptStyles(): void; static registerThemeFragment(name: FragmentName, kind: FragmentType, styles: CSSResultGroup): void; private _contextConsumers; private _provideContext; private _provideSystemContext; private _handleContextPresence; }