@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,46 @@
1
+ /* open-code-block — 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: block;
7
+ position: relative;
8
+ }
9
+
10
+ .copy-btn {
11
+ position: absolute;
12
+ top: calc(var(--spacing) * 2);
13
+ right: calc(var(--spacing) * 2);
14
+ background: color-mix(in srgb, var(--color-primary) 14%, transparent);
15
+ color: var(--color-foreground);
16
+ padding: calc(var(--spacing) * 1) calc(var(--spacing) * 3);
17
+ font-size: var(--text-xs);
18
+ font-family: var(--font-sans);
19
+ font-weight: var(--font-weight-semibold);
20
+ border: 0.5px solid transparent;
21
+ cursor: pointer;
22
+ border-radius: var(--radius-md);
23
+ transition: all var(--ease-in-out) var(--default-transition-duration);
24
+ z-index: 1;
25
+ letter-spacing: var(--tracking-wider);
26
+ }
27
+
28
+ /* No ink override on hover: the primary-foreground ink belongs to a brand
29
+ *fill*, and this chip's hover surface is a translucent brand tint
30
+ instead, so the chip keeps the code surface's ink. */
31
+ .copy-btn:hover {
32
+ background: color-mix(in srgb, var(--color-primary) 23%, transparent);
33
+ border-color: var(--color-primary);
34
+ }
35
+
36
+ :host(:state(copied)) .copy-btn {
37
+ color: #22c55e;
38
+ border-color: rgba(34,197,94,0.3);
39
+ background: rgba(34,197,94,0.08);
40
+ }
41
+
42
+ :host(:state(failed)) .copy-btn {
43
+ color: var(--color-destructive);
44
+ border-color: var(--color-destructive);
45
+ }
46
+
@@ -1,173 +1,169 @@
1
- import { OpenElement, type StyleSheetLike } from '@openelement/element';
1
+ import { OpenElement, StyleSheetLike } from "@openelement/element";
2
+ //#region src/open-code-block.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]];
15
- readonly "children": readonly [{
16
- readonly "k": string;
17
- readonly "id": string;
18
- readonly "tag": string;
19
- readonly "attrs": readonly [];
20
- readonly "children": readonly [];
21
- }, {
22
- readonly "k": string;
23
- readonly "id": string;
24
- readonly "tag": string;
25
- readonly "attrs": readonly [readonly [string, string], readonly [string, string], readonly [string, string]];
26
- readonly "children": readonly [{
27
- readonly "k": string;
28
- readonly "id": string;
29
- readonly "index": number;
30
- }];
31
- }];
32
- }];
33
- readonly "parts": readonly [{
34
- readonly "k": string;
35
- readonly "event": string;
36
- readonly "handler": string;
37
- readonly "action": {
38
- readonly "kind": string;
39
- readonly "name": string;
40
- };
41
- readonly "path": readonly [number, number];
42
- readonly "index": number;
43
- readonly "location": {
44
- readonly "id": string;
45
- readonly "kind": string;
46
- readonly "path": readonly [number, number];
47
- readonly "node": string;
48
- };
49
- }, {
50
- readonly "k": string;
51
- readonly "signal": string;
52
- readonly "index": number;
53
- readonly "location": {
54
- readonly "id": string;
55
- readonly "kind": string;
56
- readonly "path": readonly [number, number, number];
57
- };
58
- }];
59
- readonly "regions": readonly [];
60
- readonly "dependencies": readonly [{
61
- readonly "signal": string;
62
- readonly "owner": {
63
- readonly "kind": string;
64
- readonly "index": number;
65
- };
66
- readonly "location": string;
67
- }];
68
- readonly "locations": readonly [{
69
- readonly "id": string;
70
- readonly "kind": string;
71
- readonly "tag": string;
72
- readonly "path": readonly [number];
73
- }, {
74
- readonly "id": string;
75
- readonly "kind": string;
76
- readonly "tag": string;
77
- readonly "path": readonly [number, number];
78
- }, {
79
- readonly "id": string;
80
- readonly "kind": string;
81
- readonly "tag": string;
82
- readonly "path": readonly [number, number];
83
- }, {
84
- readonly "id": string;
85
- readonly "kind": string;
86
- readonly "part": number;
87
- readonly "node": string;
88
- readonly "path": readonly [number, number];
89
- }, {
90
- readonly "id": string;
91
- readonly "kind": string;
92
- readonly "part": number;
93
- readonly "path": readonly [number, number, number];
94
- }];
95
- readonly "metadata": {
96
- readonly "tag": string;
97
- readonly "className": string;
98
- readonly "sourceFile": string;
99
- readonly "properties": readonly [{
100
- readonly "name": string;
101
- readonly "attribute": null;
102
- readonly "type": string;
103
- readonly "converter": string;
104
- readonly "reflect": boolean;
105
- readonly "default": string;
106
- }];
107
- readonly "observedAttributes": readonly [];
108
- readonly "cem": {
109
- readonly "tagName": string;
110
- readonly "className": string;
111
- readonly "declaration": {
112
- readonly "name": string;
113
- 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
+ index: number;
25
+ }[];
26
+ }[];
27
+ }[];
28
+ parts: ({
29
+ k: string;
30
+ event: string;
31
+ handler: string;
32
+ action: {
33
+ kind: string;
34
+ name: string;
35
+ };
36
+ path: number[];
37
+ index: number;
38
+ location: {
39
+ id: string;
40
+ kind: string;
41
+ path: number[];
42
+ node: string;
43
+ };
44
+ signal?: undefined;
45
+ } | {
46
+ k: string;
47
+ signal: string;
48
+ index: number;
49
+ location: {
50
+ id: string;
51
+ kind: string;
52
+ path: number[];
53
+ node?: undefined;
54
+ };
55
+ event?: undefined;
56
+ handler?: undefined;
57
+ action?: undefined;
58
+ path?: undefined;
59
+ })[];
60
+ regions: never[];
61
+ dependencies: {
62
+ signal: string;
63
+ owner: {
64
+ kind: string;
65
+ index: number;
66
+ };
67
+ location: string;
68
+ }[];
69
+ locations: ({
70
+ id: string;
71
+ kind: string;
72
+ tag: string;
73
+ path: number[];
74
+ part?: undefined;
75
+ node?: undefined;
76
+ } | {
77
+ id: string;
78
+ kind: string;
79
+ part: number;
80
+ node: string;
81
+ path: number[];
82
+ tag?: undefined;
83
+ } | {
84
+ id: string;
85
+ kind: string;
86
+ part: number;
87
+ path: number[];
88
+ tag?: undefined;
89
+ node?: undefined;
90
+ })[];
91
+ metadata: {
92
+ tag: string;
93
+ className: string;
94
+ sourceFile: string;
95
+ properties: {
96
+ name: string;
97
+ attribute: null;
98
+ type: string;
99
+ converter: string;
100
+ reflect: boolean;
101
+ default: string;
102
+ }[];
103
+ observedAttributes: never[];
104
+ cem: {
105
+ tagName: string;
106
+ className: string;
107
+ declaration: {
108
+ name: string;
109
+ module: string;
114
110
  };
115
- readonly "attributes": readonly [];
116
- readonly "members": readonly [{
117
- readonly "name": string;
118
- readonly "fieldName": string;
119
- readonly "type": string;
120
- readonly "attribute": null;
121
- readonly "reflect": boolean;
122
- }];
111
+ attributes: never[];
112
+ members: {
113
+ name: string;
114
+ fieldName: string;
115
+ type: string;
116
+ attribute: null;
117
+ reflect: boolean;
118
+ }[];
123
119
  };
124
120
  };
