@internetarchive/modal-manager 2.0.2 → 2.0.4-alpha-webdev7960.0

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.
Files changed (103) hide show
  1. package/.editorconfig +29 -29
  2. package/.eslintrc.js +14 -14
  3. package/.github/workflows/ci.yml +30 -30
  4. package/.github/workflows/gh-pages-main.yml +42 -42
  5. package/.github/workflows/pr-preview.yml +40 -40
  6. package/LICENSE +661 -661
  7. package/README.md +139 -139
  8. package/custom-elements.json +170 -170
  9. package/dist/index.d.ts +7 -7
  10. package/dist/index.js +5 -5
  11. package/dist/index.js.map +1 -1
  12. package/dist/src/assets/arrow-left-icon.d.ts +2 -0
  13. package/dist/src/assets/arrow-left-icon.js +15 -0
  14. package/dist/src/assets/arrow-left-icon.js.map +1 -0
  15. package/dist/src/assets/ia-logo-icon.d.ts +2 -2
  16. package/dist/src/assets/ia-logo-icon.js +29 -29
  17. package/dist/src/assets/ia-logo-icon.js.map +1 -1
  18. package/dist/src/modal-config.d.ts +104 -92
  19. package/dist/src/modal-config.js +24 -22
  20. package/dist/src/modal-config.js.map +1 -1
  21. package/dist/src/modal-manager-host-bridge-interface.d.ts +12 -12
  22. package/dist/src/modal-manager-host-bridge-interface.js +1 -1
  23. package/dist/src/modal-manager-host-bridge-interface.js.map +1 -1
  24. package/dist/src/modal-manager-host-bridge.d.ts +34 -34
  25. package/dist/src/modal-manager-host-bridge.js +62 -62
  26. package/dist/src/modal-manager-host-bridge.js.map +1 -1
  27. package/dist/src/modal-manager-interface.d.ts +27 -25
  28. package/dist/src/modal-manager-interface.js +1 -1
  29. package/dist/src/modal-manager-interface.js.map +1 -1
  30. package/dist/src/modal-manager-mode.d.ts +10 -10
  31. package/dist/src/modal-manager-mode.js +11 -11
  32. package/dist/src/modal-manager-mode.js.map +1 -1
  33. package/dist/src/modal-manager.d.ts +137 -112
  34. package/dist/src/modal-manager.js +247 -218
  35. package/dist/src/modal-manager.js.map +1 -1
  36. package/dist/src/modal-template.d.ts +41 -33
  37. package/dist/src/modal-template.js +335 -282
  38. package/dist/src/modal-template.js.map +1 -1
  39. package/dist/src/shoelace/active-elements.d.ts +15 -15
  40. package/dist/src/shoelace/active-elements.js +27 -27
  41. package/dist/src/shoelace/active-elements.js.map +1 -1
  42. package/dist/src/shoelace/modal.d.ts +24 -24
  43. package/dist/src/shoelace/modal.js +131 -131
  44. package/dist/src/shoelace/modal.js.map +1 -1
  45. package/dist/src/shoelace/tabbable.d.ts +9 -9
  46. package/dist/src/shoelace/tabbable.js +169 -169
  47. package/dist/src/shoelace/tabbable.js.map +1 -1
  48. package/dist/test/modal-config.test.d.ts +1 -1
  49. package/dist/test/modal-config.test.js +69 -61
  50. package/dist/test/modal-config.test.js.map +1 -1
  51. package/dist/test/modal-manager.test.d.ts +1 -1
  52. package/dist/test/modal-manager.test.js +274 -252
  53. package/dist/test/modal-manager.test.js.map +1 -1
  54. package/dist/test/modal-template.test.d.ts +1 -1
  55. package/dist/test/modal-template.test.js +178 -106
  56. package/dist/test/modal-template.test.js.map +1 -1
  57. package/dist/vite.config.d.ts +2 -2
  58. package/dist/vite.config.js +22 -22
  59. package/dist/vite.config.js.map +1 -1
  60. package/docs/assets/css/main.css +2678 -2678
  61. package/docs/classes/_src_modal_config_.modalconfig.html +429 -429
  62. package/docs/classes/_src_modal_manager_.modalmanager.html +7702 -7702
  63. package/docs/classes/_src_modal_manager_host_bridge_.modalmanagerhostbridge.html +409 -409
  64. package/docs/classes/_src_modal_template_.modaltemplate.html +7096 -7096
  65. package/docs/enums/_src_modal_manager_mode_.modalmanagermode.html +196 -196
  66. package/docs/globals.html +150 -150
  67. package/docs/index.html +252 -252
  68. package/docs/interfaces/_src_modal_manager_host_bridge_interface_.modalmanagerhostbridgeinterface.html +210 -210
  69. package/docs/interfaces/_src_modal_manager_interface_.modalmanagerinterface.html +7095 -7095
  70. package/docs/modules/_index_.html +208 -208
  71. package/docs/modules/_src_modal_config_.html +146 -146
  72. package/docs/modules/_src_modal_manager_.html +146 -146
  73. package/docs/modules/_src_modal_manager_host_bridge_.html +146 -146
  74. package/docs/modules/_src_modal_manager_host_bridge_interface_.html +146 -146
  75. package/docs/modules/_src_modal_manager_interface_.html +146 -146
  76. package/docs/modules/_src_modal_manager_mode_.html +146 -146
  77. package/docs/modules/_src_modal_template_.html +146 -146
  78. package/docs/modules/_test_modal_config_test_.html +106 -106
  79. package/docs/modules/_test_modal_manager_test_.html +106 -106
  80. package/docs/modules/_test_modal_template_test_.html +106 -106
  81. package/index.html +300 -282
  82. package/index.ts +7 -7
  83. package/karma.conf.js +24 -24
  84. package/package.json +85 -85
  85. package/renovate.json +7 -7
  86. package/src/assets/arrow-left-icon.ts +15 -0
  87. package/src/assets/ia-logo-icon.ts +30 -30
  88. package/src/modal-config.ts +133 -117
  89. package/src/modal-manager-host-bridge-interface.ts +13 -13
  90. package/src/modal-manager-host-bridge.ts +82 -82
  91. package/src/modal-manager-interface.ts +30 -28
  92. package/src/modal-manager-mode.ts +10 -10
  93. package/src/modal-manager.ts +303 -258
  94. package/src/modal-template.ts +343 -287
  95. package/src/shoelace/LICENSE.md +6 -6
  96. package/src/shoelace/active-elements.ts +33 -33
  97. package/src/shoelace/modal.ts +166 -166
  98. package/src/shoelace/tabbable.ts +223 -223
  99. package/test/modal-config.test.ts +77 -69
  100. package/test/modal-manager.test.ts +347 -319
  101. package/test/modal-template.test.ts +206 -124
  102. package/tsconfig.json +21 -21
  103. package/vite.config.ts +23 -23
