kempo-ui 0.4.2 → 0.4.3
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/dist/components/Calendar.js +170 -0
- package/dist/components/Time.js +37 -0
- package/docs/components/accordion.html +8 -0
- package/docs/components/aside.html +8 -0
- package/docs/components/calendar.html +712 -0
- package/docs/components/card.html +8 -0
- package/docs/components/code-editor.html +8 -0
- package/docs/components/color-picker.html +8 -0
- package/docs/components/combobox.html +8 -0
- package/docs/components/content-slider.html +8 -0
- package/docs/components/context.html +8 -0
- package/docs/components/dialog.html +8 -0
- package/docs/components/dropdown.html +8 -0
- package/docs/components/filter-list.html +8 -0
- package/docs/components/focus-capture.html +8 -0
- package/docs/components/html-editor.html +8 -0
- package/docs/components/hybrid-component.html +8 -0
- package/docs/components/icon.html +8 -0
- package/docs/components/import.html +8 -0
- package/docs/components/light-component.html +8 -0
- package/docs/components/nav-spacer.html +8 -0
- package/docs/components/nav.html +8 -0
- package/docs/components/photo-viewer.html +8 -0
- package/docs/components/progress.html +8 -0
- package/docs/components/resize.html +8 -0
- package/docs/components/shadow-component.html +8 -0
- package/docs/components/show-more.html +8 -0
- package/docs/components/slider.html +8 -0
- package/docs/components/sortable.html +8 -0
- package/docs/components/spinner.html +8 -0
- package/docs/components/split.html +8 -0
- package/docs/components/table.html +8 -0
- package/docs/components/tableControls.html +8 -0
- package/docs/components/tableCustomFields.html +8 -0
- package/docs/components/tableFetchRecords.html +8 -0
- package/docs/components/tableFieldSortHide.html +8 -0
- package/docs/components/tablePagination.html +8 -0
- package/docs/components/tablePlaceholder.html +8 -0
- package/docs/components/tableRecordEditing.html +8 -0
- package/docs/components/tableRecordFiltering.html +8 -0
- package/docs/components/tableRecordHiding.html +8 -0
- package/docs/components/tableRecordSearching.html +8 -0
- package/docs/components/tableRecordSelection.html +8 -0
- package/docs/components/tableRowControls.html +8 -0
- package/docs/components/tableServerSync.html +8 -0
- package/docs/components/tableSorting.html +8 -0
- package/docs/components/tabs.html +8 -0
- package/docs/components/tags.html +8 -0
- package/docs/components/theme-select.html +8 -0
- package/docs/components/theme-switcher.html +8 -0
- package/docs/components/time.html +662 -0
- package/docs/components/timestamp.html +8 -0
- package/docs/components/toast.html +8 -0
- package/docs/components/toggle.html +8 -0
- package/docs/components/tree.html +8 -0
- package/docs/index.html +20 -0
- package/docs/src/components/Calendar.js +170 -0
- package/docs/src/components/Time.js +37 -0
- package/docs/utils/context.html +8 -0
- package/docs/utils/cookie.html +8 -0
- package/docs/utils/debounce.html +8 -0
- package/docs/utils/drag.html +8 -0
- package/docs/utils/elevation.html +8 -0
- package/docs/utils/formatTimestamp.html +8 -0
- package/docs/utils/object.html +8 -0
- package/docs/utils/propConverters.html +8 -0
- package/docs/utils/string.html +8 -0
- package/docs/utils/theme.html +8 -0
- package/docs/utils/toTitleCase.html +8 -0
- package/docs/utils/type.html +8 -0
- package/docs/utils/wait.html +8 -0
- package/docs-src/components/calendar.page.html +254 -0
- package/docs-src/components/time.page.html +204 -0
- package/docs-src/index.page.html +12 -0
- package/docs-src/nav.fragment.html +8 -0
- package/llms.txt +2 -0
- package/package.json +1 -1
- package/src/components/Calendar.js +473 -0
- package/src/components/Time.js +137 -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>
|
|
@@ -215,6 +221,12 @@
|
|
|
215
221
|
<p class="tc-muted">Toggle between light, dark, and auto theme modes.</p>
|
|
216
222
|
</a>
|
|
217
223
|
</div>
|
|
224
|
+
<div class="span-12 t-span-6 d-span-4 px">
|
|
225
|
+
<a href="{{pathToRoot}}components/time.html" class="card mb no-link d-b">
|
|
226
|
+
<h3 class="tc-primary">Time</h3>
|
|
227
|
+
<p class="tc-muted">Time picker with 12/24-hour display, configurable minute increments, and form submission.</p>
|
|
228
|
+
</a>
|
|
229
|
+
</div>
|
|
218
230
|
<div class="span-12 t-span-6 d-span-4 px">
|
|
219
231
|
<a href="{{pathToRoot}}components/timestamp.html" class="card mb no-link d-b">
|
|
220
232
|
<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
|
|
@@ -159,6 +162,9 @@
|
|
|
159
162
|
<k-filter-item filter-keywords="theme switcher dark light components"><a
|
|
160
163
|
href="{{pathToRoot}}components/theme-switcher.html"
|
|
161
164
|
>Theme Switcher<br><small>Component</small></a></k-filter-item>
|
|
165
|
+
<k-filter-item filter-keywords="time picker clock hour minute form components"><a
|
|
166
|
+
href="{{pathToRoot}}components/time.html"
|
|
167
|
+
>Time<br><small>Component</small></a></k-filter-item>
|
|
162
168
|
<k-filter-item filter-keywords="timestamp date time components"><a
|
|
163
169
|
href="{{pathToRoot}}components/timestamp.html"
|
|
164
170
|
>Timestamp<br><small>Component</small></a></k-filter-item>
|
|
@@ -253,6 +259,7 @@
|
|
|
253
259
|
<h3>Components</h3>
|
|
254
260
|
<a href="{{pathToRoot}}components/accordion.html">Accordion</a>
|
|
255
261
|
<a href="{{pathToRoot}}components/aside.html">Aside</a>
|
|
262
|
+
<a href="{{pathToRoot}}components/calendar.html">Calendar</a>
|
|
256
263
|
<a href="{{pathToRoot}}components/card.html">Card</a>
|
|
257
264
|
<a href="{{pathToRoot}}components/code-editor.html">Code Editor</a>
|
|
258
265
|
<a href="{{pathToRoot}}components/combobox.html">Combobox</a>
|
|
@@ -281,6 +288,7 @@
|
|
|
281
288
|
<a href="{{pathToRoot}}components/tags.html">Tags</a>
|
|
282
289
|
<a href="{{pathToRoot}}components/theme-select.html">Theme Select</a>
|
|
283
290
|
<a href="{{pathToRoot}}components/theme-switcher.html">Theme Switcher</a>
|
|
291
|
+
<a href="{{pathToRoot}}components/time.html">Time</a>
|
|
284
292
|
<a href="{{pathToRoot}}components/timestamp.html">Timestamp</a>
|
|
285
293
|
<a href="{{pathToRoot}}components/toast.html">Toast</a>
|
|
286
294
|
<a href="{{pathToRoot}}components/toggle.html">Toggle</a>
|
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) |
|
|
@@ -82,6 +83,7 @@ import { html, css, LitElement } from 'kempo-ui/src/lit-all.min.js';
|
|
|
82
83
|
| `<k-tags>` `<k-tag>` | `Tags.js` | Tag input; add/remove tags; fires `change` | [tags.html](https://dustinpoissant.github.io/kempo-ui/components/tags.html) |
|
|
83
84
|
| `<k-theme-select>` | `ThemeSelect.js` | Dropdown to pick a theme | [theme-select.html](https://dustinpoissant.github.io/kempo-ui/components/theme-select.html) |
|
|
84
85
|
| `<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) |
|
|
86
|
+
| `<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
87
|
| `<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
88
|
| `<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
89
|
| `<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) |
|