kempo-ui 0.1.6 → 0.2.2

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 (119) hide show
  1. package/.github/skills/highlight-code/SKILL.md +22 -6
  2. package/.github/skills/new-component/SKILL.md +68 -4
  3. package/AGENTS.md +11 -0
  4. package/bin/highlight_code.js +7 -15
  5. package/dist/components/Aside.js +326 -0
  6. package/dist/components/Dialog.js +1 -1
  7. package/dist/components/Dropdown.js +1 -1
  8. package/dist/components/Main.js +2 -2
  9. package/dist/components/Nav.js +27 -0
  10. package/dist/components/PhotoViewer.js +1 -1
  11. package/dist/components/ShadowComponent.js +1 -1
  12. package/dist/components/ThemeSwitcher.js +1 -0
  13. package/dist/components/Toast.js +1 -1
  14. package/docs/components/accordion.html +4 -3
  15. package/docs/components/aside-items.html +43 -0
  16. package/docs/components/aside-menu.html +43 -0
  17. package/docs/components/aside-push.html +26 -0
  18. package/docs/components/aside.html +567 -0
  19. package/docs/components/card.html +4 -3
  20. package/docs/components/color-picker.html +4 -3
  21. package/docs/components/content-slider.html +4 -3
  22. package/docs/components/dialog.html +4 -3
  23. package/docs/components/dropdown.html +4 -3
  24. package/docs/components/filter-list.html +4 -3
  25. package/docs/components/focus-capture.html +6 -5
  26. package/docs/components/html-editor.html +5 -4
  27. package/docs/components/hybrid-component.html +5 -4
  28. package/docs/components/icon.html +4 -3
  29. package/docs/components/import.html +5 -4
  30. package/docs/components/light-component.html +4 -3
  31. package/docs/components/nav.html +117 -0
  32. package/docs/components/photo-viewer.html +5 -4
  33. package/docs/components/resize.html +5 -4
  34. package/docs/components/shadow-component.html +4 -3
  35. package/docs/components/show-more.html +5 -4
  36. package/docs/components/sortable.html +4 -3
  37. package/docs/components/spinner.html +4 -3
  38. package/docs/components/split.html +5 -4
  39. package/docs/components/table.html +4 -3
  40. package/docs/components/tableControls.html +4 -3
  41. package/docs/components/tableCustomFields.html +4 -3
  42. package/docs/components/tableFetchRecords.html +5 -4
  43. package/docs/components/tableFieldSortHide.html +5 -4
  44. package/docs/components/tablePagination.html +4 -3
  45. package/docs/components/tableRecordEditing.html +4 -3
  46. package/docs/components/tableRecordFiltering.html +5 -4
  47. package/docs/components/tableRecordHiding.html +4 -3
  48. package/docs/components/tableRecordSearching.html +5 -4
  49. package/docs/components/tableRecordSelection.html +4 -3
  50. package/docs/components/tableRowControls.html +4 -3
  51. package/docs/components/tableServerSync.html +5 -4
  52. package/docs/components/tableSorting.html +5 -4
  53. package/docs/components/tabs.html +4 -3
  54. package/docs/components/tags.html +4 -3
  55. package/docs/components/theme-select.html +4 -3
  56. package/docs/components/theme-switcher.html +5 -4
  57. package/docs/components/timestamp.html +4 -3
  58. package/docs/components/toast.html +4 -3
  59. package/docs/components/toggle.html +5 -4
  60. package/docs/components/tree.html +5 -4
  61. package/docs/index.html +22 -21
  62. package/docs/nav-1.inc.html +18 -12
  63. package/docs/nav.inc.html +20 -13
  64. package/docs/nav.inc.js +1 -1
  65. package/docs/src/components/Aside.js +326 -0
  66. package/docs/src/components/Dialog.js +1 -1
  67. package/docs/src/components/Dropdown.js +1 -1
  68. package/docs/src/components/Main.js +2 -2
  69. package/docs/src/components/Nav.js +27 -0
  70. package/docs/src/components/PhotoViewer.js +1 -1
  71. package/docs/src/components/ShadowComponent.js +1 -1
  72. package/docs/src/components/ThemeSwitcher.js +1 -0
  73. package/docs/src/components/Toast.js +1 -1
  74. package/docs/utils/context.html +4 -3
  75. package/docs/utils/cookie.html +4 -3
  76. package/docs/utils/debounce.html +4 -3
  77. package/docs/utils/drag.html +4 -3
  78. package/docs/utils/elevation.html +156 -0
  79. package/docs/utils/formatTimestamp.html +4 -3
  80. package/docs/utils/object.html +4 -3
  81. package/docs/utils/propConverters.html +4 -3
  82. package/docs/utils/string.html +4 -3
  83. package/docs/utils/theme.html +4 -3
  84. package/docs/utils/toTitleCase.html +4 -3
  85. package/docs/utils/type.html +4 -3
  86. package/docs/utils/wait.html +4 -3
  87. package/llm.txt +247 -0
  88. package/package.json +3 -4
  89. package/src/components/Aside.js +726 -0
  90. package/src/components/Dialog.js +1 -1
  91. package/src/components/Dropdown.js +1 -1
  92. package/src/components/Main.js +34 -30
  93. package/src/components/Nav.js +53 -0
  94. package/src/components/PhotoViewer.js +1 -1
  95. package/src/components/ShadowComponent.js +1 -1
  96. package/src/components/ThemeSwitcher.js +1 -0
  97. package/src/components/Toast.js +1 -1
  98. package/tests/bin/get_icon.node-test.js +26 -0
  99. package/tests/bin/highlight_code.node-test.js +108 -0
  100. package/tests/bin/list_icons.node-test.js +26 -0
  101. package/tests/components/Aside.browser-test.js +778 -0
  102. package/tests/components/Main.browser-test.js +115 -283
  103. package/dist/components/SideMenu.js +0 -97
  104. package/dist/components/SidePanel.js +0 -236
  105. package/docs/components/side-menu.html +0 -189
  106. package/docs/components/side-panel-basic.html +0 -44
  107. package/docs/components/side-panel-dual.html +0 -70
  108. package/docs/components/side-panel-menu.html +0 -50
  109. package/docs/components/side-panel-persistent.html +0 -90
  110. package/docs/components/side-panel-scroll.html +0 -176
  111. package/docs/components/side-panel.html +0 -245
  112. package/docs/src/components/SideMenu.js +0 -97
  113. package/docs/src/components/SidePanel.js +0 -236
  114. package/scripts/update-kempo-css.js +0 -53
  115. package/src/components/SideMenu.js +0 -178
  116. package/src/components/SidePanel.js +0 -513
  117. package/tests/components/SideMenu.browser-test.js +0 -667
  118. package/tests/components/SidePanel.browser-test.js +0 -520
  119. package/tools/highlight.js +0 -51
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>ColorPicker Component - Kempo UI</title>
7
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css">
7
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css">
8
8
  <link rel="stylesheet" href="../kempo-hljs.css">
