kempo-ui 0.0.3 → 0.0.4

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 (137) hide show
  1. package/.github/workflows/publish-major.yml +39 -0
  2. package/.github/workflows/publish-minor.yml +39 -0
  3. package/.github/workflows/{publish-npm.yml → publish-patch.yml} +1 -1
  4. package/.vscode/settings.json +2 -0
  5. package/dist/kempo-hljs.css +1 -0
  6. package/dist/src/components/Accordion.js +36 -0
  7. package/dist/src/components/Card.js +37 -0
  8. package/dist/src/components/Collapsible.js +41 -0
  9. package/dist/src/components/ContentSlider.js +44 -0
  10. package/dist/src/components/Dialog.js +113 -0
  11. package/dist/src/components/Icon.js +2 -2
  12. package/dist/src/components/PersistantCollapsible.js +1 -0
  13. package/dist/src/components/PhotoViewer.js +135 -0
  14. package/dist/src/components/Resize.js +96 -0
  15. package/dist/src/components/ShowMore.js +42 -0
  16. package/dist/src/components/SideMenu.js +1 -1
  17. package/dist/src/components/Split.js +84 -0
  18. package/dist/src/components/Tabs.js +155 -0
  19. package/dist/src/components/Tags.js +69 -0
  20. package/dist/src/components/ThemeSwitcher.js +23 -0
  21. package/dist/src/components/Timestamp.js +1 -0
  22. package/dist/src/utils/debounce.js +1 -0
  23. package/dist/src/utils/drag.js +1 -0
  24. package/dist/src/utils/formatTimestamp.js +1 -0
  25. package/dist/src/utils/propConverters.js +1 -0
  26. package/dist/src/utils/watchWindowSize.js +1 -0
  27. package/docs/components/accordion.html +69 -25
  28. package/docs/components/card.html +6 -5
  29. package/docs/components/collapsible.html +198 -0
  30. package/docs/components/content-slider.html +56 -26
  31. package/docs/components/dialog.html +54 -48
  32. package/docs/components/focus-capture.html +2 -3
  33. package/docs/components/icon.html +5 -8
  34. package/docs/components/import.html +1 -6
  35. package/docs/components/persistant-collapsible.html +123 -0
  36. package/docs/components/photo-viewer.html +226 -0
  37. package/docs/components/resize.html +44 -18
  38. package/docs/components/show-more.html +12 -6
  39. package/docs/components/side-menu.html +3 -12
  40. package/docs/components/split.html +26 -5
  41. package/docs/components/tablePagination.html +4 -4
  42. package/docs/components/tableRecordFiltering.html +16 -3
  43. package/docs/components/tableRecordSelection.html +2 -2
  44. package/docs/components/tabs.html +24 -7
  45. package/docs/components/tags.html +24 -8
  46. package/docs/components/theme-switcher.html +3 -6
  47. package/docs/components/timestamp.html +20 -24
  48. package/docs/components/toast.html +23 -32
  49. package/docs/components/toggle.html +4 -3
  50. package/docs/kempo-hljs.css +1 -0
  51. package/docs/media/civic.jpg +0 -0
  52. package/docs/media/corvette.jpg +0 -0
  53. package/docs/media/evo.jpg +0 -0
  54. package/docs/media/gtr.jpg +0 -0
  55. package/docs/media/nsx.jpg +0 -0
  56. package/docs/nav.inc.html +11 -17
  57. package/docs/src/components/Accordion.js +36 -0
  58. package/docs/src/components/Card.js +37 -0
  59. package/docs/src/components/Collapsible.js +41 -0
  60. package/docs/src/components/ContentSlider.js +44 -0
  61. package/docs/src/components/Dialog.js +113 -0
  62. package/docs/src/components/Icon.js +2 -2
  63. package/docs/src/components/PersistantCollapsible.js +1 -0
  64. package/docs/src/components/PhotoViewer.js +135 -0
  65. package/docs/src/components/Resize.js +96 -0
  66. package/docs/src/components/ShowMore.js +42 -0
  67. package/docs/src/components/SideMenu.js +1 -1
  68. package/docs/src/components/Split.js +84 -0
  69. package/docs/src/components/Tabs.js +155 -0
  70. package/docs/src/components/Tags.js +69 -0
  71. package/docs/src/components/ThemeSwitcher.js +23 -0
  72. package/docs/src/components/Timestamp.js +1 -0
  73. package/docs/src/utils/debounce.js +1 -0
  74. package/docs/src/utils/drag.js +1 -0
  75. package/docs/src/utils/formatTimestamp.js +1 -0
  76. package/docs/src/utils/propConverters.js +1 -0
  77. package/docs/src/utils/watchWindowSize.js +1 -0
  78. package/docs/utils/debounce.html +78 -0
  79. package/docs/utils/drag.html +104 -0
  80. package/docs/utils/formatTimestamp.html +114 -0
  81. package/docs/utils/propConverters.html +132 -0
  82. package/docs/utils/watchWindowSize.html +166 -0
  83. package/icons/error.svg +1 -1
  84. package/icons/warning.svg +1 -1
  85. package/package.json +1 -1
  86. package/scripts/build.js +1 -1
  87. package/scripts/docs.js +4 -2
  88. package/src/components/Accordion.js +229 -0
  89. package/src/components/Collapsible.js +109 -0
  90. package/src/components/ContentSlider.js +205 -0
  91. package/src/components/Dialog.js +368 -0
  92. package/src/components/PersistantCollapsible.js +69 -0
  93. package/src/components/PhotoViewer.js +368 -0
  94. package/src/components/Resize.js +210 -0
  95. package/src/components/ShadowComponent.js +3 -1
  96. package/src/components/ShowMore.js +109 -0
  97. package/src/components/Sortable.js +193 -0
  98. package/src/components/Split.js +192 -0
  99. package/src/components/Table.js +1202 -0
  100. package/src/components/Tabs.js +428 -0
  101. package/src/components/Tags.js +253 -0
  102. package/src/components/Timestamp.js +31 -0
  103. package/src/components/Toast.js +454 -0
  104. package/src/components/Toggle.js +173 -0
  105. package/src/components/tableControls/DeleteRecord.js +29 -0
  106. package/src/components/tableControls/Edit.js +88 -0
  107. package/src/components/tableControls/ExportCSV.js +71 -0
  108. package/src/components/tableControls/ExportJson.js +55 -0
  109. package/src/components/tableControls/FieldSortHide.js +76 -0
  110. package/src/components/tableControls/Filters.js +114 -0
  111. package/src/components/tableControls/FirstPage.js +65 -0
  112. package/src/components/tableControls/HiddenCount.js +45 -0
  113. package/src/components/tableControls/Hide.js +34 -0
  114. package/src/components/tableControls/LastPage.js +65 -0
  115. package/src/components/tableControls/NextPage.js +65 -0
  116. package/src/components/tableControls/PageSelect.js +109 -0
  117. package/src/components/tableControls/PageSize.js +68 -0
  118. package/src/components/tableControls/PrevPage.js +65 -0
  119. package/src/components/tableControls/Search.js +58 -0
  120. package/src/components/tableControls/ShowAll.js +34 -0
  121. package/src/components/tableControls/TableControl.js +105 -0
  122. package/src/utils/debounce.js +9 -0
  123. package/src/utils/drag.js +80 -0
  124. package/src/utils/formatTimestamp.js +27 -0
  125. package/src/utils/toTitleCase.js +9 -0
  126. package/src/utils/watchWindowSize.js +16 -0
  127. package/dist/src/utils/cli.js +0 -1
  128. package/dist/src/utils/fs-utils.js +0 -1
  129. package/docs/components/component.html +0 -90
  130. package/docs/components/directory-viewer.html +0 -90
  131. package/docs/components/lazy-component.html +0 -84
  132. package/docs/components/reactive-component.html +0 -69
  133. package/docs/components/reactive-lazy-component.html +0 -69
  134. package/docs/components/search.html +0 -102
  135. package/docs/components/sortable.html +0 -96
  136. package/src/utils/cli.js +0 -43
  137. package/src/utils/fs-utils.js +0 -41
