@umbraco-ui/uui-form-layout-item 0.0.1 → 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 +4 -0
- package/custom-elements.json +8 -0
- package/lib/index.js +6 -1
- package/lib/uui-form-layout-item.element.d.ts +3 -0
- package/package.json +4 -3
package/README.md
CHANGED
package/custom-elements.json
CHANGED
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
{
|
|
31
31
|
"name": "message",
|
|
32
32
|
"description": "for extras in the messages container"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "description",
|
|
36
|
+
"description": "for extras in the description container"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "label",
|
|
40
|
+
"description": "for label contents"
|
|
33
41
|
}
|
|
34
42
|
]
|
|
35
43
|
}
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
|
|
2
|
+
import { demandCustomElement } from '@umbraco-ui/uui-base/lib/utils';
|
|
1
3
|
import { css, LitElement, html } from 'lit';
|
|
2
4
|
import { property, state } from 'lit/decorators.js';
|
|
3
|
-
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
|
|
4
5
|
|
|
5
6
|
var __defProp = Object.defineProperty;
|
|
6
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -26,6 +27,10 @@ let UUIFormLayoutItemElement = class extends LitElement {
|
|
|
26
27
|
this._descriptionSlotHasContent = e.target.assignedNodes({ flatten: true }).length > 0;
|
|
27
28
|
};
|
|
28
29
|
}
|
|
30
|
+
connectedCallback() {
|
|
31
|
+
super.connectedCallback();
|
|
32
|
+
demandCustomElement(this, "uui-form-validation-message");
|
|
33
|
+
}
|
|
29
34
|
render() {
|
|
30
35
|
return html`
|
|
31
36
|
<div id="label" style=${this._labelSlotHasContent ? "" : "display: none"}>
|
|
@@ -4,10 +4,13 @@ import { LitElement } from 'lit';
|
|
|
4
4
|
* @description - Form item composes label, input and validation-messages in a proper layout.
|
|
5
5
|
* @slot - for button contents
|
|
6
6
|
* @slot message - for extras in the messages container
|
|
7
|
+
* @slot description - for extras in the description container
|
|
8
|
+
* @slot label - for label contents
|
|
7
9
|
*/
|
|
8
10
|
export declare class UUIFormLayoutItemElement extends LitElement {
|
|
9
11
|
static styles: import("lit").CSSResult[];
|
|
10
12
|
description: string | null;
|
|
13
|
+
connectedCallback(): void;
|
|
11
14
|
private _labelSlotHasContent;
|
|
12
15
|
private _labelSlotChanged;
|
|
13
16
|
private _descriptionSlotHasContent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-form-layout-item",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"custom-elements.json"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@umbraco-ui/uui-base": "0.
|
|
31
|
+
"@umbraco-ui/uui-base": "0.1.1",
|
|
32
|
+
"@umbraco-ui/uui-form-validation-message": "0.1.1"
|
|
32
33
|
},
|
|
33
34
|
"scripts": {
|
|
34
35
|
"build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
|
|
@@ -39,5 +40,5 @@
|
|
|
39
40
|
"access": "public"
|
|
40
41
|
},
|
|
41
42
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-form-layout-item",
|
|
42
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "d91d346a0659f52de2a3c4746065c554f95e6328"
|
|
43
44
|
}
|