package/karma.conf.js CHANGED
@@ -1,24 +1,24 @@
1
- /* eslint-disable import/no-extraneous-dependencies */
2
- const { createDefaultConfig } = require('@open-wc/testing-karma');
3
- const merge = require('deepmerge');
4
-
5
- module.exports = config => {
6
- config.set(
7
- merge(createDefaultConfig(config), {
8
- files: [
9
- // runs all files ending with .test in the test folder,
10
- // can be overwritten by passing a --grep flag. examples:
11
- //
12
- // npm run test -- --grep test/foo/bar.test.js
13
- // npm run test -- --grep test/bar/*
14
- { pattern: config.grep ? config.grep : 'dist/**/test/**/*.test.js', type: 'module' },
15
- ],
16
-
17
- esm: {
18
- nodeResolve: true,
19
- },
20
- // you can overwrite/extend the config further
21
- }),
22
- );
23
- return config;
24
- };
1
+ /* eslint-disable import/no-extraneous-dependencies */
2
+ const { createDefaultConfig } = require('@open-wc/testing-karma');
3
+ const merge = require('deepmerge');
4
+
5
+ module.exports = config => {
6
+ config.set(
7
+ merge(createDefaultConfig(config), {
8
+ files: [
9
+ // runs all files ending with .test in the test folder,
10
+ // can be overwritten by passing a --grep flag. examples:
11
+ //
12
+ // npm run test -- --grep test/foo/bar.test.js
13
+ // npm run test -- --grep test/bar/*
14
+ { pattern: config.grep ? config.grep : 'dist/**/test/**/*.test.js', type: 'module' },
15
+ ],
16
+
17
+ esm: {
18
+ nodeResolve: true,
19
+ },
20
+ // you can overwrite/extend the config further
21
+ }),
22
+ );
23
+ return config;
24
+ };
package/package.json CHANGED
@@ -1,85 +1,85 @@
1
- {
2
- "name": "@internetarchive/modal-manager",
3
- "version": "2.0.2",
4
- "description": "A Modal Manager Web Component",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/internetarchive/iaux-modal-manager.git"
8
- },
9
- "license": "AGPL-3.0-only",
10
- "main": "dist/index.js",
11
- "module": "dist/index.js",
12
- "types": "dist/index.d.ts",
13
- "scripts": {
14
- "prepare": "npm run build && husky install",
15
- "prepare:ghpages": "rimraf ghpages && npm run prepare && vite build && cp -R assets/images ghpages/assets/images",
16
- "start": "concurrently --kill-others --names tsc,es-dev-server \"npm run tsc:watch\" \"es-dev-server --app-index index.html --node-resolve --open --watch --preserve-symlinks\"",
17
- "docs": "typedoc",
18
- "build": "tsc",
19
- "tsc:watch": "tsc --watch",
20
- "lint:eslint": "eslint --ext .ts . --ignore-path .gitignore",
21
- "format:eslint": "eslint --ext .ts . --fix --ignore-path .gitignore",
22
- "lint:prettier": "prettier \"**/*.ts\" --check --ignore-path .gitignore",
23
- "format:prettier": "prettier \"**/*.ts\" --write --ignore-path .gitignore",
24
- "lint": "npm run lint:eslint && npm run lint:prettier",
25
- "format": "npm run format:eslint && npm run format:prettier",
26
- "circular": "madge --circular .",
27
- "test": "tsc && npm run lint && npm run circular && karma start --coverage",
28
- "test:watch": "concurrently --kill-others --names tsc,karma \"npm run tsc:watch\" \"karma start --auto-watch=true --single-run=false\"",
29
- "publish:alpha": "npm run test && npm run prepare && npm version prerelease --preid alpha --no-git-tag-version && npm publish --tag alpha"
30
- },
31
- "dependencies": {
32
- "@internetarchive/ia-activity-indicator": "^0.0.6",
33
- "@internetarchive/icon-close": "^1.3.4",
34
- "@internetarchive/icon-ia-logo": "^1.3.4",
35
- "@internetarchive/icon-user": "^1.3.4",
36
- "lit": "^2.8.0",
37
- "throttle-debounce": "^5.0.0"
38
- },
39
- "devDependencies": {
40
- "@open-wc/eslint-config": "^9.2.2",
41
- "@open-wc/testing": "^4.0.0",
42
- "@open-wc/testing-karma": "^3.0.0",
43
- "@types/mocha": "^10.0.0",
44
- "@types/node": "^20.8.4",
45
- "@types/throttle-debounce": "^5.0.0",
46
- "@typescript-eslint/eslint-plugin": "^7.1.0",
47
- "@typescript-eslint/parser": "^7.1.0",
48
- "concurrently": "^8.0.0",
49
- "deepmerge": "^4.0.0",
50
- "es-dev-server": "^2.0.0",
51
- "eslint": "^8.57.0",
52
- "eslint-config-prettier": "^6.11.0",
53
- "husky": "^9.0.0",
54
- "lint-staged": "^14.0.1",
55
- "madge": "^6.0.0",
56
- "prettier": "^2.7.1",
57
- "rimraf": "^5.0.5",
58
- "tslib": "^2.4.0",
59
- "typedoc": "^0.25.0",
60
- "typescript": "^4.7.4",
61
- "vite": "^4.4.11"
62
- },
63
- "eslintConfig": {
64
- "extends": [
65
- "@open-wc/eslint-config",
66
- "eslint-config-prettier"
67
- ]
68
- },
69
- "prettier": {
70
- "singleQuote": true,
71
- "arrowParens": "avoid"
72
- },
73
- "husky": {
74
- "hooks": {
75
- "pre-commit": "lint-staged"
76
- }
77
- },
78
- "lint-staged": {
79
- "*.ts": [
80
- "eslint --fix",
81
- "prettier --write",
82
- "git add"
83
- ]
84
- }
85
- }
1
+ {
2
+ "name": "@internetarchive/modal-manager",
3
+ "version": "2.0.4-alpha-webdev7960.0",
4
+ "description": "A Modal Manager Web Component",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/internetarchive/iaux-modal-manager.git"
8
+ },
9
+ "license": "AGPL-3.0-only",
10
+ "main": "dist/index.js",
11
+ "module": "dist/index.js",
12
+ "types": "dist/index.d.ts",
13
+ "scripts": {
14
+ "prepare": "npm run build && husky install",
15
+ "prepare:ghpages": "rimraf ghpages && npm run prepare && vite build && cp -R assets/images ghpages/assets/images",
16
+ "start": "concurrently --kill-others --names tsc,es-dev-server \"npm run tsc:watch\" \"es-dev-server --app-index index.html --node-resolve --open --watch --preserve-symlinks\"",
17
+ "docs": "typedoc",
18
+ "build": "tsc",
19
+ "tsc:watch": "tsc --watch",
20
+ "lint:eslint": "eslint --ext .ts . --ignore-path .gitignore",
21
+ "format:eslint": "eslint --ext .ts . --fix --ignore-path .gitignore",
22
+ "lint:prettier": "prettier \"**/*.ts\" --check --ignore-path .gitignore",
23
+ "format:prettier": "prettier \"**/*.ts\" --write --ignore-path .gitignore",
24
+ "lint": "npm run lint:eslint && npm run lint:prettier",
25
+ "format": "npm run format:eslint && npm run format:prettier",
26
+ "circular": "madge --circular .",
27
+ "test": "tsc && npm run lint && npm run circular && karma start --coverage",
28
+ "test:watch": "concurrently --kill-others --names tsc,karma \"npm run tsc:watch\" \"karma start --auto-watch=true --single-run=false\"",
29
+ "publish:alpha": "npm run test && npm run prepare && npm version prerelease --preid alpha --no-git-tag-version && npm publish --tag alpha"
30
+ },
31
+ "dependencies": {
32
+ "@internetarchive/ia-activity-indicator": "^0.0.6",
33
+ "@internetarchive/icon-close": "^1.3.4",
34
+ "@internetarchive/icon-ia-logo": "^1.3.4",
35
+ "@internetarchive/icon-user": "^1.3.4",
36
+ "lit": "^2.8.0",
37
+ "throttle-debounce": "^5.0.0"
38
+ },
39
+ "devDependencies": {
40
+ "@open-wc/eslint-config": "^9.2.2",
41
+ "@open-wc/testing": "^4.0.0",
42
+ "@open-wc/testing-karma": "^3.0.0",
43
+ "@types/mocha": "^10.0.0",
44
+ "@types/node": "^20.8.4",
45
+ "@types/throttle-debounce": "^5.0.0",
46
+ "@typescript-eslint/eslint-plugin": "^7.1.0",
47
+ "@typescript-eslint/parser": "^7.1.0",
48
+ "concurrently": "^8.0.0",
49
+ "deepmerge": "^4.0.0",
50
+ "es-dev-server": "^2.0.0",
51
+ "eslint": "^8.57.0",
52
+ "eslint-config-prettier": "^6.11.0",
53
+ "husky": "^9.0.0",
54
+ "lint-staged": "^14.0.1",
55
+ "madge": "^6.0.0",
56
+ "prettier": "^2.7.1",
57
+ "rimraf": "^5.0.5",
58
+ "tslib": "^2.4.0",
59
+ "typedoc": "^0.25.0",
60
+ "typescript": "^4.7.4",
61
+ "vite": "^4.4.11"
62
+ },
63
+ "eslintConfig": {
64
+ "extends": [
65
+ "@open-wc/eslint-config",
66
+ "eslint-config-prettier"
67
+ ]
68
+ },
69
+ "prettier": {
70
+ "singleQuote": true,
71
+ "arrowParens": "avoid"
72
+ },
73
+ "husky": {
74
+ "hooks": {
75
+ "pre-commit": "lint-staged"
76
+ }
77
+ },
78
+ "lint-staged": {
79
+ "*.ts": [
80
+ "eslint --fix",
81
+ "prettier --write",
82
+ "git add"
83
+ ]
84
+ }
85
+ }
package/renovate.json CHANGED
@@ -1,7 +1,7 @@
1
- {
2
- "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
- "extends": [
4
- "config:base",
5
- ":preserveSemverRanges"
6
- ]
7
- }
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:base",
5
+ ":preserveSemverRanges"
6
+ ]
7
+ }
@@ -0,0 +1,15 @@
1
+ import { html } from 'lit';
2
+
3
+ export default html`
4
+ <svg
5
+ viewBox="0 0 100 100"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ fill="#fff"
8
+ title="Left arrow icon"
9
+ alt="Left arrow icon"
10
+ >
11
+ <path
12
+ d="m20.1116715 50.0035012-.1116715-.1085359 43.1159942-46.61088155c2.401537-2.18938917 4.6902018-3.28408375 6.8659943-3.28408375s4.1642651.63837733 5.9654178 1.91513199c1.8011528 1.27675467 3.1520173 2.97248092 4.0525937 5.08717877l-39.4020173 42.99768924 39.4020173 42.9976892c-.9005764 2.1146979-2.2514409 3.8104241-4.0525937 5.0871788-1.8011527 1.2767547-3.7896253 1.915132-5.9654178 1.915132-2.1013449 0-4.3900096-1.0573489-6.8659943-3.1720468l-43.1159942-46.7194174z"
13
+ />
14
+ </svg>
15
+ `;
@@ -1,30 +1,30 @@
1
- import { html } from 'lit';
2
-
3
- export default html`
4
- <svg
5
- class="ia-logo"
6
- viewBox="0 0 27 30"
7
- xmlns="http://www.w3.org/2000/svg"
8
- aria-labelledby="logoTitleID logoDescID"
9
- >
10
- <title id="logoTitleID">Internet Archive logo</title>
11
- <desc id="logoDescID">
12
- A line drawing of the Internet Archive headquarters building façade.
13
- </desc>
14
- <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15
- <mask id="mask-2" class="fill-color">
16
- <path
17
- d="M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z"
18
- id="path-1"
19
- ></path>
20
- </mask>
21
- <use class="fill-color" xlink:href="#path-1"></use>
22
- <g mask="url(#mask-2)" class="fill-color">
23
- <path
24
- d="M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z"
25
- id="swatch"
26
- ></path>
27
- </g>
28
- </g>
29
- </svg>
30
- `;
1
+ import { html } from 'lit';
2
+
3
+ export default html`
4
+ <svg
5
+ class="ia-logo"
6
+ viewBox="0 0 27 30"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ aria-labelledby="logoTitleID logoDescID"
9
+ >
10
+ <title id="logoTitleID">Internet Archive logo</title>
11
+ <desc id="logoDescID">
12
+ A line drawing of the Internet Archive headquarters building façade.
13
+ </desc>
14
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15
+ <mask id="mask-2" class="fill-color">
16
+ <path
17
+ d="M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z"
18
+ id="path-1"
19
+ ></path>
20
+ </mask>
21
+ <use class="fill-color" xlink:href="#path-1"></use>
22
+ <g mask="url(#mask-2)" class="fill-color">
23
+ <path
24
+ d="M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z"
25
+ id="swatch"
26
+ ></path>
27
+ </g>
28
+ </g>
29
+ </svg>
30
+ `;
@@ -1,117 +1,133 @@
1
- import { TemplateResult } from 'lit';
2
-
3
- /**
4
- * Configuration to show a modal
5
- *
6
- * @export
7
- * @class ModalConfig
8
- */
9
- export class ModalConfig {
10
- /**
11
- * The title that shows in the header
12
- *
13
- * @type {(TemplateResult | undefined)}
14
- * @memberof ModalConfig
15
- */
16
- title?: TemplateResult;
17
-
18
- /**
19
- * The subtitle shown in the header under the title
20
- *
21
- * @type {(TemplateResult | undefined)}
22
- * @memberof ModalConfig
23
- */
24
- subtitle?: TemplateResult;
25
-
26
- /**
27
- * The headline shown at the top of the content section
28
- *
29
- * @type {(TemplateResult | undefined)}
30
- * @memberof ModalConfig
31
- */
32
- headline?: TemplateResult;
33
-
34
- /**
35
- * The text shown below the headline in the content section
36
- *
37
- * @type {(TemplateResult | undefined)}
38
- * @memberof ModalConfig
39
- */
40
- message?: TemplateResult;
41
-
42
- /**
43
- * The background color of the header
44
- *
45
- * @memberof ModalConfig
46
- */
47
- headerColor: string;
48
-
49
- /**
50
- * The background color of the body
51
- *
52
- * @memberof ModalConfig
53
- */
54
- bodyColor: string;
55
-
56
- /**
57
- * Show or hide the processing indicator
58
- *
59
- * @memberof ModalConfig
60
- */
61
- showProcessingIndicator: boolean;
62
-
63
- /**
64
- * Set the processing image mode, currently `processing` or `complete`
65
- *
66
- * @memberof ModalConfig
67
- */
68
- processingImageMode: 'processing' | 'complete';
69
-
70
- /**
71
- * Show the close button
72
- *
73
- * @memberof ModalConfig
74
- */
75
- showCloseButton: boolean;
76
-
77
- /**
78
- * Show the close button
79
- *
80
- * @memberof ModalConfig
81
- */
82
- showHeaderLogo: boolean;
83
-
84
- /**
85
- * Close the modal if the user taps on the background
86
- *
87
- * @memberof ModalConfig
88
- */
89
- closeOnBackdropClick: boolean;
90
-
91
- constructor(options?: {
92
- title?: TemplateResult;
93
- subtitle?: TemplateResult;
94
- headline?: TemplateResult;
95
- message?: TemplateResult;
96
- headerColor?: string;
97
- bodyColor?: string;
98
- showProcessingIndicator?: boolean;
99
- processingImageMode?: 'processing' | 'complete';
100
- showCloseButton?: boolean;
101
- showHeaderLogo?: boolean;
102
- closeOnBackdropClick?: boolean;
103
- }) {
104
- this.title = options?.title;
105
- this.subtitle = options?.subtitle;
106
- this.headline = options?.headline;
107
- this.message = options?.message;
108
-
109
- this.headerColor = options?.headerColor ?? '#55A183';
110
- this.bodyColor = options?.bodyColor ?? '#fbfbfd';
111
- this.showProcessingIndicator = options?.showProcessingIndicator ?? false;
112
- this.processingImageMode = options?.processingImageMode ?? 'complete';
113
- this.showCloseButton = options?.showCloseButton ?? true;
114
- this.showHeaderLogo = options?.showHeaderLogo ?? true;
115
- this.closeOnBackdropClick = options?.closeOnBackdropClick ?? true;
116
- }
117
- }
1
+ import { TemplateResult } from 'lit';
2
+
3
+ /**
4
+ * Configuration to show a modal
5
+ *
6
+ * @export
7
+ * @class ModalConfig
8
+ */
9
+ export class ModalConfig {
10
+ /**
11
+ * The title that shows in the header
12
+ *
13
+ * @type {(TemplateResult | undefined)}
14
+ * @memberof ModalConfig
15
+ */
16
+ title?: TemplateResult;
17
+
18
+ /**
19
+ * The subtitle shown in the header under the title
20
+ *
21
+ * @type {(TemplateResult | undefined)}
22
+ * @memberof ModalConfig
23
+ */
24
+ subtitle?: TemplateResult;
25
+
26
+ /**
27
+ * The headline shown at the top of the content section
28
+ *
29
+ * @type {(TemplateResult | undefined)}
30
+ * @memberof ModalConfig
31
+ */
32
+ headline?: TemplateResult;
33
+
34
+ /**
35
+ * The text shown below the headline in the content section
36
+ *
37
+ * @type {(TemplateResult | undefined)}
38
+ * @memberof ModalConfig
39
+ */
40
+ message?: TemplateResult;
41
+
42
+ /**
43
+ * The background color of the header
44
+ *
45
+ * @memberof ModalConfig
46
+ */
47
+ headerColor: string;
48
+
49
+ /**
50
+ * The background color of the body
51
+ *
52
+ * @memberof ModalConfig
53
+ */
54
+ bodyColor: string;
55
+
56
+ /**
57
+ * Show or hide the processing indicator
58
+ *
59
+ * @memberof ModalConfig
60
+ */
61
+ showProcessingIndicator: boolean;
62
+
63
+ /**
64
+ * Set the processing image mode, currently `processing` or `complete`
65
+ *
66
+ * @memberof ModalConfig
67
+ */
68
+ processingImageMode: 'processing' | 'complete';
69
+
70
+ /**
71
+ * Show the close button
72
+ *
73
+ * @memberof ModalConfig
74
+ */
75
+ showCloseButton: boolean;
76
+
77
+ /**
78
+ * Show the left nav button
79
+ *
80
+ * @memberof ModalConfig
81
+ */
82
+ showLeftNavButton: boolean;
83
+
84
+ /**
85
+ * Left nav button text
86
+ */
87
+ leftNavButtonText: string;
88
+
89
+ /**
90
+ * Show the close button
91
+ *
92
+ * @memberof ModalConfig
93
+ */
94
+ showHeaderLogo: boolean;
95
+
96
+ /**
97
+ * Close the modal if the user taps on the background
98
+ *
99
+ * @memberof ModalConfig
100
+ */
101
+ closeOnBackdropClick: boolean;
102
+
103
+ constructor(options?: {
104
+ title?: TemplateResult;
105
+ subtitle?: TemplateResult;
106
+ headline?: TemplateResult;
107
+ message?: TemplateResult;
108
+ headerColor?: string;
109
+ bodyColor?: string;
110
+ showProcessingIndicator?: boolean;
111
+ processingImageMode?: 'processing' | 'complete';
112
+ showCloseButton?: boolean;
113
+ showLeftNavButton?: boolean;
114
+ leftNavButtonText?: string;
115
+ showHeaderLogo?: boolean;
116
+ closeOnBackdropClick?: boolean;
117
+ }) {
118
+ this.title = options?.title;
119
+ this.subtitle = options?.subtitle;
120
+ this.headline = options?.headline;
121
+ this.message = options?.message;
122
+
123
+ this.headerColor = options?.headerColor ?? '#55A183';
124
+ this.bodyColor = options?.bodyColor ?? '#fbfbfd';
125
+ this.showProcessingIndicator = options?.showProcessingIndicator ?? false;
126
+ this.processingImageMode = options?.processingImageMode ?? 'complete';
127
+ this.showCloseButton = options?.showCloseButton ?? true;
128
+ this.showLeftNavButton = options?.showLeftNavButton ?? false;
129
+ this.leftNavButtonText = options?.leftNavButtonText ?? '';
130
+ this.showHeaderLogo = options?.showHeaderLogo ?? true;
131
+ this.closeOnBackdropClick = options?.closeOnBackdropClick ?? true;
132
+ }
133
+ }
@@ -1,13 +1,13 @@
1
- import { ModalManagerMode } from './modal-manager-mode';
2
-
3
- /**
4
- * The ModalManagerHostBridgeInterface is a delegate interface for
5
- * the host to implement environment-specific changes when the modal
6
- * is open or closed.
7
- *
8
- * A default implementation is provided, but can be overridden if
9
- * it does not work for the environment.
10
- */
11
- export interface ModalManagerHostBridgeInterface {
12
- handleModeChange(mode: ModalManagerMode): void;
13
- }
1
+ import { ModalManagerMode } from './modal-manager-mode';
2
+
3
+ /**
4
+ * The ModalManagerHostBridgeInterface is a delegate interface for
5
+ * the host to implement environment-specific changes when the modal
6
+ * is open or closed.
7
+ *
8
+ * A default implementation is provided, but can be overridden if
9
+ * it does not work for the environment.
10
+ */
11
+ export interface ModalManagerHostBridgeInterface {
12
+ handleModeChange(mode: ModalManagerMode): void;
13
+ }