@@ -27,9 +27,10 @@
27
27
  <h6 class="mt">JavaScript Reference</h6>
28
28
  <a href="#constructor">Constructor</a><br />
29
29
  <a href="#requirements">Requirements</a><br />
30
- <a href="#attributes">Attributes</a><br />
31
30
  <a href="#properties">Properties</a><br />
31
+ <a href="#cssCustomProperties">CSS Custom Properties</a><br />
32
32
  <a href="#methods">Methods</a><br />
33
+ <a href="#events">Events</a><br />
33
34
  </div>
34
35
  </details>
35
36
 
@@ -99,24 +100,44 @@
99
100
  <h2 id="jsRef">JavaScript Reference</h2>
100
101
 
101
102
  <h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
102
- <h6>Extends <a href="./component.html">Component</a></h6>
103
+ <h6>Extends <a href="./shadow-component.html">ShadowComponent</a></h6>
103
104
  <h5>
104
105
  <code>new Split()</code>
105
106
  </h5>
106
107
 
107
108
  <h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
108
109
  <ul>
109
- <li><a href="./component.html">Component</a></li>
110
+ <li><a href="./shadow-component.html">ShadowComponent</a></li>
110
111
  </ul>
111
112
 
112
- <h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
113
+ <h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
113
114
  <h5><code>resizing<i>: boolean</i></code></h5>
