kempo 2.9.2 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/components/Accordion.js +1 -1
  2. package/dist/components/Dialog.js +1 -1
  3. package/dist/components/DirectoryViewer.js +1 -1
  4. package/dist/components/FocusCapture.js +1 -1
  5. package/dist/components/Icon.js +1 -1
  6. package/dist/components/Search.js +1 -1
  7. package/dist/components/Table.js +1 -1
  8. package/dist/components/Timestamp.js +1 -1
  9. package/dist/components/Toggle.js +1 -1
  10. package/dist/components/tableControls/DeleteSelected.js +1 -1
  11. package/dist/components/tableControls/Edit.js +1 -0
  12. package/dist/components/tableControls/Filters.js +1 -0
  13. package/dist/components/tableControls/HiddenCount.js +1 -0
  14. package/dist/components/tableControls/Hide.js +1 -0
  15. package/dist/components/tableControls/PageSelect.js +1 -1
  16. package/dist/components/tableControls/PageSize.js +1 -1
  17. package/dist/components/tableControls/ShowAll.js +1 -0
  18. package/dist/index.js +1 -1
  19. package/dist/kempo-styles.css +1 -1
  20. package/dist/kempo-vars.css +1 -1
  21. package/dist/utils/formatTimestamp.js +1 -1
  22. package/docs/components/_template.html +9 -0
  23. package/docs/components/accordion.html +52 -12
  24. package/docs/components/card.html +68 -8
  25. package/docs/components/component.html +6 -0
  26. package/docs/components/content-slider.html +8 -0
  27. package/docs/components/dialog.html +145 -5
  28. package/docs/components/directory-viewer.html +51 -40
  29. package/docs/components/focus-capture.html +68 -0
  30. package/docs/components/icon.html +76 -5
  31. package/docs/components/import.html +47 -0
  32. package/docs/components/lazy-component.html +45 -15
  33. package/docs/components/reactive-component.html +69 -0
  34. package/docs/components/reactive-lazy-component.html +69 -0
  35. package/docs/components/resize.html +52 -3
  36. package/docs/components/search.html +102 -0
  37. package/docs/components/show-more.html +54 -5
  38. package/docs/components/{sidemenu.html → side-menu.html} +56 -3
  39. package/docs/components/split.html +57 -16
  40. package/docs/components/table.html +90 -189
  41. package/docs/components/tableControls.html +91 -0
  42. package/docs/components/tableCustomFields.html +112 -0
  43. package/docs/components/tablePagination.html +92 -0
  44. package/docs/components/tableRecordEditing.html +144 -0
  45. package/docs/components/tableRecordFiltering.html +82 -0
  46. package/docs/components/tableRecordHiding.html +84 -0
  47. package/docs/components/tableRecordSelection.html +86 -0
  48. package/docs/components/tableRowControls.html +103 -0
  49. package/docs/components/tabs.html +72 -4
  50. package/docs/components/tags.html +94 -0
  51. package/docs/components/theme-switcher.html +74 -0
  52. package/docs/components/timestamp.html +86 -0
  53. package/docs/components/toggle.html +37 -34
  54. package/docs/icons/check.svg +1 -0
  55. package/docs/icons/hide.svg +1 -0
  56. package/docs/icons/show.svg +1 -0
  57. package/docs/index.html +5 -0
  58. package/docs/kempo/components/Accordion.js +1 -1
  59. package/docs/kempo/components/Dialog.js +1 -1
  60. package/docs/kempo/components/DirectoryViewer.js +1 -1
  61. package/docs/kempo/components/FocusCapture.js +1 -1
  62. package/docs/kempo/components/Icon.js +1 -1
  63. package/docs/kempo/components/Search.js +1 -1
  64. package/docs/kempo/components/Table.js +1 -1
  65. package/docs/kempo/components/Timestamp.js +1 -1
  66. package/docs/kempo/components/Toggle.js +1 -1
  67. package/docs/kempo/components/tableControls/DeleteSelected.js +1 -1
  68. package/docs/kempo/components/tableControls/Edit.js +1 -0
  69. package/docs/kempo/components/tableControls/Filters.js +1 -0
  70. package/docs/kempo/components/tableControls/HiddenCount.js +1 -0
  71. package/docs/kempo/components/tableControls/Hide.js +1 -0
  72. package/docs/kempo/components/tableControls/PageSelect.js +1 -1
  73. package/docs/kempo/components/tableControls/PageSize.js +1 -1
  74. package/docs/kempo/components/tableControls/ShowAll.js +1 -0
  75. package/docs/kempo/index.js +1 -1
  76. package/docs/kempo/kempo-styles.css +1 -1
  77. package/docs/kempo/kempo-vars.css +1 -1
  78. package/docs/kempo/utils/formatTimestamp.js +1 -1
  79. package/docs/nav-1.inc.html +16 -2
  80. package/docs/nav.inc.html +10 -2
  81. package/docs/search.json +281 -23
  82. package/docs/styles/_template.html +6 -0
  83. package/docs/styles/borders-spacing.html +6 -0
  84. package/docs/styles/buttons.html +6 -0
  85. package/docs/styles/colors.html +6 -0
  86. package/docs/styles/displays-layouts.html +6 -0
  87. package/docs/styles/embed-1.html +6 -0
  88. package/docs/styles/inputs.html +6 -0
  89. package/docs/styles/tables.html +6 -0
  90. package/docs/styles/typography.html +6 -0
  91. package/docs/{components/stacks.html → utils/_template.html} +11 -30
  92. package/docs/utils/cli.html +84 -0
  93. package/docs/utils/cookie.html +87 -0
  94. package/docs/utils/debounce.html +61 -0
  95. package/docs/utils/drag.html +85 -0
  96. package/docs/utils/element.html +124 -0
  97. package/docs/utils/format-timestamp.html +64 -0
  98. package/docs/utils/fuzzy-match.html +60 -0
  99. package/icons/check.svg +1 -0
  100. package/icons/hide.svg +1 -0
  101. package/icons/show.svg +1 -0
  102. package/package.json +1 -1
  103. package/src/components/Accordion.js +0 -1
  104. package/src/components/Dialog.js +15 -6
  105. package/src/components/DirectoryViewer.js +21 -92
  106. package/src/components/FocusCapture.js +2 -1
  107. package/src/components/Icon.js +3 -1
  108. package/src/components/Search.js +4 -1
  109. package/src/components/Table.js +469 -139
  110. package/src/components/Timestamp.js +7 -4
  111. package/src/components/Toggle.js +3 -0
  112. package/src/components/tableControls/DeleteSelected.js +36 -22
  113. package/src/components/tableControls/Edit.js +88 -0
  114. package/src/components/tableControls/Filters.js +128 -0
  115. package/src/components/tableControls/HiddenCount.js +42 -0
  116. package/src/components/tableControls/Hide.js +43 -0
  117. package/src/components/tableControls/PageSelect.js +54 -30
  118. package/src/components/tableControls/PageSize.js +33 -16
  119. package/src/components/tableControls/ShowAll.js +40 -0
  120. package/src/kempo-styles.css +7 -0
  121. package/src/kempo-vars.css +2 -0
  122. package/src/utils/formatTimestamp.js +26 -10
  123. package/docs/table.html +0 -0
  124. package/src/components/Stacks.js +0 -79
  125. package/src/utils/files.js +0 -15