9
9
  <link rel="icon" href="../manifest.json">
10
10
  <script type="module" src="../init-1.js"></script>
@@ -13,7 +13,7 @@
13
13
  <k-import src="../nav-1.inc.html"></k-import>
14
14
  <nav-component></nav-component>
15
15
 
16
- <main>
16
+ <k-main>
17
17
  <h1>ColorPicker Component</h1>
18
18
  <p>The ColorPicker component provides a comprehensive color selection interface that supports all modern CSS color
19
19
  formats including hex, RGB, HSL, named colors, HWB, Lab, LCH, OKLab, and OKLCH. It features bidirectional color
@@ -564,9 +564,10 @@
564
564
  <code>parse()</code>, and <code>toString()</code> methods.
565
565
  </p>
566
566
 
567
- </main>
567
+ </k-main>
568
568
  <div style="height:33vh"></div>
569
569
  <script type="module" src="../src/components/Import.js"></script>
570
+ <script type="module" src="../src/components/Main.js"></script>
570
571
  <script type="module" src="../src/components/ColorPicker.js"></script>
571
572
  <script type="module" src="../src/components/Accordion.js"></script>
572
573
  <script type="module" src="../src/components/Card.js"></script>
@@ -7,7 +7,7 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
@@ -15,7 +15,7 @@
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
17
  <h1 class="ta-center">Content Slider</h1>
18
- <main>
18
+ <k-main>
19
19
  <k-accordion persistent-id="toc" class="b r mb">
20
20
  <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
21
21
  <k-accordion-panel name="toc-panel">
@@ -274,9 +274,10 @@
274
274
  <h5><code>next</code></h5>
275
275
  <p>Custom content for the next button. Defaults to a right chevron icon if not provided.</p>
276
276
 
