@taiga-ui/addon-mobile 2.83.0 → 2.85.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 (68) hide show
  1. package/bundles/taiga-ui-addon-mobile-components-app-bar.umd.js +411 -0
  2. package/bundles/taiga-ui-addon-mobile-components-app-bar.umd.js.map +1 -0
  3. package/bundles/taiga-ui-addon-mobile-components-app-bar.umd.min.js +2 -0
  4. package/bundles/taiga-ui-addon-mobile-components-app-bar.umd.min.js.map +1 -0
  5. package/bundles/taiga-ui-addon-mobile-components-tab-bar.umd.js +435 -0
  6. package/bundles/taiga-ui-addon-mobile-components-tab-bar.umd.js.map +1 -0
  7. package/bundles/taiga-ui-addon-mobile-components-tab-bar.umd.min.js +2 -0
  8. package/bundles/taiga-ui-addon-mobile-components-tab-bar.umd.min.js.map +1 -0
  9. package/bundles/taiga-ui-addon-mobile-components.umd.js +20 -4
  10. package/bundles/taiga-ui-addon-mobile-components.umd.js.map +1 -1
  11. package/bundles/taiga-ui-addon-mobile-components.umd.min.js +1 -1
  12. package/components/app-bar/app-bar-back.component.d.ts +2 -0
  13. package/components/app-bar/app-bar.component.d.ts +11 -0
  14. package/components/app-bar/app-bar.directive.d.ts +3 -0
  15. package/components/app-bar/app-bar.module.d.ts +2 -0
  16. package/components/app-bar/index.d.ts +4 -0
  17. package/components/app-bar/package.json +13 -0
  18. package/components/app-bar/taiga-ui-addon-mobile-components-app-bar.d.ts +4 -0
  19. package/components/app-bar/taiga-ui-addon-mobile-components-app-bar.metadata.json +1 -0
  20. package/components/index.d.ts +2 -0
  21. package/components/tab-bar/index.d.ts +4 -0
  22. package/components/tab-bar/package.json +13 -0
  23. package/components/tab-bar/tab-bar-item.component.d.ts +15 -0
  24. package/components/tab-bar/tab-bar-item.directive.d.ts +6 -0
  25. package/components/tab-bar/tab-bar.component.d.ts +9 -0
  26. package/components/tab-bar/tab-bar.module.d.ts +2 -0
  27. package/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.d.ts +4 -0
  28. package/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.metadata.json +1 -0
  29. package/components/taiga-ui-addon-mobile-components.metadata.json +1 -1
  30. package/esm2015/components/app-bar/app-bar-back.component.js +14 -0
  31. package/esm2015/components/app-bar/app-bar.component.js +64 -0
  32. package/esm2015/components/app-bar/app-bar.directive.js +17 -0
  33. package/esm2015/components/app-bar/app-bar.module.js +18 -0
  34. package/esm2015/components/app-bar/index.js +5 -0
  35. package/esm2015/components/app-bar/taiga-ui-addon-mobile-components-app-bar.js +5 -0
  36. package/esm2015/components/index.js +3 -1
  37. package/esm2015/components/tab-bar/index.js +5 -0
  38. package/esm2015/components/tab-bar/tab-bar-item.component.js +35 -0
  39. package/esm2015/components/tab-bar/tab-bar-item.directive.js +36 -0
  40. package/esm2015/components/tab-bar/tab-bar.component.js +48 -0
  41. package/esm2015/components/tab-bar/tab-bar.module.js +18 -0
  42. package/esm2015/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.js +5 -0
  43. package/esm5/components/app-bar/app-bar-back.component.js +17 -0
  44. package/esm5/components/app-bar/app-bar.component.js +66 -0
  45. package/esm5/components/app-bar/app-bar.directive.js +18 -0
  46. package/esm5/components/app-bar/app-bar.module.js +21 -0
  47. package/esm5/components/app-bar/index.js +5 -0
  48. package/esm5/components/app-bar/taiga-ui-addon-mobile-components-app-bar.js +5 -0
  49. package/esm5/components/index.js +3 -1
  50. package/esm5/components/tab-bar/index.js +5 -0
  51. package/esm5/components/tab-bar/tab-bar-item.component.js +36 -0
  52. package/esm5/components/tab-bar/tab-bar-item.directive.js +38 -0
  53. package/esm5/components/tab-bar/tab-bar.component.js +56 -0
  54. package/esm5/components/tab-bar/tab-bar.module.js +21 -0
  55. package/esm5/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.js +5 -0
  56. package/fesm2015/taiga-ui-addon-mobile-components-app-bar.js +106 -0
  57. package/fesm2015/taiga-ui-addon-mobile-components-app-bar.js.map +1 -0
  58. package/fesm2015/taiga-ui-addon-mobile-components-tab-bar.js +126 -0
  59. package/fesm2015/taiga-ui-addon-mobile-components-tab-bar.js.map +1 -0
  60. package/fesm2015/taiga-ui-addon-mobile-components.js +2 -0
  61. package/fesm2015/taiga-ui-addon-mobile-components.js.map +1 -1
  62. package/fesm5/taiga-ui-addon-mobile-components-app-bar.js +115 -0
  63. package/fesm5/taiga-ui-addon-mobile-components-app-bar.js.map +1 -0
  64. package/fesm5/taiga-ui-addon-mobile-components-tab-bar.js +140 -0
  65. package/fesm5/taiga-ui-addon-mobile-components-tab-bar.js.map +1 -0
  66. package/fesm5/taiga-ui-addon-mobile-components.js +2 -0
  67. package/fesm5/taiga-ui-addon-mobile-components.js.map +1 -1
  68. package/package.json +4 -4
