@brightspace-ui/core 3.267.3 → 3.268.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.
Files changed (109) hide show
  1. package/components/collapsible-panel/README.md +11 -15
  2. package/components/demo/code-view.js +6 -10
  3. package/components/demo/demo-page-settings.js +25 -29
  4. package/components/demo/demo-page.js +32 -36
  5. package/components/demo/demo-snippet.js +95 -99
  6. package/components/description-list/README.md +25 -33
  7. package/components/description-list/demo/description-list-test.js +36 -39
  8. package/components/dialog/README.md +3 -5
  9. package/components/form/docs/form-element-mixin.md +11 -14
  10. package/components/form/docs/form-element-nesting.md +4 -6
  11. package/components/form/docs/form-element-wrapping.md +1 -3
  12. package/components/hierarchical-view/README.md +8 -11
  13. package/components/inputs/docs/input-select-styles.md +4 -9
  14. package/components/inputs/docs/styling-native-inputs.md +11 -25
  15. package/components/inputs/input-select-styles.js +30 -25
  16. package/components/link/README.md +1 -1
  17. package/components/list/README.md +8 -16
  18. package/components/menu/menu-item-checkbox.js +1 -3
  19. package/components/menu/menu-item-link.js +27 -33
  20. package/components/menu/menu-item-mixin.js +52 -54
  21. package/components/menu/menu-item-radio.js +1 -3
  22. package/components/menu/menu-item-return.js +18 -22
  23. package/components/menu/menu-item-selectable-mixin.js +12 -14
  24. package/components/menu/menu-item-separator.js +9 -11
  25. package/components/menu/menu-item.js +11 -15
  26. package/components/menu/menu.js +50 -54
  27. package/components/meter/meter-circle.js +3 -4
  28. package/components/meter/meter-linear.js +86 -88
  29. package/components/meter/meter-mixin.js +34 -36
  30. package/components/meter/meter-radial.js +3 -4
  31. package/components/more-less/more-less.js +57 -61
  32. package/components/object-property-list/object-property-list-item-link.js +18 -19
  33. package/components/object-property-list/object-property-list-item-tooltip-help.js +8 -9
  34. package/components/object-property-list/object-property-list-item.js +52 -55
  35. package/components/object-property-list/object-property-list.js +24 -27
  36. package/components/offscreen/README.md +1 -1
  37. package/components/offscreen/offscreen.js +13 -15
  38. package/components/offscreen/screen-reader-pause.js +1 -3
  39. package/components/overflow-group/README.md +1 -3
  40. package/components/overflow-group/overflow-group-mixin.js +55 -59
  41. package/components/overflow-group/overflow-group.js +38 -42
  42. package/components/page/page-header-button.js +41 -45
  43. package/components/page/page-header-custom.js +108 -112
  44. package/components/page/page-header-immersive.js +65 -69
  45. package/components/page/page-header-separator.js +12 -14
  46. package/components/paging/pageable-mixin.js +3 -5
  47. package/components/paging/pageable-subscriber-mixin.js +8 -10
  48. package/components/paging/pager-load-more.js +47 -51
  49. package/components/popover/popover-mixin.js +186 -190
  50. package/components/progress/progress.js +160 -164
  51. package/components/scroll-wrapper/scroll-wrapper.js +109 -113
  52. package/components/selection/README.md +5 -7
  53. package/components/selection/demo/demo-selection.js +5 -7
  54. package/components/selection/selection-action-dropdown.js +9 -13
  55. package/components/selection/selection-action-menu-item.js +11 -15
  56. package/components/selection/selection-action.js +20 -24
  57. package/components/selection/selection-controls.js +92 -96
  58. package/components/selection/selection-input.js +40 -44
  59. package/components/selection/selection-mixin.js +11 -13
  60. package/components/selection/selection-observer-mixin.js +14 -16
  61. package/components/selection/selection-select-all-pages.js +8 -10
  62. package/components/selection/selection-select-all.js +16 -20
  63. package/components/selection/selection-summary.js +18 -22
  64. package/components/skeleton/README.md +2 -6
  65. package/components/skeleton/skeleton-group-mixin.js +3 -5
  66. package/components/skeleton/skeleton-mixin.js +7 -9
  67. package/components/skip-nav/skip-nav-custom.js +33 -37
  68. package/components/sorting/sort.js +11 -13
  69. package/components/status-indicator/status-indicator.js +75 -79
  70. package/components/switch/switch-mixin.js +145 -149
  71. package/components/switch/switch-visibility.js +11 -15
  72. package/components/switch/switch.js +5 -7
  73. package/components/table/README.md +19 -37
  74. package/components/table/demo/table-test.js +27 -31
  75. package/components/table/table-col-sort-button-item.js +1 -3
  76. package/components/table/table-col-sort-button.js +105 -109
  77. package/components/table/table-controls.js +18 -21
  78. package/components/table/table-wrapper.js +124 -128
  79. package/components/tabs/tab-internal.js +72 -76
  80. package/components/tabs/tab-mixin.js +22 -24
  81. package/components/tabs/tab-panel-mixin.js +47 -51
  82. package/components/tabs/tab.js +7 -9
  83. package/components/tabs/tabs.js +171 -175
  84. package/components/tag-list/tag-list-item-mixin.js +103 -107
  85. package/components/tag-list/tag-list-item.js +13 -15
  86. package/components/tag-list/tag-list.js +54 -58
  87. package/components/tooltip/tooltip-help.js +67 -71
  88. package/components/tooltip/tooltip.js +103 -107
  89. package/components/typography/README.md +5 -7
  90. package/components/validation/validation-custom-mixin.js +4 -6
  91. package/components/view-switcher/view-switcher-button.js +42 -46
  92. package/components/view-switcher/view-switcher.js +26 -29
  93. package/controllers/subscriber/README.md +7 -11
  94. package/custom-elements.json +1026 -3850
  95. package/helpers/focus.js +5 -1
  96. package/mixins/arrow-keys/arrow-keys-mixin.js +10 -12
  97. package/mixins/async-container/async-container-mixin.js +10 -12
  98. package/mixins/collection/collection-mixin.js +7 -9
  99. package/mixins/interactive/interactive-mixin.js +10 -14
  100. package/mixins/labelled/README.md +3 -5
  101. package/mixins/labelled/labelled-mixin.js +26 -30
  102. package/mixins/provider/README.md +5 -7
  103. package/mixins/rtl/README.md +5 -7
  104. package/mixins/rtl/rtl-mixin.js +7 -9
  105. package/mixins/theme/theme-mixin.js +6 -8
  106. package/mixins/visible-on-ancestor/README.md +1 -3
  107. package/mixins/visible-on-ancestor/visible-on-ancestor-mixin.js +11 -13
  108. package/package.json +1 -1
  109. package/templates/primary-secondary/primary-secondary.js +373 -377
