@basis-ng/primitives 0.0.1-alpha.53 → 0.0.1-alpha.55

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.
@@ -1,48 +1,9 @@
1
- import { ElementRef } from '@angular/core';
2
1
  import * as i0 from "@angular/core";
3
2
  export declare class TextareaComponent {
4
3
  /**
5
- * The placeholder text for the textarea.
4
+ * The size of the input.
6
5
  */
7
- readonly placeholder: import("@angular/core").InputSignal<string>;
8
- /**
9
- * The value of the textarea.
10
- */
11
- readonly value: import("@angular/core").WritableSignal<string | null>;
12
- /**
13
- * The number of rows for the textarea.
14
- */
15
- readonly rows: import("@angular/core").InputSignal<number>;
16
- /**
17
- * The number of columns for the textarea.
18
- */
19
- readonly cols: import("@angular/core").InputSignal<number>;
20
- /**
21
- * Whether the textarea is invalid.
22
- */
23
- readonly invalid: import("@angular/core").ModelSignal<boolean>;
24
- /**
25
- * Whether the textarea is disabled.
26
- */
27
- readonly disabled: import("@angular/core").ModelSignal<boolean>;
28
- /**
29
- * Whether the textarea is focused.
30
- * This will be used by the Label component.
31
- */
32
- readonly focused: import("@angular/core").WritableSignal<boolean>;
33
- /**
34
- * Event emitted when the value changes.
35
- */
36
- valueChange: import("@angular/core").OutputEmitterRef<string | null>;
37
- /**
38
- * Reference to the textarea element.
39
- */
40
- readonly el: ElementRef<HTMLTextAreaElement>;
41
- /**
42
- * Handles the input event.
43
- * @param event The input event.
44
- */
45
- onInput(event: Event): void;
6
+ readonly size: import("@angular/core").InputSignal<"1" | "2" | "3">;
46
7
  static ɵfac: i0.ɵɵFactoryDeclaration<TextareaComponent, never>;
47
- static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "textarea[b-textarea]", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "cols": { "alias": "cols"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "invalid": "invalidChange"; "disabled": "disabledChange"; "valueChange": "valueChange"; }, never, never, true, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "textarea[b-textarea]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
48
9
  }
@@ -1526,53 +1526,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
1526
1526
 
1527
1527
  class TextareaComponent {
1528
1528
  /**
1529
- * The placeholder text for the textarea.
1530
- */
1531
- placeholder = input('');
1532
- /**
1533
- * The value of the textarea.
1534
- */
1535
- value = signal(null);
1536
- /**
1537
- * The number of rows for the textarea.
1538
- */
1539
- rows = input(3);
1540
- /**
1541
- * The number of columns for the textarea.
1542
- */
1543
- cols = input(30);
1544
- /**
1545
- * Whether the textarea is invalid.
1546
- */
1547
- invalid = model(false);
1548
- /**
1549
- * Whether the textarea is disabled.
1550
- */
1551
- disabled = model(false);
1552
- /**
1553
- * Whether the textarea is focused.
1554
- * This will be used by the Label component.
1555
- */
1556
- focused = signal(false);
1557
- /**
1558
- * Event emitted when the value changes.
1559
- */
1560
- valueChange = output();
1561
- /**
1562
- * Reference to the textarea element.
1563
- */
1564
- el = inject(ElementRef);
1565
- /**
1566
- * Handles the input event.
1567
- * @param event The input event.
1529
+ * The size of the input.
1568
1530
  */
1569
- onInput(event) {
1570
- const target = event.target;
1571
- this.value.set(target.value);
1572
- this.valueChange.emit(target.value);
1573
- }
1531
+ size = input('2');
1574
1532
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1575
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.7", type: TextareaComponent, isStandalone: true, selector: "textarea[b-textarea]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, cols: { classPropertyName: "cols", publicName: "cols", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { invalid: "invalidChange", disabled: "disabledChange", valueChange: "valueChange" }, host: { listeners: { "input": "onInput($event)", "focus": "focused.set(true)", "blur": "focused.set(false)" }, properties: { "placeholder": "placeholder() || \"\"", "rows": "rows()", "cols": "cols()", "class.ng-invalid": "invalid()", "class.disabled": "disabled()" } }, ngImport: i0, template: ``, isInline: true });
1533
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.7", type: TextareaComponent, isStandalone: true, selector: "textarea[b-textarea]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": " \"size-\" + size() " } }, ngImport: i0, template: ``, isInline: true });
1576
1534
  }
1577
1535
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: TextareaComponent, decorators: [{
1578
1536
  type: Component,
@@ -1580,14 +1538,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
1580
1538
  selector: 'textarea[b-textarea]',
1581
1539
  template: ``,
1582
1540
  host: {
1583
- '[placeholder]': 'placeholder() || ""',
1584
- '[rows]': 'rows()',
1585
- '[cols]': 'cols()',
1586
- '[class.ng-invalid]': 'invalid()',
1587
- '[class.disabled]': 'disabled()',
1588
- '(input)': 'onInput($event)',
1589
- '(focus)': 'focused.set(true)',
1590
- '(blur)': 'focused.set(false)',
1541
+ '[class]': ' "size-" + size() ',
1591
1542
  },
1592
1543
  }]
1593
1544
  }] });