@aquera/nile-elements 0.0.11 → 0.0.13

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 (68) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/enum.d.ts +3 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/enum.js +3 -0
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/enum.js.map +1 -1
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js +1 -1
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.d.ts +2 -2
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js +52 -15
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.css.js +3 -0
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.css.js.map +1 -1
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.d.ts +4 -0
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.js +64 -17
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.js.map +1 -1
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/document.d.ts +1 -1
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/document.js +1 -1
  16. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/document.js.map +1 -1
  17. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +4 -3
  18. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  19. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  20. package/dist/index.iife.js +41 -27
  21. package/dist/internal/enum.cjs.js +1 -1
  22. package/dist/internal/enum.cjs.js.map +1 -1
  23. package/dist/internal/enum.esm.js +1 -1
  24. package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
  25. package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
  26. package/dist/nile-content-editor/nile-content-editor.css.cjs.js +1 -1
  27. package/dist/nile-content-editor/nile-content-editor.css.cjs.js.map +1 -1
  28. package/dist/nile-content-editor/nile-content-editor.css.esm.js +1 -1
  29. package/dist/nile-content-editor/nile-content-editor.esm.js +11 -11
  30. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  31. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  32. package/dist/nile-dialog/nile-dialog.css.cjs.js +1 -1
  33. package/dist/nile-dialog/nile-dialog.css.cjs.js.map +1 -1
  34. package/dist/nile-dialog/nile-dialog.css.esm.js +3 -0
  35. package/dist/nile-dialog/nile-dialog.esm.js +14 -4
  36. package/dist/nile-icon/icons/svg/document.cjs.js +1 -1
  37. package/dist/nile-icon/icons/svg/document.cjs.js.map +1 -1
  38. package/dist/nile-icon/icons/svg/document.esm.js +1 -1
  39. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  40. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  41. package/dist/nile-switcher/nile-switcher.esm.js +7 -6
  42. package/dist/src/internal/enum.d.ts +3 -0
  43. package/dist/src/internal/enum.js +3 -0
  44. package/dist/src/internal/enum.js.map +1 -1
  45. package/dist/src/nile-content-editor/nile-content-editor.css.js +1 -1
  46. package/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  47. package/dist/src/nile-content-editor/nile-content-editor.d.ts +2 -2
  48. package/dist/src/nile-content-editor/nile-content-editor.js +52 -15
  49. package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  50. package/dist/src/nile-dialog/nile-dialog.css.js +3 -0
  51. package/dist/src/nile-dialog/nile-dialog.css.js.map +1 -1
  52. package/dist/src/nile-dialog/nile-dialog.d.ts +4 -0
  53. package/dist/src/nile-dialog/nile-dialog.js +64 -17
  54. package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
  55. package/dist/src/nile-icon/icons/svg/document.d.ts +1 -1
  56. package/dist/src/nile-icon/icons/svg/document.js +1 -1
  57. package/dist/src/nile-icon/icons/svg/document.js.map +1 -1
  58. package/dist/src/nile-switcher/nile-switcher.js +4 -3
  59. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  60. package/dist/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +1 -1
  62. package/src/internal/enum.ts +3 -0
  63. package/src/nile-content-editor/nile-content-editor.css.ts +1 -1
  64. package/src/nile-content-editor/nile-content-editor.ts +56 -21
  65. package/src/nile-dialog/nile-dialog.css.ts +3 -0
  66. package/src/nile-dialog/nile-dialog.ts +82 -24
  67. package/src/nile-icon/icons/svg/document.ts +1 -1
  68. package/src/nile-switcher/nile-switcher.ts +4 -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.11",
6
+ "version": "0.0.13",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -14,4 +14,7 @@ export const KeyCode = {
14
14
  ARROW_UP: 'ArrowUp',
15
15
  ARROW_RIGHT: 'ArrowRight',
16
16
  ARROW_DOWN: 'ArrowDown',
17
+ CUT: 'KeyX',
18
+ COPY: 'Copy',
19
+ PASTE: 'Paste',
17
20
  };