@@ -6,6 +6,12 @@
6
6
  <title>Accordion - Components - Kempo Docs - A Web Components Solution</title>
7
7
  <link rel="stylesheet" href="../kempo/kempo-vars.css" /><link rel="stylesheet" href="../kempo/kempo-styles.css" />
8
8
  <link rel="stylesheet" href="../kempo/kempo-hljs.css" />
9
+ <script type="module">
10
+ import Icon from '../kempo/components/Icon.js';
11
+ import Search from '../kempo/components/Search.js';
12
+ Icon.pathToIcons = ['../icons'];
13
+ Search.searchDataUrl = '../search.json';
14
+ </script>
9
15
  </head>
10
16
  <body>
11
17
  <k-import src="../nav-1.inc.html"></k-import>
@@ -16,7 +22,10 @@
16
22
  >
17
23
  <summary class="p">Table of Contents</summary>
18
24
  <div class="m mt0 pl">
25
+ <h6>Examples</h6>
19
26
  <a href="#basicUsage">Basic Usage</a><br />
27
+ <a href="#defaultOpen">Default Open Panel</a><br />
28
+ <h6 class="mt">JavaScript Reference</h6>
20
29
  <a href="#constructor">Constructor</a><br />
21
30
  <a href="#requirements">Requirements</a><br />
22
31
  <a href="#attributes">Attributes</a><br />
@@ -29,6 +38,7 @@
29
38
  <p>A widget that allows a single panel of content to be opened and closed.</p>
30
39
 
31
40
  <h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
41
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-accordion</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-header</span> <span class="hljs-attr">for-panel</span>=<span class="hljs-string">"panel1"</span>&gt;</span>Panel 1<span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-header</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-panel</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"panel1"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"m"</span>&gt;</span>Panel 1 content<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-panel</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-header</span> <span class="hljs-attr">for-panel</span>=<span class="hljs-string">"panel2"</span>&gt;</span>Panel 2<span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-header</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-panel</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"panel2"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"m"</span>&gt;</span>Panel 2 content<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-panel</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-header</span> <span class="hljs-attr">for-panel</span>=<span class="hljs-string">"panel3"</span>&gt;</span>Panel 3<span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-header</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-panel</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"panel3"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"m"</span>&gt;</span>Panel 3 content<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-panel</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion</span>&gt;</span></code></pre>
32
42
  <k-accordion
33
43
  class="mb"
34
44
  >
@@ -46,7 +56,27 @@
46
56
  </k-accordion-panel>
47
57
  </k-accordion>
48
58
 