277
- </main>
277
+ </k-main>
278
278
  <div style="height:33vh"></div>
279
279
  <script type="module" src="../src/components/Import.js"></script>
280
+ <script type="module" src="../src/components/Main.js"></script>
280
281
  <script type="module" src="../src/components/ContentSlider.js"></script>
281
282
  <script type="module" src="../src/components/Accordion.js"></script>
282
283
  <script type="module" src="../src/components/Card.js"></script>
@@ -7,14 +7,14 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
14
14
  </head>
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
- <main>
17
+ <k-main>
18
18
  <h1 class="ta-center">Dialog</h1>
19
19
 
20
20
  <k-accordion persistent-id="toc" class="b r mb">
@@ -343,10 +343,11 @@
343
343
  <li><code>cancelText</code>: <i>string</i> - Text for the OK button. Default is <code>'Ok'</code>.</li>
344
344
  </ul>
345
345
 
346
- </main>
346
+ </k-main>
347
347
  <div style="height:33vh"></div>
348
348
  <script type="module" src="../src/components/Dialog.js"></script>
349
349
  <script type="module" src="../src/components/Import.js"></script>
350
+ <script type="module" src="../src/components/Main.js"></script>
350
351
  <script type="module" src="../src/components/Accordion.js"></script>
351
352
  <script type="module" src="../src/components/Card.js"></script>
352
353
  <script>
@@ -7,14 +7,14 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
14
14
  </head>
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
- <main>
17
+ <k-main>
18
18
  <h1 class="ta-center">Dropdown</h1>
19
19
 
20
20
  <k-accordion persistent-id="toc" class="b r mb">
@@ -305,10 +305,11 @@
305
305
  <h5><code>--radius</code></h5>
306
306
  <p>Controls the border radius of the dropdown menu. Defaults to the global <code>--radius</code> value.</p>
307
307
 
308
- </main>
308
+ </k-main>
309
309
  <div style="height:33vh"></div>
310
310
  <script type="module" src="../src/components/Dropdown.js"></script>
311
311
  <script type="module" src="../src/components/Import.js"></script>
312
+ <script type="module" src="../src/components/Main.js"></script>
312
313
  <script type="module" src="../src/components/Accordion.js"></script>
313
314
  <script type="module" src="../src/components/Card.js"></script>
314
315
  <script type="module" src="../src/components/Icon.js"></script>
@@ -7,14 +7,14 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
14
14
  </head>
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
- <main>
17
+ <k-main>
18
18
  <h1 class="ta-center">Filter List</h1>
19
19
 
20
20
  <k-accordion persistent-id="toc" class="b r mb">
@@ -122,10 +122,11 @@
122
122
  <h5><code>filter(term<i>: string</i>)<i>: void</i></code></h5>
123
123
  <p>Shows or hides each child <code>k-filter-item</code> based on whether its <code>filter-keywords</code> attribute includes <code>term</code> (case-insensitive). Passing an empty string reveals all items.</p>
124
124
 
125
- </main>
125
+ </k-main>
126
126
  <div style="height:33vh"></div>
127
127
 
128
128
  <script type="module" src="../src/components/Import.js"></script>
129
+ <script type="module" src="../src/components/Main.js"></script>
129
130
  <script type="module" src="../src/components/FilterList.js"></script>
130
131
  <script type="module" src="../src/components/FilterItem.js"></script>
131
132
  <script type="module" src="../src/components/Accordion.js"></script>
@@ -7,7 +7,7 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
@@ -15,7 +15,7 @@
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
17
  <h1 class="ta-center">FocusCapture</h1>
18
- <main>
18
+ <k-main>
19
19
  <k-accordion persistent-id="toc" class="b r mb">
20
20
  <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
21
21
  <k-accordion-panel name="toc-panel">
@@ -57,7 +57,7 @@
57
57
  </div>
58
58
 
59
59
  <h3 id="dialogExample"><a href="#dialogExample" class="no-link">Dialog Example</a></h3>
60
- <p>FocusCapture is used internally by the <a href="dialog.html">Dialog</a> and <a href="side-menu.html">SideMenu</a> components. You do not need to add it yourself. Open the dialog below and tab through the elements to see how focus is trapped within the dialog.</p>
60
+ <p>FocusCapture is used internally by the <a href="dialog.html">Dialog</a> and <a href="aside.html">Aside</a> components. You do not need to add it yourself. Open the dialog below and tab through the elements to see how focus is trapped within the dialog.</p>
61
61
  <div class="row -mx">