@@ -25,7 +25,7 @@ export const styles = css`
25
25
 
26
26
  .dropdown-position {
27
27
  position: relative;
28
- bottom: 60px;
28
+ bottom: 20px;
29
29
  }
30
30
  .content-editable-input {
31
31
  box-sizing: border-box;
@@ -66,6 +66,7 @@ export class NileContentEditor extends NileElement {
66
66
 
67
67
  connectedCallback() {
68
68
  this.handleOutsideClick = this.handleOutsideClick.bind(this);
69
+ this.handleClipboardEvent = this.handleClipboardEvent.bind(this);
69
70
  super.connectedCallback();
70
71
  this.emit('nile-init');
71
72
  this.addOpenListeners();
@@ -83,10 +84,38 @@ export class NileContentEditor extends NileElement {
83
84
 
84
85
  addOpenListeners() {
85
86
  window.addEventListener('click', this.handleOutsideClick);
87
+ window.addEventListener('cut', this.handleClipboardEvent);
88
+ window.addEventListener('copy', this.handleClipboardEvent);
89
+ window.addEventListener('paste', this.handleClipboardEvent);
86
90
  }
87
91
 
88
92
  removeOpenListeners() {
89
93
  window.removeEventListener('click', this.handleOutsideClick);
94
+ window.removeEventListener('cut', this.handleClipboardEvent);
95
+ window.removeEventListener('copy', this.handleClipboardEvent);
96
+ window.removeEventListener('paste', this.handleClipboardEvent);
97
+ }
98
+
99
+ async handleClipboardEvent(event: Event) {
100
+ const selectedText = window?.getSelection()?.toString();
101
+ if (!!selectedText) {
102
+ switch (event.type) {
103
+ case 'cut':
104
+ case 'copy':
105
+ await navigator.clipboard.writeText(selectedText);
106
+ document.execCommand(event.type);
107
+ break;
108
+ case 'paste':
109
+ const pastedText = await navigator.clipboard.readText();
110
+ document.execCommand('insertText', false, pastedText);
111
+ break;
112
+ default:
113
+ break;
114
+ }
115
+ }
116
+ setTimeout(() => {
117
+ this.emitInputChange();
118
+ });
90
119
  }
91
120
 
92
121
  toggleDropdown(value: boolean) {
@@ -110,20 +139,14 @@ export class NileContentEditor extends NileElement {
110
139
  this.emit('nile-destroy');
111
140
  }
112
141
 
113
- handlePaste(event: ClipboardEvent) {
114
- event.preventDefault();
115
- if (event.clipboardData) {
116
- let text = event.clipboardData.getData('text/plain');
117
- document.execCommand('insertText', false, text);
118
- }
119
- this.emitInputChange();
120
- }
121
-
122
142
  private handlekeyDown(event: any) {
123
143
  if (event.code === KeyCode.ENTER && this.type === 'text') {
124
144
  event.preventDefault();
125
145
  return;
126
146
  }
147
+ if ([KeyCode.CUT, KeyCode.COPY, KeyCode.PASTE].includes(event.code)) {
148
+ return;
149
+ }
127
150
  if (event.code === KeyCode.ESCAPE) {
128
151
  event.preventDefault();
129
152
  this.toggleDropdown(false);
@@ -133,8 +156,9 @@ export class NileContentEditor extends NileElement {
133
156
  const value = this.contentEditor.innerText;
134
157
  this.emitInputChange();
135
158
  if (value.includes(this.tagIdentifier)) {
136
- this.toggleDropdown(true);
159
+ this.insertNodes(this.contentEditor, this.contentEditor.childNodes);
137
160
  this.filterOptions();
161
+ this.toggleDropdown(true);
138
162
  } else {
139
163
  this.toggleDropdown(false);
140
164
  }
@@ -176,7 +200,6 @@ export class NileContentEditor extends NileElement {
176
200
  emitInputChange(): void {
177
201
  if (this.contentEditor) {
178
202
  let fieldValue = this.contentEditor.innerHTML;
179
-
180
203
  if (this.contentEditor.innerText !== '') {
181
204
  fieldValue = this.generateValuesFromHTMLTags(fieldValue);
182
205
  }
@@ -188,17 +211,29 @@ export class NileContentEditor extends NileElement {
188
211
  }
189
212
  }
190
213
 
191
- insertNodes(parentNode: Node, childNodes: NodeList, autoOptionsTag: Node) {
192
- Array.from(childNodes).map((node: Node, index: number) => {
214
+ insertNodes(parentNode: Node, childNodes: NodeList, autoOptionsTag?: Node) {
215
+ [...childNodes].forEach((node: Node, index: number) => {
193
216
  if (node.hasChildNodes()) {
194
- this.insertNodes(node, node.childNodes, autoOptionsTag);
217
+ if (autoOptionsTag) {
218
+ this.insertNodes(node, node.childNodes, autoOptionsTag);
219
+ } else {
220
+ this.insertNodes(node, node.childNodes);
221
+ }
195
222
  } else {
196
223
  if (node.nodeValue?.includes(this.tagIdentifier)) {
197
- parentNode.childNodes[index].nodeValue = node.nodeValue?.replace(
198
- this.tagIdentifier + this.filteredValue,
199
- ''
200
- );
201
- parentNode.childNodes[index].after(autoOptionsTag);
224
+ if (autoOptionsTag) {
225
+ parentNode.childNodes[index].nodeValue = node.nodeValue?.replace(
226
+ this.tagIdentifier + this.filteredValue,
227
+ ''
228
+ );
229
+ parentNode.childNodes[index].after(autoOptionsTag);
230
+ }
231
+ this.filteredValue =
232
+ parentNode?.childNodes[index]?.nodeValue
233
+ ?.split(this.tagIdentifier)
234
+ .slice(1)
235
+ .join() || '';
236
+ return;
202
237
  }
203
238
  }
204
239
  });
@@ -250,6 +285,7 @@ export class NileContentEditor extends NileElement {
250
285
  <nile-popup
251
286
  .active="${live(this.openDropdown)}"
252
287
  sync="width"
288
+ strategy="fixed"
253
289
  placement="bottom"
254
290
  class=${classMap({
255
291
  dropdown: true,
@@ -261,7 +297,7 @@ export class NileContentEditor extends NileElement {
261
297
  ${this.showLabel && this.labelText
262
298
  ? html`<label class="ods-label">${this.labelText} </label> ${this
263
299
  .required
264
- ? html`<sapn class="asterik">*</span>`
300
+ ? html`<span class="asterik">*</span>`
265
301
  : ''}`
266
302
  : ''}
267
303
  <div
@@ -273,7 +309,6 @@ export class NileContentEditor extends NileElement {
273
309
  'text-area': type === 'text-area' ? true : false,
274
310
  })}
275
311
  @keydown=${this.handlekeyDown}
276
- @paste=${this.handlePaste}
277
312
  ></div>
278
313
  ${hasHelpText
279
314
  ? html`