114
- <p>Indicates whether the split view is currently being resized.</p>
115
+ <p>Whether the split view is currently being resized. Syncs to <code>resizing</code> attribute.</p>
116
+ <h5><code>stacked<i>: boolean</i></code></h5>
117
+ <p>Whether the split view is in stacked mode. Syncs to <code>stacked</code> attribute.</p>
118
+ <h5><code>stackWidth<i>: number</i></code></h5>
119
+ <p>The window width threshold for stacking behavior. Syncs to <code>stack-width</code> attribute.</p>
120
+
121
+ <h3 id="cssCustomProperties"><a href="#cssCustomProperties" class="no-link">CSS Custom Properties</a></h3>
122
+ <h5><code>--left_width</code></h5>
123
+ <p>The width of the left pane. Default is <code>calc((100% - var(--handle_width)) / 2)</code>.</p>
124
+ <h5><code>--handle_width</code></h5>
125
+ <p>The width of the draggable divider handle. Default is <code>0.5rem</code>.</p>
126
+ <h5><code>--min_pane_width</code></h5>
127
+ <p>The minimum width each pane can be resized to. Default is <code>6rem</code>.</p>
115
128
 
116
129
  <h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
117
130
  <h5><code>setSize(size)<i>: void</i></code></h5>
118
131
  <p>Sets the width of the left pane.</p>
119
132
 
133
+ <h3 id="events"><a href="#events" class="no-link">Events</a></h3>
134
+ <h5><code>resizestart</code></h5>
135
+ <p>Fired when the user starts dragging the divider handle. Detail contains <code>{ startSize }</code>.</p>
136
+ <h5><code>resize</code></h5>
137
+ <p>Fired during dragging of the divider handle. Detail contains <code>{ size }</code>.</p>
138
+ <h5><code>resizeend</code></h5>
139
+ <p>Fired when the user stops dragging the divider handle. Detail contains <code>{ size }</code>.</p>
140
+
120
141
  </main>
121
142
  <div style="height:33vh"></div>
122
143
  <script type="module" src="../src/components/Import.js"></script>
@@ -57,16 +57,16 @@
57
57
  <h1 class="ta-center">Table - Pagination</h1>
58
58
  <main>
59
59
  <a href="./table.html"><h5>Back to Table Component Documentation</h5></a>
60
- <p>The table component supports pagination, enable it by giving the <code>k-table</code> a <code>enable-pages="true"</code> attribute.</p>
60
+ <p>The table component supports pagination, enable it by adding the <code>enable-pages</code> attribute to the <code>k-table</code> element.</p>
61
61
  <p>You can optionally set the page size and page size options by setting the <code>page-size</code> and <code>page-size-options</code> attributes respectively. <code>page-size-options</code> must be in the format of an array of numbers (with brackets).</p>
62
- <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-table</span><br /> <span class="hljs-attr">id</span>=<span class="hljs-string">"paginationExample"</span><br /> <span class="hljs-attr">enable-pages</span>=<span class="hljs-string">"true"</span><br /> <span class="hljs-attr">page-size</span>=<span class="hljs-string">"10"</span><br /> <span class="hljs-attr">page-size-options</span>=<span class="hljs-string">"[5,10,25,50]"</span><br />&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"d-f full"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-first-page</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-first-page</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-prev-page</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-prev-page</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-next-page</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-next-page</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-last-page</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-last-page</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"flex"</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">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-page-select</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-page-select</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"flex"</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">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-page-size</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-page-size</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-table</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/FirstPage.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/PrevPage.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/NextPage.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/LastPage.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/PageSelect.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/PageSize.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>&gt;</span><span class="javascript"><br /> <span class="hljs-keyword">import</span> Table <span class="hljs-keyword">from</span> <span class="hljs-string">'../src/components/Table.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'paginationExample'</span>).setRecords(contacts);<br /></span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
62
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-table</span><br /> <span class="hljs-attr">id</span>=<span class="hljs-string">"paginationExample"</span><br /> <span class="hljs-attr">enable-pages</span><br /> <span class="hljs-attr">page-size</span>=<span class="hljs-string">"10"</span><br /> <span class="hljs-attr">page-size-options</span>=<span class="hljs-string">"[5,10,25,50]"</span><br />&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"d-f full"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-first-page</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-first-page</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-prev-page</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-prev-page</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-next-page</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-next-page</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-last-page</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-last-page</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"flex"</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">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-page-select</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-page-select</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"flex"</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">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-page-size</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-page-size</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-table</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/FirstPage.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/PrevPage.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/NextPage.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/LastPage.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/PageSelect.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/PageSize.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>&gt;</span><span class="javascript"><br /> <span class="hljs-keyword">import</span> Table <span class="hljs-keyword">from</span> <span class="hljs-string">'../src/components/Table.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'paginationExample'</span>).setRecords(contacts);<br /></span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
63
63
  <k-table
