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