@@ -115,6 +115,9 @@ export const styles = css`
115
115
  overflow: auto;
116
116
  -webkit-overflow-scrolling: touch;
117
117
  border: 1px solid #e5e9eb;
118
+ }
119
+
120
+ .dialog__body-noheader {
118
121
  border-radius: 4px 4px 0px 0px;
119
122
  }
120
123
 
@@ -30,7 +30,6 @@ import NileElement from '../internal/nile-element';
30
30
  */
31
31
  @customElement('nile-dialog')
32
32
  export class NileDialog extends NileElement {
33
-
34
33
  static styles: CSSResultGroup = styles;
35
34
 
36
35
  private readonly hasSlotController = new HasSlotController(this, 'footer');
@@ -61,6 +60,16 @@ export class NileDialog extends NileElement {
61
60
 
62
61
  @property({ type: Boolean, reflect: true }) preventOverlayClose = false;
63
62
 
63
+
64
+ /**
65
+ * Added to resolve conflicts between Angular Material's mat-drawer components.
66
+ */
67
+ private drawerStyle = `
68
+ <style id="drawer-style">
69
+ .mat-drawer.mat-drawer-side { z-index: 1; }
70
+ </style>
71
+ `;
72
+
64
73
  connectedCallback() {
65
74
  super.connectedCallback();
66
75
  this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);
@@ -74,6 +83,7 @@ export class NileDialog extends NileElement {
74
83
  this.addOpenListeners();
75
84
  this.modal.activate();
76
85
  lockBodyScrolling(this);
86
+ document.head.insertAdjacentHTML('beforeend', this.drawerStyle);
77
87
  }
78
88
  }
79
89
 
@@ -83,19 +93,20 @@ export class NileDialog extends NileElement {
83
93
  }
84
94
 
85
95
  private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {
86
-
87
96
  const nileRequestClose = this.emit('nile-request-close', {
88
97
  cancelable: true,
89
- detail: { source }
98
+ detail: { source },
90
99
  });
91
100
 
92
- if(source === 'close-button'){
101
+ if (source === 'close-button') {
93
102
  this.hide();
94
103
  return;
95
104
  }
96
105
 
97
- if (nileRequestClose.defaultPrevented || this.preventOverlayClose ) {
98
- const animation = getAnimation(this, 'dialog.denyClose', { dir: 'right'});
106
+ if (nileRequestClose.defaultPrevented || this.preventOverlayClose) {
107
+ const animation = getAnimation(this, 'dialog.denyClose', {
108
+ dir: 'right',
109
+ });
99
110
  animateTo(this.panel, animation.keyframes, animation.options);
100
111
  return;
101
112
  }
@@ -121,12 +132,11 @@ export class NileDialog extends NileElement {
121
132
  @watch('open', { waitUntilFirstUpdate: true })
122
133
  async handleOpenChange() {
123
134
  if (this.open) {
124
- // Show
125
135
  this.emit('nile-show');
126
136
  this.addOpenListeners();
127
137
  this.originalTrigger = document.activeElement as HTMLElement;
128
138
  this.modal.activate();
129
-
139
+ document.head.insertAdjacentHTML('beforeend', this.drawerStyle);
130
140
  lockBodyScrolling(this);
131
141
 
132
142
  // When the dialog is shown, Safari will attempt to set focus on whatever element has autofocus. This can cause
@@ -140,17 +150,24 @@ export class NileDialog extends NileElement {
140
150
  autoFocusTarget.removeAttribute('autofocus');
141
151
  }
142
152
 
143
- await Promise.all([stopAnimations(this.dialog), stopAnimations(this.overlay)]);
153
+ await Promise.all([
154
+ stopAnimations(this.dialog),
155
+ stopAnimations(this.overlay),
156
+ ]);
144
157
  this.dialog.hidden = false;
145
158
 
146
159
  // Set initial focus
147
160
  requestAnimationFrame(() => {
148
- const nileInitialFocus = this.emit('nile-initial-focus', { cancelable: true });
161
+ const nileInitialFocus = this.emit('nile-initial-focus', {
162
+ cancelable: true,
163
+ });
149
164
 
150
165
  if (!nileInitialFocus.defaultPrevented) {
151
166
  // Set focus to the autofocus target and restore the attribute
152
167
  if (autoFocusTarget) {
153
- (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });
168
+ (autoFocusTarget as HTMLInputElement).focus({
169
+ preventScroll: true,
170
+ });
154
171
  } else {
155
172
  this.panel.focus({ preventScroll: true });
156
173
  }
@@ -162,11 +179,19 @@ export class NileDialog extends NileElement {
162
179
  }
163
180
  });
164
181
 
165
- const panelAnimation = getAnimation(this, 'dialog.show', { dir: 'right' });
166
- const overlayAnimation = getAnimation(this, 'dialog.overlay.show', { dir: 'right' });
182
+ const panelAnimation = getAnimation(this, 'dialog.show', {
183
+ dir: 'right',
184
+ });
185
+ const overlayAnimation = getAnimation(this, 'dialog.overlay.show', {
186
+ dir: 'right',
187
+ });
167
188
  await Promise.all([
168
189
  animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),
169
- animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)
190
+ animateTo(
191
+ this.overlay,
192
+ overlayAnimation.keyframes,
193
+ overlayAnimation.options
194
+ ),
170
195
  ]);
171
196
 
172
197
  this.emit('nile-after-show');
@@ -176,20 +201,39 @@ export class NileDialog extends NileElement {
176
201
  this.removeOpenListeners();
177
202
  this.modal.deactivate();
178
203
 
179
- await Promise.all([stopAnimations(this.dialog), stopAnimations(this.overlay)]);
180
- const panelAnimation = getAnimation(this, 'dialog.hide', { dir: 'right' });
181
- const overlayAnimation = getAnimation(this, 'dialog.overlay.hide', { dir: 'right' });
204
+ await Promise.all([
205
+ stopAnimations(this.dialog),
206
+ stopAnimations(this.overlay),
207
+ ]);
208
+ const panelAnimation = getAnimation(this, 'dialog.hide', {
209
+ dir: 'right',
210
+ });
211
+ const overlayAnimation = getAnimation(this, 'dialog.overlay.hide', {
212
+ dir: 'right',
213
+ });
182
214
 
215
+ const styleTag = document.getElementById('drawer-style');
216
+ if (styleTag) {
217
+ document.head.removeChild(styleTag);
218
+ }
183
219
  // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to
184
220
  // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear
185
221
  // unexpectedly. We'll unhide them after all animations have completed.
186
222
  await Promise.all([
187
- animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {
223
+ animateTo(
224
+ this.overlay,
225
+ overlayAnimation.keyframes,
226
+ overlayAnimation.options
227
+ ).then(() => {
188
228
  this.overlay.hidden = true;
189
229
  }),
190
- animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {
230
+ animateTo(
231
+ this.panel,
232
+ panelAnimation.keyframes,
233
+ panelAnimation.options
234
+ ).then(() => {
191
235
  this.panel.hidden = true;
192
- })
236
+ }),
193
237
  ]);
194
238
 
195
239
  this.dialog.hidden = true;
@@ -237,10 +281,15 @@ export class NileDialog extends NileElement {
237
281
  class=${classMap({
238
282
  dialog: true,
239
283
  'dialog--open': this.open,
240
- 'dialog--has-footer': this.hasSlotController.test('footer')
284
+ 'dialog--has-footer': this.hasSlotController.test('footer'),
241
285
  })}
242
286
  >
243
- <div part="overlay" class="dialog__overlay" @click=${() => this.requestClose('overlay')} tabindex="-1"></div>
287
+ <div
288
+ part="overlay"
289
+ class="dialog__overlay"
290
+ @click=${() => this.requestClose('overlay')}
291
+ tabindex="-1"
292
+ ></div>
244
293
 
245
294
  <div
246
295
  part="panel"
@@ -256,7 +305,11 @@ export class NileDialog extends NileElement {
256
305
  ? html`
