@umbraco-ui/uui-card-user 0.0.4 → 0.2.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
@@ -1,5 +1,9 @@
1
1
  # uui-card-user
2
2
 
3
+ ### See it in action
4
+
5
+ Preview the component on [Storybook](https://uui.umbraco.com/?path=/story/uui-card-user)
6
+
3
7
  ## Usage
4
8
 
5
9
  ```zsh
@@ -90,20 +90,30 @@
90
90
  "events": [
91
91
  {
92
92
  "name": "open",
93
- "description": "fires when the user card title is clicked"
93
+ "description": "fires when the card title is clicked"
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": "tag",
111
+ "description": "slot for the tag with support for `<uui-tag>` elements"
112
+ },
113
+ {
114
+ "name": "actions",
115
+ "description": "slot for the actions with support for the `<uui-action-bar>` element"
116
+ }
107
117
  ]
108
118
  }
109
119
  ]
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 } from 'lit/decorators.js';
5
6
 
@@ -19,6 +20,10 @@ let UUICardUserElement = class extends UUICardElement {
19
20
  super(...arguments);
20
21
  this.name = "";
21
22
  }
23
+ connectedCallback() {
24
+ super.connectedCallback();
25
+ demandCustomElement(this, "uui-avatar");
26
+ }
22
27
  render() {
23
28
  return html`
24
29
  <uui-avatar id="avatar" name=${this.name} size="m"></uui-avatar>
@@ -1,9 +1,10 @@
1
1
  import { UUICardElement } from '@umbraco-ui/uui-card/lib';
2
2
  /**
3
3
  * @element uui-card-user
4
- * @fires {UUICardEvent} open - fires when the user card title is clicked
5
- * @fires {UUICardEvent} selected - fires when the card is selected
6
4
  * @description - Card component for displaying a user node.
5
+ * @slot - slot for the default content area
6
+ * @slot tag - slot for the tag with support for `<uui-tag>` elements
7
+ * @slot actions - slot for the actions with support for the `<uui-action-bar>` element
7
8
  */
8
9
  export declare class UUICardUserElement extends UUICardElement {
9
10
  static styles: import("lit").CSSResult[];
@@ -14,6 +15,7 @@ export declare class UUICardUserElement extends UUICardElement {
14
15
  * @default ''
15
16
  */
16
17
  name: string;
18
+ connectedCallback(): void;
17
19
  render(): import("lit-html").TemplateResult<1>;
18
20
  }
19
21
  declare global {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-card-user",
3
- "version": "0.0.4",
3
+ "version": "0.2.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": "^0.0.15",
35
- "@umbraco-ui/uui-base": "0.0.17",
36
- "@umbraco-ui/uui-card": "0.0.4"
34
+ "@umbraco-ui/uui-avatar": "0.2.0",
35
+ "@umbraco-ui/uui-base": "0.2.0",
36
+ "@umbraco-ui/uui-card": "0.2.0"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "npm run analyze && tsc --build --force && 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": "3b7c6cf892e89054b2980b19d8c2f8bead2752e8"
47
+ "gitHead": "5494b55e03c9fb3ba8f160e693d3ce59c02d21cd"
48
48
  }