@aquera/nile-elements 0.1.9 → 0.1.10

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/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.1.9",
6
+ "version": "0.1.10",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -11,25 +11,28 @@ import { css } from 'lit';
11
11
  * CodeEditor CSS
12
12
  */
13
13
  export const styles = css`
14
+ *{
15
+ box-sizing:border-box;
16
+ }
17
+
14
18
  :host {
15
19
  display: block;
16
20
  }
17
21
 
18
- .code-mirror {
22
+ .code__editor__container {
19
23
  display: flex;
20
- justify-content: flex-end;
21
- flex-direction: row-reverse;
22
24
  padding: 5px;
23
25
  border-radius: 5px;
24
26
  border: 1px solid rgb(204, 204, 204);
27
+ position: relative;
25
28
  }
26
29
 
27
30
  .no-scroller .cm-scroller{
28
- scrollbar-width:none;
31
+ scrollbar-width: none;
29
32
  }
30
33
 
31
34
  .error {
32
- border-color: #e5434d;
35
+ border-color: var(--nile-colors-red-500);
33
36
  }
34
37
 
35
38
  .noborder {
@@ -45,14 +48,19 @@ export const styles = css`
45
48
  outline: none;
46
49
  }
47
50
 
48
- .code-editor__icon__container {
51
+ .expand__icon__container{
49
52
  display: none;
53
+ position: absolute;
54
+ border-radius: 5px;
50
55
  cursor: pointer;
51
- align-self: start;
52
- padding: 5px 5px 0px 0px;
56
+ right: 0px;
57
+ top: 5px;
58
+ z-index: 1;
59
+ padding: 5px;
60
+ background-color: var(--nile-colors-white-base);
53
61
  }
54
62
 
55
- .code-mirror:hover > .code-editor__icon__container {
63
+ .code__editor__container:hover > .expand__icon__container{
56
64
  display: flex;
57
65
  }
58
66
  `;
@@ -47,7 +47,7 @@ import { Theme } from './theme';
47
47
  @customElement('nile-code-editor')
48
48
  export class NileCodeEditor extends NileElement {
49
49
 
50
- @query('.code-mirror') codeEditor: HTMLInputElement;
50
+ @query('.code__editor__container') codeEditor: HTMLInputElement;
51
51
 
52
52
  @property({ type: String, reflect: true , attribute: true }) value = '';
53
53
 
@@ -179,22 +179,22 @@ export class NileCodeEditor extends NileElement {
179
179
  return html`<div
180
180
  part="code-editor-base"
181
181
  class=${classMap({
182
- 'code-mirror': true,
182
+ 'code__editor__container': true,
183
183
  'noborder': noborder,
184
184
  'error': hasError || hasErrorMessage,
185
- 'code-mirror__singleline': !this.multiline,
185
+ 'code__editor__singleline': !this.multiline,
186
186
  'no-scroller': noScrollbar
187
187
  })}
188
188
  >
189
189
  ${this.expandable
190
190
  ? html`
191
- <nile-icon
192
- name="${this.expandIcon}"
193
- class="code-editor__icon__container"
194
- size="16"
195
- color="black"
196
- @click="${(e: CustomEvent) => this.emit('nile-expand')}"
197
- ></nile-icon>`
191
+ <div @click="${(e: CustomEvent) => this.emit('nile-expand')}" class="expand__icon__container">
192
+ <nile-icon
193
+ name="${this.expandIcon}"
194
+ size="16"
195
+ color="black"
196
+ ></nile-icon>
197
+ </div>`
198
198
  : ''}
199
199
  </div>
200
200
  ${hasErrorMessage