@m3e/split-button 1.0.0-rc.1

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.
@@ -0,0 +1,447 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/index.ts",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "js",
12
+ "name": "*",
13
+ "declaration": {
14
+ "name": "*",
15
+ "package": "\"./SplitButtonElement\""
16
+ }
17
+ },
18
+ {
19
+ "kind": "js",
20
+ "name": "*",
21
+ "declaration": {
22
+ "name": "*",
23
+ "package": "\"./SplitButtonVariant\""
24
+ }
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "kind": "javascript-module",
30
+ "path": "src/SplitButtonElement.ts",
31
+ "declarations": [
32
+ {
33
+ "kind": "class",
34
+ "description": "",
35
+ "name": "M3eSplitButtonElement",
36
+ "cssProperties": [
37
+ {
38
+ "description": "Leading space for the trailing button (extra-small, unselected).",
39
+ "name": "--m3e-split-button-extra-small-trailing-button-unselected-leading-space"
40
+ },
41
+ {
42
+ "description": "Trailing space for the trailing button (extra-small, unselected).",
43
+ "name": "--m3e-split-button-extra-small-trailing-button-unselected-trailing-space"
44
+ },
45
+ {
46
+ "description": "Leading space for the trailing button (small, unselected).",
47
+ "name": "--m3e-split-button-small-trailing-button-unselected-leading-space"
48
+ },
49
+ {
50
+ "description": "Trailing space for the trailing button (small, unselected).",
51
+ "name": "--m3e-split-button-small-trailing-button-unselected-trailing-space"
52
+ },
53
+ {
54
+ "description": "Leading space for the trailing button (medium, unselected).",
55
+ "name": "--m3e-split-button-medium-trailing-button-unselected-leading-space"
56
+ },
57
+ {
58
+ "description": "Trailing space for the trailing button (medium, unselected).",
59
+ "name": "--m3e-split-button-medium-trailing-button-unselected-trailing-space"
60
+ },
61
+ {
62
+ "description": "Leading space for the trailing button (large, unselected).",
63
+ "name": "--m3e-split-button-large-trailing-button-unselected-leading-space"
64
+ },
65
+ {
66
+ "description": "Trailing space for the trailing button (large, unselected).",
67
+ "name": "--m3e-split-button-large-trailing-button-unselected-trailing-space"
68
+ },
69
+ {
70
+ "description": "Leading space for the trailing button (extra-large, unselected).",
71
+ "name": "--m3e-split-button-extra-large-trailing-button-unselected-leading-space"
72
+ },
73
+ {
74
+ "description": "Trailing space for the trailing button (extra-large, unselected).",
75
+ "name": "--m3e-split-button-extra-large-trailing-button-unselected-trailing-space"
76
+ },
77
+ {
78
+ "description": "Leading space for the trailing button (extra-small, selected).",
79
+ "name": "--m3e-split-button-extra-small-trailing-button-selected-leading-space"
80
+ },
81
+ {
82
+ "description": "Trailing space for the trailing button (extra-small, selected).",
83
+ "name": "--m3e-split-button-extra-small-trailing-button-selected-trailing-space"
84
+ },
85
+ {
86
+ "description": "Leading space for the trailing button (small, selected).",
87
+ "name": "--m3e-split-button-small-trailing-button-selected-leading-space"
88
+ },
89
+ {
90
+ "description": "Trailing space for the trailing button (small, selected).",
91
+ "name": "--m3e-split-button-small-trailing-button-selected-trailing-space"
92
+ },
93
+ {
94
+ "description": "Leading space for the trailing button (medium, selected).",
95
+ "name": "--m3e-split-button-medium-trailing-button-selected-leading-space"
96
+ },
97
+ {
98
+ "description": "Trailing space for the trailing button (medium, selected).",
99
+ "name": "--m3e-split-button-medium-trailing-button-selected-trailing-space"
100
+ },
101
+ {
102
+ "description": "Leading space for the trailing button (large, selected).",
103
+ "name": "--m3e-split-button-large-trailing-button-selected-leading-space"
104
+ },
105
+ {
106
+ "description": "Trailing space for the trailing button (large, selected).",
107
+ "name": "--m3e-split-button-large-trailing-button-selected-trailing-space"
108
+ },
109
+ {
110
+ "description": "Leading space for the trailing button (extra-large, selected).",
111
+ "name": "--m3e-split-button-extra-large-trailing-button-selected-leading-space"
112
+ },
113
+ {
114
+ "description": "Trailing space for the trailing button (extra-large, selected).",
115
+ "name": "--m3e-split-button-extra-large-trailing-button-selected-trailing-space"
116
+ },
117
+ {
118
+ "description": "Inner corner size for the leading/trailing button (extra-small).",
119
+ "name": "--m3e-split-button-extra-small-inner-corner-size"
120
+ },
121
+ {
122
+ "description": "Inner corner size for the leading/trailing button (small).",
123
+ "name": "--m3e-split-button-small-inner-corner-size"
124
+ },
125
+ {
126
+ "description": "Inner corner size for the leading/trailing button (medium).",
127
+ "name": "--m3e-split-button-medium-inner-corner-size"
128
+ },
129
+ {
130
+ "description": "Inner corner size for the leading/trailing button (large).",
131
+ "name": "--m3e-split-button-large-inner-corner-size"
132
+ },
133
+ {
134
+ "description": "Inner corner size for the leading/trailing button (extra-large).",
135
+ "name": "--m3e-split-button-extra-large-inner-corner-size"
136
+ },
137
+ {
138
+ "description": "Inner corner size on hover (extra-small).",
139
+ "name": "--m3e-split-button-extra-small-inner-corner-hover-size"
140
+ },
141
+ {
142
+ "description": "Inner corner size on hover (small).",
143
+ "name": "--m3e-split-button-small-inner-corner-hover-size"
144
+ },
145
+ {
146
+ "description": "Inner corner size on hover (medium).",
147
+ "name": "--m3e-split-button-medium-inner-corner-hover-size"
148
+ },
149
+ {
150
+ "description": "Inner corner size on hover (large).",
151
+ "name": "--m3e-split-button-large-inner-corner-hover-size"
152
+ },
153
+ {
154
+ "description": "Inner corner size on hover (extra-large).",
155
+ "name": "--m3e-split-button-extra-large-inner-corner-hover-size"
156
+ },
157
+ {
158
+ "description": "Inner corner size on press (extra-small).",
159
+ "name": "--m3e-split-button-extra-small-inner-corner-pressed-size"
160
+ },
161
+ {
162
+ "description": "Inner corner size on press (small).",
163
+ "name": "--m3e-split-button-small-inner-corner-pressed-size"
164
+ },
165
+ {
166
+ "description": "Inner corner size on press (medium).",
167
+ "name": "--m3e-split-button-medium-inner-corner-pressed-size"
168
+ },
169
+ {
170
+ "description": "Inner corner size on press (large).",
171
+ "name": "--m3e-split-button-large-inner-corner-pressed-size"
172
+ },
173
+ {
174
+ "description": "Inner corner size on press (extra-large).",
175
+ "name": "--m3e-split-button-extra-large-inner-corner-pressed-size"
176
+ },
177
+ {
178
+ "description": "Spacing between leading and trailing buttons (extra-small).",
179
+ "name": "--m3e-split-button-extra-small-between-spacing"
180
+ },
181
+ {
182
+ "description": "Spacing between leading and trailing buttons (small).",
183
+ "name": "--m3e-split-button-small-between-spacing"
184
+ },
185
+ {
186
+ "description": "Spacing between leading and trailing buttons (medium).",
187
+ "name": "--m3e-split-button-medium-between-spacing"
188
+ },
189
+ {
190
+ "description": "Spacing between leading and trailing buttons (large).",
191
+ "name": "--m3e-split-button-large-between-spacing"
192
+ },
193
+ {
194
+ "description": "Spacing between leading and trailing buttons (extra-large).",
195
+ "name": "--m3e-split-button-extra-large-between-spacing"
196
+ }
197
+ ],
198
+ "slots": [
199
+ {
200
+ "description": "The leading button used to perform the primary action.",
201
+ "name": "leading-button"
202
+ },
203
+ {
204
+ "description": "The trailing icon button used to open a menu of related actions.",
205
+ "name": "trailing-button"
206
+ }
207
+ ],
208
+ "members": [
209
+ {
210
+ "kind": "field",
211
+ "name": "_base",
212
+ "type": {
213
+ "text": "HTMLElement | undefined"
214
+ },
215
+ "privacy": "private",
216
+ "readonly": true
217
+ },
218
+ {
219
+ "kind": "field",
220
+ "name": "#leadingButton",
221
+ "privacy": "private",
222
+ "type": {
223
+ "text": "M3eButtonElement | undefined"
224
+ }
225
+ },
226
+ {
227
+ "kind": "field",
228
+ "name": "#trailingButton",
229
+ "privacy": "private",
230
+ "type": {
231
+ "text": "M3eIconButtonElement | undefined"
232
+ }
233
+ },
234
+ {
235
+ "kind": "field",
236
+ "name": "#trailingButtonHover",
237
+ "privacy": "private",
238
+ "type": {
239
+ "text": "boolean"
240
+ },
241
+ "default": "false"
242
+ },
243
+ {
244
+ "kind": "field",
245
+ "name": "#pressedController",
246
+ "privacy": "private",
247
+ "readonly": true,
248
+ "default": "new PressedController(this, { target: null, capture: true, isPressedKey: (key) => key === \" \" || key === \"Enter\", callback: (pressed, _, target) => { switch (target) { case this.#leadingButton: this.#updateLeadingButtonShape(pressed); break; case this.#trailingButton: this.#updateTrailingButtonShape(pressed || this.#trailingButtonHover); break; } }, })"
249
+ },
250
+ {
251
+ "kind": "field",
252
+ "name": "#hoverController",
253
+ "privacy": "private",
254
+ "readonly": true,
255
+ "default": "new HoverController(this, { target: null, callback: (hovering, target) => { switch (target) { case this.#trailingButton: if (!this.#trailingButton?.disabled && !this.#trailingButton?.disabledInteractive) { this.#trailingButtonHover = hovering; this.#updateTrailingButtonShape(hovering); } break; } }, })"
256
+ },
257
+ {
258
+ "kind": "field",
259
+ "name": "variant",
260
+ "type": {
261
+ "text": "SplitButtonVariant"
262
+ },
263
+ "default": "\"filled\"",
264
+ "description": "The appearance variant of the button.",
265
+ "attribute": "variant",
266
+ "reflects": true
267
+ },
268
+ {
269
+ "kind": "field",
270
+ "name": "size",
271
+ "type": {
272
+ "text": "ButtonSize"
273
+ },
274
+ "default": "\"small\"",
275
+ "description": "The size of the button.",
276
+ "attribute": "size",
277
+ "reflects": true
278
+ },
279
+ {
280
+ "kind": "method",
281
+ "name": "#handleLeadingSlotChange",
282
+ "privacy": "private",
283
+ "return": {
284
+ "type": {
285
+ "text": "void"
286
+ }
287
+ },
288
+ "parameters": [
289
+ {
290
+ "name": "e",
291
+ "type": {
292
+ "text": "Event"
293
+ }
294
+ }
295
+ ]
296
+ },
297
+ {
298
+ "kind": "method",
299
+ "name": "#handleTrailingSlotChange",
300
+ "privacy": "private",
301
+ "return": {
302
+ "type": {
303
+ "text": "void"
304
+ }
305
+ },
306
+ "parameters": [
307
+ {
308
+ "name": "e",
309
+ "type": {
310
+ "text": "Event"
311
+ }
312
+ }
313
+ ]
314
+ },
315
+ {
316
+ "kind": "method",
317
+ "name": "#updateButtons",
318
+ "privacy": "private",
319
+ "return": {
320
+ "type": {
321
+ "text": "void"
322
+ }
323
+ }
324
+ },
325
+ {
326
+ "kind": "method",
327
+ "name": "#updateLeadingButtonShape",
328
+ "privacy": "private",
329
+ "return": {
330
+ "type": {
331
+ "text": "void"
332
+ }
333
+ },
334
+ "parameters": [
335
+ {
336
+ "name": "update",
337
+ "type": {
338
+ "text": "boolean"
339
+ }
340
+ }
341
+ ]
342
+ },
343
+ {
344
+ "kind": "method",
345
+ "name": "#updateTrailingButtonShape",
346
+ "privacy": "private",
347
+ "return": {
348
+ "type": {
349
+ "text": "void"
350
+ }
351
+ },
352
+ "parameters": [
353
+ {
354
+ "name": "update",
355
+ "type": {
356
+ "text": "boolean"
357
+ }
358
+ }
359
+ ]
360
+ },
361
+ {
362
+ "kind": "method",
363
+ "name": "#updateButtonShape",
364
+ "privacy": "private",
365
+ "return": {
366
+ "type": {
367
+ "text": "void"
368
+ }
369
+ },
370
+ "parameters": [
371
+ {
372
+ "name": "button",
373
+ "type": {
374
+ "text": "HTMLElement"
375
+ }
376
+ },
377
+ {
378
+ "name": "property",
379
+ "type": {
380
+ "text": "string"
381
+ }
382
+ }
383
+ ]
384
+ }
385
+ ],
386
+ "attributes": [
387
+ {
388
+ "description": "The appearance variant of the button.",
389
+ "name": "variant",
390
+ "type": {
391
+ "text": "SplitButtonVariant"
392
+ },
393
+ "default": "\"filled\"",
394
+ "fieldName": "variant"
395
+ },
396
+ {
397
+ "description": "The size of the button.",
398
+ "name": "size",
399
+ "type": {
400
+ "text": "ButtonSize"
401
+ },
402
+ "default": "\"small\"",
403
+ "fieldName": "size"
404
+ }
405
+ ],
406
+ "mixins": [
407
+ {
408
+ "name": "Role",
409
+ "package": "@m3e/core"
410
+ }
411
+ ],
412
+ "superclass": {
413
+ "name": "LitElement",
414
+ "package": "lit"
415
+ },
416
+ "tagName": "m3e-split-button",
417
+ "customElement": true,
418
+ "summary": "A button used to show an action with a menu of related actions."
419
+ }
420
+ ],
421
+ "exports": [
422
+ {
423
+ "kind": "js",
424
+ "name": "M3eSplitButtonElement",
425
+ "declaration": {
426
+ "name": "M3eSplitButtonElement",
427
+ "module": "src/SplitButtonElement.ts"
428
+ }
429
+ },
430
+ {
431
+ "kind": "custom-element-definition",
432
+ "name": "m3e-split-button",
433
+ "declaration": {
434
+ "name": "M3eSplitButtonElement",
435
+ "module": "src/SplitButtonElement.ts"
436
+ }
437
+ }
438
+ ]
439
+ },
440
+ {
441
+ "kind": "javascript-module",
442
+ "path": "src/SplitButtonVariant.ts",
443
+ "declarations": [],
444
+ "exports": []
445
+ }
446
+ ]
447
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "tags": [
5
+ {
6
+ "name": "m3e-split-button",
7
+ "description": "A button used to show an action with a menu of related actions.\n---\n\n\n### **Slots:**\n - **leading-button** - The leading button used to perform the primary action.\n- **trailing-button** - The trailing icon button used to open a menu of related actions.\n\n### **CSS Properties:**\n - **--m3e-split-button-extra-small-trailing-button-unselected-leading-space** - Leading space for the trailing button (extra-small, unselected). _(default: undefined)_\n- **--m3e-split-button-extra-small-trailing-button-unselected-trailing-space** - Trailing space for the trailing button (extra-small, unselected). _(default: undefined)_\n- **--m3e-split-button-small-trailing-button-unselected-leading-space** - Leading space for the trailing button (small, unselected). _(default: undefined)_\n- **--m3e-split-button-small-trailing-button-unselected-trailing-space** - Trailing space for the trailing button (small, unselected). _(default: undefined)_\n- **--m3e-split-button-medium-trailing-button-unselected-leading-space** - Leading space for the trailing button (medium, unselected). _(default: undefined)_\n- **--m3e-split-button-medium-trailing-button-unselected-trailing-space** - Trailing space for the trailing button (medium, unselected). _(default: undefined)_\n- **--m3e-split-button-large-trailing-button-unselected-leading-space** - Leading space for the trailing button (large, unselected). _(default: undefined)_\n- **--m3e-split-button-large-trailing-button-unselected-trailing-space** - Trailing space for the trailing button (large, unselected). _(default: undefined)_\n- **--m3e-split-button-extra-large-trailing-button-unselected-leading-space** - Leading space for the trailing button (extra-large, unselected). _(default: undefined)_\n- **--m3e-split-button-extra-large-trailing-button-unselected-trailing-space** - Trailing space for the trailing button (extra-large, unselected). _(default: undefined)_\n- **--m3e-split-button-extra-small-trailing-button-selected-leading-space** - Leading space for the trailing button (extra-small, selected). _(default: undefined)_\n- **--m3e-split-button-extra-small-trailing-button-selected-trailing-space** - Trailing space for the trailing button (extra-small, selected). _(default: undefined)_\n- **--m3e-split-button-small-trailing-button-selected-leading-space** - Leading space for the trailing button (small, selected). _(default: undefined)_\n- **--m3e-split-button-small-trailing-button-selected-trailing-space** - Trailing space for the trailing button (small, selected). _(default: undefined)_\n- **--m3e-split-button-medium-trailing-button-selected-leading-space** - Leading space for the trailing button (medium, selected). _(default: undefined)_\n- **--m3e-split-button-medium-trailing-button-selected-trailing-space** - Trailing space for the trailing button (medium, selected). _(default: undefined)_\n- **--m3e-split-button-large-trailing-button-selected-leading-space** - Leading space for the trailing button (large, selected). _(default: undefined)_\n- **--m3e-split-button-large-trailing-button-selected-trailing-space** - Trailing space for the trailing button (large, selected). _(default: undefined)_\n- **--m3e-split-button-extra-large-trailing-button-selected-leading-space** - Leading space for the trailing button (extra-large, selected). _(default: undefined)_\n- **--m3e-split-button-extra-large-trailing-button-selected-trailing-space** - Trailing space for the trailing button (extra-large, selected). _(default: undefined)_\n- **--m3e-split-button-extra-small-inner-corner-size** - Inner corner size for the leading/trailing button (extra-small). _(default: undefined)_\n- **--m3e-split-button-small-inner-corner-size** - Inner corner size for the leading/trailing button (small). _(default: undefined)_\n- **--m3e-split-button-medium-inner-corner-size** - Inner corner size for the leading/trailing button (medium). _(default: undefined)_\n- **--m3e-split-button-large-inner-corner-size** - Inner corner size for the leading/trailing button (large). _(default: undefined)_\n- **--m3e-split-button-extra-large-inner-corner-size** - Inner corner size for the leading/trailing button (extra-large). _(default: undefined)_\n- **--m3e-split-button-extra-small-inner-corner-hover-size** - Inner corner size on hover (extra-small). _(default: undefined)_\n- **--m3e-split-button-small-inner-corner-hover-size** - Inner corner size on hover (small). _(default: undefined)_\n- **--m3e-split-button-medium-inner-corner-hover-size** - Inner corner size on hover (medium). _(default: undefined)_\n- **--m3e-split-button-large-inner-corner-hover-size** - Inner corner size on hover (large). _(default: undefined)_\n- **--m3e-split-button-extra-large-inner-corner-hover-size** - Inner corner size on hover (extra-large). _(default: undefined)_\n- **--m3e-split-button-extra-small-inner-corner-pressed-size** - Inner corner size on press (extra-small). _(default: undefined)_\n- **--m3e-split-button-small-inner-corner-pressed-size** - Inner corner size on press (small). _(default: undefined)_\n- **--m3e-split-button-medium-inner-corner-pressed-size** - Inner corner size on press (medium). _(default: undefined)_\n- **--m3e-split-button-large-inner-corner-pressed-size** - Inner corner size on press (large). _(default: undefined)_\n- **--m3e-split-button-extra-large-inner-corner-pressed-size** - Inner corner size on press (extra-large). _(default: undefined)_\n- **--m3e-split-button-extra-small-between-spacing** - Spacing between leading and trailing buttons (extra-small). _(default: undefined)_\n- **--m3e-split-button-small-between-spacing** - Spacing between leading and trailing buttons (small). _(default: undefined)_\n- **--m3e-split-button-medium-between-spacing** - Spacing between leading and trailing buttons (medium). _(default: undefined)_\n- **--m3e-split-button-large-between-spacing** - Spacing between leading and trailing buttons (large). _(default: undefined)_\n- **--m3e-split-button-extra-large-between-spacing** - Spacing between leading and trailing buttons (extra-large). _(default: undefined)_",
8
+ "attributes": [
9
+ {
10
+ "name": "variant",
11
+ "description": "The appearance variant of the button.",
12
+ "values": [{ "name": "SplitButtonVariant" }]
13
+ },
14
+ {
15
+ "name": "size",
16
+ "description": "The size of the button.",
17
+ "values": [{ "name": "ButtonSize" }]
18
+ }
19
+ ],
20
+ "references": []
21
+ }
22
+ ]
23
+ }