@umbraco-ui/uui-card-block-type 1.8.0 → 1.9.0-rc.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.
@@ -45,6 +45,12 @@
45
45
  "type": "string",
46
46
  "default": "\"undefined\""
47
47
  },
48
+ {
49
+ "name": "rel",
50
+ "description": "Set the rel attribute for an anchor tag, only used when using href.",
51
+ "type": "string",
52
+ "default": "\"undefined\""
53
+ },
48
54
  {
49
55
  "name": "select-only",
50
56
  "description": "Enforce selection interaction and prevent all other interactions, set this when the UI is turned into Selection-Mode.",
@@ -110,6 +116,13 @@
110
116
  "type": "string",
111
117
  "default": "\"undefined\""
112
118
  },
119
+ {
120
+ "name": "rel",
121
+ "attribute": "rel",
122
+ "description": "Set the rel attribute for an anchor tag, only used when using href.",
123
+ "type": "string",
124
+ "default": "\"undefined\""
125
+ },
113
126
  {
114
127
  "name": "styles",
115
128
  "type": "CSSResult[]",
@@ -152,7 +165,15 @@
152
165
  "slots": [
153
166
  {
154
167
  "name": "",
155
- "description": "Default content."
168
+ "description": "slot for the default content area"
169
+ },
170
+ {
171
+ "name": "tag",
172
+ "description": "slot for the tag with support for `<uui-tag>` elements"
173
+ },
174
+ {
175
+ "name": "actions",
176
+ "description": "slot for the actions with support for the `<uui-action-bar>` element"
156
177
  }
157
178
  ]
158
179
  }
package/lib/index.js CHANGED
@@ -7,34 +7,25 @@ import { styleMap } from 'lit/directives/style-map.js';
7
7
 
8
8
  var __defProp = Object.defineProperty;
9
9
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
+ var __typeError = (msg) => {
11
+ throw TypeError(msg);
12
+ };
10
13
  var __decorateClass = (decorators, target, key, kind) => {
11
14
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
12
15
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
13
16
  if (decorator = decorators[i])
14
17
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
15
- if (kind && result)
16
- __defProp(target, key, result);
18
+ if (kind && result) __defProp(target, key, result);
17
19
  return result;
18
20
  };
19
- var __accessCheck = (obj, member, msg) => {
20
- if (!member.has(obj))
21
- throw TypeError("Cannot " + msg);
22
- };
23
- var __privateAdd = (obj, member, value) => {
24
- if (member.has(obj))
25
- throw TypeError("Cannot add the same private member more than once");
26
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
27
- };
28
- var __privateMethod = (obj, member, method) => {
29
- __accessCheck(obj, member, "access private method");
30
- return method;
31
- };
32
- var _renderButton, renderButton_fn, _renderLink, renderLink_fn;
21
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
22
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
23
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
24
+ var _UUICardBlockTypeElement_instances, renderButton_fn, renderLink_fn;
33
25
  let UUICardBlockTypeElement = class extends UUICardElement {
34
26
  constructor() {
35
27
  super(...arguments);
36
- __privateAdd(this, _renderButton);
37
- __privateAdd(this, _renderLink);
28
+ __privateAdd(this, _UUICardBlockTypeElement_instances);
38
29
  this.name = "";
39
30
  }
40
31
  render() {
@@ -44,14 +35,14 @@ let UUICardBlockTypeElement = class extends UUICardElement {
44
35
  style=${styleMap({ backgroundColor: this.background })}>
45
36
  <slot></slot>
46
37
  </div>
47
- ${this.href ? __privateMethod(this, _renderLink, renderLink_fn).call(this) : __privateMethod(this, _renderButton, renderButton_fn).call(this)}
38
+ ${this.href ? __privateMethod(this, _UUICardBlockTypeElement_instances, renderLink_fn).call(this) : __privateMethod(this, _UUICardBlockTypeElement_instances, renderButton_fn).call(this)}
48
39
 
49
40
  <slot name="tag"></slot>
50
41
  <slot name="actions"></slot>
51
42
  `;
52
43
  }
53
44
  };
54
- _renderButton = new WeakSet();
45
+ _UUICardBlockTypeElement_instances = new WeakSet();
55
46
  renderButton_fn = function() {
56
47
  return html`
57
48
  <button
@@ -63,7 +54,6 @@ renderButton_fn = function() {
63
54
  </button>
64
55
  `;
65
56
  };
66
- _renderLink = new WeakSet();
67
57
  renderLink_fn = function() {
68
58
  return html`
69
59
  <a
@@ -72,7 +62,9 @@ renderLink_fn = function() {
72
62
  href=${ifDefined(!this.disabled ? this.href : void 0)}
73
63
  target=${ifDefined(this.target || void 0)}
74
64
  rel=${ifDefined(
75
- this.target === "_blank" ? "noopener noreferrer" : void 0
65
+ this.rel || ifDefined(
66
+ this.target === "_blank" ? "noopener noreferrer" : void 0
67
+ )
76
68
  )}>
77
69
  <strong>${this.name}</strong><small>${this.description}</small>
78
70
  </a>
@@ -5,6 +5,9 @@ export type BlockTypeIcon = {
5
5
  };
6
6
  /**
7
7
  * @element uui-card-block-type
8
+ * @slot - slot for the default content area
9
+ * @slot tag - slot for the tag with support for `<uui-tag>` elements
10
+ * @slot actions - slot for the actions with support for the `<uui-action-bar>` element
8
11
  */
9
12
  export declare class UUICardBlockTypeElement extends UUICardElement {
10
13
  #private;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-card-block-type",
3
- "version": "1.8.0",
3
+ "version": "1.9.0-rc.1",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,8 +30,8 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "1.8.0",
34
- "@umbraco-ui/uui-card": "1.8.0"
33
+ "@umbraco-ui/uui-base": "1.9.0-rc.1",
34
+ "@umbraco-ui/uui-card": "1.9.0-rc.1"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "npm run analyze && tsc --build && rollup -c rollup.config.js",
@@ -42,5 +42,5 @@
42
42
  "access": "public"
43
43
  },
44
44
  "homepage": "https://uui.umbraco.com/?path=/story/uui-card-block-type",
45
- "gitHead": "53021762a52dc54a46f0c5ef829c1cbaabde1160"
45
+ "gitHead": "7092b4717d8b9d4825b15e087508b8f75bf81a92"
46
46
  }