@surreal-ui/web 0.5.0
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/CHANGELOG.md +69 -0
- package/dist/index.js +12075 -0
- package/package.json +27 -0
- package/src/components/GlassmorphismAlert.ts +116 -0
- package/src/components/GlassmorphismButton.ts +19 -0
- package/src/components/GlassmorphismCard.ts +33 -0
- package/src/components/GlassmorphismEmptyState.ts +29 -0
- package/src/components/GlassmorphismInputGroup.ts +202 -0
- package/src/components/GlassmorphismMenubar.ts +36 -0
- package/src/components/GlassmorphismScrollArea.ts +83 -0
- package/src/components/GlassmorphismTable.ts +52 -0
- package/src/components/GlassmorphismTypography.ts +67 -0
- package/src/components/MinimalistAccordion.ts +248 -0
- package/src/components/MinimalistAlert.ts +99 -0
- package/src/components/MinimalistAlertDialog.ts +100 -0
- package/src/components/MinimalistAspectRatio.ts +34 -0
- package/src/components/MinimalistAvatar.ts +98 -0
- package/src/components/MinimalistBadge.ts +71 -0
- package/src/components/MinimalistBreadcrumb.ts +92 -0
- package/src/components/MinimalistButton.ts +111 -0
- package/src/components/MinimalistButtonGroup.ts +110 -0
- package/src/components/MinimalistCalendar.ts +282 -0
- package/src/components/MinimalistCard.ts +131 -0
- package/src/components/MinimalistCarousel.ts +122 -0
- package/src/components/MinimalistChart.ts +151 -0
- package/src/components/MinimalistCheckbox.ts +179 -0
- package/src/components/MinimalistCodeBlock.ts +113 -0
- package/src/components/MinimalistCollapsible.ts +155 -0
- package/src/components/MinimalistCommand.ts +112 -0
- package/src/components/MinimalistContextMenu.ts +99 -0
- package/src/components/MinimalistDialog.ts +104 -0
- package/src/components/MinimalistDrawer.ts +223 -0
- package/src/components/MinimalistDropdownMenu.ts +120 -0
- package/src/components/MinimalistEmpty.ts +98 -0
- package/src/components/MinimalistEmptyState.ts +38 -0
- package/src/components/MinimalistField.ts +171 -0
- package/src/components/MinimalistForm.ts +101 -0
- package/src/components/MinimalistHoverCard.ts +150 -0
- package/src/components/MinimalistInput.ts +105 -0
- package/src/components/MinimalistInputGroup.ts +93 -0
- package/src/components/MinimalistInputOtp.ts +155 -0
- package/src/components/MinimalistItem.ts +160 -0
- package/src/components/MinimalistKbd.ts +38 -0
- package/src/components/MinimalistLabel.ts +54 -0
- package/src/components/MinimalistMenubar.ts +82 -0
- package/src/components/MinimalistNativeSelect.ts +144 -0
- package/src/components/MinimalistNavigationMenu.ts +98 -0
- package/src/components/MinimalistPagination.ts +141 -0
- package/src/components/MinimalistPopover.ts +113 -0
- package/src/components/MinimalistProgress.ts +71 -0
- package/src/components/MinimalistRadioGroup.ts +226 -0
- package/src/components/MinimalistRangeCalendar.ts +267 -0
- package/src/components/MinimalistResizable.ts +44 -0
- package/src/components/MinimalistScrollArea.ts +11 -0
- package/src/components/MinimalistSelect.ts +104 -0
- package/src/components/MinimalistSeparator.ts +53 -0
- package/src/components/MinimalistSheet.ts +166 -0
- package/src/components/MinimalistSidebar.ts +75 -0
- package/src/components/MinimalistSkeleton.ts +33 -0
- package/src/components/MinimalistSlider.ts +237 -0
- package/src/components/MinimalistSonner.ts +94 -0
- package/src/components/MinimalistSpinner.ts +53 -0
- package/src/components/MinimalistSwitch.ts +166 -0
- package/src/components/MinimalistTable.ts +35 -0
- package/src/components/MinimalistTabs.ts +98 -0
- package/src/components/MinimalistTextarea.ts +100 -0
- package/src/components/MinimalistToggle.ts +105 -0
- package/src/components/MinimalistToggleGroup.ts +175 -0
- package/src/components/MinimalistTooltip.ts +83 -0
- package/src/components/MinimalistTypography.ts +107 -0
- package/src/components/NeubrutalismCard.ts +35 -0
- package/src/components/NeubrutalismItem.ts +67 -0
- package/src/components/ShadcnAccordion.ts +244 -0
- package/src/components/ShadcnAlertDialog.ts +96 -0
- package/src/components/ShadcnAspectRatio.ts +30 -0
- package/src/components/ShadcnAvatar.ts +94 -0
- package/src/components/ShadcnBadge.ts +67 -0
- package/src/components/ShadcnBreadcrumb.ts +88 -0
- package/src/components/ShadcnButton.ts +107 -0
- package/src/components/ShadcnButtonGroup.ts +106 -0
- package/src/components/ShadcnCalendar.ts +278 -0
- package/src/components/ShadcnCarousel.ts +118 -0
- package/src/components/ShadcnChart.ts +147 -0
- package/src/components/ShadcnCheckbox.ts +175 -0
- package/src/components/ShadcnCodeBlock.ts +109 -0
- package/src/components/ShadcnCollapsible.ts +151 -0
- package/src/components/ShadcnCommand.ts +108 -0
- package/src/components/ShadcnContextMenu.ts +95 -0
- package/src/components/ShadcnDialog.ts +100 -0
- package/src/components/ShadcnDrawer.ts +219 -0
- package/src/components/ShadcnDropdownMenu.ts +116 -0
- package/src/components/ShadcnEmpty.ts +94 -0
- package/src/components/ShadcnField.ts +167 -0
- package/src/components/ShadcnForm.ts +97 -0
- package/src/components/ShadcnHoverCard.ts +146 -0
- package/src/components/ShadcnInput.ts +101 -0
- package/src/components/ShadcnInputGroup.ts +89 -0
- package/src/components/ShadcnInputOtp.ts +151 -0
- package/src/components/ShadcnItem.ts +156 -0
- package/src/components/ShadcnKbd.ts +34 -0
- package/src/components/ShadcnLabel.ts +50 -0
- package/src/components/ShadcnMenubar.ts +78 -0
- package/src/components/ShadcnNativeSelect.ts +140 -0
- package/src/components/ShadcnNavigationMenu.ts +94 -0
- package/src/components/ShadcnPagination.ts +137 -0
- package/src/components/ShadcnPopover.ts +109 -0
- package/src/components/ShadcnProgress.ts +67 -0
- package/src/components/ShadcnRadioGroup.ts +222 -0
- package/src/components/ShadcnRangeCalendar.ts +263 -0
- package/src/components/ShadcnSelect.ts +100 -0
- package/src/components/ShadcnSeparator.ts +49 -0
- package/src/components/ShadcnSheet.ts +162 -0
- package/src/components/ShadcnSidebar.ts +71 -0
- package/src/components/ShadcnSkeleton.ts +29 -0
- package/src/components/ShadcnSlider.ts +233 -0
- package/src/components/ShadcnSonner.ts +90 -0
- package/src/components/ShadcnSpinner.ts +49 -0
- package/src/components/ShadcnSwitch.ts +162 -0
- package/src/components/ShadcnTabs.ts +94 -0
- package/src/components/ShadcnTextarea.ts +96 -0
- package/src/components/ShadcnToggle.ts +101 -0
- package/src/components/ShadcnToggleGroup.ts +171 -0
- package/src/components/ShadcnTooltip.ts +79 -0
- package/src/index.ts +124 -0
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@surreal-ui/web",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"lit": "^3.2.0",
|
|
18
|
+
"@surreal-ui/core": "0.5.0"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"tsup": "^8.0.2",
|
|
22
|
+
"typescript": "^5.5.0"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsup src/index.ts --format esm --clean --external @surreal-ui/core --external lit"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
class SurrealGlassAlert extends HTMLElement {
|
|
2
|
+
private _successMessage: string = '';
|
|
3
|
+
private _createdComponent: { id: string; title: string; currentVersion: string | number } | null =
|
|
4
|
+
null;
|
|
5
|
+
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.attachShadow({ mode: 'open' });
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
set successMessage(val: string) {
|
|
12
|
+
this._successMessage = val;
|
|
13
|
+
this.render();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
set createdComponent(val: any) {
|
|
17
|
+
this._createdComponent = typeof val === 'string' ? JSON.parse(val) : val;
|
|
18
|
+
this.render();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
connectedCallback() {
|
|
22
|
+
if (this.hasAttribute('success-message')) {
|
|
23
|
+
this._successMessage = this.getAttribute('success-message') || '';
|
|
24
|
+
}
|
|
25
|
+
if (this.hasAttribute('created-component')) {
|
|
26
|
+
try {
|
|
27
|
+
this._createdComponent = JSON.parse(this.getAttribute('created-component') || '{}');
|
|
28
|
+
} catch (e) {
|
|
29
|
+
this._createdComponent = null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
this.render();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
render() {
|
|
36
|
+
if (!this._successMessage || !this._createdComponent) {
|
|
37
|
+
this.shadowRoot!.innerHTML = '';
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
this.shadowRoot!.innerHTML = `
|
|
42
|
+
<style>
|
|
43
|
+
@import "https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css";
|
|
44
|
+
:host {
|
|
45
|
+
display: block;
|
|
46
|
+
}
|
|
47
|
+
.glass-alert {
|
|
48
|
+
padding: 1.5rem;
|
|
49
|
+
backdrop-filter: blur(12px);
|
|
50
|
+
background-color: rgba(16, 185, 129, 0.1);
|
|
51
|
+
border: 1px solid rgba(16, 185, 129, 0.3);
|
|
52
|
+
border-radius: 1rem;
|
|
53
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
|
|
54
|
+
color: #e2e8f0;
|
|
55
|
+
}
|
|
56
|
+
.flex-center {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: 0.75rem;
|
|
60
|
+
}
|
|
61
|
+
.title-text {
|
|
62
|
+
color: #6ee7b7;
|
|
63
|
+
font-weight: 700;
|
|
64
|
+
font-size: 1.125rem;
|
|
65
|
+
}
|
|
66
|
+
.desc-text {
|
|
67
|
+
font-size: 0.875rem;
|
|
68
|
+
color: #cbd5e1;
|
|
69
|
+
margin-top: 1rem;
|
|
70
|
+
margin-bottom: 1rem;
|
|
71
|
+
}
|
|
72
|
+
.action-btn {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: 0.5rem;
|
|
76
|
+
padding: 0.625rem 1.25rem;
|
|
77
|
+
background-color: rgba(5, 150, 105, 0.8);
|
|
78
|
+
color: #ffffff;
|
|
79
|
+
font-weight: 600;
|
|
80
|
+
font-size: 0.875rem;
|
|
81
|
+
border-radius: 0.75rem;
|
|
82
|
+
text-decoration: none;
|
|
83
|
+
transition: background-color 0.2s;
|
|
84
|
+
box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2);
|
|
85
|
+
}
|
|
86
|
+
.action-btn:hover {
|
|
87
|
+
background-color: rgba(4, 120, 87, 1);
|
|
88
|
+
}
|
|
89
|
+
</style>
|
|
90
|
+
<div class="glass-alert">
|
|
91
|
+
<div class="flex-center">
|
|
92
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#6ee7b7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
|
|
93
|
+
<span class="title-text">${this._successMessage}</span>
|
|
94
|
+
</div>
|
|
95
|
+
<p class="desc-text">
|
|
96
|
+
View your new component v${this._createdComponent.currentVersion} in the Surreal UI catalog:
|
|
97
|
+
</p>
|
|
98
|
+
<a
|
|
99
|
+
href="/components/${this._createdComponent.id}"
|
|
100
|
+
class="action-btn"
|
|
101
|
+
>
|
|
102
|
+
<span>Open ${this._createdComponent.title} in Playground</span>
|
|
103
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
|
|
104
|
+
</a>
|
|
105
|
+
</div>
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-alert')) {
|
|
112
|
+
customElements.define('surreal-glassmorphism-alert', SurrealGlassAlert);
|
|
113
|
+
};
|
|
114
|
+
export { SurrealGlassAlert as GlassmorphismAlert, SurrealGlassAlert };
|
|
115
|
+
|
|
116
|
+
export default SurrealGlassAlert;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class GlassButton extends HTMLElement {
|
|
2
|
+
constructor() {
|
|
3
|
+
super();
|
|
4
|
+
this.attachShadow({ mode: 'open' });
|
|
5
|
+
}
|
|
6
|
+
static get observedAttributes() {
|
|
7
|
+
return ['label'];
|
|
8
|
+
}
|
|
9
|
+
attributeChangedCallback() {
|
|
10
|
+
this.render();
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export { GlassButton as GlassmorphismButton, GlassButton };
|
|
14
|
+
;
|
|
15
|
+
if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-button')) {
|
|
16
|
+
customElements.define('surreal-glassmorphism-button', GlassButton);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default GlassButton;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
class SurrealGlassmorphismCardSkeletonGrid extends HTMLElement {
|
|
2
|
+
constructor() {
|
|
3
|
+
super();
|
|
4
|
+
this.attachShadow({ mode: 'open' });
|
|
5
|
+
}
|
|
6
|
+
static get observedAttributes() {
|
|
7
|
+
return ['count'];
|
|
8
|
+
}
|
|
9
|
+
attributeChangedCallback() {
|
|
10
|
+
this.render();
|
|
11
|
+
}
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
this.render();
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
const count = parseInt(this.getAttribute('count') || '6', 10);
|
|
17
|
+
this.shadowRoot.innerHTML = `<style>@import "https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css";</style><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">${Array.from(
|
|
18
|
+
{ length: count },
|
|
19
|
+
)
|
|
20
|
+
.map(
|
|
21
|
+
() =>
|
|
22
|
+
`<div class="relative flex flex-col justify-between rounded-2xl bg-slate-900/60 backdrop-blur-xl border border-slate-800/80 p-6 animate-pulse overflow-hidden space-y-4"><div class="space-y-3"><div class="flex items-center justify-between"><div class="h-5 w-28 bg-slate-800/80 rounded-md"></div><div class="h-4 w-12 bg-slate-800/60 rounded"></div></div><div class="space-y-2 pt-1"><div class="h-6 w-3/4 bg-slate-800/90 rounded-lg"></div><div class="h-3.5 w-full bg-slate-800/60 rounded"></div><div class="h-3.5 w-5/6 bg-slate-800/50 rounded"></div></div><div class="flex items-center gap-2 pt-2"><div class="h-4 w-16 bg-slate-800/70 rounded"></div><div class="h-4 w-14 bg-slate-800/60 rounded"></div><div class="h-4 w-12 bg-slate-800/50 rounded"></div></div></div><div class="pt-4 border-t border-slate-800/60 flex items-center justify-between"><div class="flex items-center gap-1.5"><div class="h-4 w-12 bg-slate-800/60 rounded"></div><div class="h-4 w-12 bg-slate-800/60 rounded"></div><div class="h-4 w-12 bg-slate-800/60 rounded"></div></div><div class="h-4 w-20 bg-slate-800/70 rounded"></div></div></div>`,
|
|
23
|
+
)
|
|
24
|
+
.join('')}</div>`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-card')) {
|
|
29
|
+
customElements.define('surreal-glassmorphism-card', SurrealGlassmorphismCardSkeletonGrid);
|
|
30
|
+
};
|
|
31
|
+
export { SurrealGlassmorphismCardSkeletonGrid as GlassmorphismCard, SurrealGlassmorphismCardSkeletonGrid };
|
|
32
|
+
|
|
33
|
+
export default SurrealGlassmorphismCardSkeletonGrid;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
class SurrealGlassmorphismEmptyState extends HTMLElement {
|
|
2
|
+
constructor() {
|
|
3
|
+
super();
|
|
4
|
+
this.attachShadow({ mode: 'open' });
|
|
5
|
+
}
|
|
6
|
+
static get observedAttributes() {
|
|
7
|
+
return ['title', 'description'];
|
|
8
|
+
}
|
|
9
|
+
attributeChangedCallback() {
|
|
10
|
+
this.render();
|
|
11
|
+
}
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
this.render();
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
const title = this.getAttribute('title') || 'No activity logged yet';
|
|
17
|
+
const description =
|
|
18
|
+
this.getAttribute('description') ||
|
|
19
|
+
'Activities will appear automatically as components are ingested or modified.';
|
|
20
|
+
this.shadowRoot.innerHTML = `<style>@import "https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/tailwind.min.css";:host {display: block;}.empty-state {text-align: center;padding: 4rem 1.5rem;background: rgba(255, 255, 255, 0.05);backdrop-filter: blur(12px);border: 1px dashed rgba(255, 255, 255, 0.1);border-radius: 1.5rem;box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);}.icon {width: 2.5rem;height: 2.5rem;margin: 0 auto 0.75rem auto;color: #94a3b8;}.title {font-size: 1.125rem;line-height: 1.75rem;font-weight: 700;color: #ffffff;margin: 0 0 0.5rem 0;}.description {font-size: 0.75rem;line-height: 1rem;color: #94a3b8;margin: 0;}</style><div class="empty-state"><svg class="icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg><h3 class="title">${title}</h3><p class="description">${description}</p></div>`;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-empty-state')) {
|
|
25
|
+
customElements.define('surreal-glassmorphism-empty-state', SurrealGlassmorphismEmptyState);
|
|
26
|
+
};
|
|
27
|
+
export { SurrealGlassmorphismEmptyState as GlassmorphismEmptyState, SurrealGlassmorphismEmptyState };
|
|
28
|
+
|
|
29
|
+
export default SurrealGlassmorphismEmptyState;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
class GlassInputGroupElement extends HTMLElement {
|
|
2
|
+
constructor() {
|
|
3
|
+
super();
|
|
4
|
+
this.attachShadow({ mode: 'open' });
|
|
5
|
+
this._loading = false;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
static get observedAttributes() {
|
|
9
|
+
return [
|
|
10
|
+
'component-type-id',
|
|
11
|
+
'aesthetic-id',
|
|
12
|
+
'code-bundle',
|
|
13
|
+
'changelog-note',
|
|
14
|
+
'source-platform',
|
|
15
|
+
'loading',
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
20
|
+
if (oldValue !== newValue) {
|
|
21
|
+
this.render();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
this.render();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
get componentTypeId() {
|
|
30
|
+
return this.getAttribute('component-type-id') || 'button';
|
|
31
|
+
}
|
|
32
|
+
set componentTypeId(v) {
|
|
33
|
+
this.setAttribute('component-type-id', v);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
get aestheticId() {
|
|
37
|
+
return this.getAttribute('aesthetic-id') || 'glassmorphism';
|
|
38
|
+
}
|
|
39
|
+
set aestheticId(v) {
|
|
40
|
+
this.setAttribute('aesthetic-id', v);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
get codeBundle() {
|
|
44
|
+
return this.getAttribute('code-bundle') || '';
|
|
45
|
+
}
|
|
46
|
+
set codeBundle(v) {
|
|
47
|
+
this.setAttribute('code-bundle', v);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
get changelogNote() {
|
|
51
|
+
return this.getAttribute('changelog-note') || 'Initial code package release';
|
|
52
|
+
}
|
|
53
|
+
set changelogNote(v) {
|
|
54
|
+
this.setAttribute('changelog-note', v);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
get sourcePlatform() {
|
|
58
|
+
return this.getAttribute('source-platform') || '';
|
|
59
|
+
}
|
|
60
|
+
set sourcePlatform(v) {
|
|
61
|
+
this.setAttribute('source-platform', v);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
get loading() {
|
|
65
|
+
return this.hasAttribute('loading');
|
|
66
|
+
}
|
|
67
|
+
set loading(v) {
|
|
68
|
+
if (v) this.setAttribute('loading', '');
|
|
69
|
+
else this.removeAttribute('loading');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
render() {
|
|
73
|
+
this.shadowRoot.innerHTML = `
|
|
74
|
+
<style>
|
|
75
|
+
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/tailwind.min.css');
|
|
76
|
+
/* Custom inline styling fallbacks */
|
|
77
|
+
:host {
|
|
78
|
+
display: block;
|
|
79
|
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
80
|
+
}
|
|
81
|
+
.glass-form {
|
|
82
|
+
padding: 2rem;
|
|
83
|
+
border-radius: 1.5rem;
|
|
84
|
+
background: rgba(15, 23, 42, 0.8);
|
|
85
|
+
backdrop-filter: blur(16px);
|
|
86
|
+
border: 1px solid rgba(30, 41, 59, 0.8);
|
|
87
|
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
88
|
+
color: white;
|
|
89
|
+
}
|
|
90
|
+
.grid-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
|
|
91
|
+
@media (min-width: 768px) { .grid-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
92
|
+
.field-group { display: flex; flex-direction: column; gap: 0.5rem; }
|
|
93
|
+
label {
|
|
94
|
+
font-size: 0.75rem;
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
color: #cbd5e1;
|
|
97
|
+
text-transform: uppercase;
|
|
98
|
+
letter-spacing: 0.05em;
|
|
99
|
+
}
|
|
100
|
+
input, select, textarea {
|
|
101
|
+
width: 100%;
|
|
102
|
+
padding: 0.625rem 1rem;
|
|
103
|
+
background: rgba(3, 7, 18, 0.6);
|
|
104
|
+
border: 1px solid #1e293b;
|
|
105
|
+
border-radius: 0.75rem;
|
|
106
|
+
font-size: 0.875rem;
|
|
107
|
+
color: white;
|
|
108
|
+
outline: none;
|
|
109
|
+
}
|
|
110
|
+
input:focus, select:focus, textarea:focus {
|
|
111
|
+
border-color: #6366f1;
|
|
112
|
+
}
|
|
113
|
+
textarea {
|
|
114
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
115
|
+
font-size: 0.75rem;
|
|
116
|
+
color: #c7d2fe;
|
|
117
|
+
line-height: 1.5;
|
|
118
|
+
}
|
|
119
|
+
.submit-btn {
|
|
120
|
+
width: 100%;
|
|
121
|
+
padding: 0.875rem;
|
|
122
|
+
background: linear-gradient(to right, #6366f1, #a855f7, #ec4899);
|
|
123
|
+
color: white;
|
|
124
|
+
font-weight: bold;
|
|
125
|
+
font-size: 0.875rem;
|
|
126
|
+
border-radius: 0.75rem;
|
|
127
|
+
border: none;
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: center;
|
|
132
|
+
gap: 0.5rem;
|
|
133
|
+
box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.25);
|
|
134
|
+
transition: opacity 0.2s;
|
|
135
|
+
}
|
|
136
|
+
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
137
|
+
.animate-spin {
|
|
138
|
+
animation: spin 1s linear infinite;
|
|
139
|
+
}
|
|
140
|
+
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
|
|
141
|
+
</style>
|
|
142
|
+
<form class="glass-form">
|
|
143
|
+
<div class="grid-layout">
|
|
144
|
+
<div class="field-group">
|
|
145
|
+
<label for="comp-type">UI Component Type *</label>
|
|
146
|
+
<input id="comp-type" type="text" value="${this.componentTypeId}" placeholder="e.g. button, card" required />
|
|
147
|
+
</div>
|
|
148
|
+
<div class="field-group">
|
|
149
|
+
<label for="aesthetic-id">Aesthetic Variant *</label>
|
|
150
|
+
<input id="aesthetic-id" type="text" value="${this.aestheticId}" placeholder="e.g. glassmorphism" required />
|
|
151
|
+
</div>
|
|
152
|
+
<div class="field-group">
|
|
153
|
+
<label for="source-plat">Source Language (Optional)</label>
|
|
154
|
+
<select id="source-plat">
|
|
155
|
+
<option value="" ${this.sourcePlatform === '' ? 'selected' : ''}>✨ Auto-Detect Language</option>
|
|
156
|
+
<option value="svelte" ${this.sourcePlatform === 'svelte' ? 'selected' : ''}>Svelte Component (.svelte)</option>
|
|
157
|
+
<option value="react" ${this.sourcePlatform === 'react' ? 'selected' : ''}>React Component (.tsx/.jsx)</option>
|
|
158
|
+
<option value="webcomponent" ${this.sourcePlatform === 'webcomponent' ? 'selected' : ''}>WebComponent / Custom Element</option>
|
|
159
|
+
</select>
|
|
160
|
+
</div>
|
|
161
|
+
<div class="field-group">
|
|
162
|
+
<label for="change-note">Changelog Note</label>
|
|
163
|
+
<input id="change-note" type="text" value="${this.changelogNote}" placeholder="Summary of changes..." />
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="field-group" style="margin-top: 1.5rem;">
|
|
167
|
+
<label for="code-bundle">Raw Encapsulated Code Bundle *</label>
|
|
168
|
+
<textarea id="code-bundle" rows="10" required placeholder="Paste source code...">${this.codeBundle}</textarea>
|
|
169
|
+
</div>
|
|
170
|
+
<button type="submit" class="submit-btn" style="margin-top: 1.5rem;" ${this.loading ? 'disabled' : ''}>
|
|
171
|
+
${this.loading ? '<span>Ingesting Code Package & Synthesizing...</span>' : '<span>Ingest Code Package & Generate Variants</span>'}
|
|
172
|
+
</button>
|
|
173
|
+
</form>
|
|
174
|
+
`;
|
|
175
|
+
|
|
176
|
+
const form = this.shadowRoot.querySelector('form');
|
|
177
|
+
form.addEventListener('submit', (e) => {
|
|
178
|
+
e.preventDefault();
|
|
179
|
+
this.componentTypeId = this.shadowRoot.getElementById('comp-type').value;
|
|
180
|
+
this.aestheticId = this.shadowRoot.getElementById('aesthetic-id').value;
|
|
181
|
+
this.sourcePlatform = this.shadowRoot.getElementById('source-plat').value;
|
|
182
|
+
this.changelogNote = this.shadowRoot.getElementById('change-note').value;
|
|
183
|
+
this.codeBundle = this.shadowRoot.getElementById('code-bundle').value;
|
|
184
|
+
this.dispatchEvent(
|
|
185
|
+
new CustomEvent('component-submit', {
|
|
186
|
+
detail: {
|
|
187
|
+
componentTypeId: this.componentTypeId,
|
|
188
|
+
aestheticId: this.aestheticId,
|
|
189
|
+
codeBundle: this.codeBundle,
|
|
190
|
+
},
|
|
191
|
+
}),
|
|
192
|
+
);
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-input-group')) {
|
|
198
|
+
customElements.define('surreal-glassmorphism-input-group', GlassInputGroupElement);
|
|
199
|
+
};
|
|
200
|
+
export { GlassInputGroupElement as GlassmorphismInputGroup, GlassInputGroupElement };
|
|
201
|
+
|
|
202
|
+
export default GlassInputGroupElement;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
class SurrealGlassmorphismMenubar extends HTMLElement {
|
|
2
|
+
constructor() {
|
|
3
|
+
super();
|
|
4
|
+
this.attachShadow({ mode: 'open' });
|
|
5
|
+
}
|
|
6
|
+
static get observedAttributes() {
|
|
7
|
+
return ['app-version', 'current-user'];
|
|
8
|
+
}
|
|
9
|
+
attributeChangedCallback() {
|
|
10
|
+
this.render();
|
|
11
|
+
}
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
this.render();
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
const appVersion = this.getAttribute('app-version') || '0.1.0';
|
|
17
|
+
const currentUserStr = this.getAttribute('current-user');
|
|
18
|
+
const currentUser = currentUserStr ? JSON.parse(currentUserStr) : null;
|
|
19
|
+
this.shadowRoot.innerHTML = `<style>@import "https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/tailwind.min.css"; /* Add custom styles or use standard layout utilities */</style><header class="sticky top-0 z-50 bg-slate-950/80 backdrop-blur-md border-b border-slate-800/80 px-4 lg:px-8 py-3.5"><div class="max-w-7xl mx-auto flex items-center justify-between gap-4"><a href="/" class="flex items-center gap-2.5 group"><div class="p-2 rounded-xl bg-gradient-to-tr from-indigo-500 via-purple-500 to-pink-500 text-white shadow-lg shadow-indigo-500/30"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 2v20m10-10H2"></path></svg></div><div><span class="text-xl font-bold text-white tracking-tight">Surreal UI</span><span class="ml-2 px-2 py-0.5 text-[10px] font-mono bg-indigo-500/20 text-indigo-300 border border-indigo-500/30 rounded-full">v${appVersion}</span></div></a><div class="flex items-center gap-2">${currentUser ? `<span class="text-xs text-indigo-300">${currentUser.email}</span><button id="sign-out" class="p-2 bg-slate-900 text-slate-400 rounded-lg">Sign Out</button>` : ''}</div></div></header>`;
|
|
20
|
+
if (currentUser) {
|
|
21
|
+
const btn = this.shadowRoot.getElementById('sign-out');
|
|
22
|
+
if (btn) {
|
|
23
|
+
btn.addEventListener('click', () => {
|
|
24
|
+
this.dispatchEvent(new CustomEvent('signout'));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-menubar')) {
|
|
32
|
+
customElements.define('surreal-glassmorphism-menubar', SurrealGlassmorphismMenubar);
|
|
33
|
+
};
|
|
34
|
+
export { SurrealGlassmorphismMenubar as GlassmorphismMenubar, SurrealGlassmorphismMenubar };
|
|
35
|
+
|
|
36
|
+
export default SurrealGlassmorphismMenubar;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
+
@customElement('surreal-scroll-area')
|
|
4
|
+
export class SurrealGlassmorphismScrollArea extends LitElement {
|
|
5
|
+
static styles = css`
|
|
6
|
+
@import 'https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/tailwind.min.css';
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
@property({ type: String }) currentVersionId = '';
|
|
12
|
+
@property({ type: Array }) versions = [];
|
|
13
|
+
@property({ type: Boolean }) revertLoading = false;
|
|
14
|
+
_handleRevert(id: string) {
|
|
15
|
+
this.dispatchEvent(
|
|
16
|
+
new CustomEvent('revert', { detail: { versionId: id }, bubbles: true, composed: true }),
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
return html`
|
|
21
|
+
<div
|
|
22
|
+
class="backdrop-blur-xl bg-slate-900/60 border border-white/10 p-6 rounded-2xl shadow-2xl space-y-4 max-h-[600px] overflow-y-auto"
|
|
23
|
+
>
|
|
24
|
+
<h3 class="text-sm font-semibold text-slate-300 uppercase tracking-wider">
|
|
25
|
+
Semver Timeline & Revert
|
|
26
|
+
</h3>
|
|
27
|
+
<div class="space-y-3">
|
|
28
|
+
${this.versions.map(
|
|
29
|
+
(v: any) => html`
|
|
30
|
+
<div
|
|
31
|
+
class="p-4 rounded-xl bg-slate-950/40 border border-white/10 backdrop-blur-md flex flex-col sm:flex-row sm:items-center justify-between gap-4 transition-all hover:bg-slate-950/60"
|
|
32
|
+
>
|
|
33
|
+
<div class="space-y-1">
|
|
34
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
35
|
+
<span class="font-mono text-sm font-bold text-indigo-300">v${v.version}</span>
|
|
36
|
+
<span
|
|
37
|
+
class="px-2 py-0.5 text-[10px] font-mono bg-purple-500/20 text-purple-300 border border-purple-500/30 rounded"
|
|
38
|
+
>
|
|
39
|
+
${v.aestheticId}
|
|
40
|
+
</span>
|
|
41
|
+
${
|
|
42
|
+
v.id === this.currentVersionId
|
|
43
|
+
? html`
|
|
44
|
+
<span
|
|
45
|
+
class="px-2 py-0.5 text-[10px] font-bold bg-emerald-500/20 text-emerald-300 border border-emerald-500/30 rounded-full uppercase"
|
|
46
|
+
>
|
|
47
|
+
Active Version
|
|
48
|
+
</span>
|
|
49
|
+
`
|
|
50
|
+
: ''
|
|
51
|
+
}
|
|
52
|
+
<span class="text-xs text-slate-500">
|
|
53
|
+
${new Date(v.createdAt).toLocaleString()}
|
|
54
|
+
</span>
|
|
55
|
+
</div>
|
|
56
|
+
<p class="text-xs text-slate-300">${v.changelogNote}</p>
|
|
57
|
+
</div>
|
|
58
|
+
${
|
|
59
|
+
v.id !== this.currentVersionId
|
|
60
|
+
? html`
|
|
61
|
+
<button
|
|
62
|
+
?disabled="${this.revertLoading}"
|
|
63
|
+
@click="() => this._handleRevert(v.id)"
|
|
64
|
+
class="px-3.5 py-1.5 bg-white/5 hover:bg-white/10 active:bg-white/15 disabled:opacity-50 text-slate-200 text-xs font-semibold rounded-lg border border-white/10 flex items-center gap-1.5 transition-colors self-start sm:self-auto cursor-pointer"
|
|
65
|
+
>
|
|
66
|
+
<span>Revert to v${v.version}</span>
|
|
67
|
+
</button>
|
|
68
|
+
`
|
|
69
|
+
: ''
|
|
70
|
+
}
|
|
71
|
+
</div>
|
|
72
|
+
`,
|
|
73
|
+
)}
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
`;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-scroll-area')) {
|
|
80
|
+
customElements.define('surreal-glassmorphism-scroll-area', GlassmorphismScrollArea);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export default GlassmorphismScrollArea;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
class GlassTableElement extends HTMLElement {
|
|
2
|
+
private _title: string = '';
|
|
3
|
+
private _docs: any = {};
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this.attachShadow({ mode: 'open' });
|
|
7
|
+
}
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
this._title = this.getAttribute('title') || '';
|
|
10
|
+
try {
|
|
11
|
+
const docsAttr = this.getAttribute('docs');
|
|
12
|
+
if (docsAttr) {
|
|
13
|
+
this._docs = JSON.parse(docsAttr);
|
|
14
|
+
}
|
|
15
|
+
} catch (e) {
|
|
16
|
+
this._docs = {};
|
|
17
|
+
}
|
|
18
|
+
this.render();
|
|
19
|
+
}
|
|
20
|
+
static get observedAttributes() {
|
|
21
|
+
return ['title', 'docs'];
|
|
22
|
+
}
|
|
23
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string) {
|
|
24
|
+
if (name === 'title') {
|
|
25
|
+
this._title = newValue;
|
|
26
|
+
}
|
|
27
|
+
if (name === 'docs') {
|
|
28
|
+
try {
|
|
29
|
+
this._docs = JSON.parse(newValue);
|
|
30
|
+
} catch (e) {}
|
|
31
|
+
}
|
|
32
|
+
this.render();
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
const usageText = (this._docs?.usage || "import Component from '@surreal-ui/wc';").trim();
|
|
36
|
+
const propsList = this._docs?.props || [];
|
|
37
|
+
const propsHtml =
|
|
38
|
+
propsList.length > 0
|
|
39
|
+
? `<div style="border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0.75rem; overflow: hidden; font-size: 0.75rem; backdrop-filter: blur(4px); background: rgba(0, 0, 0, 0.2);"><table style="width: 100%; text-align: left; border-collapse: collapse;"><thead style="background: rgba(255, 255, 255, 0.05); border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: #cbd5e1;"><tr><th style="padding: 0.75rem; font-weight: 600;">Name</th><th style="padding: 0.75rem; font-weight: 600;">Type</th><th style="padding: 0.75rem; font-weight: 600;">Default</th><th style="padding: 0.75rem; font-weight: 600;">Description</th></tr></thead><tbody style="color: #e2e8f0;">${propsList.map((p: any) => `<tr style="border-bottom: 1px solid rgba(255, 255, 255, 0.1);"><td style="padding: 0.75rem; font-family: monospace; font-weight: bold; color: #a5b4fc;">${p.name}</td><td style="padding: 0.75rem; font-family: monospace; color: #94a3b8;">${p.type}</td><td style="padding: 0.75rem; font-family: monospace; color: #64748b;">${p.default || '-'}</td><td style="padding: 0.75rem;">${p.description}</td></tr>`).join('')}</tbody></table></div>`
|
|
40
|
+
: `<p style="font-size: 0.75rem; color: #94a3b8;">No prop documentation specified for this package.</p>`;
|
|
41
|
+
if (this.shadowRoot) {
|
|
42
|
+
this.shadowRoot.innerHTML = `<style>:host { display: block; font-family: ui-sans-serif, system-ui, sans-serif; }.space-y-6 > * + * { margin-top: 1.5rem; }.container { backdrop-filter: blur(16px); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); padding: 1.5rem; border-radius: 1rem; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }h3 { font-size: 0.875rem; font-weight: 600; color: #e2e8f0; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.5rem 0; }pre { padding: 1rem; border-radius: 0.75rem; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.75rem; font-family: monospace; color: #a5b4fc; overflow-x: auto; box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.06); }</style><div class="container"><div><h3>Usage Example</h3><pre><code>${usageText}</code></pre></div><div><h3 style="margin-bottom: 0.75rem;">Props & Component Interface</h3>${propsHtml}</div></div>`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-table')) {
|
|
48
|
+
customElements.define('surreal-glassmorphism-table', GlassTableElement);
|
|
49
|
+
};
|
|
50
|
+
export { GlassTableElement as GlassmorphismTable, GlassTableElement };
|
|
51
|
+
|
|
52
|
+
export default GlassTableElement;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { html, css, LitElement } from 'lit';
|
|
2
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
+
@customElement('surreal-typography')
|
|
4
|
+
export class SurrealGlassmorphismTypography extends LitElement {
|
|
5
|
+
static styles = css`
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
}
|
|
9
|
+
.space-y-2 > * + * {
|
|
10
|
+
margin-top: 0.5rem;
|
|
11
|
+
}
|
|
12
|
+
.inline-flex {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 0.5rem;
|
|
16
|
+
padding: 0.25rem 0.75rem;
|
|
17
|
+
border-radius: 9999px;
|
|
18
|
+
background: rgba(236, 72, 153, 0.1);
|
|
19
|
+
border: 1px solid rgba(236, 72, 153, 0.3);
|
|
20
|
+
color: #f472b6;
|
|
21
|
+
font-size: 0.75rem;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
backdrop-filter: blur(12px);
|
|
24
|
+
}
|
|
25
|
+
h1 {
|
|
26
|
+
font-size: 1.875rem;
|
|
27
|
+
line-height: 2.25rem;
|
|
28
|
+
font-weight: 800;
|
|
29
|
+
color: #ffffff;
|
|
30
|
+
letter-spacing: -0.025em;
|
|
31
|
+
margin: 0;
|
|
32
|
+
}
|
|
33
|
+
p {
|
|
34
|
+
color: #94a3b8;
|
|
35
|
+
font-size: 0.875rem;
|
|
36
|
+
line-height: 1.25rem;
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
strong {
|
|
40
|
+
color: #e2e8f0;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
@property({ type: String }) badgeText = 'AI Multi-Platform Synthesizer Studio';
|
|
44
|
+
@property({ type: String }) title = 'Ingest & Generate Component';
|
|
45
|
+
@property({ type: String }) description =
|
|
46
|
+
"Paste your raw component code in any framework. Surreal UI's engine (powered by ";
|
|
47
|
+
@property({ type: String }) highlightText = '@pixerate/ai-core';
|
|
48
|
+
render() {
|
|
49
|
+
return html`
|
|
50
|
+
<div class="space-y-2">
|
|
51
|
+
<div class="inline-flex"><span>${this.badgeText}</span></div>
|
|
52
|
+
<h1>${this.title}</h1>
|
|
53
|
+
<p>
|
|
54
|
+
${this.description}
|
|
55
|
+
<strong>${this.highlightText}</strong>
|
|
56
|
+
) will synthesize React, Svelte, and WebComponent variants, extract prop docs, and tag
|
|
57
|
+
aesthetics automatically.
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-typography')) {
|
|
64
|
+
customElements.define('surreal-glassmorphism-typography', GlassmorphismTypography);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export default GlassmorphismTypography;
|