64
64
  id="paginationExample"
65
- enable-pages="true"
65
+ enable-pages
66
66
  page-size="10"
67
67
  page-size-options="[5,10,25,50]"
68
68
  >
69
- <div class="d-f full">
69
+ <div class="d-f full" style="align-items: center;">
70
70
  <div>
71
71
  <k-tc-first-page></k-tc-first-page>
72
72
  <k-tc-prev-page></k-tc-prev-page>
@@ -60,13 +60,26 @@
60
60
  <a href="./table.html"><h5>Back to Table Component Documentation</h5></a>
61
61
 
62
62
  <p>Record filtering is a feature that allows users to filter the records displayed in the table. The table component provides a filter control that can be used to filter records based on the values in the columns. This control uses a Dialog to display the current filters and allows the user to create filters.</p>
63
- <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-table</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"recordHidingExample"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-filters</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">"top"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-filters</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-table</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/Filters.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>&gt;</span><span class="javascript"><br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'recordHidingExample'</span>).setRecords(contacts);<br /></span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
64
- <k-table id="recordHidingExample">
63
+
64
+ <h3>Basic Filtering (Case-Insensitive)</h3>
65
+ <p>By default, filters are case-insensitive. This means that filtering for "smith" will match "Smith", "SMITH", and "smith".</p>
66
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-table</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"recordFilteringExample"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-filters</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">"top"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-filters</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-table</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"../src/components/tableControls/Filters.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>&gt;</span><span class="javascript"><br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'recordFilteringExample'</span>).setRecords(contacts);<br /></span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
67
+ <k-table id="recordFilteringExample">
65
68
  <k-tc-filters slot="top"></k-tc-filters>
66
69
  </k-table>
67
70
  <script type="module" src="../src/components/tableControls/Filters.js"></script>
68
71
  <script type="module">
69
- document.getElementById('recordHidingExample').setRecords(contacts);
72
+ document.getElementById('recordFilteringExample').setRecords(contacts);
73
+ </script>
74
+
75
+ <h3>Case-Sensitive Filtering</h3>
76
+ <p>You can enable case-sensitive filtering by adding the <code>case-sensitive-filters</code> attribute. With this enabled, filtering for "smith" will only match "smith", not "Smith" or "SMITH".</p>
77
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-table</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"caseSensitiveExample"</span> <span class="hljs-attr">case-sensitive-filters</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-tc-filters</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">"top"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-tc-filters</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-table</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>&gt;</span><span class="javascript"><br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'caseSensitiveExample'</span>).setRecords(contacts);<br /></span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
78
+ <k-table id="caseSensitiveExample" case-sensitive-filters>
79
+ <k-tc-filters slot="top"></k-tc-filters>
80
+ </k-table>
81
+ <script type="module">
82
+ document.getElementById('caseSensitiveExample').setRecords(contacts);
70
83
  </script>
71
84
  </main>
72
85
  <div style="height: 33.333vh"></div>
@@ -59,10 +59,10 @@
59
59
  <a href="./table.html"><h5>Back to Table Component Documentation</h5></a>
60
60
 
61
61
  <p>The table component supports record selection. You can enable selection by setting the <code>enable-selection</code> attribute to <code>true</code>. This will add a checkbox to each row and a "Select All" checkbox to the header.</p>
62
- <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-table</span><br /> <span class="hljs-attr">id</span>=<span class="hljs-string">"recordSelectionExample"</span><br /> <span class="hljs-attr">enable-selection</span>=<span class="hljs-string">"true"</span><br />&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-table</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>&gt;</span><span class="javascript"><br /> <span class="hljs-keyword">import</span> Table <span class="hljs-keyword">from</span> <span class="hljs-string">'../src/components/Table.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'recordSelectionExample'</span>).setRecords(contacts);<br /></span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
62
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-table</span><br /> <span class="hljs-attr">id</span>=<span class="hljs-string">"recordSelectionExample"</span><br /> <span class="hljs-attr">enable-selection</span><br />&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-table</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>&gt;</span><span class="javascript"><br /> <span class="hljs-keyword">import</span> Table <span class="hljs-keyword">from</span> <span class="hljs-string">'../src/components/Table.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'recordSelectionExample'</span>).setRecords(contacts);<br /></span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
63
63
  <k-table
