@taiga-ui/addon-mobile 5.26.0 → 5.27.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.
- package/components/search-bar/search-bar.component.d.ts +1 -0
- package/fesm2022/taiga-ui-addon-mobile-components-keypad.mjs +2 -2
- package/fesm2022/taiga-ui-addon-mobile-components-search-bar.mjs +13 -4
- package/fesm2022/taiga-ui-addon-mobile-components-search-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-swipe-actions.mjs +3 -3
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +3 -3
- package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs +2 -2
- package/package.json +5 -5
- package/styles/common/hint.less +4 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class TuiSearchBarComponent {
|
|
3
|
+
protected readonly liquidGlass: boolean;
|
|
3
4
|
readonly appearance: import("@angular/core").InputSignal<"floating" | "neutral">;
|
|
4
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiSearchBarComponent, never>;
|
|
5
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<TuiSearchBarComponent, "form[tuiSearchBar],search[tuiSearchBar]", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; }, {}, never, ["input", "*"], true, never>;
|
|
@@ -7,7 +7,7 @@ class TuiKeypad {
|
|
|
7
7
|
this.columns = input(3);
|
|
8
8
|
}
|
|
9
9
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiKeypad, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", type: TuiKeypad, isStandalone: true, selector: "tui-keypad", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-tui-version": "5.
|
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", type: TuiKeypad, isStandalone: true, selector: "tui-keypad", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-tui-version": "5.27.0" }, listeners: { "mousedown.zoneless.prevent": "(0)", "pointerdown.zoneless.prevent": "(0)" }, properties: { "style.--t-columns": "columns()" } }, ngImport: i0, template: '<ng-content />', isInline: true, styles: ["tui-keypad:where(*[data-tui-version=\"5.27.0\"]){display:grid;grid-template-columns:repeat(var(--t-columns, 3),1fr);grid-auto-rows:4rem;place-items:center;inline-size:100%;max-inline-size:37.5rem;margin-inline:auto;font:600 1.75rem/1 var(--tui-typography-family-display);color:var(--tui-text-primary);-webkit-user-select:none;user-select:none}tui-keypad:where(*[data-tui-version=\"5.27.0\"])>a,tui-keypad:where(*[data-tui-version=\"5.27.0\"])>button{display:flex;box-sizing:border-box;align-items:center;justify-content:center;block-size:3.5rem;inline-size:3.5rem;max-inline-size:100%;border:none;border-radius:50%;background:transparent;font:inherit;color:inherit;text-decoration:none;cursor:pointer;transition:background var(--tui-duration) ease-out,scale var(--tui-duration) var(--tui-curve-expressive-entrance)}@media(hover:hover)and (pointer:fine){tui-keypad:where(*[data-tui-version=\"5.27.0\"])>a:hover:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.27.0\"])>button:hover:not(:disabled){background:var(--tui-background-neutral-1-hover)}}tui-keypad:where(*[data-tui-version=\"5.27.0\"])>a:active:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.27.0\"])>button:active:not(:disabled){background:var(--tui-background-neutral-1-pressed);scale:1.14}tui-keypad:where(*[data-tui-version=\"5.27.0\"])>a:focus-visible,tui-keypad:where(*[data-tui-version=\"5.27.0\"])>button:focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:.125rem}tui-keypad:where(*[data-tui-version=\"5.27.0\"])>a:disabled,tui-keypad:where(*[data-tui-version=\"5.27.0\"])>button:disabled{opacity:var(--tui-disabled-opacity);cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
11
11
|
}
|
|
12
12
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiKeypad, decorators: [{
|
|
13
13
|
type: Component,
|
|
@@ -17,7 +17,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
17
17
|
// Keep the driven field focused on tap: iOS needs mousedown, Android longtap needs pointerdown
|
|
18
18
|
'(mousedown.zoneless.prevent)': '(0)',
|
|
19
19
|
'(pointerdown.zoneless.prevent)': '(0)',
|
|
20
|
-
}, styles: ["tui-keypad:where(*[data-tui-version=\"5.
|
|
20
|
+
}, styles: ["tui-keypad:where(*[data-tui-version=\"5.27.0\"]){display:grid;grid-template-columns:repeat(var(--t-columns, 3),1fr);grid-auto-rows:4rem;place-items:center;inline-size:100%;max-inline-size:37.5rem;margin-inline:auto;font:600 1.75rem/1 var(--tui-typography-family-display);color:var(--tui-text-primary);-webkit-user-select:none;user-select:none}tui-keypad:where(*[data-tui-version=\"5.27.0\"])>a,tui-keypad:where(*[data-tui-version=\"5.27.0\"])>button{display:flex;box-sizing:border-box;align-items:center;justify-content:center;block-size:3.5rem;inline-size:3.5rem;max-inline-size:100%;border:none;border-radius:50%;background:transparent;font:inherit;color:inherit;text-decoration:none;cursor:pointer;transition:background var(--tui-duration) ease-out,scale var(--tui-duration) var(--tui-curve-expressive-entrance)}@media(hover:hover)and (pointer:fine){tui-keypad:where(*[data-tui-version=\"5.27.0\"])>a:hover:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.27.0\"])>button:hover:not(:disabled){background:var(--tui-background-neutral-1-hover)}}tui-keypad:where(*[data-tui-version=\"5.27.0\"])>a:active:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.27.0\"])>button:active:not(:disabled){background:var(--tui-background-neutral-1-pressed);scale:1.14}tui-keypad:where(*[data-tui-version=\"5.27.0\"])>a:focus-visible,tui-keypad:where(*[data-tui-version=\"5.27.0\"])>button:focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:.125rem}tui-keypad:where(*[data-tui-version=\"5.27.0\"])>a:disabled,tui-keypad:where(*[data-tui-version=\"5.27.0\"])>button:disabled{opacity:var(--tui-disabled-opacity);cursor:default}\n"] }]
|
|
21
21
|
}] });
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -1,30 +1,39 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { TUI_PLATFORM } from '@taiga-ui/cdk/tokens';
|
|
4
4
|
import { tuiButtonXOptionsProvider } from '@taiga-ui/core/directives/button-x';
|
|
5
5
|
import { tuiCommonIconsProvider } from '@taiga-ui/core/tokens';
|
|
6
|
+
import { TUI_LIQUID_GLASS } from '@taiga-ui/core/utils/miscellaneous';
|
|
7
|
+
import { TuiProgressiveBlur } from '@taiga-ui/layout/components/progressive-blur';
|
|
6
8
|
|
|
7
9
|
class TuiSearchBarComponent {
|
|
8
10
|
constructor() {
|
|
11
|
+
this.liquidGlass = inject(TUI_LIQUID_GLASS) && inject(TUI_PLATFORM) === 'ios';
|
|
9
12
|
this.appearance = input('neutral');
|
|
10
13
|
}
|
|
11
14
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSearchBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
15
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiSearchBarComponent, isStandalone: true, selector: "form[tuiSearchBar],search[tuiSearchBar]", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-appearance": "appearance()" } }, providers: [
|
|
13
16
|
tuiButtonXOptionsProvider((platform = inject(TUI_PLATFORM)) => ({
|
|
14
17
|
appearance: platform === 'android' ? 'action' : '',
|
|
15
18
|
size: platform === 'android' ? 's' : 'm',
|
|
16
19
|
})),
|
|
17
20
|
tuiCommonIconsProvider((platform = inject(TUI_PLATFORM)) => platform === 'android' ? { close: '@tui.arrow-left' } : {}),
|
|
18
21
|
], ngImport: i0, template: `
|
|
22
|
+
@if (liquidGlass) {
|
|
23
|
+
<tui-progressive-blur />
|
|
24
|
+
}
|
|
19
25
|
<div class="t-wrapper">
|
|
20
26
|
<ng-content select="input" />
|
|
21
27
|
</div>
|
|
22
28
|
<ng-content />
|
|
23
|
-
`, isInline: true, styles: [":host{--t-translate: 3.75rem;position:relative;display:flex;align-items:center;box-sizing:border-box;gap:1rem}:host ::ng-deep [tuiButtonX]{transition:margin var(--tui-duration)}.t-wrapper{position:relative;display:flex;flex:1;min-inline-size:0}:host:not(:focus-within) ::ng-deep [tuiButtonX],:host-context([data-platform=\"ios\"]):not([data-appearance=floating]) ::ng-deep [tuiButtonX]{opacity:0;visibility:hidden}:host-context([data-platform=\"ios\"])[data-appearance=floating]:focus-within ::ng-deep [tuiButtonX]{animation:tuiTranslateIn var(--tui-duration)}:host-context([data-platform=\"ios\"]):not(:focus-within) ::ng-deep [tuiButtonX],:host-context([data-platform=\"ios\"]):not([data-appearance=floating]) ::ng-deep [tuiButtonX]{margin-inline-start:-3.75rem;animation:tuiTranslateOut var(--tui-duration)}:host-context([data-platform=\"ios\"])[data-appearance=floating]{--t-glass-background: rgba(255, 255, 255, .7);--t-glass-glow: rgba(255, 255, 255, .1);--t-glass-filter: blur(.25rem) saturate(1.3) brightness(1.05);--t-glass-bevel: linear-gradient(319deg, #fff 4%, #fff 19%, rgba(255, 255, 255, .12) 40%, rgba(255, 255, 255, .02) 45%, rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0) 52%, rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, .12) 60%, #fff 80%, #fff 96%);--t-glass-bevel-filter: none}:host-context([data-platform=\"ios\"])[data-appearance=floating] ::ng-deep [tuiSearchBar]{-webkit-backdrop-filter:var(--t-glass-filter);backdrop-filter:var(--t-glass-filter);background-color:var(--t-glass-background);box-shadow:0 .5rem 2rem #00000017,inset 0 0 .5rem var(--t-glass-glow)}:host-context([data-platform=\"ios\"])[data-appearance=floating] .t-wrapper:after{content:\"\";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;padding:1px;background:var(--t-glass-bevel);filter:var(--t-glass-bevel-filter);-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-origin:content-box,border-box;mask-origin:content-box,border-box;mask-clip:content-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;border-radius:3.125rem}:host-context([data-platform=\"ios\"])[data-appearance=floating] ::ng-deep [tuiButtonX]{-webkit-backdrop-filter:var(--t-glass-filter);backdrop-filter:var(--t-glass-filter);background-color:var(--t-glass-background);box-shadow:0 .5rem 2rem #00000017,inset 0 0 .5rem var(--t-glass-glow);position:relative;box-sizing:border-box;border-radius:100%;color:var(--tui-text-primary);transition-property:margin,opacity,visibility,scale;transition-timing-function:ease,ease,ease,var(--tui-curve-expressive-entrance)}:host-context([data-platform=\"ios\"])[data-appearance=floating] ::ng-deep [tuiButtonX]:active{scale:1.25;filter:brightness(3)}:host-context([data-platform=\"ios\"])[data-appearance=floating] ::ng-deep [tuiButtonX]:after{content:\"\";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;padding:1px;background:var(--t-glass-bevel);filter:var(--t-glass-bevel-filter);-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-origin:content-box,border-box;mask-origin:content-box,border-box;mask-clip:content-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;display:block;inline-size:auto;block-size:auto;margin:0;-webkit-mask-size:auto;mask-size:auto}@keyframes tuiTranslateIn{0%{translate:var(--t-translate)}}@keyframes tuiTranslateOut{to{translate:var(--t-translate)}}:host-context([data-platform=\"android\"]):focus-within .t-wrapper:not(:last-child) ::ng-deep [tuiSearchBar]{background-image:none}:host-context([data-platform=\"android\"]) ::ng-deep [tuiButtonX]{position:absolute;inset-inline-start:.4375rem}:host-context([data-platform=\"android\"]):not(:focus-within) ::ng-deep [tuiButtonX]{margin-inline-start:0}:host-context([tuiTheme=\"dark\"])[data-appearance=floating]{--t-glass-background: rgba(255, 255, 255, .1);--t-glass-glow: rgba(31, 31, 31, .08);--t-glass-bevel: linear-gradient(319deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .12) 19%, rgba(255, 255, 255, .04) 40%, rgba(255, 255, 255, .02) 45%, rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0) 52%, rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, .04) 60%, rgba(255, 255, 255, .12) 80%, rgba(255, 255, 255, .2) 96%);--t-glass-bevel-filter: brightness(.6)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
29
|
+
`, isInline: true, styles: [":host{--t-translate: 3.75rem;position:relative;display:flex;align-items:center;box-sizing:border-box;gap:1rem}:host ::ng-deep [tuiButtonX]{transition:margin var(--tui-duration)}.t-wrapper{position:relative;display:flex;flex:1;min-inline-size:0}:host:not(:focus-within) ::ng-deep [tuiButtonX],:host-context([data-platform=\"ios\"]):not([data-appearance=floating]) ::ng-deep [tuiButtonX]{opacity:0;visibility:hidden}:host-context([data-platform=\"ios\"])[data-appearance=floating]:focus-within ::ng-deep [tuiButtonX]{animation:tuiTranslateIn var(--tui-duration)}:host-context([data-platform=\"ios\"]):not(:focus-within) ::ng-deep [tuiButtonX],:host-context([data-platform=\"ios\"]):not([data-appearance=floating]) ::ng-deep [tuiButtonX]{margin-inline-start:-3.75rem;animation:tuiTranslateOut var(--tui-duration)}:host-context([data-platform=\"ios\"])[data-appearance=floating]{--t-glass-background: rgba(255, 255, 255, .7);--t-glass-glow: rgba(255, 255, 255, .1);--t-glass-filter: blur(.25rem) saturate(1.3) brightness(1.05);--t-glass-bevel: linear-gradient(319deg, #fff 4%, #fff 19%, rgba(255, 255, 255, .12) 40%, rgba(255, 255, 255, .02) 45%, rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0) 52%, rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, .12) 60%, #fff 80%, #fff 96%);--t-glass-bevel-filter: none}:host-context([data-platform=\"ios\"])[data-appearance=floating] ::ng-deep [tuiSearchBar]{-webkit-backdrop-filter:var(--t-glass-filter);backdrop-filter:var(--t-glass-filter);background-color:var(--t-glass-background);box-shadow:0 .5rem 2rem #00000017,inset 0 0 .5rem var(--t-glass-glow)}:host-context([data-platform=\"ios\"])[data-appearance=floating] .t-wrapper:after{content:\"\";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;padding:1px;background:var(--t-glass-bevel);filter:var(--t-glass-bevel-filter);-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-origin:content-box,border-box;mask-origin:content-box,border-box;mask-clip:content-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;border-radius:3.125rem}:host-context([data-platform=\"ios\"])[data-appearance=floating] ::ng-deep [tuiButtonX]{-webkit-backdrop-filter:var(--t-glass-filter);backdrop-filter:var(--t-glass-filter);background-color:var(--t-glass-background);box-shadow:0 .5rem 2rem #00000017,inset 0 0 .5rem var(--t-glass-glow);position:relative;box-sizing:border-box;border-radius:100%;color:var(--tui-text-primary);transition-property:margin,opacity,visibility,scale;transition-timing-function:ease,ease,ease,var(--tui-curve-expressive-entrance)}:host-context([data-platform=\"ios\"])[data-appearance=floating] ::ng-deep [tuiButtonX]:active{scale:1.25;filter:brightness(3)}:host-context([data-platform=\"ios\"])[data-appearance=floating] ::ng-deep [tuiButtonX]:after{content:\"\";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;padding:1px;background:var(--t-glass-bevel);filter:var(--t-glass-bevel-filter);-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-origin:content-box,border-box;mask-origin:content-box,border-box;mask-clip:content-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;display:block;inline-size:auto;block-size:auto;margin:0;-webkit-mask-size:auto;mask-size:auto}@keyframes tuiTranslateIn{0%{translate:var(--t-translate)}}@keyframes tuiTranslateOut{to{translate:var(--t-translate)}}:host-context([data-platform=\"android\"]):focus-within .t-wrapper:not(:last-child) ::ng-deep [tuiSearchBar]{background-image:none}:host-context([data-platform=\"android\"]) ::ng-deep [tuiButtonX]{position:absolute;inset-inline-start:.4375rem}:host-context([data-platform=\"android\"]):not(:focus-within) ::ng-deep [tuiButtonX]{margin-inline-start:0}:host-context([tuiTheme=\"dark\"])[data-appearance=floating]{--t-glass-background: rgba(255, 255, 255, .1);--t-glass-glow: rgba(31, 31, 31, .08);--t-glass-bevel: linear-gradient(319deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .12) 19%, rgba(255, 255, 255, .04) 40%, rgba(255, 255, 255, .02) 45%, rgba(255, 255, 255, 0) 48%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0) 52%, rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, .04) 60%, rgba(255, 255, 255, .12) 80%, rgba(255, 255, 255, .2) 96%);--t-glass-bevel-filter: brightness(.6)}\n"], dependencies: [{ kind: "component", type: TuiProgressiveBlur, selector: "tui-progressive-blur" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24
30
|
}
|
|
25
31
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSearchBarComponent, decorators: [{
|
|
26
32
|
type: Component,
|
|
27
|
-
args: [{ selector: 'form[tuiSearchBar],search[tuiSearchBar]', template: `
|
|
33
|
+
args: [{ selector: 'form[tuiSearchBar],search[tuiSearchBar]', imports: [TuiProgressiveBlur], template: `
|
|
34
|
+
@if (liquidGlass) {
|
|
35
|
+
<tui-progressive-blur />
|
|
36
|
+
}
|
|
28
37
|
<div class="t-wrapper">
|
|
29
38
|
<ng-content select="input" />
|
|
30
39
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-search-bar.mjs","sources":["../../../projects/addon-mobile/components/search-bar/search-bar.component.ts","../../../projects/addon-mobile/components/search-bar/search-bar-input.component.ts","../../../projects/addon-mobile/components/search-bar/search-bar.ts","../../../projects/addon-mobile/components/search-bar/taiga-ui-addon-mobile-components-search-bar.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject, input} from '@angular/core';\nimport {TUI_PLATFORM} from '@taiga-ui/cdk/tokens';\nimport {tuiButtonXOptionsProvider} from '@taiga-ui/core/directives/button-x';\nimport {tuiCommonIconsProvider} from '@taiga-ui/core/tokens';\n\n@Component({\n selector: 'form[tuiSearchBar],search[tuiSearchBar]',\n template: `\n <div class=\"t-wrapper\">\n <ng-content select=\"input\" />\n </div>\n <ng-content />\n `,\n styleUrl: './search-bar.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiButtonXOptionsProvider((platform = inject(TUI_PLATFORM)) => ({\n appearance: platform === 'android' ? 'action' : '',\n size: platform === 'android' ? 's' : 'm',\n })),\n tuiCommonIconsProvider((platform = inject(TUI_PLATFORM)) =>\n platform === 'android' ? {close: '@tui.arrow-left'} : {},\n ),\n ],\n host: {'[attr.data-appearance]': 'appearance()'},\n})\nexport class TuiSearchBarComponent {\n public readonly appearance = input<'floating' | 'neutral'>('neutral');\n}\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: 'input[tuiSearchBar]',\n template: '',\n styleUrl: './search-bar-input.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n autocomplete: 'off',\n autocorrect: 'off',\n spellcheck: 'false',\n type: 'search',\n },\n})\nexport class TuiSearchBarInput {}\n","import {TuiSearchBarComponent} from './search-bar.component';\nimport {TuiSearchBarInput} from './search-bar-input.component';\n\nexport const TuiSearchBar = [TuiSearchBarComponent, TuiSearchBarInput] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-search-bar.mjs","sources":["../../../projects/addon-mobile/components/search-bar/search-bar.component.ts","../../../projects/addon-mobile/components/search-bar/search-bar-input.component.ts","../../../projects/addon-mobile/components/search-bar/search-bar.ts","../../../projects/addon-mobile/components/search-bar/taiga-ui-addon-mobile-components-search-bar.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject, input} from '@angular/core';\nimport {TUI_PLATFORM} from '@taiga-ui/cdk/tokens';\nimport {tuiButtonXOptionsProvider} from '@taiga-ui/core/directives/button-x';\nimport {tuiCommonIconsProvider} from '@taiga-ui/core/tokens';\nimport {TUI_LIQUID_GLASS} from '@taiga-ui/core/utils/miscellaneous';\nimport {TuiProgressiveBlur} from '@taiga-ui/layout/components/progressive-blur';\n\n@Component({\n selector: 'form[tuiSearchBar],search[tuiSearchBar]',\n imports: [TuiProgressiveBlur],\n template: `\n @if (liquidGlass) {\n <tui-progressive-blur />\n }\n <div class=\"t-wrapper\">\n <ng-content select=\"input\" />\n </div>\n <ng-content />\n `,\n styleUrl: './search-bar.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiButtonXOptionsProvider((platform = inject(TUI_PLATFORM)) => ({\n appearance: platform === 'android' ? 'action' : '',\n size: platform === 'android' ? 's' : 'm',\n })),\n tuiCommonIconsProvider((platform = inject(TUI_PLATFORM)) =>\n platform === 'android' ? {close: '@tui.arrow-left'} : {},\n ),\n ],\n host: {'[attr.data-appearance]': 'appearance()'},\n})\nexport class TuiSearchBarComponent {\n protected readonly liquidGlass =\n inject(TUI_LIQUID_GLASS) && inject(TUI_PLATFORM) === 'ios';\n\n public readonly appearance = input<'floating' | 'neutral'>('neutral');\n}\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: 'input[tuiSearchBar]',\n template: '',\n styleUrl: './search-bar-input.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n autocomplete: 'off',\n autocorrect: 'off',\n spellcheck: 'false',\n type: 'search',\n },\n})\nexport class TuiSearchBarInput {}\n","import {TuiSearchBarComponent} from './search-bar.component';\nimport {TuiSearchBarInput} from './search-bar-input.component';\n\nexport const TuiSearchBar = [TuiSearchBarComponent, TuiSearchBarInput] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAgCa,qBAAqB,CAAA;AAzBlC,IAAA,WAAA,GAAA;AA0BuB,QAAA,IAAA,CAAA,WAAW,GAC1B,MAAM,CAAC,gBAAgB,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,KAAK;AAE9C,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAyB,SAAS,CAAC;AACxE,IAAA;+GALY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,o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AAClB,wBAAA,UAAU,EAAE,OAAO;AACnB,wBAAA,IAAI,EAAE,QAAQ;AACjB,qBAAA,EAAA,MAAA,EAAA,CAAA,66LAAA,CAAA,EAAA;;;MCTQ,YAAY,GAAG,CAAC,qBAAqB,EAAE,iBAAiB;;ACHrE;;AAEG;;;;"}
|
|
@@ -29,7 +29,7 @@ class TuiSheetDialogClose {
|
|
|
29
29
|
this.untouched$ = merge(fromEvent(this.doc, 'touchstart', { passive: true }).pipe(map(() => false)), fromEvent(this.doc, 'touchend', { passive: true }).pipe(map(() => true)), fromEvent(this.doc, 'touchcancel', { passive: true }).pipe(map(() => true)));
|
|
30
30
|
this.swipe$ = this.scroll$.pipe(map(() => this.el.scrollHeight - this.el.clientHeight - this.el.scrollTop),
|
|
31
31
|
// Excluding scroll due to content height changes when scrolled to the end
|
|
32
|
-
filter((scroll) => Math.abs(scroll) > 10), map(() => this.el.scrollTop), pairwise(), map(([prev, curr]) => prev - curr), takeWhile((value) => value > 0), bufferCount(5), take(1));
|
|
32
|
+
filter((scroll) => Math.abs(scroll) > 10), map(() => this.el.scrollTop), pairwise(), map(([prev, curr]) => prev - curr), takeWhile((value) => value > 0), bufferCount(5), filter(({ length }) => length === 5), take(1));
|
|
33
33
|
this.release$ = this.scroll$.pipe(startWith(null), filter(() => !this.el.scrollTop), take(1));
|
|
34
34
|
this.tuiSheetDialogClose = outputFromObservable(merge(
|
|
35
35
|
// Swipe down
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-sheet-dialog.mjs","sources":["../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog-close.directive.ts","../../../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 {DOCUMENT} from '@angular/common';\nimport {Directive, inject} from '@angular/core';\nimport {outputFromObservable} from '@angular/core/rxjs-interop';\nimport {tuiIfMap} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n bufferCount,\n filter,\n fromEvent,\n map,\n merge,\n pairwise,\n startWith,\n take,\n takeWhile,\n} from 'rxjs';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\n\n@Directive({selector: '[tuiSheetDialogClose]'})\nexport class TuiSheetDialogClose {\n private readonly el = tuiInjectElement();\n private readonly doc = inject(DOCUMENT);\n private readonly sheet = inject(TuiSheetDialogComponent);\n private readonly scroll$ = fromEvent(this.el, 'scroll');\n private readonly untouched$ = merge(\n fromEvent(this.doc, 'touchstart', {passive: true}).pipe(map(() => false)),\n fromEvent(this.doc, 'touchend', {passive: true}).pipe(map(() => true)),\n fromEvent(this.doc, 'touchcancel', {passive: true}).pipe(map(() => true)),\n );\n\n private readonly swipe$ = this.scroll$.pipe(\n map(() => this.el.scrollHeight - this.el.clientHeight - this.el.scrollTop),\n // Excluding scroll due to content height changes when scrolled to the end\n filter((scroll) => Math.abs(scroll) > 10),\n map(() => this.el.scrollTop),\n pairwise(),\n map(([prev, curr]) => prev - curr),\n takeWhile((value) => value > 0),\n bufferCount(5),\n take(1),\n );\n\n private readonly release$ = this.scroll$.pipe(\n startWith(null),\n filter(() => !this.el.scrollTop),\n take(1),\n );\n\n public readonly tuiSheetDialogClose = outputFromObservable(\n merge(\n // Swipe down\n this.untouched$.pipe(\n tuiIfMap(\n () => this.swipe$,\n (untouched) => untouched && this.el.scrollTop < this.sheet.initial,\n ),\n ),\n // Wheel/let go at the end\n merge(\n this.untouched$,\n fromEvent(this.el, 'wheel').pipe(map(() => true)),\n ).pipe(tuiIfMap(() => this.release$)),\n ),\n );\n}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n viewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\nimport {TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiCloseWatcher, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiScrollRef} from '@taiga-ui/core/components/scrollbar';\nimport {TUI_DIALOGS_CLOSE} from '@taiga-ui/core/portals/dialog';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {exhaustMap, filter, isObservable, map, merge, of, Subject, take} from 'rxjs';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogClose} from './sheet-dialog-close.directive';\n\nconst REQUIRED_ERROR = new Error(ngDevMode ? 'Required dialog was dismissed' : '');\n\n@Component({\n selector: 'tui-sheet-dialog',\n imports: [PolymorpheusOutlet, TuiButton, WaResizeObserver],\n templateUrl: './sheet-dialog.template.html',\n styleUrl: './sheet-dialog.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n TuiAnimated,\n TuiScrollRef,\n {directive: TuiSheetDialogClose, outputs: ['tuiSheetDialogClose']},\n ],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[class._bar]': 'context.bar',\n '[class._closeable]': 'context.closable',\n '[style.--tui-offset.px]': 'context.offset',\n '(click.self)': 'close$.next()',\n '(document:touchstart.passive.zoneless)': 'interacted = true',\n '(tuiSheetDialogClose)': 'close$.next()',\n '(wheel.passive.zoneless)': 'interacted = true',\n },\n})\nexport class TuiSheetDialogComponent {\n private readonly stops = viewChildren('stops', {read: ElementRef});\n private readonly el = tuiInjectElement();\n\n protected readonly context = injectContext<TuiPortalContext<TuiSheetDialogOptions>>();\n protected readonly close$ = new Subject<void>();\n protected interacted = false;\n protected readonly $ = merge(\n this.close$,\n tuiCloseWatcher(),\n inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)),\n )\n .pipe(\n tuiZonefull(),\n exhaustMap(() => {\n if (isObservable(this.context.closable)) {\n if (this.el.scrollTop <= 0) {\n this.el.scrollTo({top: this.initial, behavior: 'smooth'});\n }\n\n return this.context.closable.pipe(take(1));\n }\n\n return of(this.context.closable);\n }),\n filter(Boolean),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.close());\n\n constructor() {\n afterNextRender(() => this.onResize());\n }\n\n public get initial(): number {\n return this.context.closable\n ? this.stops()\n .map((e) => e.nativeElement.offsetTop)\n .concat(this.el.clientHeight ?? Infinity)[this.context.initial] || 0\n : 0;\n }\n\n // Re-pin async content to the initial snap; mandatory scroll-snap jumps to the bottom otherwise.\n protected onResize(): void {\n this.el.scrollTop = this.interacted ? this.el.scrollTop : this.initial;\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div\n class=\"t-sheet\"\n (waResizeObserver)=\"onResize()\"\n>\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable) {\n <footer>\n <button\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n </ng-container>\n </div>\n</div>\n","import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiSheetDialogOptions<I = undefined> {\n readonly appearance: string;\n readonly closable: Observable<boolean> | boolean;\n readonly data: I extends void ? undefined : I;\n readonly initial: number;\n readonly label: string;\n readonly offset: number;\n readonly stops: readonly string[];\n readonly bar: boolean;\n readonly required: boolean;\n /**\n * Address-bar (`<meta name=\"theme-color\">`) color applied while the sheet is\n * open, matching the dimmed backdrop. Pass an empty string to leave the\n * address bar untouched (e.g. apps that manage `theme-color` themselves, or\n * need a value that tracks dark mode).\n */\n readonly themeColor: string;\n}\n\nexport const TUI_SHEET_DIALOG_DEFAULT_OPTIONS: TuiSheetDialogOptions = {\n label: '',\n appearance: '',\n stops: [],\n initial: 0,\n offset: 16,\n closable: true,\n data: undefined,\n bar: true,\n required: false,\n themeColor: '#404040',\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const [TUI_SHEET_DIALOG_OPTIONS, tuiSheetDialogOptionsProvider] = tuiCreateOptions(\n TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n);\n","import {inject, Injectable} from '@angular/core';\nimport {Meta} from '@angular/platform-browser';\nimport {type TuiModalComponent, TuiModalService} from '@taiga-ui/core/portals/modal';\nimport {type PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\nimport {\n TUI_SHEET_DIALOG_OPTIONS,\n type TuiSheetDialogOptions,\n} from './sheet-dialog.options';\n\nconst THEME_COLOR = 'name=\"theme-color\"';\n\n@Injectable({providedIn: 'root'})\nexport class TuiSheetDialogService extends TuiModalService<TuiSheetDialogOptions<any>> {\n private readonly meta = inject(Meta);\n private initial = '';\n private count = 0;\n\n protected readonly options = inject(TUI_SHEET_DIALOG_OPTIONS);\n protected readonly content = TuiSheetDialogComponent;\n\n protected override add(\n component: PolymorpheusComponent<TuiModalComponent<TuiSheetDialogOptions>>,\n ): () => void {\n // Read the live tag at open time, not at construction: a color set later\n // (an app-level dark mode effect) would otherwise be lost on revert.\n if (!this.count++ && this.options.themeColor) {\n this.initial = this.meta.getTag(THEME_COLOR)?.content ?? '';\n this.meta.updateTag({\n name: 'theme-color',\n content: this.options.themeColor,\n });\n }\n\n const cleanup = super.add(component);\n\n return () => {\n cleanup();\n\n if (--this.count || !this.options.themeColor) {\n return;\n }\n\n if (this.initial) {\n this.meta.updateTag({name: 'theme-color', content: this.initial});\n } else {\n this.meta.removeTag(THEME_COLOR);\n }\n };\n }\n}\n","import {Directive, input} from '@angular/core';\nimport {tuiAsPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogService} from './sheet-dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiSheetDialog]',\n providers: [tuiAsPortal(TuiSheetDialogService)],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['options: tuiSheetDialogOptions', 'open: tuiSheetDialog'],\n outputs: ['openChange: tuiSheetDialogChange'],\n },\n ],\n})\nexport class TuiSheetDialog {\n public readonly tuiSheetDialogOptions = input<Partial<TuiSheetDialogOptions>>({});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.TuiSheetDialogClose","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAoBa,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;QAEqB,IAAA,CAAA,EAAE,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,uBAAuB,CAAC;QACvC,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC;AACtC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAC/B,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,EAAC,OAAO,EAAE,I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AA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAStC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAX1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;AAC/C,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,kBAAkB;AAC7B,4BAAA,MAAM,EAAE,CAAC,gCAAgC,EAAE,sBAAsB,CAAC;4BAClE,OAAO,EAAE,CAAC,kCAAkC,CAAC;AAChD,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-sheet-dialog.mjs","sources":["../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog-close.directive.ts","../../../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 {DOCUMENT} from '@angular/common';\nimport {Directive, inject} from '@angular/core';\nimport {outputFromObservable} from '@angular/core/rxjs-interop';\nimport {tuiIfMap} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n bufferCount,\n filter,\n fromEvent,\n map,\n merge,\n pairwise,\n startWith,\n take,\n takeWhile,\n} from 'rxjs';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\n\n@Directive({selector: '[tuiSheetDialogClose]'})\nexport class TuiSheetDialogClose {\n private readonly el = tuiInjectElement();\n private readonly doc = inject(DOCUMENT);\n private readonly sheet = inject(TuiSheetDialogComponent);\n private readonly scroll$ = fromEvent(this.el, 'scroll');\n private readonly untouched$ = merge(\n fromEvent(this.doc, 'touchstart', {passive: true}).pipe(map(() => false)),\n fromEvent(this.doc, 'touchend', {passive: true}).pipe(map(() => true)),\n fromEvent(this.doc, 'touchcancel', {passive: true}).pipe(map(() => true)),\n );\n\n private readonly swipe$ = this.scroll$.pipe(\n map(() => this.el.scrollHeight - this.el.clientHeight - this.el.scrollTop),\n // Excluding scroll due to content height changes when scrolled to the end\n filter((scroll) => Math.abs(scroll) > 10),\n map(() => this.el.scrollTop),\n pairwise(),\n map(([prev, curr]) => prev - curr),\n takeWhile((value) => value > 0),\n bufferCount(5),\n filter(({length}) => length === 5),\n take(1),\n );\n\n private readonly release$ = this.scroll$.pipe(\n startWith(null),\n filter(() => !this.el.scrollTop),\n take(1),\n );\n\n public readonly tuiSheetDialogClose = outputFromObservable(\n merge(\n // Swipe down\n this.untouched$.pipe(\n tuiIfMap(\n () => this.swipe$,\n (untouched) => untouched && this.el.scrollTop < this.sheet.initial,\n ),\n ),\n // Wheel/let go at the end\n merge(\n this.untouched$,\n fromEvent(this.el, 'wheel').pipe(map(() => true)),\n ).pipe(tuiIfMap(() => this.release$)),\n ),\n );\n}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n viewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\nimport {TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiCloseWatcher, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiScrollRef} from '@taiga-ui/core/components/scrollbar';\nimport {TUI_DIALOGS_CLOSE} from '@taiga-ui/core/portals/dialog';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {exhaustMap, filter, isObservable, map, merge, of, Subject, take} from 'rxjs';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogClose} from './sheet-dialog-close.directive';\n\nconst REQUIRED_ERROR = new Error(ngDevMode ? 'Required dialog was dismissed' : '');\n\n@Component({\n selector: 'tui-sheet-dialog',\n imports: [PolymorpheusOutlet, TuiButton, WaResizeObserver],\n templateUrl: './sheet-dialog.template.html',\n styleUrl: './sheet-dialog.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n TuiAnimated,\n TuiScrollRef,\n {directive: TuiSheetDialogClose, outputs: ['tuiSheetDialogClose']},\n ],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[class._bar]': 'context.bar',\n '[class._closeable]': 'context.closable',\n '[style.--tui-offset.px]': 'context.offset',\n '(click.self)': 'close$.next()',\n '(document:touchstart.passive.zoneless)': 'interacted = true',\n '(tuiSheetDialogClose)': 'close$.next()',\n '(wheel.passive.zoneless)': 'interacted = true',\n },\n})\nexport class TuiSheetDialogComponent {\n private readonly stops = viewChildren('stops', {read: ElementRef});\n private readonly el = tuiInjectElement();\n\n protected readonly context = injectContext<TuiPortalContext<TuiSheetDialogOptions>>();\n protected readonly close$ = new Subject<void>();\n protected interacted = false;\n protected readonly $ = merge(\n this.close$,\n tuiCloseWatcher(),\n inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)),\n )\n .pipe(\n tuiZonefull(),\n exhaustMap(() => {\n if (isObservable(this.context.closable)) {\n if (this.el.scrollTop <= 0) {\n this.el.scrollTo({top: this.initial, behavior: 'smooth'});\n }\n\n return this.context.closable.pipe(take(1));\n }\n\n return of(this.context.closable);\n }),\n filter(Boolean),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.close());\n\n constructor() {\n afterNextRender(() => this.onResize());\n }\n\n public get initial(): number {\n return this.context.closable\n ? this.stops()\n .map((e) => e.nativeElement.offsetTop)\n .concat(this.el.clientHeight ?? Infinity)[this.context.initial] || 0\n : 0;\n }\n\n // Re-pin async content to the initial snap; mandatory scroll-snap jumps to the bottom otherwise.\n protected onResize(): void {\n this.el.scrollTop = this.interacted ? this.el.scrollTop : this.initial;\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div\n class=\"t-sheet\"\n (waResizeObserver)=\"onResize()\"\n>\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable) {\n <footer>\n <button\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n </ng-container>\n </div>\n</div>\n","import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiSheetDialogOptions<I = undefined> {\n readonly appearance: string;\n readonly closable: Observable<boolean> | boolean;\n readonly data: I extends void ? undefined : I;\n readonly initial: number;\n readonly label: string;\n readonly offset: number;\n readonly stops: readonly string[];\n readonly bar: boolean;\n readonly required: boolean;\n /**\n * Address-bar (`<meta name=\"theme-color\">`) color applied while the sheet is\n * open, matching the dimmed backdrop. Pass an empty string to leave the\n * address bar untouched (e.g. apps that manage `theme-color` themselves, or\n * need a value that tracks dark mode).\n */\n readonly themeColor: string;\n}\n\nexport const TUI_SHEET_DIALOG_DEFAULT_OPTIONS: TuiSheetDialogOptions = {\n label: '',\n appearance: '',\n stops: [],\n initial: 0,\n offset: 16,\n closable: true,\n data: undefined,\n bar: true,\n required: false,\n themeColor: '#404040',\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const [TUI_SHEET_DIALOG_OPTIONS, tuiSheetDialogOptionsProvider] = tuiCreateOptions(\n TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n);\n","import {inject, Injectable} from '@angular/core';\nimport {Meta} from '@angular/platform-browser';\nimport {type TuiModalComponent, TuiModalService} from '@taiga-ui/core/portals/modal';\nimport {type PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\nimport {\n TUI_SHEET_DIALOG_OPTIONS,\n type TuiSheetDialogOptions,\n} from './sheet-dialog.options';\n\nconst THEME_COLOR = 'name=\"theme-color\"';\n\n@Injectable({providedIn: 'root'})\nexport class TuiSheetDialogService extends TuiModalService<TuiSheetDialogOptions<any>> {\n private readonly meta = inject(Meta);\n private initial = '';\n private count = 0;\n\n protected readonly options = inject(TUI_SHEET_DIALOG_OPTIONS);\n protected readonly content = TuiSheetDialogComponent;\n\n protected override add(\n component: PolymorpheusComponent<TuiModalComponent<TuiSheetDialogOptions>>,\n ): () => void {\n // Read the live tag at open time, not at construction: a color set later\n // (an app-level dark mode effect) would otherwise be lost on revert.\n if (!this.count++ && this.options.themeColor) {\n this.initial = this.meta.getTag(THEME_COLOR)?.content ?? '';\n this.meta.updateTag({\n name: 'theme-color',\n content: this.options.themeColor,\n });\n }\n\n const cleanup = super.add(component);\n\n return () => {\n cleanup();\n\n if (--this.count || !this.options.themeColor) {\n return;\n }\n\n if (this.initial) {\n this.meta.updateTag({name: 'theme-color', content: this.initial});\n } else {\n this.meta.removeTag(THEME_COLOR);\n }\n };\n }\n}\n","import {Directive, input} from '@angular/core';\nimport {tuiAsPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogService} from './sheet-dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiSheetDialog]',\n providers: [tuiAsPortal(TuiSheetDialogService)],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['options: tuiSheetDialogOptions', 'open: tuiSheetDialog'],\n outputs: ['openChange: tuiSheetDialogChange'],\n },\n ],\n})\nexport class TuiSheetDialog {\n public readonly tuiSheetDialogOptions = input<Partial<TuiSheetDialogOptions>>({});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.TuiSheetDialogClose","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAoBa,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;QAEqB,IAAA,CAAA,EAAE,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,uBAAuB,CAAC;QACvC,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC;AACtC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAC/B,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,EACzE,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,EACtE,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,aAAa,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,CAC5E;AAEgB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,C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AE,CAAC,gCAAgC,EAAE,sBAAsB,CAAC;4BAClE,OAAO,EAAE,CAAC,kCAAkC,CAAC;AAChD,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -47,11 +47,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
47
47
|
|
|
48
48
|
class Styles {
|
|
49
49
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-swipe-actions-5.
|
|
50
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-swipe-actions-5.27.0"], ngImport: i0, template: '', isInline: true, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.27.0\"]){scroll-snap-type:none}tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.27.0\"])>*{animation:tuiOnboardingEnter calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance),tuiOnboardingShow var(--tui-duration) linear calc(var(--tui-duration) / .6),tuiOnboardingExit calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance) calc(calc(var(--tui-duration) / .6) + var(--tui-duration))}@keyframes tuiOnboardingEnter{0%{transform:translate(0)}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingShow{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingExit{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(0)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
51
51
|
}
|
|
52
52
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: Styles, decorators: [{
|
|
53
53
|
type: Component,
|
|
54
|
-
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-swipe-actions-${TUI_VERSION}`, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.
|
|
54
|
+
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-swipe-actions-${TUI_VERSION}`, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.27.0\"]){scroll-snap-type:none}tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.27.0\"])>*{animation:tuiOnboardingEnter calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance),tuiOnboardingShow var(--tui-duration) linear calc(var(--tui-duration) / .6),tuiOnboardingExit calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance) calc(calc(var(--tui-duration) / .6) + var(--tui-duration))}@keyframes tuiOnboardingEnter{0%{transform:translate(0)}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingShow{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingExit{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(0)}}\n"] }]
|
|
55
55
|
}] });
|
|
56
56
|
class TuiSwipeActionsOnboarding {
|
|
57
57
|
constructor() {
|
|
@@ -59,7 +59,7 @@ class TuiSwipeActionsOnboarding {
|
|
|
59
59
|
this.nothing = tuiWithStyles(Styles);
|
|
60
60
|
}
|
|
61
61
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSwipeActionsOnboarding, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
62
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: TuiSwipeActionsOnboarding, isStandalone: true, selector: "tui-swipe-actions[onboarding]", inputs: { onboarding: { classPropertyName: "onboarding", publicName: "onboarding", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onboarding: "onboardingChange" }, host: { attributes: { "data-tui-version": "5.
|
|
62
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: TuiSwipeActionsOnboarding, isStandalone: true, selector: "tui-swipe-actions[onboarding]", inputs: { onboarding: { classPropertyName: "onboarding", publicName: "onboarding", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onboarding: "onboardingChange" }, host: { attributes: { "data-tui-version": "5.27.0" }, listeners: { "animationend": "onboarding.set($event.animationName !== \"tuiOnboardingExit\")" }, properties: { "class._onboarding": "onboarding()" } }, ngImport: i0 }); }
|
|
63
63
|
}
|
|
64
64
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSwipeActionsOnboarding, decorators: [{
|
|
65
65
|
type: Directive,
|
|
@@ -69,13 +69,13 @@ class TuiDropdownMobileComponent {
|
|
|
69
69
|
return this.dropdown.el.contains(tuiGetFocused(this.doc));
|
|
70
70
|
}
|
|
71
71
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDropdownMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
72
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { attributes: { "data-tui-version": "5.
|
|
72
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { attributes: { "data-tui-version": "5.27.0" }, listeners: { "document:click.zoneless.capture": "onClick($event)", "pointerdown.prevent": "0", "visualViewport>resize.zoneless": "refresh()", "visualViewport>scroll.zoneless": "refresh()", "window>scroll.zoneless.capture": "refresh()" } }, hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiActiveZone }], ngImport: i0, template: `
|
|
73
73
|
<div class="t-container">
|
|
74
74
|
<ng-container *polymorpheusOutlet="dropdown.content() as text; context: ctx">
|
|
75
75
|
{{ text }}
|
|
76
76
|
</ng-container>
|
|
77
77
|
</div>
|
|
78
|
-
`, isInline: true, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.
|
|
78
|
+
`, isInline: true, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]){scrollbar-width:none;position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;visibility:visible!important;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);box-sizing:border-box;padding-block-end:env(safe-area-inset-bottom);pointer-events:auto}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]).tui-enter,tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])>.t-container{scrollbar-width:none;position:sticky;inset-block-start:0;block-size:100%;overflow:auto;padding:0 var(--tui-padding-inline);touch-action:pan-y!important;--tui-padding-inline: 1rem}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])>.t-container::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])>.t-container tui-data-list{padding:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])>.t-container tui-data-list [tuiOption]{box-sizing:content-box;border-radius:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]) [tuiDropdownButton][tuiDropdownButton]{position:fixed;display:inline-flex;inset-inline-end:1rem;inset-block-end:max(1rem,env(safe-area-inset-bottom))}.t-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]){touch-action:none;visibility:hidden}.t-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]) *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]) tui-root{visibility:visible}.t-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]) tui-root .t-root-content,.t-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]) tui-root tui-dialogs{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
79
79
|
}
|
|
80
80
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDropdownMobileComponent, decorators: [{
|
|
81
81
|
type: Component,
|
|
@@ -92,7 +92,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
92
92
|
'(visualViewport>resize.zoneless)': 'refresh()',
|
|
93
93
|
'(visualViewport>scroll.zoneless)': 'refresh()',
|
|
94
94
|
'(window>scroll.zoneless.capture)': 'refresh()',
|
|
95
|
-
}, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.
|
|
95
|
+
}, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]){scrollbar-width:none;position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;visibility:visible!important;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);box-sizing:border-box;padding-block-end:env(safe-area-inset-bottom);pointer-events:auto}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]).tui-enter,tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])>.t-container{scrollbar-width:none;position:sticky;inset-block-start:0;block-size:100%;overflow:auto;padding:0 var(--tui-padding-inline);touch-action:pan-y!important;--tui-padding-inline: 1rem}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])>.t-container::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])>.t-container tui-data-list{padding:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"])>.t-container tui-data-list [tuiOption]{box-sizing:content-box;border-radius:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]) [tuiDropdownButton][tuiDropdownButton]{position:fixed;display:inline-flex;inset-inline-end:1rem;inset-block-end:max(1rem,env(safe-area-inset-bottom))}.t-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]){touch-action:none;visibility:hidden}.t-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]) *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]) tui-root{visibility:visible}.t-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]) tui-root .t-root-content,.t-dropdown-mobile:where(*[data-tui-version=\"5.27.0\"]) tui-root tui-dialogs{visibility:hidden}\n"] }]
|
|
96
96
|
}], ctorParameters: () => [] });
|
|
97
97
|
|
|
98
98
|
class TuiDropdownMobile {
|
|
@@ -13,11 +13,11 @@ const TO = [{ scale: '0', opacity: '0.12' }, { opacity: '0.12' }];
|
|
|
13
13
|
const FROM = [{ opacity: '0.12' }, { opacity: '0' }];
|
|
14
14
|
class Styles {
|
|
15
15
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-ripple-5.
|
|
16
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-ripple-5.27.0"], ngImport: i0, template: '', isInline: true, styles: [".tui-ripple:where(*[data-tui-version=\"5.27.0\"]){position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
17
17
|
}
|
|
18
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: Styles, decorators: [{
|
|
19
19
|
type: Component,
|
|
20
|
-
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-ripple-${TUI_VERSION}`, styles: [".tui-ripple:where(*[data-tui-version=\"5.
|
|
20
|
+
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-ripple-${TUI_VERSION}`, styles: [".tui-ripple:where(*[data-tui-version=\"5.27.0\"]){position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"] }]
|
|
21
21
|
}] });
|
|
22
22
|
class TuiRipple {
|
|
23
23
|
constructor() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/addon-mobile",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.27.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",
|
|
@@ -120,10 +120,10 @@
|
|
|
120
120
|
"@ng-web-apis/common": "^5.3.0",
|
|
121
121
|
"@ng-web-apis/platform": "^5.3.0",
|
|
122
122
|
"@ng-web-apis/resize-observer": "^5.3.0",
|
|
123
|
-
"@taiga-ui/cdk": "5.
|
|
124
|
-
"@taiga-ui/core": "5.
|
|
125
|
-
"@taiga-ui/kit": "5.
|
|
126
|
-
"@taiga-ui/layout": "5.
|
|
123
|
+
"@taiga-ui/cdk": "5.27.0",
|
|
124
|
+
"@taiga-ui/core": "5.27.0",
|
|
125
|
+
"@taiga-ui/kit": "5.27.0",
|
|
126
|
+
"@taiga-ui/layout": "5.27.0",
|
|
127
127
|
"@taiga-ui/polymorpheus": "^5.0.1",
|
|
128
128
|
"rxjs": ">=7.0.0"
|
|
129
129
|
},
|
package/styles/common/hint.less
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
tui-hint {
|
|
2
2
|
font: var(--tui-typography-body-m);
|
|
3
3
|
|
|
4
|
+
--t-arrow-inline: 1.5rem;
|
|
5
|
+
--t-arrow-block: 1.125rem;
|
|
6
|
+
--t-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 18"><path d="M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z" /></svg>');
|
|
7
|
+
|
|
4
8
|
&.tui-enter {
|
|
5
9
|
animation-timing-function: var(--tui-curve-expressive-entrance);
|
|
6
10
|
}
|
|
@@ -8,10 +12,4 @@ tui-hint {
|
|
|
8
12
|
&.tui-leave {
|
|
9
13
|
animation-timing-function: var(--tui-curve-expressive-exit);
|
|
10
14
|
}
|
|
11
|
-
|
|
12
|
-
&::before {
|
|
13
|
-
inline-size: 1.5rem;
|
|
14
|
-
block-size: 1.125rem;
|
|
15
|
-
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 18"><path d="M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z" /></svg>');
|
|
16
|
-
}
|
|
17
15
|
}
|