kempo-ui 0.0.16 → 0.0.17
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/LightComponent.js +1 -0
- package/dist/components/ShadowComponent.js +1 -0
- package/dist/components/Split.js +84 -0
- package/dist/components/Table.js +151 -0
- package/dist/{src/components → components}/Tree.js +0 -3
- package/dist/{src/components → components}/tableControls/FieldSortHide.js +1 -2
- package/dist/{src/components → components}/tableControls/Filters.js +2 -3
- package/docs/kempo-ui/components/accordion.html +28 -43
- package/docs/kempo-ui/components/card.html +24 -16
- package/docs/kempo-ui/components/content-slider.html +101 -78
- package/docs/kempo-ui/components/dialog.html +24 -20
- package/docs/kempo-ui/components/focus-capture.html +21 -16
- package/docs/kempo-ui/components/hybrid-component.html +13 -10
- package/docs/kempo-ui/components/icon.html +36 -28
- package/docs/kempo-ui/components/import.html +36 -26
- package/docs/kempo-ui/components/light-component.html +44 -25
- package/docs/kempo-ui/components/photo-viewer.html +151 -103
- package/docs/kempo-ui/components/resize.html +27 -22
- package/docs/kempo-ui/components/shadow-component.html +37 -22
- package/docs/kempo-ui/components/show-more.html +23 -18
- package/docs/kempo-ui/components/side-menu.html +1 -1
- package/docs/kempo-ui/components/sortable.html +20 -15
- package/docs/kempo-ui/components/split.html +60 -33
- package/docs/kempo-ui/components/table.html +71 -100
- package/docs/kempo-ui/components/tableControls.html +7 -3
- package/docs/kempo-ui/components/tableCustomFields.html +6 -3
- package/docs/kempo-ui/components/tablePagination.html +12 -10
- package/docs/kempo-ui/components/tableRecordEditing.html +7 -4
- package/docs/kempo-ui/components/tableRecordFiltering.html +1 -1
- package/docs/kempo-ui/components/tableRecordHiding.html +9 -6
- package/docs/kempo-ui/components/tableRecordSelection.html +6 -4
- package/docs/kempo-ui/components/tableRowControls.html +7 -6
- package/docs/kempo-ui/components/tabs.html +41 -91
- package/docs/kempo-ui/components/tags.html +85 -38
- package/docs/kempo-ui/components/theme-switcher.html +12 -7
- package/docs/kempo-ui/components/timestamp.html +78 -29
- package/docs/kempo-ui/components/toast.html +194 -154
- package/docs/kempo-ui/components/toggle.html +13 -8
- package/docs/kempo-ui/components/tree.html +48 -40
- package/docs/kempo-ui/index.html +0 -6
- package/docs/kempo-ui/nav.inc.html +0 -1
- package/docs/kempo-ui/nav.inc.js +12 -0
- package/docs/kempo-ui/src/components/LightComponent.js +1 -1
- package/docs/kempo-ui/src/components/ShadowComponent.js +1 -1
- package/docs/kempo-ui/src/components/SideMenu.js +1 -1
- package/docs/kempo-ui/src/components/Split.js +1 -1
- package/docs/kempo-ui/src/components/Table.js +77 -77
- package/docs/kempo-ui/src/components/Tree.js +0 -3
- package/docs/kempo-ui/src/components/tableControls/FieldSortHide.js +1 -2
- package/docs/kempo-ui/src/components/tableControls/Filters.js +2 -3
- package/docs/kempo-ui/src/kempo-hljs.css +1 -0
- package/docs/kempo-ui/src/kempo-vars.css +1 -0
- package/docs/kempo-ui/utils/debounce.html +16 -15
- package/docs/kempo-ui/utils/drag.html +22 -19
- package/docs/kempo-ui/utils/propConverters.html +4 -4
- package/package.json +2 -2
- package/scripts/build.js +5 -5
- package/src/components/LightComponent.js +22 -0
- package/src/components/ShadowComponent.js +23 -0
- package/src/components/SideMenu.js +1 -1
- package/src/components/Split.js +16 -8
- package/src/components/Table.js +112 -95
- package/src/components/Tree.js +0 -3
- package/src/components/tableControls/FieldSortHide.js +1 -1
- package/src/components/tableControls/Filters.js +2 -3
- package/dist/src/components/LightComponent.js +0 -1
- package/dist/src/components/ShadowComponent.js +0 -1
- package/dist/src/components/Split.js +0 -84
- package/dist/src/components/Table.js +0 -151
- package/dist/src/utils/watchWindowSize.js +0 -1
- package/docs/kempo-ui/src/utils/watchWindowSize.js +0 -1
- package/docs/kempo-ui/utils/watchWindowSize.html +0 -72
- package/src/utils/watchWindowSize.js +0 -16
- /package/dist/{src/components → components}/Accordion.js +0 -0
- /package/dist/{src/components → components}/Card.js +0 -0
- /package/dist/{src/components → components}/ContentSlider.js +0 -0
- /package/dist/{src/components → components}/Dialog.js +0 -0
- /package/dist/{src/components → components}/FocusCapture.js +0 -0
- /package/dist/{src/components → components}/HybridComponent.js +0 -0
- /package/dist/{src/components → components}/Icon.js +0 -0
- /package/dist/{src/components → components}/Import.js +0 -0
- /package/dist/{src/components → components}/PhotoViewer.js +0 -0
- /package/dist/{src/components → components}/Resize.js +0 -0
- /package/dist/{src/components → components}/ShowMore.js +0 -0
- /package/dist/{src/components → components}/SideMenu.js +0 -0
- /package/dist/{src/components → components}/Sortable.js +0 -0
- /package/dist/{src/components → components}/Tabs.js +0 -0
- /package/dist/{src/components → components}/Tags.js +0 -0
- /package/dist/{src/components → components}/ThemeSwitcher.js +0 -0
- /package/dist/{src/components → components}/Timestamp.js +0 -0
- /package/dist/{src/components → components}/Toast.js +0 -0
- /package/dist/{src/components → components}/Toggle.js +0 -0
- /package/dist/{src/components → components}/tableControls/DeleteRecord.js +0 -0
- /package/dist/{src/components → components}/tableControls/Edit.js +0 -0
- /package/dist/{src/components → components}/tableControls/ExportCSV.js +0 -0
- /package/dist/{src/components → components}/tableControls/ExportJson.js +0 -0
- /package/dist/{src/components → components}/tableControls/FirstPage.js +0 -0
- /package/dist/{src/components → components}/tableControls/HiddenCount.js +0 -0
- /package/dist/{src/components → components}/tableControls/Hide.js +0 -0
- /package/dist/{src/components → components}/tableControls/LastPage.js +0 -0
- /package/dist/{src/components → components}/tableControls/NextPage.js +0 -0
- /package/dist/{src/components → components}/tableControls/PageSelect.js +0 -0
- /package/dist/{src/components → components}/tableControls/PageSize.js +0 -0
- /package/dist/{src/components → components}/tableControls/PrevPage.js +0 -0
- /package/dist/{src/components → components}/tableControls/Search.js +0 -0
- /package/dist/{src/components → components}/tableControls/ShowAll.js +0 -0
- /package/dist/{src/components → components}/tableControls/TableControl.js +0 -0
- /package/dist/{src/lit-all.min.js → lit-all.min.js} +0 -0
- /package/dist/{src/utils → utils}/debounce.js +0 -0
- /package/dist/{src/utils → utils}/drag.js +0 -0
- /package/dist/{src/utils → utils}/formatTimestamp.js +0 -0
- /package/dist/{src/utils → utils}/propConverters.js +0 -0
- /package/dist/{src/utils → utils}/toTitleCase.js +0 -0
|
@@ -15,26 +15,26 @@
|
|
|
15
15
|
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
16
16
|
<h1 class="ta-center">Content Slider</h1>
|
|
17
17
|
<main>
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</
|
|
37
|
-
</
|
|
18
|
+
<k-accordion persistent-id="toc" class="b r mb">
|
|
19
|
+
<k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
|
|
20
|
+
<k-accordion-panel name="toc-panel">
|
|
21
|
+
<div class="m ">
|
|
22
|
+
<h6>Examples</h6>
|
|
23
|
+
<a href="#basicUsage">Basic Usage</a><br />
|
|
24
|
+
<a href="#keyboardControls">Keyboard Controls</a><br />
|
|
25
|
+
<a href="#globalControls">Global Controls</a><br />
|
|
26
|
+
<a href="#controls">Controls</a><br />
|
|
27
|
+
<a href="#loop">Loop</a><br />
|
|
28
|
+
<h6 class="mt"><a href="#jsRef" class="no-link">JavaScript Reference</a></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="#methods">Methods</a><br />
|
|
33
|
+
<a href="#events">Events</a><br />
|
|
34
|
+
<a href="#slots">Slots</a><br />
|
|
35
|
+
</div>
|
|
36
|
+
</k-accordion-panel>
|
|
37
|
+
</k-accordion>
|
|
38
38
|
|
|
39
39
|
<h3>Description</h3>
|
|
40
40
|
<p>The ContentSlider component provides a way to display multiple content slides with navigation controls. Users can navigate through slides using previous/next buttons, keyboard arrows, or programmatically. It extends the <a href="./component.html">ShadowComponent</a> class and supports looping, keyboard controls, and customizable navigation.</p>
|
|
@@ -42,18 +42,22 @@
|
|
|
42
42
|
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
43
43
|
<div class="row -mx">
|
|
44
44
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
45
|
-
<
|
|
45
|
+
<k-card label="HTML">
|
|
46
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-content-slider</span><br /> <span class="hljs-attr">class</span>=<span class="hljs-string">"bg-alt"</span><br /> <span class="hljs-attr">style</span>=<span class="hljs-string">"height: 10rem"</span><br />></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 1<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 2<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 3<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 4<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-content-slider</span>></span></code></pre>
|
|
47
|
+
</k-card>
|
|
46
48
|
</div>
|
|
47
49
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
48
|
-
<k-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
<k-card label="Results">
|
|
51
|
+
<k-content-slider
|
|
52
|
+
class="bg-alt"
|
|
53
|
+
style="height: 10rem"
|
|
54
|
+
>
|
|
55
|
+
<div><p>Slide 1</p></div>
|
|
56
|
+
<div><p>Slide 2</p></div>
|
|
57
|
+
<div><p>Slide 3</p></div>
|
|
58
|
+
<div><p>Slide 4</p></div>
|
|
59
|
+
</k-content-slider>
|
|
60
|
+
</k-card>
|
|
57
61
|
</div>
|
|
58
62
|
</div>
|
|
59
63
|
|
|
@@ -61,19 +65,23 @@
|
|
|
61
65
|
<p>By default the <code>keyboard-controls</code> attribute is set to <code>"true"</code>, which allows the left and right keyboard buttons to change the slides when the component is focused. Set it to <code>"false"</code> to disable this functionality.</p>
|
|
62
66
|
<div class="row -mx">
|
|
63
67
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
64
|
-
<
|
|
68
|
+
<k-card label="HTML">
|
|
69
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-content-slider</span><br /> <span class="hljs-attr">class</span>=<span class="hljs-string">"bg-alt"</span><br /> <span class="hljs-attr">style</span>=<span class="hljs-string">"height: 10rem"</span><br /> <span class="hljs-attr">keyboard-controls</span>=<span class="hljs-string">"false"</span><br />></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 1<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 2<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 3<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 4<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-content-slider</span>></span></code></pre>
|
|
70
|
+
</k-card>
|
|
65
71
|
</div>
|
|
66
72
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
67
|
-
<k-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
<k-card label="Results">
|
|
74
|
+
<k-content-slider
|
|
75
|
+
class="bg-alt"
|
|
76
|
+
style="height: 10rem"
|
|
77
|
+
keyboard-controls="false"
|
|
78
|
+
>
|
|
79
|
+
<div><p>Slide 1</p></div>
|
|
80
|
+
<div><p>Slide 2</p></div>
|
|
81
|
+
<div><p>Slide 3</p></div>
|
|
82
|
+
<div><p>Slide 4</p></div>
|
|
83
|
+
</k-content-slider>
|
|
84
|
+
</k-card>
|
|
77
85
|
</div>
|
|
78
86
|
</div>
|
|
79
87
|
|
|
@@ -81,19 +89,23 @@
|
|
|
81
89
|
<p>Use the <code>global-controls="true"</code> attribute to enable global controls (next and back arrows) anywhere in the window, even when this component is not focused. This is suggested when there is only one content slider on a page and it is of prominance (large slider on top of the page).</p>
|
|
82
90
|
<div class="row -mx">
|
|
83
91
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
84
|
-
<
|
|
92
|
+
<k-card label="HTML">
|
|
93
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-content-slider</span><br /> <span class="hljs-attr">class</span>=<span class="hljs-string">"bg-alt"</span><br /> <span class="hljs-attr">style</span>=<span class="hljs-string">"height: 10rem"</span><br /> <span class="hljs-attr">global-controls</span>=<span class="hljs-string">"true"</span><br />></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 1<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 2<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 3<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 4<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-content-slider</span>></span></code></pre>
|
|
94
|
+
</k-card>
|
|
85
95
|
</div>
|
|
86
96
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
87
|
-
<k-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
<k-card label="Results">
|
|
98
|
+
<k-content-slider
|
|
99
|
+
class="bg-alt"
|
|
100
|
+
style="height: 10rem"
|
|
101
|
+
global-controls="true"
|
|
102
|
+
>
|
|
103
|
+
<div><p>Slide 1</p></div>
|
|
104
|
+
<div><p>Slide 2</p></div>
|
|
105
|
+
<div><p>Slide 3</p></div>
|
|
106
|
+
<div><p>Slide 4</p></div>
|
|
107
|
+
</k-content-slider>
|
|
108
|
+
</k-card>
|
|
97
109
|
</div>
|
|
98
110
|
</div>
|
|
99
111
|
|
|
@@ -101,19 +113,23 @@
|
|
|
101
113
|
<p>By default the <code>controls</code> attribute is set to <code>"true"</code>, this shows the previous and next buttons. To hide them set <code>controls="false"</code>.</p>
|
|
102
114
|
<div class="row -mx">
|
|
103
115
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
104
|
-
<
|
|
116
|
+
<k-card label="HTML">
|
|
117
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-content-slider</span><br /> <span class="hljs-attr">class</span>=<span class="hljs-string">"bg-alt"</span><br /> <span class="hljs-attr">style</span>=<span class="hljs-string">"height: 10rem"</span><br /> <span class="hljs-attr">controls</span>=<span class="hljs-string">"false"</span><br />></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 1<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 2<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 3<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 4<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-content-slider</span>></span></code></pre>
|
|
118
|
+
</k-card>
|
|
105
119
|
</div>
|
|
106
120
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
107
|
-
<k-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
121
|
+
<k-card label="Results">
|
|
122
|
+
<k-content-slider
|
|
123
|
+
class="bg-alt"
|
|
124
|
+
style="height: 10rem"
|
|
125
|
+
controls="false"
|
|
126
|
+
>
|
|
127
|
+
<div><p>Slide 1</p></div>
|
|
128
|
+
<div><p>Slide 2</p></div>
|
|
129
|
+
<div><p>Slide 3</p></div>
|
|
130
|
+
<div><p>Slide 4</p></div>
|
|
131
|
+
</k-content-slider>
|
|
132
|
+
</k-card>
|
|
117
133
|
</div>
|
|
118
134
|
</div>
|
|
119
135
|
|
|
@@ -121,23 +137,27 @@
|
|
|
121
137
|
<p>To make the slider loop (go back to the beginning after it hits the last slide) use the <code>loop="true"</code> attribute.</p>
|
|
122
138
|
<div class="row -mx">
|
|
123
139
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
124
|
-
<
|
|
140
|
+
<k-card label="HTML">
|
|
141
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-content-slider</span><br /> <span class="hljs-attr">class</span>=<span class="hljs-string">"bg-alt"</span><br /> <span class="hljs-attr">style</span>=<span class="hljs-string">"height: 10rem"</span><br /> <span class="hljs-attr">loop</span>=<span class="hljs-string">"true"</span><br />></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 1<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 2<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 3<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><span class="hljs-tag"><<span class="hljs-name">p</span>></span>Slide 4<span class="hljs-tag"></<span class="hljs-name">p</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-content-slider</span>></span></code></pre>
|
|
142
|
+
</k-card>
|
|
125
143
|
</div>
|
|
126
144
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
127
|
-
<k-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
145
|
+
<k-card label="Results">
|
|
146
|
+
<k-content-slider
|
|
147
|
+
class="bg-alt"
|
|
148
|
+
style="height: 10rem"
|
|
149
|
+
loop="true"
|
|
150
|
+
>
|
|
151
|
+
<div><p>Slide 1</p></div>
|
|
152
|
+
<div><p>Slide 2</p></div>
|
|
153
|
+
<div><p>Slide 3</p></div>
|
|
154
|
+
<div><p>Slide 4</p></div>
|
|
155
|
+
</k-content-slider>
|
|
156
|
+
</k-card>
|
|
137
157
|
</div>
|
|
138
158
|
</div>
|
|
139
159
|
|
|
140
|
-
<h2 id="jsRef">JavaScript
|
|
160
|
+
<h2 id="jsRef" class="mt"><a href="#jsRef" class="no-link">JavaScript Reference</a></h2>
|
|
141
161
|
|
|
142
162
|
<h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
|
|
143
163
|
<h6>Extends <a href="./component.html">ShadowComponent</a></h6>
|
|
@@ -213,7 +233,10 @@
|
|
|
213
233
|
<p>Custom content for the next button. Defaults to a right chevron icon if not provided.</p>
|
|
214
234
|
|
|
215
235
|
</main>
|
|
216
|
-
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
217
|
-
<script type="module" src="/kempo-ui/src/components/ContentSlider.js"></script>
|
|
236
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
237
|
+
<script type="module" src="/kempo-ui/src/components/ContentSlider.js"></script>
|
|
238
|
+
<script type="module" src="/kempo-ui/src/components/Accordion.js"></script>
|
|
239
|
+
<script type="module" src="/kempo-ui/src/components/Card.js"></script>
|
|
240
|
+
|
|
218
241
|
</body>
|
|
219
|
-
</html>
|
|
242
|
+
</html>
|
|
@@ -16,25 +16,27 @@
|
|
|
16
16
|
<main>
|
|
17
17
|
<h1 class="ta-center">Dialog</h1>
|
|
18
18
|
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
<k-accordion persistent-id="toc" class="b r mb">
|
|
20
|
+
<k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
|
|
21
|
+
<k-accordion-panel name="toc-panel">
|
|
22
|
+
<div class="m ">
|
|
23
|
+
<h6>Examples</h6>
|
|
24
|
+
<a href="#basicUsage">Basic Usage</a><br />
|
|
25
|
+
<a href="#titles">Titles</a><br />
|
|
26
|
+
<a href="#actionButtons">Action Buttons</a><br />
|
|
27
|
+
<a href="#jsUsage">JavaScript Usage</a><br />
|
|
28
|
+
<a href="#confirmDialog">Confirm Dialog</a><br />
|
|
29
|
+
|
|
30
|
+
<h6 class="mt"><a href="#jsRef" class="no-link">JavaScript Reference</a></h6>
|
|
31
|
+
<a href="#constructor">Constructor</a><br />
|
|
32
|
+
<a href="#requirements">Requirements</a><br />
|
|
33
|
+
<a href="#attributes">Attributes</a><br />
|
|
34
|
+
<a href="#properties">Properties</a><br />
|
|
35
|
+
<a href="#methods">Methods</a><br />
|
|
36
|
+
<a href="#staticMethods">Static Methods</a><br />
|
|
37
|
+
</div>
|
|
38
|
+
</k-accordion-panel>
|
|
39
|
+
</k-accordion>
|
|
38
40
|
|
|
39
41
|
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
40
42
|
<p>Create dialogs using the <code>k-dialog</code> component. Open the dialog by calling the <code>open()</code> method, and close it by calling the <code>close()</code> method. Or it can be closed using the dialog's GUI (clicking the overlay, clicking the close button, or the cancel or confirm action buttons).</p>
|
|
@@ -136,7 +138,7 @@
|
|
|
136
138
|
});
|
|
137
139
|
</script>
|
|
138
140
|
|
|
139
|
-
<h2 id="jsRef">JavaScript Reference</h2>
|
|
141
|
+
<h2 id="jsRef"><a href="#jsRef" class="no-link">JavaScript Reference</a></h2>
|
|
140
142
|
|
|
141
143
|
<h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
|
|
142
144
|
<h6>Extends <a href="/kempo-ui/components/shadow-component.html">ShadowComponent</a></h6>
|
|
@@ -327,6 +329,8 @@
|
|
|
327
329
|
<div style="height:33vh"></div>
|
|
328
330
|
<script type="module" src="/kempo-ui/src/components/Dialog.js"></script>
|
|
329
331
|
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
332
|
+
<script type="module" src="/kempo-ui/src/components/Accordion.js"></script>
|
|
333
|
+
<script type="module" src="/kempo-ui/src/components/Card.js"></script>
|
|
330
334
|
<script>
|
|
331
335
|
document.querySelectorAll('.openDialog').forEach( $btn => {
|
|
332
336
|
$btn.addEventListener('click', () => {
|
|
@@ -15,20 +15,22 @@
|
|
|
15
15
|
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
16
16
|
<h1 class="ta-center">FocusCapture</h1>
|
|
17
17
|
<main>
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
<k-accordion persistent-id="toc" class="b r mb">
|
|
19
|
+
<k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
|
|
20
|
+
<k-accordion-panel name="toc-panel">
|
|
21
|
+
<div class="m ">
|
|
22
|
+
<h6>Examples</h6>
|
|
23
|
+
<a href="#basicUsage">Basic Usage</a><br />
|
|
24
|
+
<a href="#dialogExample">Dialog Example</a><br />
|
|
25
|
+
|
|
26
|
+
<h6 class="mt"><a href="#jsRef" class="no-link">JavaScript Reference</a></h6>
|
|
27
|
+
<a href="#constructor">Constructor</a><br />
|
|
28
|
+
<a href="#requirements">Requirements</a><br />
|
|
29
|
+
<a href="#properties">Properties</a><br />
|
|
30
|
+
<a href="#methods">Methods</a><br />
|
|
31
|
+
</div>
|
|
32
|
+
</k-accordion-panel>
|
|
33
|
+
</k-accordion>
|
|
32
34
|
|
|
33
35
|
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
34
36
|
<p>The <code>k-focus-capture</code> component traps focus within its children. When focus reaches the end of the focusable elements, it cycles back to the first focusable element. This is useful for modal dialogs, side menus, or any UI where you want to keep focus contained within a specific area.</p>
|
|
@@ -104,7 +106,10 @@
|
|
|
104
106
|
</main>
|
|
105
107
|
<div style="height:33vh"></div>
|
|
106
108
|
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
107
|
-
<script type="module" src="/kempo-ui/src/components/FocusCapture.js"></script>
|
|
108
|
-
<script type="module" src="/kempo-ui/src/components/Dialog.js"></script>
|
|
109
|
+
<script type="module" src="/kempo-ui/src/components/FocusCapture.js"></script>
|
|
110
|
+
<script type="module" src="/kempo-ui/src/components/Dialog.js"></script>
|
|
111
|
+
<script type="module" src="/kempo-ui/src/components/Accordion.js"></script>
|
|
112
|
+
<script type="module" src="/kempo-ui/src/components/Card.js"></script>
|
|
113
|
+
|
|
109
114
|
</body>
|
|
110
115
|
</html>
|
|
@@ -15,30 +15,31 @@
|
|
|
15
15
|
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
16
16
|
<h1 class="ta-center">HybridComponent</h1>
|
|
17
17
|
<main>
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
<
|
|
18
|
+
<k-accordion persistent-id="toc" class="b r mb">
|
|
19
|
+
<k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
|
|
20
|
+
<k-accordion-panel name="toc-panel">
|
|
21
|
+
<div class="m pl">
|
|
21
22
|
<h6>Guide</h6>
|
|
22
23
|
<a href="#overview">Overview</a><br />
|
|
23
24
|
<a href="#basicUsage">Basic Usage</a><br />
|
|
24
25
|
<a href="#whenToUse">When to Use</a><br />
|
|
25
26
|
|
|
26
|
-
<h6 class="mt">JavaScript Reference</h6>
|
|
27
|
+
<h6 class="mt"><a href="#jsRef" class="no-link">JavaScript Reference</a></h6>
|
|
27
28
|
<a href="#constructor">Constructor</a><br />
|
|
28
29
|
<a href="#requirements">Requirements</a><br />
|
|
29
30
|
<a href="#properties">Properties</a><br />
|
|
30
31
|
<a href="#methods">Methods</a><br />
|
|
31
32
|
</div>
|
|
32
|
-
</
|
|
33
|
+
</k-accordion-panel>
|
|
34
|
+
</k-accordion>
|
|
33
35
|
|
|
34
36
|
<h3 id="overview"><a href="#overview" class="no-link">Overview</a></h3>
|
|
35
|
-
<p>HybridComponent is a base class that extends <a href="shadow-component.html">ShadowComponent</a> and provides both shadow DOM rendering with Kempo CSS styles AND light DOM rendering. Use this when you want your component to:</p>
|
|
37
|
+
<p>HybridComponent is a base class that extends <a href="/kempo-ui/components/shadow-component.html">ShadowComponent</a> and provides both shadow DOM rendering with Kempo CSS styles AND light DOM rendering. Use this when you want your component to:</p>
|
|
36
38
|
<ul>
|
|
37
39
|
<li>Have shadow DOM with Kempo CSS for internal UI elements</li>
|
|
38
40
|
<li>Also render content to the light DOM alongside natural children</li>
|
|
39
41
|
<li>Combine the benefits of both shadow and light DOM</li>
|
|
40
42
|
</ul>
|
|
41
|
-
<p>Components like <a href="collapsible.html">Collapsible</a>, <a href="dialog.html">Dialog</a>, and <a href="side-menu.html">SideMenu</a> extend HybridComponent.</p>
|
|
42
43
|
|
|
43
44
|
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
44
45
|
<p>Create a custom component by extending HybridComponent and implementing both <code>render()</code> for shadow DOM and <code>renderLightDom()</code> for light DOM:</p>
|
|
@@ -64,10 +65,10 @@
|
|
|
64
65
|
<li><strong>SideMenu:</strong> Shadow DOM for menu structure and styling, light DOM for menu items</li>
|
|
65
66
|
</ul>
|
|
66
67
|
|
|
67
|
-
<p>Use <a href="shadow-component.html">ShadowComponent</a> instead when you only need shadow DOM.</p>
|
|
68
|
-
<p>Use <a href="light-component.html">LightComponent</a> instead when you only need light DOM.</p>
|
|
68
|
+
<p>Use <a href="/kempo-ui/components/shadow-component.html">ShadowComponent</a> instead when you only need shadow DOM.</p>
|
|
69
|
+
<p>Use <a href="/kempo-ui/components/light-component.html">LightComponent</a> instead when you only need light DOM.</p>
|
|
69
70
|
|
|
70
|
-
<h2 id="jsRef">JavaScript Reference</h2>
|
|
71
|
+
<h2 id="jsRef"><a href="#jsRef" class="no-link">JavaScript Reference</a></h2>
|
|
71
72
|
|
|
72
73
|
<h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
|
|
73
74
|
<h6>Extends ShadowComponent</h6>
|
|
@@ -106,5 +107,7 @@
|
|
|
106
107
|
</main>
|
|
107
108
|
<div style="height:33vh"></div>
|
|
108
109
|
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
110
|
+
<script type="module" src="/kempo-ui/src/components/Accordion.js"></script>
|
|
111
|
+
<script type="module" src="/kempo-ui/src/components/Card.js"></script>
|
|
109
112
|
</body>
|
|
110
113
|
</html>
|
|
@@ -15,34 +15,40 @@
|
|
|
15
15
|
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
16
16
|
<h1 class="ta-center">Icon</h1>
|
|
17
17
|
<main>
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
<k-accordion persistent-id="toc" class="b r mb">
|
|
19
|
+
<k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
|
|
20
|
+
<k-accordion-panel name="toc-panel">
|
|
21
|
+
<div class="m ">
|
|
22
|
+
<h6>Examples</h6>
|
|
23
|
+
<a href="#basicUsage">Basic Usage</a><br />
|
|
24
|
+
<a href="#explicitSource">Explicitly Set the Source</a><br />
|
|
25
|
+
<a href="#fallbackIcon">Fallback Icon</a><br />
|
|
26
|
+
<a href="#changingIconDirectory">Changing the Icon Directory Location</a><br />
|
|
27
|
+
<a href="#addingIcons">Adding Icons</a><br />
|
|
28
|
+
<a href="#updatingIconDirectoryPath">Updating the Icon Directory Path</a><br />
|
|
29
|
+
|
|
30
|
+
<h6 class="mt"><a href="#jsRef" class="no-link">JavaScript Reference</a></h6>
|
|
31
|
+
<a href="#constructor">Constructor</a><br />
|
|
32
|
+
<a href="#requirements">Requirements</a><br />
|
|
33
|
+
<a href="#properties">Properties</a><br />
|
|
34
|
+
</div>
|
|
35
|
+
</k-accordion-panel>
|
|
36
|
+
</k-accordion>
|
|
36
37
|
|
|
37
38
|
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
38
39
|
<p>Create an icon using the <code>k-icon</code> component. You can specify the icon by setting the <code>name</code> or <code>src</code> attribute.</p>
|
|
39
|
-
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-icon</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"folder"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-icon</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">k-icon</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"/path/to/icon.svg"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-icon</span>></span></code></pre>
|
|
40
40
|
<div class="row -mx mb">
|
|
41
41
|
<div class="col d-span-6 m-span-12 px">
|
|
42
|
-
<k-
|
|
42
|
+
<k-card label="HTML">
|
|
43
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-icon</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"folder"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-icon</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">k-icon</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"/path/to/icon.svg"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-icon</span>></span></code></pre>
|
|
44
|
+
</k-card>
|
|
43
45
|
</div>
|
|
44
46
|
<div class="col d-span-6 m-span-12 px">
|
|
45
|
-
<k-
|
|
47
|
+
<k-card label="Results">
|
|
48
|
+
<k-icon name="folder"></k-icon>
|
|
49
|
+
<k-icon src="/path/to/icon.svg"></k-icon>
|
|
50
|
+
</k-card>
|
|
51
|
+
|
|
46
52
|
</div>
|
|
47
53
|
</div>
|
|
48
54
|
|
|
@@ -53,7 +59,7 @@
|
|
|
53
59
|
</k-card>
|
|
54
60
|
</div>
|
|
55
61
|
<div class="col d-span-6 m-span-12 px">
|
|
56
|
-
<k-card label="
|
|
62
|
+
<k-card label="Results">
|
|
57
63
|
<k-icon name="menu"></k-icon>
|
|
58
64
|
<k-icon name="close"></k-icon>
|
|
59
65
|
<k-icon name="play"></k-icon>
|
|
@@ -71,7 +77,7 @@
|
|
|
71
77
|
</k-card>
|
|
72
78
|
</div>
|
|
73
79
|
<div class="col d-span-6 m-span-12 px">
|
|
74
|
-
<k-card label="
|
|
80
|
+
<k-card label="Results">
|
|
75
81
|
<k-icon src="https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/wysiwyg/default/24px.svg"></k-icon>
|
|
76
82
|
</k-card>
|
|
77
83
|
</div>
|
|
@@ -86,7 +92,7 @@
|
|
|
86
92
|
</k-card>
|
|
87
93
|
</div>
|
|
88
94
|
<div class="col d-span-6 m-span-12 px">
|
|
89
|
-
<k-card label="
|
|
95
|
+
<k-card label="Results">
|
|
90
96
|
<k-icon name="invalid"></k-icon>
|
|
91
97
|
<k-icon name="invalid">
|
|
92
98
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M240-280h200v-80H240v80Zm400 0h80v-80h-80v80ZM240-440h200v-80H240v80Zm400 0h80v-240h-80v240ZM240-600h200v-80H240v80Zm-80 480q-33 0-56.5-23.5T80-200v-560q0-33 23.5-56.5T160-840h640q33 0 56.5 23.5T880-760v560q0 33-23.5 56.5T800-120H160Zm0-80h640v-560H160v560Zm0 0v-560 560Z"/></svg>
|
|
@@ -118,7 +124,7 @@
|
|
|
118
124
|
<p>To change the location of the directory holding the icons, import the <code>Icon</code> class, and set the static member <code>pathToIcons</code> to point to the correct location. Do this before icons are loaded (for example, in the head of the document).</p>
|
|
119
125
|
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="javascript"><br /> <span class="hljs-keyword">import</span> Icon <span class="hljs-keyword">from</span> <span class="hljs-string">'/src/components/Icon.js'</span>;<br /> Icon.pathToIcons = [<span class="hljs-string">'./pathTo/icons'</span>];<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
120
126
|
|
|
121
|
-
<h2 id="jsRef">JavaScript Reference</h2>
|
|
127
|
+
<h2 id="jsRef"><a href="#jsRef" class="no-link">JavaScript Reference</a></h2>
|
|
122
128
|
|
|
123
129
|
<h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
|
|
124
130
|
<h6>Extends <a href="./component.html">Component</a></h6>
|
|
@@ -147,7 +153,9 @@
|
|
|
147
153
|
</main>
|
|
148
154
|
<div style="height:33vh"></div>
|
|
149
155
|
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
150
|
-
<script type="module" src="/kempo-ui/src/components/
|
|
151
|
-
<script type="module" src="/kempo-ui/src/components/
|
|
156
|
+
<script type="module" src="/kempo-ui/src/components/Icon.js"></script>
|
|
157
|
+
<script type="module" src="/kempo-ui/src/components/Accordion.js"></script>
|
|
158
|
+
<script type="module" src="/kempo-ui/src/components/Card.js"></script>
|
|
159
|
+
|
|
152
160
|
</body>
|
|
153
|
-
</html>
|
|
161
|
+
</html>
|