64
64
  id="recordSelectionExample"
65
- enable-selection="true"
65
+ enable-selection
66
66
  ></k-table>
67
67
  <script type="module">
68
68
  import Table from '../src/components/Table.js';
@@ -7,8 +7,10 @@
7
7
  <link rel="stylesheet" href="../src/kempo-vars.css" /><link rel="stylesheet" href="../kempo.min.css" />
8
8
  <link rel="stylesheet" href="../src/kempo-hljs.css" />`n <link rel="stylesheet" href="../styles.css" />
9
9
  <script type="module">
10
+ import ShadowComponent from '../src/components/ShadowComponent.js';
10
11
  import Import from '../src/components/Import.js';
11
12
  import Icon from '../src/components/Icon.js';
13
+ ShadowComponent.stylesheetPath = '../kempo.min.css';
12
14
  Import.replacements.root = '../';
13
15
  Icon.pathToIcons = ['../icons'];
14
16
  </script>
@@ -29,9 +31,9 @@
29
31
  <h6 class="mt">JavaScript Reference</h6>
30
32
  <a href="#constructor">Constructor</a><br />
31
33
  <a href="#requirements">Requirements</a><br />
32
- <a href="#attributes">Attributes</a><br />
33
34
  <a href="#properties">Properties</a><br />
34
35
  <a href="#methods">Methods</a><br />
36
+ <a href="#events">Events</a><br />
35
37
  </div>
36
38
  </details>
37
39
 
@@ -135,17 +137,24 @@
135
137
 
136
138
  <h2 id="jsRef">JavaScript Reference</h2>
137
139
  <h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
138
- <h6>Extends <a href="./component.html">Component</a></h6>
140
+ <h6>Extends <a href="./shadow-component.html">ShadowComponent</a></h6>
139
141
  <h5><code>new Tabs()</code></h5>
142
+
140
143
  <h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
141
144
  <ul>
142
- <li><a href="./component.html">Component</a></li>
145
+ <li><a href="./shadow-component.html">ShadowComponent</a></li>
143
146
  </ul>
144
- <h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
147
+
148
+ <h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
145
149
  <h5><code>active<i>: string</i></code></h5>
146
- <p>The name of the active tab.</p>
147
- <h5><code>fixed-height<i>: boolean</i></code></h5>
148
- <p>When true, the tabs component will fill its container height and enable content scrolling.</p>
150
+ <p>The name of the active tab. Syncs to <code>active</code> attribute.</p>
151
+ <h5><code>fixedHeight<i>: boolean</i></code></h5>
152
+ <p>Whether the tabs component uses fixed height mode. Syncs to <code>fixed-height</code> attribute.</p>
153
+ <h5><code>contents<i>: TabContent[]</i></code></h5>
154
+ <p>Returns an array of all tab content elements.</p>
155
+ <h5><code>tabs<i>: Tab[]</i></code></h5>
156
+ <p>Returns an array of all tab elements.</p>
157
+
149
158
  <h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
150
159
  <h5><code>getActiveTab()<i>: Tab</i></code></h5>
151
160
  <p>Returns the currently active tab.</p>
@@ -155,6 +164,14 @@
155
164
  <p>Returns the currently active tab content.</p>
156
165
  <h5><code>getContent(id)<i>: TabContent</i></code></h5>
157
166
  <p>Returns the tab content with the specified id.</p>
167
+ <h5><code>updateActiveElements()<i>: void</i></code></h5>
168
+ <p>Updates the active state of tabs and content based on the current active property.</p>
169
+ <h5><code>updateScrollIndicators()<i>: void</i></code></h5>
170
+ <p>Updates the visibility of scroll indicators based on tab overflow.</p>
171
+
172
+ <h3 id="events"><a href="#events" class="no-link">Events</a></h3>
173
+ <h5><code>tab</code></h5>
174
+ <p>Fired when the active tab changes. Detail contains <code>{ tab }</code> with the name of the new active tab.</p>
158
175
  </main>
159
176
  <div style="height:33vh"></div>
160
177
  <script type="module" src="../src/components/Tabs.js"></script>
@@ -7,8 +7,10 @@
7
7
  <link rel="stylesheet" href="../src/kempo-vars.css" /><link rel="stylesheet" href="../kempo.min.css" />
8
8
  <link rel="stylesheet" href="../src/kempo-hljs.css" />`n <link rel="stylesheet" href="../styles.css" />
9
9
  <script type="module">
