@aquera/nile-elements 0.0.15 → 0.0.16
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/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.css.js +37 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.d.ts +32 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.js +60 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +2 -3
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +47 -13
- package/dist/nile-error-notification/index.cjs.js +2 -0
- package/dist/nile-error-notification/index.cjs.js.map +1 -0
- package/dist/nile-error-notification/index.esm.js +1 -0
- package/dist/nile-error-notification/nile-error-notification.cjs.js +2 -0
- package/dist/nile-error-notification/nile-error-notification.cjs.js.map +1 -0
- package/dist/nile-error-notification/nile-error-notification.css.cjs.js +2 -0
- package/dist/nile-error-notification/nile-error-notification.css.cjs.js.map +1 -0
- package/dist/nile-error-notification/nile-error-notification.css.esm.js +25 -0
- package/dist/nile-error-notification/nile-error-notification.esm.js +12 -0
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +1 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-error-notification/index.d.ts +1 -0
- package/dist/src/nile-error-notification/index.js +2 -0
- package/dist/src/nile-error-notification/index.js.map +1 -0
- package/dist/src/nile-error-notification/nile-error-notification.css.d.ts +12 -0
- package/dist/src/nile-error-notification/nile-error-notification.css.js +37 -0
- package/dist/src/nile-error-notification/nile-error-notification.css.js.map +1 -0
- package/dist/src/nile-error-notification/nile-error-notification.d.ts +32 -0
- package/dist/src/nile-error-notification/nile-error-notification.js +60 -0
- package/dist/src/nile-error-notification/nile-error-notification.js.map +1 -0
- package/dist/src/nile-select/nile-select.js +2 -3
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/nile-error-notification/index.ts +1 -0
- package/src/nile-error-notification/nile-error-notification.css.ts +39 -0
- package/src/nile-error-notification/nile-error-notification.ts +70 -0
- package/src/nile-select/nile-select.ts +2 -3
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -35,3 +35,4 @@ export { NileButtonToggle } from './nile-button-toggle';
|
|
35
35
|
export { NileSwitcher } from './nile-switcher';
|
36
36
|
export { NileContentEditor } from './nile-content-editor';
|
37
37
|
export { NileDialog } from './nile-dialog';
|
38
|
+
export { NileErrorNotification } from './nile-error-notification';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { NileErrorNotification } from './nile-error-notification';
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { css } from 'lit-element';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* ErrorNotification CSS
|
12
|
+
*/
|
13
|
+
export const styles = css`
|
14
|
+
:host {
|
15
|
+
}
|
16
|
+
|
17
|
+
.nile-error-notification {
|
18
|
+
font-family: Colfax-regular;
|
19
|
+
font-size: 12px;
|
20
|
+
font-style: normal;
|
21
|
+
font-weight: 400;
|
22
|
+
line-height: 12px;
|
23
|
+
letter-spacing: 0.2px;
|
24
|
+
border: 1px solid var(--nile-colors-red-500);
|
25
|
+
border-left: 6px solid var(--nile-colors-red-500);
|
26
|
+
border-radius: 4px;
|
27
|
+
padding: 8px;
|
28
|
+
background: var(--nile-colors-neutral-100);
|
29
|
+
color: var(--nile-colors-red-500);
|
30
|
+
box-sizing: border-box;
|
31
|
+
}
|
32
|
+
|
33
|
+
.nile-error-notification__icon {
|
34
|
+
vertical-align: middle;
|
35
|
+
margin-right: 4px;
|
36
|
+
}
|
37
|
+
`;
|
38
|
+
|
39
|
+
export default [styles];
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import {
|
9
|
+
LitElement,
|
10
|
+
html,
|
11
|
+
property,
|
12
|
+
CSSResultArray,
|
13
|
+
TemplateResult,
|
14
|
+
} from 'lit-element';
|
15
|
+
import { customElement } from 'lit/decorators.js';
|
16
|
+
import { styles } from './nile-error-notification.css';
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Nile icon component.
|
20
|
+
*
|
21
|
+
* @tag nile-error-notification
|
22
|
+
*
|
23
|
+
*/
|
24
|
+
@customElement('nile-error-notification')
|
25
|
+
export class NileErrorNotification extends LitElement {
|
26
|
+
/**
|
27
|
+
* The styles for ErrorNotification
|
28
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
29
|
+
*/
|
30
|
+
public static get styles(): CSSResultArray {
|
31
|
+
return [styles];
|
32
|
+
}
|
33
|
+
|
34
|
+
// Represents the error message to be displayed to the user.
|
35
|
+
@property({ type: String })
|
36
|
+
errorMessage: string = '';
|
37
|
+
|
38
|
+
/* #endregion */
|
39
|
+
|
40
|
+
/* #region Methods */
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Render method
|
44
|
+
* @slot This is a slot test
|
45
|
+
*/
|
46
|
+
public render(): TemplateResult {
|
47
|
+
return html`
|
48
|
+
<div class="nile-error-notification">
|
49
|
+
<nile-icon
|
50
|
+
name="info2"
|
51
|
+
size="14"
|
52
|
+
class="nile-error-notification__icon"
|
53
|
+
part="icon"
|
54
|
+
color="#E5434D"
|
55
|
+
></nile-icon>
|
56
|
+
${this.errorMessage}
|
57
|
+
</div>
|
58
|
+
`;
|
59
|
+
}
|
60
|
+
|
61
|
+
/* #endregion */
|
62
|
+
}
|
63
|
+
|
64
|
+
export default NileErrorNotification;
|
65
|
+
|
66
|
+
declare global {
|
67
|
+
interface HTMLElementTagNameMap {
|
68
|
+
'nile-error-notification': NileErrorNotification;
|
69
|
+
}
|
70
|
+
}
|
@@ -693,8 +693,8 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
693
693
|
this.displayLabel = this.selectedOptions.length + ' selected';
|
694
694
|
}
|
695
695
|
} else {
|
696
|
-
this.value = this.selectedOptions[0]?.value ??
|
697
|
-
this.displayLabel = this.selectedOptions[0]?.getTextLabel() ?? '';
|
696
|
+
this.value = this.selectedOptions[0]?.value ?? this.value;
|
697
|
+
this.displayLabel = this.selectedOptions[0]?.getTextLabel() ? this.selectedOptions[0].getTextLabel() : (this.value ?? '');
|
698
698
|
}
|
699
699
|
|
700
700
|
// Update validity
|
@@ -1105,7 +1105,6 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
1105
1105
|
placeholder="Search..."
|
1106
1106
|
@nile-input=${this.handleSearchChange}
|
1107
1107
|
@nile-focus=${this.handleSearchFocus}
|
1108
|
-
@nile-blur=${this.handleSearchBlur}
|
1109
1108
|
@nile-change="${this.onInputChange}"
|
1110
1109
|
>
|
1111
1110
|
<nile-icon name="search" slot="suffix"> </nile-icon>
|