@openelement/ui 1.0.0-alpha.1 → 1.0.0-alpha.11

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.
Files changed (47) hide show
  1. package/CUSTOMIZATION.md +272 -0
  2. package/README.md +59 -54
  3. package/package.json +19 -33
  4. package/src/component-recipes.js +39 -100
  5. package/src/control-recipe.css +21 -0
  6. package/src/generated-manifest.json +13 -160
  7. package/src/index.d.ts +10 -42
  8. package/src/index.js +10 -46
  9. package/src/instance-state.d.ts +16 -0
  10. package/src/instance-state.js +30 -24
  11. package/src/manifest.d.ts +5 -9
  12. package/src/manifest.js +6 -11
  13. package/src/open-button.css +120 -0
  14. package/src/open-button.d.ts +296 -898
  15. package/src/open-button.js +1130 -1436
  16. package/src/open-code-block.css +46 -0
  17. package/src/open-code-block.d.ts +158 -168
  18. package/src/open-code-block.js +224 -468
  19. package/src/open-dialog.css +137 -0
  20. package/src/open-dialog.d.ts +241 -424
  21. package/src/open-dialog.js +626 -903
  22. package/src/open-dropdown.css +28 -0
  23. package/src/open-dropdown.d.ts +195 -252
  24. package/src/open-dropdown.js +352 -494
  25. package/src/open-input.css +80 -0
  26. package/src/open-input.d.ts +404 -1420
  27. package/src/open-input.js +1789 -2170
  28. package/src/open-theme-toggle.css +53 -0
  29. package/src/open-theme-toggle.d.ts +171 -287
  30. package/src/open-theme-toggle.js +512 -801
  31. package/src/overlay-recipe.css +9 -0
  32. package/src/register.d.ts +4 -1
  33. package/src/register.js +19 -58
  34. package/src/surface-recipe.css +10 -0
  35. package/src/theme.css +206 -0
  36. package/THIRD_PARTY_NOTICES.md +0 -45
  37. package/src/open-badge.d.ts +0 -185
  38. package/src/open-badge.js +0 -296
  39. package/src/open-callout.d.ts +0 -402
  40. package/src/open-callout.js +0 -603
  41. package/src/open-card.d.ts +0 -168
  42. package/src/open-card.js +0 -310
  43. package/src/open-props-tokens.d.ts +0 -9
  44. package/src/open-props-tokens.js +0 -459
  45. package/src/open-tabs.d.ts +0 -218
  46. package/src/open-tabs.js +0 -401
  47. package/src/semantic-tokens.css +0 -413
