@brightspace-ui/core 3.116.2 → 3.116.3
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,16 +1,19 @@
|
|
1
1
|
import { clearDismissible, setDismissible } from '../../helpers/dismissible.js';
|
2
|
-
import { css, html, LitElement } from 'lit';
|
2
|
+
import { css, html, LitElement, unsafeCSS } from 'lit';
|
3
3
|
import { cssEscape, elemIdListAdd, elemIdListRemove, getBoundingAncestor, getOffsetParent, isComposedAncestor } from '../../helpers/dom.js';
|
4
4
|
import { getComposedActiveElement, isFocusable } from '../../helpers/focus.js';
|
5
5
|
import { interactiveElements, interactiveRoles, isInteractive } from '../../helpers/interactive.js';
|
6
6
|
import { announce } from '../../helpers/announce.js';
|
7
7
|
import { bodySmallStyles } from '../typography/styles.js';
|
8
8
|
import { classMap } from 'lit/directives/class-map.js';
|
9
|
+
import { getFlag } from '../../helpers/flags.js';
|
9
10
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
10
11
|
import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
|
11
12
|
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
12
13
|
import { styleMap } from 'lit/directives/style-map.js';
|
13
14
|
|
15
|
+
const inputStyleTweaksEnabled = getFlag('input-style-tweaks', true);
|
16
|
+
|
14
17
|
let logAccessibilityWarning = true;
|
15
18
|
|
16
19
|
/* only one tooltip is to be shown at once - track the active tooltip so it can be hidden if necessary */
|
@@ -310,12 +313,13 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
310
313
|
border-radius: ${contentBorderRadius}px;
|
311
314
|
box-sizing: border-box;
|
312
315
|
max-width: 17.5rem;
|
313
|
-
min-height: 2.1rem;
|
316
|
+
min-height: ${unsafeCSS(inputStyleTweaksEnabled ? '1.95rem' : '2.1rem')}; /* stylelint-disable-line */
|
314
317
|
min-width: 2.1rem;
|
315
318
|
outline: ${outlineSize}px solid var(--d2l-tooltip-outline-color);
|
316
319
|
overflow: hidden;
|
317
320
|
overflow-wrap: anywhere;
|
318
|
-
padding: ${11 - contentBorderSize}px ${
|
321
|
+
padding-block: ${(inputStyleTweaksEnabled ? 10 : 11) - contentBorderSize}px ${11 - contentBorderSize}px;
|
322
|
+
padding-inline: ${contentHorizontalPadding - contentBorderSize}px;
|
319
323
|
position: absolute;
|
320
324
|
}
|
321
325
|
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import '../colors/colors.js';
|
2
2
|
import { css, unsafeCSS } from 'lit';
|
3
|
+
import { getFlag } from '../../helpers/flags.js';
|
4
|
+
|
5
|
+
const inputStyleTweaksEnabled = getFlag('input-style-tweaks', true);
|
3
6
|
|
4
7
|
export const _isValidCssSelector = (selector) => {
|
5
8
|
if (selector === ':host') return true;
|
@@ -112,7 +115,7 @@ export const _generateBodySmallStyles = (selector) => {
|
|
112
115
|
color: var(--d2l-color-tungsten);
|
113
116
|
font-size: 0.7rem;
|
114
117
|
font-weight: 400;
|
115
|
-
line-height: 1rem;
|
118
|
+
line-height: ${unsafeCSS(inputStyleTweaksEnabled ? '0.9rem' : '1rem')}; /* stylelint-disable-line */
|
116
119
|
margin: auto;
|
117
120
|
}
|
118
121
|
:host([skeleton]) ${selector}.d2l-skeletize::before {
|
@@ -129,10 +132,7 @@ export const _generateBodySmallStyles = (selector) => {
|
|
129
132
|
max-height: 5rem;
|
130
133
|
}
|
131
134
|
@media (max-width: 615px) {
|
132
|
-
${selector} {
|
133
|
-
font-size: 0.6rem;
|
134
|
-
line-height: 0.9rem;
|
135
|
-
}
|
135
|
+
${unsafeCSS(!inputStyleTweaksEnabled ? `${selector} { font-size: 0.6rem; line-height: 0.9rem; }` : '')}
|
136
136
|
:host([skeleton]) ${selector}.d2l-skeletize::before {
|
137
137
|
bottom: 0.25rem;
|
138
138
|
top: 0.2rem;
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import '../colors/colors.js';
|
2
2
|
import { fontFacesCss } from './styles.js';
|
3
|
+
import { getFlag } from '../../helpers/flags.js';
|
3
4
|
|
4
5
|
if (!document.head.querySelector('#d2l-typography-font-face')) {
|
6
|
+
const inputStyleTweaksEnabled = getFlag('input-style-tweaks', true);
|
5
7
|
const style = document.createElement('style');
|
6
8
|
style.id = 'd2l-typography-font-face';
|
7
9
|
style.textContent = `
|
@@ -43,7 +45,7 @@ if (!document.head.querySelector('#d2l-typography-font-face')) {
|
|
43
45
|
color: var(--d2l-color-tungsten);
|
44
46
|
font-size: 0.7rem;
|
45
47
|
font-weight: 400;
|
46
|
-
line-height: 1rem;
|
48
|
+
line-height: ${(inputStyleTweaksEnabled ? '0.9rem' : '1rem')};
|
47
49
|
margin: auto;
|
48
50
|
}
|
49
51
|
|
@@ -147,10 +149,10 @@ if (!document.head.querySelector('#d2l-typography-font-face')) {
|
|
147
149
|
line-height: 1.2rem;
|
148
150
|
}
|
149
151
|
|
150
|
-
|
152
|
+
${!inputStyleTweaksEnabled ? `.d2l-typography .d2l-body-small {
|
151
153
|
font-size: 0.6rem;
|
152
154
|
line-height: 0.9rem;
|
153
|
-
}
|
155
|
+
}` : ''}
|
154
156
|
|
155
157
|
.d2l-typography .d2l-heading-1 {
|
156
158
|
font-size: 1.5rem;
|
@@ -111,11 +111,14 @@
|
|
111
111
|
color: colors.$d2l-color-tungsten;
|
112
112
|
font-size: 0.7rem;
|
113
113
|
font-weight: 400;
|
114
|
-
line-height:
|
114
|
+
line-height: 0.9rem;
|
115
115
|
margin: auto;
|
116
|
-
|
117
|
-
|
118
|
-
|
116
|
+
.d2l-typography.d2l-no-input-style-tweaks & {
|
117
|
+
line-height: 1rem;
|
118
|
+
@media (max-width: 615px) {
|
119
|
+
font-size: 0.6rem;
|
120
|
+
line-height: 0.9rem;
|
121
|
+
}
|
119
122
|
}
|
120
123
|
}
|
121
124
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.116.
|
3
|
+
"version": "3.116.3",
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
5
5
|
"type": "module",
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|