@openelement/ui 1.0.0-alpha.14 → 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.
Files changed (43) hide show
  1. package/CUSTOMIZATION.md +106 -112
  2. package/README.md +19 -39
  3. package/custom-elements.json +369 -0
  4. package/package.json +3 -2
  5. package/src/button-machine.js +54 -0
  6. package/src/component-config.js +7 -0
  7. package/src/component-recipes.js +2 -24
  8. package/src/copy-feedback.js +32 -0
  9. package/src/dialog-machine.js +104 -0
  10. package/src/dropdown-machine.js +253 -0
  11. package/src/generated-manifest.json +135 -87
  12. package/src/index.d.ts +7 -8
  13. package/src/index.js +7 -8
  14. package/src/input-machine.js +33 -0
  15. package/src/open-button.css +119 -108
  16. package/src/open-button.d.ts +34 -342
  17. package/src/open-button.generated.js +592 -0
  18. package/src/open-button.js +115 -1140
  19. package/src/open-code-block.css +24 -44
  20. package/src/open-code-block.d.ts +15 -175
  21. package/src/open-code-block.generated.js +293 -0
  22. package/src/open-code-block.js +112 -224
  23. package/src/open-dialog.css +114 -127
  24. package/src/open-dialog.d.ts +22 -261
  25. package/src/open-dialog.generated.js +501 -0
  26. package/src/open-dialog.js +137 -632
  27. package/src/open-dropdown.css +26 -26
  28. package/src/open-dropdown.d.ts +15 -218
  29. package/src/open-dropdown.generated.js +211 -0
  30. package/src/open-dropdown.js +74 -355
  31. package/src/open-input.css +69 -74
  32. package/src/open-input.d.ts +34 -461
  33. package/src/open-input.generated.js +685 -0
  34. package/src/open-input.js +161 -1802
  35. package/src/open-theme-toggle.css +37 -47
  36. package/src/open-theme-toggle.d.ts +19 -190
  37. package/src/open-theme-toggle.generated.js +564 -0
  38. package/src/open-theme-toggle.js +209 -509
  39. package/src/theme-contract.js +40 -0
  40. package/src/theme.css +26 -8
  41. package/src/control-recipe.css +0 -21
  42. package/src/register.d.ts +0 -4
  43. package/src/register.js +0 -22
@@ -1,458 +1,46 @@
1
- import { OpenElement, ReadonlySignal, StyleSheetLike } from "@openelement/element";
2
1
  //#region src/open-input.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
