@spectrum-web-components/checkbox 0.40.0 → 0.40.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.
@@ -32,6 +32,27 @@
32
32
  }
33
33
  ],
34
34
  "members": [
35
+ {
36
+ "kind": "field",
37
+ "name": "shadowRootOptions",
38
+ "type": {
39
+ "text": "object"
40
+ },
41
+ "static": true,
42
+ "default": "{\n ...SpectrumElement.shadowRootOptions,\n delegatesFocus: true,\n }"
43
+ },
44
+ {
45
+ "kind": "field",
46
+ "name": "disabled",
47
+ "type": {
48
+ "text": "boolean"
49
+ },
50
+ "privacy": "public",
51
+ "default": "false",
52
+ "description": "Disable this control. It will not receive focus or events",
53
+ "attribute": "disabled",
54
+ "reflects": true
55
+ },
35
56
  {
36
57
  "kind": "field",
37
58
  "name": "indeterminate",
@@ -65,6 +86,27 @@
65
86
  "attribute": "emphasized",
66
87
  "reflects": true
67
88
  },
89
+ {
90
+ "kind": "field",
91
+ "name": "tabIndex",
92
+ "type": {
93
+ "text": "number"
94
+ },
95
+ "privacy": "public",
96
+ "default": "0",
97
+ "attribute": "tabindex",
98
+ "reflects": true
99
+ },
100
+ {
101
+ "kind": "method",
102
+ "name": "click",
103
+ "privacy": "public",
104
+ "return": {
105
+ "type": {
106
+ "text": "void"
107
+ }
108
+ }
109
+ },
68
110
  {
69
111
  "kind": "method",
70
112
  "name": "handleChange",
@@ -75,8 +117,8 @@
75
117
  }
76
118
  },
77
119
  "inheritedFrom": {
78
- "name": "CheckboxBase",
79
- "module": "src/CheckboxBase.js"
120
+ "name": "CheckboxMixin",
121
+ "module": "src/CheckboxMixin.js"
80
122
  }
81
123
  },
82
124
  {
@@ -90,37 +132,37 @@
90
132
  "attribute": "checked",
91
133
  "reflects": true,
92
134
  "inheritedFrom": {
93
- "name": "CheckboxBase",
94
- "module": "src/CheckboxBase.js"
135
+ "name": "CheckboxMixin",
136
+ "module": "src/CheckboxMixin.js"
95
137
  }
96
138
  },
97
139
  {
98
140
  "kind": "field",
99
- "name": "readonly",
141
+ "name": "name",
100
142
  "type": {
101
- "text": "boolean"
143
+ "text": "string | undefined"
102
144
  },
103
145
  "privacy": "public",
104
- "default": "false",
105
- "attribute": "readonly",
146
+ "attribute": "name",
106
147
  "reflects": true,
107
148
  "inheritedFrom": {
108
- "name": "CheckboxBase",
109
- "module": "src/CheckboxBase.js"
149
+ "name": "CheckboxMixin",
150
+ "module": "src/CheckboxMixin.js"
110
151
  }
111
152
  },
112
153
  {
113
154
  "kind": "field",
114
- "name": "name",
155
+ "name": "readonly",
115
156
  "type": {
116
- "text": "string | undefined"
157
+ "text": "boolean"
117
158
  },
118
159
  "privacy": "public",
119
- "attribute": "name",
160
+ "default": "false",
161
+ "attribute": "readonly",
120
162
  "reflects": true,
121
163
  "inheritedFrom": {
122
- "name": "CheckboxBase",
123
- "module": "src/CheckboxBase.js"
164
+ "name": "CheckboxMixin",
165
+ "module": "src/CheckboxMixin.js"
124
166
  }
125
167
  },
126
168
  {
@@ -129,23 +171,23 @@
129
171
  "type": {
130
172
  "text": "HTMLInputElement"
131
173
  },
132
- "privacy": "protected",
133
174
  "inheritedFrom": {
134
- "name": "CheckboxBase",
135
- "module": "src/CheckboxBase.js"
175
+ "name": "CheckboxMixin",
176
+ "module": "src/CheckboxMixin.js"
136
177
  }
137
178
  },
