@spectrum-web-components/picker-button 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 +6 -9
- package/custom-elements.json +0 -107
- package/src/spectrum-config.js +0 -252
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/picker-button",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-snapshot.20250519143559",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -64,14 +64,11 @@
|
|
|
64
64
|
"css"
|
|
65
65
|
],
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@spectrum-web-components/base": "1.
|
|
68
|
-
"@spectrum-web-components/button": "1.
|
|
69
|
-
"@spectrum-web-components/icon": "1.
|
|
70
|
-
"@spectrum-web-components/icons-ui": "1.
|
|
71
|
-
"@spectrum-web-components/shared": "1.
|
|
72
|
-
},
|
|
73
|
-
"devDependencies": {
|
|
74
|
-
"@spectrum-css/pickerbutton": "6.1.2"
|
|
67
|
+
"@spectrum-web-components/base": "1.7.0-snapshot.20250519143559",
|
|
68
|
+
"@spectrum-web-components/button": "1.7.0-snapshot.20250519143559",
|
|
69
|
+
"@spectrum-web-components/icon": "1.7.0-snapshot.20250519143559",
|
|
70
|
+
"@spectrum-web-components/icons-ui": "1.7.0-snapshot.20250519143559",
|
|
71
|
+
"@spectrum-web-components/shared": "1.7.0-snapshot.20250519143559"
|
|
75
72
|
},
|
|
76
73
|
"types": "./src/index.d.ts",
|
|
77
74
|
"customElements": "custom-elements.json",
|
package/custom-elements.json
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "1.0.0",
|
|
3
|
-
"readme": "",
|
|
4
|
-
"modules": [
|
|
5
|
-
{
|
|
6
|
-
"kind": "javascript-module",
|
|
7
|
-
"path": "sp-picker-button.js",
|
|
8
|
-
"declarations": [],
|
|
9
|
-
"exports": [
|
|
10
|
-
{
|
|
11
|
-
"kind": "custom-element-definition",
|
|
12
|
-
"name": "sp-picker-button",
|
|
13
|
-
"declaration": {
|
|
14
|
-
"name": "PickerButton",
|
|
15
|
-
"module": "/src/PickerButton.js"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"kind": "javascript-module",
|
|
22
|
-
"path": "src/PickerButton.js",
|
|
23
|
-
"declarations": [
|
|
24
|
-
{
|
|
25
|
-
"kind": "class",
|
|
26
|
-
"description": "",
|
|
27
|
-
"name": "PickerButton",
|
|
28
|
-
"members": [
|
|
29
|
-
{
|
|
30
|
-
"kind": "field",
|
|
31
|
-
"name": "invalid",
|
|
32
|
-
"type": {
|
|
33
|
-
"text": "boolean"
|
|
34
|
-
},
|
|
35
|
-
"default": "false",
|
|
36
|
-
"attribute": "invalid",
|
|
37
|
-
"reflects": true
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"kind": "field",
|
|
41
|
-
"name": "position",
|
|
42
|
-
"type": {
|
|
43
|
-
"text": "'left' | 'right'"
|
|
44
|
-
},
|
|
45
|
-
"default": "'right'",
|
|
46
|
-
"attribute": "position",
|
|
47
|
-
"reflects": true
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"kind": "field",
|
|
51
|
-
"name": "hasText",
|
|
52
|
-
"type": {
|
|
53
|
-
"text": "boolean"
|
|
54
|
-
},
|
|
55
|
-
"privacy": "protected",
|
|
56
|
-
"readonly": true
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
"attributes": [
|
|
60
|
-
{
|
|
61
|
-
"name": "invalid",
|
|
62
|
-
"type": {
|
|
63
|
-
"text": "boolean"
|
|
64
|
-
},
|
|
65
|
-
"default": "false",
|
|
66
|
-
"fieldName": "invalid"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"name": "position",
|
|
70
|
-
"type": {
|
|
71
|
-
"text": "'left' | 'right'"
|
|
72
|
-
},
|
|
73
|
-
"default": "'right'",
|
|
74
|
-
"fieldName": "position"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"mixins": [
|
|
78
|
-
{
|
|
79
|
-
"name": "SizedMixin",
|
|
80
|
-
"package": "@spectrum-web-components/base"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"name": "ObserveSlotPresence",
|
|
84
|
-
"package": "@spectrum-web-components/shared/src/observe-slot-presence.js"
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
"superclass": {
|
|
88
|
-
"name": "ButtonBase",
|
|
89
|
-
"package": "@spectrum-web-components/button/src/ButtonBase.js"
|
|
90
|
-
},
|
|
91
|
-
"tagName": "sp-picker-button",
|
|
92
|
-
"customElement": true
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"exports": [
|
|
96
|
-
{
|
|
97
|
-
"kind": "js",
|
|
98
|
-
"name": "PickerButton",
|
|
99
|
-
"declaration": {
|
|
100
|
-
"name": "PickerButton",
|
|
101
|
-
"module": "src/PickerButton.js"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
}
|
package/src/spectrum-config.js
DELETED
|
@@ -1,252 +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-PickerButton');
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @property {string} size
|
|
23
|
-
* @returns {import('../../../tasks/spectrum-css-converter').ComplexSelectorConversion[]}
|
|
24
|
-
*/
|
|
25
|
-
const convertSize = (size) => [
|
|
26
|
-
{
|
|
27
|
-
collapseSelector: true,
|
|
28
|
-
find: [
|
|
29
|
-
// .spectrum-PickerButton.spectrum-PickerButton--sizeS
|
|
30
|
-
builder.class('spectrum-PickerButton'),
|
|
31
|
-
builder.class('spectrum-PickerButton--size' + size.toUpperCase()),
|
|
32
|
-
],
|
|
33
|
-
replace: [
|
|
34
|
-
{
|
|
35
|
-
replace: {
|
|
36
|
-
type: 'pseudo-class',
|
|
37
|
-
kind: 'host',
|
|
38
|
-
selectors: [builder.attribute('size', size)],
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
replace: builder.combinator(' '),
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
replace: builder.class('root'),
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
// .spectrum-PickerButton.spectrum-PickerButton--textuiicon.spectrum-PickerButton--sizeXL
|
|
51
|
-
collapseSelector: true,
|
|
52
|
-
find: [
|
|
53
|
-
builder.class('spectrum-PickerButton'),
|
|
54
|
-
builder.class('spectrum-PickerButton--textuiicon'),
|
|
55
|
-
builder.class('spectrum-PickerButton--size' + size.toUpperCase()),
|
|
56
|
-
],
|
|
57
|
-
replace: [
|
|
58
|
-
//:host([dir='ltr'][size='xl']) .root.textuiicon
|
|
59
|
-
{
|
|
60
|
-
replace: {
|
|
61
|
-
type: 'pseudo-class',
|
|
62
|
-
kind: 'host',
|
|
63
|
-
selectors: [builder.attribute('size', size)],
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
replace: builder.combinator(' '),
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
replace: builder.class('textuiicon'),
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
|
-
// .spectrum-PickerButton.spectrum-PickerButton--icononly.spectrum-PickerButton--sizeXL
|
|
75
|
-
{
|
|
76
|
-
collapseSelector: true,
|
|
77
|
-
find: [
|
|
78
|
-
builder.class('spectrum-PickerButton'),
|
|
79
|
-
builder.class('spectrum-PickerButton--icononly'),
|
|
80
|
-
builder.class('spectrum-PickerButton--size' + size.toUpperCase()),
|
|
81
|
-
],
|
|
82
|
-
replace: [
|
|
83
|
-
//:host([dir='ltr'][size='xl']) .root.textuiicon
|
|
84
|
-
{
|
|
85
|
-
replace: {
|
|
86
|
-
type: 'pseudo-class',
|
|
87
|
-
kind: 'host',
|
|
88
|
-
selectors: [builder.attribute('size', size)],
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
replace: builder.combinator(' '),
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
replace: builder.class('spectrum-PickerButton--icononly'),
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
},
|
|
99
|
-
// .spectrum-PickerButton.spectrum-PickerButton--uiicononly.spectrum-PickerButton--sizeXL
|
|
100
|
-
{
|
|
101
|
-
collapseSelector: true,
|
|
102
|
-
find: [
|
|
103
|
-
builder.class('spectrum-PickerButton'),
|
|
104
|
-
builder.class('spectrum-PickerButton--uiicononly'),
|
|
105
|
-
builder.class('spectrum-PickerButton--size' + size.toUpperCase()),
|
|
106
|
-
],
|
|
107
|
-
replace: [
|
|
108
|
-
//:host([dir='ltr'][size='xl']) .root.textuiicon
|
|
109
|
-
{
|
|
110
|
-
replace: {
|
|
111
|
-
type: 'pseudo-class',
|
|
112
|
-
kind: 'host',
|
|
113
|
-
selectors: [builder.attribute('size', size)],
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
replace: builder.combinator(' '),
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
replace: builder.class('uiicononly'),
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
},
|
|
124
|
-
];
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @type { import('../../../tasks/spectrum-css-converter').SpectrumCSSConverter }
|
|
128
|
-
*/
|
|
129
|
-
const config = {
|
|
130
|
-
conversions: [
|
|
131
|
-
{
|
|
132
|
-
inPackage: '@spectrum-css/pickerbutton',
|
|
133
|
-
outPackage: 'picker-button',
|
|
134
|
-
fileName: 'picker-button',
|
|
135
|
-
components: [
|
|
136
|
-
converter.classToClass('spectrum-PickerButton', 'root'),
|
|
137
|
-
converter.classToAttribute('is-focused', 'focused'),
|
|
138
|
-
{
|
|
139
|
-
find: [builder.pseudoClass('focus')],
|
|
140
|
-
replace: [
|
|
141
|
-
{
|
|
142
|
-
replace: builder.pseudoClass('focus'),
|
|
143
|
-
hoist: false,
|
|
144
|
-
},
|
|
145
|
-
],
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
find: [builder.pseudoClass('hover')],
|
|
149
|
-
replace: [
|
|
150
|
-
{
|
|
151
|
-
replace: builder.pseudoClass('hover'),
|
|
152
|
-
hoist: false,
|
|
153
|
-
},
|
|
154
|
-
],
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
find: [
|
|
158
|
-
builder.class('spectrum-PickerButton'),
|
|
159
|
-
{
|
|
160
|
-
type: 'pseudo-element',
|
|
161
|
-
kind: 'custom',
|
|
162
|
-
name: '-moz-focus-inner',
|
|
163
|
-
},
|
|
164
|
-
],
|
|
165
|
-
replace: [
|
|
166
|
-
{
|
|
167
|
-
replace: builder.class('root'),
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
replace: {
|
|
171
|
-
type: 'pseudo-element',
|
|
172
|
-
kind: 'custom',
|
|
173
|
-
name: '-moz-focus-inner',
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
],
|
|
177
|
-
},
|
|
178
|
-
converter.pseudoToAttribute('disabled', 'disabled'),
|
|
179
|
-
...convertSize('s'),
|
|
180
|
-
...convertSize('m'),
|
|
181
|
-
...convertSize('l'),
|
|
182
|
-
...convertSize('xl'),
|
|
183
|
-
converter.notToAttribute('is-open', 'open'),
|
|
184
|
-
converter.classToAttribute('is-open', 'open'),
|
|
185
|
-
{
|
|
186
|
-
find: {
|
|
187
|
-
type: 'pseudo-class',
|
|
188
|
-
kind: 'not',
|
|
189
|
-
selectors: [[builder.pseudoClass('disabled')]],
|
|
190
|
-
},
|
|
191
|
-
replace: {
|
|
192
|
-
type: 'pseudo-class',
|
|
193
|
-
kind: 'not',
|
|
194
|
-
selectors: [[builder.attribute('disabled')]],
|
|
195
|
-
},
|
|
196
|
-
hoist: true,
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
find: {
|
|
200
|
-
type: 'pseudo-class',
|
|
201
|
-
kind: 'active',
|
|
202
|
-
},
|
|
203
|
-
replace: {
|
|
204
|
-
type: 'pseudo-class',
|
|
205
|
-
kind: 'is',
|
|
206
|
-
selectors: [
|
|
207
|
-
[
|
|
208
|
-
{
|
|
209
|
-
type: 'pseudo-class',
|
|
210
|
-
kind: 'active',
|
|
211
|
-
},
|
|
212
|
-
],
|
|
213
|
-
[
|
|
214
|
-
{
|
|
215
|
-
type: 'attribute',
|
|
216
|
-
name: 'active',
|
|
217
|
-
},
|
|
218
|
-
],
|
|
219
|
-
],
|
|
220
|
-
},
|
|
221
|
-
hoist: true,
|
|
222
|
-
},
|
|
223
|
-
converter.classToAttribute('is-invalid', 'invalid'),
|
|
224
|
-
converter.notToAttribute('is-invalid', 'invalid'),
|
|
225
|
-
...converter.enumerateAttributes(
|
|
226
|
-
[
|
|
227
|
-
['spectrum-PickerButton--right'],
|
|
228
|
-
['spectrum-PickerButton--left'],
|
|
229
|
-
],
|
|
230
|
-
'position'
|
|
231
|
-
),
|
|
232
|
-
converter.classToAttribute('spectrum-PickerButton--rounded'),
|
|
233
|
-
converter.notToAttribute(
|
|
234
|
-
'spectrum-PickerButton--rounded',
|
|
235
|
-
'rounded'
|
|
236
|
-
),
|
|
237
|
-
converter.classToAttribute(
|
|
238
|
-
'spectrum-PickerButton--quiet',
|
|
239
|
-
'quiet'
|
|
240
|
-
),
|
|
241
|
-
converter.classToClass('spectrum-PickerButton--uiicononly'),
|
|
242
|
-
converter.classToClass('spectrum-PickerButton--textuiicon'),
|
|
243
|
-
],
|
|
244
|
-
excludeByComponents: [
|
|
245
|
-
builder.class('spectrum--medium'),
|
|
246
|
-
builder.class('spectrum--large'),
|
|
247
|
-
],
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
export default config;
|