@spectrum-web-components/icon 1.6.1-beta.0 → 1.7.0-snapshot.20250519143559
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 +3 -6
- package/custom-elements.json +0 -338
- package/src/spectrum-config.js +0 -115
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@spectrum-web-components/icon",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.7.0-snapshot.20250519143559",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -87,11 +87,8 @@
|
|
87
87
|
"css"
|
88
88
|
],
|
89
89
|
"dependencies": {
|
90
|
-
"@spectrum-web-components/base": "1.
|
91
|
-
"@spectrum-web-components/iconset": "1.
|
92
|
-
},
|
93
|
-
"devDependencies": {
|
94
|
-
"@spectrum-css/icon": "9.1.0"
|
90
|
+
"@spectrum-web-components/base": "1.7.0-snapshot.20250519143559",
|
91
|
+
"@spectrum-web-components/iconset": "1.7.0-snapshot.20250519143559"
|
95
92
|
},
|
96
93
|
"types": "./src/index.d.ts",
|
97
94
|
"customElements": "custom-elements.json",
|
package/custom-elements.json
DELETED
@@ -1,338 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"schemaVersion": "1.0.0",
|
3
|
-
"readme": "",
|
4
|
-
"modules": [
|
5
|
-
{
|
6
|
-
"kind": "javascript-module",
|
7
|
-
"path": "sp-icon.js",
|
8
|
-
"declarations": [],
|
9
|
-
"exports": [
|
10
|
-
{
|
11
|
-
"kind": "custom-element-definition",
|
12
|
-
"name": "sp-icon",
|
13
|
-
"declaration": {
|
14
|
-
"name": "Icon",
|
15
|
-
"module": "/src/Icon.js"
|
16
|
-
}
|
17
|
-
}
|
18
|
-
]
|
19
|
-
},
|
20
|
-
{
|
21
|
-
"kind": "javascript-module",
|
22
|
-
"path": "src/Icon.js",
|
23
|
-
"declarations": [
|
24
|
-
{
|
25
|
-
"kind": "class",
|
26
|
-
"description": "",
|
27
|
-
"name": "Icon",
|
28
|
-
"members": [
|
29
|
-
{
|
30
|
-
"kind": "field",
|
31
|
-
"name": "src",
|
32
|
-
"type": {
|
33
|
-
"text": "string | undefined"
|
34
|
-
},
|
35
|
-
"privacy": "public",
|
36
|
-
"attribute": "src"
|
37
|
-
},
|
38
|
-
{
|
39
|
-
"kind": "field",
|
40
|
-
"name": "name",
|
41
|
-
"type": {
|
42
|
-
"text": "string | undefined"
|
43
|
-
},
|
44
|
-
"privacy": "public",
|
45
|
-
"attribute": "name"
|
46
|
-
},
|
47
|
-
{
|
48
|
-
"kind": "field",
|
49
|
-
"name": "iconContainer",
|
50
|
-
"type": {
|
51
|
-
"text": "HTMLElement | undefined"
|
52
|
-
},
|
53
|
-
"privacy": "private"
|
54
|
-
},
|
55
|
-
{
|
56
|
-
"kind": "field",
|
57
|
-
"name": "updateIconPromise",
|
58
|
-
"type": {
|
59
|
-
"text": "Promise<void> | undefined"
|
60
|
-
},
|
61
|
-
"privacy": "private"
|
62
|
-
},
|
63
|
-
{
|
64
|
-
"kind": "field",
|
65
|
-
"name": "iconsetListener",
|
66
|
-
"privacy": "private"
|
67
|
-
},
|
68
|
-
{
|
69
|
-
"kind": "method",
|
70
|
-
"name": "announceIconImageSrcError",
|
71
|
-
"privacy": "private",
|
72
|
-
"return": {
|
73
|
-
"type": {
|
74
|
-
"text": "void"
|
75
|
-
}
|
76
|
-
}
|
77
|
-
},
|
78
|
-
{
|
79
|
-
"kind": "method",
|
80
|
-
"name": "updateIcon",
|
81
|
-
"privacy": "private",
|
82
|
-
"return": {
|
83
|
-
"type": {
|
84
|
-
"text": "Promise<void>"
|
85
|
-
}
|
86
|
-
}
|
87
|
-
},
|
88
|
-
{
|
89
|
-
"kind": "method",
|
90
|
-
"name": "parseIcon",
|
91
|
-
"privacy": "private",
|
92
|
-
"return": {
|
93
|
-
"type": {
|
94
|
-
"text": "{ iconset: string; icon: string }"
|
95
|
-
}
|
96
|
-
},
|
97
|
-
"parameters": [
|
98
|
-
{
|
99
|
-
"name": "icon",
|
100
|
-
"type": {
|
101
|
-
"text": "string"
|
102
|
-
}
|
103
|
-
}
|
104
|
-
]
|
105
|
-
},
|
106
|
-
{
|
107
|
-
"kind": "method",
|
108
|
-
"name": "getUpdateComplete",
|
109
|
-
"privacy": "protected",
|
110
|
-
"return": {
|
111
|
-
"type": {
|
112
|
-
"text": "Promise<boolean>"
|
113
|
-
}
|
114
|
-
}
|
115
|
-
},
|
116
|
-
{
|
117
|
-
"kind": "field",
|
118
|
-
"name": "unsubscribeSystemContext",
|
119
|
-
"type": {
|
120
|
-
"text": "(() => void) | null"
|
121
|
-
},
|
122
|
-
"privacy": "private",
|
123
|
-
"default": "null",
|
124
|
-
"inheritedFrom": {
|
125
|
-
"name": "IconBase",
|
126
|
-
"module": "src/IconBase.js"
|
127
|
-
}
|
128
|
-
},
|
129
|
-
{
|
130
|
-
"kind": "field",
|
131
|
-
"name": "spectrumVersion",
|
132
|
-
"type": {
|
133
|
-
"text": "number"
|
134
|
-
},
|
135
|
-
"privacy": "public",
|
136
|
-
"default": "1",
|
137
|
-
"inheritedFrom": {
|
138
|
-
"name": "IconBase",
|
139
|
-
"module": "src/IconBase.js"
|
140
|
-
}
|
141
|
-
},
|
142
|
-
{
|
143
|
-
"kind": "field",
|
144
|
-
"name": "label",
|
145
|
-
"type": {
|
146
|
-
"text": "string"
|
147
|
-
},
|
148
|
-
"privacy": "public",
|
149
|
-
"default": "''",
|
150
|
-
"attribute": "label",
|
151
|
-
"reflects": true,
|
152
|
-
"inheritedFrom": {
|
153
|
-
"name": "IconBase",
|
154
|
-
"module": "src/IconBase.js"
|
155
|
-
}
|
156
|
-
},
|
157
|
-
{
|
158
|
-
"kind": "field",
|
159
|
-
"name": "size",
|
160
|
-
"type": {
|
161
|
-
"text": "'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | undefined"
|
162
|
-
},
|
163
|
-
"privacy": "public",
|
164
|
-
"attribute": "size",
|
165
|
-
"reflects": true,
|
166
|
-
"inheritedFrom": {
|
167
|
-
"name": "IconBase",
|
168
|
-
"module": "src/IconBase.js"
|
169
|
-
}
|
170
|
-
},
|
171
|
-
{
|
172
|
-
"kind": "field",
|
173
|
-
"name": "systemResolver",
|
174
|
-
"privacy": "private",
|
175
|
-
"default": "new SystemResolutionController(this)",
|
176
|
-
"inheritedFrom": {
|
177
|
-
"name": "IconBase",
|
178
|
-
"module": "src/IconBase.js"
|
179
|
-
}
|
180
|
-
}
|
181
|
-
],
|
182
|
-
"events": [
|
183
|
-
{
|
184
|
-
"name": "error",
|
185
|
-
"type": {
|
186
|
-
"text": "Event"
|
187
|
-
}
|
188
|
-
}
|
189
|
-
],
|
190
|
-
"attributes": [
|
191
|
-
{
|
192
|
-
"name": "src",
|
193
|
-
"type": {
|
194
|
-
"text": "string | undefined"
|
195
|
-
},
|
196
|
-
"fieldName": "src"
|
197
|
-
},
|
198
|
-
{
|
199
|
-
"name": "name",
|
200
|
-
"type": {
|
201
|
-
"text": "string | undefined"
|
202
|
-
},
|
203
|
-
"fieldName": "name"
|
204
|
-
},
|
205
|
-
{
|
206
|
-
"name": "label",
|
207
|
-
"type": {
|
208
|
-
"text": "string"
|
209
|
-
},
|
210
|
-
"default": "''",
|
211
|
-
"fieldName": "label",
|
212
|
-
"inheritedFrom": {
|
213
|
-
"name": "IconBase",
|
214
|
-
"module": "src/IconBase.ts"
|
215
|
-
}
|
216
|
-
},
|
217
|
-
{
|
218
|
-
"name": "size",
|
219
|
-
"type": {
|
220
|
-
"text": "'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | undefined"
|
221
|
-
},
|
222
|
-
"fieldName": "size",
|
223
|
-
"inheritedFrom": {
|
224
|
-
"name": "IconBase",
|
225
|
-
"module": "src/IconBase.ts"
|
226
|
-
}
|
227
|
-
}
|
228
|
-
],
|
229
|
-
"superclass": {
|
230
|
-
"name": "IconBase",
|
231
|
-
"module": "/src/IconBase.js"
|
232
|
-
},
|
233
|
-
"tagName": "sp-icon",
|
234
|
-
"customElement": true
|
235
|
-
}
|
236
|
-
],
|
237
|
-
"exports": [
|
238
|
-
{
|
239
|
-
"kind": "js",
|
240
|
-
"name": "Icon",
|
241
|
-
"declaration": {
|
242
|
-
"name": "Icon",
|
243
|
-
"module": "src/Icon.js"
|
244
|
-
}
|
245
|
-
}
|
246
|
-
]
|
247
|
-
},
|
248
|
-
{
|
249
|
-
"kind": "javascript-module",
|
250
|
-
"path": "src/IconBase.js",
|
251
|
-
"declarations": [
|
252
|
-
{
|
253
|
-
"kind": "class",
|
254
|
-
"description": "",
|
255
|
-
"name": "IconBase",
|
256
|
-
"members": [
|
257
|
-
{
|
258
|
-
"kind": "field",
|
259
|
-
"name": "unsubscribeSystemContext",
|
260
|
-
"type": {
|
261
|
-
"text": "(() => void) | null"
|
262
|
-
},
|
263
|
-
"privacy": "private",
|
264
|
-
"default": "null"
|
265
|
-
},
|
266
|
-
{
|
267
|
-
"kind": "field",
|
268
|
-
"name": "spectrumVersion",
|
269
|
-
"type": {
|
270
|
-
"text": "number"
|
271
|
-
},
|
272
|
-
"privacy": "public",
|
273
|
-
"default": "1"
|
274
|
-
},
|
275
|
-
{
|
276
|
-
"kind": "field",
|
277
|
-
"name": "label",
|
278
|
-
"type": {
|
279
|
-
"text": "string"
|
280
|
-
},
|
281
|
-
"privacy": "public",
|
282
|
-
"default": "''",
|
283
|
-
"attribute": "label",
|
284
|
-
"reflects": true
|
285
|
-
},
|
286
|
-
{
|
287
|
-
"kind": "field",
|
288
|
-
"name": "size",
|
289
|
-
"type": {
|
290
|
-
"text": "'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | undefined"
|
291
|
-
},
|
292
|
-
"privacy": "public",
|
293
|
-
"attribute": "size",
|
294
|
-
"reflects": true
|
295
|
-
},
|
296
|
-
{
|
297
|
-
"kind": "field",
|
298
|
-
"name": "systemResolver",
|
299
|
-
"privacy": "private",
|
300
|
-
"default": "new SystemResolutionController(this)"
|
301
|
-
}
|
302
|
-
],
|
303
|
-
"attributes": [
|
304
|
-
{
|
305
|
-
"name": "label",
|
306
|
-
"type": {
|
307
|
-
"text": "string"
|
308
|
-
},
|
309
|
-
"default": "''",
|
310
|
-
"fieldName": "label"
|
311
|
-
},
|
312
|
-
{
|
313
|
-
"name": "size",
|
314
|
-
"type": {
|
315
|
-
"text": "'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | undefined"
|
316
|
-
},
|
317
|
-
"fieldName": "size"
|
318
|
-
}
|
319
|
-
],
|
320
|
-
"superclass": {
|
321
|
-
"name": "SpectrumElement",
|
322
|
-
"package": "@spectrum-web-components/base"
|
323
|
-
}
|
324
|
-
}
|
325
|
-
],
|
326
|
-
"exports": [
|
327
|
-
{
|
328
|
-
"kind": "js",
|
329
|
-
"name": "IconBase",
|
330
|
-
"declaration": {
|
331
|
-
"name": "IconBase",
|
332
|
-
"module": "src/IconBase.js"
|
333
|
-
}
|
334
|
-
}
|
335
|
-
]
|
336
|
-
}
|
337
|
-
]
|
338
|
-
}
|
package/src/spectrum-config.js
DELETED
@@ -1,115 +0,0 @@
|
|
1
|
-
// @ts-check
|
2
|
-
/*
|
3
|
-
Copyright 2023 Adobe. All rights reserved.
|
4
|
-
This file is licensed to you under the Apache License, Version 2.0 (the 'License');
|
5
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
6
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
7
|
-
|
8
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
9
|
-
the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
10
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
11
|
-
governing permissions and limitations under the License.
|
12
|
-
*/
|
13
|
-
|
14
|
-
import {
|
15
|
-
builder,
|
16
|
-
converterFor,
|
17
|
-
} from '../../../tasks/process-spectrum-utils.js';
|
18
|
-
|
19
|
-
const converter = converterFor('spectrum-Icon');
|
20
|
-
|
21
|
-
/**
|
22
|
-
*
|
23
|
-
* @param {string} fileName
|
24
|
-
* @param {RegExp} regex
|
25
|
-
* @returns {import('../../../tasks/spectrum-css-converter').Conversion}
|
26
|
-
*/
|
27
|
-
const iconType = (fileName, regex) => ({
|
28
|
-
inPackage: '@spectrum-css/icon',
|
29
|
-
outPackage: 'icon',
|
30
|
-
fileName,
|
31
|
-
requireComponentPresence: [
|
32
|
-
/** @type {import('../../../tasks/spectrum-css-converter').SelectorComponentWithRegex} */ ({
|
33
|
-
type: 'class',
|
34
|
-
regex,
|
35
|
-
}),
|
36
|
-
],
|
37
|
-
components: [],
|
38
|
-
});
|
39
|
-
|
40
|
-
/**
|
41
|
-
* @type { import('../../../tasks/spectrum-css-converter').SpectrumCSSConverter }
|
42
|
-
*/
|
43
|
-
const config = {
|
44
|
-
conversions: [
|
45
|
-
{
|
46
|
-
inPackage: '@spectrum-css/icon',
|
47
|
-
outPackage: 'icon',
|
48
|
-
fileName: 'icon',
|
49
|
-
requireComponentPresence: [
|
50
|
-
/** @type {import('../../../tasks/spectrum-css-converter').SelectorComponentWithRegex} */ ({
|
51
|
-
type: 'class',
|
52
|
-
regex: /spectrum-Icon/,
|
53
|
-
}),
|
54
|
-
],
|
55
|
-
components: [
|
56
|
-
{
|
57
|
-
find: {
|
58
|
-
type: 'pseudo-class',
|
59
|
-
kind: 'not',
|
60
|
-
selectors: [
|
61
|
-
[
|
62
|
-
{
|
63
|
-
type: 'pseudo-class',
|
64
|
-
kind: 'root',
|
65
|
-
},
|
66
|
-
],
|
67
|
-
],
|
68
|
-
},
|
69
|
-
replace: {
|
70
|
-
type: 'pseudo-class',
|
71
|
-
kind: 'not',
|
72
|
-
selectors: [
|
73
|
-
[
|
74
|
-
{
|
75
|
-
type: 'pseudo-class',
|
76
|
-
kind: 'root',
|
77
|
-
},
|
78
|
-
],
|
79
|
-
],
|
80
|
-
},
|
81
|
-
hoist: true,
|
82
|
-
},
|
83
|
-
converter.classToHost(),
|
84
|
-
...converter.enumerateAttributes(
|
85
|
-
[
|
86
|
-
['spectrum-Icon--sizeXXS', 'xxs'],
|
87
|
-
['spectrum-Icon--sizeXS', 'xs'],
|
88
|
-
['spectrum-Icon--sizeS', 's'],
|
89
|
-
['spectrum-Icon--sizeM', 'm'],
|
90
|
-
['spectrum-Icon--sizeL', 'l'],
|
91
|
-
['spectrum-Icon--sizeXL', 'xl'],
|
92
|
-
['spectrum-Icon--sizeXXL', 'xxl'],
|
93
|
-
],
|
94
|
-
'size'
|
95
|
-
),
|
96
|
-
],
|
97
|
-
excludeByComponents: [
|
98
|
-
builder.element('svg'),
|
99
|
-
builder.element('img'),
|
100
|
-
],
|
101
|
-
},
|
102
|
-
iconType('icon-arrow', /^spectrum-UIIcon-Arrow/),
|
103
|
-
iconType('icon-asterisk', /^spectrum-UIIcon-Asterisk/),
|
104
|
-
iconType('icon-checkmark', /^spectrum-UIIcon-Checkmark/),
|
105
|
-
iconType('icon-chevron', /^spectrum-UIIcon-Chevron/),
|
106
|
-
iconType('icon-corner-triangle', /^spectrum-UIIcon-CornerTriangle/),
|
107
|
-
iconType('icon-cross', /^spectrum-UIIcon-Cross/),
|
108
|
-
iconType('icon-dash', /^spectrum-UIIcon-Dash/),
|
109
|
-
iconType('icon-double-gripper', /^spectrum-UIIcon-DoubleGripper/),
|
110
|
-
iconType('icon-single-gripper', /^spectrum-UIIcon-SingleGripper/),
|
111
|
-
iconType('icon-triple-gripper', /^spectrum-UIIcon-TripleGripper/),
|
112
|
-
],
|
113
|
-
};
|
114
|
-
|
115
|
-
export default config;
|