- index: number;
25
- tag?: undefined;
26
- attrs?: undefined;
27
- children?: undefined;
28
- } | {
29
- k: string;
30
- id: string;
31
- tag: string;
32
- attrs: string[][];
33
- children: {
34
- k: string;
35
- id: string;
36
- index: number;
37
- }[];
38
- index?: undefined;
39
- })[];
40
- }[];
41
- }[];
42
- parts: ({
43
- k: string;
44
- signal: string;
45
- name: string;
46
- path: number[];
47
- index: number;
48
- location: {
49
- id: string;
50
- kind: string;
51
- path: number[];
52
- node: string;
2
+ /**
3
+ * Platform facts for the generated element: shadow root with delegated focus,
4
+ * form association (value publication, required and email validity, reset/restore and
5
+ * the fieldset-effective disabled state are the SHELL's mapping), the authored
6
+ * stylesheet, and the eight declared property rows. Only `value` has no
7
+ * attribute wire — it is the live property the form contract and the compiled
8
+ * sinks read.
9
+ */
10
+ export declare const openElement: {
11
+ root: "shadow";
12
+ delegatesFocus: true;
13
+ formAssociated: true;
14
+ styles: string[];
15
+ properties: {
16
+ type: {
17
+ default: string;
53
18
  };
54
- event?: undefined;
55
- handler?: undefined;
56
- action?: undefined;
57
- } | {
58
- k: string;
59
- signal: string;
60
- index: number;
61
- location: {
62
- id: string;
63
- kind: string;
64
- path: number[];
65
- node?: undefined;
19
+ placeholder: {
20
+ default: string;
66
21
  };
67
- name?: undefined;
68
- path?: undefined;
69
- event?: undefined;
70
- handler?: undefined;
71
- action?: undefined;
72
- } | {
73
- k: string;
74
- signal: string;
75
- path: number[];
76
- index: number;
77
- location: {
78
- id: string;
79
- kind: string;
80
- path: number[];
81
- node: string;
22
+ label: {
23
+ default: string;
82
24
  };
83
- name?: undefined;
84
- event?: undefined;
85
- handler?: undefined;
86
- action?: undefined;
87
- } | {
88
- k: string;
89
- event: string;
90
- handler: string;
91
- action: {
92
- kind: string;
93
- name: string;
25
+ name: {
26
+ default: string;
94
27
  };
95
- path: number[];
96
- index: number;
97
- location: {
98
- id: string;
99
- kind: string;
100
- path: number[];
101
- node: string;
28
+ value: {
29
+ default: string;
102
30
  };
103
- signal?: undefined;
104
- name?: undefined;
105
- })[];
106
- regions: never[];
107
- dependencies: {
108
- signal: string;
109
- owner: {
110
- kind: string;
111
- index: number;
31
+ disabled: {
32
+ default: false;
112
33
  };
113
- location: string;
114
- }[];
115
- locations: ({
116
- id: string;
117
- kind: string;
118
- tag: string;
119
- path: number[];
120
- part?: undefined;
121
- node?: undefined;
122
- } | {
123
- id: string;
124
- kind: string;
125
- part: number;
126
- node: string;
127
- path: number[];
128
- tag?: undefined;
129
- } | {
130
- id: string;
131
- kind: string;
132
- part: number;
133
- path: number[];
134
- tag?: undefined;
135
- node?: undefined;
136
- })[];
137
- metadata: {
138
- tag: string;
139
- className: string;
140
- sourceFile: string;
141
- properties: ({
142
- name: string;
143
- attribute: string;
144
- type: string;
145
- converter: string;
146
- reflect: boolean;
147
- default: string;
148
- computed?: undefined;
149
- deps?: undefined;
150
- } | {
151
- name: string;
152
- attribute: string;
153
- type: string;
154
- converter: string;
155
- reflect: boolean;
156
- default: boolean;
157
- computed?: undefined;
158
- deps?: undefined;
159
- } | {
160
- name: string;
161
- attribute: null;
162
- type: string;
163
- converter: string;
164
- reflect: boolean;
165
- default: string;
166
- computed?: undefined;
167
- deps?: undefined;
168
- } | {
169
- name: string;
170
- attribute: null;
171
- type: string;
172
- converter: string;
173
- reflect: boolean;
174
- default: null;
175
- computed: boolean;
176
- deps: string[];
177
- })[];
178
- observedAttributes: string[];
179
- cem: {
180
- tagName: string;
181
- className: string;
182
- declaration: {
183
- name: string;
184
- module: string;
185
- };
186
- attributes: {
187
- name: string;
188
- fieldName: string;
189
- type: string;
190
- reflect: boolean;
191
- }[];
192
- members: ({
193
- name: string;
194
- fieldName: string;
195
- type: string;
196
- attribute: string;
197
- reflect: boolean;
198
- } | {
199
- name: string;
200
- fieldName: string;
201
- type: string;
202
- attribute: null;
203
- reflect: boolean;
204
- })[];
34
+ required: {
35
+ default: false;
205
36
  };
206
- };
207
- };
208
- declare const __compiledProperties: ({
209
- name: string;
210
- attribute: string;
211
- type: string;
212
- converter: string;
213
- reflect: boolean;
214
- default: string;
215
- computed?: undefined;
216
- deps?: undefined;
217
- } | {
218
- name: string;
219
- attribute: string;
220
- type: string;
221
- converter: string;
222
- reflect: boolean;
223
- default: boolean;
224
- computed?: undefined;
225
- deps?: undefined;
226
- } | {
227
- name: string;
228
- attribute: null;
229
- type: string;
230
- converter: string;
231
- reflect: boolean;
232
- default: string;
233
- computed?: undefined;
234
- deps?: undefined;
235
- } | {
236
- name: string;
237
- attribute: null;
238
- type: string;
239
- converter: string;
240
- reflect: boolean;
241
- default: null;
242
- computed: boolean;
243
- deps: string[];
244
- })[];
245
- declare const __elementMetadata: {
246
- tag: string;
247
- className: string;
248
- sourceFile: string;
249
- properties: ({
250
- name: string;
251
- attribute: string;
252
- type: string;
253
- converter: string;
254
- reflect: boolean;
255
- default: string;
256
- computed?: undefined;
257
- deps?: undefined;
258
- } | {
259
- name: string;
260
- attribute: string;
261
- type: string;
262
- converter: string;
263
- reflect: boolean;
264
- default: boolean;
265
- computed?: undefined;
266
- deps?: undefined;
267
- } | {
268
- name: string;
269
- attribute: null;
270
- type: string;
271
- converter: string;
272
- reflect: boolean;
273
- default: string;
274
- computed?: undefined;
275
- deps?: undefined;
276
- } | {
277
- name: string;
278
- attribute: null;
279
- type: string;
280
- converter: string;
281
- reflect: boolean;
282
- default: null;
283
- computed: boolean;
284
- deps: string[];
285
- })[];
286
- observedAttributes: string[];
287
- cem: {
288
- tagName: string;
289
- className: string;
290
- declaration: {
291
- name: string;
292
- module: string;
37
+ error: {
38
+ default: string;
293
39
  };
294
- attributes: {
295
- name: string;
296
- fieldName: string;
297
- type: string;
298
- reflect: boolean;
299
- }[];
300
- members: ({
301
- name: string;
302
- fieldName: string;
303
- type: string;
304
- attribute: string;
305
- reflect: boolean;
306
- } | {
307
- name: string;
308
- fieldName: string;
309
- type: string;
310
- attribute: null;
311
- reflect: boolean;
312
- })[];
313
40
  };
314
41
  };
315
- declare const __observedAttributes: string[];
316
- declare const __compiledProps: {
317
- type: {
318
- type: StringConstructor;
319
- default: string;
320
- reflect: boolean;
321
- attribute: string;
322
- };
323
- placeholder: {
324
- type: StringConstructor;
325
- default: string;
326
- reflect: boolean;
327
- attribute: string;
328
- };
329
- label: {
330
- type: StringConstructor;
331
- default: string;
332
- reflect: boolean;
333
- attribute: string;
334
- };
335
- name: {
336
- type: StringConstructor;
337
- default: string;
338
- reflect: boolean;
339
- attribute: string;
340
- };
341
- value: {
342
- type: StringConstructor;
343
- default: string;
344
- reflect: boolean;
345
- attribute: string;
346
- };
347
- disabled: {
348
- type: BooleanConstructor;
349
- default: boolean;
350
- reflect: boolean;
351
- attribute: string;
352
- };
353
- required: {
354
- type: BooleanConstructor;
355
- default: boolean;
356
- reflect: boolean;
357
- attribute: string;
358
- };
359
- error: {
360
- type: StringConstructor;
361
- default: string;
362
- reflect: boolean;
363
- attribute: string;
364
- };
365
- inputId: {
366
- type: StringConstructor;
367
- default: string;
368
- reflect: boolean;
369
- attribute: boolean;
370
- };
371
- noLabel: {
372
- type: ObjectConstructor;
373
- default: undefined;
374
- reflect: boolean;
375
- attribute: boolean;
376
- };
377
- noError: {
378
- type: ObjectConstructor;
379
- default: undefined;
380
- reflect: boolean;
381
- attribute: boolean;
382
- };
383
- inputClass: {
384
- type: ObjectConstructor;
385
- default: undefined;
386
- reflect: boolean;
387
- attribute: boolean;
388
- };
389
- idAttr: {
390
- type: ObjectConstructor;
391
- default: undefined;
392
- reflect: boolean;
393
- attribute: boolean;
394
- };
395
- errorIdAttr: {
396
- type: ObjectConstructor;
397
- default: undefined;
398
- reflect: boolean;
399
- attribute: boolean;
400
- };
401
- ariaInvalidAttr: {
402
- type: ObjectConstructor;
403
- default: undefined;
404
- reflect: boolean;
405
- attribute: boolean;
406
- };
407
- requiredMark: {
408
- type: ObjectConstructor;
409
- default: undefined;
410
- reflect: boolean;
411
- attribute: boolean;
412
- };
413
- describedByAttr: {
414
- type: ObjectConstructor;
415
- default: undefined;
416
- reflect: boolean;
417
- attribute: boolean;
418
- };
419
- };
420
- export declare class OpenInput extends OpenElement {
421
- static __partProgram: typeof __partProgram;
422
- static __compiledProperties: typeof __compiledProperties;
423
- static __elementMetadata: typeof __elementMetadata;
424
- static props: typeof __compiledProps;
425
- static observedAttributes: typeof __observedAttributes;
426
- static delegatesFocus: boolean;
427
- static formAssociated: boolean;
428
- static __computedFields: {
429
- noLabel: (__s: {
430
- label: ReadonlySignal<string>;
431
- }) => ReadonlySignal<boolean>;
432
- noError: (__s: {
433
- error: ReadonlySignal<string>;
434
- }) => ReadonlySignal<boolean>;
435
- inputClass: (__s: {
436
- error: ReadonlySignal<string>;
437
- }) => ReadonlySignal<string>;
438
- idAttr: (__s: {
439
- inputId: ReadonlySignal<string>;
440
- }) => ReadonlySignal<string | null>;
441
- errorIdAttr: (__s: {
442
- inputId: ReadonlySignal<string>;
443
- }) => ReadonlySignal<string | null>;
444
- ariaInvalidAttr: (__s: {
445
- error: ReadonlySignal<string>;
446
- }) => ReadonlySignal<string | null>;
447
- requiredMark: (__s: {
448
- required: ReadonlySignal<boolean>;
449
- }) => ReadonlySignal<string>;
450
- describedByAttr: (__s: {
451
- error: ReadonlySignal<string>;
452
- inputId: ReadonlySignal<string>;
453
- }) => ReadonlySignal<string | null>;
454
- };
455
- static styles: StyleSheetLike[];
42
+ /** Form-associated text input with a label, an error slot and native validity. */
43
+ declare function OpenInput(props: {
456
44
  type: string;
457
45
  placeholder: string;
458
46
  label: string;
@@ -461,21 +49,6 @@ export declare class OpenInput extends OpenElement {
461
49
  disabled: boolean;
462
50
  required: boolean;
463
51
  error: string;
464
- inputId: string;
465
- onDsdHydrated(): void;
466
- onCsrRendered(): void;
467
- private activate;
468
- attributeChangedCallback(name: string, old: string | null, val: string | null): void;
469
- private updateStates;
470
- private syncFormValue;
471
- private syncValidity;
472
- private handleInput;
473
- private handleChange;
474
- private handleFocus;
475
- private handleBlur;
476
- formResetCallback(): void;
477
- formDisabledCallback(disabled: boolean): void;
478
- render(): never;
479
- }
52
+ }): any;
480
53
  //#endregion
481
- export { __elementMetadata, __partProgram };
54
+ export { OpenInput as default };