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

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 (39) 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 +3 -1
  4. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/src/nile-chip/nile-chip.js +18 -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/src/nile-tag/nile-tag.js +1 -1
  9. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/src/nile-tag/nile-tag.js.map +1 -1
  10. package/.rollup.cache/Users/ravisankar/aquera/nile/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  11. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  12. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  13. package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
  14. package/dist/nile-chip/index.cjs.js +1 -1
  15. package/dist/nile-chip/index.esm.js +1 -1
  16. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  17. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  18. package/dist/nile-chip/nile-chip.esm.js +2 -2
  19. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  20. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  21. package/dist/nile-menu-item/nile-menu-item.esm.js +2 -2
  22. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  23. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  24. package/dist/nile-tag/nile-tag.esm.js +1 -1
  25. package/dist/src/nile-auto-complete/nile-auto-complete.js +2 -2
  26. package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
  27. package/dist/src/nile-chip/nile-chip.d.ts +3 -1
  28. package/dist/src/nile-chip/nile-chip.js +18 -2
  29. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  30. package/dist/src/nile-menu-item/nile-menu-item.js +2 -2
  31. package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
  32. package/dist/src/nile-tag/nile-tag.js +1 -1
  33. package/dist/src/nile-tag/nile-tag.js.map +1 -1
  34. package/dist/tsconfig.tsbuildinfo +1 -1
  35. package/package.json +1 -1
  36. package/src/nile-auto-complete/nile-auto-complete.ts +4 -4
  37. package/src/nile-chip/nile-chip.ts +16 -3
  38. package/src/nile-menu-item/nile-menu-item.ts +2 -2
  39. package/src/nile-tag/nile-tag.ts +1 -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.0.1-beta.4",
6
+ "version": "0.0.1-beta.6",
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,23 @@ 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
+
68
+ @property({ type: Array }) value : any[] = [];
69
+
70
+ @watch('value')
71
+ onValueChanged() {
72
+ this.tags = [...this.value];
73
+ }
67
74
 
68
75
  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
76
 
72
77
  // Add the selected value to the tags array
73
78
  this.tags = [...this.tags, event.detail.value];
74
79
 
80
+ // Emit a custom event with the selected value
81
+ this.emit('nile-chip-change', { value: this.tags });
82
+
75
83
  // Reset the input field
76
84
  this.resetInput();
77
85
  }
@@ -79,6 +87,8 @@ export class NileChip extends NileElement {
79
87
  private handleRemove(value: string) {
80
88
  // Remove the tag from the tags array
81
89
  this.tags = this.tags.filter(tag => tag !== value);
90
+ this.emit('nile-chip-change', { value: this.tags });
91
+
82
92
  }
83
93
 
84
94
  private handleInputChange(event: CustomEvent<CustomEventDetail>) {
@@ -95,7 +105,10 @@ export class NileChip extends NileElement {
95
105
  this.tags = [...this.tags, this.inputValue];
96
106
 
97
107
  this.resetInput();
108
+ this.emit('nile-chip-change', { value: this.tags });
98
109
  }
110
+
111
+
99
112
  }
100
113
 
101
114
  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
  `;
@@ -99,7 +99,7 @@ export class NileTag extends NileElement {
99
99
  <nile-icon-button
100
100
  part="remove-button"
101
101
  exportparts="base:remove-button__base"
102
- name="close"
102
+ name="error"
103
103
  library="system"
104
104
  label="remove"
105
105
  class="tag__remove"