@momentum-design/components 0.61.1 → 0.61.2

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.
@@ -1,6 +1,5 @@
1
1
  import Tablist from './tablist.component';
2
2
  import '../button';
3
- import '../tab';
4
3
  declare global {
5
4
  interface HTMLElementTagNameMap {
6
5
  ['mdc-tablist']: Tablist;
@@ -1,6 +1,5 @@
1
1
  import Tablist from './tablist.component';
2
2
  import { TAG_NAME } from './tablist.constants';
3
3
  import '../button';
4
- import '../tab';
5
4
  Tablist.register(TAG_NAME);
6
5
  export default Tablist;
@@ -20,9 +20,7 @@ import { Component } from '../../models';
20
20
  * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**
21
21
  *
22
22
  * - Each element that contains the `content panel` for a `tab` has role `tabpanel`.
23
- * - If the tab list has a visible label,
24
- * the element with role `tablist` has `aria-labelledby` needs to be a value that refers to the labelling element.
25
- * Otherwise, the `tablist` element needs to have a label provided by `aria-label`.
23
+ * - The `tablist` element needs to have a label provided by `data-aria-label`.
26
24
  * - Each element with role `tab` has the property `aria-controls`
27
25
  * that should refer to its associated `tabpanel` element.
28
26
  * - Each element with role `tabpanel` has the property `aria-labelledby` referring to its associated `tab` element.
@@ -52,16 +50,8 @@ declare class TabList extends Component {
52
50
  */
53
51
  activeTabId?: string;
54
52
  /**
55
- * Selector for the element that provides a label for the tablist.
56
- */
57
- dataAriaLabelledby?: string;
58
- /**
59
- * Label for the tablist in case aria-labelledby is not provided.
53
+ * Label for the tablist.
60
54
  * This is used when the tablist does not have a visible label.
61
- * Defaults to 'Tab List'.
62
- * <br/>
63
- * Note: If both `data-aria-labelledby` and `data-aria-label` are provided,
64
- * the `data-aria-labelledby` will be used.
65
55
  */
66
56
  dataAriaLabel?: string;
67
57
  /**
@@ -120,14 +110,6 @@ declare class TabList extends Component {
120
110
  * @param changedProperties - Map of changed properties with old values.
121
111
  */
122
112
  update(changedProperties: PropertyValues<this>): Promise<void>;
123
- /**
124
- * Set aria-labelledby attribute on the tablist element.
125
- * If it does not exist, set aria-label attribute.
126
- * As fallback, set aria-label to 'Tab List'.
127
- *
128
- * @internal
129
- */
130
- private setAriaLabelledByOrAriaLabel;
131
113
  /**
132
114
  * Dispatch the change event.
133
115
  *
@@ -9,6 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { html, nothing } from 'lit';
11
11
  import { property, query, queryAssignedElements, state } from 'lit/decorators.js';
12
+ import { ifDefined } from 'lit/directives/if-defined.js';
12
13
  import styles from './tablist.styles';
13
14
  import { Component } from '../../models';
14
15
  import { ARROW_BUTTON_DIRECTION, KEYCODES } from './tablist.constants';
@@ -34,9 +35,7 @@ import { getFirstTab, getLastTab, getNextTab, getPreviousTab, findTab, getActive
34
35
  * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**
35
36
  *
36
37
  * - Each element that contains the `content panel` for a `tab` has role `tabpanel`.
37
- * - If the tab list has a visible label,
38
- * the element with role `tablist` has `aria-labelledby` needs to be a value that refers to the labelling element.
39
- * Otherwise, the `tablist` element needs to have a label provided by `aria-label`.
38
+ * - The `tablist` element needs to have a label provided by `data-aria-label`.
40
39
  * - Each element with role `tab` has the property `aria-controls`
41
40
  * that should refer to its associated `tabpanel` element.
42
41
  * - Each element with role `tabpanel` has the property `aria-labelledby` referring to its associated `tab` element.
@@ -81,24 +80,6 @@ class TabList extends Component {
81
80
  * @internal
82
81
  */
83
82
  this.isRtl = () => { var _a; return ((_a = document.querySelector('html')) === null || _a === void 0 ? void 0 : _a.getAttribute('dir')) === 'rtl' || window.getComputedStyle(this).direction === 'rtl'; };
84
- /**
85
- * Set aria-labelledby attribute on the tablist element.
86
- * If it does not exist, set aria-label attribute.
87
- * As fallback, set aria-label to 'Tab List'.
88
- *
89
- * @internal
90
- */
91
- this.setAriaLabelledByOrAriaLabel = () => {
92
- var _a, _b, _c, _d;
93
- if (this.dataAriaLabelledby) {
94
- (_a = this.tabsContainer) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-labelledby', this.dataAriaLabelledby);
95
- (_b = this.tabsContainer) === null || _b === void 0 ? void 0 : _b.removeAttribute('aria-label');
96
- }
97
- else {
98
- (_c = this.tabsContainer) === null || _c === void 0 ? void 0 : _c.setAttribute('aria-label', this.dataAriaLabel || 'Tab List');
99
- (_d = this.tabsContainer) === null || _d === void 0 ? void 0 : _d.removeAttribute('aria-labelledby');
100
- }
101
- };
102
83
  /**
103
84
  * Dispatch the change event.
104
85
  *
@@ -108,7 +89,7 @@ class TabList extends Component {
108
89
  */
109
90
  this.fireTabChangeEvent = (newTab) => {
110
91
  const event = new CustomEvent('change', {
111
- detail: newTab.tabId,
92
+ detail: { tabId: newTab.tabId },
112
93
  });
113
94
  this.dispatchEvent(event);
114
95
  };
@@ -160,6 +141,7 @@ class TabList extends Component {
160
141
  * @param event - Custom Event fired from the nested tab.
161
142
  */
162
143
  this.handleNestedTabActiveChange = async (event) => {
144
+ event.stopPropagation();
163
145
  const tab = event.target;
164
146
  if (!(tab instanceof Tab)) {
165
147
  return;
@@ -209,11 +191,10 @@ class TabList extends Component {
209
191
  * @param tab - Tab to set focus on.
210
192
  */
211
193
  this.focusTab = async (tab) => {
212
- var _a;
213
194
  if (!(tab instanceof Tab)) {
214
195
  return;
215
196
  }
216
- if (tab !== ((_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement)) {
197
+ if (tab !== (document === null || document === void 0 ? void 0 : document.activeElement)) {
217
198
  this.resetTabIndexAndSetNewTabIndex(tab);
218
199
  tab.focus();
219
200
  }
@@ -399,10 +380,8 @@ class TabList extends Component {
399
380
  this.onerror('The tabs inside the tab list must have unique tab ids');
400
381
  }
401
382
  }
402
- this.setAriaLabelledByOrAriaLabel();
403
383
  const resizeObserver = new ResizeObserver(async () => {
404
- var _a, _b;
405
- const activeElement = (_b = (_a = this.tabsContainer) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement;
384
+ const { activeElement } = document;
406
385
  /**
407
386
  * Keep the focused element in view.
408
387
  */
@@ -433,9 +412,6 @@ class TabList extends Component {
433
412
  */
434
413
  async update(changedProperties) {
435
414
  super.update(changedProperties);
436
- if (changedProperties.has('dataAriaLabelledby') || changedProperties.has('dataAriaLabel')) {
437
- this.setAriaLabelledByOrAriaLabel();
438
- }
439
415
  if (changedProperties.has('activeTabId')) {
440
416
  if (!this.tabs || !this.activeTabId) {
441
417
  return;
@@ -446,7 +422,7 @@ class TabList extends Component {
446
422
  }
447
423
  this.setActiveTab(newTab);
448
424
  /**
449
- * If the previous activeTabId was not undefined, fire the change event.
425
+ * If the previous activeTabId was not undefined, focus the new tab.
450
426
  *
451
427
  * Otherwise, reset the tabindex of all tabs and set the new tabindex.
452
428
  */
@@ -475,7 +451,11 @@ class TabList extends Component {
475
451
  ></mdc-button>`
476
452
  : nothing}`;
477
453
  return html ` ${arrowButton('backward')}
478
- <div class="container" role="tablist" tabindex="-1">
454
+ <div
455
+ class="container"
456
+ role="tablist"
457
+ tabindex="-1"
458
+ aria-label="${ifDefined(this.dataAriaLabel)}">
479
459
  <slot></slot>
480
460
  </div>
481
461
  ${arrowButton(ARROW_BUTTON_DIRECTION.FORWARD)}`;
@@ -486,10 +466,6 @@ __decorate([
486
466
  property({ type: String, attribute: 'active-tab-id', reflect: true }),
487
467
  __metadata("design:type", String)
488
468
  ], TabList.prototype, "activeTabId", void 0);
489
- __decorate([
490
- property({ type: String, attribute: 'data-aria-labelledby' }),
491
- __metadata("design:type", String)
492
- ], TabList.prototype, "dataAriaLabelledby", void 0);
493
469
  __decorate([
494
470
  property({ type: String, attribute: 'data-aria-label' }),
495
471
  __metadata("design:type", String)
@@ -17296,6 +17296,139 @@
17296
17296
  }
17297
17297
  ]
17298
17298
  },
17299
+ {
17300
+ "kind": "javascript-module",
17301
+ "path": "components/spinner/spinner.component.js",
17302
+ "declarations": [
17303
+ {
17304
+ "kind": "class",
17305
+ "description": "`mdc-spinner` is loading spinner which is an indeterminate progress indicator, meaning\nit's best for cases where the progress or duration of a process is variable or unknown.\n\nSpinner Variants:\n- **Standalone (Default)**: Track has a blue color.\n- **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\nTo ensure a minimum 3:1 contrast ratio, the color is changed internally to be the same color as the button’s\nicon or label text.\n\nSpinner Sizes:\n- **Large (96px)**: Use when replacing entire regions or pages that are still loading\n- **MidSize (48px) (Default)**: Use for most use cases.\n- **Small (24px)**: Use for inline with loading text.\n\nCustomisation of the spinner size is allowed by setting the size to undefined and using the --mdc-spinner-size\nCSS property.\n\nSpinner Colors:\n- **Default**: Use for most use cases.\n- **Inverted**: Only to be used within inverted components, such as coachmarks.\n\nRegarding accessibility, if an aria-label is provided, the role will be set to 'img'; if it is absent, the role\nwill be unset\nand aria-hidden will be set to 'true' so the spinner will be ignored by screen readers.",
17306
+ "name": "Spinner",
17307
+ "cssProperties": [
17308
+ {
17309
+ "description": "Allows customization of the default spinner color.",
17310
+ "name": "--mdc-spinner-default-color"
17311
+ },
17312
+ {
17313
+ "description": "Allows customization of the inverted spinner color.",
17314
+ "name": "--mdc-spinner-inverted-color"
17315
+ },
17316
+ {
17317
+ "description": "Allows customization of the spinner Button variant color.",
17318
+ "name": "--mdc-spinner-button-variant-color"
17319
+ },
17320
+ {
17321
+ "description": "Allows customization of the spinner size.",
17322
+ "name": "--mdc-spinner-size"
17323
+ }
17324
+ ],
17325
+ "cssParts": [
17326
+ {
17327
+ "description": "The svg which contains the circle spinner.",
17328
+ "name": "container"
17329
+ },
17330
+ {
17331
+ "description": "The circle of the spinner.",
17332
+ "name": "circle"
17333
+ }
17334
+ ],
17335
+ "members": [
17336
+ {
17337
+ "kind": "field",
17338
+ "name": "inverted",
17339
+ "description": "The spinner color can be inverted by setting the inverted attribute to true.",
17340
+ "default": "false",
17341
+ "attribute": "inverted",
17342
+ "reflects": true
17343
+ },
17344
+ {
17345
+ "kind": "field",
17346
+ "name": "size",
17347
+ "type": {
17348
+ "text": "SpinnerSize | undefined"
17349
+ },
17350
+ "description": "Size of the spinner.\nAcceptable values include:\n\n- 'small'\n- 'midsize'\n- 'large'\n- 'undefined'",
17351
+ "default": "midsize",
17352
+ "attribute": "size",
17353
+ "reflects": true
17354
+ },
17355
+ {
17356
+ "kind": "field",
17357
+ "name": "ariaLabel",
17358
+ "type": {
17359
+ "text": "string | null"
17360
+ },
17361
+ "default": "null",
17362
+ "description": "Aria-label attribute to be set for accessibility",
17363
+ "attribute": "aria-label"
17364
+ },
17365
+ {
17366
+ "kind": "field",
17367
+ "name": "variant",
17368
+ "type": {
17369
+ "text": "SpinnerVariant"
17370
+ },
17371
+ "description": "There are 2 variants of spinner: default and button. Their coloring is different.\n- **Standalone (Default)**: Track has a blue color.\n- **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\nTo ensure a minimum 3:1 contrast ratio, change the active indicator color to be the same color as the button’s\nicon or label text.",
17372
+ "default": "standalone",
17373
+ "attribute": "variant",
17374
+ "reflects": true
17375
+ }
17376
+ ],
17377
+ "attributes": [
17378
+ {
17379
+ "name": "inverted",
17380
+ "description": "The spinner color can be inverted by setting the inverted attribute to true.",
17381
+ "default": "false",
17382
+ "fieldName": "inverted"
17383
+ },
17384
+ {
17385
+ "name": "size",
17386
+ "type": {
17387
+ "text": "SpinnerSize | undefined"
17388
+ },
17389
+ "description": "Size of the spinner.\nAcceptable values include:\n\n- 'small'\n- 'midsize'\n- 'large'\n- 'undefined'",
17390
+ "default": "midsize",
17391
+ "fieldName": "size"
17392
+ },
17393
+ {
17394
+ "name": "aria-label",
17395
+ "type": {
17396
+ "text": "string | null"
17397
+ },
17398
+ "default": "null",
17399
+ "description": "Aria-label attribute to be set for accessibility",
17400
+ "fieldName": "ariaLabel"
17401
+ },
17402
+ {
17403
+ "name": "variant",
17404
+ "type": {
17405
+ "text": "SpinnerVariant"
17406
+ },
17407
+ "description": "There are 2 variants of spinner: default and button. Their coloring is different.\n- **Standalone (Default)**: Track has a blue color.\n- **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\nTo ensure a minimum 3:1 contrast ratio, change the active indicator color to be the same color as the button’s\nicon or label text.",
17408
+ "default": "standalone",
17409
+ "fieldName": "variant"
17410
+ }
17411
+ ],
17412
+ "superclass": {
17413
+ "name": "Component",
17414
+ "module": "/src/models"
17415
+ },
17416
+ "tagName": "mdc-spinner",
17417
+ "jsDoc": "/**\n * `mdc-spinner` is loading spinner which is an indeterminate progress indicator, meaning\n * it's best for cases where the progress or duration of a process is variable or unknown.\n *\n * Spinner Variants:\n * - **Standalone (Default)**: Track has a blue color.\n * - **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\n * To ensure a minimum 3:1 contrast ratio, the color is changed internally to be the same color as the button’s\n * icon or label text.\n *\n * Spinner Sizes:\n * - **Large (96px)**: Use when replacing entire regions or pages that are still loading\n * - **MidSize (48px) (Default)**: Use for most use cases.\n * - **Small (24px)**: Use for inline with loading text.\n *\n * Customisation of the spinner size is allowed by setting the size to undefined and using the --mdc-spinner-size\n * CSS property.\n *\n * Spinner Colors:\n * - **Default**: Use for most use cases.\n * - **Inverted**: Only to be used within inverted components, such as coachmarks.\n *\n * Regarding accessibility, if an aria-label is provided, the role will be set to 'img'; if it is absent, the role\n * will be unset\n * and aria-hidden will be set to 'true' so the spinner will be ignored by screen readers.\n *\n * @tagname mdc-spinner\n *\n * @cssproperty --mdc-spinner-default-color - Allows customization of the default spinner color.\n * @cssproperty --mdc-spinner-inverted-color - Allows customization of the inverted spinner color.\n * @cssproperty --mdc-spinner-button-variant-color - Allows customization of the spinner Button variant color.\n * @cssproperty --mdc-spinner-size - Allows customization of the spinner size.\n *\n * @csspart container - The svg which contains the circle spinner.\n * @csspart circle - The circle of the spinner.\n */",
17418
+ "customElement": true
17419
+ }
17420
+ ],
17421
+ "exports": [
17422
+ {
17423
+ "kind": "js",
17424
+ "name": "default",
17425
+ "declaration": {
17426
+ "name": "Spinner",
17427
+ "module": "components/spinner/spinner.component.js"
17428
+ }
17429
+ }
17430
+ ]
17431
+ },
17299
17432
  {
17300
17433
  "kind": "javascript-module",
17301
17434
  "path": "components/staticcheckbox/staticcheckbox.component.js",
@@ -17440,139 +17573,6 @@
17440
17573
  }
17441
17574
  ]
17442
17575
  },
17443
- {
17444
- "kind": "javascript-module",
17445
- "path": "components/spinner/spinner.component.js",
17446
- "declarations": [
17447
- {
17448
- "kind": "class",
17449
- "description": "`mdc-spinner` is loading spinner which is an indeterminate progress indicator, meaning\nit's best for cases where the progress or duration of a process is variable or unknown.\n\nSpinner Variants:\n- **Standalone (Default)**: Track has a blue color.\n- **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\nTo ensure a minimum 3:1 contrast ratio, the color is changed internally to be the same color as the button’s\nicon or label text.\n\nSpinner Sizes:\n- **Large (96px)**: Use when replacing entire regions or pages that are still loading\n- **MidSize (48px) (Default)**: Use for most use cases.\n- **Small (24px)**: Use for inline with loading text.\n\nCustomisation of the spinner size is allowed by setting the size to undefined and using the --mdc-spinner-size\nCSS property.\n\nSpinner Colors:\n- **Default**: Use for most use cases.\n- **Inverted**: Only to be used within inverted components, such as coachmarks.\n\nRegarding accessibility, if an aria-label is provided, the role will be set to 'img'; if it is absent, the role\nwill be unset\nand aria-hidden will be set to 'true' so the spinner will be ignored by screen readers.",
17450
- "name": "Spinner",
17451
- "cssProperties": [
17452
- {
17453
- "description": "Allows customization of the default spinner color.",
17454
- "name": "--mdc-spinner-default-color"
17455
- },
17456
- {
17457
- "description": "Allows customization of the inverted spinner color.",
17458
- "name": "--mdc-spinner-inverted-color"
17459
- },
17460
- {
17461
- "description": "Allows customization of the spinner Button variant color.",
17462
- "name": "--mdc-spinner-button-variant-color"
17463
- },
17464
- {
17465
- "description": "Allows customization of the spinner size.",
17466
- "name": "--mdc-spinner-size"
17467
- }
17468
- ],
17469
- "cssParts": [
17470
- {
17471
- "description": "The svg which contains the circle spinner.",
17472
- "name": "container"
17473
- },
17474
- {
17475
- "description": "The circle of the spinner.",
17476
- "name": "circle"
17477
- }
17478
- ],
17479
- "members": [
17480
- {
17481
- "kind": "field",
17482
- "name": "inverted",
17483
- "description": "The spinner color can be inverted by setting the inverted attribute to true.",
17484
- "default": "false",
17485
- "attribute": "inverted",
17486
- "reflects": true
17487
- },
17488
- {
17489
- "kind": "field",
17490
- "name": "size",
17491
- "type": {
17492
- "text": "SpinnerSize | undefined"
17493
- },
17494
- "description": "Size of the spinner.\nAcceptable values include:\n\n- 'small'\n- 'midsize'\n- 'large'\n- 'undefined'",
17495
- "default": "midsize",
17496
- "attribute": "size",
17497
- "reflects": true
17498
- },
17499
- {
17500
- "kind": "field",
17501
- "name": "ariaLabel",
17502
- "type": {
17503
- "text": "string | null"
17504
- },
17505
- "default": "null",
17506
- "description": "Aria-label attribute to be set for accessibility",
17507
- "attribute": "aria-label"
17508
- },
17509
- {
17510
- "kind": "field",
17511
- "name": "variant",
17512
- "type": {
17513
- "text": "SpinnerVariant"
17514
- },
17515
- "description": "There are 2 variants of spinner: default and button. Their coloring is different.\n- **Standalone (Default)**: Track has a blue color.\n- **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\nTo ensure a minimum 3:1 contrast ratio, change the active indicator color to be the same color as the button’s\nicon or label text.",
17516
- "default": "standalone",
17517
- "attribute": "variant",
17518
- "reflects": true
17519
- }
17520
- ],
17521
- "attributes": [
17522
- {
17523
- "name": "inverted",
17524
- "description": "The spinner color can be inverted by setting the inverted attribute to true.",
17525
- "default": "false",
17526
- "fieldName": "inverted"
17527
- },
17528
- {
17529
- "name": "size",
17530
- "type": {
17531
- "text": "SpinnerSize | undefined"
17532
- },
17533
- "description": "Size of the spinner.\nAcceptable values include:\n\n- 'small'\n- 'midsize'\n- 'large'\n- 'undefined'",
17534
- "default": "midsize",
17535
- "fieldName": "size"
17536
- },
17537
- {
17538
- "name": "aria-label",
17539
- "type": {
17540
- "text": "string | null"
17541
- },
17542
- "default": "null",
17543
- "description": "Aria-label attribute to be set for accessibility",
17544
- "fieldName": "ariaLabel"
17545
- },
17546
- {
17547
- "name": "variant",
17548
- "type": {
17549
- "text": "SpinnerVariant"
17550
- },
17551
- "description": "There are 2 variants of spinner: default and button. Their coloring is different.\n- **Standalone (Default)**: Track has a blue color.\n- **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\nTo ensure a minimum 3:1 contrast ratio, change the active indicator color to be the same color as the button’s\nicon or label text.",
17552
- "default": "standalone",
17553
- "fieldName": "variant"
17554
- }
17555
- ],
17556
- "superclass": {
17557
- "name": "Component",
17558
- "module": "/src/models"
17559
- },
17560
- "tagName": "mdc-spinner",
17561
- "jsDoc": "/**\n * `mdc-spinner` is loading spinner which is an indeterminate progress indicator, meaning\n * it's best for cases where the progress or duration of a process is variable or unknown.\n *\n * Spinner Variants:\n * - **Standalone (Default)**: Track has a blue color.\n * - **Button**: To be used when placed in a button to show that the button’s action is currently in progress.\n * To ensure a minimum 3:1 contrast ratio, the color is changed internally to be the same color as the button’s\n * icon or label text.\n *\n * Spinner Sizes:\n * - **Large (96px)**: Use when replacing entire regions or pages that are still loading\n * - **MidSize (48px) (Default)**: Use for most use cases.\n * - **Small (24px)**: Use for inline with loading text.\n *\n * Customisation of the spinner size is allowed by setting the size to undefined and using the --mdc-spinner-size\n * CSS property.\n *\n * Spinner Colors:\n * - **Default**: Use for most use cases.\n * - **Inverted**: Only to be used within inverted components, such as coachmarks.\n *\n * Regarding accessibility, if an aria-label is provided, the role will be set to 'img'; if it is absent, the role\n * will be unset\n * and aria-hidden will be set to 'true' so the spinner will be ignored by screen readers.\n *\n * @tagname mdc-spinner\n *\n * @cssproperty --mdc-spinner-default-color - Allows customization of the default spinner color.\n * @cssproperty --mdc-spinner-inverted-color - Allows customization of the inverted spinner color.\n * @cssproperty --mdc-spinner-button-variant-color - Allows customization of the spinner Button variant color.\n * @cssproperty --mdc-spinner-size - Allows customization of the spinner size.\n *\n * @csspart container - The svg which contains the circle spinner.\n * @csspart circle - The circle of the spinner.\n */",
17562
- "customElement": true
17563
- }
17564
- ],
17565
- "exports": [
17566
- {
17567
- "kind": "js",
17568
- "name": "default",
17569
- "declaration": {
17570
- "name": "Spinner",
17571
- "module": "components/spinner/spinner.component.js"
17572
- }
17573
- }
17574
- ]
17575
- },
17576
17576
  {
17577
17577
  "kind": "javascript-module",
17578
17578
  "path": "components/staticradio/staticradio.component.js",
@@ -18682,7 +18682,7 @@
18682
18682
  "declarations": [
18683
18683
  {
18684
18684
  "kind": "class",
18685
- "description": "Tab list organizes tabs into a container.\n\nChildren of the tab list are `mdc-tab` elements, sent to the default slot.\n\nThe tabs can be navigated using the left/right arrow keys, and selected by clicking,\n or pressing the Enter and Space keys.\n\n**Implicit accessibility rules**\n\n- The element that serves as the container for the set of tabs has role `tablist`.\n- Each element that serves as a tab has role `tab` and is contained within the element with role `tablist`.\n- The active tab element has the state `aria-selected` set to `true`\n and all other tab elements have it set to `false`.\n\n\n**Accessibility notes for consuming (have to be explicitly set when you consume the component)**\n\n- Each element that contains the `content panel` for a `tab` has role `tabpanel`.\n- If the tab list has a visible label,\n the element with role `tablist` has `aria-labelledby` needs to be a value that refers to the labelling element.\n Otherwise, the `tablist` element needs to have a label provided by `aria-label`.\n- Each element with role `tab` has the property `aria-controls`\n that should refer to its associated `tabpanel` element.\n- Each element with role `tabpanel` has the property `aria-labelledby` referring to its associated `tab` element.\n- If a `tab` element has a popup menu, it needs to have the property `aria-haspopup` set to either `menu` or `true`.",
18685
+ "description": "Tab list organizes tabs into a container.\n\nChildren of the tab list are `mdc-tab` elements, sent to the default slot.\n\nThe tabs can be navigated using the left/right arrow keys, and selected by clicking,\n or pressing the Enter and Space keys.\n\n**Implicit accessibility rules**\n\n- The element that serves as the container for the set of tabs has role `tablist`.\n- Each element that serves as a tab has role `tab` and is contained within the element with role `tablist`.\n- The active tab element has the state `aria-selected` set to `true`\n and all other tab elements have it set to `false`.\n\n\n**Accessibility notes for consuming (have to be explicitly set when you consume the component)**\n\n- Each element that contains the `content panel` for a `tab` has role `tabpanel`.\n- The `tablist` element needs to have a label provided by `data-aria-label`.\n- Each element with role `tab` has the property `aria-controls`\n that should refer to its associated `tabpanel` element.\n- Each element with role `tabpanel` has the property `aria-labelledby` referring to its associated `tab` element.\n- If a `tab` element has a popup menu, it needs to have the property `aria-haspopup` set to either `menu` or `true`.",
18686
18686
  "name": "TabList",
18687
18687
  "cssProperties": [
18688
18688
  {
@@ -18715,22 +18715,13 @@
18715
18715
  "attribute": "active-tab-id",
18716
18716
  "reflects": true
18717
18717
  },
18718
- {
18719
- "kind": "field",
18720
- "name": "dataAriaLabelledby",
18721
- "type": {
18722
- "text": "string | undefined"
18723
- },
18724
- "description": "Selector for the element that provides a label for the tablist.",
18725
- "attribute": "data-aria-labelledby"
18726
- },
18727
18718
  {
18728
18719
  "kind": "field",
18729
18720
  "name": "dataAriaLabel",
18730
18721
  "type": {
18731
18722
  "text": "string | undefined"
18732
18723
  },
18733
- "description": "Label for the tablist in case aria-labelledby is not provided.\nThis is used when the tablist does not have a visible label.\nDefaults to 'Tab List'.\n<br/>\nNote: If both `data-aria-labelledby` and `data-aria-label` are provided,\nthe `data-aria-labelledby` will be used.",
18724
+ "description": "Label for the tablist.\nThis is used when the tablist does not have a visible label.",
18734
18725
  "attribute": "data-aria-label"
18735
18726
  }
18736
18727
  ],
@@ -18750,20 +18741,12 @@
18750
18741
  "description": "ID of the active tab, defaults to the first tab if not provided",
18751
18742
  "fieldName": "activeTabId"
18752
18743
  },
18753
- {
18754
- "name": "data-aria-labelledby",
18755
- "type": {
18756
- "text": "string | undefined"
18757
- },
18758
- "description": "Selector for the element that provides a label for the tablist.",
18759
- "fieldName": "dataAriaLabelledby"
18760
- },
18761
18744
  {
18762
18745
  "name": "data-aria-label",
18763
18746
  "type": {
18764
18747
  "text": "string | undefined"
18765
18748
  },
18766
- "description": "Label for the tablist in case aria-labelledby is not provided.\nThis is used when the tablist does not have a visible label.\nDefaults to 'Tab List'.\n<br/>\nNote: If both `data-aria-labelledby` and `data-aria-label` are provided,\nthe `data-aria-labelledby` will be used.",
18749
+ "description": "Label for the tablist.\nThis is used when the tablist does not have a visible label.",
18767
18750
  "fieldName": "dataAriaLabel"
18768
18751
  }
18769
18752
  ],
@@ -18772,7 +18755,7 @@
18772
18755
  "module": "/src/models"
18773
18756
  },
18774
18757
  "tagName": "mdc-tablist",
18775
- "jsDoc": "/**\n * Tab list organizes tabs into a container.\n *\n * Children of the tab list are `mdc-tab` elements, sent to the default slot.\n *\n * The tabs can be navigated using the left/right arrow keys, and selected by clicking,\n * or pressing the Enter and Space keys.\n *\n * **Implicit accessibility rules**\n *\n * - The element that serves as the container for the set of tabs has role `tablist`.\n * - Each element that serves as a tab has role `tab` and is contained within the element with role `tablist`.\n * - The active tab element has the state `aria-selected` set to `true`\n * and all other tab elements have it set to `false`.\n *\n *\n * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**\n *\n * - Each element that contains the `content panel` for a `tab` has role `tabpanel`.\n * - If the tab list has a visible label,\n * the element with role `tablist` has `aria-labelledby` needs to be a value that refers to the labelling element.\n * Otherwise, the `tablist` element needs to have a label provided by `aria-label`.\n * - Each element with role `tab` has the property `aria-controls`\n * that should refer to its associated `tabpanel` element.\n * - Each element with role `tabpanel` has the property `aria-labelledby` referring to its associated `tab` element.\n * - If a `tab` element has a popup menu, it needs to have the property `aria-haspopup` set to either `menu` or `true`.\n *\n * @tagname mdc-tablist\n *\n * @dependency mdc-tab\n * @dependency mdc-button\n *\n * @event change - (React: onChange) This event is dispatched when the tab is selected.\n * Event that fires when user changes the active tab.\n * The function sent as the argument will receive the fired event\n * and the new tab id can be fetched from event.detail.tabId.\n *\n * `(event: CustomEvent) => handleTabChange(event.detail.tabId);`\n *\n * @slot Default slot for mdc-tab elements.\n *\n * @cssproperty --mdc-tablist-gap - Gap between tabs\n * @cssproperty --mdc-tablist-width - Width of the tablist\n * @cssproperty --mdc-tablist-arrow-button-margin - Margin value for the arrow button\n */",
18758
+ "jsDoc": "/**\n * Tab list organizes tabs into a container.\n *\n * Children of the tab list are `mdc-tab` elements, sent to the default slot.\n *\n * The tabs can be navigated using the left/right arrow keys, and selected by clicking,\n * or pressing the Enter and Space keys.\n *\n * **Implicit accessibility rules**\n *\n * - The element that serves as the container for the set of tabs has role `tablist`.\n * - Each element that serves as a tab has role `tab` and is contained within the element with role `tablist`.\n * - The active tab element has the state `aria-selected` set to `true`\n * and all other tab elements have it set to `false`.\n *\n *\n * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**\n *\n * - Each element that contains the `content panel` for a `tab` has role `tabpanel`.\n * - The `tablist` element needs to have a label provided by `data-aria-label`.\n * - Each element with role `tab` has the property `aria-controls`\n * that should refer to its associated `tabpanel` element.\n * - Each element with role `tabpanel` has the property `aria-labelledby` referring to its associated `tab` element.\n * - If a `tab` element has a popup menu, it needs to have the property `aria-haspopup` set to either `menu` or `true`.\n *\n * @tagname mdc-tablist\n *\n * @dependency mdc-tab\n * @dependency mdc-button\n *\n * @event change - (React: onChange) This event is dispatched when the tab is selected.\n * Event that fires when user changes the active tab.\n * The function sent as the argument will receive the fired event\n * and the new tab id can be fetched from event.detail.tabId.\n *\n * `(event: CustomEvent) => handleTabChange(event.detail.tabId);`\n *\n * @slot Default slot for mdc-tab elements.\n *\n * @cssproperty --mdc-tablist-gap - Gap between tabs\n * @cssproperty --mdc-tablist-width - Width of the tablist\n * @cssproperty --mdc-tablist-arrow-button-margin - Margin value for the arrow button\n */",
18776
18759
  "customElement": true
18777
18760
  }
18778
18761
  ],
@@ -35,8 +35,8 @@ export { default as RadioGroup } from './radiogroup';
35
35
  export { default as ScreenreaderAnnouncer } from './screenreaderannouncer';
36
36
  export { default as Searchfield } from './searchfield';
37
37
  export { default as Select } from './select';
38
- export { default as StaticCheckbox } from './staticcheckbox';
39
38
  export { default as Spinner } from './spinner';
39
+ export { default as StaticCheckbox } from './staticcheckbox';
40
40
  export { default as StaticRadio } from './staticradio';
41
41
  export { default as StaticToggle } from './statictoggle';
42
42
  export { default as Tab } from './tab';
@@ -35,8 +35,8 @@ export { default as RadioGroup } from './radiogroup';
35
35
  export { default as ScreenreaderAnnouncer } from './screenreaderannouncer';
36
36
  export { default as Searchfield } from './searchfield';
37
37
  export { default as Select } from './select';
38
- export { default as StaticCheckbox } from './staticcheckbox';
39
38
  export { default as Spinner } from './spinner';
39
+ export { default as StaticCheckbox } from './staticcheckbox';
40
40
  export { default as StaticRadio } from './staticradio';
41
41
  export { default as StaticToggle } from './statictoggle';
42
42
  export { default as Tab } from './tab';
@@ -19,9 +19,7 @@ import Component from '../../components/tablist';
19
19
  * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**
20
20
  *
21
21
  * - Each element that contains the `content panel` for a `tab` has role `tabpanel`.
22
- * - If the tab list has a visible label,
23
- * the element with role `tablist` has `aria-labelledby` needs to be a value that refers to the labelling element.
24
- * Otherwise, the `tablist` element needs to have a label provided by `aria-label`.
22
+ * - The `tablist` element needs to have a label provided by `data-aria-label`.
25
23
  * - Each element with role `tab` has the property `aria-controls`
26
24
  * that should refer to its associated `tabpanel` element.
27
25
  * - Each element with role `tabpanel` has the property `aria-labelledby` referring to its associated `tab` element.
@@ -21,9 +21,7 @@ import { TAG_NAME } from '../../components/tablist/tablist.constants';
21
21
  * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**
22
22
  *
23
23
  * - Each element that contains the `content panel` for a `tab` has role `tabpanel`.
24
- * - If the tab list has a visible label,
25
- * the element with role `tablist` has `aria-labelledby` needs to be a value that refers to the labelling element.
26
- * Otherwise, the `tablist` element needs to have a label provided by `aria-label`.
24
+ * - The `tablist` element needs to have a label provided by `data-aria-label`.
27
25
  * - Each element with role `tab` has the property `aria-controls`
28
26
  * that should refer to its associated `tabpanel` element.
29
27
  * - Each element with role `tabpanel` has the property `aria-labelledby` referring to its associated `tab` element.
package/package.json CHANGED
@@ -39,5 +39,5 @@
39
39
  "lit": "^3.2.0",
40
40
  "uuid": "^11.0.5"
41
41
  },
42
- "version": "0.61.1"
42
+ "version": "0.61.2"
43
43
  }