@@ -0,0 +1,53 @@
1
+ /* open-theme-toggle — authored component styles, ported verbatim from the pre-#1558
2
+ * recipe() sheet (the alpha.9 design system). The #1558 migration had
3
+ * replaced this with a placeholder shell under the false note that the
4
+ * component "carried no authored styles"; it did — this is that sheet. */
5
+ :host {
6
+ display: inline-block;
7
+ }
8
+
9
+ .theme-toggle {
10
+ display: inline-flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ width: 38px; height: 38px; padding: 0;
14
+ border: calc(var(--spacing) * 0.25) solid color-mix(in srgb, var(--color-border) 72%, var(--color-primary));
15
+ border-radius: calc(infinity * 1px);
16
+ background: color-mix(in srgb, var(--color-popover) 76%, transparent);
17
+ color: var(--color-muted-foreground);
18
+ box-shadow: inset 0 1px 0 color-mix(in srgb, var(--color-background) 70%, transparent);
19
+ cursor: pointer;
20
+ transition: all var(--ease-in-out) var(--default-transition-duration);
21
+ }
22
+ .theme-toggle:hover {
23
+ color: var(--color-foreground);
24
+ border-color: var(--color-violet-400);
25
+ background: color-mix(in srgb, color-mix(in srgb, var(--color-primary) 16%, transparent) 42%, var(--color-popover));
26
+ }
27
+
28
+ .theme-toggle:focus-visible {
29
+ outline: calc(var(--spacing) * 0.5) solid var(--color-ring);
30
+ outline-offset: calc(var(--spacing) * 0.75);
31
+ }
32
+
33
+ .theme-toggle svg {
34
+ width: 16px;
35
+ height: 16px;
36
+ }
37
+
38
+ .theme-toggle .icon-sun {
39
+ display: block;
40
+ }
41
+
42
+ .theme-toggle .icon-moon {
43
+ display: none;
44
+ }
45
+
46
+ .theme-toggle[data-theme='light'] .icon-sun {
47
+ display: none;
48
+ }
49
+
50
+ .theme-toggle[data-theme='light'] .icon-moon {
51
+ display: block;
52
+ }
53
+
@@ -1,293 +1,176 @@
1
- import { OpenElement, type StyleSheetLike } from '@openelement/element';
1
+ import { OpenElement, StyleSheetLike } from "@openelement/element";
2
+ //#region src/open-theme-toggle.d.ts
2
3
  declare const __partProgram: {
3
- readonly "version": number;
4
- readonly "tag": string;
5
- readonly "root": {
6
- readonly "id": string;
7
- readonly "kind": string;
8
- readonly "nodes": readonly [string];
4
+ version: number;
5
+ tag: string;
6
+ root: {
7
+ id: string;
8
+ kind: string;
9
+ nodes: string[];
9
10
  };
10
- readonly "template": readonly [{
11
- readonly "k": string;
12
- readonly "id": string;
13
- readonly "tag": string;
14
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
15
- readonly "children": readonly [{
16
- readonly "k": string;
17
- readonly "id": string;
18
- readonly "tag": string;
19
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
20
- readonly "children": readonly [{
21
- readonly "k": string;
22
- readonly "id": string;
23
- readonly "tag": string;
24
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string]];
25
- readonly "children": readonly [];
26
- }, {
27
- readonly "k": string;
28
- readonly "id": string;
29
- readonly "tag": string;
30
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
31
- readonly "children": readonly [];
32
- }, {
33
- readonly "k": string;
34
- readonly "id": string;
35
- readonly "tag": string;
36
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
37
- readonly "children": readonly [];
38
- }, {
39
- readonly "k": string;
40
- readonly "id": string;
41
- readonly "tag": string;
42
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
43
- readonly "children": readonly [];
44
- }, {
45
- readonly "k": string;
46
- readonly "id": string;
47
- readonly "tag": string;
48
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
49
- readonly "children": readonly [];
50
- }, {
51
- readonly "k": string;
52
- readonly "id": string;
53
- readonly "tag": string;
54
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
55
- readonly "children": readonly [];
56
- }, {
57
- readonly "k": string;
58
- readonly "id": string;
59
- readonly "tag": string;
60
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
61
- readonly "children": readonly [];
62
- }, {
63
- readonly "k": string;
64
- readonly "id": string;
65
- readonly "tag": string;
66
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
67
- readonly "children": readonly [];
68
- }, {
69
- readonly "k": string;
70
- readonly "id": string;
71
- readonly "tag": string;
72
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
73
- readonly "children": readonly [];
74
- }];
75
- }, {
76
- readonly "k": string;
77
- readonly "id": string;
78
- readonly "tag": string;
79
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string], readonly [string, string]];
80
- readonly "children": readonly [{
81
- readonly "k": string;
82
- readonly "id": string;
83
- readonly "tag": string;
84
- readonly "attrs": readonly [readonly [string, string]];
85
- readonly "children": readonly [];
86
- }];
87
- }];
88
- }];
89
- readonly "parts": readonly [{
90
- readonly "k": string;
91
- readonly "signal": string;
92
- readonly "name": string;
93
- readonly "path": readonly [number];
94
- readonly "index": number;
95
- readonly "location": {
96
- readonly "id": string;
97
- readonly "kind": string;
98
- readonly "path": readonly [number];
99
- readonly "node": string;
100
- };
101
- }, {
102
- readonly "k": string;
103
- readonly "event": string;
104
- readonly "handler": string;
105
- readonly "action": {
106
- readonly "kind": string;
107
- readonly "name": string;
108
- };
109
- readonly "path": readonly [number];
110
- readonly "index": number;
111
- readonly "location": {
112
- readonly "id": string;
113
- readonly "kind": string;
114
- readonly "path": readonly [number];
115
- readonly "node": string;
116
- };
117
- }];
118
- readonly "regions": readonly [];
119
- readonly "dependencies": readonly [{
120
- readonly "signal": string;
121
- readonly "owner": {
122
- readonly "kind": string;
123
- readonly "index": number;
124
- };
125
- readonly "location": string;
126
- }];
127
- readonly "locations": readonly [{
128
- readonly "id": string;
129
- readonly "kind": string;
130
- readonly "tag": string;
131
- readonly "path": readonly [number];
132
- }, {
133
- readonly "id": string;
134
- readonly "kind": string;
135
- readonly "part": number;
136
- readonly "node": string;
137
- readonly "path": readonly [number];
138
- }, {
139
- readonly "id": string;
140
- readonly "kind": string;
141
- readonly "part": number;
142
- readonly "node": string;
143
- readonly "path": readonly [number];
144
- }, {
145
- readonly "id": string;
146
- readonly "kind": string;
147
- readonly "tag": string;
148
- readonly "path": readonly [number, number];
149
- }, {
150
- readonly "id": string;
151
- readonly "kind": string;
152
- readonly "tag": string;
153
- readonly "path": readonly [number, number, number];
154
- }, {
155
- readonly "id": string;
156
- readonly "kind": string;
157
- readonly "tag": string;
158
- readonly "path": readonly [number, number, number];
159
- }, {
160
- readonly "id": string;
161
- readonly "kind": string;
162
- readonly "tag": string;
163
- readonly "path": readonly [number, number, number];
164
- }, {
165
- readonly "id": string;
166
- readonly "kind": string;
167
- readonly "tag": string;
168
- readonly "path": readonly [number, number, number];
169
- }, {
170
- readonly "id": string;
171
- readonly "kind": string;
172
- readonly "tag": string;
173
- readonly "path": readonly [number, number, number];
174
- }, {
175
- readonly "id": string;
176
- readonly "kind": string;
177
- readonly "tag": string;
178
- readonly "path": readonly [number, number, number];
179
- }, {
180
- readonly "id": string;
181
- readonly "kind": string;
182
- readonly "tag": string;
183
- readonly "path": readonly [number, number, number];
184
- }, {
185
- readonly "id": string;
186
- readonly "kind": string;
187
- readonly "tag": string;
188
- readonly "path": readonly [number, number, number];
189
- }, {
190
- readonly "id": string;
191
- readonly "kind": string;
192
- readonly "tag": string;
193
- readonly "path": readonly [number, number, number];
194
- }, {
195
- readonly "id": string;
196
- readonly "kind": string;
197
- readonly "tag": string;
198
- readonly "path": readonly [number, number];
199
- }, {
200
- readonly "id": string;
201
- readonly "kind": string;
202
- readonly "tag": string;
203
- readonly "path": readonly [number, number, number];
204
- }];
205
- readonly "metadata": {
206
- readonly "tag": string;
207
- readonly "className": string;
208
- readonly "sourceFile": string;
209
- readonly "properties": readonly [{
210
- readonly "name": string;
211
- readonly "attribute": string;
212
- readonly "type": string;
213
- readonly "converter": string;
214
- readonly "reflect": boolean;
215
- readonly "default": string;
216
- }];
217
- readonly "observedAttributes": readonly [string];
218
- readonly "cem": {
219
- readonly "tagName": string;
220
- readonly "className": string;
221
- readonly "declaration": {
222
- readonly "name": string;
223
- readonly "module": string;
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
+ regions: 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;
224
107
  };
225
- readonly "attributes": readonly [{
226
- readonly "name": string;
227
- readonly "fieldName": string;
228
- readonly "type": string;
229
- readonly "reflect": boolean;
230
- }];
231
- readonly "members": readonly [{
232
- readonly "name": string;
233
- readonly "fieldName": string;
234
- readonly "type": string;
235
- readonly "attribute": string;
236
- readonly "reflect": boolean;
237
- }];
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
+ }[];
238
121
  };
