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.
Files changed (115) hide show
  1. package/build-bundles.mjs +105 -0
  2. package/build.js +236 -46
  3. package/components/actions/button.js +16 -3
  4. package/components/actions/swap.js +26 -3
  5. package/components/daisyui.js +1 -1
  6. package/components/data-display/alert.js +13 -3
  7. package/components/data-display/avatar.js +25 -1
  8. package/components/data-display/badge.js +11 -3
  9. package/components/data-display/chart.js +22 -5
  10. package/components/data-display/countdown.js +3 -2
  11. package/components/data-display/kbd.js +9 -3
  12. package/components/data-display/loading.js +11 -3
  13. package/components/data-display/progress.js +11 -3
  14. package/components/data-display/radial-progress.js +12 -3
  15. package/components/data-display/tooltip.js +17 -0
  16. package/components/data-input/checkbox.js +23 -1
  17. package/components/data-input/input.js +24 -1
  18. package/components/data-input/radio.js +37 -2
  19. package/components/data-input/select.js +24 -1
  20. package/components/data-input/toggle.js +21 -1
  21. package/components/layout/divider.js +21 -1
  22. package/components/layout/indicator.js +14 -0
  23. package/components/navigation/breadcrumbs.js +42 -2
  24. package/components/navigation/tabs.js +291 -16
  25. package/docs/api/elements.html +125 -49
  26. package/docs/api/hypermedia.html +29 -2
  27. package/docs/api/index.html +6 -2
  28. package/docs/api/nav.html +18 -4
  29. package/docs/assets/js/examplify.js +1 -1
  30. package/docs/cdom-nav.html +55 -0
  31. package/docs/cdom.html +792 -0
  32. package/docs/components/alert.html +8 -8
  33. package/docs/components/avatar.html +24 -54
  34. package/docs/components/badge.html +69 -14
  35. package/docs/components/breadcrumbs.html +95 -29
  36. package/docs/components/button.html +78 -92
  37. package/docs/components/chart-area.html +3 -3
  38. package/docs/components/chart-bar.html +4 -181
  39. package/docs/components/chart-column.html +4 -189
  40. package/docs/components/chart-line.html +3 -3
  41. package/docs/components/chart-pie.html +112 -166
  42. package/docs/components/chart.html +11 -13
  43. package/docs/components/checkbox.html +48 -28
  44. package/docs/components/collapse.html +6 -6
  45. package/docs/components/component-nav.html +1 -1
  46. package/docs/components/countdown.html +12 -12
  47. package/docs/components/divider.html +65 -21
  48. package/docs/components/dropdown.html +1 -1
  49. package/docs/components/file-input.html +4 -4
  50. package/docs/components/footer.html +11 -11
  51. package/docs/components/indicator.html +85 -31
  52. package/docs/components/input.html +45 -29
  53. package/docs/components/join.html +4 -4
  54. package/docs/components/kbd.html +67 -28
  55. package/docs/components/loading.html +96 -92
  56. package/docs/components/pagination.html +4 -4
  57. package/docs/components/progress.html +50 -7
  58. package/docs/components/radial-progress.html +32 -12
  59. package/docs/components/radio.html +42 -31
  60. package/docs/components/select.html +48 -59
  61. package/docs/components/swap.html +183 -100
  62. package/docs/components/tabs.html +146 -278
  63. package/docs/components/toggle.html +44 -25
  64. package/docs/components/tooltip.html +71 -31
  65. package/docs/getting-started/index.html +8 -6
  66. package/docs/index.html +1 -1
  67. package/docs/syntax-nav.html +10 -0
  68. package/docs/syntax.html +8 -6
  69. package/index.html +2 -2
  70. package/jprx/LICENSE +21 -0
  71. package/jprx/README.md +130 -0
  72. package/jprx/helpers/array.js +75 -0
  73. package/jprx/helpers/compare.js +26 -0
  74. package/jprx/helpers/conditional.js +34 -0
  75. package/jprx/helpers/datetime.js +54 -0
  76. package/jprx/helpers/format.js +20 -0
  77. package/jprx/helpers/logic.js +24 -0
  78. package/jprx/helpers/lookup.js +25 -0
  79. package/jprx/helpers/math.js +34 -0
  80. package/jprx/helpers/network.js +41 -0
  81. package/jprx/helpers/state.js +80 -0
  82. package/jprx/helpers/stats.js +39 -0
  83. package/jprx/helpers/string.js +49 -0
  84. package/jprx/index.js +69 -0
  85. package/jprx/package.json +24 -0
  86. package/jprx/parser.js +1517 -0
  87. package/lightview-all.js +3785 -0
  88. package/lightview-cdom.js +2128 -0
  89. package/lightview-router.js +179 -208
  90. package/lightview-x.js +1435 -1608
  91. package/lightview.js +613 -766
  92. package/lightview.js.bak +1 -0
  93. package/package.json +10 -3
  94. package/src/lightview-all.js +10 -0
  95. package/src/lightview-cdom.js +457 -0
  96. package/src/lightview-router.js +210 -0
  97. package/src/lightview-x.js +1630 -0
  98. package/src/lightview.js +705 -0
  99. package/src/reactivity/signal.js +133 -0
  100. package/src/reactivity/state.js +217 -0
  101. package/{watch.js → start-dev.js} +2 -1
  102. package/tests/cdom/fixtures/helpers.cdomc +62 -0
  103. package/tests/cdom/fixtures/user.cdom +14 -0
  104. package/tests/cdom/fixtures/user.cdomc +12 -0
  105. package/tests/cdom/fixtures/user.odom +18 -0
  106. package/tests/cdom/fixtures/user.vdom +11 -0
  107. package/tests/cdom/helpers.test.js +121 -0
  108. package/tests/cdom/loader.test.js +125 -0
  109. package/tests/cdom/parser.test.js +179 -0
  110. package/tests/cdom/reactivity.test.js +186 -0
  111. package/tests/text-tag.test.js +77 -0
  112. package/vite.config.mjs +52 -0
  113. package/wrangler.toml +0 -3
  114. package/components/data-display/skeleton.js +0 -66
  115. 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: [{ span: { text: 'New update available! Click to learn more.' } }] } },