@@ -268,136 +268,132 @@ const SELECTORS = {
268
268
  */
269
269
  export class TableWrapper extends PropertyRequiredMixin(PageableMixin(SelectionMixin(LitElement))) {
270
270
 
271
- static get properties() {
272
- return {
273
- /**
274
- * Hides the column borders on "default" table type
275
- * @type {boolean}
276
- */
277
- noColumnBorder: {
278
- attribute: 'no-column-border',
279
- reflect: true,
280
- type: Boolean
271
+ static properties = {
272
+ /**
273
+ * Hides the column borders on "default" table type
274
+ * @type {boolean}
275
+ */
276
+ noColumnBorder: {
277
+ attribute: 'no-column-border',
278
+ reflect: true,
279
+ type: Boolean
280
+ },
281
+ /**
282
+ * Whether the header row is sticky. Useful for long tables to "stick" the header row in place as the user scrolls.
283
+ * @type {boolean}
284
+ */
285
+ stickyHeaders: {
286
+ attribute: 'sticky-headers',
287
+ reflect: true,
288
+ type: Boolean
289
+ },
290
+ /**
291
+ * When used in combo with `sticky-headers`, whether to additionally wrap the table in a scroll-wrapper. Requires sticky headers to be in a separate thead.
292
+ * @type {boolean}
293
+ */
294
+ stickyHeadersScrollWrapper: {
295
+ attribute: 'sticky-headers-scroll-wrapper',
296
+ reflect: true,
297
+ type: Boolean
298
+ },
299
+ _stickyWidth: { state: true },
300
+ /**
301
+ * Type of table style to apply. The "light" style has fewer borders and tighter padding.
302
+ * @type {'default'|'light'}
303
+ */
304
+ type: {
305
+ reflect: true,
306
+ type: String
307
+ },
308
+ _controlsScrolled: { state: true },
309
+ _noScrollWidth: {
310
+ attribute: '_no-scroll-width',
311
+ reflect: true,
312
+ type: Boolean,
313
+ },
314
+ /**
315
+ * The state of data in the table. Set to 'clean' when the data represents the user's latest selections, 'dirty' when the data does not represent the user's latest selections, and 'loading' if the data is being actively refreshed
316
+ * @type {'clean'|'dirty'|'loading'}
317
+ */
318
+ dataState: {
319
+ reflect: true,
320
+ type: String
321
+ },
322
+ /**
323
+ * The text displayed on the dirty state overlay when the 'dirty' dataState is set.
324
+ * @type {string}
325
+ */
326
+ dirtyText: {
327
+ reflect: true,
328
+ attribute: 'dirty-text',
329
+ required: {
330
+ dependentProps: ['dataState'],
331
+ validator: (_value, elem, hasValue) => hasValue || elem.dataState !== 'dirty'
281
332
  },
282
- /**
283
- * Whether the header row is sticky. Useful for long tables to "stick" the header row in place as the user scrolls.
284
- * @type {boolean}
285
- */
286
- stickyHeaders: {
287
- attribute: 'sticky-headers',
288
- reflect: true,
289
- type: Boolean
333
+ type: String
334
+ },
335
+ /**
336
+ * The text displayed on the button dirty state overlay when the 'dirty' dataState is set.
337
+ * @type {string}
338
+ */
339
+ dirtyButtonText: {
340
+ reflect: true,
341
+ attribute: 'dirty-button-text',
342
+ required: {
343
+ dependentProps: ['dataState'],
344
+ validator: (_value, elem, hasValue) => hasValue || elem.dataState !== 'dirty'
290
345
  },
291
- /**
292
- * When used in combo with `sticky-headers`, whether to additionally wrap the table in a scroll-wrapper. Requires sticky headers to be in a separate thead.
293
- * @type {boolean}
294
- */
295
- stickyHeadersScrollWrapper: {
296
- attribute: 'sticky-headers-scroll-wrapper',
297
- reflect: true,
298
- type: Boolean
299
- },
300
- _stickyWidth: { state: true },
301
- /**
302
- * Type of table style to apply. The "light" style has fewer borders and tighter padding.
303
- * @type {'default'|'light'}
304
- */
305
- type: {
306
- reflect: true,
307
- type: String
308
- },
309
- _controlsScrolled: { state: true },
310
- _noScrollWidth: {
311
- attribute: '_no-scroll-width',
312
- reflect: true,
313
- type: Boolean,
314
- },
315
- /**
316
- * The state of data in the table. Set to 'clean' when the data represents the user's latest selections, 'dirty' when the data does not represent the user's latest selections, and 'loading' if the data is being actively refreshed
317
- * @type {'clean'|'dirty'|'loading'}
318
- */
319
- dataState: {
320
- reflect: true,
321
- type: String
322
- },
323
- /**
324
- * The text displayed on the dirty state overlay when the 'dirty' dataState is set.
325
- * @type {string}
326
- */
327
- dirtyText: {
328
- reflect: true,
329
- attribute: 'dirty-text',
330
- required: {
331
- dependentProps: ['dataState'],
332
- validator: (_value, elem, hasValue) => hasValue || elem.dataState !== 'dirty'
333
- },
334
- type: String
335
- },
336
- /**
337
- * The text displayed on the button dirty state overlay when the 'dirty' dataState is set.
338
- * @type {string}
339
- */
340
- dirtyButtonText: {
341
- reflect: true,
342
- attribute: 'dirty-button-text',
343
- required: {
344
- dependentProps: ['dataState'],
345
- validator: (_value, elem, hasValue) => hasValue || elem.dataState !== 'dirty'
346
- },
347
- type: String
348
- }
349
- };
350
- }
351
-
352
- static get styles() {
353
- return css`
354
- :host {
355
- --d2l-table-border: 1px solid var(--d2l-table-border-color);
356
- --d2l-table-border-color: var(--d2l-color-mica);
357
- --d2l-table-border-radius: 0.3rem;
358
- --d2l-table-border-radius-sticky-offset: calc(1px - var(--d2l-table-border-radius));
359
- --d2l-table-cell-overall-height: 46px;
360
- --d2l-table-cell-height: calc(var(--d2l-table-cell-overall-height) - 2 * var(--d2l-table-cell-padding));
361
- --d2l-table-cell-padding: 0.7rem;
362
- --d2l-table-cell-padding-alt: calc(0.7rem - 1px) 0.7rem 0.7rem 0.7rem;
363
- --d2l-table-cell-col-sort-button-size-offset: 4px;
364
- --d2l-table-header-background-color: var(--d2l-color-regolith);
365
- --d2l-table-row-border-color-selected: var(--d2l-color-celestine);
366
- --d2l-table-row-background-color-selected: var(--d2l-color-celestine-plus-2);
367
- display: block;
368
- width: 100%;
369
- }
370
- :host([hidden]) {
371
- display: none;
372
- }
373
- :host([type="light"]) {
374
- --d2l-table-border-radius: 0rem; /* stylelint-disable-line length-zero-no-unit */
375
- --d2l-table-border-radius-sticky-offset: 0rem; /* stylelint-disable-line length-zero-no-unit */
376
- --d2l-table-border-color: var(--d2l-color-gypsum);
377
- --d2l-table-header-background-color: #ffffff;
378
- }
379
- :host([sticky-headers]) {
380
- --d2l-table-controls-shadow-display: none;
381
- }
382
- .d2l-sticky-headers-backdrop {
383
- position: sticky;
384
- top: calc(var(--d2l-table-sticky-top, 0px) + var(--d2l-table-border-radius));
385
- width: 100%;
386
- z-index: 2; /* Must sit under d2l-table sticky-headers but over sticky columns and regular cells */
387
- }
388
- .d2l-sticky-headers-backdrop::after {
389
- background-color: var(--d2l-table-controls-background-color, white);
390
- bottom: 0;
391
- content: "";
392
- position: absolute;
393
- top: calc(-7px - var(--d2l-table-border-radius)); /* 6px for the d2l-table-controls margin-bottom, 1px overlap to fix zoom issues */
394
- width: 100%;
395
- }
396
- slot[name="pager"]::slotted(*) {
397
- margin-top: 12px;
398
- }
399
- `;
400
- }
346
+ type: String
347
+ }
348
+ };
349
+
350
+ static styles = css`
351
+ :host {
352
+ --d2l-table-border: 1px solid var(--d2l-table-border-color);
353
+ --d2l-table-border-color: var(--d2l-color-mica);
354
+ --d2l-table-border-radius: 0.3rem;
355
+ --d2l-table-border-radius-sticky-offset: calc(1px - var(--d2l-table-border-radius));
356
+ --d2l-table-cell-overall-height: 46px;
357
+ --d2l-table-cell-height: calc(var(--d2l-table-cell-overall-height) - 2 * var(--d2l-table-cell-padding));
358
+ --d2l-table-cell-padding: 0.7rem;
359
+ --d2l-table-cell-padding-alt: calc(0.7rem - 1px) 0.7rem 0.7rem 0.7rem;
360
+ --d2l-table-cell-col-sort-button-size-offset: 4px;
361
+ --d2l-table-header-background-color: var(--d2l-color-regolith);
362
+ --d2l-table-row-border-color-selected: var(--d2l-color-celestine);
363
+ --d2l-table-row-background-color-selected: var(--d2l-color-celestine-plus-2);
364
+ display: block;
365
+ width: 100%;
366
+ }
367
+ :host([hidden]) {
368
+ display: none;
369
+ }
370
+ :host([type="light"]) {
371
+ --d2l-table-border-radius: 0rem; /* stylelint-disable-line length-zero-no-unit */
372
+ --d2l-table-border-radius-sticky-offset: 0rem; /* stylelint-disable-line length-zero-no-unit */
373
+ --d2l-table-border-color: var(--d2l-color-gypsum);
374
+ --d2l-table-header-background-color: #ffffff;
375
+ }
376
+ :host([sticky-headers]) {
377
+ --d2l-table-controls-shadow-display: none;
378
+ }
379
+ .d2l-sticky-headers-backdrop {
380
+ position: sticky;
381
+ top: calc(var(--d2l-table-sticky-top, 0px) + var(--d2l-table-border-radius));
382
+ width: 100%;
383
+ z-index: 2; /* Must sit under d2l-table sticky-headers but over sticky columns and regular cells */
384
+ }
385
+ .d2l-sticky-headers-backdrop::after {
386
+ background-color: var(--d2l-table-controls-background-color, white);
387
+ bottom: 0;
388
+ content: "";
389
+ position: absolute;
390
+ top: calc(-7px - var(--d2l-table-border-radius)); /* 6px for the d2l-table-controls margin-bottom, 1px overlap to fix zoom issues */
391
+ width: 100%;
392
+ }
393
+ slot[name="pager"]::slotted(*) {
394
+ margin-top: 12px;
395
+ }
396
+ `;
401
397
 
402
398
  constructor() {
403
399
  super();
@@ -13,85 +13,81 @@ const keyCodes = {
13
13
  // remove file with GAUD-8299-core-tabs-use-new-structure flag clean up
14
14
  class Tab extends SkeletonMixin(LitElement) {
15
15
 
16
- static get properties() {
17
- return {
18
- ariaSelected: { type: String, reflect: true, attribute: 'aria-selected' },
19
- controlsPanel: { type: String, reflect: true, attribute: 'controls-panel' },
20
- // eslint-disable-next-line lit/no-native-attributes
21
- role: { type: String, reflect: true },
22
- text: { type: String }
23
- };
24
- }
16
+ static properties = {
17
+ ariaSelected: { type: String, reflect: true, attribute: 'aria-selected' },
18
+ controlsPanel: { type: String, reflect: true, attribute: 'controls-panel' },
19
+ // eslint-disable-next-line lit/no-native-attributes
20
+ role: { type: String, reflect: true },
21
+ text: { type: String }
22
+ };
25
23
 
26
- static get styles() {
27
- return [super.styles, css`
28
- :host {
29
- box-sizing: border-box;
30
- display: inline-block;
31
- max-width: 200px;
32
- outline: none;
33
- position: relative;
34
- vertical-align: middle;
35
- }
36
- .d2l-tab-text {
37
- --d2l-focus-ring-offset: 0;
38
- margin: 0.5rem;
39
- padding: 0.1rem;
40
- ${overflowEllipsisDeclarations}
41
- }
42
- :host([skeleton]) .d2l-tab-text.d2l-skeletize::before {
43
- bottom: 0.15rem;
44
- top: 0.15rem;
45
- }
46
- :host(:first-child) .d2l-tab-text {
47
- margin-inline-start: 0;
48
- }
49
- .d2l-tab-selected-indicator {
50
- border-top: 4px solid var(--d2l-theme-brand-color-primary-default);
51
- border-top-left-radius: 4px;
52
- border-top-right-radius: 4px;
53
- bottom: 0;
54
- display: none;
55
- margin: 1px 0.6rem 0 0.6rem;
56
- position: absolute;
57
- -webkit-transition: box-shadow 0.2s;
58
- transition: box-shadow 0.2s;
59
- width: calc(100% - 1.2rem);
60
- }
61
- :host([skeleton]) .d2l-tab-selected-indicator {
62
- position: absolute; /* make sure skeleton styles do not override this */
63
- }
64
- .d2l-tab-text-skeletize-override {
65
- min-width: 50px;
66
- }
67
- :host(:first-child) .d2l-tab-selected-indicator {
68
- margin-inline-start: 0;
69
- width: calc(100% - 0.6rem);
70
- }
71
- ${getFocusRingStyles(pseudoClass => `:host(:${pseudoClass}) > .d2l-tab-text`, { extraStyles: css`border-radius: 0.3rem; color: var(--d2l-theme-text-color-interactive-default);` })}
72
- :host([aria-selected="true"]:focus) {
73
- text-decoration: none;
74
- }
75
- :host(:hover) {
76
- color: var(--d2l-theme-text-color-interactive-default);
77
- cursor: pointer;
78
- }
79
- :host([aria-selected="true"]:hover) {
80
- color: inherit;
81
- cursor: default;
82
- }
83
- :host([aria-selected="true"]) .d2l-tab-selected-indicator {
84
- display: block;
85
- }
24
+ static styles = [super.styles, css`
25
+ :host {
26
+ box-sizing: border-box;
27
+ display: inline-block;
28
+ max-width: 200px;
29
+ outline: none;
30
+ position: relative;
31
+ vertical-align: middle;
32
+ }
33
+ .d2l-tab-text {
34
+ --d2l-focus-ring-offset: 0;
35
+ margin: 0.5rem;
36
+ padding: 0.1rem;
37
+ ${overflowEllipsisDeclarations}
38
+ }
39
+ :host([skeleton]) .d2l-tab-text.d2l-skeletize::before {
40
+ bottom: 0.15rem;
41
+ top: 0.15rem;
42
+ }
43
+ :host(:first-child) .d2l-tab-text {
44
+ margin-inline-start: 0;
45
+ }
46
+ .d2l-tab-selected-indicator {
47
+ border-top: 4px solid var(--d2l-theme-brand-color-primary-default);
48
+ border-top-left-radius: 4px;
49
+ border-top-right-radius: 4px;
50
+ bottom: 0;
51
+ display: none;
52
+ margin: 1px 0.6rem 0 0.6rem;
53
+ position: absolute;
54
+ -webkit-transition: box-shadow 0.2s;
55
+ transition: box-shadow 0.2s;
56
+ width: calc(100% - 1.2rem);
57
+ }
58
+ :host([skeleton]) .d2l-tab-selected-indicator {
59
+ position: absolute; /* make sure skeleton styles do not override this */
60
+ }
61
+ .d2l-tab-text-skeletize-override {
62
+ min-width: 50px;
63
+ }
64
+ :host(:first-child) .d2l-tab-selected-indicator {
65
+ margin-inline-start: 0;
66
+ width: calc(100% - 0.6rem);
67
+ }
68
+ ${getFocusRingStyles(pseudoClass => `:host(:${pseudoClass}) > .d2l-tab-text`, { extraStyles: css`border-radius: 0.3rem; color: var(--d2l-theme-text-color-interactive-default);` })}
69
+ :host([aria-selected="true"]:focus) {
70
+ text-decoration: none;
71
+ }
72
+ :host(:hover) {
73
+ color: var(--d2l-theme-text-color-interactive-default);
74
+ cursor: pointer;
75
+ }
76
+ :host([aria-selected="true"]:hover) {
77
+ color: inherit;
78
+ cursor: default;
79
+ }
80
+ :host([aria-selected="true"]) .d2l-tab-selected-indicator {
81
+ display: block;
82
+ }
86
83
 
87
- @media (prefers-reduced-motion: reduce) {
88
- .d2l-tab-selected-indicator {
89
- -webkit-transition: none;
90
- transition: none;
91
- }
84
+ @media (prefers-reduced-motion: reduce) {
85
+ .d2l-tab-selected-indicator {
86
+ -webkit-transition: none;
87
+ transition: none;
92
88
  }
93
- `];
94
- }
89
+ }
90
+ `];
95
91
 
96
92
  constructor() {
97
93
  super();
@@ -10,30 +10,28 @@ const keyCodes = {
10
10
 
11
11
  export const TabMixin = superclass => class extends SkeletonMixin(superclass) {
12
12
 
13
- static get properties() {
14
- return {
15
- /**
16
- * @ignore
17
- */
18
- // eslint-disable-next-line lit/no-native-attributes
19
- hidden: { type: Boolean, reflect: true },
20
- /**
21
- * Use to select the tab. Only one tab can be selected at a time.
22
- * @type {boolean}
23
- */
24
- selected: { type: Boolean, reflect: true },
25
- /**
26
- * @ignore
27
- */
28
- // eslint-disable-next-line lit/no-native-attributes
29
- role: { type: String, reflect: true },
30
- /**
31
- * @ignore
32
- */
33
- tabIndex: { type: Number, reflect: true, attribute: 'tabindex' },
34
- _clicked: { type: Boolean, reflect: true },
35
- };
36
- }
13
+ static properties = {
14
+ /**
15
+ * @ignore
16
+ */
17
+ // eslint-disable-next-line lit/no-native-attributes
18
+ hidden: { type: Boolean, reflect: true },
19
+ /**
20
+ * Use to select the tab. Only one tab can be selected at a time.
21
+ * @type {boolean}
22
+ */
23
+ selected: { type: Boolean, reflect: true },
24
+ /**
25
+ * @ignore
26
+ */
27
+ // eslint-disable-next-line lit/no-native-attributes
28
+ role: { type: String, reflect: true },
29
+ /**
30
+ * @ignore
31
+ */
32
+ tabIndex: { type: Number, reflect: true, attribute: 'tabindex' },
33
+ _clicked: { type: Boolean, reflect: true },
34
+ };
37
35
 
38
36
  static get styles() {
39
37
  const styles = [ css`
@@ -4,58 +4,54 @@ import { getUseNewTabsStructureFlag } from './tabs.js';
4
4
 
5
5
  export const TabPanelMixin = superclass => class extends superclass {
6
6
 
7
- static get properties() {
8
- return {
9
- /**
10
- * REQUIRED: Id of the tab that labels this panel
11
- * @type {string}
12
- */
13
- labelledBy: { type: String, attribute: 'labelled-by', reflect: true },
14
- /**
15
- * Opt out of default padding/whitespace around the panel
16
- * @type {boolean}
17
- */
18
- noPadding: { type: Boolean, attribute: 'no-padding', reflect: true },
19
- /**
20
- * @ignore
21
- */
22
- // eslint-disable-next-line lit/no-native-attributes
23
- role: { type: String, reflect: true },
24
- /**
25
- * DEPRECATED: Use to select the tab. Do NOT set if using the d2l-tab/d2l-tab-panel implementation.
26
- * Remove with GAUD-8299-core-tabs-use-new-structure flag clean up.
27
- * @type {boolean}
28
- */
29
- selected: { type: Boolean, reflect: true },
30
- /**
31
- * DEPRECATED: The text used for the tab, as well as labelling the panel. Required if not using d2l-tab/d2l-tab-panel implementation.
32
- * Remove with GAUD-8299-core-tabs-use-new-structure flag clean up.
33
- * @type {string}
34
- */
35
- text: { type: String },
36
- _selected: { type: Boolean, attribute: '_selected', reflect: true }
37
- };
38
- }
7
+ static properties = {
8
+ /**
9
+ * REQUIRED: Id of the tab that labels this panel
10
+ * @type {string}
11
+ */
12
+ labelledBy: { type: String, attribute: 'labelled-by', reflect: true },
13
+ /**
14
+ * Opt out of default padding/whitespace around the panel
15
+ * @type {boolean}
16
+ */
17
+ noPadding: { type: Boolean, attribute: 'no-padding', reflect: true },
18
+ /**
19
+ * @ignore
20
+ */
21
+ // eslint-disable-next-line lit/no-native-attributes
22
+ role: { type: String, reflect: true },
23
+ /**
24
+ * DEPRECATED: Use to select the tab. Do NOT set if using the d2l-tab/d2l-tab-panel implementation.
25
+ * Remove with GAUD-8299-core-tabs-use-new-structure flag clean up.
26
+ * @type {boolean}
27
+ */
28
+ selected: { type: Boolean, reflect: true },
29
+ /**
30
+ * DEPRECATED: The text used for the tab, as well as labelling the panel. Required if not using d2l-tab/d2l-tab-panel implementation.
31
+ * Remove with GAUD-8299-core-tabs-use-new-structure flag clean up.
32
+ * @type {string}
33
+ */
34
+ text: { type: String },
35
+ _selected: { type: Boolean, attribute: '_selected', reflect: true }
36
+ };
39
37
 
40
- static get styles() {
41
- return css`
42
- :host {
43
- box-sizing: border-box;
44
- display: none;
45
- margin: 1.2rem 0 0 0;
46
- }
47
- :host([no-padding]) {
48
- margin: 0;
49
- }
50
- /* clean up with GAUD-8299-core-tabs-use-new-structure flag clean up */
51
- :host([selected]) {
52
- display: block;
53
- }
54
- :host([_selected]) {
55
- display: block;
56
- }
57
- `;
58
- }
38
+ static styles = css`
39
+ :host {
40
+ box-sizing: border-box;
41
+ display: none;
42
+ margin: 1.2rem 0 0 0;
43
+ }
44
+ :host([no-padding]) {
45
+ margin: 0;
46
+ }
47
+ /* clean up with GAUD-8299-core-tabs-use-new-structure flag clean up */
48
+ :host([selected]) {
49
+ display: block;
50
+ }
51
+ :host([_selected]) {
52
+ display: block;
53
+ }
54
+ `;
59
55
 
60
56
  constructor() {
61
57
  super();
@@ -18,15 +18,13 @@ const focusRingStyles = getFocusRingStyles(
18
18
  */
19
19
  class Tab extends TabMixin(LitElement) {
20
20
 
21
- static get properties() {
22
- return {
23
- /**
24
- * ACCESSIBILITY: REQUIRED: The text used for the tab and for labelling the corresponding panel
25
- * @type {string}
26
- */
27
- text: { type: String }
28
- };
29
- }
21
+ static properties = {
22
+ /**
23
+ * ACCESSIBILITY: REQUIRED: The text used for the tab and for labelling the corresponding panel
24
+ * @type {string}
25
+ */
26
+ text: { type: String }
27
+ };
30
28
 
31
29
  static get styles() {
32
30
  const styles = [ css`