239
122
  };
240
123
  };
241
- declare const __compiledProperties: readonly [{
242
- readonly "name": string;
243
- readonly "attribute": string;
244
- readonly "type": string;
245
- readonly "converter": string;
246
- readonly "reflect": boolean;
247
- readonly "default": string;
248
- }];
124
+ declare const __compiledProperties: {
125
+ name: string;
126
+ attribute: string;
127
+ type: string;
128
+ converter: string;
129
+ reflect: boolean;
130
+ default: string;
131
+ }[];
249
132
  declare const __elementMetadata: {
250
- readonly "tag": string;
251
- readonly "className": string;
252
- readonly "sourceFile": string;
253
- readonly "properties": readonly [{
254
- readonly "name": string;
255
- readonly "attribute": string;
256
- readonly "type": string;
257
- readonly "converter": string;
258
- readonly "reflect": boolean;
259
- readonly "default": string;
260
- }];
261
- readonly "observedAttributes": readonly [string];
262
- readonly "cem": {
263
- readonly "tagName": string;
264
- readonly "className": string;
265
- readonly "declaration": {
266
- readonly "name": string;
267
- readonly "module": string;
133
+ tag: string;
134
+ className: string;
135
+ sourceFile: string;
136
+ 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;
268
151
  };
269
- readonly "attributes": readonly [{
270
- readonly "name": string;
271
- readonly "fieldName": string;
272
- readonly "type": string;
273
- readonly "reflect": boolean;
274
- }];
275
- readonly "members": readonly [{
276
- readonly "name": string;
277
- readonly "fieldName": string;
278
- readonly "type": string;
279
- readonly "attribute": string;
280
- readonly "reflect": boolean;
281
- }];
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
+ }[];
282
165
  };
