@openelement/ui 1.0.0-alpha.10 → 1.0.0-alpha.12
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 +3 -3
- package/package.json +2 -22
- package/src/component-recipes.js +2 -60
- package/src/control-recipe.css +21 -0
- package/src/generated-manifest.json +1 -158
- package/src/index.d.ts +1 -5
- package/src/index.js +1 -5
- package/src/open-button.css +120 -0
- package/src/open-button.js +4 -118
- package/src/open-code-block.css +46 -0
- package/src/open-code-block.js +3 -44
- package/src/open-dialog.css +137 -0
- package/src/open-dialog.js +3 -135
- package/src/open-dropdown.css +28 -0
- package/src/open-dropdown.js +4 -26
- package/src/open-input.css +80 -0
- package/src/open-input.js +4 -78
- package/src/open-theme-toggle.css +53 -0
- package/src/open-theme-toggle.js +3 -51
- package/src/overlay-recipe.css +9 -0
- package/src/register.js +1 -9
- package/src/surface-recipe.css +10 -0
- package/src/theme.css +3 -2
- package/src/open-badge.d.ts +0 -139
- package/src/open-badge.js +0 -242
- package/src/open-callout.d.ts +0 -261
- package/src/open-callout.js +0 -502
- package/src/open-card.d.ts +0 -138
- package/src/open-card.js +0 -244
- package/src/open-tabs.d.ts +0 -190
- package/src/open-tabs.js +0 -331
package/src/open-card.js
DELETED
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { recipe, surfaceRecipe } from "./component-recipes.js";
|
|
2
|
-
import { OpenElement } from "@openelement/element";
|
|
3
|
-
//#region src/open-card.tsx
|
|
4
|
-
const __partProgram = {
|
|
5
|
-
"version": 1,
|
|
6
|
-
"tag": "open-card",
|
|
7
|
-
"root": {
|
|
8
|
-
"id": "root",
|
|
9
|
-
"kind": "shadow-open",
|
|
10
|
-
"nodes": ["e0"]
|
|
11
|
-
},
|
|
12
|
-
"template": [{
|
|
13
|
-
"k": "el",
|
|
14
|
-
"id": "e0",
|
|
15
|
-
"tag": "article",
|
|
16
|
-
"attrs": [["class", "surface"], ["part", "container"]],
|
|
17
|
-
"children": [
|
|
18
|
-
{
|
|
19
|
-
"k": "el",
|
|
20
|
-
"id": "e1",
|
|
21
|
-
"tag": "slot",
|
|
22
|
-
"attrs": [["name", "header"]],
|
|
23
|
-
"children": []
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"k": "el",
|
|
27
|
-
"id": "e2",
|
|
28
|
-
"tag": "div",
|
|
29
|
-
"attrs": [["class", "card-body"], ["part", "body"]],
|
|
30
|
-
"children": [{
|
|
31
|
-
"k": "el",
|
|
32
|
-
"id": "e3",
|
|
33
|
-
"tag": "slot",
|
|
34
|
-
"attrs": [],
|
|
35
|
-
"children": []
|
|
36
|
-
}]
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"k": "el",
|
|
40
|
-
"id": "e4",
|
|
41
|
-
"tag": "slot",
|
|
42
|
-
"attrs": [["name", "footer"]],
|
|
43
|
-
"children": []
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}],
|
|
47
|
-
"parts": [],
|
|
48
|
-
"regions": [],
|
|
49
|
-
"dependencies": [],
|
|
50
|
-
"locations": [
|
|
51
|
-
{
|
|
52
|
-
"id": "e0",
|
|
53
|
-
"kind": "element",
|
|
54
|
-
"tag": "article",
|
|
55
|
-
"path": [0]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"id": "e1",
|
|
59
|
-
"kind": "element",
|
|
60
|
-
"tag": "slot",
|
|
61
|
-
"path": [0, 0]
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"id": "e2",
|
|
65
|
-
"kind": "element",
|
|
66
|
-
"tag": "div",
|
|
67
|
-
"path": [0, 1]
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"id": "e3",
|
|
71
|
-
"kind": "element",
|
|
72
|
-
"tag": "slot",
|
|
73
|
-
"path": [
|
|
74
|
-
0,
|
|
75
|
-
1,
|
|
76
|
-
0
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"id": "e4",
|
|
81
|
-
"kind": "element",
|
|
82
|
-
"tag": "slot",
|
|
83
|
-
"path": [0, 2]
|
|
84
|
-
}
|
|
85
|
-
],
|
|
86
|
-
"metadata": {
|
|
87
|
-
"tag": "open-card",
|
|
88
|
-
"className": "OpenCard",
|
|
89
|
-
"sourceFile": "open-card.tsx",
|
|
90
|
-
"properties": [{
|
|
91
|
-
"name": "variant",
|
|
92
|
-
"attribute": "variant",
|
|
93
|
-
"type": "string",
|
|
94
|
-
"converter": "string",
|
|
95
|
-
"reflect": false,
|
|
96
|
-
"default": ""
|
|
97
|
-
}],
|
|
98
|
-
"observedAttributes": ["variant"],
|
|
99
|
-
"cem": {
|
|
100
|
-
"tagName": "open-card",
|
|
101
|
-
"className": "OpenCard",
|
|
102
|
-
"declaration": {
|
|
103
|
-
"name": "OpenCard",
|
|
104
|
-
"module": "open-card.tsx"
|
|
105
|
-
},
|
|
106
|
-
"attributes": [{
|
|
107
|
-
"name": "variant",
|
|
108
|
-
"fieldName": "variant",
|
|
109
|
-
"type": "string",
|
|
110
|
-
"reflect": false
|
|
111
|
-
}],
|
|
112
|
-
"members": [{
|
|
113
|
-
"name": "variant",
|
|
114
|
-
"fieldName": "variant",
|
|
115
|
-
"type": "string",
|
|
116
|
-
"attribute": "variant",
|
|
117
|
-
"reflect": false
|
|
118
|
-
}]
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
const __compiledProperties = [{
|
|
123
|
-
"name": "variant",
|
|
124
|
-
"attribute": "variant",
|
|
125
|
-
"type": "string",
|
|
126
|
-
"converter": "string",
|
|
127
|
-
"reflect": false,
|
|
128
|
-
"default": ""
|
|
129
|
-
}];
|
|
130
|
-
const __elementMetadata = {
|
|
131
|
-
"tag": "open-card",
|
|
132
|
-
"className": "OpenCard",
|
|
133
|
-
"sourceFile": "open-card.tsx",
|
|
134
|
-
"properties": [{
|
|
135
|
-
"name": "variant",
|
|
136
|
-
"attribute": "variant",
|
|
137
|
-
"type": "string",
|
|
138
|
-
"converter": "string",
|
|
139
|
-
"reflect": false,
|
|
140
|
-
"default": ""
|
|
141
|
-
}],
|
|
142
|
-
"observedAttributes": ["variant"],
|
|
143
|
-
"cem": {
|
|
144
|
-
"tagName": "open-card",
|
|
145
|
-
"className": "OpenCard",
|
|
146
|
-
"declaration": {
|
|
147
|
-
"name": "OpenCard",
|
|
148
|
-
"module": "open-card.tsx"
|
|
149
|
-
},
|
|
150
|
-
"attributes": [{
|
|
151
|
-
"name": "variant",
|
|
152
|
-
"fieldName": "variant",
|
|
153
|
-
"type": "string",
|
|
154
|
-
"reflect": false
|
|
155
|
-
}],
|
|
156
|
-
"members": [{
|
|
157
|
-
"name": "variant",
|
|
158
|
-
"fieldName": "variant",
|
|
159
|
-
"type": "string",
|
|
160
|
-
"attribute": "variant",
|
|
161
|
-
"reflect": false
|
|
162
|
-
}]
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
const __observedAttributes = ["variant"];
|
|
166
|
-
const __compiledProps = { variant: {
|
|
167
|
-
type: String,
|
|
168
|
-
default: "",
|
|
169
|
-
reflect: false,
|
|
170
|
-
attribute: "variant"
|
|
171
|
-
} };
|
|
172
|
-
var OpenCard = class extends OpenElement {
|
|
173
|
-
static __partProgram = __partProgram;
|
|
174
|
-
static __compiledProperties = __compiledProperties;
|
|
175
|
-
static __elementMetadata = __elementMetadata;
|
|
176
|
-
static props = __compiledProps;
|
|
177
|
-
static observedAttributes = __observedAttributes;
|
|
178
|
-
static styles = [surfaceRecipe, recipe(`
|
|
179
|
-
:host {
|
|
180
|
-
display: block;
|
|
181
|
-
background:
|
|
182
|
-
linear-gradient(135deg, color-mix(in srgb, var(--color-secondary) 14%, transparent), transparent 48%),
|
|
183
|
-
var(--color-card);
|
|
184
|
-
color: var(--color-foreground);
|
|
185
|
-
border: calc(var(--spacing) * 0.25) solid var(--color-border);
|
|
186
|
-
border-radius: var(--radius-md);
|
|
187
|
-
overflow: hidden;
|
|
188
|
-
transition: border-color var(--ease-out) var(--default-transition-duration), background var(--ease-out) var(--default-transition-duration), box-shadow var(--ease-out) var(--default-transition-duration);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
:host([variant='elevated']) {
|
|
192
|
-
box-shadow: 0 calc(var(--spacing) * 2) calc(var(--spacing) * 8) color-mix(in srgb, var(--color-primary) 8%, transparent);
|
|
193
|
-
border-color: var(--color-border);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
:host([variant='elevated']:hover) {
|
|
197
|
-
border-color: var(--color-primary);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
:host([variant='borderless']) {
|
|
201
|
-
border-color: transparent;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
:host([variant='muted']) {
|
|
205
|
-
background: var(--color-muted);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/* Artifact: a permanently-dark code panel in BOTH themes (the same static
|
|
209
|
-
zinc surface open-code-block paints), so ink/border are static ramp
|
|
210
|
-
steps — theme-flipping inks would invert against the fixed surface. */
|
|
211
|
-
:host([variant='artifact']) {
|
|
212
|
-
background: var(--color-zinc-950);
|
|
213
|
-
color: var(--color-zinc-200);
|
|
214
|
-
border-color: var(--color-zinc-700);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
::slotted([slot='header']) {
|
|
218
|
-
padding: calc(var(--spacing) * 4) calc(var(--spacing) * 5);
|
|
219
|
-
border-bottom: calc(var(--spacing) * 0.25) solid var(--color-border);
|
|
220
|
-
font-size: var(--text-xl);
|
|
221
|
-
font-weight: var(--font-weight-semibold);
|
|
222
|
-
color: var(--color-foreground);
|
|
223
|
-
margin: 0;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.card-body {
|
|
227
|
-
padding: calc(var(--spacing) * 5);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
::slotted([slot='footer']) {
|
|
231
|
-
padding: calc(var(--spacing) * 3) calc(var(--spacing) * 5);
|
|
232
|
-
border-top: calc(var(--spacing) * 0.25) solid var(--color-border);
|
|
233
|
-
font-size: var(--text-sm);
|
|
234
|
-
color: var(--color-muted-foreground);
|
|
235
|
-
margin: 0;
|
|
236
|
-
}
|
|
237
|
-
`)];
|
|
238
|
-
variant = "";
|
|
239
|
-
render() {
|
|
240
|
-
throw new Error("[open:compiled-element] open-card is compiled to a Part Program; the runtime JSX render path is not available.");
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
//#endregion
|
|
244
|
-
export { OpenCard, __elementMetadata, __partProgram };
|
package/src/open-tabs.d.ts
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { OpenElement, StyleSheetLike } from "@openelement/element";
|
|
2
|
-
//#region src/open-tabs.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: never[];
|
|
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
|
-
event: string;
|
|
33
|
-
handler: string;
|
|
34
|
-
action: {
|
|
35
|
-
kind: string;
|
|
36
|
-
name: string;
|
|
37
|
-
};
|
|
38
|
-
path: number[];
|
|
39
|
-
index: number;
|
|
40
|
-
location: {
|
|
41
|
-
id: string;
|
|
42
|
-
kind: string;
|
|
43
|
-
path: number[];
|
|
44
|
-
node: string;
|
|
45
|
-
};
|
|
46
|
-
}[];
|
|
47
|
-
regions: never[];
|
|
48
|
-
dependencies: never[];
|
|
49
|
-
locations: ({
|
|
50
|
-
id: string;
|
|
51
|
-
kind: string;
|
|
52
|
-
tag: string;
|
|
53
|
-
path: number[];
|
|
54
|
-
part?: undefined;
|
|
55
|
-
node?: undefined;
|
|
56
|
-
} | {
|
|
57
|
-
id: string;
|
|
58
|
-
kind: string;
|
|
59
|
-
part: number;
|
|
60
|
-
node: string;
|
|
61
|
-
path: number[];
|
|
62
|
-
tag?: undefined;
|
|
63
|
-
})[];
|
|
64
|
-
metadata: {
|
|
65
|
-
tag: string;
|
|
66
|
-
className: string;
|
|
67
|
-
sourceFile: string;
|
|
68
|
-
properties: ({
|
|
69
|
-
name: string;
|
|
70
|
-
attribute: null;
|
|
71
|
-
type: string;
|
|
72
|
-
converter: string;
|
|
73
|
-
reflect: boolean;
|
|
74
|
-
default: number;
|
|
75
|
-
} | {
|
|
76
|
-
name: string;
|
|
77
|
-
attribute: null;
|
|
78
|
-
type: string;
|
|
79
|
-
converter: string;
|
|
80
|
-
reflect: boolean;
|
|
81
|
-
default: string;
|
|
82
|
-
})[];
|
|
83
|
-
observedAttributes: never[];
|
|
84
|
-
cem: {
|
|
85
|
-
tagName: string;
|
|
86
|
-
className: string;
|
|
87
|
-
declaration: {
|
|
88
|
-
name: string;
|
|
89
|
-
module: string;
|
|
90
|
-
};
|
|
91
|
-
attributes: never[];
|
|
92
|
-
members: {
|
|
93
|
-
name: string;
|
|
94
|
-
fieldName: string;
|
|
95
|
-
type: string;
|
|
96
|
-
attribute: null;
|
|
97
|
-
reflect: boolean;
|
|
98
|
-
}[];
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
declare const __compiledProperties: ({
|
|
103
|
-
name: string;
|
|
104
|
-
attribute: null;
|
|
105
|
-
type: string;
|
|
106
|
-
converter: string;
|
|
107
|
-
reflect: boolean;
|
|
108
|
-
default: number;
|
|
109
|
-
} | {
|
|
110
|
-
name: string;
|
|
111
|
-
attribute: null;
|
|
112
|
-
type: string;
|
|
113
|
-
converter: string;
|
|
114
|
-
reflect: boolean;
|
|
115
|
-
default: string;
|
|
116
|
-
})[];
|
|
117
|
-
declare const __elementMetadata: {
|
|
118
|
-
tag: string;
|
|
119
|
-
className: string;
|
|
120
|
-
sourceFile: string;
|
|
121
|
-
properties: ({
|
|
122
|
-
name: string;
|
|
123
|
-
attribute: null;
|
|
124
|
-
type: string;
|
|
125
|
-
converter: string;
|
|
126
|
-
reflect: boolean;
|
|
127
|
-
default: number;
|
|
128
|
-
} | {
|
|
129
|
-
name: string;
|
|
130
|
-
attribute: null;
|
|
131
|
-
type: string;
|
|
132
|
-
converter: string;
|
|
133
|
-
reflect: boolean;
|
|
134
|
-
default: string;
|
|
135
|
-
})[];
|
|
136
|
-
observedAttributes: never[];
|
|
137
|
-
cem: {
|
|
138
|
-
tagName: string;
|
|
139
|
-
className: string;
|
|
140
|
-
declaration: {
|
|
141
|
-
name: string;
|
|
142
|
-
module: string;
|
|
143
|
-
};
|
|
144
|
-
attributes: never[];
|
|
145
|
-
members: {
|
|
146
|
-
name: string;
|
|
147
|
-
fieldName: string;
|
|
148
|
-
type: string;
|
|
149
|
-
attribute: null;
|
|
150
|
-
reflect: boolean;
|
|
151
|
-
}[];
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
declare const __observedAttributes: string[];
|
|
155
|
-
declare const __compiledProps: {
|
|
156
|
-
active: {
|
|
157
|
-
type: NumberConstructor;
|
|
158
|
-
default: number;
|
|
159
|
-
reflect: boolean;
|
|
160
|
-
attribute: boolean;
|
|
161
|
-
};
|
|
162
|
-
tabsId: {
|
|
163
|
-
type: StringConstructor;
|
|
164
|
-
default: string;
|
|
165
|
-
reflect: boolean;
|
|
166
|
-
attribute: boolean;
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
export declare class OpenTabs extends OpenElement {
|
|
170
|
-
static __partProgram: typeof __partProgram;
|
|
171
|
-
static __compiledProperties: typeof __compiledProperties;
|
|
172
|
-
static __elementMetadata: typeof __elementMetadata;
|
|
173
|
-
static props: typeof __compiledProps;
|
|
174
|
-
static observedAttributes: typeof __observedAttributes;
|
|
175
|
-
static styles: StyleSheetLike[];
|
|
176
|
-
active: number;
|
|
177
|
-
tabsId: string;
|
|
178
|
-
onDsdHydrated(): void;
|
|
179
|
-
onCsrRendered(): void;
|
|
180
|
-
disconnectedCallback(): void;
|
|
181
|
-
private activate;
|
|
182
|
-
private tabs;
|
|
183
|
-
private count;
|
|
184
|
-
select(idx: number): void;
|
|
185
|
-
private onKeydown;
|
|
186
|
-
private decorate;
|
|
187
|
-
render(): never;
|
|
188
|
-
}
|
|
189
|
-
//#endregion
|
|
190
|
-
export { __elementMetadata, __partProgram };
|