@taiga-ui/kit 3.24.0 → 3.25.0

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 (50) hide show
  1. package/bundles/taiga-ui-kit-components-input-count.umd.js +8 -1
  2. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-input-files.umd.js +5 -5
  4. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +14 -5
  6. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-input-time.umd.js +214 -44
  8. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-marker-icon.umd.js +1 -1
  10. package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-directives-mask.umd.js +12 -4
  12. package/bundles/taiga-ui-kit-directives-mask.umd.js.map +1 -1
  13. package/components/input-count/input-count.component.d.ts +5 -0
  14. package/components/input-files/input-files.directive.d.ts +3 -3
  15. package/components/input-phone-international/index.d.ts +1 -0
  16. package/components/input-phone-international/utils/not-kz-region.d.ts +1 -0
  17. package/components/input-time/index.d.ts +1 -0
  18. package/components/input-time/input-time-options.d.ts +1 -0
  19. package/components/input-time/input-time.component.d.ts +10 -3
  20. package/components/input-time/input-time.directive.d.ts +13 -0
  21. package/components/input-time/input-time.module.d.ts +8 -5
  22. package/components/input-time/native-time/native-time.component.d.ts +14 -0
  23. package/esm2015/components/input-count/input-count.component.js +9 -2
  24. package/esm2015/components/input-files/input-files.component.js +4 -4
  25. package/esm2015/components/input-files/input-files.directive.js +4 -4
  26. package/esm2015/components/input-phone-international/index.js +2 -1
  27. package/esm2015/components/input-phone-international/input-phone-international.component.js +7 -3
  28. package/esm2015/components/input-phone-international/tokens/countries-masks.js +4 -4
  29. package/esm2015/components/input-phone-international/utils/not-kz-region.js +5 -0
  30. package/esm2015/components/input-time/index.js +2 -1
  31. package/esm2015/components/input-time/input-time-options.js +2 -1
  32. package/esm2015/components/input-time/input-time.component.js +39 -12
  33. package/esm2015/components/input-time/input-time.directive.js +33 -0
  34. package/esm2015/components/input-time/input-time.module.js +18 -6
  35. package/esm2015/components/input-time/native-time/native-time.component.js +79 -0
  36. package/esm2015/components/marker-icon/marker-icon.component.js +1 -1
  37. package/esm2015/directives/mask/legacy-mask.js +10 -1
  38. package/fesm2015/taiga-ui-kit-components-input-count.js +8 -1
  39. package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
  40. package/fesm2015/taiga-ui-kit-components-input-files.js +6 -6
  41. package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
  42. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +14 -6
  43. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  44. package/fesm2015/taiga-ui-kit-components-input-time.js +159 -18
  45. package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
  46. package/fesm2015/taiga-ui-kit-components-marker-icon.js +1 -1
  47. package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
  48. package/fesm2015/taiga-ui-kit-directives-mask.js +9 -0
  49. package/fesm2015/taiga-ui-kit-directives-mask.js.map +1 -1
  50. package/package.json +4 -4
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/components/select-option'), require('@taiga-ui/kit/providers'), require('@taiga-ui/kit/tokens'), require('@taiga-ui/kit/utils/mask'), require('rxjs/operators'), require('@taiga-ui/kit/constants'), require('@taiga-ui/kit/directives'), require('@angular/common'), require('rxjs')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-time', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/components/select-option', '@taiga-ui/kit/providers', '@taiga-ui/kit/tokens', '@taiga-ui/kit/utils/mask', 'rxjs/operators', '@taiga-ui/kit/constants', '@taiga-ui/kit/directives', '@angular/common', 'rxjs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-time"] = {}), global.ng.core, global.ng.forms, global.cdk, global.i1, global["taiga-ui"].kit.components["select-option"], global["taiga-ui"].kit.providers, global["taiga-ui"].kit.tokens, global["taiga-ui"].kit.utils.mask, global.rxjs.operators, global["taiga-ui"].kit.constants, global["taiga-ui"].kit.directives, global.ng.common, global.rxjs));
5
- })(this, (function (exports, i0, i4, cdk, i1, selectOption, providers, tokens, mask, operators, constants, i2, i3, i5) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/components/select-option'), require('@taiga-ui/kit/providers'), require('@taiga-ui/kit/tokens'), require('@taiga-ui/kit/utils/mask'), require('rxjs/operators'), require('@taiga-ui/kit/constants'), require('@angular/common'), require('@taiga-ui/kit/directives'), require('@tinkoff/ng-polymorpheus'), require('rxjs')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-time', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/components/select-option', '@taiga-ui/kit/providers', '@taiga-ui/kit/tokens', '@taiga-ui/kit/utils/mask', 'rxjs/operators', '@taiga-ui/kit/constants', '@angular/common', '@taiga-ui/kit/directives', '@tinkoff/ng-polymorpheus', 'rxjs'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-time"] = {}), global.ng.core, global.ng.forms, global.i2, global.i1, global["taiga-ui"].kit.components["select-option"], global["taiga-ui"].kit.providers, global["taiga-ui"].kit.tokens, global["taiga-ui"].kit.utils.mask, global.rxjs.operators, global["taiga-ui"].kit.constants, global.ng.common, global["taiga-ui"].kit.directives, global.i5, global.rxjs));
5
+ })(this, (function (exports, i0, i6, i2, i1, selectOption, providers, tokens, mask, operators, constants, i4, i3, i5, i7) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -23,11 +23,13 @@
23
23
  }
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
27
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
26
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
28
27
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
29
30
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
30
31
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
32
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
31
33
 
32
34
  /*! *****************************************************************************
33
35
  Copyright (c) Microsoft Corporation.
@@ -356,6 +358,7 @@
356
358
  postfix: "",
357
359
  maxValues: constants.MAX_TIME_VALUES,
358
360
  itemSize: "m",
361
+ nativePicker: false,
359
362
  };
360
363
  /**
361
364
  * Default parameters for InputTime component
@@ -368,13 +371,85 @@
368
371
  useValue: Object.assign(Object.assign({}, TUI_INPUT_TIME_DEFAULT_OPTIONS), options),
369
372
  }); };
370
373
 
374
+ var TuiNativeTimeComponent = /** @class */ (function () {
375
+ function TuiNativeTimeComponent(host, idService) {
376
+ this.host = host;
377
+ this.autoIdString = idService.generate();
378
+ }
379
+ Object.defineProperty(TuiNativeTimeComponent.prototype, "items", {
380
+ get: function () {
381
+ var _this = this;
382
+ return this.host.items.map(function (item) { return item.toString(_this.host.mode); });
383
+ },
384
+ enumerable: false,
385
+ configurable: true
386
+ });
387
+ Object.defineProperty(TuiNativeTimeComponent.prototype, "value", {
388
+ get: function () {
389
+ return this.host.value.length === this.host.mode.length ? this.host.value : '';
390
+ },
391
+ enumerable: false,
392
+ configurable: true
393
+ });
394
+ Object.defineProperty(TuiNativeTimeComponent.prototype, "step", {
395
+ get: function () {
396
+ switch (this.host.mode) {
397
+ case 'HH:MM:SS':
398
+ return 1;
399
+ case 'HH:MM:SS.MSS':
400
+ return 0.001;
401
+ default:
402
+ return 60;
403
+ }
404
+ },
405
+ enumerable: false,
406
+ configurable: true
407
+ });
408
+ TuiNativeTimeComponent.prototype.onChange = function (value) {
409
+ this.host.onValueChange(value);
410
+ };
411
+ return TuiNativeTimeComponent;
412
+ }());
413
+ TuiNativeTimeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiNativeTimeComponent, deps: [{ token: i1.TUI_TEXTFIELD_HOST }, { token: i2.TuiIdService }], target: i0__namespace.ɵɵFactoryTarget.Component });
414
+ TuiNativeTimeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiNativeTimeComponent, selector: "input[tuiTime]", host: { attributes: { "type": "time" }, listeners: { "change.stop": "onChange($event.target.value)", "click.stop.silent": "0", "mousedown.stop.silent": "0" }, properties: { "attr.list": "autoIdString", "tabIndex": "-1", "value": "value", "step": "step" } }, ngImport: i0__namespace, template: "\n <datalist\n *ngIf=\"items.length\"\n [id]=\"autoIdString\"\n >\n <option\n *ngFor=\"let item of items\"\n value=\"{{ item }}\"\n ></option>\n </datalist>\n ", isInline: true, styles: [":host{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;pointer-events:auto;font-size:2rem}\n"], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
415
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiNativeTimeComponent, decorators: [{
416
+ type: i0.Component,
417
+ args: [{
418
+ selector: 'input[tuiTime]',
419
+ template: "\n <datalist\n *ngIf=\"items.length\"\n [id]=\"autoIdString\"\n >\n <option\n *ngFor=\"let item of items\"\n value=\"{{ item }}\"\n ></option>\n </datalist>\n ",
420
+ host: {
421
+ type: 'time',
422
+ '[attr.list]': 'autoIdString',
423
+ '[tabIndex]': '-1',
424
+ '[value]': 'value',
425
+ '[step]': 'step',
426
+ '(change.stop)': 'onChange($event.target.value)',
427
+ '(click.stop.silent)': '0',
428
+ '(mousedown.stop.silent)': '0',
429
+ },
430
+ styleUrls: ['./native-time.style.less'],
431
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
432
+ }]
433
+ }], ctorParameters: function () {
434
+ return [{ type: undefined, decorators: [{
435
+ type: i0.Inject,
436
+ args: [i1.TUI_TEXTFIELD_HOST]
437
+ }] }, { type: i2__namespace.TuiIdService, decorators: [{
438
+ type: i0.Inject,
439
+ args: [i2.TuiIdService]
440
+ }] }];
441
+ } });
442
+
371
443
  var TuiInputTimeComponent = /** @class */ (function (_super) {
372
444
  __extends(TuiInputTimeComponent, _super);
373
- function TuiInputTimeComponent(control, cdr, timeTexts$, options) {
445
+ function TuiInputTimeComponent(control, cdr, timeTexts$, options, isMobile, textfieldSize, isIos) {
374
446
  var _this = _super.call(this, control, cdr) || this;
375
447
  _this.timeTexts$ = timeTexts$;
376
448
  _this.options = options;
377
- _this.disabledItemHandler = cdk.ALWAYS_FALSE_HANDLER;
449
+ _this.isMobile = isMobile;
450
+ _this.textfieldSize = textfieldSize;
451
+ _this.isIos = isIos;
452
+ _this.disabledItemHandler = i2.ALWAYS_FALSE_HANDLER;
378
453
  _this.items = [];
379
454
  _this.itemSize = _this.options.itemSize;
380
455
  _this.strict = false;
@@ -393,7 +468,7 @@
393
468
  });
394
469
  Object.defineProperty(TuiInputTimeComponent.prototype, "focused", {
395
470
  get: function () {
396
- return cdk.tuiIsNativeFocused(this.nativeFocusableElement);
471
+ return i2.tuiIsNativeFocused(this.nativeFocusableElement);
397
472
  },
398
473
  enumerable: false,
399
474
  configurable: true
@@ -412,6 +487,28 @@
412
487
  enumerable: false,
413
488
  configurable: true
414
489
  });
490
+ Object.defineProperty(TuiInputTimeComponent.prototype, "showNativePicker", {
491
+ get: function () {
492
+ return (this.nativePicker &&
493
+ (!this.isIos || (this.mode === 'HH:MM' && !this.items.length)));
494
+ },
495
+ enumerable: false,
496
+ configurable: true
497
+ });
498
+ Object.defineProperty(TuiInputTimeComponent.prototype, "nativeDatalist", {
499
+ get: function () {
500
+ return this.nativePicker && !this.isIos;
501
+ },
502
+ enumerable: false,
503
+ configurable: true
504
+ });
505
+ Object.defineProperty(TuiInputTimeComponent.prototype, "size", {
506
+ get: function () {
507
+ return this.textfieldSize.size;
508
+ },
509
+ enumerable: false,
510
+ configurable: true
511
+ });
415
512
  Object.defineProperty(TuiInputTimeComponent.prototype, "textMaskOptions", {
416
513
  get: function () {
417
514
  return this.calculateMask(this.mode);
@@ -486,7 +583,7 @@
486
583
  this.value = null;
487
584
  return;
488
585
  }
489
- var time = cdk.TuiTime.fromString(value);
586
+ var time = i2.TuiTime.fromString(value);
490
587
  this.value = this.strict ? this.findNearestTimeFromItems(time) : time;
491
588
  };
492
589
  TuiInputTimeComponent.prototype.onFocused = function (focused) {
@@ -498,7 +595,7 @@
498
595
  this.mode === 'HH:MM') {
499
596
  return;
500
597
  }
501
- this.value = cdk.TuiTime.fromString(this.nativeValue);
598
+ this.value = i2.TuiTime.fromString(this.nativeValue);
502
599
  setTimeout(function () {
503
600
  if (_this.nativeValue.endsWith('.') || _this.nativeValue.endsWith(':')) {
504
601
  _this.nativeValue = _this.nativeValue.slice(0, -1);
@@ -528,6 +625,13 @@
528
625
  _super.prototype.writeValue.call(this, value);
529
626
  this.nativeValue = value ? this.computedValue : '';
530
627
  };
628
+ Object.defineProperty(TuiInputTimeComponent.prototype, "nativePicker", {
629
+ get: function () {
630
+ return !!this.options.nativePicker && this.isMobile;
631
+ },
632
+ enumerable: false,
633
+ configurable: true
634
+ });
531
635
  TuiInputTimeComponent.prototype.calculateMask = function (mode) {
532
636
  return {
533
637
  mask: mask.tuiCreateTimeMask(mode, this.options.maxValues),
@@ -545,14 +649,14 @@
545
649
  : previous; });
546
650
  };
547
651
  TuiInputTimeComponent.prototype.getMatch = function (value) {
548
- return this.items.find(function (item) { return cdk.TUI_STRICT_MATCHER(item, value); });
652
+ return this.items.find(function (item) { return i2.TUI_STRICT_MATCHER(item, value); });
549
653
  };
550
654
  TuiInputTimeComponent.prototype.close = function () {
551
655
  this.open = false;
552
656
  };
553
657
  TuiInputTimeComponent.prototype.processArrow = function (event, shift) {
554
658
  var target = event.target;
555
- if (this.readOnly || !cdk.tuiIsElement(target) || !cdk.tuiIsInput(target)) {
659
+ if (this.readOnly || !i2.tuiIsElement(target) || !i2.tuiIsInput(target)) {
556
660
  return;
557
661
  }
558
662
  var selectionStart = target.selectionStart || 0;
@@ -589,40 +693,40 @@
589
693
  }
590
694
  };
591
695
  return TuiInputTimeComponent;
592
- }(cdk.AbstractTuiNullableControl));
593
- TuiInputTimeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputTimeComponent, deps: [{ token: i4.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: tokens.TUI_TIME_TEXTS }, { token: TUI_INPUT_TIME_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Component });
696
+ }(i2.AbstractTuiNullableControl));
697
+ TuiInputTimeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputTimeComponent, deps: [{ token: i6.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: tokens.TUI_TIME_TEXTS }, { token: TUI_INPUT_TIME_OPTIONS }, { token: i2.TUI_IS_MOBILE }, { token: i1.TUI_TEXTFIELD_SIZE }, { token: i2.TUI_IS_IOS }], target: i0__namespace.ɵɵFactoryTarget.Component });
594
698
  TuiInputTimeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputTimeComponent, selector: "tui-input-time", inputs: { disabledItemHandler: "disabledItemHandler", items: "items", itemSize: "itemSize", strict: "strict", mode: "mode", postfix: "postfix" }, host: { listeners: { "click": "onClick()" } }, providers: [
595
- cdk.tuiAsFocusableItemAccessor(TuiInputTimeComponent),
596
- cdk.tuiAsControl(TuiInputTimeComponent),
699
+ i2.tuiAsFocusableItemAccessor(TuiInputTimeComponent),
700
+ i2.tuiAsControl(TuiInputTimeComponent),
597
701
  i1.tuiAsDataListHost(TuiInputTimeComponent),
598
702
  i1.tuiAsOptionContent(selectOption.TUI_SELECT_OPTION),
599
- ], viewQueries: [{ propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-hosted-dropdown\n class=\"t-wrapper\"\n [canOpen]=\"canOpen\"\n [content]=\"dropdownContent\"\n [open]=\"canOpen && open\"\n (openChange)=\"onOpen($event)\"\n (focusedChange)=\"onFocused($event)\"\n>\n <tui-primitive-textfield\n tuiValueAccessor\n class=\"t-textfield\"\n [tuiTextfieldFiller]=\"(getFiller$(mode) | async) || ''\"\n [nativeId]=\"nativeId\"\n [pseudoFocus]=\"innerPseudoFocused\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [focusable]=\"focusable\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [textMask]=\"textMaskOptions\"\n [tuiTextfieldIcon]=\"icon\"\n [value]=\"computedValue\"\n [postfix]=\"postfix\"\n (valueChange)=\"onValueChange($event)\"\n (keydown.arrowUp)=\"onArrowUp($event)\"\n (keydown.arrowDown)=\"onArrowDown($event)\"\n >\n <ng-content></ng-content>\n <input\n tuiTextfield\n inputmode=\"numeric\"\n />\n </tui-primitive-textfield>\n</tui-hosted-dropdown>\n<ng-template #dropdownContent>\n <tui-data-list\n automation-id=\"tui-input-time__dropdown\"\n [size]=\"itemSize\"\n >\n <button\n *ngFor=\"let item of filtered\"\n tuiOption\n automation-id=\"tui-input-time__item\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n >\n {{ item }}\n </button>\n </tui-data-list>\n</ng-template>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}:host._disabled{pointer-events:none}.t-wrapper{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}\n"], components: [{ type: i1__namespace.TuiHostedDropdownComponent, selector: "tui-hosted-dropdown", inputs: ["content", "sided", "canOpen", "open"], outputs: ["openChange", "focusedChange"] }, { type: i1__namespace.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1__namespace.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { type: i1__namespace.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { type: i1__namespace.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }], directives: [{ type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i2__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i1__namespace.TuiTextfieldFillerDirective, selector: "[tuiTextfieldFiller]", inputs: ["tuiTextfieldFiller"] }, { type: i2__namespace.MaskedInputDirective, selector: "[textMask]", inputs: ["textMask"], exportAs: ["textMask"] }, { type: i1__namespace.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i3__namespace.AsyncPipe }, viewProviders: [providers.FIXED_DROPDOWN_CONTROLLER_PROVIDER], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
703
+ ], viewQueries: [{ propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-hosted-dropdown\n class=\"t-wrapper\"\n [canOpen]=\"canOpen && !nativeDatalist\"\n [content]=\"dropdownContent\"\n [open]=\"canOpen && open\"\n (openChange)=\"onOpen($event)\"\n (focusedChange)=\"onFocused($event)\"\n>\n <tui-primitive-textfield\n tuiValueAccessor\n class=\"t-textfield\"\n [tuiTextfieldFiller]=\"(getFiller$(mode) | async) || ''\"\n [nativeId]=\"nativeId\"\n [pseudoFocus]=\"innerPseudoFocused\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [focusable]=\"focusable\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [textMask]=\"textMaskOptions\"\n [tuiTextfieldIcon]=\"iconContent\"\n [value]=\"computedValue\"\n [postfix]=\"postfix\"\n (valueChange)=\"onValueChange($event)\"\n (keydown.arrowUp)=\"onArrowUp($event)\"\n (keydown.arrowDown)=\"onArrowDown($event)\"\n >\n <ng-content></ng-content>\n <input\n tuiTextfield\n inputmode=\"numeric\"\n />\n </tui-primitive-textfield>\n</tui-hosted-dropdown>\n<ng-template #dropdownContent>\n <tui-data-list\n automation-id=\"tui-input-time__dropdown\"\n [size]=\"itemSize\"\n >\n <button\n *ngFor=\"let item of filtered\"\n tuiOption\n automation-id=\"tui-input-time__item\"\n [disabled]=\"disabledItemHandler(item)\"\n [value]=\"item\"\n >\n {{ item }}\n </button>\n </tui-data-list>\n</ng-template>\n\n<ng-template #iconContent>\n <tui-svg\n *polymorpheusOutlet=\"icon as src; context: {$implicit: size}\"\n tuiWrapper\n appearance=\"icon\"\n [src]=\"src\"\n ></tui-svg>\n <input\n *ngIf=\"showNativePicker\"\n tuiTime\n />\n</ng-template>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}:host._disabled{pointer-events:none}.t-wrapper{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}\n"], components: [{ type: i1__namespace.TuiHostedDropdownComponent, selector: "tui-hosted-dropdown", inputs: ["content", "sided", "canOpen", "open"], outputs: ["openChange", "focusedChange"] }, { type: i1__namespace.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1__namespace.TuiTextfieldComponent, selector: "input[tuiTextfield], textarea[tuiTextfield]" }, { type: i1__namespace.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent", "size"] }, { type: i1__namespace.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: TuiNativeTimeComponent, selector: "input[tuiTime]" }], directives: [{ type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i3__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i1__namespace.TuiTextfieldFillerDirective, selector: "[tuiTextfieldFiller]", inputs: ["tuiTextfieldFiller"] }, { type: i3__namespace.MaskedInputDirective, selector: "[textMask]", inputs: ["textMask"], exportAs: ["textMask"] }, { type: i1__namespace.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i4__namespace.AsyncPipe }, viewProviders: [providers.FIXED_DROPDOWN_CONTROLLER_PROVIDER], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
600
704
  __decorate([
601
- cdk.tuiDefaultProp()
705
+ i2.tuiDefaultProp()
602
706
  ], TuiInputTimeComponent.prototype, "disabledItemHandler", void 0);
603
707
  __decorate([
604
- cdk.tuiDefaultProp()
708
+ i2.tuiDefaultProp()
605
709
  ], TuiInputTimeComponent.prototype, "items", void 0);
606
710
  __decorate([
607
- cdk.tuiDefaultProp()
711
+ i2.tuiDefaultProp()
608
712
  ], TuiInputTimeComponent.prototype, "itemSize", void 0);
609
713
  __decorate([
610
- cdk.tuiDefaultProp()
714
+ i2.tuiDefaultProp()
611
715
  ], TuiInputTimeComponent.prototype, "strict", void 0);
612
716
  __decorate([
613
- cdk.tuiDefaultProp()
717
+ i2.tuiDefaultProp()
614
718
  ], TuiInputTimeComponent.prototype, "mode", void 0);
615
719
  __decorate([
616
- cdk.tuiDefaultProp()
720
+ i2.tuiDefaultProp()
617
721
  ], TuiInputTimeComponent.prototype, "postfix", void 0);
618
722
  __decorate([
619
- cdk.tuiPure
723
+ i2.tuiPure
620
724
  ], TuiInputTimeComponent.prototype, "getFiller$", null);
621
725
  __decorate([
622
- cdk.tuiPure
726
+ i2.tuiPure
623
727
  ], TuiInputTimeComponent.prototype, "calculateMask", null);
624
728
  __decorate([
625
- cdk.tuiPure
729
+ i2.tuiPure
626
730
  ], TuiInputTimeComponent.prototype, "filter", null);
627
731
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputTimeComponent, decorators: [{
628
732
  type: i0.Component,
@@ -632,30 +736,39 @@
632
736
  styleUrls: ['./input-time.style.less'],
633
737
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
634
738
  providers: [
635
- cdk.tuiAsFocusableItemAccessor(TuiInputTimeComponent),
636
- cdk.tuiAsControl(TuiInputTimeComponent),
739
+ i2.tuiAsFocusableItemAccessor(TuiInputTimeComponent),
740
+ i2.tuiAsControl(TuiInputTimeComponent),
637
741
  i1.tuiAsDataListHost(TuiInputTimeComponent),
638
742
  i1.tuiAsOptionContent(selectOption.TUI_SELECT_OPTION),
639
743
  ],
640
744
  viewProviders: [providers.FIXED_DROPDOWN_CONTROLLER_PROVIDER],
641
745
  }]
642
746
  }], ctorParameters: function () {
643
- return [{ type: i4__namespace.NgControl, decorators: [{
747
+ return [{ type: i6__namespace.NgControl, decorators: [{
644
748
  type: i0.Optional
645
749
  }, {
646
750
  type: i0.Self
647
751
  }, {
648
752
  type: i0.Inject,
649
- args: [i4.NgControl]
753
+ args: [i6.NgControl]
650
754
  }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
651
755
  type: i0.Inject,
652
756
  args: [i0.ChangeDetectorRef]
653
- }] }, { type: i5__namespace.Observable, decorators: [{
757
+ }] }, { type: i7__namespace.Observable, decorators: [{
654
758
  type: i0.Inject,
655
759
  args: [tokens.TUI_TIME_TEXTS]
656
760
  }] }, { type: undefined, decorators: [{
657
761
  type: i0.Inject,
658
762
  args: [TUI_INPUT_TIME_OPTIONS]
763
+ }] }, { type: undefined, decorators: [{
764
+ type: i0.Inject,
765
+ args: [i2.TUI_IS_MOBILE]
766
+ }] }, { type: i1__namespace.TuiTextfieldSizeDirective, decorators: [{
767
+ type: i0.Inject,
768
+ args: [i1.TUI_TEXTFIELD_SIZE]
769
+ }] }, { type: undefined, decorators: [{
770
+ type: i0.Inject,
771
+ args: [i2.TUI_IS_IOS]
659
772
  }] }];
660
773
  }, propDecorators: { textfield: [{
661
774
  type: i0.ViewChild,
@@ -677,45 +790,101 @@
677
790
  args: ['click']
678
791
  }], calculateMask: [], filter: [] } });
679
792
 
793
+ var TuiInputTimeDirective = /** @class */ (function (_super) {
794
+ __extends(TuiInputTimeDirective, _super);
795
+ function TuiInputTimeDirective() {
796
+ return _super !== null && _super.apply(this, arguments) || this;
797
+ }
798
+ Object.defineProperty(TuiInputTimeDirective.prototype, "value", {
799
+ get: function () {
800
+ return this.host.computedValue;
801
+ },
802
+ enumerable: false,
803
+ configurable: true
804
+ });
805
+ Object.defineProperty(TuiInputTimeDirective.prototype, "mode", {
806
+ get: function () {
807
+ return this.host.mode;
808
+ },
809
+ enumerable: false,
810
+ configurable: true
811
+ });
812
+ Object.defineProperty(TuiInputTimeDirective.prototype, "items", {
813
+ get: function () {
814
+ return this.host.items;
815
+ },
816
+ enumerable: false,
817
+ configurable: true
818
+ });
819
+ TuiInputTimeDirective.prototype.onValueChange = function (value) {
820
+ if (!value) {
821
+ this.host.nativeValue = '';
822
+ }
823
+ this.host.onValueChange(value);
824
+ };
825
+ TuiInputTimeDirective.prototype.process = function (input) {
826
+ input.inputMode = 'numeric';
827
+ };
828
+ return TuiInputTimeDirective;
829
+ }(i1.AbstractTuiTextfieldHost));
830
+ TuiInputTimeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputTimeDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
831
+ TuiInputTimeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputTimeDirective, selector: "tui-input-time", providers: [i1.tuiAsTextfieldHost(TuiInputTimeDirective)], usesInheritance: true, ngImport: i0__namespace });
832
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputTimeDirective, decorators: [{
833
+ type: i0.Directive,
834
+ args: [{
835
+ selector: 'tui-input-time',
836
+ providers: [i1.tuiAsTextfieldHost(TuiInputTimeDirective)],
837
+ }]
838
+ }] });
839
+
680
840
  var TuiInputTimeModule = /** @class */ (function () {
681
841
  function TuiInputTimeModule() {
682
842
  }
683
843
  return TuiInputTimeModule;
684
844
  }());
685
845
  TuiInputTimeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputTimeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
686
- TuiInputTimeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputTimeModule, declarations: [TuiInputTimeComponent], imports: [i3.CommonModule,
687
- i2.TextMaskModule,
846
+ TuiInputTimeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputTimeModule, declarations: [TuiInputTimeComponent, TuiNativeTimeComponent, TuiInputTimeDirective], imports: [i4.CommonModule,
847
+ i3.TextMaskModule,
688
848
  selectOption.TuiSelectOptionModule,
689
849
  i1.TuiDataListModule,
850
+ i1.TuiWrapperModule,
690
851
  i1.TuiHostedDropdownModule,
691
852
  i1.TuiPrimitiveTextfieldModule,
692
- i2.TuiValueAccessorModule,
693
- i1.TuiTextfieldControllerModule], exports: [TuiInputTimeComponent] });
853
+ i3.TuiValueAccessorModule,
854
+ i1.TuiTextfieldControllerModule,
855
+ i1.TuiSvgModule,
856
+ i5.PolymorpheusModule], exports: [TuiInputTimeComponent, TuiInputTimeDirective] });
694
857
  TuiInputTimeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputTimeModule, imports: [[
695
- i3.CommonModule,
696
- i2.TextMaskModule,
858
+ i4.CommonModule,
859
+ i3.TextMaskModule,
697
860
  selectOption.TuiSelectOptionModule,
698
861
  i1.TuiDataListModule,
862
+ i1.TuiWrapperModule,
699
863
  i1.TuiHostedDropdownModule,
700
864
  i1.TuiPrimitiveTextfieldModule,
701
- i2.TuiValueAccessorModule,
865
+ i3.TuiValueAccessorModule,
702
866
  i1.TuiTextfieldControllerModule,
867
+ i1.TuiSvgModule,
868
+ i5.PolymorpheusModule,
703
869
  ]] });
