kempo-ui 0.4.11 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/components/SegmentedControl.js +16 -0
- package/dist/components/Tabs.js +4 -4
- package/docs/components/SegmentedControl.html +649 -0
- package/docs/components/accordion.html +3 -0
- package/docs/components/aside.html +3 -0
- package/docs/components/calendar.html +3 -0
- package/docs/components/card.html +3 -0
- package/docs/components/chat.html +3 -0
- package/docs/components/code-editor.html +3 -0
- package/docs/components/color-picker.html +3 -0
- package/docs/components/combobox.html +3 -0
- package/docs/components/content-slider.html +3 -0
- package/docs/components/context.html +3 -0
- package/docs/components/dialog.html +3 -0
- package/docs/components/dropdown.html +3 -0
- package/docs/components/filter-list.html +3 -0
- package/docs/components/focus-capture.html +3 -0
- package/docs/components/html-editor.html +3 -0
- package/docs/components/hybrid-component.html +3 -0
- package/docs/components/icon.html +3 -0
- package/docs/components/import.html +3 -0
- package/docs/components/light-component.html +3 -0
- package/docs/components/markdown-editor.html +3 -0
- package/docs/components/markdown.html +3 -0
- package/docs/components/nav-spacer.html +3 -0
- package/docs/components/nav.html +3 -0
- package/docs/components/photo-viewer.html +3 -0
- package/docs/components/progress.html +3 -0
- package/docs/components/resize.html +3 -0
- package/docs/components/segmented-control.html +728 -0
- package/docs/components/shadow-component.html +3 -0
- package/docs/components/show-more.html +3 -0
- package/docs/components/slider.html +3 -0
- package/docs/components/sortable.html +3 -0
- package/docs/components/speech-to-text.html +3 -0
- package/docs/components/spinner.html +3 -0
- package/docs/components/split.html +3 -0
- package/docs/components/table.html +3 -0
- package/docs/components/tableControls.html +3 -0
- package/docs/components/tableCustomFields.html +3 -0
- package/docs/components/tableFetchRecords.html +3 -0
- package/docs/components/tableFieldSortHide.html +3 -0
- package/docs/components/tablePagination.html +3 -0
- package/docs/components/tablePlaceholder.html +3 -0
- package/docs/components/tableRecordEditing.html +3 -0
- package/docs/components/tableRecordFiltering.html +3 -0
- package/docs/components/tableRecordHiding.html +3 -0
- package/docs/components/tableRecordSearching.html +3 -0
- package/docs/components/tableRecordSelection.html +3 -0
- package/docs/components/tableRowControls.html +3 -0
- package/docs/components/tableServerSync.html +3 -0
- package/docs/components/tableSorting.html +3 -0
- package/docs/components/tabs.html +32 -0
- package/docs/components/tags.html +3 -0
- package/docs/components/text-to-speech.html +3 -0
- package/docs/components/theme-select.html +3 -0
- package/docs/components/theme-switcher.html +3 -0
- package/docs/components/time.html +3 -0
- package/docs/components/timestamp.html +3 -0
- package/docs/components/toast.html +3 -0
- package/docs/components/toggle.html +3 -0
- package/docs/components/tree.html +3 -0
- package/docs/components/voice-selector.html +3 -0
- package/docs/icons/account-circle.svg +1 -1
- package/docs/index.html +9 -0
- package/docs/src/components/SegmentedControl.js +16 -0
- package/docs/src/components/Tabs.js +4 -4
- package/docs/utils/context.html +3 -0
- package/docs/utils/cookie.html +3 -0
- package/docs/utils/debounce.html +3 -0
- package/docs/utils/drag.html +3 -0
- package/docs/utils/elevation.html +3 -0
- package/docs/utils/formatTimestamp.html +3 -0
- package/docs/utils/object.html +3 -0
- package/docs/utils/propConverters.html +3 -0
- package/docs/utils/sanitizeHtml.html +3 -0
- package/docs/utils/string.html +3 -0
- package/docs/utils/theme.html +3 -0
- package/docs/utils/toTitleCase.html +3 -0
- package/docs/utils/type.html +3 -0
- package/docs/utils/voice.html +3 -0
- package/docs/utils/wait.html +3 -0
- package/docs-src/components/segmented-control.page.html +236 -0
- package/docs-src/components/tabs.page.html +29 -0
- package/docs-src/index.page.html +6 -0
- package/docs-src/nav.fragment.html +3 -0
- package/icons/account-circle.svg +1 -1
- package/llms.txt +2 -1
- package/package.json +1 -1
- package/src/components/SegmentedControl.js +118 -0
- package/src/components/Tabs.js +21 -1
- package/tasks/released/0004-create-segmented-control-component/component-rendering.png +0 -0
- package/tasks/released/0004-create-segmented-control-component/final-component-page.png +0 -0
- package/tasks/released/0004-create-segmented-control-component/form-integration-section.png +0 -0
- package/tasks/released/0004-create-segmented-control-component/option-element-section.png +0 -0
- package/tasks/released/0004-create-segmented-control-component/page-screenshot.png +0 -0
- package/tasks/released/0004-create-segmented-control-component/validation-form-integration.png +0 -0
- package/tasks/released/0004-create-segmented-control-component/validation-screenshot-1-full-page.png +0 -0
- package/tasks/released/0004-create-segmented-control-component/validation-screenshot-2-icon-options.png +0 -0
- package/tasks/released/0004-create-segmented-control-component.md +106 -0
- package/tasks/released/0005-add-persistent-id-to-tabs.md +98 -0
- package/tests/components/SegmentedControl.browser-test.js +223 -0
- package/tests/components/Tabs.browser-test.js +262 -0
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
package/docs/utils/object.html
CHANGED
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
package/docs/utils/string.html
CHANGED
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
package/docs/utils/theme.html
CHANGED
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
package/docs/utils/type.html
CHANGED
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
package/docs/utils/voice.html
CHANGED
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
package/docs/utils/wait.html
CHANGED
|
@@ -120,6 +120,9 @@
|
|
|
120
120
|
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
121
121
|
<k-filter-item filter-keywords="resize components"><a
|
|
122
122
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
123
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
124
|
+
href="../components/segmented-control.html"
|
|
125
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
123
126
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
124
127
|
href="../components/show-more.html"
|
|
125
128
|
>Show More<br><small>Component</small></a></k-filter-item>
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
<page pageName="Segmented Control" title="Segmented Control - Components - Kempo Docs - A Web Components Solution">
|
|
2
|
+
<content>
|
|
3
|
+
<k-accordion persistent-id="toc" class="b r mb">
|
|
4
|
+
<k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
|
|
5
|
+
<k-accordion-panel name="toc-panel">
|
|
6
|
+
<div class="m pl">
|
|
7
|
+
<h6>Examples</h6>
|
|
8
|
+
<a href="#basicUsage">Basic Usage</a><br />
|
|
9
|
+
<a href="#selectedByDefault">Selected By Default</a><br />
|
|
10
|
+
<a href="#javascriptUsage">JavaScript Usage</a><br />
|
|
11
|
+
<a href="#customComponents">Icon Options</a><br />
|
|
12
|
+
<a href="#formUsage">Form Integration</a><br />
|
|
13
|
+
|
|
14
|
+
<h6 class="mt"><a href="jsRef" class="no-link">JavaScript Reference</a></h6>
|
|
15
|
+
<a href="#constructor">Constructor</a><br />
|
|
16
|
+
<a href="#requirements">Requirements</a><br />
|
|
17
|
+
<a href="#properties">Properties</a><br />
|
|
18
|
+
<a href="#events">Events</a><br />
|
|
19
|
+
<a href="#optionElement">Option Element</a><br />
|
|
20
|
+
</div>
|
|
21
|
+
</k-accordion-panel>
|
|
22
|
+
</k-accordion>
|
|
23
|
+
|
|
24
|
+
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
25
|
+
<p>A segmented control groups related options and allows the user to select one at a time. Provide your own sub-components as options.</p>
|
|
26
|
+
<div class="row -mx">
|
|
27
|
+
<div class="col m-span-12 px">
|
|
28
|
+
<k-card label="HTML">
|
|
29
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-segmented-control</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"small"</span>></span>Small<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"medium"</span>></span>Medium<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"large"</span>></span>Large<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-segmented-control</span>></span></code></pre>
|
|
30
|
+
</k-card>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="col m-span-12 px">
|
|
33
|
+
<k-card label="Output">
|
|
34
|
+
<k-segmented-control>
|
|
35
|
+
<k-sc-option value="small">Small</k-sc-option>
|
|
36
|
+
<k-sc-option value="medium">Medium</k-sc-option>
|
|
37
|
+
<k-sc-option value="large">Large</k-sc-option>
|
|
38
|
+
</k-segmented-control>
|
|
39
|
+
</k-card>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<h3 id="selectedByDefault"><a href="#selectedByDefault" class="no-link">Selected By Default</a></h3>
|
|
44
|
+
<p>Set an initial value to select an option by default.</p>
|
|
45
|
+
<div class="row -mx">
|
|
46
|
+
<div class="col m-span-12 px">
|
|
47
|
+
<k-card label="HTML">
|
|
48
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-segmented-control</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"medium"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"small"</span>></span>Small<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"medium"</span>></span>Medium<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"large"</span>></span>Large<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-segmented-control</span>></span></code></pre>
|
|
49
|
+
</k-card>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="col m-span-12 px">
|
|
52
|
+
<k-card label="Output">
|
|
53
|
+
<k-segmented-control value="medium">
|
|
54
|
+
<k-sc-option value="small">Small</k-sc-option>
|
|
55
|
+
<k-sc-option value="medium">Medium</k-sc-option>
|
|
56
|
+
<k-sc-option value="large">Large</k-sc-option>
|
|
57
|
+
</k-segmented-control>
|
|
58
|
+
</k-card>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<h3 id="javascriptUsage"><a href="#javascriptUsage" class="no-link">JavaScript Usage</a></h3>
|
|
63
|
+
<p>Get and set the selected value programmatically using JavaScript.</p>
|
|
64
|
+
<div class="row -mx">
|
|
65
|
+
<div class="col m-span-12 px">
|
|
66
|
+
<k-card label="HTML">
|
|
67
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-segmented-control</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"sizes"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"medium"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"small"</span>></span>Small<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"medium"</span>></span>Medium<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"large"</span>></span>Large<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-segmented-control</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Selected: <span class="hljs-tag"><<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"output"</span>></span><span class="hljs-tag"></<span class="hljs-name">span</span>></span><span class="hljs-tag"></<span class="hljs-name">p</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span>></span><span class="javascript"><br /> <span class="hljs-keyword">const</span> $sizes = <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'sizes'</span>);<br /> <span class="hljs-keyword">const</span> $output = <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'output'</span>);<br /> <br /> $output.textContent = $sizes.value;<br /> <br /> $sizes.addEventListener(<span class="hljs-string">'change'</span>, (event) => {<br /> $output.textContent = event.detail.value;<br /> });<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
68
|
+
</k-card>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="col m-span-12 px">
|
|
71
|
+
<k-card label="Output">
|
|
72
|
+
<k-segmented-control id="sizes" value="medium">
|
|
73
|
+
<k-sc-option value="small">Small</k-sc-option>
|
|
74
|
+
<k-sc-option value="medium">Medium</k-sc-option>
|
|
75
|
+
<k-sc-option value="large">Large</k-sc-option>
|
|
76
|
+
</k-segmented-control>
|
|
77
|
+
<p>Selected: <span id="output"></span></p>
|
|
78
|
+
<script>
|
|
79
|
+
const $sizes = document.getElementById('sizes');
|
|
80
|
+
const $output = document.getElementById('output');
|
|
81
|
+
|
|
82
|
+
$output.textContent = $sizes.value;
|
|
83
|
+
|
|
84
|
+
$sizes.addEventListener('change', (event) => {
|
|
85
|
+
$output.textContent = event.detail.value;
|
|
86
|
+
});
|
|
87
|
+
</script>
|
|
88
|
+
</k-card>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<h3 id="customComponents"><a href="#customComponents" class="no-link">Custom Components as Options</a></h3>
|
|
93
|
+
<p>Use any custom components as the options within the segmented control.</p>
|
|
94
|
+
<div class="row -mx">
|
|
95
|
+
<div class="col m-span-12 px">
|
|
96
|
+
<k-card label="HTML">
|
|
97
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-segmented-control</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"list"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"grid"</span>></span><span class="hljs-tag"><<span class="hljs-name">k-icon</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"cards"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-icon</span>></span><span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"list"</span>></span><span class="hljs-tag"><<span class="hljs-name">k-icon</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"format_list_bulleted"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-icon</span>></span><span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-segmented-control</span>></span></code></pre>
|
|
98
|
+
</k-card>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="col m-span-12 px">
|
|
101
|
+
<k-card label="Output">
|
|
102
|
+
<k-segmented-control value="list">
|
|
103
|
+
<k-sc-option value="grid"><k-icon name="cards"></k-icon></k-sc-option>
|
|
104
|
+
<k-sc-option value="list"><k-icon name="format_list_bulleted"></k-icon></k-sc-option>
|
|
105
|
+
</k-segmented-control>
|
|
106
|
+
</k-card>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<h3 id="formUsage"><a href="#formUsage" class="no-link">Form Integration</a></h3>
|
|
111
|
+
<p>The segmented control integrates with HTML forms using the name attribute. The selected value is submitted with the form.</p>
|
|
112
|
+
<div class="row -mx">
|
|
113
|
+
<div class="col m-span-12 px">
|
|
114
|
+
<k-card label="HTML">
|
|
115
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">form</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"sizeForm"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">label</span>></span>Size:<span class="hljs-tag"></<span class="hljs-name">label</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-segmented-control</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"size"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"medium"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"small"</span>></span>Small<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"medium"</span>></span>Medium<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-sc-option</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"large"</span>></span>Large<span class="hljs-tag"></<span class="hljs-name">k-sc-option</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">k-segmented-control</span>></span><br /> <br /> <span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"submit"</span>></span>Submit<span class="hljs-tag"></<span class="hljs-name">button</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"reset"</span>></span>Reset<span class="hljs-tag"></<span class="hljs-name">button</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">form</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Submitted: <span class="hljs-tag"><<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"result"</span>></span><span class="hljs-tag"></<span class="hljs-name">span</span>></span><span class="hljs-tag"></<span class="hljs-name">p</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span>></span><span class="javascript"><br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'sizeForm'</span>).addEventListener(<span class="hljs-string">'submit'</span>, (e) => {<br /> e.preventDefault();<br /> <span class="hljs-keyword">const</span> formData = <span class="hljs-keyword">new</span> FormData(e.target);<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result'</span>).textContent = formData.get(<span class="hljs-string">'size'</span>);<br /> });<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
116
|
+
</k-card>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="col m-span-12 px">
|
|
119
|
+
<k-card label="Output">
|
|
120
|
+
<form id="sizeForm">
|
|
121
|
+
<label>Size:</label>
|
|
122
|
+
<k-segmented-control name="size" value="medium">
|
|
123
|
+
<k-sc-option value="small">Small</k-sc-option>
|
|
124
|
+
<k-sc-option value="medium">Medium</k-sc-option>
|
|
125
|
+
<k-sc-option value="large">Large</k-sc-option>
|
|
126
|
+
</k-segmented-control>
|
|
127
|
+
<div class="mt">
|
|
128
|
+
<button type="submit" class="mr">Submit</button>
|
|
129
|
+
<button type="reset">Reset</button>
|
|
130
|
+
</div>
|
|
131
|
+
</form>
|
|
132
|
+
<p>Submitted: <span id="result"></span></p>
|
|
133
|
+
<script>
|
|
134
|
+
document.getElementById('sizeForm').addEventListener('submit', (e) => {
|
|
135
|
+
e.preventDefault();
|
|
136
|
+
const formData = new FormData(e.target);
|
|
137
|
+
document.getElementById('result').textContent = formData.get('size');
|
|
138
|
+
});
|
|
139
|
+
</script>
|
|
140
|
+
</k-card>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<hr class="mt" />
|
|
145
|
+
|
|
146
|
+
<h2 id="jsRef"><a href="#jsRef" class="no-link">JavaScript Reference</a></h2>
|
|
147
|
+
|
|
148
|
+
<h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
|
|
149
|
+
<pre><code class="hljs javascript"><span class="hljs-keyword">new</span> SegmentedControl();</code></pre>
|
|
150
|
+
|
|
151
|
+
<h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
|
|
152
|
+
<p>The segmented control component is a custom element and does not require any external dependencies beyond the Kempo-UI library.</p>
|
|
153
|
+
|
|
154
|
+
<h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
|
|
155
|
+
<div class="table-wrapper mb">
|
|
156
|
+
<table class="w-full">
|
|
157
|
+
<thead>
|
|
158
|
+
<tr>
|
|
159
|
+
<th>Property</th>
|
|
160
|
+
<th>Type</th>
|
|
161
|
+
<th>Default</th>
|
|
162
|
+
<th>Description</th>
|
|
163
|
+
</tr>
|
|
164
|
+
</thead>
|
|
165
|
+
<tbody>
|
|
166
|
+
<tr>
|
|
167
|
+
<td><code>value</code></td>
|
|
168
|
+
<td>String</td>
|
|
169
|
+
<td><code>''</code></td>
|
|
170
|
+
<td>The value of the currently selected option. Set this to match the `value` attribute of one of the `<k-sc-option>` children.</td>
|
|
171
|
+
</tr>
|
|
172
|
+
<tr>
|
|
173
|
+
<td><code>name</code></td>
|
|
174
|
+
<td>String</td>
|
|
175
|
+
<td><code>''</code></td>
|
|
176
|
+
<td>The name attribute for form submission. When used in a form, this is the key under which the selected value is submitted.</td>
|
|
177
|
+
</tr>
|
|
178
|
+
</tbody>
|
|
179
|
+
</table>
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
<h3 id="events"><a href="#events" class="no-link">Events</a></h3>
|
|
183
|
+
<div class="table-wrapper mb">
|
|
184
|
+
<table class="w-full">
|
|
185
|
+
<thead>
|
|
186
|
+
<tr>
|
|
187
|
+
<th>Event</th>
|
|
188
|
+
<th>Detail</th>
|
|
189
|
+
<th>Description</th>
|
|
190
|
+
</tr>
|
|
191
|
+
</thead>
|
|
192
|
+
<tbody>
|
|
193
|
+
<tr>
|
|
194
|
+
<td><code>change</code></td>
|
|
195
|
+
<td><code>{ value: String }</code></td>
|
|
196
|
+
<td>Fired when the selected option changes. The detail contains the new value.</td>
|
|
197
|
+
</tr>
|
|
198
|
+
</tbody>
|
|
199
|
+
</table>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
<h3 id="optionElement"><a href="#optionElement" class="no-link">Option Element (k-sc-option)</a></h3>
|
|
203
|
+
<p>The <code><k-sc-option></code> element represents a single option within the segmented control. It is a lightweight custom element that wraps your option content.</p>
|
|
204
|
+
<pre><code class="hljs javascript"><span class="hljs-keyword">new</span> SegmentedControlOption();</code></pre>
|
|
205
|
+
|
|
206
|
+
<h4>Attributes</h4>
|
|
207
|
+
<div class="table-wrapper mb">
|
|
208
|
+
<table class="w-full">
|
|
209
|
+
<thead>
|
|
210
|
+
<tr>
|
|
211
|
+
<th>Attribute</th>
|
|
212
|
+
<th>Type</th>
|
|
213
|
+
<th>Required</th>
|
|
214
|
+
<th>Description</th>
|
|
215
|
+
</tr>
|
|
216
|
+
</thead>
|
|
217
|
+
<tbody>
|
|
218
|
+
<tr>
|
|
219
|
+
<td><code>value</code></td>
|
|
220
|
+
<td>String</td>
|
|
221
|
+
<td>Yes</td>
|
|
222
|
+
<td>The value identifier for this option. Should be unique among sibling options and used to select this option via the parent's <code>value</code> property.</td>
|
|
223
|
+
</tr>
|
|
224
|
+
</tbody>
|
|
225
|
+
</table>
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
<h4>Content</h4>
|
|
229
|
+
<p>The <code><k-sc-option></code> element accepts any HTML content or components as children. Common use cases include text labels or icons (e.g., <code><k-icon></code> elements).</p>
|
|
230
|
+
</content>
|
|
231
|
+
<content location="scripts">
|
|
232
|
+
<script type="module" src="{{pathToRoot}}src/components/SegmentedControl.js"></script>
|
|
233
|
+
<script type="module" src="{{pathToRoot}}src/components/Accordion.js"></script>
|
|
234
|
+
<script type="module" src="{{pathToRoot}}src/components/Card.js"></script>
|
|
235
|
+
</content>
|
|
236
|
+
</page>
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
<a href="#tabSpacers">Tab Spacers</a><br />
|
|
10
10
|
<a href="#scrollingTabs">Scrolling Tabs</a><br />
|
|
11
11
|
<a href="#fixedHeight">Fixed Height</a><br />
|
|
12
|
+
<a href="#persistentState">Persistent State</a><br />
|
|
12
13
|
<h6 class="mt"><a href="#jsRef" class="no-link">JavaScript Reference</a></h6>
|
|
13
14
|
<a href="#constructor">Constructor</a><br />
|
|
14
15
|
<a href="#requirements">Requirements</a><br />
|
|
@@ -155,6 +156,30 @@
|
|
|
155
156
|
</div>
|
|
156
157
|
</div>
|
|
157
158
|
|
|
159
|
+
<h3 id="persistentState"><a href="#persistentState" class="no-link">Persistent State</a></h3>
|
|
160
|
+
<p>Use the <code>persistent-id</code> attribute to automatically save and restore the active tab to browser localStorage. When the component is reloaded, it will restore the previously active tab.</p>
|
|
161
|
+
<div class="row -mx mb">
|
|
162
|
+
<div class="col d-span-6 m-span-12 px">
|
|
163
|
+
<k-card label="HTML">
|
|
164
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-tabs</span> <span class="hljs-attr">persistent-id</span>=<span class="hljs-string">"userPreferences"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tab</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"account"</span>></span>Account<span class="hljs-tag"></<span class="hljs-name">k-tab</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tab</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"settings"</span>></span>Settings<span class="hljs-tag"></<span class="hljs-name">k-tab</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tab-content</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"account"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>Account settings content<span class="hljs-tag"></<span class="hljs-name">p</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">k-tab-content</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tab-content</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"settings"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>General settings content<span class="hljs-tag"></<span class="hljs-name">p</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">k-tab-content</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-tabs</span>></span></code></pre>
|
|
165
|
+
</k-card>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="col d-span-6 m-span-12 px">
|
|
168
|
+
<k-card label="Results">
|
|
169
|
+
<k-tabs persistent-id="tabsPersistentExample">
|
|
170
|
+
<k-tab for="account">Account</k-tab>
|
|
171
|
+
<k-tab for="settings">Settings</k-tab>
|
|
172
|
+
<k-tab-content name="account">
|
|
173
|
+
<p>Account settings content</p>
|
|
174
|
+
</k-tab-content>
|
|
175
|
+
<k-tab-content name="settings">
|
|
176
|
+
<p>General settings content</p>
|
|
177
|
+
</k-tab-content>
|
|
178
|
+
</k-tabs>
|
|
179
|
+
</k-card>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
158
183
|
<h2 id="jsRef"><a href="#jsRef" class="no-link">JavaScript Reference</a></h2>
|
|
159
184
|
<h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
|
|
160
185
|
<h6>Extends <a href="./shadow-component.html">ShadowComponent</a></h6>
|
|
@@ -170,6 +195,8 @@
|
|
|
170
195
|
<p>The name of the active tab. Syncs to <code>active</code> attribute.</p>
|
|
171
196
|
<h5><code>fixedHeight<i>: boolean</i></code></h5>
|
|
172
197
|
<p>Whether the tabs component uses fixed height mode. Syncs to <code>fixed-height</code> attribute.</p>
|
|
198
|
+
<h5><code>persistentId<i>: string</i></code></h5>
|
|
199
|
+
<p>A unique identifier for persisting the active tab state to localStorage. When set, the component will save the active tab name and restore it on reload. Syncs to <code>persistent-id</code> attribute.</p>
|
|
173
200
|
<h5><code>contents<i>: TabContent[]</i></code></h5>
|
|
174
201
|
<p>Returns an array of all tab content elements.</p>
|
|
175
202
|
<h5><code>tabs<i>: Tab[]</i></code></h5>
|
|
@@ -192,6 +219,8 @@
|
|
|
192
219
|
<h3 id="events"><a href="#events" class="no-link">Events</a></h3>
|
|
193
220
|
<h5><code>tab</code></h5>
|
|
194
221
|
<p>Fired when the active tab changes. Detail contains <code>{ tab }</code> with the name of the new active tab.</p>
|
|
222
|
+
<h5><code>restored</code></h5>
|
|
223
|
+
<p>Fired when the active tab is restored from persistent localStorage. Detail contains <code>{ tab }</code> with the name of the restored active tab. Only fires when <code>persistent-id</code> is set and a stored value is found.</p>
|
|
195
224
|
</content>
|
|
196
225
|
<content location="scripts">
|
|
197
226
|
<script type="module" src="{{pathToRoot}}src/components/Tabs.js"></script>
|
package/docs-src/index.page.html
CHANGED
|
@@ -179,6 +179,12 @@
|
|
|
179
179
|
<p class="tc-muted">Draggable handle to resize adjacent elements dynamically.</p>
|
|
180
180
|
</a>
|
|
181
181
|
</div>
|
|
182
|
+
<div class="span-12 t-span-6 d-span-4 px">
|
|
183
|
+
<a href="{{pathToRoot}}components/segmented-control.html" class="card mb no-link d-b">
|
|
184
|
+
<h3 class="tc-primary">Segmented Control</h3>
|
|
185
|
+
<p class="tc-muted">Button group where one option can be selected at a time with support for custom sub-components.</p>
|
|
186
|
+
</a>
|
|
187
|
+
</div>
|
|
182
188
|
<div class="span-12 t-span-6 d-span-4 px">
|
|
183
189
|
<a href="{{pathToRoot}}components/show-more.html" class="card mb no-link d-b">
|
|
184
190
|
<h3 class="tc-primary">Show More</h3>
|
|
@@ -104,6 +104,9 @@
|
|
|
104
104
|
href="{{pathToRoot}}components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
105
105
|
<k-filter-item filter-keywords="resize components"><a
|
|
106
106
|
href="{{pathToRoot}}components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="segmented control segment option button group components"><a
|
|
108
|
+
href="{{pathToRoot}}components/segmented-control.html"
|
|
109
|
+
>Segmented Control<br><small>Component</small></a></k-filter-item>
|
|
107
110
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
108
111
|
href="{{pathToRoot}}components/show-more.html"
|
|
109
112
|
>Show More<br><small>Component</small></a></k-filter-item>
|
package/icons/account-circle.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M234-276q51-39 114-61.5T480-360q69 0 132 22.5T726-276q35-41 54.5-93T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 59 19.5 111t54.5 93Zm246-164q-59 0-99.5-40.5T340-580q0-59 40.5-99.5T480-720q59 0 99.5 40.5T620-580q0 59-40.5 99.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q53 0 100-15.5t86-44.5q-39-29-86-44.5T480-280q-53 0-100 15.5T294-220q39 29 86 44.5T480-160Zm0-360q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm0-60Zm0 360Z"/></svg>
|
package/llms.txt
CHANGED
|
@@ -76,6 +76,7 @@ import { html, css, LitElement } from 'kempo-ui/src/lit-all.min.js';
|
|
|
76
76
|
| `<k-nav-spacer>` | `NavSpacer.js` | Auto-sizing spacer that offsets page content below a fixed `k-nav` bar; default bottom margin of `var(--spacer)` can be overridden with kempo-css margin utilities | [nav-spacer.html](https://dustinpoissant.github.io/kempo-ui/components/nav-spacer.html) |
|
|
77
77
|
| `<k-photo-viewer>` | `PhotoViewer.js` | Lightbox/gallery viewer | [photo-viewer.html](https://dustinpoissant.github.io/kempo-ui/components/photo-viewer.html) |
|
|
78
78
|
| `<k-resize>` | `Resize.js` | Resizable pane with drag handle | [resize.html](https://dustinpoissant.github.io/kempo-ui/components/resize.html) |
|
|
79
|
+
| `<k-segmented-control>` | `SegmentedControl.js` | Button group with one selectable option; accepts custom sub-components as options; `value` property reflects the selected option's value; fires `change` event | [segmented-control.html](https://dustinpoissant.github.io/kempo-ui/components/segmented-control.html) |
|
|
79
80
|
| `<k-show-more>` | `ShowMore.js` | Truncated content with expand toggle | [show-more.html](https://dustinpoissant.github.io/kempo-ui/components/show-more.html) |
|
|
80
81
|
| `<k-slider>` | `Slider.js` | Slider with min, max, discrete step snap points, vertical orientation, and dual-handle range mode via comma-separated `value` (e.g. `"20,80"`); `format` attribute for value formatting (e.g. `"$0.00"`) applied to change events, form submission, and optional drag `tooltip`; form-associated; fires `change` | [slider.html](https://dustinpoissant.github.io/kempo-ui/components/slider.html) |
|
|
81
82
|
| `<k-sortable>` `<k-sortable-item>` | `Sortable.js` | Drag-to-reorder list | [sortable.html](https://dustinpoissant.github.io/kempo-ui/components/sortable.html) |
|
|
@@ -83,7 +84,7 @@ import { html, css, LitElement } from 'kempo-ui/src/lit-all.min.js';
|
|
|
83
84
|
| `<k-spinner>` | `Spinner.js` | Loading indicator; `size` (xs/sm/md/lg/xl), `variant` (spinner/dots/bar) | [spinner.html](https://dustinpoissant.github.io/kempo-ui/components/spinner.html) |
|
|
84
85
|
| `<k-split>` | `Split.js` | Resizable split panes | [split.html](https://dustinpoissant.github.io/kempo-ui/components/split.html) |
|
|
85
86
|
| `<k-table>` | `Table.js` | Data table with sorting, filtering, pagination, row selection, server sync; `placeholder` (default "No Records") shown when empty; `filtered-placeholder` shown when all records are filtered/hidden | [table.html](https://dustinpoissant.github.io/kempo-ui/components/table.html) |
|
|
86
|
-
| `<k-tabs>` `<k-tab>` `<k-tab-content>` `<k-tab-spacer>` | `Tabs.js` | Tabbed interface; `<k-tab for-content="id">` links to `<k-tab-content name="id"
|
|
87
|
+
| `<k-tabs>` `<k-tab>` `<k-tab-content>` `<k-tab-spacer>` | `Tabs.js` | Tabbed interface; `<k-tab for-content="id">` links to `<k-tab-content name="id">`; `persistent-id` attribute persists active tab to localStorage | [tabs.html](https://dustinpoissant.github.io/kempo-ui/components/tabs.html) |
|
|
87
88
|
| `<k-tags>` `<k-tag>` | `Tags.js` | Tag input; add/remove tags; fires `change` | [tags.html](https://dustinpoissant.github.io/kempo-ui/components/tags.html) |
|
|
88
89
|
| `<k-text-to-speech>` | `TextToSpeech.js` | Button that wraps `window.speechSynthesis`; speaks `text` attr or slotted content; `voice`, `language`, `rate`, `pitch`, `volume` attrs; methods `speak(text?)` / `stop()` / `toggle()`; fires `start`, `end`, `error` | [text-to-speech.html](https://dustinpoissant.github.io/kempo-ui/components/text-to-speech.html) |
|
|
89
90
|
| `<k-theme-select>` | `ThemeSelect.js` | Dropdown to pick a theme | [theme-select.html](https://dustinpoissant.github.io/kempo-ui/components/theme-select.html) |
|