@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.
Files changed (51) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +1 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +1 -0
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/index.d.ts +1 -0
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/index.js +2 -0
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/index.js.map +1 -0
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.css.d.ts +12 -0
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.css.js +37 -0
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.css.js.map +1 -0
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.d.ts +32 -0
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.js +60 -0
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-notification/nile-error-notification.js.map +1 -0
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +2 -3
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  16. package/dist/index.cjs.js +1 -1
  17. package/dist/index.esm.js +1 -1
  18. package/dist/index.iife.js +47 -13
  19. package/dist/nile-error-notification/index.cjs.js +2 -0
  20. package/dist/nile-error-notification/index.cjs.js.map +1 -0
  21. package/dist/nile-error-notification/index.esm.js +1 -0
  22. package/dist/nile-error-notification/nile-error-notification.cjs.js +2 -0
  23. package/dist/nile-error-notification/nile-error-notification.cjs.js.map +1 -0
  24. package/dist/nile-error-notification/nile-error-notification.css.cjs.js +2 -0
  25. package/dist/nile-error-notification/nile-error-notification.css.cjs.js.map +1 -0
  26. package/dist/nile-error-notification/nile-error-notification.css.esm.js +25 -0
  27. package/dist/nile-error-notification/nile-error-notification.esm.js +12 -0
  28. package/dist/nile-select/nile-select.cjs.js +1 -1
  29. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  30. package/dist/nile-select/nile-select.esm.js +1 -2
  31. package/dist/src/index.d.ts +1 -0
  32. package/dist/src/index.js +1 -0
  33. package/dist/src/index.js.map +1 -1
  34. package/dist/src/nile-error-notification/index.d.ts +1 -0
  35. package/dist/src/nile-error-notification/index.js +2 -0
  36. package/dist/src/nile-error-notification/index.js.map +1 -0
  37. package/dist/src/nile-error-notification/nile-error-notification.css.d.ts +12 -0
  38. package/dist/src/nile-error-notification/nile-error-notification.css.js +37 -0
  39. package/dist/src/nile-error-notification/nile-error-notification.css.js.map +1 -0
  40. package/dist/src/nile-error-notification/nile-error-notification.d.ts +32 -0
  41. package/dist/src/nile-error-notification/nile-error-notification.js +60 -0
  42. package/dist/src/nile-error-notification/nile-error-notification.js.map +1 -0
  43. package/dist/src/nile-select/nile-select.js +2 -3
  44. package/dist/src/nile-select/nile-select.js.map +1 -1
  45. package/dist/tsconfig.tsbuildinfo +1 -1
  46. package/package.json +1 -1
  47. package/src/index.ts +1 -0
  48. package/src/nile-error-notification/index.ts +1 -0
  49. package/src/nile-error-notification/nile-error-notification.css.ts +39 -0
  50. package/src/nile-error-notification/nile-error-notification.ts +70 -0
  51. package/src/nile-select/nile-select.ts +2 -3
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.0.15",
6
+ "version": "0.0.16",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
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>