62
62
  <div class="col m-span-12 px">
63
63
  <k-card label="HTML">
@@ -104,9 +104,10 @@
104
104
  <h5><code>render()<i>: TemplateResult</i></code></h5>
105
105
  <p>Renders the component with a slot for children and an invisible div with <code>tabindex="0"</code> that captures focus and cycles it back to the beginning.</p>
106
106
 
107
- </main>
107
+ </k-main>
108
108
  <div style="height:33vh"></div>
109
- <script type="module" src="../src/components/Import.js"></script>
109
+ <script type="module" src="../src/components/Import.js"></script>
110
+ <script type="module" src="../src/components/Main.js"></script>
110
111
  <script type="module" src="../src/components/FocusCapture.js"></script>
111
112
  <script type="module" src="../src/components/Dialog.js"></script>
112
113
  <script type="module" src="../src/components/Accordion.js"></script>
@@ -7,7 +7,7 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
@@ -15,7 +15,7 @@
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
17
  <h1 class="ta-center">HtmlEditor</h1>
18
- <main>
18
+ <k-main>
19
19
  <k-accordion persistent-id="toc" class="b r mb">
20
20
  <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
21
21
  <k-accordion-panel name="toc-panel">
@@ -405,9 +405,10 @@
405
405
  <h5><code>mode-changed</code></h5>
406
406
  <p>Dispatched when the editing mode changes between 'visual' and 'code'. Event detail: <code>{ mode: String }</code></p>
407
407
 
408
- </main>
408
+ </k-main>
409
409
  <div style="height:33vh"></div>
410
- <script type="module" src="../src/components/Import.js"></script>
410
+ <script type="module" src="../src/components/Import.js"></script>
411
+ <script type="module" src="../src/components/Main.js"></script>
411
412
  <script type="module" src="../src/components/HtmlEditor.js"></script>
412
413
  <script type="module" src="../src/components/Dropdown.js"></script>
413
414
  <script type="module" src="../src/components/htmlEditorControls/Bold.js"></script>
@@ -7,7 +7,7 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
@@ -15,7 +15,7 @@
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
17
  <h1 class="ta-center">HybridComponent</h1>
18
- <main>
18
+ <k-main>
19
19
  <k-accordion persistent-id="toc" class="b r mb">
20
20
  <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
21
21
  <k-accordion-panel name="toc-panel">
@@ -63,7 +63,7 @@
63
63
  <ul>
64
64
  <li><strong>Dialog:</strong> Shadow DOM for styled dialog chrome (header, footer, overlay), light DOM for user content</li>
65
65
  <li><strong>Collapsible:</strong> Shadow DOM for toggle button, light DOM for collapsible content</li>
66
- <li><strong>SideMenu:</strong> Shadow DOM for menu structure and styling, light DOM for menu items</li>
66
+ <li><strong>Aside:</strong> Shadow DOM for menu structure and styling, light DOM for menu items</li>
67
67
  </ul>
68
68
 
69
69
  <p>Use <a href="./components/shadow-component.html">ShadowComponent</a> instead when you only need shadow DOM.</p>
@@ -105,9 +105,10 @@
105
105
  <h5><code>render()<i>: TemplateResult</i></code></h5>
106
106
  <p>Override this method to define what should be rendered to the shadow DOM. The default implementation returns <code>html`&lt;slot name="lightRoot"&gt;&lt;/slot&gt;`</code> which displays the light DOM content. When overriding, make sure to include this slot where you want the light DOM content to appear.</p>
107
107
 
108
- </main>
108
+ </k-main>
109
109
  <div style="height:33vh"></div>
110
110
  <script type="module" src="../src/components/Import.js"></script>
111
+ <script type="module" src="../src/components/Main.js"></script>
111
112
  <script type="module" src="../src/components/Accordion.js"></script>
112
113
  <script type="module" src="../src/components/Card.js"></script>
113
114
  </body>
@@ -7,7 +7,7 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
@@ -16,7 +16,7 @@
16
16
  <body>
17
17
  <k-import src="../nav-1.inc.html"></k-import>
18
18
  <h1 class="ta-center">Icon</h1>
19
- <main>
19
+ <k-main>
20
20
  <k-accordion persistent-id="toc" class="b r mb">
21
21
  <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
22
22
  <k-accordion-panel name="toc-panel">
