@softpak/components 0.0.0-beta.99 → 0.0.1

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 (94) hide show
  1. package/esm2022/spx-app-expiry/public-api.mjs +6 -0
  2. package/esm2022/spx-app-expiry/softpak-components-spx-app-expiry.mjs +5 -0
  3. package/esm2022/spx-app-expiry/spx-app-expiry.component.mjs +90 -0
  4. package/esm2022/spx-app-expiry/spx-app-expiry.interface.mjs +2 -0
  5. package/esm2022/spx-app-expiry/spx-check-expiry-final-warning.interface.mjs +5 -0
  6. package/esm2022/spx-app-expiry/spx-check-expiry-happened.interface.mjs +5 -0
  7. package/esm2022/spx-app-expiry/spx-check-expiry-warning.interface.mjs +5 -0
  8. package/esm2022/spx-button/spx-button.component.mjs +18 -5
  9. package/esm2022/spx-change-details/spx-change-details.component.mjs +94 -13
  10. package/esm2022/spx-channel-selection/public-api.mjs +1 -3
  11. package/esm2022/spx-channel-selection/src/spx-welcome.component.mjs +112 -19
  12. package/esm2022/spx-check-digit/spx-check-digit.component.mjs +14 -7
  13. package/esm2022/spx-form-section/spx-form-section.component.mjs +11 -11
  14. package/esm2022/spx-form-view/spx-autocomplete-search.component.mjs +119 -0
  15. package/esm2022/spx-form-view/spx-form-field.interface.mjs +1 -1
  16. package/esm2022/spx-form-view/spx-form-view.component.mjs +119 -14
  17. package/esm2022/spx-inputs/spx-dropdown.component.mjs +7 -11
  18. package/esm2022/spx-inputs/spx-input-box.component.mjs +32 -19
  19. package/esm2022/spx-inputs/spx-input-date.component.mjs +1 -1
  20. package/esm2022/spx-inputs/spx-input-float.component.mjs +10 -5
  21. package/esm2022/spx-inputs/spx-input-number.component.mjs +10 -5
  22. package/esm2022/spx-inputs/spx-input-radio.component.mjs +93 -27
  23. package/esm2022/spx-inputs/spx-input-text.component.mjs +7 -4
  24. package/esm2022/spx-inputs/spx-input-type.enum.mjs +3 -1
  25. package/esm2022/spx-inputs/spx-input.component.mjs +34 -8
  26. package/esm2022/spx-navigation/spx-home-tile.component.mjs +3 -3
  27. package/esm2022/spx-navigation/spx-home-tiles.component.mjs +14 -5
  28. package/esm2022/spx-navigation/spx-navigation.component.mjs +6 -3
  29. package/esm2022/spx-number-check/spx-number-check.component.mjs +1 -4
  30. package/esm2022/spx-suggestion/spx-suggestion.component.mjs +30 -16
  31. package/esm2022/spx-update/src/spx-update-info.component.mjs +1 -1
  32. package/esm2022/spx-validation/public-api.mjs +1 -2
  33. package/esm2022/spx-validation/spx-validate-control.component.mjs +8 -3
  34. package/fesm2022/softpak-components-spx-app-expiry.mjs +107 -0
  35. package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -0
  36. package/fesm2022/softpak-components-spx-button.mjs +17 -4
  37. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  38. package/fesm2022/softpak-components-spx-change-details.mjs +94 -13
  39. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
  40. package/fesm2022/softpak-components-spx-channel-selection.mjs +109 -97
  41. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  42. package/fesm2022/softpak-components-spx-check-digit.mjs +13 -6
  43. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  44. package/fesm2022/softpak-components-spx-form-section.mjs +10 -10
  45. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  46. package/fesm2022/softpak-components-spx-form-view.mjs +229 -14
  47. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
  48. package/fesm2022/softpak-components-spx-inputs.mjs +185 -70
  49. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  50. package/fesm2022/softpak-components-spx-navigation.mjs +19 -7
  51. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  52. package/fesm2022/softpak-components-spx-number-check.mjs +0 -3
  53. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
  54. package/fesm2022/softpak-components-spx-suggestion.mjs +29 -15
  55. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  56. package/fesm2022/softpak-components-spx-update.mjs +1 -1
  57. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  58. package/fesm2022/softpak-components-spx-validation.mjs +8 -28
  59. package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
  60. package/package.json +16 -9
  61. package/spx-app-expiry/index.d.ts +5 -0
  62. package/spx-app-expiry/public-api.d.ts +5 -0
  63. package/spx-app-expiry/spx-app-expiry.component.d.ts +21 -0
  64. package/spx-app-expiry/spx-app-expiry.interface.d.ts +7 -0
  65. package/spx-app-expiry/spx-check-expiry-final-warning.interface.d.ts +2 -0
  66. package/spx-app-expiry/spx-check-expiry-happened.interface.d.ts +2 -0
  67. package/spx-app-expiry/spx-check-expiry-warning.interface.d.ts +2 -0
  68. package/spx-button/spx-button.component.d.ts +4 -2
  69. package/spx-change-details/spx-change-details.component.d.ts +27 -4
  70. package/spx-channel-selection/public-api.d.ts +0 -2
  71. package/spx-channel-selection/src/spx-welcome.component.d.ts +37 -8
  72. package/spx-check-digit/spx-check-digit.component.d.ts +3 -1
  73. package/spx-form-view/spx-autocomplete-search.component.d.ts +43 -0
  74. package/spx-form-view/spx-form-field.interface.d.ts +2 -0
  75. package/spx-form-view/spx-form-view.component.d.ts +23 -2
  76. package/spx-inputs/spx-input-box.component.d.ts +8 -5
  77. package/spx-inputs/spx-input-float.component.d.ts +3 -2
  78. package/spx-inputs/spx-input-number.component.d.ts +3 -2
  79. package/spx-inputs/spx-input-radio.component.d.ts +13 -5
  80. package/spx-inputs/spx-input-text.component.d.ts +1 -1
  81. package/spx-inputs/spx-input-type.enum.d.ts +2 -0
  82. package/spx-inputs/spx-input.component.d.ts +9 -2
  83. package/spx-navigation/spx-home-tiles.component.d.ts +2 -1
  84. package/spx-navigation/spx-navigation.component.d.ts +2 -1
  85. package/spx-suggestion/spx-suggestion.component.d.ts +3 -2
  86. package/spx-validation/public-api.d.ts +0 -1
  87. package/spx-validation/spx-validate-control.component.d.ts +1 -1
  88. package/tailwind.css +1 -1
  89. package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +0 -41
  90. package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +0 -49
  91. package/esm2022/spx-validation/spx-validation.module.mjs +0 -28
  92. package/spx-channel-selection/src/spx-channel-selection.component.d.ts +0 -12
  93. package/spx-channel-selection/src/spx-company-selection.component.d.ts +0 -13
  94. package/spx-validation/spx-validation.module.d.ts +0 -9
