@latitude-ui/widgets 0.0.33 → 0.0.35

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.
Files changed (58) hide show
  1. package/fesm2022/latitude-ui-widgets-button.mjs +34 -16
  2. package/fesm2022/latitude-ui-widgets-button.mjs.map +1 -1
  3. package/fesm2022/latitude-ui-widgets-checkbox.mjs +17 -11
  4. package/fesm2022/latitude-ui-widgets-checkbox.mjs.map +1 -1
  5. package/fesm2022/latitude-ui-widgets-core.mjs +41 -59
  6. package/fesm2022/latitude-ui-widgets-core.mjs.map +1 -1
  7. package/fesm2022/latitude-ui-widgets-icons.mjs +16 -4
  8. package/fesm2022/latitude-ui-widgets-icons.mjs.map +1 -1
  9. package/fesm2022/latitude-ui-widgets-input.mjs +9 -3
  10. package/fesm2022/latitude-ui-widgets-input.mjs.map +1 -1
  11. package/fesm2022/latitude-ui-widgets-l10n.mjs +104 -0
  12. package/fesm2022/latitude-ui-widgets-l10n.mjs.map +1 -0
  13. package/fesm2022/latitude-ui-widgets-listbox.mjs +6 -1
  14. package/fesm2022/latitude-ui-widgets-listbox.mjs.map +1 -1
  15. package/fesm2022/latitude-ui-widgets-lookup.mjs +12 -8
  16. package/fesm2022/latitude-ui-widgets-lookup.mjs.map +1 -1
  17. package/fesm2022/latitude-ui-widgets-menu.mjs +5 -5
  18. package/fesm2022/latitude-ui-widgets-menu.mjs.map +1 -1
  19. package/fesm2022/latitude-ui-widgets-paginate.mjs +100 -0
  20. package/fesm2022/latitude-ui-widgets-paginate.mjs.map +1 -0
  21. package/fesm2022/latitude-ui-widgets-scrollable.mjs +9 -5
  22. package/fesm2022/latitude-ui-widgets-scrollable.mjs.map +1 -1
  23. package/fesm2022/latitude-ui-widgets-select.mjs +20 -12
  24. package/fesm2022/latitude-ui-widgets-select.mjs.map +1 -1
  25. package/fesm2022/latitude-ui-widgets-splitview.mjs +218 -0
  26. package/fesm2022/latitude-ui-widgets-splitview.mjs.map +1 -0
  27. package/fesm2022/latitude-ui-widgets-switch.mjs +10 -6
  28. package/fesm2022/latitude-ui-widgets-switch.mjs.map +1 -1
  29. package/fesm2022/latitude-ui-widgets-tabs.mjs +23 -26
  30. package/fesm2022/latitude-ui-widgets-tabs.mjs.map +1 -1
  31. package/fesm2022/latitude-ui-widgets-textbox.mjs +67 -70
  32. package/fesm2022/latitude-ui-widgets-textbox.mjs.map +1 -1
  33. package/fesm2022/latitude-ui-widgets-toolbar.mjs +9 -5
  34. package/fesm2022/latitude-ui-widgets-toolbar.mjs.map +1 -1
  35. package/fesm2022/latitude-ui-widgets.mjs +10 -1
  36. package/fesm2022/latitude-ui-widgets.mjs.map +1 -1
  37. package/l10n/README.md +3 -0
  38. package/package.json +13 -1
  39. package/paginate/README.md +3 -0
  40. package/splitview/README.md +3 -0
  41. package/types/latitude-ui-widgets-button.d.ts +25 -8
  42. package/types/latitude-ui-widgets-checkbox.d.ts +6 -3
  43. package/types/latitude-ui-widgets-core.d.ts +33 -32
  44. package/types/latitude-ui-widgets-icons.d.ts +11 -2
  45. package/types/latitude-ui-widgets-input.d.ts +5 -3
  46. package/types/latitude-ui-widgets-l10n.d.ts +46 -0
  47. package/types/latitude-ui-widgets-listbox.d.ts +3 -1
  48. package/types/latitude-ui-widgets-lookup.d.ts +5 -3
  49. package/types/latitude-ui-widgets-menu.d.ts +4 -4
  50. package/types/latitude-ui-widgets-paginate.d.ts +39 -0
  51. package/types/latitude-ui-widgets-scrollable.d.ts +6 -4
  52. package/types/latitude-ui-widgets-select.d.ts +5 -3
  53. package/types/latitude-ui-widgets-splitview.d.ts +76 -0
  54. package/types/latitude-ui-widgets-switch.d.ts +5 -3
  55. package/types/latitude-ui-widgets-tabs.d.ts +15 -19
  56. package/types/latitude-ui-widgets-textbox.d.ts +9 -13
  57. package/types/latitude-ui-widgets-toolbar.d.ts +3 -1
  58. package/types/latitude-ui-widgets.d.ts +4 -1
@@ -1,18 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { forwardRef, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { HTMLFormControl } from '@latitude-ui/widgets/core';
3
+ import { FormControlComponent } from '@latitude-ui/widgets/core';
4
4
 
5
- class SwitchComponent extends HTMLFormControl {
5
+ class SwitchComponent extends FormControlComponent {
6
6
  toggle() {
7
7
  if (!this.disabled()) {
8
8
  const value = this.value() ?? false;
9
- this.writeValue(!value);
9
+ this.updateValue(!value);
10
10
  }
11
11
  }
12
12
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: SwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
13
13
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: SwitchComponent, isStandalone: true, selector: "lat-switch", host: { listeners: { "click": "toggle()" } }, providers: [
14
14
  {
15
- provide: HTMLFormControl,
15
+ provide: FormControlComponent,
16
16
  useExisting: forwardRef(() => SwitchComponent),
17
17
  },
18
18
  ], exportAs: ["latSwitch"], usesInheritance: true, ngImport: i0, template: "<button\r\n type=\"button\"\r\n role=\"switch\"\r\n [attr.id]=\"computedId()\"\r\n [attr.value]=\"value() ? 'on' : 'off'\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || undefined\"\r\n [attr.aria-checked]=\"value() || false\"\r\n>\r\n <div\r\n role=\"presentation\"\r\n class=\"lat-switch-thumb\"\r\n ></div>\r\n</button>\r\n<ng-content/>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
@@ -21,7 +21,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
21
21
  type: Component,
22
22
  args: [{ exportAs: 'latSwitch', selector: 'lat-switch', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
23
23
  {
24
- provide: HTMLFormControl,
24
+ provide: FormControlComponent,
25
25
  useExisting: forwardRef(() => SwitchComponent),
26
26
  },
27
27
  ], host: {
@@ -29,9 +29,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
29
29
  }, template: "<button\r\n type=\"button\"\r\n role=\"switch\"\r\n [attr.id]=\"computedId()\"\r\n [attr.value]=\"value() ? 'on' : 'off'\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || undefined\"\r\n [attr.aria-checked]=\"value() || false\"\r\n>\r\n <div\r\n role=\"presentation\"\r\n class=\"lat-switch-thumb\"\r\n ></div>\r\n</button>\r\n<ng-content/>\r\n" }]
30
30
  }] });
