@internetarchive/ia-book-actions 1.1.0-alpha2 → 1.1.0-alpha4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/ia-book-actions",
3
- "version": "1.1.0-alpha2",
3
+ "version": "1.1.0-alpha4",
4
4
  "description": "Bookreader actions for borrowable book",
5
5
  "author": "Internet Archive",
6
6
  "license": "AGPL-3.0-only",
@@ -14,17 +14,16 @@
14
14
  "lint": "eslint --ext .js,.html . --ignore-path .gitignore && prettier \"**/*.js\" --check --ignore-path .gitignore",
15
15
  "format": "eslint --ext .js,.html . --fix --ignore-path .gitignore && prettier \"**/*.js\" --write --ignore-path .gitignore",
16
16
  "test": "yarn run lint && yarn test:fast",
17
- "test:fast": "web-test-runner --coverage --playwright --browsers chromium firefox webkit",
18
- "test:watch": "web-test-runner --watch --playwright --browsers chromium firefox webkit"
17
+ "test:fast": "web-test-runner --coverage",
18
+ "test:watch": "web-test-runner --watch"
19
19
  },
20
20
  "dependencies": {
21
21
  "@internetarchive/icon-info": "^1.2.6",
22
22
  "@internetarchive/local-cache": "^0.2.1",
23
- "@internetarchive/modal-manager": "^1.0.3-alpha.0",
23
+ "@internetarchive/modal-manager": "2.0.0",
24
24
  "@internetarchive/shared-resize-observer": "^0.2.0",
25
25
  "install-deps": "^1.1.0",
26
- "lit": "^2.5.0",
27
- "playwright": "^1.43.1"
26
+ "lit": "^2.8.0"
28
27
  },
29
28
  "devDependencies": {
30
29
  "@open-wc/eslint-config": "^4.2.0",
@@ -21,6 +21,7 @@ export default css`
21
21
  .action-buttons .ia-button {
22
22
  margin: 0;
23
23
  height: 3.5rem;
24
+ padding: 0 2rem;
24
25
  }
25
26
  .action-buttons .desktop {
26
27
  background-color: ${whiteColor};
@@ -36,7 +36,7 @@ export default css`
36
36
  align-items: center;
37
37
  transition: all 0.1s ease 0s;
38
38
  vertical-align: middle;
39
- padding: 0 3rem;
39
+ padding: 0 1rem;
40
40
  outline-color: ${whiteColor};
41
41
  outline-offset: -4px;
42
42
  user-select: none;
@@ -4,7 +4,7 @@ import { html, css, LitElement, nothing } from 'lit';
4
4
 
5
5
  import { SharedResizeObserver } from '@internetarchive/shared-resize-observer';
6
6
  import { ModalConfig } from '@internetarchive/modal-manager';
7
- import { ToastConfig } from '@internetarchive/toast-manager';
7
+ // import { ToastConfig } from '@internetarchive/toast-manager';
8
8
  import { LocalCache } from '@internetarchive/local-cache';
9
9
 
10
10
  import './components/collapsible-action-group.js';
@@ -90,7 +90,7 @@ export default class IABookActions extends LitElement {
90
90
  this.lendingOptions = {};
91
91
  this.borrowType = null; // 'browsed'|'borrowed'
92
92
  this.browseTimer = undefined; // timeout
93
- this.timerExecutionSeconds = 30;
93
+ this.timerExecutionSeconds = 10;
94
94
 
95
95
  /** @deprecated */
96
96
  this.toast = undefined;
@@ -403,7 +403,10 @@ export default class IABookActions extends LitElement {
403
403
  ></ia-activity-indicator>`
404
404
  : 'Keep reading'}
405
405
  </button>
406
- <span class="sr-only">Renewing loan, one moment please.</span>
406
+ <span
407
+ style="position: absolute; visibility: none; height: 1px; width: 1px; overflow: hidden;"
408
+ >Renewing loan, one moment please.</span
409
+ >
407
410
  <button
408
411
  disabled
409
412
  style="${modalButtonStyle.iaButton} ${modalButtonStyle.return}"
@@ -502,6 +505,7 @@ export default class IABookActions extends LitElement {
502
505
  secondsLeft = secondsLeft > 60 ? secondsLeft : 60;
503
506
  }
504
507
 
508
+ // eslint-disable-next-line no-undef
505
509
  const config = new ToastConfig();
506
510
  config.dismissOnClick = true;
507
511
  config.texts = this.loanRenewHelper?.getMessageTexts(
@@ -985,17 +989,6 @@ export default class IABookActions extends LitElement {
985
989
  --toastBGColor: #333;
986
990
  --toastFontColor: #fff;
987
991
  }
988
-
989
- .sr-only {
990
- position: absolute;
991
- left: -9999px;
992
- width: 1px;
993
- height: 1px;
994
- margin: 0;
995
- padding: 0;
996
- border: none;
997
- overflow: hidden;
998
- }
999
992
  `;
1000
993
  }
1001
994
  }