@internetarchive/elements 0.1.0 → 0.1.1-webdev-8119.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.
- package/LICENSE +661 -661
- package/README.md +213 -213
- package/dist/src/elements/ia-combo-box/caret-closed.svg +8 -0
- package/dist/src/elements/ia-combo-box/caret-open.svg +8 -0
- package/dist/src/elements/ia-combo-box/clear.svg +9 -0
- package/dist/src/elements/ia-combo-box/ia-combo-box.d.ts +427 -0
- package/dist/src/elements/ia-combo-box/ia-combo-box.d.ts.map +1 -0
- package/dist/src/elements/ia-combo-box/ia-combo-box.js +1280 -0
- package/dist/src/elements/ia-combo-box/ia-combo-box.js.map +1 -0
- package/dist/src/elements/ia-combo-box/models.d.ts +76 -0
- package/dist/src/elements/ia-combo-box/models.d.ts.map +1 -0
- package/dist/src/elements/ia-combo-box/models.js +40 -0
- package/dist/src/elements/ia-combo-box/models.js.map +1 -0
- package/dist/src/elements/ia-combo-box/story-support/200-countries.json +802 -0
- package/dist/src/elements/ia-status-indicator/ia-status-indicator.js +145 -145
- package/dist/src/elements/ia-status-indicator/ia-status-indicator.js.map +1 -1
- package/dist/src/elements/index.d.ts +1 -0
- package/dist/src/elements/index.d.ts.map +1 -1
- package/dist/src/elements/index.js +1 -0
- package/dist/src/elements/index.js.map +1 -1
- package/dist/src/labs/ia-snow/flake.svg +1 -1
- package/dist/src/themes/theme-styles.d.ts.map +1 -1
- package/dist/src/themes/theme-styles.js +67 -63
- package/dist/src/themes/theme-styles.js.map +1 -1
- package/package.json +118 -114
package/README.md
CHANGED
|
@@ -1,213 +1,213 @@
|
|
|
1
|
-
# 📚 _elements_ 🏛️
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
```zsh
|
|
6
|
-
npm i -S @internetarchive/elements
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import "@internetarchive/elements/ia-button/ia-button";
|
|
13
|
-
|
|
14
|
-
...
|
|
15
|
-
|
|
16
|
-
<ia-button @click=() => alert('Clicked!')>Click Me</ia-button>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Development
|
|
20
|
-
|
|
21
|
-
```zsh
|
|
22
|
-
npm i
|
|
23
|
-
npm run dev
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Adding a Component
|
|
27
|
-
|
|
28
|
-
### Structure
|
|
29
|
-
Each component has its own directory in `src/elements` (or `src/labs` if it's still in development). The basic structure looks like this, though components can have additional files and directories if neededd. Take a look at other elements to see what they each contain.
|
|
30
|
-
```
|
|
31
|
-
src
|
|
32
|
-
- elements
|
|
33
|
-
- ia-foobar // the name of the element
|
|
34
|
-
- ia-foobar.ts // the main element class
|
|
35
|
-
- ia-foobar.test.ts // the element's tests
|
|
36
|
-
- ia-foobar-story.ts // an element that demos your element
|
|
37
|
-
```
|
|
38
|
-
Export your component in `src/index.ts`
|
|
39
|
-
|
|
40
|
-
### Story
|
|
41
|
-
To demo your component, we have a component catalog that you can add your demo to. Create a component in your component directory. Name it `COMPONENT-NAME-story.ts`, ie `ia-button-story.ts`.
|
|
42
|
-
|
|
43
|
-
We have a story template you can use for consistency. [More info on `story-template`](#story-template). The easiest way to use this is to copy an existing story and modify it for your needs.
|
|
44
|
-
|
|
45
|
-
Import your story in `/demo/app-root.ts` and add it to the page.
|
|
46
|
-
|
|
47
|
-
#### Story Template<a id="story-template"></a>
|
|
48
|
-
|
|
49
|
-
The story template is a component you can use in your story to demo your component. This lets us present them in a consistent way.
|
|
50
|
-
|
|
51
|
-
It has 5 main configurations:
|
|
52
|
-
|
|
53
|
-
*Properties*
|
|
54
|
-
- `elementTag` (_string_) your component's name, ie `ia-button`
|
|
55
|
-
- `exampleUsage` (_string_) your element's example usage, displays it with syntax highlighting
|
|
56
|
-
- `labs` (_boolean_) if your component is in `labs` to update links
|
|
57
|
-
|
|
58
|
-
*Slots*
|
|
59
|
-
- `demo` put your component demo in here
|
|
60
|
-
- `settings` put your component settings in here
|
|
61
|
-
|
|
62
|
-
Here's an example:
|
|
63
|
-
```typescript
|
|
64
|
-
import '@demo/story-template';
|
|
65
|
-
...
|
|
66
|
-
render() {
|
|
67
|
-
return html`
|
|
68
|
-
<story-template elementTag="ia-button" .exampleUsage=${this.exampleUsage}>
|
|
69
|
-
<div slot="demo">
|
|
70
|
-
<ia-button @click=${() => alert('Button clicked!')}
|
|
71
|
-
>Click Me</ia-button
|
|
72
|
-
>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
<div slot="settings">
|
|
76
|
-
<table>
|
|
77
|
-
<tr>
|
|
78
|
-
<td>Color</td>
|
|
79
|
-
<td><input type="color" value="#007bff" id="color" /></td>
|
|
80
|
-
</tr>
|
|
81
|
-
</table>
|
|
82
|
-
<button @click=${this.apply}>Apply</button>
|
|
83
|
-
</div>
|
|
84
|
-
</story-template>
|
|
85
|
-
`;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// return a string of your element's usage and it will
|
|
89
|
-
// be displayed with syntax highlighting
|
|
90
|
-
// can be dynamic
|
|
91
|
-
private get exampleUsage(): string {
|
|
92
|
-
return `<ia-button @click=\${() => alert('Button clicked!')}>
|
|
93
|
-
Click Me
|
|
94
|
-
</ia-button>`;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
private apply(): void {
|
|
98
|
-
// update component settings based on settings change
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Component Inventory
|
|
103
|
-
|
|
104
|
-
To kickstart our library, we are going to take inventory of what already exists
|
|
105
|
-
and can be ported, repurposed, or deprecated in favor of the single, common solution
|
|
106
|
-
we are building here.
|
|
107
|
-
|
|
108
|
-
Below is a list of Lit web components that developers across the Internet Archive
|
|
109
|
-
have built thus far for their respective teams.
|
|
110
|
-
|
|
111
|
-
### Button
|
|
112
|
-
|
|
113
|
-
- __ads-button__ - 3 varieties, a few CSS params, and borderless styles. [@jeffwklein][jeffwklein]
|
|
114
|
-
[(link)](https://github.com/internetarchive/ads-common/blob/d1dbdd0b137b54b871f1ed41a54e4256af2abaee/packages/ads-button/src/ads-button.ts)
|
|
115
|
-
- __ia-button__ - Many CSS-based style variations, plus loading and disabled state support, including optional custom loading message. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/ia-button.ts)
|
|
116
|
-
|
|
117
|
-
### Table
|
|
118
|
-
|
|
119
|
-
- __ads-table__ - Sortable columns, arrow key navigation, and
|
|
120
|
-
multiselect support. [@jeffwklein][jeffwklein]
|
|
121
|
-
[(link)](https://github.com/internetarchive/ads-common/blob/d1dbdd0b137b54b871f1ed41a54e4256af2abaee/packages/ads-table/src/ads-table.ts)
|
|
122
|
-
|
|
123
|
-
### Modal
|
|
124
|
-
|
|
125
|
-
- __modal-element (vault)__ - Latest modal for ADS, globally in use on Vault site. (ignore ads-modal) [@jeffwklein][jeffwklein]
|
|
126
|
-
[(link)](https://git.archive.org/dps/vault-site/-/blob/fe99de1d53c62f426b1d6b70cc100321d651a9aa/frontend/src/modals/generic-modal.ts#L58)
|
|
127
|
-
- __iaux-modal-manager__ - Finicky but powerful modal manager with a number of config options. Point: likely [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-modal-manager)
|
|
128
|
-
|
|
129
|
-
### Tree
|
|
130
|
-
|
|
131
|
-
- __ads-tree (vault)__ - Basic tree component, CSS animation arrow rotation on folder expansion,
|
|
132
|
-
powers Vault file explorer, has material-UI icon dependency. [@jeffwklein][jeffwklein]
|
|
133
|
-
[(link)](https://git.archive.org/dps/vault-site/-/blob/fe99de1d53c62f426b1d6b70cc100321d651a9aa/frontend/src/web-components/ads-tree.ts)
|
|
134
|
-
|
|
135
|
-
### Card
|
|
136
|
-
|
|
137
|
-
- __ads-card (vault)__ - Very basic card component, in use in Vault a couple places. [@jeffwklein][jeffwklein]
|
|
138
|
-
[(link)](https://git.archive.org/dps/vault-site/-/blob/fe99de1d53c62f426b1d6b70cc100321d651a9aa/frontend/src/web-components/ads-card.ts)
|
|
139
|
-
- __ia-image-card__ - Simple component to display an image as a card, with an optional overlay color, hover-title, and on-click link. Used by various custom collections such as [Democracy's Library](https://archive.org/details/democracys-library). Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/ia-image-card.ts)
|
|
140
|
-
|
|
141
|
-
### Toggle Switch
|
|
142
|
-
|
|
143
|
-
- __ads-toggle-switch (vault)__ - Nice toggle switch with CSS animation moving toggle back and forth. [@jeffwklein][jeffwklein]
|
|
144
|
-
[(link)](https://git.archive.org/dps/vault-site/-/blob/fe99de1d53c62f426b1d6b70cc100321d651a9aa/frontend/src/web-components/ads-toggle-switch.ts)
|
|
145
|
-
- __toggle-switch (UX team)__ - Toggle switch with screen-reader support and a lot of CSS customization options. Point: [@latonv][latonv] & [@nsharma123][nsharma123]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/toggle-switch.ts)
|
|
146
|
-
- __ia-password-toggle__ - Intended for password inputs but definitely extensible, renders an eye open/closed icon that switches the type of any input passed in from `text` to `password` and back. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/ia-password-toggle.ts)
|
|
147
|
-
|
|
148
|
-
### Icons
|
|
149
|
-
|
|
150
|
-
- Vault ([@jeffwklein][jeffwklein]) uses [material-web](https://github.com/material-components/material-web)'s `md-icon` font-based icon system. This project is
|
|
151
|
-
unfor tunately in maintenance mode, but it nevertheless works well for Lit 3.
|
|
152
|
-
- __ia-icon__ - Icon designed to remove need for CSS-filtering, inherits current color by default and can inherit custom color via `color: ` or CSS variable. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/ia-icon.ts)
|
|
153
|
-
- __iaux-icons__ - Icon monorepo that also exports an `ia-icon`. Hopefully the `ia-icon` above can be folded into this one either by adding both to the library or using a library-hosted component within the icons repo. Point: [@iisa][iisa] & [@jbuckner][jbuckner]? [(link)](https://github.com/internetarchive/iaux-icons)
|
|
154
|
-
- __ia-icons__ - Another icon repo, this one with separate widgets for individual icons, i.e. `ia-icon-video`. Hopefully all three icon implementations here can be somehow standardized/combined in the new world. Point: [@traceypooh][traceypooh]. [(link)](https://github.com/internetarchive/ia-icons)
|
|
155
|
-
|
|
156
|
-
### Library (non-rendering)
|
|
157
|
-
|
|
158
|
-
- __ads-library__ - Includes: Helpful `fetch()` abstraction, data formatters, event abstractions,
|
|
159
|
-
a place for common code dependencies within the broader component library. [@jeffwklein][jeffwklein]
|
|
160
|
-
[(link)](https://github.com/internetarchive/ads-common/tree/d1dbdd0b137b54b871f1ed41a54e4256af2abaee/packages/ads-library/src)
|
|
161
|
-
|
|
162
|
-
### Carousel
|
|
163
|
-
|
|
164
|
-
- __basic-carousel (UX team)__ - Transforms any slotted content into a fully functioning carousel, including nav button showing/hiding, pagination-style-snapping, and custom arrow BG colors. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/basic-carousel.ts)
|
|
165
|
-
|
|
166
|
-
### Divider
|
|
167
|
-
|
|
168
|
-
- __ia-text-divider__ - Lightweight component to handle styling/rendering for the big ---OR--- divider used on i.e. the account settings page, can use custom text instead of `OR` if desired. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/ia-text-divider.ts?ref_type=heads)
|
|
169
|
-
|
|
170
|
-
### Banner
|
|
171
|
-
|
|
172
|
-
- __alert-banner (UX team)__ - Straightforward banner component with 3 urgency levels and an optional close button. Point: [@jbuckner][jbuckner]. [(link)](https://git.archive.org/www/offshoot/-/commits/main/src/widgets/alert-banner.ts)
|
|
173
|
-
|
|
174
|
-
### Input
|
|
175
|
-
|
|
176
|
-
- __ia-otp-input (UX team)__ - Complex little component to handle rendering a 6-box OTP input. Autofocuses first input, hops between inputs, supports pasting, autocomplete, a custom number of boxes and a custom allowed-characters regex (defaults to numeric-only). Used i.e. in the `Email me a code` modal on the [account settings](https://archive.org/account/settings) page. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/otp/ia-otp-input.ts)
|
|
177
|
-
- __ia-clearable-text-input__ - Text input with a clear button and substantial a11y support. Point: [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-clearable-text-input/blob/main/src/ia-clearable-text-input.ts)
|
|
178
|
-
|
|
179
|
-
### Menu
|
|
180
|
-
|
|
181
|
-
- __ia-dropdown__ - Supports various customized dropdown menu use cases. Point: [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-dropdown)
|
|
182
|
-
|
|
183
|
-
### Infinite Scroller
|
|
184
|
-
|
|
185
|
-
- __infinite-scroller (UX team)__ - Supports virtualized buffered scrolling of large lists. Point: [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-infinite-scroller)
|
|
186
|
-
|
|
187
|
-
### Histogram
|
|
188
|
-
|
|
189
|
-
- __collection-histogram (UX team)__ - Histogram component, only used on collection pages at the moment, but the component is fairly general already. Point: [@latonv][latonv]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/scenes/collection-page/components/histograms/collection-histogram.ts)
|
|
190
|
-
- __histogram-date-range (UX team)__ - Date range component for histogram, which we might explore consolidating with the above. Point: [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-histogram-date-range)
|
|
191
|
-
|
|
192
|
-
### Activity Indicator
|
|
193
|
-
|
|
194
|
-
- __ia-activity-indicator__ - SVG-based circular activity indicator with two mode options, used in `ia-button` and throughout site. Point: [@jbuckner][jbuckner]. [(link)](https://github.com/internetarchive/iaux/blob/master/packages/ia-activity-indicator/src/ia-activity-indicator.ts)
|
|
195
|
-
- __circular-activity-indicator (UX team)__ - Variation on the IA activity indicator with CSS variable customization. Point: [@jbuckner][jbuckner]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/activity-indicators/circular-activity-indicator.ts)
|
|
196
|
-
- __horizontal-activity-indicator (UX team)__ - Horizontal page-wide activity indicator, relies on the `sharedResizeObserver` which we'd need to convert and generalize as well. Point: [@jbuckner][jbuckner]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/activity-indicators/horizontal-activity-indicator.ts)
|
|
197
|
-
|
|
198
|
-
### Responsiveness Helpers
|
|
199
|
-
|
|
200
|
-
- __SharedResizeObserver__ - Could be made into a more declarative component similar to [what Shoelace has done](https://shoelace.style/components/resize-observer). I.e., the component itself manages attaching/detaching the shared observer instance from its slotted children as part of its lifecycle, so that we don't have to repeat that logic all over our other components. Used by horizontal activity indicator and carousel. Point: [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-shared-resize-observer)
|
|
201
|
-
|
|
202
|
-
### Accessibility Helpers
|
|
203
|
-
|
|
204
|
-
- __ia-sronly__ - Importable CSS class to quickly style screen-reader-only text. Point: [@nsharma123][nsharma123]. [(link)](https://github.com/internetarchive/iaux/blob/master/packages/ia-styles/src/ia-sronly.ts)
|
|
205
|
-
|
|
206
|
-
<!-- URLs for GitHub @s, in alphabetical order -->
|
|
207
|
-
[iisa]: https://github.com/iisa
|
|
208
|
-
[jbuckner]: https://github.com/jbuckner
|
|
209
|
-
[jeffwklein]: https://github.com/jeffwklein
|
|
210
|
-
[latonv]: https://github.com/latonv
|
|
211
|
-
[nsharma123]: https://github.com/nsharma123s
|
|
212
|
-
[rebecca-shoptaw]: https://github.com/rebecca-shoptaw
|
|
213
|
-
[traceypooh]: https://github.com/traceypooh
|
|
1
|
+
# 📚 _elements_ 🏛️
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```zsh
|
|
6
|
+
npm i -S @internetarchive/elements
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import "@internetarchive/elements/ia-button/ia-button";
|
|
13
|
+
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
<ia-button @click=() => alert('Clicked!')>Click Me</ia-button>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Development
|
|
20
|
+
|
|
21
|
+
```zsh
|
|
22
|
+
npm i
|
|
23
|
+
npm run dev
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Adding a Component
|
|
27
|
+
|
|
28
|
+
### Structure
|
|
29
|
+
Each component has its own directory in `src/elements` (or `src/labs` if it's still in development). The basic structure looks like this, though components can have additional files and directories if neededd. Take a look at other elements to see what they each contain.
|
|
30
|
+
```
|
|
31
|
+
src
|
|
32
|
+
- elements
|
|
33
|
+
- ia-foobar // the name of the element
|
|
34
|
+
- ia-foobar.ts // the main element class
|
|
35
|
+
- ia-foobar.test.ts // the element's tests
|
|
36
|
+
- ia-foobar-story.ts // an element that demos your element
|
|
37
|
+
```
|
|
38
|
+
Export your component in `src/index.ts`
|
|
39
|
+
|
|
40
|
+
### Story
|
|
41
|
+
To demo your component, we have a component catalog that you can add your demo to. Create a component in your component directory. Name it `COMPONENT-NAME-story.ts`, ie `ia-button-story.ts`.
|
|
42
|
+
|
|
43
|
+
We have a story template you can use for consistency. [More info on `story-template`](#story-template). The easiest way to use this is to copy an existing story and modify it for your needs.
|
|
44
|
+
|
|
45
|
+
Import your story in `/demo/app-root.ts` and add it to the page.
|
|
46
|
+
|
|
47
|
+
#### Story Template<a id="story-template"></a>
|
|
48
|
+
|
|
49
|
+
The story template is a component you can use in your story to demo your component. This lets us present them in a consistent way.
|
|
50
|
+
|
|
51
|
+
It has 5 main configurations:
|
|
52
|
+
|
|
53
|
+
*Properties*
|
|
54
|
+
- `elementTag` (_string_) your component's name, ie `ia-button`
|
|
55
|
+
- `exampleUsage` (_string_) your element's example usage, displays it with syntax highlighting
|
|
56
|
+
- `labs` (_boolean_) if your component is in `labs` to update links
|
|
57
|
+
|
|
58
|
+
*Slots*
|
|
59
|
+
- `demo` put your component demo in here
|
|
60
|
+
- `settings` put your component settings in here
|
|
61
|
+
|
|
62
|
+
Here's an example:
|
|
63
|
+
```typescript
|
|
64
|
+
import '@demo/story-template';
|
|
65
|
+
...
|
|
66
|
+
render() {
|
|
67
|
+
return html`
|
|
68
|
+
<story-template elementTag="ia-button" elementClassName="IAButton" .exampleUsage=${this.exampleUsage}>
|
|
69
|
+
<div slot="demo">
|
|
70
|
+
<ia-button @click=${() => alert('Button clicked!')}
|
|
71
|
+
>Click Me</ia-button
|
|
72
|
+
>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div slot="settings">
|
|
76
|
+
<table>
|
|
77
|
+
<tr>
|
|
78
|
+
<td>Color</td>
|
|
79
|
+
<td><input type="color" value="#007bff" id="color" /></td>
|
|
80
|
+
</tr>
|
|
81
|
+
</table>
|
|
82
|
+
<button @click=${this.apply}>Apply</button>
|
|
83
|
+
</div>
|
|
84
|
+
</story-template>
|
|
85
|
+
`;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// return a string of your element's usage and it will
|
|
89
|
+
// be displayed with syntax highlighting
|
|
90
|
+
// can be dynamic
|
|
91
|
+
private get exampleUsage(): string {
|
|
92
|
+
return `<ia-button @click=\${() => alert('Button clicked!')}>
|
|
93
|
+
Click Me
|
|
94
|
+
</ia-button>`;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
private apply(): void {
|
|
98
|
+
// update component settings based on settings change
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Component Inventory
|
|
103
|
+
|
|
104
|
+
To kickstart our library, we are going to take inventory of what already exists
|
|
105
|
+
and can be ported, repurposed, or deprecated in favor of the single, common solution
|
|
106
|
+
we are building here.
|
|
107
|
+
|
|
108
|
+
Below is a list of Lit web components that developers across the Internet Archive
|
|
109
|
+
have built thus far for their respective teams.
|
|
110
|
+
|
|
111
|
+
### Button
|
|
112
|
+
|
|
113
|
+
- __ads-button__ - 3 varieties, a few CSS params, and borderless styles. [@jeffwklein][jeffwklein]
|
|
114
|
+
[(link)](https://github.com/internetarchive/ads-common/blob/d1dbdd0b137b54b871f1ed41a54e4256af2abaee/packages/ads-button/src/ads-button.ts)
|
|
115
|
+
- __ia-button__ - Many CSS-based style variations, plus loading and disabled state support, including optional custom loading message. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/ia-button.ts)
|
|
116
|
+
|
|
117
|
+
### Table
|
|
118
|
+
|
|
119
|
+
- __ads-table__ - Sortable columns, arrow key navigation, and
|
|
120
|
+
multiselect support. [@jeffwklein][jeffwklein]
|
|
121
|
+
[(link)](https://github.com/internetarchive/ads-common/blob/d1dbdd0b137b54b871f1ed41a54e4256af2abaee/packages/ads-table/src/ads-table.ts)
|
|
122
|
+
|
|
123
|
+
### Modal
|
|
124
|
+
|
|
125
|
+
- __modal-element (vault)__ - Latest modal for ADS, globally in use on Vault site. (ignore ads-modal) [@jeffwklein][jeffwklein]
|
|
126
|
+
[(link)](https://git.archive.org/dps/vault-site/-/blob/fe99de1d53c62f426b1d6b70cc100321d651a9aa/frontend/src/modals/generic-modal.ts#L58)
|
|
127
|
+
- __iaux-modal-manager__ - Finicky but powerful modal manager with a number of config options. Point: likely [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-modal-manager)
|
|
128
|
+
|
|
129
|
+
### Tree
|
|
130
|
+
|
|
131
|
+
- __ads-tree (vault)__ - Basic tree component, CSS animation arrow rotation on folder expansion,
|
|
132
|
+
powers Vault file explorer, has material-UI icon dependency. [@jeffwklein][jeffwklein]
|
|
133
|
+
[(link)](https://git.archive.org/dps/vault-site/-/blob/fe99de1d53c62f426b1d6b70cc100321d651a9aa/frontend/src/web-components/ads-tree.ts)
|
|
134
|
+
|
|
135
|
+
### Card
|
|
136
|
+
|
|
137
|
+
- __ads-card (vault)__ - Very basic card component, in use in Vault a couple places. [@jeffwklein][jeffwklein]
|
|
138
|
+
[(link)](https://git.archive.org/dps/vault-site/-/blob/fe99de1d53c62f426b1d6b70cc100321d651a9aa/frontend/src/web-components/ads-card.ts)
|
|
139
|
+
- __ia-image-card__ - Simple component to display an image as a card, with an optional overlay color, hover-title, and on-click link. Used by various custom collections such as [Democracy's Library](https://archive.org/details/democracys-library). Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/ia-image-card.ts)
|
|
140
|
+
|
|
141
|
+
### Toggle Switch
|
|
142
|
+
|
|
143
|
+
- __ads-toggle-switch (vault)__ - Nice toggle switch with CSS animation moving toggle back and forth. [@jeffwklein][jeffwklein]
|
|
144
|
+
[(link)](https://git.archive.org/dps/vault-site/-/blob/fe99de1d53c62f426b1d6b70cc100321d651a9aa/frontend/src/web-components/ads-toggle-switch.ts)
|
|
145
|
+
- __toggle-switch (UX team)__ - Toggle switch with screen-reader support and a lot of CSS customization options. Point: [@latonv][latonv] & [@nsharma123][nsharma123]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/toggle-switch.ts)
|
|
146
|
+
- __ia-password-toggle__ - Intended for password inputs but definitely extensible, renders an eye open/closed icon that switches the type of any input passed in from `text` to `password` and back. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/ia-password-toggle.ts)
|
|
147
|
+
|
|
148
|
+
### Icons
|
|
149
|
+
|
|
150
|
+
- Vault ([@jeffwklein][jeffwklein]) uses [material-web](https://github.com/material-components/material-web)'s `md-icon` font-based icon system. This project is
|
|
151
|
+
unfor tunately in maintenance mode, but it nevertheless works well for Lit 3.
|
|
152
|
+
- __ia-icon__ - Icon designed to remove need for CSS-filtering, inherits current color by default and can inherit custom color via `color: ` or CSS variable. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/ia-icon.ts)
|
|
153
|
+
- __iaux-icons__ - Icon monorepo that also exports an `ia-icon`. Hopefully the `ia-icon` above can be folded into this one either by adding both to the library or using a library-hosted component within the icons repo. Point: [@iisa][iisa] & [@jbuckner][jbuckner]? [(link)](https://github.com/internetarchive/iaux-icons)
|
|
154
|
+
- __ia-icons__ - Another icon repo, this one with separate widgets for individual icons, i.e. `ia-icon-video`. Hopefully all three icon implementations here can be somehow standardized/combined in the new world. Point: [@traceypooh][traceypooh]. [(link)](https://github.com/internetarchive/ia-icons)
|
|
155
|
+
|
|
156
|
+
### Library (non-rendering)
|
|
157
|
+
|
|
158
|
+
- __ads-library__ - Includes: Helpful `fetch()` abstraction, data formatters, event abstractions,
|
|
159
|
+
a place for common code dependencies within the broader component library. [@jeffwklein][jeffwklein]
|
|
160
|
+
[(link)](https://github.com/internetarchive/ads-common/tree/d1dbdd0b137b54b871f1ed41a54e4256af2abaee/packages/ads-library/src)
|
|
161
|
+
|
|
162
|
+
### Carousel
|
|
163
|
+
|
|
164
|
+
- __basic-carousel (UX team)__ - Transforms any slotted content into a fully functioning carousel, including nav button showing/hiding, pagination-style-snapping, and custom arrow BG colors. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/basic-carousel.ts)
|
|
165
|
+
|
|
166
|
+
### Divider
|
|
167
|
+
|
|
168
|
+
- __ia-text-divider__ - Lightweight component to handle styling/rendering for the big ---OR--- divider used on i.e. the account settings page, can use custom text instead of `OR` if desired. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/ia-text-divider.ts?ref_type=heads)
|
|
169
|
+
|
|
170
|
+
### Banner
|
|
171
|
+
|
|
172
|
+
- __alert-banner (UX team)__ - Straightforward banner component with 3 urgency levels and an optional close button. Point: [@jbuckner][jbuckner]. [(link)](https://git.archive.org/www/offshoot/-/commits/main/src/widgets/alert-banner.ts)
|
|
173
|
+
|
|
174
|
+
### Input
|
|
175
|
+
|
|
176
|
+
- __ia-otp-input (UX team)__ - Complex little component to handle rendering a 6-box OTP input. Autofocuses first input, hops between inputs, supports pasting, autocomplete, a custom number of boxes and a custom allowed-characters regex (defaults to numeric-only). Used i.e. in the `Email me a code` modal on the [account settings](https://archive.org/account/settings) page. Point: [@rebecca-shoptaw][rebecca-shoptaw]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/otp/ia-otp-input.ts)
|
|
177
|
+
- __ia-clearable-text-input__ - Text input with a clear button and substantial a11y support. Point: [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-clearable-text-input/blob/main/src/ia-clearable-text-input.ts)
|
|
178
|
+
|
|
179
|
+
### Menu
|
|
180
|
+
|
|
181
|
+
- __ia-dropdown__ - Supports various customized dropdown menu use cases. Point: [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-dropdown)
|
|
182
|
+
|
|
183
|
+
### Infinite Scroller
|
|
184
|
+
|
|
185
|
+
- __infinite-scroller (UX team)__ - Supports virtualized buffered scrolling of large lists. Point: [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-infinite-scroller)
|
|
186
|
+
|
|
187
|
+
### Histogram
|
|
188
|
+
|
|
189
|
+
- __collection-histogram (UX team)__ - Histogram component, only used on collection pages at the moment, but the component is fairly general already. Point: [@latonv][latonv]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/scenes/collection-page/components/histograms/collection-histogram.ts)
|
|
190
|
+
- __histogram-date-range (UX team)__ - Date range component for histogram, which we might explore consolidating with the above. Point: [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-histogram-date-range)
|
|
191
|
+
|
|
192
|
+
### Activity Indicator
|
|
193
|
+
|
|
194
|
+
- __ia-activity-indicator__ - SVG-based circular activity indicator with two mode options, used in `ia-button` and throughout site. Point: [@jbuckner][jbuckner]. [(link)](https://github.com/internetarchive/iaux/blob/master/packages/ia-activity-indicator/src/ia-activity-indicator.ts)
|
|
195
|
+
- __circular-activity-indicator (UX team)__ - Variation on the IA activity indicator with CSS variable customization. Point: [@jbuckner][jbuckner]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/activity-indicators/circular-activity-indicator.ts)
|
|
196
|
+
- __horizontal-activity-indicator (UX team)__ - Horizontal page-wide activity indicator, relies on the `sharedResizeObserver` which we'd need to convert and generalize as well. Point: [@jbuckner][jbuckner]. [(link)](https://git.archive.org/www/offshoot/-/blob/main/src/widgets/activity-indicators/horizontal-activity-indicator.ts)
|
|
197
|
+
|
|
198
|
+
### Responsiveness Helpers
|
|
199
|
+
|
|
200
|
+
- __SharedResizeObserver__ - Could be made into a more declarative component similar to [what Shoelace has done](https://shoelace.style/components/resize-observer). I.e., the component itself manages attaching/detaching the shared observer instance from its slotted children as part of its lifecycle, so that we don't have to repeat that logic all over our other components. Used by horizontal activity indicator and carousel. Point: [@latonv][latonv]. [(link)](https://github.com/internetarchive/iaux-shared-resize-observer)
|
|
201
|
+
|
|
202
|
+
### Accessibility Helpers
|
|
203
|
+
|
|
204
|
+
- __ia-sronly__ - Importable CSS class to quickly style screen-reader-only text. Point: [@nsharma123][nsharma123]. [(link)](https://github.com/internetarchive/iaux/blob/master/packages/ia-styles/src/ia-sronly.ts)
|
|
205
|
+
|
|
206
|
+
<!-- URLs for GitHub @s, in alphabetical order -->
|
|
207
|
+
[iisa]: https://github.com/iisa
|
|
208
|
+
[jbuckner]: https://github.com/jbuckner
|
|
209
|
+
[jeffwklein]: https://github.com/jeffwklein
|
|
210
|
+
[latonv]: https://github.com/latonv
|
|
211
|
+
[nsharma123]: https://github.com/nsharma123s
|
|
212
|
+
[rebecca-shoptaw]: https://github.com/rebecca-shoptaw
|
|
213
|
+
[traceypooh]: https://github.com/traceypooh
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
viewBox="0 0 8 4"
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
>
|
|
5
|
+
<path
|
|
6
|
+
d="m6.7226499.58397485c.22976435-.15317623.54019902-.09108929.69337525.13867505.13615665.20423498.10222882.47220947-.06836249.63681849l-.07031256.05655676-3.2773501 2.18490006-3.2773501-2.18490006c-.22976434-.15317623-.29185128-.4636109-.13867505-.69337525.13615665-.20423497.39656688-.27598409.61412572-.18182636l.07924953.04315131 2.7226499 1.81402515z"
|
|
7
|
+
></path>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
viewBox="0 0 8 4"
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
>
|
|
5
|
+
<path
|
|
6
|
+
d="m6.7226499 3.51689722c.22976435.15317623.54019902.0910893.69337525-.13867505.13615665-.20423497.10222882-.47220946-.06836249-.63681849l-.07031256-.05655675-3.2773501-2.18490007-3.2773501 2.18490007c-.22976434.15317623-.29185128.4636109-.13867505.69337524.13615665.20423498.39656688.27598409.61412572.18182636l.07924953-.04315131 2.7226499-1.81402514z"
|
|
7
|
+
></path>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
viewBox="0 0 100 100"
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
>
|
|
5
|
+
<path
|
|
6
|
+
d="m50 0c27.6142375 0 50 22.3857625 50 50s-22.3857625 50-50 50-50-22.3857625-50-50 22.3857625-50 50-50zm23.8159475 26.1840525c-1.4033215-1.4033215-3.5816761-1.5592461-5.1572272-.4677738l-.5598841.4677738-18.0988362 18.0989475-18.0988362-18.0989475-.5598841-.4677738c-1.5755511-1.0914723-3.7539057-.9355477-5.1572272.4677738-1.5787367 1.5787367-1.5787367 4.1383746 0 5.7171113l18.0989475 18.0988362-18.0989475 18.0988362c-1.5787367 1.5787367-1.5787367 4.1383746 0 5.7171113 1.4033215 1.4033215 3.5816761 1.5592461 5.1572272.4677738l.5598841-.4677738 18.0988362-18.0989475 18.0988362 18.0989475.5598841.4677738c1.5755511 1.0914723 3.7539057.9355477 5.1572272-.4677738 1.5787367-1.5787367 1.5787367-4.1383746 0-5.7171113l-18.0989475-18.0988362 18.0989475-18.0988362c1.5787367-1.5787367 1.5787367-4.1383746 0-5.7171113z"
|
|
7
|
+
fill-rule="evenodd"
|
|
8
|
+
></path>
|
|
9
|
+
</svg>
|