@ctrliq/quantic-components 1.61.1 → 1.61.3

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.
@@ -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;
@@ -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.forwardNative}
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);
@@ -47,16 +47,14 @@ DialogBackdropElement.styles = css `
47
47
  }
48
48
 
49
49
  .backdrop--subtle {
50
- background-color: rgba(
51
- var(--quantic-component-dialog-backdrop-color),
52
- 0.5
50
+ background-color: rgb(
51
+ var(--quantic-component-dialog-backdrop-color) / 0.7
53
52
  );
54
53
  }
55
54
 
56
55
  .backdrop--opaque {
57
- background-color: rgba(
58
- var(--quantic-component-dialog-backdrop-color),
59
- 0.95
56
+ background-color: rgb(
57
+ var(--quantic-component-dialog-backdrop-color) / 0.8
60
58
  );
61
59
  backdrop-filter: blur(4px);
62
60
  }
@@ -67,10 +65,20 @@ DialogBackdropElement.styles = css `
67
65
  }
68
66
  `;
69
67
  __decorate([
70
- prop({ type: 'boolean', default: 'false', reflect: true, description: 'Whether the backdrop is visible.' })
68
+ prop({
69
+ type: 'boolean',
70
+ default: 'false',
71
+ reflect: true,
72
+ description: 'Whether the backdrop is visible.',
73
+ })
71
74
  ], DialogBackdropElement.prototype, "visible", void 0);
72
75
  __decorate([
73
- prop({ type: 'DialogBackdrop', options: Object.values(DialogBackdrop), default: DialogBackdrop.Opaque, description: 'Visual style of the backdrop overlay.' })
76
+ prop({
77
+ type: 'DialogBackdrop',
78
+ options: Object.values(DialogBackdrop),
79
+ default: DialogBackdrop.Opaque,
80
+ description: 'Visual style of the backdrop overlay.',
81
+ })
74
82
  ], DialogBackdropElement.prototype, "variant", void 0);
75
83
  DialogBackdropElement = __decorate([
76
84
  quanticElement('quantic-dialog-backdrop')