@umbraco-ui/uui-card-block-type 1.14.1 → 1.15.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/lib/index.js +9 -10
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
|
|
2
2
|
import { UUICardElement } from '@umbraco-ui/uui-card/lib';
|
|
3
|
-
import { css,
|
|
3
|
+
import { css, nothing, html } from 'lit';
|
|
4
4
|
import { property } from 'lit/decorators.js';
|
|
5
5
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
|
|
@@ -39,7 +39,7 @@ let UUICardBlockTypeElement = class extends UUICardElement {
|
|
|
39
39
|
${this.href ? __privateMethod(this, _UUICardBlockTypeElement_instances, renderLink_fn).call(this) : __privateMethod(this, _UUICardBlockTypeElement_instances, renderButton_fn).call(this)}
|
|
40
40
|
<!-- Select border must be right after #open-part -->
|
|
41
41
|
<div id="select-border"></div>
|
|
42
|
-
|
|
42
|
+
${this.selectable ? this.renderCheckbox() : nothing}
|
|
43
43
|
<slot name="tag"></slot>
|
|
44
44
|
<slot name="actions"></slot>
|
|
45
45
|
`;
|
|
@@ -47,11 +47,12 @@ let UUICardBlockTypeElement = class extends UUICardElement {
|
|
|
47
47
|
};
|
|
48
48
|
_UUICardBlockTypeElement_instances = new WeakSet();
|
|
49
49
|
renderButton_fn = function() {
|
|
50
|
+
const tabIndex = !this.disabled ? this.selectOnly ? -1 : 0 : void 0;
|
|
50
51
|
return html`
|
|
51
52
|
<button
|
|
52
53
|
id="open-part"
|
|
53
54
|
class="uui-text"
|
|
54
|
-
tabindex=${
|
|
55
|
+
tabindex=${ifDefined(tabIndex)}
|
|
55
56
|
@click=${this.handleOpenClick}
|
|
56
57
|
@keydown=${this.handleOpenKeydown}>
|
|
57
58
|
${__privateMethod(this, _UUICardBlockTypeElement_instances, renderContent_fn).call(this)}
|
|
@@ -59,18 +60,16 @@ renderButton_fn = function() {
|
|
|
59
60
|
`;
|
|
60
61
|
};
|
|
61
62
|
renderLink_fn = function() {
|
|
63
|
+
const tabIndex = !this.disabled ? this.selectOnly ? -1 : 0 : void 0;
|
|
64
|
+
const rel = this.target === "_blank" ? "noopener noreferrer" : void 0;
|
|
62
65
|
return html`
|
|
63
66
|
<a
|
|
64
67
|
id="open-part"
|
|
65
68
|
class="uui-text"
|
|
66
|
-
tabindex=${
|
|
69
|
+
tabindex=${ifDefined(tabIndex)}
|
|
67
70
|
href=${ifDefined(!this.disabled ? this.href : void 0)}
|
|
68
71
|
target=${ifDefined(this.target || void 0)}
|
|
69
|
-
rel=${ifDefined(
|
|
70
|
-
this.rel || ifDefined(
|
|
71
|
-
this.target === "_blank" ? "noopener noreferrer" : void 0
|
|
72
|
-
)
|
|
73
|
-
)}>
|
|
72
|
+
rel=${ifDefined(this.rel || rel)}>
|
|
74
73
|
${__privateMethod(this, _UUICardBlockTypeElement_instances, renderContent_fn).call(this)}
|
|
75
74
|
</a>
|
|
76
75
|
`;
|
|
@@ -84,7 +83,7 @@ renderContent_fn = function() {
|
|
|
84
83
|
return html`
|
|
85
84
|
<div id="content">
|
|
86
85
|
<span title="${this.name}" id="name">${this.name}</span>
|
|
87
|
-
<small title="${this.description}">${this.description}<slot name="description"></slot></small>
|
|
86
|
+
<small title="${ifDefined(this.description)}">${this.description}<slot name="description"></slot></small>
|
|
88
87
|
</div></div>
|
|
89
88
|
`;
|
|
90
89
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-card-block-type",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
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.
|
|
34
|
-
"@umbraco-ui/uui-card": "1.
|
|
33
|
+
"@umbraco-ui/uui-base": "1.15.0",
|
|
34
|
+
"@umbraco-ui/uui-card": "1.15.0"
|
|
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": "
|
|
45
|
+
"gitHead": "b84216deaff3a3be8f7bd8cdbf2758e7955c70e9"
|
|
46
46
|
}
|