@openelement/ui 1.0.0-alpha.15 → 1.0.0-alpha.16

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.
@@ -1,198 +1,25 @@
1
- import { OpenElement, StyleSheetLike } from "@openelement/element";
2
1
  //#region src/open-theme-toggle.d.ts
3
- declare const __partProgram: {
4
- version: number;
5
- tag: string;
6
- root: {
7
- id: string;
8
- kind: string;
9
- nodes: string[];
10
- };
11
- template: {
12
- k: string;
13
- id: string;
14
- tag: string;
15
- attrs: string[][];
16
- children: {
17
- k: string;
18
- id: string;
19
- tag: string;
20
- attrs: string[][];
21
- children: {
22
- k: string;
23
- id: string;
24
- tag: string;
25
- attrs: string[][];
26
- children: never[];
27
- }[];
28
- }[];
29
- }[];
30
- parts: ({
31
- k: string;
32
- signal: string;
33
- name: string;
34
- path: number[];
35
- index: number;
36
- location: {
37
- id: string;
38
- kind: string;
39
- path: number[];
40
- node: string;
41
- };
42
- event?: undefined;
43
- handler?: undefined;
44
- action?: undefined;
45
- } | {
46
- k: string;
47
- event: string;
48
- handler: string;
49
- action: {
50
- kind: string;
51
- name: string;
52
- };
53
- path: number[];
54
- index: number;
55
- location: {
56
- id: string;
57
- kind: string;
58
- path: number[];
59
- node: string;
60
- };
61
- signal?: undefined;
62
- name?: undefined;
63
- })[];
64
- blocks: never[];
65
- dependencies: {
66
- signal: string;
67
- owner: {
68
- kind: string;
69
- index: number;
70
- };
71
- location: string;
72
- }[];
73
- locations: ({
74
- id: string;
75
- kind: string;
76
- tag: string;
77
- path: number[];
78
- part?: undefined;
79
- node?: undefined;
80
- } | {
81
- id: string;
82
- kind: string;
83
- part: number;
84
- node: string;
85
- path: number[];
86
- tag?: undefined;
87
- })[];
88
- metadata: {
89
- tag: string;
90
- className: string;
91
- sourceFile: string;
92
- properties: {
93
- name: string;
94
- attribute: string;
95
- type: string;
96
- converter: string;
97
- reflect: boolean;
98
- default: string;
99
- }[];
100
- observedAttributes: string[];
101
- cem: {
102
- tagName: string;
103
- className: string;
104
- declaration: {
105
- name: string;
106
- module: string;
107
- };
108
- attributes: {
109
- name: string;
110
- fieldName: string;
111
- type: string;
112
- reflect: boolean;
113
- }[];
114
- members: {
115
- name: string;
116
- fieldName: string;
117
- type: string;
118
- attribute: string;
119
- reflect: boolean;
120
- }[];
121
- };
122
- };
123
- };
124
- declare const __compiledProperties: {
125
- name: string;
126
- attribute: string;
127
- type: string;
128
- converter: string;
129
- reflect: boolean;
130
- default: string;
131
- }[];
132
- declare const __elementMetadata: {
133
- tag: string;
134
- className: string;
135
- sourceFile: string;
2
+ /**
3
+ * Platform facts for the generated element: shadow root with delegated focus,
4
+ * the authored component stylesheet, and the declared `theme` property.
5
+ */
6
+ export declare const openElement: {
7
+ root: "shadow";
8
+ delegatesFocus: true;
9
+ styles: string[];
136
10
  properties: {
137
- name: string;
138
- attribute: string;
139
- type: string;
140
- converter: string;
141
- reflect: boolean;
142
- default: string;
143
- }[];
144
- observedAttributes: string[];
145
- cem: {
146
- tagName: string;
147
- className: string;
148
- declaration: {
149
- name: string;
150
- module: string;
11
+ theme: {
12
+ default: string;
151
13
  };
152
- attributes: {
153
- name: string;
154
- fieldName: string;
155
- type: string;
156
- reflect: boolean;
157
- }[];
158
- members: {
159
- name: string;
160
- fieldName: string;
161
- type: string;
162
- attribute: string;
163
- reflect: boolean;
164
- }[];
165
- };
166
- };
167
- declare const __observedAttributes: string[];
168
- declare const __compiledProps: {
169
- theme: {
170
- type: StringConstructor;
171
- default: string;
172
- reflect: boolean;
173
- attribute: string;
174
14
  };
175
15
  };
176
- export declare class OpenThemeToggle extends OpenElement {
177
- static __partProgram: typeof __partProgram;
178
- static __compiledProperties: typeof __compiledProperties;
179
- static __elementMetadata: typeof __elementMetadata;
180
- static props: typeof __compiledProps;
181
- static observedAttributes: typeof __observedAttributes;
182
- static delegatesFocus: boolean;
183
- static __oeUtilityClasses: boolean;
184
- static __oeClassCandidates: readonly string[];
185
- static styles: StyleSheetLike[];
186
- theme: 'dark' | 'light';
187
- connectedCallback(): void;
188
- onDsdHydrated(): void;
189
- private initTheme;
190
- private applyTheme;
191
- private persistTheme;
192
- private handleToggle;
193
- private dispatchThemeChange;
194
- attributeChangedCallback(name: string, old: string | null, val: string | null): void;
195
- render(): never;
196
- }
16
+ /**
17
+ * Theme toggle button for dark/light mode: reads and flips the document's
18
+ * `data-theme` (with an initialization priority chain) and persists the
19
+ * choice; icon visibility follows the current theme attribute.
20
+ */
21
+ declare function OpenThemeToggle(props: {
22
+ theme: string;
23
+ }): any;
197
24
  //#endregion
198
- export { __elementMetadata, __partProgram };
25
+ export { OpenThemeToggle as default };