@taiga-ui/addon-mobile 4.37.0 → 4.38.0-canary.507d44d
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.
- package/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.d.ts +2 -8
- package/components/sheet-dialog/sheet-dialog.component.d.ts +2 -8
- package/components/tab-bar/tab-bar-item.component.d.ts +0 -1
- package/directives/dropdown-mobile/dropdown-mobile.component.d.ts +2 -8
- package/esm2022/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.mjs +5 -16
- package/esm2022/components/sheet-dialog/sheet-dialog.component.mjs +8 -16
- package/esm2022/components/tab-bar/tab-bar-item.component.mjs +5 -8
- package/esm2022/directives/dropdown-mobile/dropdown-mobile.component.mjs +7 -17
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +4 -15
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +7 -15
- package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs +4 -7
- package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +6 -16
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -8,11 +8,10 @@ import { TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
|
|
|
8
8
|
import { TUI_LAST_DAY, TUI_FIRST_DAY, TuiDayRange, TuiDay } from '@taiga-ui/cdk/date-time';
|
|
9
9
|
import * as i1 from '@taiga-ui/cdk/directives/active-zone';
|
|
10
10
|
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
11
|
+
import * as i2 from '@taiga-ui/cdk/directives/animated';
|
|
12
|
+
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
11
13
|
import { tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
12
|
-
import { tuiSlideInTop, tuiFadeIn } from '@taiga-ui/core/animations';
|
|
13
14
|
import { TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';
|
|
14
|
-
import { TUI_ANIMATIONS_SPEED } from '@taiga-ui/core/tokens';
|
|
15
|
-
import { tuiGetDuration } from '@taiga-ui/core/utils/miscellaneous';
|
|
16
15
|
import { TUI_DAY_CAPS_MAPPER, calculateDisabledItemHandler } from '@taiga-ui/kit/components/calendar-range';
|
|
17
16
|
import { TUI_MOBILE_CALENDAR } from '@taiga-ui/kit/tokens';
|
|
18
17
|
import { injectContext } from '@taiga-ui/polymorpheus';
|
|
@@ -26,13 +25,6 @@ class TuiMobileCalendarDropdown {
|
|
|
26
25
|
this.observer = this.context?.$implicit;
|
|
27
26
|
this.data = this.context?.data || {};
|
|
28
27
|
this.selectedPeriod = null;
|
|
29
|
-
this.animation = {
|
|
30
|
-
value: '',
|
|
31
|
-
params: {
|
|
32
|
-
start: '100vh',
|
|
33
|
-
duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
28
|
// TODO: Refactor to proper Date, DateMulti and DateRange components after they are added to kit
|
|
37
29
|
this.control = inject(TuiControl, { optional: true });
|
|
38
30
|
this.range = this.is('tui-input-date-range');
|
|
@@ -91,17 +83,14 @@ class TuiMobileCalendarDropdown {
|
|
|
91
83
|
return !!this.dropdown?.el.closest(selector);
|
|
92
84
|
}
|
|
93
85
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiMobileCalendarDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiMobileCalendarDropdown, isStandalone: true, selector: "tui-mobile-calendar-dropdown",
|
|
86
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiMobileCalendarDropdown, isStandalone: true, selector: "tui-mobile-calendar-dropdown", hostDirectives: [{ directive: i1.TuiActiveZone }, { directive: i2.TuiAnimated }], ngImport: i0, template: "<tui-mobile-calendar\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;background:var(--tui-background-elevation-1);box-shadow:0 10rem var(--tui-background-elevation-1),0 -90vh 1rem 2rem var(--tui-service-backdrop);block-size:calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}\n"], dependencies: [{ kind: "component", type: TuiMobileCalendar, selector: "tui-mobile-calendar", inputs: ["single", "multi", "min", "max", "disabledItemHandler", "value"], outputs: ["cancel", "confirm", "valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
95
87
|
}
|
|
96
88
|
__decorate([
|
|
97
89
|
tuiPure
|
|
98
90
|
], TuiMobileCalendarDropdown.prototype, "calculateDisabledItemHandler", null);
|
|
99
91
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiMobileCalendarDropdown, decorators: [{
|
|
100
92
|
type: Component,
|
|
101
|
-
args: [{ standalone: true, selector: 'tui-mobile-calendar-dropdown', imports: [TuiMobileCalendar], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
102
|
-
'[@tuiSlideInTop]': 'animation',
|
|
103
|
-
'[@tuiFadeIn]': 'animation',
|
|
104
|
-
}, template: "<tui-mobile-calendar\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;background:var(--tui-background-elevation-1);box-shadow:0 10rem var(--tui-background-elevation-1),0 -90vh 1rem 2rem var(--tui-service-backdrop)}\n"] }]
|
|
93
|
+
args: [{ standalone: true, selector: 'tui-mobile-calendar-dropdown', imports: [TuiMobileCalendar], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiActiveZone, TuiAnimated], template: "<tui-mobile-calendar\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;background:var(--tui-background-elevation-1);box-shadow:0 10rem var(--tui-background-elevation-1),0 -90vh 1rem 2rem var(--tui-service-backdrop);block-size:calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}\n"] }]
|
|
105
94
|
}], ctorParameters: function () { return []; }, propDecorators: { calculateDisabledItemHandler: [] } });
|
|
106
95
|
function tuiProvideMobileCalendar() {
|
|
107
96
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs","sources":["../../../projects/addon-mobile/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.ts","../../../projects/addon-mobile/components/mobile-calendar-dropdown/mobile-calendar-dropdown.template.html","../../../projects/addon-mobile/components/mobile-calendar-dropdown/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.ts"],"sourcesContent":["import type {ValueProvider} from '@angular/core';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {TuiMobileCalendar} from '@taiga-ui/addon-mobile/components/mobile-calendar';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiControl} from '@taiga-ui/cdk/classes';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport type {TuiDayLike} from '@taiga-ui/cdk/date-time';\nimport {TUI_FIRST_DAY, TUI_LAST_DAY, TuiDay, TuiDayRange} from '@taiga-ui/cdk/date-time';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport type {TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {\n calculateDisabledItemHandler,\n TUI_DAY_CAPS_MAPPER,\n} from '@taiga-ui/kit/components/calendar-range';\nimport {TUI_MOBILE_CALENDAR} from '@taiga-ui/kit/tokens';\nimport {injectContext} from '@taiga-ui/polymorpheus';\nimport type {Observer} from 'rxjs';\n\nexport interface TuiMobileCalendarData {\n disabledItemHandler?: TuiBooleanHandler<TuiDay>;\n max?: TuiDay | null;\n min?: TuiDay | null;\n multi?: boolean;\n single?: boolean;\n}\n\n@Component({\n standalone: true,\n selector: 'tui-mobile-calendar-dropdown',\n imports: [TuiMobileCalendar],\n templateUrl: './mobile-calendar-dropdown.template.html',\n styleUrls: ['./mobile-calendar-dropdown.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideInTop, tuiFadeIn],\n hostDirectives: [TuiActiveZone],\n host: {\n '[@tuiSlideInTop]': 'animation',\n '[@tuiFadeIn]': 'animation',\n },\n})\nexport class TuiMobileCalendarDropdown {\n // TODO: Rework to use TuiDropdownOpenDirective so the focus returns to the field on closing\n private readonly dropdown = inject(TuiDropdownDirective, {optional: true});\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly context = injectContext<Record<string, any>>({optional: true});\n private readonly observer?: Observer<any> = this.context?.$implicit;\n private readonly data: TuiMobileCalendarData = this.context?.data || {};\n\n private selectedPeriod: TuiDayRange | null = null;\n\n protected readonly animation = {\n value: '',\n params: {\n start: '100vh',\n duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),\n },\n };\n\n // TODO: Refactor to proper Date, DateMulti and DateRange components after they are added to kit\n protected readonly control: any = inject(TuiControl, {optional: true});\n protected readonly range = this.is('tui-input-date-range');\n protected readonly multi = this.data.multi || this.is('tui-input-date[multiple]');\n protected readonly single =\n this.data.single || // TODO(v5): use `rangeMode` from DI token `TUI_CALENDAR_SHEET_DEFAULT_OPTIONS`\n this.is('tui-input-date:not([multiple])');\n\n constructor() {\n this.keyboard.hide();\n }\n\n public max(): TuiDay {\n return (\n this.data.max ||\n (this.range\n ? TUI_DAY_CAPS_MAPPER(\n this.control.max,\n this.selectedPeriod,\n this.control.maxLength,\n false,\n )\n : this.control?.max) ||\n TUI_LAST_DAY\n );\n }\n\n public min(): TuiDay {\n return (\n this.data.min ||\n (this.range\n ? TUI_DAY_CAPS_MAPPER(\n this.control.min,\n this.selectedPeriod,\n this.control.maxLength,\n true,\n )\n : this.control?.min) ||\n TUI_FIRST_DAY\n );\n }\n\n public onValueChange(value: TuiDay | TuiDayRange | readonly TuiDay[] | null): void {\n if (!this.range) {\n return;\n }\n\n if (value === null || value instanceof TuiDayRange) {\n this.selectedPeriod = value;\n } else if (value instanceof TuiDay) {\n this.selectedPeriod = new TuiDayRange(value, value);\n }\n }\n\n protected get calculatedDisabledItemHandler(): TuiBooleanHandler<TuiDay> {\n return this.calculateDisabledItemHandler(\n this.data.disabledItemHandler ||\n this.control?.disabledItemHandler ||\n TUI_FALSE_HANDLER,\n this.selectedPeriod,\n this.control?.minLength ?? null,\n );\n }\n\n protected close(): void {\n this.dropdown?.toggle(false);\n this.observer?.complete();\n this.keyboard.show();\n }\n\n protected confirm(value: any): void {\n const normalizedValue = this.range ? this.selectedPeriod : value;\n\n if (this.control) {\n this.control.value = normalizedValue;\n }\n\n this.observer?.next(normalizedValue);\n this.close();\n }\n\n @tuiPure\n private calculateDisabledItemHandler(\n disabledItemHandler: TuiBooleanHandler<TuiDay>,\n value: TuiDayRange | null,\n minLength: TuiDayLike | null,\n ): TuiBooleanHandler<TuiDay> {\n return calculateDisabledItemHandler(disabledItemHandler, value, minLength);\n }\n\n private is(selector: string): boolean {\n return !!this.dropdown?.el.closest(selector);\n }\n}\n\nexport function tuiProvideMobileCalendar(): ValueProvider {\n return {\n provide: TUI_MOBILE_CALENDAR,\n useValue: TuiMobileCalendarDropdown,\n };\n}\n","<tui-mobile-calendar\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA+BA,MAca,yBAAyB,CAAA;AA0BlC,IAAA,WAAA,GAAA;;QAxBiB,IAAQ,CAAA,QAAA,GAAG,MAAM,CAAC,oBAAoB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;AAC1D,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;QACtC,IAAO,CAAA,OAAA,GAAG,aAAa,CAAsB,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;AAC/D,QAAA,IAAA,CAAA,QAAQ,GAAmB,IAAI,CAAC,OAAO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AA8B,EAC/B,OAAA,EAAA,CAAC,iBAAiB,CAAC,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,cACnC,CAAC,aAAa,EAAE,SAAS,CAAC,kBACtB,CAAC,aAAa,CAAC,EACzB,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,WAAW;AAC/B,wBAAA,cAAc,EAAE,WAAW;AAC9B,qBAAA,EAAA,QAAA,EAAA,6RAAA,EAAA,MAAA,EAAA,CAAA,uNAAA,CAAA,EAAA,CAAA;0EAsGO,4BAA4B,EAAA,EAAA,EAAA,EAAA,CAAA,CAAA;SAaxB,wBAAwB,GAAA;IACpC,OAAO;AACH,QAAA,OAAO,EAAE,mBAAmB;AAC5B,QAAA,QAAQ,EAAE,yBAAyB;KACtC,CAAC;AACN;;AEnKA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs","sources":["../../../projects/addon-mobile/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.ts","../../../projects/addon-mobile/components/mobile-calendar-dropdown/mobile-calendar-dropdown.template.html","../../../projects/addon-mobile/components/mobile-calendar-dropdown/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.ts"],"sourcesContent":["import type {ValueProvider} from '@angular/core';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {TuiMobileCalendar} from '@taiga-ui/addon-mobile/components/mobile-calendar';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiControl} from '@taiga-ui/cdk/classes';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport type {TuiDayLike} from '@taiga-ui/cdk/date-time';\nimport {TUI_FIRST_DAY, TUI_LAST_DAY, TuiDay, TuiDayRange} from '@taiga-ui/cdk/date-time';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport type {TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {\n calculateDisabledItemHandler,\n TUI_DAY_CAPS_MAPPER,\n} from '@taiga-ui/kit/components/calendar-range';\nimport {TUI_MOBILE_CALENDAR} from '@taiga-ui/kit/tokens';\nimport {injectContext} from '@taiga-ui/polymorpheus';\nimport type {Observer} from 'rxjs';\n\nexport interface TuiMobileCalendarData {\n disabledItemHandler?: TuiBooleanHandler<TuiDay>;\n max?: TuiDay | null;\n min?: TuiDay | null;\n multi?: boolean;\n single?: boolean;\n}\n\n@Component({\n standalone: true,\n selector: 'tui-mobile-calendar-dropdown',\n imports: [TuiMobileCalendar],\n templateUrl: './mobile-calendar-dropdown.template.html',\n styleUrls: ['./mobile-calendar-dropdown.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiAnimated],\n})\nexport class TuiMobileCalendarDropdown {\n // TODO: Rework to use TuiDropdownOpenDirective so the focus returns to the field on closing\n private readonly dropdown = inject(TuiDropdownDirective, {optional: true});\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly context = injectContext<Record<string, any>>({optional: true});\n private readonly observer?: Observer<any> = this.context?.$implicit;\n private readonly data: TuiMobileCalendarData = this.context?.data || {};\n\n private selectedPeriod: TuiDayRange | null = null;\n\n // TODO: Refactor to proper Date, DateMulti and DateRange components after they are added to kit\n protected readonly control: any = inject(TuiControl, {optional: true});\n protected readonly range = this.is('tui-input-date-range');\n protected readonly multi = this.data.multi || this.is('tui-input-date[multiple]');\n protected readonly single =\n this.data.single || // TODO(v5): use `rangeMode` from DI token `TUI_CALENDAR_SHEET_DEFAULT_OPTIONS`\n this.is('tui-input-date:not([multiple])');\n\n constructor() {\n this.keyboard.hide();\n }\n\n public max(): TuiDay {\n return (\n this.data.max ||\n (this.range\n ? TUI_DAY_CAPS_MAPPER(\n this.control.max,\n this.selectedPeriod,\n this.control.maxLength,\n false,\n )\n : this.control?.max) ||\n TUI_LAST_DAY\n );\n }\n\n public min(): TuiDay {\n return (\n this.data.min ||\n (this.range\n ? TUI_DAY_CAPS_MAPPER(\n this.control.min,\n this.selectedPeriod,\n this.control.maxLength,\n true,\n )\n : this.control?.min) ||\n TUI_FIRST_DAY\n );\n }\n\n public onValueChange(value: TuiDay | TuiDayRange | readonly TuiDay[] | null): void {\n if (!this.range) {\n return;\n }\n\n if (value === null || value instanceof TuiDayRange) {\n this.selectedPeriod = value;\n } else if (value instanceof TuiDay) {\n this.selectedPeriod = new TuiDayRange(value, value);\n }\n }\n\n protected get calculatedDisabledItemHandler(): TuiBooleanHandler<TuiDay> {\n return this.calculateDisabledItemHandler(\n this.data.disabledItemHandler ||\n this.control?.disabledItemHandler ||\n TUI_FALSE_HANDLER,\n this.selectedPeriod,\n this.control?.minLength ?? null,\n );\n }\n\n protected close(): void {\n this.dropdown?.toggle(false);\n this.observer?.complete();\n this.keyboard.show();\n }\n\n protected confirm(value: any): void {\n const normalizedValue = this.range ? this.selectedPeriod : value;\n\n if (this.control) {\n this.control.value = normalizedValue;\n }\n\n this.observer?.next(normalizedValue);\n this.close();\n }\n\n @tuiPure\n private calculateDisabledItemHandler(\n disabledItemHandler: TuiBooleanHandler<TuiDay>,\n value: TuiDayRange | null,\n minLength: TuiDayLike | null,\n ): TuiBooleanHandler<TuiDay> {\n return calculateDisabledItemHandler(disabledItemHandler, value, minLength);\n }\n\n private is(selector: string): boolean {\n return !!this.dropdown?.el.closest(selector);\n }\n}\n\nexport function tuiProvideMobileCalendar(): ValueProvider {\n return {\n provide: TUI_MOBILE_CALENDAR,\n useValue: TuiMobileCalendarDropdown,\n };\n}\n","<tui-mobile-calendar\n [disabledItemHandler]=\"calculatedDisabledItemHandler\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n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A,EAAA,OAAA,EAAA,CAAA,QAAA,EAAA,SAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;AAkGnB,UAAA,CAAA;IADP,OAAO;AAOP,CAAA,EAAA,yBAAA,CAAA,SAAA,EAAA,8BAAA,EAAA,IAAA,CAAA,CAAA;4FAlGQ,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBATrC,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACN,QAAA,EAAA,8BAA8B,EAC/B,OAAA,EAAA,CAAC,iBAAiB,CAAC,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,EAC/B,cAAA,EAAA,CAAC,aAAa,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,6RAAA,EAAA,MAAA,EAAA,CAAA,qaAAA,CAAA,EAAA,CAAA;0EA8FpC,4BAA4B,EAAA,EAAA,EAAA,EAAA,CAAA,CAAA;SAaxB,wBAAwB,GAAA;IACpC,OAAO;AACH,QAAA,OAAO,EAAE,mBAAmB;AAC5B,QAAA,QAAQ,EAAE,yBAAyB;KACtC,CAAC;AACN;;AEpJA;;AAEG;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { NgForOf, NgIf } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { ElementRef, Component, ChangeDetectionStrategy, ViewChildren, inject, Injectable, Directive } from '@angular/core';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
|
|
6
|
+
import * as i1 from '@taiga-ui/cdk/directives/animated';
|
|
7
|
+
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
6
8
|
import { tuiCloseWatcher, tuiZonefull } from '@taiga-ui/cdk/observables';
|
|
7
9
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
8
10
|
import { tuiProvide, tuiCreateToken, tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
9
|
-
import {
|
|
10
|
-
import { TUI_ANIMATIONS_SPEED, TUI_SCROLL_REF } from '@taiga-ui/core/tokens';
|
|
11
|
-
import { tuiGetDuration } from '@taiga-ui/core/utils/miscellaneous';
|
|
11
|
+
import { TUI_SCROLL_REF } from '@taiga-ui/core/tokens';
|
|
12
12
|
import { injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
13
13
|
import { Subject, merge, exhaustMap, isObservable, take, of, filter, startWith, pairwise } from 'rxjs';
|
|
14
14
|
import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
|
|
@@ -20,13 +20,6 @@ class TuiSheetDialogComponent {
|
|
|
20
20
|
this.stops = EMPTY_QUERY;
|
|
21
21
|
this.el = tuiInjectElement();
|
|
22
22
|
this.pointers = 0;
|
|
23
|
-
this.slideInTop = {
|
|
24
|
-
value: '',
|
|
25
|
-
params: {
|
|
26
|
-
start: '100vh',
|
|
27
|
-
duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
23
|
this.context = injectContext();
|
|
31
24
|
this.close$ = new Subject();
|
|
32
25
|
this.$ = merge(this.close$, tuiCloseWatcher())
|
|
@@ -56,12 +49,11 @@ class TuiSheetDialogComponent {
|
|
|
56
49
|
.concat(this.el.clientHeight ?? Infinity)[this.context.initial] ?? 0);
|
|
57
50
|
}
|
|
58
51
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSheetDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
59
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSheetDialogComponent, isStandalone: true, selector: "tui-sheet-dialog", host: { listeners: { "document:touchstart.passive.zoneless": "onPointerChange(1)", "document:touchend.zoneless": "onPointerChange(-1)", "document:touchcancel.zoneless": "onPointerChange(-1)", "scroll.zoneless": "onPointerChange(0)", "click.self": "close$.next()" }, properties: { "
|
|
52
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSheetDialogComponent, isStandalone: true, selector: "tui-sheet-dialog", host: { listeners: { "document:touchstart.passive.zoneless": "onPointerChange(1)", "document:touchend.zoneless": "onPointerChange(-1)", "document:touchcancel.zoneless": "onPointerChange(-1)", "scroll.zoneless": "onPointerChange(0)", "click.self": "close$.next()" }, properties: { "style.--tui-offset.px": "context.offset", "class._closeable": "context.closeable", "class._fullscreen": "context.fullscreen === true" } }, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], viewQueries: [{ propertyName: "stops", predicate: ["stops"], descendants: true }], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<div class=\"t-stops\">\n <div\n *ngFor=\"let stop of context.stops\"\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n</div>\n<div class=\"t-sheet\">\n <div\n *ngIf=\"context.bar\"\n class=\"t-top\"\n ></div>\n <h2\n *ngIf=\"context.label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:block;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - var(--tui-offset) - env(safe-area-inset-top));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:calc(var(--tui-offset) + env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host .t-stops{display:flex}:host._fullscreen .t-sheet{display:flex;flex-direction:column;min-block-size:100%}:host._fullscreen .t-content{display:flex;flex-direction:column;flex-grow:1}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{scrollbar-width:none;-ms-overflow-style:none;inline-size:100%;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-sheet::-webkit-scrollbar,.t-sheet::-webkit-scrollbar-thumb{display:none}.t-top{position:sticky;top:0;z-index:1;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-top:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-heading{position:sticky;top:1.5rem;z-index:1;margin:0 -1rem;padding:.75rem 1rem;font:var(--tui-font-heading-6);background:var(--tui-background-elevation-1)}.t-heading:first-child{top:0;border-radius:inherit}.t-heading:last-child{padding-block-end:1.5rem}.t-content{position:relative;isolation:isolate;padding-block-end:calc(1.5rem + env(safe-area-inset-bottom));border-radius:inherit}.t-content:after{content:\"\";position:relative;top:calc(1.5rem + env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
60
53
|
}
|
|
61
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSheetDialogComponent, decorators: [{
|
|
62
55
|
type: Component,
|
|
63
|
-
args: [{ standalone: true, selector: 'tui-sheet-dialog', imports: [NgForOf, NgIf, PolymorpheusOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],
|
|
64
|
-
'[@tuiSlideInTop]': 'slideInTop',
|
|
56
|
+
args: [{ standalone: true, selector: 'tui-sheet-dialog', imports: [NgForOf, NgIf, PolymorpheusOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], hostDirectives: [TuiAnimated], host: {
|
|
65
57
|
'[style.--tui-offset.px]': 'context.offset',
|
|
66
58
|
'[class._closeable]': 'context.closeable',
|
|
67
59
|
'[class._fullscreen]': 'context.fullscreen === true',
|
|
@@ -70,7 +62,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
70
62
|
'(document:touchcancel.zoneless)': 'onPointerChange(-1)',
|
|
71
63
|
'(scroll.zoneless)': 'onPointerChange(0)',
|
|
72
64
|
'(click.self)': 'close$.next()',
|
|
73
|
-
}, template: "<div class=\"t-stops\">\n <div\n *ngFor=\"let stop of context.stops\"\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n</div>\n<div class=\"t-sheet\">\n <div\n *ngIf=\"context.bar\"\n class=\"t-top\"\n ></div>\n <h2\n *ngIf=\"context.label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:block;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - var(--tui-offset) - env(safe-area-inset-top));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:calc(var(--tui-offset) + env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host .t-stops{display:flex}:host._fullscreen .t-sheet{display:flex;flex-direction:column;min-block-size:100%}:host._fullscreen .t-content{display:flex;flex-direction:column;flex-grow:1}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{scrollbar-width:none;-ms-overflow-style:none;inline-size:100%;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-sheet::-webkit-scrollbar,.t-sheet::-webkit-scrollbar-thumb{display:none}.t-top{position:sticky;top:0;z-index:1;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-top:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-heading{position:sticky;top:1.5rem;z-index:1;margin:0 -1rem;padding:.75rem 1rem;font:var(--tui-font-heading-6);background:var(--tui-background-elevation-1)}.t-heading:first-child{top:0;border-radius:inherit}.t-heading:last-child{padding-block-end:1.5rem}.t-content{position:relative;isolation:isolate;padding-block-end:calc(1.5rem + env(safe-area-inset-bottom));border-radius:inherit}.t-content:after{content:\"\";position:relative;top:calc(1.5rem + env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}\n"] }]
|
|
65
|
+
}, template: "<div class=\"t-stops\">\n <div\n *ngFor=\"let stop of context.stops\"\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n</div>\n<div class=\"t-sheet\">\n <div\n *ngIf=\"context.bar\"\n class=\"t-top\"\n ></div>\n <h2\n *ngIf=\"context.label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:block;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - var(--tui-offset) - env(safe-area-inset-top));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:calc(var(--tui-offset) + env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host .t-stops{display:flex}:host._fullscreen .t-sheet{display:flex;flex-direction:column;min-block-size:100%}:host._fullscreen .t-content{display:flex;flex-direction:column;flex-grow:1}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{scrollbar-width:none;-ms-overflow-style:none;inline-size:100%;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-sheet::-webkit-scrollbar,.t-sheet::-webkit-scrollbar-thumb{display:none}.t-top{position:sticky;top:0;z-index:1;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-top:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-heading{position:sticky;top:1.5rem;z-index:1;margin:0 -1rem;padding:.75rem 1rem;font:var(--tui-font-heading-6);background:var(--tui-background-elevation-1)}.t-heading:first-child{top:0;border-radius:inherit}.t-heading:last-child{padding-block-end:1.5rem}.t-content{position:relative;isolation:isolate;padding-block-end:calc(1.5rem + env(safe-area-inset-bottom));border-radius:inherit}.t-content:after{content:\"\";position:relative;top:calc(1.5rem + env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}\n"] }]
|
|
74
66
|
}], propDecorators: { stops: [{
|
|
75
67
|
type: ViewChildren,
|
|
76
68
|
args: ['stops']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-sheet-dialog.mjs","sources":["../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.component.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.template.html","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.options.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.service.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.directive.ts","../../../projects/addon-mobile/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.ts"],"sourcesContent":["import {NgForOf, NgIf} from '@angular/common';\nimport type {AfterViewInit, QueryList} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n ViewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {tuiCloseWatcher, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TUI_ANIMATIONS_SPEED, TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {exhaustMap, filter, isObservable, merge, of, Subject, take} from 'rxjs';\n\nimport type {TuiSheetDialogOptions} from './sheet-dialog.options';\n\n@Component({\n standalone: true,\n selector: 'tui-sheet-dialog',\n imports: [NgForOf, NgIf, PolymorpheusOutlet],\n templateUrl: './sheet-dialog.template.html',\n styleUrls: ['./sheet-dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],\n animations: [tuiSlideInTop],\n host: {\n '[@tuiSlideInTop]': 'slideInTop',\n '[style.--tui-offset.px]': 'context.offset',\n '[class._closeable]': 'context.closeable',\n '[class._fullscreen]': 'context.fullscreen === true',\n '(document:touchstart.passive.zoneless)': 'onPointerChange(1)',\n '(document:touchend.zoneless)': 'onPointerChange(-1)',\n '(document:touchcancel.zoneless)': 'onPointerChange(-1)',\n '(scroll.zoneless)': 'onPointerChange(0)',\n '(click.self)': 'close$.next()',\n },\n})\nexport class TuiSheetDialogComponent<I> implements AfterViewInit {\n @ViewChildren('stops')\n private readonly stops: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly el = tuiInjectElement();\n private pointers = 0;\n\n protected readonly slideInTop = {\n value: '',\n params: {\n start: '100vh',\n duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),\n },\n };\n\n protected readonly context =\n injectContext<TuiPopover<TuiSheetDialogOptions<I>, any>>();\n\n protected readonly close$ = new Subject<void>();\n protected readonly $ = merge(this.close$, tuiCloseWatcher())\n .pipe(\n tuiZonefull(),\n exhaustMap(() => {\n if (isObservable(this.context.closeable)) {\n if (this.el.scrollTop <= 0) {\n this.el.scrollTo({top: this.initial, behavior: 'smooth'});\n }\n\n return this.context.closeable.pipe(take(1));\n }\n\n return of(this.context.closeable);\n }),\n filter(Boolean),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.context.$implicit.complete());\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.initial;\n }\n\n protected onPointerChange(delta: number): void {\n this.pointers = Math.max(this.pointers + delta, 0);\n\n if (!this.pointers && this.el.scrollTop <= 0) {\n this.close$.next();\n }\n }\n\n private get initial(): number {\n return (\n this.stops\n .map((e) => e.nativeElement.offsetTop - this.context.offset)\n .concat(this.el.clientHeight ?? Infinity)[this.context.initial] ?? 0\n );\n }\n}\n","<div class=\"t-stops\">\n <div\n *ngFor=\"let stop of context.stops\"\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n</div>\n<div class=\"t-sheet\">\n <div\n *ngIf=\"context.bar\"\n class=\"t-top\"\n ></div>\n <h2\n *ngIf=\"context.label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n","import type {Provider} from '@angular/core';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport type {Observable} from 'rxjs';\n\nexport interface TuiSheetDialogOptions<I = undefined> {\n readonly closeable: Observable<boolean> | boolean;\n readonly data: I;\n readonly initial: number;\n readonly label: PolymorpheusContent<TuiPopover<TuiSheetDialogOptions<I>, any>>;\n readonly offset: number;\n readonly stops: readonly string[];\n readonly bar: boolean;\n readonly fullscreen: boolean;\n}\n\nexport const TUI_SHEET_DIALOG_DEFAULT_OPTIONS: TuiSheetDialogOptions = {\n label: '',\n stops: [],\n initial: 0,\n offset: 16,\n closeable: true,\n data: undefined,\n bar: true,\n fullscreen: false,\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const TUI_SHEET_DIALOG_OPTIONS = tuiCreateToken(TUI_SHEET_DIALOG_DEFAULT_OPTIONS);\n\nexport function tuiSheetDialogOptionsProvider(\n options: Partial<TuiSheetDialogOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_SHEET_DIALOG_OPTIONS,\n options,\n TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n );\n}\n","import {inject, Injectable} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TuiPopoverService, TuiThemeColorService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\nimport {pairwise, startWith} from 'rxjs';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\nimport type {TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TUI_SHEET_DIALOG_OPTIONS} from './sheet-dialog.options';\n\nconst THEME = '#404040';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiSheetDialogService(\n TUI_DIALOGS,\n TuiSheetDialogComponent,\n inject(TUI_SHEET_DIALOG_OPTIONS),\n ),\n})\nexport class TuiSheetDialogService extends TuiPopoverService<TuiSheetDialogOptions<any>> {\n private readonly theme = inject(TuiThemeColorService);\n private initial = this.theme.color;\n\n protected readonly $ = this.items$\n .pipe(startWith([]), pairwise(), takeUntilDestroyed())\n .subscribe(([prev, next]) => {\n if (!prev.length && next.length) {\n this.initial = this.theme.color;\n this.theme.color = THEME;\n }\n\n if (!next.length && prev.length) {\n this.theme.color = this.initial;\n }\n });\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport type {TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogService} from './sheet-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiSheetDialog]',\n inputs: ['options: tuiSheetDialogOptions', 'open: tuiSheetDialog'],\n outputs: ['openChange: tuiSheetDialogChange'],\n providers: [tuiAsPopover(TuiSheetDialogService)],\n})\nexport class TuiSheetDialog extends TuiPopoverDirective<TuiSheetDialogOptions> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuBA,MAqBa,uBAAuB,CAAA;AArBpC,IAAA,WAAA,GAAA;QAuBqB,IAAK,CAAA,KAAA,GAAuC,WAAW,CAAC;QAExD,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE,CAAC;QACjC,IAAQ,CAAA,QAAA,GAAG,CAAC,CAAC;AAEF,QAAA,IAAA,CAAA,UAAU,GAAG;AAC5B,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,MAAM,EAAE;AACJ,gBAAA,KAAK,EAAE,OAAO;AACd,gBAAA,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AACzD,aAAA;SACJ,CAAC;QAEiB,IAAO,CAAA,OAAA,GACtB,aAAa,EAA6C,CAAC;AAE5C,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,EAAQ,CAAC;QAC7B,IAAC,CAAA,CAAA,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC;AACvD,aAAA,IAAI,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components/sheet-dialog/sheet-dialog.component.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.template.html","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.options.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.service.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.directive.ts","../../../projects/addon-mobile/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.ts"],"sourcesContent":["import {NgForOf, NgIf} from '@angular/common';\nimport type {AfterViewInit, QueryList} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiCloseWatcher, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {exhaustMap, filter, isObservable, merge, of, Subject, take} from 'rxjs';\n\nimport type {TuiSheetDialogOptions} from './sheet-dialog.options';\n\n@Component({\n standalone: true,\n selector: 'tui-sheet-dialog',\n imports: [NgForOf, NgIf, PolymorpheusOutlet],\n templateUrl: './sheet-dialog.template.html',\n styleUrls: ['./sheet-dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],\n hostDirectives: [TuiAnimated],\n host: {\n '[style.--tui-offset.px]': 'context.offset',\n '[class._closeable]': 'context.closeable',\n '[class._fullscreen]': 'context.fullscreen === true',\n '(document:touchstart.passive.zoneless)': 'onPointerChange(1)',\n '(document:touchend.zoneless)': 'onPointerChange(-1)',\n '(document:touchcancel.zoneless)': 'onPointerChange(-1)',\n '(scroll.zoneless)': 'onPointerChange(0)',\n '(click.self)': 'close$.next()',\n },\n})\nexport class TuiSheetDialogComponent<I> implements AfterViewInit {\n @ViewChildren('stops')\n private readonly stops: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly el = tuiInjectElement();\n private pointers = 0;\n\n protected readonly context =\n injectContext<TuiPopover<TuiSheetDialogOptions<I>, any>>();\n\n protected readonly close$ = new Subject<void>();\n protected readonly $ = merge(this.close$, tuiCloseWatcher())\n .pipe(\n tuiZonefull(),\n exhaustMap(() => {\n if (isObservable(this.context.closeable)) {\n if (this.el.scrollTop <= 0) {\n this.el.scrollTo({top: this.initial, behavior: 'smooth'});\n }\n\n return this.context.closeable.pipe(take(1));\n }\n\n return of(this.context.closeable);\n }),\n filter(Boolean),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.context.$implicit.complete());\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.initial;\n }\n\n protected onPointerChange(delta: number): void {\n this.pointers = Math.max(this.pointers + delta, 0);\n\n if (!this.pointers && this.el.scrollTop <= 0) {\n this.close$.next();\n }\n }\n\n private get initial(): number {\n return (\n this.stops\n .map((e) => e.nativeElement.offsetTop - this.context.offset)\n .concat(this.el.clientHeight ?? Infinity)[this.context.initial] ?? 0\n );\n }\n}\n","<div class=\"t-stops\">\n <div\n *ngFor=\"let stop of context.stops\"\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n</div>\n<div class=\"t-sheet\">\n <div\n *ngIf=\"context.bar\"\n class=\"t-top\"\n ></div>\n <h2\n *ngIf=\"context.label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n","import type {Provider} from '@angular/core';\nimport type {TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport type {Observable} from 'rxjs';\n\nexport interface TuiSheetDialogOptions<I = undefined> {\n readonly closeable: Observable<boolean> | boolean;\n readonly data: I;\n readonly initial: number;\n readonly label: PolymorpheusContent<TuiPopover<TuiSheetDialogOptions<I>, any>>;\n readonly offset: number;\n readonly stops: readonly string[];\n readonly bar: boolean;\n readonly fullscreen: boolean;\n}\n\nexport const TUI_SHEET_DIALOG_DEFAULT_OPTIONS: TuiSheetDialogOptions = {\n label: '',\n stops: [],\n initial: 0,\n offset: 16,\n closeable: true,\n data: undefined,\n bar: true,\n fullscreen: false,\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const TUI_SHEET_DIALOG_OPTIONS = tuiCreateToken(TUI_SHEET_DIALOG_DEFAULT_OPTIONS);\n\nexport function tuiSheetDialogOptionsProvider(\n options: Partial<TuiSheetDialogOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_SHEET_DIALOG_OPTIONS,\n options,\n TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n );\n}\n","import {inject, Injectable} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TuiPopoverService, TuiThemeColorService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\nimport {pairwise, startWith} from 'rxjs';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\nimport type {TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TUI_SHEET_DIALOG_OPTIONS} from './sheet-dialog.options';\n\nconst THEME = '#404040';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiSheetDialogService(\n TUI_DIALOGS,\n TuiSheetDialogComponent,\n inject(TUI_SHEET_DIALOG_OPTIONS),\n ),\n})\nexport class TuiSheetDialogService extends TuiPopoverService<TuiSheetDialogOptions<any>> {\n private readonly theme = inject(TuiThemeColorService);\n private initial = this.theme.color;\n\n protected readonly $ = this.items$\n .pipe(startWith([]), pairwise(), takeUntilDestroyed())\n .subscribe(([prev, next]) => {\n if (!prev.length && next.length) {\n this.initial = this.theme.color;\n this.theme.color = THEME;\n }\n\n if (!next.length && prev.length) {\n this.theme.color = this.initial;\n }\n });\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport type {TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogService} from './sheet-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiSheetDialog]',\n inputs: ['options: tuiSheetDialogOptions', 'open: tuiSheetDialog'],\n outputs: ['openChange: tuiSheetDialogChange'],\n providers: [tuiAsPopover(TuiSheetDialogService)],\n})\nexport class TuiSheetDialog extends TuiPopoverDirective<TuiSheetDialogOptions> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAqBA,MAoBa,uBAAuB,CAAA;AApBpC,IAAA,WAAA,GAAA;QAsBqB,IAAK,CAAA,KAAA,GAAuC,WAAW,CAAC;QAExD,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE,CAAC;QACjC,IAAQ,CAAA,QAAA,GAAG,CAAC,CAAC;QAEF,IAAO,CAAA,OAAA,GACtB,aAAa,EAA6C,CAAC;AAE5C,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,EAAQ,CAAC;QAC7B,IAAC,CAAA,CAAA,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC;AACvD,aAAA,IAAI,CACD,WAAW,EAAE,EACb,UAAU,CAAC,MAAK;YACZ,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC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MAAM,CAAC,wBAAwB,CAAC,CACnC;AACR,iBAAA,CAAA;;;ACbD,MAOa,cAAe,SAAQ,mBAA0C,CAAA;+GAAjE,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,wNAFZ,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAEvC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,MAAM,EAAE,CAAC,gCAAgC,EAAE,sBAAsB,CAAC;oBAClE,OAAO,EAAE,CAAC,kCAAkC,CAAC;AAC7C,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;AACnD,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, EventEmitter, ElementRef, ContentChildren, forwardRef, Output, inject, Directive } from '@angular/core';
|
|
3
3
|
import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
|
|
4
4
|
import { TuiRepeatTimes } from '@taiga-ui/cdk/directives/repeat-times';
|
|
5
5
|
import { tuiIsElement, tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
6
6
|
import { NgIf } from '@angular/common';
|
|
7
|
-
import {
|
|
7
|
+
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
8
8
|
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
9
|
-
import { TUI_ANIMATIONS_SPEED } from '@taiga-ui/core/tokens';
|
|
10
|
-
import { tuiToAnimationOptions } from '@taiga-ui/core/utils/miscellaneous';
|
|
11
9
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
12
10
|
import { RouterLinkActive } from '@angular/router';
|
|
13
11
|
import { tuiWatch } from '@taiga-ui/cdk/observables';
|
|
@@ -15,7 +13,6 @@ import { EMPTY, filter } from 'rxjs';
|
|
|
15
13
|
|
|
16
14
|
class TuiTabBarItem {
|
|
17
15
|
constructor() {
|
|
18
|
-
this.options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));
|
|
19
16
|
this.icon = '';
|
|
20
17
|
this.badge = null;
|
|
21
18
|
}
|
|
@@ -23,11 +20,11 @@ class TuiTabBarItem {
|
|
|
23
20
|
return value > 999 ? '999+' : String(value);
|
|
24
21
|
}
|
|
25
22
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTabBarItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiTabBarItem, isStandalone: true, selector: "button[tuiTabBarItem], a[tuiTabBarItem]", inputs: { icon: "icon", badge: "badge" }, ngImport: i0, template: "<tui-icon\n class=\"t-icon\"\n [icon]=\"icon\"\n/>\n<span class=\"t-wrapper\">\n <span\n *ngIf=\"badge as value\"\n class=\"t-badge\"\n
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiTabBarItem, isStandalone: true, selector: "button[tuiTabBarItem], a[tuiTabBarItem]", inputs: { icon: "icon", badge: "badge" }, ngImport: i0, template: "<tui-icon\n class=\"t-icon\"\n [icon]=\"icon\"\n/>\n<span class=\"t-wrapper\">\n <span\n *ngIf=\"badge as value\"\n tuiAnimated\n class=\"t-badge\"\n >\n {{ format(value) }}\n </span>\n</span>\n<span class=\"t-text\">\n <ng-content />\n</span>\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;flex:1 0;font:inherit;flex-direction:column;align-items:center;overflow:hidden}: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{inline-size:1.75rem;block-size:1.75rem;margin:.375rem 0 .125rem;pointer-events:none;border:.125rem solid transparent}.t-wrapper{position:absolute;top:.125rem;left:1rem;display:flex;inline-size:100%;justify-content:center;pointer-events:none}.t-badge{display:flex;block-size:1.125rem;min-inline-size:1.125rem;align-items:center;justify-content:center;padding:0 .25rem;border-radius:1rem;font-size:.8125rem;box-sizing:border-box;color:var(--tui-background-base);background:var(--tui-status-negative)}.t-badge .tui-enter,.t-badge .tui-leave{animation-name:tuiScale}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-inline-size:100%;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TuiAnimated, selector: "[tuiAnimated]" }, { kind: "component", type: TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
27
24
|
}
|
|
28
25
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTabBarItem, decorators: [{
|
|
29
26
|
type: Component,
|
|
30
|
-
args: [{ standalone: true, selector: 'button[tuiTabBarItem], a[tuiTabBarItem]', imports: [NgIf, TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
|
+
args: [{ standalone: true, selector: 'button[tuiTabBarItem], a[tuiTabBarItem]', imports: [NgIf, TuiAnimated, TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-icon\n class=\"t-icon\"\n [icon]=\"icon\"\n/>\n<span class=\"t-wrapper\">\n <span\n *ngIf=\"badge as value\"\n tuiAnimated\n class=\"t-badge\"\n >\n {{ format(value) }}\n </span>\n</span>\n<span class=\"t-text\">\n <ng-content />\n</span>\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;flex:1 0;font:inherit;flex-direction:column;align-items:center;overflow:hidden}: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{inline-size:1.75rem;block-size:1.75rem;margin:.375rem 0 .125rem;pointer-events:none;border:.125rem solid transparent}.t-wrapper{position:absolute;top:.125rem;left:1rem;display:flex;inline-size:100%;justify-content:center;pointer-events:none}.t-badge{display:flex;block-size:1.125rem;min-inline-size:1.125rem;align-items:center;justify-content:center;padding:0 .25rem;border-radius:1rem;font-size:.8125rem;box-sizing:border-box;color:var(--tui-background-base);background:var(--tui-status-negative)}.t-badge .tui-enter,.t-badge .tui-leave{animation-name:tuiScale}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-inline-size:100%;pointer-events:none}\n"] }]
|
|
31
28
|
}], propDecorators: { icon: [{
|
|
32
29
|
type: Input
|
|
33
30
|
}], badge: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-tab-bar.mjs","sources":["../../../projects/addon-mobile/components/tab-bar/tab-bar-item.component.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar-item.template.html","../../../projects/addon-mobile/components/tab-bar/tab-bar.component.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar.template.html","../../../projects/addon-mobile/components/tab-bar/tab-bar-item.directive.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar.ts","../../../projects/addon-mobile/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.ts"],"sourcesContent":["import {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component,
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-tab-bar.mjs","sources":["../../../projects/addon-mobile/components/tab-bar/tab-bar-item.component.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar-item.template.html","../../../projects/addon-mobile/components/tab-bar/tab-bar.component.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar.template.html","../../../projects/addon-mobile/components/tab-bar/tab-bar-item.directive.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar.ts","../../../projects/addon-mobile/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.ts"],"sourcesContent":["import {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\n\n@Component({\n standalone: true,\n selector: 'button[tuiTabBarItem], a[tuiTabBarItem]',\n imports: [NgIf, TuiAnimated, TuiIcon],\n templateUrl: './tab-bar-item.template.html',\n styleUrls: ['./tab-bar-item.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTabBarItem {\n @Input()\n public icon = '';\n\n @Input()\n public badge?: number | null = null;\n\n protected format(value: number): string {\n return value > 999 ? '999+' : String(value);\n }\n}\n","<tui-icon\n class=\"t-icon\"\n [icon]=\"icon\"\n/>\n<span class=\"t-wrapper\">\n <span\n *ngIf=\"badge as value\"\n tuiAnimated\n class=\"t-badge\"\n >\n {{ format(value) }}\n </span>\n</span>\n<span class=\"t-text\">\n <ng-content />\n</span>\n","import type {QueryList} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\nimport {tuiIsElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TuiTabBarItem} from './tab-bar-item.component';\n\n@Component({\n standalone: true,\n selector: 'nav[tuiTabBar]',\n imports: [TuiRepeatTimes],\n templateUrl: './tab-bar.template.html',\n styleUrls: ['./tab-bar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style]': 'style',\n '(click)': 'setActive($event.target)',\n },\n})\nexport class TuiTabBarComponent {\n @ContentChildren(forwardRef(() => TuiTabBarItem), {read: ElementRef})\n private readonly tabs: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @Input()\n public quantity = 4;\n\n @Input()\n public activeItemIndex = NaN;\n\n @Output()\n public readonly activeItemIndexChange = new EventEmitter<number>();\n\n public setActive(tab: EventTarget): void {\n if (tuiIsElement(tab)) {\n this.updateIndex(\n this.tabs.toArray().findIndex(({nativeElement}) => nativeElement === tab),\n );\n }\n }\n\n protected 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","<ng-content />\n<div class=\"t-skeletons\">\n <div\n *tuiRepeatTimes=\"let index of quantity\"\n class=\"t-skeleton\"\n ></div>\n</div>\n","import {Directive, inject} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {RouterLinkActive} from '@angular/router';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport type {Observable} from 'rxjs';\nimport {EMPTY, filter} from 'rxjs';\n\nimport {TuiTabBarComponent} from './tab-bar.component';\n\n@Directive({\n standalone: true,\n selector: '[tuiTabBarItem][routerLinkActive]',\n})\nexport class TuiTabBarItemDirective {\n constructor() {\n const tabs = inject(TuiTabBarComponent);\n const el = tuiInjectElement();\n const link: Observable<boolean> =\n inject(RouterLinkActive, {optional: true})?.isActiveChange || EMPTY;\n\n link.pipe(filter(Boolean), tuiWatch(), takeUntilDestroyed()).subscribe(() =>\n tabs.setActive(el),\n );\n }\n}\n","import {TuiTabBarComponent} from './tab-bar.component';\nimport {TuiTabBarItem} from './tab-bar-item.component';\nimport {TuiTabBarItemDirective} from './tab-bar-item.directive';\n\nexport const TuiTabBar = [\n TuiTabBarComponent,\n TuiTabBarItem,\n TuiTabBarItemDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAKA,MAQa,aAAa,CAAA;AAR1B,IAAA,WAAA,GAAA;QAUW,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QAGV,IAAK,CAAA,KAAA,GAAmB,IAAI,CAAC;AAKvC,KAAA;AAHa,IAAA,MAAM,CAAC,KAAa,EAAA;AAC1B,QAAA,OAAO,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;KAC/C;+GATQ,aA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CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,mCAAmC;AAChD,iBAAA,CAAA;;;ACTY,MAAA,SAAS,GAAG;IACrB,kBAAkB;IAClB,aAAa;IACb,sBAAsB;;;ACP1B;;AAEG;;;;"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { NgIf, DOCUMENT } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, computed, Component, ChangeDetectionStrategy, Directive, Input, ViewEncapsulation } from '@angular/core';
|
|
4
|
-
import * as
|
|
4
|
+
import * as i3 from '@ng-web-apis/intersection-observer';
|
|
5
5
|
import { WaIntersectionObserver } from '@ng-web-apis/intersection-observer';
|
|
6
6
|
import { TuiKeyboardService } from '@taiga-ui/addon-mobile/services';
|
|
7
7
|
import * as i1$1 from '@taiga-ui/cdk/directives/active-zone';
|
|
8
8
|
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
9
|
+
import * as i2 from '@taiga-ui/cdk/directives/animated';
|
|
10
|
+
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
9
11
|
import { TuiSwipe } from '@taiga-ui/cdk/directives/swipe';
|
|
10
12
|
import { tuiIsHTMLElement, tuiInjectElement, tuiIsElement } from '@taiga-ui/cdk/utils/dom';
|
|
11
13
|
import { tuiGetNativeFocused } from '@taiga-ui/cdk/utils/focus';
|
|
12
14
|
import { tuiIsPresent, tuiPx } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
13
|
-
import { tuiSlideInTop, tuiFadeIn } from '@taiga-ui/core/animations';
|
|
14
15
|
import { TUI_DROPDOWN_COMPONENT, TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';
|
|
15
|
-
import { TUI_ANIMATIONS_SPEED } from '@taiga-ui/core/tokens';
|
|
16
|
-
import { tuiGetDuration } from '@taiga-ui/core/utils/miscellaneous';
|
|
17
16
|
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
18
17
|
import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
|
|
19
18
|
import { TUI_DATA_LIST_HOST, TuiOptionWithValue, TUI_OPTION_CONTENT } from '@taiga-ui/core/components/data-list';
|
|
@@ -127,13 +126,6 @@ class TuiDropdownMobileComponent {
|
|
|
127
126
|
this.observer = new ResizeObserver(() => this.refresh(this.doc.defaultView.visualViewport));
|
|
128
127
|
this.directive = inject(TuiDropdownMobile);
|
|
129
128
|
this.dropdown = inject(TuiDropdownDirective);
|
|
130
|
-
this.animation = {
|
|
131
|
-
value: '',
|
|
132
|
-
params: {
|
|
133
|
-
start: '100vh',
|
|
134
|
-
duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
129
|
this.observer.observe(this.dropdown.el);
|
|
138
130
|
this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');
|
|
139
131
|
}
|
|
@@ -192,19 +184,17 @@ class TuiDropdownMobileComponent {
|
|
|
192
184
|
return this.dropdown.el.contains(tuiGetNativeFocused(this.doc));
|
|
193
185
|
}
|
|
194
186
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
195
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { listeners: { "document:click.zoneless.capture": "onClick($event)", "window>scroll.zoneless.capture": "refresh($event.currentTarget.visualViewport)", "visualViewport>resize.zoneless": "refresh($event.target)", "visualViewport>scroll.zoneless": "refresh($event.target)" }, properties: { "
|
|
187
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { listeners: { "document:click.zoneless.capture": "onClick($event)", "window>scroll.zoneless.capture": "refresh($event.currentTarget.visualViewport)", "visualViewport>resize.zoneless": "refresh($event.target)", "visualViewport>scroll.zoneless": "refresh($event.target)" }, properties: { "class._sheet": "directive.tuiDropdownMobile" } }, hostDirectives: [{ directive: i1$1.TuiActiveZone }, { directive: i2.TuiAnimated }], ngImport: i0, template: "<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown.content as text\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: ["tui-dropdown-mobile:not(._sheet){scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;inline-size:100%;block-size:100%;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;visibility:visible!important;transform:translateZ(0);background:var(--tui-background-base);overscroll-behavior:contain;overflow:auto;box-shadow:0 -.5rem .5rem var(--tui-background-base),0 10rem var(--tui-background-base),0 20rem var(--tui-background-base),0 30rem var(--tui-background-base)}tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet).tui-enter,tui-dropdown-mobile:not(._sheet).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:not(._sheet):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:not(._sheet)>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;top:0;block-size:100%;overflow:auto;margin:0 .75rem;touch-action:pan-y!important}tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet) [tuiDropdownButton][tuiDropdownButton]{position:fixed;right:1rem;bottom:1rem;display:inline-flex}tui-dropdown-mobile._sheet{position:fixed;top:0;left:0;bottom:0;right:0;scrollbar-width:none;-ms-overflow-style:none;overflow:auto;background:var(--tui-service-backdrop);box-shadow:0 -80vh 0 5rem var(--tui-service-backdrop);overflow-y:scroll;scroll-snap-type:y mandatory;overscroll-behavior:none}tui-dropdown-mobile._sheet::-webkit-scrollbar,tui-dropdown-mobile._sheet::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet.tui-enter,tui-dropdown-mobile._sheet.tui-leave{animation-name:tuiFade,tuiSlide}tui-root:has(tui-dialogs>:nth-child(2)) tui-dropdown-mobile._sheet{background:transparent;box-shadow:none}tui-dropdown-mobile._sheet>.t-filler{block-size:100%;scroll-snap-stop:always;scroll-snap-align:start}tui-dropdown-mobile._sheet>.t-container{display:flex;max-block-size:calc(100% - 1rem);flex-direction:column;border-top-left-radius:1rem;border-top-right-radius:1rem;padding:0 .5rem;scroll-snap-stop:always;scroll-snap-align:start;background:var(--tui-background-elevation-1)}tui-dropdown-mobile._sheet>.t-container>.t-heading{position:relative;margin:0;padding:2rem .5rem .75rem;font:var(--tui-font-heading-6)}tui-dropdown-mobile._sheet>.t-container>.t-heading:before{content:\"\";position:absolute;left:50%;top:.75rem;inline-size:2rem;block-size:.25rem;border-radius:1rem;background:var(--tui-background-neutral-2);transform:translate(-50%,-50%)}tui-dropdown-mobile._sheet>.t-container>.t-content{scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto;overflow-x:hidden}tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar,tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet tui-data-list [tuiOption]{margin-left:calc(-1 * var(--t-option-padding-inline));margin-right:calc(-1 * var(--t-option-padding-inline))}.t-dropdown-mobile{touch-action:none;visibility:hidden}.t-dropdown-mobile *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile tui-root{visibility:visible}.t-dropdown-mobile tui-root .t-root-content,.t-dropdown-mobile tui-root tui-dialogs{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiSwipe, selector: "[tuiSwipe]", outputs: ["tuiSwipe"] }, { kind: "directive", type: i3.WaIntersectionObserverDirective, selector: "[waIntersectionObserver]", inputs: ["waIntersectionRootMargin", "waIntersectionThreshold"], exportAs: ["IntersectionObserver"] }, { kind: "directive", type: i3.WaIntersectionObservee, selector: "[waIntersectionObservee]", outputs: ["waIntersectionObservee"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
196
188
|
}
|
|
197
189
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownMobileComponent, decorators: [{
|
|
198
190
|
type: Component,
|
|
199
|
-
args: [{ standalone: true, selector: 'tui-dropdown-mobile', imports: [NgIf, PolymorpheusOutlet, TuiSwipe, WaIntersectionObserver], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
200
|
-
'[@tuiFadeIn]': 'animation',
|
|
201
|
-
'[@tuiSlideInTop]': 'animation',
|
|
191
|
+
args: [{ standalone: true, selector: 'tui-dropdown-mobile', imports: [NgIf, PolymorpheusOutlet, TuiSwipe, WaIntersectionObserver], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiActiveZone, TuiAnimated], host: {
|
|
202
192
|
'[class._sheet]': 'directive.tuiDropdownMobile',
|
|
203
193
|
'(document:click.zoneless.capture)': 'onClick($event)',
|
|
204
194
|
'(window>scroll.zoneless.capture)': 'refresh($event.currentTarget.visualViewport)',
|
|
205
195
|
'(visualViewport>resize.zoneless)': 'refresh($event.target)',
|
|
206
196
|
'(visualViewport>scroll.zoneless)': 'refresh($event.target)',
|
|
207
|
-
}, template: "<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown.content as text\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: ["tui-dropdown-mobile:not(._sheet){scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;inline-size:100%;block-size:100%;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;visibility:visible!important;transform:translateZ(0);background:var(--tui-background-base);overscroll-behavior:contain;overflow:auto;box-shadow:0 -.5rem .5rem var(--tui-background-base),0 10rem var(--tui-background-base),0 20rem var(--tui-background-base),0 30rem var(--tui-background-base)}tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:not(._sheet)>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;top:0;block-size:100%;overflow:auto;margin:0 .75rem;touch-action:pan-y!important}tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet) [tuiDropdownButton][tuiDropdownButton]{position:fixed;right:1rem;bottom:1rem;display:inline-flex}tui-dropdown-mobile._sheet{position:fixed;top:0;left:0;bottom:0;right:0;scrollbar-width:none;-ms-overflow-style:none;overflow:auto;background:var(--tui-service-backdrop);box-shadow:0 -80vh 0 5rem var(--tui-service-backdrop);overflow-y:scroll;scroll-snap-type:y mandatory;overscroll-behavior:none}tui-dropdown-mobile._sheet::-webkit-scrollbar,tui-dropdown-mobile._sheet::-webkit-scrollbar-thumb{display:none}tui-root:has(tui-dialogs>:nth-child(2)) tui-dropdown-mobile._sheet{background:transparent;box-shadow:none}tui-dropdown-mobile._sheet>.t-filler{block-size:100%;scroll-snap-stop:always;scroll-snap-align:start}tui-dropdown-mobile._sheet>.t-container{display:flex;max-block-size:calc(100% - 1rem);flex-direction:column;border-top-left-radius:1rem;border-top-right-radius:1rem;padding:0 .5rem;scroll-snap-stop:always;scroll-snap-align:start;background:var(--tui-background-elevation-1)}tui-dropdown-mobile._sheet>.t-container>.t-heading{position:relative;margin:0;padding:2rem .5rem .75rem;font:var(--tui-font-heading-6)}tui-dropdown-mobile._sheet>.t-container>.t-heading:before{content:\"\";position:absolute;left:50%;top:.75rem;inline-size:2rem;block-size:.25rem;border-radius:1rem;background:var(--tui-background-neutral-2);transform:translate(-50%,-50%)}tui-dropdown-mobile._sheet>.t-container>.t-content{scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto;overflow-x:hidden}tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar,tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet tui-data-list [tuiOption]{margin-left:calc(-1 * var(--t-option-padding-inline));margin-right:calc(-1 * var(--t-option-padding-inline))}.t-dropdown-mobile{touch-action:none;visibility:hidden}.t-dropdown-mobile *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile tui-root{visibility:visible}.t-dropdown-mobile tui-root .t-root-content,.t-dropdown-mobile tui-root tui-dialogs{visibility:hidden}\n"] }]
|
|
197
|
+
}, template: "<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown.content as text\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: ["tui-dropdown-mobile:not(._sheet){scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;inline-size:100%;block-size:100%;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;visibility:visible!important;transform:translateZ(0);background:var(--tui-background-base);overscroll-behavior:contain;overflow:auto;box-shadow:0 -.5rem .5rem var(--tui-background-base),0 10rem var(--tui-background-base),0 20rem var(--tui-background-base),0 30rem var(--tui-background-base)}tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet).tui-enter,tui-dropdown-mobile:not(._sheet).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:not(._sheet):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:not(._sheet)>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;top:0;block-size:100%;overflow:auto;margin:0 .75rem;touch-action:pan-y!important}tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet) [tuiDropdownButton][tuiDropdownButton]{position:fixed;right:1rem;bottom:1rem;display:inline-flex}tui-dropdown-mobile._sheet{position:fixed;top:0;left:0;bottom:0;right:0;scrollbar-width:none;-ms-overflow-style:none;overflow:auto;background:var(--tui-service-backdrop);box-shadow:0 -80vh 0 5rem var(--tui-service-backdrop);overflow-y:scroll;scroll-snap-type:y mandatory;overscroll-behavior:none}tui-dropdown-mobile._sheet::-webkit-scrollbar,tui-dropdown-mobile._sheet::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet.tui-enter,tui-dropdown-mobile._sheet.tui-leave{animation-name:tuiFade,tuiSlide}tui-root:has(tui-dialogs>:nth-child(2)) tui-dropdown-mobile._sheet{background:transparent;box-shadow:none}tui-dropdown-mobile._sheet>.t-filler{block-size:100%;scroll-snap-stop:always;scroll-snap-align:start}tui-dropdown-mobile._sheet>.t-container{display:flex;max-block-size:calc(100% - 1rem);flex-direction:column;border-top-left-radius:1rem;border-top-right-radius:1rem;padding:0 .5rem;scroll-snap-stop:always;scroll-snap-align:start;background:var(--tui-background-elevation-1)}tui-dropdown-mobile._sheet>.t-container>.t-heading{position:relative;margin:0;padding:2rem .5rem .75rem;font:var(--tui-font-heading-6)}tui-dropdown-mobile._sheet>.t-container>.t-heading:before{content:\"\";position:absolute;left:50%;top:.75rem;inline-size:2rem;block-size:.25rem;border-radius:1rem;background:var(--tui-background-neutral-2);transform:translate(-50%,-50%)}tui-dropdown-mobile._sheet>.t-container>.t-content{scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto;overflow-x:hidden}tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar,tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet tui-data-list [tuiOption]{margin-left:calc(-1 * var(--t-option-padding-inline));margin-right:calc(-1 * var(--t-option-padding-inline))}.t-dropdown-mobile{touch-action:none;visibility:hidden}.t-dropdown-mobile *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile tui-root{visibility:visible}.t-dropdown-mobile tui-root .t-root-content,.t-dropdown-mobile tui-root tui-dialogs{visibility:hidden}\n"] }]
|
|
208
198
|
}], ctorParameters: function () { return []; } });
|
|
209
199
|
|
|
210
200
|
/**
|