49
- <h2 id="jsRef">JavaScript Refrerence</h2>
59
+ <h3 id="defaultOpen"><a href="#defaultOpen" class="no-link">Default Open Panel</a></h3>
60
+ <p>You can have a panel open by default by setting the <code>active</code> attribute to <code>true</code> on both the header and the panel.</p>
61
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-accordion</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-header</span> <span class="hljs-attr">for-panel</span>=<span class="hljs-string">"panel1"</span> <span class="hljs-attr">active</span>=<span class="hljs-string">"true"</span>&gt;</span>Panel 1<span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-header</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-panel</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"panel1"</span> <span class="hljs-attr">active</span>=<span class="hljs-string">"true"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"m"</span>&gt;</span>Panel 1 content<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-panel</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-header</span> <span class="hljs-attr">for-panel</span>=<span class="hljs-string">"panel2"</span>&gt;</span>Panel 2<span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-header</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-panel</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"panel2"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"m"</span>&gt;</span>Panel 2 content<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-panel</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-header</span> <span class="hljs-attr">for-panel</span>=<span class="hljs-string">"panel3"</span>&gt;</span>Panel 3<span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-header</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">k-accordion-panel</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"panel3"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"m"</span>&gt;</span>Panel 3 content<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span><br /> <span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion-panel</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-accordion</span>&gt;</span></code></pre>
62
+ <k-accordion
63
+ class="mb"
64
+ >
65
+ <k-accordion-header for-panel="panel1" active="true">Panel 1</k-accordion-header>
66
+ <k-accordion-panel name="panel1" active="true">
67
+ <p class="m">Panel 1 content</p>
68
+ </k-accordion-panel>
69
+ <k-accordion-header for-panel="panel2">Panel 2</k-accordion-header>
70
+ <k-accordion-panel name="panel2">
71
+ <p class="m">Panel 2 content</p>
72
+ </k-accordion-panel>
73
+ <k-accordion-header for-panel="panel3">Panel 3</k-accordion-header>
74
+ <k-accordion-panel name="panel3">
75
+ <p class="m">Panel 3 content</p>
76
+ </k-accordion-panel>
77
+ </k-accordion>
78
+
79
+ <h2 id="jsRef">JavaScript Reference</h2>
50
80
 
51
81
  <h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
52
82
  <h6>Extends <a href="./component.html">Component</a></h6>
@@ -54,26 +84,36 @@
54
84
  <code>new Accordion()</code><br />
55
85
  </h5>
56
86
 
57
- <h4>Paramters</h4>
58
- <h5><code>param<i>: type</i></code></h5>
59
- <p>param_description</p>
60
-
61
87
  <h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
62
88
  <ul>
63
- <li><a href=""></a></li>
89
+ <li><a href="../utils/element.html">utils/element.js</a></li>
64
90
  </ul>
65
91
 
66
92
  <h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
67
- <h5><code>attr<i>: type</i></code></h5>
68
- <p>attr_description</p>
93
+ <h5><code>forPanel: string</code></h5>
94
+ <p>Specifies the panel associated with the header.</p>
95
+ <h5><code>active: boolean</code></h5>
96
+ <p>Indicates whether the panel or header is active.</p>
97
+ <h5><code>transitioning: boolean</code></h5>
98
+ <p>Indicates whether the panel is in the process of transitioning.</p>
69
99
 
70
100
  <h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
71
- <h5><code>prop<i>: type</i></code></h5>
72
- <p>prop_description</p>
101
+ <h5><code>activeHeader: HTMLElement</code></h5>
102
+ <p>Returns the currently active header element.</p>
103
+ <h5><code>activePanel: HTMLElement</code></h5>
104
+ <p>Returns the currently active panel element.</p>
73
105
 
74
106
  <h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
75
- <h5><code>method(<i>type<i> arg)<i>: return_type</i></code></h5>
76
- <p>method_description</p>
107
+ <h5><code>getHeader(panelName: string): HTMLElement</code></h5>
108
+ <p>Returns the header element associated with the specified panel name.</p>
109
+ <h5><code>getPanel(panelName: string): HTMLElement</code></h5>
110
+ <p>Returns the panel element associated with the specified panel name.</p>
111
+ <h5><code>openPanel(panelName: string): void</code></h5>
112
+ <p>Opens the panel associated with the specified panel name.</p>
113
+ <h5><code>closePanel(panelName: string): void</code></h5>
114
+ <p>Closes the panel associated with the specified panel name.</p>
115
+ <h5><code>togglePanel(panelName: string): void</code></h5>
116
+ <p>Toggles the panel associated with the specified panel name.</p>
77
117
 
78
118
  </main>
79
119
  <script type="module" src="../kempo/components/Import.js"></script>
@@ -6,22 +6,82 @@
6
6
  <title>Card - Components - Kempo Docs - A Web Components Solution</title>
7
7
  <link rel="stylesheet" href="../kempo/kempo-vars.css" /><link rel="stylesheet" href="../kempo/kempo-styles.css" />
8
8
  <link rel="stylesheet" href="../kempo/kempo-hljs.css" />
9
+ <script type="module">
10
+ import Icon from '../kempo/components/Icon.js';
11
+ import Search from '../kempo/components/Search.js';
12
+ Icon.pathToIcons = ['../icons'];
13
+ Search.searchDataUrl = '../search.json';
14
+ </script>
9
15
  </head>
10
16
  <body>
11
17
  <k-import src="../nav-1.inc.html"></k-import>
12
18
  <h1 class="ta-center">Card</h1>
13
19
  <main>