257
306
  <header part="header" class="dialog__header">
258
307
  <h2 part="title" class="dialog__title" id="title">
259
- <slot name="label"> ${this.label.length > 0 ? this.label : String.fromCharCode(65279)} </slot>
308
+ <slot name="label">
309
+ ${this.label.length > 0
310
+ ? this.label
311
+ : String.fromCharCode(65279)}
312
+ </slot>
260
313
  </h2>
261
314
  <div part="header-actions" class="dialog__header-actions">
262
315
  <slot name="header-actions"></slot>
@@ -274,7 +327,12 @@ export class NileDialog extends NileElement {
274
327
  `
275
328
  : ''}
276
329
 
277
- <slot part="body" class="dialog__body"></slot>
330
+ <slot
331
+ part="body"
332
+ class="dialog__body ${this.noHeader
333
+ ? 'dialog__body-noheader'
334
+ : ''}"
335
+ ></slot>
278
336
 
279
337
  <footer part="footer" class="dialog__footer">
280
338
  <slot name="footer"></slot>
@@ -2,4 +2,4 @@
2
2
  * Do not edit directly
3
3
  */
4
4
 
5
- export default "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMjEuMS4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIJIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjQgMjQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48Zz48Zz48cGF0aCBpZD0iZG9jdW1lbnRfMV8iIGQ9Ik0xNi4zLDAuMmw2LjQsNi40djE3LjFIMS4yVjAuM0wxNi4zLDAuMnogTTE1LjMsMS43SDIuOHYyMC41aDE4LjVWNy43aC02TDE1LjMsMS43eiBNMTcsMTYuMnYxLjVINwkJCXYtMS41SDE3eiBNMTcsMTEuMnYxLjVIN3YtMS41SDE3eiBNMTEsNi4ydjEuNUg3VjYuMkgxMXogTTE2LjgsMi44djMuNGgzLjRMMTYuOCwyLjh6Ii8+PC9nPjwvZz48L3N2Zz4=";
5
+ export default "PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTMuNzUgNS43MzgyOEMzLjc1IDQuNDk1NjQgNC43NTczNiAzLjQ4ODI4IDYgMy40ODgyOEgxMy4zNzVWNS43MzgyOEMxMy4zNzUgNy44MDkzNSAxNS4wNTM5IDkuNDg4MjggMTcuMTI1IDkuNDg4MjhIMjAuMjVWMTkuNzM4M0MyMC4yNSAyMC45ODA5IDE5LjI0MjYgMjEuOTg4MyAxOCAyMS45ODgzSDZDNC43NTczNiAyMS45ODgzIDMuNzUgMjAuOTgwOSAzLjc1IDE5LjczODNWNS43MzgyOFpNMTkgNy45ODgyOEwxNC44NzUgNC4zODgyOFY1LjczODI4QzE0Ljg3NSA2Ljk4MDkyIDE1Ljg4MjQgNy45ODgyOCAxNy4xMjUgNy45ODgyOEgxOVpNNiAxLjk4ODI4QzMuOTI4OTMgMS45ODgyOCAyLjI1IDMuNjY3MjEgMi4yNSA1LjczODI4VjE5LjczODNDMi4yNSAyMS44MDkzIDMuOTI4OTMgMjMuNDg4MyA2IDIzLjQ4ODNIMThDMjAuMDcxMSAyMy40ODgzIDIxLjc1IDIxLjgwOTMgMjEuNzUgMTkuNzM4M1Y4LjM5NzM3TDE0LjQwNjIgMS45ODgyOEg2Wk02IDE4LjQ4ODNMMTggMTguNDg4M1YxNi45ODgzTDYgMTYuOTg4M0w2IDE4LjQ4ODNaTTE4IDE0LjIzODNMNiAxNC4yMzgzTDYgMTIuNzM4M0wxOCAxMi43MzgzVjE0LjIzODNaTTYgMTAuMjM4M0gxMVY4LjczODI4TDYgOC43MzgyOEw2IDEwLjIzODNaIiBmaWxsPSJibGFjayIvPjwvc3ZnPg==";
@@ -98,6 +98,7 @@ export class NileSwitcher extends NileElement {
98
98
  placeholder,
99
99
  disabled,
100
100
  required,
101
+ error,
101
102
  errorMessage,
102
103
  inputType: inputTypeName,
103
104
  } = Input;
@@ -108,7 +109,7 @@ export class NileSwitcher extends NileElement {
108
109
  .required=${required}
109
110
  .errorMessage=${errorMessage}
110
111
  .placeholder=${placeholder}
111
- .error=${true}
112
+ .error=${error}
112
113
  @nile-input=${(e: CustomEvent) => {
113
114
  this.handleChange(e, inputType, inputTypeName);
114
115
  }}
@@ -138,10 +139,11 @@ export class NileSwitcher extends NileElement {
138
139
  }
139
140
 
140
141
  renderNileTextArea(Input: switchInputType, inputType: string) {
141
- const { value, disabled, inputType: inputTypeName } = Input;
142
+ const { value, disabled, readonly, inputType: inputTypeName } = Input;
142
143
  return html`<nile-textarea
143
144
  .value=${value}
144
145
  .disabled=${disabled}
146
+ ?readonly=${readonly}
145
147
  @nile-input=${(e: CustomEvent) => {
146
148
  this.handleChange(e, inputType, inputTypeName);
147
149
  }}