kempo-ui 0.0.26 → 0.0.28
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/README.md +18 -1
- package/dist/components/Dialog.js +2 -2
- package/dist/components/Icon.js +1 -1
- package/dist/components/ShadowComponent.js +1 -1
- package/dist/components/SideMenu.js +1 -1
- package/docs/components/accordion.html +4 -0
- package/docs/components/card.html +2 -0
- package/docs/components/content-slider.html +2 -0
- package/docs/components/dialog.html +20 -1
- package/docs/components/focus-capture.html +2 -0
- package/docs/components/hybrid-component.html +2 -0
- package/docs/components/icon.html +2 -0
- package/docs/components/import.html +2 -0
- package/docs/components/light-component.html +2 -0
- package/docs/components/photo-viewer.html +2 -0
- package/docs/components/resize.html +2 -0
- package/docs/components/shadow-component.html +8 -6
- package/docs/components/show-more.html +2 -0
- package/docs/components/side-menu.html +3 -0
- package/docs/components/sortable.html +2 -0
- package/docs/components/split.html +2 -0
- package/docs/components/table.html +2 -0
- package/docs/components/tableControls.html +2 -0
- package/docs/components/tableCustomFields.html +2 -0
- package/docs/components/tableFetchRecords.html +2 -0
- package/docs/components/tableFieldSortHide.html +2 -0
- package/docs/components/tablePagination.html +2 -0
- package/docs/components/tableRecordEditing.html +2 -0
- package/docs/components/tableRecordFiltering.html +2 -0
- package/docs/components/tableRecordHiding.html +2 -0
- package/docs/components/tableRecordSearching.html +2 -0
- package/docs/components/tableRecordSelection.html +2 -0
- package/docs/components/tableRowControls.html +2 -0
- package/docs/components/tableSorting.html +2 -0
- package/docs/components/tabs.html +2 -0
- package/docs/components/tags.html +2 -0
- package/docs/components/theme-switcher.html +2 -0
- package/docs/components/timestamp.html +2 -0
- package/docs/components/toast.html +3 -1
- package/docs/components/toggle.html +2 -0
- package/docs/components/tree.html +2 -0
- package/docs/index.html +33 -2
- package/docs/init-1.js +1 -1
- package/docs/init.js +2 -2
- package/docs/manifest.json +87 -0
- package/docs/media/hexagon.svg +22 -0
- package/docs/media/icon-maskable.png +0 -0
- package/docs/media/icon.svg +1 -0
- package/docs/media/icon128.png +0 -0
- package/docs/media/icon144.png +0 -0
- package/docs/media/icon152.png +0 -0
- package/docs/media/icon16-48.svg +19 -0
- package/docs/media/icon16.png +0 -0
- package/docs/media/icon192.png +0 -0
- package/docs/media/icon256.png +0 -0
- package/docs/media/icon32.png +0 -0
- package/docs/media/icon384.png +0 -0
- package/docs/media/icon48.png +0 -0
- package/docs/media/icon512.png +0 -0
- package/docs/media/icon64.png +0 -0
- package/docs/media/icon72.png +0 -0
- package/docs/media/icon96.png +0 -0
- package/docs/media/kempo-fist.svg +21 -0
- package/docs/nav-1.inc.html +12 -3
- package/docs/nav.inc.html +15 -5
- package/docs/src/components/Dialog.js +2 -2
- package/docs/src/components/Icon.js +1 -1
- package/docs/src/components/ShadowComponent.js +1 -1
- package/docs/src/components/SideMenu.js +1 -1
- package/docs/styles.css +5 -0
- package/docs/utils/debounce.html +2 -0
- package/docs/utils/drag.html +2 -0
- package/docs/utils/formatTimestamp.html +2 -0
- package/docs/utils/propConverters.html +2 -0
- package/docs/utils/toTitleCase.html +2 -0
- package/package.json +1 -1
- package/scripts/docs.js +12 -5
- package/src/components/Dialog.js +4 -1
- package/src/components/Icon.js +1 -1
- package/src/components/ShadowComponent.js +1 -1
- package/src/components/SideMenu.js +2 -0
package/scripts/docs.js
CHANGED
|
@@ -6,26 +6,33 @@ import { getArgs, runChildNodeProcessScript } from 'kempo-server/utils/cli';
|
|
|
6
6
|
const __filename = fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = dirname(__filename);
|
|
8
8
|
|
|
9
|
+
/*
|
|
10
|
+
Configuration
|
|
11
|
+
*/
|
|
9
12
|
const options = getArgs({
|
|
10
13
|
p: 'port',
|
|
11
14
|
b: 'build',
|
|
12
|
-
s: 'src'
|
|
13
|
-
'no-build': 'noBuild'
|
|
15
|
+
s: 'src'
|
|
14
16
|
});
|
|
15
17
|
|
|
16
18
|
const {
|
|
17
19
|
port = 8083,
|
|
18
|
-
build =
|
|
19
|
-
noBuild = false,
|
|
20
|
+
build = null,
|
|
20
21
|
src = false
|
|
21
22
|
} = options;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
/*
|
|
25
|
+
Build Logic
|
|
26
|
+
*/
|
|
27
|
+
if(build === null ? !src : build === 'true' || build === true){
|
|
24
28
|
console.log('Building component files...');
|
|
25
29
|
await runChildNodeProcessScript(join(__dirname, 'build.js'));
|
|
26
30
|
console.log('Component files built!');
|
|
27
31
|
}
|
|
28
32
|
|
|
33
|
+
/*
|
|
34
|
+
Server Startup
|
|
35
|
+
*/
|
|
29
36
|
const rootDir = 'docs';
|
|
30
37
|
const configFile = src ?
|
|
31
38
|
join(__dirname, '../docs/dev.config.json') :
|
package/src/components/Dialog.js
CHANGED
|
@@ -19,6 +19,7 @@ export default class Dialog extends ShadowComponent {
|
|
|
19
19
|
opened: { type: Boolean, reflect: true, converter: boolExists },
|
|
20
20
|
closeBtn: { type: Boolean, reflect: true, attribute: 'close-btn', converter: boolExists },
|
|
21
21
|
overlayClose: { type: Boolean, reflect: true, attribute: 'overlay-close', converter: boolExists },
|
|
22
|
+
disableKeyboardClose: { type: Boolean, reflect: true, attribute: 'disable-keyboard-close', converter: boolExists },
|
|
22
23
|
confirmText: { type: String, reflect: true, attribute: 'confirm-text' },
|
|
23
24
|
confirmClasses: { type: String, reflect: true, attribute: 'confirm-classes' },
|
|
24
25
|
cancelText: { type: String, reflect: true, attribute: 'cancel-text' },
|
|
@@ -30,6 +31,7 @@ export default class Dialog extends ShadowComponent {
|
|
|
30
31
|
this.opened = false;
|
|
31
32
|
this.closeBtn = true;
|
|
32
33
|
this.overlayClose = true;
|
|
34
|
+
this.disableKeyboardClose = false;
|
|
33
35
|
this.confirmText = '';
|
|
34
36
|
this.confirmClasses = 'success ml';
|
|
35
37
|
this.cancelText = '';
|
|
@@ -59,7 +61,7 @@ export default class Dialog extends ShadowComponent {
|
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
handleKeydown = event => {
|
|
62
|
-
if(event.keyCode === 27) {
|
|
64
|
+
if(!this.disableKeyboardClose && event.keyCode === 27) {
|
|
63
65
|
this.close();
|
|
64
66
|
}
|
|
65
67
|
}
|
|
@@ -347,6 +349,7 @@ export default class Dialog extends ShadowComponent {
|
|
|
347
349
|
title: options.title || 'Confirm',
|
|
348
350
|
closeBtn: false,
|
|
349
351
|
overlayClose: false,
|
|
352
|
+
disableKeyboardClose: true,
|
|
350
353
|
confirmText: 'Yes',
|
|
351
354
|
confirmClasses: 'success ml',
|
|
352
355
|
confirmAction: () => responseCallback(true),
|
package/src/components/Icon.js
CHANGED
|
@@ -30,7 +30,7 @@ const getIconByName = (name) => {
|
|
|
30
30
|
|
|
31
31
|
return new Promise(async (resolve, reject) => {
|
|
32
32
|
let svg;
|
|
33
|
-
const pathsToCheck = window.kempo?.
|
|
33
|
+
const pathsToCheck = window.kempo?.pathsToIcons || ['/icons'];
|
|
34
34
|
for(let i = 0; i < pathsToCheck.length && !svg; i++){
|
|
35
35
|
try {
|
|
36
36
|
svg = await tryDir(pathsToCheck[i]);
|
|
@@ -30,7 +30,7 @@ export default class ShadowComponent extends LitElement {
|
|
|
30
30
|
|
|
31
31
|
const link = document.createElement('link');
|
|
32
32
|
link.rel = 'stylesheet';
|
|
33
|
-
link.href = window.kempo?.
|
|
33
|
+
link.href = window.kempo?.pathToStylesheet || '/kempo.min.css';
|
|
34
34
|
shadowRoot.appendChild(link);
|
|
35
35
|
|
|
36
36
|
// Inject component styles if they exist
|
|
@@ -36,9 +36,11 @@ export default class SideMenu extends ShadowComponent {
|
|
|
36
36
|
|
|
37
37
|
if(changedProperties.has('opened')) {
|
|
38
38
|
if(this.opened) {
|
|
39
|
+
document.body.style.overflow = 'hidden';
|
|
39
40
|
this.dispatchEvent(new CustomEvent('change', { detail: 'open' }));
|
|
40
41
|
this.dispatchEvent(new CustomEvent('open'));
|
|
41
42
|
} else {
|
|
43
|
+
document.body.style.overflow = '';
|
|
42
44
|
this.dispatchEvent(new CustomEvent('change', { detail: 'close' }));
|
|
43
45
|
this.dispatchEvent(new CustomEvent('close'));
|
|
44
46
|
}
|