@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.
- package/CUSTOMIZATION.md +272 -0
- package/README.md +59 -54
- package/package.json +19 -33
- package/src/component-recipes.js +39 -100
- package/src/control-recipe.css +21 -0
- package/src/generated-manifest.json +13 -160
- package/src/index.d.ts +10 -42
- package/src/index.js +10 -46
- package/src/instance-state.d.ts +16 -0
- package/src/instance-state.js +30 -24
- package/src/manifest.d.ts +5 -9
- package/src/manifest.js +6 -11
- package/src/open-button.css +120 -0
- package/src/open-button.d.ts +296 -898
- package/src/open-button.js +1130 -1436
- package/src/open-code-block.css +46 -0
- package/src/open-code-block.d.ts +158 -168
- package/src/open-code-block.js +224 -468
- package/src/open-dialog.css +137 -0
- package/src/open-dialog.d.ts +241 -424
- package/src/open-dialog.js +626 -903
- package/src/open-dropdown.css +28 -0
- package/src/open-dropdown.d.ts +195 -252
- package/src/open-dropdown.js +352 -494
- package/src/open-input.css +80 -0
- package/src/open-input.d.ts +404 -1420
- package/src/open-input.js +1789 -2170
- package/src/open-theme-toggle.css +53 -0
- package/src/open-theme-toggle.d.ts +171 -287
- package/src/open-theme-toggle.js +512 -801
- package/src/overlay-recipe.css +9 -0
- package/src/register.d.ts +4 -1
- package/src/register.js +19 -58
- package/src/surface-recipe.css +10 -0
- package/src/theme.css +206 -0
- package/THIRD_PARTY_NOTICES.md +0 -45
- package/src/open-badge.d.ts +0 -185
- package/src/open-badge.js +0 -296
- package/src/open-callout.d.ts +0 -402
- package/src/open-callout.js +0 -603
- package/src/open-card.d.ts +0 -168
- package/src/open-card.js +0 -310
- package/src/open-props-tokens.d.ts +0 -9
- package/src/open-props-tokens.js +0 -459
- package/src/open-tabs.d.ts +0 -218
- package/src/open-tabs.js +0 -401
- 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
|
+
|
package/src/open-code-block.d.ts
CHANGED
|
@@ -1,173 +1,169 @@
|
|
|
1
|
-
import { OpenElement,
|
|
1
|
+
import { OpenElement, StyleSheetLike } from "@openelement/element";
|
|
2
|
+
//#region src/open-code-block.d.ts
|
|
2
3
|
declare const __partProgram: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
version: number;
|
|
5
|
+
tag: string;
|
|
6
|
+
root: {
|
|
7
|
+
id: string;
|
|
8
|
+
kind: string;
|
|
9
|
+
nodes: string[];
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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
|
-
|
|
182
|
-
|
|
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
|
-
|
|
181
|
+
//#endregion
|
|
182
|
+
export { __elementMetadata, __partProgram };
|