@spectrum-web-components/action-button 1.9.0 → 1.9.1-nightly.20251028214328
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/CHANGELOG.md +660 -0
- package/package.json +75 -75
- package/custom-elements.json +0 -346
- package/sp-action-button.d.ts +0 -17
- package/sp-action-button.dev.js +0 -5
- package/sp-action-button.dev.js.map +0 -7
- package/sp-action-button.js +0 -2
- package/sp-action-button.js.map +0 -7
- package/src/ActionButton.d.ts +0 -78
- package/src/ActionButton.dev.js +0 -223
- package/src/ActionButton.dev.js.map +0 -7
- package/src/ActionButton.js +0 -6
- package/src/ActionButton.js.map +0 -7
- package/src/action-button-overrides.css.d.ts +0 -2
- package/src/action-button-overrides.css.dev.js +0 -7
- package/src/action-button-overrides.css.dev.js.map +0 -7
- package/src/action-button-overrides.css.js +0 -4
- package/src/action-button-overrides.css.js.map +0 -7
- package/src/action-button.css.d.ts +0 -2
- package/src/action-button.css.dev.js +0 -7
- package/src/action-button.css.dev.js.map +0 -7
- package/src/action-button.css.js +0 -4
- package/src/action-button.css.js.map +0 -7
- package/src/index.d.ts +0 -12
- package/src/index.dev.js +0 -3
- package/src/index.dev.js.map +0 -7
- package/src/index.js +0 -2
- package/src/index.js.map +0 -7
- package/src/spectrum-action-button.css.d.ts +0 -2
- package/src/spectrum-action-button.css.dev.js +0 -7
- package/src/spectrum-action-button.css.dev.js.map +0 -7
- package/src/spectrum-action-button.css.js +0 -4
- package/src/spectrum-action-button.css.js.map +0 -7
package/package.json
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
"name": "@spectrum-web-components/action-button",
|
|
3
|
+
"version": "1.9.1-nightly.20251028214328",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"description": "",
|
|
8
|
+
"license": "Apache-2.0",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/adobe/spectrum-web-components.git",
|
|
12
|
+
"directory": "1st-gen/packages/action-button"
|
|
13
|
+
},
|
|
14
|
+
"author": "Adobe",
|
|
15
|
+
"homepage": "https://opensource.adobe.com/spectrum-web-components/components/action-button",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/adobe/spectrum-web-components/issues"
|
|
18
|
+
},
|
|
19
|
+
"main": "./src/index.js",
|
|
20
|
+
"module": "./src/index.js",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"development": "./src/index.dev.js",
|
|
25
|
+
"default": "./src/index.js"
|
|
6
26
|
},
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"url": "https://github.com/adobe/spectrum-web-components.git",
|
|
12
|
-
"directory": "packages/action-button"
|
|
27
|
+
"./package.json": "./package.json",
|
|
28
|
+
"./src/ActionButton.js": {
|
|
29
|
+
"development": "./src/ActionButton.dev.js",
|
|
30
|
+
"default": "./src/ActionButton.js"
|
|
13
31
|
},
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
32
|
+
"./src/action-button-overrides.css.js": "./src/action-button-overrides.css.js",
|
|
33
|
+
"./src/action-button.css.js": "./src/action-button.css.js",
|
|
34
|
+
"./src/index.js": {
|
|
35
|
+
"development": "./src/index.dev.js",
|
|
36
|
+
"default": "./src/index.js"
|
|
18
37
|
},
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"lit-element",
|
|
62
|
-
"lit-html",
|
|
63
|
-
"component",
|
|
64
|
-
"css"
|
|
65
|
-
],
|
|
66
|
-
"dependencies": {
|
|
67
|
-
"@spectrum-web-components/base": "1.9.0",
|
|
68
|
-
"@spectrum-web-components/button": "1.9.0",
|
|
69
|
-
"@spectrum-web-components/icon": "1.9.0",
|
|
70
|
-
"@spectrum-web-components/icons-ui": "1.9.0",
|
|
71
|
-
"@spectrum-web-components/shared": "1.9.0"
|
|
72
|
-
},
|
|
73
|
-
"types": "./src/index.d.ts",
|
|
74
|
-
"customElements": "custom-elements.json",
|
|
75
|
-
"sideEffects": [
|
|
76
|
-
"./sp-*.js",
|
|
77
|
-
"./**/*.dev.js"
|
|
78
|
-
]
|
|
79
|
-
}
|
|
38
|
+
"./sp-action-button.js": {
|
|
39
|
+
"development": "./sp-action-button.dev.js",
|
|
40
|
+
"default": "./sp-action-button.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"**/*.d.ts",
|
|
48
|
+
"**/*.js",
|
|
49
|
+
"**/*.js.map",
|
|
50
|
+
"custom-elements.json",
|
|
51
|
+
"!stories/",
|
|
52
|
+
"!test/"
|
|
53
|
+
],
|
|
54
|
+
"keywords": [
|
|
55
|
+
"design-system",
|
|
56
|
+
"spectrum",
|
|
57
|
+
"adobe",
|
|
58
|
+
"adobe-spectrum",
|
|
59
|
+
"web components",
|
|
60
|
+
"web-components",
|
|
61
|
+
"lit-element",
|
|
62
|
+
"lit-html",
|
|
63
|
+
"component",
|
|
64
|
+
"css"
|
|
65
|
+
],
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@spectrum-web-components/base": "1.9.1-nightly.20251028214328",
|
|
68
|
+
"@spectrum-web-components/button": "1.9.1-nightly.20251028214328",
|
|
69
|
+
"@spectrum-web-components/icon": "1.9.1-nightly.20251028214328",
|
|
70
|
+
"@spectrum-web-components/icons-ui": "1.9.1-nightly.20251028214328",
|
|
71
|
+
"@spectrum-web-components/shared": "1.9.1-nightly.20251028214328"
|
|
72
|
+
},
|
|
73
|
+
"types": "./src/index.d.ts",
|
|
74
|
+
"customElements": "custom-elements.json",
|
|
75
|
+
"sideEffects": [
|
|
76
|
+
"./sp-*.js",
|
|
77
|
+
"./**/*.dev.js"
|
|
78
|
+
]
|
|
79
|
+
}
|
package/custom-elements.json
DELETED
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "1.0.0",
|
|
3
|
-
"readme": "",
|
|
4
|
-
"modules": [
|
|
5
|
-
{
|
|
6
|
-
"kind": "javascript-module",
|
|
7
|
-
"path": "sp-action-button.js",
|
|
8
|
-
"declarations": [],
|
|
9
|
-
"exports": [
|
|
10
|
-
{
|
|
11
|
-
"kind": "custom-element-definition",
|
|
12
|
-
"name": "sp-action-button",
|
|
13
|
-
"declaration": {
|
|
14
|
-
"name": "ActionButton",
|
|
15
|
-
"module": "/src/ActionButton.js"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"kind": "javascript-module",
|
|
22
|
-
"path": "src/ActionButton.js",
|
|
23
|
-
"declarations": [
|
|
24
|
-
{
|
|
25
|
-
"kind": "variable",
|
|
26
|
-
"name": "LONGPRESS_DURATION",
|
|
27
|
-
"type": {
|
|
28
|
-
"text": "number"
|
|
29
|
-
},
|
|
30
|
-
"default": "300"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"kind": "class",
|
|
34
|
-
"description": "",
|
|
35
|
-
"name": "ActionButton",
|
|
36
|
-
"slots": [
|
|
37
|
-
{
|
|
38
|
-
"description": "text label of the Action Button",
|
|
39
|
-
"name": ""
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"description": "The icon to use for Action Button",
|
|
43
|
-
"name": "icon"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"members": [
|
|
47
|
-
{
|
|
48
|
-
"kind": "field",
|
|
49
|
-
"name": "emphasized",
|
|
50
|
-
"type": {
|
|
51
|
-
"text": "boolean"
|
|
52
|
-
},
|
|
53
|
-
"privacy": "public",
|
|
54
|
-
"default": "false",
|
|
55
|
-
"attribute": "emphasized",
|
|
56
|
-
"reflects": true
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"kind": "field",
|
|
60
|
-
"name": "holdAffordance",
|
|
61
|
-
"type": {
|
|
62
|
-
"text": "boolean"
|
|
63
|
-
},
|
|
64
|
-
"privacy": "public",
|
|
65
|
-
"default": "false",
|
|
66
|
-
"attribute": "hold-affordance",
|
|
67
|
-
"reflects": true
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"kind": "field",
|
|
71
|
-
"name": "quiet",
|
|
72
|
-
"type": {
|
|
73
|
-
"text": "boolean"
|
|
74
|
-
},
|
|
75
|
-
"privacy": "public",
|
|
76
|
-
"default": "false",
|
|
77
|
-
"attribute": "quiet",
|
|
78
|
-
"reflects": true
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"kind": "field",
|
|
82
|
-
"name": "role",
|
|
83
|
-
"type": {
|
|
84
|
-
"text": "string"
|
|
85
|
-
},
|
|
86
|
-
"privacy": "public",
|
|
87
|
-
"default": "'button'",
|
|
88
|
-
"attribute": "role",
|
|
89
|
-
"reflects": true
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"kind": "field",
|
|
93
|
-
"name": "selected",
|
|
94
|
-
"type": {
|
|
95
|
-
"text": "boolean"
|
|
96
|
-
},
|
|
97
|
-
"privacy": "public",
|
|
98
|
-
"default": "false",
|
|
99
|
-
"description": "Whether an Action Button with `role='button'`\nshould also be `aria-pressed='true'`",
|
|
100
|
-
"attribute": "selected",
|
|
101
|
-
"reflects": true
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"kind": "field",
|
|
105
|
-
"name": "toggles",
|
|
106
|
-
"type": {
|
|
107
|
-
"text": "boolean"
|
|
108
|
-
},
|
|
109
|
-
"privacy": "public",
|
|
110
|
-
"default": "false",
|
|
111
|
-
"description": "Whether to automatically manage the `selected`\nattribute on interaction and whether `aria-pressed=\"false\"`\nshould be used when `selected === false`",
|
|
112
|
-
"attribute": "toggles",
|
|
113
|
-
"reflects": true
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"kind": "field",
|
|
117
|
-
"name": "staticColor",
|
|
118
|
-
"type": {
|
|
119
|
-
"text": "'white' | 'black' | undefined"
|
|
120
|
-
},
|
|
121
|
-
"privacy": "public",
|
|
122
|
-
"description": "The static color variant to use for the action button.",
|
|
123
|
-
"attribute": "static-color",
|
|
124
|
-
"reflects": true
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"kind": "field",
|
|
128
|
-
"name": "value",
|
|
129
|
-
"type": {
|
|
130
|
-
"text": "string"
|
|
131
|
-
},
|
|
132
|
-
"privacy": "public",
|
|
133
|
-
"attribute": "value"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"kind": "field",
|
|
137
|
-
"name": "_value",
|
|
138
|
-
"type": {
|
|
139
|
-
"text": "string"
|
|
140
|
-
},
|
|
141
|
-
"privacy": "private",
|
|
142
|
-
"default": "''"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"kind": "field",
|
|
146
|
-
"name": "itemText",
|
|
147
|
-
"type": {
|
|
148
|
-
"text": "string"
|
|
149
|
-
},
|
|
150
|
-
"privacy": "private",
|
|
151
|
-
"readonly": true
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"kind": "field",
|
|
155
|
-
"name": "onClick",
|
|
156
|
-
"privacy": "private"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"kind": "method",
|
|
160
|
-
"name": "handlePointerdownHoldAffordance",
|
|
161
|
-
"privacy": "private",
|
|
162
|
-
"return": {
|
|
163
|
-
"type": {
|
|
164
|
-
"text": "void"
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
"parameters": [
|
|
168
|
-
{
|
|
169
|
-
"name": "event",
|
|
170
|
-
"type": {
|
|
171
|
-
"text": "PointerEvent"
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
]
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"kind": "method",
|
|
178
|
-
"name": "handlePointerupHoldAffordance",
|
|
179
|
-
"privacy": "private",
|
|
180
|
-
"return": {
|
|
181
|
-
"type": {
|
|
182
|
-
"text": "void"
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"kind": "method",
|
|
188
|
-
"name": "handleKeydown",
|
|
189
|
-
"privacy": "private",
|
|
190
|
-
"return": {
|
|
191
|
-
"type": {
|
|
192
|
-
"text": "void"
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"parameters": [
|
|
196
|
-
{
|
|
197
|
-
"name": "event",
|
|
198
|
-
"type": {
|
|
199
|
-
"text": "KeyboardEvent"
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
]
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"kind": "method",
|
|
206
|
-
"name": "handleKeyup",
|
|
207
|
-
"privacy": "protected",
|
|
208
|
-
"return": {
|
|
209
|
-
"type": {
|
|
210
|
-
"text": "void"
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
"parameters": [
|
|
214
|
-
{
|
|
215
|
-
"name": "event",
|
|
216
|
-
"type": {
|
|
217
|
-
"text": "KeyboardEvent"
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
]
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"kind": "field",
|
|
224
|
-
"name": "buttonContent",
|
|
225
|
-
"type": {
|
|
226
|
-
"text": "TemplateResult[]"
|
|
227
|
-
},
|
|
228
|
-
"privacy": "protected",
|
|
229
|
-
"readonly": true
|
|
230
|
-
}
|
|
231
|
-
],
|
|
232
|
-
"events": [
|
|
233
|
-
{
|
|
234
|
-
"name": "longpress",
|
|
235
|
-
"type": {
|
|
236
|
-
"text": "CustomEvent"
|
|
237
|
-
},
|
|
238
|
-
"description": "Synthesizes a \"longpress\" interaction that signifies a `pointerdown` event that is >=300ms or a keyboard event where code is `Space` or code is `ArrowDown` while `altKey===true`."
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
"description": "Announces a change in the `selected` property of an action button",
|
|
242
|
-
"name": "change"
|
|
243
|
-
}
|
|
244
|
-
],
|
|
245
|
-
"attributes": [
|
|
246
|
-
{
|
|
247
|
-
"name": "emphasized",
|
|
248
|
-
"type": {
|
|
249
|
-
"text": "boolean"
|
|
250
|
-
},
|
|
251
|
-
"default": "false",
|
|
252
|
-
"fieldName": "emphasized"
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
"name": "hold-affordance",
|
|
256
|
-
"type": {
|
|
257
|
-
"text": "boolean"
|
|
258
|
-
},
|
|
259
|
-
"default": "false",
|
|
260
|
-
"fieldName": "holdAffordance"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"name": "quiet",
|
|
264
|
-
"type": {
|
|
265
|
-
"text": "boolean"
|
|
266
|
-
},
|
|
267
|
-
"default": "false",
|
|
268
|
-
"fieldName": "quiet"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"name": "role",
|
|
272
|
-
"type": {
|
|
273
|
-
"text": "string"
|
|
274
|
-
},
|
|
275
|
-
"default": "'button'",
|
|
276
|
-
"fieldName": "role"
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
"name": "selected",
|
|
280
|
-
"type": {
|
|
281
|
-
"text": "boolean"
|
|
282
|
-
},
|
|
283
|
-
"default": "false",
|
|
284
|
-
"description": "Whether an Action Button with `role='button'`\nshould also be `aria-pressed='true'`",
|
|
285
|
-
"fieldName": "selected"
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"name": "toggles",
|
|
289
|
-
"type": {
|
|
290
|
-
"text": "boolean"
|
|
291
|
-
},
|
|
292
|
-
"default": "false",
|
|
293
|
-
"description": "Whether to automatically manage the `selected`\nattribute on interaction and whether `aria-pressed=\"false\"`\nshould be used when `selected === false`",
|
|
294
|
-
"fieldName": "toggles"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
"name": "static-color",
|
|
298
|
-
"type": {
|
|
299
|
-
"text": "'white' | 'black' | undefined"
|
|
300
|
-
},
|
|
301
|
-
"description": "The static color variant to use for the action button.",
|
|
302
|
-
"fieldName": "staticColor"
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
"name": "value",
|
|
306
|
-
"type": {
|
|
307
|
-
"text": "string"
|
|
308
|
-
},
|
|
309
|
-
"fieldName": "value"
|
|
310
|
-
}
|
|
311
|
-
],
|
|
312
|
-
"mixins": [
|
|
313
|
-
{
|
|
314
|
-
"name": "SizedMixin",
|
|
315
|
-
"package": "@spectrum-web-components/base"
|
|
316
|
-
}
|
|
317
|
-
],
|
|
318
|
-
"superclass": {
|
|
319
|
-
"name": "ButtonBase",
|
|
320
|
-
"package": "@spectrum-web-components/button"
|
|
321
|
-
},
|
|
322
|
-
"tagName": "sp-action-button",
|
|
323
|
-
"customElement": true
|
|
324
|
-
}
|
|
325
|
-
],
|
|
326
|
-
"exports": [
|
|
327
|
-
{
|
|
328
|
-
"kind": "js",
|
|
329
|
-
"name": "LONGPRESS_DURATION",
|
|
330
|
-
"declaration": {
|
|
331
|
-
"name": "LONGPRESS_DURATION",
|
|
332
|
-
"module": "src/ActionButton.js"
|
|
333
|
-
}
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"kind": "js",
|
|
337
|
-
"name": "ActionButton",
|
|
338
|
-
"declaration": {
|
|
339
|
-
"name": "ActionButton",
|
|
340
|
-
"module": "src/ActionButton.js"
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
]
|
|
344
|
-
}
|
|
345
|
-
]
|
|
346
|
-
}
|
package/sp-action-button.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2025 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { ActionButton } from './src/ActionButton.js';
|
|
13
|
-
declare global {
|
|
14
|
-
interface HTMLElementTagNameMap {
|
|
15
|
-
'sp-action-button': ActionButton;
|
|
16
|
-
}
|
|
17
|
-
}
|
package/sp-action-button.dev.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["sp-action-button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { ActionButton } from './src/ActionButton.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-action-button', ActionButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-action-button': ActionButton;\n }\n}\n"],
|
|
5
|
-
"mappings": ";AAYA,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAE9B,cAAc,oBAAoB,YAAY;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/sp-action-button.js
DELETED
package/sp-action-button.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["sp-action-button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { ActionButton } from './src/ActionButton.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-action-button', ActionButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-action-button': ActionButton;\n }\n}\n"],
|
|
5
|
-
"mappings": "aAYA,OAAS,gBAAAA,MAAoB,wBAC7B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,mBAAoBD,CAAY",
|
|
6
|
-
"names": ["ActionButton", "defineElement"]
|
|
7
|
-
}
|
package/src/ActionButton.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2025 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { CSSResultArray, PropertyValues, TemplateResult } from '@spectrum-web-components/base';
|
|
13
|
-
import { ButtonBase } from '@spectrum-web-components/button';
|
|
14
|
-
import '@spectrum-web-components/icons-ui/icons/sp-icon-corner-triangle300.js';
|
|
15
|
-
export declare const LONGPRESS_DURATION = 300;
|
|
16
|
-
export type LongpressEvent = {
|
|
17
|
-
source: 'pointer' | 'keyboard';
|
|
18
|
-
};
|
|
19
|
-
declare const ActionButton_base: typeof ButtonBase & {
|
|
20
|
-
new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
|
|
21
|
-
prototype: import("@spectrum-web-components/base").SizedElementInterface;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @element sp-action-button
|
|
25
|
-
*
|
|
26
|
-
* @slot - text label of the Action Button
|
|
27
|
-
* @slot icon - The icon to use for Action Button
|
|
28
|
-
* @fires change - Announces a change in the `selected` property of an action button
|
|
29
|
-
* @fires longpress - Synthesizes a "longpress" interaction that signifies a
|
|
30
|
-
* `pointerdown` event that is >=300ms or a keyboard event where code is `Space` or code is `ArrowDown`
|
|
31
|
-
* while `altKey===true`.
|
|
32
|
-
*/
|
|
33
|
-
export declare class ActionButton extends ActionButton_base {
|
|
34
|
-
static get styles(): CSSResultArray;
|
|
35
|
-
emphasized: boolean;
|
|
36
|
-
holdAffordance: boolean;
|
|
37
|
-
quiet: boolean;
|
|
38
|
-
role: string;
|
|
39
|
-
/**
|
|
40
|
-
* Whether an Action Button with `role='button'`
|
|
41
|
-
* should also be `aria-pressed='true'`
|
|
42
|
-
*/
|
|
43
|
-
selected: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Whether to automatically manage the `selected`
|
|
46
|
-
* attribute on interaction and whether `aria-pressed="false"`
|
|
47
|
-
* should be used when `selected === false`
|
|
48
|
-
*/
|
|
49
|
-
toggles: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* The static color variant to use for the action button.
|
|
52
|
-
*/
|
|
53
|
-
staticColor?: 'white' | 'black';
|
|
54
|
-
get value(): string;
|
|
55
|
-
set value(value: string);
|
|
56
|
-
private _value;
|
|
57
|
-
/**
|
|
58
|
-
* @private
|
|
59
|
-
*/
|
|
60
|
-
get itemText(): string;
|
|
61
|
-
constructor();
|
|
62
|
-
private onClick;
|
|
63
|
-
private handlePointerdownHoldAffordance;
|
|
64
|
-
private handlePointerupHoldAffordance;
|
|
65
|
-
/**
|
|
66
|
-
* @private
|
|
67
|
-
*/
|
|
68
|
-
protected handleKeydown(event: KeyboardEvent): void;
|
|
69
|
-
protected handleKeyup(event: KeyboardEvent): void;
|
|
70
|
-
protected get buttonContent(): TemplateResult[];
|
|
71
|
-
protected updated(changes: PropertyValues): void;
|
|
72
|
-
}
|
|
73
|
-
declare global {
|
|
74
|
-
interface GlobalEventHandlersEventMap {
|
|
75
|
-
longpress: CustomEvent<LongpressEvent>;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
export {};
|