@openelement/ui 0.41.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +78 -0
- package/package.json +142 -0
- package/src/daisy-classes.d.ts +7 -0
- package/src/daisy-classes.js +770 -0
- package/src/index.d.ts +57 -0
- package/src/index.js +62 -0
- package/src/manifest.d.ts +8 -0
- package/src/manifest.js +255 -0
- package/src/open-badge.d.ts +15 -0
- package/src/open-badge.js +88 -0
- package/src/open-brand-mark.d.ts +14 -0
- package/src/open-brand-mark.js +107 -0
- package/src/open-button.d.ts +38 -0
- package/src/open-button.js +219 -0
- package/src/open-callout.d.ts +26 -0
- package/src/open-callout.js +99 -0
- package/src/open-card.d.ts +33 -0
- package/src/open-card.js +107 -0
- package/src/open-code-block.d.ts +44 -0
- package/src/open-code-block.js +267 -0
- package/src/open-dialog.d.ts +47 -0
- package/src/open-dialog.js +235 -0
- package/src/open-dropdown.d.ts +25 -0
- package/src/open-dropdown.js +45 -0
- package/src/open-hero-ping.d.ts +27 -0
- package/src/open-hero-ping.js +136 -0
- package/src/open-input.d.ts +51 -0
- package/src/open-input.js +233 -0
- package/src/open-lab-panel.d.ts +16 -0
- package/src/open-lab-panel.js +151 -0
- package/src/open-lab-stage.d.ts +15 -0
- package/src/open-lab-stage.js +622 -0
- package/src/open-layout.d.ts +111 -0
- package/src/open-layout.js +1377 -0
- package/src/open-modal.d.ts +25 -0
- package/src/open-modal.js +48 -0
- package/src/open-props-tokens.d.ts +7 -0
- package/src/open-props-tokens.js +474 -0
- package/src/open-standards-visual.d.ts +20 -0
- package/src/open-standards-visual.js +425 -0
- package/src/open-step-card.d.ts +34 -0
- package/src/open-step-card.js +117 -0
- package/src/open-tabs.d.ts +27 -0
- package/src/open-tabs.js +56 -0
- package/src/open-theme-toggle.d.ts +38 -0
- package/src/open-theme-toggle.js +223 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/** @jsxImportSource @openelement/core */ /**
|
|
2
|
+
* @openelement/ui - open-layout
|
|
3
|
+
*
|
|
4
|
+
* App layout component with header, sidebar, and footer.
|
|
5
|
+
* Web Standards Lab: light-first, restrained, documentation-focused.
|
|
6
|
+
*
|
|
7
|
+
* v0.20.0: Migrated from DsdLitElement to DsdElement (Ocean component).
|
|
8
|
+
* - CSSStyleSheet replaces Lit css``
|
|
9
|
+
* - render() returns string
|
|
10
|
+
* - @click bindings for mobile menu toggle
|
|
11
|
+
* - SPA navigation via Navigation API (navigate/fetch/swap) preserved
|
|
12
|
+
* - Event delegation at shadow root level for nav clicks
|
|
13
|
+
* v0.24.1: Migrated from html`` template to JSX (ADR-0057).
|
|
14
|
+
*
|
|
15
|
+
* @csspart container - The app-layout root div
|
|
16
|
+
* @csspart header - The sticky header element
|
|
17
|
+
* @csspart sidebar - The docs-sidebar nav
|
|
18
|
+
* @csspart main - The layout-main element
|
|
19
|
+
* @csspart footer - The app-footer element
|
|
20
|
+
* @csspart nav - The header-nav element
|
|
21
|
+
* @csspart nav-toggle - The mobile menu toggle button
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* ```html
|
|
25
|
+
* <open-layout current-path="/guide/getting-started"
|
|
26
|
+
* nav-items='[{"section":"Guide","items":[{"path":"/guide/getting-started","label":"Getting Started"}]}]'>
|
|
27
|
+
* </open-layout>
|
|
28
|
+
* ```
|
|
29
|
+
*/ import { OpenElement } from '@openelement/element';
|
|
30
|
+
import { type StyleSheetLike } from '@openelement/core/style-sheet';
|
|
31
|
+
import { type Context } from '@openelement/core';
|
|
32
|
+
export declare const tagName: 'open-layout';
|
|
33
|
+
/** SignalContext key: theme state shared across all components */ export declare const THEME_CTX: Context<'dark' | 'light'>;
|
|
34
|
+
export interface NavItem {
|
|
35
|
+
path?: string;
|
|
36
|
+
href?: string;
|
|
37
|
+
label: string;
|
|
38
|
+
}
|
|
39
|
+
export interface NavSection {
|
|
40
|
+
section: string;
|
|
41
|
+
items: NavItem[];
|
|
42
|
+
}
|
|
43
|
+
export interface HeaderNavLink {
|
|
44
|
+
href: string;
|
|
45
|
+
label: string;
|
|
46
|
+
}
|
|
47
|
+
declare const sheet: StyleSheetLike;
|
|
48
|
+
export declare class OpenLayout extends OpenElement {
|
|
49
|
+
private _cleanupNav?: any;
|
|
50
|
+
private _scrollCleanup?: any;
|
|
51
|
+
private _navOptions?: any;
|
|
52
|
+
private _locales: any;
|
|
53
|
+
private _defaultLocale: any;
|
|
54
|
+
private _currentLocale: any;
|
|
55
|
+
private _currentPathWithoutLocale: any;
|
|
56
|
+
static override styles: [];
|
|
57
|
+
static override observedAttributes: [string, string, string, string, string, string, string, string, string];
|
|
58
|
+
private _themeHandler?: any;
|
|
59
|
+
private _docClickCleanup?: any;
|
|
60
|
+
override render(): ReturnType<typeof OpenElement.prototype.render>;
|
|
61
|
+
private _getStr: any;
|
|
62
|
+
private _getBool: any;
|
|
63
|
+
private _currentPath: any;
|
|
64
|
+
private _computeEditUrl: any;
|
|
65
|
+
private _navItems: any;
|
|
66
|
+
private _filterByPath: any;
|
|
67
|
+
private _rawNavItems: any;
|
|
68
|
+
private _headerNav: any;
|
|
69
|
+
/** v0.24.1: SVG icon attributes shared across all mobile tab bar icons. */ private static _ICON_ATTRS: any;
|
|
70
|
+
private _renderIcon: any;
|
|
71
|
+
private _safeHref: any;
|
|
72
|
+
private _isExternalHref: any;
|
|
73
|
+
private _localizedSafeHref: any;
|
|
74
|
+
private _renderLayout: any;
|
|
75
|
+
private _renderHeaderNav: any;
|
|
76
|
+
private _renderSidebarNav: any;
|
|
77
|
+
private _renderMobileTabBar: any;
|
|
78
|
+
private _setupScrollDetection: any;
|
|
79
|
+
private _teardownScrollDetection: any;
|
|
80
|
+
override connectedCallback(): void;
|
|
81
|
+
override disconnectedCallback(): void;
|
|
82
|
+
override attributeChangedCallback(name: string, old: string | null, val: string | null): void;
|
|
83
|
+
private _menuBtnHandler: any;
|
|
84
|
+
private _setupDetailsToggle: any;
|
|
85
|
+
private _toggleMenu: any;
|
|
86
|
+
private _syncInert: any;
|
|
87
|
+
private _setupBackdropClose: any;
|
|
88
|
+
private _closeMenu: any;
|
|
89
|
+
private _propagateTheme: any;
|
|
90
|
+
private _findOpenLayout: any;
|
|
91
|
+
private _activateDeclarativeShadowRoots: any;
|
|
92
|
+
private _isShadowTemplate: any;
|
|
93
|
+
private _syncLayoutAttributes: any;
|
|
94
|
+
private _replaceShadowRootFromLayout: any;
|
|
95
|
+
private _setupSpaNavigation: any;
|
|
96
|
+
private _teardownSpaNavigation: any;
|
|
97
|
+
private _setupClickDelegation: any;
|
|
98
|
+
private _setupNavigationApi: any;
|
|
99
|
+
private _setupPopState: any;
|
|
100
|
+
private _navigateTo: any;
|
|
101
|
+
private _replaceTo: any;
|
|
102
|
+
private _navigateNow: any;
|
|
103
|
+
private _updateSwitch: any;
|
|
104
|
+
private _loadContent: any;
|
|
105
|
+
private _syncHeadElement: any;
|
|
106
|
+
private _syncHeadElements: any;
|
|
107
|
+
private _updateActiveNav: any;
|
|
108
|
+
private _esc: any;
|
|
109
|
+
private _escAttr: any;
|
|
110
|
+
}
|
|
111
|
+
export default OpenLayout;
|