31
31
 
32
+ const SwitchImports = [
33
+ SwitchComponent
34
+ ];
35
+
32
36
  /**
33
37
  * Generated bundle index. Do not edit.
34
38
  */
35
39
 
36
- export { SwitchComponent };
40
+ export { SwitchComponent, SwitchImports };
37
41
  //# sourceMappingURL=latitude-ui-widgets-switch.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"latitude-ui-widgets-switch.mjs","sources":["../../../../packages/widgets/switch/lib/switch.component.ts","../../../../packages/widgets/switch/lib/switch.component.html","../../../../packages/widgets/switch/latitude-ui-widgets-switch.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, forwardRef, ViewEncapsulation } from '@angular/core';\r\n\r\nimport { HTMLFormControl } from '@latitude-ui/widgets/core';\r\n\r\n\r\n@Component({\r\n exportAs: 'latSwitch',\r\n selector: 'lat-switch',\r\n templateUrl: './switch.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [\r\n {\r\n provide: HTMLFormControl,\r\n useExisting: forwardRef(() => SwitchComponent),\r\n },\r\n ],\r\n host: {\r\n '(click)': 'toggle()',\r\n },\r\n})\r\nexport class SwitchComponent extends HTMLFormControl<boolean> {\r\n toggle() {\r\n if (!this.disabled()) {\r\n const value = this.value() ?? false;\r\n\r\n this.writeValue(!value);\r\n }\r\n }\r\n}\r\n","<button\r\n type=\"button\"\r\n role=\"switch\"\r\n [attr.id]=\"computedId()\"\r\n [attr.value]=\"value() ? 'on' : 'off'\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || undefined\"\r\n [attr.aria-checked]=\"value() || false\"\r\n>\r\n <div\r\n role=\"presentation\"\r\n class=\"lat-switch-thumb\"\r\n ></div>\r\n</button>\r\n<ng-content/>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAqBM,MAAO,eAAgB,SAAQ,eAAwB,CAAA;IAC3D,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE;YACpB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,KAAK;AAEnC,YAAA,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACzB;IACF;uGAPW,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,EAAA,SAAA,EAVf;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,eAAe,CAAC;AAC/C,aAAA;AACF,SAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChBH,kZAeA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDMa,eAAe,EAAA,UAAA,EAAA,CAAA;kBAhB3B,SAAS;+BACE,WAAW,EAAA,QAAA,EACX,YAAY,EAAA,aAAA,EAEP,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,eAAe;AACxB,4BAAA,WAAW,EAAE,UAAU,CAAC,qBAAqB,CAAC;AAC/C,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,SAAS,EAAE,UAAU;AACtB,qBAAA,EAAA,QAAA,EAAA,kZAAA,EAAA;;;AEnBH;;AAEG;;;;"}
1
+ {"version":3,"file":"latitude-ui-widgets-switch.mjs","sources":["../../../../packages/widgets/switch/lib/switch.ts","../../../../packages/widgets/switch/lib/switch.html","../../../../packages/widgets/switch/public-api.ts","../../../../packages/widgets/switch/latitude-ui-widgets-switch.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, forwardRef, ViewEncapsulation } from '@angular/core';\r\n\r\nimport { FormControlComponent } from '@latitude-ui/widgets/core';\r\n\r\n\r\n@Component({\r\n exportAs: 'latSwitch',\r\n selector: 'lat-switch',\r\n templateUrl: './switch.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [\r\n {\r\n provide: FormControlComponent,\r\n useExisting: forwardRef(() => SwitchComponent),\r\n },\r\n ],\r\n host: {\r\n '(click)': 'toggle()',\r\n },\r\n})\r\nexport class SwitchComponent extends FormControlComponent<boolean> {\r\n toggle() {\r\n if (!this.disabled()) {\r\n const value = this.value() ?? false;\r\n\r\n this.updateValue(!value);\r\n }\r\n }\r\n}\r\n","<button\r\n type=\"button\"\r\n role=\"switch\"\r\n [attr.id]=\"computedId()\"\r\n [attr.value]=\"value() ? 'on' : 'off'\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || undefined\"\r\n [attr.aria-checked]=\"value() || false\"\r\n>\r\n <div\r\n role=\"presentation\"\r\n class=\"lat-switch-thumb\"\r\n ></div>\r\n</button>\r\n<ng-content/>\r\n","import { SwitchComponent } from './lib/switch';\r\n\r\nexport * from './lib/switch';\r\n\r\nexport const SwitchImports = [\r\n SwitchComponent\r\n] as const;\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAqBM,MAAO,eAAgB,SAAQ,oBAA6B,CAAA;IAChE,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE;YACpB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,KAAK;AAEnC,YAAA,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC;QAC1B;IACF;uGAPW,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,EAAA,SAAA,EAVf;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,oBAAoB;AAC7B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,eAAe,CAAC;AAC/C,aAAA;AACF,SAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChBH,kZAeA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDMa,eAAe,EAAA,UAAA,EAAA,CAAA;kBAhB3B,SAAS;+BACE,WAAW,EAAA,QAAA,EACX,YAAY,EAAA,aAAA,EAEP,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,oBAAoB;AAC7B,4BAAA,WAAW,EAAE,UAAU,CAAC,qBAAqB,CAAC;AAC/C,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,SAAS,EAAE,UAAU;AACtB,qBAAA,EAAA,QAAA,EAAA,kZAAA,EAAA;;;AEfI,MAAM,aAAa,GAAG;IAC3B;;;ACLF;;AAEG;;;;"}
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, input, booleanAttribute, numberAttribute, computed, contentChild, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken, inject, contentChildren, linkedSignal } from '@angular/core';
2
+ import { Directive, input, booleanAttribute, numberAttribute, computed, contentChild, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChildren, linkedSignal } from '@angular/core';
3
3
  import { uid } from '@latitude-ui/widgets/core';
4
4
  import { NgTemplateOutlet } from '@angular/common';
5
5
  import { ButtonComponent } from '@latitude-ui/widgets/button';
6
6
  import { ToolBarComponent } from '@latitude-ui/widgets/toolbar';
7
7
 
8
- class TabLabelDirective {
9
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: TabLabelDirective, isStandalone: true, selector: "[latTabLabel]", exportAs: ["latTabLabel"], ngImport: i0 });
8
+ class TabLabelComponent {
9
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: TabLabelComponent, isStandalone: true, selector: "[latTabLabel]", exportAs: ["latTabLabel"], ngImport: i0 });
11
11
  }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabLabelDirective, decorators: [{
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabLabelComponent, decorators: [{
13
13
  type: Directive,
14
14
  args: [{
15
15
  exportAs: 'latTabLabel',
@@ -17,11 +17,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
17
17
  }]
18
18
  }] });
19
19
 