@@ -0,0 +1,126 @@
1
+ import { __decorate, __param } from 'tslib';
2
+ import { Inject, Input, Component, ChangeDetectionStrategy, EventEmitter, ContentChildren, forwardRef, ElementRef, Output, HostListener, HostBinding, Self, ChangeDetectorRef, Directive, NgModule } from '@angular/core';
3
+ import { EMPTY_QUERY, tuiIsElement, tuiWatch, TuiDestroyService } from '@taiga-ui/cdk';
4
+ import { TUI_ANIMATION_OPTIONS, tuiScaleIn, TuiRouterLinkActiveService, TuiSvgModule } from '@taiga-ui/core';
5
+ import { CommonModule } from '@angular/common';
6
+ import { Observable } from 'rxjs';
7
+ import { filter, takeUntil } from 'rxjs/operators';
8
+
9
+ let TuiTabBarItemComponent = class TuiTabBarItemComponent {
10
+ constructor(animationOptions) {
11
+ this.animationOptions = animationOptions;
12
+ this.icon = '';
13
+ this.badge = null;
14
+ this.animation = Object.assign({ value: '' }, this.animationOptions);
15
+ }
16
+ format(value) {
17
+ return value > 999 ? '999+' : String(value);
18
+ }
19
+ };
20
+ TuiTabBarItemComponent.ctorParameters = () => [
21
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] }
22
+ ];
23
+ __decorate([
24
+ Input()
25
+ ], TuiTabBarItemComponent.prototype, "icon", void 0);
26
+ __decorate([
27
+ Input()
28
+ ], TuiTabBarItemComponent.prototype, "badge", void 0);
29
+ TuiTabBarItemComponent = __decorate([
30
+ Component({
31
+ selector: 'button[tuiTabBarItem], a[tuiTabBarItem]',
32
+ template: "<tui-svg\n class=\"t-icon\"\n [src]=\"icon\"\n></tui-svg>\n<span class=\"t-wrapper\">\n <span\n *ngIf=\"badge as value\"\n class=\"t-badge\"\n [@tuiScaleIn]=\"animation\"\n >\n {{ format(value) }}\n </span>\n</span>\n<span class=\"t-text\">\n <ng-content></ng-content>\n</span>\n",
33
+ changeDetection: ChangeDetectionStrategy.OnPush,
34
+ animations: [tuiScaleIn],
35
+ styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;display:flex;flex:1 0;font:inherit;flex-direction:column;align-items:center;overflow:hidden;text-decoration:none}:host:nth-child(1){color:var(--tui-tab-1,inherit)}:host:nth-child(2){color:var(--tui-tab-2,inherit)}:host:nth-child(3){color:var(--tui-tab-3,inherit)}:host:nth-child(4){color:var(--tui-tab-4,inherit)}:host:nth-child(5){color:var(--tui-tab-5,inherit)}:host:nth-child(6){color:var(--tui-tab-6,inherit)}:host:nth-child(7){color:var(--tui-tab-7,inherit)}:host:nth-child(8){color:var(--tui-tab-8,inherit)}:host:nth-child(9){color:var(--tui-tab-9,inherit)}:host:nth-child(10){color:var(--tui-tab-10,inherit)}.t-icon{width:1.75rem;height:1.75rem;margin:.375rem 0 .125rem;pointer-events:none}.t-wrapper{position:absolute;top:.125rem;left:1rem;display:flex;width:100%;justify-content:center;pointer-events:none}.t-badge{display:flex;height:1.125rem;min-width:1.125rem;align-items:center;padding:0 .25rem;border-radius:1rem;font-size:.8125rem;box-sizing:border-box;color:var(--tui-base-01);background:var(--tui-error-fill)}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}"]
36
+ }),
37
+ __param(0, Inject(TUI_ANIMATION_OPTIONS))
38
+ ], TuiTabBarItemComponent);
39
+
40
+ let TuiTabBarComponent = class TuiTabBarComponent {
41
+ constructor() {
42
+ this.tabs = EMPTY_QUERY;
43
+ this.activeItemIndex = NaN;
44
+ this.activeItemIndexChange = new EventEmitter();
45
+ }
46
+ setActive(tab) {
47
+ if (tuiIsElement(tab)) {
48
+ this.updateIndex(this.tabs.toArray().findIndex(({ nativeElement }) => nativeElement === tab));
49
+ }
50
+ }
51
+ get style() {
52
+ return `--tui-tab-${this.activeItemIndex + 1}: var(--tui-active-color)`;
53
+ }
54
+ updateIndex(index) {
55
+ this.activeItemIndex = index;
56
+ this.activeItemIndexChange.emit(index);
57
+ }
58
+ };
59
+ __decorate([
60
+ ContentChildren(forwardRef(() => TuiTabBarItemComponent), { read: ElementRef })
61
+ ], TuiTabBarComponent.prototype, "tabs", void 0);
62
+ __decorate([
63
+ Input()
64
+ ], TuiTabBarComponent.prototype, "activeItemIndex", void 0);
65
+ __decorate([
66
+ Output()
67
+ ], TuiTabBarComponent.prototype, "activeItemIndexChange", void 0);
68
+ __decorate([
69
+ HostListener('click', ['$event.target'])
70
+ ], TuiTabBarComponent.prototype, "setActive", null);
71
+ __decorate([
72
+ HostBinding('style')
73
+ ], TuiTabBarComponent.prototype, "style", null);
74
+ TuiTabBarComponent = __decorate([
75
+ Component({
76
+ selector: 'nav[tuiTabBar]',
77
+ template: '<ng-content></ng-content>',
78
+ changeDetection: ChangeDetectionStrategy.OnPush,
79
+ styles: [":host{--tui-active-color:var(--tui-primary);position:relative;display:flex;align-items:flex-start;font:.625rem/.75rem -apple-system,BlinkMacSystemFont,system-ui,Roboto,'Segoe UI',sans-serif;height:var(--tui-height-l);color:var(--tui-text-03);-webkit-backdrop-filter:blur(.25rem);backdrop-filter:blur(.25rem)}:host:before{position:absolute;top:0;left:0;width:100%;height:100%;content:'';background:var(--tui-elevation-01);box-shadow:inset 0 1px var(--tui-base-04);opacity:.9}"]
80
+ })
81
+ ], TuiTabBarComponent);
82
+
83
+ let TuiTabBarItemDirective = class TuiTabBarItemDirective {
84
+ constructor(destroy$, active$, tabs, { nativeElement }, changeDetectorRef) {
85
+ active$
86
+ .pipe(filter(Boolean), tuiWatch(changeDetectorRef), takeUntil(destroy$))
87
+ .subscribe(() => {
88
+ tabs.setActive(nativeElement);
89
+ });
90
+ }
91
+ };
92
+ TuiTabBarItemDirective.ctorParameters = () => [
93
+ { type: Observable, decorators: [{ type: Self }, { type: Inject, args: [TuiDestroyService,] }] },
94
+ { type: Observable, decorators: [{ type: Inject, args: [TuiRouterLinkActiveService,] }] },
95
+ { type: TuiTabBarComponent, decorators: [{ type: Inject, args: [TuiTabBarComponent,] }] },
96
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
97
+ { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] }
98
+ ];
99
+ TuiTabBarItemDirective = __decorate([
100
+ Directive({
101
+ selector: '[tuiTabBarItem][routerLinkActive]',
102
+ providers: [TuiRouterLinkActiveService, TuiDestroyService],
103
+ }),
104
+ __param(0, Self()), __param(0, Inject(TuiDestroyService)),
105
+ __param(1, Inject(TuiRouterLinkActiveService)),
106
+ __param(2, Inject(TuiTabBarComponent)),
107
+ __param(3, Inject(ElementRef)),
108
+ __param(4, Inject(ChangeDetectorRef))
109
+ ], TuiTabBarItemDirective);
110
+
111
+ let TuiTabBarModule = class TuiTabBarModule {
112
+ };
113
+ TuiTabBarModule = __decorate([
114
+ NgModule({
115
+ imports: [CommonModule, TuiSvgModule],
116
+ declarations: [TuiTabBarComponent, TuiTabBarItemComponent, TuiTabBarItemDirective],
117
+ exports: [TuiTabBarComponent, TuiTabBarItemComponent, TuiTabBarItemDirective],
118
+ })
119
+ ], TuiTabBarModule);
120
+
121
+ /**
122
+ * Generated bundle index. Do not edit.
123
+ */
124
+
125
+ export { TuiTabBarComponent, TuiTabBarItemComponent, TuiTabBarItemDirective, TuiTabBarModule };
126
+ //# sourceMappingURL=taiga-ui-addon-mobile-components-tab-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-tab-bar.js","sources":["ng://@taiga-ui/addon-mobile/components/tab-bar/tab-bar-item.component.ts","ng://@taiga-ui/addon-mobile/components/tab-bar/tab-bar.component.ts","ng://@taiga-ui/addon-mobile/components/tab-bar/tab-bar-item.directive.ts","ng://@taiga-ui/addon-mobile/components/tab-bar/tab-bar.module.ts","ng://@taiga-ui/addon-mobile/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, Inject, Input} from '@angular/core';\nimport {TUI_ANIMATION_OPTIONS, tuiScaleIn} from '@taiga-ui/core';\n\n@Component({\n selector: 'button[tuiTabBarItem], a[tuiTabBarItem]',\n templateUrl: './tab-bar-item.template.html',\n styleUrls: ['./tab-bar-item.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiScaleIn],\n})\nexport class TuiTabBarItemComponent {\n @Input()\n icon = '';\n\n @Input()\n badge?: number | null = null;\n\n readonly animation = {value: '', ...this.animationOptions} as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS)\n private readonly animationOptions: AnimationOptions,\n ) {}\n\n format(value: number): string {\n return value > 999 ? '999+' : String(value);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n Input,\n Output,\n QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY, tuiIsElement} from '@taiga-ui/cdk';\n\nimport {TuiTabBarItemComponent} from './tab-bar-item.component';\n\n@Component({\n selector: 'nav[tuiTabBar]',\n template: '<ng-content></ng-content>',\n styleUrls: ['./tab-bar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTabBarComponent {\n @ContentChildren(forwardRef(() => TuiTabBarItemComponent), {read: ElementRef})\n private readonly tabs: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @Input()\n activeItemIndex = NaN;\n\n @Output()\n readonly activeItemIndexChange = new EventEmitter<number>();\n\n @HostListener('click', ['$event.target'])\n setActive(tab: EventTarget): void {\n if (tuiIsElement(tab)) {\n this.updateIndex(\n this.tabs.toArray().findIndex(({nativeElement}) => nativeElement === tab),\n );\n }\n }\n\n @HostBinding('style')\n get style(): string {\n return `--tui-tab-${this.activeItemIndex + 1}: var(--tui-active-color)`;\n }\n\n private updateIndex(index: number): void {\n this.activeItemIndex = index;\n this.activeItemIndexChange.emit(index);\n }\n}\n","import {ChangeDetectorRef, Directive, ElementRef, Inject, Self} from '@angular/core';\nimport {TuiDestroyService, tuiWatch} from '@taiga-ui/cdk';\nimport {TuiRouterLinkActiveService} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {filter, takeUntil} from 'rxjs/operators';\n\nimport {TuiTabBarComponent} from './tab-bar.component';\n\n@Directive({\n selector: '[tuiTabBarItem][routerLinkActive]',\n providers: [TuiRouterLinkActiveService, TuiDestroyService],\n})\nexport class TuiTabBarItemDirective {\n constructor(\n @Self() @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(TuiRouterLinkActiveService) active$: Observable<boolean>,\n @Inject(TuiTabBarComponent) tabs: TuiTabBarComponent,\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n ) {\n active$\n .pipe(filter(Boolean), tuiWatch(changeDetectorRef), takeUntil(destroy$))\n .subscribe(() => {\n tabs.setActive(nativeElement);\n });\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiTabBarComponent} from './tab-bar.component';\nimport {TuiTabBarItemComponent} from './tab-bar-item.component';\nimport {TuiTabBarItemDirective} from './tab-bar-item.directive';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiTabBarComponent, TuiTabBarItemComponent, TuiTabBarItemDirective],\n exports: [TuiTabBarComponent, TuiTabBarItemComponent, TuiTabBarItemDirective],\n})\nexport class TuiTabBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAWa,sBAAsB,GAAnC,MAAa,sBAAsB;IAS/B,YAEqB,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;QATvD,SAAI,GAAG,EAAE,CAAC;QAGV,UAAK,GAAmB,IAAI,CAAC;QAEpB,cAAS,GAAG,gBAAC,KAAK,EAAE,EAAE,IAAK,IAAI,CAAC,gBAAgB,CAAU,CAAC;KAKhE;IAEJ,MAAM,CAAC,KAAa;QAChB,OAAO,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;KAC/C;EACJ;;4CAPQ,MAAM,SAAC,qBAAqB;;AARjC;IADC,KAAK,EAAE;oDACE;AAGV;IADC,KAAK,EAAE;qDACqB;AALpB,sBAAsB;IAPlC,SAAS,CAAC;QACP,QAAQ,EAAE,yCAAyC;QACnD,iVAA2C;QAE3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,UAAU,EAAE,CAAC,UAAU,CAAC;;KAC3B,CAAC;IAWO,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;GAVzB,sBAAsB,CAiBlC;;ICLY,kBAAkB,GAA/B,MAAa,kBAAkB;IAA/B;QAEqB,SAAI,GAAuC,WAAW,CAAC;QAGxE,oBAAe,GAAG,GAAG,CAAC;QAGb,0BAAqB,GAAG,IAAI,YAAY,EAAU,CAAC;KAoB/D;IAjBG,SAAS,CAAC,GAAgB;QACtB,IAAI,YAAY,CAAC,GAAG,CAAC,EAAE;YACnB,IAAI,CAAC,WAAW,CACZ,IAAI,CAAC,IAAI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A,kBAAkB,uBAAnD,MAAM,SAAC,kBAAkB;YACW,UAAU,uBAA9C,MAAM,SAAC,UAAU;YAC4B,iBAAiB,uBAA9D,MAAM,SAAC,iBAAiB;;AANpB,sBAAsB;IAJlC,SAAS,CAAC;QACP,QAAQ,EAAE,mCAAmC;QAC7C,SAAS,EAAE,CAAC,0BAA0B,EAAE,iBAAiB,CAAC;KAC7D,CAAC;IAGO,WAAA,IAAI,EAAE,CAAA,EAAE,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,0BAA0B,CAAC,CAAA;IAClC,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;IAC1B,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GANrB,sBAAsB,CAclC;;ICbY,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAL3B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QACrC,YAAY,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,sBAAsB,CAAC;QAClF,OAAO,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,sBAAsB,CAAC;KAChF,CAAC;GACW,eAAe,CAAG;;ACb/B;;;;;;"}
@@ -1,8 +1,10 @@
1
+ export * from '@taiga-ui/addon-mobile/components/app-bar';
1
2
  export * from '@taiga-ui/addon-mobile/components/mobile-calendar';