@@ -1,4 +1,4 @@
1
- import { NgIf, NgFor, JsonPipe } from '@angular/common';
1
+ import { NgIf, NgFor } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { EventEmitter, Component, Input, Output, HostListener, ViewChild } from '@angular/core';
4
4
  import { SpxButtonComponent } from '@softpak/components/spx-button';
@@ -12,23 +12,25 @@ import { fromEvent } from 'rxjs';
12
12
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
13
13
  import { SpxSuggestionComponent } from '@softpak/components/spx-suggestion';
14
14
  import { DateTime } from 'luxon';
15
+ import { valuePairToValue } from '@softpak/components/spx-helpers';
15
16
 
16
17
  class SpxInputBoxComponent {
17
18
  handleFocusIn(ev) {
18
- this.spxFocused = true;
19
+ this.emitFocusIn();
19
20
  }
20
21
  handleFocusOut(ev) {
21
- console.log('focusout', ev.composedPath());
22
- this.spxFocusOut.emit();
22
+ const thisEl = this.elRef.nativeElement;
23
+ const relatedElement = ev.relatedTarget;
24
+ if (!relatedElement || !thisEl.contains(relatedElement)) {
25
+ this.emitFocusOut();
26
+ }
23
27
  }
24
28
  handleWindowClick(ev) {
25
29
  if (ev.composedPath().includes(this.elRef.nativeElement)) {
26
- if (!this.spxFocused) {
27
- this.spxFocus.emit();
28
- }
30
+ this.emitFocusIn();
29
31
  }
30
32
  else {
31
- this.spxFocused = false;
33
+ this.emitFocusOut();
32
34
  }
33
35
  }
34
36
  onClear() {
@@ -49,10 +51,10 @@ class SpxInputBoxComponent {
49
51
  this.faSearch = faSearch;
50
52
  this.faQuestion = faQuestion;
51
53
  this.faTimes = faTimes;
52
- // @Element() el: HTMLElement;
53
54
  this.spxFocused = false;
54
55
  this.spxReadonly = false;
55
56
  this.spxShowClear = true;
57
+ this.spxShowLabel = true;
56
58
  this.spxClear = new EventEmitter();
57
59
  this.spxSearch = new EventEmitter();
58
60
  this.spxFocus = new EventEmitter();
@@ -60,8 +62,18 @@ class SpxInputBoxComponent {
60
62
  this.spxEdit = new EventEmitter();
61
63
  this.spxHelp = new EventEmitter();
62
64
  }
65
+ emitFocusIn() {
66
+ if (!this.spxFocused) {
67
+ this.spxFocus.emit();
68
+ }
69
+ }
70
+ emitFocusOut() {
71
+ if (this.spxFocused) {
72
+ this.spxFocusOut.emit();
73
+ }
74
+ }
63
75
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputBoxComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
64
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputBoxComponent, isStandalone: true, selector: "spx-input-box", inputs: { spxFocused: "spxFocused", spxLabel: "spxLabel", spxRequired: "spxRequired", spxReadonly: "spxReadonly", spxShowHelp: "spxShowHelp", spxCompact: "spxCompact", spxShowClear: "spxShowClear", spxShowEdit: "spxShowEdit", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxValue: "spxValue" }, outputs: { spxClear: "spxClear", spxSearch: "spxSearch", spxFocus: "spxFocus", spxFocusOut: "spxFocusOut", spxEdit: "spxEdit", spxHelp: "spxHelp" }, host: { listeners: { "focusout": "handleFocusOut($event)", "document:click": "handleWindowClick($event)" } }, ngImport: i0, template: `<div class="flex rounded w-full gap-3"
76
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputBoxComponent, isStandalone: true, selector: "spx-input-box", inputs: { spxCompact: "spxCompact", spxFocused: "spxFocused", spxLabel: "spxLabel", spxReadonly: "spxReadonly", spxRequired: "spxRequired", spxShowClear: "spxShowClear", spxShowEdit: "spxShowEdit", spxShowHelp: "spxShowHelp", spxShowLabel: "spxShowLabel", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxValue: "spxValue" }, outputs: { spxClear: "spxClear", spxSearch: "spxSearch", spxFocus: "spxFocus", spxFocusOut: "spxFocusOut", spxEdit: "spxEdit", spxHelp: "spxHelp" }, host: { listeners: { "focusin": "handleFocusIn($event)", "focusout": "handleFocusOut($event)", "document:click": "handleWindowClick($event)" } }, ngImport: i0, template: `<div class="flex rounded w-full gap-3"
65
77
  [class.rounded-none]="this.spxShowValidationMessages"
66
78
  [class.rounded-t]="this.spxShowValidationMessages"
67
79
  [class.outline-none]="this.spxFocused && !this.spxReadonly"
@@ -75,7 +87,7 @@ class SpxInputBoxComponent {
75
87
  [class.p-0]="this.spxCompact"
76
88
  [class.flex]="this.spxCompact"
77
89
  [class.items-center]="this.spxCompact">
78
- <div class="text-sm mb-1 text-gray-800"
90
+ <div *ngIf="this.spxShowLabel" class="font-bold text-sm mb-1 text-gray-800"
79
91
  [class.mb-0]="this.spxCompact"
80
92
  [class.px-3]="this.spxCompact">
81
93
  {{this.spxLabel}} <span *ngIf="spxRequired" class="text-red-800">*</span>
@@ -151,7 +163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
151
163
  [class.p-0]="this.spxCompact"
152
164
  [class.flex]="this.spxCompact"
153
165
  [class.items-center]="this.spxCompact">
154
- <div class="text-sm mb-1 text-gray-800"
166
+ <div *ngIf="this.spxShowLabel" class="font-bold text-sm mb-1 text-gray-800"
155
167
  [class.mb-0]="this.spxCompact"
156
168
  [class.px-3]="this.spxCompact">
157
169
  {{this.spxLabel}} <span *ngIf="spxRequired" class="text-red-800">*</span>
@@ -203,22 +215,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
203
215
  <ng-content select="[validation-messages]"></ng-content>
204
216
  </div>`,
205
217
  }]
206
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { spxFocused: [{
218
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { spxCompact: [{
207
219
  type: Input
208
- }], spxLabel: [{
220
+ }], spxFocused: [{
209
221
  type: Input
210
- }], spxRequired: [{
222
+ }], spxLabel: [{
211
223
  type: Input
212
224
  }], spxReadonly: [{
213
225
  type: Input
214
- }], spxShowHelp: [{
215
- type: Input
216
- }], spxCompact: [{
226
+ }], spxRequired: [{
217
227
  type: Input
218
228
  }], spxShowClear: [{
219
229
  type: Input
220
230
  }], spxShowEdit: [{
221
231
  type: Input
232
+ }], spxShowHelp: [{
233
+ type: Input
234
+ }], spxShowLabel: [{
235
+ type: Input
222
236
  }], spxShowSearch: [{
223
237
  type: Input
224
238
  }], spxShowValidationMessages: [{
@@ -239,7 +253,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
239
253
  type: Output
240
254
  }], handleFocusIn: [{
241
255
  type: HostListener,
242
- args: ['focusout', ["$event"]]
256
+ args: ['focusin', ["$event"]]
243
257
  }], handleFocusOut: [{
244
258
  type: HostListener,
245
259
  args: ['focusout', ["$event"]]
@@ -264,7 +278,6 @@ class SpxDropdownComponent {
264
278
  this.subscriptionKeyUp?.unsubscribe();
265
279
  }
266
280
  handleSuggestionClick(valuePair) {
267
- console.log('handleSuggestionClick', valuePair);
268
281
  this.select(valuePair);
269
282
  }
270
283
  listenToKeyUp() {
@@ -289,7 +302,6 @@ class SpxDropdownComponent {
289
302
  }
290
303
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
291
304
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxDropdownComponent, isStandalone: true, selector: "spx-dropdown", inputs: { spxSuggestions: "spxSuggestions" }, outputs: { spxSelect: "spxSelect" }, usesOnChanges: true, ngImport: i0, template: `<div class="relative text-black">
292
- {{ this.spxSuggestions | json }}
293
305
  <div
294
306
  class="absolute bg-gray-100 left-0 right-0 z-20">
295
307
  <button
@@ -299,12 +311,12 @@ class SpxDropdownComponent {
299
311
  [class.bg-white]="i !== this.focusPosition"
300
312
  (click)="this.handleSuggestionClick(valuePair)"
301
313
  [attr.tabindex]="-1"
302
- [type]="'button'">
314
+ [attr.type]="'button'">
303
315
  <div class="flex-1 p-1 font-bold text-lg">{{valuePair?.description}}</div>
304
- <spx-button (spxClick)="this.handleSuggestionClick(valuePair)" [spxType]="'button'" [spxTabIndex]="-1"]>Select</spx-button>
316
+ <spx-button (spxClick)="this.handleSuggestionClick(valuePair)" [spxType]="'button'" [spxTabIndex]="-1">Select</spx-button>
305
317
  </button>
306
318
  </div>
307
- </div>`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: JsonPipe, name: "json" }] }); }
319
+ </div>`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }] }); }
308
320
  }