20
- class TabContentDirective {
21
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
22
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: TabContentDirective, isStandalone: true, selector: "[latTabContent]", exportAs: ["latTabContent"], ngImport: i0 });
20
+ class TabContentComponent {
21
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
22
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: TabContentComponent, isStandalone: true, selector: "[latTabContent]", exportAs: ["latTabContent"], ngImport: i0 });
23
23
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabContentDirective, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabContentComponent, decorators: [{
25
25
  type: Directive,
26
26
  args: [{
27
27
  exportAs: 'latTabContent',
@@ -35,29 +35,19 @@ class TabComponent {
35
35
  tabindex = input(undefined, { ...(ngDevMode ? { debugName: "tabindex" } : {}), transform: numberAttribute });
36
36
  tabId = computed(() => `lat-tab-${this.id()}`, ...(ngDevMode ? [{ debugName: "tabId" }] : []));
37
37
  tabpanelId = computed(() => `lat-tabpanel-${this.id()}`, ...(ngDevMode ? [{ debugName: "tabpanelId" }] : []));
38
- label = contentChild(TabLabelDirective, { ...(ngDevMode ? { debugName: "label" } : {}), read: TemplateRef });
39
- content = contentChild.required(TabContentDirective, { read: TemplateRef });
38
+ label = contentChild(TabLabelComponent, { ...(ngDevMode ? { debugName: "label" } : {}), read: TemplateRef });
39
+ content = contentChild.required(TabContentComponent, { read: TemplateRef });
40
40
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
41
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.3", type: TabComponent, isStandalone: true, selector: "lat-tab", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "label", first: true, predicate: TabLabelDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "content", first: true, predicate: TabContentDirective, descendants: true, read: TemplateRef, isSignal: true }], exportAs: ["latTab"], ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
41
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.3", type: TabComponent, isStandalone: true, selector: "lat-tab", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "label", first: true, predicate: TabLabelComponent, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "content", first: true, predicate: TabContentComponent, descendants: true, read: TemplateRef, isSignal: true }], exportAs: ["latTab"], ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
42
42
  }
43
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabComponent, decorators: [{
44
44
  type: Component,
45
45
  args: [{ exportAs: 'latTab', selector: 'lat-tab', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "" }]
46
- }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], label: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TabLabelDirective), { ...{ read: TemplateRef }, isSignal: true }] }], content: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TabContentDirective), { ...{ read: TemplateRef }, isSignal: true }] }] } });
47
-
48
- const TABS_OPTIONS = new InjectionToken(ngDevMode ? 'TABS_OPTIONS' : '', {
49
- factory: () => {
50
- return {
51
- size: 'md',
52
- variant: 'default',
53
- };
54
- }
55
- });
46
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], label: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TabLabelComponent), { ...{ read: TemplateRef }, isSignal: true }] }], content: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TabContentComponent), { ...{ read: TemplateRef }, isSignal: true }] }] } });
56
47
 
57
48
  class TabsComponent {
58
- options = inject(TABS_OPTIONS);
59
- size = input(this.options.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
60
- variant = input(this.options.variant, ...(ngDevMode ? [{ debugName: "variant" }] : []));
49
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
50
+ variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
61
51
  tabs = contentChildren(TabComponent, ...(ngDevMode ? [{ debugName: "tabs" }] : []));
62
52
  selected = linkedSignal(() => this.tabs().at(0), ...(ngDevMode ? [{ debugName: "selected" }] : []));
63
53
  onTabChanged(tab) {
@@ -75,9 +65,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
75
65
  ], exportAs: 'latTabs', selector: 'lat-tabs', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<lat-toolbar role=\"tablist\" variant=\"inherit\">\r\n @for (tab of tabs(); track $index) {\r\n <lat-button\r\n role=\"tab\"\r\n variant=\"inherit\"\r\n [id]=\"tab.tabId()\"\r\n [tabindex]=\"tab.tabindex()\"\r\n [disabled]=\"tab.disabled()\"\r\n (click)=\"onTabChanged(tab)\"\r\n >\r\n <ng-template [ngTemplateOutlet]=\"tab.label()\" />\r\n </lat-button>\r\n }\r\n</lat-toolbar>\r\n\r\n@if (selected(); as tab) {\r\n <div\r\n role=\"tabpanel\"\r\n [attr.id]=\"tab.tabpanelId()\"\r\n [attr.aria-labelledby]=\"tab.tabId()\"\r\n >\r\n <ng-template [ngTemplateOutlet]=\"tab.content()\" />\r\n </div>\r\n} @else {\r\n <div role=\"presentation\">\r\n <!-- TODO: empty state placeholder -->\r\n </div>\r\n}\r\n\r\n" }]
76
66
  }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabComponent), { isSignal: true }] }] } });
77
67
 
68
+ const TabsImports = [
69
+ TabComponent,
70
+ TabContentComponent,
71
+ TabLabelComponent,
72
+ TabsComponent
73
+ ];
74
+
78
75
  /**
79
76
  * Generated bundle index. Do not edit.
80
77
  */
81
78
 
