@brightspace-ui/core 3.268.0 → 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 (107) 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/mixins/arrow-keys/arrow-keys-mixin.js +10 -12
  95. package/mixins/async-container/async-container-mixin.js +10 -12
  96. package/mixins/collection/collection-mixin.js +7 -9
  97. package/mixins/interactive/interactive-mixin.js +10 -14
  98. package/mixins/labelled/README.md +3 -5
  99. package/mixins/labelled/labelled-mixin.js +26 -30
  100. package/mixins/provider/README.md +5 -7
  101. package/mixins/rtl/README.md +5 -7
  102. package/mixins/rtl/rtl-mixin.js +7 -9
  103. package/mixins/theme/theme-mixin.js +6 -8
  104. package/mixins/visible-on-ancestor/README.md +1 -3
  105. package/mixins/visible-on-ancestor/visible-on-ancestor-mixin.js +11 -13
  106. package/package.json +1 -1
  107. package/templates/primary-secondary/primary-secondary.js +373 -377
@@ -7,44 +7,40 @@ import { PropertyRequiredMixin } from '../../mixins/property-required/property-r
7
7
  */
8
8
  class SkipNavCustom extends FocusMixin(PropertyRequiredMixin(LitElement)) {
9
9
 
10
- static get properties() {
11
- return {
12
- /**
13
- * ACCESSIBILITY: REQUIRED: Text for the link
14
- * @type {string}
15
- */
16
- text: { required: true, type: String }
17
- };
18
- }
10
+ static properties = {
11
+ /**
12
+ * ACCESSIBILITY: REQUIRED: Text for the link
13
+ * @type {string}
14
+ */
15
+ text: { required: true, type: String }
16
+ };
19
17
 
20
- static get styles() {
21
- return css`
22
- a {
23
- inset-inline-start: -10000px;
24
- overflow: hidden;
25
- position: absolute;
26
- width: 1px;
27
- }
28
- a:active,
29
- a:focus {
30
- background-color: rgba(0, 0, 0, 0.7);
31
- border: 1px solid rgba(0, 0, 0, 0.8);
32
- color: #ffffff;
33
- cursor: pointer;
34
- display: block;
35
- font-weight: bold;
36
- inset-block-start: 0;
37
- inset-inline-start: 25%;
38
- margin: 0 auto;
39
- outline: none;
40
- padding: 0.3em;
41
- text-align: center;
42
- text-decoration: none;
43
- width: 50%;
44
- z-index: 10000;
45
- }
46
- `;
47
- }
18
+ static styles = css`
19
+ a {
20
+ inset-inline-start: -10000px;
21
+ overflow: hidden;
22
+ position: absolute;
23
+ width: 1px;
24
+ }
25
+ a:active,
26
+ a:focus {
27
+ background-color: rgba(0, 0, 0, 0.7);
28
+ border: 1px solid rgba(0, 0, 0, 0.8);
29
+ color: #ffffff;
30
+ cursor: pointer;
31
+ display: block;
32
+ font-weight: bold;
33
+ inset-block-start: 0;
34
+ inset-inline-start: 25%;
35
+ margin: 0 auto;
36
+ outline: none;
37
+ padding: 0.3em;
38
+ text-align: center;
39
+ text-decoration: none;
40
+ width: 50%;
41
+ z-index: 10000;
42
+ }
43
+ `;
48
44
 
49
45
  static get focusElementSelector() {
50
46
  return 'a';
@@ -24,19 +24,17 @@ class Sort extends FocusMixin(LocalizeCoreElement(LitElement)) {
24
24
  _selectedItemValue: { state: true },
25
25
  };
26
26
 
27
- static get styles() {
28
- return css`
29
- :host {
30
- display: inline-block;
31
- }
32
- :host([hidden]) {
33
- display: none;
34
- }
35
- ::slotted(:not(d2l-sort-item)) {
36
- display: none;
37
- }
38
- `;
39
- }
27
+ static styles = css`
28
+ :host {
29
+ display: inline-block;
30
+ }
31
+ :host([hidden]) {
32
+ display: none;
33
+ }
34
+ ::slotted(:not(d2l-sort-item)) {
35
+ display: none;
36
+ }
37
+ `;
40
38
 
41
39
  constructor() {
42
40
  super();
@@ -6,88 +6,84 @@ import { css, html, LitElement } from 'lit';
6
6
  */
7
7
  class StatusIndicator extends LitElement {
8
8
 
9
- static get properties() {
10
- return {
11
- /**
12
- * State of status indicator to display
13
- * @type {'default'|'success'|'alert'|'none'}
14
- */
15
- state: {
16
- type: String,
17
- reflect: true
18
- },
19
- /**
20
- * REQUIRED: The text that is displayed within the status indicator
21
- * @type {string}
22
- */
23
- text: {
24
- type: String
25
- },
26
- /**
27
- * Use when the status is very important and needs to have a lot of prominence
28
- * @type {boolean}
29
- */
30
- bold: {
31
- type: Boolean,
32
- reflect: true
33
- }
34
- };
35
- }
9
+ static properties = {
10
+ /**
11
+ * State of status indicator to display
12
+ * @type {'default'|'success'|'alert'|'none'}
13
+ */
14
+ state: {
15
+ type: String,
16
+ reflect: true
17
+ },
18
+ /**
19
+ * REQUIRED: The text that is displayed within the status indicator
20
+ * @type {string}
21
+ */
22
+ text: {
23
+ type: String
24
+ },
25
+ /**
26
+ * Use when the status is very important and needs to have a lot of prominence
27
+ * @type {boolean}
28
+ */
29
+ bold: {
30
+ type: Boolean,
31
+ reflect: true
32
+ }
33
+ };
36
34
 
37
- static get styles() {
38
- return css`
39
- :host {
40
- border-color: var(--d2l-color-celestine);
41
- border-radius: 0.6rem;
42
- border-style: solid;
43
- border-width: 1px;
44
- color: var(--d2l-color-celestine);
45
- cursor: default;
46
- display: inline-block;
47
- font-size: 0.6rem;
48
- font-weight: bold;
49
- line-height: 1;
50
- overflow: hidden;
51
- padding: 2px 10px 2px 10px;
52
- text-overflow: ellipsis;
53
- text-transform: capitalize;
54
- vertical-align: middle;
55
- white-space: nowrap;
56
- }
35
+ static styles = css`
36
+ :host {
37
+ border-color: var(--d2l-color-celestine);
38
+ border-radius: 0.6rem;
39
+ border-style: solid;
40
+ border-width: 1px;
41
+ color: var(--d2l-color-celestine);
42
+ cursor: default;
43
+ display: inline-block;
44
+ font-size: 0.6rem;
45
+ font-weight: bold;
46
+ line-height: 1;
47
+ overflow: hidden;
48
+ padding: 2px 10px 2px 10px;
49
+ text-overflow: ellipsis;
50
+ text-transform: capitalize;
51
+ vertical-align: middle;
52
+ white-space: nowrap;
53
+ }
57
54
 
58
- :host([hidden]) {
59
- display: none;
60
- }
61
- :host([state="success"]) {
62
- border-color: var(--d2l-color-olivine-minus-1);
63
- color: var(--d2l-color-olivine-minus-1);
64
- }
65
- :host([state="alert"]) {
66
- border-color: var(--d2l-color-cinnabar);
67
- color: var(--d2l-color-cinnabar);
68
- }
69
- :host([state="none"]),
70
- :host([state="null"]) {
71
- border-color: var(--d2l-color-tungsten);
72
- color: var(--d2l-color-tungsten);
73
- }
55
+ :host([hidden]) {
56
+ display: none;
57
+ }
58
+ :host([state="success"]) {
59
+ border-color: var(--d2l-color-olivine-minus-1);
60
+ color: var(--d2l-color-olivine-minus-1);
61
+ }
62
+ :host([state="alert"]) {
63
+ border-color: var(--d2l-color-cinnabar);
64
+ color: var(--d2l-color-cinnabar);
65
+ }
66
+ :host([state="none"]),
67
+ :host([state="null"]) {
68
+ border-color: var(--d2l-color-tungsten);
69
+ color: var(--d2l-color-tungsten);
70
+ }
74
71
 
75
- :host([bold]) {
76
- background-color: var(--d2l-color-celestine);
77
- color: white;
78
- }
79
- :host([bold][state="success"]) {
80
- background-color: var(--d2l-color-olivine-minus-1);
81
- }
82
- :host([bold][state="alert"]) {
83
- background-color: var(--d2l-color-cinnabar);
84
- }
85
- :host([bold][state="none"]),
86
- :host([bold][state="null"]) {
87
- background-color: var(--d2l-color-tungsten);
88
- }
89
- `;
90
- }
72
+ :host([bold]) {
73
+ background-color: var(--d2l-color-celestine);
74
+ color: white;
75
+ }
76
+ :host([bold][state="success"]) {
77
+ background-color: var(--d2l-color-olivine-minus-1);
78
+ }
79
+ :host([bold][state="alert"]) {
80
+ background-color: var(--d2l-color-cinnabar);
81
+ }
82
+ :host([bold][state="none"]),
83
+ :host([bold][state="null"]) {
84
+ background-color: var(--d2l-color-tungsten);
85
+ }
86
+ `;
91
87
 
92
88
  constructor() {
93
89
  super();
@@ -9,158 +9,154 @@ import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
9
9
 
10
10
  export const SwitchMixin = superclass => class extends FocusMixin(RtlMixin(superclass)) {
11
11
 
12
- static get properties() {
13
- return {
14
- /**
15
- * Disables the switch from being toggled.
16
- * @type {boolean}
17
- */
18
- disabled: { type: Boolean, reflect: true },
19
- /**
20
- * Active state.
21
- * @type {boolean}
22
- */
23
- on: { type: Boolean, reflect: true },
24
- /**
25
- * @ignore - Need to add documentation in each component that uses this mixin.
26
- */
27
- text: { type: String, reflect: true },
28
- /**
29
- * Determines where text should be positioned relative to the switch.
30
- * @type {'start'|'end'|'hidden'}
31
- * @default end
32
- */
33
- textPosition: { type: String, attribute: 'text-position', reflect: true },
34
- _hovering: { state: true }
35
- };
36
- }
12
+ static properties = {
13
+ /**
14
+ * Disables the switch from being toggled.
15
+ * @type {boolean}
16
+ */
17
+ disabled: { type: Boolean, reflect: true },
18
+ /**
19
+ * Active state.
20
+ * @type {boolean}
21
+ */
22
+ on: { type: Boolean, reflect: true },
23
+ /**
24
+ * @ignore - Need to add documentation in each component that uses this mixin.
25
+ */
26
+ text: { type: String, reflect: true },
27
+ /**
28
+ * Determines where text should be positioned relative to the switch.
29
+ * @type {'start'|'end'|'hidden'}
30
+ * @default end
31
+ */
32
+ textPosition: { type: String, attribute: 'text-position', reflect: true },
33
+ _hovering: { state: true }
34
+ };
37
35
 
38
- static get styles() {
39
- return css`
40
- :host {
41
- display: inline-block;
42
- user-select: none;
43
- white-space: nowrap;
44
- }
45
- :host([hidden]) {
46
- display: none;
47
- }
36
+ static styles = css`
37
+ :host {
38
+ display: inline-block;
39
+ user-select: none;
40
+ white-space: nowrap;
41
+ }
42
+ :host([hidden]) {
43
+ display: none;
44
+ }
48
45
 
49
- .d2l-switch-container {
50
- --d2l-focus-ring-offset: 0;
51
- background-color: var(--d2l-switch-container-background-color, var(--d2l-theme-background-color-base));
52
- border-radius: 1rem;
53
- box-sizing: border-box;
54
- cursor: default;
55
- display: inline-block;
56
- font-size: 0;
57
- line-height: 0;
58
- outline-style: none;
59
- padding: 0.1rem;
60
- vertical-align: middle;
61
- }
62
- ${getFocusRingStyles('.d2l-switch-container', { extraStyles: css`position: relative;` })}
63
- :host([disabled]) .d2l-switch-container {
64
- cursor: default;
65
- opacity: var(--d2l-theme-opacity-disabled-control);
66
- }
67
- :host([disabled]) .d2l-switch-container:hover > .d2l-switch-inner,
68
- :host([disabled]) .d2l-switch-inner:hover,
69
- :host([disabled]) .switch-hover {
70
- outline: none;
71
- }
72
- .d2l-switch-inner {
73
- border: 1px solid var(--d2l-theme-border-color-emphasized);
74
- border-radius: 0.8rem;
75
- box-sizing: border-box;
76
- padding: 0.3rem;
77
- position: relative;
78
- width: 3rem;
79
- }
80
- :host([on]) .d2l-switch-inner {
81
- background-color: var(--d2l-theme-background-color-interactive-highlighted);
82
- }
83
- .d2l-switch-toggle {
84
- position: relative;
85
- transition: transform 150ms ease-out;
86
- }
87
- .d2l-switch-toggle > div {
88
- background-color: var(--d2l-theme-background-color-base);
89
- border: 1px solid var(--d2l-theme-border-color-emphasized);
90
- border-radius: 0.6rem;
91
- box-sizing: border-box;
92
- display: inline-block;
93
- height: 1.1rem;
94
- left: -0.1rem;
95
- position: absolute;
96
- top: -0.95rem;
97
- width: 1.1rem;
98
- }
99
- :host([on]) .d2l-switch-toggle > div {
100
- left: 0.1rem;
101
- }
102
- :host([dir="rtl"][on]) .d2l-switch-toggle > div {
103
- right: 0.3rem;
104
- }
105
- :host([dir="rtl"]) .d2l-switch-toggle > div {
106
- left: auto;
107
- right: -0.1rem;
108
- }
109
- :host([on]) .d2l-switch-toggle {
110
- transform: translateX(1.2rem);
111
- }
112
- :host([dir="rtl"][on]) .d2l-switch-toggle {
113
- right: -0.2rem;
114
- transform: translateX(-1.2rem);
115
- }
116
- d2l-icon, d2l-icon-custom {
117
- height: 0.8rem;
118
- width: 0.8rem;
119
- }
120
- .d2l-switch-icon-on, .d2l-switch-icon-off {
121
- display: inline-block;
122
- transform: scale(1);
123
- transition: transform 150ms ease-out;
124
- }
125
- .d2l-switch-icon-on {
126
- margin-right: 0.65rem;
127
- }
128
- :host([dir="rtl"]) .d2l-switch-icon-on {
129
- margin-left: 0.65rem;
130
- margin-right: 0;
131
- }
132
- :host([on]) .d2l-switch-icon-on > d2l-icon,
133
- :host([on]) .d2l-switch-icon-on > d2l-icon-custom {
134
- color: var(--d2l-theme-icon-color-active);
135
- }
136
- :host([on]) .d2l-switch-icon-off {
137
- transform: scale(0.35);
138
- }
139
- :host(:not([on])) .d2l-switch-icon-on {
140
- color: var(--d2l-theme-icon-color-active);
141
- transform: scale(0.35);
142
- }
143
- .d2l-switch-text {
144
- cursor: default;
145
- font-size: 0.8rem;
146
- font-weight: 400;
147
- }
148
- :host([text-position="hidden"]) .d2l-switch-text {
149
- display: none;
150
- }
151
- .d2l-switch-inner:hover, .switch-hover {
152
- outline: 2px solid var(--d2l-theme-border-color-focus);
153
- outline-offset: -2px;
154
- }
155
- @media (prefers-reduced-motion: reduce) {
156
- .d2l-switch-toggle,
157
- .d2l-switch-icon-on,
158
- .d2l-switch-icon-off {
159
- transition: none;
160
- }
46
+ .d2l-switch-container {
47
+ --d2l-focus-ring-offset: 0;
48
+ background-color: var(--d2l-switch-container-background-color, var(--d2l-theme-background-color-base));
49
+ border-radius: 1rem;
50
+ box-sizing: border-box;
51
+ cursor: default;
52
+ display: inline-block;
53
+ font-size: 0;
54
+ line-height: 0;
55
+ outline-style: none;
56
+ padding: 0.1rem;
57
+ vertical-align: middle;
58
+ }
59
+ ${getFocusRingStyles('.d2l-switch-container', { extraStyles: css`position: relative;` })}
60
+ :host([disabled]) .d2l-switch-container {
61
+ cursor: default;
62
+ opacity: var(--d2l-theme-opacity-disabled-control);
63
+ }
64
+ :host([disabled]) .d2l-switch-container:hover > .d2l-switch-inner,
65
+ :host([disabled]) .d2l-switch-inner:hover,
66
+ :host([disabled]) .switch-hover {
67
+ outline: none;
68
+ }
69
+ .d2l-switch-inner {
70
+ border: 1px solid var(--d2l-theme-border-color-emphasized);
71
+ border-radius: 0.8rem;
72
+ box-sizing: border-box;
73
+ padding: 0.3rem;
74
+ position: relative;
75
+ width: 3rem;
76
+ }
77
+ :host([on]) .d2l-switch-inner {
78
+ background-color: var(--d2l-theme-background-color-interactive-highlighted);
79
+ }
80
+ .d2l-switch-toggle {
81
+ position: relative;
82
+ transition: transform 150ms ease-out;
83
+ }
84
+ .d2l-switch-toggle > div {
85
+ background-color: var(--d2l-theme-background-color-base);
86
+ border: 1px solid var(--d2l-theme-border-color-emphasized);
87
+ border-radius: 0.6rem;
88
+ box-sizing: border-box;
89
+ display: inline-block;
90
+ height: 1.1rem;
91
+ left: -0.1rem;
92
+ position: absolute;
93
+ top: -0.95rem;
94
+ width: 1.1rem;
95
+ }
96
+ :host([on]) .d2l-switch-toggle > div {
97
+ left: 0.1rem;
98
+ }
99
+ :host([dir="rtl"][on]) .d2l-switch-toggle > div {
100
+ right: 0.3rem;
101
+ }
102
+ :host([dir="rtl"]) .d2l-switch-toggle > div {
103
+ left: auto;
104
+ right: -0.1rem;
105
+ }
106
+ :host([on]) .d2l-switch-toggle {
107
+ transform: translateX(1.2rem);
108
+ }
109
+ :host([dir="rtl"][on]) .d2l-switch-toggle {
110
+ right: -0.2rem;
111
+ transform: translateX(-1.2rem);
112
+ }
113
+ d2l-icon, d2l-icon-custom {
114
+ height: 0.8rem;
115
+ width: 0.8rem;
116
+ }
117
+ .d2l-switch-icon-on, .d2l-switch-icon-off {
118
+ display: inline-block;
119
+ transform: scale(1);
120
+ transition: transform 150ms ease-out;
121
+ }
122
+ .d2l-switch-icon-on {
123
+ margin-right: 0.65rem;
124
+ }
125
+ :host([dir="rtl"]) .d2l-switch-icon-on {
126
+ margin-left: 0.65rem;
127
+ margin-right: 0;
128
+ }
129
+ :host([on]) .d2l-switch-icon-on > d2l-icon,
130
+ :host([on]) .d2l-switch-icon-on > d2l-icon-custom {
131
+ color: var(--d2l-theme-icon-color-active);
132
+ }
133
+ :host([on]) .d2l-switch-icon-off {
134
+ transform: scale(0.35);
135
+ }
136
+ :host(:not([on])) .d2l-switch-icon-on {
137
+ color: var(--d2l-theme-icon-color-active);
138
+ transform: scale(0.35);
139
+ }
140
+ .d2l-switch-text {
141
+ cursor: default;
142
+ font-size: 0.8rem;
143
+ font-weight: 400;
144
+ }
145
+ :host([text-position="hidden"]) .d2l-switch-text {
146
+ display: none;
147
+ }
148
+ .d2l-switch-inner:hover, .switch-hover {
149
+ outline: 2px solid var(--d2l-theme-border-color-focus);
150
+ outline-offset: -2px;
151
+ }
152
+ @media (prefers-reduced-motion: reduce) {
153
+ .d2l-switch-toggle,
154
+ .d2l-switch-icon-on,
155
+ .d2l-switch-icon-off {
156
+ transition: none;
161
157
  }
162
- `;
163
- }
158
+ }
159
+ `;
164
160
 
165
161
  constructor() {
166
162
  super();
@@ -12,22 +12,18 @@ import { SwitchMixin } from './switch-mixin.js';
12
12
  */
13
13
  class VisibilitySwitch extends LocalizeCoreElement(SwitchMixin(LitElement)) {
14
14
 
15
- static get properties() {
16
- return {
17
- _hasConditions: { state: true }
18
- };
19
- }
15
+ static properties = {
16
+ _hasConditions: { state: true }
17
+ };
20
18
 
21
- static get styles() {
22
- return [super.styles, css`
23
- d2l-tooltip-help {
24
- display: none;
25
- }
26
- d2l-tooltip-help.switch-visibility-conditions-show {
27
- display: inline;
28
- }
29
- `];
30
- }
19
+ static styles = [super.styles, css`
20
+ d2l-tooltip-help {
21
+ display: none;
22
+ }
23
+ d2l-tooltip-help.switch-visibility-conditions-show {
24
+ display: inline;
25
+ }
26
+ `];
31
27
 
32
28
  constructor() {
33
29
  super();
@@ -11,13 +11,11 @@ import { SwitchMixin } from './switch-mixin.js';
11
11
  */
12
12
  class Switch extends SwitchMixin(LitElement) {
13
13
 
14
- static get styles() {
15
- return [super.styles, css`
16
- .d2l-switch-icon-off > d2l-icon-custom {
17
- color: var(--d2l-theme-icon-color-standard);
18
- }
19
- `];
20
- }
14
+ static styles = [super.styles, css`
15
+ .d2l-switch-icon-off > d2l-icon-custom {
16
+ color: var(--d2l-theme-icon-color-standard);
17
+ }
18
+ `];
21
19
 
22
20
  get offIcon() {
23
21
  return html`