@umbraco-ui/uui-card-content-node 0.0.4 → 0.1.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/README.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  Umbraco style card-content-node component.
6
6
 
7
+ ### See it in action
8
+
9
+ Preview the component on [Storybook](https://uui.umbraco.com/?path=/story/uui-card-content-node)
10
+
7
11
  ## Installation
8
12
 
9
13
  ### ES imports
@@ -94,16 +94,30 @@
94
94
  },
95
95
  {
96
96
  "name": "selected",
97
- "description": "fires when the card is selected"
98
- },
99
- {
100
- "name": "select",
101
97
  "description": "fires when the media card is selected"
102
98
  },
103
99
  {
104
- "name": "unselect",
100
+ "name": "unselected",
105
101
  "description": "fires when the media card is unselected"
106
102
  }
103
+ ],
104
+ "slots": [
105
+ {
106
+ "name": "",
107
+ "description": "slot for the default content area"
108
+ },
109
+ {
110
+ "name": "icon",
111
+ "description": "slot for the icon with support for `<uui-icon>` elements"
112
+ },
113
+ {
114
+ "name": "tag",
115
+ "description": "slot for the tag with support for `<uui-tag>` elements"
116
+ },
117
+ {
118
+ "name": "actions",
119
+ "description": "slot for the actions with support for the `<uui-action-bar>` element"
120
+ }
107
121
  ]
108
122
  }
109
123
  ]
package/lib/index.js CHANGED
@@ -1,5 +1,6 @@
1
- import { UUICardElement } from '@umbraco-ui/uui-card/lib';
2
1
  import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
2
+ import { demandCustomElement } from '@umbraco-ui/uui-base/lib/utils';
3
+ import { UUICardElement } from '@umbraco-ui/uui-card/lib';
3
4
  import { css, html, nothing } from 'lit';
4
5
  import { property, state } from 'lit/decorators.js';
5
6
 
@@ -25,6 +26,7 @@ let UUICardContentNodeElement = class extends UUICardElement {
25
26
  this._iconSlotHasContent = event.target.assignedNodes({ flatten: true }).length > 0;
26
27
  }
27
28
  _renderFallbackIcon() {
29
+ demandCustomElement(this, "uui-icon");
28
30
  return html`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`;
29
31
  }
30
32
  render() {
@@ -1,9 +1,11 @@
1
1
  import { UUICardElement } from '@umbraco-ui/uui-card/lib';
2
2
  /**
3
3
  * @element uui-card-content-node
4
- * @fires {UUICardEvent} open - fires when the card title is clicked
5
- * @fires {UUICardEvent} selected - fires when the card is selected
6
4
  * @description - Card component for displaying a content-node.
5
+ * @slot - slot for the default content area
6
+ * @slot icon - slot for the icon with support for `<uui-icon>` elements
7
+ * @slot tag - slot for the tag with support for `<uui-tag>` elements
8
+ * @slot actions - slot for the actions with support for the `<uui-action-bar>` element
7
9
  */
8
10
  export declare class UUICardContentNodeElement extends UUICardElement {
9
11
  static styles: import("lit").CSSResult[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-card-content-node",
3
- "version": "0.0.4",
3
+ "version": "0.1.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": "0.0.17",
34
- "@umbraco-ui/uui-card": "0.0.4",
35
- "@umbraco-ui/uui-icon": "0.0.5"
33
+ "@umbraco-ui/uui-base": "0.1.0",
34
+ "@umbraco-ui/uui-card": "0.1.0",
35
+ "@umbraco-ui/uui-icon": "0.1.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "npm run analyze && tsc --build --force && 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": "3b7c6cf892e89054b2980b19d8c2f8bead2752e8"
46
+ "gitHead": "9ed7860ce865d310b85bd1718f37b59db873aefd"
47
47
  }