82
- export { TABS_OPTIONS, TabComponent, TabContentDirective, TabLabelDirective, TabsComponent };
79
+ export { TabComponent, TabContentComponent, TabLabelComponent, TabsComponent, TabsImports };
83
80
  //# sourceMappingURL=latitude-ui-widgets-tabs.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"latitude-ui-widgets-tabs.mjs","sources":["../../../../packages/widgets/tabs/lib/tab-label.directive.ts","../../../../packages/widgets/tabs/lib/tab-content.directive.ts","../../../../packages/widgets/tabs/lib/tab.component.ts","../../../../packages/widgets/tabs/lib/tab.component.html","../../../../packages/widgets/tabs/lib/tabs.options.ts","../../../../packages/widgets/tabs/lib/tabs.component.ts","../../../../packages/widgets/tabs/lib/tabs.component.html","../../../../packages/widgets/tabs/latitude-ui-widgets-tabs.ts"],"sourcesContent":["import { Directive } from '@angular/core';\r\n\r\n\r\n@Directive({\r\n exportAs: 'latTabLabel',\r\n selector: '[latTabLabel]'\r\n})\r\nexport class TabLabelDirective {\r\n}\r\n","import { Directive } from '@angular/core';\r\n\r\n\r\n@Directive({\r\n exportAs: 'latTabContent',\r\n selector: '[latTabContent]'\r\n})\r\nexport class TabContentDirective {\r\n}\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component, computed,\r\n contentChild,\r\n input, numberAttribute,\r\n TemplateRef,\r\n ViewEncapsulation\r\n} from '@angular/core';\r\n\r\nimport { uid } from '@latitude-ui/widgets/core';\r\n\r\nimport { TabLabelDirective } from './tab-label.directive';\r\nimport { TabContentDirective } from './tab-content.directive';\r\n\r\n\r\n@Component({\r\n exportAs: 'latTab',\r\n selector: 'lat-tab',\r\n templateUrl: './tab.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class TabComponent {\r\n readonly id = input<string>(uid());\r\n readonly disabled = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n readonly tabindex = input<number, unknown>(undefined, { transform: numberAttribute });\r\n\r\n readonly tabId = computed(() => `lat-tab-${this.id()}`);\r\n readonly tabpanelId = computed(() => `lat-tabpanel-${this.id()}`);\r\n\r\n readonly label = contentChild(TabLabelDirective, { read: TemplateRef });\r\n readonly content = contentChild.required(TabContentDirective, { read: TemplateRef })\r\n}\r\n","","import { InjectionToken } from '@angular/core';\r\n\r\nimport { BoxSize } from '@latitude-ui/widgets/core';\r\n\r\n\r\nexport type TabsOptions = {\r\n size: BoxSize;\r\n variant: 'default' | 'inherit' | ({} & string);\r\n}\r\n\r\nexport const TABS_OPTIONS = new InjectionToken<TabsOptions>(\r\n ngDevMode ? 'TABS_OPTIONS' : '',\r\n {\r\n factory: () => {\r\n return {\r\n size: 'md',\r\n variant: 'default',\r\n }\r\n }\r\n }\r\n);\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n contentChildren,\r\n inject, input,\r\n linkedSignal,\r\n ViewEncapsulation\r\n} from '@angular/core';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\n\r\nimport { ButtonComponent } from '@latitude-ui/widgets/button';\r\nimport { ToolBarComponent } from '@latitude-ui/widgets/toolbar';\r\n\r\nimport { TabComponent } from './tab.component';\r\nimport { TABS_OPTIONS, TabsOptions } from './tabs.options';\r\n\r\n\r\n@Component({\r\n imports: [\r\n NgTemplateOutlet,\r\n ToolBarComponent,\r\n ButtonComponent\r\n ],\r\n exportAs: 'latTabs',\r\n selector: 'lat-tabs',\r\n templateUrl: './tabs.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class TabsComponent {\r\n readonly options = inject(TABS_OPTIONS);\r\n\r\n readonly size = input<TabsOptions['size']>(this.options.size);\r\n readonly variant = input<TabsOptions['variant']>(this.options.variant);\r\n\r\n readonly tabs = contentChildren(TabComponent);\r\n\r\n readonly selected = linkedSignal<TabComponent | undefined>(() => this.tabs().at(0));\r\n\r\n onTabChanged(tab: TabComponent | undefined) {\r\n this.selected.set(tab);\r\n }\r\n}\r\n","<lat-toolbar role=\"tablist\" variant=\"inherit\">\r\n @for (tab of tabs(); track $index) {\r\n <lat-button\r\n role=\"tab\"\r\n variant=\"inherit\"\r\n [id]=\"tab.tabId()\"\r\n [tabindex]=\"tab.tabindex()\"\r\n [disabled]=\"tab.disabled()\"\r\n (click)=\"onTabChanged(tab)\"\r\n >\r\n <ng-template [ngTemplateOutlet]=\"tab.label()\" />\r\n </lat-button>\r\n }\r\n</lat-toolbar>\r\n\r\n@if (selected(); as tab) {\r\n <div\r\n role=\"tabpanel\"\r\n [attr.id]=\"tab.tabpanelId()\"\r\n [attr.aria-labelledby]=\"tab.tabId()\"\r\n >\r\n <ng-template [ngTemplateOutlet]=\"tab.content()\" />\r\n </div>\r\n} @else {\r\n <div role=\"presentation\">\r\n <!-- TODO: empty state placeholder -->\r\n </div>\r\n}\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAOa,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT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A,4CDVI,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,gBAAgB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,eAAe,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,SAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAQN,aAAa,EAAA,UAAA,EAAA,CAAA;kBAZzB,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACP,gBAAgB;wBAChB,gBAAgB;wBAChB;qBACD,EAAA,QAAA,EACS,SAAS,EAAA,QAAA,EACT,UAAU,EAAA,aAAA,EAEL,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,wwBAAA,EAAA;kRAQf,YAAY,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnC9C;;AAEG;;;;"}
