@umbraco-ui/uui-card-content-node 1.14.0 → 1.15.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.
Files changed (2) hide show
  1. package/lib/index.js +28 -20
  2. package/package.json +5 -5
package/lib/index.js CHANGED
@@ -59,7 +59,7 @@ let UUICardContentNodeElement = class extends UUICardElement {
59
59
  ${this.href ? __privateMethod(this, _UUICardContentNodeElement_instances, renderLink_fn).call(this) : __privateMethod(this, _UUICardContentNodeElement_instances, renderButton_fn).call(this)}
60
60
  <!-- Select border must be right after #open-part -->
61
61
  <div id="select-border"></div>
62
-
62
+ ${this.selectable ? this.renderCheckbox() : nothing}
63
63
  <slot name="tag"></slot>
64
64
  <slot name="actions"></slot>
65
65
  `;
@@ -83,27 +83,30 @@ renderContent_fn = function() {
83
83
  `;
84
84
  };
85
85
  renderButton_fn = function() {
86
- return html`<button
87
- id="open-part"
88
- tabindex=${this.disabled ? nothing : 0}
89
- @click=${this.handleOpenClick}
90
- @keydown=${this.handleOpenKeydown}>
91
- ${__privateMethod(this, _UUICardContentNodeElement_instances, renderContent_fn).call(this)}
92
- </button>`;
86
+ const tabIndex = !this.disabled ? this.selectOnly ? -1 : 0 : void 0;
87
+ return html`
88
+ <button
89
+ id="open-part"
90
+ tabindex=${ifDefined(tabIndex)}
91
+ @click=${this.handleOpenClick}
92
+ @keydown=${this.handleOpenKeydown}>
93
+ ${__privateMethod(this, _UUICardContentNodeElement_instances, renderContent_fn).call(this)}
94
+ </button>
95
+ `;
93
96
  };
94
97
  renderLink_fn = function() {
95
- return html`<a
96
- id="open-part"
97
- tabindex=${this.disabled ? nothing : 0}
98
- href=${ifDefined(!this.disabled ? this.href : void 0)}
99
- target=${ifDefined(this.target || void 0)}
100
- rel=${ifDefined(
101
- this.rel || ifDefined(
102
- this.target === "_blank" ? "noopener noreferrer" : void 0
103
- )
104
- )}>
105
- ${__privateMethod(this, _UUICardContentNodeElement_instances, renderContent_fn).call(this)}
106
- </a>`;
98
+ const tabIndex = !this.disabled ? this.selectOnly ? -1 : 0 : void 0;
99
+ const rel = this.target === "_blank" ? "noopener noreferrer" : void 0;
100
+ return html`
101
+ <a
102
+ id="open-part"
103
+ tabindex=${ifDefined(tabIndex)}
104
+ href=${ifDefined(!this.disabled ? this.href : void 0)}
105
+ target=${ifDefined(this.target || void 0)}
106
+ rel=${ifDefined(this.rel || rel)}>
107
+ ${__privateMethod(this, _UUICardContentNodeElement_instances, renderContent_fn).call(this)}
108
+ </a>
109
+ `;
107
110
  };
108
111
  UUICardContentNodeElement.styles = [
109
112
  ...UUICardElement.styles,
@@ -209,6 +212,11 @@ UUICardContentNodeElement.styles = [
209
212
  :host(:not([disabled])) #open-part:hover #default {
210
213
  color: var(--uui-color-interactive-emphasis,#3544b1);
211
214
  }
215
+
216
+ #select-checkbox {
217
+ top: var(--uui-size-5,15px);
218
+ left: var(--uui-size-6,18px);
219
+ }
212
220
  `
213
221
  ];
214
222
  __decorateClass([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-card-content-node",
3
- "version": "1.14.0",
3
+ "version": "1.15.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.14.0",
34
- "@umbraco-ui/uui-card": "1.14.0",
35
- "@umbraco-ui/uui-icon": "1.14.0"
33
+ "@umbraco-ui/uui-base": "1.15.0-rc.0",
34
+ "@umbraco-ui/uui-card": "1.15.0-rc.0",
35
+ "@umbraco-ui/uui-icon": "1.15.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": "ce9a4d14f93b626822ebed268f92cf44295f13bd"
46
+ "gitHead": "7bc6ab964ec6b9ba1a628dce605c62f958bf8385"
47
47
  }