@umbraco-ui/uui-card-user 1.8.0 → 1.9.0-rc.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.
- package/custom-elements.json +13 -0
- package/lib/index.js +14 -22
- package/package.json +5 -5
package/custom-elements.json
CHANGED
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
"type": "string",
|
|
36
36
|
"default": "\"undefined\""
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
"name": "rel",
|
|
40
|
+
"description": "Set the rel attribute for an anchor tag, only used when using href.",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"default": "\"undefined\""
|
|
43
|
+
},
|
|
38
44
|
{
|
|
39
45
|
"name": "select-only",
|
|
40
46
|
"description": "Enforce selection interaction and prevent all other interactions, set this when the UI is turned into Selection-Mode.",
|
|
@@ -88,6 +94,13 @@
|
|
|
88
94
|
"type": "string",
|
|
89
95
|
"default": "\"undefined\""
|
|
90
96
|
},
|
|
97
|
+
{
|
|
98
|
+
"name": "rel",
|
|
99
|
+
"attribute": "rel",
|
|
100
|
+
"description": "Set the rel attribute for an anchor tag, only used when using href.",
|
|
101
|
+
"type": "string",
|
|
102
|
+
"default": "\"undefined\""
|
|
103
|
+
},
|
|
91
104
|
{
|
|
92
105
|
"name": "styles",
|
|
93
106
|
"type": "CSSResult[]",
|
package/lib/index.js
CHANGED
|
@@ -7,34 +7,25 @@ import { ifDefined } from 'lit/directives/if-defined.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
|
-
|
|
21
|
-
|
|
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 _UUICardUserElement_instances, renderButton_fn, renderLink_fn;
|
|
33
25
|
let UUICardUserElement = class extends UUICardElement {
|
|
34
26
|
constructor() {
|
|
35
27
|
super(...arguments);
|
|
36
|
-
__privateAdd(this,
|
|
37
|
-
__privateAdd(this, _renderLink);
|
|
28
|
+
__privateAdd(this, _UUICardUserElement_instances);
|
|
38
29
|
this.name = "";
|
|
39
30
|
this._avatarSlotHasContent = false;
|
|
40
31
|
this._avatarSlotChanged = (e) => {
|
|
@@ -55,14 +46,14 @@ let UUICardUserElement = class extends UUICardElement {
|
|
|
55
46
|
name="avatar"
|
|
56
47
|
id="avatar"
|
|
57
48
|
@slotchange=${this._avatarSlotChanged}></slot>
|
|
58
|
-
${this.href ? __privateMethod(this,
|
|
49
|
+
${this.href ? __privateMethod(this, _UUICardUserElement_instances, renderLink_fn).call(this) : __privateMethod(this, _UUICardUserElement_instances, renderButton_fn).call(this)}
|
|
59
50
|
<slot></slot>
|
|
60
51
|
<slot name="tag"></slot>
|
|
61
52
|
<slot name="actions"></slot>
|
|
62
53
|
`;
|
|
63
54
|
}
|
|
64
55
|
};
|
|
65
|
-
|
|
56
|
+
_UUICardUserElement_instances = new WeakSet();
|
|
66
57
|
renderButton_fn = function() {
|
|
67
58
|
return html`<div
|
|
68
59
|
id="open-part"
|
|
@@ -72,7 +63,6 @@ renderButton_fn = function() {
|
|
|
72
63
|
<span> ${this.name} </span>
|
|
73
64
|
</div>`;
|
|
74
65
|
};
|
|
75
|
-
_renderLink = new WeakSet();
|
|
76
66
|
renderLink_fn = function() {
|
|
77
67
|
return html`<a
|
|
78
68
|
id="open-part"
|
|
@@ -80,7 +70,9 @@ renderLink_fn = function() {
|
|
|
80
70
|
href=${ifDefined(!this.disabled ? this.href : void 0)}
|
|
81
71
|
target=${ifDefined(this.target || void 0)}
|
|
82
72
|
rel=${ifDefined(
|
|
83
|
-
this.
|
|
73
|
+
this.rel || ifDefined(
|
|
74
|
+
this.target === "_blank" ? "noopener noreferrer" : void 0
|
|
75
|
+
)
|
|
84
76
|
)}>
|
|
85
77
|
<span>${this.name}</span>
|
|
86
78
|
</a>`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-card-user",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"custom-elements.json"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@umbraco-ui/uui-avatar": "1.
|
|
35
|
-
"@umbraco-ui/uui-base": "1.
|
|
36
|
-
"@umbraco-ui/uui-card": "1.
|
|
34
|
+
"@umbraco-ui/uui-avatar": "1.9.0-rc.0",
|
|
35
|
+
"@umbraco-ui/uui-base": "1.9.0-rc.0",
|
|
36
|
+
"@umbraco-ui/uui-card": "1.9.0-rc.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "npm run analyze && tsc --build && rollup -c rollup.config.js",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-card-user",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "e3e398e07b6ff9874aa0656cb7767df42f58a4ce"
|
|
48
48
|
}
|