@brightspace-ui/core 3.79.2 → 3.79.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,7 +72,6 @@ class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(RtlMixin(LitElem
72
72
  :host {
73
73
  display: flex;
74
74
  margin: 0.25rem;
75
- pointer-events: auto; /* required since its parent may set point-events: none; (see generic layout) */
76
75
  }
77
76
  :host([hidden]) {
78
77
  display: none;
@@ -116,6 +115,9 @@ class ListItemDragHandle extends LocalizeCoreElement(FocusMixin(RtlMixin(LitElem
116
115
  .d2l-list-item-drag-handle-tooltip-key {
117
116
  font-weight: 700;
118
117
  }
118
+ d2l-button-move {
119
+ pointer-events: auto; /* required since ancestors may set point-events: none; (see generic layout) */
120
+ }
119
121
  `];
120
122
  }
121
123
 
@@ -20,7 +20,6 @@ The `d2l-more-less` element can be used to minimize the display of long content,
20
20
 
21
21
  | Property | Type | Description |
22
22
  |---|---|---|
23
- | `blur-color` | String | Gradient HEX formatted color of the blurring effect (defaults to white). |
24
23
  | `expanded` | Boolean | Specifies the expanded/collapsed state of the content |
25
24
  | `h-align` | String | A value of `text` aligns the leading edge of text |
26
25
  | `height` | String, default: `'4em'` | Maximum height of the content when in "less" mode. The `d2l-more-less` element itself will take up additional vertical space for the fading effect as well as the more/less button itself. |
@@ -45,16 +45,6 @@
45
45
  </template>
46
46
  </d2l-demo-snippet>
47
47
 
48
- <h2>More-less with custom blur color</h2>
49
-
50
- <d2l-demo-snippet>
51
- <template>
52
- <d2l-more-less blur-color="#f00">
53
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <a href="">Vestibulum</a> elementum venenatis arcu sit amet varius. Maecenas posuere magna arcu, quis maximus odio fringilla ac. Integer ligula lorem, faucibus sit amet cursus vel, pellentesque a justo. Aliquam urna metus, molestie at tempor eget, vestibulum a purus. Donec aliquet rutrum mi. Duis ornare congue tempor. Nullam sed massa fermentum, tincidunt leo eu, vestibulum orci. Sed ultrices est in lacus venenatis, posuere suscipit arcu scelerisque. In aliquam ipsum rhoncus, lobortis ligula ut, molestie orci. Proin scelerisque tempor posuere. Phasellus consequat, lorem quis hendrerit tempor, sem lectus sagittis nunc, in tristique dui arcu non arcu. Nunc aliquam nisi et sapien commodo lacinia. <a href="">Quisque</a> iaculis orci vel odio varius porta. Fusce tincidunt dolor enim, vitae sollicitudin purus suscipit eu.</p>
54
- </d2l-more-less>
55
- </template>
56
- </d2l-demo-snippet>
57
-
58
48
  </d2l-demo-page>
59
49
 
60
50
  <script>
@@ -20,12 +20,6 @@ class MoreLess extends LocalizeCoreElement(LitElement) {
20
20
 
21
21
  static get properties() {
22
22
  return {
23
- /**
24
- * The gradient color of the blurring effect
25
- * @type {string}
26
- */
27
- blurColor: { type: String, attribute: 'blur-color' },
28
-
29
23
  /**
30
24
  * Indicates whether element is in "more" state
31
25
  * @type {boolean}
@@ -49,7 +43,6 @@ class MoreLess extends LocalizeCoreElement(LitElement) {
49
43
  * @type {boolean}
50
44
  */
51
45
  inactive: { type: Boolean, reflect: true },
52
- __blurBackground: { state: true },
53
46
  __maxHeight: { state: true },
54
47
  __transitionAdded: { state: true }
55
48
  };
@@ -67,16 +60,9 @@ class MoreLess extends LocalizeCoreElement(LitElement) {
67
60
  .d2l-more-less-transition {
68
61
  transition: max-height ${transitionDur}ms cubic-bezier(0, 0.7, 0.5, 1);
69
62
  }
70
- .d2l-more-less-blur {
71
- display: none;
72
- }
73
- :host(:not([expanded]):not([inactive])) .d2l-more-less-blur {
74
- bottom: 1em;
75
- content: "";
76
- display: block;
77
- height: 1em;
78
- margin-bottom: -0.75em;
79
- position: relative;
63
+ :host(:not([expanded]):not([inactive])) .d2l-more-less-content {
64
+ -webkit-mask-image: linear-gradient(to top, transparent, #000000 1em);
65
+ mask-image: linear-gradient(to top, transparent, #000000 1em);
80
66
  }
81
67
  :host([inactive]) .d2l-more-less-toggle {
82
68
  display: none;
@@ -96,7 +82,6 @@ class MoreLess extends LocalizeCoreElement(LitElement) {
96
82
  this.height = '4em';
97
83
  this.inactive = false;
98
84
 
99
- this.__blurBackground = 'linear-gradient(rgba(255, 255, 255, 0) 0%, rgb(255, 255, 255) 100%)';
100
85
  this.__transitionAdded = false;
101
86
  this.__maxHeight = this.height;
102
87
 
@@ -145,7 +130,6 @@ class MoreLess extends LocalizeCoreElement(LitElement) {
145
130
 
146
131
  this.__content = this.shadowRoot.querySelector('.d2l-more-less-content');
147
132
  this.__contentSlot = this.shadowRoot.querySelector('.d2l-more-less-content slot');
148
- this.__init_setupBlurColour();
149
133
  this.__init_setupListeners();
150
134
 
151
135
  this.__bound_transitionEvents = this.__transitionEvents.bind(this);
@@ -164,7 +148,6 @@ class MoreLess extends LocalizeCoreElement(LitElement) {
164
148
  <div id="${this.__contentId}" class=${classMap(contentClasses)} style=${styleMap({ maxHeight: `${this.__maxHeight}` })}>
165
149
  <slot></slot>
166
150
  </div>
167
- <div class="d2l-more-less-blur" style=${styleMap({ background: `${this.__blurBackground}` })}></div>
168
151
  <d2l-button-subtle
169
152
  class="d2l-more-less-toggle"
170
153
  icon="${this.__computeIcon()}"
@@ -300,33 +283,6 @@ class MoreLess extends LocalizeCoreElement(LitElement) {
300
283
  });
301
284
  }
302
285
 
303
- __init_setupBlurColour() {
304
- if (!this.blurColor
305
- || this.blurColor[0] !== '#'
306
- || (this.blurColor.length !== 4 && this.blurColor.length !== 7)
307
- ) {
308
- return;
309
- }
310
-
311
- let hex = this.blurColor.substring(1);
312
-
313
- // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
314
- if (hex.length === 3) {
315
- const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
316
- hex = hex.replace(shorthandRegex, (m, r, g, b) => {
317
- return r + r + g + g + b + b;
318
- });
319
- }
320
-
321
- const bigint = parseInt(hex, 16);
322
- const r = (bigint >> 16) & 255;
323
- const g = (bigint >> 8) & 255;
324
- const b = bigint & 255;
325
-
326
- this.__blurBackground =
327
- `linear-gradient(rgba(${r}, ${g}, ${b}, 0) 0%, rgb(${r}, ${g}, ${b}) 100%)`;
328
- }
329
-
330
286
  __init_setupListeners() {
331
287
  this.__startObserving();
332
288
  if (this.__contentSlot) {
@@ -10170,11 +10170,6 @@
10170
10170
  "path": "./components/more-less/more-less.js",
10171
10171
  "description": "A component used to minimize the display of long content, while providing a way to reveal the full content.",
10172
10172
  "attributes": [
10173
- {
10174
- "name": "blur-color",
10175
- "description": "The gradient color of the blurring effect",
10176
- "type": "string"
10177
- },
10178
10173
  {
10179
10174
  "name": "h-align",
10180
10175
  "description": "The h-align property of the more-less button",
@@ -10200,12 +10195,6 @@
10200
10195
  }
10201
10196
  ],
10202
10197
  "properties": [
10203
- {
10204
- "name": "blurColor",
10205
- "attribute": "blur-color",
10206
- "description": "The gradient color of the blurring effect",
10207
- "type": "string"
10208
- },
10209
10198
  {
10210
10199
  "name": "hAlign",
10211
10200
  "attribute": "h-align",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.79.2",
3
+ "version": "3.79.4",
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",