125
121
  };
126
- declare const __compiledProperties: readonly [{
127
- readonly "name": string;
128
- readonly "attribute": null;
129
- readonly "type": string;
130
- readonly "converter": string;
131
- readonly "reflect": boolean;
132
- readonly "default": string;
133
- }];
122
+ declare const __compiledProperties: {
123
+ name: string;
124
+ attribute: null;
125
+ type: string;
126
+ converter: string;
127
+ reflect: boolean;
128
+ default: string;
129
+ }[];
134
130
  declare const __elementMetadata: {
135
- readonly "tag": string;
136
- readonly "className": string;
137
- readonly "sourceFile": string;
138
- readonly "properties": readonly [{
139
- readonly "name": string;
140
- readonly "attribute": null;
141
- readonly "type": string;
142
- readonly "converter": string;
143
- readonly "reflect": boolean;
144
- readonly "default": string;
145
- }];
146
- readonly "observedAttributes": readonly [];
147
- readonly "cem": {
148
- readonly "tagName": string;
149
- readonly "className": string;
150
- readonly "declaration": {
151
- readonly "name": string;
152
- readonly "module": string;
131
+ tag: string;
132
+ className: string;
133
+ sourceFile: string;
134
+ properties: {
135
+ name: string;
136
+ attribute: null;
137
+ type: string;
138
+ converter: string;
139
+ reflect: boolean;
140
+ default: string;
141
+ }[];
142
+ observedAttributes: never[];
143
+ cem: {
144
+ tagName: string;
145
+ className: string;
146
+ declaration: {
147
+ name: string;
148
+ module: string;
153
149
  };
154
- readonly "attributes": readonly [];
155
- readonly "members": readonly [{
156
- readonly "name": string;
157
- readonly "fieldName": string;
158
- readonly "type": string;
159
- readonly "attribute": null;
160
- readonly "reflect": boolean;
161
- }];
150
+ attributes: never[];
151
+ members: {
152
+ name: string;
153
+ fieldName: string;
154
+ type: string;
155
+ attribute: null;
156
+ reflect: boolean;
157
+ }[];
162
158
  };
163
159
  };
164
160
  declare const __observedAttributes: string[];
165
161
  declare const __compiledProps: {
166
- readonly copyLabel: {
167
- readonly type;
168
- readonly default: string;
169
- readonly reflect: boolean;
170
- readonly attribute: boolean;
162
+ copyLabel: {
163
+ type: StringConstructor;
164
+ default: string;
165
+ reflect: boolean;
166
+ attribute: boolean;
171
167
  };
172
168
  };
173
169
  export declare class OpenCodeBlock extends OpenElement {
@@ -178,15 +174,9 @@ export declare class OpenCodeBlock extends OpenElement {
178
174
  static observedAttributes: typeof __observedAttributes;
179
175
  static styles: StyleSheetLike[];
180
176
  copyLabel: string;
181
- override onDsdHydrated(): void;
182
- override onCsrRendered(): void;
183
- override disconnectedCallback(): void;
184
- private prismGlobal: any;
185
- private tryHighlight: any;
186
- private scheduleRetry: any;
187
- private injectHighlighted: any;
188
- private getCodeText: any;
189
- private copy: any;
177
+ private getCodeText;
178
+ private copy;
190
179
  render(): never;
191
180
  }
192
- export { __partProgram, __elementMetadata };
181
+ //#endregion
182
+ export { __elementMetadata, __partProgram };