@umbraco-ui/uui-ref-node 0.0.3 → 0.1.1

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 ref-node component.
6
6
 
7
+ ### See it in action
8
+
9
+ Preview the component on [Storybook](https://uui.umbraco.com/?path=/story/uui-ref-node)
10
+
7
11
  ## Installation
8
12
 
9
13
  ### ES imports
package/lib/index.js CHANGED
@@ -1,5 +1,6 @@
1
- import { UUIRefElement } from '@umbraco-ui/uui-ref/lib';
2
1
  import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
2
+ import { demandCustomElement } from '@umbraco-ui/uui-base/lib/utils';
3
+ import { UUIRefElement } from '@umbraco-ui/uui-ref/lib';
3
4
  import { css, html } from 'lit';
4
5
  import { property, state } from 'lit/decorators.js';
5
6
 
@@ -22,6 +23,10 @@ let UUIRefNodeElement = class extends UUIRefElement {
22
23
  this._iconSlotHasContent = false;
23
24
  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>';
24
25
  }
26
+ connectedCallback() {
27
+ super.connectedCallback();
28
+ demandCustomElement(this, "uui-icon");
29
+ }
25
30
  _onSlotIconChange(event) {
26
31
  this._iconSlotHasContent = event.target.assignedNodes({ flatten: true }).length > 0;
27
32
  }
@@ -28,6 +28,7 @@ export declare class UUIRefNodeElement extends UUIRefElement {
28
28
  detail: string;
29
29
  private _iconSlotHasContent;
30
30
  protected fallbackIcon: string;
31
+ connectedCallback(): void;
31
32
  private _onSlotIconChange;
32
33
  protected renderDetail(): import("lit-html").TemplateResult<1>;
33
34
  private _renderFallbackIcon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-ref-node",
3
- "version": "0.0.3",
3
+ "version": "0.1.1",
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.16",
34
- "@umbraco-ui/uui-icon": "0.0.4",
35
- "@umbraco-ui/uui-ref": "0.0.3"
33
+ "@umbraco-ui/uui-base": "0.1.1",
34
+ "@umbraco-ui/uui-icon": "0.1.1",
35
+ "@umbraco-ui/uui-ref": "0.1.1"
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-ref-node",
46
- "gitHead": "6fbddfc1295e2ea00a532d4f9eb798165b2d39ac"
46
+ "gitHead": "d91d346a0659f52de2a3c4746065c554f95e6328"
47
47
  }