lightview 1.8.1-b → 2.0.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/.agent/workflows/daisyui-component-migration.md +155 -0
- 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 +1331 -21
- 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 +612 -0
- 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 +487 -0
- 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 +134 -0
- 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 +658 -1109
- package/lightview.js.backup +793 -0
- 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/components/chart/chart.html +0 -17
- package/components/chart/example.html +0 -32
- package/components/chart.html +0 -83
- package/components/components.js +0 -113
- package/components/gantt/example.html +0 -22
- package/components/gantt/gantt.html +0 -42
- package/components/gauge/example.html +0 -28
- package/components/gauge/gauge.html +0 -20
- package/components/gauge.html +0 -60
- package/components/orgchart/example.html +0 -25
- package/components/orgchart/orgchart.html +0 -41
- package/components/repl/code-editor.html +0 -64
- package/components/repl/editor.html +0 -37
- package/components/repl/editorjs-inline-tool/index.js +0 -3
- package/components/repl/editorjs-inline-tool/inline-tools.js +0 -28
- package/components/repl/editorjs-inline-tool/tool.js +0 -175
- package/components/repl/repl-with-wysiwyg.html +0 -355
- package/components/repl/repl.html +0 -345
- package/components/repl/sup.js +0 -44
- package/components/repl/wysiwyg-repl.html +0 -258
- package/components/timeline/example.html +0 -33
- package/components/timeline/timeline.html +0 -44
- package/components/timeline.html +0 -81
- package/examples/anchor.html +0 -11
- package/examples/chart.html +0 -34
- package/examples/counter.html +0 -26
- package/examples/counter.test.mjs +0 -47
- package/examples/counter2.html +0 -26
- package/examples/directives.html +0 -79
- package/examples/foreign.html +0 -50
- package/examples/forgeinform.html +0 -98
- package/examples/form.html +0 -61
- package/examples/gauge.html +0 -18
- package/examples/invalid-template-literals.html +0 -44
- package/examples/medium/remote.html +0 -60
- package/examples/message.html +0 -18
- package/examples/nested.html +0 -11
- package/examples/object-bound-form.html +0 -34
- package/examples/remote-server.js +0 -51
- package/examples/remote.html +0 -34
- package/examples/remote.json +0 -1
- package/examples/scratch.html +0 -69
- package/examples/sensors/index.html +0 -30
- package/examples/sensors/sensor-server.js +0 -30
- package/examples/shared.html +0 -41
- package/examples/template.html +0 -33
- package/examples/timeline.html +0 -21
- package/examples/todo.html +0 -38
- package/examples/top.html +0 -10
- package/examples/types.html +0 -94
- package/examples/xor.html +0 -62
- package/jest-puppeteer.config.js +0 -5
- package/jest.config.json +0 -12
- package/sites/client.html +0 -48
- package/sites/index.html +0 -247
- package/test/basic.html +0 -93
- package/test/basic.test.mjs +0 -315
- package/test/extended.html +0 -29
- package/test/extended.test.mjs +0 -448
- package/types.js +0 -534
- package/unsplash.key +0 -1
|
@@ -0,0 +1,286 @@
|
|
|
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="./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" src="./component-nav.html"></div>
|
|
20
|
+
|
|
21
|
+
<!-- Main Content -->
|
|
22
|
+
<div id="gallery-main" class="gallery-main">
|
|
23
|
+
<!-- Header Container -->
|
|
24
|
+
<div
|
|
25
|
+
style="position: sticky; top: 0; z-index: 30; background: var(--gallery-surface); border-bottom: 1px solid var(--gallery-border); backdrop-filter: blur(8px);">
|
|
26
|
+
<!-- Breadcrumbs Row -->
|
|
27
|
+
<div style="padding: 0.75rem 1.5rem 0;">
|
|
28
|
+
<script>
|
|
29
|
+
(() => {
|
|
30
|
+
const { Breadcrumbs } = Lightview.tags;
|
|
31
|
+
const breadcrumbs = Breadcrumbs({
|
|
32
|
+
id: 'page-breadcrumbs',
|
|
33
|
+
items: [
|
|
34
|
+
{ label: 'Components', href: '/docs/components' },
|
|
35
|
+
{ label: 'Carousel' }
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
document.currentScript.replaceWith(breadcrumbs.domEl);
|
|
39
|
+
})();
|
|
40
|
+
</script>
|
|
41
|
+
</div>
|
|
42
|
+
<!-- Title Row -->
|
|
43
|
+
<div class="gallery-header"
|
|
44
|
+
style="border-bottom: none; height: auto; padding-top: 0.5rem; padding-bottom: 0.75rem;">
|
|
45
|
+
<button id="toggle-btn" class="toggle-btn" aria-label="Toggle Sidebar">
|
|
46
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="toggle-icon"
|
|
47
|
+
style="stroke: currentColor; stroke-width: 2;">
|
|
48
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
|
|
49
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M11 19l-7-7 7-7" />
|
|
50
|
+
</svg>
|
|
51
|
+
</button>
|
|
52
|
+
<h1 class="gallery-title">Carousel</h1>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<!-- Content -->
|
|
57
|
+
<div class="gallery-content">
|
|
58
|
+
<div class="section-content" style="max-width: 1000px;">
|
|
59
|
+
<p class="text-lg" style="opacity: 0.7; margin-bottom: 1.5rem;">
|
|
60
|
+
Carousel shows images or content in a scrollable horizontal view.
|
|
61
|
+
Supports snap points, vertical layout, and full-width items.
|
|
62
|
+
</p>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<!-- Basic Usage -->
|
|
67
|
+
<div class="card bg-base-200" style="margin-bottom: 2rem;">
|
|
68
|
+
<div class="card-body">
|
|
69
|
+
<h2 class="card-title">Basic Example</h2>
|
|
70
|
+
<p class="text-sm" style="opacity: 0.7; margin-bottom: 1rem;">Navigable carousel with
|
|
71
|
+
buttons</p>
|
|
72
|
+
|
|
73
|
+
<!-- Tabs -->
|
|
74
|
+
<script>
|
|
75
|
+
window.switchReactiveSyntaxTab = (tabId) => {
|
|
76
|
+
const tabs = ['tagged', 'vdom', 'object'];
|
|
77
|
+
tabs.forEach(t => {
|
|
78
|
+
const tabEl = document.getElementById(`reactive-tab-btn-${t}`);
|
|
79
|
+
const contentEl = document.getElementById(`reactive-syntax-${t}`);
|
|
80
|
+
if (t === tabId) {
|
|
81
|
+
tabEl.classList.add('syntax-tab-active');
|
|
82
|
+
contentEl.style.display = 'block';
|
|
83
|
+
} else {
|
|
84
|
+
tabEl.classList.remove('syntax-tab-active');
|
|
85
|
+
contentEl.style.display = 'none';
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
</script>
|
|
90
|
+
<div role="tablist" class="syntax-tabs" style="margin-bottom: 1rem;">
|
|
91
|
+
<button id="reactive-tab-btn-tagged" role="tab" class="syntax-tab syntax-tab-active"
|
|
92
|
+
onclick="switchReactiveSyntaxTab('tagged')">Tagged</button>
|
|
93
|
+
<button id="reactive-tab-btn-vdom" role="tab" class="syntax-tab"
|
|
94
|
+
onclick="switchReactiveSyntaxTab('vdom')">vDOM</button>
|
|
95
|
+
<button id="reactive-tab-btn-object" role="tab" class="syntax-tab"
|
|
96
|
+
onclick="switchReactiveSyntaxTab('object')">Object DOM</button>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<!-- Tagged Syntax -->
|
|
100
|
+
<div id="reactive-syntax-tagged">
|
|
101
|
+
<pre><script>
|
|
102
|
+
examplify(document.currentScript.nextElementSibling, {
|
|
103
|
+
at: document.currentScript.parentElement,
|
|
104
|
+
scripts: ['/lightview.js', '/lightview-x.js'],
|
|
105
|
+
styles: ['https://cdn.jsdelivr.net/npm/daisyui@3.9.4/dist/full.min.css'],
|
|
106
|
+
type: 'module',
|
|
107
|
+
minHeight: 400,
|
|
108
|
+
autoRun: true
|
|
109
|
+
});
|
|
110
|
+
</script><code contenteditable="true">await import('/components/data-display/carousel.js');
|
|
111
|
+
await import('/components/actions/button.js');
|
|
112
|
+
const { signal, tags, $ } = Lightview;
|
|
113
|
+
const { div, a, Carousel } = tags;
|
|
114
|
+
|
|
115
|
+
const slides = [
|
|
116
|
+
{ id: 'slide1', img: 'https://picsum.photos/800/400?random=10', title: 'Welcome' },
|
|
117
|
+
{ id: 'slide2', img: 'https://picsum.photos/800/400?random=11', title: 'Features' },
|
|
118
|
+
{ id: 'slide3', img: 'https://picsum.photos/800/400?random=12', title: 'Get Started' }
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
const demo = Carousel({ full: true, style: 'width: 100%' },
|
|
122
|
+
...slides.map((slide, i) =>
|
|
123
|
+
div({ id: slide.id, class: 'carousel-item', style: 'position: relative; width: 100%' },
|
|
124
|
+
tags.img({ src: slide.img, style: 'width: 100%' }),
|
|
125
|
+
a({ href: `#${slides[(i - 1 + slides.length) % slides.length].id}`, class: 'btn btn-circle', style: 'position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%)' }, '❮'),
|
|
126
|
+
a({ href: `#${slides[(i + 1) % slides.length].id}`, class: 'btn btn-circle', style: 'position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%)' }, '❯')
|
|
127
|
+
)
|
|
128
|
+
)
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
$('#example').content(demo);</code></pre>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<!-- vDOM Syntax -->
|
|
135
|
+
<div id="reactive-syntax-vdom" style="display: none;">
|
|
136
|
+
<pre><script>
|
|
137
|
+
examplify(document.currentScript.nextElementSibling, {
|
|
138
|
+
at: document.currentScript.parentElement,
|
|
139
|
+
scripts: ['/lightview.js', '/lightview-x.js'],
|
|
140
|
+
styles: ['https://cdn.jsdelivr.net/npm/daisyui@3.9.4/dist/full.min.css'],
|
|
141
|
+
type: 'module',
|
|
142
|
+
minHeight: 400
|
|
143
|
+
});
|
|
144
|
+
</script><code contenteditable="true">await import('/components/data-display/carousel.js');
|
|
145
|
+
await import('/components/actions/button.js');
|
|
146
|
+
const { $, tags } = Lightview;
|
|
147
|
+
const { div, img, a, Carousel } = tags;
|
|
148
|
+
|
|
149
|
+
const slides = [
|
|
150
|
+
{ id: 'slide1', img: 'https://picsum.photos/800/400?random=10', title: 'Welcome' },
|
|
151
|
+
{ id: 'slide2', img: 'https://picsum.photos/800/400?random=11', title: 'Features' },
|
|
152
|
+
{ id: 'slide3', img: 'https://picsum.photos/800/400?random=12', title: 'Get Started' }
|
|
153
|
+
];
|
|
154
|
+
|
|
155
|
+
const demo = {
|
|
156
|
+
tag: Carousel,
|
|
157
|
+
attributes: { full: true, style: 'width: 100%' },
|
|
158
|
+
children: slides.map((slide, i) => ({
|
|
159
|
+
tag: div,
|
|
160
|
+
attributes: { id: slide.id, class: 'carousel-item', style: 'position: relative; width: 100%' },
|
|
161
|
+
children: [
|
|
162
|
+
{ tag: img, attributes: { src: slide.img, style: 'width: 100%' } },
|
|
163
|
+
{ tag: a, attributes: { href: `#${slides[(i - 1 + slides.length) % slides.length].id}`, class: 'btn btn-circle', style: 'position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%)' }, children: ['❮'] },
|
|
164
|
+
{ tag: a, attributes: { href: `#${slides[(i + 1) % slides.length].id}`, class: 'btn btn-circle', style: 'position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%)' }, children: ['❯'] }
|
|
165
|
+
]
|
|
166
|
+
}))
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
$('#example').content(demo);</code></pre>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<!-- Object DOM Syntax -->
|
|
173
|
+
<div id="reactive-syntax-object" style="display: none;">
|
|
174
|
+
<pre><script>
|
|
175
|
+
examplify(document.currentScript.nextElementSibling, {
|
|
176
|
+
at: document.currentScript.parentElement,
|
|
177
|
+
scripts: ['/lightview.js', '/lightview-x.js'],
|
|
178
|
+
styles: ['https://cdn.jsdelivr.net/npm/daisyui@3.9.4/dist/full.min.css'],
|
|
179
|
+
type: 'module',
|
|
180
|
+
minHeight: 400
|
|
181
|
+
});
|
|
182
|
+
</script><code contenteditable="true">await import('/components/data-display/carousel.js');
|
|
183
|
+
await import('/components/actions/button.js');
|
|
184
|
+
const { $ } = Lightview;
|
|
185
|
+
|
|
186
|
+
const slides = [
|
|
187
|
+
{ id: 'slide1', img: 'https://picsum.photos/800/400?random=10', title: 'Welcome' },
|
|
188
|
+
{ id: 'slide2', img: 'https://picsum.photos/800/400?random=11', title: 'Features' },
|
|
189
|
+
{ id: 'slide3', img: 'https://picsum.photos/800/400?random=12', title: 'Get Started' }
|
|
190
|
+
];
|
|
191
|
+
|
|
192
|
+
const demo = {
|
|
193
|
+
Carousel: {
|
|
194
|
+
full: true,
|
|
195
|
+
style: 'width: 100%',
|
|
196
|
+
children: slides.map((slide, i) => ({
|
|
197
|
+
div: {
|
|
198
|
+
id: slide.id,
|
|
199
|
+
class: 'carousel-item',
|
|
200
|
+
style: 'position: relative; width: 100%',
|
|
201
|
+
children: [
|
|
202
|
+
{ img: { src: slide.img, style: 'width: 100%' } },
|
|
203
|
+
{ a: { href: `#${slides[(i - 1 + slides.length) % slides.length].id}`, class: 'btn btn-circle', style: 'position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%)', children: ['❮'] } },
|
|
204
|
+
{ a: { href: `#${slides[(i + 1) % slides.length].id}`, class: 'btn btn-circle', style: 'position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%)', children: ['❯'] } }
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
}))
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
$('#example').content(demo);</code></pre>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
<!-- Props Table -->
|
|
217
|
+
<h2 class="text-xl font-bold" style="margin-bottom: 1rem;">Props</h2>
|
|
218
|
+
<div style="overflow-x: auto; margin-bottom: 2rem;">
|
|
219
|
+
<table class="table table-zebra">
|
|
220
|
+
<thead>
|
|
221
|
+
<tr>
|
|
222
|
+
<th>Prop</th>
|
|
223
|
+
<th>Type</th>
|
|
224
|
+
<th>Default</th>
|
|
225
|
+
<th>Description</th>
|
|
226
|
+
</tr>
|
|
227
|
+
</thead>
|
|
228
|
+
<tbody>
|
|
229
|
+
<tr>
|
|
230
|
+
<td><code>snap</code></td>
|
|
231
|
+
<td>string</td>
|
|
232
|
+
<td>'start'</td>
|
|
233
|
+
<td>'start' | 'center' | 'end'</td>
|
|
234
|
+
</tr>
|
|
235
|
+
<tr>
|
|
236
|
+
<td><code>vertical</code></td>
|
|
237
|
+
<td>boolean</td>
|
|
238
|
+
<td>false</td>
|
|
239
|
+
<td>Vertical layout</td>
|
|
240
|
+
</tr>
|
|
241
|
+
<tr>
|
|
242
|
+
<td><code>full</code></td>
|
|
243
|
+
<td>boolean</td>
|
|
244
|
+
<td>false</td>
|
|
245
|
+
<td>Full width container</td>
|
|
246
|
+
</tr>
|
|
247
|
+
</tbody>
|
|
248
|
+
</table>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
<!-- Sub-components -->
|
|
252
|
+
<h2 class="text-xl font-bold" style="margin-bottom: 1rem;">Sub-components</h2>
|
|
253
|
+
<div style="overflow-x: auto; margin-bottom: 2rem;">
|
|
254
|
+
<table class="table table-zebra">
|
|
255
|
+
<thead>
|
|
256
|
+
<tr>
|
|
257
|
+
<th>Component</th>
|
|
258
|
+
<th>Props</th>
|
|
259
|
+
<th>Description</th>
|
|
260
|
+
</tr>
|
|
261
|
+
</thead>
|
|
262
|
+
<tbody>
|
|
263
|
+
<tr>
|
|
264
|
+
<td><code>Carousel.Item</code></td>
|
|
265
|
+
<td>id, src, alt</td>
|
|
266
|
+
<td>Individual slide item</td>
|
|
267
|
+
</tr>
|
|
268
|
+
</tbody>
|
|
269
|
+
</table>
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
<!-- Static Examples -->
|
|
273
|
+
<h2 class="text-xl font-bold" style="margin-bottom: 1rem;">Centered Carousel</h2>
|
|
274
|
+
<div class="carousel carousel-center bg-neutral rounded-box"
|
|
275
|
+
style="margin-right: 1rem; padding: 1rem; margin-bottom: 2rem;">
|
|
276
|
+
<div class="carousel-item"><img src="https://picsum.photos/300/200?random=5" class="rounded-box"
|
|
277
|
+
alt="Slide" /></div>
|
|
278
|
+
<div class="carousel-item"><img src="https://picsum.photos/300/200?random=6" class="rounded-box"
|
|
279
|
+
alt="Slide" /></div>
|
|
280
|
+
<div class="carousel-item"><img src="https://picsum.photos/300/200?random=7" class="rounded-box"
|
|
281
|
+
alt="Slide" /></div>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|