@internetarchive/elements 0.2.3-alpha-webdev8378.1 → 0.2.3
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 +320 -320
- package/dist/src/elements/ia-combo-box/caret-closed.svg +8 -8
- package/dist/src/elements/ia-combo-box/caret-open.svg +8 -8
- package/dist/src/elements/ia-combo-box/clear.svg +8 -8
- package/dist/src/elements/ia-otp-form/ia-otp-form.d.ts +20 -0
- package/dist/src/elements/ia-otp-form/ia-otp-form.d.ts.map +1 -0
- package/dist/src/elements/ia-otp-form/ia-otp-form.js +175 -0
- package/dist/src/elements/ia-otp-form/ia-otp-form.js.map +1 -0
- package/dist/src/elements/ia-status-indicator/ia-status-indicator.d.ts +4 -1
- package/dist/src/elements/ia-status-indicator/ia-status-indicator.d.ts.map +1 -1
- package/dist/src/elements/ia-status-indicator/ia-status-indicator.js +9 -0
- package/dist/src/elements/ia-status-indicator/ia-status-indicator.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 +6 -11
- package/dist/src/themes/theme-styles.js.map +1 -1
- package/package.json +118 -120
- package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.d.ts +0 -75
- package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.d.ts.map +0 -1
- package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.js +0 -391
- package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.js.map +0 -1
- package/dist/src/elements/ia-dropdown-search-bar/models.d.ts +0 -16
- package/dist/src/elements/ia-dropdown-search-bar/models.d.ts.map +0 -1
- package/dist/src/elements/ia-dropdown-search-bar/models.js +0 -2
- package/dist/src/elements/ia-dropdown-search-bar/models.js.map +0 -1
- package/dist/src/elements/ia-dropdown-search-bar/search.svg +0 -10
package/package.json
CHANGED
|
@@ -1,120 +1,118 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@internetarchive/elements",
|
|
3
|
-
"version": "0.2.3
|
|
4
|
-
"description": "A web component library from the Internet Archive.",
|
|
5
|
-
"license": "AGPL-3.0-only",
|
|
6
|
-
"types": "./dist/src/elements/index.d.ts",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"publishConfig": {
|
|
9
|
-
"access": "public"
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/internetarchive/elements.git"
|
|
14
|
-
},
|
|
15
|
-
"bugs": {
|
|
16
|
-
"url": "https://github.com/internetarchive/elements/issues"
|
|
17
|
-
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"dev": "wireit",
|
|
20
|
-
"build": "wireit",
|
|
21
|
-
"clean": "wireit",
|
|
22
|
-
"lint": "wireit",
|
|
23
|
-
"format": "wireit",
|
|
24
|
-
"circular": "wireit",
|
|
25
|
-
"prepare": "wireit",
|
|
26
|
-
"test": "wireit",
|
|
27
|
-
"ghpages:build": "wireit"
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@lit/localize": "^0.12.2",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@vitest/
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"eslint": "^
|
|
44
|
-
"eslint-
|
|
45
|
-
"eslint-plugin-
|
|
46
|
-
"eslint-plugin-
|
|
47
|
-
"eslint-plugin-
|
|
48
|
-
"eslint-plugin-
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
"dist",
|
|
70
|
-
"!dist
|
|
71
|
-
"!dist
|
|
72
|
-
"!dist
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@internetarchive/elements",
|
|
3
|
+
"version": "0.2.3",
|
|
4
|
+
"description": "A web component library from the Internet Archive.",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
|
+
"types": "./dist/src/elements/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/internetarchive/elements.git"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/internetarchive/elements/issues"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "wireit",
|
|
20
|
+
"build": "wireit",
|
|
21
|
+
"clean": "wireit",
|
|
22
|
+
"lint": "wireit",
|
|
23
|
+
"format": "wireit",
|
|
24
|
+
"circular": "wireit",
|
|
25
|
+
"prepare": "wireit",
|
|
26
|
+
"test": "wireit",
|
|
27
|
+
"ghpages:build": "wireit"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@lit/localize": "^0.12.2",
|
|
31
|
+
"lit": "^2.8.0 || ^3.3.2",
|
|
32
|
+
"magic-snowflakes": "^7.0.2",
|
|
33
|
+
"tslib": "^2.8.1"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@open-wc/testing-helpers": "^3.0.1",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
|
38
|
+
"@vitest/browser": "^4.0.8",
|
|
39
|
+
"@vitest/browser-playwright": "^4.0.8",
|
|
40
|
+
"@vitest/coverage-v8": "^4.0.8",
|
|
41
|
+
"eslint": "^9.39.1",
|
|
42
|
+
"eslint-config-prettier": "^10.1.8",
|
|
43
|
+
"eslint-plugin-html": "^8.1.3",
|
|
44
|
+
"eslint-plugin-import": "^2.32.0",
|
|
45
|
+
"eslint-plugin-lit": "^1.15.0",
|
|
46
|
+
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
47
|
+
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
48
|
+
"eslint-plugin-wc": "^2.2.1",
|
|
49
|
+
"highlight.js": "^11.11.1",
|
|
50
|
+
"madge": "^8.0.0",
|
|
51
|
+
"playwright": "^1.56.1",
|
|
52
|
+
"prettier": "^3.6.2",
|
|
53
|
+
"ts-lit-plugin": "^2.0.2",
|
|
54
|
+
"tsc-alias": "^1.8.16",
|
|
55
|
+
"typescript": "^5.9.3",
|
|
56
|
+
"vite": "^7.2.2",
|
|
57
|
+
"vitest": "^4.0.8",
|
|
58
|
+
"wireit": "^0.14.12"
|
|
59
|
+
},
|
|
60
|
+
"exports": {
|
|
61
|
+
".": "./dist/src/index.js",
|
|
62
|
+
"./*": "./dist/src/elements/*.js",
|
|
63
|
+
"./labs/*": "./dist/src/labs/*.js"
|
|
64
|
+
},
|
|
65
|
+
"files": [
|
|
66
|
+
"README.md",
|
|
67
|
+
"dist",
|
|
68
|
+
"!dist/**/*.test*",
|
|
69
|
+
"!dist/**/*-story*",
|
|
70
|
+
"!dist/demo",
|
|
71
|
+
"!dist/src/internal",
|
|
72
|
+
"!dist/*.tsbuildinfo"
|
|
73
|
+
],
|
|
74
|
+
"wireit": {
|
|
75
|
+
"build": {
|
|
76
|
+
"command": "tsc --build --pretty && tsc-alias && rsync -zarvm --prune-empty-dirs --include \"*/\" --include \"*.svg\" --exclude=\"*\" src dist",
|
|
77
|
+
"dependencies": [
|
|
78
|
+
"circular"
|
|
79
|
+
],
|
|
80
|
+
"files": [
|
|
81
|
+
"src/**/*.ts",
|
|
82
|
+
"tsconfig.json"
|
|
83
|
+
],
|
|
84
|
+
"output": [
|
|
85
|
+
"dist/**"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"circular": {
|
|
89
|
+
"command": "madge --circular --extensions ts ."
|
|
90
|
+
},
|
|
91
|
+
"clean": {
|
|
92
|
+
"command": "rm -rf dist"
|
|
93
|
+
},
|
|
94
|
+
"dev": {
|
|
95
|
+
"command": "vite"
|
|
96
|
+
},
|
|
97
|
+
"lint": {
|
|
98
|
+
"command": "eslint . && prettier \"**/*.ts\" --check"
|
|
99
|
+
},
|
|
100
|
+
"format": {
|
|
101
|
+
"command": "eslint . --fix && prettier \"**/*.ts\" --write"
|
|
102
|
+
},
|
|
103
|
+
"prepare": {
|
|
104
|
+
"dependencies": [
|
|
105
|
+
"build"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"test": {
|
|
109
|
+
"command": "vitest",
|
|
110
|
+
"dependencies": [
|
|
111
|
+
"circular"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"ghpages:build": {
|
|
115
|
+
"command": "vite build --config vite.config.ghpages.ts && touch ./ghpages/.nojekyll"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
-
import type { SearchCategory } from './models.js';
|
|
3
|
-
import '@internetarchive/ia-clearable-text-input';
|
|
4
|
-
import '@internetarchive/ia-dropdown';
|
|
5
|
-
import '../../elements/ia-status-indicator/ia-status-indicator.js';
|
|
6
|
-
export declare class IADropdownSearchBar extends LitElement {
|
|
7
|
-
/** The query that appears in the search bar */
|
|
8
|
-
query?: string;
|
|
9
|
-
/** Dropdown menu options (tab IDs + labels) */
|
|
10
|
-
categories: SearchCategory[];
|
|
11
|
-
/** The currently selected dropdown category ID */
|
|
12
|
-
selectedCategory?: string;
|
|
13
|
-
/** Placeholder text for the search input */
|
|
14
|
-
placeholder: string;
|
|
15
|
-
/** Whether to use the mobile layout */
|
|
16
|
-
useMobileView: boolean;
|
|
17
|
-
/** Whether to hide the category dropdown to the left of the search bar */
|
|
18
|
-
hideDropdown: boolean;
|
|
19
|
-
/** Whether the search button should show its loading state */
|
|
20
|
-
loading: boolean;
|
|
21
|
-
private searchInput;
|
|
22
|
-
/** The effective selected category, falling back to the first in the list. */
|
|
23
|
-
private get resolvedCategory();
|
|
24
|
-
render(): TemplateResult;
|
|
25
|
-
/**
|
|
26
|
-
* Template for the category dropdown on the left side of the search bar.
|
|
27
|
-
*/
|
|
28
|
-
private get dropdownTemplate();
|
|
29
|
-
/**
|
|
30
|
-
* Template for the main text entry box of the search bar.
|
|
31
|
-
*/
|
|
32
|
-
private get textBoxTemplate();
|
|
33
|
-
/**
|
|
34
|
-
* Template for the "magnifying glass" search button to the right of the search bar.
|
|
35
|
-
*/
|
|
36
|
-
private get searchButtonTemplate();
|
|
37
|
-
/**
|
|
38
|
-
* Converts the `categories` array into the `optionInterface[]` format
|
|
39
|
-
* expected by `ia-dropdown`.
|
|
40
|
-
*/
|
|
41
|
-
private get dropdownOptions();
|
|
42
|
-
/**
|
|
43
|
-
* The display label for the currently selected category.
|
|
44
|
-
*/
|
|
45
|
-
private get selectedCategoryLabel();
|
|
46
|
-
/**
|
|
47
|
-
* The current search query with +'s replaced by spaces.
|
|
48
|
-
*/
|
|
49
|
-
private get spacedQuery();
|
|
50
|
-
/**
|
|
51
|
-
* Template for any slotted search links beneath the search bar
|
|
52
|
-
*/
|
|
53
|
-
private get searchLinksTemplate();
|
|
54
|
-
/**
|
|
55
|
-
* Handler for when the search bar's clear button is pressed.
|
|
56
|
-
*/
|
|
57
|
-
private searchFieldCleared;
|
|
58
|
-
/**
|
|
59
|
-
* Handler for Enter key or search button click.
|
|
60
|
-
*/
|
|
61
|
-
private handleSubmit;
|
|
62
|
-
/**
|
|
63
|
-
* Handler for when the user selects a category from the dropdown.
|
|
64
|
-
*
|
|
65
|
-
* Sets `selectedCategory` locally for immediate visual feedback (semi-controlled
|
|
66
|
-
* pattern). The parent also binds this property and may re-set it on re-render.
|
|
67
|
-
*/
|
|
68
|
-
private handleCategorySelected;
|
|
69
|
-
/**
|
|
70
|
-
* Emits a `searchRequested` event with the current query and category.
|
|
71
|
-
*/
|
|
72
|
-
private emitSearchRequested;
|
|
73
|
-
static get styles(): import("lit").CSSResult[];
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=ia-dropdown-search-bar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ia-dropdown-search-bar.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,UAAU,EAAW,cAAc,EAAE,MAAM,KAAK,CAAC;AAIrE,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,UAAU,CAAC;AAKlB,OAAO,0CAA0C,CAAC;AAClD,OAAO,8BAA8B,CAAC;AACtC,OAAO,uDAAuD,CAAC;AAU/D,qBACa,mBAAoB,SAAQ,UAAU;IACjD,+CAA+C;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IAE3C,+CAA+C;IACpB,UAAU,EAAE,cAAc,EAAE,CAAM;IAE7D,kDAAkD;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAEtD,4CAA4C;IAChB,WAAW,SAAiB;IAExD,uCAAuC;IACV,aAAa,UAAS;IAEnD,0EAA0E;IAC7C,YAAY,UAAS;IAElD,8DAA8D;IACjC,OAAO,UAAS;IAG7C,OAAO,CAAC,WAAW,CAAwB;IAE3C,8EAA8E;IAC9E,OAAO,KAAK,gBAAgB,GAE3B;IAED,MAAM,IAAI,cAAc;IAgBxB;;OAEG;IACH,OAAO,KAAK,gBAAgB,GAkB3B;IAED;;OAEG;IACH,OAAO,KAAK,eAAe,GAe1B;IAED;;OAEG;IACH,OAAO,KAAK,oBAAoB,GAkB/B;IAED;;;OAGG;IACH,OAAO,KAAK,eAAe,GAK1B;IAED;;OAEG;IACH,OAAO,KAAK,qBAAqB,GAGhC;IAED;;OAEG;IACH,OAAO,KAAK,WAAW,GAEtB;IAED;;OAEG;IACH,OAAO,KAAK,mBAAmB,GAgB9B;IAED;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAM1B;;OAEG;IACH,OAAO,CAAC,YAAY;IAIpB;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAkB9B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAW3B,MAAM,KAAK,MAAM,8BAsKhB;CACF"}
|