kempo-ui 0.3.14 → 0.3.16
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/Combobox.js +97 -0
- package/dist/components/Option.js +1 -0
- package/dist/components/ThemeSwitcher.js +77 -14
- package/docs/components/accordion.html +282 -94
- package/docs/components/aside.html +282 -94
- package/docs/components/card.html +282 -94
- package/docs/components/code-editor.html +282 -94
- package/docs/components/color-picker.html +282 -94
- package/docs/components/combobox.html +798 -0
- package/docs/components/content-slider.html +282 -94
- package/docs/components/context.html +282 -94
- package/docs/components/dialog.html +282 -94
- package/docs/components/dropdown.html +282 -94
- package/docs/components/filter-list.html +282 -94
- package/docs/components/focus-capture.html +282 -94
- package/docs/components/html-editor.html +282 -94
- package/docs/components/hybrid-component.html +282 -94
- package/docs/components/icon.html +282 -94
- package/docs/components/import.html +282 -94
- package/docs/components/light-component.html +282 -94
- package/docs/components/nav-spacer.html +282 -94
- package/docs/components/nav.html +282 -94
- package/docs/components/photo-viewer.html +282 -94
- package/docs/components/resize.html +282 -94
- package/docs/components/shadow-component.html +282 -94
- package/docs/components/show-more.html +282 -94
- package/docs/components/sortable.html +282 -94
- package/docs/components/spinner.html +282 -94
- package/docs/components/split.html +282 -94
- package/docs/components/table.html +282 -94
- package/docs/components/tableControls.html +282 -94
- package/docs/components/tableCustomFields.html +282 -94
- package/docs/components/tableFetchRecords.html +282 -94
- package/docs/components/tableFieldSortHide.html +282 -94
- package/docs/components/tablePagination.html +282 -94
- package/docs/components/tablePlaceholder.html +282 -94
- package/docs/components/tableRecordEditing.html +282 -94
- package/docs/components/tableRecordFiltering.html +282 -94
- package/docs/components/tableRecordHiding.html +282 -94
- package/docs/components/tableRecordSearching.html +282 -94
- package/docs/components/tableRecordSelection.html +282 -94
- package/docs/components/tableRowControls.html +282 -94
- package/docs/components/tableServerSync.html +282 -94
- package/docs/components/tableSorting.html +282 -94
- package/docs/components/tabs.html +282 -94
- package/docs/components/tags.html +282 -94
- package/docs/components/theme-select.html +282 -94
- package/docs/components/theme-switcher-aside.html +47 -0
- package/docs/components/theme-switcher.html +441 -101
- package/docs/components/timestamp.html +282 -94
- package/docs/components/toast.html +282 -94
- package/docs/components/toggle.html +282 -94
- package/docs/components/tree.html +282 -94
- package/docs/index.html +288 -94
- package/docs/src/components/Combobox.js +97 -0
- package/docs/src/components/Option.js +1 -0
- package/docs/src/components/ThemeSwitcher.js +77 -14
- package/docs/utils/context.html +282 -94
- package/docs/utils/cookie.html +282 -94
- package/docs/utils/debounce.html +282 -94
- package/docs/utils/drag.html +282 -94
- package/docs/utils/elevation.html +282 -94
- package/docs/utils/formatTimestamp.html +282 -94
- package/docs/utils/object.html +282 -94
- package/docs/utils/propConverters.html +282 -94
- package/docs/utils/string.html +282 -94
- package/docs/utils/theme.html +282 -94
- package/docs/utils/toTitleCase.html +282 -94
- package/docs/utils/type.html +282 -94
- package/docs/utils/wait.html +282 -94
- package/docs-src/components/combobox.page.html +358 -0
- package/docs-src/components/theme-switcher-aside.page.html +35 -0
- package/docs-src/components/theme-switcher.page.html +159 -7
- package/docs-src/index.page.html +6 -0
- package/docs-src/nav.fragment.html +283 -95
- package/llms.txt +2 -1
- package/package.json +1 -1
- package/src/components/Combobox.js +338 -0
- package/src/components/Option.js +19 -0
- package/src/components/ThemeSwitcher.js +171 -24
- package/tests/components/Combobox.browser-test.js +790 -0
- package/tests/components/ThemeSwitcher.browser-test.js +361 -33
|
@@ -15,93 +15,249 @@
|
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
|
|
18
|
-
<k-nav
|
|
19
|
-
|
|
18
|
+
<k-nav
|
|
19
|
+
fixed
|
|
20
|
+
class="bg-primary"
|
|
21
|
+
>
|
|
22
|
+
<button
|
|
23
|
+
id="toggleNavSideMenu"
|
|
24
|
+
class="link"
|
|
25
|
+
>
|
|
20
26
|
<k-icon name="menu"></k-icon>
|
|
21
27
|
</button>
|
|
22
|
-
<a
|
|
23
|
-
|
|
28
|
+
<a
|
|
29
|
+
href="../"
|
|
30
|
+
class="d-if ph"
|
|
31
|
+
style="align-items: center"
|
|
32
|
+
>
|
|
33
|
+
<img
|
|
34
|
+
src="../media/icon32.png"
|
|
35
|
+
alt="Kempo UI Icon"
|
|
36
|
+
class="pr"
|
|
37
|
+
/>
|
|
24
38
|
Kempo UI
|
|
25
39
|
</a>
|
|
26
|
-
<div
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<k-filter-item filter-keywords="
|
|
48
|
-
|
|
49
|
-
<k-filter-item filter-keywords="
|
|
50
|
-
|
|
51
|
-
<k-filter-item filter-keywords="
|
|
52
|
-
|
|
53
|
-
<k-filter-item filter-keywords="
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<k-filter-item filter-keywords="
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<k-filter-item filter-keywords="
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<k-filter-item filter-keywords="
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<k-filter-item filter-keywords="
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<k-filter-item filter-keywords="
|
|
69
|
-
|
|
70
|
-
<k-filter-item filter-keywords="
|
|
71
|
-
|
|
72
|
-
<k-filter-item filter-keywords="
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<k-filter-item filter-keywords="
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<k-filter-item filter-keywords="
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<k-filter-item filter-keywords="
|
|
82
|
-
|
|
83
|
-
<k-filter-item filter-keywords="
|
|
84
|
-
|
|
85
|
-
<k-filter-item filter-keywords="
|
|
86
|
-
|
|
87
|
-
<k-filter-item filter-keywords="
|
|
88
|
-
|
|
89
|
-
|
|
40
|
+
<div
|
|
41
|
+
style="position:relative;margin:0 .25rem;align-self:center;"
|
|
42
|
+
theme="light"
|
|
43
|
+
>
|
|
44
|
+
<input
|
|
45
|
+
id="navSearchInput"
|
|
46
|
+
type="search"
|
|
47
|
+
placeholder="Search docs..."
|
|
48
|
+
autocomplete="off"
|
|
49
|
+
style="width:11rem;"
|
|
50
|
+
/>
|
|
51
|
+
<div
|
|
52
|
+
id="navSearchDropdown"
|
|
53
|
+
hidden
|
|
54
|
+
theme="light"
|
|
55
|
+
style="position:absolute;top:calc(100% + 4px);left:0;width:min(480px,90vw);max-height:70vh;background:var(--c_bg);border:1px solid var(--c_border);border-radius:var(--radius);overflow:auto;z-index:9999;box-shadow:0 4px 12px rgba(0,0,0,.3);"
|
|
56
|
+
>
|
|
57
|
+
<k-filter-list
|
|
58
|
+
id="navSearchList"
|
|
59
|
+
style="display:block;padding:.25rem 0;"
|
|
60
|
+
>
|
|
61
|
+
<k-filter-item filter-keywords="accordion components"><a
|
|
62
|
+
href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
|
|
63
|
+
<k-filter-item filter-keywords="aside sidebar components"><a
|
|
64
|
+
href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
|
|
65
|
+
<k-filter-item filter-keywords="card components"><a
|
|
66
|
+
href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
|
|
67
|
+
<k-filter-item filter-keywords="code editor codeeditor monaco components"><a
|
|
68
|
+
href="../components/code-editor.html"
|
|
69
|
+
>Code Editor<br><small>Component</small></a></k-filter-item>
|
|
70
|
+
<k-filter-item filter-keywords="combobox combo box search autocomplete components"><a
|
|
71
|
+
href="../components/combobox.html"
|
|
72
|
+
>Combobox<br><small>Component</small></a></k-filter-item>
|
|
73
|
+
<k-filter-item filter-keywords="color picker colorpicker components"><a
|
|
74
|
+
href="../components/color-picker.html"
|
|
75
|
+
>Color Picker<br><small>Component</small></a></k-filter-item>
|
|
76
|
+
<k-filter-item filter-keywords="content slider components"><a
|
|
77
|
+
href="../components/content-slider.html"
|
|
78
|
+
>Content Slider<br><small>Component</small></a></k-filter-item>
|
|
79
|
+
<k-filter-item filter-keywords="context state global components"><a
|
|
80
|
+
href="../components/context.html"
|
|
81
|
+
>Context<br><small>Component</small></a></k-filter-item>
|
|
82
|
+
<k-filter-item filter-keywords="dialog modal popup components"><a
|
|
83
|
+
href="../components/dialog.html">Dialog<br><small>Component</small></a></k-filter-item>
|
|
84
|
+
<k-filter-item filter-keywords="dropdown select components"><a
|
|
85
|
+
href="../components/dropdown.html">Dropdown<br><small>Component</small></a></k-filter-item>
|
|
86
|
+
<k-filter-item filter-keywords="filter list filterlist components"><a
|
|
87
|
+
href="../components/filter-list.html"
|
|
88
|
+
>Filter List<br><small>Component</small></a></k-filter-item>
|
|
89
|
+
<k-filter-item filter-keywords="focus capture focuscapture components"><a
|
|
90
|
+
href="../components/focus-capture.html"
|
|
91
|
+
>Focus Capture<br><small>Component</small></a></k-filter-item>
|
|
92
|
+
<k-filter-item filter-keywords="html editor components"><a
|
|
93
|
+
href="../components/html-editor.html">HTML
|
|
94
|
+
Editor<br><small>Component</small></a></k-filter-item>
|
|
95
|
+
<k-filter-item filter-keywords="icon components"><a
|
|
96
|
+
href="../components/icon.html">Icon<br><small>Component</small></a></k-filter-item>
|
|
97
|
+
<k-filter-item filter-keywords="import components"><a
|
|
98
|
+
href="../components/import.html">Import<br><small>Component</small></a></k-filter-item>
|
|
99
|
+
<k-filter-item filter-keywords="nav navbar navigation components"><a
|
|
100
|
+
href="../components/nav.html">Nav<br><small>Component</small></a></k-filter-item>
|
|
101
|
+
<k-filter-item filter-keywords="nav spacer navbar spacer navspacer components"><a
|
|
102
|
+
href="../components/nav-spacer.html"
|
|
103
|
+
>Nav Spacer<br><small>Component</small></a></k-filter-item>
|
|
104
|
+
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
|
+
href="../components/photo-viewer.html"
|
|
106
|
+
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="resize components"><a
|
|
108
|
+
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
|
+
<k-filter-item filter-keywords="show more showmore components"><a
|
|
110
|
+
href="../components/show-more.html"
|
|
111
|
+
>Show More<br><small>Component</small></a></k-filter-item>
|
|
112
|
+
<k-filter-item filter-keywords="sortable drag drop sort components"><a
|
|
113
|
+
href="../components/sortable.html"
|
|
114
|
+
>Sortable<br><small>Component</small></a></k-filter-item>
|
|
115
|
+
<k-filter-item filter-keywords="spinner loading components"><a
|
|
116
|
+
href="../components/spinner.html">Spinner<br><small>Component</small></a></k-filter-item>
|
|
117
|
+
<k-filter-item filter-keywords="split pane components"><a
|
|
118
|
+
href="../components/split.html">Split<br><small>Component</small></a></k-filter-item>
|
|
119
|
+
<k-filter-item filter-keywords="table data grid components"><a
|
|
120
|
+
href="../components/table.html">Table<br><small>Component</small></a></k-filter-item>
|
|
121
|
+
<k-filter-item filter-keywords="table controls advanced example"><a
|
|
122
|
+
href="../components/tableControls.html"
|
|
123
|
+
>Table — Controls<br><small>Advanced Example</small></a></k-filter-item>
|
|
124
|
+
<k-filter-item filter-keywords="table custom fields advanced example"><a
|
|
125
|
+
href="../components/tableCustomFields.html"
|
|
126
|
+
>Table — Custom Fields<br><small>Advanced Example</small></a></k-filter-item>
|
|
127
|
+
<k-filter-item filter-keywords="table fetch records advanced example"><a
|
|
128
|
+
href="../components/tableFetchRecords.html"
|
|
129
|
+
>Table — Fetch Records<br><small>Advanced Example</small></a></k-filter-item>
|
|
130
|
+
<k-filter-item filter-keywords="table field sort hide advanced example"><a
|
|
131
|
+
href="../components/tableFieldSortHide.html"
|
|
132
|
+
>Table — Field Sort & Hide<br><small>Advanced Example</small></a></k-filter-item>
|
|
133
|
+
<k-filter-item filter-keywords="table pagination advanced example"><a
|
|
134
|
+
href="../components/tablePagination.html"
|
|
135
|
+
>Table — Pagination<br><small>Advanced Example</small></a></k-filter-item>
|
|
136
|
+
<k-filter-item filter-keywords="table record editing advanced example"><a
|
|
137
|
+
href="../components/tableRecordEditing.html"
|
|
138
|
+
>Table — Record Editing<br><small>Advanced Example</small></a></k-filter-item>
|
|
139
|
+
<k-filter-item filter-keywords="table record filtering advanced example"><a
|
|
140
|
+
href="../components/tableRecordFiltering.html"
|
|
141
|
+
>Table — Record Filtering<br><small>Advanced Example</small></a></k-filter-item>
|
|
142
|
+
<k-filter-item filter-keywords="table record hiding advanced example"><a
|
|
143
|
+
href="../components/tableRecordHiding.html"
|
|
144
|
+
>Table — Record Hiding<br><small>Advanced Example</small></a></k-filter-item>
|
|
145
|
+
<k-filter-item filter-keywords="table record searching advanced example"><a
|
|
146
|
+
href="../components/tableRecordSearching.html"
|
|
147
|
+
>Table — Record Searching<br><small>Advanced Example</small></a></k-filter-item>
|
|
148
|
+
<k-filter-item filter-keywords="table record selection advanced example"><a
|
|
149
|
+
href="../components/tableRecordSelection.html"
|
|
150
|
+
>Table — Record Selection<br><small>Advanced Example</small></a></k-filter-item>
|
|
151
|
+
<k-filter-item filter-keywords="table row controls advanced example"><a
|
|
152
|
+
href="../components/tableRowControls.html"
|
|
153
|
+
>Table — Row Controls<br><small>Advanced Example</small></a></k-filter-item>
|
|
154
|
+
<k-filter-item filter-keywords="table server sync advanced example"><a
|
|
155
|
+
href="../components/tableServerSync.html"
|
|
156
|
+
>Table — Server Sync<br><small>Advanced Example</small></a></k-filter-item>
|
|
157
|
+
<k-filter-item filter-keywords="table sorting advanced example"><a
|
|
158
|
+
href="../components/tableSorting.html"
|
|
159
|
+
>Table — Sorting<br><small>Advanced Example</small></a></k-filter-item>
|
|
160
|
+
<k-filter-item filter-keywords="table placeholder advanced example"><a
|
|
161
|
+
href="../components/tablePlaceholder.html"
|
|
162
|
+
>Table — Placeholder<br><small>Advanced Example</small></a></k-filter-item>
|
|
163
|
+
<k-filter-item filter-keywords="tabs tab panel components"><a
|
|
164
|
+
href="../components/tabs.html">Tabs<br><small>Component</small></a></k-filter-item>
|
|
165
|
+
<k-filter-item filter-keywords="tags tag input components"><a
|
|
166
|
+
href="../components/tags.html">Tags<br><small>Component</small></a></k-filter-item>
|
|
167
|
+
<k-filter-item filter-keywords="theme select dropdown dark light components"><a
|
|
168
|
+
href="../components/theme-select.html"
|
|
169
|
+
>Theme Select<br><small>Component</small></a></k-filter-item>
|
|
170
|
+
<k-filter-item filter-keywords="theme switcher dark light components"><a
|
|
171
|
+
href="../components/theme-switcher.html"
|
|
172
|
+
>Theme Switcher<br><small>Component</small></a></k-filter-item>
|
|
173
|
+
<k-filter-item filter-keywords="timestamp date time components"><a
|
|
174
|
+
href="../components/timestamp.html"
|
|
175
|
+
>Timestamp<br><small>Component</small></a></k-filter-item>
|
|
176
|
+
<k-filter-item filter-keywords="toast notification alert components"><a
|
|
177
|
+
href="../components/toast.html"
|
|
178
|
+
>Toast<br><small>Component</small></a></k-filter-item>
|
|
179
|
+
<k-filter-item filter-keywords="toggle switch checkbox components"><a
|
|
180
|
+
href="../components/toggle.html"
|
|
181
|
+
>Toggle<br><small>Component</small></a></k-filter-item>
|
|
182
|
+
<k-filter-item filter-keywords="tree treeview components"><a
|
|
183
|
+
href="../components/tree.html">Tree<br><small>Component</small></a></k-filter-item>
|
|
184
|
+
<k-filter-item filter-keywords="shadow component base"><a
|
|
185
|
+
href="../components/shadow-component.html"
|
|
186
|
+
>Shadow Component<br><small>Base Component</small></a></k-filter-item>
|
|
187
|
+
<k-filter-item filter-keywords="light component base"><a
|
|
188
|
+
href="../components/light-component.html">Light Component<br><small>Base
|
|
189
|
+
Component</small></a></k-filter-item>
|
|
190
|
+
<k-filter-item filter-keywords="hybrid component base"><a
|
|
191
|
+
href="../components/hybrid-component.html"
|
|
192
|
+
>Hybrid Component<br><small>Base Component</small></a></k-filter-item>
|
|
193
|
+
<k-filter-item filter-keywords="cookie utils utility"><a
|
|
194
|
+
href="../utils/cookie.html">cookie<br><small>Utility</small></a></k-filter-item>
|
|
195
|
+
<k-filter-item filter-keywords="context utils utility"><a
|
|
196
|
+
href="../utils/context.html">context<br><small>Utility</small></a></k-filter-item>
|
|
197
|
+
<k-filter-item filter-keywords="debounce utils utility"><a
|
|
198
|
+
href="../utils/debounce.html">debounce<br><small>Utility</small></a></k-filter-item>
|
|
199
|
+
<k-filter-item filter-keywords="drag utils utility"><a
|
|
200
|
+
href="../utils/drag.html">drag<br><small>Utility</small></a></k-filter-item>
|
|
201
|
+
<k-filter-item filter-keywords="elevation z-index stacking utils"><a
|
|
202
|
+
href="../utils/elevation.html">elevation<br><small>Utility</small></a></k-filter-item>
|
|
203
|
+
<k-filter-item filter-keywords="formattimestamp timestamp format date time utils utility"><a
|
|
204
|
+
href="../utils/formatTimestamp.html"
|
|
205
|
+
>formatTimestamp<br><small>Utility</small></a></k-filter-item>
|
|
206
|
+
<k-filter-item filter-keywords="object utils utility"><a
|
|
207
|
+
href="../utils/object.html">object<br><small>Utility</small></a></k-filter-item>
|
|
208
|
+
<k-filter-item filter-keywords="propconverters prop converters utils utility"><a
|
|
209
|
+
href="../utils/propConverters.html"
|
|
210
|
+
>propConverters<br><small>Utility</small></a></k-filter-item>
|
|
211
|
+
<k-filter-item filter-keywords="string utils utility"><a
|
|
212
|
+
href="../utils/string.html">string<br><small>Utility</small></a></k-filter-item>
|
|
213
|
+
<k-filter-item filter-keywords="theme utils utility"><a
|
|
214
|
+
href="../utils/theme.html">theme<br><small>Utility</small></a></k-filter-item>
|
|
215
|
+
<k-filter-item filter-keywords="type utils utility"><a
|
|
216
|
+
href="../utils/type.html">type<br><small>Utility</small></a></k-filter-item>
|
|
217
|
+
<k-filter-item filter-keywords="wait async utils utility"><a
|
|
218
|
+
href="../utils/wait.html">wait<br><small>Utility</small></a></k-filter-item>
|
|
90
219
|
</k-filter-list>
|
|
91
220
|
</div>
|
|
92
221
|
</div>
|
|
93
222
|
<div class="flex"></div>
|
|
94
|
-
<a
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
223
|
+
<a
|
|
224
|
+
href="https://github.com/dustinpoissant/kempo-ui?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20"
|
|
225
|
+
target="_blank"
|
|
226
|
+
><k-icon name="license"></k-icon></a>
|
|
227
|
+
<a
|
|
228
|
+
href="https://www.npmjs.com/package/kempo-ui"
|
|
229
|
+
target="_blank"
|
|
230
|
+
><k-icon name="npm"></k-icon></a>
|
|
231
|
+
<a
|
|
232
|
+
href="https://github.com/dustinpoissant/kempo-ui"
|
|
233
|
+
target="_blank"
|
|
234
|
+
><k-icon name="github-mark"></k-icon></a>
|
|
235
|
+
<k-theme-switcher
|
|
236
|
+
class="mr"
|
|
237
|
+
style="
|
|
238
|
+
--padding: 0.5rem;
|
|
239
|
+
--c_active: var(--tc_on_primary);
|
|
240
|
+
--tc_active: var(--c_primary);
|
|
241
|
+
--c_inactive__hover: rgba(255, 255, 255, 0.1);
|
|
242
|
+
"
|
|
243
|
+
></k-theme-switcher>
|
|
98
244
|
</k-nav>
|
|
99
245
|
<div style="width: 100%; height: 4rem;"></div>
|
|
100
|
-
<k-aside
|
|
246
|
+
<k-aside
|
|
247
|
+
id="navSideMenu"
|
|
248
|
+
main="overlay"
|
|
249
|
+
state="offscreen"
|
|
250
|
+
>
|
|
101
251
|
<menu>
|
|
102
|
-
<a
|
|
252
|
+
<a
|
|
253
|
+
href="../"
|
|
254
|
+
class="ta-center bb mb r0"
|
|
255
|
+
>
|
|
103
256
|
<h1 class="tc-primary">Kempo UI</h1>
|
|
104
|
-
<img
|
|
257
|
+
<img
|
|
258
|
+
src="../media/icon128.png"
|
|
259
|
+
alt="Kempo UI Icon"
|
|
260
|
+
/>
|
|
105
261
|
</a>
|
|
106
262
|
|
|
107
263
|
<div class="pl mb">
|
|
@@ -110,6 +266,7 @@
|
|
|
110
266
|
<a href="../components/aside.html">Aside</a>
|
|
111
267
|
<a href="../components/card.html">Card</a>
|
|
112
268
|
<a href="../components/code-editor.html">Code Editor</a>
|
|
269
|
+
<a href="../components/combobox.html">Combobox</a>
|
|
113
270
|
<a href="../components/color-picker.html">ColorPicker</a>
|
|
114
271
|
<a href="../components/content-slider.html">Content Slider</a>
|
|
115
272
|
<a href="../components/context.html">Context</a>
|
|
@@ -164,16 +321,47 @@
|
|
|
164
321
|
</menu>
|
|
165
322
|
</k-aside>
|
|
166
323
|
<style>
|
|
167
|
-
#navSearchList a{
|
|
168
|
-
|
|
169
|
-
|
|
324
|
+
#navSearchList a {
|
|
325
|
+
display: block;
|
|
326
|
+
padding: .25rem .5rem;
|
|
327
|
+
border-radius: var(--radius);
|
|
328
|
+
text-decoration: none;
|
|
329
|
+
color: var(--tc);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
#navSearchList a:hover {
|
|
333
|
+
background: rgba(128, 128, 128, .15);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
#navSearchList a small {
|
|
337
|
+
display: block;
|
|
338
|
+
color: var(--tc_muted);
|
|
339
|
+
}
|
|
170
340
|
</style>
|
|
171
|
-
<script
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<script
|
|
176
|
-
|
|
341
|
+
<script
|
|
342
|
+
src="../src/components/Nav.js"
|
|
343
|
+
type="module"
|
|
344
|
+
></script>
|
|
345
|
+
<script
|
|
346
|
+
src="../src/components/FilterList.js"
|
|
347
|
+
type="module"
|
|
348
|
+
></script>
|
|
349
|
+
<script
|
|
350
|
+
src="../src/components/FilterItem.js"
|
|
351
|
+
type="module"
|
|
352
|
+
></script>
|
|
353
|
+
<script
|
|
354
|
+
src="../src/components/Aside.js"
|
|
355
|
+
type="module"
|
|
356
|
+
></script>
|
|
357
|
+
<script
|
|
358
|
+
src="../src/components/Icon.js"
|
|
359
|
+
type="module"
|
|
360
|
+
></script>
|
|
361
|
+
<script
|
|
362
|
+
src="../src/components/ThemeSwitcher.js"
|
|
363
|
+
type="module"
|
|
364
|
+
></script>
|
|
177
365
|
<script type="module">
|
|
178
366
|
import debounce from '../src/utils/debounce.js';
|
|
179
367
|
|
|
@@ -182,12 +370,12 @@
|
|
|
182
370
|
document.getElementById('navSideMenu').toggle();
|
|
183
371
|
});
|
|
184
372
|
|
|
185
|
-
document.addEventListener('click', function(e) {
|
|
186
|
-
if(e.target.matches('a[href^="#"]')) {
|
|
373
|
+
document.addEventListener('click', function (e) {
|
|
374
|
+
if (e.target.matches('a[href^="#"]')) {
|
|
187
375
|
e.preventDefault();
|
|
188
376
|
const targetId = e.target.getAttribute('href').replace('#', '');
|
|
189
377
|
const target = document.getElementById(targetId);
|
|
190
|
-
if(target) {
|
|
378
|
+
if (target) {
|
|
191
379
|
target.scrollIntoView({ behavior: 'smooth' });
|
|
192
380
|
const url = window.location.pathname + window.location.search + '#' + targetId;
|
|
193
381
|
history.replaceState(null, '', url);
|
|
@@ -204,7 +392,7 @@
|
|
|
204
392
|
|
|
205
393
|
const openSearch = async () => {
|
|
206
394
|
await customElements.whenDefined('k-filter-list');
|
|
207
|
-
if(!navSearchList) navSearchList = document.getElementById('navSearchList');
|
|
395
|
+
if (!navSearchList) navSearchList = document.getElementById('navSearchList');
|
|
208
396
|
navSearchList.filter(searchInput.value);
|
|
209
397
|
searchDropdown.hidden = false;
|
|
210
398
|
};
|
|
@@ -221,11 +409,11 @@
|
|
|
221
409
|
}, 150));
|
|
222
410
|
|
|
223
411
|
searchInput.addEventListener('keydown', e => {
|
|
224
|
-
if(e.key === 'Escape') {
|
|
412
|
+
if (e.key === 'Escape') {
|
|
225
413
|
searchInput.value = '';
|
|
226
414
|
searchInput.blur();
|
|
227
415
|
closeSearch();
|
|
228
|
-
} else if(e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === 'Enter') {
|
|
416
|
+
} else if (e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === 'Enter') {
|
|
229
417
|
navSearchList?.handleKeydown(e);
|
|
230
418
|
}
|
|
231
419
|
});
|
|
@@ -236,11 +424,11 @@
|
|
|
236
424
|
|
|
237
425
|
document.addEventListener('keydown', e => {
|
|
238
426
|
let active = document.activeElement;
|
|
239
|
-
while(active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
|
|
427
|
+
while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
|
|
240
428
|
const tag = active?.tagName;
|
|
241
|
-
if(tag === 'INPUT' || tag === 'TEXTAREA' || active?.isContentEditable) return;
|
|
242
|
-
if(e.metaKey || e.ctrlKey || e.altKey) return;
|
|
243
|
-
if(e.key.length === 1) {
|
|
429
|
+
if (tag === 'INPUT' || tag === 'TEXTAREA' || active?.isContentEditable) return;
|
|
430
|
+
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
|
431
|
+
if (e.key.length === 1) {
|
|
244
432
|
searchInput.focus();
|
|
245
433
|
}
|
|
246
434
|
});
|