@phcdevworks/spectre-components 0.0.1 → 1.1.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/README.md +113 -40
- package/dist/base-2rD8EmdC.d.cts +32 -0
- package/dist/base-2rD8EmdC.d.ts +32 -0
- package/dist/button.cjs +295 -170
- package/dist/button.cjs.map +1 -1
- package/dist/button.d.cts +30 -61
- package/dist/button.d.ts +30 -61
- package/dist/button.js +296 -171
- package/dist/button.js.map +1 -1
- package/dist/checkbox.cjs +286 -71
- package/dist/checkbox.cjs.map +1 -1
- package/dist/checkbox.d.cts +38 -43
- package/dist/checkbox.d.ts +38 -43
- package/dist/checkbox.js +287 -72
- package/dist/checkbox.js.map +1 -1
- package/dist/fieldset.cjs +233 -88
- package/dist/fieldset.cjs.map +1 -1
- package/dist/fieldset.d.cts +23 -40
- package/dist/fieldset.d.ts +23 -40
- package/dist/fieldset.js +233 -88
- package/dist/fieldset.js.map +1 -1
- package/dist/form-iI7vV-3W.d.cts +6 -0
- package/dist/form-iI7vV-3W.d.ts +6 -0
- package/dist/index.cjs +564 -1029
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +566 -1030
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +232 -119
- package/dist/input.cjs.map +1 -1
- package/dist/input.d.cts +52 -68
- package/dist/input.d.ts +52 -68
- package/dist/input.js +232 -119
- package/dist/input.js.map +1 -1
- package/dist/label.cjs +232 -73
- package/dist/label.cjs.map +1 -1
- package/dist/label.d.cts +13 -22
- package/dist/label.d.ts +13 -22
- package/dist/label.js +232 -73
- package/dist/label.js.map +1 -1
- package/dist/projectable-BzDQ4xp_.d.cts +17 -0
- package/dist/projectable-s3SgvjGX.d.ts +17 -0
- package/dist/radio.cjs +286 -71
- package/dist/radio.cjs.map +1 -1
- package/dist/radio.d.cts +38 -43
- package/dist/radio.d.ts +38 -43
- package/dist/radio.js +287 -72
- package/dist/radio.js.map +1 -1
- package/dist/select.cjs +292 -163
- package/dist/select.cjs.map +1 -1
- package/dist/select.d.cts +35 -58
- package/dist/select.d.ts +35 -58
- package/dist/select.js +293 -163
- package/dist/select.js.map +1 -1
- package/dist/textarea.cjs +191 -290
- package/dist/textarea.cjs.map +1 -1
- package/dist/textarea.d.cts +41 -58
- package/dist/textarea.d.ts +41 -58
- package/dist/textarea.js +191 -290
- package/dist/textarea.js.map +1 -1
- package/package.json +13 -12
package/dist/input.d.cts
CHANGED
|
@@ -1,50 +1,42 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
|
-
import {
|
|
2
|
+
import { S as SpectreBaseElement } from './base-2rD8EmdC.cjs';
|
|
3
|
+
import { S as SpectreInputSize, a as SpectreInputType } from './form-iI7vV-3W.cjs';
|
|
4
|
+
export { s as spectreInputSizes, b as spectreInputTypes } from './form-iI7vV-3W.cjs';
|
|
5
|
+
import 'lit';
|
|
3
6
|
|
|
4
|
-
declare const spectreInputTypes: readonly ["text", "email", "password", "search", "tel", "url", "number", "date", "datetime-local", "month", "time", "week"];
|
|
5
|
-
declare const spectreInputSizes: readonly ["sm", "md", "lg"];
|
|
6
|
-
type SpectreInputType = (typeof spectreInputTypes)[number];
|
|
7
|
-
type SpectreInputSize = (typeof spectreInputSizes)[number];
|
|
8
7
|
interface SpectreInputProps {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
ariaLabel: string | null;
|
|
9
|
+
ariaLabelledBy: string | null;
|
|
10
|
+
ariaDescribedBy: string | null;
|
|
11
|
+
autocomplete?: string | undefined;
|
|
12
|
+
autofocus?: boolean | undefined;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
14
|
+
form?: string | undefined;
|
|
15
|
+
fullWidth?: boolean | undefined;
|
|
16
|
+
inputmode?: string | undefined;
|
|
17
|
+
invalid?: boolean | undefined;
|
|
18
|
+
loading?: boolean | undefined;
|
|
19
|
+
max?: string | undefined;
|
|
17
20
|
maxlength?: number | undefined;
|
|
18
|
-
min?: string;
|
|
21
|
+
min?: string | undefined;
|
|
19
22
|
minlength?: number | undefined;
|
|
20
|
-
name?: string;
|
|
21
|
-
pill?: boolean;
|
|
22
|
-
placeholder?: string;
|
|
23
|
-
readonly?: boolean;
|
|
24
|
-
required?: boolean;
|
|
25
|
-
size?: SpectreInputSize;
|
|
26
|
-
step?: string;
|
|
27
|
-
success?: boolean;
|
|
28
|
-
title?: string;
|
|
29
|
-
type?: SpectreInputType;
|
|
30
|
-
value?: string;
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
pill?: boolean | undefined;
|
|
25
|
+
placeholder?: string | undefined;
|
|
26
|
+
readonly?: boolean | undefined;
|
|
27
|
+
required?: boolean | undefined;
|
|
28
|
+
size?: SpectreInputSize | undefined;
|
|
29
|
+
step?: string | undefined;
|
|
30
|
+
success?: boolean | undefined;
|
|
31
|
+
title?: string | undefined;
|
|
32
|
+
type?: SpectreInputType | undefined;
|
|
33
|
+
value?: string | undefined;
|
|
31
34
|
}
|
|
32
|
-
declare class SpectreInputElement extends
|
|
35
|
+
declare class SpectreInputElement extends SpectreBaseElement implements SpectreInputProps {
|
|
33
36
|
static properties: {
|
|
34
|
-
ariaLabel: {
|
|
35
|
-
attribute: string;
|
|
36
|
-
type: StringConstructor;
|
|
37
|
-
};
|
|
38
|
-
ariaLabelledBy: {
|
|
39
|
-
attribute: string;
|
|
40
|
-
type: StringConstructor;
|
|
41
|
-
};
|
|
42
|
-
ariaDescribedBy: {
|
|
43
|
-
attribute: string;
|
|
44
|
-
type: StringConstructor;
|
|
45
|
-
};
|
|
46
37
|
autocomplete: {
|
|
47
38
|
type: StringConstructor;
|
|
39
|
+
reflect: boolean;
|
|
48
40
|
};
|
|
49
41
|
autofocus: {
|
|
50
42
|
type: BooleanConstructor;
|
|
@@ -54,6 +46,9 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
54
46
|
type: BooleanConstructor;
|
|
55
47
|
reflect: boolean;
|
|
56
48
|
};
|
|
49
|
+
form: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
};
|
|
57
52
|
fullWidth: {
|
|
58
53
|
attribute: string;
|
|
59
54
|
type: BooleanConstructor;
|
|
@@ -61,6 +56,7 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
61
56
|
};
|
|
62
57
|
inputmode: {
|
|
63
58
|
type: StringConstructor;
|
|
59
|
+
reflect: boolean;
|
|
64
60
|
};
|
|
65
61
|
invalid: {
|
|
66
62
|
type: BooleanConstructor;
|
|
@@ -72,18 +68,23 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
72
68
|
};
|
|
73
69
|
max: {
|
|
74
70
|
type: StringConstructor;
|
|
71
|
+
reflect: boolean;
|
|
75
72
|
};
|
|
76
73
|
maxlength: {
|
|
77
74
|
type: NumberConstructor;
|
|
75
|
+
reflect: boolean;
|
|
78
76
|
};
|
|
79
77
|
min: {
|
|
80
78
|
type: StringConstructor;
|
|
79
|
+
reflect: boolean;
|
|
81
80
|
};
|
|
82
81
|
minlength: {
|
|
83
82
|
type: NumberConstructor;
|
|
83
|
+
reflect: boolean;
|
|
84
84
|
};
|
|
85
85
|
name: {
|
|
86
86
|
type: StringConstructor;
|
|
87
|
+
reflect: boolean;
|
|
87
88
|
};
|
|
88
89
|
pill: {
|
|
89
90
|
type: BooleanConstructor;
|
|
@@ -91,6 +92,7 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
91
92
|
};
|
|
92
93
|
placeholder: {
|
|
93
94
|
type: StringConstructor;
|
|
95
|
+
reflect: boolean;
|
|
94
96
|
};
|
|
95
97
|
readonly: {
|
|
96
98
|
type: BooleanConstructor;
|
|
@@ -106,15 +108,12 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
106
108
|
};
|
|
107
109
|
step: {
|
|
108
110
|
type: StringConstructor;
|
|
111
|
+
reflect: boolean;
|
|
109
112
|
};
|
|
110
113
|
success: {
|
|
111
114
|
type: BooleanConstructor;
|
|
112
115
|
reflect: boolean;
|
|
113
116
|
};
|
|
114
|
-
title: {
|
|
115
|
-
type: StringConstructor;
|
|
116
|
-
reflect: boolean;
|
|
117
|
-
};
|
|
118
117
|
type: {
|
|
119
118
|
type: StringConstructor;
|
|
120
119
|
reflect: boolean;
|
|
@@ -123,47 +122,32 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
123
122
|
type: StringConstructor;
|
|
124
123
|
};
|
|
125
124
|
};
|
|
126
|
-
|
|
127
|
-
ariaLabelledBy: string | null;
|
|
128
|
-
ariaDescribedBy: string | null;
|
|
129
|
-
autocomplete?: string;
|
|
125
|
+
autocomplete: string | undefined;
|
|
130
126
|
autofocus: boolean;
|
|
131
127
|
disabled: boolean;
|
|
128
|
+
form: string | undefined;
|
|
132
129
|
fullWidth: boolean;
|
|
133
|
-
inputmode
|
|
130
|
+
inputmode: string | undefined;
|
|
134
131
|
invalid: boolean;
|
|
135
132
|
loading: boolean;
|
|
136
|
-
max
|
|
137
|
-
maxlength
|
|
138
|
-
min
|
|
139
|
-
minlength
|
|
140
|
-
name
|
|
133
|
+
max: string | undefined;
|
|
134
|
+
maxlength: number | undefined;
|
|
135
|
+
min: string | undefined;
|
|
136
|
+
minlength: number | undefined;
|
|
137
|
+
name: string | undefined;
|
|
141
138
|
pill: boolean;
|
|
142
|
-
placeholder
|
|
139
|
+
placeholder: string | undefined;
|
|
143
140
|
readonly: boolean;
|
|
144
141
|
required: boolean;
|
|
145
142
|
size: SpectreInputSize;
|
|
146
|
-
step
|
|
143
|
+
step: string | undefined;
|
|
147
144
|
success: boolean;
|
|
148
|
-
title: string;
|
|
149
145
|
type: SpectreInputType;
|
|
150
146
|
value: string;
|
|
151
|
-
private _id?;
|
|
152
|
-
get id(): string;
|
|
153
|
-
set id(value: string);
|
|
154
|
-
createRenderRoot(): this;
|
|
155
|
-
connectedCallback(): void;
|
|
156
|
-
getAttribute(qualifiedName: string): string | null;
|
|
157
|
-
hasAttribute(qualifiedName: string): boolean;
|
|
158
|
-
setAttribute(qualifiedName: string, value: string): void;
|
|
159
|
-
removeAttribute(qualifiedName: string): void;
|
|
160
147
|
protected willUpdate(changedProperties: Map<PropertyKey, unknown>): void;
|
|
161
148
|
private get inputClasses();
|
|
162
149
|
private get isDisabled();
|
|
163
150
|
private get nativeInput();
|
|
164
|
-
private get forwardedAriaLabel();
|
|
165
|
-
private get forwardedAriaLabelledBy();
|
|
166
|
-
private get forwardedAriaDescribedBy();
|
|
167
151
|
private handleInput;
|
|
168
152
|
private handleChange;
|
|
169
153
|
focus(options?: FocusOptions): void;
|
|
@@ -172,4 +156,4 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
172
156
|
}
|
|
173
157
|
declare function defineSpectreInput(tagName?: string): typeof SpectreInputElement;
|
|
174
158
|
|
|
175
|
-
export { SpectreInputElement, type SpectreInputProps,
|
|
159
|
+
export { SpectreInputElement, type SpectreInputProps, SpectreInputSize, SpectreInputType, defineSpectreInput };
|
package/dist/input.d.ts
CHANGED
|
@@ -1,50 +1,42 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
|
-
import {
|
|
2
|
+
import { S as SpectreBaseElement } from './base-2rD8EmdC.js';
|
|
3
|
+
import { S as SpectreInputSize, a as SpectreInputType } from './form-iI7vV-3W.js';
|
|
4
|
+
export { s as spectreInputSizes, b as spectreInputTypes } from './form-iI7vV-3W.js';
|
|
5
|
+
import 'lit';
|
|
3
6
|
|
|
4
|
-
declare const spectreInputTypes: readonly ["text", "email", "password", "search", "tel", "url", "number", "date", "datetime-local", "month", "time", "week"];
|
|
5
|
-
declare const spectreInputSizes: readonly ["sm", "md", "lg"];
|
|
6
|
-
type SpectreInputType = (typeof spectreInputTypes)[number];
|
|
7
|
-
type SpectreInputSize = (typeof spectreInputSizes)[number];
|
|
8
7
|
interface SpectreInputProps {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
ariaLabel: string | null;
|
|
9
|
+
ariaLabelledBy: string | null;
|
|
10
|
+
ariaDescribedBy: string | null;
|
|
11
|
+
autocomplete?: string | undefined;
|
|
12
|
+
autofocus?: boolean | undefined;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
14
|
+
form?: string | undefined;
|
|
15
|
+
fullWidth?: boolean | undefined;
|
|
16
|
+
inputmode?: string | undefined;
|
|
17
|
+
invalid?: boolean | undefined;
|
|
18
|
+
loading?: boolean | undefined;
|
|
19
|
+
max?: string | undefined;
|
|
17
20
|
maxlength?: number | undefined;
|
|
18
|
-
min?: string;
|
|
21
|
+
min?: string | undefined;
|
|
19
22
|
minlength?: number | undefined;
|
|
20
|
-
name?: string;
|
|
21
|
-
pill?: boolean;
|
|
22
|
-
placeholder?: string;
|
|
23
|
-
readonly?: boolean;
|
|
24
|
-
required?: boolean;
|
|
25
|
-
size?: SpectreInputSize;
|
|
26
|
-
step?: string;
|
|
27
|
-
success?: boolean;
|
|
28
|
-
title?: string;
|
|
29
|
-
type?: SpectreInputType;
|
|
30
|
-
value?: string;
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
pill?: boolean | undefined;
|
|
25
|
+
placeholder?: string | undefined;
|
|
26
|
+
readonly?: boolean | undefined;
|
|
27
|
+
required?: boolean | undefined;
|
|
28
|
+
size?: SpectreInputSize | undefined;
|
|
29
|
+
step?: string | undefined;
|
|
30
|
+
success?: boolean | undefined;
|
|
31
|
+
title?: string | undefined;
|
|
32
|
+
type?: SpectreInputType | undefined;
|
|
33
|
+
value?: string | undefined;
|
|
31
34
|
}
|
|
32
|
-
declare class SpectreInputElement extends
|
|
35
|
+
declare class SpectreInputElement extends SpectreBaseElement implements SpectreInputProps {
|
|
33
36
|
static properties: {
|
|
34
|
-
ariaLabel: {
|
|
35
|
-
attribute: string;
|
|
36
|
-
type: StringConstructor;
|
|
37
|
-
};
|
|
38
|
-
ariaLabelledBy: {
|
|
39
|
-
attribute: string;
|
|
40
|
-
type: StringConstructor;
|
|
41
|
-
};
|
|
42
|
-
ariaDescribedBy: {
|
|
43
|
-
attribute: string;
|
|
44
|
-
type: StringConstructor;
|
|
45
|
-
};
|
|
46
37
|
autocomplete: {
|
|
47
38
|
type: StringConstructor;
|
|
39
|
+
reflect: boolean;
|
|
48
40
|
};
|
|
49
41
|
autofocus: {
|
|
50
42
|
type: BooleanConstructor;
|
|
@@ -54,6 +46,9 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
54
46
|
type: BooleanConstructor;
|
|
55
47
|
reflect: boolean;
|
|
56
48
|
};
|
|
49
|
+
form: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
};
|
|
57
52
|
fullWidth: {
|
|
58
53
|
attribute: string;
|
|
59
54
|
type: BooleanConstructor;
|
|
@@ -61,6 +56,7 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
61
56
|
};
|
|
62
57
|
inputmode: {
|
|
63
58
|
type: StringConstructor;
|
|
59
|
+
reflect: boolean;
|
|
64
60
|
};
|
|
65
61
|
invalid: {
|
|
66
62
|
type: BooleanConstructor;
|
|
@@ -72,18 +68,23 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
72
68
|
};
|
|
73
69
|
max: {
|
|
74
70
|
type: StringConstructor;
|
|
71
|
+
reflect: boolean;
|
|
75
72
|
};
|
|
76
73
|
maxlength: {
|
|
77
74
|
type: NumberConstructor;
|
|
75
|
+
reflect: boolean;
|
|
78
76
|
};
|
|
79
77
|
min: {
|
|
80
78
|
type: StringConstructor;
|
|
79
|
+
reflect: boolean;
|
|
81
80
|
};
|
|
82
81
|
minlength: {
|
|
83
82
|
type: NumberConstructor;
|
|
83
|
+
reflect: boolean;
|
|
84
84
|
};
|
|
85
85
|
name: {
|
|
86
86
|
type: StringConstructor;
|
|
87
|
+
reflect: boolean;
|
|
87
88
|
};
|
|
88
89
|
pill: {
|
|
89
90
|
type: BooleanConstructor;
|
|
@@ -91,6 +92,7 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
91
92
|
};
|
|
92
93
|
placeholder: {
|
|
93
94
|
type: StringConstructor;
|
|
95
|
+
reflect: boolean;
|
|
94
96
|
};
|
|
95
97
|
readonly: {
|
|
96
98
|
type: BooleanConstructor;
|
|
@@ -106,15 +108,12 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
106
108
|
};
|
|
107
109
|
step: {
|
|
108
110
|
type: StringConstructor;
|
|
111
|
+
reflect: boolean;
|
|
109
112
|
};
|
|
110
113
|
success: {
|
|
111
114
|
type: BooleanConstructor;
|
|
112
115
|
reflect: boolean;
|
|
113
116
|
};
|
|
114
|
-
title: {
|
|
115
|
-
type: StringConstructor;
|
|
116
|
-
reflect: boolean;
|
|
117
|
-
};
|
|
118
117
|
type: {
|
|
119
118
|
type: StringConstructor;
|
|
120
119
|
reflect: boolean;
|
|
@@ -123,47 +122,32 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
123
122
|
type: StringConstructor;
|
|
124
123
|
};
|
|
125
124
|
};
|
|
126
|
-
|
|
127
|
-
ariaLabelledBy: string | null;
|
|
128
|
-
ariaDescribedBy: string | null;
|
|
129
|
-
autocomplete?: string;
|
|
125
|
+
autocomplete: string | undefined;
|
|
130
126
|
autofocus: boolean;
|
|
131
127
|
disabled: boolean;
|
|
128
|
+
form: string | undefined;
|
|
132
129
|
fullWidth: boolean;
|
|
133
|
-
inputmode
|
|
130
|
+
inputmode: string | undefined;
|
|
134
131
|
invalid: boolean;
|
|
135
132
|
loading: boolean;
|
|
136
|
-
max
|
|
137
|
-
maxlength
|
|
138
|
-
min
|
|
139
|
-
minlength
|
|
140
|
-
name
|
|
133
|
+
max: string | undefined;
|
|
134
|
+
maxlength: number | undefined;
|
|
135
|
+
min: string | undefined;
|
|
136
|
+
minlength: number | undefined;
|
|
137
|
+
name: string | undefined;
|
|
141
138
|
pill: boolean;
|
|
142
|
-
placeholder
|
|
139
|
+
placeholder: string | undefined;
|
|
143
140
|
readonly: boolean;
|
|
144
141
|
required: boolean;
|
|
145
142
|
size: SpectreInputSize;
|
|
146
|
-
step
|
|
143
|
+
step: string | undefined;
|
|
147
144
|
success: boolean;
|
|
148
|
-
title: string;
|
|
149
145
|
type: SpectreInputType;
|
|
150
146
|
value: string;
|
|
151
|
-
private _id?;
|
|
152
|
-
get id(): string;
|
|
153
|
-
set id(value: string);
|
|
154
|
-
createRenderRoot(): this;
|
|
155
|
-
connectedCallback(): void;
|
|
156
|
-
getAttribute(qualifiedName: string): string | null;
|
|
157
|
-
hasAttribute(qualifiedName: string): boolean;
|
|
158
|
-
setAttribute(qualifiedName: string, value: string): void;
|
|
159
|
-
removeAttribute(qualifiedName: string): void;
|
|
160
147
|
protected willUpdate(changedProperties: Map<PropertyKey, unknown>): void;
|
|
161
148
|
private get inputClasses();
|
|
162
149
|
private get isDisabled();
|
|
163
150
|
private get nativeInput();
|
|
164
|
-
private get forwardedAriaLabel();
|
|
165
|
-
private get forwardedAriaLabelledBy();
|
|
166
|
-
private get forwardedAriaDescribedBy();
|
|
167
151
|
private handleInput;
|
|
168
152
|
private handleChange;
|
|
169
153
|
focus(options?: FocusOptions): void;
|
|
@@ -172,4 +156,4 @@ declare class SpectreInputElement extends LitElement implements SpectreInputProp
|
|
|
172
156
|
}
|
|
173
157
|
declare function defineSpectreInput(tagName?: string): typeof SpectreInputElement;
|
|
174
158
|
|
|
175
|
-
export { SpectreInputElement, type SpectreInputProps,
|
|
159
|
+
export { SpectreInputElement, type SpectreInputProps, SpectreInputSize, SpectreInputType, defineSpectreInput };
|