2
3
  export * from '@taiga-ui/addon-mobile/components/mobile-calendar-dialog';
3
4
  export * from '@taiga-ui/addon-mobile/components/mobile-dialog';
4
5
  export * from '@taiga-ui/addon-mobile/components/pull-to-refresh';
5
6
  export * from '@taiga-ui/addon-mobile/components/sheet';
7
+ export * from '@taiga-ui/addon-mobile/components/tab-bar';
6
8
  export * from '@taiga-ui/addon-mobile/components/theme-android';
7
9
  export * from '@taiga-ui/addon-mobile/components/theme-ios';
8
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components.js","sources":["ng://@taiga-ui/addon-mobile/components/taiga-ui-addon-mobile-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components.js","sources":["ng://@taiga-ui/addon-mobile/components/taiga-ui-addon-mobile-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;"}
@@ -0,0 +1,115 @@
1
+ import { __assign, __decorate, __param } from 'tslib';
2
+ import { Inject, ViewChildren, Component, ChangeDetectionStrategy, Input, Directive, NgModule } from '@angular/core';
3
+ import { MUTATION_OBSERVER_INIT, MutationObserverService } from '@ng-web-apis/mutation-observer';
4
+ import { EMPTY_QUERY, TuiResizeService, TuiDestroyService } from '@taiga-ui/cdk';
5
+ import { TUI_BUTTON_OPTIONS, TUI_BUTTON_DEFAULT_OPTIONS, TuiSvgModule } from '@taiga-ui/core';
6
+ import { merge, Observable } from 'rxjs';
7
+ import { map } from 'rxjs/operators';
8
+ import { CommonModule } from '@angular/common';
9
+
10
+ // note: fix problem for strange behavior in viewEngine with export { ɵ_0, ɵ_1 };
11
+ function tuiProvideMutationOptionsForAppBar() {
12
+ return {
13
+ provide: TUI_BUTTON_OPTIONS,
14
+ useValue: {
15
+ characterData: true,
16
+ childList: true,
17
+ subtree: true,
18
+ },
19
+ };
20
+ }
21
+ // note: fix problem for strange behavior in viewEngine with export { ɵ_0, ɵ_1 };
22
+ function tuiProvideButtonOptionsForAppBar() {
23
+ return {
24
+ provide: MUTATION_OBSERVER_INIT,
25
+ useValue: __assign(__assign({}, TUI_BUTTON_DEFAULT_OPTIONS), { size: 'm', appearance: '' }),
26
+ };
27
+ }
28
+ // @dynamic
29
+ var TuiAppBarComponent = /** @class */ (function () {
30
+ function TuiAppBarComponent(resize$, mutation$) {
31
+ var _this = this;
32
+ this.resize$ = resize$;
33
+ this.mutation$ = mutation$;
34
+ this.side = EMPTY_QUERY;
35
+ this.width$ = merge(this.resize$, this.mutation$).pipe(map(function () {
36
+ var _a, _b;
37
+ return 2 *
38
+ Math.max((_a = _this.side.first) === null || _a === void 0 ? void 0 : _a.nativeElement.clientWidth, (_b = _this.side.last) === null || _b === void 0 ? void 0 : _b.nativeElement.clientWidth);
39
+ }));
40
+ }
41
+ TuiAppBarComponent.ctorParameters = function () { return [
42
+ { type: Observable, decorators: [{ type: Inject, args: [TuiResizeService,] }] },
43
+ { type: Observable, decorators: [{ type: Inject, args: [MutationObserverService,] }] }
44
+ ]; };
45
+ __decorate([
46
+ ViewChildren('sideLeft, sideRight')
47
+ ], TuiAppBarComponent.prototype, "side", void 0);
48
+ TuiAppBarComponent = __decorate([
49
+ Component({
50
+ selector: 'tui-app-bar',
51
+ template: "<div\n #sideLeft\n class=\"t-left\"\n>\n <ng-content select=\"[tuiSlot='left']\"></ng-content>\n</div>\n<div\n class=\"t-content\"\n [style.--sides.px]=\"width$ | async\"\n>\n <ng-content></ng-content>\n</div>\n<div\n #sideRight\n class=\"t-right\"\n>\n <ng-content select=\"[tuiSlot='right']\"></ng-content>\n</div>\n",
52
+ changeDetection: ChangeDetectionStrategy.OnPush,
53
+ providers: [
54
+ TuiDestroyService,
55
+ TuiResizeService,
56
+ MutationObserverService,
57
+ tuiProvideMutationOptionsForAppBar(),
58
+ tuiProvideButtonOptionsForAppBar(),
59
+ ],
60
+ styles: [":host{--tui-padding:0.625rem;position:relative;display:flex;height:3rem;align-items:center;justify-content:space-between;border:solid transparent;border-width:0 .375rem;box-sizing:border-box;font:var(--tui-font-text-m);font-weight:700;color:var(--tui-text-01);background:var(--tui-base-01)}:host ::ng-deep [tuiButton][data-size='m']{font-weight:400}.t-content{top:50%;left:50%;transform:translate(-50%,-50%);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:absolute;max-width:calc(100% - var(--sides,0px));flex:1;padding:0 .375rem;box-sizing:border-box;text-align:center;color:var(--tui-text-01)}"]
61
+ }),
62
+ __param(0, Inject(TuiResizeService)),
63
+ __param(1, Inject(MutationObserverService))
64
+ ], TuiAppBarComponent);
65
+ return TuiAppBarComponent;
66
+ }());
67
+
68
+ var TuiAppBarDirective = /** @class */ (function () {
69
+ function TuiAppBarDirective() {
70
+ this.tuiSlot = 'left';
71
+ }
72
+ __decorate([
73
+ Input()
74
+ ], TuiAppBarDirective.prototype, "tuiSlot", void 0);
75
+ TuiAppBarDirective = __decorate([
76
+ Directive({
77
+ selector: '[tuiSlot]',
78
+ })
79
+ ], TuiAppBarDirective);
80
+ return TuiAppBarDirective;
81
+ }());
82
+
83
+ var TuiAppBarBackComponent = /** @class */ (function () {
84
+ function TuiAppBarBackComponent() {
85
+ }
86
+ TuiAppBarBackComponent = __decorate([
87
+ Component({
88
+ selector: 'button[tuiAppBarBack], a[tuiAppBarBack]',
89
+ template: '<tui-svg src="tuiIconChevronLeftLarge"></tui-svg><ng-content></ng-content>',
90
+ changeDetection: ChangeDetectionStrategy.OnPush,
91
+ styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 .625rem 0 .125rem;border:0;background:0 0;font-size:inherit;line-height:inherit;display:flex;align-items:center}"]
92
+ })
93
+ ], TuiAppBarBackComponent);
94
+ return TuiAppBarBackComponent;
95
+ }());
96
+
97
+ var TuiAppBarModule = /** @class */ (function () {
98
+ function TuiAppBarModule() {
99
+ }
100
+ TuiAppBarModule = __decorate([
101
+ NgModule({
102
+ imports: [CommonModule, TuiSvgModule],
103
+ declarations: [TuiAppBarComponent, TuiAppBarDirective, TuiAppBarBackComponent],
104
+ exports: [TuiAppBarComponent, TuiAppBarDirective, TuiAppBarBackComponent],
105
+ })
106
+ ], TuiAppBarModule);
107
+ return TuiAppBarModule;
108
+ }());
109
+
110
+ /**
111
+ * Generated bundle index. Do not edit.
112
+ */
113
+
114
+ export { TuiAppBarBackComponent, TuiAppBarComponent, TuiAppBarDirective, TuiAppBarModule, tuiProvideButtonOptionsForAppBar, tuiProvideMutationOptionsForAppBar };
115
+ //# sourceMappingURL=taiga-ui-addon-mobile-components-app-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-app-bar.js","sources":["ng://@taiga-ui/addon-mobile/components/app-bar/app-bar.component.ts","ng://@taiga-ui/addon-mobile/components/app-bar/app-bar.directive.ts","ng://@taiga-ui/addon-mobile/components/app-bar/app-bar-back.component.ts","ng://@taiga-ui/addon-mobile/components/app-bar/app-bar.module.ts","ng://@taiga-ui/addon-mobile/components/app-bar/taiga-ui-addon-mobile-components-app-bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n Provider,\n QueryList,\n ViewChildren,\n} from '@angular/core';\nimport {\n MUTATION_OBSERVER_INIT,\n MutationObserverService,\n} from '@ng-web-apis/mutation-observer';\nimport {EMPTY_QUERY, TuiDestroyService, TuiResizeService} from '@taiga-ui/cdk';\nimport {TUI_BUTTON_DEFAULT_OPTIONS, TUI_BUTTON_OPTIONS} from '@taiga-ui/core';\nimport {merge, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n// note: fix problem for strange behavior in viewEngine with export { ɵ_0, ɵ_1 };\nexport function tuiProvideMutationOptionsForAppBar(): Provider {\n return {\n provide: TUI_BUTTON_OPTIONS,\n useValue: {\n characterData: true,\n childList: true,\n subtree: true,\n },\n };\n}\n\n// note: fix problem for strange behavior in viewEngine with export { ɵ_0, ɵ_1 };\nexport function tuiProvideButtonOptionsForAppBar(): Provider {\n return {\n provide: MUTATION_OBSERVER_INIT,\n useValue: {\n ...TUI_BUTTON_DEFAULT_OPTIONS,\n size: 'm',\n appearance: '',\n },\n };\n}\n\n// @dynamic\n@Component({\n selector: 'tui-app-bar',\n templateUrl: './app-bar.template.html',\n styleUrls: ['./app-bar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n TuiDestroyService,\n TuiResizeService,\n MutationObserverService,\n tuiProvideMutationOptionsForAppBar(),\n tuiProvideButtonOptionsForAppBar(),\n ],\n})\nexport class TuiAppBarComponent {\n @ViewChildren('sideLeft, sideRight')\n private readonly side: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n readonly width$ = merge(this.resize$, this.mutation$).pipe(\n map(\n () =>\n 2 *\n Math.max(\n this.side.first?.nativeElement.clientWidth,\n this.side.last?.nativeElement.clientWidth,\n ),\n ),\n );\n\n constructor(\n @Inject(TuiResizeService) private readonly resize$: Observable<unknown>,\n @Inject(MutationObserverService) private readonly mutation$: Observable<unknown>,\n ) {}\n}\n","import {Directive, Input} from '@angular/core';\n\n@Directive({\n selector: '[tuiSlot]',\n})\nexport class TuiAppBarDirective {\n @Input()\n tuiSlot: 'left' | 'right' = 'left';\n}\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: 'button[tuiAppBarBack], a[tuiAppBarBack]',\n template:\n '<tui-svg src=\"tuiIconChevronLeftLarge\"></tui-svg><ng-content></ng-content>',\n styleUrls: ['./app-bar-back.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiAppBarBackComponent {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiAppBarComponent} from './app-bar.component';\nimport {TuiAppBarDirective} from './app-bar.directive';\nimport {TuiAppBarBackComponent} from './app-bar-back.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiAppBarComponent, TuiAppBarDirective, TuiAppBarBackComponent],\n exports: [TuiAppBarComponent, TuiAppBarDirective, TuiAppBarBackComponent],\n})\nexport class TuiAppBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAkBA;SACgB,kCAAkC;IAC9C,OAAO;QACH,OAAO,EAAE,kBAAkB;QAC3B,QAAQ,EAAE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AC;CAnBD;;;ICnDA;QAEI,YAAO,GAAqB,MAAM,CAAC;KACtC;IADG;QADC,KAAK,EAAE;uDAC2B;IAF1B,kBAAkB;QAH9B,SAAS,CAAC;YACP,QAAQ,EAAE,WAAW;SACxB,CAAC;OACW,kBAAkB,CAG9B;IAAD,yBAAC;CAHD;;;ICIA;KAAsC;IAAzB,sBAAsB;QAPlC,SAAS,CAAC;YACP,QAAQ,EAAE,yCAAyC;YACnD,QAAQ,EACJ,4EAA4E;YAEhF,eAAe,EAAE,uBAAuB,CAAC,MAAM;;SAClD,CAAC;OACW,sBAAsB,CAAG;IAAD,6BAAC;CAAtC;;;ICIA;KAA+B;IAAlB,eAAe;QAL3B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;YACrC,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,sBAAsB,CAAC;YAC9E,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,sBAAsB,CAAC;SAC5E,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACbA;;;;;;"}
@@ -0,0 +1,140 @@
1
+ import { __assign, __decorate, __param } from 'tslib';
2
+ import { Inject, Input, Component, ChangeDetectionStrategy, EventEmitter, ContentChildren, forwardRef, ElementRef, Output, HostListener, HostBinding, Self, ChangeDetectorRef, Directive, NgModule } from '@angular/core';
3
+ import { EMPTY_QUERY, tuiIsElement, tuiWatch, TuiDestroyService } from '@taiga-ui/cdk';
4
+ import { TUI_ANIMATION_OPTIONS, tuiScaleIn, TuiRouterLinkActiveService, TuiSvgModule } from '@taiga-ui/core';
5
+ import { CommonModule } from '@angular/common';
6
+ import { Observable } from 'rxjs';
7
+ import { filter, takeUntil } from 'rxjs/operators';
8
+
9
+ var TuiTabBarItemComponent = /** @class */ (function () {
10
+ function TuiTabBarItemComponent(animationOptions) {
11
+ this.animationOptions = animationOptions;
12
+ this.icon = '';
13
+ this.badge = null;
14
+ this.animation = __assign({ value: '' }, this.animationOptions);
15
+ }
16
+ TuiTabBarItemComponent.prototype.format = function (value) {
17
+ return value > 999 ? '999+' : String(value);
18
+ };
19
+ TuiTabBarItemComponent.ctorParameters = function () { return [
20
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] }
21
+ ]; };
22
+ __decorate([
23
+ Input()
24
+ ], TuiTabBarItemComponent.prototype, "icon", void 0);
25
+ __decorate([
26
+ Input()
27
+ ], TuiTabBarItemComponent.prototype, "badge", void 0);
28
+ TuiTabBarItemComponent = __decorate([
29
+ Component({
30
+ selector: 'button[tuiTabBarItem], a[tuiTabBarItem]',
31
+ template: "<tui-svg\n class=\"t-icon\"\n [src]=\"icon\"\n></tui-svg>\n<span class=\"t-wrapper\">\n <span\n *ngIf=\"badge as value\"\n class=\"t-badge\"\n [@tuiScaleIn]=\"animation\"\n >\n {{ format(value) }}\n </span>\n</span>\n<span class=\"t-text\">\n <ng-content></ng-content>\n</span>\n",
32
+ changeDetection: ChangeDetectionStrategy.OnPush,
33
+ animations: [tuiScaleIn],
34
+ styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:0 0;font-size:inherit;line-height:inherit;transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:relative;display:flex;flex:1 0;font:inherit;flex-direction:column;align-items:center;overflow:hidden;text-decoration:none}:host:nth-child(1){color:var(--tui-tab-1,inherit)}:host:nth-child(2){color:var(--tui-tab-2,inherit)}:host:nth-child(3){color:var(--tui-tab-3,inherit)}:host:nth-child(4){color:var(--tui-tab-4,inherit)}:host:nth-child(5){color:var(--tui-tab-5,inherit)}:host:nth-child(6){color:var(--tui-tab-6,inherit)}:host:nth-child(7){color:var(--tui-tab-7,inherit)}:host:nth-child(8){color:var(--tui-tab-8,inherit)}:host:nth-child(9){color:var(--tui-tab-9,inherit)}:host:nth-child(10){color:var(--tui-tab-10,inherit)}.t-icon{width:1.75rem;height:1.75rem;margin:.375rem 0 .125rem;pointer-events:none}.t-wrapper{position:absolute;top:.125rem;left:1rem;display:flex;width:100%;justify-content:center;pointer-events:none}.t-badge{display:flex;height:1.125rem;min-width:1.125rem;align-items:center;padding:0 .25rem;border-radius:1rem;font-size:.8125rem;box-sizing:border-box;color:var(--tui-base-01);background:var(--tui-error-fill)}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}"]
35
+ }),
36
+ __param(0, Inject(TUI_ANIMATION_OPTIONS))
37
+ ], TuiTabBarItemComponent);
38
+ return TuiTabBarItemComponent;
39
+ }());
40
+
41
+ var TuiTabBarComponent = /** @class */ (function () {
42
+ function TuiTabBarComponent() {
43
+ this.tabs = EMPTY_QUERY;
44
+ this.activeItemIndex = NaN;
45
+ this.activeItemIndexChange = new EventEmitter();
46
+ }
47
+ TuiTabBarComponent.prototype.setActive = function (tab) {
48
+ if (tuiIsElement(tab)) {
49
+ this.updateIndex(this.tabs.toArray().findIndex(function (_a) {
50
+ var nativeElement = _a.nativeElement;
51
+ return nativeElement === tab;
52
+ }));
53
+ }
54
+ };
55
+ Object.defineProperty(TuiTabBarComponent.prototype, "style", {
56
+ get: function () {
57
+ return "--tui-tab-" + (this.activeItemIndex + 1) + ": var(--tui-active-color)";
58
+ },
59
+ enumerable: true,
60
+ configurable: true
61
+ });
62
+ TuiTabBarComponent.prototype.updateIndex = function (index) {
63
+ this.activeItemIndex = index;
64
+ this.activeItemIndexChange.emit(index);
65
+ };
66
+ __decorate([
67
+ ContentChildren(forwardRef(function () { return TuiTabBarItemComponent; }), { read: ElementRef })
68
+ ], TuiTabBarComponent.prototype, "tabs", void 0);
69
+ __decorate([
70
+ Input()
71
+ ], TuiTabBarComponent.prototype, "activeItemIndex", void 0);
72
+ __decorate([
73
+ Output()
74
+ ], TuiTabBarComponent.prototype, "activeItemIndexChange", void 0);
75
+ __decorate([
76
+ HostListener('click', ['$event.target'])
77
+ ], TuiTabBarComponent.prototype, "setActive", null);
78
+ __decorate([
79
+ HostBinding('style')
80
+ ], TuiTabBarComponent.prototype, "style", null);
81
+ TuiTabBarComponent = __decorate([
82
+ Component({
83
+ selector: 'nav[tuiTabBar]',
84
+ template: '<ng-content></ng-content>',
85
+ changeDetection: ChangeDetectionStrategy.OnPush,
86
+ styles: [":host{--tui-active-color:var(--tui-primary);position:relative;display:flex;align-items:flex-start;font:.625rem/.75rem -apple-system,BlinkMacSystemFont,system-ui,Roboto,'Segoe UI',sans-serif;height:var(--tui-height-l);color:var(--tui-text-03);-webkit-backdrop-filter:blur(.25rem);backdrop-filter:blur(.25rem)}:host:before{position:absolute;top:0;left:0;width:100%;height:100%;content:'';background:var(--tui-elevation-01);box-shadow:inset 0 1px var(--tui-base-04);opacity:.9}"]
87
+ })
88
+ ], TuiTabBarComponent);
89
+ return TuiTabBarComponent;
90
+ }());
91
+
92
+ var TuiTabBarItemDirective = /** @class */ (function () {
93
+ function TuiTabBarItemDirective(destroy$, active$, tabs, _a, changeDetectorRef) {
94
+ var nativeElement = _a.nativeElement;
95
+ active$
96
+ .pipe(filter(Boolean), tuiWatch(changeDetectorRef), takeUntil(destroy$))
97
+ .subscribe(function () {
98
+ tabs.setActive(nativeElement);
99
+ });
100
+ }
101
+ TuiTabBarItemDirective.ctorParameters = function () { return [
102
+ { type: Observable, decorators: [{ type: Self }, { type: Inject, args: [TuiDestroyService,] }] },
103
+ { type: Observable, decorators: [{ type: Inject, args: [TuiRouterLinkActiveService,] }] },
104
+ { type: TuiTabBarComponent, decorators: [{ type: Inject, args: [TuiTabBarComponent,] }] },
105
+ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
106
+ { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] }
107
+ ]; };
108
+ TuiTabBarItemDirective = __decorate([
109
+ Directive({
110
+ selector: '[tuiTabBarItem][routerLinkActive]',
111
+ providers: [TuiRouterLinkActiveService, TuiDestroyService],
112
+ }),
113
+ __param(0, Self()), __param(0, Inject(TuiDestroyService)),
114
+ __param(1, Inject(TuiRouterLinkActiveService)),
115
+ __param(2, Inject(TuiTabBarComponent)),
116
+ __param(3, Inject(ElementRef)),
117
+ __param(4, Inject(ChangeDetectorRef))
118
+ ], TuiTabBarItemDirective);
119
+ return TuiTabBarItemDirective;
120
+ }());
121
+
122
+ var TuiTabBarModule = /** @class */ (function () {
123
+ function TuiTabBarModule() {
124
+ }
125
+ TuiTabBarModule = __decorate([
126
+ NgModule({
127
+ imports: [CommonModule, TuiSvgModule],
128
+ declarations: [TuiTabBarComponent, TuiTabBarItemComponent, TuiTabBarItemDirective],
129
+ exports: [TuiTabBarComponent, TuiTabBarItemComponent, TuiTabBarItemDirective],
130
+ })
131
+ ], TuiTabBarModule);
132
+ return TuiTabBarModule;
133
+ }());
134
+
135
+ /**
136
+ * Generated bundle index. Do not edit.
137
+ */
138
+
139
+ export { TuiTabBarComponent, TuiTabBarItemComponent, TuiTabBarItemDirective, TuiTabBarModule };
140
+ //# sourceMappingURL=taiga-ui-addon-mobile-components-tab-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-tab-bar.js","sources":["ng://@taiga-ui/addon-mobile/components/tab-bar/tab-bar-item.component.ts","ng://@taiga-ui/addon-mobile/components/tab-bar/tab-bar.component.ts","ng://@taiga-ui/addon-mobile/components/tab-bar/tab-bar-item.directive.ts","ng://@taiga-ui/addon-mobile/components/tab-bar/tab-bar.module.ts","ng://@taiga-ui/addon-mobile/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, Inject, Input} from '@angular/core';\nimport {TUI_ANIMATION_OPTIONS, tuiScaleIn} from '@taiga-ui/core';\n\n@Component({\n selector: 'button[tuiTabBarItem], a[tuiTabBarItem]',\n templateUrl: './tab-bar-item.template.html',\n styleUrls: ['./tab-bar-item.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiScaleIn],\n})\nexport class TuiTabBarItemComponent {\n @Input()\n icon = '';\n\n @Input()\n badge?: number | null = null;\n\n readonly animation = {value: '', ...this.animationOptions} as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS)\n private readonly animationOptions: AnimationOptions,\n ) {}\n\n format(value: number): string {\n return value > 999 ? '999+' : String(value);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n Input,\n Output,\n QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY, tuiIsElement} from '@taiga-ui/cdk';\n\nimport {TuiTabBarItemComponent} from './tab-bar-item.component';\n\n@Component({\n selector: 'nav[tuiTabBar]',\n template: '<ng-content></ng-content>',\n styleUrls: ['./tab-bar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTabBarComponent {\n @ContentChildren(forwardRef(() => TuiTabBarItemComponent), {read: ElementRef})\n private readonly tabs: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @Input()\n activeItemIndex = NaN;\n\n @Output()\n readonly activeItemIndexChange = new EventEmitter<number>();\n\n @HostListener('click', ['$event.target'])\n setActive(tab: EventTarget): void {\n if (tuiIsElement(tab)) {\n this.updateIndex(\n this.tabs.toArray().findIndex(({nativeElement}) => nativeElement === tab),\n );\n }\n }\n\n @HostBinding('style')\n get style(): string {\n return `--tui-tab-${this.activeItemIndex + 1}: var(--tui-active-color)`;\n }\n\n private updateIndex(index: number): void {\n this.activeItemIndex = index;\n this.activeItemIndexChange.emit(index);\n }\n}\n","import {ChangeDetectorRef, Directive, ElementRef, Inject, Self} from '@angular/core';\nimport {TuiDestroyService, tuiWatch} from '@taiga-ui/cdk';\nimport {TuiRouterLinkActiveService} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {filter, takeUntil} from 'rxjs/operators';\n\nimport {TuiTabBarComponent} from './tab-bar.component';\n\n@Directive({\n selector: '[tuiTabBarItem][routerLinkActive]',\n providers: [TuiRouterLinkActiveService, TuiDestroyService],\n})\nexport class TuiTabBarItemDirective {\n constructor(\n @Self() @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(TuiRouterLinkActiveService) active$: Observable<boolean>,\n @Inject(TuiTabBarComponent) tabs: TuiTabBarComponent,\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n ) {\n active$\n .pipe(filter(Boolean), tuiWatch(changeDetectorRef), takeUntil(destroy$))\n .subscribe(() => {\n tabs.setActive(nativeElement);\n });\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiTabBarComponent} from './tab-bar.component';\nimport {TuiTabBarItemComponent} from './tab-bar-item.component';\nimport {TuiTabBarItemDirective} from './tab-bar-item.directive';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiTabBarComponent, TuiTabBarItemComponent, TuiTabBarItemDirective],\n exports: [TuiTabBarComponent, TuiTabBarItemComponent, TuiTabBarItemDirective],\n})\nexport class TuiTabBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IAoBI,gCAEqB,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;QATvD,SAAI,GAAG,EAAE,CAAC;QAGV,UAAK,GAAmB,IAAI,CAAC;QAEpB,cAAS,GAAG,WAAC,KAAK,EAAE,EAAE,IAAK,IAAI,CAAC,gBAAgB,CAAU,CAAC;KAKhE;IAEJ,uCAAM,GAAN,UAAO,KAAa;QAChB,OAAO,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;KAC/C;;gDANI,MAAM,SAAC,qBAAqB;;IARjC;QADC,KAAK,EAAE;wDACE;IAGV;QADC,K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E,sBAAsB,EAAE,sBAAsB,CAAC;YAClF,OAAO,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,sBAAsB,CAAC;SAChF,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACbA;;;;;;"}
@@ -1,8 +1,10 @@
1
+ export * from '@taiga-ui/addon-mobile/components/app-bar';
1
2
  export * from '@taiga-ui/addon-mobile/components/mobile-calendar';