@@ -217,9 +217,10 @@ npx kempo-geticon chevron_left -y</code></pre>
217
217
  <h5><code>pathsToIcons<i>: Array</i></code></h5>
218
218
  <p>An array of paths to directories containing icons. This is configured via the global <code>window.kempo.pathsToIcons</code> config object. Directories are checked in order — the first match wins.</p>
219
219
 
220
- </main>
220
+ </k-main>
221
221
  <div style="height:33vh"></div>
222
222
  <script type="module" src="../src/components/Import.js"></script>
223
+ <script type="module" src="../src/components/Main.js"></script>
223
224
  <script type="module" src="../src/components/Icon.js"></script>
224
225
  <script type="module" src="../src/components/Accordion.js"></script>
225
226
  <script type="module" src="../src/components/Card.js"></script>
@@ -7,7 +7,7 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
@@ -15,7 +15,7 @@
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
17
  <h1 class="ta-center">Import</h1>
18
- <main>
18
+ <k-main>
19
19
  <k-accordion persistent-id="toc" class="b r mb">
20
20
  <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
21
21
  <k-accordion-panel name="toc-panel">
@@ -71,9 +71,10 @@
71
71
  <h5><code>load()<i>: Promise</i></code></h5>
72
72
  <p>Loads the HTML snippet from the specified source URL.</p>
73
73
 
74
- </main>
74
+ </k-main>
75
75
  <div style="height:33vh"></div>
76
- <script type="module" src="../src/components/Import.js"></script>
76
+ <script type="module" src="../src/components/Import.js"></script>
77
+ <script type="module" src="../src/components/Main.js"></script>
77
78
  <script type="module" src="../src/components/Accordion.js"></script>
78
79
  <script type="module" src="../src/components/Card.js"></script>
79
80
 
@@ -7,7 +7,7 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
@@ -15,7 +15,7 @@
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
17
  <h1 class="ta-center">LightComponent</h1>
18
- <main>
18
+ <k-main>
19
19
  <k-accordion persistent-id="toc" class="b r mb">
20
20
  <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
21
21
  <k-accordion-panel name="toc-panel">
@@ -108,9 +108,10 @@
108
108
  <p>Override this method to define what should be rendered to the light DOM. Returns an empty template by default.
109
109
  Use Lit's <code>html</code> tagged template literal to return your content.</p>
110
110
 
111
- </main>
111
+ </k-main>
112
112
  <div style="height:33vh"></div>
113
113
  <script type="module" src="../src/components/Import.js"></script>
114
+ <script type="module" src="../src/components/Main.js"></script>
114
115
  <script type="module" src="../src/components/Accordion.js"></script>
115
116
  <script type="module" src="../src/components/Card.js"></script>
116
117
  </body>
