@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/README.md +3 -0
- package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.css.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.css.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.css.esm.js +17 -9
- package/dist/nile-code-editor/nile-code-editor.esm.js +9 -9
- package/dist/src/nile-code-editor/nile-code-editor.css.js +17 -9
- package/dist/src/nile-code-editor/nile-code-editor.css.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.js +10 -10
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-code-editor/nile-code-editor.css.ts +17 -9
- package/src/nile-code-editor/nile-code-editor.ts +10 -10
package/package.json
CHANGED
@@ -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
|
-
.
|
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:
|
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
|
-
.
|
51
|
+
.expand__icon__container{
|
49
52
|
display: none;
|
53
|
+
position: absolute;
|
54
|
+
border-radius: 5px;
|
50
55
|
cursor: pointer;
|
51
|
-
|
52
|
-
|
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
|
-
.
|
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('.
|
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
|
-
'
|
182
|
+
'code__editor__container': true,
|
183
183
|
'noborder': noborder,
|
184
184
|
'error': hasError || hasErrorMessage,
|
185
|
-
'
|
185
|
+
'code__editor__singleline': !this.multiline,
|
186
186
|
'no-scroller': noScrollbar
|
187
187
|
})}
|
188
188
|
>
|
189
189
|
${this.expandable
|
190
190
|
? html`
|
191
|
-
<nile-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
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
|