@aquera/nile-elements 0.1.13 → 0.1.15
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 +6 -0
- package/demo/index.html +8 -66
- package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.esm.js +11 -18
- 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.esm.js +1 -1
- package/dist/nile-code-editor/theme.cjs.js +1 -1
- package/dist/nile-code-editor/theme.cjs.js.map +1 -1
- package/dist/nile-code-editor/theme.esm.js +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.js +5 -12
- package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.js +8 -0
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-code-editor/theme.d.ts +12 -2
- package/dist/src/nile-code-editor/theme.js +12 -2
- package/dist/src/nile-code-editor/theme.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-checkbox/nile-checkbox.ts +5 -12
- package/src/nile-code-editor/nile-code-editor.ts +9 -0
- package/src/nile-code-editor/theme.ts +16 -3
package/package.json
CHANGED
@@ -216,7 +216,7 @@ export class NileCheckbox extends NileElement {
|
|
216
216
|
@blur=${this.handleBlur}
|
217
217
|
@focus=${this.handleFocus}
|
218
218
|
/>
|
219
|
-
|
219
|
+
|
220
220
|
<span
|
221
221
|
part="control${this.checked ? ' control--checked' : ''}${this
|
222
222
|
.indeterminate
|
@@ -249,24 +249,17 @@ export class NileCheckbox extends NileElement {
|
|
249
249
|
`
|
250
250
|
: ''}
|
251
251
|
</span>
|
252
|
-
|
252
|
+
|
253
253
|
<div part="label" class="checkbox__label">
|
254
254
|
${typeof this.label === 'boolean' ? '' : this.label}
|
255
255
|
<slot></slot>
|
256
256
|
</div>
|
257
257
|
</label>
|
258
|
-
|
258
|
+
|
259
259
|
${hasHelpText
|
260
|
-
? html`
|
261
|
-
<nile-tooltip content="${this.helpText}" placement="bottom">
|
262
|
-
<nile-icon
|
263
|
-
name="question"
|
264
|
-
class="checkbox__helptext-icon"
|
265
|
-
></nile-icon>
|
266
|
-
</nile-tooltip>
|
267
|
-
`
|
260
|
+
? html` <nile-form-help-text>${this.helpText}</nile-form-help-text> `
|
268
261
|
: ``}
|
269
|
-
|
262
|
+
|
270
263
|
${hasErrorMessage
|
271
264
|
? html`
|
272
265
|
<nile-form-error-message
|
@@ -381,6 +381,15 @@ export class NileCodeEditor extends NileElement {
|
|
381
381
|
if(this.timeOut) clearTimeout(this.timeOut);
|
382
382
|
this.timeOut=setTimeout(()=> this.emit('nile-change', value, false), this.debounceTimeout)
|
383
383
|
}
|
384
|
+
|
385
|
+
public focusAtPosition(pos: number=this.view.state.doc.toString().length): void {
|
386
|
+
if (this.view) {
|
387
|
+
this.view.dispatch({
|
388
|
+
selection: { anchor: pos },
|
389
|
+
});
|
390
|
+
this.view.focus();
|
391
|
+
}
|
392
|
+
}
|
384
393
|
|
385
394
|
public insertBetweenCode=(text: string) => {
|
386
395
|
const transaction = this.view.state.changeByRange(range => {
|
@@ -19,8 +19,21 @@ export const CustomTheme = {
|
|
19
19
|
lineHeight:'inherit',
|
20
20
|
letterSpacing:'inherit'
|
21
21
|
},
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
|
23
|
+
'.cm-content': {
|
24
|
+
fontSize: 'inherit',
|
25
|
+
fontStyle: 'inherit',
|
26
|
+
fontFamily: 'inherit',
|
27
|
+
fontWeight: 'inherit',
|
28
|
+
lineHeight:'inherit',
|
29
|
+
letterSpacing:'inherit'
|
30
|
+
},
|
31
|
+
|
32
|
+
".cm-scroller":{
|
33
|
+
fontFamily: 'inherit'
|
34
|
+
},
|
35
|
+
|
36
|
+
".cm-gutters": {
|
37
|
+
fontFamily: 'inherit', // Ensure the gutter font matches
|
25
38
|
},
|
26
39
|
};
|