@brightspace-ui/core 3.268.0 → 3.268.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.
Files changed (108) 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/link/README.md +1 -1
  16. package/components/list/README.md +8 -16
  17. package/components/menu/menu-item-checkbox.js +1 -3
  18. package/components/menu/menu-item-link.js +27 -33
  19. package/components/menu/menu-item-mixin.js +52 -54
  20. package/components/menu/menu-item-radio.js +1 -3
  21. package/components/menu/menu-item-return.js +18 -22
  22. package/components/menu/menu-item-selectable-mixin.js +12 -14
  23. package/components/menu/menu-item-separator.js +9 -11
  24. package/components/menu/menu-item.js +11 -15
  25. package/components/menu/menu.js +50 -54
  26. package/components/meter/meter-circle.js +3 -4
  27. package/components/meter/meter-linear.js +86 -88
  28. package/components/meter/meter-mixin.js +34 -36
  29. package/components/meter/meter-radial.js +3 -4
  30. package/components/more-less/more-less.js +57 -61
  31. package/components/object-property-list/object-property-list-item-link.js +18 -19
  32. package/components/object-property-list/object-property-list-item-tooltip-help.js +8 -9
  33. package/components/object-property-list/object-property-list-item.js +52 -55
  34. package/components/object-property-list/object-property-list.js +24 -27
  35. package/components/offscreen/README.md +1 -1
  36. package/components/offscreen/offscreen.js +13 -15
  37. package/components/offscreen/screen-reader-pause.js +1 -3
  38. package/components/overflow-group/README.md +1 -3
  39. package/components/overflow-group/overflow-group-mixin.js +55 -59
  40. package/components/overflow-group/overflow-group.js +38 -42
  41. package/components/page/page-header-button.js +41 -45
  42. package/components/page/page-header-custom.js +108 -112
  43. package/components/page/page-header-immersive.js +65 -69
  44. package/components/page/page-header-separator.js +12 -14
  45. package/components/paging/pageable-mixin.js +3 -5
  46. package/components/paging/pageable-subscriber-mixin.js +8 -10
  47. package/components/paging/pager-load-more.js +47 -51
  48. package/components/popover/popover-mixin.js +186 -190
  49. package/components/progress/progress.js +160 -164
  50. package/components/scroll-wrapper/scroll-wrapper.js +109 -113
  51. package/components/selection/README.md +5 -7
  52. package/components/selection/demo/demo-selection.js +5 -7
  53. package/components/selection/selection-action-dropdown.js +9 -13
  54. package/components/selection/selection-action-menu-item.js +11 -15
  55. package/components/selection/selection-action.js +20 -24
  56. package/components/selection/selection-controls.js +92 -96
  57. package/components/selection/selection-input.js +40 -44
  58. package/components/selection/selection-mixin.js +11 -13
  59. package/components/selection/selection-observer-mixin.js +14 -16
  60. package/components/selection/selection-select-all-pages.js +8 -10
  61. package/components/selection/selection-select-all.js +16 -20
  62. package/components/selection/selection-summary.js +18 -22
  63. package/components/skeleton/README.md +2 -6
  64. package/components/skeleton/skeleton-group-mixin.js +3 -5
  65. package/components/skeleton/skeleton-mixin.js +7 -9
  66. package/components/skip-nav/skip-nav-custom.js +33 -37
  67. package/components/sorting/sort.js +11 -13
  68. package/components/status-indicator/status-indicator.js +75 -79
  69. package/components/switch/switch-mixin.js +145 -149
  70. package/components/switch/switch-visibility.js +11 -15
  71. package/components/switch/switch.js +5 -7
  72. package/components/table/README.md +19 -37
  73. package/components/table/demo/table-test.js +27 -31
  74. package/components/table/table-col-sort-button-item.js +1 -3
  75. package/components/table/table-col-sort-button.js +105 -109
  76. package/components/table/table-controls.js +18 -21
  77. package/components/table/table-wrapper.js +124 -128
  78. package/components/tabs/tab-internal.js +72 -76
  79. package/components/tabs/tab-mixin.js +22 -24
  80. package/components/tabs/tab-panel-mixin.js +47 -51
  81. package/components/tabs/tab.js +7 -9
  82. package/components/tabs/tabs.js +171 -175
  83. package/components/tag-list/tag-list-item-mixin.js +103 -107
  84. package/components/tag-list/tag-list-item.js +13 -15
  85. package/components/tag-list/tag-list.js +54 -58
  86. package/components/tooltip/tooltip-help.js +67 -71
  87. package/components/tooltip/tooltip.js +103 -107
  88. package/components/typography/README.md +5 -7
  89. package/components/validation/validation-custom-mixin.js +4 -6
  90. package/components/view-switcher/view-switcher-button.js +42 -46
  91. package/components/view-switcher/view-switcher.js +26 -29
  92. package/controllers/subscriber/README.md +7 -11
  93. package/custom-elements.json +1026 -3850
  94. package/helpers/flags.js +7 -1
  95. package/mixins/arrow-keys/arrow-keys-mixin.js +10 -12
  96. package/mixins/async-container/async-container-mixin.js +10 -12
  97. package/mixins/collection/collection-mixin.js +7 -9
  98. package/mixins/interactive/interactive-mixin.js +10 -14
  99. package/mixins/labelled/README.md +3 -5
  100. package/mixins/labelled/labelled-mixin.js +26 -30
  101. package/mixins/provider/README.md +5 -7
  102. package/mixins/rtl/README.md +5 -7
  103. package/mixins/rtl/rtl-mixin.js +7 -9
  104. package/mixins/theme/theme-mixin.js +6 -8
  105. package/mixins/visible-on-ancestor/README.md +1 -3
  106. package/mixins/visible-on-ancestor/visible-on-ancestor-mixin.js +11 -13
  107. package/package.json +1 -1
  108. package/templates/primary-secondary/primary-secondary.js +373 -377