20
+ <details class="b r mb">
21
+ <summary class="p">Table of Contents</summary>
22
+ <div class="m mt0 pl">
23
+ <h6>Examples</h6>
24
+ <a href="#basicUsage">Basic Usage</a><br />
25
+
26
+ <h6 class="mt">JavaScript Reference</h6>
27
+ <a href="#constructor">Constructor</a><br />
28
+ <a href="#requirements">Requirements</a><br />
29
+ <a href="#attributes">Attributes</a><br />
30
+ <a href="#properties">Properties</a><br />
31
+ <a href="#methods">Methods</a><br />
32
+ </div>
33
+ </details>
34
+
14
35
  <p>A card is a "box" around some content with a border, padding and margins that make it stand out.</p>
15
- <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-card</span>&gt;</span><br /> This is a card<br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-card</span>&gt;</span></code></pre>
16
- <k-card>
17
- This is a card
18
- </k-card>
36
+ <div class="row -mx mb">
37
+ <div class="col d-span-6 m-span-12 px">
38
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-card</span>&gt;</span><br /> This is a card<br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-card</span>&gt;</span></code></pre>
39
+ </div>
40
+ <div class="col d-span-6 m-span-12 px">
41
+ <k-card>
42
+ This is a card
43
+ </k-card>
44
+ </div>
45
+ </div>
19
46
 
20
- <h3>Labels</h3>
47
+ <h3 id="labels"><a href="#labels" class="no-link">Labels</a></h3>
21
48
  <p>A label gives some text in a box on the top border of the card, helping identify the purpose of the contents.</p>
22
- <k-card label="I'm a Label">
23
- This is a card
24
- </k-card>
49
+ <div class="row -mx mb">
50
+ <div class="col d-span-6 m-span-12 px">
51
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-card</span> <span class="hljs-attr">label</span>=<span class="hljs-string">"I'm a Label"</span>&gt;</span><br /> This is a card<br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-card</span>&gt;</span></code></pre>
52
+ </div>
53
+ <div class="col d-span-6 m-span-12 px">
54
+ <k-card label="I'm a Label">
55
+ This is a card
56
+ </k-card>
57
+ </div>
58
+ </div>
59
+
60
+ <h2 id="jsRef">JavaScript Reference</h2>
61
+
62
+ <h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
63
+ <h6>Extends <a href="./component.html">Component</a></h6>
64
+ <h5>
65
+ <code>new Card()</code><br />
66
+ <code>new Card(<i>string</i> label)</code>
67
+ </h5>
68
+
69
+ <h4>Parameters</h4>
70
+ <h5><code>label<i>: string</i></code></h5>
71
+ <p>The label for the card.</p>
72
+
73
+ <h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
74
+ <ul>
75
+ <li><a href="./component.html">Component</a></li>
76
+ </ul>
77
+
78
+ <h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
79
+ <h5><code>label<i>: string</i></code></h5>
80
+ <p>The label for the card.</p>
81
+
82
+ <h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
83
+ <h5><code>setLabel(<i>string</i> label)<i>: void</i></code></h5>
84
+ <p>Sets the label for the card.</p>
25
85
 
26
86
  </main>
27
87
  <div style="height:33vh"></div>
@@ -6,6 +6,12 @@
6
6
  <title>Component - Components - Kempo Docs - A Web Components Solution</title>
7
7
  <link rel="stylesheet" href="../kempo/kempo-vars.css" /><link rel="stylesheet" href="../kempo/kempo-styles.css" />
8
8
  <link rel="stylesheet" href="../kempo/kempo-hljs.css" />
9
+ <script type="module">
10
+ import Icon from '../kempo/components/Icon.js';
11
+ import Search from '../kempo/components/Search.js';
12
+ Icon.pathToIcons = ['../icons'];
13
+ Search.searchDataUrl = '../search.json';
14
+ </script>
9
15
  </head>
10
16
  <body>
11
17
  <k-import src="../nav-1.inc.html"></k-import>
@@ -6,6 +6,12 @@
6
6
  <title>Content Slider - Components - Kempo Docs - A Web Components Solution</title>
7
7
  <link rel="stylesheet" href="../kempo/kempo-vars.css" /><link rel="stylesheet" href="../kempo/kempo-styles.css" />
8
8
  <link rel="stylesheet" href="../kempo/kempo-hljs.css" />
9
+ <script type="module">
10
+ import Icon from '../kempo/components/Icon.js';
11
+ import Search from '../kempo/components/Search.js';
12
+ Icon.pathToIcons = ['../icons'];
13
+ Search.searchDataUrl = '../search.json';
14
+ </script>
9
15
  </head>
10
16
  <body>
11
17
  <k-import src="../nav-1.inc.html"></k-import>
@@ -16,11 +22,13 @@
16
22
  >
17
23
  <summary class="p">Table of Contents</summary>
18
24
  <div class="m mt0 pl">
25
+ <h6>Examples</h6>
19
26
  <a href="#basicUsage">Basic Usage</a><br />
20
27
  <a href="#keyboardControls">Keyboard Controls</a><br />
21
28
  <a href="#globalControls">Global Controls</a><br />
22
29
  <a href="#controls">Controls</a><br />
23
30
  <a href="#loop">Loop</a><br />
31
+ <h6 class="mt">JavaScript Reference</h6>
24
32
  <a href="#constructor">Constructor</a><br />
25
33
  <a href="#requirements">Requirements</a><br />