138
179
  {
139
- "kind": "field",
140
- "name": "focusElement",
141
- "type": {
142
- "text": "HTMLElement"
180
+ "kind": "method",
181
+ "name": "render",
182
+ "privacy": "protected",
183
+ "return": {
184
+ "type": {
185
+ "text": "TemplateResult"
186
+ }
143
187
  },
144
- "privacy": "public",
145
- "readonly": true,
146
188
  "inheritedFrom": {
147
- "name": "CheckboxBase",
148
- "module": "src/CheckboxBase.js"
189
+ "name": "CheckboxMixin",
190
+ "module": "src/CheckboxMixin.js"
149
191
  }
150
192
  }
151
193
  ],
@@ -156,6 +198,15 @@
156
198
  }
157
199
  ],
158
200
  "attributes": [
201
+ {
202
+ "name": "disabled",
203
+ "type": {
204
+ "text": "boolean"
205
+ },
206
+ "default": "false",
207
+ "description": "Disable this control. It will not receive focus or events",
208
+ "fieldName": "disabled"
209
+ },
159
210
  {
160
211
  "name": "indeterminate",
161
212
  "type": {
@@ -180,6 +231,14 @@
180
231
  "default": "false",
181
232
  "fieldName": "emphasized"
182
233
  },
234
+ {
235
+ "name": "tabindex",
236
+ "type": {
237
+ "text": "number"
238
+ },
239
+ "default": "0",
240
+ "fieldName": "tabIndex"
241
+ },
183
242
  {
184
243
  "name": "checked",
185
244
  "type": {
@@ -188,31 +247,31 @@
188
247
  "default": "false",
189
248
  "fieldName": "checked",
190
249
  "inheritedFrom": {
191
- "name": "CheckboxBase",
192
- "module": "src/CheckboxBase.ts"
250
+ "name": "CheckboxMixin",
251
+ "module": "src/CheckboxMixin.ts"
193
252
  }
194
253
  },
195
254
  {
196
- "name": "readonly",
255
+ "name": "name",
197
256
  "type": {
198
- "text": "boolean"
257
+ "text": "string | undefined"
199
258
  },
200
- "default": "false",
201
- "fieldName": "readonly",
259
+ "fieldName": "name",
202
260
  "inheritedFrom": {
203
- "name": "CheckboxBase",
204
- "module": "src/CheckboxBase.ts"
261
+ "name": "CheckboxMixin",
262
+ "module": "src/CheckboxMixin.ts"
205
263
  }
206
264
  },
207
265
  {
208
- "name": "name",
266
+ "name": "readonly",
209
267
  "type": {
210
- "text": "string | undefined"
268
+ "text": "boolean"
211
269
  },
212
- "fieldName": "name",
270
+ "default": "false",
271
+ "fieldName": "readonly",
213
272
  "inheritedFrom": {
214
- "name": "CheckboxBase",
215
- "module": "src/CheckboxBase.ts"
273
+ "name": "CheckboxMixin",
274
+ "module": "src/CheckboxMixin.ts"
216
275
  }
217
276
  }
218
277
  ],
@@ -220,11 +279,15 @@
220
279
  {
221
280
  "name": "SizedMixin",
222
281
  "package": "@spectrum-web-components/base"
282
+ },
283
+ {
284
+ "name": "CheckboxMixin",
285
+ "module": "/src/CheckboxMixin.js"
223
286
  }
224
287
  ],
225
288
  "superclass": {
226
- "name": "CheckboxBase",
227
- "module": "/src/CheckboxBase.js"
289
+ "name": "SpectrumElement",
290
+ "package": "@spectrum-web-components/base"
228
291
  },
229
292
  "tagName": "sp-checkbox",
230
293
  "customElement": true
@@ -250,6 +313,15 @@
250
313
  "description": "",
251
314
  "name": "CheckboxBase",
252
315
  "members": [
316
+ {
317
+ "kind": "field",
318
+ "name": "focusElement",
319
+ "type": {
320
+ "text": "HTMLElement"
321
+ },
322
+ "privacy": "public",
323
+ "readonly": true
324
+ },
253
325
  {
254
326
  "kind": "field",
255
327
  "name": "checked",
@@ -259,7 +331,25 @@
259
331
  "privacy": "public",
260
332
  "default": "false",
261
333
  "attribute": "checked",
262
- "reflects": true
334
+ "reflects": true,
335
+ "inheritedFrom": {
336
+ "name": "CheckboxMixin",
337
+ "module": "src/CheckboxMixin.js"
338
+ }
339
+ },
340
+ {
341
+ "kind": "field",
342
+ "name": "name",
343
+ "type": {
344
+ "text": "string | undefined"
345
+ },
346
+ "privacy": "public",
347
+ "attribute": "name",
348
+ "reflects": true,
349
+ "inheritedFrom": {
350
+ "name": "CheckboxMixin",
351
+ "module": "src/CheckboxMixin.js"
352
+ }
263
353
  },
264
354
  {
265
355
  "kind": "field",
@@ -270,34 +360,159 @@
270
360
  "privacy": "public",
271
361
  "default": "false",
272
362
  "attribute": "readonly",
273
- "reflects": true
363
+ "reflects": true,
364
+ "inheritedFrom": {
365
+ "name": "CheckboxMixin",
366
+ "module": "src/CheckboxMixin.js"
367
+ }
274
368
  },
275
369
  {
276
370
  "kind": "field",
371
+ "name": "inputElement",
372
+ "type": {
373
+ "text": "HTMLInputElement"
374
+ },
375
+ "inheritedFrom": {
376
+ "name": "CheckboxMixin",
377
+ "module": "src/CheckboxMixin.js"
378
+ }
379
+ },
380
+ {
381
+ "kind": "method",
382
+ "name": "handleChange",
383
+ "privacy": "public",
384
+ "return": {
385
+ "type": {
386
+ "text": "void"
387
+ }
388
+ },
389
+ "inheritedFrom": {
390
+ "name": "CheckboxMixin",
391
+ "module": "src/CheckboxMixin.js"
392
+ }
393
+ },
394
+ {
395
+ "kind": "method",
396
+ "name": "render",
397
+ "privacy": "protected",
398
+ "return": {
399
+ "type": {
400
+ "text": "TemplateResult"
401
+ }
402
+ },
403
+ "inheritedFrom": {
404
+ "name": "CheckboxMixin",
405
+ "module": "src/CheckboxMixin.js"
406
+ }
407
+ }
408
+ ],
409
+ "mixins": [
410
+ {
411
+ "name": "CheckboxMixin",
412
+ "module": "/src/CheckboxMixin.js"
413
+ }
414
+ ],
415
+ "superclass": {
416
+ "name": "Focusable",
417
+ "package": "@spectrum-web-components/shared/src/focusable.js"
418
+ },
419
+ "attributes": [
420
+ {
421
+ "name": "checked",
422
+ "type": {
423
+ "text": "boolean"
424
+ },
425
+ "default": "false",
426
+ "fieldName": "checked",
427
+ "inheritedFrom": {
428
+ "name": "CheckboxMixin",
429
+ "module": "src/CheckboxMixin.ts"
430
+ }
431
+ },
432
+ {
277
433
  "name": "name",
278
434
  "type": {
279
435
  "text": "string | undefined"
280
436
  },
437
+ "fieldName": "name",
438
+ "inheritedFrom": {
439
+ "name": "CheckboxMixin",
440
+ "module": "src/CheckboxMixin.ts"
441
+ }
442
+ },
443
+ {
444
+ "name": "readonly",
445
+ "type": {
446
+ "text": "boolean"
447
+ },
448
+ "default": "false",
449
+ "fieldName": "readonly",
450
+ "inheritedFrom": {
451
+ "name": "CheckboxMixin",
452
+ "module": "src/CheckboxMixin.ts"
453
+ }
454
+ }
455
+ ]
456
+ }
457
+ ],
458
+ "exports": [
459
+ {
460
+ "kind": "js",
461
+ "name": "CheckboxBase",
462
+ "declaration": {
463
+ "name": "CheckboxBase",
464
+ "module": "src/CheckboxBase.js"
465
+ }
466
+ }
467
+ ]
468
+ },
469
+ {
470
+ "kind": "javascript-module",
471
+ "path": "src/CheckboxMixin.js",
472
+ "declarations": [
473
+ {
474
+ "kind": "mixin",
475
+ "description": "",
476
+ "name": "CheckboxMixin",
477
+ "members": [
478
+ {
479
+ "kind": "field",
480
+ "name": "checked",
481
+ "type": {
482
+ "text": "boolean"
483
+ },
281
484
  "privacy": "public",
282
- "attribute": "name",
485
+ "default": "false",
486
+ "attribute": "checked",
283
487
  "reflects": true
284
488
  },
285
489
  {
286
490
  "kind": "field",
287
- "name": "inputElement",
491
+ "name": "name",
288
492
  "type": {
289
- "text": "HTMLInputElement"
493
+ "text": "string | undefined"
290
494
  },
291
- "privacy": "protected"
495
+ "privacy": "public",
496
+ "attribute": "name",
497
+ "reflects": true
292
498
  },
293
499
  {
294
500
  "kind": "field",
295
- "name": "focusElement",
501
+ "name": "readonly",
296
502
  "type": {
297
- "text": "HTMLElement"
503
+ "text": "boolean"
298
504
  },
299
505
  "privacy": "public",
300
- "readonly": true
506
+ "default": "false",
507
+ "attribute": "readonly",
508
+ "reflects": true
509
+ },
510
+ {
511
+ "kind": "field",
512
+ "name": "inputElement",
513
+ "type": {
514
+ "text": "HTMLInputElement"
515
+ }
301
516
  },
302
517
  {
303
518
  "kind": "method",
@@ -308,6 +523,16 @@
308
523
  "text": "void"
309
524
  }
310
525
  }
526
+ },
527
+ {
528
+ "kind": "method",
529
+ "name": "render",
530
+ "privacy": "protected",
531
+ "return": {
532
+ "type": {
533
+ "text": "TemplateResult"
534
+ }
535
+ }
311
536
  }
312
537
  ],
313
538
  "attributes": [
@@ -319,6 +544,13 @@
319
544
  "default": "false",
320
545
  "fieldName": "checked"
321
546
  },
547
+ {
548
+ "name": "name",
549
+ "type": {
550
+ "text": "string | undefined"
551
+ },
552
+ "fieldName": "name"
553
+ },
322
554
  {
323
555
  "name": "readonly",
324
556
  "type": {
@@ -326,28 +558,25 @@
326
558
  },
327
559
  "default": "false",
328
560
  "fieldName": "readonly"
329
- },
561
+ }
562
+ ],
563
+ "parameters": [
330
564
  {
331
- "name": "name",
565
+ "name": "constructor",
332
566
  "type": {
333
- "text": "string | undefined"
334
- },
335
- "fieldName": "name"
567
+ "text": "T"
568
+ }
336
569
  }
