@brightspace-ui/core 3.159.0 → 3.159.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.
@@ -1,8 +1,12 @@
1
1
  import '../icons/icon.js';
2
2
  import { css, html, LitElement } from 'lit';
3
+ import { getFlag } from '../../helpers/flags.js';
3
4
  import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
4
5
  import { MenuItemMixin } from './menu-item-mixin.js';
5
6
  import { menuItemStyles } from './menu-item-styles.js';
7
+ import { overflowEllipsisDeclarations } from '../../helpers/overflow.js';
8
+
9
+ const overflowClipEnabled = getFlag('GAUD-7887-core-components-overflow-clipping', true);
6
10
 
7
11
  class MenuItemReturn extends LocalizeCoreElement(MenuItemMixin(LitElement)) {
8
12
 
@@ -17,11 +21,13 @@ class MenuItemReturn extends LocalizeCoreElement(MenuItemMixin(LitElement)) {
17
21
  span {
18
22
  flex: auto;
19
23
  line-height: 1rem;
20
- overflow-x: hidden;
21
- overflow-y: hidden;
22
- text-decoration: none;
23
- text-overflow: ellipsis;
24
- white-space: nowrap;
24
+ ${overflowClipEnabled ? overflowEllipsisDeclarations : css`
25
+ overflow-x: hidden;
26
+ overflow-y: hidden;
27
+ text-decoration: none;
28
+ text-overflow: ellipsis;
29
+ white-space: nowrap;
30
+ `}
25
31
  }
26
32
 
27
33
  d2l-icon {
@@ -1,6 +1,10 @@
1
1
  import '../colors/colors.js';
2
2
  import { css, unsafeCSS } from 'lit';
3
+ import { getFlag } from '../../helpers/flags.js';
3
4
  import { getFocusPseudoClass } from '../../helpers/focus.js';
5
+ import { getOverflowDeclarations } from '../../helpers/overflow.js';
6
+
7
+ const overflowClipEnabled = getFlag('GAUD-7887-core-components-overflow-clipping', true);
4
8
 
5
9
  export const menuItemStyles = css`
6
10
  :host {
@@ -51,15 +55,17 @@ export const menuItemStyles = css`
51
55
  }
52
56
 
53
57
  .d2l-menu-item-text {
54
- -webkit-box-orient: vertical;
55
- display: -webkit-box;
56
58
  flex: auto;
57
- -webkit-line-clamp: var(--d2l-menu-item-lines, 2);
58
59
  line-height: 1rem;
59
- overflow-wrap: anywhere;
60
- overflow-x: hidden;
61
- overflow-y: hidden;
62
- white-space: normal;
60
+ ${overflowClipEnabled ? getOverflowDeclarations({ lines: 'var(--d2l-menu-item-lines, 2)' }) : css`
61
+ -webkit-box-orient: vertical;
62
+ display: -webkit-box;
63
+ -webkit-line-clamp: var(--d2l-menu-item-lines, 2);
64
+ overflow-wrap: anywhere;
65
+ overflow-x: hidden;
66
+ overflow-y: hidden;
67
+ white-space: normal;
68
+ `}
63
69
  }
64
70
 
65
71
  .d2l-menu-item-supporting {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.159.0",
3
+ "version": "3.159.1",
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",