@internetarchive/modal-manager 2.0.3 → 2.0.4-alpha-webdev7960.1
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/.editorconfig +29 -29
- package/.eslintrc.js +14 -14
- package/.github/workflows/ci.yml +30 -30
- package/.github/workflows/gh-pages-main.yml +42 -42
- package/.github/workflows/pr-preview.yml +40 -40
- package/LICENSE +661 -661
- package/README.md +139 -139
- package/custom-elements.json +170 -170
- package/dist/index.d.ts +7 -7
- package/dist/index.js +5 -5
- package/dist/src/assets/arrow-left-icon.d.ts +2 -2
- package/dist/src/assets/arrow-left-icon.js +2 -2
- package/dist/src/assets/ia-logo-icon.d.ts +2 -2
- package/dist/src/assets/ia-logo-icon.js +2 -2
- package/dist/src/modal-config.d.ts +104 -104
- package/dist/src/modal-config.js +24 -24
- package/dist/src/modal-manager-host-bridge-interface.d.ts +12 -12
- package/dist/src/modal-manager-host-bridge-interface.js +1 -1
- package/dist/src/modal-manager-host-bridge.d.ts +34 -34
- package/dist/src/modal-manager-host-bridge.js +62 -62
- package/dist/src/modal-manager-interface.d.ts +27 -27
- package/dist/src/modal-manager-interface.js +1 -1
- package/dist/src/modal-manager-mode.d.ts +10 -10
- package/dist/src/modal-manager-mode.js +11 -11
- package/dist/src/modal-manager.d.ts +137 -127
- package/dist/src/modal-manager.js +212 -197
- package/dist/src/modal-manager.js.map +1 -1
- package/dist/src/modal-template.d.ts +41 -41
- package/dist/src/modal-template.js +115 -115
- package/dist/src/shoelace/active-elements.d.ts +15 -15
- package/dist/src/shoelace/active-elements.js +27 -27
- package/dist/src/shoelace/modal.d.ts +24 -24
- package/dist/src/shoelace/modal.js +131 -131
- package/dist/src/shoelace/tabbable.d.ts +9 -9
- package/dist/src/shoelace/tabbable.js +169 -169
- package/dist/test/modal-config.test.d.ts +1 -1
- package/dist/test/modal-config.test.js +69 -69
- package/dist/test/modal-manager.test.d.ts +1 -1
- package/dist/test/modal-manager.test.js +275 -240
- package/dist/test/modal-manager.test.js.map +1 -1
- package/dist/test/modal-template.test.d.ts +1 -1
- package/dist/test/modal-template.test.js +156 -156
- package/dist/vite.config.d.ts +2 -2
- package/dist/vite.config.js +22 -22
- package/docs/assets/css/main.css +2678 -2678
- package/docs/classes/_src_modal_config_.modalconfig.html +429 -429
- package/docs/classes/_src_modal_manager_.modalmanager.html +7702 -7702
- package/docs/classes/_src_modal_manager_host_bridge_.modalmanagerhostbridge.html +409 -409
- package/docs/classes/_src_modal_template_.modaltemplate.html +7096 -7096
- package/docs/enums/_src_modal_manager_mode_.modalmanagermode.html +196 -196
- package/docs/globals.html +150 -150
- package/docs/index.html +252 -252
- package/docs/interfaces/_src_modal_manager_host_bridge_interface_.modalmanagerhostbridgeinterface.html +210 -210
- package/docs/interfaces/_src_modal_manager_interface_.modalmanagerinterface.html +7095 -7095
- package/docs/modules/_index_.html +208 -208
- package/docs/modules/_src_modal_config_.html +146 -146
- package/docs/modules/_src_modal_manager_.html +146 -146
- package/docs/modules/_src_modal_manager_host_bridge_.html +146 -146
- package/docs/modules/_src_modal_manager_host_bridge_interface_.html +146 -146
- package/docs/modules/_src_modal_manager_interface_.html +146 -146
- package/docs/modules/_src_modal_manager_mode_.html +146 -146
- package/docs/modules/_src_modal_template_.html +146 -146
- package/docs/modules/_test_modal_config_test_.html +106 -106
- package/docs/modules/_test_modal_manager_test_.html +106 -106
- package/docs/modules/_test_modal_template_test_.html +106 -106
- package/index.html +300 -300
- package/karma.conf.js +24 -24
- package/package.json +85 -85
- package/renovate.json +7 -7
- package/src/modal-manager.ts +22 -0
- package/src/shoelace/LICENSE.md +6 -6
- package/test/modal-manager.test.ts +52 -6
- package/tsconfig.json +21 -21
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { __awaiter } from "tslib";
|
|
2
|
-
import { expect } from '@open-wc/testing';
|
|
3
|
-
import { html } from 'lit';
|
|
4
|
-
import { ModalConfig } from '../src/modal-config';
|
|
5
|
-
describe('Modal Config', () => {
|
|
6
|
-
it('can be instantiated properly', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
-
const config = new ModalConfig();
|
|
8
|
-
const title = html `Foo`;
|
|
9
|
-
config.title = title;
|
|
10
|
-
config.headerColor = 'green';
|
|
11
|
-
expect(config.title).to.equal(title);
|
|
12
|
-
expect(config.headerColor).to.equal('green');
|
|
13
|
-
}));
|
|
14
|
-
it('can be instantiated properly with constructor', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
const title = html `Foo`;
|
|
16
|
-
const subtitle = html `Bar`;
|
|
17
|
-
const headline = html `Baz`;
|
|
18
|
-
const message = html `Boop`;
|
|
19
|
-
const headerColor = 'blue';
|
|
20
|
-
const showProcessingIndicator = true;
|
|
21
|
-
const processingImageMode = 'processing';
|
|
22
|
-
const showCloseButton = false;
|
|
23
|
-
const showLeftNavButton = false;
|
|
24
|
-
const leftNavButtonText = 'Previous';
|
|
25
|
-
const showHeaderLogo = false;
|
|
26
|
-
const closeOnBackdropClick = false;
|
|
27
|
-
const config = new ModalConfig({
|
|
28
|
-
title: title,
|
|
29
|
-
subtitle: subtitle,
|
|
30
|
-
headline: headline,
|
|
31
|
-
message: message,
|
|
32
|
-
headerColor: headerColor,
|
|
33
|
-
showProcessingIndicator: showProcessingIndicator,
|
|
34
|
-
processingImageMode: processingImageMode,
|
|
35
|
-
showCloseButton: showCloseButton,
|
|
36
|
-
showLeftNavButton: showLeftNavButton,
|
|
37
|
-
leftNavButtonText: leftNavButtonText,
|
|
38
|
-
showHeaderLogo: showHeaderLogo,
|
|
39
|
-
closeOnBackdropClick: closeOnBackdropClick,
|
|
40
|
-
});
|
|
41
|
-
expect(config.title).to.equal(title);
|
|
42
|
-
expect(config.subtitle).to.equal(subtitle);
|
|
43
|
-
expect(config.headline).to.equal(headline);
|
|
44
|
-
expect(config.message).to.equal(message);
|
|
45
|
-
expect(config.headerColor).to.equal(headerColor);
|
|
46
|
-
expect(config.showProcessingIndicator).to.equal(showProcessingIndicator);
|
|
47
|
-
expect(config.processingImageMode).to.equal(processingImageMode);
|
|
48
|
-
expect(config.showCloseButton).to.equal(showCloseButton);
|
|
49
|
-
expect(config.showLeftNavButton).to.equal(showLeftNavButton);
|
|
50
|
-
expect(config.leftNavButtonText).to.equal(leftNavButtonText);
|
|
51
|
-
expect(config.showHeaderLogo).to.equal(showHeaderLogo);
|
|
52
|
-
expect(config.closeOnBackdropClick).to.equal(closeOnBackdropClick);
|
|
53
|
-
}));
|
|
54
|
-
it('instantiates properly with defaults', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
55
|
-
const config = new ModalConfig();
|
|
56
|
-
expect(config.title).to.equal(undefined);
|
|
57
|
-
expect(config.subtitle).to.equal(undefined);
|
|
58
|
-
expect(config.headline).to.equal(undefined);
|
|
59
|
-
expect(config.message).to.equal(undefined);
|
|
60
|
-
expect(config.headerColor).to.equal('#55A183');
|
|
61
|
-
expect(config.showProcessingIndicator).to.equal(false);
|
|
62
|
-
expect(config.processingImageMode).to.equal('complete');
|
|
63
|
-
expect(config.showCloseButton).to.equal(true);
|
|
64
|
-
expect(config.showLeftNavButton).to.equal(false);
|
|
65
|
-
expect(config.leftNavButtonText).to.equal('');
|
|
66
|
-
expect(config.showHeaderLogo).to.equal(true);
|
|
67
|
-
expect(config.closeOnBackdropClick).to.equal(true);
|
|
68
|
-
}));
|
|
69
|
-
});
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { expect } from '@open-wc/testing';
|
|
3
|
+
import { html } from 'lit';
|
|
4
|
+
import { ModalConfig } from '../src/modal-config';
|
|
5
|
+
describe('Modal Config', () => {
|
|
6
|
+
it('can be instantiated properly', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
+
const config = new ModalConfig();
|
|
8
|
+
const title = html `Foo`;
|
|
9
|
+
config.title = title;
|
|
10
|
+
config.headerColor = 'green';
|
|
11
|
+
expect(config.title).to.equal(title);
|
|
12
|
+
expect(config.headerColor).to.equal('green');
|
|
13
|
+
}));
|
|
14
|
+
it('can be instantiated properly with constructor', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
const title = html `Foo`;
|
|
16
|
+
const subtitle = html `Bar`;
|
|
17
|
+
const headline = html `Baz`;
|
|
18
|
+
const message = html `Boop`;
|
|
19
|
+
const headerColor = 'blue';
|
|
20
|
+
const showProcessingIndicator = true;
|
|
21
|
+
const processingImageMode = 'processing';
|
|
22
|
+
const showCloseButton = false;
|
|
23
|
+
const showLeftNavButton = false;
|
|
24
|
+
const leftNavButtonText = 'Previous';
|
|
25
|
+
const showHeaderLogo = false;
|
|
26
|
+
const closeOnBackdropClick = false;
|
|
27
|
+
const config = new ModalConfig({
|
|
28
|
+
title: title,
|
|
29
|
+
subtitle: subtitle,
|
|
30
|
+
headline: headline,
|
|
31
|
+
message: message,
|
|
32
|
+
headerColor: headerColor,
|
|
33
|
+
showProcessingIndicator: showProcessingIndicator,
|
|
34
|
+
processingImageMode: processingImageMode,
|
|
35
|
+
showCloseButton: showCloseButton,
|
|
36
|
+
showLeftNavButton: showLeftNavButton,
|
|
37
|
+
leftNavButtonText: leftNavButtonText,
|
|
38
|
+
showHeaderLogo: showHeaderLogo,
|
|
39
|
+
closeOnBackdropClick: closeOnBackdropClick,
|
|
40
|
+
});
|
|
41
|
+
expect(config.title).to.equal(title);
|
|
42
|
+
expect(config.subtitle).to.equal(subtitle);
|
|
43
|
+
expect(config.headline).to.equal(headline);
|
|
44
|
+
expect(config.message).to.equal(message);
|
|
45
|
+
expect(config.headerColor).to.equal(headerColor);
|
|
46
|
+
expect(config.showProcessingIndicator).to.equal(showProcessingIndicator);
|
|
47
|
+
expect(config.processingImageMode).to.equal(processingImageMode);
|
|
48
|
+
expect(config.showCloseButton).to.equal(showCloseButton);
|
|
49
|
+
expect(config.showLeftNavButton).to.equal(showLeftNavButton);
|
|
50
|
+
expect(config.leftNavButtonText).to.equal(leftNavButtonText);
|
|
51
|
+
expect(config.showHeaderLogo).to.equal(showHeaderLogo);
|
|
52
|
+
expect(config.closeOnBackdropClick).to.equal(closeOnBackdropClick);
|
|
53
|
+
}));
|
|
54
|
+
it('instantiates properly with defaults', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
55
|
+
const config = new ModalConfig();
|
|
56
|
+
expect(config.title).to.equal(undefined);
|
|
57
|
+
expect(config.subtitle).to.equal(undefined);
|
|
58
|
+
expect(config.headline).to.equal(undefined);
|
|
59
|
+
expect(config.message).to.equal(undefined);
|
|
60
|
+
expect(config.headerColor).to.equal('#55A183');
|
|
61
|
+
expect(config.showProcessingIndicator).to.equal(false);
|
|
62
|
+
expect(config.processingImageMode).to.equal('complete');
|
|
63
|
+
expect(config.showCloseButton).to.equal(true);
|
|
64
|
+
expect(config.showLeftNavButton).to.equal(false);
|
|
65
|
+
expect(config.leftNavButtonText).to.equal('');
|
|
66
|
+
expect(config.showHeaderLogo).to.equal(true);
|
|
67
|
+
expect(config.closeOnBackdropClick).to.equal(true);
|
|
68
|
+
}));
|
|
69
|
+
});
|
|
70
70
|
//# sourceMappingURL=modal-config.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import '../src/modal-manager';
|
|
1
|
+
import '../src/modal-manager';
|