1
+ {"version":3,"file":"latitude-ui-widgets-tabs.mjs","sources":["../../../../packages/widgets/tabs/lib/tab-label.ts","../../../../packages/widgets/tabs/lib/tab-content.ts","../../../../packages/widgets/tabs/lib/tab.ts","../../../../packages/widgets/tabs/lib/tab.html","../../../../packages/widgets/tabs/lib/tabs.ts","../../../../packages/widgets/tabs/lib/tabs.html","../../../../packages/widgets/tabs/public-api.ts","../../../../packages/widgets/tabs/latitude-ui-widgets-tabs.ts"],"sourcesContent":["import { Directive } from '@angular/core';\r\n\r\n\r\n@Directive({\r\n exportAs: 'latTabLabel',\r\n selector: '[latTabLabel]'\r\n})\r\nexport class TabLabelComponent {\r\n}\r\n","import { Directive } from '@angular/core';\r\n\r\n\r\n@Directive({\r\n exportAs: 'latTabContent',\r\n selector: '[latTabContent]'\r\n})\r\nexport class TabContentComponent {\r\n}\r\n","import {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component, computed,\r\n contentChild,\r\n input, numberAttribute,\r\n TemplateRef,\r\n ViewEncapsulation\r\n} from '@angular/core';\r\n\r\nimport { uid } from '@latitude-ui/widgets/core';\r\n\r\nimport { TabLabelComponent } from './tab-label';\r\nimport { TabContentComponent } from './tab-content';\r\n\r\n\r\n@Component({\r\n exportAs: 'latTab',\r\n selector: 'lat-tab',\r\n templateUrl: './tab.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class TabComponent {\r\n readonly id = input<string>(uid());\r\n readonly disabled = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n readonly tabindex = input<number, unknown>(undefined, { transform: numberAttribute });\r\n\r\n readonly tabId = computed(() => `lat-tab-${this.id()}`);\r\n readonly tabpanelId = computed(() => `lat-tabpanel-${this.id()}`);\r\n\r\n readonly label = contentChild(TabLabelComponent, { read: TemplateRef });\r\n readonly content = contentChild.required(TabContentComponent, { read: TemplateRef })\r\n}\r\n","","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n contentChildren,\r\n input,\r\n linkedSignal,\r\n ViewEncapsulation\r\n} from '@angular/core';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\n\r\nimport { BoxSize } from '@latitude-ui/widgets/core';\r\n\r\nimport { ButtonComponent } from '@latitude-ui/widgets/button';\r\nimport { ToolBarComponent } from '@latitude-ui/widgets/toolbar';\r\n\r\nimport { TabComponent } from './tab';\r\n\r\nexport type TabsSize = BoxSize;\r\nexport type TabsVariant = 'default' | 'inherit' | ({} & string);\r\n\r\n@Component({\r\n imports: [\r\n NgTemplateOutlet,\r\n ToolBarComponent,\r\n ButtonComponent\r\n ],\r\n exportAs: 'latTabs',\r\n selector: 'lat-tabs',\r\n templateUrl: './tabs.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class TabsComponent {\r\n readonly size = input<TabsSize>('md');\r\n readonly variant = input<TabsVariant>('default');\r\n\r\n readonly tabs = contentChildren(TabComponent);\r\n\r\n readonly selected = linkedSignal<TabComponent | undefined>(() => this.tabs().at(0));\r\n\r\n onTabChanged(tab: TabComponent | undefined) {\r\n this.selected.set(tab);\r\n }\r\n}\r\n","<lat-toolbar role=\"tablist\" variant=\"inherit\">\r\n @for (tab of tabs(); track $index) {\r\n <lat-button\r\n role=\"tab\"\r\n variant=\"inherit\"\r\n [id]=\"tab.tabId()\"\r\n [tabindex]=\"tab.tabindex()\"\r\n [disabled]=\"tab.disabled()\"\r\n (click)=\"onTabChanged(tab)\"\r\n >\r\n <ng-template [ngTemplateOutlet]=\"tab.label()\" />\r\n </lat-button>\r\n }\r\n</lat-toolbar>\r\n\r\n@if (selected(); as tab) {\r\n <div\r\n role=\"tabpanel\"\r\n [attr.id]=\"tab.tabpanelId()\"\r\n [attr.aria-labelledby]=\"tab.tabId()\"\r\n >\r\n <ng-template [ngTemplateOutlet]=\"tab.content()\" />\r\n </div>\r\n} @else {\r\n <div role=\"presentation\">\r\n <!-- TODO: empty state placeholder -->\r\n </div>\r\n}\r\n\r\n","import { TabComponent } from './lib/tab';\r\nimport { TabContentComponent } from './lib/tab-content';\r\nimport { TabLabelComponent } from './lib/tab-label';\r\nimport { TabsComponent } from './lib/tabs';\r\n\r\nexport * from './lib/tab';\r\nexport * from './lib/tab-content';\r\nexport * from './lib/tab-label';\r\nexport * from './lib/tabs';\r\n\r\nexport const TabsImports = [\r\n TabComponent,\r\n TabContentComponent,\r\n TabLabelComponent,\r\n TabsComponent\r\n] as const;\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAOa,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE;AACX,iBAAA;;;MCCY,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE;AACX,iBAAA;;;MCiBY,YAAY,CAAA;AACd,IAAA,EAAE,GAAG,KAAK,CAAS,GAAG,EAAE,8CAAC;IACzB,QAAQ,GAAG,KAAK,CAAmB,KAAK,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAC1E,QAAQ,GAAG,KAAK,CAAkB,SAAS,qDAAI,SAAS,EAAE,e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'@angular/core';
2
- import { viewChild, ElementRef, afterRenderEffect, Directive, input, numberAttribute, computed, forwardRef, ChangeDetectionStrategy, ViewEncapsulation, Component, effect } from '@angular/core';
3
- import { HTMLFormControl } from '@latitude-ui/widgets/core';
2
+ import { viewChild, ElementRef, input, numberAttribute, computed, forwardRef, ChangeDetectionStrategy, ViewEncapsulation, Component, effect, afterRenderEffect } from '@angular/core';
3
+ import { FormControlComponent } from '@latitude-ui/widgets/core';
4
4
  import { maskitoDateOptionsGenerator, maskitoStringifyDate, maskitoParseDate, maskitoNumberOptionsGenerator, maskitoStringifyNumber, maskitoParseNumber } from '@maskito/kit';
5
5
  import { Maskito, maskitoInitialCalibrationPlugin } from '@maskito/core';
6
6
  import { ButtonComponent } from '@latitude-ui/widgets/button';
7
7
  import { IconComponent } from '@latitude-ui/widgets/icons';
8
8
 
9
- class TextBoxDirective extends HTMLFormControl {
9
+ class TextBoxComponent extends FormControlComponent {
10
10
  el = viewChild.required('htmlInputElement', { read: (ElementRef) });
11
- blur() {
12
- this.el().nativeElement.blur();
13
- }
14
- focus() {
15
- this.el().nativeElement.focus();
16
- }
17
- constructor() {
18
- super();
19
- afterRenderEffect(() => {
20
- const { nativeElement } = this.el();
21
- if (this.autofocus()) {
22
- nativeElement.focus();
23
- }
24
- });
25
- }
26
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TextBoxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.3", type: TextBoxDirective, isStandalone: true, viewQueries: [{ propertyName: "el", first: true, predicate: ["htmlInputElement"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0 });
28
- }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TextBoxDirective, decorators: [{
30
- type: Directive
31
- }], ctorParameters: () => [], propDecorators: { el: [{ type: i0.ViewChild, args: ['htmlInputElement', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
32
-
33
- class TextBoxComponent extends TextBoxDirective {
34
11
  rows = input(undefined, { ...(ngDevMode ? { debugName: "rows" } : {}), transform: numberAttribute });
35
12
  maxlength = input(undefined, { ...(ngDevMode ? { debugName: "maxlength" } : {}), transform: numberAttribute });
36
13
  minlength = input(undefined, { ...(ngDevMode ? { debugName: "minlength" } : {}), transform: numberAttribute });
@@ -45,27 +22,28 @@ class TextBoxComponent extends TextBoxDirective {
45
22
  /** @internal */
46
23
  onValueChanged() {
47
24
  const { nativeElement } = this.el();
48
- this.writeValue(nativeElement.value);
25
+ this.updateValue(nativeElement.value);
49
26
  }
50
27
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TextBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
51
28
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: TextBoxComponent, isStandalone: true, selector: "lat-textbox:not([type]), lat-textbox[type=\"text\"]", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "minlength", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
52
29
  {
53
- provide: HTMLFormControl,
54
- useExisting: forwardRef(() => TextBoxComponent),
55
- },
56
- ], exportAs: ["latTextBox"], usesInheritance: true, ngImport: i0, template: "@if(textarea()) {\r\n <textarea\r\n #htmlInputElement\r\n role=\"textbox\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.rows]=\"rows()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.autofocus]=\"autofocus() ? '' : void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.minlength]=\"minlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n [style.resize]=\"'none'\"\r\n [style.height]=\"'auto'\"\r\n (blur)=\"onBlurEvent()\"\r\n (input)=\"onValueChanged()\"\r\n ></textarea>\r\n} @else {\r\n <input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"textbox\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.autofocus]=\"autofocus() ? '' : void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.minlength]=\"minlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (input)=\"onValueChanged()\"\r\n />\r\n}\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
30
+ provide: FormControlComponent,
31
+ useExisting: forwardRef(() => TextBoxComponent)
32
+ }
33
+ ], viewQueries: [{ propertyName: "el", first: true, predicate: ["htmlInputElement"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["latTextBox"], usesInheritance: true, ngImport: i0, template: "@if(textarea()) {\r\n <textarea\r\n #htmlInputElement\r\n role=\"textbox\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.rows]=\"rows()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.minlength]=\"minlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n [style.resize]=\"'none'\"\r\n [style.height]=\"'auto'\"\r\n (blur)=\"onBlurEvent()\"\r\n (input)=\"onValueChanged()\"\r\n ></textarea>\r\n} @else {\r\n <input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"textbox\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.minlength]=\"minlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (input)=\"onValueChanged()\"\r\n />\r\n}\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
57
34
  }
58
35
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TextBoxComponent, decorators: [{
59
36
  type: Component,
60
37
  args: [{ exportAs: 'latTextBox', selector: 'lat-textbox:not([type]), lat-textbox[type="text"]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
61
38
  {
62
- provide: HTMLFormControl,
63
- useExisting: forwardRef(() => TextBoxComponent),
64
- },
65
- ], template: "@if(textarea()) {\r\n <textarea\r\n #htmlInputElement\r\n role=\"textbox\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.rows]=\"rows()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.autofocus]=\"autofocus() ? '' : void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.minlength]=\"minlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n [style.resize]=\"'none'\"\r\n [style.height]=\"'auto'\"\r\n (blur)=\"onBlurEvent()\"\r\n (input)=\"onValueChanged()\"\r\n ></textarea>\r\n} @else {\r\n <input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"textbox\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.autofocus]=\"autofocus() ? '' : void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.minlength]=\"minlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (input)=\"onValueChanged()\"\r\n />\r\n}\r\n" }]
66
- }], propDecorators: { rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], minlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minlength", required: false }] }] } });
39
+ provide: FormControlComponent,
40
+ useExisting: forwardRef(() => TextBoxComponent)
41
+ }
42
+ ], template: "@if(textarea()) {\r\n <textarea\r\n #htmlInputElement\r\n role=\"textbox\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.rows]=\"rows()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.minlength]=\"minlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n [style.resize]=\"'none'\"\r\n [style.height]=\"'auto'\"\r\n (blur)=\"onBlurEvent()\"\r\n (input)=\"onValueChanged()\"\r\n ></textarea>\r\n} @else {\r\n <input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"textbox\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.minlength]=\"minlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (input)=\"onValueChanged()\"\r\n />\r\n}\r\n" }]
43
+ }], propDecorators: { el: [{ type: i0.ViewChild, args: ['htmlInputElement', { ...{ read: (ElementRef) }, isSignal: true }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], minlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minlength", required: false }] }] } });
67
44
 
68
- class TextBoxDateComponent extends TextBoxDirective {
45
+ class TextBoxDateComponent extends FormControlComponent {
46
+ el = viewChild.required('htmlInputElement', { read: (ElementRef) });
69
47
  max = input(...(ngDevMode ? [undefined, { debugName: "max" }] : []));
70
48
  min = input(...(ngDevMode ? [undefined, { debugName: "min" }] : []));
71
49
  pattern = input('dd/mm/yyyy', ...(ngDevMode ? [{ debugName: "pattern" }] : []));
@@ -86,9 +64,9 @@ class TextBoxDateComponent extends TextBoxDirective {
86
64
  'mm/dd/yyyy': `${mm}${separator}${dd}${separator}${yyyy}`,
87
65
  'mm/yy': `${mm}${separator}${yy}`,
88
66
  'mm/yyyy': `${mm}${separator}${yyyy}`,
89
- "yyyy": `${yyyy}`,
67
+ 'yyyy': `${yyyy}`,
90
68
  'yyyy/mm': `${yyyy}${separator}${mm}`,
91
- 'yyyy/mm/dd': `${yyyy}${separator}${mm}${separator}${dd}`,
69
+ 'yyyy/mm/dd': `${yyyy}${separator}${mm}${separator}${dd}`
92
70
  };
93
71
  return new RegExp(`^${keyvalue[pattern]}$`);
94
72
  }, ...(ngDevMode ? [{ debugName: "patternRegExp" }] : []));
@@ -104,7 +82,7 @@ class TextBoxDateComponent extends TextBoxDirective {
104
82
  max: this.maxvalue(),
105
83
  min: this.minvalue(),
106
84
  mode: this.pattern(),
107
- separator: this.separator(),
85
+ separator: this.separator()
108
86
  };
109
87
  }, ...(ngDevMode ? [{ debugName: "maskitoDateParams" }] : []));
110
88
  constructor() {
@@ -116,6 +94,12 @@ class TextBoxDateComponent extends TextBoxDirective {
116
94
  const instance = new Maskito(el.nativeElement, options);
117
95
  onCleanup(() => instance.destroy());
118
96
  });
97
+ afterRenderEffect(() => {
98
+ const { nativeElement } = this.el();
99
+ if (this.autofocus()) {
100
+ nativeElement.focus();
101
+ }
102
+ });
119
103
  }
