@brightspace-ui/core 3.127.2 → 3.127.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,18 +1,15 @@
1
1
  import '../colors/colors.js';
2
2
  import '../tooltip/tooltip.js';
3
- import { css, html, LitElement, nothing, unsafeCSS } from 'lit';
3
+ import { css, html, LitElement, nothing } from 'lit';
4
4
  import { classMap } from 'lit/directives/class-map.js';
5
5
  import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
6
6
  import { FormElementMixin } from '../form/form-element-mixin.js';
7
- import { getFlag } from '../../helpers/flags.js';
8
7
  import { getUniqueId } from '../../helpers/uniqueId.js';
9
8
  import { ifDefined } from 'lit/directives/if-defined.js';
10
9
  import { InputInlineHelpMixin } from './input-inline-help.js';
11
10
  import { offscreenStyles } from '../offscreen/offscreen.js';
12
11
  import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
13
12
 
14
- const inputStyleTweaksEnabled = getFlag('input-style-tweaks', true);
15
-
16
13
  export const cssSizes = {
17
14
  inputBoxSize: 1.2,
18
15
  checkboxMargin: 0.5,
@@ -132,7 +129,7 @@ class InputCheckbox extends FormElementMixin(InputInlineHelpMixin(FocusMixin(Ske
132
129
  css`
133
130
  :host {
134
131
  display: block;
135
- margin-block-end: ${unsafeCSS(inputStyleTweaksEnabled ? '0.6rem' : '0.9rem')}; /* stylelint-disable-line */
132
+ margin-block-end: 0.6rem;
136
133
  }
137
134
  :host([hidden]) {
138
135
  display: none;
@@ -180,7 +177,7 @@ class InputCheckbox extends FormElementMixin(InputInlineHelpMixin(FocusMixin(Ske
180
177
  }
181
178
  .d2l-input-checkbox-supporting {
182
179
  display: none;
183
- margin-block-start: ${unsafeCSS(inputStyleTweaksEnabled ? '0.6rem' : '0.9rem')}; /* stylelint-disable-line */
180
+ margin-block-start: 0.6rem;
184
181
  }
185
182
  .d2l-input-checkbox-supporting-visible {
186
183
  display: block;
@@ -1,7 +1,4 @@
1
- import { css, unsafeCSS } from 'lit';
2
- import { getFlag } from '../../helpers/flags.js';
3
-
4
- const inputStyleTweaksEnabled = getFlag('input-style-tweaks', true);
1
+ import { css } from 'lit';
5
2
 
6
3
  export const inputLabelStyles = css`
7
4
  .d2l-input-label {
@@ -10,8 +7,8 @@ export const inputLabelStyles = css`
10
7
  font-size: 0.7rem;
11
8
  font-weight: 700;
12
9
  letter-spacing: 0.2px;
13
- line-height: ${unsafeCSS(inputStyleTweaksEnabled ? '0.9rem' : '1rem')}; /* stylelint-disable-line */
14
- margin-block: 0 ${unsafeCSS(inputStyleTweaksEnabled ? '0.4rem' : '7px')}; /* stylelint-disable-line */
10
+ line-height: 0.9rem;
11
+ margin-block: 0 0.4rem;
15
12
  margin-inline: 0;
16
13
  padding: 0;
17
14
  }
@@ -9,10 +9,6 @@
9
9
  padding-block: 0 0.4rem;
10
10
  padding-inline: 0;
11
11
  width: 100%;
12
- .d2l-typography.d2l-no-input-style-tweaks & {
13
- line-height: 1rem;
14
- padding-block-end: 7px;
15
- }
16
12
  }
17
13
 
18
14
  @mixin d2l-input-label-required() {
@@ -1,19 +1,16 @@
1
1
  import { clearDismissible, setDismissible } from '../../helpers/dismissible.js';
2
- import { css, html, LitElement, unsafeCSS } from 'lit';
2
+ import { css, html, LitElement } 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';
10
9
  import { getUniqueId } from '../../helpers/uniqueId.js';
11
10
  import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
12
11
  import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
13
12
  import { styleMap } from 'lit/directives/style-map.js';
14
13
 
15
- const inputStyleTweaksEnabled = getFlag('input-style-tweaks', true);
16
-
17
14
  let logAccessibilityWarning = true;
18
15
 
19
16
  /* only one tooltip is to be shown at once - track the active tooltip so it can be hidden if necessary */
@@ -313,12 +310,12 @@ class Tooltip extends RtlMixin(LitElement) {
313
310
  border-radius: ${contentBorderRadius}px;
314
311
  box-sizing: border-box;
315
312
  max-width: 17.5rem;
316
- min-height: ${unsafeCSS(inputStyleTweaksEnabled ? '1.95rem' : '2.1rem')}; /* stylelint-disable-line */
313
+ min-height: 1.95rem;
317
314
  min-width: 2.1rem;
318
315
  outline: ${outlineSize}px solid var(--d2l-tooltip-outline-color);
319
316
  overflow: hidden;
320
317
  overflow-wrap: anywhere;
321
- padding-block: ${(inputStyleTweaksEnabled ? 10 : 11) - contentBorderSize}px ${11 - contentBorderSize}px;
318
+ padding-block: ${10 - contentBorderSize}px ${11 - contentBorderSize}px;
322
319
  padding-inline: ${contentHorizontalPadding - contentBorderSize}px;
323
320
  position: absolute;
324
321
  }
@@ -1,8 +1,5 @@
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);
6
3
 
7
4
  export const _isValidCssSelector = (selector) => {
8
5
  if (selector === ':host') return true;
@@ -115,7 +112,7 @@ export const _generateBodySmallStyles = (selector) => {
115
112
  color: var(--d2l-color-tungsten);
116
113
  font-size: 0.7rem;
117
114
  font-weight: 400;
118
- line-height: ${unsafeCSS(inputStyleTweaksEnabled ? '0.9rem' : '1rem')}; /* stylelint-disable-line */
115
+ line-height: 0.9rem;
119
116
  margin: auto;
120
117
  }
121
118
  :host([skeleton]) ${selector}.d2l-skeletize::before {
@@ -132,7 +129,6 @@ export const _generateBodySmallStyles = (selector) => {
132
129
  max-height: 5rem;
133
130
  }
134
131
  @media (max-width: 615px) {
135
- ${unsafeCSS(!inputStyleTweaksEnabled ? `${selector} { font-size: 0.6rem; line-height: 0.9rem; }` : '')}
136
132
  :host([skeleton]) ${selector}.d2l-skeletize::before {
137
133
  bottom: 0.25rem;
138
134
  top: 0.2rem;
@@ -272,7 +268,7 @@ export const _generateLabelStyles = (selector) => {
272
268
  font-size: 0.7rem;
273
269
  font-weight: 700;
274
270
  letter-spacing: 0.2px;
275
- line-height: ${unsafeCSS(inputStyleTweaksEnabled ? '0.9rem' : '1rem')}; /* stylelint-disable-line */
271
+ line-height: 0.9rem;
276
272
  }
277
273
  :host([skeleton]) ${selector}.d2l-skeletize::before {
278
274
  bottom: 0.25rem;
@@ -1,9 +1,7 @@
1
1
  import '../colors/colors.js';
2
2
  import { _generateBlockquoteStyles, fontFacesCss } from './styles.js';
3
- import { getFlag } from '../../helpers/flags.js';
4
3
 
5
4
  if (!document.head.querySelector('#d2l-typography-font-face')) {
6
- const inputStyleTweaksEnabled = getFlag('input-style-tweaks', true);
7
5
  const style = document.createElement('style');
8
6
  style.id = 'd2l-typography-font-face';
9
7
  style.textContent = `
@@ -45,13 +43,13 @@ if (!document.head.querySelector('#d2l-typography-font-face')) {
45
43
  color: var(--d2l-color-tungsten);
46
44
  font-size: 0.7rem;
47
45
  font-weight: 400;
48
- line-height: ${(inputStyleTweaksEnabled ? '0.9rem' : '1rem')};
46
+ line-height: 0.9rem;
49
47
  margin: auto;
50
48
  }
51
49
 
52
50
  .d2l-typography .d2l-label-text {
53
51
  font-size: 0.7rem;
54
- line-height: ${(inputStyleTweaksEnabled ? '0.9rem' : '1rem')};
52
+ line-height: 0.9rem;
55
53
  font-weight: 700;
56
54
  letter-spacing: 0.2px;
57
55
  }
@@ -117,11 +115,6 @@ if (!document.head.querySelector('#d2l-typography-font-face')) {
117
115
  line-height: 1.2rem;
118
116
  }
119
117
 
120
- ${!inputStyleTweaksEnabled ? `.d2l-typography .d2l-body-small {
121
- font-size: 0.6rem;
122
- line-height: 0.9rem;
123
- }` : ''}
124
-
125
118
  .d2l-typography .d2l-heading-1 {
126
119
  font-size: 1.5rem;
127
120
  line-height: 1.8rem;
@@ -113,13 +113,6 @@
113
113
  font-weight: 400;
114
114
  line-height: 0.9rem;
115
115
  margin: auto;
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
- }
122
- }
123
116
  }
124
117
 
125
118
  @mixin d2l-heading-1 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.127.2",
3
+ "version": "3.127.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",