309
321
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxDropdownComponent, decorators: [{
310
322
  type: Component,
@@ -315,10 +327,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
315
327
  NgIf,
316
328
  NgFor,
317
329
  SpxButtonComponent,
318
- JsonPipe,
319
330
  ],
320
331
  template: `<div class="relative text-black">
321
- {{ this.spxSuggestions | json }}
322
332
  <div
323
333
  class="absolute bg-gray-100 left-0 right-0 z-20">
324
334
  <button
@@ -328,9 +338,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
328
338
  [class.bg-white]="i !== this.focusPosition"
329
339
  (click)="this.handleSuggestionClick(valuePair)"
330
340
  [attr.tabindex]="-1"
331
- [type]="'button'">
341
+ [attr.type]="'button'">
332
342
  <div class="flex-1 p-1 font-bold text-lg">{{valuePair?.description}}</div>
333
- <spx-button (spxClick)="this.handleSuggestionClick(valuePair)" [spxType]="'button'" [spxTabIndex]="-1"]>Select</spx-button>
343
+ <spx-button (spxClick)="this.handleSuggestionClick(valuePair)" [spxType]="'button'" [spxTabIndex]="-1">Select</spx-button>
334
344
  </button>
335
345
  </div>
336
346
  </div>`,
@@ -354,7 +364,7 @@ class SpxInputTextComponent {
354
364
  this.spxFocus = new EventEmitter();
355
365
  this.spxWasInternalUpdate = false;
356
366
  }
357
- async spxSetFocus() {
367
+ spxSetFocus() {
358
368
  this.inputRef?.nativeElement?.focus();
359
369
  }
360
370
  componentDidLoad() {
@@ -391,6 +401,8 @@ class SpxInputTextComponent {
391
401
  <input
392
402
  #input
393
403
  class="font-bold text-lg w-full outline-none"
404
+ autocomplete="off"
405
+ spellcheck="false"
394
406
  [class.bg-white]="!this.spxReadonly"
395
407
  [class.bg-gray-300]="this.spxReadonly"
396
408
  [class.cursor-not-allowed]="this.spxReadonly"
@@ -424,12 +436,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
424
436
  NgFor,
425
437
  SpxButtonComponent,
426
438
  SpxDropdownComponent,
427
- JsonPipe,
428
439
  ],
429
440
  template: `<div class="relative text-black">
430
441
  <input
431
442
  #input
432
443
  class="font-bold text-lg w-full outline-none"
444
+ autocomplete="off"
445
+ spellcheck="false"
433
446
  [class.bg-white]="!this.spxReadonly"
434
447
  [class.bg-gray-300]="this.spxReadonly"
435
448
  [class.cursor-not-allowed]="this.spxReadonly"
@@ -690,7 +703,7 @@ class SpxInputDateComponent {
690
703
  <spx-suggestion
691
704
  *ngFor="let valuePair of spxSuggestions[spxSelectStep]"
692
705
  (click)="this.handleSuggestionClick(valuePair.value)">{{valuePair?.description}}</spx-suggestion>
693
- </div>`, isInline: true, styles: [":host{display:block}.spx-input-date__input{background-color:transparent;border:1px solid #979797;border-radius:4px;color:var(--spx-input--color, rgba(0, 0, 0, .9));box-sizing:border-box;font-size:16px;margin-right:10px;padding:6px;text-align:center;width:100%}.spx-input-date__input:active{transform:scale(.95)}.spx-input-date__input:focus{border:var(--spx-input-box--focus--border, 1px solid rgb(115, 168, 210));border-radius:4px;outline:none}.spx-input-date__control-label{align-items:center;color:#000000b3;display:inline-grid;font-size:13px;letter-spacing:1px}.spx-input-date__input::-webkit-outer-spin-button,.spx-input-date__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.spx-input-date__input[type=number]{-moz-appearance:textfield}.spx-input-date__suggestions,.spx-input-date__controls{display:grid;grid-gap:8px;grid-template-columns:repeat(4,1fr);margin-top:8px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxSuggestionComponent, selector: "spx-suggestion", inputs: ["spxDisabled", "spxSelected"] }] }); }
706
+ </div>`, isInline: true, styles: [":host{display:block}.spx-input-date__input{background-color:transparent;border:1px solid #979797;border-radius:4px;color:var(--spx-input--color, rgba(0, 0, 0, .9));box-sizing:border-box;font-size:16px;margin-right:10px;padding:6px;text-align:center;width:100%}.spx-input-date__input:active{transform:scale(.95)}.spx-input-date__input:focus{border:var(--spx-input-box--focus--border, 1px solid rgb(115, 168, 210));border-radius:4px;outline:none}.spx-input-date__control-label{align-items:center;color:#000000b3;display:inline-grid;font-size:13px;letter-spacing:1px}.spx-input-date__input::-webkit-outer-spin-button,.spx-input-date__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.spx-input-date__input[type=number]{-moz-appearance:textfield}.spx-input-date__suggestions,.spx-input-date__controls{display:grid;grid-gap:8px;grid-template-columns:repeat(4,1fr);margin-top:8px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxSuggestionComponent, selector: "spx-suggestion", inputs: ["spxDisabled", "spxFocused", "spxSelected", "spxTabbable"] }] }); }
694
707
  }
695
708
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputDateComponent, decorators: [{
696
709
  type: Component,
@@ -792,8 +805,8 @@ class SpxInputFloatComponent {
792
805
  this.spxWasInternalUpdate = false;
793
806
  this.tick = {};
794
807
  }
795
- async spxSetFocus() {
796
- // this.elFirstInput.focus();
808
+ spxSetFocus() {
809
+ this.firstInputRef?.nativeElement?.focus();
797
810
  }
798
811
  // @Watch('value') onValueChanged(newValue: SpxValuePair<any>, _oldValue: SpxValuePair<any>) {
799
812
  // this.handleSetValue(newValue);
@@ -845,8 +858,9 @@ class SpxInputFloatComponent {
845
858
  return /^[+-]?\d+(\.\d+)?$/.test(value);
846
859
  }
847
860
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputFloatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
848
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputFloatComponent, isStandalone: true, selector: "spx-input-float", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxFocused: "spxFocused", spxStep: "spxStep", value: "value", spxWasInternalUpdate: "spxWasInternalUpdate", tick: "tick" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, ngImport: i0, template: `<div class="flex items-end">
861
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputFloatComponent, isStandalone: true, selector: "spx-input-float", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxFocused: "spxFocused", spxStep: "spxStep", value: "value", spxWasInternalUpdate: "spxWasInternalUpdate", tick: "tick" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, viewQueries: [{ propertyName: "firstInputRef", first: true, predicate: ["firstInputRef"], descendants: true, static: true }], ngImport: i0, template: `<div class="flex items-end">
849
862
  <input
863
+ #firstInputRef
850
864
  class="spx-input-float__input"
851
865
  [attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
852
866
  [attr.disabled]="this.spxReadonly ? this.spxReadonly : undefined"
@@ -879,6 +893,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
879
893
  SpxButtonComponent,
880
894
  ], template: `<div class="flex items-end">
881
895
  <input
896
+ #firstInputRef
882
897
  class="spx-input-float__input"
883
898
  [attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
884
899
  [attr.disabled]="this.spxReadonly ? this.spxReadonly : undefined"
@@ -924,6 +939,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
924
939
  type: Input
925
940
  }], tick: [{
926
941
  type: Input
942
+ }], firstInputRef: [{
943
+ type: ViewChild,
944
+ args: ['firstInputRef', { static: true }]
927
945
  }] } });