196
- { Alert: { color: 'success', icon: 'success', children: [{ span: { text: 'Your order has been placed successfully!' } }] } },
197
- { Alert: { color: 'warning', icon: 'warning', children: [{ span: { text: 'Please review your information before proceeding.' } }] } },
198
- { Alert: { color: 'error', icon: 'error', children: [{ span: { text: 'Unable to connect to server. Please try again.' } }] } }
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
- { span: { text: 'Message sent successfully!' } },
380
- { Button: { size: 'sm', color: 'ghost', onclick: () => { visible.value = false; }, text: '✕' } }
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;', text: 'Alert dismissed' } },
389
- { Button: { size: 'sm', color: 'primary', onclick: () => { visible.value = true; }, text: 'Show again' } }
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>&lt;lv-avatar&gt;</code> custom elements.
508
+ </p>
509
+
510
+ <script type="module" src="/components/data-display/avatar.js"></script>
511
+
504
512
  <!-- Shapes -->
505
- <h2 class="text-xl font-bold" style="margin-bottom: 1rem;">Shapes</h2>
506
- <div style="display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;">
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>&lt;!-- Tagged Syntax --&gt;
515
- Avatar({ src: '...', shape: 'squircle' })
516
-
517
- &lt;!-- HTML Syntax --&gt;
518
- &lt;lv-avatar src="..." shape="squircle"&gt;&lt;/lv-avatar&gt;</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>&lt;!-- Tagged Syntax --&gt;
527
- Avatar({ src: '...', ring: true, ringColor: 'ring-primary' })
528
-
529
- &lt;!-- HTML Syntax --&gt;
530
- &lt;lv-avatar src="..." ring ring-color="ring-primary"&gt;&lt;/lv-avatar&gt;</code></pre>
531
-
532
522
  <!-- Online/Offline Status -->
533
- <h2 class="text-xl font-bold" style="margin-top: 2rem; margin-bottom: 1rem;">Online/Offline Status
534
- </h2>
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>&lt;!-- Tagged Syntax --&gt;
540
- Avatar({ src: '...', online: true })
541
530
 