120
104
  /** @internal */
121
105
  valueStringify(value) {
@@ -154,9 +138,9 @@ class TextBoxDateComponent extends TextBoxDirective {
154
138
  }
155
139
  const value = maskitoParseDate(valueAsString, this.maskitoDateParams());
156
140
  if (value === null) {
157
- return this.writeValue(value);
141
+ return this.updateValue(value);
158
142
  }
159
- this.writeValue(value);
143
+ this.updateValue(value);
160
144
  }
161
145
  /** @internal */
162
146
  onFocusEvent() {
@@ -191,27 +175,27 @@ class TextBoxDateComponent extends TextBoxDirective {
191
175
  onPickerChange() {
192
176
  const { nativeElement } = this.picker();
193
177
  const value = new Date(nativeElement.value);
194
- this.writeValue(value);
178
+ this.updateValue(value);
195
179
  }
196
180
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TextBoxDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
197
181
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: TextBoxDateComponent, isStandalone: true, selector: "lat-textbox[type=\"date\"]", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
198
182
  {
199
- provide: HTMLFormControl,
200
- useExisting: forwardRef(() => TextBoxDateComponent),
201
- },
202
- ], viewQueries: [{ propertyName: "picker", first: true, predicate: ["htmlInputPicker"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["latTextBox"], usesInheritance: true, ngImport: i0, template: "<input #htmlInputPicker type=\"date\" aria-hidden=\"true\" (change)=\"onPickerChange()\"/>\r\n\r\n<input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"textbox\"\r\n autocomplete=\"off\"\r\n autocapitalize=\"off\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.autofocus]=\"autofocus() ? '' : void 0\"\r\n [attr.placeholder]=\"placeholder() || patternPlaceholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (focus)=\"onFocusEvent()\"\r\n (input)=\"onValueChanged()\"\r\n/>\r\n\r\n@if (!readonly()) {\r\n <div>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onPickerShow($event)\"\r\n >\r\n <lat-icon name=\"calendar-week\" />\r\n </lat-button>\r\n </div>\r\n}\r\n\r\n\r\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "lat-button", inputs: ["role", "size", "variant", "disabled", "tabindex"], exportAs: ["latButton"] }, { kind: "component", type: IconComponent, selector: "lat-icon", inputs: ["url", "name"], exportAs: ["latIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
183
+ provide: FormControlComponent,
184
+ useExisting: forwardRef(() => TextBoxDateComponent)
185
+ }
186
+ ], viewQueries: [{ propertyName: "el", first: true, predicate: ["htmlInputElement"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "picker", first: true, predicate: ["htmlInputPicker"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["latTextBox"], usesInheritance: true, ngImport: i0, template: "<input #htmlInputPicker type=\"date\" aria-hidden=\"true\" (change)=\"onPickerChange()\"/>\r\n\r\n<input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"textbox\"\r\n autocomplete=\"off\"\r\n autocapitalize=\"off\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.placeholder]=\"placeholder() || patternPlaceholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (focus)=\"onFocusEvent()\"\r\n (input)=\"onValueChanged()\"\r\n/>\r\n\r\n@if (!readonly()) {\r\n <div>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onPickerShow($event)\"\r\n >\r\n <lat-icon name=\"calendar-week\" />\r\n </lat-button>\r\n </div>\r\n}\r\n\r\n\r\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "lat-button", inputs: ["role", "size", "variant", "disabled", "tabindex"], exportAs: ["latButton"] }, { kind: "component", type: IconComponent, selector: "lat-icon", inputs: ["role", "url", "name"], exportAs: ["latIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
203
187
  }
204
188
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TextBoxDateComponent, decorators: [{
205
189
  type: Component,
206
190
  args: [{ imports: [ButtonComponent, IconComponent], exportAs: 'latTextBox', selector: 'lat-textbox[type="date"]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
207
191
  {
208
- provide: HTMLFormControl,
209
- useExisting: forwardRef(() => TextBoxDateComponent),
210
- },
211
- ], template: "<input #htmlInputPicker type=\"date\" aria-hidden=\"true\" (change)=\"onPickerChange()\"/>\r\n\r\n<input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"textbox\"\r\n autocomplete=\"off\"\r\n autocapitalize=\"off\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.autofocus]=\"autofocus() ? '' : void 0\"\r\n [attr.placeholder]=\"placeholder() || patternPlaceholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (focus)=\"onFocusEvent()\"\r\n (input)=\"onValueChanged()\"\r\n/>\r\n\r\n@if (!readonly()) {\r\n <div>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onPickerShow($event)\"\r\n >\r\n <lat-icon name=\"calendar-week\" />\r\n </lat-button>\r\n </div>\r\n}\r\n\r\n\r\n" }]
212
- }], ctorParameters: () => [], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], pattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "pattern", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], picker: [{ type: i0.ViewChild, args: ['htmlInputPicker', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
192
+ provide: FormControlComponent,
193
+ useExisting: forwardRef(() => TextBoxDateComponent)
194
+ }
195
+ ], template: "<input #htmlInputPicker type=\"date\" aria-hidden=\"true\" (change)=\"onPickerChange()\"/>\r\n\r\n<input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"textbox\"\r\n autocomplete=\"off\"\r\n autocapitalize=\"off\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.placeholder]=\"placeholder() || patternPlaceholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (focus)=\"onFocusEvent()\"\r\n (input)=\"onValueChanged()\"\r\n/>\r\n\r\n@if (!readonly()) {\r\n <div>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onPickerShow($event)\"\r\n >\r\n <lat-icon name=\"calendar-week\" />\r\n </lat-button>\r\n </div>\r\n}\r\n\r\n\r\n" }]
196
+ }], ctorParameters: () => [], propDecorators: { el: [{ type: i0.ViewChild, args: ['htmlInputElement', { ...{ read: (ElementRef) }, isSignal: true }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], pattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "pattern", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], picker: [{ type: i0.ViewChild, args: ['htmlInputPicker', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
213
197
 
214
- class TextBoxNumberComponent extends TextBoxDirective {
198
+ class TextBoxNumberComponent extends FormControlComponent {
215
199
  max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : {}), transform: numberAttribute });
216
200
  min = input(undefined, { ...(ngDevMode ? { debugName: "min" } : {}), transform: numberAttribute });
217
201
  step = input(undefined, { ...(ngDevMode ? { debugName: "step" } : {}), transform: numberAttribute });
@@ -219,6 +203,7 @@ class TextBoxNumberComponent extends TextBoxDirective {
219
203
  decimalSeparator = input(',', ...(ngDevMode ? [{ debugName: "decimalSeparator" }] : []));
220
204
  decimalZeroPadding = input(false, ...(ngDevMode ? [{ debugName: "decimalZeroPadding" }] : []));
221
205
  thousandSeparator = input('', ...(ngDevMode ? [{ debugName: "thousandSeparator" }] : []));
206
+ el = viewChild.required('htmlInputElement', { read: (ElementRef) });
222
207
  maxvalue = computed(() => this.parseNumber(this.max(), Number.MAX_SAFE_INTEGER), ...(ngDevMode ? [{ debugName: "maxvalue" }] : []));
223
208
  minvalue = computed(() => this.parseNumber(this.min(), Number.MIN_SAFE_INTEGER), ...(ngDevMode ? [{ debugName: "minvalue" }] : []));
224
209
  nowvalue = computed(() => this.value() || 0, ...(ngDevMode ? [{ debugName: "nowvalue" }] : []));
@@ -238,7 +223,7 @@ class TextBoxNumberComponent extends TextBoxDirective {
238
223
  maximumFractionDigits: this.decimals(),
239
224
  minimumFractionDigits: this.decimalZeroPadding() ? this.decimals() : 0,
240
225
  decimalSeparator: this.decimalSeparator(),
241
- thousandSeparator: this.thousandSeparator(),
226
+ thousandSeparator: this.thousandSeparator()
242
227
  };
243
228
  }, ...(ngDevMode ? [{ debugName: "maskitoNumberParams" }] : []));
244
229
  constructor() {
@@ -254,12 +239,18 @@ class TextBoxNumberComponent extends TextBoxDirective {
254
239
  maskitoInitialCalibrationPlugin(maskitoNumberOptionsGenerator({
255
240
  ...params,
256
241
  min: Number.MIN_SAFE_INTEGER,
257
- max: Number.MAX_SAFE_INTEGER,
258
- })),
259
- ],
242
+ max: Number.MAX_SAFE_INTEGER
243
+ }))
244
+ ]
260
245
  });
