@noctuatech/uswds 1.3.8 → 1.3.9
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/alert/alert.element.ts +4 -3
- package/src/lib/file-input/file-input.element.test.ts +0 -1
- package/src/lib/file-input/file-input.element.ts +3 -8
- package/src/lib/file-input/file-input.stories.ts +40 -16
- package/src/lib/textarea/textarea.element.ts +5 -1
- package/src/lib/textarea/textarea.stories.ts +5 -5
- package/target/lib/alert/alert.element.js +2 -2
- package/target/lib/alert/alert.element.js.map +1 -1
- package/target/lib/file-input/file-input.element.d.ts +0 -1
- package/target/lib/file-input/file-input.element.js +3 -13
- package/target/lib/file-input/file-input.element.js.map +1 -1
- package/target/lib/file-input/file-input.element.test.js +0 -1
- package/target/lib/file-input/file-input.element.test.js.map +1 -1
- package/target/lib/file-input/file-input.stories.d.ts +4 -4
- package/target/lib/file-input/file-input.stories.js +20 -9
- package/target/lib/file-input/file-input.stories.js.map +1 -1
- package/target/lib/textarea/textarea.element.d.ts +1 -1
- package/target/lib/textarea/textarea.element.js +3 -1
- package/target/lib/textarea/textarea.element.js.map +1 -1
- package/target/lib/textarea/textarea.stories.d.ts +2 -2
- package/target/lib/textarea/textarea.stories.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noctuatech/uswds",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"packages/**"
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
"license": "ISC",
|
|
104
104
|
"description": "",
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@joist/di": "^4.2.4-next.
|
|
107
|
-
"@joist/element": "^4.2.4-next.
|
|
108
|
-
"@joist/observable": "^4.2.4-next.
|
|
109
|
-
"@joist/templating": "^4.2.4-next.
|
|
106
|
+
"@joist/di": "^4.2.4-next.5",
|
|
107
|
+
"@joist/element": "^4.2.4-next.5",
|
|
108
|
+
"@joist/observable": "^4.2.4-next.5",
|
|
109
|
+
"@joist/templating": "^4.2.4-next.5",
|
|
110
110
|
"tslib": "2.8.1"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { attr, css, element, html
|
|
1
|
+
import { attr, css, element, html } from '@joist/element';
|
|
2
|
+
import { observe } from '@joist/observable';
|
|
3
|
+
import { bind } from '@joist/templating';
|
|
2
4
|
|
|
3
5
|
import { type USAAlertType, USA_ALERT_CONFIG } from './alert-types.js';
|
|
4
|
-
import { bind } from '@joist/templating';
|
|
5
6
|
import { USAIcon } from '../icon/icon-types.js';
|
|
6
|
-
import { observe } from '@joist/observable';
|
|
7
7
|
|
|
8
8
|
declare global {
|
|
9
9
|
interface HTMLElementTagNameMap {
|
|
@@ -84,6 +84,7 @@ declare global {
|
|
|
84
84
|
<slot id="heading" name="heading"></slot>
|
|
85
85
|
</div>
|
|
86
86
|
|
|
87
|
+
<!-- this makes the heading and content are aligned properly -->
|
|
87
88
|
<div class="spacer"></div>
|
|
88
89
|
|
|
89
90
|
<div>
|
|
@@ -66,7 +66,6 @@ describe('usa-file-input', () => {
|
|
|
66
66
|
await Promise.resolve();
|
|
67
67
|
|
|
68
68
|
// Verify that filesVisible is true and files are set
|
|
69
|
-
assert.isTrue(fileInput.filesVisible);
|
|
70
69
|
assert.equal(fileInput.files?.length, 1);
|
|
71
70
|
assert.equal(fileInput.files?.[0].name, 'test.txt');
|
|
72
71
|
});
|
|
@@ -86,7 +86,7 @@ declare global {
|
|
|
86
86
|
<input id="file-input" type="file" tabindex="0" />
|
|
87
87
|
</j-bind>
|
|
88
88
|
|
|
89
|
-
<j-if bind="
|
|
89
|
+
<j-if bind="files.length">
|
|
90
90
|
<template>
|
|
91
91
|
<j-bind props="files">
|
|
92
92
|
<usa-file-input-preview part="preview" exportparts="heading, item">
|
|
@@ -95,7 +95,7 @@ declare global {
|
|
|
95
95
|
</j-bind>
|
|
96
96
|
</template>
|
|
97
97
|
|
|
98
|
-
<template else>
|
|
98
|
+
<template id="test" else>
|
|
99
99
|
<div class="box" part="input">
|
|
100
100
|
<slot name="description"> Drag file here or <usa-link>choose from folder</usa-link> </slot>
|
|
101
101
|
</div>
|
|
@@ -114,7 +114,7 @@ export class USAFileInputElement extends HTMLElement {
|
|
|
114
114
|
|
|
115
115
|
@attr()
|
|
116
116
|
@bind()
|
|
117
|
-
accessor multiple =
|
|
117
|
+
accessor multiple = false;
|
|
118
118
|
|
|
119
119
|
@attr()
|
|
120
120
|
@bind()
|
|
@@ -127,11 +127,6 @@ export class USAFileInputElement extends HTMLElement {
|
|
|
127
127
|
@bind()
|
|
128
128
|
accessor files: FileList | null = null;
|
|
129
129
|
|
|
130
|
-
@bind({
|
|
131
|
-
compute: (i) => !!i.files?.length,
|
|
132
|
-
})
|
|
133
|
-
accessor filesVisible = false;
|
|
134
|
-
|
|
135
130
|
#internals = this.attachInternals();
|
|
136
131
|
#input = query('input');
|
|
137
132
|
|
|
@@ -1,19 +1,31 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { html } from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components';
|
|
2
|
+
import { html } from 'lit';
|
|
3
3
|
|
|
4
|
-
import type { USAFileInputElement } from
|
|
4
|
+
import type { USAFileInputElement } from './file-input.element.js';
|
|
5
5
|
|
|
6
6
|
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
7
7
|
const meta = {
|
|
8
|
-
title:
|
|
9
|
-
tags: [
|
|
8
|
+
title: 'usa-file-input',
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
|
|
11
|
+
argTypes: {},
|
|
12
|
+
args: {},
|
|
13
|
+
} satisfies Meta<USAFileInputElement>;
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
type Story = StoryObj<USAFileInputElement>;
|
|
18
|
+
|
|
19
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
20
|
+
export const Single: Story = {
|
|
21
|
+
args: {},
|
|
10
22
|
render() {
|
|
11
23
|
function onSubmit(e: Event) {
|
|
12
24
|
e.preventDefault();
|
|
13
25
|
|
|
14
26
|
const data = new FormData(e.target as HTMLFormElement);
|
|
15
27
|
|
|
16
|
-
console.log(data.getAll(
|
|
28
|
+
console.log(data.getAll('upload'));
|
|
17
29
|
}
|
|
18
30
|
|
|
19
31
|
return html`
|
|
@@ -21,24 +33,36 @@ const meta = {
|
|
|
21
33
|
<usa-file-input name="upload" required>
|
|
22
34
|
Input accepts a single file
|
|
23
35
|
|
|
24
|
-
<div slot="description">
|
|
25
|
-
Drag file here or <usa-link>choose from folder</usa-link>
|
|
26
|
-
</div>
|
|
36
|
+
<div slot="description">Drag file here or <usa-link>choose from folder</usa-link></div>
|
|
27
37
|
</usa-file-input>
|
|
28
38
|
|
|
29
39
|
<usa-button type="submit">SUBMIT</usa-button>
|
|
30
40
|
</form>
|
|
31
41
|
`;
|
|
32
42
|
},
|
|
33
|
-
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const Multiple: Story = {
|
|
34
46
|
args: {},
|
|
35
|
-
|
|
47
|
+
render() {
|
|
48
|
+
function onSubmit(e: Event) {
|
|
49
|
+
e.preventDefault();
|
|
36
50
|
|
|
37
|
-
|
|
51
|
+
const data = new FormData(e.target as HTMLFormElement);
|
|
38
52
|
|
|
39
|
-
|
|
53
|
+
console.log(data.getAll('upload'));
|
|
54
|
+
}
|
|
40
55
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
56
|
+
return html`
|
|
57
|
+
<form @submit=${onSubmit}>
|
|
58
|
+
<usa-file-input name="upload" required multiple>
|
|
59
|
+
Input accepts multiple files
|
|
60
|
+
|
|
61
|
+
<div slot="description">Drag file here or <usa-link>choose from folder</usa-link></div>
|
|
62
|
+
</usa-file-input>
|
|
63
|
+
|
|
64
|
+
<usa-button type="submit">SUBMIT</usa-button>
|
|
65
|
+
</form>
|
|
66
|
+
`;
|
|
67
|
+
},
|
|
44
68
|
};
|
|
@@ -116,8 +116,12 @@ export class USATextareaElement extends HTMLElement {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
@listen('input')
|
|
119
|
-
onInputChange() {
|
|
119
|
+
onInputChange(e: Event) {
|
|
120
|
+
e.stopPropagation();
|
|
121
|
+
|
|
120
122
|
this.value = this.#input().value;
|
|
123
|
+
|
|
124
|
+
this.dispatchEvent(new Event('input', { bubbles: true }));
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
#syncFormState() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { html } from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components';
|
|
2
|
+
import { html } from 'lit';
|
|
3
3
|
|
|
4
|
-
import type { USATextareaElement } from
|
|
4
|
+
import type { USATextareaElement } from './textarea.element.js';
|
|
5
5
|
|
|
6
6
|
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
7
7
|
const meta = {
|
|
8
|
-
title:
|
|
9
|
-
tags: [
|
|
8
|
+
title: 'usa-textarea',
|
|
9
|
+
tags: ['autodocs'],
|
|
10
10
|
render(args) {
|
|
11
11
|
return html`<usa-textarea>Hello World</usa-textarea>`;
|
|
12
12
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
2
|
import { attr, css, element, html } from '@joist/element';
|
|
3
|
-
import { USA_ALERT_CONFIG } from './alert-types.js';
|
|
4
|
-
import { bind } from '@joist/templating';
|
|
5
3
|
import { observe } from '@joist/observable';
|
|
4
|
+
import { bind } from '@joist/templating';
|
|
5
|
+
import { USA_ALERT_CONFIG } from './alert-types.js';
|
|
6
6
|
let USAAlertElement = (() => {
|
|
7
7
|
let _classDecorators = [element({
|
|
8
8
|
tagName: 'usa-alert',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.element.js","sourceRoot":"","sources":["../../../src/lib/alert/alert.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"alert.element.js","sourceRoot":"","sources":["../../../src/lib/alert/alert.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAqB,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;IA4F1D,eAAe;4BAnF3B,OAAO,CAAC;YACP,OAAO,EAAE,WAAW;YACpB,aAAa,EAAE;gBACb,IAAI,EAAE,MAAM;gBACZ,cAAc,EAAE,IAAI;aACrB;YACD,SAAS,EAAE;gBACT,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuDF;gBACD,IAAI,CAAA;;;;;;;;;;;;;;;;;KAiBH;aACF;SACF,CAAC;;;;sBACmC,WAAW;;;;;;;+BAAnB,SAAQ,WAAW;;;;gCAC7C,IAAI,EAAE,EACN,OAAO,EAAE;gCAGT,IAAI,CAAC;oBACJ,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI;iBAC9C,CAAC;YAJF,iKAAS,IAAI,6BAAJ,IAAI,mFAAwB;YAKrC,iKAAS,IAAI,6BAAJ,IAAI,mFAAmB;YARlC,6KASC;;;YATY,uDAAe;;QAG1B,qEAA8B,MAAM,EAAC;QAArC,IAAS,IAAI,0CAAwB;QAArC,IAAS,IAAI,gDAAwB;QAKrC,wHAAyB,MAAM,GAAC;QAAhC,IAAS,IAAI,0CAAmB;QAAhC,IAAS,IAAI,gDAAmB;;;;;;;;SARrB,eAAe"}
|
|
@@ -12,7 +12,6 @@ export declare class USAFileInputElement extends HTMLElement {
|
|
|
12
12
|
accessor accept: string;
|
|
13
13
|
accessor required: boolean;
|
|
14
14
|
accessor files: FileList | null;
|
|
15
|
-
accessor filesVisible: boolean;
|
|
16
15
|
connectedCallback(): void;
|
|
17
16
|
syncFormValues(): void;
|
|
18
17
|
onInputChange(e: Event): void;
|
|
@@ -8,7 +8,7 @@ let USAFileInputElement = (() => {
|
|
|
8
8
|
tagName: 'usa-file-input',
|
|
9
9
|
shadowDom: [
|
|
10
10
|
css `*{box-sizing:border-box}:host{display:block;max-width:30rem;position:relative;margin-bottom:1.5rem}label{display:block}input{cursor:pointer;left:0;margin:0;max-width:none;position:absolute;text-indent:-999em;width:100%;z-index:1;bottom:0;top:0}input:focus{outline:.25rem solid #2491ff;outline-offset:0}label slot.label{font-size:1.06rem;line-height:1.3;display:block;font-weight:400;margin-bottom:.5rem}:host(.dragenter) .box{border-color:#2491ff}.box{border:1px dashed #adadad;border-radius:0;display:flex;font-size:.93rem;position:relative;text-align:center;width:100%;height:5.2rem;align-items:center;justify-content:center}.container{position:relative}`,
|
|
11
|
-
html `<label for="file-input"><slot class="label"></slot></label><div class="container"><j-bind props="name,multiple,accept,required"><input id="file-input" type="file" tabindex="0"></j-bind><j-if bind="
|
|
11
|
+
html `<label for="file-input"><slot class="label"></slot></label><div class="container"><j-bind props="name,multiple,accept,required"><input id="file-input" type="file" tabindex="0"></j-bind><j-if bind="files.length"><template><j-bind props="files"><usa-file-input-preview part="preview" exportparts="heading, item">Selected file <usa-link>Change file</usa-link></usa-file-input-preview></j-bind></template><template id="test" else><div class="box" part="input"><slot name="description">Drag file here or<usa-link>choose from folder</usa-link></slot></div></template></j-if></div>`,
|
|
12
12
|
],
|
|
13
13
|
})];
|
|
14
14
|
let _classDescriptor;
|
|
@@ -31,9 +31,6 @@ let USAFileInputElement = (() => {
|
|
|
31
31
|
let _files_decorators;
|
|
32
32
|
let _files_initializers = [];
|
|
33
33
|
let _files_extraInitializers = [];
|
|
34
|
-
let _filesVisible_decorators;
|
|
35
|
-
let _filesVisible_initializers = [];
|
|
36
|
-
let _filesVisible_extraInitializers = [];
|
|
37
34
|
let _syncFormValues_decorators;
|
|
38
35
|
let _onInputChange_decorators;
|
|
39
36
|
let _onDragEnter_decorators;
|
|
@@ -48,9 +45,6 @@ let USAFileInputElement = (() => {
|
|
|
48
45
|
_accept_decorators = [attr(), bind()];
|
|
49
46
|
_required_decorators = [attr(), bind()];
|
|
50
47
|
_files_decorators = [bind()];
|
|
51
|
-
_filesVisible_decorators = [bind({
|
|
52
|
-
compute: (i) => !!i.files?.length,
|
|
53
|
-
})];
|
|
54
48
|
_syncFormValues_decorators = [effect()];
|
|
55
49
|
_onInputChange_decorators = [listen('input')];
|
|
56
50
|
_onDragEnter_decorators = [listen('dragenter')];
|
|
@@ -61,7 +55,6 @@ let USAFileInputElement = (() => {
|
|
|
61
55
|
__esDecorate(this, null, _accept_decorators, { kind: "accessor", name: "accept", static: false, private: false, access: { has: obj => "accept" in obj, get: obj => obj.accept, set: (obj, value) => { obj.accept = value; } }, metadata: _metadata }, _accept_initializers, _accept_extraInitializers);
|
|
62
56
|
__esDecorate(this, null, _required_decorators, { kind: "accessor", name: "required", static: false, private: false, access: { has: obj => "required" in obj, get: obj => obj.required, set: (obj, value) => { obj.required = value; } }, metadata: _metadata }, _required_initializers, _required_extraInitializers);
|
|
63
57
|
__esDecorate(this, null, _files_decorators, { kind: "accessor", name: "files", static: false, private: false, access: { has: obj => "files" in obj, get: obj => obj.files, set: (obj, value) => { obj.files = value; } }, metadata: _metadata }, _files_initializers, _files_extraInitializers);
|
|
64
|
-
__esDecorate(this, null, _filesVisible_decorators, { kind: "accessor", name: "filesVisible", static: false, private: false, access: { has: obj => "filesVisible" in obj, get: obj => obj.filesVisible, set: (obj, value) => { obj.filesVisible = value; } }, metadata: _metadata }, _filesVisible_initializers, _filesVisible_extraInitializers);
|
|
65
58
|
__esDecorate(this, null, _syncFormValues_decorators, { kind: "method", name: "syncFormValues", static: false, private: false, access: { has: obj => "syncFormValues" in obj, get: obj => obj.syncFormValues }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
66
59
|
__esDecorate(this, null, _onInputChange_decorators, { kind: "method", name: "onInputChange", static: false, private: false, access: { has: obj => "onInputChange" in obj, get: obj => obj.onInputChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
67
60
|
__esDecorate(this, null, _onDragEnter_decorators, { kind: "method", name: "onDragEnter", static: false, private: false, access: { has: obj => "onDragEnter" in obj, get: obj => obj.onDragEnter }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
@@ -75,7 +68,7 @@ let USAFileInputElement = (() => {
|
|
|
75
68
|
#name_accessor_storage = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _name_initializers, ''));
|
|
76
69
|
get name() { return this.#name_accessor_storage; }
|
|
77
70
|
set name(value) { this.#name_accessor_storage = value; }
|
|
78
|
-
#multiple_accessor_storage = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _multiple_initializers,
|
|
71
|
+
#multiple_accessor_storage = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _multiple_initializers, false));
|
|
79
72
|
get multiple() { return this.#multiple_accessor_storage; }
|
|
80
73
|
set multiple(value) { this.#multiple_accessor_storage = value; }
|
|
81
74
|
#accept_accessor_storage = (__runInitializers(this, _multiple_extraInitializers), __runInitializers(this, _accept_initializers, ''));
|
|
@@ -87,10 +80,7 @@ let USAFileInputElement = (() => {
|
|
|
87
80
|
#files_accessor_storage = (__runInitializers(this, _required_extraInitializers), __runInitializers(this, _files_initializers, null));
|
|
88
81
|
get files() { return this.#files_accessor_storage; }
|
|
89
82
|
set files(value) { this.#files_accessor_storage = value; }
|
|
90
|
-
#
|
|
91
|
-
get filesVisible() { return this.#filesVisible_accessor_storage; }
|
|
92
|
-
set filesVisible(value) { this.#filesVisible_accessor_storage = value; }
|
|
93
|
-
#internals = (__runInitializers(this, _filesVisible_extraInitializers), this.attachInternals());
|
|
83
|
+
#internals = (__runInitializers(this, _files_extraInitializers), this.attachInternals());
|
|
94
84
|
#input = query('input');
|
|
95
85
|
connectedCallback() {
|
|
96
86
|
this.syncFormValues();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-input.element.js","sourceRoot":"","sources":["../../../src/lib/file-input/file-input.element.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;IAuG5B,mBAAmB;4BA/F/B,OAAO,CAAC;YACP,OAAO,EAAE,gBAAgB;YACzB,SAAS,EAAE;gBACT,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8DF;gBACD,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;KA0BH;aACF;SACF,CAAC;;;;sBACuC,WAAW
|
|
1
|
+
{"version":3,"file":"file-input.element.js","sourceRoot":"","sources":["../../../src/lib/file-input/file-input.element.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;IAuG5B,mBAAmB;4BA/F/B,OAAO,CA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IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC5D,CAAC;QAGD,WAAW;YACT,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAClC,CAAC;QAGD,WAAW;YACT,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACrC,CAAC;QAGD,MAAM,CAAC,CAAY;YACjB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YAEnC,IAAI,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC;gBAC1B,CAAC,CAAC,cAAc,EAAE,CAAC;gBAEnB,MAAM,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;gBAEhC,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;oBACxC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;wBACzB,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;wBAE9B,IAAI,IAAI,EAAE,CAAC;4BACT,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;wBACvB,CAAC;oBACH,CAAC;gBACH,CAAC;gBAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YAC1B,CAAC;QACH,CAAC;;YA5FU,uDAAmB;;;;;SAAnB,mBAAmB"}
|
|
@@ -35,7 +35,6 @@ describe('usa-file-input', () => {
|
|
|
35
35
|
// Wait for effects to resolve
|
|
36
36
|
await Promise.resolve();
|
|
37
37
|
// Verify that filesVisible is true and files are set
|
|
38
|
-
assert.isTrue(fileInput.filesVisible);
|
|
39
38
|
assert.equal(fileInput.files?.length, 1);
|
|
40
39
|
assert.equal(fileInput.files?.[0].name, 'test.txt');
|
|
41
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-input.element.test.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YAClB,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;QAEH,WAAW,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAErC,8BAA8B;QAC9B,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;QAExB,qDAAqD;QACrD,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACzC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { StoryObj } from
|
|
2
|
-
import type { USAFileInputElement } from
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import type { USAFileInputElement } from './file-input.element.js';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
tags: string[];
|
|
6
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
7
6
|
argTypes: {};
|
|
8
7
|
args: {};
|
|
9
8
|
};
|
|
10
9
|
export default meta;
|
|
11
10
|
type Story = StoryObj<USAFileInputElement>;
|
|
12
|
-
export declare const
|
|
11
|
+
export declare const Single: Story;
|
|
12
|
+
export declare const Multiple: Story;
|
|
@@ -1,22 +1,33 @@
|
|
|
1
|
-
import { html } from
|
|
1
|
+
import { html } from 'lit';
|
|
2
2
|
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
3
3
|
const meta = {
|
|
4
|
-
title:
|
|
5
|
-
tags: [
|
|
4
|
+
title: 'usa-file-input',
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
argTypes: {},
|
|
7
|
+
args: {},
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
11
|
+
export const Single = {
|
|
12
|
+
args: {},
|
|
6
13
|
render() {
|
|
7
14
|
function onSubmit(e) {
|
|
8
15
|
e.preventDefault();
|
|
9
16
|
const data = new FormData(e.target);
|
|
10
|
-
console.log(data.getAll(
|
|
17
|
+
console.log(data.getAll('upload'));
|
|
11
18
|
}
|
|
12
19
|
return html `<form @submit="${onSubmit}"><usa-file-input name="upload" required>Input accepts a single file<div slot="description">Drag file here or<usa-link>choose from folder</usa-link></div></usa-file-input><usa-button type="submit">SUBMIT</usa-button></form>`;
|
|
13
20
|
},
|
|
14
|
-
argTypes: {},
|
|
15
|
-
args: {},
|
|
16
21
|
};
|
|
17
|
-
export
|
|
18
|
-
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
19
|
-
export const Primary = {
|
|
22
|
+
export const Multiple = {
|
|
20
23
|
args: {},
|
|
24
|
+
render() {
|
|
25
|
+
function onSubmit(e) {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
const data = new FormData(e.target);
|
|
28
|
+
console.log(data.getAll('upload'));
|
|
29
|
+
}
|
|
30
|
+
return html `<form @submit="${onSubmit}"><usa-file-input name="upload" required multiple="multiple">Input accepts multiple files<div slot="description">Drag file here or<usa-link>choose from folder</usa-link></div></usa-file-input><usa-button type="submit">SUBMIT</usa-button></form>`;
|
|
31
|
+
},
|
|
21
32
|
};
|
|
22
33
|
//# sourceMappingURL=file-input.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-input.stories.js","sourceRoot":"","sources":["../../../src/lib/file-input/file-input.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAI3B,kFAAkF;AAClF,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"file-input.stories.js","sourceRoot":"","sources":["../../../src/lib/file-input/file-input.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAI3B,kFAAkF;AAClF,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,EAAE;CAC2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAIpB,wFAAwF;AACxF,MAAM,CAAC,MAAM,MAAM,GAAU;IAC3B,IAAI,EAAE,EAAE;IACR,MAAM;QACJ,SAAS,QAAQ,CAAC,CAAQ;YACxB,CAAC,CAAC,cAAc,EAAE,CAAC;YAEnB,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC,MAAyB,CAAC,CAAC;YAEvD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,IAAI,CAAA;sBACO,QAAQ;;;;;;;;;KASzB,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,MAAM;QACJ,SAAS,QAAQ,CAAC,CAAQ;YACxB,CAAC,CAAC,cAAc,EAAE,CAAC;YAEnB,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC,MAAyB,CAAC,CAAC;YAEvD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,IAAI,CAAA;sBACO,QAAQ;;;;;;;;;KASzB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -89,8 +89,10 @@ let USATextareaElement = (() => {
|
|
|
89
89
|
onChange() {
|
|
90
90
|
this.#syncFormState();
|
|
91
91
|
}
|
|
92
|
-
onInputChange() {
|
|
92
|
+
onInputChange(e) {
|
|
93
|
+
e.stopPropagation();
|
|
93
94
|
this.value = this.#input().value;
|
|
95
|
+
this.dispatchEvent(new Event('input', { bubbles: true }));
|
|
94
96
|
}
|
|
95
97
|
#syncFormState() {
|
|
96
98
|
const input = this.#input();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.element.js","sourceRoot":"","sources":["../../../src/lib/textarea/textarea.element.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;IAwE5B,kBAAkB;4BAhE9B,OAAO,CAAC;YACP,OAAO,EAAE,cAAc;YACvB,SAAS,EAAE;gBACT,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+CF;gBACD,IAAI,CAAA;;;;;;;;;;KAUH;aACF;SACF,CAAC;;;;sBACsC,WAAW;;;;;;;;;;;;;;;;;;;;;;kCAAnB,SAAQ,WAAW;;;;gCAGhD,IAAI,EAAE,EACN,IAAI,EAAE;wCAGN,IAAI,EAAE,EACN,IAAI,EAAE;uCAGN,IAAI,EAAE,EACN,IAAI,EAAE;oCAGN,IAAI,EAAE,EACN,IAAI,EAAE;qCAGN,IAAI,EAAE,EACN,IAAI,EAAE;iCAGN,IAAI,CAAC;oBACJ,OAAO,EAAE,KAAK;iBACf,CAAC,EACD,IAAI,EAAE;oCAUN,MAAM,EAAE;yCAKR,MAAM,CAAC,OAAO,CAAC;YApChB,iKAAS,IAAI,6BAAJ,IAAI,mFAAM;YAInB,yLAAS,YAAY,6BAAZ,YAAY,mGAAkB;YAIvC,sLAAS,WAAW,6BAAX,WAAW,iGAAM;YAI1B,6KAAS,QAAQ,6BAAR,QAAQ,2FAAS;YAI1B,gLAAS,SAAS,6BAAT,SAAS,6FAAS;Y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C,KAAK,CAAC,CAAC;YACzC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YAEhC,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;gBAC5B,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;YACrF,CAAC;QACH,CAAC;;YA3DU,uDAAkB;;;;;SAAlB,kBAAkB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { StoryObj } from
|
|
2
|
-
import type { USATextareaElement } from
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import type { USATextareaElement } from './textarea.element.js';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
tags: string[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { html } from
|
|
1
|
+
import { html } from 'lit';
|
|
2
2
|
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
3
3
|
const meta = {
|
|
4
|
-
title:
|
|
5
|
-
tags: [
|
|
4
|
+
title: 'usa-textarea',
|
|
5
|
+
tags: ['autodocs'],
|
|
6
6
|
render(args) {
|
|
7
7
|
return html `<usa-textarea>Hello World</usa-textarea>`;
|
|
8
8
|
},
|