26
34
  <a href="#attributes">Attributes</a><br />
@@ -6,21 +6,46 @@
6
6
  <title>Dialog - Components - Kempo Docs - A Web Components Solution</title>
7
7
  <link rel="stylesheet" href="../kempo/kempo-vars.css" /><link rel="stylesheet" href="../kempo/kempo-styles.css" />
8
8
  <link rel="stylesheet" href="../kempo/kempo-hljs.css" />
9
+ <script type="module">
10
+ import Icon from '../kempo/components/Icon.js';
11
+ import Search from '../kempo/components/Search.js';
12
+ Icon.pathToIcons = ['../icons'];
13
+ Search.searchDataUrl = '../search.json';
14
+ </script>
9
15
  </head>
10
16
  <body>
11
17
  <k-import src="../nav-1.inc.html"></k-import>
12
18
  <main>
13
19
  <h1 class="ta-center">Dialog</h1>
14
20
 
15
- <h5>Basic Dialog</h5>
16
- <p>Create dialogs using the <code>k-dialog</code> component. Open the dialog by calling the <code>open()</code> method, and close it by calling the <code>close()</code> method. Or it can closed using the dialogs GUI (clicking the overlay, clicking the close button, or the cancel or confirm action buttons).</p>
21
+ <details class="b r mb">
22
+ <summary class="p">Table of Contents</summary>
23
+ <div class="m mt0 pl">
24
+ <h6>Examples</h6>
25
+ <a href="#basicUsage">Basic Usage</a><br />
26
+ <a href="#titles">Titles</a><br />
27
+ <a href="#actionButtons">Action Buttons</a><br />
28
+ <a href="#jsUsage">JavaScript Usage</a><br />
29
+
30
+ <h6 class="mt">JavaScript Reference</h6>
31
+ <a href="#constructor">Constructor</a><br />
32
+ <a href="#requirements">Requirements</a><br />
33
+ <a href="#attributes">Attributes</a><br />
34
+ <a href="#properties">Properties</a><br />
35
+ <a href="#methods">Methods</a><br />
36
+ <a href="#staticMethods">Static Methods</a><br />
37
+ </div>
38
+ </details>
39
+
40
+ <h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
41
+ <p>Create dialogs using the <code>k-dialog</code> component. Open the dialog by calling the <code>open()</code> method, and close it by calling the <code>close()</code> method. Or it can be closed using the dialog's GUI (clicking the overlay, clicking the close button, or the cancel or confirm action buttons).</p>
17
42
  <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-dialog</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d1"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"p"</span>&gt;</span>Hello World<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-dialog</span>&gt;</span><br /><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onclick</span>=<span class="hljs-string">"doument.getElementById('d1').open()"</span>&gt;</span>Open Dialog<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span></code></pre>
18
43
  <button class="openDialog mb" data-dialog="d1" slot="right">Open Dialog</button>
19
44
  <k-dialog id="d1">
20
45
  <p class="p">Hello World</p>
21
46
  </k-dialog>
22
47
 
23
- <h5>Titles</h5>
48
+ <h3 id="titles"><a href="#titles" class="no-link">Titles</a></h3>
24
49
  <p>Assign an element to the <code>title</code> slot to have it appear as the dialog title.</p>
25
50
  <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-dialog</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d2"</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">h6</span><br /> <span class="hljs-attr">class</span>=<span class="hljs-string">"m0 px"</span><br /> <span class="hljs-attr">slot</span>=<span class="hljs-string">"title"</span><br /> &gt;</span>This is a fact<span class="hljs-tag">&lt;/<span class="hljs-name">h6</span>&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"p"</span>&gt;</span>A hotdog is a sandwhich<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-dialog</span>&gt;</span></code></pre>
26
51
  <button class="openDialog mb" data-dialog="d2" slot="right">Open Dialog</button>
@@ -34,7 +59,7 @@
34
59
  <p class="p">A hotdog is a sandwhich</p>
35
60
  </k-dialog>
36
61
 
37
- <h5>Action Buttons</h5>
62
+ <h3 id="actionButtons"><a href="#actionButtons" class="no-link">Action Buttons</a></h3>
38
63
  <p>Add a cancel button using the <code>cancel-text</code> attribute.</p>
39
64
  <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-dialog</span><br /> <span class="hljs-attr">id</span>=<span class="hljs-string">"d4"</span><br /> <span class="hljs-attr">cancel-text</span>=<span class="hljs-string">"Absolutly Not"</span><br />&gt;</span><br /> <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"p"</span>&gt;</span>Mint and Chocolate belong together<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span><br /><span class="hljs-tag">&lt;/<span class="hljs-name">k-dialog</span>&gt;</span></code></pre>
40
65
  <button class="openDialog mb" data-dialog="d4" slot="right">Open Dialog</button>
@@ -66,7 +91,7 @@
66
91
  <p class="p">Ranch is gross</p>
67
92
  </k-dialog>
68
93
 
69
- <h3>JavaScript Usage</h3>
94
+ <h3 id="jsUsage"><a href="#jsUsage" class="no-link">JavaScript Usage</a></h3>
70
95
  <h5>Create Dialog</h5>
