@internetarchive/ia-icons 1.3.6 → 1.3.10

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 (101) hide show
  1. package/.eslintrc.cjs +24 -0
  2. package/.github/workflows/ci.yml +23 -0
  3. package/LICENSE +661 -661
  4. package/README.md +35 -45
  5. package/bin/build.sh +63 -0
  6. package/package.json +6 -103
  7. package/src/advance.js +36 -0
  8. package/src/applepay.js +36 -0
  9. package/src/audio.js +29 -0
  10. package/src/base.js +32 -0
  11. package/src/calendar-blank.js +21 -0
  12. package/src/calendar.js +29 -0
  13. package/src/close-circle.js +21 -0
  14. package/src/close.js +22 -0
  15. package/src/collapse-sidebar.js +21 -0
  16. package/src/credit-card.js +29 -0
  17. package/src/dl.js +24 -0
  18. package/src/donate.js +21 -0
  19. package/src/edit-pencil.js +13 -0
  20. package/src/ellipses.js +21 -0
  21. package/src/email.js +17 -0
  22. package/src/facebook.js +17 -0
  23. package/src/googlepay.js +52 -0
  24. package/src/ia-logo.js +30 -0
  25. package/src/images.js +21 -0
  26. package/src/info.js +18 -0
  27. package/src/link.js +17 -0
  28. package/src/locale-pin.js +21 -0
  29. package/src/lock.js +20 -0
  30. package/src/magnify-minus.js +27 -0
  31. package/src/magnify-plus.js +27 -0
  32. package/src/paypal.js +53 -0
  33. package/src/pinterest.js +17 -0
  34. package/src/search.js +24 -0
  35. package/src/share.js +23 -0
  36. package/src/software.js +21 -0
  37. package/src/sort-ascending.js +13 -0
  38. package/src/sort-descending.js +13 -0
  39. package/src/texts.js +21 -0
  40. package/src/toc.js +21 -0
  41. package/src/tumblr.js +17 -0
  42. package/src/twitter.js +17 -0
  43. package/src/upload.js +21 -0
  44. package/src/user.js +21 -0
  45. package/src/venmo.js +23 -0
  46. package/src/video.js +21 -0
  47. package/src/visual-adjustment.js +21 -0
  48. package/src/volumes.js +21 -0
  49. package/src/web.js +21 -0
  50. package/svg/advance.svg +24 -0
  51. package/svg/applepay.svg +24 -0
  52. package/svg/audio.svg +17 -0
  53. package/svg/calendar-blank.svg +9 -0
  54. package/svg/calendar.svg +17 -0
  55. package/svg/close-circle.svg +9 -0
  56. package/svg/close.svg +10 -0
  57. package/svg/collapse-sidebar.svg +9 -0
  58. package/svg/credit-card.svg +17 -0
  59. package/svg/dl.svg +12 -0
  60. package/svg/donate.svg +9 -0
  61. package/svg/edit-pencil.svg +1 -0
  62. package/svg/ellipses.svg +9 -0
  63. package/svg/email.svg +5 -0
  64. package/svg/facebook.svg +5 -0
  65. package/svg/googlepay.svg +40 -0
  66. package/svg/ia-logo.svg +18 -0
  67. package/svg/images.svg +9 -0
  68. package/svg/info.svg +6 -0
  69. package/svg/link.svg +5 -0
  70. package/svg/locale-pin.svg +9 -0
  71. package/svg/lock.svg +8 -0
  72. package/svg/magnify-minus.svg +15 -0
  73. package/svg/magnify-plus.svg +15 -0
  74. package/svg/paypal.svg +41 -0
  75. package/svg/pinterest.svg +5 -0
  76. package/svg/search.svg +12 -0
  77. package/svg/share.svg +11 -0
  78. package/svg/software.svg +9 -0
  79. package/svg/sort-ascending.svg +1 -0
  80. package/svg/sort-descending.svg +1 -0
  81. package/svg/texts.svg +9 -0
  82. package/svg/toc.svg +9 -0
  83. package/svg/tumblr.svg +5 -0
  84. package/svg/twitter.svg +5 -0
  85. package/svg/upload.svg +9 -0
  86. package/svg/user.svg +9 -0
  87. package/svg/venmo.svg +11 -0
  88. package/svg/video.svg +9 -0
  89. package/svg/visual-adjustment.svg +9 -0
  90. package/svg/volumes.svg +9 -0
  91. package/svg/web.svg +9 -0
  92. package/test/index.html +391 -0
  93. package/.eslintrc +0 -16
  94. package/ia-icon.js +0 -5
  95. package/index.html +0 -124
  96. package/index.js +0 -3
  97. package/karma.bs.config.js +0 -16
  98. package/karma.conf.js +0 -30
  99. package/src/ia-icon.js +0 -128
  100. package/src/icon-donate.js +0 -23
  101. package/test/ia-icons.test.js +0 -17
