@ctrliq/quantic-components 1.61.0 → 1.61.2
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/dist/checkbox/index.js +3 -1
- package/dist/code-input/index.d.ts +2 -0
- package/dist/code-input/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/meta/index.js.map +1 -1
- package/dist/quantic-components.js +15 -2
- package/dist/quantic-components.js.map +1 -1
- package/dist/quantic-components.min.js +3 -3
- package/dist/quantic-components.min.js.map +1 -1
- package/dist/types/code-input/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/checkbox/index.js
CHANGED
|
@@ -41,8 +41,10 @@ let Checkbox = class Checkbox extends A11yAttributesMixin(QuanticElement) {
|
|
|
41
41
|
const input = this.renderRoot.querySelector('input');
|
|
42
42
|
if (input) {
|
|
43
43
|
input.indeterminate = this.indeterminate;
|
|
44
|
+
if (args.has('checked')) {
|
|
45
|
+
input.checked = this.checked;
|
|
46
|
+
}
|
|
44
47
|
}
|
|
45
|
-
// Sync form value when checked changes
|
|
46
48
|
if (args.has('checked')) {
|
|
47
49
|
this.internals.setFormValue(this.checked ? 'on' : null);
|
|
48
50
|
}
|
|
@@ -29,12 +29,14 @@ export declare class CodeInput extends CodeInput_base {
|
|
|
29
29
|
invalid: boolean;
|
|
30
30
|
lineNumbers: boolean;
|
|
31
31
|
stretch: boolean;
|
|
32
|
+
tabIndent: boolean;
|
|
32
33
|
private lineNumbersEl?;
|
|
33
34
|
private lineCount;
|
|
34
35
|
constructor();
|
|
35
36
|
updated(changedProperties: Map<string, unknown>): void;
|
|
36
37
|
static styles: import("lit").CSSResult;
|
|
37
38
|
private handleInput;
|
|
39
|
+
private handleKeydown;
|
|
38
40
|
private forwardNative;
|
|
39
41
|
private handleScroll;
|
|
40
42
|
formResetCallback(): void;
|
package/dist/code-input/index.js
CHANGED
|
@@ -26,7 +26,15 @@ let CodeInput = class CodeInput extends A11yAttributesMixin(QuanticElement) {
|
|
|
26
26
|
this.invalid = false;
|
|
27
27
|
this.lineNumbers = false;
|
|
28
28
|
this.stretch = false;
|
|
29
|
+
this.tabIndent = false;
|
|
29
30
|
this.lineCount = 1;
|
|
31
|
+
this.handleKeydown = (e) => {
|
|
32
|
+
if (this.tabIndent && e.key === 'Tab' && !this.disabled && !this.readOnly) {
|
|
33
|
+
e.preventDefault();
|
|
34
|
+
document.execCommand('insertText', false, '\t');
|
|
35
|
+
}
|
|
36
|
+
this.forwardNative(e);
|
|
37
|
+
};
|
|
30
38
|
this.internals = this.attachInternals();
|
|
31
39
|
}
|
|
32
40
|
updated(changedProperties) {
|
|
@@ -140,7 +148,7 @@ let CodeInput = class CodeInput extends A11yAttributesMixin(QuanticElement) {
|
|
|
140
148
|
@change=${this.forwardNative}
|
|
141
149
|
@focus=${this.forwardNative}
|
|
142
150
|
@blur=${this.forwardNative}
|
|
143
|
-
@keydown=${this.
|
|
151
|
+
@keydown=${this.handleKeydown}
|
|
144
152
|
@keyup=${this.forwardNative}
|
|
145
153
|
@keypress=${this.forwardNative}
|
|
146
154
|
@scroll=${this.handleScroll}
|
|
@@ -391,6 +399,9 @@ __decorate([
|
|
|
391
399
|
__decorate([
|
|
392
400
|
prop({ type: 'boolean', default: 'false', reflect: true, description: 'Makes the editor fill the height of its container. Overrides rows.' })
|
|
393
401
|
], CodeInput.prototype, "stretch", void 0);
|
|
402
|
+
__decorate([
|
|
403
|
+
prop({ type: 'boolean', default: 'false', reflect: true, description: 'Inserts a tab character when pressing Tab instead of moving focus. Disabled by default to preserve keyboard navigation.', attribute: 'tab-indent' })
|
|
404
|
+
], CodeInput.prototype, "tabIndent", void 0);
|
|
394
405
|
__decorate([
|
|
395
406
|
query('.line-numbers')
|
|
396
407
|
], CodeInput.prototype, "lineNumbersEl", void 0);
|