@brightspace-ui/core 3.319.1 → 3.320.0

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,13 +1,14 @@
1
1
  import { html, LitElement, nothing } from 'lit';
2
2
  import { bodyCompactStyles } from '../typography/styles.js';
3
3
  import { FocusMixin } from '../../mixins/focus-mixin.js';
4
+ import { LinkMixin } from '../link/link-mixin.js';
4
5
  import { linkStyles } from '../link/link.js';
5
6
  import { PropertyRequiredMixin } from '../../mixins/property-required/property-required-mixin.js';
6
7
 
7
8
  /**
8
9
  * `d2l-empty-state-action-link` is an empty state action component that can be placed inside of the default slot of `empty-state-simple` or `empty-state-illustrated` to add a link action to the component.
9
10
  */
10
- class EmptyStateActionLink extends FocusMixin(PropertyRequiredMixin(LitElement)) {
11
+ class EmptyStateActionLink extends LinkMixin(FocusMixin(PropertyRequiredMixin(LitElement))) {
11
12
 
12
13
  static properties = {
13
14
  /**
@@ -22,19 +23,17 @@ class EmptyStateActionLink extends FocusMixin(PropertyRequiredMixin(LitElement))
22
23
  href: { type: String, required: true },
23
24
  };
24
25
 
25
- static styles = [bodyCompactStyles, linkStyles];
26
+ static styles = [super.styles, bodyCompactStyles, linkStyles];
26
27
 
27
28
  static get focusElementSelector() {
28
29
  return '.d2l-link';
29
30
  }
30
31
 
31
32
  render() {
32
- const actionLink = this.text && this.href
33
- ? html`
34
- <a class="d2l-body-compact d2l-link" href=${this.href}>${this.text}</a>`
35
- : nothing;
36
-
37
- return html`${actionLink}`;
33
+ if (!this.text || !this.href) return nothing;
34
+ const linkClasses = { 'd2l-body-compact': true, 'd2l-link': true };
35
+ const inner = html`${this.text}${this._renderNewWindowIcon()}`;
36
+ return this._render(inner, { linkClasses });
38
37
  }
39
38
 
40
39
  }
@@ -4563,10 +4563,20 @@
4563
4563
  "description": "REQUIRED: The action text to be used in the subtle button",
4564
4564
  "type": "string"
4565
4565
  },
4566
+ {
4567
+ "name": "download",
4568
+ "description": "Prompts the user to save the linked URL instead of navigating to it.\nMust be to a resource on the same origin.\nCan be used with or without a value, when set the value becomes the filename.",
4569
+ "type": "string"
4570
+ },
4566
4571
  {
4567
4572
  "name": "href",
4568
4573
  "description": "REQUIRED: The action URL or URL fragment of the link",
4569
4574
  "type": "string"
4575
+ },
4576
+ {
4577
+ "name": "target",
4578
+ "description": "Where to display the linked URL",
4579
+ "type": "string"
4570
4580
  }
4571
4581
  ],
4572
4582
  "properties": [
@@ -4576,16 +4586,28 @@
4576
4586
  "description": "REQUIRED: The action text to be used in the subtle button",
4577
4587
  "type": "string"
4578
4588
  },
4589
+ {
4590
+ "name": "download",
4591
+ "attribute": "download",
4592
+ "description": "Prompts the user to save the linked URL instead of navigating to it.\nMust be to a resource on the same origin.\nCan be used with or without a value, when set the value becomes the filename.",
4593
+ "type": "string"
4594
+ },
4579
4595
  {
4580
4596
  "name": "href",
4581
4597
  "attribute": "href",
4582
4598
  "description": "REQUIRED: The action URL or URL fragment of the link",
4583
4599
  "type": "string"
4584
4600
  },
4601
+ {
4602
+ "name": "target",
4603
+ "attribute": "target",
4604
+ "description": "Where to display the linked URL",
4605
+ "type": "string"
4606
+ },
4585
4607
  {
4586
4608
  "name": "styles",
4587
4609
  "type": "array",
4588
- "default": "[\"bodyCompactStyles\",\"linkStyles\"]"
4610
+ "default": "[\"styles\",\"bodyCompactStyles\",\"linkStyles\"]"
4589
4611
  }
4590
4612
  ]
4591
4613
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.319.1",
3
+ "version": "3.320.0",
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",