@internetarchive/ia-item-navigator 2.1.3 → 2.2.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 (32) hide show
  1. package/demo/app-root.ts +5 -4
  2. package/dist/demo/app-root.d.ts +2 -2
  3. package/dist/demo/app-root.js +1 -1
  4. package/dist/demo/app-root.js.map +1 -1
  5. package/dist/src/iaux-item-navigator.d.ts +3 -1
  6. package/dist/src/iaux-item-navigator.js +43 -13
  7. package/dist/src/iaux-item-navigator.js.map +1 -1
  8. package/dist/src/interfaces/menu-interfaces.d.ts +4 -5
  9. package/dist/src/interfaces/menu-interfaces.js.map +1 -1
  10. package/dist/src/menu-slider/ia-menu-slider.d.ts +13 -7
  11. package/dist/src/menu-slider/ia-menu-slider.js +65 -20
  12. package/dist/src/menu-slider/ia-menu-slider.js.map +1 -1
  13. package/dist/src/menu-slider/menu-button.d.ts +15 -7
  14. package/dist/src/menu-slider/menu-button.js +12 -3
  15. package/dist/src/menu-slider/menu-button.js.map +1 -1
  16. package/dist/src/menu-slider/styles/menu-button.js +14 -4
  17. package/dist/src/menu-slider/styles/menu-button.js.map +1 -1
  18. package/dist/src/menu-slider/styles/menu-slider.js +7 -9
  19. package/dist/src/menu-slider/styles/menu-slider.js.map +1 -1
  20. package/dist/src/menus/share-panel.js +15 -9
  21. package/dist/src/menus/share-panel.js.map +1 -1
  22. package/dist/test/iaux-item-navigator.test.js +1 -0
  23. package/dist/test/iaux-item-navigator.test.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/iaux-item-navigator.ts +41 -13
  26. package/src/interfaces/menu-interfaces.ts +4 -8
  27. package/src/menu-slider/ia-menu-slider.ts +67 -28
  28. package/src/menu-slider/menu-button.ts +14 -4
  29. package/src/menu-slider/styles/menu-button.ts +14 -4
  30. package/src/menu-slider/styles/menu-slider.ts +7 -9
  31. package/src/menus/share-panel.ts +15 -9
  32. package/test/iaux-item-navigator.test.ts +1 -0
@@ -81,7 +81,7 @@ export class IauxSharingOptions extends LitElement {
81
81
  this.sharingOptions = [
82
82
  {
83
83
  name: 'Twitter',
84
- icon: html`<ia-icon-twitter></ia-icon-twitter>`,
84
+ icon: html`<ia-icon-twitter aria-hidden="true"></ia-icon-twitter>`,
85
85
  url: `https://twitter.com/intent/tweet?${new URLSearchParams({
86
86
  url: shareUrl,
87
87
  text: shareBlurb,
@@ -90,14 +90,14 @@ export class IauxSharingOptions extends LitElement {
90
90
  },
91
91
  {
92
92
  name: 'Facebook',
93
- icon: html`<ia-icon-facebook></ia-icon-facebook>`,
93
+ icon: html`<ia-icon-facebook aria-hidden="true"></ia-icon-facebook>`,
94
94
  url: `https://www.facebook.com/sharer/sharer.php?${new URLSearchParams({
95
95
  u: shareUrl,
96
96
  })}`,
97
97
  },
98
98
  {
99
99
  name: 'Tumblr',
100
- icon: html`<ia-icon-tumblr></ia-icon-tumblr>`,
100
+ icon: html`<ia-icon-tumblr aria-hidden="true"></ia-icon-tumblr>`,
101
101
  url: `https://www.tumblr.com/widgets/share/tool/preview?${new URLSearchParams(
102
102
  {
103
103
  posttype: 'link',
@@ -108,7 +108,7 @@ export class IauxSharingOptions extends LitElement {
108
108
  },
109
109
  {
110
110
  name: 'Pinterest',
111
- icon: html`<ia-icon-pinterest></ia-icon-pinterest>`,
111
+ icon: html`<ia-icon-pinterest aria-hidden="true"></ia-icon-pinterest>`,
112
112
  url: `http://www.pinterest.com/pin/create/button/?${new URLSearchParams(
113
113
  {
114
114
  url: shareUrl,
@@ -118,7 +118,7 @@ export class IauxSharingOptions extends LitElement {
118
118
  },
119
119
  {
120
120
  name: 'Email',
121
- icon: html`<ia-icon-email></ia-icon-email>`,
121
+ icon: html`<ia-icon-email aria-hidden="true"></ia-icon-email>`,
122
122
  url: `mailto:?${new URLSearchParams({
123
123
  subject: shareBlurb,
124
124
  body: shareUrl,
@@ -151,7 +151,7 @@ export class IauxSharingOptions extends LitElement {
151
151
  render() {
152
152
  return html`
153
153
  ${this.header}
154
- <main>
154
+ <div>
155
155
  ${this.sharingOptions.map(
156
156
  option =>
157
157
  html` <a class="share-option" href="${option.url}" target="_blank">
@@ -160,7 +160,7 @@ export class IauxSharingOptions extends LitElement {
160
160
  )}
161
161
  <details>
162
162
  <summary class="share-option">
163
- <ia-icon-link></ia-icon-link>
163
+ <ia-icon-link aria-hidden="true"></ia-icon-link>
164
164
  Get an embeddable link
165
165
  </summary>
166
166
  <div class="embed">
@@ -185,7 +185,7 @@ export class IauxSharingOptions extends LitElement {
185
185
  </p>
186
186
  </div>
187
187
  </details>
188
- </main>
188
+ </div>
189
189
  `;
190
190
  }
191
191
 
@@ -220,7 +220,7 @@ export class IauxSharingOptions extends LitElement {
220
220
  font-size: 1.4rem;
221
221
  }
222
222
 
223
- main {
223
+ :host > div {
224
224
  padding: 1rem 0;
225
225
  }
226
226
 
@@ -231,6 +231,12 @@ export class IauxSharingOptions extends LitElement {
231
231
  text-decoration: none;
232
232
  color: var(--shareLinkColor);
233
233
  cursor: pointer;
234
+ transition: background-color 0.2s;
235
+ border-radius: 6px;
236
+ }
237
+
238
+ .share-option:hover {
239
+ background-color: rgba(255, 255, 255, 0.05);
234
240
  }
235
241
 
236
242
  .share-option > * {
@@ -343,6 +343,7 @@ describe('ItemNavigator', () => {
343
343
  const anotherShortcut = {
344
344
  id: 'foo',
345
345
  icon: html`<i class="foo-shortcut"></i>`,
346
+ label: 'Foo',
346
347
  };
347
348
  el.menuContents = [menuProvider];
348
349
  el.menuShortcuts = [shortcut, anotherShortcut];