71
96
  <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d7"</span>&gt;</span>Open Dialog<span class="hljs-tag">&lt;/<span class="hljs-name">button</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> Dialog <span class="hljs-keyword">from</span> <span class="hljs-string">'/kempo/components/Dialog.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'d7'</span>).addEventListener(<span class="hljs-string">'click'</span>, () =&gt; {<br /> Dialog.create(<span class="hljs-string">'&lt;p&gt;Hello World&lt;/p&gt;'</span>);<br /> });<br /></span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
72
97
  <button id="d7" class="mb">Open Dialog</button>
@@ -87,7 +112,122 @@
87
112
  });
88
113
  </script>
89
114
 
115
+ <h3 id="confirmDialog"><a href="#confirmDialog" class="no-link">Confirm Dialog</a></h3>
116
+ <p>Use the <code>Dialog.confirm</code> static method to create a confirmation dialog. This method takes a text message, a response callback, and an options object.</p>
117
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d9"</span>&gt;</span>Open Confirm Dialog<span class="hljs-tag">&lt;/<span class="hljs-name">button</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> Dialog <span class="hljs-keyword">from</span> <span class="hljs-string">'/kempo/components/Dialog.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'d9'</span>).addEventListener(<span class="hljs-string">'click'</span>, () =&gt; {<br /> Dialog.confirm(<span class="hljs-string">"Are you sure you want to proceed?"</span>, <span class="hljs-function"><span class="hljs-params">response</span> =&gt;</span> {<br /> <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"User response:"</span>, response);<br /> });<br /> });<br /></span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
118
+ <button id="d9" class="mb">Open Confirm Dialog</button>
119
+ <script type="module">
120
+ import Dialog from '/kempo/components/Dialog.js';
121
+ document.getElementById('d9').addEventListener('click', () => {
122
+ Dialog.confirm("Are you sure you want to proceed?", response => {
123
+ console.log("User response:", response);
124
+ });
125
+ });
126
+ </script>
127
+
128
+ <h2 id="jsRef">JavaScript Reference</h2>
129
+
130
+ <h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
131
+ <h6>Extends <a href="./component.html">Component</a></h6>
132
+ <h5>
133
+ <code>new Dialog(options)</code>
134
+ </h5>
135
+
136
+ <h4>Parameters</h4>
137
+ <h5><code>options<i>: object</i></code></h5>
138
+ <p>An object containing the initial configuration for the dialog. The options object can contain the following properties:</p>
139
+ <ul>
140
+ <li><code>opened</code>: <i>boolean</i> - Whether the dialog is initially opened.</li>
141
+ <li><code>closeBtn</code>: <i>boolean</i> - Whether to show the close button.</li>
142
+ <li><code>overlayClose</code>: <i>boolean</i> - Whether clicking the overlay closes the dialog.</li>
143
+ <li><code>confirmText</code>: <i>string</i> - Text for the confirm button.</li>
144
+ <li><code>confirmClasses</code>: <i>string</i> - Classes for the confirm button.</li>
145
+ <li><code>confirmAction</code>: <i>function</i> - Action to perform on confirm.</li>
146
+ <li><code>cancelText</code>: <i>string</i> - Text for the cancel button.</li>
147
+ <li><code>cancelClasses</code>: <i>string</i> - Classes for the cancel button.</li>
148
+ <li><code>cancelAction</code>: <i>function</i> - Action to perform on cancel.</li>
149
+ <li><code>closeCallback</code>: <i>function</i> - Callback to execute when the dialog is closed.</li>
150
+ </ul>
151
+
152
+ <h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
153
+ <ul>
154
+ <li><a href="./component.html">Component</a></li>
155
+ </ul>
156
+
157
+ <h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
158
+ <h5><code>opened<i>: boolean</i></code></h5>
159
+ <p>Whether the dialog is opened.</p>
160
+ <h5><code>closeBtn<i>: boolean</i></code></h5>
161
+ <p>Whether to show the close button.</p>
162
+ <h5><code>overlayClose<i>: boolean</i></code></h5>
163
+ <p>Whether clicking the overlay closes the dialog.</p>
164
+ <h5><code>confirmText<i>: string</i></code></h5>
165
+ <p>Text for the confirm button.</p>
166
+ <h5><code>confirmClasses<i>: string</i></code></h5>
167
+ <p>Classes for the confirm button.</p>
168
+ <h5><code>cancelText<i>: string</i></code></h5>
169
+ <p>Text for the cancel button.</p>
170
+ <h5><code>cancelClasses<i>: string</i></code></h5>
171
+ <p>Classes for the cancel button.</p>
172
+
173
+ <h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
174
+ <h5><code>confirmAction<i>: function</i></code></h5>
175
+ <p>Action to perform on confirm.</p>
176
+ <h5><code>cancelAction<i>: function</i></code></h5>
177
+ <p>Action to perform on cancel.</p>
178
+ <h5><code>closeCallback<i>: function</i></code></h5>
179
+ <p>Callback to execute when the dialog is closed.</p>
180
+
181
+ <h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
182
+ <h5><code>open()<i>: void</i></code></h5>
183
+ <p>Opens the dialog.</p>
184
+ <h5><code>close()<i>: void</i></code></h5>
185
+ <p>Closes the dialog.</p>
186
+ <h5><code>toggle()<i>: void</i></code></h5>
187
+ <p>Toggles the dialog open or closed.</p>
188
+ <h5><code>focus()<i>: void</i></code></h5>
189
+ <p>Focuses the first focusable element in the dialog.</p>
190
+ <h5><code>blur()<i>: void</i></code></h5>
191
+ <p>Returns focus to the element that had focus before the dialog was opened.</p>
90
192
 