928
946
 
929
947
  class SpxInputNumberComponent {
@@ -935,8 +953,8 @@ class SpxInputNumberComponent {
935
953
  this.spxFocus = new EventEmitter();
936
954
  this.spxWasInternalUpdate = false;
937
955
  }
938
- async spxSetFocus() {
939
- // this.elInput.focus();
956
+ spxSetFocus() {
957
+ this.inputRef?.nativeElement?.focus();
940
958
  }
941
959
  componentDidLoad() {
942
960
  if (this.spxAutofocus) {
@@ -955,8 +973,9 @@ class SpxInputNumberComponent {
955
973
  this.spxChange.emit(this.value);
956
974
  }
957
975
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
958
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputNumberComponent, isStandalone: true, selector: "spx-input-number", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxFocused: "spxFocused", spxStep: "spxStep", value: "value" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, ngImport: i0, template: `<div class="spx-input-number__controls">
976
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputNumberComponent, isStandalone: true, selector: "spx-input-number", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxFocused: "spxFocused", spxStep: "spxStep", value: "value" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: `<div class="spx-input-number__controls">
959
977
  <input
978
+ #input
960
979
  class="spx-input-number__input"
961
980
  [attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
962
981
  [class.spx-input-number--readonly]="this.spxReadonly ? this.spxReadonly : undefined"
@@ -973,6 +992,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
973
992
  type: Component,
974
993
  args: [{ selector: 'spx-input-number', standalone: true, imports: [], template: `<div class="spx-input-number__controls">
975
994
  <input
995
+ #input
976
996
  class="spx-input-number__input"
977
997
  [attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
978
998
  [class.spx-input-number--readonly]="this.spxReadonly ? this.spxReadonly : undefined"
@@ -1004,55 +1024,122 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1004
1024
  type: Output
1005
1025
  }], spxFocus: [{
1006
1026
  type: Output
1027
+ }], inputRef: [{
1028
+ type: ViewChild,
1029
+ args: ['input', { static: true }]
1007
1030
  }] } });
1008
1031
 
1009
1032
  class SpxInputRadioComponent {
1010
1033
  constructor() {
1011
- this.spxFocused = true;
1034
+ this.focusPosition = 0;
1035
+ this.spxFocused = false;
1036
+ this.spxShowLabel = true;
1012
1037
  this.spxReadonly = false;
1013
1038
  this.spxSuggestions = [];
1014
1039
  this.spxChange = new EventEmitter();
1015
1040
  this.spxFocus = new EventEmitter();
1016
- this.spxWasInternalUpdate = false;
1017
1041
  }
1018
- async spxSetFocus() {
1019
- // this.elYear.focus();
1042
+ spxFocusIn() {
1043
+ this.listenToKeys();
1044
+ this.determineFocusPosition();
1020
1045
  }
1021
- handleSuggestionClick(value) {
1022
- this.value = value;
1023
- this.spxChange.emit(this.value);
1046
+ spxFocusOut() {
1047
+ this.subscriptionKeyDown?.unsubscribe();
1048
+ this.subscriptionKeyUp?.unsubscribe();
1049
+ }
1050
+ ngOnChanges(changes) {
1051
+ if ((changes['spxSuggestions'] && changes['spxSuggestions'].previousValue !== changes['spxSuggestions'].currentValue) ||
1052
+ (changes['value'] && changes['value'].previousValue !== changes['value'].currentValue)) {
1053
+ this.determineFocusPosition();
1054
+ }
1055
+ }
1056
+ handleSuggestionClick(valuePair) {
1057
+ if (this.spxReadonly) {
1058
+ console.log('spxInputRadio: clicked, but readonly');
1059
+ }
1060
+ else {
1061
+ console.log('spxInputRadio: clicked');
1062
+ this.select(valuePair);
1063
+ }
1064
+ }
1065
+ determineFocusPosition() {
1066
+ if (this.value && this.spxSuggestions?.length) {
1067
+ const index = this.spxSuggestions.findIndex(valuePair => valuePairToValue(valuePair) === valuePairToValue(this.value));
1068
+ this.focusPosition = index >= 0 ? index : 0;
1069
+ }
1070
+ else {
1071
+ this.focusPosition = 0;
1072
+ }
1073
+ }
1074
+ select(valuePair) {
1075
+ this.focusPosition = 0;
1076
+ this.value = valuePair;
1077
+ this.spxChange.emit(valuePair);
1078
+ }
1079
+ listenToKeys() {
1080
+ this.subscriptionKeyUp = fromEvent(window, 'keyup').subscribe((event) => {
1081
+ if ((event.key === 'ArrowUp' || event.key === 'ArrowLeft') && this.focusPosition > 0) {
1082
+ this.focusPosition = this.focusPosition - 1;
1083
+ this.select(this.spxSuggestions.at(this.focusPosition));
1084
+ event.preventDefault();
1085
+ }
1086
+ if ((event.key === 'ArrowDown' || event.key === 'ArrowRight') && this.focusPosition < this.spxSuggestions.length - 1) {
1087
+ this.focusPosition = this.focusPosition + 1;
1088
+ this.select(this.spxSuggestions.at(this.focusPosition));
1089
+ event.preventDefault();
1090
+ }
1091
+ });
1092
+ this.subscriptionKeyDown = fromEvent(window, 'keydown').subscribe((event) => {
1093
+ if (event.key === 'ArrowDown' ||
1094
+ event.key === 'ArrowLeft' ||
1095
+ event.key === 'ArrowRight' ||
1096
+ event.key === 'ArrowUp') {
1097
+ event.preventDefault();
1098
+ }
1099
+ });
1024
1100
  }
1025
1101
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1026
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputRadioComponent, isStandalone: true, selector: "spx-input-radio", inputs: { spxName: "spxName", spxValidators: "spxValidators", spxFocused: "spxFocused", spxReadonly: "spxReadonly", spxSuggestions: "spxSuggestions", value: "value" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, ngImport: i0, template: `<div class="spx-input-radio__suggestions">
1027
- <spx-suggestion
1028
- *ngFor="let valuePair of this.spxSuggestions"
1029
- [spxDisabled]="this.spxReadonly"
1030
- [spxSelected]="this.value?.value === this.valuePair?.value"
1031
- (click)="this.spxReadonly ? undefined : this.handleSuggestionClick(valuePair)">
1032
- {{this.valuePair?.description}}
1033
- </spx-suggestion>
1034
- </div>`, isInline: true, styles: [":host{display:block}.spx-input-radio__suggestions{display:grid;grid-gap:8px;grid-template-columns:repeat(2,1fr);margin-top:8px}.spx-input-radio--readonly{background-color:transparent;border:0;box-sizing:border-box;font-size:20px;font-weight:700;margin-right:10px;padding:0;width:100%}\n"], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxSuggestionComponent, selector: "spx-suggestion", inputs: ["spxDisabled", "spxSelected"] }] }); }
1102
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputRadioComponent, isStandalone: true, selector: "spx-input-radio", inputs: { spxName: "spxName", spxValidators: "spxValidators", spxFocused: "spxFocused", spxShowLabel: "spxShowLabel", spxReadonly: "spxReadonly", spxSuggestions: "spxSuggestions", value: "value" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, usesOnChanges: true, ngImport: i0, template: `<div class="grid grid-cols-2 gap-2" [class.mt-3]="this.spxShowLabel">
1103
+ <spx-suggestion
1104
+ *ngFor="let valuePair of this.spxSuggestions; let i = index"
1105
+ [spxDisabled]="this.spxReadonly"
1106
+ [spxFocused]="this.spxFocused && i === this.focusPosition"
1107
+ [spxSelected]="this.value?.value === this.valuePair?.value"
1108
+ [spxTabbable]="this.focusPosition === i"
1109
+ (pointerdown)="this.handleSuggestionClick(valuePair)">
1110
+ {{this.valuePair?.description}}
1111
+ </spx-suggestion>
1112
+ </div>`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxSuggestionComponent, selector: "spx-suggestion", inputs: ["spxDisabled", "spxFocused", "spxSelected", "spxTabbable"] }] }); }
1035
1113
  }
1036
1114
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputRadioComponent, decorators: [{
1037
1115
  type: Component,
1038
- args: [{ selector: 'spx-input-radio', standalone: true, imports: [
1116
+ args: [{
1117
+ selector: 'spx-input-radio',
1118
+ standalone: true,
1119
+ imports: [
1039
1120
  NgFor,
1040
1121
  SpxSuggestionComponent,
1041
- ], template: `<div class="spx-input-radio__suggestions">
1042
- <spx-suggestion
1043
- *ngFor="let valuePair of this.spxSuggestions"
1044
- [spxDisabled]="this.spxReadonly"
1045
- [spxSelected]="this.value?.value === this.valuePair?.value"
1046
- (click)="this.spxReadonly ? undefined : this.handleSuggestionClick(valuePair)">
1047
- {{this.valuePair?.description}}
1048
- </spx-suggestion>
1049
- </div>`, styles: [":host{display:block}.spx-input-radio__suggestions{display:grid;grid-gap:8px;grid-template-columns:repeat(2,1fr);margin-top:8px}.spx-input-radio--readonly{background-color:transparent;border:0;box-sizing:border-box;font-size:20px;font-weight:700;margin-right:10px;padding:0;width:100%}\n"] }]
1122
+ ],
1123
+ template: `<div class="grid grid-cols-2 gap-2" [class.mt-3]="this.spxShowLabel">
1124
+ <spx-suggestion
1125
+ *ngFor="let valuePair of this.spxSuggestions; let i = index"
1126
+ [spxDisabled]="this.spxReadonly"
1127
+ [spxFocused]="this.spxFocused && i === this.focusPosition"
1128
+ [spxSelected]="this.value?.value === this.valuePair?.value"
1129
+ [spxTabbable]="this.focusPosition === i"
1130
+ (pointerdown)="this.handleSuggestionClick(valuePair)">
1131
+ {{this.valuePair?.description}}
1132
+ </spx-suggestion>
1133
+ </div>`,
1134
+ }]
1050
1135
  }], propDecorators: { spxName: [{
1051
1136
  type: Input
1052
1137
  }], spxValidators: [{
1053
1138
  type: Input
1054
1139
  }], spxFocused: [{
1055
1140
  type: Input
1141
+ }], spxShowLabel: [{
1142
+ type: Input
1056
1143
  }], spxReadonly: [{
1057
1144
  type: Input
1058
1145
  }], spxSuggestions: [{
@@ -1068,8 +1155,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1068
1155
  var SpxInputTypeEnum;
1069
1156
  (function (SpxInputTypeEnum) {
1070
1157
  SpxInputTypeEnum["autocomplete"] = "autocomplete";
1158
+ SpxInputTypeEnum["button"] = "button";
1071
1159
  SpxInputTypeEnum["date"] = "date";
1072
1160
  SpxInputTypeEnum["float"] = "float";
1161
+ SpxInputTypeEnum["hidden"] = "hidden";
1073
1162
  SpxInputTypeEnum["overlay"] = "overlay";
1074
1163
  SpxInputTypeEnum["overlayNumber"] = "overlaynumber";
1075
1164
  SpxInputTypeEnum["radio"] = "radio";
@@ -1089,6 +1178,7 @@ class SpxInputComponent {
1089
1178
  this.spxSelectDay = true;
1090
1179
  this.spxShowEdit = false;
1091
1180
  this.spxShowHelp = false;
1181
+ this.spxShowLabel = true;
1092
1182
  this.spxCompact = false;
1093
1183
  this.spxShowClear = true;
1094
1184
  this.spxShowSearch = false;
@@ -1127,17 +1217,19 @@ class SpxInputComponent {
1127
1217
  handleFocus() {
1128
1218
  this.spxFocus.emit();
1129
1219
  this.spxFocused = true;
1130
- // this.elBox.spxSetFocus();
1131
1220
  }
1132
1221
  handleSearch() {
1133
1222
  this.spxSearch.emit();
1134
1223
  }
1135
- setFocus() {
1224
+ setFocusIn() {
1136
1225
  this.spxFocused = true;
1137
1226
  this.passFocusToControl();
1138
1227
  }
1139
1228
  setFocusOut() {
1140
1229
  this.spxFocused = false;
1230
+ if (this.spxType === SpxInputTypeEnum.radio) {
1231
+ this.radioInput?.spxFocusOut();
1232
+ }
1141
1233
  }
1142
1234
  handleEdit() {
1143
1235
  this.spxEdit.emit();
@@ -1154,6 +1246,12 @@ class SpxInputComponent {
1154
1246
  case SpxInputTypeEnum.overlayNumber:
1155
1247
  this.textInput?.spxSetFocus();
1156
1248
  break;
1249
+ case SpxInputTypeEnum.number:
1250
+ this.numberInput?.spxSetFocus();
1251
+ break;
1252
+ case SpxInputTypeEnum.radio:
1253
+ this.radioInput?.spxFocusIn();
1254
+ break;
1157
1255
  }
1158
1256
  }
1159
1257
  writeValue(value) {
@@ -1175,13 +1273,13 @@ class SpxInputComponent {
1175
1273
  this.onTouched = fn;
1176
1274
  }
1177
1275
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1178
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputComponent, isStandalone: true, selector: "spx-input", inputs: { spxLabel: "spxLabel", spxMax: "spxMax", spxMin: "spxMin", spxName: "spxName", spxReadonly: "spxReadonly", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxPattern: "spxPattern", spxRequired: "spxRequired", spxSelectMonth: "spxSelectMonth", spxSelectDay: "spxSelectDay", spxShowEdit: "spxShowEdit", spxShowHelp: "spxShowHelp", spxCompact: "spxCompact", spxShowClear: "spxShowClear", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxStep: "spxStep", spxSuggestions: "spxSuggestions", spxType: "spxType", spxValidators: "spxValidators", value: "value", spxCapitalize: "spxCapitalize", spxFocused: "spxFocused" }, outputs: { spxBlur: "spxBlur", spxClear: "spxClear", spxChange: "spxChange", spxFocus: "spxFocus", spxEdit: "spxEdit", spxHelp: "spxHelp", spxSearch: "spxSearch" }, host: { listeners: { "spxChange": "handleChangeEvent($event)", "focusout": "_handleBlurEvent()" } }, providers: [
1276
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputComponent, isStandalone: true, selector: "spx-input", inputs: { spxLabel: "spxLabel", spxMax: "spxMax", spxMin: "spxMin", spxName: "spxName", spxReadonly: "spxReadonly", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxPattern: "spxPattern", spxRequired: "spxRequired", spxSelectMonth: "spxSelectMonth", spxSelectDay: "spxSelectDay", spxShowEdit: "spxShowEdit", spxShowHelp: "spxShowHelp", spxShowLabel: "spxShowLabel", spxCompact: "spxCompact", spxShowClear: "spxShowClear", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxStep: "spxStep", spxSuggestions: "spxSuggestions", spxType: "spxType", spxValidators: "spxValidators", value: "value", spxCapitalize: "spxCapitalize", spxFocused: "spxFocused" }, outputs: { spxBlur: "spxBlur", spxClear: "spxClear", spxChange: "spxChange", spxFocus: "spxFocus", spxEdit: "spxEdit", spxHelp: "spxHelp", spxSearch: "spxSearch" }, host: { listeners: { "spxChange": "handleChangeEvent($event)", "focusout": "_handleBlurEvent()" } }, providers: [
1179
1277
  {
1180
1278
  provide: NG_VALUE_ACCESSOR,
1181
1279
  useExisting: SpxInputComponent,
1182
1280
  multi: true
1183
1281
  }
1184
- ], viewQueries: [{ propertyName: "textInput", first: true, predicate: SpxInputTextComponent, descendants: true }], ngImport: i0, template: `<spx-input-box
1282
+ ], viewQueries: [{ propertyName: "floatInput", first: true, predicate: SpxInputFloatComponent, descendants: true }, { propertyName: "numberInput", first: true, predicate: SpxInputNumberComponent, descendants: true }, { propertyName: "textInput", first: true, predicate: SpxInputTextComponent, descendants: true }, { propertyName: "radioInput", first: true, predicate: SpxInputRadioComponent, descendants: true }], ngImport: i0, template: `<spx-input-box
1185
1283
  [spxFocused]="this.spxFocused"
1186
1284
  [spxLabel]="this.spxLabel"
1187
1285
  [spxReadonly]="this.spxReadonly"
@@ -1191,12 +1289,13 @@ class SpxInputComponent {
1191
1289
  [spxCompact]="this.spxCompact"
1192
1290
  [spxShowClear]="this.spxShowClear"
1193
1291
  [spxShowEdit]="this.spxShowEdit"
1292
+ [spxShowLabel]="this.spxShowLabel"
1194
1293
  [spxShowSearch]="this.spxShowSearch ? this.spxShowSearch : this.spxType === 'autocomplete'"
1195
1294
  [spxShowValidationMessages]="this.spxShowValidationMessages"
1196
1295
  (spxClear)="this.handleClear()"
1197
1296
  (spxEdit)="this.handleEdit()"
1198
1297
  (spxHelp)="this.handleHelp()"
1199
- (spxFocus)="this.setFocus()"
1298
+ (spxFocus)="this.setFocusIn()"
1200
1299
  (spxFocusOut)="this.setFocusOut()"
1201
1300
  (spxSearch)="this.handleSearch()">
1202
1301
  <div controls>
@@ -1257,12 +1356,14 @@ class SpxInputComponent {
1257
1356
  [value]="this.value"
1258
1357
  ></spx-input-number>
1259
1358
  <spx-input-radio
1359
+ #radioInput
1260
1360
  *ngIf="this.spxType === 'radio'"
1261
1361
  (spxChange)="this.handleChange($event)"
1262
1362
  (spxFocus)="this.handleFocus()"
1263
1363
  [spxFocused]="this.spxFocused"
1264
1364
  [spxName]="this.spxName"
1265
1365
  [spxReadonly]="this.spxReadonly"
1366
+ [spxShowLabel]="this.spxShowLabel"
1266
1367
  [spxSuggestions]="this.spxSuggestions"
1267
1368
  [spxValidators]="this.spxValidators"
1268
1369
  [value]="this.value"
@@ -1271,7 +1372,7 @@ class SpxInputComponent {
1271
1372
  <div validation-messages>
1272
1373
  <ng-content></ng-content>
1273
1374
  </div>
1274
- </spx-input-box>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxInputBoxComponent, selector: "spx-input-box", inputs: ["spxFocused", "spxLabel", "spxRequired", "spxReadonly", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowEdit", "spxShowSearch", "spxShowValidationMessages", "spxValue"], outputs: ["spxClear", "spxSearch", "spxFocus", "spxFocusOut", "spxEdit", "spxHelp"] }, { kind: "component", type: SpxInputDateComponent, selector: "spx-input-date", inputs: ["spxMax", "spxMin", "spxName", "spxReadonly", "spxValidators", "spxFocused", "spxSelectMonth", "spxSelectDay", "value", "spxLastKeyPressed", "spxSelectStep", "spxInternalValue", "spxSuggestions", "spxWasInternalUpdate"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputFloatComponent, selector: "spx-input-float", inputs: ["spxName", "spxAutofocus", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value", "spxWasInternalUpdate", "tick"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputNumberComponent, selector: "spx-input-number", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputRadioComponent, selector: "spx-input-radio", inputs: ["spxName", "spxValidators", "spxFocused", "spxReadonly", "spxSuggestions", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputTextComponent, selector: "spx-input-text", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "spxFocused", "spxType", "value", "spxWasInternalUpdate"], outputs: ["spxBlurFromChild", "spxChange", "spxFocus"] }] }); }
1375
+ </spx-input-box>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxInputBoxComponent, selector: "spx-input-box", inputs: ["spxCompact", "spxFocused", "spxLabel", "spxReadonly", "spxRequired", "spxShowClear", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxShowSearch", "spxShowValidationMessages", "spxValue"], outputs: ["spxClear", "spxSearch", "spxFocus", "spxFocusOut", "spxEdit", "spxHelp"] }, { kind: "component", type: SpxInputDateComponent, selector: "spx-input-date", inputs: ["spxMax", "spxMin", "spxName", "spxReadonly", "spxValidators", "spxFocused", "spxSelectMonth", "spxSelectDay", "value", "spxLastKeyPressed", "spxSelectStep", "spxInternalValue", "spxSuggestions", "spxWasInternalUpdate"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputFloatComponent, selector: "spx-input-float", inputs: ["spxName", "spxAutofocus", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value", "spxWasInternalUpdate", "tick"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputNumberComponent, selector: "spx-input-number", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputRadioComponent, selector: "spx-input-radio", inputs: ["spxName", "spxValidators", "spxFocused", "spxShowLabel", "spxReadonly", "spxSuggestions", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputTextComponent, selector: "spx-input-text", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "spxFocused", "spxType", "value", "spxWasInternalUpdate"], outputs: ["spxBlurFromChild", "spxChange", "spxFocus"] }] }); }
1275
1376
  }
1276
1377
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputComponent, decorators: [{
1277
1378
  type: Component,
@@ -1307,12 +1408,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1307
1408
  [spxCompact]="this.spxCompact"
1308
1409
  [spxShowClear]="this.spxShowClear"
1309
1410
  [spxShowEdit]="this.spxShowEdit"
1411
+ [spxShowLabel]="this.spxShowLabel"
1310
1412
  [spxShowSearch]="this.spxShowSearch ? this.spxShowSearch : this.spxType === 'autocomplete'"
1311
1413
  [spxShowValidationMessages]="this.spxShowValidationMessages"
1312
1414
  (spxClear)="this.handleClear()"
1313
1415
  (spxEdit)="this.handleEdit()"
1314
1416
  (spxHelp)="this.handleHelp()"
1315
- (spxFocus)="this.setFocus()"
1417
+ (spxFocus)="this.setFocusIn()"
1316
1418
  (spxFocusOut)="this.setFocusOut()"
1317
1419
  (spxSearch)="this.handleSearch()">
1318
1420
  <div controls>
@@ -1373,12 +1475,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1373
1475
  [value]="this.value"
1374
1476
  ></spx-input-number>
1375
1477
  <spx-input-radio
1478
+ #radioInput
1376
1479
  *ngIf="this.spxType === 'radio'"
1377
1480
  (spxChange)="this.handleChange($event)"
1378
1481
  (spxFocus)="this.handleFocus()"
1379
1482
  [spxFocused]="this.spxFocused"
1380
1483
  [spxName]="this.spxName"
1381
1484
  [spxReadonly]="this.spxReadonly"
1485
+ [spxShowLabel]="this.spxShowLabel"
1382
1486
  [spxSuggestions]="this.spxSuggestions"
1383
1487
  [spxValidators]="this.spxValidators"
1384
1488
  [value]="this.value"
@@ -1415,6 +1519,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1415
1519
  type: Input
1416
1520
  }], spxShowHelp: [{
1417
1521
  type: Input
1522
+ }], spxShowLabel: [{
1523
+ type: Input
1418
1524
  }], spxCompact: [{
1419
1525
  type: Input
1420
1526
  }], spxShowClear: [{
@@ -1449,9 +1555,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1449
1555
  type: Output
1450
1556
  }], spxSearch: [{
1451
1557
  type: Output
1558
+ }], floatInput: [{
1559
+ type: ViewChild,
1560
+ args: [SpxInputFloatComponent]
1561
+ }], numberInput: [{
1562
+ type: ViewChild,
1563
+ args: [SpxInputNumberComponent]
1452
1564
  }], textInput: [{
1453
1565
  type: ViewChild,
1454
1566
  args: [SpxInputTextComponent]
1567
+ }], radioInput: [{
1568
+ type: ViewChild,
1569
+ args: [SpxInputRadioComponent]
1455
1570
  }], spxFocused: [{
1456
1571
  type: Input
1457
1572
  }], _handleBlurEvent: [{