10
+ import ShadowComponent from '../src/components/ShadowComponent.js';
10
11
  import Import from '../src/components/Import.js';
11
12
  import Icon from '../src/components/Icon.js';
13
+ ShadowComponent.stylesheetPath = '../kempo.min.css';
12
14
  Import.replacements.root = '../';
13
15
  Icon.pathToIcons = ['../icons'];
14
16
  </script>
@@ -28,14 +30,14 @@
28
30
  <h6 class="mt">JavaScript Reference</h6>
29
31
  <a href="#constructor">Constructor</a><br />
30
32
  <a href="#requirements">Requirements</a><br />
31
- <a href="#attributes">Attributes</a><br />
32
33
  <a href="#properties">Properties</a><br />
33
34
  <a href="#methods">Methods</a><br />
35
+ <a href="#events">Events</a><br />
34
36
  </div>
35
37
  </details>
36
38
 
37
39
  <h3>Description</h3>
38
- <p>The <code>Tags</code> component allows users to add and remove tags. It extends the <a href="./component.html">Component</a> class.</p>
40
+ <p>The <code>Tags</code> component allows users to add and remove tags. It extends the <a href="./shadow-component.html">ShadowComponent</a> class.</p>
39
41
 
40
42
  <h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
41
43
  <p>Use the <code>Tags</code> component to allow users to add and remove tags. Tags can be added by typing them into the input field and pressing Enter or by pasting a comma-separated list of tags. You can delete a tag by clicking on it.</p>
@@ -61,23 +63,23 @@
61
63
  <h2 id="jsRef">JavaScript Reference</h2>
62
64
 
63
65
  <h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
64
- <h6>Extends <a href="./component.html">Component</a></h6>
66
+ <h6>Extends <a href="./shadow-component.html">ShadowComponent</a></h6>
65
67
  <h5>
66
68
  <code>new Tags()</code>
67
69
  </h5>
68
70
 
69
71
  <h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
70
72
  <ul>
71
- <li><a href="./component.html">Component</a></li>
73
+ <li><a href="./shadow-component.html">ShadowComponent</a></li>
72
74
  </ul>
73
75
 
74
- <h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
76
+ <h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
75
77
  <h5><code>value<i>: string</i></code></h5>
76
- <p>A comma-separated list of tags.</p>
78
+ <p>A comma-separated list of tags. Syncs with the <code>value</code> attribute.</p>
77
79
  <h5><code>allowedTags<i>: string</i></code></h5>
78
- <p>A comma-separated list of allowed tags. If specified, only these tags can be added.</p>
80
+ <p>A comma-separated list of allowed tags. If specified, only these tags can be added. Syncs with the <code>allowed-tags</code> attribute.</p>
79
81
  <h5><code>disallowedTags<i>: string</i></code></h5>
80
- <p>A comma-separated list of disallowed tags. If specified, these tags cannot be added.</p>
82
+ <p>A comma-separated list of disallowed tags. If specified, these tags cannot be added. Syncs with the <code>disallowed-tags</code> attribute.</p>
81
83
 
82
84
  <h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
83
85
  <h5><code>addTag(tag)<i>: void</i></code></h5>
@@ -86,6 +88,20 @@
86
88
  <p>Removes a tag from the list of tags.</p>
87
89
  <h5><code>validateTags()<i>: string</i></code></h5>
88
90
  <p>Validates the list of tags against the allowed and disallowed tags and returns the valid tags as a comma-separated string.</p>
91
+ <h5><code>renderTags()<i>: Promise&lt;void&gt;</i></code></h5>
92
+ <p>Re-renders the tag elements in the component.</p>
93
+
94
+ <h3 id="events"><a href="#events" class="no-link">Events</a></h3>
95
+ <h5><code>change</code></h5>
96
+ <p>Fired when the value changes. Detail contains <code>{ oldValue, newValue }</code>.</p>
97
+ <h5><code>addtag</code></h5>
98
+ <p>Fired when a tag is added. Detail contains <code>{ tag }</code>.</p>
99
+ <h5><code>removetag</code></h5>
100
+ <p>Fired when a tag is removed. Detail contains <code>{ tag }</code>.</p>
101
+ <h5><code>allowedtagschange</code></h5>
102
+ <p>Fired when the allowed tags list changes. Detail contains <code>{ oldValue, newValue }</code>.</p>
103
+ <h5><code>disallowedtagschange</code></h5>
104
+ <p>Fired when the disallowed tags list changes. Detail contains <code>{ oldValue, newValue }</code>.</p>
89
105
 
90
106
  </main>
91
107
  <script type="module" src="../src/components/Import.js"></script>
