kempo-ui 0.4.1 → 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/Slider.js +188 -0
- package/dist/components/Time.js +37 -0
- package/docs/components/accordion.html +12 -0
- package/docs/components/aside.html +12 -0
- package/docs/components/calendar.html +712 -0
- package/docs/components/card.html +12 -0
- package/docs/components/code-editor.html +12 -0
- package/docs/components/color-picker.html +12 -0
- package/docs/components/combobox.html +12 -0
- package/docs/components/content-slider.html +12 -0
- package/docs/components/context.html +12 -0
- package/docs/components/dialog.html +12 -0
- package/docs/components/dropdown.html +12 -0
- package/docs/components/filter-list.html +12 -0
- package/docs/components/focus-capture.html +12 -0
- package/docs/components/html-editor.html +12 -0
- package/docs/components/hybrid-component.html +12 -0
- package/docs/components/icon.html +12 -0
- package/docs/components/import.html +12 -0
- package/docs/components/light-component.html +12 -0
- package/docs/components/nav-spacer.html +12 -0
- package/docs/components/nav.html +12 -0
- package/docs/components/photo-viewer.html +12 -0
- package/docs/components/progress.html +12 -0
- package/docs/components/resize.html +12 -0
- package/docs/components/shadow-component.html +12 -0
- package/docs/components/show-more.html +12 -0
- package/docs/components/slider.html +789 -0
- package/docs/components/sortable.html +12 -0
- package/docs/components/spinner.html +12 -0
- package/docs/components/split.html +12 -0
- package/docs/components/table.html +12 -0
- package/docs/components/tableControls.html +12 -0
- package/docs/components/tableCustomFields.html +12 -0
- package/docs/components/tableFetchRecords.html +12 -0
- package/docs/components/tableFieldSortHide.html +12 -0
- package/docs/components/tablePagination.html +12 -0
- package/docs/components/tablePlaceholder.html +12 -0
- package/docs/components/tableRecordEditing.html +12 -0
- package/docs/components/tableRecordFiltering.html +12 -0
- package/docs/components/tableRecordHiding.html +12 -0
- package/docs/components/tableRecordSearching.html +12 -0
- package/docs/components/tableRecordSelection.html +12 -0
- package/docs/components/tableRowControls.html +12 -0
- package/docs/components/tableServerSync.html +12 -0
- package/docs/components/tableSorting.html +12 -0
- package/docs/components/tabs.html +12 -0
- package/docs/components/tags.html +12 -0
- package/docs/components/theme-select.html +12 -0
- package/docs/components/theme-switcher.html +12 -0
- package/docs/components/time.html +662 -0
- package/docs/components/timestamp.html +12 -0
- package/docs/components/toast.html +12 -0
- package/docs/components/toggle.html +12 -0
- package/docs/components/tree.html +12 -0
- package/docs/index.html +30 -0
- package/docs/src/components/Calendar.js +170 -0
- package/docs/src/components/Slider.js +188 -0
- package/docs/src/components/Time.js +37 -0
- package/docs/utils/context.html +12 -0
- package/docs/utils/cookie.html +12 -0
- package/docs/utils/debounce.html +12 -0
- package/docs/utils/drag.html +12 -0
- package/docs/utils/elevation.html +12 -0
- package/docs/utils/formatTimestamp.html +12 -0
- package/docs/utils/object.html +12 -0
- package/docs/utils/propConverters.html +12 -0
- package/docs/utils/string.html +12 -0
- package/docs/utils/theme.html +12 -0
- package/docs/utils/toTitleCase.html +12 -0
- package/docs/utils/type.html +12 -0
- package/docs/utils/wait.html +12 -0
- package/docs-src/components/calendar.page.html +254 -0
- package/docs-src/components/slider.page.html +331 -0
- package/docs-src/components/time.page.html +204 -0
- package/docs-src/index.page.html +18 -0
- package/docs-src/nav.fragment.html +12 -0
- package/llms.txt +3 -0
- package/package.json +1 -1
- package/src/components/Calendar.js +473 -0
- package/src/components/Slider.js +480 -0
- package/src/components/Time.js +137 -0
- package/tests/components/Slider.browser-test.js +823 -0
|
@@ -62,6 +62,9 @@
|
|
|
62
62
|
href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
|
|
63
63
|
<k-filter-item filter-keywords="aside sidebar components"><a
|
|
64
64
|
href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
|
|
65
|
+
<k-filter-item filter-keywords="calendar date picker range month day components"><a
|
|
66
|
+
href="../components/calendar.html"
|
|
67
|
+
>Calendar<br><small>Component</small></a></k-filter-item>
|
|
65
68
|
<k-filter-item filter-keywords="card components"><a
|
|
66
69
|
href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
|
|
67
70
|
<k-filter-item filter-keywords="code editor codeeditor monaco components"><a
|
|
@@ -111,6 +114,9 @@
|
|
|
111
114
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
112
115
|
href="../components/show-more.html"
|
|
113
116
|
>Show More<br><small>Component</small></a></k-filter-item>
|
|
117
|
+
<k-filter-item filter-keywords="slider range input step components"><a
|
|
118
|
+
href="../components/slider.html"
|
|
119
|
+
>Slider<br><small>Component</small></a></k-filter-item>
|
|
114
120
|
<k-filter-item filter-keywords="sortable drag drop sort components"><a
|
|
115
121
|
href="../components/sortable.html"
|
|
116
122
|
>Sortable<br><small>Component</small></a></k-filter-item>
|
|
@@ -172,6 +178,9 @@
|
|
|
172
178
|
<k-filter-item filter-keywords="theme switcher dark light components"><a
|
|
173
179
|
href="../components/theme-switcher.html"
|
|
174
180
|
>Theme Switcher<br><small>Component</small></a></k-filter-item>
|
|
181
|
+
<k-filter-item filter-keywords="time picker clock hour minute form components"><a
|
|
182
|
+
href="../components/time.html"
|
|
183
|
+
>Time<br><small>Component</small></a></k-filter-item>
|
|
175
184
|
<k-filter-item filter-keywords="timestamp date time components"><a
|
|
176
185
|
href="../components/timestamp.html"
|
|
177
186
|
>Timestamp<br><small>Component</small></a></k-filter-item>
|
|
@@ -266,6 +275,7 @@
|
|
|
266
275
|
<h3>Components</h3>
|
|
267
276
|
<a href="../components/accordion.html">Accordion</a>
|
|
268
277
|
<a href="../components/aside.html">Aside</a>
|
|
278
|
+
<a href="../components/calendar.html">Calendar</a>
|
|
269
279
|
<a href="../components/card.html">Card</a>
|
|
270
280
|
<a href="../components/code-editor.html">Code Editor</a>
|
|
271
281
|
<a href="../components/combobox.html">Combobox</a>
|
|
@@ -285,6 +295,7 @@
|
|
|
285
295
|
<a href="../components/progress.html">Progress</a>
|
|
286
296
|
<a href="../components/resize.html">Resize</a>
|
|
287
297
|
<a href="../components/show-more.html">Show More</a>
|
|
298
|
+
<a href="../components/slider.html">Slider</a>
|
|
288
299
|
<a href="../components/sortable.html">Sortable</a>
|
|
289
300
|
<a href="../components/spinner.html">Spinner</a>
|
|
290
301
|
<a href="../components/split.html">Split</a>
|
|
@@ -293,6 +304,7 @@
|
|
|
293
304
|
<a href="../components/tags.html">Tags</a>
|
|
294
305
|
<a href="../components/theme-select.html">Theme Select</a>
|
|
295
306
|
<a href="../components/theme-switcher.html">Theme Switcher</a>
|
|
307
|
+
<a href="../components/time.html">Time</a>
|
|
296
308
|
<a href="../components/timestamp.html">Timestamp</a>
|
|
297
309
|
<a href="../components/toast.html">Toast</a>
|
|
298
310
|
<a href="../components/toggle.html">Toggle</a>
|
|
@@ -62,6 +62,9 @@
|
|
|
62
62
|
href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
|
|
63
63
|
<k-filter-item filter-keywords="aside sidebar components"><a
|
|
64
64
|
href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
|
|
65
|
+
<k-filter-item filter-keywords="calendar date picker range month day components"><a
|
|
66
|
+
href="../components/calendar.html"
|
|
67
|
+
>Calendar<br><small>Component</small></a></k-filter-item>
|
|
65
68
|
<k-filter-item filter-keywords="card components"><a
|
|
66
69
|
href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
|
|
67
70
|
<k-filter-item filter-keywords="code editor codeeditor monaco components"><a
|
|
@@ -111,6 +114,9 @@
|
|
|
111
114
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
112
115
|
href="../components/show-more.html"
|
|
113
116
|
>Show More<br><small>Component</small></a></k-filter-item>
|
|
117
|
+
<k-filter-item filter-keywords="slider range input step components"><a
|
|
118
|
+
href="../components/slider.html"
|
|
119
|
+
>Slider<br><small>Component</small></a></k-filter-item>
|
|
114
120
|
<k-filter-item filter-keywords="sortable drag drop sort components"><a
|
|
115
121
|
href="../components/sortable.html"
|
|
116
122
|
>Sortable<br><small>Component</small></a></k-filter-item>
|
|
@@ -172,6 +178,9 @@
|
|
|
172
178
|
<k-filter-item filter-keywords="theme switcher dark light components"><a
|
|
173
179
|
href="../components/theme-switcher.html"
|
|
174
180
|
>Theme Switcher<br><small>Component</small></a></k-filter-item>
|
|
181
|
+
<k-filter-item filter-keywords="time picker clock hour minute form components"><a
|
|
182
|
+
href="../components/time.html"
|
|
183
|
+
>Time<br><small>Component</small></a></k-filter-item>
|
|
175
184
|
<k-filter-item filter-keywords="timestamp date time components"><a
|
|
176
185
|
href="../components/timestamp.html"
|
|
177
186
|
>Timestamp<br><small>Component</small></a></k-filter-item>
|
|
@@ -266,6 +275,7 @@
|
|
|
266
275
|
<h3>Components</h3>
|
|
267
276
|
<a href="../components/accordion.html">Accordion</a>
|
|
268
277
|
<a href="../components/aside.html">Aside</a>
|
|
278
|
+
<a href="../components/calendar.html">Calendar</a>
|
|
269
279
|
<a href="../components/card.html">Card</a>
|
|
270
280
|
<a href="../components/code-editor.html">Code Editor</a>
|
|
271
281
|
<a href="../components/combobox.html">Combobox</a>
|
|
@@ -285,6 +295,7 @@
|
|
|
285
295
|
<a href="../components/progress.html">Progress</a>
|
|
286
296
|
<a href="../components/resize.html">Resize</a>
|
|
287
297
|
<a href="../components/show-more.html">Show More</a>
|
|
298
|
+
<a href="../components/slider.html">Slider</a>
|
|
288
299
|
<a href="../components/sortable.html">Sortable</a>
|
|
289
300
|
<a href="../components/spinner.html">Spinner</a>
|
|
290
301
|
<a href="../components/split.html">Split</a>
|
|
@@ -293,6 +304,7 @@
|
|
|
293
304
|
<a href="../components/tags.html">Tags</a>
|
|
294
305
|
<a href="../components/theme-select.html">Theme Select</a>
|
|
295
306
|
<a href="../components/theme-switcher.html">Theme Switcher</a>
|
|
307
|
+
<a href="../components/time.html">Time</a>
|
|
296
308
|
<a href="../components/timestamp.html">Timestamp</a>
|
|
297
309
|
<a href="../components/toast.html">Toast</a>
|
|
298
310
|
<a href="../components/toggle.html">Toggle</a>
|
|
@@ -62,6 +62,9 @@
|
|
|
62
62
|
href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
|
|
63
63
|
<k-filter-item filter-keywords="aside sidebar components"><a
|
|
64
64
|
href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
|
|
65
|
+
<k-filter-item filter-keywords="calendar date picker range month day components"><a
|
|
66
|
+
href="../components/calendar.html"
|
|
67
|
+
>Calendar<br><small>Component</small></a></k-filter-item>
|
|
65
68
|
<k-filter-item filter-keywords="card components"><a
|
|
66
69
|
href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
|
|
67
70
|
<k-filter-item filter-keywords="code editor codeeditor monaco components"><a
|
|
@@ -111,6 +114,9 @@
|
|
|
111
114
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
112
115
|
href="../components/show-more.html"
|
|
113
116
|
>Show More<br><small>Component</small></a></k-filter-item>
|
|
117
|
+
<k-filter-item filter-keywords="slider range input step components"><a
|
|
118
|
+
href="../components/slider.html"
|
|
119
|
+
>Slider<br><small>Component</small></a></k-filter-item>
|
|
114
120
|
<k-filter-item filter-keywords="sortable drag drop sort components"><a
|
|
115
121
|
href="../components/sortable.html"
|
|
116
122
|
>Sortable<br><small>Component</small></a></k-filter-item>
|
|
@@ -172,6 +178,9 @@
|
|
|
172
178
|
<k-filter-item filter-keywords="theme switcher dark light components"><a
|
|
173
179
|
href="../components/theme-switcher.html"
|
|
174
180
|
>Theme Switcher<br><small>Component</small></a></k-filter-item>
|
|
181
|
+
<k-filter-item filter-keywords="time picker clock hour minute form components"><a
|
|
182
|
+
href="../components/time.html"
|
|
183
|
+
>Time<br><small>Component</small></a></k-filter-item>
|
|
175
184
|
<k-filter-item filter-keywords="timestamp date time components"><a
|
|
176
185
|
href="../components/timestamp.html"
|
|
177
186
|
>Timestamp<br><small>Component</small></a></k-filter-item>
|
|
@@ -266,6 +275,7 @@
|
|
|
266
275
|
<h3>Components</h3>
|
|
267
276
|
<a href="../components/accordion.html">Accordion</a>
|
|
268
277
|
<a href="../components/aside.html">Aside</a>
|
|
278
|
+
<a href="../components/calendar.html">Calendar</a>
|
|
269
279
|
<a href="../components/card.html">Card</a>
|
|
270
280
|
<a href="../components/code-editor.html">Code Editor</a>
|
|
271
281
|
<a href="../components/combobox.html">Combobox</a>
|
|
@@ -285,6 +295,7 @@
|
|
|
285
295
|
<a href="../components/progress.html">Progress</a>
|
|
286
296
|
<a href="../components/resize.html">Resize</a>
|
|
287
297
|
<a href="../components/show-more.html">Show More</a>
|
|
298
|
+
<a href="../components/slider.html">Slider</a>
|
|
288
299
|
<a href="../components/sortable.html">Sortable</a>
|
|
289
300
|
<a href="../components/spinner.html">Spinner</a>
|
|
290
301
|
<a href="../components/split.html">Split</a>
|
|
@@ -293,6 +304,7 @@
|
|
|
293
304
|
<a href="../components/tags.html">Tags</a>
|
|
294
305
|
<a href="../components/theme-select.html">Theme Select</a>
|
|
295
306
|
<a href="../components/theme-switcher.html">Theme Switcher</a>
|
|
307
|
+
<a href="../components/time.html">Time</a>
|
|
296
308
|
<a href="../components/timestamp.html">Timestamp</a>
|
|
297
309
|
<a href="../components/toast.html">Toast</a>
|
|
298
310
|
<a href="../components/toggle.html">Toggle</a>
|
|
@@ -62,6 +62,9 @@
|
|
|
62
62
|
href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
|
|
63
63
|
<k-filter-item filter-keywords="aside sidebar components"><a
|
|
64
64
|
href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
|
|
65
|
+
<k-filter-item filter-keywords="calendar date picker range month day components"><a
|
|
66
|
+
href="../components/calendar.html"
|
|
67
|
+
>Calendar<br><small>Component</small></a></k-filter-item>
|
|
65
68
|
<k-filter-item filter-keywords="card components"><a
|
|
66
69
|
href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
|
|
67
70
|
<k-filter-item filter-keywords="code editor codeeditor monaco components"><a
|
|
@@ -111,6 +114,9 @@
|
|
|
111
114
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
112
115
|
href="../components/show-more.html"
|
|
113
116
|
>Show More<br><small>Component</small></a></k-filter-item>
|
|
117
|
+
<k-filter-item filter-keywords="slider range input step components"><a
|
|
118
|
+
href="../components/slider.html"
|
|
119
|
+
>Slider<br><small>Component</small></a></k-filter-item>
|
|
114
120
|
<k-filter-item filter-keywords="sortable drag drop sort components"><a
|
|
115
121
|
href="../components/sortable.html"
|
|
116
122
|
>Sortable<br><small>Component</small></a></k-filter-item>
|
|
@@ -172,6 +178,9 @@
|
|
|
172
178
|
<k-filter-item filter-keywords="theme switcher dark light components"><a
|
|
173
179
|
href="../components/theme-switcher.html"
|
|
174
180
|
>Theme Switcher<br><small>Component</small></a></k-filter-item>
|
|
181
|
+
<k-filter-item filter-keywords="time picker clock hour minute form components"><a
|
|
182
|
+
href="../components/time.html"
|
|
183
|
+
>Time<br><small>Component</small></a></k-filter-item>
|
|
175
184
|
<k-filter-item filter-keywords="timestamp date time components"><a
|
|
176
185
|
href="../components/timestamp.html"
|
|
177
186
|
>Timestamp<br><small>Component</small></a></k-filter-item>
|
|
@@ -266,6 +275,7 @@
|
|
|
266
275
|
<h3>Components</h3>
|
|
267
276
|
<a href="../components/accordion.html">Accordion</a>
|
|
268
277
|
<a href="../components/aside.html">Aside</a>
|
|
278
|
+
<a href="../components/calendar.html">Calendar</a>
|
|
269
279
|
<a href="../components/card.html">Card</a>
|
|
270
280
|
<a href="../components/code-editor.html">Code Editor</a>
|
|
271
281
|
<a href="../components/combobox.html">Combobox</a>
|
|
@@ -285,6 +295,7 @@
|
|
|
285
295
|
<a href="../components/progress.html">Progress</a>
|
|
286
296
|
<a href="../components/resize.html">Resize</a>
|
|
287
297
|
<a href="../components/show-more.html">Show More</a>
|
|
298
|
+
<a href="../components/slider.html">Slider</a>
|
|
288
299
|
<a href="../components/sortable.html">Sortable</a>
|
|
289
300
|
<a href="../components/spinner.html">Spinner</a>
|
|
290
301
|
<a href="../components/split.html">Split</a>
|
|
@@ -293,6 +304,7 @@
|
|
|
293
304
|
<a href="../components/tags.html">Tags</a>
|
|
294
305
|
<a href="../components/theme-select.html">Theme Select</a>
|
|
295
306
|
<a href="../components/theme-switcher.html">Theme Switcher</a>
|
|
307
|
+
<a href="../components/time.html">Time</a>
|
|
296
308
|
<a href="../components/timestamp.html">Timestamp</a>
|
|
297
309
|
<a href="../components/toast.html">Toast</a>
|
|
298
310
|
<a href="../components/toggle.html">Toggle</a>
|
package/docs/index.html
CHANGED
|
@@ -62,6 +62,9 @@
|
|
|
62
62
|
href="./components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
|
|
63
63
|
<k-filter-item filter-keywords="aside sidebar components"><a
|
|
64
64
|
href="./components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
|
|
65
|
+
<k-filter-item filter-keywords="calendar date picker range month day components"><a
|
|
66
|
+
href="./components/calendar.html"
|
|
67
|
+
>Calendar<br><small>Component</small></a></k-filter-item>
|
|
65
68
|
<k-filter-item filter-keywords="card components"><a
|
|
66
69
|
href="./components/card.html">Card<br><small>Component</small></a></k-filter-item>
|
|
67
70
|
<k-filter-item filter-keywords="code editor codeeditor monaco components"><a
|
|
@@ -111,6 +114,9 @@
|
|
|
111
114
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
112
115
|
href="./components/show-more.html"
|
|
113
116
|
>Show More<br><small>Component</small></a></k-filter-item>
|
|
117
|
+
<k-filter-item filter-keywords="slider range input step components"><a
|
|
118
|
+
href="./components/slider.html"
|
|
119
|
+
>Slider<br><small>Component</small></a></k-filter-item>
|
|
114
120
|
<k-filter-item filter-keywords="sortable drag drop sort components"><a
|
|
115
121
|
href="./components/sortable.html"
|
|
116
122
|
>Sortable<br><small>Component</small></a></k-filter-item>
|
|
@@ -172,6 +178,9 @@
|
|
|
172
178
|
<k-filter-item filter-keywords="theme switcher dark light components"><a
|
|
173
179
|
href="./components/theme-switcher.html"
|
|
174
180
|
>Theme Switcher<br><small>Component</small></a></k-filter-item>
|
|
181
|
+
<k-filter-item filter-keywords="time picker clock hour minute form components"><a
|
|
182
|
+
href="./components/time.html"
|
|
183
|
+
>Time<br><small>Component</small></a></k-filter-item>
|
|
175
184
|
<k-filter-item filter-keywords="timestamp date time components"><a
|
|
176
185
|
href="./components/timestamp.html"
|
|
177
186
|
>Timestamp<br><small>Component</small></a></k-filter-item>
|
|
@@ -266,6 +275,7 @@
|
|
|
266
275
|
<h3>Components</h3>
|
|
267
276
|
<a href="./components/accordion.html">Accordion</a>
|
|
268
277
|
<a href="./components/aside.html">Aside</a>
|
|
278
|
+
<a href="./components/calendar.html">Calendar</a>
|
|
269
279
|
<a href="./components/card.html">Card</a>
|
|
270
280
|
<a href="./components/code-editor.html">Code Editor</a>
|
|
271
281
|
<a href="./components/combobox.html">Combobox</a>
|
|
@@ -285,6 +295,7 @@
|
|
|
285
295
|
<a href="./components/progress.html">Progress</a>
|
|
286
296
|
<a href="./components/resize.html">Resize</a>
|
|
287
297
|
<a href="./components/show-more.html">Show More</a>
|
|
298
|
+
<a href="./components/slider.html">Slider</a>
|
|
288
299
|
<a href="./components/sortable.html">Sortable</a>
|
|
289
300
|
<a href="./components/spinner.html">Spinner</a>
|
|
290
301
|
<a href="./components/split.html">Split</a>
|
|
@@ -293,6 +304,7 @@
|
|
|
293
304
|
<a href="./components/tags.html">Tags</a>
|
|
294
305
|
<a href="./components/theme-select.html">Theme Select</a>
|
|
295
306
|
<a href="./components/theme-switcher.html">Theme Switcher</a>
|
|
307
|
+
<a href="./components/time.html">Time</a>
|
|
296
308
|
<a href="./components/timestamp.html">Timestamp</a>
|
|
297
309
|
<a href="./components/toast.html">Toast</a>
|
|
298
310
|
<a href="./components/toggle.html">Toggle</a>
|
|
@@ -486,6 +498,12 @@
|
|
|
486
498
|
<p class="tc-muted">Enhanced sidebar component with push and overlay modes.</p>
|
|
487
499
|
</a>
|
|
488
500
|
</div>
|
|
501
|
+
<div class="span-12 t-span-6 d-span-4 px">
|
|
502
|
+
<a href="./components/calendar.html" class="card mb no-link d-b">
|
|
503
|
+
<h3 class="tc-primary">Calendar</h3>
|
|
504
|
+
<p class="tc-muted">Month-grid date picker widget with single and range selection modes.</p>
|
|
505
|
+
</a>
|
|
506
|
+
</div>
|
|
489
507
|
<div class="span-12 t-span-6 d-span-4 px">
|
|
490
508
|
<a href="./components/card.html" class="card mb no-link d-b">
|
|
491
509
|
<h3 class="tc-primary">Card</h3>
|
|
@@ -600,6 +618,12 @@
|
|
|
600
618
|
<p class="tc-muted">Truncate long content with a "show more" button to expand.</p>
|
|
601
619
|
</a>
|
|
602
620
|
</div>
|
|
621
|
+
<div class="span-12 t-span-6 d-span-4 px">
|
|
622
|
+
<a href="./components/slider.html" class="card mb no-link d-b">
|
|
623
|
+
<h3 class="tc-primary">Slider</h3>
|
|
624
|
+
<p class="tc-muted">Range input with configurable min, max, and discrete step snap points.</p>
|
|
625
|
+
</a>
|
|
626
|
+
</div>
|
|
603
627
|
<div class="span-12 t-span-6 d-span-4 px">
|
|
604
628
|
<a href="./components/sortable.html" class="card mb no-link d-b">
|
|
605
629
|
<h3 class="tc-primary">Sortable</h3>
|
|
@@ -648,6 +672,12 @@
|
|
|
648
672
|
<p class="tc-muted">Toggle between light, dark, and auto theme modes.</p>
|
|
649
673
|
</a>
|
|
650
674
|
</div>
|
|
675
|
+
<div class="span-12 t-span-6 d-span-4 px">
|
|
676
|
+
<a href="./components/time.html" class="card mb no-link d-b">
|
|
677
|
+
<h3 class="tc-primary">Time</h3>
|
|
678
|
+
<p class="tc-muted">Time picker with 12/24-hour display, configurable minute increments, and form submission.</p>
|
|
679
|
+
</a>
|
|
680
|
+
</div>
|
|
651
681
|
<div class="span-12 t-span-6 d-span-4 px">
|
|
652
682
|
<a href="./components/timestamp.html" class="card mb no-link d-b">
|
|
653
683
|
<h3 class="tc-primary">Timestamp</h3>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import{html as e,css as t}from"../lit-all.min.js";import a from"./ShadowComponent.js";const i=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Su","Mo","Tu","We","Th","Fr","Sa"];export default class r extends a{static formAssociated=!0;static properties={value:{type:String,reflect:!0},name:{type:String,reflect:!0},mode:{type:String,reflect:!0},min:{type:String,reflect:!0},max:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},required:{type:Boolean,reflect:!0},view:{state:!0},hoverDate:{state:!0}};constructor(){super(),this.internals=this.attachInternals(),this.value="",this.name="",this.mode="single",this.min="",this.max="",this.disabled=!1,this.required=!1;const e=new Date;this.view=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`,this.hoverDate=null}#e=!1;updated(e){if(super.updated(e),this.internals.setFormValue(this.value),this.required&&!this.value?this.internals.setValidity({valueMissing:!0},"Please select a date.",this.shadowRoot?.querySelector(".day")):this.internals.setValidity({}),e.has("value")&&void 0!==e.get("value")&&this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0})),e.has("value")&&this.value&&!this.#e){const e=this.fromIso(this.value.split(",")[0]);if(e){const t=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`;t!==this.view&&(this.view=t)}}this.#e=!1}get isRange(){return"range"===this.mode}get viewYear(){return Number(this.view.split("-")[0])}get viewMonth(){return Number(this.view.split("-")[1])-1}get parsed(){if(!this.value)return this.isRange?{start:null,end:null}:{date:null};if(this.isRange){const[e,t]=this.value.split(",");return{start:e?this.fromIso(e):null,end:t?this.fromIso(t):null}}return{date:this.fromIso(this.value)}}toIso=e=>e?`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:"";fromIso=e=>{if(!e)return null;const[t,a,i]=e.split("-").map(Number);return isNaN(t)||isNaN(a)||isNaN(i)?null:new Date(t,a-1,i)};isSameDay=(e,t)=>!(!e||!t)&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate());isWithinRange=(e,t,a)=>{if(!t||!a||!e)return!1;const i=e.getTime();return i>t.getTime()&&i<a.getTime()};resolveDate=e=>{if(!e)return null;const t=String(e).toLowerCase();if("today"===t||"tomorrow"===t||"yesterday"===t){const e=new Date;return e.setHours(0,0,0,0),"tomorrow"===t&&e.setDate(e.getDate()+1),"yesterday"===t&&e.setDate(e.getDate()-1),e}return this.fromIso(e)};get minDate(){return this.resolveDate(this.min)||this.fromIso("1900-01-01")}get maxDate(){if(this.max)return this.resolveDate(this.max);const e=new Date;return new Date(e.getFullYear()+10,11,31)}isDisabledDate=e=>{if(!e)return!1;const t=this.minDate;if(t&&e<t)return!0;const a=this.maxDate;return!!(a&&e>a)};get availableYears(){const e=this.minDate?.getFullYear()??1900,t=this.maxDate?.getFullYear()??(new Date).getFullYear()+10,a=[];for(let i=e;i<=t;i++)a.push(i);return a}isMonthDisabled=(e,t)=>{const a=new Date(e,t+1,0),i=new Date(e,t,1),s=this.minDate,r=this.maxDate;return!!(s&&a<s)||!!(r&&i>r)};get weekGrid(){const e=this.viewYear,t=this.viewMonth,a=new Date(e,t,1).getDay(),i=new Date(e,t,1-a),s=[];for(let e=0;e<6;e++){const t=[];for(let a=0;a<7;a++){const s=new Date(i);s.setDate(i.getDate()+7*e+a),t.push(s)}s.push(t)}return s}get monthLabel(){return`${i[this.viewMonth]} ${this.viewYear}`}prevMonth=()=>{const e=new Date(this.viewYear,this.viewMonth-1,1);this.view=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`};nextMonth=()=>{const e=new Date(this.viewYear,this.viewMonth+1,1);this.view=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`};goToMonth=(e,t)=>{this.view=`${e}-${String(t+1).padStart(2,"0")}`};goToToday=()=>{const e=new Date;this.view=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`};handleDayClick=e=>{if(!this.disabled&&!this.isDisabledDate(e))if(this.#e=!0,this.isRange){const{start:t,end:a}=this.parsed;this.value=!t||a?this.toIso(e):e<t?`${this.toIso(e)},${this.toIso(t)}`:`${this.toIso(t)},${this.toIso(e)}`}else this.value=this.toIso(e)};handleDayHover=e=>{this.isRange&&(this.hoverDate=e)};handleMouseLeave=()=>{this.isRange&&(this.hoverDate=null)};handleMonthChange=e=>{this.goToMonth(this.viewYear,Number(e.target.value))};handleYearChange=e=>{this.goToMonth(Number(e.target.value),this.viewMonth)};render(){const t=new Date,a=this.parsed,r=a.date,n=a.start,o=a.end,l=this.isRange&&n&&!o&&this.hoverDate?this.hoverDate:o,d=this.isRange&&n&&l&&n>l?l:n,h=this.isRange&&n&&l&&n>l?n:l;return e`
|
|
2
|
+
<div class="header">
|
|
3
|
+
<select
|
|
4
|
+
class="month-select"
|
|
5
|
+
aria-label="Month"
|
|
6
|
+
?disabled=${this.disabled}
|
|
7
|
+
@change=${this.handleMonthChange}
|
|
8
|
+
>
|
|
9
|
+
${i.map((t,a)=>e`
|
|
10
|
+
<option
|
|
11
|
+
value=${a}
|
|
12
|
+
?selected=${a===this.viewMonth}
|
|
13
|
+
?disabled=${this.isMonthDisabled(this.viewYear,a)}
|
|
14
|
+
>${t}</option>
|
|
15
|
+
`)}
|
|
16
|
+
</select>
|
|
17
|
+
<select
|
|
18
|
+
class="year-select"
|
|
19
|
+
aria-label="Year"
|
|
20
|
+
?disabled=${this.disabled}
|
|
21
|
+
@change=${this.handleYearChange}
|
|
22
|
+
>
|
|
23
|
+
${this.availableYears.map(t=>e`
|
|
24
|
+
<option value=${t} ?selected=${t===this.viewYear}>${t}</option>
|
|
25
|
+
`)}
|
|
26
|
+
</select>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="grid" @mouseleave=${this.handleMouseLeave}>
|
|
29
|
+
<div class="row head">
|
|
30
|
+
${s.map(t=>e`<div class="dow">${t}</div>`)}
|
|
31
|
+
</div>
|
|
32
|
+
${this.weekGrid.map(a=>e`
|
|
33
|
+
<div class="row">
|
|
34
|
+
${a.map(a=>{const i=a.getMonth()!==this.viewMonth,s=this.isSameDay(a,t),n=!this.isRange&&this.isSameDay(a,r),l=this.isRange&&this.isSameDay(a,d),g=this.isRange&&this.isSameDay(a,h),u=this.isRange&&this.isWithinRange(a,d,h),c=this.isDisabledDate(a),v=["day",i?"outside":"",s?"today":"",n?"selected":"",l?"range-start":"",g&&!l?"range-end":"",u?"in-range":"",this.isRange&&!o&&(l||g||u)&&!n?"preview":"",c?"disabled":""].filter(Boolean).join(" ");return e`
|
|
35
|
+
<button
|
|
36
|
+
type="button"
|
|
37
|
+
class="no-btn ${v}"
|
|
38
|
+
?disabled=${c||this.disabled}
|
|
39
|
+
aria-selected=${n||l||g?"true":"false"}
|
|
40
|
+
@click=${()=>this.handleDayClick(a)}
|
|
41
|
+
@mouseenter=${()=>this.handleDayHover(a)}
|
|
42
|
+
>${a.getDate()}</button>
|
|
43
|
+
`})}
|
|
44
|
+
</div>
|
|
45
|
+
`)}
|
|
46
|
+
</div>
|
|
47
|
+
`}static styles=t`
|
|
48
|
+
:host {
|
|
49
|
+
--day_size: 2rem;
|
|
50
|
+
--day_radius: var(--radius);
|
|
51
|
+
--day_bg__selected: var(--c_primary);
|
|
52
|
+
--day_tc__selected: white;
|
|
53
|
+
--day_bg__range: var(--c_bg__alt);
|
|
54
|
+
--day_bg__hover: var(--c_bg__alt);
|
|
55
|
+
|
|
56
|
+
display: inline-block;
|
|
57
|
+
border: 1px solid var(--c_border);
|
|
58
|
+
border-radius: var(--radius);
|
|
59
|
+
padding: 0.5rem;
|
|
60
|
+
background: var(--c_bg);
|
|
61
|
+
user-select: none;
|
|
62
|
+
}
|
|
63
|
+
:host([disabled]) {
|
|
64
|
+
opacity: 0.5;
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
}
|
|
67
|
+
.header {
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 0.25rem;
|
|
71
|
+
padding: 0.25rem;
|
|
72
|
+
margin-bottom: 0.25rem;
|
|
73
|
+
}
|
|
74
|
+
.month-select,
|
|
75
|
+
.year-select {
|
|
76
|
+
font-weight: 600;
|
|
77
|
+
width: auto;
|
|
78
|
+
}
|
|
79
|
+
.month-select {
|
|
80
|
+
flex: 1;
|
|
81
|
+
}
|
|
82
|
+
.grid {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
}
|
|
86
|
+
.row {
|
|
87
|
+
display: grid;
|
|
88
|
+
grid-template-columns: repeat(7, var(--day_size));
|
|
89
|
+
}
|
|
90
|
+
.row.head {
|
|
91
|
+
margin-bottom: 0.25rem;
|
|
92
|
+
}
|
|
93
|
+
.dow {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
font-size: 0.75rem;
|
|
98
|
+
color: var(--tc_muted);
|
|
99
|
+
font-weight: 500;
|
|
100
|
+
height: var(--day_size);
|
|
101
|
+
}
|
|
102
|
+
.day {
|
|
103
|
+
appearance: none;
|
|
104
|
+
background: transparent;
|
|
105
|
+
border: 1px solid transparent;
|
|
106
|
+
border-radius: var(--day_radius);
|
|
107
|
+
width: var(--day_size);
|
|
108
|
+
height: var(--day_size);
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
color: var(--tc);
|
|
111
|
+
font: inherit;
|
|
112
|
+
font-size: 0.875rem;
|
|
113
|
+
padding: 0;
|
|
114
|
+
position: relative;
|
|
115
|
+
display: inline-flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
transition: background var(--animation_ms), color var(--animation_ms);
|
|
119
|
+
}
|
|
120
|
+
.day:hover:not(:disabled):not(.selected):not(.range-start):not(.range-end) {
|
|
121
|
+
background: var(--day_bg__hover);
|
|
122
|
+
}
|
|
123
|
+
.day:focus-visible {
|
|
124
|
+
outline: none;
|
|
125
|
+
border-color: var(--c_primary);
|
|
126
|
+
box-shadow: var(--focus_shadow);
|
|
127
|
+
z-index: 1;
|
|
128
|
+
}
|
|
129
|
+
.day.outside {
|
|
130
|
+
color: var(--tc_muted);
|
|
131
|
+
opacity: 0.5;
|
|
132
|
+
}
|
|
133
|
+
.day.today {
|
|
134
|
+
font-weight: 700;
|
|
135
|
+
border-color: var(--c_primary);
|
|
136
|
+
}
|
|
137
|
+
.day.selected,
|
|
138
|
+
.day.in-range,
|
|
139
|
+
.day.range-start,
|
|
140
|
+
.day.range-end {
|
|
141
|
+
background: var(--day_bg__selected);
|
|
142
|
+
color: var(--day_tc__selected);
|
|
143
|
+
border-color: transparent;
|
|
144
|
+
}
|
|
145
|
+
.day.in-range {
|
|
146
|
+
border-radius: 0;
|
|
147
|
+
}
|
|
148
|
+
.day.range-start:not(.range-end) {
|
|
149
|
+
border-top-right-radius: 0;
|
|
150
|
+
border-bottom-right-radius: 0;
|
|
151
|
+
}
|
|
152
|
+
.day.range-end:not(.range-start) {
|
|
153
|
+
border-top-left-radius: 0;
|
|
154
|
+
border-bottom-left-radius: 0;
|
|
155
|
+
}
|
|
156
|
+
.day.outside.in-range,
|
|
157
|
+
.day.outside.range-start,
|
|
158
|
+
.day.outside.range-end {
|
|
159
|
+
opacity: 0.6;
|
|
160
|
+
}
|
|
161
|
+
.day.preview.in-range,
|
|
162
|
+
.day.preview.range-start,
|
|
163
|
+
.day.preview.range-end {
|
|
164
|
+
opacity: 0.75;
|
|
165
|
+
}
|
|
166
|
+
.day:disabled {
|
|
167
|
+
opacity: 0.3;
|
|
168
|
+
cursor: not-allowed;
|
|
169
|
+
}
|
|
170
|
+
`}customElements.define("k-calendar",r);
|