261
246
  onCleanup(() => instance.destroy());
262
247
  });
248
+ afterRenderEffect(() => {
249
+ const { nativeElement } = this.el();
250
+ if (this.autofocus()) {
251
+ nativeElement.focus();
252
+ }
253
+ });
263
254
  }
264
255
  /** @internal */
265
256
  valueStringify(valueAsString) {
@@ -304,12 +295,12 @@ class TextBoxNumberComponent extends TextBoxDirective {
304
295
  }
305
296
  const value = this.parseNumber(valueAsString);
306
297
  if (value === null) {
307
- return this.writeValue(value);
298
+ return this.updateValue(value);
308
299
  }
309
300
  if (value < this.minvalue() || value > this.maxvalue()) {
310
301
  return void 0;
311
302
  }
312
- this.writeValue(value);
303
+ this.updateValue(value);
313
304
  }
314
305
  /** @internal */
315
306
  onValueSpined(mul) {
@@ -318,7 +309,7 @@ class TextBoxNumberComponent extends TextBoxDirective {
318
309
  return void 0;
319
310
  }
320
311
  const factor = Math.pow(10, this.decimals());
321
- this.writeValue(Math.round(value * factor) / factor);
312
+ this.updateValue(Math.round(value * factor) / factor);
322
313
  }
323
314
  /** @internal */