704
870
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputTimeModule, decorators: [{
705
871
  type: i0.NgModule,
706
872
  args: [{
707
873
  imports: [
708
- i3.CommonModule,
709
- i2.TextMaskModule,
874
+ i4.CommonModule,
875
+ i3.TextMaskModule,
710
876
  selectOption.TuiSelectOptionModule,
711
877
  i1.TuiDataListModule,
878
+ i1.TuiWrapperModule,
712
879
  i1.TuiHostedDropdownModule,
713
880
  i1.TuiPrimitiveTextfieldModule,
714
- i2.TuiValueAccessorModule,
881
+ i3.TuiValueAccessorModule,
715
882
  i1.TuiTextfieldControllerModule,
883
+ i1.TuiSvgModule,
884
+ i5.PolymorpheusModule,
716
885
  ],
717
- declarations: [TuiInputTimeComponent],
718
- exports: [TuiInputTimeComponent],
886
+ declarations: [TuiInputTimeComponent, TuiNativeTimeComponent, TuiInputTimeDirective],
887
+ exports: [TuiInputTimeComponent, TuiInputTimeDirective],
719
888
  }]
720
889
  }] });
721
890
 
@@ -726,6 +895,7 @@
726
895
  exports.TUI_INPUT_TIME_DEFAULT_OPTIONS = TUI_INPUT_TIME_DEFAULT_OPTIONS;
727
896
  exports.TUI_INPUT_TIME_OPTIONS = TUI_INPUT_TIME_OPTIONS;
728
897
  exports.TuiInputTimeComponent = TuiInputTimeComponent;
898
+ exports.TuiInputTimeDirective = TuiInputTimeDirective;
729
899
  exports.TuiInputTimeModule = TuiInputTimeModule;
730
900
  exports.tuiInputTimeOptionsProvider = tuiInputTimeOptionsProvider;
731
901