337
- ],
338
- "superclass": {
339
- "name": "Focusable",
340
- "package": "@spectrum-web-components/shared/src/focusable.js"
341
- }
570
+ ]
342
571
  }
343
572
  ],
344
573
  "exports": [
345
574
  {
346
575
  "kind": "js",
347
- "name": "CheckboxBase",
576
+ "name": "CheckboxMixin",
348
577
  "declaration": {
349
- "name": "CheckboxBase",
350
- "module": "src/CheckboxBase.js"
578
+ "name": "CheckboxMixin",
579
+ "module": "src/CheckboxMixin.js"
351
580
  }
352
581
  }
353
582
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/checkbox",
3
- "version": "0.40.0",
3
+ "version": "0.40.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,6 +33,10 @@
33
33
  "development": "./src/CheckboxBase.dev.js",
34
34
  "default": "./src/CheckboxBase.js"
35
35
  },
36
+ "./src/CheckboxMixin.js": {
37
+ "development": "./src/CheckboxMixin.dev.js",
38
+ "default": "./src/CheckboxMixin.js"
39
+ },
36
40
  "./src/checkbox.css.js": "./src/checkbox.css.js",
37
41
  "./src/index.js": {
38
42
  "development": "./src/index.dev.js",
@@ -61,10 +65,10 @@
61
65
  "lit-html"
62
66
  ],
