lightview 1.8.2 → 2.0.1
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/.codacy/cli.sh +149 -0
- package/.codacy/codacy.yaml +15 -0
- package/.github/instructions/codacy.instructions.md +72 -0
- package/.wranglerignore +21 -0
- package/README.md +1330 -19
- package/_headers +4 -0
- package/build.js +70 -0
- package/components/actions/button.js +151 -0
- package/components/actions/dropdown.js +120 -0
- package/components/actions/modal.js +146 -0
- package/components/actions/swap.js +118 -0
- package/components/daisyui.js +288 -0
- package/components/data-display/accordion.js +128 -0
- package/components/data-display/alert.js +112 -0
- package/components/data-display/avatar.js +170 -0
- package/components/data-display/badge.js +82 -0
- package/components/data-display/card.js +151 -0
- package/components/data-display/carousel.js +94 -0
- package/components/data-display/chart.js +220 -0
- package/components/data-display/chat.js +128 -0
- package/components/data-display/collapse.js +103 -0
- package/components/data-display/countdown.js +69 -0
- package/components/data-display/diff.js +111 -0
- package/components/data-display/kbd.js +65 -0
- package/components/data-display/loading.js +75 -0
- package/components/data-display/progress.js +79 -0
- package/components/data-display/radial-progress.js +88 -0
- package/components/data-display/skeleton.js +66 -0
- package/components/data-display/stats.js +159 -0
- package/components/data-display/table.js +146 -0
- package/components/data-display/timeline.js +146 -0
- package/components/data-display/toast.js +72 -0
- package/components/data-display/tooltip.js +74 -0
- package/components/data-input/checkbox.js +253 -0
- package/components/data-input/file-input.js +224 -0
- package/components/data-input/input.js +264 -0
- package/components/data-input/radio.js +338 -0
- package/components/data-input/range.js +204 -0
- package/components/data-input/rating.js +219 -0
- package/components/data-input/select.js +287 -0
- package/components/data-input/textarea.js +287 -0
- package/components/data-input/toggle.js +201 -0
- package/components/index.js +137 -0
- package/components/layout/divider.js +72 -0
- package/components/layout/drawer.js +142 -0
- package/components/layout/footer.js +100 -0
- package/components/layout/hero.js +109 -0
- package/components/layout/indicator.js +90 -0
- package/components/layout/join.js +78 -0
- package/components/layout/navbar.js +110 -0
- package/components/navigation/breadcrumbs.js +91 -0
- package/components/navigation/dock.js +103 -0
- package/components/navigation/menu.js +126 -0
- package/components/navigation/pagination.js +105 -0
- package/components/navigation/steps.js +89 -0
- package/components/navigation/tabs.css +177 -0
- package/components/navigation/tabs.js +123 -0
- package/components/theme/theme-switch.css +65 -0
- package/components/theme/theme-switch.js +177 -0
- package/docs/about.html +164 -0
- package/docs/api/computed.html +184 -0
- package/docs/api/effects.html +173 -0
- package/docs/api/elements.html +180 -0
- package/docs/api/enhance.html +225 -0
- package/docs/api/hypermedia.html +165 -0
- package/docs/api/index.html +178 -0
- package/docs/api/nav.html +18 -0
- package/docs/api/signals.html +136 -0
- package/docs/api/state.html +217 -0
- package/docs/assets/images/logo-favicon.svg +42 -0
- package/docs/assets/images/logo-static.svg +40 -0
- package/docs/assets/images/logo.svg +66 -0
- package/docs/assets/js/examplify.js +395 -0
- package/docs/assets/styles/site.css +1102 -0
- package/docs/assets/styles/themes.css +236 -0
- package/docs/components/accordion.html +439 -0
- package/docs/components/alert.html +528 -0
- package/docs/components/avatar.html +586 -0
- package/docs/components/badge.html +531 -0
- package/docs/components/breadcrumbs.html +278 -0
- package/docs/components/button.html +579 -0
- package/docs/components/card.html +561 -0
- package/docs/components/carousel.html +286 -0
- package/docs/components/chart-area.html +702 -0
- package/docs/components/chart-bar.html +782 -0
- package/docs/components/chart-column.html +735 -0
- package/docs/components/chart-line.html +794 -0
- package/docs/components/chart-pie.html +823 -0
- package/docs/components/chart.html +610 -15
- package/docs/components/chat.html +547 -0
- package/docs/components/checkbox.html +641 -0
- package/docs/components/collapse.html +536 -0
- package/docs/components/component-nav.html +53 -0
- package/docs/components/countdown.html +470 -0
- package/docs/components/diff.html +245 -0
- package/docs/components/divider.html +240 -0
- package/docs/components/dock.html +277 -0
- package/docs/components/drawer.html +515 -0
- package/docs/components/dropdown.html +479 -0
- package/docs/components/file-input.html +591 -0
- package/docs/components/footer.html +301 -0
- package/docs/components/gallery.html +504 -0
- package/docs/components/hero.html +264 -0
- package/docs/components/index.css +840 -0
- package/docs/components/index.html +735 -0
- package/docs/components/indicator.html +342 -0
- package/docs/components/input.html +644 -0
- package/docs/components/join.html +285 -0
- package/docs/components/kbd.html +322 -0
- package/docs/components/loading.html +521 -0
- package/docs/components/menu.html +461 -0
- package/docs/components/modal.html +639 -0
- package/docs/components/navbar.html +321 -0
- package/docs/components/pagination.html +279 -0
- package/docs/components/progress.html +514 -0
- package/docs/components/radial-progress.html +434 -0
- package/docs/components/radio.html +655 -0
- package/docs/components/range.html +611 -0
- package/docs/components/rating.html +642 -0
- package/docs/components/select.html +696 -0
- package/docs/components/sidebar-setup.js +93 -0
- package/docs/components/skeleton.html +447 -0
- package/docs/components/spinner.html +68 -0
- package/docs/components/stats.html +486 -0
- package/docs/components/steps.html +356 -0
- package/docs/components/swap.html +517 -0
- package/docs/components/switch.html +68 -0
- package/docs/components/table.html +668 -0
- package/docs/components/tabs.html +506 -0
- package/docs/components/text-input.html +68 -0
- package/docs/components/textarea.html +603 -0
- package/docs/components/timeline.html +485 -42
- package/docs/components/toast.html +474 -0
- package/docs/components/toggle.html +564 -0
- package/docs/components/tooltip.html +423 -0
- package/docs/examples/getting-started-example.html +40 -0
- package/docs/examples/index.html +93 -0
- package/docs/getting-started/index.html +739 -0
- package/docs/getting-started/reviews.html +23 -0
- package/docs/getting-started/reviews.odom +108 -0
- package/docs/getting-started/reviews.vdom +84 -0
- package/docs/index.html +132 -42
- package/docs/playground.html +416 -0
- package/docs/router.html +285 -0
- package/docs/styles/index.html +190 -0
- package/functions/_middleware.js +32 -0
- package/index.html +309 -0
- package/lightview-router.js +364 -0
- package/lightview-x.js +1577 -0
- package/lightview.js +659 -1200
- package/middleware/locale.js +25 -0
- package/middleware/markdown.js +44 -0
- package/middleware/notFound.js +37 -0
- package/package.json +27 -41
- package/watch.js +92 -0
- package/wrangler.toml +12 -0
- package/.idea/lightview.iml +0 -12
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/LICENSE +0 -21
- package/codepen-no-tabs-embed.css +0 -2
- package/docs/CNAME +0 -1
- package/docs/api.html +0 -674
- package/docs/blank.html +0 -10
- package/docs/comparedto.html +0 -89
- package/docs/components/chart-repl.html +0 -69
- package/docs/components/components.js +0 -113
- package/docs/components/contents.html +0 -17
- package/docs/components/gantt-repl.html +0 -61
- package/docs/components/gantt.html +0 -42
- package/docs/components/gauge-repl.html +0 -66
- package/docs/components/gauge.html +0 -20
- package/docs/components/orgchart-repl.html +0 -64
- package/docs/components/orgchart.html +0 -41
- package/docs/components/repl-as-src.html +0 -17
- package/docs/components/repl-repl.html +0 -95
- package/docs/components/repl.html +0 -527
- package/docs/components/timeline-repl.html +0 -72
- package/docs/components.html +0 -14
- package/docs/css/highlightjs.min.css +0 -9
- package/docs/css/tutorial.css +0 -35
- package/docs/examples/anchor.html +0 -11
- package/docs/examples/chart.html +0 -34
- package/docs/examples/counter.html +0 -26
- package/docs/examples/counter.test.mjs +0 -47
- package/docs/examples/counter2.html +0 -26
- package/docs/examples/directives.html +0 -79
- package/docs/examples/foreign.html +0 -50
- package/docs/examples/forgeinform.html +0 -98
- package/docs/examples/form.html +0 -61
- package/docs/examples/gauge.html +0 -18
- package/docs/examples/invalid-template-literals.html +0 -44
- package/docs/examples/medium/remote.html +0 -60
- package/docs/examples/message.html +0 -18
- package/docs/examples/nested.html +0 -11
- package/docs/examples/object-bound-form.html +0 -34
- package/docs/examples/remote-server.js +0 -51
- package/docs/examples/remote.html +0 -34
- package/docs/examples/remote.json +0 -1
- package/docs/examples/scratch.html +0 -69
- package/docs/examples/sensors/index.html +0 -44
- package/docs/examples/sensors/sensor-server.js +0 -30
- package/docs/examples/shared.html +0 -41
- package/docs/examples/template.html +0 -33
- package/docs/examples/timeline.html +0 -21
- package/docs/examples/todo.html +0 -40
- package/docs/examples/top.html +0 -10
- package/docs/examples/types.html +0 -94
- package/docs/examples/xor.html +0 -62
- package/docs/examples.html +0 -25
- package/docs/javascript/codejar.min.js +0 -8
- package/docs/javascript/highlightjs.min.js +0 -1173
- package/docs/javascript/isomorphic-git.js +0 -9
- package/docs/javascript/json5.min.js +0 -1
- package/docs/javascript/lightning-fs.js +0 -1
- package/docs/javascript/lightview.js +0 -1285
- package/docs/javascript/marked.min.js +0 -6
- package/docs/javascript/peerjs.min.js +0 -70
- package/docs/javascript/turndown.js +0 -973
- package/docs/javascript/types.js +0 -606
- package/docs/javascript/utils.js +0 -45
- package/docs/lightview.html +0 -63
- package/docs/old_index.html +0 -965
- package/docs/old_index.md +0 -1132
- package/docs/slidein.html +0 -51
- package/docs/tutorial/0-getting-started.html +0 -67
- package/docs/tutorial/1-intro-to-variables.html +0 -103
- package/docs/tutorial/10-template-components.html +0 -80
- package/docs/tutorial/11-linked-components.html +0 -76
- package/docs/tutorial/12-imported-components.html +0 -67
- package/docs/tutorial/13-input-binding.html +0 -94
- package/docs/tutorial/14-automatic-variable-creation.html +0 -74
- package/docs/tutorial/15-form-binding.html +0 -110
- package/docs/tutorial/16-if-directive.html +0 -60
- package/docs/tutorial/17-loop-directives.html +0 -83
- package/docs/tutorial/18-sanitizing-and-escaping-input.html +0 -79
- package/docs/tutorial/2-imported-and-exported-variables.html +0 -80
- package/docs/tutorial/3-data-types.html +0 -89
- package/docs/tutorial/4-extended-data-types.html +0 -83
- package/docs/tutorial/5-extended-functional-types.html +0 -96
- package/docs/tutorial/5.1-extended-functional-types.html +0 -79
- package/docs/tutorial/5.2-extended-functional-types.html +0 -70
- package/docs/tutorial/6-conventional-javascript.html +0 -75
- package/docs/tutorial/7-monitoring-with-observers.html +0 -107
- package/docs/tutorial/8-event-listeners.html +0 -65
- package/docs/tutorial/9-intro-to-components.html +0 -91
- package/docs/tutorial/contents.html +0 -32
- package/docs/tutorial/my-component.html +0 -29
- package/docs/tutorial/remote-value.json +0 -4
- package/docs/websiterepl.html +0 -46
- package/jest-puppeteer.config.js +0 -5
- package/jest.config.json +0 -12
- package/lightview.min.js +0 -1
- package/lightview_good.js +0 -1267
- package/lightview_optimized.js +0 -1274
- package/repl_hold.html +0 -320
- package/test/basic.html +0 -104
- package/test/basic.test.mjs +0 -315
- package/test/extended.html +0 -29
- package/test/extended.test.mjs +0 -448
- package/types.js +0 -607
- package/unsplash.key +0 -1
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
<!-- SEO-friendly SPA Shim -->
|
|
2
|
+
<script src="/lightview-router.js"></script>
|
|
3
|
+
<script>
|
|
4
|
+
if (window.LightviewRouter) {
|
|
5
|
+
LightviewRouter.base('/index.html');
|
|
6
|
+
}
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<!-- Load the page-specific stylesheet -->
|
|
10
|
+
<link rel="stylesheet" href="/docs/components/index.css">
|
|
11
|
+
|
|
12
|
+
<!-- Gallery Structure -->
|
|
13
|
+
<div class="gallery-page">
|
|
14
|
+
<div class="gallery-layout">
|
|
15
|
+
<!-- Sidebar Overlay -->
|
|
16
|
+
<div id="sidebar-overlay" class="sidebar-overlay"></div>
|
|
17
|
+
|
|
18
|
+
<!-- Sidebar -->
|
|
19
|
+
<div id="gallery-sidebar" class="gallery-sidebar" style="visibility: hidden"
|
|
20
|
+
src="/docs/components/component-nav.html"></div>
|
|
21
|
+
|
|
22
|
+
<!-- Main Content -->
|
|
23
|
+
<div id="gallery-main" class="gallery-main">
|
|
24
|
+
<!-- Header -->
|
|
25
|
+
<div class="gallery-header">
|
|
26
|
+
<button id="toggle-btn" class="toggle-btn" aria-label="Toggle Sidebar">
|
|
27
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="toggle-icon"
|
|
28
|
+
style="stroke: currentColor; stroke-width: 2;">
|
|
29
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
|
|
30
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M11 19l-7-7 7-7" />
|
|
31
|
+
</svg>
|
|
32
|
+
</button>
|
|
33
|
+
<h1 class="gallery-title">Components Gallery</h1>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<!-- Content -->
|
|
37
|
+
<div class="gallery-content">
|
|
38
|
+
<!-- Intro -->
|
|
39
|
+
<div class="gallery-intro">
|
|
40
|
+
<p>Explore all Lightview components powered by DaisyUI. Use the sidebar (<code>>></code>) to
|
|
41
|
+
navigate to individual
|
|
42
|
+
component documentation, or browse just a few examples below and click on the (<code>i</code>)
|
|
43
|
+
to see more documentation.</p>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<!-- Section placeholders - each script renders into its section -->
|
|
47
|
+
<section class="gallery-section" id="usage-section">
|
|
48
|
+
<div class="card bg-base-100 shadow-sm" style="border: 1px solid var(--base-300);">
|
|
49
|
+
<div class="card-body">
|
|
50
|
+
<h2 class="card-title">Using Components</h2>
|
|
51
|
+
<p style="margin-bottom: 1rem;">Components can be used with multiple syntaxes. Choose your
|
|
52
|
+
style (Object DOM and HTML requires <code>lightview-x</code>):</p>
|
|
53
|
+
|
|
54
|
+
<script>
|
|
55
|
+
window.switchUsageSyntaxTab = (tabId) => {
|
|
56
|
+
const tabs = ['tagged', 'vdom', 'object', 'html'];
|
|
57
|
+
tabs.forEach(t => {
|
|
58
|
+
const tabEl = document.getElementById(`usage-tab-${t}`);
|
|
59
|
+
const contentEl = document.getElementById(`usage-syntax-${t}`);
|
|
60
|
+
if (t === tabId) {
|
|
61
|
+
tabEl.classList.add('syntax-tab-active');
|
|
62
|
+
contentEl.style.display = 'block';
|
|
63
|
+
} else {
|
|
64
|
+
tabEl.classList.remove('syntax-tab-active');
|
|
65
|
+
contentEl.style.display = 'none';
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<!-- Tabs -->
|
|
72
|
+
<div role="tablist" class="syntax-tabs" style="margin-bottom: 1rem;">
|
|
73
|
+
<button id="usage-tab-tagged" role="tab" class="syntax-tab syntax-tab-active"
|
|
74
|
+
onclick="switchUsageSyntaxTab('tagged')">Tagged</button>
|
|
75
|
+
<button id="usage-tab-vdom" role="tab" class="syntax-tab"
|
|
76
|
+
onclick="switchUsageSyntaxTab('vdom')">vDOM</button>
|
|
77
|
+
<button id="usage-tab-object" role="tab" class="syntax-tab"
|
|
78
|
+
onclick="switchUsageSyntaxTab('object')">Object DOM</button>
|
|
79
|
+
<button id="usage-tab-html" role="tab" class="syntax-tab"
|
|
80
|
+
onclick="switchUsageSyntaxTab('html')">HTML</button>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<!-- Content Containers -->
|
|
84
|
+
<div id="usage-syntax-tagged">
|
|
85
|
+
<pre><script>
|
|
86
|
+
examplify(document.currentScript.nextElementSibling, {
|
|
87
|
+
at: document.currentScript.parentElement,
|
|
88
|
+
scripts: ['/lightview.js', '/lightview-x.js'],
|
|
89
|
+
styles: ['https://cdn.jsdelivr.net/npm/daisyui@4.12.10/dist/full.min.css'],
|
|
90
|
+
type: 'module',
|
|
91
|
+
minHeight: 105,
|
|
92
|
+
autoRun: true
|
|
93
|
+
});
|
|
94
|
+
</script><code contenteditable="true">await import('/components/actions/button.js');
|
|
95
|
+
const { $, tags } = Lightview;
|
|
96
|
+
const { div, Button } = tags;
|
|
97
|
+
|
|
98
|
+
const app = div({ style: 'padding: 1rem; display: flex; gap: 0.5rem;' },
|
|
99
|
+
Button({ color: 'primary' }, 'Save'),
|
|
100
|
+
Button({ variant: 'outline' }, 'Cancel')
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
$('#example').content(app);</code></pre>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<div id="usage-syntax-vdom" style="display: none;">
|
|
107
|
+
<pre><script>
|
|
108
|
+
examplify(document.currentScript.nextElementSibling, {
|
|
109
|
+
at: document.currentScript.parentElement,
|
|
110
|
+
scripts: ['/lightview.js', '/lightview-x.js'],
|
|
111
|
+
styles: ['https://cdn.jsdelivr.net/npm/daisyui@4.12.10/dist/full.min.css'],
|
|
112
|
+
type: 'module',
|
|
113
|
+
minHeight: 105
|
|
114
|
+
});
|
|
115
|
+
</script><code contenteditable="true">await import('/components/actions/button.js');
|
|
116
|
+
const { $, tags } = Lightview;
|
|
117
|
+
const { div, Button } = tags;
|
|
118
|
+
|
|
119
|
+
const app = {
|
|
120
|
+
tag: div,
|
|
121
|
+
attributes: { style: 'padding: 1rem; display: flex; gap: 0.5rem;' },
|
|
122
|
+
children: [
|
|
123
|
+
{ tag: Button, attributes: { color: 'primary' }, children: ['Save'] },
|
|
124
|
+
{ tag: Button, attributes: { variant: 'outline' }, children: ['Cancel'] }
|
|
125
|
+
]
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
$('#example').content(app);</code></pre>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div id="usage-syntax-object" style="display: none;">
|
|
132
|
+
<pre><script>
|
|
133
|
+
examplify(document.currentScript.nextElementSibling, {
|
|
134
|
+
at: document.currentScript.parentElement,
|
|
135
|
+
scripts: ['/lightview.js', '/lightview-x.js'],
|
|
136
|
+
styles: ['https://cdn.jsdelivr.net/npm/daisyui@4.12.10/dist/full.min.css'],
|
|
137
|
+
type: 'module',
|
|
138
|
+
minHeight: 105
|
|
139
|
+
});
|
|
140
|
+
</script><code contenteditable="true">// Object DOM syntax now requires lightview-x.js
|
|
141
|
+
await import('/components/actions/button.js');
|
|
142
|
+
const { $ } = Lightview;
|
|
143
|
+
|
|
144
|
+
const app = {
|
|
145
|
+
div: {
|
|
146
|
+
style: 'padding: 1rem; display: flex; gap: 0.5rem;',
|
|
147
|
+
children: [
|
|
148
|
+
{ Button: { color: 'primary', children: ['Save'] } },
|
|
149
|
+
{ Button: { variant: 'outline', children: ['Cancel'] } }
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
$('#example').content(app);</code></pre>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<div id="usage-syntax-html" style="display: none;">
|
|
158
|
+
<pre><script>
|
|
159
|
+
examplify(document.currentScript.nextElementSibling, {
|
|
160
|
+
at: document.currentScript.parentElement,
|
|
161
|
+
scripts: ['/lightview.js', '/lightview-x.js'],
|
|
162
|
+
styles: ['https://cdn.jsdelivr.net/npm/daisyui@4.12.10/dist/full.min.css'],
|
|
163
|
+
type: 'module',
|
|
164
|
+
language: 'html',
|
|
165
|
+
minHeight: 105
|
|
166
|
+
});
|
|
167
|
+
</script><code contenteditable="true" class="language-html"><!-- Import the component (registers lv-button) -->
|
|
168
|
+
<script type="module" src="/components/actions/button.js"></script>
|
|
169
|
+
|
|
170
|
+
<div style="padding: 1rem; display: flex; gap: 0.5rem;">
|
|
171
|
+
<lv-button color="primary">Save</lv-button>
|
|
172
|
+
<lv-button variant="outline">Cancel</lv-button>
|
|
173
|
+
</div></code></pre>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</section>
|
|
178
|
+
<section class="gallery-section" id="buttons-section"></section>
|
|
179
|
+
<section class="gallery-section" id="inputs-section"></section>
|
|
180
|
+
<section class="gallery-section" id="cards-section"></section>
|
|
181
|
+
<section class="gallery-section" id="alerts-section"></section>
|
|
182
|
+
<section class="gallery-section" id="badges-section"></section>
|
|
183
|
+
<section class="gallery-section" id="stats-section"></section>
|
|
184
|
+
<section class="gallery-section" id="charts-section"></section>
|
|
185
|
+
<section class="gallery-section" id="progress-section"></section>
|
|
186
|
+
<section class="gallery-section" id="steps-section"></section>
|
|
187
|
+
<section class="gallery-section" id="chat-section"></section>
|
|
188
|
+
<section class="gallery-section" id="timeline-section"></section>
|
|
189
|
+
<section class="gallery-section" id="table-section"></section>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
<!-- Shared helpers and sidebar setup -->
|
|
196
|
+
<script type="module">
|
|
197
|
+
const { tags, signal, $ } = Lightview;
|
|
198
|
+
const { div, section, h2, h3, p, button, span, ul, svg, path, pre, code } = tags;
|
|
199
|
+
|
|
200
|
+
// Sidebar state
|
|
201
|
+
const sidebarOpen = signal(false);
|
|
202
|
+
|
|
203
|
+
// Toggle sidebar
|
|
204
|
+
const sidebar = document.getElementById('gallery-sidebar');
|
|
205
|
+
const main = document.getElementById('gallery-main');
|
|
206
|
+
const overlay = document.getElementById('sidebar-overlay');
|
|
207
|
+
const toggleBtn = document.getElementById('toggle-btn');
|
|
208
|
+
const toggleIcon = toggleBtn.querySelector('svg');
|
|
209
|
+
|
|
210
|
+
function updateSidebarUI() {
|
|
211
|
+
sidebar.className = `gallery-sidebar ${sidebarOpen.value ? 'open' : 'closed'}`;
|
|
212
|
+
main.className = `gallery-main ${sidebarOpen.value ? '' : 'sidebar-closed'}`;
|
|
213
|
+
overlay.className = `sidebar-overlay ${sidebarOpen.value ? 'active' : ''}`;
|
|
214
|
+
toggleIcon.setAttribute('class', `toggle-icon ${sidebarOpen.value ? '' : 'rotated'}`);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
toggleBtn.onclick = () => {
|
|
218
|
+
sidebar.style.visibility = ''; // Remove initial hidden state
|
|
219
|
+
sidebarOpen.value = !sidebarOpen.value;
|
|
220
|
+
updateSidebarUI();
|
|
221
|
+
};
|
|
222
|
+
overlay.onclick = () => { sidebarOpen.value = false; updateSidebarUI(); };
|
|
223
|
+
updateSidebarUI();
|
|
224
|
+
|
|
225
|
+
// Mark layout as ready - enables sidebar visibility after initial state is set
|
|
226
|
+
document.querySelector('.gallery-layout').classList.add('js-ready');
|
|
227
|
+
|
|
228
|
+
// Info icon helper (shared via window)
|
|
229
|
+
window.InfoIcon = () => svg(
|
|
230
|
+
{ xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", class: "info-icon", style: "stroke: currentColor;" },
|
|
231
|
+
path({ "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" })
|
|
232
|
+
);
|
|
233
|
+
</script>
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
<!-- Buttons Section -->
|
|
238
|
+
<script type="module">
|
|
239
|
+
await import('/components/actions/button.js');
|
|
240
|
+
await import('/components/data-display/card.js');
|
|
241
|
+
const { tags, $ } = Lightview;
|
|
242
|
+
const { div, span, a, Button, Card } = tags;
|
|
243
|
+
|
|
244
|
+
const content = div({},
|
|
245
|
+
div({ class: "section-header" },
|
|
246
|
+
span({ class: "section-badge" }, "Buttons"),
|
|
247
|
+
a({ href: "/docs/components/button", class: "info-link", "aria-label": "View Button Docs" }, InfoIcon())
|
|
248
|
+
),
|
|
249
|
+
Card({ styleSheets: ['/docs/components/index.css'] },
|
|
250
|
+
Card.Body({},
|
|
251
|
+
div({ style: "margin-bottom: 1.5rem;" },
|
|
252
|
+
div({ class: "component-label" }, "Colors"),
|
|
253
|
+
div({ class: "component-row" },
|
|
254
|
+
Button({ useShadow: true }, "Default"),
|
|
255
|
+
Button({ color: "neutral" }, "Neutral"),
|
|
256
|
+
Button({ color: "primary" }, "Primary"),
|
|
257
|
+
Button({ color: "secondary" }, "Secondary"),
|
|
258
|
+
Button({ color: "accent" }, "Accent"),
|
|
259
|
+
Button({ color: "info" }, "Info"),
|
|
260
|
+
Button({ color: "success" }, "Success"),
|
|
261
|
+
Button({ color: "warning" }, "Warning"),
|
|
262
|
+
Button({ color: "error" }, "Error")
|
|
263
|
+
)
|
|
264
|
+
),
|
|
265
|
+
div({ style: "margin-bottom: 1.5rem;" },
|
|
266
|
+
div({ class: "component-label" }, "Variants"),
|
|
267
|
+
div({ class: "component-row" },
|
|
268
|
+
Button({ variant: "outline", color: "primary" }, "Outline"),
|
|
269
|
+
Button({ variant: "soft", color: "primary" }, "Soft"),
|
|
270
|
+
Button({ color: "ghost" }, "Ghost"),
|
|
271
|
+
Button({ color: "link" }, "Link")
|
|
272
|
+
)
|
|
273
|
+
),
|
|
274
|
+
div({},
|
|
275
|
+
div({ class: "component-label" }, "Sizes"),
|
|
276
|
+
div({ class: "component-row centered" },
|
|
277
|
+
Button({ size: "xs" }, "Tiny"),
|
|
278
|
+
Button({ size: "sm" }, "Small"),
|
|
279
|
+
Button({ size: "md" }, "Medium"),
|
|
280
|
+
Button({ size: "lg" }, "Large")
|
|
281
|
+
)
|
|
282
|
+
)
|
|
283
|
+
)
|
|
284
|
+
)
|
|
285
|
+
);
|
|
286
|
+
|
|
287
|
+
$('#buttons-section').content(content);
|
|
288
|
+
</script>
|
|
289
|
+
|
|
290
|
+
<!-- Inputs Section -->
|
|
291
|
+
<script type="module">
|
|
292
|
+
await import('/components/data-input/input.js');
|
|
293
|
+
await import('/components/data-input/select.js');
|
|
294
|
+
await import('/components/data-input/file-input.js');
|
|
295
|
+
await import('/components/data-input/range.js');
|
|
296
|
+
await import('/components/data-input/textarea.js');
|
|
297
|
+
await import('/components/data-input/rating.js');
|
|
298
|
+
await import('/components/data-input/checkbox.js');
|
|
299
|
+
await import('/components/data-input/toggle.js');
|
|
300
|
+
await import('/components/data-input/radio.js');
|
|
301
|
+
await import('/components/data-display/card.js');
|
|
302
|
+
const { tags, $ } = Lightview;
|
|
303
|
+
const { div, span, a, option, Input, Select, FileInput, Range, Textarea, Rating, Checkbox, Toggle, Radio, Card } = tags;
|
|
304
|
+
|
|
305
|
+
const content = div({},
|
|
306
|
+
div({ class: "section-header" },
|
|
307
|
+
span({ class: "section-badge accent" }, "Inputs")
|
|
308
|
+
),
|
|
309
|
+
Card({ styleSheets: ['/docs/components/index.css'] },
|
|
310
|
+
Card.Body({},
|
|
311
|
+
// Row 1: Text Input, Select, File Input, Textarea (2 columns)
|
|
312
|
+
div({ class: "inputs-2col", style: "margin-bottom: 1.5rem;" },
|
|
313
|
+
div({ class: "form-group" },
|
|
314
|
+
div({ class: "form-label" },
|
|
315
|
+
span({ class: "label-text" }, "Text Input"),
|
|
316
|
+
a({ href: "/docs/components/input", class: "info-link" }, InfoIcon())
|
|
317
|
+
),
|
|
318
|
+
Input({ placeholder: "Type here" })
|
|
319
|
+
),
|
|
320
|
+
div({ class: "form-group" },
|
|
321
|
+
div({ class: "form-label" },
|
|
322
|
+
span({ class: "label-text" }, "Select"),
|
|
323
|
+
a({ href: "/docs/components/select", class: "info-link" }, InfoIcon())
|
|
324
|
+
),
|
|
325
|
+
Select({ useShadow: true },
|
|
326
|
+
option({ disabled: true, selected: true }, "Pick one"),
|
|
327
|
+
option({}, "Option A"),
|
|
328
|
+
option({}, "Option B")
|
|
329
|
+
)
|
|
330
|
+
),
|
|
331
|
+
div({ class: "form-group" },
|
|
332
|
+
div({ class: "form-label" },
|
|
333
|
+
span({ class: "label-text" }, "File Input"),
|
|
334
|
+
a({ href: "/docs/components/file-input", class: "info-link" }, InfoIcon())
|
|
335
|
+
),
|
|
336
|
+
FileInput({ useShadow: true })
|
|
337
|
+
),
|
|
338
|
+
div({ class: "form-group" },
|
|
339
|
+
div({ class: "form-label" },
|
|
340
|
+
span({ class: "label-text" }, "Textarea"),
|
|
341
|
+
a({ href: "/docs/components/textarea", class: "info-link" }, InfoIcon())
|
|
342
|
+
),
|
|
343
|
+
Textarea({ placeholder: "Bio" })
|
|
344
|
+
)
|
|
345
|
+
),
|
|
346
|
+
// Row 2: Rating and Range (2 columns)
|
|
347
|
+
div({ class: "inputs-2col", style: "margin-bottom: 1.5rem;" },
|
|
348
|
+
div({ class: "form-group" },
|
|
349
|
+
div({ class: "form-label" },
|
|
350
|
+
span({ class: "label-text" }, "Rating"),
|
|
351
|
+
a({ href: "/docs/components/rating", class: "info-link" }, InfoIcon())
|
|
352
|
+
),
|
|
353
|
+
Rating({ value: 3, max: 5 })
|
|
354
|
+
),
|
|
355
|
+
div({ class: "form-group" },
|
|
356
|
+
div({ class: "form-label" },
|
|
357
|
+
span({ class: "label-text" }, "Range"),
|
|
358
|
+
a({ href: "/docs/components/range", class: "info-link" }, InfoIcon())
|
|
359
|
+
),
|
|
360
|
+
Range({ min: 0, max: 100, value: 40, color: "primary" })
|
|
361
|
+
)
|
|
362
|
+
),
|
|
363
|
+
// Row 3: Checkbox, Toggle, Radio (3 columns)
|
|
364
|
+
div({ class: "inputs-3col" },
|
|
365
|
+
div({ class: "toggle-item" },
|
|
366
|
+
span({}, "Checkbox"),
|
|
367
|
+
a({ href: "/docs/components/checkbox", class: "info-link" }, InfoIcon()),
|
|
368
|
+
Checkbox({ color: "primary", checked: true })
|
|
369
|
+
),
|
|
370
|
+
div({ class: "toggle-item" },
|
|
371
|
+
span({}, "Toggle"),
|
|
372
|
+
a({ href: "/docs/components/toggle", class: "info-link" }, InfoIcon()),
|
|
373
|
+
Toggle({ color: "secondary", checked: true })
|
|
374
|
+
),
|
|
375
|
+
div({ class: "toggle-item" },
|
|
376
|
+
span({}, "Radio"),
|
|
377
|
+
a({ href: "/docs/components/radio", class: "info-link" }, InfoIcon()),
|
|
378
|
+
Radio({ color: "accent", checked: true, name: "demo-radio" })
|
|
379
|
+
)
|
|
380
|
+
)
|
|
381
|
+
)
|
|
382
|
+
)
|
|
383
|
+
);
|
|
384
|
+
|
|
385
|
+
$('#inputs-section').content(content);
|
|
386
|
+
</script>
|
|
387
|
+
|
|
388
|
+
<!-- Cards Section -->
|
|
389
|
+
<script type="module">
|
|
390
|
+
await import('/components/data-display/card.js');
|
|
391
|
+
await import('/components/actions/button.js');
|
|
392
|
+
const { tags, $ } = Lightview;
|
|
393
|
+
const { div, span, a, p, img, Card, Button } = tags;
|
|
394
|
+
|
|
395
|
+
const content = div({},
|
|
396
|
+
div({ class: "section-header" },
|
|
397
|
+
span({ class: "section-badge secondary" }, "Cards"),
|
|
398
|
+
a({ href: "/docs/components/card", class: "info-link" }, InfoIcon())
|
|
399
|
+
),
|
|
400
|
+
div({ class: "card-grid" },
|
|
401
|
+
Card({ imageFull: true, useShadow: true, styleSheets: ['/docs/components/index.css'] },
|
|
402
|
+
Card.Figure({},
|
|
403
|
+
img({ src: "https://images.unsplash.com/photo-1606107557195-0e29a4b5b4aa?w=400&h=200&fit=crop", alt: "Shoes" })
|
|
404
|
+
),
|
|
405
|
+
Card.Body({},
|
|
406
|
+
Card.Title({}, "Image Overlay"),
|
|
407
|
+
p({}, "Seamless image integration.")
|
|
408
|
+
)
|
|
409
|
+
),
|
|
410
|
+
Card({ styleSheets: ['/docs/components/index.css'] },
|
|
411
|
+
Card.Body({},
|
|
412
|
+
Card.Title({}, "Standard"),
|
|
413
|
+
p({}, "A simple card with padding and shadow."),
|
|
414
|
+
Card.Actions({ justify: "end" },
|
|
415
|
+
Button({ color: "primary", size: "sm" }, "Action")
|
|
416
|
+
)
|
|
417
|
+
)
|
|
418
|
+
),
|
|
419
|
+
Card({ bg: "bg-primary", useShadow: true, class: "text-primary-content", styleSheets: ['/docs/components/index.css'] },
|
|
420
|
+
Card.Body({},
|
|
421
|
+
Card.Title({}, "Colored"),
|
|
422
|
+
p({}, "Cards can use theme colors directly.")
|
|
423
|
+
)
|
|
424
|
+
)
|
|
425
|
+
)
|
|
426
|
+
);
|
|
427
|
+
|
|
428
|
+
$('#cards-section').content(content);
|
|
429
|
+
</script>
|
|
430
|
+
|
|
431
|
+
<!-- Alerts Section -->
|
|
432
|
+
<script type="module">
|
|
433
|
+
await import('/components/data-display/alert.js');
|
|
434
|
+
const { tags, $ } = Lightview;
|
|
435
|
+
const { div, span, a, Alert } = tags;
|
|
436
|
+
|
|
437
|
+
const content = div({},
|
|
438
|
+
div({ class: "section-header" },
|
|
439
|
+
span({ class: "section-badge info" }, "Alerts"),
|
|
440
|
+
a({ href: "/docs/components/alert", class: "info-link" }, InfoIcon())
|
|
441
|
+
),
|
|
442
|
+
div({ class: "alert-stack" },
|
|
443
|
+
Alert({ color: "info" }, span({}, "New software update available.")),
|
|
444
|
+
Alert({ color: "success" }, span({}, "Your purchase has been confirmed!"))
|
|
445
|
+
)
|
|
446
|
+
);
|
|
447
|
+
|
|
448
|
+
$('#alerts-section').content(content);
|
|
449
|
+
</script>
|
|
450
|
+
|
|
451
|
+
<!-- Badges & Avatars Section -->
|
|
452
|
+
<script type="module">
|
|
453
|
+
await import('/components/data-display/badge.js');
|
|
454
|
+
await import('/components/data-display/avatar.js');
|
|
455
|
+
await import('/components/data-display/card.js');
|
|
456
|
+
const { tags, $ } = Lightview;
|
|
457
|
+
const { div, span, a, Badge, Avatar, Card } = tags;
|
|
458
|
+
|
|
459
|
+
const content = div({ class: "component-grid-2" },
|
|
460
|
+
div({},
|
|
461
|
+
div({ class: "section-header" },
|
|
462
|
+
span({ class: "section-badge success" }, "Badges"),
|
|
463
|
+
a({ href: "/docs/components/badge", class: "info-link" }, InfoIcon())
|
|
464
|
+
),
|
|
465
|
+
Card({ styleSheets: ['/docs/components/index.css'] },
|
|
466
|
+
Card.Body({},
|
|
467
|
+
div({ class: "badge-group" },
|
|
468
|
+
Badge({ useShadow: true }, "default"),
|
|
469
|
+
Badge({ color: "primary" }, "primary"),
|
|
470
|
+
Badge({ variant: "outline" }, "outline"),
|
|
471
|
+
Badge({ variant: "ghost" }, "ghost")
|
|
472
|
+
)
|
|
473
|
+
)
|
|
474
|
+
)
|
|
475
|
+
),
|
|
476
|
+
div({},
|
|
477
|
+
div({ class: "section-header" },
|
|
478
|
+
span({ class: "section-badge neutral" }, "Avatars"),
|
|
479
|
+
a({ href: "/docs/components/avatar", class: "info-link" }, InfoIcon())
|
|
480
|
+
),
|
|
481
|
+
Card({ styleSheets: ['/docs/components/index.css'] },
|
|
482
|
+
Card.Body({},
|
|
483
|
+
div({ class: "avatar-group" },
|
|
484
|
+
Avatar({ src: "https://i.pravatar.cc/150?img=1", online: true }),
|
|
485
|
+
Avatar({ src: "https://i.pravatar.cc/150?img=2", offline: true }),
|
|
486
|
+
Avatar({ placeholder: "UI" })
|
|
487
|
+
)
|
|
488
|
+
)
|
|
489
|
+
)
|
|
490
|
+
)
|
|
491
|
+
);
|
|
492
|
+
|
|
493
|
+
$('#badges-section').content(content);
|
|
494
|
+
</script>
|
|
495
|
+
|
|
496
|
+
<!-- Stats Section -->
|
|
497
|
+
<script type="module">
|
|
498
|
+
await import('/components/data-display/stats.js');
|
|
499
|
+
const { tags, $ } = Lightview;
|
|
500
|
+
const { div, span, a, Stats } = tags;
|
|
501
|
+
|
|
502
|
+
const content = div({},
|
|
503
|
+
div({ class: "section-header" },
|
|
504
|
+
span({ class: "section-badge" }, "Stats"),
|
|
505
|
+
a({ href: "/docs/components/stats", class: "info-link" }, InfoIcon())
|
|
506
|
+
),
|
|
507
|
+
Stats({ useShadow: true, shadow: true },
|
|
508
|
+
Stats.Stat({},
|
|
509
|
+
Stats.Title({}, "Total Likes"),
|
|
510
|
+
Stats.Value({ class: "text-primary" }, "25.6K"),
|
|
511
|
+
Stats.Desc({}, "21% more than last month")
|
|
512
|
+
),
|
|
513
|
+
Stats.Stat({},
|
|
514
|
+
Stats.Title({}, "Page Views"),
|
|
515
|
+
Stats.Value({ class: "text-secondary" }, "2.6M"),
|
|
516
|
+
Stats.Desc({}, "21% more than last month")
|
|
517
|
+
)
|
|
518
|
+
)
|
|
519
|
+
);
|
|
520
|
+
|
|
521
|
+
$('#stats-section').content(content);
|
|
522
|
+
</script>
|
|
523
|
+
|
|
524
|
+
<!-- Charts Section -->
|
|
525
|
+
<script type="module">
|
|
526
|
+
await import('/components/data-display/chart.js');
|
|
527
|
+
await import('/components/data-display/card.js');
|
|
528
|
+
const { tags, $ } = Lightview;
|
|
529
|
+
const { div, span, a, tr, th, td, Chart, Card } = tags;
|
|
530
|
+
|
|
531
|
+
const content = div({},
|
|
532
|
+
div({ class: "section-header" },
|
|
533
|
+
span({ class: "section-badge" }, "Charts"),
|
|
534
|
+
a({ href: "/docs/components/chart", class: "info-link" }, InfoIcon())
|
|
535
|
+
),
|
|
536
|
+
Card({ styleSheets: ['/docs/components/index.css'] },
|
|
537
|
+
Card.Body({},
|
|
538
|
+
Chart({
|
|
539
|
+
type: "bar",
|
|
540
|
+
showLabels: true,
|
|
541
|
+
showPrimaryAxis: true,
|
|
542
|
+
dataSpacing: 5,
|
|
543
|
+
useShadow: true,
|
|
544
|
+
style: "height: 200px;"
|
|
545
|
+
},
|
|
546
|
+
Chart.Head({},
|
|
547
|
+
tr({}, th({}, "Year"), th({}, "Growth"))
|
|
548
|
+
),
|
|
549
|
+
Chart.Body({},
|
|
550
|
+
tr({}, th({}, "2021"), td({ style: "--size: 0.4;" }, span({ class: "data" }, "40%"))),
|
|
551
|
+
tr({}, th({}, "2022"), td({ style: "--size: 0.6;" }, span({ class: "data" }, "60%"))),
|
|
552
|
+
tr({}, th({}, "2023"), td({ style: "--size: 0.75;" }, span({ class: "data" }, "75%"))),
|
|
553
|
+
tr({}, th({}, "2024"), td({ style: "--size: 0.9; --color: #7480ff;" }, span({ class: "data" }, "90%")))
|
|
554
|
+
)
|
|
555
|
+
)
|
|
556
|
+
)
|
|
557
|
+
)
|
|
558
|
+
);
|
|
559
|
+
|
|
560
|
+
$('#charts-section').content(content);
|
|
561
|
+
</script>
|
|
562
|
+
|
|
563
|
+
<!-- Progress Section -->
|
|
564
|
+
<script type="module">
|
|
565
|
+
await import('/components/data-display/progress.js');
|
|
566
|
+
await import('/components/data-display/radial-progress.js');
|
|
567
|
+
await import('/components/data-display/loading.js');
|
|
568
|
+
await import('/components/data-display/card.js');
|
|
569
|
+
const { tags, $ } = Lightview;
|
|
570
|
+
const { div, span, a, Progress, RadialProgress, Loading, Card } = tags;
|
|
571
|
+
|
|
572
|
+
const content = div({},
|
|
573
|
+
div({ class: "section-header" },
|
|
574
|
+
span({ class: "section-badge accent" }, "Progress"),
|
|
575
|
+
a({ href: "/docs/components/progress", class: "info-link" }, InfoIcon())
|
|
576
|
+
),
|
|
577
|
+
Card({ styleSheets: ['/docs/components/index.css'] },
|
|
578
|
+
Card.Body({},
|
|
579
|
+
div({ class: "component-grid-2" },
|
|
580
|
+
div({},
|
|
581
|
+
div({ class: "component-label" }, "Bars"),
|
|
582
|
+
div({ class: "progress-stack" },
|
|
583
|
+
Progress({ value: 0 }),
|
|
584
|
+
Progress({ value: 40, color: "primary" }),
|
|
585
|
+
Progress({ value: 70, color: "secondary" }),
|
|
586
|
+
Progress({ value: 100, color: "accent" })
|
|
587
|
+
)
|
|
588
|
+
),
|
|
589
|
+
div({},
|
|
590
|
+
div({ class: "component-label" }, "Radial & Loading"),
|
|
591
|
+
div({ class: "loading-row" },
|
|
592
|
+
RadialProgress({ value: 70, color: "primary" }, "70%"),
|
|
593
|
+
Loading({ type: "spinner", color: "primary" }),
|
|
594
|
+
Loading({ type: "dots", color: "secondary" }),
|
|
595
|
+
Loading({ type: "ring", color: "accent" })
|
|
596
|
+
)
|
|
597
|
+
)
|
|
598
|
+
)
|
|
599
|
+
)
|
|
600
|
+
)
|
|
601
|
+
);
|
|
602
|
+
|
|
603
|
+
$('#progress-section').content(content);
|
|
604
|
+
</script>
|
|
605
|
+
|
|
606
|
+
<!-- Steps Section -->
|
|
607
|
+
<script type="module">
|
|
608
|
+
await import('/components/navigation/steps.js');
|
|
609
|
+
const { tags, $ } = Lightview;
|
|
610
|
+
const { div, span, a, Steps } = tags;
|
|
611
|
+
|
|
612
|
+
const content = div({},
|
|
613
|
+
div({ class: "section-header" },
|
|
614
|
+
span({ class: "section-badge neutral" }, "Steps"),
|
|
615
|
+
a({ href: "/docs/components/steps", class: "info-link" }, InfoIcon())
|
|
616
|
+
),
|
|
617
|
+
div({ class: "steps-container" },
|
|
618
|
+
Steps({ useShadow: true },
|
|
619
|
+
Steps.Item({ color: "primary" }, "Register"),
|
|
620
|
+
Steps.Item({ color: "primary" }, "Choose plan"),
|
|
621
|
+
Steps.Item({}, "Purchase"),
|
|
622
|
+
Steps.Item({}, "Receive Product")
|
|
623
|
+
)
|
|
624
|
+
)
|
|
625
|
+
);
|
|
626
|
+
|
|
627
|
+
$('#steps-section').content(content);
|
|
628
|
+
</script>
|
|
629
|
+
|
|
630
|
+
<!-- Chat Section -->
|
|
631
|
+
<script type="module">
|
|
632
|
+
await import('/components/data-display/chat.js');
|
|
633
|
+
const { tags, $ } = Lightview;
|
|
634
|
+
const { div, span, a, time, Chat } = tags;
|
|
635
|
+
|
|
636
|
+
const content = div({},
|
|
637
|
+
div({ class: "section-header" },
|
|
638
|
+
span({ class: "section-badge info" }, "Chat"),
|
|
639
|
+
a({ href: "/docs/components/chat", class: "info-link" }, InfoIcon())
|
|
640
|
+
),
|
|
641
|
+
div({ class: "mockup-window" },
|
|
642
|
+
div({ class: "mockup-header" },
|
|
643
|
+
span({ class: "mockup-dot" }),
|
|
644
|
+
span({ class: "mockup-dot" }),
|
|
645
|
+
span({ class: "mockup-dot" })
|
|
646
|
+
),
|
|
647
|
+
div({ class: "mockup-content" },
|
|
648
|
+
div({ class: "chat-container" },
|
|
649
|
+
Chat({ position: "start" },
|
|
650
|
+
Chat.Image({ src: "https://i.pravatar.cc/150?img=32" }),
|
|
651
|
+
Chat.Header({}, "Alex ", time({ class: "text-xs opacity-50" }, "12:45")),
|
|
652
|
+
Chat.Bubble({}, "Hey! Did you see the new component library?"),
|
|
653
|
+
Chat.Footer({}, "Delivered")
|
|
654
|
+
),
|
|
655
|
+
Chat({ position: "end" },
|
|
656
|
+
Chat.Image({ src: "https://i.pravatar.cc/150?img=12" }),
|
|
657
|
+
Chat.Header({}, "Jordan ", time({ class: "text-xs opacity-50" }, "12:46")),
|
|
658
|
+
Chat.Bubble({}, "Yes! It looks amazing. Really clean design."),
|
|
659
|
+
Chat.Footer({}, "Seen at 12:46")
|
|
660
|
+
)
|
|
661
|
+
)
|
|
662
|
+
)
|
|
663
|
+
)
|
|
664
|
+
);
|
|
665
|
+
|
|
666
|
+
$('#chat-section').content(content);
|
|
667
|
+
</script>
|
|
668
|
+
|
|
669
|
+
<!-- Timeline Section -->
|
|
670
|
+
<script type="module">
|
|
671
|
+
await import('/components/data-display/timeline.js');
|
|
672
|
+
const { tags, $ } = Lightview;
|
|
673
|
+
const { div, span, a, Timeline } = tags;
|
|
674
|
+
|
|
675
|
+
const content = div({},
|
|
676
|
+
div({ class: "section-header" },
|
|
677
|
+
span({ class: "section-badge success" }, "Timeline"),
|
|
678
|
+
a({ href: "/docs/components/timeline", class: "info-link" }, InfoIcon())
|
|
679
|
+
),
|
|
680
|
+
div({ class: "timeline-container" },
|
|
681
|
+
Timeline({ vertical: false },
|
|
682
|
+
Timeline.Item({},
|
|
683
|
+
Timeline.Start({ class: "timeline-box" }, "Start"),
|
|
684
|
+
Timeline.Middle({}),
|
|
685
|
+
Timeline.Hr({ color: "primary" })
|
|
686
|
+
),
|
|
687
|
+
Timeline.Item({},
|
|
688
|
+
Timeline.Hr({ color: "primary" }),
|
|
689
|
+
Timeline.Middle({}),
|
|
690
|
+
Timeline.End({ box: true }, "Apple Inc."),
|
|
691
|
+
Timeline.Hr({ color: "primary" })
|
|
692
|
+
),
|
|
693
|
+
Timeline.Item({},
|
|
694
|
+
Timeline.Hr({ color: "primary" }),
|
|
695
|
+
Timeline.Start({ class: "timeline-box" }, "Google"),
|
|
696
|
+
Timeline.Middle({}),
|
|
697
|
+
Timeline.Hr({})
|
|
698
|
+
),
|
|
699
|
+
Timeline.Item({},
|
|
700
|
+
Timeline.Hr({}),
|
|
701
|
+
Timeline.Middle({}),
|
|
702
|
+
Timeline.End({ box: true }, "SpaceX")
|
|
703
|
+
)
|
|
704
|
+
)
|
|
705
|
+
)
|
|
706
|
+
);
|
|
707
|
+
|
|
708
|
+
$('#timeline-section').content(content);
|
|
709
|
+
</script>
|
|
710
|
+
|
|
711
|
+
<!-- Table Section -->
|
|
712
|
+
<script type="module">
|
|
713
|
+
await import('/components/data-display/table.js');
|
|
714
|
+
const { tags, $ } = Lightview;
|
|
715
|
+
const { div, span, a, tr, th, td, Table } = tags;
|
|
716
|
+
|
|
717
|
+
const content = div({},
|
|
718
|
+
div({ class: "section-header" },
|
|
719
|
+
span({ class: "section-badge" }, "Table"),
|
|
720
|
+
a({ href: "/docs/components/table", class: "info-link" }, InfoIcon())
|
|
721
|
+
),
|
|
722
|
+
Table({ zebra: true },
|
|
723
|
+
Table.Head({},
|
|
724
|
+
tr({}, th({}), th({}, "Name"), th({}, "Job"), th({}, "Favorite Color"))
|
|
725
|
+
),
|
|
726
|
+
Table.Body({},
|
|
727
|
+
tr({}, th({}, "1"), td({}, "Cy Ganderton"), td({}, "Quality Control Specialist"), td({}, "Blue")),
|
|
728
|
+
tr({ class: "hover" }, th({}, "2"), td({}, "Hart Hagerty"), td({}, "Desktop Support Technician"), td({}, "Purple")),
|
|
729
|
+
tr({}, th({}, "3"), td({}, "Brice Swyre"), td({}, "Tax Accountant"), td({}, "Red"))
|
|
730
|
+
)
|
|
731
|
+
)
|
|
732
|
+
);
|
|
733
|
+
|
|
734
|
+
$('#table-section').content(content);
|
|
735
|
+
</script>
|