@umbraco-ui/uui-card-content-node 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 _UUICardContentNodeElement_instances, renderButton_fn, renderLink_fn;
|
|
33
25
|
let UUICardContentNodeElement = class extends UUICardElement {
|
|
34
26
|
constructor() {
|
|
35
27
|
super(...arguments);
|
|
36
|
-
__privateAdd(this,
|
|
37
|
-
__privateAdd(this, _renderLink);
|
|
28
|
+
__privateAdd(this, _UUICardContentNodeElement_instances);
|
|
38
29
|
this.name = "";
|
|
39
30
|
this._iconSlotHasContent = false;
|
|
40
31
|
this.fallbackIcon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>';
|
|
@@ -48,7 +39,7 @@ let UUICardContentNodeElement = class extends UUICardElement {
|
|
|
48
39
|
}
|
|
49
40
|
render() {
|
|
50
41
|
return html`
|
|
51
|
-
${this.href ? __privateMethod(this,
|
|
42
|
+
${this.href ? __privateMethod(this, _UUICardContentNodeElement_instances, renderLink_fn).call(this) : __privateMethod(this, _UUICardContentNodeElement_instances, renderButton_fn).call(this)}
|
|
52
43
|
<!-- Select border must be right after #open-part -->
|
|
53
44
|
<div id="select-border"></div>
|
|
54
45
|
|
|
@@ -58,7 +49,7 @@ let UUICardContentNodeElement = class extends UUICardElement {
|
|
|
58
49
|
`;
|
|
59
50
|
}
|
|
60
51
|
};
|
|
61
|
-
|
|
52
|
+
_UUICardContentNodeElement_instances = new WeakSet();
|
|
62
53
|
renderButton_fn = function() {
|
|
63
54
|
return html`<div
|
|
64
55
|
id="open-part"
|
|
@@ -72,7 +63,6 @@ renderButton_fn = function() {
|
|
|
72
63
|
<span id="name"> ${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 id="icon">
|
|
86
78
|
<slot name="icon" @slotchange=${this._onSlotIconChange}></slot>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-card-content-node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"custom-elements.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@umbraco-ui/uui-base": "1.
|
|
34
|
-
"@umbraco-ui/uui-card": "1.
|
|
35
|
-
"@umbraco-ui/uui-icon": "1.
|
|
33
|
+
"@umbraco-ui/uui-base": "1.9.0-rc.0",
|
|
34
|
+
"@umbraco-ui/uui-card": "1.9.0-rc.0",
|
|
35
|
+
"@umbraco-ui/uui-icon": "1.9.0-rc.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "npm run analyze && tsc --build && rollup -c rollup.config.js",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-card-content-node",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "e3e398e07b6ff9874aa0656cb7767df42f58a4ce"
|
|
47
47
|
}
|