283
166
  };
284
167
  declare const __observedAttributes: string[];
285
168
  declare const __compiledProps: {
286
- readonly theme: {
287
- readonly type;
288
- readonly default: string;
289
- readonly reflect: boolean;
290
- readonly attribute: string;
169
+ theme: {
170
+ type: StringConstructor;
171
+ default: string;
172
+ reflect: boolean;
173
+ attribute: string;
291
174
  };
292
175
  };
293
176
  export declare class OpenThemeToggle extends OpenElement {
@@ -299,14 +182,15 @@ export declare class OpenThemeToggle extends OpenElement {
299
182
  static delegatesFocus: boolean;
300
183
  static styles: StyleSheetLike[];
301
184
  theme: 'dark' | 'light';
302
- override connectedCallback(): void;
303
- override onDsdHydrated(): void;
304
- private initTheme: any;
305
- private applyTheme: any;
306
- private persistTheme: any;
307
- private handleToggle: any;
308
- private dispatchThemeChange: any;
309
- override attributeChangedCallback(name: string, old: string | null, val: string | null): void;
185
+ connectedCallback(): void;
186
+ onDsdHydrated(): void;
187
+ private initTheme;
188
+ private applyTheme;
189
+ private persistTheme;
190
+ private handleToggle;
191
+ private dispatchThemeChange;
192
+ attributeChangedCallback(name: string, old: string | null, val: string | null): void;
310
193
  render(): never;
311
194
  }
312
- export { __partProgram, __elementMetadata };
195
+ //#endregion
196
+ export { __elementMetadata, __partProgram };