@aquera/nile-elements 0.1.33-beta-1.1 → 0.1.34-beta-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/demo/index.css +7 -4
- package/demo/index.html +20 -271
- package/dist/nile-error-message/nile-error-message.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.css.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.css.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.css.esm.js +6 -4
- package/dist/nile-error-message/nile-error-message.esm.js +4 -4
- package/dist/nile-error-notification/nile-error-notification.css.cjs.js +1 -1
- package/dist/nile-error-notification/nile-error-notification.css.cjs.js.map +1 -1
- package/dist/nile-error-notification/nile-error-notification.css.esm.js +1 -1
- package/dist/src/nile-error-message/nile-error-message.css.js +6 -4
- package/dist/src/nile-error-message/nile-error-message.css.js.map +1 -1
- package/dist/src/nile-error-message/nile-error-message.d.ts +4 -0
- package/dist/src/nile-error-message/nile-error-message.js +20 -0
- package/dist/src/nile-error-message/nile-error-message.js.map +1 -1
- package/dist/src/nile-error-notification/nile-error-notification.css.js +1 -1
- package/dist/src/nile-error-notification/nile-error-notification.css.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/nile-error-message/nile-error-message.css.ts +6 -4
- package/src/nile-error-message/nile-error-message.ts +18 -0
- package/src/nile-error-notification/nile-error-notification.css.ts +1 -1
- package/vscode-html-custom-data.json +13 -1
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "nile-elements",
|
6
|
-
"version": "0.1.
|
6
|
+
"version": "0.1.34-beta-1.0",
|
7
7
|
"main": "dist/src/index.js",
|
8
8
|
"type": "module",
|
9
9
|
"module": "dist/src/index.js",
|
@@ -189,4 +189,4 @@
|
|
189
189
|
"prettier --write"
|
190
190
|
]
|
191
191
|
}
|
192
|
-
}
|
192
|
+
}
|
@@ -16,11 +16,11 @@ export const styles = css`
|
|
16
16
|
|
17
17
|
.nile-error-message {
|
18
18
|
width: 100%;
|
19
|
-
word-break: break-all;
|
20
19
|
font-size: var(--nile-font-size-small);
|
21
20
|
letter-spacing: 0.2px;
|
22
21
|
font-weight: var(--nile-font-weight-regular);
|
23
22
|
line-height: var(--nile-font-size-small);
|
23
|
+
max-width: var(--nile-error-max-width, 535px);
|
24
24
|
}
|
25
25
|
|
26
26
|
.nile-error-message__error {
|
@@ -32,6 +32,8 @@ export const styles = css`
|
|
32
32
|
color: var(--nile-colors-dark-500);
|
33
33
|
margin-top:6px;
|
34
34
|
line-height: 16px;
|
35
|
+
max-height: var(--nile-error-max-height, 48px);
|
36
|
+
overflow-x: auto;
|
35
37
|
}
|
36
38
|
|
37
39
|
.nile-error-message__icon {
|
@@ -54,7 +56,7 @@ export const styles = css`
|
|
54
56
|
border: 1px solid var(--nile-colors-red-500);
|
55
57
|
border-left: 6px solid var(--nile-colors-red-500);
|
56
58
|
border-radius: 4px;
|
57
|
-
margin-top:
|
59
|
+
margin-top: 8px;
|
58
60
|
padding: 12px;
|
59
61
|
background: var(--nile-colors-neutral-100);
|
60
62
|
}
|
@@ -81,10 +83,10 @@ export const styles = css`
|
|
81
83
|
}
|
82
84
|
|
83
85
|
.nile-error-message__response-expanded.expanded {
|
84
|
-
max-height:
|
86
|
+
max-height: var(--nile-error-max-dialog-height, 48px);
|
85
87
|
transition: max-height 0.3s ease-in-out;
|
86
88
|
visibility: visible;
|
87
|
-
padding:
|
89
|
+
padding: 8px;
|
88
90
|
}
|
89
91
|
`;
|
90
92
|
|
@@ -32,6 +32,12 @@ export class NileErrorMessage extends LitElement {
|
|
32
32
|
@property({ type: Boolean })
|
33
33
|
isExpanded: boolean = false;
|
34
34
|
|
35
|
+
@property({ type: String }) maxWidth: string;
|
36
|
+
|
37
|
+
@property({ type: String }) maxHeight: string;
|
38
|
+
|
39
|
+
@property({ type: String }) maxDialogHeight: string;
|
40
|
+
|
35
41
|
// The maximum length before truncation.
|
36
42
|
private readonly MAX_LENGTH: number = 100;
|
37
43
|
|
@@ -46,6 +52,18 @@ export class NileErrorMessage extends LitElement {
|
|
46
52
|
return this.errorResponse;
|
47
53
|
}
|
48
54
|
|
55
|
+
updated(changedProperties: Map<string, any>) {
|
56
|
+
if (changedProperties.has('maxWidth')) {
|
57
|
+
this.style.setProperty('--nile-error-max-width', this.maxWidth);
|
58
|
+
}
|
59
|
+
if (changedProperties.has('maxHeight')) {
|
60
|
+
this.style.setProperty('--nile-error-max-height', this.maxHeight);
|
61
|
+
}
|
62
|
+
if (changedProperties.has('maxDialogHeight')) {
|
63
|
+
this.style.setProperty('--nile-error-max-dialog-height', this.maxDialogHeight);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
49
67
|
/**
|
50
68
|
* Toggle the expanded state of the error response.
|
51
69
|
*/
|
@@ -1348,7 +1348,7 @@
|
|
1348
1348
|
},
|
1349
1349
|
{
|
1350
1350
|
"name": "nile-error-message",
|
1351
|
-
"description": "A custom error message component that displays error information to the user.\n\nAttributes:\n\n * `errorMessage` {`string`} - \n\n * `errorResponse` {`string`} - \n\n * `errorResponseLong` {`string`} - \n\n * `isExpanded` {`boolean`} - \n\nProperties:\n\n * `errorMessage` {`string`} - \n\n * `errorResponse` {`string`} - \n\n * `errorResponseLong` {`string`} - \n\n * `isExpanded` {`boolean`} - \n\n * `MAX_LENGTH` {`number`} - ",
|
1351
|
+
"description": "A custom error message component that displays error information to the user.\n\nAttributes:\n\n * `errorMessage` {`string`} - \n\n * `errorResponse` {`string`} - \n\n * `errorResponseLong` {`string`} - \n\n * `isExpanded` {`boolean`} - \n\n * `maxWidth` {`string`} - \n\n * `maxHeight` {`string`} - \n\n * `maxDialogHeight` {`string`} - \n\nProperties:\n\n * `errorMessage` {`string`} - \n\n * `errorResponse` {`string`} - \n\n * `errorResponseLong` {`string`} - \n\n * `isExpanded` {`boolean`} - \n\n * `maxWidth` {`string`} - \n\n * `maxHeight` {`string`} - \n\n * `maxDialogHeight` {`string`} - \n\n * `MAX_LENGTH` {`number`} - ",
|
1352
1352
|
"attributes": [
|
1353
1353
|
{
|
1354
1354
|
"name": "errorMessage",
|
@@ -1366,6 +1366,18 @@
|
|
1366
1366
|
"name": "isExpanded",
|
1367
1367
|
"description": "`isExpanded` {`boolean`} - \n\nProperty: isExpanded\n\nDefault: false",
|
1368
1368
|
"valueSet": "v"
|
1369
|
+
},
|
1370
|
+
{
|
1371
|
+
"name": "maxWidth",
|
1372
|
+
"description": "`maxWidth` {`string`} - \n\nProperty: maxWidth"
|
1373
|
+
},
|
1374
|
+
{
|
1375
|
+
"name": "maxHeight",
|
1376
|
+
"description": "`maxHeight` {`string`} - \n\nProperty: maxHeight"
|
1377
|
+
},
|
1378
|
+
{
|
1379
|
+
"name": "maxDialogHeight",
|
1380
|
+
"description": "`maxDialogHeight` {`string`} - \n\nProperty: maxDialogHeight"
|
1369
1381
|
}
|
1370
1382
|
]
|
1371
1383
|
},
|