kempo-ui 0.0.17 → 0.0.18
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/SideMenu.js +2 -2
- package/docs/{kempo-ui/components → components}/accordion.html +11 -13
- package/docs/{kempo-ui/components → components}/card.html +9 -9
- package/docs/{kempo-ui/components → components}/content-slider.html +122 -81
- package/docs/{kempo-ui/components → components}/dialog.html +22 -22
- package/docs/{kempo-ui/components → components}/focus-capture.html +11 -11
- package/docs/{kempo-ui/components → components}/hybrid-component.html +12 -12
- package/docs/{kempo-ui/components → components}/icon.html +10 -10
- package/docs/{kempo-ui/components → components}/import.html +9 -9
- package/docs/{kempo-ui/components → components}/light-component.html +11 -11
- package/docs/{kempo-ui/components → components}/photo-viewer.html +10 -10
- package/docs/{kempo-ui/components → components}/resize.html +10 -10
- package/docs/{kempo-ui/components → components}/shadow-component.html +11 -11
- package/docs/{kempo-ui/components → components}/show-more.html +10 -10
- package/docs/{kempo-ui/components → components}/side-menu.html +8 -8
- package/docs/{kempo-ui/components → components}/sortable.html +10 -10
- package/docs/{kempo-ui/components → components}/split.html +11 -11
- package/docs/{kempo-ui/components → components}/table.html +23 -23
- package/docs/{kempo-ui/components → components}/tableControls.html +12 -12
- package/docs/{kempo-ui/components → components}/tableCustomFields.html +9 -9
- package/docs/{kempo-ui/components → components}/tableFetchRecords.html +16 -16
- package/docs/{kempo-ui/components → components}/tableFieldSortHide.html +11 -11
- package/docs/{kempo-ui/components → components}/tablePagination.html +15 -15
- package/docs/{kempo-ui/components → components}/tableRecordEditing.html +12 -12
- package/docs/{kempo-ui/components → components}/tableRecordFiltering.html +11 -11
- package/docs/{kempo-ui/components → components}/tableRecordHiding.html +12 -12
- package/docs/{kempo-ui/components → components}/tableRecordSearching.html +11 -11
- package/docs/{kempo-ui/components → components}/tableRecordSelection.html +9 -9
- package/docs/{kempo-ui/components → components}/tableRowControls.html +11 -11
- package/docs/{kempo-ui/components → components}/tableSorting.html +9 -9
- package/docs/{kempo-ui/components → components}/tabs.html +10 -10
- package/docs/{kempo-ui/components → components}/tags.html +10 -10
- package/docs/{kempo-ui/components → components}/theme-switcher.html +10 -10
- package/docs/{kempo-ui/components → components}/timestamp.html +10 -10
- package/docs/{kempo-ui/components → components}/toast.html +16 -16
- package/docs/{kempo-ui/components → components}/toggle.html +10 -10
- package/docs/{kempo-ui/components → components}/tree.html +17 -17
- package/docs/dev.config.json +3 -4
- package/docs/{kempo-ui/index.html → index.html} +0 -1
- package/docs/init-1.js +4 -0
- package/docs/nav-1.inc.html +66 -0
- package/docs/nav.inc.html +66 -0
- package/docs/{kempo-ui/src → src}/components/SideMenu.js +2 -2
- package/docs/{kempo-ui/utils → utils}/debounce.html +8 -8
- package/docs/{kempo-ui/utils → utils}/drag.html +8 -8
- package/docs/{kempo-ui/utils → utils}/formatTimestamp.html +7 -7
- package/docs/{kempo-ui/utils → utils}/propConverters.html +7 -7
- package/docs/{kempo-ui/utils → utils}/toTitleCase.html +7 -7
- package/package.json +2 -2
- package/scripts/build.js +8 -15
- package/scripts/docs.js +0 -3
- package/src/components/SideMenu.js +2 -1
- package/tests/components/HybridComponent.browser-test.js +1 -1
- package/tests/components/ShadowComponent.browser-test.js +3 -3
- package/docs/kempo-ui/kempo-hljs.css +0 -1
- package/docs/kempo-ui/nav.inc.html +0 -66
- package/docs/kempo-ui/src/kempo-hljs.css +0 -1
- package/src/kempo-hljs.css +0 -146
- /package/docs/{kempo-ui/icons → icons}/add.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/arrow-back.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/arrow-down-double.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/arrow-down.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/arrow-forward.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/arrow-up-double.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/arrow-up.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/cards.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/check.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/chevron-left.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/chevron-right.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/close.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/compare.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/delete.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/drag-handle.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/drawing2.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/edit.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/error.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/export-file.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/file-text.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/file.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/filter-off.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/filter.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/first.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/folder-clear.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/folder-create.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/folder-open.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/folder.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/hide.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/image.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/label-add.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/label.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/last.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/menu.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/mode-auto.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/mode-dark.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/mode-light.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/open-in-browser.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/pause.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/play.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/refresh.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/remove.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/save.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/search.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/settings.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/show.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/storage.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/table-visibility.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/tag.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/tools.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/trash-x.svg +0 -0
- /package/docs/{kempo-ui/icons → icons}/warning.svg +0 -0
- /package/{dist → docs}/kempo-hljs.css +0 -0
- /package/docs/{kempo-ui/kempo-vars.css → kempo-vars.css} +0 -0
- /package/docs/{kempo-ui/kempo.min.css → kempo.min.css} +0 -0
- /package/docs/{kempo-ui/media → media}/civic.jpg +0 -0
- /package/docs/{kempo-ui/media → media}/corvette.jpg +0 -0
- /package/docs/{kempo-ui/media → media}/evo.jpg +0 -0
- /package/docs/{kempo-ui/media → media}/gtr.jpg +0 -0
- /package/docs/{kempo-ui/media → media}/nsx.jpg +0 -0
- /package/docs/{kempo-ui/nav.inc.js → nav.inc.js} +0 -0
- /package/docs/{kempo-ui/src → src}/components/Accordion.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Card.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/ContentSlider.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Dialog.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/FocusCapture.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/HybridComponent.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Icon.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Import.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/LightComponent.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/PhotoViewer.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Resize.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/ShadowComponent.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/ShowMore.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Sortable.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Split.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Table.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Tabs.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Tags.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/ThemeSwitcher.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Timestamp.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Toast.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Toggle.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/Tree.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/DeleteRecord.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/Edit.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/ExportCSV.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/ExportJson.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/FieldSortHide.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/Filters.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/FirstPage.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/HiddenCount.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/Hide.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/LastPage.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/NextPage.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/PageSelect.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/PageSize.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/PrevPage.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/Search.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/ShowAll.js +0 -0
- /package/docs/{kempo-ui/src → src}/components/tableControls/TableControl.js +0 -0
- /package/docs/{kempo-ui/src → src}/kempo-vars.css +0 -0
- /package/docs/{kempo-ui/src → src}/lit-all.min.js +0 -0
- /package/docs/{kempo-ui/src → src}/utils/debounce.js +0 -0
- /package/docs/{kempo-ui/src → src}/utils/drag.js +0 -0
- /package/docs/{kempo-ui/src → src}/utils/formatTimestamp.js +0 -0
- /package/docs/{kempo-ui/src → src}/utils/propConverters.js +0 -0
- /package/docs/{kempo-ui/src → src}/utils/toTitleCase.js +0 -0
- /package/docs/{kempo-ui/styles.css → styles.css} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import ShadowComponent from"./ShadowComponent.js";import{html,css}from"../lit-all.min.js";import{boolTrueFalse}from"../utils/propConverters.js";import"./FocusCapture.js";export default class SideMenu extends ShadowComponent{static properties={opened:{type:Boolean,reflect:!0},overlayClose:{type:Boolean,reflect:!0,attribute:"overlay-close",converter:boolTrueFalse},side:{type:String,reflect:!0}};constructor(){super(),this.opened=!1,this.overlayClose=!0,this.side="left"}overlayClick=()=>{this.overlayClose&&this.close()};updated(e){super.updated(e),e.has("opened")&&(this.opened?(this.dispatchEvent(new CustomEvent("change",{detail:"open"})),this.dispatchEvent(new CustomEvent("open"))):(this.dispatchEvent(new CustomEvent("change",{detail:"close"})),this.dispatchEvent(new CustomEvent("close"))))}open(){this.opened=!0}close(){this.opened=!1}toggle(){this.opened?this.close():this.open(),this.dispatchEvent(new CustomEvent("toggle"))}render(){return html`
|
|
1
|
+
import ShadowComponent from"./ShadowComponent.js";import{html,css}from"../lit-all.min.js";import{boolTrueFalse}from"../utils/propConverters.js";import"./FocusCapture.js";import"./Icon.js";export default class SideMenu extends ShadowComponent{static properties={opened:{type:Boolean,reflect:!0},overlayClose:{type:Boolean,reflect:!0,attribute:"overlay-close",converter:boolTrueFalse},side:{type:String,reflect:!0}};constructor(){super(),this.opened=!1,this.overlayClose=!0,this.side="left"}overlayClick=()=>{this.overlayClose&&this.close()};updated(e){super.updated(e),e.has("opened")&&(this.opened?(this.dispatchEvent(new CustomEvent("change",{detail:"open"})),this.dispatchEvent(new CustomEvent("open"))):(this.dispatchEvent(new CustomEvent("change",{detail:"close"})),this.dispatchEvent(new CustomEvent("close"))))}open(){this.opened=!0}close(){this.opened=!1}toggle(){this.opened?this.close():this.open(),this.dispatchEvent(new CustomEvent("toggle"))}render(){return html`
|
|
2
2
|
<k-focus-capture>
|
|
3
3
|
<div id="container">
|
|
4
4
|
<button id="overlay" @click=${this.overlayClick}>
|
|
5
|
-
<div id="overlay-x"
|
|
5
|
+
<div id="overlay-x"><k-icon name="close"></k-icon></div>
|
|
6
6
|
</button>
|
|
7
7
|
<div id="menu">
|
|
8
8
|
<slot></slot>
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<base href="/kempo-ui/">
|
|
5
4
|
<meta charset="UTF-8">
|
|
6
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
6
|
<title>Accordion - Components - Kempo Docs - A Web Components Solution</title>
|
|
8
|
-
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
-
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
-
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
-
<link rel="stylesheet" href="styles.css" />
|
|
7
|
+
<link rel="stylesheet" href="../kempo-vars.css" />
|
|
8
|
+
<link rel="stylesheet" href="../kempo.min.css" />
|
|
9
|
+
<link rel="stylesheet" href="../kempo-hljs.css" />
|
|
10
|
+
<link rel="stylesheet" href="../styles.css" />
|
|
12
11
|
<script>window.litDisableBundleWarning = true;</script>
|
|
12
|
+
<script src="../init-1.js" type="module"></script>
|
|
13
13
|
</head>
|
|
14
|
-
|
|
15
14
|
<body>
|
|
16
|
-
<k-import src="
|
|
15
|
+
<k-import src="../nav-1.inc.html"></k-import>
|
|
17
16
|
<h1 class="ta-center">Accordion</h1>
|
|
18
17
|
<main>
|
|
19
18
|
<k-accordion persistent-id="toc" class="b r mb">
|
|
@@ -212,10 +211,9 @@
|
|
|
212
211
|
|
|
213
212
|
</main>
|
|
214
213
|
<div style="height:33vh"></div>
|
|
215
|
-
<script type="module" src="
|
|
216
|
-
<script type="module" src="
|
|
217
|
-
<script type="module" src="
|
|
218
|
-
<script type="module" src="
|
|
219
|
-
|
|
214
|
+
<script type="module" src="../src/components/Import.js"></script>
|
|
215
|
+
<script type="module" src="../src/components/Accordion.js"></script>
|
|
216
|
+
<script type="module" src="../src/components/Card.js"></script>
|
|
217
|
+
<script type="module" src="../src/components/Resize.js"></script>
|
|
220
218
|
</body>
|
|
221
|
-
</html>
|
|
219
|
+
</html>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<base href="/kempo-ui/">
|
|
5
4
|
<meta charset="UTF-8">
|
|
6
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
6
|
<title>Card - Components - Kempo Docs - A Web Components Solution</title>
|
|
8
|
-
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
-
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
-
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
-
<link rel="stylesheet" href="styles.css" />
|
|
7
|
+
<link rel="stylesheet" href="../kempo-vars.css" />
|
|
8
|
+
<link rel="stylesheet" href="../kempo.min.css" />
|
|
9
|
+
<link rel="stylesheet" href="../kempo-hljs.css" />
|
|
10
|
+
<link rel="stylesheet" href="../styles.css" />
|
|
12
11
|
<script>window.litDisableBundleWarning = true;</script>
|
|
12
|
+
<script src="../init-1.js" type="module"></script>
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
|
-
<k-import src="
|
|
15
|
+
<k-import src="../nav-1.inc.html"></k-import>
|
|
16
16
|
<h1 class="ta-center">Card</h1>
|
|
17
17
|
<main>
|
|
18
18
|
<k-accordion persistent-id="toc" class="b r mb">
|
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
|
|
89
89
|
</main>
|
|
90
90
|
<div style="height:33vh"></div>
|
|
91
|
-
<script type="module" src="
|
|
92
|
-
<script type="module" src="
|
|
93
|
-
<script type="module" src="
|
|
91
|
+
<script type="module" src="../src/components/Import.js"></script>
|
|
92
|
+
<script type="module" src="../src/components/Accordion.js"></script>
|
|
93
|
+
<script type="module" src="../src/components/Card.js"></script>
|
|
94
94
|
|
|
95
95
|
</body>
|
|
96
96
|
</html>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<base href="/kempo-ui/">
|
|
5
4
|
<meta charset="UTF-8">
|
|
6
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
6
|
<title>Content Slider - Components - Kempo Docs - A Web Components Solution</title>
|
|
8
|
-
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
-
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
-
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
-
<link rel="stylesheet" href="styles.css" />
|
|
7
|
+
<link rel="stylesheet" href="../kempo-vars.css" />
|
|
8
|
+
<link rel="stylesheet" href="../kempo.min.css" />
|
|
9
|
+
<link rel="stylesheet" href="../kempo-hljs.css" />
|
|
10
|
+
<link rel="stylesheet" href="../styles.css" />
|
|
12
11
|
<script>window.litDisableBundleWarning = true;</script>
|
|
12
|
+
<script src="../init-1.js" type="module"></script>
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
|
-
<k-import src="
|
|
15
|
+
<k-import src="../nav-1.inc.html"></k-import>
|
|
16
16
|
<h1 class="ta-center">Content Slider</h1>
|
|
17
17
|
<main>
|
|
18
18
|
<k-accordion persistent-id="toc" class="b r mb">
|
|
@@ -37,7 +37,10 @@
|
|
|
37
37
|
</k-accordion>
|
|
38
38
|
|
|
39
39
|
<h3>Description</h3>
|
|
40
|
-
<p>The ContentSlider component provides a way to display multiple content slides with navigation controls. Users can
|
|
40
|
+
<p>The ContentSlider component provides a way to display multiple content slides with navigation controls. Users can
|
|
41
|
+
navigate through slides using previous/next buttons, keyboard arrows, or programmatically. It extends the <a
|
|
42
|
+
href="./component.html">ShadowComponent</a> class and supports looping, keyboard controls, and customizable
|
|
43
|
+
navigation.</p>
|
|
41
44
|
|
|
42
45
|
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
43
46
|
<div class="row -mx">
|
|
@@ -48,21 +51,28 @@
|
|
|
48
51
|
</div>
|
|
49
52
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
50
53
|
<k-card label="Results">
|
|
51
|
-
<k-content-slider
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<div
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<div
|
|
54
|
+
<k-content-slider class="bg-alt" style="height: 10rem">
|
|
55
|
+
<div>
|
|
56
|
+
<p>Slide 1</p>
|
|
57
|
+
</div>
|
|
58
|
+
<div>
|
|
59
|
+
<p>Slide 2</p>
|
|
60
|
+
</div>
|
|
61
|
+
<div>
|
|
62
|
+
<p>Slide 3</p>
|
|
63
|
+
</div>
|
|
64
|
+
<div>
|
|
65
|
+
<p>Slide 4</p>
|
|
66
|
+
</div>
|
|
59
67
|
</k-content-slider>
|
|
60
68
|
</k-card>
|
|
61
69
|
</div>
|
|
62
70
|
</div>
|
|
63
71
|
|
|
64
72
|
<h3 id="keyboardControls"><a href="#keyboardControls" class="no-link">Keyboard Controls</a></h3>
|
|
65
|
-
<p>By default the <code>keyboard-controls</code> attribute is set to <code>"true"</code>, which allows the left and
|
|
73
|
+
<p>By default the <code>keyboard-controls</code> attribute is set to <code>"true"</code>, which allows the left and
|
|
74
|
+
right keyboard buttons to change the slides when the component is focused. Set it to <code>"false"</code> to
|
|
75
|
+
disable this functionality.</p>
|
|
66
76
|
<div class="row -mx">
|
|
67
77
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
68
78
|
<k-card label="HTML">
|
|
@@ -71,22 +81,28 @@
|
|
|
71
81
|
</div>
|
|
72
82
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
73
83
|
<k-card label="Results">
|
|
74
|
-
<k-content-slider
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<div
|
|
82
|
-
|
|
84
|
+
<k-content-slider class="bg-alt" style="height: 10rem" keyboard-controls="false">
|
|
85
|
+
<div>
|
|
86
|
+
<p>Slide 1</p>
|
|
87
|
+
</div>
|
|
88
|
+
<div>
|
|
89
|
+
<p>Slide 2</p>
|
|
90
|
+
</div>
|
|
91
|
+
<div>
|
|
92
|
+
<p>Slide 3</p>
|
|
93
|
+
</div>
|
|
94
|
+
<div>
|
|
95
|
+
<p>Slide 4</p>
|
|
96
|
+
</div>
|
|
83
97
|
</k-content-slider>
|
|
84
98
|
</k-card>
|
|
85
99
|
</div>
|
|
86
100
|
</div>
|
|
87
101
|
|
|
88
102
|
<h3 id="globalControls"><a href="#globalControls" class="no-link">Global Controls</a></h3>
|
|
89
|
-
<p>Use the <code>global-controls="true"</code> attribute to enable global controls (next and back arrows) anywhere
|
|
103
|
+
<p>Use the <code>global-controls="true"</code> attribute to enable global controls (next and back arrows) anywhere
|
|
104
|
+
in the window, even when this component is not focused. This is suggested when there is only one content slider on
|
|
105
|
+
a page and it is of prominance (large slider on top of the page).</p>
|
|
90
106
|
<div class="row -mx">
|
|
91
107
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
92
108
|
<k-card label="HTML">
|
|
@@ -95,22 +111,27 @@
|
|
|
95
111
|
</div>
|
|
96
112
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
97
113
|
<k-card label="Results">
|
|
98
|
-
<k-content-slider
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<div
|
|
106
|
-
|
|
114
|
+
<k-content-slider class="bg-alt" style="height: 10rem" global-controls="true">
|
|
115
|
+
<div>
|
|
116
|
+
<p>Slide 1</p>
|
|
117
|
+
</div>
|
|
118
|
+
<div>
|
|
119
|
+
<p>Slide 2</p>
|
|
120
|
+
</div>
|
|
121
|
+
<div>
|
|
122
|
+
<p>Slide 3</p>
|
|
123
|
+
</div>
|
|
124
|
+
<div>
|
|
125
|
+
<p>Slide 4</p>
|
|
126
|
+
</div>
|
|
107
127
|
</k-content-slider>
|
|
108
128
|
</k-card>
|
|
109
129
|
</div>
|
|
110
130
|
</div>
|
|
111
131
|
|
|
112
132
|
<h3 id="controls"><a href="#controls" class="no-link">Controls</a></h3>
|
|
113
|
-
<p>By default the <code>controls</code> attribute is set to <code>"true"</code>, this shows the previous and next
|
|
133
|
+
<p>By default the <code>controls</code> attribute is set to <code>"true"</code>, this shows the previous and next
|
|
134
|
+
buttons. To hide them set <code>controls="false"</code>.</p>
|
|
114
135
|
<div class="row -mx">
|
|
115
136
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
116
137
|
<k-card label="HTML">
|
|
@@ -119,22 +140,27 @@
|
|
|
119
140
|
</div>
|
|
120
141
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
121
142
|
<k-card label="Results">
|
|
122
|
-
<k-content-slider
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<div
|
|
130
|
-
|
|
143
|
+
<k-content-slider class="bg-alt" style="height: 10rem" controls="false">
|
|
144
|
+
<div>
|
|
145
|
+
<p>Slide 1</p>
|
|
146
|
+
</div>
|
|
147
|
+
<div>
|
|
148
|
+
<p>Slide 2</p>
|
|
149
|
+
</div>
|
|
150
|
+
<div>
|
|
151
|
+
<p>Slide 3</p>
|
|
152
|
+
</div>
|
|
153
|
+
<div>
|
|
154
|
+
<p>Slide 4</p>
|
|
155
|
+
</div>
|
|
131
156
|
</k-content-slider>
|
|
132
157
|
</k-card>
|
|
133
158
|
</div>
|
|
134
159
|
</div>
|
|
135
160
|
|
|
136
161
|
<h3 id="loop"><a href="#loop" class="no-link">Loop</a></h3>
|
|
137
|
-
<p>To make the slider loop (go back to the beginning after it hits the last slide) use the <code>loop="true"</code>
|
|
162
|
+
<p>To make the slider loop (go back to the beginning after it hits the last slide) use the <code>loop="true"</code>
|
|
163
|
+
attribute.</p>
|
|
138
164
|
<div class="row -mx">
|
|
139
165
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
140
166
|
<k-card label="HTML">
|
|
@@ -143,15 +169,19 @@
|
|
|
143
169
|
</div>
|
|
144
170
|
<div class="col d-span-6 t-span-6 m-spane-12 p">
|
|
145
171
|
<k-card label="Results">
|
|
146
|
-
<k-content-slider
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
<div
|
|
154
|
-
|
|
172
|
+
<k-content-slider class="bg-alt" style="height: 10rem" loop="true">
|
|
173
|
+
<div>
|
|
174
|
+
<p>Slide 1</p>
|
|
175
|
+
</div>
|
|
176
|
+
<div>
|
|
177
|
+
<p>Slide 2</p>
|
|
178
|
+
</div>
|
|
179
|
+
<div>
|
|
180
|
+
<p>Slide 3</p>
|
|
181
|
+
</div>
|
|
182
|
+
<div>
|
|
183
|
+
<p>Slide 4</p>
|
|
184
|
+
</div>
|
|
155
185
|
</k-content-slider>
|
|
156
186
|
</k-card>
|
|
157
187
|
</div>
|
|
@@ -173,32 +203,40 @@
|
|
|
173
203
|
|
|
174
204
|
<h3 id="properties"><a href="#properties" class="no-link">Properties</a></h3>
|
|
175
205
|
<h5><code>index<i>: number</i></code></h5>
|
|
176
|
-
<p>Gets or sets the current slide index. Automatically validates to stay within bounds. Syncs to <code>index</code>
|
|
206
|
+
<p>Gets or sets the current slide index. Automatically validates to stay within bounds. Syncs to <code>index</code>
|
|
207
|
+
attribute. Default value is <code>0</code>.</p>
|
|
177
208
|
|
|
178
209
|
<h5><code>controls<i>: boolean</i></code></h5>
|
|
179
|
-
<p>Gets or sets whether control buttons are visible. Syncs to <code>controls</code> attribute. Default value is
|
|
210
|
+
<p>Gets or sets whether control buttons are visible. Syncs to <code>controls</code> attribute. Default value is
|
|
211
|
+
<code>true</code>.</p>
|
|
180
212
|
|
|
181
213
|
<h5><code>keyboardControls<i>: boolean</i></code></h5>
|
|
182
|
-
<p>Gets or sets whether keyboard controls are enabled. Syncs to <code>keyboard-controls</code> attribute. Default
|
|
214
|
+
<p>Gets or sets whether keyboard controls are enabled. Syncs to <code>keyboard-controls</code> attribute. Default
|
|
215
|
+
value is <code>true</code>.</p>
|
|
183
216
|
|
|
184
217
|
<h5><code>globalControls<i>: boolean</i></code></h5>
|
|
185
|
-
<p>Gets or sets whether global keyboard controls are enabled. Use with caution - recommended only for prominent
|
|
218
|
+
<p>Gets or sets whether global keyboard controls are enabled. Use with caution - recommended only for prominent
|
|
219
|
+
sliders. Syncs to <code>global-controls</code> attribute. Default value is <code>false</code>.</p>
|
|
186
220
|
|
|
187
221
|
<h5><code>loop<i>: boolean</i></code></h5>
|
|
188
|
-
<p>Gets or sets whether the slider loops continuously (after the last slide, go to the first; before the first
|
|
222
|
+
<p>Gets or sets whether the slider loops continuously (after the last slide, go to the first; before the first
|
|
223
|
+
slide, go to the last). Syncs to <code>loop</code> attribute. Default value is <code>false</code>.</p>
|
|
189
224
|
|
|
190
225
|
<h5><code>content<i>: Array<HTMLElement></i></code></h5>
|
|
191
226
|
<p>Array of child elements that serve as slides. Automatically updated when the component is connected.</p>
|
|
192
227
|
|
|
193
228
|
<h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
|
|
194
229
|
<h5><code>previous()<i>: void</i></code></h5>
|
|
195
|
-
<p>Navigates to the previous slide. If <code>loop</code> is enabled and currently on the first slide, goes to the
|
|
230
|
+
<p>Navigates to the previous slide. If <code>loop</code> is enabled and currently on the first slide, goes to the
|
|
231
|
+
last slide. Dispatches a <code>previous</code> event.</p>
|
|
196
232
|
|
|
197
233
|
<h5><code>next()<i>: void</i></code></h5>
|
|
198
|
-
<p>Navigates to the next slide. If <code>loop</code> is enabled and currently on the last slide, goes to the first
|
|
199
|
-
|
|
234
|
+
<p>Navigates to the next slide. If <code>loop</code> is enabled and currently on the last slide, goes to the first
|
|
235
|
+
slide. Dispatches a <code>next</code> event.</p>
|
|
236
|
+
|
|
200
237
|
<h5><code>goto(index)<i>: void</i></code></h5>
|
|
201
|
-
<p>Navigates to the slide at the specified index. Index is automatically validated to stay within bounds. Dispatches
|
|
238
|
+
<p>Navigates to the slide at the specified index. Index is automatically validated to stay within bounds. Dispatches
|
|
239
|
+
a <code>goto</code> event.</p>
|
|
202
240
|
<ul>
|
|
203
241
|
<li><strong>index</strong> <code>number</code> - The zero-based index of the slide to navigate to</li>
|
|
204
242
|
</ul>
|
|
@@ -206,37 +244,40 @@
|
|
|
206
244
|
<h3 id="events"><a href="#events" class="no-link">Events</a></h3>
|
|
207
245
|
<h5><code>change</code></h5>
|
|
208
246
|
<p>Fired when the active slide changes. The event detail contains <code>{ index }</code>.</p>
|
|
209
|
-
|
|
247
|
+
|
|
210
248
|
<h5><code>previous</code></h5>
|
|
211
|
-
<p>Fired when the previous button is clicked or previous navigation is triggered. The event detail contains
|
|
212
|
-
|
|
249
|
+
<p>Fired when the previous button is clicked or previous navigation is triggered. The event detail contains
|
|
250
|
+
<code>{ index }</code> of the target slide.</p>
|
|
251
|
+
|
|
213
252
|
<h5><code>next</code></h5>
|
|
214
|
-
<p>Fired when the next button is clicked or next navigation is triggered. The event detail contains
|
|
215
|
-
|
|
253
|
+
<p>Fired when the next button is clicked or next navigation is triggered. The event detail contains
|
|
254
|
+
<code>{ index }</code> of the target slide.</p>
|
|
255
|
+
|
|
216
256
|
<h5><code>goto</code></h5>
|
|
217
|
-
<p>Fired when programmatic navigation to a specific slide occurs. The event detail contains <code>{ index }</code>
|
|
218
|
-
|
|
257
|
+
<p>Fired when programmatic navigation to a specific slide occurs. The event detail contains <code>{ index }</code>
|
|
258
|
+
of the target slide.</p>
|
|
259
|
+
|
|
219
260
|
<h5><code>keyleft</code></h5>
|
|
220
261
|
<p>Fired when the left arrow key is pressed (before triggering previous navigation).</p>
|
|
221
|
-
|
|
262
|
+
|
|
222
263
|
<h5><code>keyright</code></h5>
|
|
223
264
|
<p>Fired when the right arrow key is pressed (before triggering next navigation).</p>
|
|
224
265
|
|
|
225
266
|
<h3 id="slots"><a href="#slots" class="no-link">Slots</a></h3>
|
|
226
267
|
<h5><code>Default Slot</code></h5>
|
|
227
268
|
<p>The main content area where slide elements are placed. Each direct child element becomes a slide.</p>
|
|
228
|
-
|
|
269
|
+
|
|
229
270
|
<h5><code>prev</code></h5>
|
|
230
271
|
<p>Custom content for the previous button. Defaults to a left chevron icon if not provided.</p>
|
|
231
|
-
|
|
272
|
+
|
|
232
273
|
<h5><code>next</code></h5>
|
|
233
274
|
<p>Custom content for the next button. Defaults to a right chevron icon if not provided.</p>
|
|
234
|
-
|
|
235
|
-
</main>
|
|
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
275
|
|
|
276
|
+
</main>
|
|
277
|
+
<div style="height:33vh"></div>
|
|
278
|
+
<script type="module" src="../src/components/Import.js"></script>
|
|
279
|
+
<script type="module" src="../src/components/ContentSlider.js"></script>
|
|
280
|
+
<script type="module" src="../src/components/Accordion.js"></script>
|
|
281
|
+
<script type="module" src="../src/components/Card.js"></script>
|
|
241
282
|
</body>
|
|
242
|
-
</html>
|
|
283
|
+
</html>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<base href="/kempo-ui/">
|
|
5
4
|
<meta charset="UTF-8">
|
|
6
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
6
|
<title>Dialog - Components - Kempo Docs - A Web Components Solution</title>
|
|
8
|
-
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
-
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
-
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
-
<link rel="stylesheet" href="styles.css" />
|
|
7
|
+
<link rel="stylesheet" href="../kempo-vars.css" />
|
|
8
|
+
<link rel="stylesheet" href="../kempo.min.css" />
|
|
9
|
+
<link rel="stylesheet" href="../kempo-hljs.css" />
|
|
10
|
+
<link rel="stylesheet" href="../styles.css" />
|
|
12
11
|
<script>window.litDisableBundleWarning = true;</script>
|
|
12
|
+
<script src="../init-1.js" type="module"></script>
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
|
-
<k-import src="
|
|
15
|
+
<k-import src="../nav-1.inc.html"></k-import>
|
|
16
16
|
<main>
|
|
17
17
|
<h1 class="ta-center">Dialog</h1>
|
|
18
18
|
|
|
@@ -94,20 +94,20 @@
|
|
|
94
94
|
|
|
95
95
|
<h3 id="jsUsage"><a href="#jsUsage" class="no-link">JavaScript Usage</a></h3>
|
|
96
96
|
<h5>Create Dialog</h5>
|
|
97
|
-
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d7"</span>></span>Open Dialog<span class="hljs-tag"></<span class="hljs-name">button</span>></span><br /><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> Dialog <span class="hljs-keyword">from</span> <span class="hljs-string">'/
|
|
97
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d7"</span>></span>Open Dialog<span class="hljs-tag"></<span class="hljs-name">button</span>></span><br /><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> Dialog <span class="hljs-keyword">from</span> <span class="hljs-string">'/src/components/Dialog.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'d7'</span>).addEventListener(<span class="hljs-string">'click'</span>, () => {<br /> Dialog.create(<span class="hljs-string">'Hello World'</span>);<br /> });<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
98
98
|
<button id="d7" class="mb">Open Dialog</button>
|
|
99
99
|
<script type="module">
|
|
100
|
-
import Dialog from '/
|
|
100
|
+
import Dialog from '/src/components/Dialog.js';
|
|
101
101
|
document.getElementById('d7').addEventListener('click', () => {
|
|
102
102
|
Dialog.create('Hello World');
|
|
103
103
|
});
|
|
104
104
|
</script>
|
|
105
105
|
|
|
106
106
|
<h5>Dialog with Title</h5>
|
|
107
|
-
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d7b"</span>></span>Open Dialog with Title<span class="hljs-tag"></<span class="hljs-name">button</span>></span><br /><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> Dialog <span class="hljs-keyword">from</span> <span class="hljs-string">'/
|
|
107
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d7b"</span>></span>Open Dialog with Title<span class="hljs-tag"></<span class="hljs-name">button</span>></span><br /><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> Dialog <span class="hljs-keyword">from</span> <span class="hljs-string">'/src/components/Dialog.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'d7b'</span>).addEventListener(<span class="hljs-string">'click'</span>, () => {<br /> Dialog.create(<span class="hljs-string">'This is the dialog content'</span>, {<br /> <span class="hljs-attr">title</span>: <span class="hljs-string">'My Dialog Title'</span><br /> });<br /> });<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
108
108
|
<button id="d7b" class="mb">Open Dialog with Title</button>
|
|
109
109
|
<script type="module">
|
|
110
|
-
import Dialog from '/
|
|
110
|
+
import Dialog from '/src/components/Dialog.js';
|
|
111
111
|
document.getElementById('d7b').addEventListener('click', () => {
|
|
112
112
|
Dialog.create('This is the dialog content', {
|
|
113
113
|
title: 'My Dialog Title'
|
|
@@ -116,10 +116,10 @@
|
|
|
116
116
|
</script>
|
|
117
117
|
|
|
118
118
|
<h5>Error Dialog</h5>
|
|
119
|
-
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d8"</span>></span>Open Dialog<span class="hljs-tag"></<span class="hljs-name">button</span>></span><br /><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> Dialog <span class="hljs-keyword">from</span> <span class="hljs-string">'/
|
|
119
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d8"</span>></span>Open Dialog<span class="hljs-tag"></<span class="hljs-name">button</span>></span><br /><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> Dialog <span class="hljs-keyword">from</span> <span class="hljs-string">'/src/components/Dialog.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'d8'</span>).addEventListener(<span class="hljs-string">'click'</span>, () => {<br /> Dialog.error(<span class="hljs-string">"Oh no, don't do that!"</span>);<br /> });<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
120
120
|
<button id="d8" class="mb">Open Dialog</button>
|
|
121
121
|
<script type="module">
|
|
122
|
-
import Dialog from '/
|
|
122
|
+
import Dialog from '/src/components/Dialog.js';
|
|
123
123
|
document.getElementById('d8').addEventListener('click', () => {
|
|
124
124
|
Dialog.error("Oh no, don't do that!");
|
|
125
125
|
});
|
|
@@ -127,10 +127,10 @@
|
|
|
127
127
|
|
|
128
128
|
<h3 id="confirmDialog"><a href="#confirmDialog" class="no-link">Confirm Dialog</a></h3>
|
|
129
129
|
<p>Use the <code>Dialog.confirm</code> static method to create a confirmation dialog. This method takes a text message, a response callback, and an options object.</p>
|
|
130
|
-
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d9"</span>></span>Open Confirm Dialog<span class="hljs-tag"></<span class="hljs-name">button</span>></span><br /><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> Dialog <span class="hljs-keyword">from</span> <span class="hljs-string">'/
|
|
130
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">button</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"d9"</span>></span>Open Confirm Dialog<span class="hljs-tag"></<span class="hljs-name">button</span>></span><br /><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> Dialog <span class="hljs-keyword">from</span> <span class="hljs-string">'/src/components/Dialog.js'</span>;<br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'d9'</span>).addEventListener(<span class="hljs-string">'click'</span>, () => {<br /> Dialog.confirm(<span class="hljs-string">"Are you sure you want to proceed?"</span>, <span class="hljs-function"><span class="hljs-params">response</span> =></span> {<br /> <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"User response:"</span>, response);<br /> });<br /> });<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
131
131
|
<button id="d9" class="mb">Open Confirm Dialog</button>
|
|
132
132
|
<script type="module">
|
|
133
|
-
import Dialog from '/
|
|
133
|
+
import Dialog from '/src/components/Dialog.js';
|
|
134
134
|
document.getElementById('d9').addEventListener('click', () => {
|
|
135
135
|
Dialog.confirm("Are you sure you want to proceed?", response => {
|
|
136
136
|
console.log("User response:", response);
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
<h2 id="jsRef"><a href="#jsRef" class="no-link">JavaScript Reference</a></h2>
|
|
142
142
|
|
|
143
143
|
<h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
|
|
144
|
-
<h6>Extends <a href="
|
|
144
|
+
<h6>Extends <a href="./components/shadow-component.html">ShadowComponent</a></h6>
|
|
145
145
|
<h5>
|
|
146
146
|
<code>new Dialog()</code><br />
|
|
147
147
|
<code>new Dialog(<i>object</i> options)</code>
|
|
@@ -165,9 +165,9 @@
|
|
|
165
165
|
|
|
166
166
|
<h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
|
|
167
167
|
<ul>
|
|
168
|
-
<li><a href="
|
|
169
|
-
<li><a href="
|
|
170
|
-
<li><a href="
|
|
168
|
+
<li><a href="./components/shadow-component.html">ShadowComponent</a></li>
|
|
169
|
+
<li><a href="./components/icon.html">Icon</a></li>
|
|
170
|
+
<li><a href="./components/focus-capture.html">FocusCapture</a></li>
|
|
171
171
|
</ul>
|
|
172
172
|
|
|
173
173
|
<h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
|
|
@@ -327,10 +327,10 @@
|
|
|
327
327
|
|
|
328
328
|
</main>
|
|
329
329
|
<div style="height:33vh"></div>
|
|
330
|
-
<script type="module" src="
|
|
331
|
-
<script type="module" src="
|
|
332
|
-
<script type="module" src="
|
|
333
|
-
<script type="module" src="
|
|
330
|
+
<script type="module" src="../src/components/Dialog.js"></script>
|
|
331
|
+
<script type="module" src="../src/components/Import.js"></script>
|
|
332
|
+
<script type="module" src="../src/components/Accordion.js"></script>
|
|
333
|
+
<script type="module" src="../src/components/Card.js"></script>
|
|
334
334
|
<script>
|
|
335
335
|
document.querySelectorAll('.openDialog').forEach( $btn => {
|
|
336
336
|
$btn.addEventListener('click', () => {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<base href="/kempo-ui/">
|
|
5
4
|
<meta charset="UTF-8">
|
|
6
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
6
|
<title>FocusCapture - Components - Kempo Docs - A Web Components Solution</title>
|
|
8
|
-
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
-
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
-
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
-
<link rel="stylesheet" href="styles.css" />
|
|
7
|
+
<link rel="stylesheet" href="../kempo-vars.css" />
|
|
8
|
+
<link rel="stylesheet" href="../kempo.min.css" />
|
|
9
|
+
<link rel="stylesheet" href="../kempo-hljs.css" />
|
|
10
|
+
<link rel="stylesheet" href="../styles.css" />
|
|
12
11
|
<script>window.litDisableBundleWarning = true;</script>
|
|
12
|
+
<script src="../init-1.js" type="module"></script>
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
|
-
<k-import src="
|
|
15
|
+
<k-import src="../nav-1.inc.html"></k-import>
|
|
16
16
|
<h1 class="ta-center">FocusCapture</h1>
|
|
17
17
|
<main>
|
|
18
18
|
<k-accordion persistent-id="toc" class="b r mb">
|
|
@@ -105,11 +105,11 @@
|
|
|
105
105
|
|
|
106
106
|
</main>
|
|
107
107
|
<div style="height:33vh"></div>
|
|
108
|
-
<script type="module" src="
|
|
109
|
-
<script type="module" src="
|
|
110
|
-
<script type="module" src="
|
|
111
|
-
<script type="module" src="
|
|
112
|
-
<script type="module" src="
|
|
108
|
+
<script type="module" src="../src/components/Import.js"></script>
|
|
109
|
+
<script type="module" src="../src/components/FocusCapture.js"></script>
|
|
110
|
+
<script type="module" src="../src/components/Dialog.js"></script>
|
|
111
|
+
<script type="module" src="../src/components/Accordion.js"></script>
|
|
112
|
+
<script type="module" src="../src/components/Card.js"></script>
|
|
113
113
|
|
|
114
114
|
</body>
|
|
115
115
|
</html>
|