@@ -32,64 +32,60 @@ async function filterAsync(arr, callback) {
32
32
 
33
33
  class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitElement))) {
34
34
 
35
- static get properties() {
36
- return {
37
- /**
38
- * Enables the option to clear all inner tag list items. The `d2l-tag-list-item-clear` event will be dispatched for each list item when the user selects to Clear All. The consumer must handle the actual item deletion.
39
- * @type {boolean}
40
- */
41
- clearable: { type: Boolean },
42
- /**
43
- * ADVANCED: When an item is `clearable`, optionally add a timeout before the focus happens on clear. This is useful if the consumer has some operations that will reload the list items prior to wanting focus to occur.
44
- * @type {number}
45
- */
46
- clearFocusTimeout: { type: Number, attribute: 'clear-focus-timeout' },
47
- /**
48
- * REQUIRED: A description of the tag list for additional accessibility context
49
- * @type {string}
50
- */
51
- description: { type: String },
52
- _chompIndex: { type: Number },
53
- _contentReady: { type: Boolean },
54
- _lines: { type: Number },
55
- _showHiddenTags: { type: Boolean }
56
- };
57
- }
58
-
59
- static get styles() {
60
- return [...super.styles, css`
61
- :host {
62
- display: block;
63
- }
64
- :host([hidden]) {
65
- display: none;
66
- }
67
- .tag-list-container {
68
- display: flex;
69
- flex-wrap: wrap;
70
- gap: 6px;
71
- padding: 0;
72
- }
73
- ::slotted([data-is-chomped]) {
74
- display: none !important;
75
- }
76
- .d2l-tag-list-hidden-button {
77
- position: absolute;
78
- visibility: hidden;
79
- }
80
- .d2l-tag-list-clear-button {
81
- position: absolute;
82
- visibility: hidden;
83
- }
84
- .d2l-tag-list-clear-button.d2l-tag-list-clear-button-visible {
85
- position: static;
86
- visibility: visible;
87
- }
88
- .tag-list-hidden {
89
- visibility: hidden;
90
- }
91
- `];
92
- }
35
+ static properties = {
36
+ /**
37
+ * Enables the option to clear all inner tag list items. The `d2l-tag-list-item-clear` event will be dispatched for each list item when the user selects to Clear All. The consumer must handle the actual item deletion.
38
+ * @type {boolean}
39
+ */
40
+ clearable: { type: Boolean },
41
+ /**
42
+ * ADVANCED: When an item is `clearable`, optionally add a timeout before the focus happens on clear. This is useful if the consumer has some operations that will reload the list items prior to wanting focus to occur.
43
+ * @type {number}
44
+ */
45
+ clearFocusTimeout: { type: Number, attribute: 'clear-focus-timeout' },
46
+ /**
47
+ * REQUIRED: A description of the tag list for additional accessibility context
48
+ * @type {string}
49
+ */
50
+ description: { type: String },
51
+ _chompIndex: { type: Number },
52
+ _contentReady: { type: Boolean },
53
+ _lines: { type: Number },
54
+ _showHiddenTags: { type: Boolean }
55
+ };
56
+
57
+ static styles = [...super.styles, css`
58
+ :host {
59
+ display: block;
60
+ }
61
+ :host([hidden]) {
62
+ display: none;
63
+ }
64
+ .tag-list-container {
65
+ display: flex;
66
+ flex-wrap: wrap;
67
+ gap: 6px;
68
+ padding: 0;
69
+ }
70
+ ::slotted([data-is-chomped]) {
71
+ display: none !important;
72
+ }
73
+ .d2l-tag-list-hidden-button {
74
+ position: absolute;
75
+ visibility: hidden;
76
+ }
77
+ .d2l-tag-list-clear-button {
78
+ position: absolute;
79
+ visibility: hidden;
80
+ }
81
+ .d2l-tag-list-clear-button.d2l-tag-list-clear-button-visible {
82
+ position: static;
83
+ visibility: visible;
84
+ }
85
+ .tag-list-hidden {
86
+ visibility: hidden;
87
+ }
88
+ `];
93
89
 
94
90
  constructor() {
95
91
  super();
@@ -16,79 +16,75 @@ import { SlottedIconMixin } from '../icons/slotted-icon-mixin.js';
16
16
  */
17
17
  class TooltipHelp extends SlottedIconMixin(SkeletonMixin(FocusMixin(LitElement))) {
18
18
 
19
- static get properties() {
20
- return {
21
- /**
22
- * Allows this component to inherit certain font properties
23
- * @type {boolean}
24
- */
25
- inheritFontStyle: { type: Boolean, attribute: 'inherit-font-style' },
26
- /**
27
- * ADVANCED: Force the internal tooltip to open in a certain direction. If no position is provided, the tooltip will open in the first position that has enough space for it in the order: bottom, top, right, left.
28
- * @type {'top'|'bottom'|'left'|'right'}
29
- */
30
- position: { type: String },
31
- /**
32
- * @ignore
33
- */
34
- showing: { type: Boolean, reflect: true },
35
- /**
36
- * REQUIRED: Text that will render as the Help Tooltip opener
37
- * @type {string}
38
- */
39
- text: { type: String }
40
- };
41
- }
19
+ static properties = {
20
+ /**
21
+ * Allows this component to inherit certain font properties
22
+ * @type {boolean}
23
+ */
24
+ inheritFontStyle: { type: Boolean, attribute: 'inherit-font-style' },
25
+ /**
26
+ * ADVANCED: Force the internal tooltip to open in a certain direction. If no position is provided, the tooltip will open in the first position that has enough space for it in the order: bottom, top, right, left.
27
+ * @type {'top'|'bottom'|'left'|'right'}
28
+ */
29
+ position: { type: String },
30
+ /**
31
+ * @ignore
32
+ */
33
+ showing: { type: Boolean, reflect: true },
34
+ /**
35
+ * REQUIRED: Text that will render as the Help Tooltip opener
36
+ * @type {string}
37
+ */
38
+ text: { type: String }
39
+ };
42
40
 
43
- static get styles() {
44
- return [super.styles, bodySmallStyles, css`
45
- :host {
46
- display: inline-block;
47
- }
48
- :host([hidden]) {
49
- display: none;
50
- }
51
- #d2l-tooltip-help-text {
52
- --d2l-focus-ring-offset: 0.05rem;
53
- align-items: baseline;
54
- background: none;
55
- border: none;
56
- column-gap: 0.3rem;
57
- cursor: inherit;
58
- display: inline-flex;
59
- font-family: inherit;
60
- padding: 0;
61
- text-align: start;
62
- text-decoration-line: underline;
63
- text-decoration-style: dashed;
64
- text-decoration-thickness: 1px;
65
- text-underline-offset: 0.1rem;
66
- }
67
- d2l-icon,
68
- slot[name="icon"]::slotted(d2l-icon-custom) {
69
- align-self: center;
70
- }
41
+ static styles = [super.styles, bodySmallStyles, css`
42
+ :host {
43
+ display: inline-block;
44
+ }
45
+ :host([hidden]) {
46
+ display: none;
47
+ }
48
+ #d2l-tooltip-help-text {
49
+ --d2l-focus-ring-offset: 0.05rem;
50
+ align-items: baseline;
51
+ background: none;
52
+ border: none;
53
+ column-gap: 0.3rem;
54
+ cursor: inherit;
55
+ display: inline-flex;
56
+ font-family: inherit;
57
+ padding: 0;
58
+ text-align: start;
59
+ text-decoration-line: underline;
60
+ text-decoration-style: dashed;
61
+ text-decoration-thickness: 1px;
62
+ text-underline-offset: 0.1rem;
63
+ }
64
+ d2l-icon,
65
+ slot[name="icon"]::slotted(d2l-icon-custom) {
66
+ align-self: center;
67
+ }
71
68
 
72
- ${getFocusRingStyles('#d2l-tooltip-help-text', { extraStyles: css`border-radius: 0.05rem; text-underline-offset: 0.1rem;` })}
73
- :host([inherit-font-style]) #d2l-tooltip-help-text {
74
- color: inherit;
75
- font-size: inherit;
76
- font-weight: inherit;
77
- letter-spacing: inherit;
78
- line-height: inherit;
79
- margin: inherit;
80
- }
81
- d2l-tooltip {
82
- cursor: text;
83
- }
84
- :host([skeleton]) #d2l-tooltip-help-text.d2l-skeletize {
85
- text-decoration: none;
86
- }
87
- :host([skeleton]) slot[name="icon"]::slotted(d2l-icon-custom) {
88
- display: none;
89
- }
90
- `];
91
- }
69
+ ${getFocusRingStyles('#d2l-tooltip-help-text', { extraStyles: css`border-radius: 0.05rem; text-underline-offset: 0.1rem;` })}
70
+ :host([inherit-font-style]) #d2l-tooltip-help-text {
71
+ color: inherit;
72
+ font-size: inherit;
73
+ font-weight: inherit;
74
+ letter-spacing: inherit;
75
+ line-height: inherit;
76
+ margin: inherit;
77
+ }
78
+ d2l-tooltip {
79
+ cursor: text;
80
+ }
81
+ :host([skeleton]) #d2l-tooltip-help-text.d2l-skeletize {
82
+ text-decoration: none;
83
+ }
84
+ :host([skeleton]) slot[name="icon"]::slotted(d2l-icon-custom) {
85
+ display: none;
86
+ }
87
+ `];
92
88
 
93
89
  constructor() {
94
90
  super();
@@ -58,115 +58,111 @@ let activeTooltip = null;
58
58
  */
59
59
  class Tooltip extends PopoverMixin(LitElement) {
60
60
 
61
- static get properties() {
62
- return {
63
- /**
64
- * Align the tooltip with either the start or end of its target. If not set, the tooltip will attempt be centered.
65
- * @type {'start'|'end'}
66
- */
67
- align: { type: String, reflect: true },
68
- /**
69
- * ADVANCED: Announce the tooltip innerText when applicable (for use with custom elements)
70
- * @type {boolean}
71
- */
72
- announced: { type: Boolean },
73
- /**
74
- * ADVANCED: Causes the tooltip to close when its target is clicked
75
- * @type {boolean}
76
- */
77
- closeOnClick: { type: Boolean, attribute: 'close-on-click' },
78
- /**
79
- * Provide a delay in milliseconds to prevent the tooltip from opening immediately when hovered. This delay will only apply to hover, not focus.
80
- * @type {number}
81
- */
82
- delay: { type: Number },
83
- /**
84
- * ADVANCED: Disables focus lock so the tooltip will automatically close when no longer hovered even if it still has focus
85
- * @type {boolean}
86
- */
87
- disableFocusLock: { type: Boolean, attribute: 'disable-focus-lock' },
88
- /**
89
- * REQUIRED: The "id" of the tooltip's target element. Both elements must be within the same shadow root. If not provided, the tooltip's parent element will be used as its target.
90
- * @type {string}
91
- */
92
- for: { type: String },
93
- /**
94
- * ADVANCED: Force the tooltip to stay open as long as it remains "true"
95
- * @type {boolean}
96
- */
97
- forceShow: { type: Boolean, attribute: 'force-show' },
98
- /**
99
- * ADVANCED: Accessibility type for the tooltip to specify whether it is the primary label for the target or a secondary descriptor.
100
- * @type {'label'|'descriptor'}
101
- */
102
- forType: { type: String, attribute: 'for-type' },
103
- /**
104
- * Adjust the size of the gap between the tooltip and its target (px)
105
- * @type {number}
106
- */
107
- offset: { type: Number },
108
- /**
109
- * ADVANCED: Force the tooltip to open in a certain direction. If no position is provided, the tooltip will open in the first position that has enough space for it in the order: bottom, top, right, left.
110
- * @type {'top'|'bottom'|'left'|'right'}
111
- */
112
- positionLocation: { type: String, attribute: 'position' },
113
- /**
114
- * @ignore
115
- */
116
- showing: { type: Boolean, reflect: true },
117
- /**
118
- * ADVANCED: Only show the tooltip if we detect the target element is truncated
119
- * @type {boolean}
120
- */
121
- showTruncatedOnly: { type: Boolean, attribute: 'show-truncated-only' },
122
- /**
123
- * The style of the tooltip based on the type of information it displays
124
- * @type {'info'|'error'}
125
- */
126
- state: { type: String, reflect: true }
127
- };
128
- }
129
-
130
- static get styles() {
131
- return [super.styles, bodySmallStyles, css`
132
- :host {
133
- --d2l-tooltip-background-color: var(--d2l-color-ferrite); /* Deprecated, use state attribute instead */
134
- --d2l-tooltip-border-color: var(--d2l-color-ferrite); /* Deprecated, use state attribute instead */
135
- --d2l-tooltip-outline-color: rgba(255, 255, 255, 0.32);
136
- --d2l-popover-background-color: var(--d2l-tooltip-background-color);
137
- --d2l-popover-border-color: var(--d2l-tooltip-border-color);
138
- --d2l-popover-border-radius: 0.3rem;
139
- --d2l-popover-outline-color: var(--d2l-tooltip-outline-color);
140
- --d2l-popover-outline-width: 1px;
141
- }
142
- :host([state="error"]) {
143
- --d2l-tooltip-background-color: var(--d2l-color-cinnabar);
144
- --d2l-tooltip-border-color: var(--d2l-color-cinnabar);
145
- }
61
+ static properties = {
62
+ /**
63
+ * Align the tooltip with either the start or end of its target. If not set, the tooltip will attempt be centered.
64
+ * @type {'start'|'end'}
65
+ */
66
+ align: { type: String, reflect: true },
67
+ /**
68
+ * ADVANCED: Announce the tooltip innerText when applicable (for use with custom elements)
69
+ * @type {boolean}
70
+ */
71
+ announced: { type: Boolean },
72
+ /**
73
+ * ADVANCED: Causes the tooltip to close when its target is clicked
74
+ * @type {boolean}
75
+ */
76
+ closeOnClick: { type: Boolean, attribute: 'close-on-click' },
77
+ /**
78
+ * Provide a delay in milliseconds to prevent the tooltip from opening immediately when hovered. This delay will only apply to hover, not focus.
79
+ * @type {number}
80
+ */
81
+ delay: { type: Number },
82
+ /**
83
+ * ADVANCED: Disables focus lock so the tooltip will automatically close when no longer hovered even if it still has focus
84
+ * @type {boolean}
85
+ */
86
+ disableFocusLock: { type: Boolean, attribute: 'disable-focus-lock' },
87
+ /**
88
+ * REQUIRED: The "id" of the tooltip's target element. Both elements must be within the same shadow root. If not provided, the tooltip's parent element will be used as its target.
89
+ * @type {string}
90
+ */
91
+ for: { type: String },
92
+ /**
93
+ * ADVANCED: Force the tooltip to stay open as long as it remains "true"
94
+ * @type {boolean}
95
+ */
96
+ forceShow: { type: Boolean, attribute: 'force-show' },
97
+ /**
98
+ * ADVANCED: Accessibility type for the tooltip to specify whether it is the primary label for the target or a secondary descriptor.
99
+ * @type {'label'|'descriptor'}
100
+ */
101
+ forType: { type: String, attribute: 'for-type' },
102
+ /**
103
+ * Adjust the size of the gap between the tooltip and its target (px)
104
+ * @type {number}
105
+ */
106
+ offset: { type: Number },
107
+ /**
108
+ * ADVANCED: Force the tooltip to open in a certain direction. If no position is provided, the tooltip will open in the first position that has enough space for it in the order: bottom, top, right, left.
109
+ * @type {'top'|'bottom'|'left'|'right'}
110
+ */
111
+ positionLocation: { type: String, attribute: 'position' },
112
+ /**
113
+ * @ignore
114
+ */
115
+ showing: { type: Boolean, reflect: true },
116
+ /**
117
+ * ADVANCED: Only show the tooltip if we detect the target element is truncated
118
+ * @type {boolean}
119
+ */
120
+ showTruncatedOnly: { type: Boolean, attribute: 'show-truncated-only' },
121
+ /**
122
+ * The style of the tooltip based on the type of information it displays
123
+ * @type {'info'|'error'}
124
+ */
125
+ state: { type: String, reflect: true }
126
+ };
127
+
128
+ static styles = [super.styles, bodySmallStyles, css`
129
+ :host {
130
+ --d2l-tooltip-background-color: var(--d2l-color-ferrite); /* Deprecated, use state attribute instead */
131
+ --d2l-tooltip-border-color: var(--d2l-color-ferrite); /* Deprecated, use state attribute instead */
132
+ --d2l-tooltip-outline-color: rgba(255, 255, 255, 0.32);
133
+ --d2l-popover-background-color: var(--d2l-tooltip-background-color);
134
+ --d2l-popover-border-color: var(--d2l-tooltip-border-color);
135
+ --d2l-popover-border-radius: 0.3rem;
136
+ --d2l-popover-outline-color: var(--d2l-tooltip-outline-color);
137
+ --d2l-popover-outline-width: 1px;
138
+ }
139
+ :host([state="error"]) {
140
+ --d2l-tooltip-background-color: var(--d2l-color-cinnabar);
141
+ --d2l-tooltip-border-color: var(--d2l-color-cinnabar);
142
+ }
143
+ .d2l-tooltip-content {
144
+ box-sizing: border-box;
145
+ color: white;
146
+ max-width: 17.5rem;
147
+ min-height: 1.85rem;
148
+ min-width: 2.1rem;
149
+ overflow: hidden;
150
+ overflow-wrap: anywhere;
151
+ padding-block: ${10 - contentBorderSize}px ${11 - contentBorderSize}px;
152
+ padding-inline: ${contentHorizontalPadding - contentBorderSize}px;
153
+ white-space: normal;
154
+ }
155
+ ::slotted(ul),
156
+ ::slotted(ol) {
157
+ padding-inline-start: 1rem;
158
+ }
159
+ @media (max-width: 615px) {
146
160
  .d2l-tooltip-content {
147
- box-sizing: border-box;
148
- color: white;
149
- max-width: 17.5rem;
150
- min-height: 1.85rem;
151
- min-width: 2.1rem;
152
- overflow: hidden;
153
- overflow-wrap: anywhere;
154
- padding-block: ${10 - contentBorderSize}px ${11 - contentBorderSize}px;
155
- padding-inline: ${contentHorizontalPadding - contentBorderSize}px;
156
- white-space: normal;
157
- }
158
- ::slotted(ul),
159
- ::slotted(ol) {
160
- padding-inline-start: 1rem;
161
- }
162
- @media (max-width: 615px) {
163
- .d2l-tooltip-content {
164
- padding-bottom: ${12 - contentBorderSize}px;
165
- padding-top: ${12 - contentBorderSize}px;
166
- }
161
+ padding-bottom: ${12 - contentBorderSize}px;
162
+ padding-top: ${12 - contentBorderSize}px;
167
163
  }
168
- `];
169
- }
164
+ }
165
+ `];
170
166
 
171
167
  constructor() {
172
168
  super();
@@ -52,13 +52,11 @@ import { heading2Styles } from '@brightspace-ui/core/components/typography/style
52
52
 
53
53
  class MyComponent extends LitElement {
54
54
 
55
- static get styles() {
56
- return [ heading2Styles, css`
57
- :host {
58
- display: inline-block;
59
- }
60
- ` ];
61
- }
55
+ static styles = [heading2Styles, css`
56
+ :host {
57
+ display: inline-block;
58
+ }
59
+ `];
62
60
 
63
61
  render() {
64
62
  return html `<h1 class="d2l-heading-2"> ... </h1>`;
@@ -2,12 +2,10 @@ import { isCustomFormElement } from '../form/form-helper.js';
2
2
 
3
3
  export const ValidationCustomMixin = superclass => class extends superclass {
4
4
 
5
- static get properties() {
6
- return {
7
- failureText: { type: String, attribute: 'failure-text' },
8
- for: { type: String }
9
- };
10
- }
5
+ static properties = {
6
+ failureText: { type: String, attribute: 'failure-text' },
7
+ for: { type: String }
8
+ };
11
9
 
12
10
  constructor() {
13
11
  super();
@@ -12,57 +12,53 @@ import { PropertyRequiredMixin } from '../../mixins/property-required/property-r
12
12
  */
13
13
  class ViewSwitcherButton extends PropertyRequiredMixin(FocusMixin(LitElement)) {
14
14
 
15
- static get properties() {
16
- return {
17
- /**
18
- * REQUIRED: Key for the button
19
- * @type {string}
20
- */
21
- key: { type: String, required: true },
22
- /**
23
- * REQUIRED: Text for the button
24
- * @type {string}
25
- */
26
- text: { type: String, required: true },
27
- /**
28
- * Indicates if the item is selected
29
- * @type {boolean}
30
- */
31
- selected: { type: Boolean, reflect: true },
32
- };
33
- }
15
+ static properties = {
16
+ /**
17
+ * REQUIRED: Key for the button
18
+ * @type {string}
19
+ */
20
+ key: { type: String, required: true },
21
+ /**
22
+ * REQUIRED: Text for the button
23
+ * @type {string}
24
+ */
25
+ text: { type: String, required: true },
26
+ /**
27
+ * Indicates if the item is selected
28
+ * @type {boolean}
29
+ */
30
+ selected: { type: Boolean, reflect: true },
31
+ };
34
32
 
35
- static get styles() {
36
- return [labelStyles, buttonStyles, css`
37
- /* Firefox includes a hidden border which messes up button dimensions */
38
- button::-moz-focus-inner {
39
- border: 0;
40
- }
33
+ static styles = [labelStyles, buttonStyles, css`
34
+ /* Firefox includes a hidden border which messes up button dimensions */
35
+ button::-moz-focus-inner {
36
+ border: 0;
37
+ }
41
38
 
42
- button {
43
- background-color: transparent;
44
- border-radius: 0.2rem;
45
- display: block;
46
- font-family: inherit;
47
- min-height: auto;
48
- padding-block: 0.3rem;
49
- padding-inline: 1rem;
50
- }
39
+ button {
40
+ background-color: transparent;
41
+ border-radius: 0.2rem;
42
+ display: block;
43
+ font-family: inherit;
44
+ min-height: auto;
45
+ padding-block: 0.3rem;
46
+ padding-inline: 1rem;
47
+ }
51
48
 
52
- button:hover {
53
- background-color: var(--d2l-color-mica);
54
- }
49
+ button:hover {
50
+ background-color: var(--d2l-color-mica);
51
+ }
55
52
 
56
- button:${unsafeCSS(getFocusPseudoClass())} {
57
- box-shadow: 0 0 0 2px #ffffff;
58
- }
53
+ button:${unsafeCSS(getFocusPseudoClass())} {
54
+ box-shadow: 0 0 0 2px #ffffff;
55
+ }
59
56
 
60
- :host([selected]) button {
61
- background-color: var(--d2l-color-tungsten);
62
- color: #ffffff;
63
- }
64
- `];
65
- }
57
+ :host([selected]) button {
58
+ background-color: var(--d2l-color-tungsten);
59
+ color: #ffffff;
60
+ }
61
+ `];
66
62
 
67
63
  constructor() {
68
64
  super();