@@ -0,0 +1,117 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Nav - Kempo UI</title>
7
+ <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
+ <link rel="manifest" href="../manifest.json" />
9
+ <link rel="stylesheet" href="../kempo-vars.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
+ <link rel="stylesheet" href="../kempo-hljs.css" />
12
+ <link rel="stylesheet" href="../styles.css" />
13
+ <script>window.litDisableBundleWarning = true;</script>
14
+ </head>
15
+ <body>
16
+ <k-import src="../nav-1.inc.html"></k-import>
17
+ <k-main>
18
+ <h1>Nav</h1>
19
+ <k-accordion persistent-id="toc" class="b r mb">
20
+ <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
21
+ <k-accordion-panel name="toc-panel">
22
+ <div class="m">
23
+ <h6>Examples</h6>
24
+ <a href="#fixedNav">Fixed Navbar</a><br />
25
+ <a href="#inlineNav">Inline Navbar</a><br />
26
+ <h6>Reference</h6>
27
+ <a href="#attributes">Attributes &amp; Properties</a><br />
28
+ <a href="#slots">Slots</a><br />
29
+ </div>
30
+ </k-accordion-panel>
31
+ </k-accordion>
32
+
33
+ <p>
34
+ A semantic navigation bar component. When <code>fixed</code> is set, it automatically positions itself at the
35
+ top of the viewport and applies elevation level 5 (<code>z-index: 50</code>), keeping it above push-mode
36
+ drawers and below overlay-mode drawers — no manual <code>z-index</code> needed.
37
+ </p>
38
+ <p>
39
+ Content is placed via a default slot. Apply background and other visual styles with kempo-css utility classes
40
+ directly on the element.
41
+ </p>
42
+
43
+ <h2 id="fixedNav"><a href="#fixedNav" class="no-link">Fixed Navbar</a></h2>
44
+ <p>
45
+ Add the <code>fixed</code> attribute to pin the nav to the top of the viewport. Add a spacer element after it
46
+ so page content is not hidden beneath it.
47
+ </p>
48
+ <k-card class="mb">
49
+ <k-nav fixed class="bg-primary" style="position:relative;z-index:auto;">
50
+ <button class="link"><k-icon name="menu"></k-icon></button>
51
+ <a href="#fixedNav" class="d-if ph" style="align-items:center;">My App</a>
52
+ <div class="flex"></div>
53
+ <a href="#fixedNav" class="ph">Account</a>
54
+ </k-nav>
55
+ </k-card>
56
+ <pre><code class="hljs html"><span class="hljs-tag">&lt;<span class="hljs-name">k-nav</span> <span class="hljs-attr">fixed</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;bg-primary&quot;</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">button</span>&gt;</span>Menu<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">&quot;/&quot;</span>&gt;</span>My App<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">&quot;flex: 1&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">&quot;/account&quot;</span>&gt;</span>Account<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">k-nav</span>&gt;</span><br><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">&quot;height: 4rem;&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></code></pre>
57
+
58
+ <h2 id="inlineNav"><a href="#inlineNav" class="no-link">Inline Navbar</a></h2>
59
+ <p>Without <code>fixed</code>, the nav sits in normal document flow.</p>
60
+ <k-card class="mb">
61
+ <k-nav class="bg-primary">
62
+ <button class="link"><k-icon name="menu"></k-icon></button>
63
+ <a href="#inlineNav" class="d-if ph" style="align-items:center;">My App</a>
64
+ <div class="flex"></div>
65
+ <a href="#inlineNav" class="ph">Account</a>
66
+ </k-nav>
67
+ </k-card>
68
+ <pre><code class="hljs html"><span class="hljs-tag">&lt;<span class="hljs-name">k-nav</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;bg-primary&quot;</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">button</span>&gt;</span>Menu<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">&quot;/&quot;</span>&gt;</span>My App<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">&quot;flex: 1&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">&quot;/account&quot;</span>&gt;</span>Account<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">k-nav</span>&gt;</span></code></pre>
69
+
70
+ <h2 id="attributes"><a href="#attributes" class="no-link">Attributes &amp; Properties</a></h2>
71
+ <table class="mb">
72
+ <thead>
73
+ <tr>
74
+ <th>Attribute / Property</th>
75
+ <th>Type</th>
76
+ <th>Default</th>
77
+ <th>Description</th>
78
+ </tr>
79
+ </thead>
80
+ <tbody>
81
+ <tr>
82
+ <td><code>fixed</code></td>
83
+ <td>Boolean</td>
84
+ <td><code>false</code></td>
85
+ <td>
86
+ Pins the nav to the top of the viewport (<code>position: fixed</code>) and applies
87
+ <a href="../utils/elevation.html">elevation</a> level 5 (<code>z-index: 50</code>).
88
+ </td>
89
+ </tr>
90
+ </tbody>
91
+ </table>
92
+
93
+ <h2 id="slots"><a href="#slots" class="no-link">Slots</a></h2>
94
+ <table class="mb">
95
+ <thead>
96
+ <tr>
97
+ <th>Slot</th>
98
+ <th>Description</th>
99
+ </tr>
100
+ </thead>
101
+ <tbody>
102
+ <tr>
103
+ <td><em>default</em></td>
104
+ <td>All nav content — buttons, links, dropdowns, etc.</td>
105
+ </tr>
106
+ </tbody>
107
+ </table>
108
+ </k-main>
109
+
110
+ <script src="../src/components/Nav.js" type="module"></script>
111
+ <script src="../src/components/Import.js" type="module"></script>
112
+ <script src="../src/components/Main.js" type="module"></script>
113
+ <script src="../src/components/Accordion.js" type="module"></script>
114
+ <script src="../src/components/Card.js" type="module"></script>
115
+ <script src="../src/components/Icon.js" type="module"></script>
116
+ </body>
117
+ </html>
@@ -7,14 +7,14 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href=".../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
14
14
  </head>
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
- <main>
17
+ <k-main>
18
18
  <h1 class="ta-center">PhotoViewer</h1>
19
19
 
20
20
  <k-accordion persistent-id="toc" class="b r mb">
