@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.
- package/CUSTOMIZATION.md +106 -112
- package/README.md +19 -39
- package/custom-elements.json +369 -0
- package/package.json +3 -2
- package/src/button-machine.js +54 -0
- package/src/component-config.js +7 -0
- package/src/component-recipes.js +2 -24
- package/src/copy-feedback.js +32 -0
- package/src/dialog-machine.js +104 -0
- package/src/dropdown-machine.js +253 -0
- package/src/generated-manifest.json +135 -87
- package/src/index.d.ts +7 -8
- package/src/index.js +7 -8
- package/src/input-machine.js +33 -0
- package/src/open-button.css +119 -108
- package/src/open-button.d.ts +34 -342
- package/src/open-button.generated.js +592 -0
- package/src/open-button.js +115 -1140
- package/src/open-code-block.css +24 -44
- package/src/open-code-block.d.ts +15 -175
- package/src/open-code-block.generated.js +293 -0
- package/src/open-code-block.js +112 -224
- package/src/open-dialog.css +114 -127
- package/src/open-dialog.d.ts +22 -261
- package/src/open-dialog.generated.js +501 -0
- package/src/open-dialog.js +137 -632
- package/src/open-dropdown.css +26 -26
- package/src/open-dropdown.d.ts +15 -218
- package/src/open-dropdown.generated.js +211 -0
- package/src/open-dropdown.js +74 -355
- package/src/open-input.css +69 -74
- package/src/open-input.d.ts +34 -461
- package/src/open-input.generated.js +685 -0
- package/src/open-input.js +161 -1802
- package/src/open-theme-toggle.css +37 -47
- package/src/open-theme-toggle.d.ts +19 -190
- package/src/open-theme-toggle.generated.js +564 -0
- package/src/open-theme-toggle.js +209 -509
- package/src/theme-contract.js +40 -0
- package/src/theme.css +26 -8
- package/src/control-recipe.css +0 -21
- package/src/register.d.ts +0 -4
- package/src/register.js +0 -22
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import { MARKERS, assertElementInHtmlNamespace, assertSafeUrlAttribute, assertStaticAttributeSeed, assertWhenAnchor, assertWhenEndMarker, attributeValueOf, bindSignalWrites, createRecipe, emitComment, escapeAttrValue, isWhenEndMarker, leafClaimMismatch, leafRuntimeError, markerText, removeNodes, runUntracked } from "@openelement/element/internal/compiled/leaf-runtime";
|
|
2
|
+
import { activateButton } from "./button-machine.js";
|
|
3
|
+
function __oe_rootInstance(__oe_owner, __oe_host) {
|
|
4
|
+
const hostOf = ((event) => ((event.currentTarget).getRootNode()).host);
|
|
5
|
+
return { hostOf };
|
|
6
|
+
}
|
|
7
|
+
function OpenButton__mount(__oe_scope, __oe_props, __oe_host) {
|
|
8
|
+
const props = __oe_props;
|
|
9
|
+
const __oe_nodes = [];
|
|
10
|
+
const __oe_setup = __oe_host.bindings ?? {};
|
|
11
|
+
const __oe_requireRootSetup = (name) => { if (!Object.hasOwn(__oe_setup, name))
|
|
12
|
+
throw new Error("OEIR_LEAF_MISSING_VALUE: " + name); return __oe_setup[name]; };
|
|
13
|
+
const hostOf = __oe_requireRootSetup("hostOf");
|
|
14
|
+
const __oe_el0 = document.createElement("span");
|
|
15
|
+
__oe_el0.setAttribute("style", "display:contents");
|
|
16
|
+
const __oe_eventHandler1 = ((event) => {
|
|
17
|
+
activateButton(hostOf(event), event, () => {
|
|
18
|
+
hostOf(event).dispatchEvent(new globalThis.CustomEvent('open-click', { bubbles: true, composed: true }));
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
if (typeof __oe_eventHandler1 !== "function")
|
|
22
|
+
throw leafRuntimeError("OEIR_LEAF_EVENT_HANDLER_INVALID", "onClick handler is not callable", { file: "src/open-button.tsx", line: 104, column: 7 });
|
|
23
|
+
const __oe_eventListener2 = (event) => __oe_eventHandler1(event);
|
|
24
|
+
__oe_el0.addEventListener("click", __oe_eventListener2);
|
|
25
|
+
__oe_scope.add(() => __oe_el0.removeEventListener("click", __oe_eventListener2));
|
|
26
|
+
const __oe_whenAnchor3 = emitComment(MARKERS.when);
|
|
27
|
+
function __oe_whenThen3(__oe_whenThenScope3) {
|
|
28
|
+
const __oe_nodes = [];
|
|
29
|
+
const __oe_el4 = document.createElement("button");
|
|
30
|
+
__oe_el4.setAttribute("type", "button");
|
|
31
|
+
__oe_el4.setAttribute("class", "btn inline-flex items-center justify-center gap-2 font-sans font-extrabold no-underline cursor-pointer rounded-md whitespace-nowrap focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-ring disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none");
|
|
32
|
+
__oe_el4.setAttribute("part", "control");
|
|
33
|
+
function __oe_refresh5() {
|
|
34
|
+
__oe_el4.toggleAttribute("disabled", Boolean((props.disabled)));
|
|
35
|
+
}
|
|
36
|
+
__oe_refresh5();
|
|
37
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
38
|
+
bindSignalWrites(__oe_whenThenScope3, __oe_propDep, "props", __oe_refresh5);
|
|
39
|
+
const __oe_el6 = document.createElement("slot");
|
|
40
|
+
__oe_el4.appendChild(__oe_el6);
|
|
41
|
+
__oe_nodes.push(__oe_el4);
|
|
42
|
+
return __oe_nodes;
|
|
43
|
+
}
|
|
44
|
+
function __oe_whenElse3(__oe_whenElseScope3) {
|
|
45
|
+
const __oe_nodes = [];
|
|
46
|
+
const __oe_el7 = document.createElement("a");
|
|
47
|
+
__oe_el7.setAttribute("class", "btn inline-flex items-center justify-center gap-2 font-sans font-extrabold no-underline cursor-pointer rounded-md whitespace-nowrap focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-ring aria-disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none");
|
|
48
|
+
__oe_el7.setAttribute("part", "control");
|
|
49
|
+
function __oe_refresh8() {
|
|
50
|
+
const __oe_value9 = attributeValueOf((props.disabled ? null : props.href));
|
|
51
|
+
if (__oe_value9 === null)
|
|
52
|
+
__oe_el7.removeAttribute("href");
|
|
53
|
+
else {
|
|
54
|
+
assertSafeUrlAttribute("href", __oe_value9);
|
|
55
|
+
__oe_el7.setAttribute("href", __oe_value9);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
__oe_refresh8();
|
|
59
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
60
|
+
bindSignalWrites(__oe_whenElseScope3, __oe_propDep, "props", __oe_refresh8);
|
|
61
|
+
function __oe_refresh10() {
|
|
62
|
+
const __oe_value11 = attributeValueOf((props.target === '' ? null : props.target));
|
|
63
|
+
if (__oe_value11 === null)
|
|
64
|
+
__oe_el7.removeAttribute("target");
|
|
65
|
+
else {
|
|
66
|
+
assertSafeUrlAttribute("target", __oe_value11);
|
|
67
|
+
__oe_el7.setAttribute("target", __oe_value11);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
__oe_refresh10();
|
|
71
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
72
|
+
bindSignalWrites(__oe_whenElseScope3, __oe_propDep, "props", __oe_refresh10);
|
|
73
|
+
function __oe_refresh12() {
|
|
74
|
+
const __oe_value13 = attributeValueOf((props.target === '_blank' ? 'noopener noreferrer' : null));
|
|
75
|
+
if (__oe_value13 === null)
|
|
76
|
+
__oe_el7.removeAttribute("rel");
|
|
77
|
+
else {
|
|
78
|
+
assertSafeUrlAttribute("rel", __oe_value13);
|
|
79
|
+
__oe_el7.setAttribute("rel", __oe_value13);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
__oe_refresh12();
|
|
83
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
84
|
+
bindSignalWrites(__oe_whenElseScope3, __oe_propDep, "props", __oe_refresh12);
|
|
85
|
+
function __oe_refresh14() {
|
|
86
|
+
const __oe_value15 = attributeValueOf((props.disabled ? 'true' : null));
|
|
87
|
+
if (__oe_value15 === null)
|
|
88
|
+
__oe_el7.removeAttribute("aria-disabled");
|
|
89
|
+
else {
|
|
90
|
+
assertSafeUrlAttribute("aria-disabled", __oe_value15);
|
|
91
|
+
__oe_el7.setAttribute("aria-disabled", __oe_value15);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
__oe_refresh14();
|
|
95
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
96
|
+
bindSignalWrites(__oe_whenElseScope3, __oe_propDep, "props", __oe_refresh14);
|
|
97
|
+
const __oe_el16 = document.createElement("slot");
|
|
98
|
+
__oe_el7.appendChild(__oe_el16);
|
|
99
|
+
__oe_nodes.push(__oe_el7);
|
|
100
|
+
return __oe_nodes;
|
|
101
|
+
}
|
|
102
|
+
let __oe_whenActive3 = -1;
|
|
103
|
+
let __oe_whenOwner3 = null;
|
|
104
|
+
function __oe_whenRefresh3(force) {
|
|
105
|
+
const __oe_next = (props.href === '') ? 1 : 2;
|
|
106
|
+
if (!force && __oe_next === __oe_whenActive3)
|
|
107
|
+
return;
|
|
108
|
+
__oe_whenActive3 = -1;
|
|
109
|
+
if (__oe_whenOwner3 !== null)
|
|
110
|
+
__oe_whenOwner3.dispose(true);
|
|
111
|
+
__oe_whenOwner3 = null;
|
|
112
|
+
const __oe_branchOwner = __oe_scope.child();
|
|
113
|
+
let __oe_branchNodes;
|
|
114
|
+
try {
|
|
115
|
+
__oe_branchNodes = runUntracked(() => __oe_next === 1 ? __oe_whenThen3(__oe_branchOwner) : __oe_whenElse3(__oe_branchOwner));
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
__oe_whenActive3 = -1;
|
|
119
|
+
__oe_branchOwner.dispose(true);
|
|
120
|
+
throw error;
|
|
121
|
+
}
|
|
122
|
+
__oe_branchOwner.addRangeCleanup(() => removeNodes(__oe_branchNodes));
|
|
123
|
+
const __oe_parent = __oe_whenAnchor3.parentNode;
|
|
124
|
+
if (__oe_parent !== null) {
|
|
125
|
+
for (const __oe_child of __oe_branchNodes)
|
|
126
|
+
__oe_parent.insertBefore(__oe_child, __oe_whenEnd3);
|
|
127
|
+
}
|
|
128
|
+
__oe_whenActive3 = __oe_next;
|
|
129
|
+
__oe_whenOwner3 = __oe_branchOwner;
|
|
130
|
+
}
|
|
131
|
+
const __oe_initialOwner3 = __oe_scope.child();
|
|
132
|
+
const __oe_initialTest3 = (props.href === '');
|
|
133
|
+
let __oe_initialNodes3;
|
|
134
|
+
try {
|
|
135
|
+
__oe_initialNodes3 = __oe_initialTest3 ? __oe_whenThen3(__oe_initialOwner3) : __oe_whenElse3(__oe_initialOwner3);
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
__oe_initialOwner3.dispose(true);
|
|
139
|
+
throw error;
|
|
140
|
+
}
|
|
141
|
+
__oe_initialOwner3.addRangeCleanup(() => removeNodes(__oe_initialNodes3));
|
|
142
|
+
__oe_whenActive3 = __oe_initialTest3 ? 1 : 2;
|
|
143
|
+
__oe_whenOwner3 = __oe_initialOwner3;
|
|
144
|
+
const __oe_whenEnd3 = emitComment(MARKERS.whenEnd);
|
|
145
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
146
|
+
bindSignalWrites(__oe_scope, __oe_propDep, "props", () => __oe_whenRefresh3());
|
|
147
|
+
__oe_el0.appendChild(__oe_whenAnchor3);
|
|
148
|
+
for (const __oe_child of __oe_initialNodes3)
|
|
149
|
+
__oe_el0.appendChild(__oe_child);
|
|
150
|
+
__oe_el0.appendChild(__oe_whenEnd3);
|
|
151
|
+
__oe_nodes.push(__oe_el0);
|
|
152
|
+
return __oe_nodes;
|
|
153
|
+
}
|
|
154
|
+
export function createOpenButtonRecipe(__oe_owner, __oe_host) {
|
|
155
|
+
const __oe_propsChanged = __oe_host.propsChanged;
|
|
156
|
+
if (__oe_propsChanged === undefined)
|
|
157
|
+
throw new Error("OEIR_LEAF_MISSING_VALUE: propsChanged");
|
|
158
|
+
const __oe_mountHost = { bindings: __oe_host.bindings, propDeps: [__oe_propsChanged] };
|
|
159
|
+
return createRecipe({
|
|
160
|
+
definitionOwner: __oe_owner,
|
|
161
|
+
source: "src/open-button.tsx#OpenButton",
|
|
162
|
+
mount(__oe_scope) {
|
|
163
|
+
return OpenButton__mount(__oe_scope, __oe_host.props, __oe_mountHost);
|
|
164
|
+
},
|
|
165
|
+
claim(__oe_scope, __oe_props, __oe_parent) {
|
|
166
|
+
return OpenButton__claim(__oe_scope, __oe_host.props, __oe_mountHost, __oe_parent);
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function OpenButton__claim(__oe_scope, __oe_props, __oe_host, __oe_parent) {
|
|
171
|
+
const props = __oe_props;
|
|
172
|
+
const __oe_setup = __oe_host.bindings ?? {};
|
|
173
|
+
const __oe_requireRootSetup = (name) => { if (!Object.hasOwn(__oe_setup, name))
|
|
174
|
+
throw new Error("OEIR_LEAF_MISSING_VALUE: " + name); return __oe_setup[name]; };
|
|
175
|
+
const hostOf = __oe_requireRootSetup("hostOf");
|
|
176
|
+
const __oe_adopted0 = [];
|
|
177
|
+
assertElementInHtmlNamespace(__oe_parent, "/", { file: "src/open-button.tsx", line: 67, column: 1 });
|
|
178
|
+
let __oe_claimStart2 = __oe_parent.firstChild;
|
|
179
|
+
while (__oe_claimStart2 !== null && __oe_claimStart2.nodeType === 1 && __oe_claimStart2.nodeName === "LINK" && __oe_claimStart2.hasAttribute("data-oe-static-styles"))
|
|
180
|
+
__oe_claimStart2 = __oe_claimStart2.nextSibling;
|
|
181
|
+
const __oe_cursor1 = { node: __oe_claimStart2 };
|
|
182
|
+
const __oe_el3 = __oe_cursor1.node;
|
|
183
|
+
if (__oe_el3 == null)
|
|
184
|
+
throw leafClaimMismatch("missing node at /0", { file: "src/open-button.tsx", line: 102, column: 5 });
|
|
185
|
+
__oe_cursor1.node = __oe_el3.nextSibling;
|
|
186
|
+
if (__oe_el3.nodeType !== 1 || String(__oe_el3.localName || __oe_el3.tagName || "").toLowerCase() !== "span")
|
|
187
|
+
throw leafClaimMismatch("expected element 'span' at /0", { file: "src/open-button.tsx", line: 102, column: 5 });
|
|
188
|
+
assertElementInHtmlNamespace(__oe_el3, "/0", { file: "src/open-button.tsx", line: 102, column: 5 });
|
|
189
|
+
assertStaticAttributeSeed(__oe_el3, [{ name: "style", value: "display:contents" }], "/0", [], { file: "src/open-button.tsx", line: 102, column: 5 });
|
|
190
|
+
const __oe_cursor4 = { node: __oe_el3.firstChild };
|
|
191
|
+
const __oe_whenAnchor5 = __oe_cursor4.node;
|
|
192
|
+
assertWhenAnchor(__oe_whenAnchor5, "/0/0/anchor", { file: "src/open-button.tsx", line: 112, column: 8 });
|
|
193
|
+
__oe_cursor4.node = __oe_whenAnchor5.nextSibling;
|
|
194
|
+
function __oe_whenThen6(__oe_whenThenScope7) {
|
|
195
|
+
const __oe_nodes = [];
|
|
196
|
+
const __oe_el8 = document.createElement("button");
|
|
197
|
+
__oe_el8.setAttribute("type", "button");
|
|
198
|
+
__oe_el8.setAttribute("class", "btn inline-flex items-center justify-center gap-2 font-sans font-extrabold no-underline cursor-pointer rounded-md whitespace-nowrap focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-ring disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none");
|
|
199
|
+
__oe_el8.setAttribute("part", "control");
|
|
200
|
+
function __oe_refresh9() {
|
|
201
|
+
__oe_el8.toggleAttribute("disabled", Boolean((props.disabled)));
|
|
202
|
+
}
|
|
203
|
+
__oe_refresh9();
|
|
204
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
205
|
+
bindSignalWrites(__oe_whenThenScope7, __oe_propDep, "props", __oe_refresh9);
|
|
206
|
+
const __oe_el10 = document.createElement("slot");
|
|
207
|
+
__oe_el8.appendChild(__oe_el10);
|
|
208
|
+
__oe_nodes.push(__oe_el8);
|
|
209
|
+
return __oe_nodes;
|
|
210
|
+
}
|
|
211
|
+
function __oe_whenElse11(__oe_whenElseScope12) {
|
|
212
|
+
const __oe_nodes = [];
|
|
213
|
+
const __oe_el13 = document.createElement("a");
|
|
214
|
+
__oe_el13.setAttribute("class", "btn inline-flex items-center justify-center gap-2 font-sans font-extrabold no-underline cursor-pointer rounded-md whitespace-nowrap focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-ring aria-disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none");
|
|
215
|
+
__oe_el13.setAttribute("part", "control");
|
|
216
|
+
function __oe_refresh14() {
|
|
217
|
+
const __oe_value15 = attributeValueOf((props.disabled ? null : props.href));
|
|
218
|
+
if (__oe_value15 === null)
|
|
219
|
+
__oe_el13.removeAttribute("href");
|
|
220
|
+
else {
|
|
221
|
+
assertSafeUrlAttribute("href", __oe_value15);
|
|
222
|
+
__oe_el13.setAttribute("href", __oe_value15);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
__oe_refresh14();
|
|
226
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
227
|
+
bindSignalWrites(__oe_whenElseScope12, __oe_propDep, "props", __oe_refresh14);
|
|
228
|
+
function __oe_refresh16() {
|
|
229
|
+
const __oe_value17 = attributeValueOf((props.target === '' ? null : props.target));
|
|
230
|
+
if (__oe_value17 === null)
|
|
231
|
+
__oe_el13.removeAttribute("target");
|
|
232
|
+
else {
|
|
233
|
+
assertSafeUrlAttribute("target", __oe_value17);
|
|
234
|
+
__oe_el13.setAttribute("target", __oe_value17);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
__oe_refresh16();
|
|
238
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
239
|
+
bindSignalWrites(__oe_whenElseScope12, __oe_propDep, "props", __oe_refresh16);
|
|
240
|
+
function __oe_refresh18() {
|
|
241
|
+
const __oe_value19 = attributeValueOf((props.target === '_blank' ? 'noopener noreferrer' : null));
|
|
242
|
+
if (__oe_value19 === null)
|
|
243
|
+
__oe_el13.removeAttribute("rel");
|
|
244
|
+
else {
|
|
245
|
+
assertSafeUrlAttribute("rel", __oe_value19);
|
|
246
|
+
__oe_el13.setAttribute("rel", __oe_value19);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
__oe_refresh18();
|
|
250
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
251
|
+
bindSignalWrites(__oe_whenElseScope12, __oe_propDep, "props", __oe_refresh18);
|
|
252
|
+
function __oe_refresh20() {
|
|
253
|
+
const __oe_value21 = attributeValueOf((props.disabled ? 'true' : null));
|
|
254
|
+
if (__oe_value21 === null)
|
|
255
|
+
__oe_el13.removeAttribute("aria-disabled");
|
|
256
|
+
else {
|
|
257
|
+
assertSafeUrlAttribute("aria-disabled", __oe_value21);
|
|
258
|
+
__oe_el13.setAttribute("aria-disabled", __oe_value21);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
__oe_refresh20();
|
|
262
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
263
|
+
bindSignalWrites(__oe_whenElseScope12, __oe_propDep, "props", __oe_refresh20);
|
|
264
|
+
const __oe_el22 = document.createElement("slot");
|
|
265
|
+
__oe_el13.appendChild(__oe_el22);
|
|
266
|
+
__oe_nodes.push(__oe_el13);
|
|
267
|
+
return __oe_nodes;
|
|
268
|
+
}
|
|
269
|
+
function __oe_whenThenClaim23(__oe_whenThenClaimScope24, __oe_cursor4) {
|
|
270
|
+
const __oe_branchNodes25 = [];
|
|
271
|
+
const __oe_el26 = __oe_cursor4.node;
|
|
272
|
+
if (__oe_el26 == null)
|
|
273
|
+
throw leafClaimMismatch("missing node at /0/0/then/0", { file: "src/open-button.tsx", line: 113, column: 9 });
|
|
274
|
+
__oe_cursor4.node = __oe_el26.nextSibling;
|
|
275
|
+
if (__oe_el26.nodeType !== 1 || String(__oe_el26.localName || __oe_el26.tagName || "").toLowerCase() !== "button")
|
|
276
|
+
throw leafClaimMismatch("expected element 'button' at /0/0/then/0", { file: "src/open-button.tsx", line: 113, column: 9 });
|
|
277
|
+
assertElementInHtmlNamespace(__oe_el26, "/0/0/then/0", { file: "src/open-button.tsx", line: 113, column: 9 });
|
|
278
|
+
assertStaticAttributeSeed(__oe_el26, [{ name: "type", value: "button" }, { name: "class", value: "btn inline-flex items-center justify-center gap-2 font-sans font-extrabold no-underline cursor-pointer rounded-md whitespace-nowrap focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-ring disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none" }, { name: "part", value: "control" }], "/0/0/then/0", ["disabled"], { file: "src/open-button.tsx", line: 113, column: 9 });
|
|
279
|
+
const __oe_cursor27 = { node: __oe_el26.firstChild };
|
|
280
|
+
const __oe_el28 = __oe_cursor27.node;
|
|
281
|
+
if (__oe_el28 == null)
|
|
282
|
+
throw leafClaimMismatch("missing node at /0/0/then/0/0", { file: "src/open-button.tsx", line: 119, column: 11 });
|
|
283
|
+
__oe_cursor27.node = __oe_el28.nextSibling;
|
|
284
|
+
if (__oe_el28.nodeType !== 1 || String(__oe_el28.localName || __oe_el28.tagName || "").toLowerCase() !== "slot")
|
|
285
|
+
throw leafClaimMismatch("expected element 'slot' at /0/0/then/0/0", { file: "src/open-button.tsx", line: 119, column: 11 });
|
|
286
|
+
assertElementInHtmlNamespace(__oe_el28, "/0/0/then/0/0", { file: "src/open-button.tsx", line: 119, column: 11 });
|
|
287
|
+
assertStaticAttributeSeed(__oe_el28, [], "/0/0/then/0/0", [], { file: "src/open-button.tsx", line: 119, column: 11 });
|
|
288
|
+
const __oe_cursor29 = { node: __oe_el28.firstChild };
|
|
289
|
+
if (__oe_cursor29.node !== null)
|
|
290
|
+
throw leafClaimMismatch("extra node at /0/0/then/0/0", { file: "src/open-button.tsx", line: 119, column: 11 });
|
|
291
|
+
if (__oe_cursor27.node !== null)
|
|
292
|
+
throw leafClaimMismatch("extra node at /0/0/then/0", { file: "src/open-button.tsx", line: 113, column: 9 });
|
|
293
|
+
__oe_branchNodes25.push(__oe_el26);
|
|
294
|
+
function activate() {
|
|
295
|
+
function __oe_refresh30() {
|
|
296
|
+
const __oe_value31 = Boolean((props.disabled));
|
|
297
|
+
if (__oe_el26.hasAttribute("disabled") !== __oe_value31)
|
|
298
|
+
__oe_el26.toggleAttribute("disabled", __oe_value31);
|
|
299
|
+
}
|
|
300
|
+
__oe_refresh30();
|
|
301
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
302
|
+
bindSignalWrites(__oe_whenThenClaimScope24, __oe_propDep, "props", __oe_refresh30);
|
|
303
|
+
}
|
|
304
|
+
return { nodes: __oe_branchNodes25, activate };
|
|
305
|
+
}
|
|
306
|
+
function __oe_whenElseClaim32(__oe_whenElseClaimScope33, __oe_cursor4) {
|
|
307
|
+
const __oe_branchNodes34 = [];
|
|
308
|
+
const __oe_el35 = __oe_cursor4.node;
|
|
309
|
+
if (__oe_el35 == null)
|
|
310
|
+
throw leafClaimMismatch("missing node at /0/0/else/0", { file: "src/open-button.tsx", line: 122, column: 9 });
|
|
311
|
+
__oe_cursor4.node = __oe_el35.nextSibling;
|
|
312
|
+
if (__oe_el35.nodeType !== 1 || String(__oe_el35.localName || __oe_el35.tagName || "").toLowerCase() !== "a")
|
|
313
|
+
throw leafClaimMismatch("expected element 'a' at /0/0/else/0", { file: "src/open-button.tsx", line: 122, column: 9 });
|
|
314
|
+
assertElementInHtmlNamespace(__oe_el35, "/0/0/else/0", { file: "src/open-button.tsx", line: 122, column: 9 });
|
|
315
|
+
assertStaticAttributeSeed(__oe_el35, [{ name: "class", value: "btn inline-flex items-center justify-center gap-2 font-sans font-extrabold no-underline cursor-pointer rounded-md whitespace-nowrap focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-ring aria-disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none" }, { name: "part", value: "control" }], "/0/0/else/0", ["href", "target", "rel", "aria-disabled"], { file: "src/open-button.tsx", line: 122, column: 9 });
|
|
316
|
+
const __oe_cursor36 = { node: __oe_el35.firstChild };
|
|
317
|
+
const __oe_el37 = __oe_cursor36.node;
|
|
318
|
+
if (__oe_el37 == null)
|
|
319
|
+
throw leafClaimMismatch("missing node at /0/0/else/0/0", { file: "src/open-button.tsx", line: 131, column: 11 });
|
|
320
|
+
__oe_cursor36.node = __oe_el37.nextSibling;
|
|
321
|
+
if (__oe_el37.nodeType !== 1 || String(__oe_el37.localName || __oe_el37.tagName || "").toLowerCase() !== "slot")
|
|
322
|
+
throw leafClaimMismatch("expected element 'slot' at /0/0/else/0/0", { file: "src/open-button.tsx", line: 131, column: 11 });
|
|
323
|
+
assertElementInHtmlNamespace(__oe_el37, "/0/0/else/0/0", { file: "src/open-button.tsx", line: 131, column: 11 });
|
|
324
|
+
assertStaticAttributeSeed(__oe_el37, [], "/0/0/else/0/0", [], { file: "src/open-button.tsx", line: 131, column: 11 });
|
|
325
|
+
const __oe_cursor38 = { node: __oe_el37.firstChild };
|
|
326
|
+
if (__oe_cursor38.node !== null)
|
|
327
|
+
throw leafClaimMismatch("extra node at /0/0/else/0/0", { file: "src/open-button.tsx", line: 131, column: 11 });
|
|
328
|
+
if (__oe_cursor36.node !== null)
|
|
329
|
+
throw leafClaimMismatch("extra node at /0/0/else/0", { file: "src/open-button.tsx", line: 122, column: 9 });
|
|
330
|
+
__oe_branchNodes34.push(__oe_el35);
|
|
331
|
+
function activate() {
|
|
332
|
+
function __oe_refresh39() {
|
|
333
|
+
const __oe_value40 = attributeValueOf((props.disabled ? null : props.href));
|
|
334
|
+
if (__oe_value40 === null) {
|
|
335
|
+
if (__oe_el35.hasAttribute("href"))
|
|
336
|
+
__oe_el35.removeAttribute("href");
|
|
337
|
+
}
|
|
338
|
+
else if (__oe_el35.getAttribute("href") !== __oe_value40) {
|
|
339
|
+
assertSafeUrlAttribute("href", __oe_value40);
|
|
340
|
+
__oe_el35.setAttribute("href", __oe_value40);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
__oe_refresh39();
|
|
344
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
345
|
+
bindSignalWrites(__oe_whenElseClaimScope33, __oe_propDep, "props", __oe_refresh39);
|
|
346
|
+
function __oe_refresh41() {
|
|
347
|
+
const __oe_value42 = attributeValueOf((props.target === '' ? null : props.target));
|
|
348
|
+
if (__oe_value42 === null) {
|
|
349
|
+
if (__oe_el35.hasAttribute("target"))
|
|
350
|
+
__oe_el35.removeAttribute("target");
|
|
351
|
+
}
|
|
352
|
+
else if (__oe_el35.getAttribute("target") !== __oe_value42) {
|
|
353
|
+
assertSafeUrlAttribute("target", __oe_value42);
|
|
354
|
+
__oe_el35.setAttribute("target", __oe_value42);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
__oe_refresh41();
|
|
358
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
359
|
+
bindSignalWrites(__oe_whenElseClaimScope33, __oe_propDep, "props", __oe_refresh41);
|
|
360
|
+
function __oe_refresh43() {
|
|
361
|
+
const __oe_value44 = attributeValueOf((props.target === '_blank' ? 'noopener noreferrer' : null));
|
|
362
|
+
if (__oe_value44 === null) {
|
|
363
|
+
if (__oe_el35.hasAttribute("rel"))
|
|
364
|
+
__oe_el35.removeAttribute("rel");
|
|
365
|
+
}
|
|
366
|
+
else if (__oe_el35.getAttribute("rel") !== __oe_value44) {
|
|
367
|
+
assertSafeUrlAttribute("rel", __oe_value44);
|
|
368
|
+
__oe_el35.setAttribute("rel", __oe_value44);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
__oe_refresh43();
|
|
372
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
373
|
+
bindSignalWrites(__oe_whenElseClaimScope33, __oe_propDep, "props", __oe_refresh43);
|
|
374
|
+
function __oe_refresh45() {
|
|
375
|
+
const __oe_value46 = attributeValueOf((props.disabled ? 'true' : null));
|
|
376
|
+
if (__oe_value46 === null) {
|
|
377
|
+
if (__oe_el35.hasAttribute("aria-disabled"))
|
|
378
|
+
__oe_el35.removeAttribute("aria-disabled");
|
|
379
|
+
}
|
|
380
|
+
else if (__oe_el35.getAttribute("aria-disabled") !== __oe_value46) {
|
|
381
|
+
assertSafeUrlAttribute("aria-disabled", __oe_value46);
|
|
382
|
+
__oe_el35.setAttribute("aria-disabled", __oe_value46);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
__oe_refresh45();
|
|
386
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
387
|
+
bindSignalWrites(__oe_whenElseClaimScope33, __oe_propDep, "props", __oe_refresh45);
|
|
388
|
+
}
|
|
389
|
+
return { nodes: __oe_branchNodes34, activate };
|
|
390
|
+
}
|
|
391
|
+
const __oe_whenTest47 = (props.href === '');
|
|
392
|
+
let __oe_whenActive48 = __oe_whenTest47 ? 1 : 2;
|
|
393
|
+
let __oe_whenOwner49 = null;
|
|
394
|
+
let __oe_whenNodes50 = [];
|
|
395
|
+
let __oe_whenAdopted51 = null;
|
|
396
|
+
let __oe_whenInsert52 = false;
|
|
397
|
+
if (__oe_whenActive48 === 1) {
|
|
398
|
+
if (isWhenEndMarker(__oe_cursor4.node)) {
|
|
399
|
+
__oe_whenInsert52 = true;
|
|
400
|
+
}
|
|
401
|
+
else {
|
|
402
|
+
__oe_whenOwner49 = __oe_scope.child();
|
|
403
|
+
try {
|
|
404
|
+
__oe_whenAdopted51 = __oe_whenThenClaim23(__oe_whenOwner49, __oe_cursor4);
|
|
405
|
+
}
|
|
406
|
+
catch (error) {
|
|
407
|
+
__oe_whenOwner49.dispose(false);
|
|
408
|
+
throw error;
|
|
409
|
+
}
|
|
410
|
+
__oe_whenNodes50 = __oe_whenAdopted51.nodes;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
if (__oe_whenActive48 === 2) {
|
|
414
|
+
if (isWhenEndMarker(__oe_cursor4.node)) {
|
|
415
|
+
__oe_whenInsert52 = true;
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
__oe_whenOwner49 = __oe_scope.child();
|
|
419
|
+
try {
|
|
420
|
+
__oe_whenAdopted51 = __oe_whenElseClaim32(__oe_whenOwner49, __oe_cursor4);
|
|
421
|
+
}
|
|
422
|
+
catch (error) {
|
|
423
|
+
__oe_whenOwner49.dispose(false);
|
|
424
|
+
throw error;
|
|
425
|
+
}
|
|
426
|
+
__oe_whenNodes50 = __oe_whenAdopted51.nodes;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
assertWhenEndMarker(__oe_cursor4.node, "/0/0/end", { file: "src/open-button.tsx", line: 112, column: 8 });
|
|
430
|
+
const __oe_whenEnd53 = __oe_cursor4.node;
|
|
431
|
+
__oe_cursor4.node = __oe_whenEnd53.nextSibling;
|
|
432
|
+
if (__oe_whenOwner49 === null)
|
|
433
|
+
__oe_whenOwner49 = __oe_scope.child();
|
|
434
|
+
__oe_whenOwner49.addRangeCleanup(() => removeNodes(__oe_whenNodes50));
|
|
435
|
+
for (const __oe_whenChild54 of __oe_whenNodes50) {
|
|
436
|
+
}
|
|
437
|
+
function __oe_whenRefresh55(force) {
|
|
438
|
+
const __oe_whenNext56 = (props.href === '') ? 1 : 2;
|
|
439
|
+
if (!force && __oe_whenNext56 === __oe_whenActive48)
|
|
440
|
+
return;
|
|
441
|
+
__oe_whenActive48 = -1;
|
|
442
|
+
if (__oe_whenOwner49 !== null)
|
|
443
|
+
__oe_whenOwner49.dispose(true);
|
|
444
|
+
__oe_whenOwner49 = null;
|
|
445
|
+
const __oe_whenBranchOwner57 = __oe_scope.child();
|
|
446
|
+
let __oe_whenBranchNodes58;
|
|
447
|
+
try {
|
|
448
|
+
__oe_whenBranchNodes58 = runUntracked(() => __oe_whenNext56 === 1 ? __oe_whenThen6(__oe_whenBranchOwner57) : __oe_whenElse11(__oe_whenBranchOwner57));
|
|
449
|
+
}
|
|
450
|
+
catch (error) {
|
|
451
|
+
__oe_whenActive48 = -1;
|
|
452
|
+
__oe_whenBranchOwner57.dispose(true);
|
|
453
|
+
throw error;
|
|
454
|
+
}
|
|
455
|
+
__oe_whenBranchOwner57.addRangeCleanup(() => removeNodes(__oe_whenBranchNodes58));
|
|
456
|
+
const __oe_whenParent59 = __oe_whenEnd53.parentNode;
|
|
457
|
+
if (__oe_whenParent59 !== null) {
|
|
458
|
+
for (const __oe_whenChild54 of __oe_whenBranchNodes58)
|
|
459
|
+
__oe_whenParent59.insertBefore(__oe_whenChild54, __oe_whenEnd53);
|
|
460
|
+
}
|
|
461
|
+
__oe_whenNodes50 = __oe_whenBranchNodes58;
|
|
462
|
+
__oe_whenOwner49 = __oe_whenBranchOwner57;
|
|
463
|
+
__oe_whenActive48 = __oe_whenNext56;
|
|
464
|
+
}
|
|
465
|
+
if (__oe_cursor4.node !== null)
|
|
466
|
+
throw leafClaimMismatch("extra node at /0", { file: "src/open-button.tsx", line: 102, column: 5 });
|
|
467
|
+
__oe_adopted0.push(__oe_el3);
|
|
468
|
+
if (__oe_cursor1.node !== null)
|
|
469
|
+
throw leafClaimMismatch("extra node at /", { file: "src/open-button.tsx", line: 67, column: 1 });
|
|
470
|
+
const __oe_eventHandler60 = ((event) => {
|
|
471
|
+
activateButton(hostOf(event), event, () => {
|
|
472
|
+
hostOf(event).dispatchEvent(new globalThis.CustomEvent('open-click', { bubbles: true, composed: true }));
|
|
473
|
+
});
|
|
474
|
+
});
|
|
475
|
+
if (typeof __oe_eventHandler60 !== "function")
|
|
476
|
+
throw leafRuntimeError("OEIR_LEAF_EVENT_HANDLER_INVALID", "onClick handler is not callable", { file: "src/open-button.tsx", line: 104, column: 7 });
|
|
477
|
+
const __oe_eventListener61 = (event) => __oe_eventHandler60(event);
|
|
478
|
+
__oe_el3.addEventListener("click", __oe_eventListener61);
|
|
479
|
+
__oe_scope.add(() => __oe_el3.removeEventListener("click", __oe_eventListener61));
|
|
480
|
+
if (__oe_whenAdopted51 !== null)
|
|
481
|
+
__oe_whenAdopted51.activate();
|
|
482
|
+
for (const __oe_propDep of __oe_host.propDeps)
|
|
483
|
+
bindSignalWrites(__oe_scope, __oe_propDep, "props", () => __oe_whenRefresh55());
|
|
484
|
+
if (__oe_whenInsert52) {
|
|
485
|
+
let __oe_whenInsertNodes62;
|
|
486
|
+
try {
|
|
487
|
+
__oe_whenInsertNodes62 = __oe_whenActive48 === 1 ? __oe_whenThen6(__oe_whenOwner49) : __oe_whenElse11(__oe_whenOwner49);
|
|
488
|
+
}
|
|
489
|
+
catch (error) {
|
|
490
|
+
__oe_whenOwner49.dispose(true);
|
|
491
|
+
throw error;
|
|
492
|
+
}
|
|
493
|
+
const __oe_whenInsertParent63 = __oe_whenEnd53.parentNode;
|
|
494
|
+
if (__oe_whenInsertParent63 !== null) {
|
|
495
|
+
for (const __oe_whenChild54 of __oe_whenInsertNodes62)
|
|
496
|
+
__oe_whenInsertParent63.insertBefore(__oe_whenChild54, __oe_whenEnd53);
|
|
497
|
+
}
|
|
498
|
+
__oe_whenNodes50 = __oe_whenInsertNodes62;
|
|
499
|
+
}
|
|
500
|
+
return __oe_adopted0;
|
|
501
|
+
}
|
|
502
|
+
export function OpenButton__ssr(__oe_props, __oe_host) {
|
|
503
|
+
const props = __oe_props;
|
|
504
|
+
const __oe_out0 = [];
|
|
505
|
+
__oe_out0.push("<span");
|
|
506
|
+
__oe_out0.push(" style=\"", escapeAttrValue("display:contents"), "\"");
|
|
507
|
+
__oe_out0.push(">");
|
|
508
|
+
const __oe_whenTest1 = (props.href === '');
|
|
509
|
+
__oe_out0.push("<!--", markerText(MARKERS.when), "-->");
|
|
510
|
+
if (__oe_whenTest1) {
|
|
511
|
+
__oe_out0.push("<button");
|
|
512
|
+
__oe_out0.push(" type=\"", escapeAttrValue("button"), "\"");
|
|
513
|
+
__oe_out0.push(" class=\"", escapeAttrValue("btn inline-flex items-center justify-center gap-2 font-sans font-extrabold no-underline cursor-pointer rounded-md whitespace-nowrap focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-ring disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none"), "\"");
|
|
514
|
+
__oe_out0.push(" part=\"", escapeAttrValue("control"), "\"");
|
|
515
|
+
if (Boolean((props.disabled)))
|
|
516
|
+
__oe_out0.push(" disabled=\"\"");
|
|
517
|
+
__oe_out0.push(">");
|
|
518
|
+
__oe_out0.push("<slot");
|
|
519
|
+
__oe_out0.push(">");
|
|
520
|
+
__oe_out0.push("</slot>");
|
|
521
|
+
__oe_out0.push("</button>");
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
__oe_out0.push("<a");
|
|
525
|
+
__oe_out0.push(" class=\"", escapeAttrValue("btn inline-flex items-center justify-center gap-2 font-sans font-extrabold no-underline cursor-pointer rounded-md whitespace-nowrap focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-ring aria-disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none"), "\"");
|
|
526
|
+
__oe_out0.push(" part=\"", escapeAttrValue("control"), "\"");
|
|
527
|
+
const __oe_value2 = attributeValueOf((props.disabled ? null : props.href));
|
|
528
|
+
if (__oe_value2 !== null) {
|
|
529
|
+
assertSafeUrlAttribute("href", __oe_value2);
|
|
530
|
+
__oe_out0.push(" href=\"", escapeAttrValue(__oe_value2), "\"");
|
|
531
|
+
}
|
|
532
|
+
const __oe_value3 = attributeValueOf((props.target === '' ? null : props.target));
|
|
533
|
+
if (__oe_value3 !== null) {
|
|
534
|
+
assertSafeUrlAttribute("target", __oe_value3);
|
|
535
|
+
__oe_out0.push(" target=\"", escapeAttrValue(__oe_value3), "\"");
|
|
536
|
+
}
|
|
537
|
+
const __oe_value4 = attributeValueOf((props.target === '_blank' ? 'noopener noreferrer' : null));
|
|
538
|
+
if (__oe_value4 !== null) {
|
|
539
|
+
assertSafeUrlAttribute("rel", __oe_value4);
|
|
540
|
+
__oe_out0.push(" rel=\"", escapeAttrValue(__oe_value4), "\"");
|
|
541
|
+
}
|
|
542
|
+
const __oe_value5 = attributeValueOf((props.disabled ? 'true' : null));
|
|
543
|
+
if (__oe_value5 !== null) {
|
|
544
|
+
assertSafeUrlAttribute("aria-disabled", __oe_value5);
|
|
545
|
+
__oe_out0.push(" aria-disabled=\"", escapeAttrValue(__oe_value5), "\"");
|
|
546
|
+
}
|
|
547
|
+
__oe_out0.push(">");
|
|
548
|
+
__oe_out0.push("<slot");
|
|
549
|
+
__oe_out0.push(">");
|
|
550
|
+
__oe_out0.push("</slot>");
|
|
551
|
+
__oe_out0.push("</a>");
|
|
552
|
+
}
|
|
553
|
+
__oe_out0.push("<!--", markerText(MARKERS.whenEnd), "-->");
|
|
554
|
+
__oe_out0.push("</span>");
|
|
555
|
+
return __oe_out0.join("");
|
|
556
|
+
}
|
|
557
|
+
import { createGeneratedElementClassWithFeatures as __oe_createElementClass, GeneratedElementForm as __oe_formFeature, generatedElementProperties as __oe_propertiesFeature, serializeGeneratedElementHtml, seedGeneratedElementHostProperties } from "@openelement/element/internal/compiled/generated-element/shell";
|
|
558
|
+
const __oeElementDescriptor = {
|
|
559
|
+
tag: "open-button",
|
|
560
|
+
root: "shadow-open",
|
|
561
|
+
delegatesFocus: true,
|
|
562
|
+
formAssociated: true,
|
|
563
|
+
properties: [
|
|
564
|
+
{ name: "variant", attribute: "variant", type: "string", reflect: true, default: "default" },
|
|
565
|
+
{ name: "size", attribute: "size", type: "string", reflect: true, default: "md" },
|
|
566
|
+
{ name: "disabled", attribute: "disabled", type: "boolean", reflect: true, default: false },
|
|
567
|
+
{ name: "href", attribute: "href", type: "string", reflect: true, default: "" },
|
|
568
|
+
{ name: "target", attribute: "target", type: "string", reflect: true, default: "" },
|
|
569
|
+
{ name: "type", attribute: "type", type: "string", reflect: true, default: "button" },
|
|
570
|
+
],
|
|
571
|
+
createRecipe: createOpenButtonRecipe,
|
|
572
|
+
createInstance: __oe_rootInstance,
|
|
573
|
+
};
|
|
574
|
+
const __oeOpenButtonElement = __oe_createElementClass(__oeElementDescriptor, { form: __oe_formFeature, properties: __oe_propertiesFeature });
|
|
575
|
+
export default __oeOpenButtonElement;
|
|
576
|
+
export { __oeOpenButtonElement as OpenButtonElement };
|
|
577
|
+
export const __oeElementTag = "open-button";
|
|
578
|
+
export function OpenButton__ssrHost(props, lightChildren, attributes, styleLinks, nestedHost) {
|
|
579
|
+
if (!Array.isArray(styleLinks) || styleLinks.length === 0)
|
|
580
|
+
throw new Error("OEIR_LEAF_MISSING_VALUE: styleLinks (the styled generated element received no declared stylesheet URLs; mixed generated-element/entry artifacts or a missing style-link carrier)");
|
|
581
|
+
const __oeHostProps = seedGeneratedElementHostProperties(__oeElementDescriptor.properties, props, attributes);
|
|
582
|
+
const __oeHostAttrs = __oeHostProps.__oeHostAttributes;
|
|
583
|
+
return serializeGeneratedElementHtml({
|
|
584
|
+
tag: "open-button",
|
|
585
|
+
root: "open",
|
|
586
|
+
dsd: { delegatesFocus: true },
|
|
587
|
+
content: OpenButton__ssr(__oeHostProps, nestedHost === undefined ? undefined : { "__oe_nestedHost": nestedHost }),
|
|
588
|
+
...(lightChildren === undefined ? {} : { lightChildren }),
|
|
589
|
+
...(attributes === undefined && __oeHostAttrs === undefined ? {} : { attributes: __oeHostAttrs === undefined ? attributes : __oeHostAttrs }),
|
|
590
|
+
...(styleLinks === undefined ? {} : { styleLinks }),
|
|
591
|
+
});
|
|
592
|
+
}
|