kempo-ui 0.3.5 → 0.3.6
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/AGENTS.md +2 -1
- package/docs/components/accordion.html +240 -8
- package/docs/components/aside-items.html +13 -9
- package/docs/components/aside-menu.html +13 -9
- package/docs/components/aside-push.html +11 -6
- package/docs/components/aside.html +239 -8
- package/docs/components/card.html +238 -7
- package/docs/components/color-picker.html +245 -14
- package/docs/components/content-slider.html +240 -8
- package/docs/components/context.html +241 -7
- package/docs/components/dialog.html +238 -7
- package/docs/components/dropdown.html +238 -7
- package/docs/components/filter-list.html +239 -10
- package/docs/components/focus-capture.html +241 -10
- package/docs/components/html-editor.html +266 -35
- package/docs/components/hybrid-component.html +238 -6
- package/docs/components/icon.html +239 -9
- package/docs/components/import.html +239 -8
- package/docs/components/light-component.html +239 -7
- package/docs/components/nav.html +240 -8
- package/docs/components/photo-viewer.html +239 -9
- package/docs/components/resize.html +240 -9
- package/docs/components/shadow-component.html +239 -7
- package/docs/components/show-more.html +237 -8
- package/docs/components/sortable.html +239 -8
- package/docs/components/spinner.html +237 -6
- package/docs/components/split.html +241 -10
- package/docs/components/table.html +241 -11
- package/docs/components/tableControls.html +240 -7
- package/docs/components/tableCustomFields.html +241 -8
- package/docs/components/tableFetchRecords.html +239 -7
- package/docs/components/tableFieldSortHide.html +239 -7
- package/docs/components/tablePagination.html +246 -13
- package/docs/components/tablePlaceholder.html +241 -8
- package/docs/components/tableRecordEditing.html +241 -8
- package/docs/components/tableRecordFiltering.html +239 -7
- package/docs/components/tableRecordHiding.html +241 -9
- package/docs/components/tableRecordSearching.html +239 -7
- package/docs/components/tableRecordSelection.html +240 -7
- package/docs/components/tableRowControls.html +241 -8
- package/docs/components/tableServerSync.html +245 -11
- package/docs/components/tableSorting.html +239 -7
- package/docs/components/tabs.html +240 -7
- package/docs/components/tags.html +239 -7
- package/docs/components/theme-select.html +239 -7
- package/docs/components/theme-switcher.html +240 -8
- package/docs/components/timestamp.html +239 -8
- package/docs/components/toast.html +240 -8
- package/docs/components/toggle.html +240 -9
- package/docs/components/tree.html +239 -8
- package/docs/index.html +244 -6
- package/docs/prod.config.json +0 -4
- package/docs/utils/context.html +237 -6
- package/docs/utils/cookie.html +251 -21
- package/docs/utils/debounce.html +236 -5
- package/docs/utils/drag.html +236 -5
- package/docs/utils/elevation.html +238 -6
- package/docs/utils/formatTimestamp.html +233 -3
- package/docs/utils/object.html +236 -5
- package/docs/utils/propConverters.html +233 -3
- package/docs/utils/string.html +236 -5
- package/docs/utils/theme.html +237 -6
- package/docs/utils/toTitleCase.html +233 -3
- package/docs/utils/type.html +236 -5
- package/docs/utils/wait.html +236 -5
- package/docs-src/.config.js +16 -0
- package/docs-src/bare.template.html +16 -0
- package/docs-src/components/accordion.page.html +201 -0
- package/docs-src/components/aside-items.page.html +36 -0
- package/docs-src/components/aside-menu.page.html +36 -0
- package/docs-src/components/aside-push.page.html +20 -0
- package/docs-src/components/aside.page.html +551 -0
- package/docs-src/components/card.page.html +78 -0
- package/docs-src/components/color-picker.page.html +559 -0
- package/docs-src/components/content-slider.page.html +266 -0
- package/docs-src/components/context.page.html +214 -0
- package/docs-src/components/dialog.page.html +365 -0
- package/docs-src/components/dropdown.page.html +300 -0
- package/docs-src/components/filter-list.page.html +117 -0
- package/docs-src/components/focus-capture.page.html +97 -0
- package/docs-src/components/html-editor.page.html +423 -0
- package/docs-src/components/hybrid-component.page.html +96 -0
- package/docs-src/components/icon.page.html +208 -0
- package/docs-src/components/import.page.html +76 -0
- package/docs-src/components/light-component.page.html +99 -0
- package/docs-src/components/nav.page.html +106 -0
- package/docs-src/components/photo-viewer.page.html +253 -0
- package/docs-src/components/resize.page.html +161 -0
- package/docs-src/components/shadow-component.page.html +84 -0
- package/docs-src/components/show-more.page.html +113 -0
- package/docs-src/components/sortable.page.html +117 -0
- package/docs-src/components/spinner.page.html +197 -0
- package/docs-src/components/split.page.html +195 -0
- package/docs-src/components/table.page.html +283 -0
- package/docs-src/components/tableControls.page.html +64 -0
- package/docs-src/components/tableCustomFields.page.html +124 -0
- package/docs-src/components/tableFetchRecords.page.html +95 -0
- package/docs-src/components/tableFieldSortHide.page.html +56 -0
- package/docs-src/components/tablePagination.page.html +85 -0
- package/docs-src/components/tablePlaceholder.page.html +73 -0
- package/docs-src/components/tableRecordEditing.page.html +161 -0
- package/docs-src/components/tableRecordFiltering.page.html +69 -0
- package/docs-src/components/tableRecordHiding.page.html +65 -0
- package/docs-src/components/tableRecordSearching.page.html +56 -0
- package/docs-src/components/tableRecordSelection.page.html +60 -0
- package/docs-src/components/tableRowControls.page.html +62 -0
- package/docs-src/components/tableServerSync.page.html +129 -0
- package/docs-src/components/tableSorting.page.html +54 -0
- package/docs-src/components/tabs.page.html +201 -0
- package/docs-src/components/tags.page.html +157 -0
- package/docs-src/components/theme-select.page.html +106 -0
- package/docs-src/components/theme-switcher.page.html +122 -0
- package/docs-src/components/timestamp.page.html +109 -0
- package/docs-src/components/toast.page.html +338 -0
- package/docs-src/components/toggle.page.html +177 -0
- package/docs-src/components/tree.page.html +356 -0
- package/docs-src/default.template.html +28 -0
- package/docs-src/index.page.html +312 -0
- package/docs-src/nav.fragment.html +228 -0
- package/docs-src/utils/context.page.html +143 -0
- package/docs-src/utils/cookie.page.html +128 -0
- package/docs-src/utils/debounce.page.html +42 -0
- package/docs-src/utils/drag.page.html +64 -0
- package/docs-src/utils/elevation.page.html +144 -0
- package/docs-src/utils/formatTimestamp.page.html +76 -0
- package/docs-src/utils/object.page.html +76 -0
- package/docs-src/utils/propConverters.page.html +73 -0
- package/docs-src/utils/string.page.html +66 -0
- package/docs-src/utils/theme.page.html +136 -0
- package/docs-src/utils/toTitleCase.page.html +52 -0
- package/docs-src/utils/type.page.html +31 -0
- package/docs-src/utils/wait.page.html +31 -0
- package/package.json +4 -4
- package/scripts/build.js +5 -0
- package/scripts/docs.js +5 -52
- package/docs/dev.config.json +0 -20
- package/docs/nav-1.inc.html +0 -168
- package/docs/nav.inc.html +0 -168
- package/docs/nav.inc.js +0 -70
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<page template="bare" title="Untitled">
|
|
2
|
+
<content>
|
|
3
|
+
<k-aside id="aside4" state="offscreen">
|
|
4
|
+
<p>Push Sidebar Content</p>
|
|
5
|
+
</k-aside>
|
|
6
|
+
<k-main>
|
|
7
|
+
<button id="toggle4">Toggle Sidebar</button>
|
|
8
|
+
<p>This content shifts when the aside is visible.</p>
|
|
9
|
+
</k-main>
|
|
10
|
+
</content>
|
|
11
|
+
<content location="scripts">
|
|
12
|
+
<script>
|
|
13
|
+
document.getElementById('toggle4').addEventListener('click',()=>{
|
|
14
|
+
document.getElementById('aside4').toggle();
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
<script type="module" src="{{pathToRoot}}src/components/Aside.js"></script>
|
|
18
|
+
<script type="module" src="{{pathToRoot}}src/components/Main.js"></script>
|
|
19
|
+
</content>
|
|
20
|
+
</page>
|
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
<page pageName="Aside" title="Aside - Components - Kempo Docs - A Web Components Solution">
|
|
2
|
+
<content>
|
|
3
|
+
<details class="b r mb">
|
|
4
|
+
<summary class="p">Table of Contents</summary>
|
|
5
|
+
<div class="m mt0 pl">
|
|
6
|
+
<h6>Overlay Mode</h6>
|
|
7
|
+
<a href="#overlayBasic">Basic Usage</a><br />
|
|
8
|
+
<a href="#overlayClose">Closing Options</a><br />
|
|
9
|
+
<a href="#overlayRight">Right Side</a><br />
|
|
10
|
+
|
|
11
|
+
<h6 class="mt">Push Mode</h6>
|
|
12
|
+
<a href="#pushBasic">Basic Push</a><br />
|
|
13
|
+
<a href="#pushCollapsed">Collapsed State</a><br />
|
|
14
|
+
<a href="#pushRight">Right Side Push</a><br />
|
|
15
|
+
|
|
16
|
+
<h6 class="mt">Customization</h6>
|
|
17
|
+
<a href="#customWidth">Custom Width</a><br />
|
|
18
|
+
<a href="#customBg">Custom Background</a><br />
|
|
19
|
+
<a href="#customCollapsed">Custom Collapsed Width</a><br />
|
|
20
|
+
|
|
21
|
+
<h6 class="mt">Sub-Components</h6>
|
|
22
|
+
<a href="#subItems">Items & Labels</a><br />
|
|
23
|
+
<a href="#subMenu">Expandable Menus</a><br />
|
|
24
|
+
|
|
25
|
+
<h6 class="mt">Events</h6>
|
|
26
|
+
<a href="#events">State Change Event</a><br />
|
|
27
|
+
|
|
28
|
+
<h6 class="mt">JavaScript Reference</h6>
|
|
29
|
+
<a href="#constructor">Constructor</a><br />
|
|
30
|
+
<a href="#requirements">Requirements</a><br />
|
|
31
|
+
<a href="#properties">Properties</a><br />
|
|
32
|
+
<a href="#eventRef">Events</a><br />
|
|
33
|
+
<a href="#methods">Methods</a><br />
|
|
34
|
+
<a href="#cssVars">CSS Custom Properties</a><br />
|
|
35
|
+
<h6 class="mt"><a href="#subRef" class="no-link">Sub-Component Reference</a></h6>
|
|
36
|
+
<a href="#asideItem">k-aside-item</a><br />
|
|
37
|
+
<a href="#asideLabel">k-aside-label</a><br />
|
|
38
|
+
<a href="#asideMenu">k-aside-menu</a><br />
|
|
39
|
+
<a href="#asideSpacer">k-aside-spacer</a><br />
|
|
40
|
+
<a href="#asideToggle">k-aside-toggle</a><br />
|
|
41
|
+
</div>
|
|
42
|
+
</details>
|
|
43
|
+
|
|
44
|
+
<h2>Overlay Mode</h2>
|
|
45
|
+
<p>The default mode. Use <code>state="offscreen"</code> as the starting state; call <code>expand()</code> to open. Clicking the backdrop or pressing ESC closes it by default.</p>
|
|
46
|
+
|
|
47
|
+
<h3 id="overlayBasic"><a href="#overlayBasic" class="no-link">Basic Usage</a></h3>
|
|
48
|
+
<p>A simple overlay menu that opens from the left.</p>
|
|
49
|
+
<div class="row -mx">
|
|
50
|
+
<div class="col m-span-12 px">
|
|
51
|
+
<k-card label="HTML">
|
|
52
|
+
<pre><code class="hljs html"><k-aside state="offscreen">
|
|
53
|
+
<p>Overlay Menu Content</p>
|
|
54
|
+
</k-aside>
|
|
55
|
+
<button onclick="this.previousElementSibling.expand()">
|
|
56
|
+
Open Menu
|
|
57
|
+
</button></code></pre>
|
|
58
|
+
</k-card>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="col m-span-12 px">
|
|
61
|
+
<k-card label="Output">
|
|
62
|
+
<k-aside id="aside1" state="offscreen">
|
|
63
|
+
<p>Overlay Menu Content</p>
|
|
64
|
+
</k-aside>
|
|
65
|
+
<button id="open1">Open Menu</button>
|
|
66
|
+
<script>
|
|
67
|
+
document.getElementById('open1').addEventListener('click',()=>{
|
|
68
|
+
document.getElementById('aside1').expand();
|
|
69
|
+
});
|
|
70
|
+
</script>
|
|
71
|
+
</k-card>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<h3 id="overlayClose"><a href="#overlayClose" class="no-link">Closing Options</a></h3>
|
|
76
|
+
<p>By default clicking on the overlay backdrop closes the menu. Use <code>overlay-close="false"</code> to disable this. Pressing ESC also closes by default; use <code>esc-close="false"</code> to disable.</p>
|
|
77
|
+
<p>Use <code>hide()</code> to close the menu programmatically, or <code>toggle()</code> to switch between expanded and offscreen.</p>
|
|
78
|
+
<div class="row -mx">
|
|
79
|
+
<div class="col m-span-12 px">
|
|
80
|
+
<k-card label="HTML">
|
|
81
|
+
<pre><code class="hljs html"><k-aside state="offscreen"
|
|
82
|
+
overlay-close="false">
|
|
83
|
+
<p>Overlay Menu</p>
|
|
84
|
+
<button onclick="this.closest('k-aside').hide()">
|
|
85
|
+
Close
|
|
86
|
+
</button>
|
|
87
|
+
</k-aside>
|
|
88
|
+
<button onclick="this.previousElementSibling.expand()">
|
|
89
|
+
Open Menu
|
|
90
|
+
</button></code></pre>
|
|
91
|
+
</k-card>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="col m-span-12 px">
|
|
94
|
+
<k-card label="Output">
|
|
95
|
+
<k-aside id="aside2" state="offscreen" overlay-close="false">
|
|
96
|
+
<p>Overlay Menu</p>
|
|
97
|
+
<button id="close2">Close</button>
|
|
98
|
+
</k-aside>
|
|
99
|
+
<button id="open2">Open Menu</button>
|
|
100
|
+
<script>
|
|
101
|
+
const a2 = document.getElementById('aside2');
|
|
102
|
+
document.getElementById('open2').addEventListener('click',()=>{
|
|
103
|
+
a2.expand();
|
|
104
|
+
});
|
|
105
|
+
document.getElementById('close2').addEventListener('click',()=>{
|
|
106
|
+
a2.hide();
|
|
107
|
+
});
|
|
108
|
+
</script>
|
|
109
|
+
</k-card>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<h3 id="overlayRight"><a href="#overlayRight" class="no-link">Right Side</a></h3>
|
|
114
|
+
<p>Use <code>side="right"</code> to open the menu from the right.</p>
|
|
115
|
+
<div class="row -mx">
|
|
116
|
+
<div class="col m-span-12 px">
|
|
117
|
+
<k-card label="HTML">
|
|
118
|
+
<pre><code class="hljs html"><k-aside state="offscreen"
|
|
119
|
+
side="right">
|
|
120
|
+
<p>Right Side Menu</p>
|
|
121
|
+
</k-aside>
|
|
122
|
+
<button onclick="this.previousElementSibling.expand()">
|
|
123
|
+
Open Right Menu
|
|
124
|
+
</button></code></pre>
|
|
125
|
+
</k-card>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="col m-span-12 px">
|
|
128
|
+
<k-card label="Output">
|
|
129
|
+
<k-aside id="aside3" state="offscreen" side="right">
|
|
130
|
+
<p>Right Side Menu</p>
|
|
131
|
+
</k-aside>
|
|
132
|
+
<button id="open3">Open Right Menu</button>
|
|
133
|
+
<script>
|
|
134
|
+
document.getElementById('open3').addEventListener('click',()=>{
|
|
135
|
+
document.getElementById('aside3').expand();
|
|
136
|
+
});
|
|
137
|
+
</script>
|
|
138
|
+
</k-card>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<h2>Push Mode</h2>
|
|
143
|
+
<p>Set <code>main="push"</code> so the aside pushes page content. It dispatches <code>aside_state_change</code> events on <code>window</code> that <code><k-main></code> listens to, adjusting its margins. The aside below will push this page's content when toggled.</p>
|
|
144
|
+
|
|
145
|
+
<h3 id="pushBasic"><a href="#pushBasic" class="no-link">Basic Push</a></h3>
|
|
146
|
+
<p>A push-mode sidebar that shifts the page content. Click the button to toggle it.</p>
|
|
147
|
+
<div class="row -mx">
|
|
148
|
+
<div class="col m-span-12 px">
|
|
149
|
+
<k-card label="HTML">
|
|
150
|
+
<pre><code class="hljs html"><k-aside main="push" state="offscreen">
|
|
151
|
+
<nav>
|
|
152
|
+
<h3>Sidebar</h3>
|
|
153
|
+
<a href="#">Home</a>
|
|
154
|
+
<a href="#">About</a>
|
|
155
|
+
<a href="#">Contact</a>
|
|
156
|
+
</nav>
|
|
157
|
+
</k-aside>
|
|
158
|
+
<button onclick="this.previousElementSibling.toggle()">
|
|
159
|
+
Toggle Sidebar
|
|
160
|
+
</button></code></pre>
|
|
161
|
+
</k-card>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="col m-span-12 px">
|
|
164
|
+
<k-card label="Output">
|
|
165
|
+
<k-aside id="aside5" main="push" state="offscreen">
|
|
166
|
+
<div class="navbar-spacer"></div>
|
|
167
|
+
<nav>
|
|
168
|
+
<h3>Sidebar</h3>
|
|
169
|
+
<a href="#">Home</a>
|
|
170
|
+
<a href="#">About</a>
|
|
171
|
+
<a href="#">Contact</a>
|
|
172
|
+
</nav>
|
|
173
|
+
</k-aside>
|
|
174
|
+
<button id="toggle5">Toggle Sidebar</button>
|
|
175
|
+
<script>
|
|
176
|
+
document.getElementById('toggle5').addEventListener('click',()=>{
|
|
177
|
+
document.getElementById('aside5').toggle();
|
|
178
|
+
});
|
|
179
|
+
</script>
|
|
180
|
+
</k-card>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<h3 id="pushCollapsed"><a href="#pushCollapsed" class="no-link">Collapsed State</a></h3>
|
|
185
|
+
<p>Use <code>collapse()</code> to show a narrow strip (width set by <code>--collapsed-width</code>). Use <code>expand()</code> to show full width, or <code>hide()</code> to go offscreen.</p>
|
|
186
|
+
<div class="row -mx">
|
|
187
|
+
<div class="col m-span-12 px">
|
|
188
|
+
<k-card label="HTML">
|
|
189
|
+
<pre><code class="hljs html"><k-aside main="push" state="offscreen">
|
|
190
|
+
<nav>
|
|
191
|
+
<h3>Menu</h3>
|
|
192
|
+
<a href="#">Dashboard</a>
|
|
193
|
+
<a href="#">Settings</a>
|
|
194
|
+
</nav>
|
|
195
|
+
</k-aside>
|
|
196
|
+
|
|
197
|
+
<button onclick="aside.expand()">Expand</button>
|
|
198
|
+
<button onclick="aside.collapse()">Collapse</button>
|
|
199
|
+
<button onclick="aside.hide()">Hide</button></code></pre>
|
|
200
|
+
</k-card>
|
|
201
|
+
</div>
|
|
202
|
+
<div class="col m-span-12 px">
|
|
203
|
+
<k-card label="Output">
|
|
204
|
+
<k-aside id="aside6" main="push" state="offscreen">
|
|
205
|
+
<div class="navbar-spacer"></div>
|
|
206
|
+
<nav>
|
|
207
|
+
<h3>Menu</h3>
|
|
208
|
+
<a href="#">Dashboard</a>
|
|
209
|
+
<a href="#">Settings</a>
|
|
210
|
+
</nav>
|
|
211
|
+
</k-aside>
|
|
212
|
+
<button id="btn6expand">Expand</button>
|
|
213
|
+
<button id="btn6collapse">Collapse</button>
|
|
214
|
+
<button id="btn6hide">Hide</button>
|
|
215
|
+
<script>
|
|
216
|
+
const a6 = document.getElementById('aside6');
|
|
217
|
+
document.getElementById('btn6expand').addEventListener('click',()=> a6.expand());
|
|
218
|
+
document.getElementById('btn6collapse').addEventListener('click',()=> a6.collapse());
|
|
219
|
+
document.getElementById('btn6hide').addEventListener('click',()=> a6.hide());
|
|
220
|
+
</script>
|
|
221
|
+
</k-card>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
<h3 id="pushRight"><a href="#pushRight" class="no-link">Right Side Push</a></h3>
|
|
226
|
+
<p>Use <code>side="right"</code> with push mode to have the sidebar on the right side of the viewport.</p>
|
|
227
|
+
<div class="row -mx">
|
|
228
|
+
<div class="col m-span-12 px">
|
|
229
|
+
<k-card label="HTML">
|
|
230
|
+
<pre><code class="hljs html"><k-aside main="push" side="right" state="offscreen">
|
|
231
|
+
<nav>
|
|
232
|
+
<h3>Right Panel</h3>
|
|
233
|
+
<a href="#">Item 1</a>
|
|
234
|
+
<a href="#">Item 2</a>
|
|
235
|
+
</nav>
|
|
236
|
+
</k-aside>
|
|
237
|
+
<button onclick="this.previousElementSibling.toggle()">
|
|
238
|
+
Toggle Right Sidebar
|
|
239
|
+
</button></code></pre>
|
|
240
|
+
</k-card>
|
|
241
|
+
</div>
|
|
242
|
+
<div class="col m-span-12 px">
|
|
243
|
+
<k-card label="Output">
|
|
244
|
+
<k-aside id="aside7" main="push" side="right" state="offscreen">
|
|
245
|
+
<div class="navbar-spacer"></div>
|
|
246
|
+
<nav>
|
|
247
|
+
<h3>Right Panel</h3>
|
|
248
|
+
<a href="#">Item 1</a>
|
|
249
|
+
<a href="#">Item 2</a>
|
|
250
|
+
</nav>
|
|
251
|
+
</k-aside>
|
|
252
|
+
<button id="toggle7">Toggle Right Sidebar</button>
|
|
253
|
+
<script>
|
|
254
|
+
document.getElementById('toggle7').addEventListener('click',()=>{
|
|
255
|
+
document.getElementById('aside7').toggle();
|
|
256
|
+
});
|
|
257
|
+
</script>
|
|
258
|
+
</k-card>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
<h2>Customization</h2>
|
|
263
|
+
|
|
264
|
+
<h3 id="customWidth"><a href="#customWidth" class="no-link">Custom Width</a></h3>
|
|
265
|
+
<p>Override <code>--width</code> to change the expanded width. Default is <code>20rem</code>.</p>
|
|
266
|
+
<div class="row -mx">
|
|
267
|
+
<div class="col m-span-12 px">
|
|
268
|
+
<k-card label="HTML">
|
|
269
|
+
<pre><code class="hljs html"><style>
|
|
270
|
+
k-aside { --width: 30rem; }
|
|
271
|
+
</style>
|
|
272
|
+
<k-aside state="offscreen">
|
|
273
|
+
<p>This menu is 30rem wide.</p>
|
|
274
|
+
</k-aside>
|
|
275
|
+
<button onclick="this.previousElementSibling.expand()">
|
|
276
|
+
Open Wide Menu
|
|
277
|
+
</button></code></pre>
|
|
278
|
+
</k-card>
|
|
279
|
+
</div>
|
|
280
|
+
<div class="col m-span-12 px">
|
|
281
|
+
<k-card label="Output">
|
|
282
|
+
<style>k-aside#aside8 { --width: 30rem; }</style>
|
|
283
|
+
<k-aside id="aside8" state="offscreen">
|
|
284
|
+
<p>This menu is 30rem wide instead of the default 20rem.</p>
|
|
285
|
+
</k-aside>
|
|
286
|
+
<button id="open8">Open Wide Menu</button>
|
|
287
|
+
<script>
|
|
288
|
+
document.getElementById('open8').addEventListener('click',()=>{
|
|
289
|
+
document.getElementById('aside8').expand();
|
|
290
|
+
});
|
|
291
|
+
</script>
|
|
292
|
+
</k-card>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
|
|
296
|
+
<h3 id="customBg"><a href="#customBg" class="no-link">Custom Background</a></h3>
|
|
297
|
+
<p>Override <code>--bg</code> to change the background color.</p>
|
|
298
|
+
<div class="row -mx">
|
|
299
|
+
<div class="col m-span-12 px">
|
|
300
|
+
<k-card label="HTML">
|
|
301
|
+
<pre><code class="hljs html"><style>
|
|
302
|
+
k-aside { --bg: var(--c_primary); }
|
|
303
|
+
</style>
|
|
304
|
+
<k-aside state="offscreen">
|
|
305
|
+
<nav class="p tc-light">
|
|
306
|
+
<h3>Branded Menu</h3>
|
|
307
|
+
<a href="#" class="tc-light">Home</a>
|
|
308
|
+
<a href="#" class="tc-light">About</a>
|
|
309
|
+
</nav>
|
|
310
|
+
</k-aside>
|
|
311
|
+
<button onclick="this.previousElementSibling.expand()">
|
|
312
|
+
Open Branded Menu
|
|
313
|
+
</button></code></pre>
|
|
314
|
+
</k-card>
|
|
315
|
+
</div>
|
|
316
|
+
<div class="col m-span-12 px">
|
|
317
|
+
<k-card label="Output">
|
|
318
|
+
<style>k-aside#aside9 { --bg: var(--c_primary); --aside_padding: 0; }</style>
|
|
319
|
+
<k-aside id="aside9" state="offscreen">
|
|
320
|
+
<nav class="p tc-light">
|
|
321
|
+
<h3>Branded Menu</h3>
|
|
322
|
+
<a href="#" class="tc-light">Home</a>
|
|
323
|
+
<a href="#" class="tc-light">About</a>
|
|
324
|
+
</nav>
|
|
325
|
+
</k-aside>
|
|
326
|
+
<button id="open9">Open Branded Menu</button>
|
|
327
|
+
<script>
|
|
328
|
+
document.getElementById('open9').addEventListener('click',()=>{
|
|
329
|
+
document.getElementById('aside9').expand();
|
|
330
|
+
});
|
|
331
|
+
</script>
|
|
332
|
+
</k-card>
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
<h3 id="customCollapsed"><a href="#customCollapsed" class="no-link">Custom Collapsed Width</a></h3>
|
|
337
|
+
<p>Override <code>--collapsed-width</code> to change the width of the narrow strip shown in collapsed state. Default is <code>3.5rem</code>.</p>
|
|
338
|
+
<div class="row -mx">
|
|
339
|
+
<div class="col m-span-12 px">
|
|
340
|
+
<k-card label="HTML">
|
|
341
|
+
<pre><code class="hljs html"><style>
|
|
342
|
+
k-aside { --collapsed-width: 5rem; }
|
|
343
|
+
</style>
|
|
344
|
+
<k-aside main="push" state="offscreen">
|
|
345
|
+
<nav>
|
|
346
|
+
<h3>Sidebar</h3>
|
|
347
|
+
<a href="#">Dashboard</a>
|
|
348
|
+
<a href="#">Reports</a>
|
|
349
|
+
<a href="#">Settings</a>
|
|
350
|
+
</nav>
|
|
351
|
+
</k-aside>
|
|
352
|
+
|
|
353
|
+
<button onclick="aside.expand()">Expand</button>
|
|
354
|
+
<button onclick="aside.collapse()">Collapse</button>
|
|
355
|
+
<button onclick="aside.hide()">Hide</button></code></pre>
|
|
356
|
+
</k-card>
|
|
357
|
+
</div>
|
|
358
|
+
<div class="col m-span-12 px">
|
|
359
|
+
<k-card label="Output">
|
|
360
|
+
<style>k-aside#aside13 { --collapsed-width: 5rem; }</style>
|
|
361
|
+
<k-aside id="aside13" main="push" state="offscreen">
|
|
362
|
+
<div class="navbar-spacer"></div>
|
|
363
|
+
<nav>
|
|
364
|
+
<h3>Sidebar</h3>
|
|
365
|
+
<a href="#">Dashboard</a>
|
|
366
|
+
<a href="#">Reports</a>
|
|
367
|
+
<a href="#">Settings</a>
|
|
368
|
+
</nav>
|
|
369
|
+
</k-aside>
|
|
370
|
+
<button id="btn13expand">Expand</button>
|
|
371
|
+
<button id="btn13collapse">Collapse</button>
|
|
372
|
+
<button id="btn13hide">Hide</button>
|
|
373
|
+
<script>
|
|
374
|
+
const a13 = document.getElementById('aside13');
|
|
375
|
+
document.getElementById('btn13expand').addEventListener('click',()=> a13.expand());
|
|
376
|
+
document.getElementById('btn13collapse').addEventListener('click',()=> a13.collapse());
|
|
377
|
+
document.getElementById('btn13hide').addEventListener('click',()=> a13.hide());
|
|
378
|
+
</script>
|
|
379
|
+
</k-card>
|
|
380
|
+
</div>
|
|
381
|
+
</div>
|
|
382
|
+
|
|
383
|
+
<h2 id="subItems"><a href="#subItems" class="no-link">Items & Labels</a></h2>
|
|
384
|
+
<p>Use <code>k-aside-item</code>, <code>k-aside-label</code>, and <code>k-aside-spacer</code> inside a push-mode aside for a navigation panel with icons and text. Set <code>--aside_padding: 0;</code> on the aside so the sub-components control their own spacing.</p>
|
|
385
|
+
<p>Items and labels automatically react to the aside's collapsed/expanded state.</p>
|
|
386
|
+
<div class="row -mx">
|
|
387
|
+
<div class="col m-span-12 px">
|
|
388
|
+
<k-card label="HTML">
|
|
389
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-aside</span> <span class="hljs-attr">main</span>=<span class="hljs-string">"push"</span> <span class="hljs-attr">state</span>=<span class="hljs-string">"expanded"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"--aside_padding: 0;"</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-toggle</span>></span><span class="hljs-tag"><<span class="hljs-name">h5</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"m-0"</span>></span>Kempo<span class="hljs-tag"></<span class="hljs-name">h5</span>></span><span class="hljs-tag"></<span class="hljs-name">k-aside-toggle</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">icon</span>=<span class="hljs-string">"cards"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span> <span class="hljs-attr">active</span>></span>Dashboard<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">icon</span>=<span class="hljs-string">"check"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>Tasks<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">icon</span>=<span class="hljs-string">"label"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>Email<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-label</span>></span>Projects<span class="hljs-tag"></<span class="hljs-name">k-aside-label</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">icon</span>=<span class="hljs-string">"folder"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>Figma Design<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">icon</span>=<span class="hljs-string">"folder"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>Static Mania<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-spacer</span>></span><span class="hljs-tag"></<span class="hljs-name">k-aside-spacer</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">icon</span>=<span class="hljs-string">"settings"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>Settings<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">icon</span>=<span class="hljs-string">"account-circle"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>Profile<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br><span class="hljs-tag"></<span class="hljs-name">k-aside</span>></span><br><span class="hljs-tag"><<span class="hljs-name">k-main</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">h2</span>></span>Main Content<span class="hljs-tag"></<span class="hljs-name">h2</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>Content adjusts when panel opens/closes.<span class="hljs-tag"></<span class="hljs-name">p</span>></span><br><span class="hljs-tag"></<span class="hljs-name">k-main</span>></span></code></pre>
|
|
390
|
+
</k-card>
|
|
391
|
+
</div>
|
|
392
|
+
<div class="col m-span-12 px">
|
|
393
|
+
<k-card label="Output">
|
|
394
|
+
<iframe src="./aside-items.html" style="width: 100%; height: 600px; border: 1px solid var(--c_border); border-radius: var(--radius);"></iframe>
|
|
395
|
+
</k-card>
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
|
|
399
|
+
<h2 id="subMenu"><a href="#subMenu" class="no-link">Expandable Menus</a></h2>
|
|
400
|
+
<p>Use <code>k-aside-menu</code> for collapsible sub-menus with an icon and label. When the aside is collapsed, clicking a menu icon expands the aside (unless <code>no-expand</code> is set).</p>
|
|
401
|
+
<div class="row -mx">
|
|
402
|
+
<div class="col m-span-12 px">
|
|
403
|
+
<k-card label="HTML">
|
|
404
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-aside</span> <span class="hljs-attr">main</span>=<span class="hljs-string">"push"</span> <span class="hljs-attr">state</span>=<span class="hljs-string">"expanded"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"--aside_padding: 0;"</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-toggle</span>></span><span class="hljs-tag"><<span class="hljs-name">h5</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"m-0"</span>></span>Kempo<span class="hljs-tag"></<span class="hljs-name">h5</span>></span><span class="hljs-tag"></<span class="hljs-name">k-aside-toggle</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">icon</span>=<span class="hljs-string">"cards"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>Dashboard<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-menu</span> <span class="hljs-attr">icon</span>=<span class="hljs-string">"folder"</span> <span class="hljs-attr">label</span>=<span class="hljs-string">"Projects"</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>Website Redesign<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>Mobile App<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"></<span class="hljs-name">k-aside-menu</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-menu</span> <span class="hljs-attr">icon</span>=<span class="hljs-string">"settings"</span> <span class="hljs-attr">label</span>=<span class="hljs-string">"Settings"</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>General<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"><<span class="hljs-name">k-aside-item</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>></span>Security<span class="hljs-tag"></<span class="hljs-name">k-aside-item</span>></span><br> <span class="hljs-tag"></<span class="hljs-name">k-aside-menu</span>></span><br><span class="hljs-tag"></<span class="hljs-name">k-aside</span>></span></code></pre>
|
|
405
|
+
</k-card>
|
|
406
|
+
</div>
|
|
407
|
+
<div class="col m-span-12 px">
|
|
408
|
+
<k-card label="Output">
|
|
409
|
+
<iframe src="./aside-menu.html" style="width: 100%; height: 400px; border: 1px solid var(--c_border); border-radius: var(--radius);"></iframe>
|
|
410
|
+
</k-card>
|
|
411
|
+
</div>
|
|
412
|
+
</div>
|
|
413
|
+
|
|
414
|
+
<h2 id="events"><a href="#events" class="no-link">State Change Event</a></h2>
|
|
415
|
+
<p>The <code>aside_state_change</code> event fires on both the element and on <code>window</code> whenever the state changes. The event detail contains <code>{ aside, state, main }</code>.</p>
|
|
416
|
+
<div class="row -mx">
|
|
417
|
+
<div class="col m-span-12 px">
|
|
418
|
+
<k-card label="HTML">
|
|
419
|
+
<pre><code class="hljs html"><k-aside id="myAside" state="offscreen">
|
|
420
|
+
<p>Open and close me to see events.</p>
|
|
421
|
+
</k-aside>
|
|
422
|
+
<button onclick="myAside.expand()">Open Menu</button>
|
|
423
|
+
<div id="log"></div>
|
|
424
|
+
|
|
425
|
+
<script>
|
|
426
|
+
myAside.addEventListener('aside_state_change', e => {
|
|
427
|
+
log.textContent = 'state: ' + e.detail.state;
|
|
428
|
+
});
|
|
429
|
+
</script></code></pre>
|
|
430
|
+
</k-card>
|
|
431
|
+
</div>
|
|
432
|
+
<div class="col m-span-12 px">
|
|
433
|
+
<k-card label="Output">
|
|
434
|
+
<k-aside id="aside10" state="offscreen">
|
|
435
|
+
<p>Open and close me to see events.</p>
|
|
436
|
+
</k-aside>
|
|
437
|
+
<button id="open10">Open Menu</button>
|
|
438
|
+
<div id="eventLog" class="p b r mt" style="font-family:monospace;min-height:3rem;"></div>
|
|
439
|
+
<script>
|
|
440
|
+
const log10 = document.getElementById('eventLog');
|
|
441
|
+
document.getElementById('aside10').addEventListener('aside_state_change', e => {
|
|
442
|
+
const entry = document.createElement('div');
|
|
443
|
+
entry.textContent = 'state: ' + e.detail.state + ', main: ' + e.detail.main;
|
|
444
|
+
log10.prepend(entry);
|
|
445
|
+
});
|
|
446
|
+
document.getElementById('open10').addEventListener('click',()=>{
|
|
447
|
+
document.getElementById('aside10').expand();
|
|
448
|
+
});
|
|
449
|
+
</script>
|
|
450
|
+
</k-card>
|
|
451
|
+
</div>
|
|
452
|
+
</div>
|
|
453
|
+
|
|
454
|
+
<h2 id="jsRef">JavaScript Reference</h2>
|
|
455
|
+
|
|
456
|
+
<h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
|
|
457
|
+
<h6>Extends <a href="./shadow-component.html">ShadowComponent</a></h6>
|
|
458
|
+
<h5><code>new Aside()</code></h5>
|
|
459
|
+
|
|
460
|
+
<h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
|
|
461
|
+
<ul>
|
|
462
|
+
<li><a href="./shadow-component.html">ShadowComponent</a></li>
|
|
463
|
+
<li><a href="./focus-capture.html">FocusCapture</a> (used in overlay mode)</li>
|
|
464
|
+
<li><strong>k-main:</strong> Wrap your page content in <code><k-main></code> so push-mode asides can shift the layout.</li>
|
|
465
|
+
</ul>
|
|
466
|
+
|
|
467
|
+
<h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
|
|
468
|
+
<h5><code>state<i>: string</i></code></h5>
|
|
469
|
+
<p>The current state. <code>"expanded"</code> (default) shows the full aside, <code>"collapsed"</code> shows a narrow strip (width set by <code>--collapsed-width</code>), <code>"offscreen"</code> hides it. Syncs to <code>state</code> attribute.</p>
|
|
470
|
+
<h5><code>side<i>: string</i></code></h5>
|
|
471
|
+
<p>Which side of the viewport to anchor to. <code>"left"</code> (default) or <code>"right"</code>. Syncs to <code>side</code> attribute.</p>
|
|
472
|
+
<h5><code>main<i>: string</i></code></h5>
|
|
473
|
+
<p>How the aside interacts with page content. <code>"overlay"</code> (default) renders a backdrop and focus trap without affecting layout. <code>"push"</code> dispatches events so <code><k-main></code> adjusts its margins. Syncs to <code>main</code> attribute.</p>
|
|
474
|
+
<h5><code>overlayClose<i>: boolean</i></code></h5>
|
|
475
|
+
<p>Whether clicking the overlay backdrop closes the aside. Defaults to <code>true</code>. Syncs to <code>overlay-close</code> attribute.</p>
|
|
476
|
+
<h5><code>escClose<i>: boolean</i></code></h5>
|
|
477
|
+
<p>Whether pressing the ESC key closes the aside. Defaults to <code>true</code>. Syncs to <code>esc-close</code> attribute.</p>
|
|
478
|
+
|
|
479
|
+
<h3 id="eventRef"><a href="#eventRef" class="no-link">Events</a></h3>
|
|
480
|
+
<h5><code>aside_state_change</code></h5>
|
|
481
|
+
<p>Dispatched on the element and on <code>window</code> whenever <code>state</code> changes. Detail: <code>{ aside, state, main }</code>.</p>
|
|
482
|
+
|
|
483
|
+
<h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
|
|
484
|
+
<h5><code>expand()<i>: void</i></code></h5>
|
|
485
|
+
<p>Sets state to <code>"expanded"</code>.</p>
|
|
486
|
+
<h5><code>collapse()<i>: void</i></code></h5>
|
|
487
|
+
<p>Sets state to <code>"collapsed"</code>.</p>
|
|
488
|
+
<h5><code>hide()<i>: void</i></code></h5>
|
|
489
|
+
<p>Sets state to <code>"offscreen"</code>.</p>
|
|
490
|
+
<h5><code>toggle()<i>: void</i></code></h5>
|
|
491
|
+
<p>Toggles between <code>"expanded"</code> and <code>"offscreen"</code>.</p>
|
|
492
|
+
|
|
493
|
+
<h3 id="cssVars"><a href="#cssVars" class="no-link">CSS Custom Properties</a></h3>
|
|
494
|
+
<h5><code>--width</code></h5>
|
|
495
|
+
<p>Width of the aside when expanded. Default <code>20rem</code>.</p>
|
|
496
|
+
<h5><code>--collapsed-width</code></h5>
|
|
497
|
+
<p>Width of the aside when collapsed. Default <code>3.5rem</code>.</p>
|
|
498
|
+
<h5><code>--bg</code></h5>
|
|
499
|
+
<p>Background color. Default <code>var(--c_bg)</code>.</p>
|
|
500
|
+
<h5><code>--border</code></h5>
|
|
501
|
+
<p>Color of the inner border. Default <code>var(--c_border)</code>.</p>
|
|
502
|
+
|
|
503
|
+
<h2 id="subRef">Sub-Component Reference</h2>
|
|
504
|
+
|
|
505
|
+
<h3 id="asideItem"><a href="#asideItem" class="no-link">k-aside-item</a></h3>
|
|
506
|
+
<p>A navigation link that reacts to the parent aside's collapsed/expanded state. Shows icon + text when expanded, icon-only when collapsed.</p>
|
|
507
|
+
<div class="table-wrapper mb">
|
|
508
|
+
<table>
|
|
509
|
+
<thead><tr><th>Attribute</th><th>Type</th><th>Default</th><th>Description</th></tr></thead>
|
|
510
|
+
<tbody>
|
|
511
|
+
<tr><td><code>icon</code></td><td>string</td><td><code>""</code></td><td>Icon name (renders <code>k-icon</code>). Shows a dot when collapsed if no icon set.</td></tr>
|
|
512
|
+
<tr><td><code>href</code></td><td>string</td><td><code>"#"</code></td><td>Link URL.</td></tr>
|
|
513
|
+
<tr><td><code>active</code></td><td>boolean</td><td><code>false</code></td><td>Highlights the item with the primary color.</td></tr>
|
|
514
|
+
<tr><td><code>no-expand</code></td><td>boolean</td><td><code>false</code></td><td>Prevents clicking a collapsed item from expanding the aside.</td></tr>
|
|
515
|
+
<tr><td><code>hide-when-collapsed</code></td><td>boolean</td><td><code>false</code></td><td>Hides the item entirely when collapsed.</td></tr>
|
|
516
|
+
</tbody>
|
|
517
|
+
</table>
|
|
518
|
+
</div>
|
|
519
|
+
|
|
520
|
+
<h3 id="asideLabel"><a href="#asideLabel" class="no-link">k-aside-label</a></h3>
|
|
521
|
+
<p>A section label. Displays text when expanded, an <code><hr></code> divider when collapsed.</p>
|
|
522
|
+
<p>No additional attributes beyond automatic collapsed state syncing.</p>
|
|
523
|
+
|
|
524
|
+
<h3 id="asideMenu"><a href="#asideMenu" class="no-link">k-aside-menu</a></h3>
|
|
525
|
+
<p>An expandable sub-menu that toggles open/closed. When the aside is collapsed, clicking the menu icon expands the aside.</p>
|
|
526
|
+
<div class="table-wrapper mb">
|
|
527
|
+
<table>
|
|
528
|
+
<thead><tr><th>Attribute</th><th>Type</th><th>Default</th><th>Description</th></tr></thead>
|
|
529
|
+
<tbody>
|
|
530
|
+
<tr><td><code>icon</code></td><td>string</td><td><code>""</code></td><td>Icon name for the menu header.</td></tr>
|
|
531
|
+
<tr><td><code>label</code></td><td>string</td><td><code>""</code></td><td>Text label for the menu header.</td></tr>
|
|
532
|
+
<tr><td><code>open</code></td><td>boolean</td><td><code>false</code></td><td>Whether the sub-menu is expanded.</td></tr>
|
|
533
|
+
<tr><td><code>no-expand</code></td><td>boolean</td><td><code>false</code></td><td>Prevents clicking a collapsed menu from expanding the aside.</td></tr>
|
|
534
|
+
<tr><td><code>hide-when-collapsed</code></td><td>boolean</td><td><code>false</code></td><td>Hides the menu entirely when collapsed.</td></tr>
|
|
535
|
+
</tbody>
|
|
536
|
+
</table>
|
|
537
|
+
</div>
|
|
538
|
+
<p>Slot: Place <code>k-aside-item</code> elements inside for sub-menu links.</p>
|
|
539
|
+
|
|
540
|
+
<h3 id="asideSpacer"><a href="#asideSpacer" class="no-link">k-aside-spacer</a></h3>
|
|
541
|
+
<p>A flexible spacer (<code>flex: 1</code>) that pushes subsequent items to the bottom of the aside. No attributes.</p>
|
|
542
|
+
|
|
543
|
+
<h3 id="asideToggle"><a href="#asideToggle" class="no-link">k-aside-toggle</a></h3>
|
|
544
|
+
<p>A header with a collapse/expand toggle button. Renders an arrow icon that flips direction based on state. Place content (e.g. a logo) in the default slot; it hides when collapsed.</p>
|
|
545
|
+
<p>No additional attributes. Automatically syncs with the parent aside's state.</p>
|
|
546
|
+
</content>
|
|
547
|
+
<content location="scripts">
|
|
548
|
+
<script type="module" src="{{pathToRoot}}src/components/Aside.js"></script>
|
|
549
|
+
<script type="module" src="{{pathToRoot}}src/components/Card.js"></script>
|
|
550
|
+
</content>
|
|
551
|
+
</page>
|