@@ -7,8 +7,10 @@
7
7
  <link rel="stylesheet" href="../src/kempo-vars.css" /><link rel="stylesheet" href="../kempo.min.css" />
8
8
  <link rel="stylesheet" href="../src/kempo-hljs.css" />`n <link rel="stylesheet" href="../styles.css" />
9
9
  <script type="module">
10
+ import ShadowComponent from '../src/components/ShadowComponent.js';
10
11
  import Import from '../src/components/Import.js';
11
12
  import Icon from '../src/components/Icon.js';
13
+ ShadowComponent.stylesheetPath = '../kempo.min.css';
12
14
  Import.replacements.root = '../';
13
15
  Icon.pathToIcons = ['../icons'];
14
16
  </script>
@@ -27,7 +29,6 @@
27
29
  <h6 class="mt">JavaScript Reference</h6>
28
30
  <a href="#constructor">Constructor</a><br />
29
31
  <a href="#requirements">Requirements</a><br />
30
- <a href="#attributes">Attributes</a><br />
31
32
  <a href="#properties">Properties</a><br />
32
33
  <a href="#cssCustomProperties">CSS Custom Properties</a><br />
33
34
  <a href="#methods">Methods</a><br />
@@ -85,13 +86,9 @@
85
86
  <li><a href="./icon.html">Icon</a></li>
86
87
  </ul>
87
88
 
88
- <h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
89
- <h5><code>current-theme<i>: string</i></code></h5>
90
- <p>Reflects the current theme state. Possible values are <code>"auto"</code>, <code>"light"</code>, or <code>"dark"</code>. This attribute is automatically updated when the theme changes.</p>
91
-
92
89
  <h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
93
90
  <h5><code>currentTheme<i>: string</i></code></h5>
94
- <p>Gets or sets the current theme. Possible values are <code>"auto"</code>, <code>"light"</code>, or <code>"dark"</code>. This property is reactive and will trigger a re-render when changed.</p>
91
+ <p>Gets or sets the current theme. Possible values are <code>"auto"</code>, <code>"light"</code>, or <code>"dark"</code>. This property is reactive and will trigger a re-render when changed. Syncs to <code>current-theme</code> attribute.</p>
95
92
 
96
93
  <h3 id="cssCustomProperties"><a href="#cssCustomProperties" class="no-link">CSS Custom Properties</a></h3>
97
94
  <h5><code>--padding<i>: length</i></code></h5>
@@ -7,8 +7,10 @@
7
7
  <link rel="stylesheet" href="../src/kempo-vars.css" /><link rel="stylesheet" href="../kempo.min.css" />
8
8
  <link rel="stylesheet" href="../src/kempo-hljs.css" />`n <link rel="stylesheet" href="../styles.css" />
9
9
  <script type="module">
10
+ import ShadowComponent from '../src/components/ShadowComponent.js';
10
11
  import Import from '../src/components/Import.js';
11
12
  import Icon from '../src/components/Icon.js';
13
+ ShadowComponent.stylesheetPath = '../kempo.min.css';
12
14
  Import.replacements.root = '../';
13
15
  Icon.pathToIcons = ['../icons'];
14
16
  </script>
@@ -27,59 +29,53 @@
27
29
  <h6 class="mt">JavaScript Reference</h6>
28
30
  <a href="#constructor">Constructor</a><br />
29
31
  <a href="#requirements">Requirements</a><br />
30
- <a href="#attributes">Attributes</a><br />
31
32
  <a href="#properties">Properties</a><br />
32
33
  <a href="#methods">Methods</a><br />
33
34
  </div>
34
35
  </details>
35
36
 
36
37
  <h3>Description</h3>
37
- <p>The <code>Timestamp</code> component displays a formatted timestamp. It extends the <a href="./component.html">Component</a> class.</p>
38
+ <p>The <code>Timestamp</code> component displays a formatted timestamp using custom format tokens. It extends the ShadowComponent class for encapsulated styling.</p>
38
39
 
39
40
  <h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
40
- <p>Use the <code>Timestamp</code> component to display a formatted timestamp. The component will automatically format the timestamp based on the provided locale or the user's current locale if no locale is provided.</p>
41
+ <p>Use the <code>Timestamp</code> component to display a formatted timestamp. The component will automatically format the timestamp using the default format or a custom format with tokens.</p>
41
42
  <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-timestamp</span> <span class="hljs-attr">timestamp</span>=<span class="hljs-string">"1633024800000"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-timestamp</span>&gt;</span></code></pre>
42
43
  <k-timestamp timestamp="1633024800000"></k-timestamp>
43
44
 
44
45
  <h3 id="customFormat"><a href="#customFormat" class="no-link">Custom Format</a></h3>
