@aquera/nile-elements 0.0.1-beta.4 → 0.0.1-beta.5

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 (29) hide show
  1. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/src/nile-auto-complete/nile-auto-complete.js +2 -2
  2. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
  3. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/src/nile-chip/nile-chip.d.ts +1 -1
  4. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/src/nile-chip/nile-chip.js +7 -2
  5. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/src/nile-chip/nile-chip.js.map +1 -1
  6. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/src/nile-menu-item/nile-menu-item.js +2 -2
  7. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
  8. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  9. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  10. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  11. package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
  12. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  13. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  14. package/dist/nile-chip/nile-chip.esm.js +2 -2
  15. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  16. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  17. package/dist/nile-menu-item/nile-menu-item.esm.js +2 -2
  18. package/dist/src/nile-auto-complete/nile-auto-complete.js +2 -2
  19. package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
  20. package/dist/src/nile-chip/nile-chip.d.ts +1 -1
  21. package/dist/src/nile-chip/nile-chip.js +7 -2
  22. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  23. package/dist/src/nile-menu-item/nile-menu-item.js +2 -2
  24. package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
  25. package/dist/tsconfig.tsbuildinfo +1 -1
  26. package/package.json +1 -1
  27. package/src/nile-auto-complete/nile-auto-complete.ts +4 -4
  28. package/src/nile-chip/nile-chip.ts +9 -3
  29. package/src/nile-menu-item/nile-menu-item.ts +2 -2
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.1-beta.4",
6
+ "version": "0.0.1-beta.5",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -48,8 +48,8 @@ export class NileAutoComplete extends NileElement {
48
48
  async handleValueChange() {
49
49
  await this.updateComplete;
50
50
  // Filter menu items based on the search value
51
- this.menuItems = this.allMenuItems.filter((item: { text: string }) =>
52
- item.text.toLowerCase().includes(this.value.toLowerCase())
51
+ this.menuItems = this.allMenuItems.filter((item: string) =>
52
+ item.toLowerCase().includes(this.value?.toLowerCase())
53
53
  );
54
54
  }
55
55
 
@@ -65,8 +65,8 @@ export class NileAutoComplete extends NileElement {
65
65
  this.value = searchValue;
66
66
 
67
67
  // Filter menu items based on the search value
68
- this.menuItems = this.allMenuItems.filter((item: { text: string }) =>
69
- item.text.toLowerCase().includes(searchValue)
68
+ this.menuItems = this.allMenuItems.filter((item: string) =>
69
+ item?.toLowerCase().includes(searchValue)
70
70
  );
71
71
 
72
72
  this.isDropdownOpen = this.menuItems.length > 0;
@@ -63,15 +63,16 @@ export class NileChip extends NileElement {
63
63
  @property({ attribute: 'help-text' }) helpText = '';
64
64
 
65
65
  // Auto-complete options
66
- private autoCompleteOptions: string[] = [];
66
+ @property({ type: Array }) autoCompleteOptions : any[] = [];
67
67
 
68
68
  private handleSelect(event: CustomEvent<CustomEventDetail>) {
69
- // Emit a custom event with the selected value
70
- this.emit('nile-chip-change', { value: event.detail.value });
71
69
 
72
70
  // Add the selected value to the tags array
73
71
  this.tags = [...this.tags, event.detail.value];
74
72
 
73
+ // Emit a custom event with the selected value
74
+ this.emit('nile-chip-change', { value: this.tags });
75
+
75
76
  // Reset the input field
76
77
  this.resetInput();
77
78
  }
@@ -79,6 +80,8 @@ export class NileChip extends NileElement {
79
80
  private handleRemove(value: string) {
80
81
  // Remove the tag from the tags array
81
82
  this.tags = this.tags.filter(tag => tag !== value);
83
+ this.emit('nile-chip-change', { value: this.tags });
84
+
82
85
  }
83
86
 
84
87
  private handleInputChange(event: CustomEvent<CustomEventDetail>) {
@@ -95,7 +98,10 @@ export class NileChip extends NileElement {
95
98
  this.tags = [...this.tags, this.inputValue];
96
99
 
97
100
  this.resetInput();
101
+ this.emit('nile-chip-change', { value: this.tags });
98
102
  }
103
+
104
+
99
105
  }
100
106
 
101
107
  private handleFocus() {
@@ -145,7 +145,7 @@ export class NileMenuItem extends NileElement {
145
145
  })}
146
146
  >
147
147
  <span part="checked-icon" class="menu-item__check">
148
- <nile-icon name="check" library="system" aria-hidden="true"></nile-icon>
148
+ <nile-icon name="tick" library="system" aria-hidden="true"></nile-icon>
149
149
  </span>
150
150
 
151
151
  <slot name="prefix" part="prefix" class="menu-item__prefix"></slot>
@@ -155,7 +155,7 @@ export class NileMenuItem extends NileElement {
155
155
  <slot name="suffix" part="suffix" class="menu-item__suffix"></slot>
156
156
 
157
157
  <span part="submenu-icon" class="menu-item__chevron">
158
- <nile-icon name="chevron-right" library="system" aria-hidden="true"></nile-icon>
158
+ <nile-icon name="arrowright" library="system" aria-hidden="true"></nile-icon>
159
159
  </span>
160
160
  </div>
161
161
  `;