2
3
  export * from '@taiga-ui/addon-mobile/components/mobile-calendar-dialog';
3
4
  export * from '@taiga-ui/addon-mobile/components/mobile-dialog';
4
5
  export * from '@taiga-ui/addon-mobile/components/pull-to-refresh';
5
6
  export * from '@taiga-ui/addon-mobile/components/sheet';
7
+ export * from '@taiga-ui/addon-mobile/components/tab-bar';
6
8
  export * from '@taiga-ui/addon-mobile/components/theme-android';
7
9
  export * from '@taiga-ui/addon-mobile/components/theme-ios';
8
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components.js","sources":["ng://@taiga-ui/addon-mobile/components/taiga-ui-addon-mobile-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components.js","sources":["ng://@taiga-ui/addon-mobile/components/taiga-ui-addon-mobile-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/addon-mobile",
3
- "version": "2.83.0",
3
+ "version": "2.85.0",
4
4
  "description": "Extension package for Taiga UI that adds support for mobile specific behaviors such as custom data pickers, dropdowns, etc.",
5
5
  "keywords": [
6
6
  "angular",
@@ -15,9 +15,9 @@
15
15
  "@angular/common": ">=9.0.0",
16
16
  "@angular/core": ">=9.0.0",
17
17
  "@ng-web-apis/common": ">=1.12.1 < 2",
18
- "@taiga-ui/cdk": ">=2.83.0",
19
- "@taiga-ui/core": ">=2.83.0",
20
- "@taiga-ui/kit": ">=2.83.0",
18
+ "@taiga-ui/cdk": ">=2.85.0",
19
+ "@taiga-ui/core": ">=2.85.0",
20
+ "@taiga-ui/kit": ">=2.85.0",
21
21
  "@tinkoff/ng-polymorpheus": ">=3.1.12 < 4",
22
22
  "rxjs": ">=6.0.0"
23
23
  },