@@ -259,9 +259,10 @@
259
259
  <li><strong>Auto-hide</strong>: Navigation buttons are hidden when only one photo is available</li>
260
260
  </ul>
261
261
 
262
- </main>
262
+ </k-main>
263
263
  <div style="height:33vh"></div>
264
- <script type="module" src="../src/components/Import.js"></script>
264
+ <script type="module" src="../src/components/Import.js"></script>
265
+ <script type="module" src="../src/components/Main.js"></script>
265
266
  <script type="module" src="../src/components/PhotoViewer.js"></script>
266
267
  <script type="module" src="../src/components/Accordion.js"></script>
267
268
  <script type="module" src="../src/components/Card.js"></script>
@@ -7,7 +7,7 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
@@ -15,7 +15,7 @@
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
17
  <h1 class="ta-center">Resize</h1>
18
- <main>
18
+ <k-main>
19
19
  <k-accordion persistent-id="toc" class="b r mb">
20
20
  <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
21
21
  <k-accordion-panel name="toc-panel">
@@ -169,9 +169,10 @@
169
169
  <li>Content automatically scrolls when it exceeds the container dimensions</li>
170
170
  </ul>
171
171
 
172
- </main>
172
+ </k-main>
173
173
  <div style="height:33vh"></div>
174
- <script type="module" src="../src/components/Import.js"></script>
174
+ <script type="module" src="../src/components/Import.js"></script>
175
+ <script type="module" src="../src/components/Main.js"></script>
175
176
  <script type="module" src="../src/components/Resize.js"></script>
176
177
  <script type="module" src="../src/components/Accordion.js"></script>
177
178
  <script type="module" src="../src/components/Card.js"></script>
@@ -7,7 +7,7 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
@@ -15,7 +15,7 @@
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
17
  <h1 class="ta-center">ShadowComponent</h1>
18
- <main>
18
+ <k-main>
19
19
  <k-accordion persistent-id="toc" class="b r mb">
20
20
  <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
21
21
  <k-accordion-panel name="toc-panel">
@@ -93,9 +93,10 @@
93
93
  <p>Override this method to react to child changes:</p>
94
94
  <pre><code class="hljs javascript"><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">MyComponent</span> <span class="hljs-keyword">extends</span> <span class="hljs-title class_">ShadowComponent</span> {<br /> <span class="hljs-title function_">childrenUpdated</span>() {<br /> <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'Children changed!'</span>);<br /> <span class="hljs-variable language_">this</span>.validateChildren();<br /> }<br />}</code></pre>
95
95
 
96
- </main>
96
+ </k-main>
97
97
  <div style="height:33vh"></div>
98
98
  <script type="module" src="../src/components/Import.js"></script>
99
+ <script type="module" src="../src/components/Main.js"></script>
99
100
  <script type="module" src="../src/components/Accordion.js"></script>
100
101
  <script type="module" src="../src/components/Card.js"></script>
101
102
  </body>
@@ -7,14 +7,14 @@
7
7
  <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
8
  <link rel="manifest" href="../manifest.json" />
9
9
  <link rel="stylesheet" href="../kempo-vars.css" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@1.3.11/dist/kempo.min.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
11
  <link rel="stylesheet" href="../kempo-hljs.css" />
12
12
  <link rel="stylesheet" href="../styles.css" />
13
13
  <script>window.litDisableBundleWarning = true;</script>
14
14
  </head>
15
15
  <body>
16
16
  <k-import src="../nav-1.inc.html"></k-import>
17
- <main>
17
+ <k-main>
18
18
  <h1 class="ta-center">Show More</h1>
19
19
  <k-accordion persistent-id="toc" class="b r mb">
20
20
  <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
@@ -119,10 +119,11 @@
119
119
  <h5><code>toggle()<i>: void</i></code></h5>
120
120
  <p>Toggles the content between expanded and collapsed states.</p>
121
121
 
122
- </main>
122
+ </k-main>
123
123
  <div style="height:33vh"></div>
124
124
 
125
- <script type="module" src="../src/components/Import.js"></script>
125
+ <script type="module" src="../src/components/Import.js"></script>
126
+ <script type="module" src="../src/components/Main.js"></script>
126
127
  <script type="module" src="../src/components/ShowMore.js"></script>
127
128
  <script type="module" src="../src/components/Accordion.js"></script>
128
129
  <script type="module" src="../src/components/Card.js"></script>