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
|
@@ -53,93 +53,249 @@
|
|
|
53
53
|
</head>
|
|
54
54
|
<body>
|
|
55
55
|
|
|
56
|
-
<k-nav
|
|
57
|
-
|
|
56
|
+
<k-nav
|
|
57
|
+
fixed
|
|
58
|
+
class="bg-primary"
|
|
59
|
+
>
|
|
60
|
+
<button
|
|
61
|
+
id="toggleNavSideMenu"
|
|
62
|
+
class="link"
|
|
63
|
+
>
|
|
58
64
|
<k-icon name="menu"></k-icon>
|
|
59
65
|
</button>
|
|
60
|
-
<a
|
|
61
|
-
|
|
66
|
+
<a
|
|
67
|
+
href="../"
|
|
68
|
+
class="d-if ph"
|
|
69
|
+
style="align-items: center"
|
|
70
|
+
>
|
|
71
|
+
<img
|
|
72
|
+
src="../media/icon32.png"
|
|
73
|
+
alt="Kempo UI Icon"
|
|
74
|
+
class="pr"
|
|
75
|
+
/>
|
|
62
76
|
Kempo UI
|
|
63
77
|
</a>
|
|
64
|
-
<div
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<k-filter-item filter-keywords="
|
|
86
|
-
|
|
87
|
-
<k-filter-item filter-keywords="
|
|
88
|
-
|
|
89
|
-
<k-filter-item filter-keywords="
|
|
90
|
-
|
|
91
|
-
<k-filter-item filter-keywords="
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<k-filter-item filter-keywords="
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<k-filter-item filter-keywords="
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<k-filter-item filter-keywords="
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
<k-filter-item filter-keywords="
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<k-filter-item filter-keywords="
|
|
107
|
-
|
|
108
|
-
<k-filter-item filter-keywords="
|
|
109
|
-
|
|
110
|
-
<k-filter-item filter-keywords="
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<k-filter-item filter-keywords="
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
<k-filter-item filter-keywords="
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<k-filter-item filter-keywords="
|
|
120
|
-
|
|
121
|
-
<k-filter-item filter-keywords="
|
|
122
|
-
|
|
123
|
-
<k-filter-item filter-keywords="
|
|
124
|
-
|
|
125
|
-
<k-filter-item filter-keywords="
|
|
126
|
-
|
|
127
|
-
|
|
78
|
+
<div
|
|
79
|
+
style="position:relative;margin:0 .25rem;align-self:center;"
|
|
80
|
+
theme="light"
|
|
81
|
+
>
|
|
82
|
+
<input
|
|
83
|
+
id="navSearchInput"
|
|
84
|
+
type="search"
|
|
85
|
+
placeholder="Search docs..."
|
|
86
|
+
autocomplete="off"
|
|
87
|
+
style="width:11rem;"
|
|
88
|
+
/>
|
|
89
|
+
<div
|
|
90
|
+
id="navSearchDropdown"
|
|
91
|
+
hidden
|
|
92
|
+
theme="light"
|
|
93
|
+
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);"
|
|
94
|
+
>
|
|
95
|
+
<k-filter-list
|
|
96
|
+
id="navSearchList"
|
|
97
|
+
style="display:block;padding:.25rem 0;"
|
|
98
|
+
>
|
|
99
|
+
<k-filter-item filter-keywords="accordion components"><a
|
|
100
|
+
href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
|
|
101
|
+
<k-filter-item filter-keywords="aside sidebar components"><a
|
|
102
|
+
href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
|
|
103
|
+
<k-filter-item filter-keywords="card components"><a
|
|
104
|
+
href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
|
|
105
|
+
<k-filter-item filter-keywords="code editor codeeditor monaco components"><a
|
|
106
|
+
href="../components/code-editor.html"
|
|
107
|
+
>Code Editor<br><small>Component</small></a></k-filter-item>
|
|
108
|
+
<k-filter-item filter-keywords="combobox combo box search autocomplete components"><a
|
|
109
|
+
href="../components/combobox.html"
|
|
110
|
+
>Combobox<br><small>Component</small></a></k-filter-item>
|
|
111
|
+
<k-filter-item filter-keywords="color picker colorpicker components"><a
|
|
112
|
+
href="../components/color-picker.html"
|
|
113
|
+
>Color Picker<br><small>Component</small></a></k-filter-item>
|
|
114
|
+
<k-filter-item filter-keywords="content slider components"><a
|
|
115
|
+
href="../components/content-slider.html"
|
|
116
|
+
>Content Slider<br><small>Component</small></a></k-filter-item>
|
|
117
|
+
<k-filter-item filter-keywords="context state global components"><a
|
|
118
|
+
href="../components/context.html"
|
|
119
|
+
>Context<br><small>Component</small></a></k-filter-item>
|
|
120
|
+
<k-filter-item filter-keywords="dialog modal popup components"><a
|
|
121
|
+
href="../components/dialog.html">Dialog<br><small>Component</small></a></k-filter-item>
|
|
122
|
+
<k-filter-item filter-keywords="dropdown select components"><a
|
|
123
|
+
href="../components/dropdown.html">Dropdown<br><small>Component</small></a></k-filter-item>
|
|
124
|
+
<k-filter-item filter-keywords="filter list filterlist components"><a
|
|
125
|
+
href="../components/filter-list.html"
|
|
126
|
+
>Filter List<br><small>Component</small></a></k-filter-item>
|
|
127
|
+
<k-filter-item filter-keywords="focus capture focuscapture components"><a
|
|
128
|
+
href="../components/focus-capture.html"
|
|
129
|
+
>Focus Capture<br><small>Component</small></a></k-filter-item>
|
|
130
|
+
<k-filter-item filter-keywords="html editor components"><a
|
|
131
|
+
href="../components/html-editor.html">HTML
|
|
132
|
+
Editor<br><small>Component</small></a></k-filter-item>
|
|
133
|
+
<k-filter-item filter-keywords="icon components"><a
|
|
134
|
+
href="../components/icon.html">Icon<br><small>Component</small></a></k-filter-item>
|
|
135
|
+
<k-filter-item filter-keywords="import components"><a
|
|
136
|
+
href="../components/import.html">Import<br><small>Component</small></a></k-filter-item>
|
|
137
|
+
<k-filter-item filter-keywords="nav navbar navigation components"><a
|
|
138
|
+
href="../components/nav.html">Nav<br><small>Component</small></a></k-filter-item>
|
|
139
|
+
<k-filter-item filter-keywords="nav spacer navbar spacer navspacer components"><a
|
|
140
|
+
href="../components/nav-spacer.html"
|
|
141
|
+
>Nav Spacer<br><small>Component</small></a></k-filter-item>
|
|
142
|
+
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
143
|
+
href="../components/photo-viewer.html"
|
|
144
|
+
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
145
|
+
<k-filter-item filter-keywords="resize components"><a
|
|
146
|
+
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
147
|
+
<k-filter-item filter-keywords="show more showmore components"><a
|
|
148
|
+
href="../components/show-more.html"
|
|
149
|
+
>Show More<br><small>Component</small></a></k-filter-item>
|
|
150
|
+
<k-filter-item filter-keywords="sortable drag drop sort components"><a
|
|
151
|
+
href="../components/sortable.html"
|
|
152
|
+
>Sortable<br><small>Component</small></a></k-filter-item>
|
|
153
|
+
<k-filter-item filter-keywords="spinner loading components"><a
|
|
154
|
+
href="../components/spinner.html">Spinner<br><small>Component</small></a></k-filter-item>
|
|
155
|
+
<k-filter-item filter-keywords="split pane components"><a
|
|
156
|
+
href="../components/split.html">Split<br><small>Component</small></a></k-filter-item>
|
|
157
|
+
<k-filter-item filter-keywords="table data grid components"><a
|
|
158
|
+
href="../components/table.html">Table<br><small>Component</small></a></k-filter-item>
|
|
159
|
+
<k-filter-item filter-keywords="table controls advanced example"><a
|
|
160
|
+
href="../components/tableControls.html"
|
|
161
|
+
>Table — Controls<br><small>Advanced Example</small></a></k-filter-item>
|
|
162
|
+
<k-filter-item filter-keywords="table custom fields advanced example"><a
|
|
163
|
+
href="../components/tableCustomFields.html"
|
|
164
|
+
>Table — Custom Fields<br><small>Advanced Example</small></a></k-filter-item>
|
|
165
|
+
<k-filter-item filter-keywords="table fetch records advanced example"><a
|
|
166
|
+
href="../components/tableFetchRecords.html"
|
|
167
|
+
>Table — Fetch Records<br><small>Advanced Example</small></a></k-filter-item>
|
|
168
|
+
<k-filter-item filter-keywords="table field sort hide advanced example"><a
|
|
169
|
+
href="../components/tableFieldSortHide.html"
|
|
170
|
+
>Table — Field Sort & Hide<br><small>Advanced Example</small></a></k-filter-item>
|
|
171
|
+
<k-filter-item filter-keywords="table pagination advanced example"><a
|
|
172
|
+
href="../components/tablePagination.html"
|
|
173
|
+
>Table — Pagination<br><small>Advanced Example</small></a></k-filter-item>
|
|
174
|
+
<k-filter-item filter-keywords="table record editing advanced example"><a
|
|
175
|
+
href="../components/tableRecordEditing.html"
|
|
176
|
+
>Table — Record Editing<br><small>Advanced Example</small></a></k-filter-item>
|
|
177
|
+
<k-filter-item filter-keywords="table record filtering advanced example"><a
|
|
178
|
+
href="../components/tableRecordFiltering.html"
|
|
179
|
+
>Table — Record Filtering<br><small>Advanced Example</small></a></k-filter-item>
|
|
180
|
+
<k-filter-item filter-keywords="table record hiding advanced example"><a
|
|
181
|
+
href="../components/tableRecordHiding.html"
|
|
182
|
+
>Table — Record Hiding<br><small>Advanced Example</small></a></k-filter-item>
|
|
183
|
+
<k-filter-item filter-keywords="table record searching advanced example"><a
|
|
184
|
+
href="../components/tableRecordSearching.html"
|
|
185
|
+
>Table — Record Searching<br><small>Advanced Example</small></a></k-filter-item>
|
|
186
|
+
<k-filter-item filter-keywords="table record selection advanced example"><a
|
|
187
|
+
href="../components/tableRecordSelection.html"
|
|
188
|
+
>Table — Record Selection<br><small>Advanced Example</small></a></k-filter-item>
|
|
189
|
+
<k-filter-item filter-keywords="table row controls advanced example"><a
|
|
190
|
+
href="../components/tableRowControls.html"
|
|
191
|
+
>Table — Row Controls<br><small>Advanced Example</small></a></k-filter-item>
|
|
192
|
+
<k-filter-item filter-keywords="table server sync advanced example"><a
|
|
193
|
+
href="../components/tableServerSync.html"
|
|
194
|
+
>Table — Server Sync<br><small>Advanced Example</small></a></k-filter-item>
|
|
195
|
+
<k-filter-item filter-keywords="table sorting advanced example"><a
|
|
196
|
+
href="../components/tableSorting.html"
|
|
197
|
+
>Table — Sorting<br><small>Advanced Example</small></a></k-filter-item>
|
|
198
|
+
<k-filter-item filter-keywords="table placeholder advanced example"><a
|
|
199
|
+
href="../components/tablePlaceholder.html"
|
|
200
|
+
>Table — Placeholder<br><small>Advanced Example</small></a></k-filter-item>
|
|
201
|
+
<k-filter-item filter-keywords="tabs tab panel components"><a
|
|
202
|
+
href="../components/tabs.html">Tabs<br><small>Component</small></a></k-filter-item>
|
|
203
|
+
<k-filter-item filter-keywords="tags tag input components"><a
|
|
204
|
+
href="../components/tags.html">Tags<br><small>Component</small></a></k-filter-item>
|
|
205
|
+
<k-filter-item filter-keywords="theme select dropdown dark light components"><a
|
|
206
|
+
href="../components/theme-select.html"
|
|
207
|
+
>Theme Select<br><small>Component</small></a></k-filter-item>
|
|
208
|
+
<k-filter-item filter-keywords="theme switcher dark light components"><a
|
|
209
|
+
href="../components/theme-switcher.html"
|
|
210
|
+
>Theme Switcher<br><small>Component</small></a></k-filter-item>
|
|
211
|
+
<k-filter-item filter-keywords="timestamp date time components"><a
|
|
212
|
+
href="../components/timestamp.html"
|
|
213
|
+
>Timestamp<br><small>Component</small></a></k-filter-item>
|
|
214
|
+
<k-filter-item filter-keywords="toast notification alert components"><a
|
|
215
|
+
href="../components/toast.html"
|
|
216
|
+
>Toast<br><small>Component</small></a></k-filter-item>
|
|
217
|
+
<k-filter-item filter-keywords="toggle switch checkbox components"><a
|
|
218
|
+
href="../components/toggle.html"
|
|
219
|
+
>Toggle<br><small>Component</small></a></k-filter-item>
|
|
220
|
+
<k-filter-item filter-keywords="tree treeview components"><a
|
|
221
|
+
href="../components/tree.html">Tree<br><small>Component</small></a></k-filter-item>
|
|
222
|
+
<k-filter-item filter-keywords="shadow component base"><a
|
|
223
|
+
href="../components/shadow-component.html"
|
|
224
|
+
>Shadow Component<br><small>Base Component</small></a></k-filter-item>
|
|
225
|
+
<k-filter-item filter-keywords="light component base"><a
|
|
226
|
+
href="../components/light-component.html">Light Component<br><small>Base
|
|
227
|
+
Component</small></a></k-filter-item>
|
|
228
|
+
<k-filter-item filter-keywords="hybrid component base"><a
|
|
229
|
+
href="../components/hybrid-component.html"
|
|
230
|
+
>Hybrid Component<br><small>Base Component</small></a></k-filter-item>
|
|
231
|
+
<k-filter-item filter-keywords="cookie utils utility"><a
|
|
232
|
+
href="../utils/cookie.html">cookie<br><small>Utility</small></a></k-filter-item>
|
|
233
|
+
<k-filter-item filter-keywords="context utils utility"><a
|
|
234
|
+
href="../utils/context.html">context<br><small>Utility</small></a></k-filter-item>
|
|
235
|
+
<k-filter-item filter-keywords="debounce utils utility"><a
|
|
236
|
+
href="../utils/debounce.html">debounce<br><small>Utility</small></a></k-filter-item>
|
|
237
|
+
<k-filter-item filter-keywords="drag utils utility"><a
|
|
238
|
+
href="../utils/drag.html">drag<br><small>Utility</small></a></k-filter-item>
|
|
239
|
+
<k-filter-item filter-keywords="elevation z-index stacking utils"><a
|
|
240
|
+
href="../utils/elevation.html">elevation<br><small>Utility</small></a></k-filter-item>
|
|
241
|
+
<k-filter-item filter-keywords="formattimestamp timestamp format date time utils utility"><a
|
|
242
|
+
href="../utils/formatTimestamp.html"
|
|
243
|
+
>formatTimestamp<br><small>Utility</small></a></k-filter-item>
|
|
244
|
+
<k-filter-item filter-keywords="object utils utility"><a
|
|
245
|
+
href="../utils/object.html">object<br><small>Utility</small></a></k-filter-item>
|
|
246
|
+
<k-filter-item filter-keywords="propconverters prop converters utils utility"><a
|
|
247
|
+
href="../utils/propConverters.html"
|
|
248
|
+
>propConverters<br><small>Utility</small></a></k-filter-item>
|
|
249
|
+
<k-filter-item filter-keywords="string utils utility"><a
|
|
250
|
+
href="../utils/string.html">string<br><small>Utility</small></a></k-filter-item>
|
|
251
|
+
<k-filter-item filter-keywords="theme utils utility"><a
|
|
252
|
+
href="../utils/theme.html">theme<br><small>Utility</small></a></k-filter-item>
|
|
253
|
+
<k-filter-item filter-keywords="type utils utility"><a
|
|
254
|
+
href="../utils/type.html">type<br><small>Utility</small></a></k-filter-item>
|
|
255
|
+
<k-filter-item filter-keywords="wait async utils utility"><a
|
|
256
|
+
href="../utils/wait.html">wait<br><small>Utility</small></a></k-filter-item>
|
|
128
257
|
</k-filter-list>
|
|
129
258
|
</div>
|
|
130
259
|
</div>
|
|
131
260
|
<div class="flex"></div>
|
|
132
|
-
<a
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
261
|
+
<a
|
|
262
|
+
href="https://github.com/dustinpoissant/kempo-ui?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20"
|
|
263
|
+
target="_blank"
|
|
264
|
+
><k-icon name="license"></k-icon></a>
|
|
265
|
+
<a
|
|
266
|
+
href="https://www.npmjs.com/package/kempo-ui"
|
|
267
|
+
target="_blank"
|
|
268
|
+
><k-icon name="npm"></k-icon></a>
|
|
269
|
+
<a
|
|
270
|
+
href="https://github.com/dustinpoissant/kempo-ui"
|
|
271
|
+
target="_blank"
|
|
272
|
+
><k-icon name="github-mark"></k-icon></a>
|
|
273
|
+
<k-theme-switcher
|
|
274
|
+
class="mr"
|
|
275
|
+
style="
|
|
276
|
+
--padding: 0.5rem;
|
|
277
|
+
--c_active: var(--tc_on_primary);
|
|
278
|
+
--tc_active: var(--c_primary);
|
|
279
|
+
--c_inactive__hover: rgba(255, 255, 255, 0.1);
|
|
280
|
+
"
|
|
281
|
+
></k-theme-switcher>
|
|
136
282
|
</k-nav>
|
|
137
283
|
<div style="width: 100%; height: 4rem;"></div>
|
|
138
|
-
<k-aside
|
|
284
|
+
<k-aside
|
|
285
|
+
id="navSideMenu"
|
|
286
|
+
main="overlay"
|
|
287
|
+
state="offscreen"
|
|
288
|
+
>
|
|
139
289
|
<menu>
|
|
140
|
-
<a
|
|
290
|
+
<a
|
|
291
|
+
href="../"
|
|
292
|
+
class="ta-center bb mb r0"
|
|
293
|
+
>
|
|
141
294
|
<h1 class="tc-primary">Kempo UI</h1>
|
|
142
|
-
<img
|
|
295
|
+
<img
|
|
296
|
+
src="../media/icon128.png"
|
|
297
|
+
alt="Kempo UI Icon"
|
|
298
|
+
/>
|
|
143
299
|
</a>
|
|
144
300
|
|
|
145
301
|
<div class="pl mb">
|
|
@@ -148,6 +304,7 @@
|
|
|
148
304
|
<a href="../components/aside.html">Aside</a>
|
|
149
305
|
<a href="../components/card.html">Card</a>
|
|
150
306
|
<a href="../components/code-editor.html">Code Editor</a>
|
|
307
|
+
<a href="../components/combobox.html">Combobox</a>
|
|
151
308
|
<a href="../components/color-picker.html">ColorPicker</a>
|
|
152
309
|
<a href="../components/content-slider.html">Content Slider</a>
|
|
153
310
|
<a href="../components/context.html">Context</a>
|
|
@@ -202,16 +359,47 @@
|
|
|
202
359
|
</menu>
|
|
203
360
|
</k-aside>
|
|
204
361
|
<style>
|
|
205
|
-
#navSearchList a{
|
|
206
|
-
|
|
207
|
-
|
|
362
|
+
#navSearchList a {
|
|
363
|
+
display: block;
|
|
364
|
+
padding: .25rem .5rem;
|
|
365
|
+
border-radius: var(--radius);
|
|
366
|
+
text-decoration: none;
|
|
367
|
+
color: var(--tc);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
#navSearchList a:hover {
|
|
371
|
+
background: rgba(128, 128, 128, .15);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
#navSearchList a small {
|
|
375
|
+
display: block;
|
|
376
|
+
color: var(--tc_muted);
|
|
377
|
+
}
|
|
208
378
|
</style>
|
|
209
|
-
<script
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
<script
|
|
214
|
-
|
|
379
|
+
<script
|
|
380
|
+
src="../src/components/Nav.js"
|
|
381
|
+
type="module"
|
|
382
|
+
></script>
|
|
383
|
+
<script
|
|
384
|
+
src="../src/components/FilterList.js"
|
|
385
|
+
type="module"
|
|
386
|
+
></script>
|
|
387
|
+
<script
|
|
388
|
+
src="../src/components/FilterItem.js"
|
|
389
|
+
type="module"
|
|
390
|
+
></script>
|
|
391
|
+
<script
|
|
392
|
+
src="../src/components/Aside.js"
|
|
393
|
+
type="module"
|
|
394
|
+
></script>
|
|
395
|
+
<script
|
|
396
|
+
src="../src/components/Icon.js"
|
|
397
|
+
type="module"
|
|
398
|
+
></script>
|
|
399
|
+
<script
|
|
400
|
+
src="../src/components/ThemeSwitcher.js"
|
|
401
|
+
type="module"
|
|
402
|
+
></script>
|
|
215
403
|
<script type="module">
|
|
216
404
|
import debounce from '../src/utils/debounce.js';
|
|
217
405
|
|
|
@@ -220,12 +408,12 @@
|
|
|
220
408
|
document.getElementById('navSideMenu').toggle();
|
|
221
409
|
});
|
|
222
410
|
|
|
223
|
-
document.addEventListener('click', function(e) {
|
|
224
|
-
if(e.target.matches('a[href^="#"]')) {
|
|
411
|
+
document.addEventListener('click', function (e) {
|
|
412
|
+
if (e.target.matches('a[href^="#"]')) {
|
|
225
413
|
e.preventDefault();
|
|
226
414
|
const targetId = e.target.getAttribute('href').replace('#', '');
|
|
227
415
|
const target = document.getElementById(targetId);
|
|
228
|
-
if(target) {
|
|
416
|
+
if (target) {
|
|
229
417
|
target.scrollIntoView({ behavior: 'smooth' });
|
|
230
418
|
const url = window.location.pathname + window.location.search + '#' + targetId;
|
|
231
419
|
history.replaceState(null, '', url);
|
|
@@ -242,7 +430,7 @@
|
|
|
242
430
|
|
|
243
431
|
const openSearch = async () => {
|
|
244
432
|
await customElements.whenDefined('k-filter-list');
|
|
245
|
-
if(!navSearchList) navSearchList = document.getElementById('navSearchList');
|
|
433
|
+
if (!navSearchList) navSearchList = document.getElementById('navSearchList');
|
|
246
434
|
navSearchList.filter(searchInput.value);
|
|
247
435
|
searchDropdown.hidden = false;
|
|
248
436
|
};
|
|
@@ -259,11 +447,11 @@
|
|
|
259
447
|
}, 150));
|
|
260
448
|
|
|
261
449
|
searchInput.addEventListener('keydown', e => {
|
|
262
|
-
if(e.key === 'Escape') {
|
|
450
|
+
if (e.key === 'Escape') {
|
|
263
451
|
searchInput.value = '';
|
|
264
452
|
searchInput.blur();
|
|
265
453
|
closeSearch();
|
|
266
|
-
} else if(e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === 'Enter') {
|
|
454
|
+
} else if (e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === 'Enter') {
|
|
267
455
|
navSearchList?.handleKeydown(e);
|
|
268
456
|
}
|
|
269
457
|
});
|
|
@@ -274,11 +462,11 @@
|
|
|
274
462
|
|
|
275
463
|
document.addEventListener('keydown', e => {
|
|
276
464
|
let active = document.activeElement;
|
|
277
|
-
while(active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
|
|
465
|
+
while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
|
|
278
466
|
const tag = active?.tagName;
|
|
279
|
-
if(tag === 'INPUT' || tag === 'TEXTAREA' || active?.isContentEditable) return;
|
|
280
|
-
if(e.metaKey || e.ctrlKey || e.altKey) return;
|
|
281
|
-
if(e.key.length === 1) {
|
|
467
|
+
if (tag === 'INPUT' || tag === 'TEXTAREA' || active?.isContentEditable) return;
|
|
468
|
+
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
|
469
|
+
if (e.key.length === 1) {
|
|
282
470
|
searchInput.focus();
|
|
283
471
|
}
|
|
284
472
|
});
|