193
+ <h3 id="staticMethods"><a href="#staticMethods" class="no-link">Static Methods</a></h3>
194
+ <h5><code>create(contents, options)<i>: Dialog</i></code></h5>
195
+ <p>Creates and opens a new dialog with the specified contents and options.</p>
196
+ <h6>Options</h6>
197
+ <ul>
198
+ <li><code>opened</code>: <i>boolean</i> - Whether the dialog is initially opened.</li>
199
+ <li><code>closeBtn</code>: <i>boolean</i> - Whether to show the close button.</li>
200
+ <li><code>overlayClose</code>: <i>boolean</i> - Whether clicking the overlay closes the dialog.</li>
201
+ <li><code>confirmText</code>: <i>string</i> - Text for the confirm button.</li>
202
+ <li><code>confirmClasses</code>: <i>string</i> - Classes for the confirm button.</li>
203
+ <li><code>confirmAction</code>: <i>function</i> - Action to perform on confirm.</li>
204
+ <li><code>cancelText</code>: <i>string</i> - Text for the cancel button.</li>
205
+ <li><code>cancelClasses</code>: <i>string</i> - Classes for the cancel button.</li>
206
+ <li><code>cancelAction</code>: <i>function</i> - Action to perform on cancel.</li>
207
+ <li><code>closeCallback</code>: <i>function</i> - Callback to execute when the dialog is closed.</li>
208
+ </ul>
209
+ <h5><code>confirm(text, responseCallback, options)<i>: void</i></code></h5>
210
+ <p>Creates and opens a confirmation dialog with the specified text and options.</p>
211
+ <h6>Options</h6>
212
+ <ul>
213
+ <li><code>title</code>: <i>string</i> - The title of the dialog.</li>
214
+ <li><code>confirmText</code>: <i>string</i> - Text for the confirm button.</li>
215
+ <li><code>confirmClasses</code>: <i>string</i> - Classes for the confirm button.</li>
216
+ <li><code>cancelText</code>: <i>string</i> - Text for the cancel button.</li>
217
+ <li><code>cancelClasses</code>: <i>string</i> - Classes for the cancel button.</li>
218
+ <li><code>closeBtn</code>: <i>boolean</i> - Whether to show the close button.</li>
219
+ <li><code>overlayClose</code>: <i>boolean</i> - Whether clicking the overlay closes the dialog.</li>
220
+ </ul>
221
+ <h5><code>error(text, responseCallback, options)<i>: void</i></code></h5>
222
+ <p>Creates and opens an error dialog with the specified text and options.</p>
223
+ <h6>Options</h6>
224
+ <ul>
225
+ <li><code>title</code>: <i>string</i> - The title of the dialog.</li>
226
+ <li><code>cancelText</code>: <i>string</i> - Text for the cancel button.</li>
227
+ <li><code>cancelClasses</code>: <i>string</i> - Classes for the cancel button.</li>
228
+ <li><code>closeBtn</code>: <i>boolean</i> - Whether to show the close button.</li>
229
+ <li><code>overlayClose</code>: <i>boolean</i> - Whether clicking the overlay closes the dialog.</li>
230
+ </ul>
91
231
 
92
232
  </main>
93
233
  <div style="height:33vh"></div>
@@ -6,17 +6,24 @@
6
6
  <title>Directory Viewer - Components - Kempo Docs - A Web Components Solution</title>
7
7
  <link rel="stylesheet" href="../kempo/kempo-vars.css" /><link rel="stylesheet" href="../kempo/kempo-styles.css" />
8
8
  <link rel="stylesheet" href="../kempo/kempo-hljs.css" />
9
+ <script type="module">
10
+ import Icon from '../kempo/components/Icon.js';
11
+ import Search from '../kempo/components/Search.js';
12
+ Icon.pathToIcons = ['../icons'];
13
+ Search.searchDataUrl = '../search.json';
14
+ </script>
9
15
  </head>
10
16
  <body>
11
17
  <k-import src="../nav-1.inc.html"></k-import>
12
18
  <h1 class="ta-center">Directory Viewer</h1>
13
19
  <main>
14
- <details
15
- class="b r mb"
16
- >
20
+ <details class="b r mb">
17
21
  <summary class="p">Table of Contents</summary>
18
22
  <div class="m mt0 pl">
23
+ <h6>Examples</h6>
19
24
  <a href="#basicUsage">Basic Usage</a><br />
25
+
26
+ <h6 class="mt">JavaScript Reference</h6>
20
27
  <a href="#constructor">Constructor</a><br />
21
28
  <a href="#requirements">Requirements</a><br />
22
29
  <a href="#attributes">Attributes</a><br />
@@ -25,55 +32,59 @@
25
32
  </div>
26
33
  </details>
27
34
 
28
- <h3>Description</h3>
29
- <p>The directory viewer allows the user to select a directory from their local filesystem, and the component allows them to open/close subdirectories and select files.</p>
30
-
31
35
  <h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