45
- <p>Use the <code>format</code> attribute to specify a custom format for the timestamp. The format should be a string like <code>YYYY-MM-DD hh:mm:ss:iiii</code>.</p>
46
- <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-timestamp</span> <span class="hljs-attr">timestamp</span>=<span class="hljs-string">"1633024800000"</span> <span class="hljs-attr">format</span>=<span class="hljs-string">"YYYY-MM-DD hh:mm:ss"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-timestamp</span>&gt;</span></code></pre>
47
- <k-timestamp timestamp="1633024800000" format="YYYY-MM-DD hh:mm:ss"></k-timestamp>
46
+ <p>Use the <code>format</code> attribute to specify a custom format using tokens like <code>YYYY</code> (4-digit year), <code>MM</code> (2-digit month), <code>DD</code> (2-digit day), <code>hh</code> (2-digit hour), <code>mm</code> (2-digit minute), and <code>ss</code> (2-digit second).</p>
47
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-timestamp</span> <span class="hljs-attr">timestamp</span>=<span class="hljs-string">"1633024800000"</span> <span class="hljs-attr">format</span>=<span class="hljs-string">"MM/DD/YYYY"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-timestamp</span>&gt;</span></code></pre>
48
+ <k-timestamp timestamp="1633024800000" format="MM/DD/YYYY"></k-timestamp>
49
+
50
+ <h3 id="timeFormat"><a href="#timeFormat" class="no-link">Time Format</a></h3>
51
+ <p>Display time with custom formatting using hour, minute, and second tokens.</p>
52
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-timestamp</span> <span class="hljs-attr">timestamp</span>=<span class="hljs-string">"1633024800000"</span> <span class="hljs-attr">format</span>=<span class="hljs-string">"hh:mm:ss"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-timestamp</span>&gt;</span></code></pre>
53
+ <k-timestamp timestamp="1633024800000" format="hh:mm:ss"></k-timestamp>
48
54
 
49
55
  <h2 id="jsRef">JavaScript Reference</h2>
50
56
 
51
57
  <h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
52
- <h6>Extends <a href="./component.html">Component</a></h6>
53
- <h5>
54
- <code>new Timestamp(timestamp, format, locale)</code>
55
- </h5>
56
-
57
- <h4>Parameters</h4>
58
- <h5><code>timestamp<i>: number</i></code></h5>
59
- <p>The timestamp to be formatted and displayed.</p>
60
- <h5><code>format<i>: string</i></code></h5>
61
- <p>The format to be used for formatting the timestamp. If not provided, the user's current locale format will be used.</p>
62
- <h5><code>locale<i>: string</i></code></h5>
63
- <p>The locale to be used for formatting the timestamp. If not provided, the user's current locale will be used.</p>
58
+ <h6>Extends ShadowComponent</h6>
64
59
 
65
60
  <h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
66
61
  <ul>
67
- <li><a href="./component.html">Component</a></li>
62
+ <li>ShadowComponent</li>
68
63
  <li><a href="../utils/formatTimestamp.js">formatTimestamp Utility Function</a></li>
69
64
  </ul>
70
65
 
71
- <h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
66
+ <h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
72
67
  <h5><code>timestamp<i>: number</i></code></h5>
73
- <p>The timestamp to be formatted and displayed.</p>
68
+ <p>The timestamp to be formatted and displayed. Syncs to <code>timestamp</code> attribute.</p>
74
69
  <h5><code>format<i>: string</i></code></h5>
75
- <p>The format to be used for formatting the timestamp. If not provided, the user's current locale format will be used.</p>
70
+ <p>The format to be used for formatting the timestamp using tokens like YYYY, MM, DD, hh, mm, ss. If not provided, uses the default format. Syncs to <code>format</code> attribute.</p>
76
71
  <h5><code>locale<i>: string</i></code></h5>
77
- <p>The locale to be used for formatting the timestamp. If not provided, the user's current locale will be used.</p>
72
+ <p>The locale to be used for formatting the timestamp. Syncs to <code>locale</code> attribute.</p>
78
73
 
79
74
  <h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
80
- <p>The <code>Timestamp</code> class does not introduce any new methods beyond those provided by the <a href="./component.html">Component</a> class.</p>
75
+ <p>The <code>Timestamp</code> class does not introduce any new methods beyond those provided by the ShadowComponent class.</p>
81
76
 
82
77
  </main>
78
+ <div style="height:33vh"></div>
83
79
  <script type="module" src="../src/components/Import.js"></script>
84
80
  <script type="module" src="../src/components/Timestamp.js"></script>
85
81
  </body>