63
67
  "dependencies": {
64
- "@spectrum-web-components/base": "^0.40.0",
65
- "@spectrum-web-components/icon": "^0.40.0",
66
- "@spectrum-web-components/icons-ui": "^0.40.0",
67
- "@spectrum-web-components/shared": "^0.40.0"
68
+ "@spectrum-web-components/base": "^0.40.1",
69
+ "@spectrum-web-components/icon": "^0.40.1",
70
+ "@spectrum-web-components/icons-ui": "^0.40.1",
71
+ "@spectrum-web-components/shared": "^0.40.1"
68
72
  },
69
73
  "devDependencies": {
70
74
  "@spectrum-css/checkbox": "^7.0.11"
@@ -75,5 +79,5 @@
75
79
  "./sp-*.js",
76
80
  "./**/*.dev.js"
77
81
  ],
78
- "gitHead": "24d5569a839da94892ecfd125428779587ffb1f5"
82
+ "gitHead": "a75c4f83094c505d64658dbc7de20b5f18a8fde1"
79
83
  }
package/src/Checkbox.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { CSSResultArray, PropertyValues, TemplateResult } from '@spectrum-web-components/base';
2
- import { CheckboxBase } from './CheckboxBase.js';
1
+ import { CSSResultArray, PropertyValues, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
3
2
  import '@spectrum-web-components/icons-ui/icons/sp-icon-checkmark75.js';
4
3
  import '@spectrum-web-components/icons-ui/icons/sp-icon-checkmark100.js';
5
4
  import '@spectrum-web-components/icons-ui/icons/sp-icon-checkmark200.js';
@@ -8,7 +7,10 @@ import '@spectrum-web-components/icons-ui/icons/sp-icon-dash75.js';
8
7
  import '@spectrum-web-components/icons-ui/icons/sp-icon-dash100.js';
9
8
  import '@spectrum-web-components/icons-ui/icons/sp-icon-dash200.js';
10
9
  import '@spectrum-web-components/icons-ui/icons/sp-icon-dash300.js';
11
- declare const Checkbox_base: typeof CheckboxBase & {
10
+ declare const Checkbox_base: typeof SpectrumElement & {
11
+ new (...args: any[]): import("./CheckboxMixin.js").CheckboxElement;
12
+ prototype: import("./CheckboxMixin.js").CheckboxElement;
13
+ } & {
12
14
  new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
13
15
  prototype: import("@spectrum-web-components/base").SizedElementInterface;
14
16
  };
@@ -18,10 +20,22 @@ declare const Checkbox_base: typeof CheckboxBase & {
18
20
  * @fires change - Announces a change in the `checked` property of a Checkbox
19
21
  */
20
22
  export declare class Checkbox extends Checkbox_base {
23
+ static shadowRootOptions: {
24
+ delegatesFocus: boolean;
25
+ mode: ShadowRootMode;
26
+ slotAssignment?: SlotAssignmentMode | undefined;
27
+ };
28
+ /**
29
+ * Disable this control. It will not receive focus or events
30
+ */
31
+ disabled: boolean;
21
32
  indeterminate: boolean;
22
33
  invalid: boolean;
23
34
  emphasized: boolean;
35
+ tabIndex: number;
36
+ connectedCallback(): void;
24
37
  static get styles(): CSSResultArray;
38
+ click(): void;
25
39
  handleChange(): void;
26
40
  protected render(): TemplateResult;
27
41
  protected updated(changes: PropertyValues): void;