@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
package/.editorconfig
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[*]
|
|
9
|
-
|
|
10
|
-
# Change these settings to your own preference
|
|
11
|
-
indent_style = space
|
|
12
|
-
indent_size = 2
|
|
13
|
-
|
|
14
|
-
# We recommend you to keep these unchanged
|
|
15
|
-
end_of_line = lf
|
|
16
|
-
charset = utf-8
|
|
17
|
-
trim_trailing_whitespace = true
|
|
18
|
-
insert_final_newline = true
|
|
19
|
-
|
|
20
|
-
[*.md]
|
|
21
|
-
trim_trailing_whitespace = false
|
|
22
|
-
|
|
23
|
-
[*.json]
|
|
24
|
-
indent_size = 2
|
|
25
|
-
|
|
26
|
-
[*.{html,js,md}]
|
|
27
|
-
block_comment_start = /**
|
|
28
|
-
block_comment = *
|
|
29
|
-
block_comment_end = */
|
|
1
|
+
# EditorConfig helps developers define and maintain consistent
|
|
2
|
+
# coding styles between different editors and IDEs
|
|
3
|
+
# editorconfig.org
|
|
4
|
+
|
|
5
|
+
root = true
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
[*]
|
|
9
|
+
|
|
10
|
+
# Change these settings to your own preference
|
|
11
|
+
indent_style = space
|
|
12
|
+
indent_size = 2
|
|
13
|
+
|
|
14
|
+
# We recommend you to keep these unchanged
|
|
15
|
+
end_of_line = lf
|
|
16
|
+
charset = utf-8
|
|
17
|
+
trim_trailing_whitespace = true
|
|
18
|
+
insert_final_newline = true
|
|
19
|
+
|
|
20
|
+
[*.md]
|
|
21
|
+
trim_trailing_whitespace = false
|
|
22
|
+
|
|
23
|
+
[*.json]
|
|
24
|
+
indent_size = 2
|
|
25
|
+
|
|
26
|
+
[*.{html,js,md}]
|
|
27
|
+
block_comment_start = /**
|
|
28
|
+
block_comment = *
|
|
29
|
+
block_comment_end = */
|
package/.eslintrc.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
parser: '@typescript-eslint/parser',
|
|
4
|
-
plugins: ['@typescript-eslint', 'html'],
|
|
5
|
-
extends: ['plugin:@typescript-eslint/recommended'],
|
|
6
|
-
settings: {
|
|
7
|
-
'import/resolver': {
|
|
8
|
-
node: {
|
|
9
|
-
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
10
|
-
moduleDirectory: ['node_modules', 'src', 'demo'],
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
parser: '@typescript-eslint/parser',
|
|
4
|
+
plugins: ['@typescript-eslint', 'html'],
|
|
5
|
+
extends: ['plugin:@typescript-eslint/recommended'],
|
|
6
|
+
settings: {
|
|
7
|
+
'import/resolver': {
|
|
8
|
+
node: {
|
|
9
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
10
|
+
moduleDirectory: ['node_modules', 'src', 'demo'],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
name: App CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [ main ]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [ main ]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: latest
|
|
18
|
-
|
|
19
|
-
- name: Install dependencies
|
|
20
|
-
run: npm install
|
|
21
|
-
|
|
22
|
-
- name: Run tests
|
|
23
|
-
run: npm run test
|
|
24
|
-
|
|
25
|
-
- name: Upload Codecov reports
|
|
26
|
-
uses: codecov/codecov-action@main
|
|
27
|
-
with:
|
|
28
|
-
fail_ci_if_error: true
|
|
29
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
30
|
-
verbose: true
|
|
1
|
+
name: App CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: latest
|
|
18
|
+
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: npm install
|
|
21
|
+
|
|
22
|
+
- name: Run tests
|
|
23
|
+
run: npm run test
|
|
24
|
+
|
|
25
|
+
- name: Upload Codecov reports
|
|
26
|
+
uses: codecov/codecov-action@main
|
|
27
|
+
with:
|
|
28
|
+
fail_ci_if_error: true
|
|
29
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
30
|
+
verbose: true
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
# This workflow will generate the static page under `main` subdirectory inside the `gh-pages` branch
|
|
2
|
-
|
|
3
|
-
# This workflow will run every time new changes were pushed to the `main` branch
|
|
4
|
-
|
|
5
|
-
name: App build CI/CD to main branch
|
|
6
|
-
|
|
7
|
-
on:
|
|
8
|
-
push:
|
|
9
|
-
branches: [ main ]
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
build:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v4
|
|
17
|
-
with:
|
|
18
|
-
persist-credentials: false
|
|
19
|
-
|
|
20
|
-
- uses: actions/setup-node@v4
|
|
21
|
-
with:
|
|
22
|
-
node-version: 20.x
|
|
23
|
-
|
|
24
|
-
- name: Install dependencies
|
|
25
|
-
run: npm install
|
|
26
|
-
|
|
27
|
-
- name: Create build files for gh-pages deploy
|
|
28
|
-
run: |
|
|
29
|
-
npm run prepare:ghpages
|
|
30
|
-
pwd
|
|
31
|
-
cp -R assets/images ghpages/images
|
|
32
|
-
|
|
33
|
-
# Reference: https://github.com/JamesIves/github-pages-deploy-action
|
|
34
|
-
- name: Deploy 🚀
|
|
35
|
-
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
|
36
|
-
with:
|
|
37
|
-
branch: gh-pages
|
|
38
|
-
folder: ghpages
|
|
39
|
-
clean-exclude: pr/
|
|
40
|
-
force: false
|
|
41
|
-
target-folder: main
|
|
42
|
-
token: ${{ secrets.GH_TOKEN }}
|
|
1
|
+
# This workflow will generate the static page under `main` subdirectory inside the `gh-pages` branch
|
|
2
|
+
|
|
3
|
+
# This workflow will run every time new changes were pushed to the `main` branch
|
|
4
|
+
|
|
5
|
+
name: App build CI/CD to main branch
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [ main ]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
|
|
20
|
+
- uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version: 20.x
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: npm install
|
|
26
|
+
|
|
27
|
+
- name: Create build files for gh-pages deploy
|
|
28
|
+
run: |
|
|
29
|
+
npm run prepare:ghpages
|
|
30
|
+
pwd
|
|
31
|
+
cp -R assets/images ghpages/images
|
|
32
|
+
|
|
33
|
+
# Reference: https://github.com/JamesIves/github-pages-deploy-action
|
|
34
|
+
- name: Deploy 🚀
|
|
35
|
+
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
|
36
|
+
with:
|
|
37
|
+
branch: gh-pages
|
|
38
|
+
folder: ghpages
|
|
39
|
+
clean-exclude: pr/
|
|
40
|
+
force: false
|
|
41
|
+
target-folder: main
|
|
42
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
# This workflow will generate the static page under `pr` subdirectory inside the `gh-pages` branch
|
|
2
|
-
|
|
3
|
-
# This workflow will run every time there's a PR opened, reopened, synchronize, or closed
|
|
4
|
-
|
|
5
|
-
name: Deploy PR previews
|
|
6
|
-
|
|
7
|
-
on:
|
|
8
|
-
pull_request:
|
|
9
|
-
types:
|
|
10
|
-
- opened
|
|
11
|
-
- reopened
|
|
12
|
-
- synchronize
|
|
13
|
-
- closed
|
|
14
|
-
|
|
15
|
-
concurrency: preview-${{ github.ref }}
|
|
16
|
-
|
|
17
|
-
jobs:
|
|
18
|
-
deploy-preview:
|
|
19
|
-
runs-on: ubuntu-20.04
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout
|
|
22
|
-
uses: actions/checkout@v4
|
|
23
|
-
|
|
24
|
-
- uses: actions/setup-node@v4
|
|
25
|
-
with:
|
|
26
|
-
node-version: 20.x
|
|
27
|
-
|
|
28
|
-
- name: Install and Build
|
|
29
|
-
run: |
|
|
30
|
-
npm install
|
|
31
|
-
npm run prepare:ghpages
|
|
32
|
-
pwd
|
|
33
|
-
cp -R assets/images ghpages/images
|
|
34
|
-
|
|
35
|
-
# Reference: https://github.com/rossjrw/pr-preview-action
|
|
36
|
-
- name: Deploy preview
|
|
37
|
-
uses: rossjrw/pr-preview-action@v1
|
|
38
|
-
with:
|
|
39
|
-
source-dir: ./ghpages
|
|
40
|
-
umbrella-dir: pr
|
|
1
|
+
# This workflow will generate the static page under `pr` subdirectory inside the `gh-pages` branch
|
|
2
|
+
|
|
3
|
+
# This workflow will run every time there's a PR opened, reopened, synchronize, or closed
|
|
4
|
+
|
|
5
|
+
name: Deploy PR previews
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
pull_request:
|
|
9
|
+
types:
|
|
10
|
+
- opened
|
|
11
|
+
- reopened
|
|
12
|
+
- synchronize
|
|
13
|
+
- closed
|
|
14
|
+
|
|
15
|
+
concurrency: preview-${{ github.ref }}
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
deploy-preview:
|
|
19
|
+
runs-on: ubuntu-20.04
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- uses: actions/setup-node@v4
|
|
25
|
+
with:
|
|
26
|
+
node-version: 20.x
|
|
27
|
+
|
|
28
|
+
- name: Install and Build
|
|
29
|
+
run: |
|
|
30
|
+
npm install
|
|
31
|
+
npm run prepare:ghpages
|
|
32
|
+
pwd
|
|
33
|
+
cp -R assets/images ghpages/images
|
|
34
|
+
|
|
35
|
+
# Reference: https://github.com/rossjrw/pr-preview-action
|
|
36
|
+
- name: Deploy preview
|
|
37
|
+
uses: rossjrw/pr-preview-action@v1
|
|
38
|
+
with:
|
|
39
|
+
source-dir: ./ghpages
|
|
40
|
+
umbrella-dir: pr
|