@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
@@ -1,603 +0,0 @@
1
- // <auto-generated by open:compiled-element; v0.44.0-alpha.1 - do not edit>
2
- import { computed, OpenElement } from '@openelement/element';
3
- import { CALLOUT_TYPE_ICONS, recipe } from './component-recipes.js';
4
- const __partProgram = {
5
- "version": 1,
6
- "tag": "open-callout",
7
- "root": {
8
- "id": "root",
9
- "kind": "shadow-open",
10
- "nodes": [
11
- "e0"
12
- ]
13
- },
14
- "template": [
15
- {
16
- "k": "el",
17
- "id": "e0",
18
- "tag": "div",
19
- "attrs": [
20
- [
21
- "class",
22
- "callout"
23
- ],
24
- [
25
- "part",
26
- "container"
27
- ]
28
- ],
29
- "children": [
30
- {
31
- "k": "el",
32
- "id": "e1",
33
- "tag": "div",
34
- "attrs": [
35
- [
36
- "class",
37
- "callout-header"
38
- ]
39
- ],
40
- "children": [
41
- {
42
- "k": "el",
43
- "id": "e2",
44
- "tag": "span",
45
- "attrs": [
46
- [
47
- "class",
48
- "callout-icon"
49
- ],
50
- [
51
- "part",
52
- "icon"
53
- ]
54
- ],
55
- "children": [
56
- {
57
- "k": "part",
58
- "id": "p1",
59
- "index": 1
60
- }
61
- ]
62
- },
63
- {
64
- "k": "el",
65
- "id": "e3",
66
- "tag": "span",
67
- "attrs": [
68
- [
69
- "class",
70
- "callout-title"
71
- ]
72
- ],
73
- "children": [
74
- {
75
- "k": "part",
76
- "id": "p2",
77
- "index": 2
78
- }
79
- ]
80
- }
81
- ]
82
- },
83
- {
84
- "k": "el",
85
- "id": "e4",
86
- "tag": "div",
87
- "attrs": [
88
- [
89
- "class",
90
- "callout-body"
91
- ],
92
- [
93
- "part",
94
- "content"
95
- ]
96
- ],
97
- "children": [
98
- {
99
- "k": "el",
100
- "id": "e5",
101
- "tag": "slot",
102
- "attrs": [],
103
- "children": []
104
- }
105
- ]
106
- }
107
- ]
108
- }
109
- ],
110
- "parts": [
111
- {
112
- "k": "bool",
113
- "signal": "headerHidden",
114
- "name": "hidden",
115
- "path": [
116
- 0,
117
- 0
118
- ],
119
- "index": 0,
120
- "location": {
121
- "id": "p0",
122
- "kind": "sink",
123
- "path": [
124
- 0,
125
- 0
126
- ],
127
- "node": "e1"
128
- }
129
- },
130
- {
131
- "k": "text",
132
- "signal": "icon",
133
- "index": 1,
134
- "location": {
135
- "id": "p1",
136
- "kind": "anchor",
137
- "path": [
138
- 0,
139
- 0,
140
- 0,
141
- 0
142
- ]
143
- }
144
- },
145
- {
146
- "k": "text",
147
- "signal": "label",
148
- "index": 2,
149
- "location": {
150
- "id": "p2",
151
- "kind": "anchor",
152
- "path": [
153
- 0,
154
- 0,
155
- 1,
156
- 0
157
- ]
158
- }
159
- }
160
- ],
161
- "regions": [],
162
- "dependencies": [
163
- {
164
- "signal": "headerHidden",
165
- "owner": {
166
- "kind": "part",
167
- "index": 0
168
- },
169
- "location": "p0"
170
- },
171
- {
172
- "signal": "icon",
173
- "owner": {
174
- "kind": "part",
175
- "index": 1
176
- },
177
- "location": "p1"
178
- },
179
- {
180
- "signal": "label",
181
- "owner": {
182
- "kind": "part",
183
- "index": 2
184
- },
185
- "location": "p2"
186
- }
187
- ],
188
- "locations": [
189
- {
190
- "id": "e0",
191
- "kind": "element",
192
- "tag": "div",
193
- "path": [
194
- 0
195
- ]
196
- },
197
- {
198
- "id": "e1",
199
- "kind": "element",
200
- "tag": "div",
201
- "path": [
202
- 0,
203
- 0
204
- ]
205
- },
206
- {
207
- "id": "p0",
208
- "kind": "sink",
209
- "part": 0,
210
- "node": "e1",
211
- "path": [
212
- 0,
213
- 0
214
- ]
215
- },
216
- {
217
- "id": "e2",
218
- "kind": "element",
219
- "tag": "span",
220
- "path": [
221
- 0,
222
- 0,
223
- 0
224
- ]
225
- },
226
- {
227
- "id": "p1",
228
- "kind": "anchor",
229
- "part": 1,
230
- "path": [
231
- 0,
232
- 0,
233
- 0,
234
- 0
235
- ]
236
- },
237
- {
238
- "id": "e3",
239
- "kind": "element",
240
- "tag": "span",
241
- "path": [
242
- 0,
243
- 0,
244
- 1
245
- ]
246
- },
247
- {
248
- "id": "p2",
249
- "kind": "anchor",
250
- "part": 2,
251
- "path": [
252
- 0,
253
- 0,
254
- 1,
255
- 0
256
- ]
257
- },
258
- {
259
- "id": "e4",
260
- "kind": "element",
261
- "tag": "div",
262
- "path": [
263
- 0,
264
- 1
265
- ]
266
- },
267
- {
268
- "id": "e5",
269
- "kind": "element",
270
- "tag": "slot",
271
- "path": [
272
- 0,
273
- 1,
274
- 0
275
- ]
276
- }
277
- ],
278
- "metadata": {
279
- "tag": "open-callout",
280
- "className": "OpenCallout",
281
- "sourceFile": "open-callout.tsx",
282
- "properties": [
283
- {
284
- "name": "type",
285
- "attribute": "type",
286
- "type": "string",
287
- "converter": "string",
288
- "reflect": true,
289
- "default": "info"
290
- },
291
- {
292
- "name": "label",
293
- "attribute": "label",
294
- "type": "string",
295
- "converter": "string",
296
- "reflect": false,
297
- "default": ""
298
- },
299
- {
300
- "name": "icon",
301
- "attribute": null,
302
- "type": "string",
303
- "converter": "string",
304
- "reflect": false,
305
- "default": null,
306
- "computed": true,
307
- "deps": [
308
- "type"
309
- ]
310
- },
311
- {
312
- "name": "headerHidden",
313
- "attribute": null,
314
- "type": "boolean",
315
- "converter": "boolean",
316
- "reflect": false,
317
- "default": null,
318
- "computed": true,
319
- "deps": [
320
- "label"
321
- ]
322
- }
323
- ],
324
- "observedAttributes": [
325
- "type",
326
- "label"
327
- ],
328
- "cem": {
329
- "tagName": "open-callout",
330
- "className": "OpenCallout",
331
- "declaration": {
332
- "name": "OpenCallout",
333
- "module": "open-callout.tsx"
334
- },
335
- "attributes": [
336
- {
337
- "name": "type",
338
- "fieldName": "type",
339
- "type": "string",
340
- "reflect": true
341
- },
342
- {
343
- "name": "label",
344
- "fieldName": "label",
345
- "type": "string",
346
- "reflect": false
347
- }
348
- ],
349
- "members": [
350
- {
351
- "name": "type",
352
- "fieldName": "type",
353
- "type": "string",
354
- "attribute": "type",
355
- "reflect": true
356
- },
357
- {
358
- "name": "label",
359
- "fieldName": "label",
360
- "type": "string",
361
- "attribute": "label",
362
- "reflect": false
363
- },
364
- {
365
- "name": "icon",
366
- "fieldName": "icon",
367
- "type": "string",
368
- "attribute": null,
369
- "reflect": false
370
- },
371
- {
372
- "name": "headerHidden",
373
- "fieldName": "headerHidden",
374
- "type": "boolean",
375
- "attribute": null,
376
- "reflect": false
377
- }
378
- ]
379
- }
380
- }
381
- };
382
- const __compiledProperties = [
383
- {
384
- "name": "type",
385
- "attribute": "type",
386
- "type": "string",
387
- "converter": "string",
388
- "reflect": true,
389
- "default": "info"
390
- },
391
- {
392
- "name": "label",
393
- "attribute": "label",
394
- "type": "string",
395
- "converter": "string",
396
- "reflect": false,
397
- "default": ""
398
- },
399
- {
400
- "name": "icon",
401
- "attribute": null,
402
- "type": "string",
403
- "converter": "string",
404
- "reflect": false,
405
- "default": null,
406
- "computed": true,
407
- "deps": [
408
- "type"
409
- ]
410
- },
411
- {
412
- "name": "headerHidden",
413
- "attribute": null,
414
- "type": "boolean",
415
- "converter": "boolean",
416
- "reflect": false,
417
- "default": null,
418
- "computed": true,
419
- "deps": [
420
- "label"
421
- ]
422
- }
423
- ];
424
- const __elementMetadata = {
425
- "tag": "open-callout",
426
- "className": "OpenCallout",
427
- "sourceFile": "open-callout.tsx",
428
- "properties": [
429
- {
430
- "name": "type",
431
- "attribute": "type",
432
- "type": "string",
433
- "converter": "string",
434
- "reflect": true,
435
- "default": "info"
436
- },
437
- {
438
- "name": "label",
439
- "attribute": "label",
440
- "type": "string",
441
- "converter": "string",
442
- "reflect": false,
443
- "default": ""
444
- },
445
- {
446
- "name": "icon",
447
- "attribute": null,
448
- "type": "string",
449
- "converter": "string",
450
- "reflect": false,
451
- "default": null,
452
- "computed": true,
453
- "deps": [
454
- "type"
455
- ]
456
- },
457
- {
458
- "name": "headerHidden",
459
- "attribute": null,
460
- "type": "boolean",
461
- "converter": "boolean",
462
- "reflect": false,
463
- "default": null,
464
- "computed": true,
465
- "deps": [
466
- "label"
467
- ]
468
- }
469
- ],
470
- "observedAttributes": [
471
- "type",
472
- "label"
473
- ],
474
- "cem": {
475
- "tagName": "open-callout",
476
- "className": "OpenCallout",
477
- "declaration": {
478
- "name": "OpenCallout",
479
- "module": "open-callout.tsx"
480
- },
481
- "attributes": [
482
- {
483
- "name": "type",
484
- "fieldName": "type",
485
- "type": "string",
486
- "reflect": true
487
- },
488
- {
489
- "name": "label",
490
- "fieldName": "label",
491
- "type": "string",
492
- "reflect": false
493
- }
494
- ],
495
- "members": [
496
- {
497
- "name": "type",
498
- "fieldName": "type",
499
- "type": "string",
500
- "attribute": "type",
501
- "reflect": true
502
- },
503
- {
504
- "name": "label",
505
- "fieldName": "label",
506
- "type": "string",
507
- "attribute": "label",
508
- "reflect": false
509
- },
510
- {
511
- "name": "icon",
512
- "fieldName": "icon",
513
- "type": "string",
514
- "attribute": null,
515
- "reflect": false
516
- },
517
- {
518
- "name": "headerHidden",
519
- "fieldName": "headerHidden",
520
- "type": "boolean",
521
- "attribute": null,
522
- "reflect": false
523
- }
524
- ]
525
- }
526
- };
527
- const __observedAttributes = [
528
- "type",
529
- "label"
530
- ];
531
- const __compiledProps = {
532
- type: {
533
- type: String,
534
- default: 'info',
535
- reflect: true,
536
- attribute: "type"
537
- },
538
- label: {
539
- type: String,
540
- default: '',
541
- reflect: false,
542
- attribute: "label"
543
- },
544
- icon: {
545
- type: Object,
546
- default: undefined,
547
- reflect: false,
548
- attribute: false
549
- },
550
- headerHidden: {
551
- type: Object,
552
- default: undefined,
553
- reflect: false,
554
- attribute: false
555
- }
556
- };
557
- export class OpenCallout extends OpenElement {
558
- static __partProgram = __partProgram;
559
- static __compiledProperties = __compiledProperties;
560
- static __elementMetadata = __elementMetadata;
561
- static props = __compiledProps;
562
- static observedAttributes = __observedAttributes;
563
- static __computedFields = {
564
- icon: (__s)=>computed(()=>CALLOUT_TYPE_ICONS[__s.type.value] ?? CALLOUT_TYPE_ICONS.info),
565
- headerHidden: (__s)=>computed(()=>__s.label.value === '')
566
- };
567
- static styles = [
568
- recipe(`
569
- :host { display: block; }
570
- .callout {
571
- padding: var(--size-3) var(--size-4);
572
- margin: var(--size-3) 0;
573
- border-left: var(--border-size-2) solid var(--brand);
574
- background: var(--brand-subtle);
575
- border-radius: 0 var(--radius-2) var(--radius-2) 0;
576
- }
577
- :host([type='warning']) .callout { border-left-color: var(--warning); background: var(--warning-subtle); }
578
- :host([type='danger']) .callout { border-left-color: var(--error); background: var(--error-subtle); }
579
- :host([type='tip']) .callout { border-left-color: var(--success); background: var(--success-subtle); }
580
- :host([data-theme='light'][type='warning']) .callout { background: rgba(245,158,11,0.06); }
581
- :host([data-theme='light'][type='danger']) .callout { background: rgba(239,68,68,0.06); }
582
- :host([data-theme='light'][type='tip']) .callout { background: rgba(34,197,94,0.06); }
583
- .callout-header {
584
- display: flex; align-items: center; gap: var(--size-1); margin-bottom: var(--size-1);
585
- }
586
- .callout-header[hidden] { display: none; }
587
- .callout-icon { font-size: var(--font-size-0); line-height: 1; flex-shrink: 0; }
588
- .callout-title {
589
- font-size: var(--font-size-0); font-weight: var(--font-weight-6); color: var(--text-primary);
590
- }
591
- .callout-body {
592
- font-size: var(--font-size-1); line-height: var(--font-lineheight-4); color: var(--text-secondary);
593
- }
594
- .callout-body ::slotted(p) { margin: 0; }
595
- `)
596
- ];
597
- type = 'info';
598
- label = '';
599
- render() {
600
- throw new Error('[open:compiled-element] open-callout is compiled to a Part Program; the runtime JSX render path is not available in 0.44.');
601
- }
602
- }
603
- export { __partProgram, __elementMetadata };