324
315
  onFocusEvent() {
@@ -338,24 +329,30 @@ class TextBoxNumberComponent extends TextBoxDirective {
338
329
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TextBoxNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
339
330
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: TextBoxNumberComponent, isStandalone: true, selector: "lat-textbox[type=\"number\"]", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, decimalSeparator: { classPropertyName: "decimalSeparator", publicName: "decimalSeparator", isSignal: true, isRequired: false, transformFunction: null }, decimalZeroPadding: { classPropertyName: "decimalZeroPadding", publicName: "decimalZeroPadding", isSignal: true, isRequired: false, transformFunction: null }, thousandSeparator: { classPropertyName: "thousandSeparator", publicName: "thousandSeparator", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
340
331
  {
341
- provide: HTMLFormControl,
342
- useExisting: forwardRef(() => TextBoxNumberComponent),
343
- },
344
- ], exportAs: ["latTextBox"], usesInheritance: true, ngImport: i0, template: "<input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"spinbutton\"\r\n autocomplete=\"off\"\r\n autocapitalize=\"off\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.autofocus]=\"autofocus() ? '' : void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-valuemax]=\"maxvalue()\"\r\n [attr.aria-valuemin]=\"minvalue()\"\r\n [attr.aria-valuenow]=\"nowvalue()\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (focus)=\"onFocusEvent()\"\r\n (input)=\"onValueChanged()\"\r\n/>\r\n\r\n@if (step() && !readonly()) {\r\n <div>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onValueSpined(1)\"\r\n >\r\n <lat-icon name=\"chevron-up\" />\r\n </lat-button>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onValueSpined(-1)\"\r\n >\r\n <lat-icon name=\"chevron-down\" />\r\n </lat-button>\r\n </div>\r\n}\r\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "lat-button", inputs: ["role", "size", "variant", "disabled", "tabindex"], exportAs: ["latButton"] }, { kind: "component", type: IconComponent, selector: "lat-icon", inputs: ["url", "name"], exportAs: ["latIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
332
+ provide: FormControlComponent,
333
+ useExisting: forwardRef(() => TextBoxNumberComponent)
334
+ }
335
+ ], viewQueries: [{ propertyName: "el", first: true, predicate: ["htmlInputElement"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["latTextBox"], usesInheritance: true, ngImport: i0, template: "<input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"spinbutton\"\r\n autocomplete=\"off\"\r\n autocapitalize=\"off\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-valuemax]=\"maxvalue()\"\r\n [attr.aria-valuemin]=\"minvalue()\"\r\n [attr.aria-valuenow]=\"nowvalue()\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (focus)=\"onFocusEvent()\"\r\n (input)=\"onValueChanged()\"\r\n/>\r\n\r\n@if (step() && !readonly()) {\r\n <div>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onValueSpined(1)\"\r\n >\r\n <lat-icon name=\"chevron-up\" />\r\n </lat-button>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onValueSpined(-1)\"\r\n >\r\n <lat-icon name=\"chevron-down\" />\r\n </lat-button>\r\n </div>\r\n}\r\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "lat-button", inputs: ["role", "size", "variant", "disabled", "tabindex"], exportAs: ["latButton"] }, { kind: "component", type: IconComponent, selector: "lat-icon", inputs: ["role", "url", "name"], exportAs: ["latIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
345
336
  }
346
337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TextBoxNumberComponent, decorators: [{
347
338
  type: Component,
348
339
  args: [{ imports: [ButtonComponent, IconComponent], exportAs: 'latTextBox', selector: 'lat-textbox[type="number"]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
349
340
  {
350
- provide: HTMLFormControl,
351
- useExisting: forwardRef(() => TextBoxNumberComponent),
352
- },
353
- ], template: "<input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"spinbutton\"\r\n autocomplete=\"off\"\r\n autocapitalize=\"off\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.autofocus]=\"autofocus() ? '' : void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-valuemax]=\"maxvalue()\"\r\n [attr.aria-valuemin]=\"minvalue()\"\r\n [attr.aria-valuenow]=\"nowvalue()\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (focus)=\"onFocusEvent()\"\r\n (input)=\"onValueChanged()\"\r\n/>\r\n\r\n@if (step() && !readonly()) {\r\n <div>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onValueSpined(1)\"\r\n >\r\n <lat-icon name=\"chevron-up\" />\r\n </lat-button>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onValueSpined(-1)\"\r\n >\r\n <lat-icon name=\"chevron-down\" />\r\n </lat-button>\r\n </div>\r\n}\r\n" }]
354
- }], ctorParameters: () => [], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], decimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimals", required: false }] }], decimalSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimalSeparator", required: false }] }], decimalZeroPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimalZeroPadding", required: false }] }], thousandSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "thousandSeparator", required: false }] }] } });
341
+ provide: FormControlComponent,
342
+ useExisting: forwardRef(() => TextBoxNumberComponent)
343
+ }
344
+ ], template: "<input\r\n #htmlInputElement\r\n type=\"text\"\r\n role=\"spinbutton\"\r\n autocomplete=\"off\"\r\n autocapitalize=\"off\"\r\n [value]='valueAsString()'\r\n [attr.id]=\"computedId()\"\r\n [attr.tabindex]=\"disabled() ? -1 : tabindex()\"\r\n [attr.disabled]=\"disabled() || void 0\"\r\n [attr.readonly]=\"readonly() || void 0\"\r\n [attr.required]=\"required() || void 0\"\r\n [attr.maxlength]=\"maxlength()\"\r\n [attr.placeholder]=\"placeholder()\"\r\n [attr.aria-invalid]=\"invalid() || void 0\"\r\n [attr.aria-valuemax]=\"maxvalue()\"\r\n [attr.aria-valuemin]=\"minvalue()\"\r\n [attr.aria-valuenow]=\"nowvalue()\"\r\n [attr.aria-disabled]=\"disabled() || void 0\"\r\n [attr.aria-readonly]=\"readonly() || void 0\"\r\n [attr.aria-required]=\"required() || void 0\"\r\n [attr.aria-labelledby]=\"labelledby ? labelledby() : void 0\"\r\n (blur)=\"onBlurEvent()\"\r\n (focus)=\"onFocusEvent()\"\r\n (input)=\"onValueChanged()\"\r\n/>\r\n\r\n@if (step() && !readonly()) {\r\n <div>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onValueSpined(1)\"\r\n >\r\n <lat-icon name=\"chevron-up\" />\r\n </lat-button>\r\n <lat-button\r\n size=\"inherit\"\r\n variant=\"inherit\"\r\n tabindex=\"-1\"\r\n [disabled]=\"disabled() || void 0\"\r\n (click)=\"onValueSpined(-1)\"\r\n >\r\n <lat-icon name=\"chevron-down\" />\r\n </lat-button>\r\n </div>\r\n}\r\n" }]
345
+ }], ctorParameters: () => [], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], decimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimals", required: false }] }], decimalSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimalSeparator", required: false }] }], decimalZeroPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimalZeroPadding", required: false }] }], thousandSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "thousandSeparator", required: false }] }], el: [{ type: i0.ViewChild, args: ['htmlInputElement', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
346
+
347
+ const TextBoxImports = [
348
+ TextBoxComponent,
349
+ TextBoxDateComponent,
350
+ TextBoxNumberComponent
351
+ ];
355
352
 
356
353
  /**
357
354
  * Generated bundle index. Do not edit.
358
355
  */
359
356
 
360
- export { TextBoxComponent, TextBoxDateComponent, TextBoxDirective, TextBoxNumberComponent };
357
+ export { TextBoxComponent, TextBoxDateComponent, TextBoxImports, TextBoxNumberComponent };
361
358
  //# sourceMappingURL=latitude-ui-widgets-textbox.mjs.map