@umbraco-ui/uui-ref-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 +4 -0
- package/lib/index.js +6 -1
- package/lib/uui-ref-node.element.d.ts +1 -0
- package/package.json +5 -5
package/README.md
CHANGED
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
|
+
"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
|
|
34
|
-
"@umbraco-ui/uui-icon": "0.0
|
|
35
|
-
"@umbraco-ui/uui-ref": "0.0
|
|
33
|
+
"@umbraco-ui/uui-base": "0.1.0",
|
|
34
|
+
"@umbraco-ui/uui-icon": "0.1.0",
|
|
35
|
+
"@umbraco-ui/uui-ref": "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-ref-node",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "9ed7860ce865d310b85bd1718f37b59db873aefd"
|
|
47
47
|
}
|