@noctuatech/uswds 1.2.1 → 1.3.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/package.json +5 -5
- package/src/lib/accordion/accordion.element.ts +19 -19
- package/src/lib/breadcrumbs/breadcrumb/breadcrumb.element.ts +8 -10
- package/src/lib/breadcrumbs/breadcrumbs.stories.ts +3 -3
- package/src/lib/button/button.element.ts +2 -2
- package/src/lib/checkbox/checkbox.element.ts +23 -32
- package/src/lib/combo-box/combo-box.element.ts +14 -24
- package/src/lib/file-input/file-input-preview/file-input-preview.element.ts +10 -12
- package/src/lib/file-input/file-input.element.ts +6 -11
- package/src/lib/input/input.element.ts +9 -18
- package/src/lib/modal/modal-heading/modal-heading.element.ts +1 -1
- package/src/lib/modal/modal.element.ts +1 -1
- package/src/lib/radio/radio.element.ts +5 -3
- package/src/lib/range-slider/range-slider.element.ts +2 -2
- package/src/lib/search/search.element.ts +2 -2
- package/src/lib/select/select.element.ts +10 -19
- package/src/lib/textarea/textarea.element.ts +10 -19
- package/target/lib/accordion/accordion.element.d.ts +1 -2
- package/target/lib/accordion/accordion.element.js +9 -7
- package/target/lib/accordion/accordion.element.js.map +1 -1
- package/target/lib/breadcrumbs/breadcrumb/breadcrumb.element.d.ts +0 -2
- package/target/lib/breadcrumbs/breadcrumb/breadcrumb.element.js +7 -6
- package/target/lib/breadcrumbs/breadcrumb/breadcrumb.element.js.map +1 -1
- package/target/lib/breadcrumbs/breadcrumbs.stories.js +1 -1
- package/target/lib/button/button.element.js +1 -1
- package/target/lib/checkbox/checkbox.element.js +2 -2
- package/target/lib/checkbox/checkbox.element.js.map +1 -1
- package/target/lib/combo-box/combo-box.element.js +2 -2
- package/target/lib/combo-box/combo-box.element.js.map +1 -1
- package/target/lib/file-input/file-input-preview/file-input-preview.element.d.ts +1 -3
- package/target/lib/file-input/file-input-preview/file-input-preview.element.js +23 -13
- package/target/lib/file-input/file-input-preview/file-input-preview.element.js.map +1 -1
- package/target/lib/file-input/file-input.element.js +3 -5
- package/target/lib/file-input/file-input.element.js.map +1 -1
- package/target/lib/input/input.element.js +2 -2
- package/target/lib/input/input.element.js.map +1 -1
- package/target/lib/modal/modal-heading/modal-heading.element.js +1 -1
- package/target/lib/modal/modal.element.js +1 -1
- package/target/lib/radio/radio.element.js +1 -1
- package/target/lib/radio/radio.element.js.map +1 -1
- package/target/lib/range-slider/range-slider.element.js +1 -1
- package/target/lib/search/search.element.js +1 -1
- package/target/lib/select/select.element.js +2 -2
- package/target/lib/select/select.element.js.map +1 -1
- package/target/lib/textarea/textarea.element.js +2 -2
- package/target/lib/textarea/textarea.element.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noctuatech/uswds",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": ["packages/**"],
|
|
6
6
|
"main": "./target/lib.js",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"license": "ISC",
|
|
71
71
|
"description": "",
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@joist/di": "^4.2.3-next.
|
|
74
|
-
"@joist/element": "^4.2.3-next.
|
|
75
|
-
"@joist/observable": "^4.2.3-next.
|
|
76
|
-
"@joist/templating": "^4.2.3-next.
|
|
73
|
+
"@joist/di": "^4.2.3-next.14",
|
|
74
|
+
"@joist/element": "^4.2.3-next.14",
|
|
75
|
+
"@joist/observable": "^4.2.3-next.14",
|
|
76
|
+
"@joist/templating": "^4.2.3-next.14",
|
|
77
77
|
"tslib": "2.8.1"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@joist/templating/define.js";
|
|
2
|
+
|
|
3
|
+
import { attr, css, element, html, listen } from "@joist/element";
|
|
4
|
+
import { bind } from "@joist/templating";
|
|
2
5
|
|
|
3
6
|
import { USAAccordionToggleEvent } from "./events.js";
|
|
4
7
|
|
|
@@ -88,18 +91,20 @@ declare global {
|
|
|
88
91
|
}
|
|
89
92
|
`,
|
|
90
93
|
html`
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
<j-props>
|
|
95
|
+
<details $.open="open">
|
|
96
|
+
<summary>
|
|
97
|
+
<slot name="heading"></slot>
|
|
98
|
+
|
|
99
|
+
<usa-icon icon="add"></usa-icon>
|
|
100
|
+
<usa-icon icon="remove"></usa-icon>
|
|
101
|
+
</summary>
|
|
102
|
+
|
|
103
|
+
<div class="content">
|
|
104
|
+
<slot></slot>
|
|
105
|
+
</div>
|
|
106
|
+
</details>
|
|
107
|
+
</j-props>
|
|
103
108
|
`,
|
|
104
109
|
],
|
|
105
110
|
})
|
|
@@ -108,14 +113,9 @@ export class USAAccordionElement extends HTMLElement {
|
|
|
108
113
|
accessor name = "";
|
|
109
114
|
|
|
110
115
|
@attr()
|
|
116
|
+
@bind()
|
|
111
117
|
accessor open = false;
|
|
112
118
|
|
|
113
|
-
#details = query("details");
|
|
114
|
-
|
|
115
|
-
attributeChangedCallback() {
|
|
116
|
-
this.#details({ open: this.open });
|
|
117
|
-
}
|
|
118
|
-
|
|
119
119
|
@listen("click", "summary")
|
|
120
120
|
onClick(e: Event) {
|
|
121
121
|
e.preventDefault();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { attr, css, element, html
|
|
1
|
+
import { attr, css, element, html } from "@joist/element";
|
|
2
|
+
import { bind } from "@joist/templating";
|
|
2
3
|
|
|
3
4
|
declare global {
|
|
4
5
|
interface HTMLElementTagNameMap {
|
|
@@ -36,9 +37,11 @@ declare global {
|
|
|
36
37
|
}
|
|
37
38
|
`,
|
|
38
39
|
html`
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
|
|
40
|
+
<j-props>
|
|
41
|
+
<a $.href="href">
|
|
42
|
+
<slot></slot>
|
|
43
|
+
</a>
|
|
44
|
+
</j-props>
|
|
42
45
|
|
|
43
46
|
<usa-icon icon="navigate_next"></usa-icon>
|
|
44
47
|
`,
|
|
@@ -46,14 +49,9 @@ declare global {
|
|
|
46
49
|
})
|
|
47
50
|
export class USABreadcrumbElement extends HTMLElement {
|
|
48
51
|
@attr()
|
|
52
|
+
@bind()
|
|
49
53
|
accessor href = "";
|
|
50
54
|
|
|
51
55
|
@attr()
|
|
52
56
|
accessor role = "listitem";
|
|
53
|
-
|
|
54
|
-
#a = query("a");
|
|
55
|
-
|
|
56
|
-
attributeChangedCallback() {
|
|
57
|
-
this.#a({ href: this.href });
|
|
58
|
-
}
|
|
59
57
|
}
|
|
@@ -10,9 +10,9 @@ const meta = {
|
|
|
10
10
|
render(args) {
|
|
11
11
|
return html`
|
|
12
12
|
<usa-breadcrumbs ?wrap=${args.wrap}>
|
|
13
|
-
<usa-breadcrumb href="/">Home</usa-breadcrumb>
|
|
14
|
-
<usa-breadcrumb href="/">Federal Contracting</usa-breadcrumb>
|
|
15
|
-
<usa-breadcrumb href="/">Contracting assistance programs</usa-breadcrumb>
|
|
13
|
+
<usa-breadcrumb href="/home">Home</usa-breadcrumb>
|
|
14
|
+
<usa-breadcrumb href="/federal-contracting">Federal Contracting</usa-breadcrumb>
|
|
15
|
+
<usa-breadcrumb href="/contracting-assistance-programs">Contracting assistance programs</usa-breadcrumb>
|
|
16
16
|
<usa-breadcrumb>Economically disadvantaged women-owned small business federal contracting program</usa-breadcrumb>
|
|
17
17
|
</usa-breadcrumbs>
|
|
18
18
|
`;
|
|
@@ -172,7 +172,7 @@ export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
|
|
|
172
172
|
<j-if bind="href">
|
|
173
173
|
<template>
|
|
174
174
|
<j-props>
|
|
175
|
-
<a $href="href" $disabled="disabled" $target="target">
|
|
175
|
+
<a part="link" $href="href" $disabled="disabled" $target="target">
|
|
176
176
|
<slot></slot>
|
|
177
177
|
</a>
|
|
178
178
|
</j-props>
|
|
@@ -180,7 +180,7 @@ export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
|
|
|
180
180
|
|
|
181
181
|
<template else>
|
|
182
182
|
<j-props>
|
|
183
|
-
<button tabindex="0" $type="type" $disabled="disabled" $value="value">
|
|
183
|
+
<button tabindex="0" part="button" $type="type" $disabled="disabled" $value="value">
|
|
184
184
|
<slot></slot>
|
|
185
185
|
</button>
|
|
186
186
|
</j-props>
|
|
@@ -15,26 +15,16 @@ declare global {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
:host {
|
|
18
|
-
--usa-input-bg-color: #fff;
|
|
19
|
-
--usa-input-border-color: #5c5c5c;
|
|
20
|
-
--usa-input-text-color: #1b1b1b;
|
|
21
|
-
--usa-input-focus-color: #2491ff;
|
|
22
|
-
--usa-input-disabled-bg-color: #fff;
|
|
23
|
-
--usa-input-disabled-border-color: #757575;
|
|
24
|
-
--usa-input-disabled-text-color: #757575;
|
|
25
|
-
--usa-input-active-color: #005ea2;
|
|
26
|
-
--usa-input-radius: 0;
|
|
27
|
-
|
|
28
18
|
display: inline-block;
|
|
29
19
|
max-width: 30rem;
|
|
30
20
|
position: relative;
|
|
31
21
|
}
|
|
32
22
|
|
|
33
23
|
:host([tiled]) label {
|
|
34
|
-
background-color:
|
|
35
|
-
border: 2px solid
|
|
36
|
-
border-radius:
|
|
37
|
-
color:
|
|
24
|
+
background-color: #fff;
|
|
25
|
+
border: 2px solid #5c5c5c;
|
|
26
|
+
border-radius: 0.25rem;
|
|
27
|
+
color: #1b1b1b;
|
|
38
28
|
padding: 0.75rem 1rem 0.75rem 0.75rem;
|
|
39
29
|
}
|
|
40
30
|
|
|
@@ -47,37 +37,37 @@ declare global {
|
|
|
47
37
|
}
|
|
48
38
|
|
|
49
39
|
.checkbox {
|
|
50
|
-
background:
|
|
51
|
-
box-shadow: 0 0 0 2px
|
|
40
|
+
background: #fff;
|
|
41
|
+
box-shadow: 0 0 0 2px #1b1b1b;
|
|
52
42
|
display: flex;
|
|
53
43
|
align-items: center;
|
|
54
44
|
justify-content: center;
|
|
55
45
|
height: 1.25rem;
|
|
56
46
|
min-width: 1.25rem;
|
|
57
47
|
max-width: 1.25rem;
|
|
58
|
-
border-radius:
|
|
48
|
+
border-radius: 2px;
|
|
59
49
|
position: relative;
|
|
60
50
|
margin-right: 0.75rem;
|
|
61
51
|
}
|
|
62
52
|
|
|
63
53
|
input:disabled + .checkbox {
|
|
64
|
-
background-color:
|
|
65
|
-
box-shadow: 0 0 0 2px
|
|
54
|
+
background-color: #fff;
|
|
55
|
+
box-shadow: 0 0 0 2px #757575;
|
|
66
56
|
}
|
|
67
57
|
|
|
68
58
|
input:disabled:is(:checked) + .checkbox {
|
|
69
|
-
background-color:
|
|
70
|
-
box-shadow: 0 0 0 2px
|
|
59
|
+
background-color: #757575;
|
|
60
|
+
box-shadow: 0 0 0 2px #757575;
|
|
71
61
|
}
|
|
72
62
|
|
|
73
63
|
:host([disabled]) label {
|
|
74
|
-
color:
|
|
64
|
+
color: #757575;
|
|
75
65
|
cursor: not-allowed;
|
|
76
66
|
}
|
|
77
67
|
|
|
78
68
|
input:checked + .checkbox {
|
|
79
|
-
background-color:
|
|
80
|
-
box-shadow: 0 0 0 2px
|
|
69
|
+
background-color: #005ea2;
|
|
70
|
+
box-shadow: 0 0 0 2px #005ea2;
|
|
81
71
|
}
|
|
82
72
|
|
|
83
73
|
input:checked + .checkbox::after {
|
|
@@ -95,7 +85,7 @@ declare global {
|
|
|
95
85
|
}
|
|
96
86
|
|
|
97
87
|
input:focus + .checkbox {
|
|
98
|
-
outline: 0.25rem solid
|
|
88
|
+
outline: 0.25rem solid #2491ff;
|
|
99
89
|
outline-offset: 0.25rem;
|
|
100
90
|
}
|
|
101
91
|
|
|
@@ -112,23 +102,24 @@ declare global {
|
|
|
112
102
|
|
|
113
103
|
:host([tiled]) label:has(input:checked) {
|
|
114
104
|
background-color: rgba(0, 94, 162, 0.1);
|
|
115
|
-
border-color:
|
|
105
|
+
border-color: #005ea2;
|
|
116
106
|
}
|
|
117
107
|
|
|
118
108
|
:host([tiled]) label:has(input:checked:is(:disabled)) {
|
|
119
|
-
background-color:
|
|
120
|
-
border-color:
|
|
109
|
+
background-color: #fff;
|
|
110
|
+
border-color: #757575;
|
|
121
111
|
}
|
|
122
112
|
`,
|
|
123
113
|
html`
|
|
124
114
|
<label>
|
|
125
115
|
<input type="checkbox" tabindex="0"/>
|
|
126
116
|
|
|
127
|
-
<div class="checkbox"></div>
|
|
117
|
+
<div class="checkbox" part="checkbox"></div>
|
|
128
118
|
|
|
129
|
-
<div class="title">
|
|
130
|
-
|
|
131
|
-
|
|
119
|
+
<div class="title" part="title">
|
|
120
|
+
<slot></slot>
|
|
121
|
+
</div>
|
|
122
|
+
</j-props>
|
|
132
123
|
</label>
|
|
133
124
|
`,
|
|
134
125
|
],
|
|
@@ -30,17 +30,6 @@ declare global {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
:host {
|
|
33
|
-
--usa-input-bg-color: #fff;
|
|
34
|
-
--usa-input-border-color: #5c5c5c;
|
|
35
|
-
--usa-input-text-color: #1b1b1b;
|
|
36
|
-
--usa-input-focus-color: #2491ff;
|
|
37
|
-
--usa-input-disabled-bg-color: #fff;
|
|
38
|
-
--usa-input-disabled-border-color: #757575;
|
|
39
|
-
--usa-input-disabled-text-color: #757575;
|
|
40
|
-
--usa-input-hover-bg-color: #f0f0f0;
|
|
41
|
-
--usa-combo-max-height: 12.5em;
|
|
42
|
-
--usa-input-radius: 0;
|
|
43
|
-
|
|
44
33
|
display: block;
|
|
45
34
|
max-width: 30rem;
|
|
46
35
|
position: relative;
|
|
@@ -49,11 +38,11 @@ declare global {
|
|
|
49
38
|
|
|
50
39
|
input {
|
|
51
40
|
border-width: 1px;
|
|
52
|
-
border-color:
|
|
41
|
+
border-color: #5c5c5c;
|
|
53
42
|
border-style: solid;
|
|
54
|
-
border-radius:
|
|
55
|
-
color:
|
|
56
|
-
background-color:
|
|
43
|
+
border-radius: 0;
|
|
44
|
+
color: #1b1b1b;
|
|
45
|
+
background-color: #fff;
|
|
57
46
|
display: block;
|
|
58
47
|
height: 2.5rem;
|
|
59
48
|
line-height: 1.3;
|
|
@@ -65,14 +54,14 @@ declare global {
|
|
|
65
54
|
}
|
|
66
55
|
|
|
67
56
|
input:not(:disabled):focus {
|
|
68
|
-
outline: 0.25rem solid
|
|
57
|
+
outline: 0.25rem solid #2491ff;
|
|
69
58
|
outline-offset: 0;
|
|
70
59
|
}
|
|
71
60
|
|
|
72
61
|
input:disabled {
|
|
73
|
-
background-color:
|
|
74
|
-
border-color:
|
|
75
|
-
color:
|
|
62
|
+
background-color: #fff;
|
|
63
|
+
border-color: #757575;
|
|
64
|
+
color: #757575;
|
|
76
65
|
}
|
|
77
66
|
|
|
78
67
|
ul {
|
|
@@ -82,8 +71,8 @@ declare global {
|
|
|
82
71
|
width: 100%;
|
|
83
72
|
transform: translateY(100%);
|
|
84
73
|
margin: 0;
|
|
85
|
-
border: 1px solid
|
|
86
|
-
max-height:
|
|
74
|
+
border: 1px solid #5c5c5c;
|
|
75
|
+
max-height: 12.5em;
|
|
87
76
|
overflow-y: scroll;
|
|
88
77
|
z-index: 1001;
|
|
89
78
|
}
|
|
@@ -93,7 +82,7 @@ declare global {
|
|
|
93
82
|
}
|
|
94
83
|
|
|
95
84
|
ul li {
|
|
96
|
-
background:
|
|
85
|
+
background: #fff;
|
|
97
86
|
list-style: none;
|
|
98
87
|
border-bottom: 1px solid #e6e6e6;
|
|
99
88
|
cursor: pointer;
|
|
@@ -101,11 +90,11 @@ declare global {
|
|
|
101
90
|
}
|
|
102
91
|
|
|
103
92
|
ul li:hover {
|
|
104
|
-
background-color:
|
|
93
|
+
background-color: #f0f0f0;
|
|
105
94
|
}
|
|
106
95
|
|
|
107
96
|
li:focus {
|
|
108
|
-
outline: 0.25rem solid
|
|
97
|
+
outline: 0.25rem solid #2491ff;
|
|
109
98
|
outline-offset: -0.25rem;
|
|
110
99
|
}
|
|
111
100
|
|
|
@@ -131,6 +120,7 @@ declare global {
|
|
|
131
120
|
<slot name="label"></slot>
|
|
132
121
|
|
|
133
122
|
<input
|
|
123
|
+
part="input"
|
|
134
124
|
tabindex="0"
|
|
135
125
|
role="combobox"
|
|
136
126
|
autocomplete="off"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "@joist/templating/define.js";
|
|
2
2
|
|
|
3
3
|
import { css, element, html } from "@joist/element";
|
|
4
|
+
import { observe } from "@joist/observable";
|
|
4
5
|
import { bind } from "@joist/templating";
|
|
5
6
|
|
|
6
7
|
declare global {
|
|
@@ -91,24 +92,21 @@ declare global {
|
|
|
91
92
|
],
|
|
92
93
|
})
|
|
93
94
|
export class USAFileInputPreviewElement extends HTMLElement {
|
|
94
|
-
@
|
|
95
|
-
accessor
|
|
96
|
-
|
|
97
|
-
#files: FileList | null = null;
|
|
98
|
-
|
|
99
|
-
get files() {
|
|
100
|
-
return this.#files;
|
|
101
|
-
}
|
|
95
|
+
@observe()
|
|
96
|
+
accessor files: FileList | null = null;
|
|
102
97
|
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
@bind((i) => {
|
|
99
|
+
if (!i.files || i.files.length === 0) {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
105
102
|
|
|
106
|
-
|
|
103
|
+
return Array.from(i.files).map((file) => ({
|
|
107
104
|
file,
|
|
108
105
|
src: URL.createObjectURL(file),
|
|
109
106
|
isImage: file.type.startsWith("image"),
|
|
110
107
|
}));
|
|
111
|
-
}
|
|
108
|
+
})
|
|
109
|
+
accessor fileEntries: FileEntry[] = [];
|
|
112
110
|
}
|
|
113
111
|
|
|
114
112
|
interface FileEntry {
|
|
@@ -19,9 +19,6 @@ declare global {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
:host {
|
|
22
|
-
--usa-input-radius: 0;
|
|
23
|
-
--usa-input-bg-color: #d9e8f6;
|
|
24
|
-
|
|
25
22
|
display: block;
|
|
26
23
|
max-width: 30rem;
|
|
27
24
|
position: relative;
|
|
@@ -64,7 +61,7 @@ declare global {
|
|
|
64
61
|
|
|
65
62
|
.box {
|
|
66
63
|
border: 1px dashed #adadad;
|
|
67
|
-
border-radius:
|
|
64
|
+
border-radius: 0;
|
|
68
65
|
display: flex;
|
|
69
66
|
font-size: 0.93rem;
|
|
70
67
|
position: relative;
|
|
@@ -87,16 +84,16 @@ declare global {
|
|
|
87
84
|
<input type="file" tabindex="0"/>
|
|
88
85
|
|
|
89
86
|
<j-if bind="filesVisible">
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<usa-file-input-preview $.files="files">
|
|
87
|
+
<template>
|
|
88
|
+
<j-props>
|
|
89
|
+
<usa-file-input-preview $.files="files" part="preview">
|
|
93
90
|
Selected file <usa-link>Change file</usa-link>
|
|
94
91
|
</usa-file-input-preview>
|
|
95
92
|
</j-props>
|
|
96
93
|
</template>
|
|
97
94
|
|
|
98
95
|
<template else>
|
|
99
|
-
<div class="box">
|
|
96
|
+
<div class="box" part="input">
|
|
100
97
|
<slot name="description">
|
|
101
98
|
Drag file here or <usa-link>choose from folder</usa-link>
|
|
102
99
|
</slot>
|
|
@@ -126,7 +123,7 @@ export class USAFileInputElement extends HTMLElement {
|
|
|
126
123
|
@bind()
|
|
127
124
|
accessor files: FileList | null = null;
|
|
128
125
|
|
|
129
|
-
@bind()
|
|
126
|
+
@bind((i) => !!i.files?.length)
|
|
130
127
|
accessor filesVisible = false;
|
|
131
128
|
|
|
132
129
|
#internals = this.attachInternals();
|
|
@@ -183,7 +180,6 @@ export class USAFileInputElement extends HTMLElement {
|
|
|
183
180
|
const input = this.#input();
|
|
184
181
|
|
|
185
182
|
this.files = input.files;
|
|
186
|
-
this.filesVisible = !!input.files?.length;
|
|
187
183
|
|
|
188
184
|
this.dispatchEvent(new Event("change"));
|
|
189
185
|
}
|
|
@@ -218,7 +214,6 @@ export class USAFileInputElement extends HTMLElement {
|
|
|
218
214
|
}
|
|
219
215
|
|
|
220
216
|
this.files = data.files;
|
|
221
|
-
this.filesVisible = !!this.files?.length;
|
|
222
217
|
}
|
|
223
218
|
}
|
|
224
219
|
}
|
|
@@ -18,15 +18,6 @@ declare global {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
:host {
|
|
21
|
-
--usa-input-bg-color: #fff;
|
|
22
|
-
--usa-input-border-color: #5c5c5c;
|
|
23
|
-
--usa-input-text-color: #1b1b1b;
|
|
24
|
-
--usa-input-focus-color: #2491ff;
|
|
25
|
-
--usa-input-disabled-bg-color: #fff;
|
|
26
|
-
--usa-input-disabled-border-color: #757575;
|
|
27
|
-
--usa-input-disabled-text-color: #757575;
|
|
28
|
-
--usa-input-radius: 0;
|
|
29
|
-
|
|
30
21
|
font-size: 1.06rem;
|
|
31
22
|
line-height: 1.3;
|
|
32
23
|
display: block;
|
|
@@ -37,12 +28,12 @@ declare global {
|
|
|
37
28
|
}
|
|
38
29
|
|
|
39
30
|
input {
|
|
40
|
-
background-color:
|
|
31
|
+
background-color: #fff;
|
|
41
32
|
border-width: 1px;
|
|
42
|
-
border-color:
|
|
33
|
+
border-color: #5c5c5c;
|
|
43
34
|
border-style: solid;
|
|
44
|
-
border-radius:
|
|
45
|
-
color:
|
|
35
|
+
border-radius: 0;
|
|
36
|
+
color: #1b1b1b;
|
|
46
37
|
display: block;
|
|
47
38
|
height: 2.5rem;
|
|
48
39
|
line-height: 1.3;
|
|
@@ -53,14 +44,14 @@ declare global {
|
|
|
53
44
|
}
|
|
54
45
|
|
|
55
46
|
input:not(:disabled):focus {
|
|
56
|
-
outline: 0.25rem solid
|
|
47
|
+
outline: 0.25rem solid #2491ff;
|
|
57
48
|
outline-offset: 0;
|
|
58
49
|
}
|
|
59
50
|
|
|
60
51
|
input:disabled {
|
|
61
|
-
background-color:
|
|
62
|
-
border-color:
|
|
63
|
-
color:
|
|
52
|
+
background-color: #fff;
|
|
53
|
+
border-color: #757575;
|
|
54
|
+
color: #757575;
|
|
64
55
|
}
|
|
65
56
|
|
|
66
57
|
slot[name="detail"]::slotted(*) {
|
|
@@ -98,7 +89,7 @@ declare global {
|
|
|
98
89
|
|
|
99
90
|
<slot></slot>
|
|
100
91
|
|
|
101
|
-
<input tabindex="0" />
|
|
92
|
+
<input tabindex="0" part="input" />
|
|
102
93
|
</label>
|
|
103
94
|
`,
|
|
104
95
|
],
|
|
@@ -31,9 +31,11 @@ declare global {
|
|
|
31
31
|
--usa-radio-focus-color: var(--usa-input-focus-color);
|
|
32
32
|
--usa-input-radius: 0;
|
|
33
33
|
|
|
34
|
-
display:
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: 1rem;
|
|
35
37
|
max-width: 30rem;
|
|
36
|
-
|
|
38
|
+
margin-bottom: 1.5rem;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
label {
|
|
@@ -97,7 +99,7 @@ declare global {
|
|
|
97
99
|
:host([tiled]) label {
|
|
98
100
|
background-color: var(--usa-input-bg-color);
|
|
99
101
|
border: 2px solid var(--usa-input-border-color);
|
|
100
|
-
border-radius:
|
|
102
|
+
border-radius: 0.25rem;
|
|
101
103
|
color: var(--usa-input-text-color);
|
|
102
104
|
padding: 0.75rem 1rem 0.75rem 0.75rem;
|
|
103
105
|
}
|
|
@@ -40,11 +40,11 @@ declare global {
|
|
|
40
40
|
`,
|
|
41
41
|
html`
|
|
42
42
|
<form>
|
|
43
|
-
<usa-input>
|
|
43
|
+
<usa-input exportparts="input">
|
|
44
44
|
<slot></slot>
|
|
45
45
|
</usa-input>
|
|
46
46
|
|
|
47
|
-
<usa-button type="submit">Search</usa-button>
|
|
47
|
+
<usa-button type="submit" exportparts="button,link">Search</usa-button>
|
|
48
48
|
</form>
|
|
49
49
|
`,
|
|
50
50
|
],
|
|
@@ -18,15 +18,6 @@ declare global {
|
|
|
18
18
|
shadowDom: [
|
|
19
19
|
css`
|
|
20
20
|
:host {
|
|
21
|
-
--usa-input-bg-color: #fff;
|
|
22
|
-
--usa-input-border-color: #5c5c5c;
|
|
23
|
-
--usa-input-text-color: #1b1b1b;
|
|
24
|
-
--usa-input-focus-color: #2491ff;
|
|
25
|
-
--usa-input-disabled-bg-color: #fff;
|
|
26
|
-
--usa-input-disabled-border-color: #757575;
|
|
27
|
-
--usa-input-disabled-text-color: #757575;
|
|
28
|
-
--usa-input-radius: 0;
|
|
29
|
-
|
|
30
21
|
display: block;
|
|
31
22
|
line-height: 1.3;
|
|
32
23
|
position: relative;
|
|
@@ -39,11 +30,11 @@ declare global {
|
|
|
39
30
|
font-size: 1.06rem;
|
|
40
31
|
appearance: none;
|
|
41
32
|
border-width: 1px;
|
|
42
|
-
border-color:
|
|
33
|
+
border-color: #5c5c5c;
|
|
43
34
|
border-style: solid;
|
|
44
|
-
border-radius:
|
|
45
|
-
color:
|
|
46
|
-
background-color:
|
|
35
|
+
border-radius: 0;
|
|
36
|
+
color: #1b1b1b;
|
|
37
|
+
background-color: #fff;
|
|
47
38
|
display: block;
|
|
48
39
|
height: 2.5rem;
|
|
49
40
|
margin-top: 0.5rem;
|
|
@@ -52,14 +43,14 @@ declare global {
|
|
|
52
43
|
}
|
|
53
44
|
|
|
54
45
|
select:not(:disabled):focus {
|
|
55
|
-
outline: 0.25rem solid
|
|
46
|
+
outline: 0.25rem solid #2491ff;
|
|
56
47
|
outline-offset: 0;
|
|
57
48
|
}
|
|
58
49
|
|
|
59
50
|
select:disabled {
|
|
60
|
-
background-color:
|
|
61
|
-
border-color:
|
|
62
|
-
color:
|
|
51
|
+
background-color: #fff;
|
|
52
|
+
border-color: #757575;
|
|
53
|
+
color: #757575;
|
|
63
54
|
}
|
|
64
55
|
|
|
65
56
|
usa-icon {
|
|
@@ -74,11 +65,11 @@ declare global {
|
|
|
74
65
|
<usa-icon icon="unfold_more"></usa-icon>
|
|
75
66
|
|
|
76
67
|
<label>
|
|
77
|
-
<div class="label">
|
|
68
|
+
<div class="label" part="label">
|
|
78
69
|
<slot></slot>
|
|
79
70
|
</div>
|
|
80
71
|
|
|
81
|
-
<select></select>
|
|
72
|
+
<select part="select"></select>
|
|
82
73
|
</label>
|
|
83
74
|
`,
|
|
84
75
|
],
|