package/index.html DELETED
@@ -1,124 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <script type="module" src="ia-icon.js"></script>
7
- <script type="module" src="src/icon-donate.js"></script>
8
- <title>IA SVG Icons</title>
9
- <style>
10
- html {
11
- font: normal 10px 'Helvetica Neue', Helvetica, Arial, sans-serif;
12
- font-size: 10px;
13
- --iconWidth: 40px;
14
- --iconHeight: 40px;
15
- }
16
- body {
17
- margin: 0;
18
- padding: 0 2rem;
19
- }
20
-
21
- h3 {
22
- font-size: 2rem;
23
- }
24
-
25
- ul {
26
- display: grid;
27
- grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
28
- grid-gap: 1rem;
29
- padding: 0;
30
- list-style: none;
31
- }
32
-
33
- li {
34
- padding: 1.5rem 0;
35
- border: 2px solid #ccc;
36
- text-align: center;
37
- }
38
-
39
- li:hover {
40
- color: #f0f0f0;
41
- background: #222;
42
- }
43
-
44
- p {
45
- margin: 0;
46
- }
47
-
48
- icon-donate {
49
- width: 40px;
50
- display: block;
51
- }
52
- </style>
53
- </head>
54
-
55
- <body>
56
- <script type="module">
57
- import { render, html } from './node_modules/lit-html/lit-html.js';
58
-
59
- const listItems = () => {
60
- return [
61
- 'applePay',
62
- 'advance',
63
- 'audio',
64
- 'calendar',
65
- 'calendarBlank',
66
- 'close',
67
- 'closeCircle',
68
- 'collapseSidebar',
69
- 'creditCard',
70
- 'donate',
71
- 'download',
72
- 'editPencil',
73
- 'ellipses',
74
- 'email',
75
- 'facebook',
76
- 'googlePay',
77
- 'iaLogo',
78
- 'images',
79
- 'link',
80
- 'localePin',
81
- 'lock',
82
- 'magnifyMinus',
83
- 'magnifyPlus',
84
- 'paypal',
85
- 'pinterest',
86
- 'search',
87
- 'share',
88
- 'software',
89
- 'sortAscending',
90
- 'sortDescending',
91
- 'texts',
92
- 'toc',
93
- 'tumblr',
94
- 'twitter',
95
- 'upload',
96
- 'user',
97
- 'venmo',
98
- 'video',
99
- 'visualAdjustment',
100
- 'volumes',
101
- 'web',
102
- 'info',
103
- ].map((name) => {
104
- const color = `rgb(${~~(Math.random() * 256)}, ${~~(Math.random() * 256)}, ${~~(Math.random() * 256)})`;
105
- return html`
106
- <li>
107
- <ia-icon icon=${name} style="--iconFillColor: ${color}; --iconStrokeColor: ${color};"></ia-icon>
108
- <p>${name}</p>
109
- </li>
110
- `;
111
- });
112
- };
113
-
114
- render(html`
115
- <h3>Icons using ${"<ia-icon>"}</h3>
116
- <ul>
117
- ${listItems()}
118
- </ul>
119
- <h3>Icon created by extending IAIcon</h3>
120
- <icon-donate></icon-donate>
121
- `, document.body);
122
- </script>
123
- </body>
124
- </html>
package/index.js DELETED
@@ -1,3 +0,0 @@
1
- import IAIcon from './src/ia-icon';
2
-
3
- export default IAIcon;
@@ -1,16 +0,0 @@
1
- /* eslint-disable import/no-extraneous-dependencies */
2
- const merge = require('webpack-merge');
3
- const bsSettings = require('@open-wc/testing-karma-bs/bs-settings.js');
4
- const createBaseConfig = require('./karma.conf.js');
5
-
6
- module.exports = (config) => {
7
- config.set(
8
- merge(bsSettings(config), createBaseConfig(config), {
9
- browserStack: {
10
- project: 'ia-icons',
11
- },
12
- }),
13
- );
14
-
15
- return config;
16
- };
package/karma.conf.js DELETED
@@ -1,30 +0,0 @@
1
- /* eslint-disable import/no-extraneous-dependencies */
2
- const { createDefaultConfig } = require('@open-wc/testing-karma');
3
- const merge = require('webpack-merge');
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 : 'test/**/*.test.js', type: 'module' },
15
- ],
16
-
17
- esm: {
18
- nodeResolve: true,
19
- },
20
- // you can overwrite/extend the config further
21
- coverageIstanbulReporter: {
22
- thresholds: {
23
- emitWarning: true, // set to `true` to not fail the test command when thresholds are not met
24
- // thresholds for all files
25
- }
26
- }
27
- }),
28
- );
29
- return config;
30
- };
package/src/ia-icon.js DELETED
@@ -1,128 +0,0 @@
1
- import {
2
- LitElement, html, css, nothing
3
- } from 'lit';
4
- import advance from '@internetarchive/icon-advance/index';
5
- import applePay from '@internetarchive/icon-applepay/index';
6
- import audio from '@internetarchive/icon-audio/index';
7
- import calendar from '@internetarchive/icon-calendar/index';
8
- import calendarBlank from '@internetarchive/icon-calendar-blank/index';
9
- import close from '@internetarchive/icon-close/index';
10
- import closeCircle from '@internetarchive/icon-close-circle/index';
11
- import collapseSidebar from '@internetarchive/icon-collapse-sidebar/index';
12
- import creditCard from '@internetarchive/icon-credit-card/index';
13
- import donate from '@internetarchive/icon-donate/index';
14
- import download from '@internetarchive/icon-dl/index';
15
- import editPencil from '@internetarchive/icon-edit-pencil/index';
16
- import ellipses from '@internetarchive/icon-ellipses/index';
17
- import email from '@internetarchive/icon-email/index';
18
- import facebook from '@internetarchive/icon-facebook/index';
19
- import googlePay from '@internetarchive/icon-googlepay/index';
20
- import iaLogo from '@internetarchive/icon-ia-logo/index';
21
- import images from '@internetarchive/icon-images/index';
22
- import link from '@internetarchive/icon-link/index';
23
- import localePin from '@internetarchive/icon-locale-pin/index';
24
- import lock from '@internetarchive/icon-lock/index';
25
- import magnifyMinus from '@internetarchive/icon-magnify-minus/index';
26
- import magnifyPlus from '@internetarchive/icon-magnify-plus/index';
27
- import paypal from '@internetarchive/icon-paypal/index';
28
- import pinterest from '@internetarchive/icon-pinterest/index';
29
- import search from '@internetarchive/icon-search/index';
30
- import share from '@internetarchive/icon-share/index';
31
- import software from '@internetarchive/icon-software/index';
32
- import sortAscending from '@internetarchive/icon-sort-ascending/index';
33
- import sortDescending from '@internetarchive/icon-sort-descending/index';
34
- import texts from '@internetarchive/icon-texts/index';
35
- import toc from '@internetarchive/icon-toc/index';
36
- import tumblr from '@internetarchive/icon-tumblr/index';
37
- import twitter from '@internetarchive/icon-twitter/index';
38
- import upload from '@internetarchive/icon-upload/index';
39
- import user from '@internetarchive/icon-user/index';
40
- import venmo from '@internetarchive/icon-venmo/index';
41
- import video from '@internetarchive/icon-video/index';
42
- import visualAdjustment from '@internetarchive/icon-visual-adjustment/index';
43
- import volumes from '@internetarchive/icon-volumes/index';
44
- import web from '@internetarchive/icon-web/index';
45
- import info from '@internetarchive/icon-info/index';
46
-
47
- const iconTemplates = {
48
- applePay,
49
- advance,
50
- audio,
51
- calendar,
52
- calendarBlank,
53
- close,
54
- closeCircle,
55
- collapseSidebar,
56
- creditCard,
57
- donate,
58
- download,
59
- editPencil,
60
- ellipses,
61
- email,
62
- facebook,
63
- googlePay,
64
- iaLogo,
65
- images,
66
- link,
67
- localePin,
68
- lock,
69
- magnifyMinus,
70
- magnifyPlus,
71
- paypal,
72
- pinterest,
73
- search,
74
- share,
75
- software,
76
- sortAscending,
77
- sortDescending,
78
- texts,
79
- toc,
80
- tumblr,
81
- twitter,
82
- upload,
83
- user,
84
- venmo,
85
- video,
86
- visualAdjustment,
87
- volumes,
88
- web,
89
- info,
90
- };
91
-
92
- class IAIcon extends LitElement {
93
- static get properties() {
94
- return {
95
- icon: { type: String },
96
- };
97
- }
98
-
99
- static get styles() {
100
- return css`
101
- svg {
102
- width: var(--iconWidth, 'auto');
103
- height: var(--iconHeight, 'auto');
104
- }
105
-
106
- .fill-color {
107
- fill: var(--iconFillColor);
108
- }
109
-
110
- .stroke-color {
111
- stroke: var(--iconStrokeColor);
112
- }
113
- `;
114
- }
115
-
116
- constructor() {
117
- super();
118
- this.icon = '';
119
- }
120
-
121
- render() {
122
- return html`${iconTemplates[this.icon]}` || nothing;
123
- }
124
- }
125
-
126
- customElements.define('ia-icon', IAIcon);
127
-
128
- export default IAIcon;
@@ -1,23 +0,0 @@
1
- import { css } from 'lit';
2
- import IAIcon from './ia-icon';
3
-
4
- class IconDonate extends IAIcon {
5
- static get styles() {
6
- return css`
7
- .fill-color {
8
- fill: #ff0000;
9
- }
10
-
11
- .stroke-color {
12
- stroke: #ff0000;
13
- }
14
- `;
15
- }
16
-
17
- constructor() {
18
- super();
19
- this.icon = 'donate';
20
- }
21
- }
22
-
23
- customElements.define('icon-donate', IconDonate);
@@ -1,17 +0,0 @@
1
- import { fixture, expect, html } from '@open-wc/testing';
2
-
3
- import '../ia-icon';
4
-
5
- describe('<ia-icon>', () => {
6
- it('renders an empty element when icon type is unrecognized', async () => {
7
- const el = await fixture(html`<ia-icon icon="foo"></ia-icon>`);
8
-
9
- expect(el.shadowRoot.querySelector('svg')).to.equal(null);
10
- });
11
-
12
- it('renders an icon', async () => {
13
- const el = await fixture(html`<ia-icon icon="web"></ia-icon>`);
14
-
15
- expect(el.shadowRoot.querySelector('svg')).to.exist;
16
- });
17
- });