542
- &lt;!-- HTML Syntax --&gt;
543
- &lt;lv-avatar src="..." online&gt;&lt;/lv-avatar&gt;</code></pre>
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="AV" size="w-20" shape="squircle"
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="LRG" size="w-32" shape="hexagon"
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>&lt;!-- Tagged Syntax --&gt;
556
- Avatar({ placeholder: 'AI', size: 'w-12' })
557
- Avatar({ placeholder: 'AV', size: 'w-20', shape: 'squircle' })
558
-
559
- &lt;!-- HTML Syntax --&gt;
560
- &lt;lv-avatar placeholder="LRG" size="w-32" shape="hexagon"&gt;&lt;/lv-avatar&gt;</code></pre>
561
541
 
562
- <!-- Avatar Group -->
563
- <h2 class="text-xl font-bold" style="margin-top: 2rem; margin-bottom: 1rem;">Avatar Group</h2>
564
- <div style="margin-bottom: 1.5rem;">
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"></lv-avatar>
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>&lt;!-- Tagged Syntax --&gt;
573
- Avatar.Group({},
574
- Avatar({ src: '...', size: 'w-12' }),
575
- Avatar({ placeholder: '+99', size: 'w-12' })
576
- )
577
-
578
- &lt;!-- HTML Syntax --&gt;
579
- &lt;lv-avatar-group&gt;
580
- &lt;lv-avatar src="..." size="w-12"&gt;&lt;/lv-avatar&gt;
581
- &lt;lv-avatar placeholder="+99" size="w-12"&gt;&lt;/lv-avatar&gt;
582
- &lt;/lv-avatar-group&gt;</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: { text: 'Default' } },
208
- { Badge: { color: 'primary', text: 'Primary' } },
209
- { Badge: { color: 'secondary', text: 'Secondary' } },
210
- { Badge: { color: 'accent', text: 'Accent' } },
211
- { Badge: { color: 'info', text: 'Info' } },
212
- { Badge: { color: 'success', text: 'Success' } },
213
- { Badge: { color: 'warning', text: 'Warning' } },
214
- { Badge: { color: 'error', text: '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', text: 'Outline' } },
223
- { Badge: { variant: 'soft', color: 'primary', text: 'Soft' } },
224
- { Badge: { variant: 'dash', color: 'secondary', text: 'Dash' } }
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
- text: '+ Add Message'
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
- text: () => count.value > 99 ? '99+' : count.value
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
- text: 'Clear'
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>&lt;lv-badge&gt;</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">&lt;!-- Import the component (registers lv-breadcrumbs) --&gt;
214
+ &lt;script type="module" src="/components/navigation/breadcrumbs.js"&gt;&lt;/script&gt;
215
+
216
+ &lt;lv-breadcrumbs style="font-size: 0.75rem"&gt;
217
+ &lt;lv-breadcrumbs-item href="/"&gt;Home&lt;/lv-breadcrumbs-item&gt;
218
+ &lt;lv-breadcrumbs-item href="/products"&gt;Products&lt;/lv-breadcrumbs-item&gt;
219
+ &lt;lv-breadcrumbs-item href="/products/electronics"&gt;Electronics&lt;/lv-breadcrumbs-item&gt;
220
+ &lt;lv-breadcrumbs-item&gt;Phones&lt;/lv-breadcrumbs-item&gt;
221
+ &lt;/lv-breadcrumbs&gt;</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>&lt;lv-breadcrumbs&gt;</code> and
275
+ <code>&lt;lv-breadcrumbs-item&gt;</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
- <h2 class="text-xl font-bold" style="margin-bottom: 1rem;">With Icons</h2>
248
- <div class="breadcrumbs" style="font-size: 0.875rem; margin-bottom: 2rem;">
249
- <ul>
250
- <li>
251
- <a>
252
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
253
- style="width: 1rem; height: 1rem; stroke: currentColor; stroke-width: 2;">
254
- <path stroke-linecap="round" stroke-linejoin="round"
255
- d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z">
256
- </path>
257
- </svg>
258
- Home
259
- </a>
260
- </li>
261
- <li>
262
- <a>
263
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
264
- style="width: 1rem; height: 1rem; stroke: currentColor; stroke-width: 2;">
265
- <path stroke-linecap="round" stroke-linejoin="round"
266
- d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z">
267
- </path>
268
- </svg>
269
- Documents
270
- </a>
271
- </li>
272
- <li>Add Document</li>
273
- </ul>
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>