@trimble-oss/moduswebcomponents
Version:
Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust
16 lines (15 loc) • 790 B
TypeScript
/**
* Injects DaisyUI/Tailwind CSS into a shadow root.
* Note: CSS variables defined at :root automatically inherit into shadow DOM,
* so we only need to inject the class rules and structural CSS.
*
* For theming to work properly in shadow DOM:
* - CSS variables (--modus-wc-*) inherit from the document :root
* - Theme changes via data-theme attribute work automatically globally
*
* Creates a single shared CSSStyleSheet that is reused across all shadow roots.
*
* @param includeComponentStyles When true (used by container components), also injects
* compiled per-component SCSS so slotted children render correctly inside consumer shadow roots.
*/
export declare function ensureDaisyUIInShadow(root: Document | ShadowRoot, includeComponentStyles?: boolean): Promise<void>;