lightview 2.0.9 → 2.2.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/build-bundles.mjs +105 -0
- package/build.js +236 -46
- package/components/actions/button.js +16 -3
- package/components/actions/swap.js +26 -3
- package/components/daisyui.js +1 -1
- package/components/data-display/alert.js +13 -3
- package/components/data-display/avatar.js +25 -1
- package/components/data-display/badge.js +11 -3
- package/components/data-display/chart.js +22 -5
- package/components/data-display/countdown.js +3 -2
- package/components/data-display/kbd.js +9 -3
- package/components/data-display/loading.js +11 -3
- package/components/data-display/progress.js +11 -3
- package/components/data-display/radial-progress.js +12 -3
- package/components/data-display/tooltip.js +17 -0
- package/components/data-input/checkbox.js +23 -1
- package/components/data-input/input.js +24 -1
- package/components/data-input/radio.js +37 -2
- package/components/data-input/select.js +24 -1
- package/components/data-input/toggle.js +21 -1
- package/components/layout/divider.js +21 -1
- package/components/layout/indicator.js +14 -0
- package/components/navigation/breadcrumbs.js +42 -2
- package/components/navigation/tabs.js +291 -16
- package/docs/api/elements.html +125 -49
- package/docs/api/hypermedia.html +29 -2
- package/docs/api/index.html +6 -2
- package/docs/api/nav.html +18 -4
- package/docs/assets/js/examplify.js +1 -1
- package/docs/cdom-nav.html +55 -0
- package/docs/cdom.html +792 -0
- package/docs/components/alert.html +8 -8
- package/docs/components/avatar.html +24 -54
- package/docs/components/badge.html +69 -14
- package/docs/components/breadcrumbs.html +95 -29
- package/docs/components/button.html +78 -92
- package/docs/components/chart-area.html +3 -3
- package/docs/components/chart-bar.html +4 -181
- package/docs/components/chart-column.html +4 -189
- package/docs/components/chart-line.html +3 -3
- package/docs/components/chart-pie.html +112 -166
- package/docs/components/chart.html +11 -13
- package/docs/components/checkbox.html +48 -28
- package/docs/components/collapse.html +6 -6
- package/docs/components/component-nav.html +1 -1
- package/docs/components/countdown.html +12 -12
- package/docs/components/divider.html +65 -21
- package/docs/components/dropdown.html +1 -1
- package/docs/components/file-input.html +4 -4
- package/docs/components/footer.html +11 -11
- package/docs/components/indicator.html +85 -31
- package/docs/components/input.html +45 -29
- package/docs/components/join.html +4 -4
- package/docs/components/kbd.html +67 -28
- package/docs/components/loading.html +96 -92
- package/docs/components/pagination.html +4 -4
- package/docs/components/progress.html +50 -7
- package/docs/components/radial-progress.html +32 -12
- package/docs/components/radio.html +42 -31
- package/docs/components/select.html +48 -59
- package/docs/components/swap.html +183 -100
- package/docs/components/tabs.html +146 -278
- package/docs/components/toggle.html +44 -25
- package/docs/components/tooltip.html +71 -31
- package/docs/getting-started/index.html +8 -6
- package/docs/index.html +1 -1
- package/docs/syntax-nav.html +10 -0
- package/docs/syntax.html +8 -6
- package/index.html +2 -2
- package/jprx/LICENSE +21 -0
- package/jprx/README.md +130 -0
- package/jprx/helpers/array.js +75 -0
- package/jprx/helpers/compare.js +26 -0
- package/jprx/helpers/conditional.js +34 -0
- package/jprx/helpers/datetime.js +54 -0
- package/jprx/helpers/format.js +20 -0
- package/jprx/helpers/logic.js +24 -0
- package/jprx/helpers/lookup.js +25 -0
- package/jprx/helpers/math.js +34 -0
- package/jprx/helpers/network.js +41 -0
- package/jprx/helpers/state.js +80 -0
- package/jprx/helpers/stats.js +39 -0
- package/jprx/helpers/string.js +49 -0
- package/jprx/index.js +69 -0
- package/jprx/package.json +24 -0
- package/jprx/parser.js +1517 -0
- package/lightview-all.js +3785 -0
- package/lightview-cdom.js +2128 -0
- package/lightview-router.js +179 -208
- package/lightview-x.js +1435 -1608
- package/lightview.js +613 -766
- package/lightview.js.bak +1 -0
- package/package.json +10 -3
- package/src/lightview-all.js +10 -0
- package/src/lightview-cdom.js +457 -0
- package/src/lightview-router.js +210 -0
- package/src/lightview-x.js +1630 -0
- package/src/lightview.js +705 -0
- package/src/reactivity/signal.js +133 -0
- package/src/reactivity/state.js +217 -0
- package/{watch.js → start-dev.js} +2 -1
- package/tests/cdom/fixtures/helpers.cdomc +62 -0
- package/tests/cdom/fixtures/user.cdom +14 -0
- package/tests/cdom/fixtures/user.cdomc +12 -0
- package/tests/cdom/fixtures/user.odom +18 -0
- package/tests/cdom/fixtures/user.vdom +11 -0
- package/tests/cdom/helpers.test.js +121 -0
- package/tests/cdom/loader.test.js +125 -0
- package/tests/cdom/parser.test.js +179 -0
- package/tests/cdom/reactivity.test.js +186 -0
- package/tests/text-tag.test.js +77 -0
- package/vite.config.mjs +52 -0
- package/wrangler.toml +0 -3
- package/components/data-display/skeleton.js +0 -66
- package/docs/components/skeleton.html +0 -447
|
@@ -192,10 +192,10 @@ const alerts = {
|
|
|
192
192
|
div: {
|
|
193
193
|
style: 'display: flex; flex-direction: column; gap: 1rem;',
|
|
194
194
|
children: [
|
|
195
|
-
{ Alert: { color: 'info', icon: 'info', children: [
|
|
196
|
-
{ Alert: { color: 'success', icon: 'success', children: [
|
|
197
|
-
{ Alert: { color: 'warning', icon: 'warning', children: [
|
|
198
|
-
{ Alert: { color: 'error', icon: 'error', children: [
|
|
195
|
+
{ Alert: { color: 'info', icon: 'info', children: ['New update available! Click to learn more.'] } },
|
|
196
|
+
{ Alert: { color: 'success', icon: 'success', children: ['Your order has been placed successfully!'] } },
|
|
197
|
+
{ Alert: { color: 'warning', icon: 'warning', children: ['Please review your information before proceeding.'] } },
|
|
198
|
+
{ Alert: { color: 'error', icon: 'error', children: ['Unable to connect to server. Please try again.'] } }
|
|
199
199
|
]
|
|
200
200
|
}
|
|
201
201
|
};
|
|
@@ -376,8 +376,8 @@ const demo = {
|
|
|
376
376
|
color: 'success',
|
|
377
377
|
icon: 'success',
|
|
378
378
|
children: [
|
|
379
|
-
|
|
380
|
-
{ Button: { size: 'sm', color: 'ghost', onclick: () => { visible.value = false; },
|
|
379
|
+
'Message sent successfully!',
|
|
380
|
+
{ Button: { size: 'sm', color: 'ghost', onclick: () => { visible.value = false; }, children: ['✕'] } }
|
|
381
381
|
]
|
|
382
382
|
}
|
|
383
383
|
}
|
|
@@ -385,8 +385,8 @@ const demo = {
|
|
|
385
385
|
div: {
|
|
386
386
|
style: 'display: flex; gap: 0.5rem;',
|
|
387
387
|
children: [
|
|
388
|
-
{ span: { style: 'font-size: 0.875rem; opacity: 0.5;',
|
|
389
|
-
{ Button: { size: 'sm', color: 'primary', onclick: () => { visible.value = true; },
|
|
388
|
+
{ span: { style: 'font-size: 0.875rem; opacity: 0.5;', children: ['Alert dismissed'] } },
|
|
389
|
+
{ Button: { size: 'sm', color: 'primary', onclick: () => { visible.value = true; }, children: ['Show again'] } }
|
|
390
390
|
]
|
|
391
391
|
}
|
|
392
392
|
}
|
|
@@ -501,9 +501,17 @@ $('#example').content(demo);</code></pre>
|
|
|
501
501
|
</table>
|
|
502
502
|
</div>
|
|
503
503
|
|
|
504
|
+
<!-- Custom Element Gallery -->
|
|
505
|
+
<h2 class="text-xl font-bold" style="margin-top: 2rem; margin-bottom: 1rem;">Avatar Gallery</h2>
|
|
506
|
+
<p class="text-sm" style="opacity: 0.7; margin-bottom: 1.5rem;">
|
|
507
|
+
Live examples using <code><lv-avatar></code> custom elements.
|
|
508
|
+
</p>
|
|
509
|
+
|
|
510
|
+
<script type="module" src="/components/data-display/avatar.js"></script>
|
|
511
|
+
|
|
504
512
|
<!-- Shapes -->
|
|
505
|
-
<
|
|
506
|
-
<div style="display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom:
|
|
513
|
+
<h3 class="text-lg font-semibold" style="margin-bottom: 0.75rem;">Shapes</h3>
|
|
514
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem;">
|
|
507
515
|
<lv-avatar src="https://i.pravatar.cc/100?img=1" size="w-16" shape="circle"></lv-avatar>
|
|
508
516
|
<lv-avatar src="https://i.pravatar.cc/100?img=2" size="w-16" shape="rounded"></lv-avatar>
|
|
509
517
|
<lv-avatar src="https://i.pravatar.cc/100?img=3" size="w-16" shape="squircle"></lv-avatar>
|
|
@@ -511,75 +519,37 @@ $('#example').content(demo);</code></pre>
|
|
|
511
519
|
<lv-avatar src="https://i.pravatar.cc/100?img=5" size="w-16" shape="triangle"></lv-avatar>
|
|
512
520
|
</div>
|
|
513
521
|
|
|
514
|
-
<pre class="code-block" style="margin-bottom: 2rem;"><code><!-- Tagged Syntax -->
|
|
515
|
-
Avatar({ src: '...', shape: 'squircle' })
|
|
516
|
-
|
|
517
|
-
<!-- HTML Syntax -->
|
|
518
|
-
<lv-avatar src="..." shape="squircle"></lv-avatar></code></pre>
|
|
519
|
-
|
|
520
|
-
<!-- With Ring -->
|
|
521
|
-
<h2 class="text-xl font-bold" style="margin-top: 2rem; margin-bottom: 1rem;">With Ring</h2>
|
|
522
|
-
<div style="margin-bottom: 1.5rem;">
|
|
523
|
-
<lv-avatar src="https://i.pravatar.cc/100?img=6" size="w-16" ring
|
|
524
|
-
ringColor="ring-primary"></lv-avatar>
|
|
525
|
-
</div>
|
|
526
|
-
<pre class="code-block" style="margin-bottom: 2rem;"><code><!-- Tagged Syntax -->
|
|
527
|
-
Avatar({ src: '...', ring: true, ringColor: 'ring-primary' })
|
|
528
|
-
|
|
529
|
-
<!-- HTML Syntax -->
|
|
530
|
-
<lv-avatar src="..." ring ring-color="ring-primary"></lv-avatar></code></pre>
|
|
531
|
-
|
|
532
522
|
<!-- Online/Offline Status -->
|
|
533
|
-
<
|
|
534
|
-
|
|
535
|
-
<div style="display: flex; gap: 1rem; margin-bottom: 1.5rem;">
|
|
523
|
+
<h3 class="text-lg font-semibold" style="margin-bottom: 0.75rem;">Status Indicators</h3>
|
|
524
|
+
<div style="display: flex; gap: 1rem; margin-bottom: 2rem;">
|
|
536
525
|
<lv-avatar src="https://i.pravatar.cc/100?img=7" size="w-16" online></lv-avatar>
|
|
537
526
|
<lv-avatar src="https://i.pravatar.cc/100?img=8" size="w-16" offline></lv-avatar>
|
|
527
|
+
<lv-avatar src="https://i.pravatar.cc/100?img=9" size="w-16" ring
|
|
528
|
+
ring-color="ring-primary"></lv-avatar>
|
|
538
529
|
</div>
|
|
539
|
-
<pre class="code-block" style="margin-bottom: 2rem;"><code><!-- Tagged Syntax -->
|
|
540
|
-
Avatar({ src: '...', online: true })
|
|
541
530
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
<!-- Placeholder -->
|
|
546
|
-
<h2 class="text-xl font-bold" style="margin-top: 2rem; margin-bottom: 1rem;">Placeholder</h2>
|
|
547
|
-
<div style="display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem;">
|
|
531
|
+
<!-- Placeholders -->
|
|
532
|
+
<h3 class="text-lg font-semibold" style="margin-bottom: 0.75rem;">Placeholders</h3>
|
|
533
|
+
<div style="display: flex; gap: 1rem; align-items: center; margin-bottom: 2rem;">
|
|
548
534
|
<lv-avatar placeholder="AI" size="w-12"
|
|
549
535
|
style="--lv-avatar-bg: oklch(var(--n)); --lv-avatar-text: oklch(var(--nc));"></lv-avatar>
|
|
550
|
-
<lv-avatar placeholder="
|
|
536
|
+
<lv-avatar placeholder="JD" size="w-16" shape="squircle"
|
|
551
537
|
style="--lv-avatar-bg: oklch(var(--p)); --lv-avatar-text: oklch(var(--pc));"></lv-avatar>
|
|
552
|
-
<lv-avatar placeholder="
|
|
538
|
+
<lv-avatar placeholder="LR" size="w-20" shape="hexagon"
|
|
553
539
|
style="--lv-avatar-bg: oklch(var(--s)); --lv-avatar-text: oklch(var(--sc));"></lv-avatar>
|
|
554
540
|
</div>
|
|
555
|
-
<pre class="code-block" style="margin-bottom: 2rem;"><code><!-- Tagged Syntax -->
|
|
556
|
-
Avatar({ placeholder: 'AI', size: 'w-12' })
|
|
557
|
-
Avatar({ placeholder: 'AV', size: 'w-20', shape: 'squircle' })
|
|
558
|
-
|
|
559
|
-
<!-- HTML Syntax -->
|
|
560
|
-
<lv-avatar placeholder="LRG" size="w-32" shape="hexagon"></lv-avatar></code></pre>
|
|
561
541
|
|
|
562
|
-
<!--
|
|
563
|
-
<
|
|
564
|
-
<div style="margin-bottom:
|
|
542
|
+
<!-- Grouping -->
|
|
543
|
+
<h3 class="text-lg font-semibold" style="margin-bottom: 0.75rem;">Avatar Group</h3>
|
|
544
|
+
<div style="margin-bottom: 2rem;">
|
|
565
545
|
<lv-avatar-group>
|
|
566
546
|
<lv-avatar src="https://i.pravatar.cc/100?img=10" size="w-12"></lv-avatar>
|
|
567
547
|
<lv-avatar src="https://i.pravatar.cc/100?img=11" size="w-12"></lv-avatar>
|
|
568
548
|
<lv-avatar src="https://i.pravatar.cc/100?img=12" size="w-12"></lv-avatar>
|
|
569
|
-
<lv-avatar placeholder="+99" size="w-12"
|
|
549
|
+
<lv-avatar placeholder="+99" size="w-12"
|
|
550
|
+
style="--lv-avatar-bg: oklch(var(--n)); --lv-avatar-text: oklch(var(--nc));"></lv-avatar>
|
|
570
551
|
</lv-avatar-group>
|
|
571
552
|
</div>
|
|
572
|
-
<pre class="code-block" style="margin-bottom: 2rem;"><code><!-- Tagged Syntax -->
|
|
573
|
-
Avatar.Group({},
|
|
574
|
-
Avatar({ src: '...', size: 'w-12' }),
|
|
575
|
-
Avatar({ placeholder: '+99', size: 'w-12' })
|
|
576
|
-
)
|
|
577
|
-
|
|
578
|
-
<!-- HTML Syntax -->
|
|
579
|
-
<lv-avatar-group>
|
|
580
|
-
<lv-avatar src="..." size="w-12"></lv-avatar>
|
|
581
|
-
<lv-avatar placeholder="+99" size="w-12"></lv-avatar>
|
|
582
|
-
</lv-avatar-group></code></pre>
|
|
583
553
|
</div>
|
|
584
554
|
</div>
|
|
585
555
|
</div>
|
|
@@ -204,14 +204,14 @@ const badges = {
|
|
|
204
204
|
div: {
|
|
205
205
|
style: 'display: flex; flex-direction: row; gap: 0.5rem;',
|
|
206
206
|
children: [
|
|
207
|
-
{ Badge: {
|
|
208
|
-
{ Badge: { color: 'primary',
|
|
209
|
-
{ Badge: { color: 'secondary',
|
|
210
|
-
{ Badge: { color: 'accent',
|
|
211
|
-
{ Badge: { color: 'info',
|
|
212
|
-
{ Badge: { color: 'success',
|
|
213
|
-
{ Badge: { color: 'warning',
|
|
214
|
-
{ Badge: { color: 'error',
|
|
207
|
+
{ Badge: { children: ['Default'] } },
|
|
208
|
+
{ Badge: { color: 'primary', children: ['Primary'] } },
|
|
209
|
+
{ Badge: { color: 'secondary', children: ['Secondary'] } },
|
|
210
|
+
{ Badge: { color: 'accent', children: ['Accent'] } },
|
|
211
|
+
{ Badge: { color: 'info', children: ['Info'] } },
|
|
212
|
+
{ Badge: { color: 'success', children: ['Success'] } },
|
|
213
|
+
{ Badge: { color: 'warning', children: ['Warning'] } },
|
|
214
|
+
{ Badge: { color: 'error', children: ['Error'] } }
|
|
215
215
|
]
|
|
216
216
|
}
|
|
217
217
|
},
|
|
@@ -219,9 +219,9 @@ const badges = {
|
|
|
219
219
|
div: {
|
|
220
220
|
style: 'display: flex; flex-direction: row; gap: 0.5rem;',
|
|
221
221
|
children: [
|
|
222
|
-
{ Badge: { variant: 'outline',
|
|
223
|
-
{ Badge: { variant: 'soft', color: 'primary',
|
|
224
|
-
{ Badge: { variant: 'dash', color: 'secondary',
|
|
222
|
+
{ Badge: { variant: 'outline', children: ['Outline'] } },
|
|
223
|
+
{ Badge: { variant: 'soft', color: 'primary', children: ['Soft'] } },
|
|
224
|
+
{ Badge: { variant: 'dash', color: 'secondary', children: ['Dash'] } }
|
|
225
225
|
]
|
|
226
226
|
}
|
|
227
227
|
}
|
|
@@ -410,7 +410,7 @@ const demo = {
|
|
|
410
410
|
size: 'sm',
|
|
411
411
|
color: 'primary',
|
|
412
412
|
onclick: () => { count.value++; },
|
|
413
|
-
|
|
413
|
+
children: ['+ Add Message']
|
|
414
414
|
}
|
|
415
415
|
},
|
|
416
416
|
{
|
|
@@ -421,7 +421,7 @@ const demo = {
|
|
|
421
421
|
Badge: {
|
|
422
422
|
color: 'secondary',
|
|
423
423
|
style: 'margin-left: 0.5rem;',
|
|
424
|
-
|
|
424
|
+
children: [() => count.value > 99 ? '99+' : count.value]
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
]
|
|
@@ -431,7 +431,7 @@ const demo = {
|
|
|
431
431
|
Button: {
|
|
432
432
|
size: 'sm',
|
|
433
433
|
onclick: () => { count.value = 0; },
|
|
434
|
-
|
|
434
|
+
children: ['Clear']
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
]
|
|
@@ -524,6 +524,61 @@ $('#example').content(demo);</code></pre>
|
|
|
524
524
|
<div class="badge badge-secondary">+99</div>
|
|
525
525
|
</button>
|
|
526
526
|
</div>
|
|
527
|
+
|
|
528
|
+
<!-- Custom Element Gallery -->
|
|
529
|
+
<h2 class="text-xl font-bold" style="margin-bottom: 1rem;">Custom Element Gallery</h2>
|
|
530
|
+
<p class="text-sm" style="opacity: 0.7; margin-bottom: 1rem;">
|
|
531
|
+
Live examples using <code><lv-badge></code> custom elements with various options.
|
|
532
|
+
</p>
|
|
533
|
+
|
|
534
|
+
<script type="module" src="/components/data-display/badge.js"></script>
|
|
535
|
+
|
|
536
|
+
<!-- All Colors -->
|
|
537
|
+
<h3 class="text-lg font-semibold" style="margin-top: 1.5rem; margin-bottom: 0.75rem;">All Colors
|
|
538
|
+
</h3>
|
|
539
|
+
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;">
|
|
540
|
+
<lv-badge>Default</lv-badge>
|
|
541
|
+
<lv-badge color="neutral">Neutral</lv-badge>
|
|
542
|
+
<lv-badge color="primary">Primary</lv-badge>
|
|
543
|
+
<lv-badge color="secondary">Secondary</lv-badge>
|
|
544
|
+
<lv-badge color="accent">Accent</lv-badge>
|
|
545
|
+
<lv-badge color="ghost">Ghost</lv-badge>
|
|
546
|
+
<lv-badge color="info">Info</lv-badge>
|
|
547
|
+
<lv-badge color="success">Success</lv-badge>
|
|
548
|
+
<lv-badge color="warning">Warning</lv-badge>
|
|
549
|
+
<lv-badge color="error">Error</lv-badge>
|
|
550
|
+
</div>
|
|
551
|
+
|
|
552
|
+
<!-- All Sizes -->
|
|
553
|
+
<h3 class="text-lg font-semibold" style="margin-bottom: 0.75rem;">All Sizes</h3>
|
|
554
|
+
<div style="display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;">
|
|
555
|
+
<lv-badge size="xs" color="primary">Extra Small</lv-badge>
|
|
556
|
+
<lv-badge size="sm" color="primary">Small</lv-badge>
|
|
557
|
+
<lv-badge size="md" color="primary">Medium</lv-badge>
|
|
558
|
+
<lv-badge size="lg" color="primary">Large</lv-badge>
|
|
559
|
+
</div>
|
|
560
|
+
|
|
561
|
+
<!-- All Variants -->
|
|
562
|
+
<h3 class="text-lg font-semibold" style="margin-bottom: 0.75rem;">All Variants</h3>
|
|
563
|
+
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;">
|
|
564
|
+
<lv-badge color="primary">Solid</lv-badge>
|
|
565
|
+
<lv-badge variant="outline" color="primary">Outline</lv-badge>
|
|
566
|
+
<lv-badge variant="soft" color="primary">Soft</lv-badge>
|
|
567
|
+
<lv-badge variant="dash" color="primary">Dash</lv-badge>
|
|
568
|
+
</div>
|
|
569
|
+
|
|
570
|
+
<!-- Mixed Combinations -->
|
|
571
|
+
<h3 class="text-lg font-semibold" style="margin-bottom: 0.75rem;">Mixed Combinations</h3>
|
|
572
|
+
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem;">
|
|
573
|
+
<lv-badge size="xs" color="success">New</lv-badge>
|
|
574
|
+
<lv-badge size="sm" variant="outline" color="info">Beta</lv-badge>
|
|
575
|
+
<lv-badge variant="soft" color="warning">Hot</lv-badge>
|
|
576
|
+
<lv-badge size="lg" variant="dash" color="error">Sale</lv-badge>
|
|
577
|
+
<lv-badge color="secondary">v2.0</lv-badge>
|
|
578
|
+
<lv-badge size="xs" variant="outline" color="accent">Pro</lv-badge>
|
|
579
|
+
<lv-badge size="sm" variant="soft" color="success">Updated</lv-badge>
|
|
580
|
+
<lv-badge variant="dash" color="neutral">Draft</lv-badge>
|
|
581
|
+
</div>
|
|
527
582
|
</div>
|
|
528
583
|
</div>
|
|
529
584
|
</div>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<!-- Tabs -->
|
|
73
73
|
<script>
|
|
74
74
|
globalThis.switchSyntaxTab = (tabId) => {
|
|
75
|
-
const tabs = ['tagged', 'vdom', 'object'];
|
|
75
|
+
const tabs = ['tagged', 'vdom', 'object', 'html'];
|
|
76
76
|
tabs.forEach(t => {
|
|
77
77
|
const tabEl = document.getElementById(`tab-btn-${t}`);
|
|
78
78
|
const contentEl = document.getElementById(`syntax-${t}`);
|
|
@@ -94,6 +94,8 @@
|
|
|
94
94
|
<button id="tab-btn-object" role="tab" class="syntax-tab"
|
|
95
95
|
onclick="switchSyntaxTab('object')">Object
|
|
96
96
|
DOM</button>
|
|
97
|
+
<button id="tab-btn-html" role="tab" class="syntax-tab"
|
|
98
|
+
onclick="switchSyntaxTab('html')">HTML</button>
|
|
97
99
|
</div>
|
|
98
100
|
|
|
99
101
|
<!-- Tagged Syntax -->
|
|
@@ -196,6 +198,28 @@ const breadcrumbs = {
|
|
|
196
198
|
|
|
197
199
|
$('#example').content(breadcrumbs);</code></pre>
|
|
198
200
|
</div>
|
|
201
|
+
|
|
202
|
+
<!-- HTML Syntax -->
|
|
203
|
+
<div id="syntax-html" style="display: none;">
|
|
204
|
+
<pre><script>
|
|
205
|
+
examplify(document.currentScript.nextElementSibling, {
|
|
206
|
+
at: document.currentScript.parentElement,
|
|
207
|
+
scripts: ['/lightview.js', '/lightview-x.js'],
|
|
208
|
+
styles: ['https://cdn.jsdelivr.net/npm/daisyui@3.9.4/dist/full.min.css'],
|
|
209
|
+
type: 'module',
|
|
210
|
+
language: 'html',
|
|
211
|
+
minHeight: 75
|
|
212
|
+
});
|
|
213
|
+
</script><code contenteditable="true" class="language-html"><!-- Import the component (registers lv-breadcrumbs) -->
|
|
214
|
+
<script type="module" src="/components/navigation/breadcrumbs.js"></script>
|
|
215
|
+
|
|
216
|
+
<lv-breadcrumbs style="font-size: 0.75rem">
|
|
217
|
+
<lv-breadcrumbs-item href="/">Home</lv-breadcrumbs-item>
|
|
218
|
+
<lv-breadcrumbs-item href="/products">Products</lv-breadcrumbs-item>
|
|
219
|
+
<lv-breadcrumbs-item href="/products/electronics">Electronics</lv-breadcrumbs-item>
|
|
220
|
+
<lv-breadcrumbs-item>Phones</lv-breadcrumbs-item>
|
|
221
|
+
</lv-breadcrumbs></code></pre>
|
|
222
|
+
</div>
|
|
199
223
|
</div>
|
|
200
224
|
</div>
|
|
201
225
|
|
|
@@ -243,36 +267,78 @@ $('#example').content(breadcrumbs);</code></pre>
|
|
|
243
267
|
</table>
|
|
244
268
|
</div>
|
|
245
269
|
|
|
270
|
+
<!-- Custom Element Gallery -->
|
|
271
|
+
<h2 class="text-xl font-bold" style="margin-top: 2rem; margin-bottom: 1rem;">Breadcrumbs Gallery
|
|
272
|
+
</h2>
|
|
273
|
+
<p class="text-sm" style="opacity: 0.7; margin-bottom: 1.5rem;">
|
|
274
|
+
Live examples using <code><lv-breadcrumbs></code> and
|
|
275
|
+
<code><lv-breadcrumbs-item></code> custom elements.
|
|
276
|
+
</p>
|
|
277
|
+
|
|
278
|
+
<script type="module" src="/components/navigation/breadcrumbs.js"></script>
|
|
279
|
+
|
|
280
|
+
<!-- Basic -->
|
|
281
|
+
<h3 class="text-lg font-semibold" style="margin-bottom: 0.75rem;">Basic</h3>
|
|
282
|
+
<div style="margin-bottom: 2rem;">
|
|
283
|
+
<lv-breadcrumbs>
|
|
284
|
+
<lv-breadcrumbs-item href="/">Home</lv-breadcrumbs-item>
|
|
285
|
+
<lv-breadcrumbs-item href="/docs">Docs</lv-breadcrumbs-item>
|
|
286
|
+
<lv-breadcrumbs-item>Breadcrumbs</lv-breadcrumbs-item>
|
|
287
|
+
</lv-breadcrumbs>
|
|
288
|
+
</div>
|
|
289
|
+
|
|
246
290
|
<!-- With Icons -->
|
|
247
|
-
<
|
|
248
|
-
<div
|
|
249
|
-
<
|
|
250
|
-
<
|
|
251
|
-
<
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
291
|
+
<h3 class="text-lg font-semibold" style="margin-bottom: 0.75rem;">With Icons</h3>
|
|
292
|
+
<div style="margin-bottom: 2rem;">
|
|
293
|
+
<lv-breadcrumbs>
|
|
294
|
+
<lv-breadcrumbs-item href="/">
|
|
295
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
|
296
|
+
class="w-4 h-4 mr-2 stroke-current">
|
|
297
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
298
|
+
d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z">
|
|
299
|
+
</path>
|
|
300
|
+
</svg>
|
|
301
|
+
Home
|
|
302
|
+
</lv-breadcrumbs-item>
|
|
303
|
+
<lv-breadcrumbs-item href="/docs">
|
|
304
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
|
305
|
+
class="w-4 h-4 mr-2 stroke-current">
|
|
306
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
307
|
+
d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z">
|
|
308
|
+
</path>
|
|
309
|
+
</svg>
|
|
310
|
+
Documents
|
|
311
|
+
</lv-breadcrumbs-item>
|
|
312
|
+
<lv-breadcrumbs-item>
|
|
313
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
|
314
|
+
class="w-4 h-4 mr-2 stroke-current">
|
|
315
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
316
|
+
d="M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z">
|
|
317
|
+
</path>
|
|
318
|
+
</svg>
|
|
319
|
+
Add Document
|
|
320
|
+
</lv-breadcrumbs-item>
|
|
321
|
+
</lv-breadcrumbs>
|
|
322
|
+
</div>
|
|
323
|
+
|
|
324
|
+
<!-- Sizes -->
|
|
325
|
+
<h3 class="text-lg font-semibold" style="margin-bottom: 0.75rem;">Sizes</h3>
|
|
326
|
+
<div style="display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem;">
|
|
327
|
+
<lv-breadcrumbs class="text-xs">
|
|
328
|
+
<lv-breadcrumbs-item href="/">Home</lv-breadcrumbs-item>
|
|
329
|
+
<lv-breadcrumbs-item>Extra Small</lv-breadcrumbs-item>
|
|
330
|
+
</lv-breadcrumbs>
|
|
331
|
+
<lv-breadcrumbs class="text-sm">
|
|
332
|
+
<lv-breadcrumbs-item href="/">Home</lv-breadcrumbs-item>
|
|
333
|
+
<lv-breadcrumbs-item>Small</lv-breadcrumbs-item>
|
|
334
|
+
</lv-breadcrumbs>
|
|
335
|
+
<lv-breadcrumbs class="text-lg">
|
|
336
|
+
<lv-breadcrumbs-item href="/">Home</lv-breadcrumbs-item>
|
|
337
|
+
<lv-breadcrumbs-item>Large</lv-breadcrumbs-item>
|
|
338
|
+
</lv-breadcrumbs>
|
|
274
339
|
</div>
|
|
275
340
|
</div>
|
|
276
341
|
</div>
|
|
277
342
|
</div>
|
|
278
|
-
</div>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|