32
- <div class="row -mx">
33
- <div class="col d-span-6 t-span-6 m-span-12 px">
34
- <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-directory-viewer</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-directory-viewer</span>&gt;</span></code></pre>
35
- </div>
36
- <div class="col d-span-6 t-span-6 m-span-12 px">
37
- <k-directory-viewer id="dv"></k-directory-viewer>
38
- <script type="module">
39
- await window.customElements.whenDefined('k-directory-viewer');
40
- document.getElementById('dv').addFilter(({kind})=>kind!='file');
41
- document.getElementById('dv').addFilter(({name})=>!name.startsWith('.')&&!name.startsWith('_'));
42
- </script>
43
- </div>
44
- </div>
45
-
36
+ <p>Create a directory viewer using the <code>k-directory-viewer</code> component. Load a directory by calling the <code>loadDirectory()</code> method.</p>
37
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-directory-viewer</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"dv1"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-directory-viewer</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> DirectoryViewer <span class="hljs-keyword">from</span> <span class="hljs-string">'/kempo/components/DirectoryViewer.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'dv1'</span>).loadDirectory();<br /></span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
38
+ <k-directory-viewer id="dv1"></k-directory-viewer>
39
+ <script type="module">
40
+ import DirectoryViewer from '/kempo/components/DirectoryViewer.js';
41
+ // document.getElementById('dv1').loadDirectory();
42
+ </script>
46
43
 
44
+ <h2 id="jsRef">JavaScript Reference</h2>
47
45
 
48
46
  <h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
49
- <h6>Extends <a href="./lazy-component.html">LazyComponent</a></h6>
47
+ <h6>Extends <a href="./component.html">Component</a></h6>
50
48
  <h5>
51
- <code>new DirectoryViewer()</code><br />
49
+ <code>new DirectoryViewer(handle)</code>
52
50
  </h5>
53
51
 
52
+ <h4>Parameters</h4>
53
+ <h5><code>handle<i>: FileSystemDirectoryHandle</i></code></h5>
54
+ <p>The handle to the directory.</p>
55
+
54
56
  <h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
55
57
  <ul>
56
- <li><a href="">class <code>LazyComponent</code></a></li>
57
- <li><a href="">class <code>Component</code></a></li>
58
- <li><a href="">class <code>Icon</code></a></li>
59
- <li><a href="">util <code>element.js</code></a></li>
60
- <li><a href="">util <code>watchDirectoryHandle.js</code></a></li>
58
+ <li><a href="./component.html">Component</a></li>
61
59
  </ul>
62
60
 
61
+ <h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
62
+ <h5><code>hasHandle<i>: boolean</i></code></h5>
63
+ <p>Whether the directory viewer has a handle.</p>
64
+ <h5><code>selected<i>: boolean</i></code></h5>
65
+ <p>Whether the directory viewer is selected.</p>
66
+
67
+ <h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
68
+ <h5><code>handle<i>: FileSystemDirectoryHandle</i></code></h5>
69
+ <p>The handle to the directory.</p>
70
+ <h5><code>filters<i>: Array</i></code></h5>
71
+ <p>An array of filters applied to the directory viewer.</p>
72
+
63
73
  <h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
64
- <h5><code>async selectDirectory()<i>: undefined</i></code></h5>
65
- <p>Opens the directory selection dialog. When a dialog is selected it will render the directory's contents.</p>
66
- <h5><code>open()<i>: undefined</i></code></h5>
67
- <p>Opens the directory, this should only be called on auto-generated sub-directories.</p>
68
- <h5><code>close()<i>: undefined</i></code></h5>
69
- <p>Closes the directory, this should only be called on auto-generated sub-directories.</p>
70
- <h5><code>toggleOpen()<i>: undefined</i></code></h5>
71
- <p>Opens/Closes the directory, this should only be called on auto-generated sub-directories.</p>
72
- <h5><code>clearDirectoryHandle()<i>: undefined</i></code></h5>
73
- <p>Clears the handle that represents the user selected directory, allowing the user to choose a new directory.</p>
74
-
74
+ <h5><code>loadDirectory()<i>: Promise</i></code></h5>
75
+ <p>Loads a directory using the file picker API.</p>
76
+ <h5><code>clearDirectoryHandle()<i>: void</i></code></h5>
77
+ <p>Clears the directory handle.</p>
78
+ <h5><code>updateContents()<i>: void</i></code></h5>
79
+ <p>Updates the contents of the directory viewer.</p>
80
+ <h5><code>select()<i>: void</i></code></h5>
81
+ <p>Selects the directory viewer.</p>
82
+ <h5><code>addFilter(filter)<i>: void</i></code></h5>
83
+ <p>Adds a filter to the directory viewer.</p>
84
+
75
85
  </main>
76
- <script type="module" src="../kempo/components/Import.js"></script>
77
- <script type="module" src="../kempo/components/DirectoryViewer.js"></script>
86
+ <div style="height:33vh"></div>
87
+ <script type="module" src="../kempo/components/Import.js"></script>
88
+ <script type="module" src="../kempo/components/DirectoryViewer.js"></script>
78
89
  </body>
79
90
  </html>