kempo-ui 0.4.2 → 0.4.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.
- package/.claude/skills/get-icon/SKILL.md +144 -0
- package/.claude/skills/highlight-code/SKILL.md +62 -0
- package/.claude/skills/new-component/SKILL.md +362 -0
- package/.github/skills/get-icon/SKILL.md +4 -4
- package/.github/skills/highlight-code/SKILL.md +51 -20
- package/.github/skills/new-component/SKILL.md +183 -152
- package/AGENTS.md +2 -2
- package/dist/components/Calendar.js +170 -0
- package/dist/components/SpeechToText.js +60 -0
- package/dist/components/TextToSpeech.js +56 -0
- package/dist/components/Time.js +37 -0
- package/docs/components/accordion.html +16 -0
- package/docs/components/aside.html +16 -0
- package/docs/components/calendar.html +720 -0
- package/docs/components/card.html +16 -0
- package/docs/components/code-editor.html +16 -0
- package/docs/components/color-picker.html +16 -0
- package/docs/components/combobox.html +16 -0
- package/docs/components/content-slider.html +16 -0
- package/docs/components/context.html +16 -0
- package/docs/components/dialog.html +16 -0
- package/docs/components/dropdown.html +16 -0
- package/docs/components/filter-list.html +16 -0
- package/docs/components/focus-capture.html +16 -0
- package/docs/components/html-editor.html +16 -0
- package/docs/components/hybrid-component.html +16 -0
- package/docs/components/icon.html +16 -0
- package/docs/components/import.html +16 -0
- package/docs/components/light-component.html +16 -0
- package/docs/components/nav-spacer.html +16 -0
- package/docs/components/nav.html +16 -0
- package/docs/components/photo-viewer.html +16 -0
- package/docs/components/progress.html +16 -0
- package/docs/components/resize.html +16 -0
- package/docs/components/shadow-component.html +16 -0
- package/docs/components/show-more.html +16 -0
- package/docs/components/slider.html +16 -0
- package/docs/components/sortable.html +16 -0
- package/docs/components/speech-to-text.html +717 -0
- package/docs/components/spinner.html +16 -0
- package/docs/components/split.html +16 -0
- package/docs/components/table.html +16 -0
- package/docs/components/tableControls.html +16 -0
- package/docs/components/tableCustomFields.html +16 -0
- package/docs/components/tableFetchRecords.html +16 -0
- package/docs/components/tableFieldSortHide.html +16 -0
- package/docs/components/tablePagination.html +16 -0
- package/docs/components/tablePlaceholder.html +16 -0
- package/docs/components/tableRecordEditing.html +16 -0
- package/docs/components/tableRecordFiltering.html +16 -0
- package/docs/components/tableRecordHiding.html +16 -0
- package/docs/components/tableRecordSearching.html +16 -0
- package/docs/components/tableRecordSelection.html +16 -0
- package/docs/components/tableRowControls.html +16 -0
- package/docs/components/tableServerSync.html +16 -0
- package/docs/components/tableSorting.html +16 -0
- package/docs/components/tabs.html +16 -0
- package/docs/components/tags.html +16 -0
- package/docs/components/text-to-speech.html +668 -0
- package/docs/components/theme-select.html +16 -0
- package/docs/components/theme-switcher.html +16 -0
- package/docs/components/time.html +670 -0
- package/docs/components/timestamp.html +16 -0
- package/docs/components/toast.html +16 -0
- package/docs/components/toggle.html +16 -0
- package/docs/components/tree.html +16 -0
- package/docs/icons/mic.svg +1 -0
- package/docs/icons/record_voice_over.svg +1 -0
- package/docs/icons/stop.svg +1 -0
- package/docs/index.html +40 -0
- package/docs/src/components/Calendar.js +170 -0
- package/docs/src/components/SpeechToText.js +60 -0
- package/docs/src/components/TextToSpeech.js +56 -0
- package/docs/src/components/Time.js +37 -0
- package/docs/utils/context.html +16 -0
- package/docs/utils/cookie.html +16 -0
- package/docs/utils/debounce.html +16 -0
- package/docs/utils/drag.html +16 -0
- package/docs/utils/elevation.html +16 -0
- package/docs/utils/formatTimestamp.html +16 -0
- package/docs/utils/object.html +16 -0
- package/docs/utils/propConverters.html +16 -0
- package/docs/utils/string.html +16 -0
- package/docs/utils/theme.html +16 -0
- package/docs/utils/toTitleCase.html +16 -0
- package/docs/utils/type.html +16 -0
- package/docs/utils/wait.html +16 -0
- package/docs-src/components/calendar.page.html +254 -0
- package/docs-src/components/speech-to-text.page.html +251 -0
- package/docs-src/components/text-to-speech.page.html +202 -0
- package/docs-src/components/time.page.html +204 -0
- package/docs-src/index.page.html +24 -0
- package/docs-src/nav.fragment.html +16 -0
- package/icons/mic.svg +1 -0
- package/icons/record_voice_over.svg +1 -0
- package/icons/stop.svg +1 -0
- package/llms.txt +4 -0
- package/package.json +1 -1
- package/src/components/Calendar.js +473 -0
- package/src/components/SpeechToText.js +252 -0
- package/src/components/TextToSpeech.js +194 -0
- package/src/components/Time.js +137 -0
- package/tests/components/SpeechToText.browser-test.js +530 -0
- package/tests/components/TextToSpeech.browser-test.js +432 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
<page pageName="Time" title="Time - 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="#defaultValue">Default Value</a><br />
|
|
10
|
+
<a href="#increment">Minute Increment</a><br />
|
|
11
|
+
<a href="#military">24-Hour Time</a><br />
|
|
12
|
+
<a href="#javascriptUsage">JavaScript Usage</a><br />
|
|
13
|
+
<a href="#formUsage">Form Usage</a><br />
|
|
14
|
+
<a href="#disabled">Disabled</a><br />
|
|
15
|
+
|
|
16
|
+
<h6 class="mt"><a href="#jsRef" class="no-link">JavaScript Reference</a></h6>
|
|
17
|
+
<a href="#constructor">Constructor</a><br />
|
|
18
|
+
<a href="#requirements">Requirements</a><br />
|
|
19
|
+
<a href="#properties">Properties</a><br />
|
|
20
|
+
<a href="#events">Events</a><br />
|
|
21
|
+
</div>
|
|
22
|
+
</k-accordion-panel>
|
|
23
|
+
</k-accordion>
|
|
24
|
+
|
|
25
|
+
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
26
|
+
<p>Wraps the browser's native <code><input type="time"></code> so the user can click or tab between the hour, minute, and AM/PM segments and type numbers to change each one. The <code>value</code> is always a 24-hour <code>HH:MM</code> string regardless of the locale-dependent display format.</p>
|
|
27
|
+
<div class="row -mx">
|
|
28
|
+
<div class="col m-span-12 px">
|
|
29
|
+
<k-card label="HTML">
|
|
30
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-time</span>></span><span class="hljs-tag"></<span class="hljs-name">k-time</span>></span></code></pre>
|
|
31
|
+
</k-card>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="col m-span-12 px">
|
|
34
|
+
<k-card label="Output">
|
|
35
|
+
<k-time></k-time>
|
|
36
|
+
</k-card>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<h3 id="defaultValue"><a href="#defaultValue" class="no-link">Default Value</a></h3>
|
|
41
|
+
<p>Set an initial value with the <code>value</code> attribute using 24-hour <code>HH:MM</code> format.</p>
|
|
42
|
+
<div class="row -mx">
|
|
43
|
+
<div class="col m-span-12 px">
|
|
44
|
+
<k-card label="HTML">
|
|
45
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-time</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"14:30"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-time</span>></span></code></pre>
|
|
46
|
+
</k-card>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="col m-span-12 px">
|
|
49
|
+
<k-card label="Output">
|
|
50
|
+
<k-time value="14:30"></k-time>
|
|
51
|
+
</k-card>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<h3 id="increment"><a href="#increment" class="no-link">Minute Increment</a></h3>
|
|
56
|
+
<p>The <code>increment</code> attribute controls the minute step when the user presses the up/down arrow keys on the minute segment. Defaults to <code>1</code>.</p>
|
|
57
|
+
<div class="row -mx">
|
|
58
|
+
<div class="col m-span-12 px">
|
|
59
|
+
<k-card label="HTML">
|
|
60
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-time</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"09:15"</span> <span class="hljs-attr">increment</span>=<span class="hljs-string">"15"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-time</span>></span></code></pre>
|
|
61
|
+
</k-card>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="col m-span-12 px">
|
|
64
|
+
<k-card label="Output">
|
|
65
|
+
<k-time value="09:15" increment="15"></k-time>
|
|
66
|
+
</k-card>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<h4>Half-Hour Increment</h4>
|
|
71
|
+
<div class="row -mx">
|
|
72
|
+
<div class="col m-span-12 px">
|
|
73
|
+
<k-card label="HTML">
|
|
74
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-time</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"13:00"</span> <span class="hljs-attr">increment</span>=<span class="hljs-string">"30"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-time</span>></span></code></pre>
|
|
75
|
+
</k-card>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="col m-span-12 px">
|
|
78
|
+
<k-card label="Output">
|
|
79
|
+
<k-time value="13:00" increment="30"></k-time>
|
|
80
|
+
</k-card>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<h3 id="military"><a href="#military" class="no-link">24-Hour Time</a></h3>
|
|
85
|
+
<p>Add the <code>military</code> attribute to render in 24-hour form without an AM/PM segment. Internally the input is tagged as <code>lang="en-GB"</code> to request a 24-hour display; most modern browsers respect this. The stored <code>value</code> format is unchanged.</p>
|
|
86
|
+
<div class="row -mx">
|
|
87
|
+
<div class="col m-span-12 px">
|
|
88
|
+
<k-card label="HTML">
|
|
89
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-time</span> <span class="hljs-attr">military</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"17:45"</span> <span class="hljs-attr">increment</span>=<span class="hljs-string">"15"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-time</span>></span></code></pre>
|
|
90
|
+
</k-card>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="col m-span-12 px">
|
|
93
|
+
<k-card label="Output">
|
|
94
|
+
<k-time military value="17:45" increment="15"></k-time>
|
|
95
|
+
</k-card>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<h3 id="javascriptUsage"><a href="#javascriptUsage" class="no-link">JavaScript Usage</a></h3>
|
|
100
|
+
<p>Listen for the <code>change</code> event to react to committed values. The <code>detail.value</code> is a <code>HH:MM</code> string in 24-hour format.</p>
|
|
101
|
+
<div class="row -mx">
|
|
102
|
+
<div class="col m-span-12 px">
|
|
103
|
+
<k-card label="HTML">
|
|
104
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-time</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"jsTime"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"08:00"</span> <span class="hljs-attr">increment</span>=<span class="hljs-string">"5"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-time</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">"jsTimeOutput"</span>></span>08:00<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="language-javascript"><br> <span class="hljs-keyword">const</span> $time = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">getElementById</span>(<span class="hljs-string">'jsTime'</span>);<br> <span class="hljs-keyword">const</span> $out = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">getElementById</span>(<span class="hljs-string">'jsTimeOutput'</span>);<br> $time.<span class="hljs-title function_">addEventListener</span>(<span class="hljs-string">'change'</span>, <span class="hljs-function">(<span class="hljs-params">e</span>) =></span> {<br> $out.<span class="hljs-property">textContent</span> = e.<span class="hljs-property">detail</span>.<span class="hljs-property">value</span>;<br> });<br></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
105
|
+
</k-card>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="col m-span-12 px">
|
|
108
|
+
<k-card label="Output">
|
|
109
|
+
<k-time id="jsTime" value="08:00" increment="5" class="mb"></k-time>
|
|
110
|
+
<p>Selected: <span id="jsTimeOutput">08:00</span></p>
|
|
111
|
+
<script>
|
|
112
|
+
const $time = document.getElementById('jsTime');
|
|
113
|
+
const $out = document.getElementById('jsTimeOutput');
|
|
114
|
+
$time.addEventListener('change', (e) => {
|
|
115
|
+
$out.textContent = e.detail.value;
|
|
116
|
+
});
|
|
117
|
+
</script>
|
|
118
|
+
</k-card>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<h3 id="formUsage"><a href="#formUsage" class="no-link">Form Usage</a></h3>
|
|
123
|
+
<p>The component is form-associated. Set a <code>name</code> so it participates in form submission. The submitted value is always the 24-hour <code>HH:MM</code> string, regardless of display mode.</p>
|
|
124
|
+
<div class="row -mx">
|
|
125
|
+
<div class="col m-span-12 px">
|
|
126
|
+
<k-card label="HTML">
|
|
127
|
+
<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">"timeForm"</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">label</span>></span>Start: <span class="hljs-tag"><<span class="hljs-name">k-time</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"start"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"09:00"</span> <span class="hljs-attr">increment</span>=<span class="hljs-string">"15"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-time</span>></span><span class="hljs-tag"></<span class="hljs-name">label</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">label</span>></span>End: <span class="hljs-tag"><<span class="hljs-name">k-time</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"end"</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"17:00"</span> <span class="hljs-attr">increment</span>=<span class="hljs-string">"15"</span> <span class="hljs-attr">military</span>></span><span class="hljs-tag"></<span class="hljs-name">k-time</span>></span><span class="hljs-tag"></<span class="hljs-name">label</span>></span><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">form</span>></span><br><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Form Data: <span class="hljs-tag"><<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"timeFormOutput"</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="language-javascript"><br> <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">getElementById</span>(<span class="hljs-string">'timeForm'</span>).<span class="hljs-title function_">addEventListener</span>(<span class="hljs-string">'submit'</span>, <span class="hljs-function">(<span class="hljs-params">e</span>) =></span> {<br> e.<span class="hljs-title function_">preventDefault</span>();<br> <span class="hljs-keyword">const</span> fd = <span class="hljs-keyword">new</span> <span class="hljs-title class_">FormData</span>(e.<span class="hljs-property">target</span>);<br> <span class="hljs-keyword">const</span> entries = [...fd.<span class="hljs-title function_">entries</span>()].<span class="hljs-title function_">map</span>(<span class="hljs-function">(<span class="hljs-params">[k, v]</span>) =></span> k + <span class="hljs-string">'='</span> + v);<br> <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">getElementById</span>(<span class="hljs-string">'timeFormOutput'</span>).<span class="hljs-property">textContent</span> = entries.<span class="hljs-title function_">join</span>(<span class="hljs-string">', '</span>);<br> });<br></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
128
|
+
</k-card>
|
|
129
|
+
</div>
|
|
130
|
+
<div class="col m-span-12 px">
|
|
131
|
+
<k-card label="Output">
|
|
132
|
+
<form id="timeForm" class="mb">
|
|
133
|
+
<label class="d-b mb">Start: <k-time name="start" value="09:00" increment="15"></k-time></label>
|
|
134
|
+
<label class="d-b mb">End: <k-time name="end" value="17:00" increment="15" military></k-time></label>
|
|
135
|
+
<button type="submit">Submit</button>
|
|
136
|
+
</form>
|
|
137
|
+
<p>Form Data: <span id="timeFormOutput"></span></p>
|
|
138
|
+
<script>
|
|
139
|
+
document.getElementById('timeForm').addEventListener('submit', (e) => {
|
|
140
|
+
e.preventDefault();
|
|
141
|
+
const fd = new FormData(e.target);
|
|
142
|
+
const entries = [...fd.entries()].map(([k, v]) => k + '=' + v);
|
|
143
|
+
document.getElementById('timeFormOutput').textContent = entries.join(', ');
|
|
144
|
+
});
|
|
145
|
+
</script>
|
|
146
|
+
</k-card>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<h3 id="disabled"><a href="#disabled" class="no-link">Disabled</a></h3>
|
|
151
|
+
<p>The <code>disabled</code> attribute prevents user interaction.</p>
|
|
152
|
+
<div class="row -mx">
|
|
153
|
+
<div class="col m-span-12 px">
|
|
154
|
+
<k-card label="HTML">
|
|
155
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-time</span> <span class="hljs-attr">disabled</span> <span class="hljs-attr">value</span>=<span class="hljs-string">"12:00"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-time</span>></span></code></pre>
|
|
156
|
+
</k-card>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="col m-span-12 px">
|
|
159
|
+
<k-card label="Output">
|
|
160
|
+
<k-time disabled value="12:00"></k-time>
|
|
161
|
+
</k-card>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<h2 id="jsRef"><a href="#jsRef" class="no-link">JavaScript Reference</a></h2>
|
|
166
|
+
|
|
167
|
+
<h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
|
|
168
|
+
<h6>Extends <a href="./shadow-component.html">ShadowComponent</a></h6>
|
|
169
|
+
<h5><code>new Time()</code></h5>
|
|
170
|
+
|
|
171
|
+
<h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
|
|
172
|
+
<ul>
|
|
173
|
+
<li><a href="./shadow-component.html">ShadowComponent</a></li>
|
|
174
|
+
</ul>
|
|
175
|
+
|
|
176
|
+
<h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
|
|
177
|
+
<h5><code>value<i>: String</i></code></h5>
|
|
178
|
+
<p>The committed time as a 24-hour <code>HH:MM</code> string (e.g. <code>"14:30"</code>). Empty string when no time is set. Syncs to <code>value</code> attribute.</p>
|
|
179
|
+
|
|
180
|
+
<h5><code>name<i>: String</i></code></h5>
|
|
181
|
+
<p>The form field name. When set inside a <code><form></code>, the component participates in form submission. Syncs to <code>name</code> attribute.</p>
|
|
182
|
+
|
|
183
|
+
<h5><code>increment<i>: Number</i></code></h5>
|
|
184
|
+
<p>The minute step used when the user presses the up/down arrow keys on the minute segment. Also sets the underlying <code>step</code> attribute on the native input in seconds (<code>increment × 60</code>). Default is <code>1</code>. Syncs to <code>increment</code> attribute.</p>
|
|
185
|
+
|
|
186
|
+
<h5><code>military<i>: Boolean</i></code></h5>
|
|
187
|
+
<p>When <code>true</code>, the displayed time uses 24-hour format and no AM/PM segment. The stored <code>value</code> format is unchanged. Default is <code>false</code>. Syncs to <code>military</code> attribute.</p>
|
|
188
|
+
|
|
189
|
+
<h5><code>disabled<i>: Boolean</i></code></h5>
|
|
190
|
+
<p>When <code>true</code>, the component cannot be changed by user interaction. The element appears at 50% opacity. Syncs to <code>disabled</code> attribute.</p>
|
|
191
|
+
|
|
192
|
+
<h5><code>required<i>: Boolean</i></code></h5>
|
|
193
|
+
<p>When <code>true</code> and no time is set, the element reports a <code>valueMissing</code> validity error for form validation. Syncs to <code>required</code> attribute.</p>
|
|
194
|
+
|
|
195
|
+
<h3 id="events"><a href="#events" class="no-link">Events</a></h3>
|
|
196
|
+
<h5><code>change</code></h5>
|
|
197
|
+
<p>Fired when the committed <code>value</code> changes. The event <code>detail</code> contains <code>{ value: String }</code> in 24-hour <code>HH:MM</code> format, or an empty string when cleared.</p>
|
|
198
|
+
</content>
|
|
199
|
+
<content location="scripts">
|
|
200
|
+
<script type="module" src="{{pathToRoot}}src/components/Time.js"></script>
|
|
201
|
+
<script type="module" src="{{pathToRoot}}src/components/Accordion.js"></script>
|
|
202
|
+
<script type="module" src="{{pathToRoot}}src/components/Card.js"></script>
|
|
203
|
+
</content>
|
|
204
|
+
</page>
|
package/docs-src/index.page.html
CHANGED
|
@@ -47,6 +47,12 @@
|
|
|
47
47
|
<p class="tc-muted">Enhanced sidebar component with push and overlay modes.</p>
|
|
48
48
|
</a>
|
|
49
49
|
</div>
|
|
50
|
+
<div class="span-12 t-span-6 d-span-4 px">
|
|
51
|
+
<a href="{{pathToRoot}}components/calendar.html" class="card mb no-link d-b">
|
|
52
|
+
<h3 class="tc-primary">Calendar</h3>
|
|
53
|
+
<p class="tc-muted">Month-grid date picker widget with single and range selection modes.</p>
|
|
54
|
+
</a>
|
|
55
|
+
</div>
|
|
50
56
|
<div class="span-12 t-span-6 d-span-4 px">
|
|
51
57
|
<a href="{{pathToRoot}}components/card.html" class="card mb no-link d-b">
|
|
52
58
|
<h3 class="tc-primary">Card</h3>
|
|
@@ -173,6 +179,12 @@
|
|
|
173
179
|
<p class="tc-muted">Drag-and-drop lists with reordering and sort events.</p>
|
|
174
180
|
</a>
|
|
175
181
|
</div>
|
|
182
|
+
<div class="span-12 t-span-6 d-span-4 px">
|
|
183
|
+
<a href="{{pathToRoot}}components/speech-to-text.html" class="card mb no-link d-b">
|
|
184
|
+
<h3 class="tc-primary">Speech To Text</h3>
|
|
185
|
+
<p class="tc-muted">Microphone button that uses the Web Speech API to transcribe spoken input.</p>
|
|
186
|
+
</a>
|
|
187
|
+
</div>
|
|
176
188
|
<div class="span-12 t-span-6 d-span-4 px">
|
|
177
189
|
<a href="{{pathToRoot}}components/spinner.html" class="card mb no-link d-b">
|
|
178
190
|
<h3 class="tc-primary">Spinner</h3>
|
|
@@ -203,6 +215,12 @@
|
|
|
203
215
|
<p class="tc-muted">Input field for adding and removing tags with keyboard support.</p>
|
|
204
216
|
</a>
|
|
205
217
|
</div>
|
|
218
|
+
<div class="span-12 t-span-6 d-span-4 px">
|
|
219
|
+
<a href="{{pathToRoot}}components/text-to-speech.html" class="card mb no-link d-b">
|
|
220
|
+
<h3 class="tc-primary">Text To Speech</h3>
|
|
221
|
+
<p class="tc-muted">Button that speaks the given text aloud using the browser's SpeechSynthesis API.</p>
|
|
222
|
+
</a>
|
|
223
|
+
</div>
|
|
206
224
|
<div class="span-12 t-span-6 d-span-4 px">
|
|
207
225
|
<a href="{{pathToRoot}}components/theme-select.html" class="card mb no-link d-b">
|
|
208
226
|
<h3 class="tc-primary">Theme Select</h3>
|
|
@@ -215,6 +233,12 @@
|
|
|
215
233
|
<p class="tc-muted">Toggle between light, dark, and auto theme modes.</p>
|
|
216
234
|
</a>
|
|
217
235
|
</div>
|
|
236
|
+
<div class="span-12 t-span-6 d-span-4 px">
|
|
237
|
+
<a href="{{pathToRoot}}components/time.html" class="card mb no-link d-b">
|
|
238
|
+
<h3 class="tc-primary">Time</h3>
|
|
239
|
+
<p class="tc-muted">Time picker with 12/24-hour display, configurable minute increments, and form submission.</p>
|
|
240
|
+
</a>
|
|
241
|
+
</div>
|
|
218
242
|
<div class="span-12 t-span-6 d-span-4 px">
|
|
219
243
|
<a href="{{pathToRoot}}components/timestamp.html" class="card mb no-link d-b">
|
|
220
244
|
<h3 class="tc-primary">Timestamp</h3>
|
|
@@ -46,6 +46,9 @@
|
|
|
46
46
|
href="{{pathToRoot}}components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
|
|
47
47
|
<k-filter-item filter-keywords="aside sidebar components"><a
|
|
48
48
|
href="{{pathToRoot}}components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
|
|
49
|
+
<k-filter-item filter-keywords="calendar date picker range month day components"><a
|
|
50
|
+
href="{{pathToRoot}}components/calendar.html"
|
|
51
|
+
>Calendar<br><small>Component</small></a></k-filter-item>
|
|
49
52
|
<k-filter-item filter-keywords="card components"><a
|
|
50
53
|
href="{{pathToRoot}}components/card.html">Card<br><small>Component</small></a></k-filter-item>
|
|
51
54
|
<k-filter-item filter-keywords="code editor codeeditor monaco components"><a
|
|
@@ -101,6 +104,9 @@
|
|
|
101
104
|
<k-filter-item filter-keywords="sortable drag drop sort components"><a
|
|
102
105
|
href="{{pathToRoot}}components/sortable.html"
|
|
103
106
|
>Sortable<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="speech to text speechtotext microphone voice recognition transcription components"><a
|
|
108
|
+
href="{{pathToRoot}}components/speech-to-text.html"
|
|
109
|
+
>Speech To Text<br><small>Component</small></a></k-filter-item>
|
|
104
110
|
<k-filter-item filter-keywords="spinner loading components"><a
|
|
105
111
|
href="{{pathToRoot}}components/spinner.html">Spinner<br><small>Component</small></a></k-filter-item>
|
|
106
112
|
<k-filter-item filter-keywords="split pane components"><a
|
|
@@ -153,12 +159,18 @@
|
|
|
153
159
|
href="{{pathToRoot}}components/tabs.html">Tabs<br><small>Component</small></a></k-filter-item>
|
|
154
160
|
<k-filter-item filter-keywords="tags tag input components"><a
|
|
155
161
|
href="{{pathToRoot}}components/tags.html">Tags<br><small>Component</small></a></k-filter-item>
|
|
162
|
+
<k-filter-item filter-keywords="text to speech texttospeech tts speak voice synthesis components"><a
|
|
163
|
+
href="{{pathToRoot}}components/text-to-speech.html"
|
|
164
|
+
>Text To Speech<br><small>Component</small></a></k-filter-item>
|
|
156
165
|
<k-filter-item filter-keywords="theme select dropdown dark light components"><a
|
|
157
166
|
href="{{pathToRoot}}components/theme-select.html"
|
|
158
167
|
>Theme Select<br><small>Component</small></a></k-filter-item>
|
|
159
168
|
<k-filter-item filter-keywords="theme switcher dark light components"><a
|
|
160
169
|
href="{{pathToRoot}}components/theme-switcher.html"
|
|
161
170
|
>Theme Switcher<br><small>Component</small></a></k-filter-item>
|
|
171
|
+
<k-filter-item filter-keywords="time picker clock hour minute form components"><a
|
|
172
|
+
href="{{pathToRoot}}components/time.html"
|
|
173
|
+
>Time<br><small>Component</small></a></k-filter-item>
|
|
162
174
|
<k-filter-item filter-keywords="timestamp date time components"><a
|
|
163
175
|
href="{{pathToRoot}}components/timestamp.html"
|
|
164
176
|
>Timestamp<br><small>Component</small></a></k-filter-item>
|
|
@@ -253,6 +265,7 @@
|
|
|
253
265
|
<h3>Components</h3>
|
|
254
266
|
<a href="{{pathToRoot}}components/accordion.html">Accordion</a>
|
|
255
267
|
<a href="{{pathToRoot}}components/aside.html">Aside</a>
|
|
268
|
+
<a href="{{pathToRoot}}components/calendar.html">Calendar</a>
|
|
256
269
|
<a href="{{pathToRoot}}components/card.html">Card</a>
|
|
257
270
|
<a href="{{pathToRoot}}components/code-editor.html">Code Editor</a>
|
|
258
271
|
<a href="{{pathToRoot}}components/combobox.html">Combobox</a>
|
|
@@ -274,13 +287,16 @@
|
|
|
274
287
|
<a href="{{pathToRoot}}components/show-more.html">Show More</a>
|
|
275
288
|
<a href="{{pathToRoot}}components/slider.html">Slider</a>
|
|
276
289
|
<a href="{{pathToRoot}}components/sortable.html">Sortable</a>
|
|
290
|
+
<a href="{{pathToRoot}}components/speech-to-text.html">Speech To Text</a>
|
|
277
291
|
<a href="{{pathToRoot}}components/spinner.html">Spinner</a>
|
|
278
292
|
<a href="{{pathToRoot}}components/split.html">Split</a>
|
|
279
293
|
<a href="{{pathToRoot}}components/table.html">Table</a>
|
|
280
294
|
<a href="{{pathToRoot}}components/tabs.html">Tabs</a>
|
|
281
295
|
<a href="{{pathToRoot}}components/tags.html">Tags</a>
|
|
296
|
+
<a href="{{pathToRoot}}components/text-to-speech.html">Text To Speech</a>
|
|
282
297
|
<a href="{{pathToRoot}}components/theme-select.html">Theme Select</a>
|
|
283
298
|
<a href="{{pathToRoot}}components/theme-switcher.html">Theme Switcher</a>
|
|
299
|
+
<a href="{{pathToRoot}}components/time.html">Time</a>
|
|
284
300
|
<a href="{{pathToRoot}}components/timestamp.html">Timestamp</a>
|
|
285
301
|
<a href="{{pathToRoot}}components/toast.html">Toast</a>
|
|
286
302
|
<a href="{{pathToRoot}}components/toggle.html">Toggle</a>
|
package/icons/mic.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M395-435q-35-35-35-85v-240q0-50 35-85t85-35q50 0 85 35t35 85v240q0 50-35 85t-85 35q-50 0-85-35Zm85-205Zm-40 520v-123q-104-14-172-93t-68-184h80q0 83 58.5 141.5T480-320q83 0 141.5-58.5T680-520h80q0 105-68 184t-172 93v123h-80Zm68.5-371.5Q520-503 520-520v-240q0-17-11.5-28.5T480-800q-17 0-28.5 11.5T440-760v240q0 17 11.5 28.5T480-480q17 0 28.5-11.5Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="m798-322-62-62q44-41 69-97t25-119q0-63-25-118t-69-96l62-64q56 53 89 125t33 153q0 81-33 153t-89 125ZM670-450l-64-64q18-17 29-38.5t11-47.5q0-26-11-47.5T606-686l64-64q32 29 50 67.5t18 82.5q0 44-18 82.5T670-450Zm-310 10q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM40-120v-112q0-33 17-62t47-44q51-26 115-44t141-18q77 0 141 18t115 44q30 15 47 44t17 62v112H40Zm80-80h480v-32q0-11-5.5-20T580-266q-36-18-92.5-36T360-320q-71 0-127.5 18T140-266q-9 5-14.5 14t-5.5 20v32Zm296.5-343.5Q440-567 440-600t-23.5-56.5Q393-680 360-680t-56.5 23.5Q280-633 280-600t23.5 56.5Q327-520 360-520t56.5-23.5ZM360-600Zm0 400Z"/></svg>
|
package/icons/stop.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M240-240v-480h480v480H240Z"/></svg>
|
package/llms.txt
CHANGED
|
@@ -54,6 +54,7 @@ import { html, css, LitElement } from 'kempo-ui/src/lit-all.min.js';
|
|
|
54
54
|
|-----------|------|-------------|------|
|
|
55
55
|
| `<k-accordion>` `<k-accordion-header>` `<k-accordion-panel>` | `Accordion.js` | Collapsible panel groups; `for-panel` attribute links headers to panels | [accordion.html](https://dustinpoissant.github.io/kempo-ui/components/accordion.html) |
|
|
56
56
|
| `<k-aside>` `<k-aside-item>` `<k-aside-label>` `<k-aside-menu>` `<k-aside-spacer>` `<k-aside-toggle>` | `Aside.js` | Sidebar/drawer; `main="push"` or `main="overlay"`, `side="left|right"` | [aside.html](https://dustinpoissant.github.io/kempo-ui/components/aside.html) |
|
|
57
|
+
| `<k-calendar>` | `Calendar.js` | Inline month-grid date picker widget; `mode="single"` (default) or `mode="range"`; `value` is ISO `YYYY-MM-DD` (single) or comma-separated pair (range); `min`/`max` bounds; form-associated; fires `change` | [calendar.html](https://dustinpoissant.github.io/kempo-ui/components/calendar.html) |
|
|
57
58
|
| `<k-card>` | `Card.js` | Bordered container; optional `label` attribute | [card.html](https://dustinpoissant.github.io/kempo-ui/components/card.html) |
|
|
58
59
|
| `<k-code-editor>` | `CodeEditor.js` | Monaco-powered code editor; `value`, `language`, `controls` attributes; form-associated; theme-aware | [code-editor.html](https://dustinpoissant.github.io/kempo-ui/components/code-editor.html) |
|
|
59
60
|
| `<k-color-picker>` | `ColorPicker.js` | Full color picker (hex, rgb, hsl, hsv, alpha); `value` property | [color-picker.html](https://dustinpoissant.github.io/kempo-ui/components/color-picker.html) |
|
|
@@ -75,13 +76,16 @@ import { html, css, LitElement } from 'kempo-ui/src/lit-all.min.js';
|
|
|
75
76
|
| `<k-show-more>` | `ShowMore.js` | Truncated content with expand toggle | [show-more.html](https://dustinpoissant.github.io/kempo-ui/components/show-more.html) |
|
|
76
77
|
| `<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) |
|
|
77
78
|
| `<k-sortable>` `<k-sortable-item>` | `Sortable.js` | Drag-to-reorder list | [sortable.html](https://dustinpoissant.github.io/kempo-ui/components/sortable.html) |
|
|
79
|
+
| `<k-speech-to-text>` | `SpeechToText.js` | Microphone button wrapping the Web Speech API; click to start, click again or pause to stop; `language`, `continuous`, `interim`, `min-confidence` (0-1 noise filter), `timeout` (max recording seconds) attrs; fires `start`, `result` (with `{text, isFinal}`), `end` (with `{text}`), `error` | [speech-to-text.html](https://dustinpoissant.github.io/kempo-ui/components/speech-to-text.html) |
|
|
78
80
|
| `<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) |
|
|
79
81
|
| `<k-split>` | `Split.js` | Resizable split panes | [split.html](https://dustinpoissant.github.io/kempo-ui/components/split.html) |
|
|
80
82
|
| `<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) |
|
|
81
83
|
| `<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">` | [tabs.html](https://dustinpoissant.github.io/kempo-ui/components/tabs.html) |
|
|
82
84
|
| `<k-tags>` `<k-tag>` | `Tags.js` | Tag input; add/remove tags; fires `change` | [tags.html](https://dustinpoissant.github.io/kempo-ui/components/tags.html) |
|
|
85
|
+
| `<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) |
|
|
83
86
|
| `<k-theme-select>` | `ThemeSelect.js` | Dropdown to pick a theme | [theme-select.html](https://dustinpoissant.github.io/kempo-ui/components/theme-select.html) |
|
|
84
87
|
| `<k-theme-switcher>` | `ThemeSwitcher.js` | Theme switcher with segmented and toggle display modes | [theme-switcher.html](https://dustinpoissant.github.io/kempo-ui/components/theme-switcher.html) |
|
|
88
|
+
| `<k-time>` | `Time.js` | Wraps native `<input type="time">` with segmented hour/minute/AM-PM editing; `value` is 24-hour `HH:MM`; `increment` attr sets minute step (arrow-key granularity); `military` attr forces 24-hour display via `lang="en-GB"`; form-associated; fires `change` | [time.html](https://dustinpoissant.github.io/kempo-ui/components/time.html) |
|
|
85
89
|
| `<k-timestamp>` | `Timestamp.js` | Displays a `value` timestamp as human-readable relative time | [timestamp.html](https://dustinpoissant.github.io/kempo-ui/components/timestamp.html) |
|
|
86
90
|
| `<k-toast>` `<k-toast-container>` | `Toast.js` | Toast notifications; use `<k-toast-container>` once in page, call `.addToast(options)` | [toast.html](https://dustinpoissant.github.io/kempo-ui/components/toast.html) |
|
|
87
91
|
| `<k-toggle>` | `Toggle.js` | On/off toggle; `value` (Boolean, reflects); methods: `on()`, `off()`, `toggle()`; fires `change`, `on`, `off` | [toggle.html](https://dustinpoissant.github.io/kempo-ui/components/toggle.html) |
|