@taiga-ui/addon-mobile 4.52.0-canary.eb5ffe3 → 4.52.0-canary.ec0802b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +2 -2
  2. package/components/index.d.ts +0 -1
  3. package/components/mobile-calendar/mobile-calendar.strategy.d.ts +2 -5
  4. package/components/sheet-dialog/sheet-dialog.component.d.ts +2 -2
  5. package/components/sheet-dialog/sheet-dialog.directive.d.ts +4 -3
  6. package/components/sheet-dialog/sheet-dialog.options.d.ts +3 -9
  7. package/components/sheet-dialog/sheet-dialog.service.d.ts +9 -4
  8. package/directives/responsive-dialog/responsive-dialog.directive.d.ts +5 -4
  9. package/directives/responsive-dialog/responsive-dialog.service.d.ts +4 -7
  10. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs +2 -1
  11. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs.map +1 -1
  12. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +0 -1
  13. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs +3 -4
  15. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs +9 -24
  17. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +1 -1
  19. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +51 -48
  21. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs +0 -1
  23. package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs +2 -3
  25. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-addon-mobile-components.mjs +0 -1
  27. package/fesm2022/taiga-ui-addon-mobile-components.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +0 -1
  29. package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs +40 -23
  31. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs +0 -1
  33. package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs.map +1 -1
  34. package/package.json +9 -10
  35. package/styles/common/card-large.less +4 -0
  36. package/styles/taiga-ui-mobile.less +6 -0
  37. package/components/mobile-dialog/index.d.ts +0 -3
  38. package/components/mobile-dialog/mobile-dialog.component.d.ts +0 -10
  39. package/components/mobile-dialog/mobile-dialog.options.d.ts +0 -12
  40. package/components/mobile-dialog/mobile-dialog.service.d.ts +0 -10
  41. package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs +0 -64
  42. package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs.map +0 -1
@@ -1,64 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectionStrategy, Component, InjectionToken, Injectable } from '@angular/core';
3
- import { TuiRipple } from '@taiga-ui/addon-mobile/directives';
4
- import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
5
- import { TuiButton } from '@taiga-ui/core/components/button';
6
- import { injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
7
- import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
8
- import { TuiPopoverService } from '@taiga-ui/cdk/services';
9
- import { TUI_DIALOGS } from '@taiga-ui/core/components/dialog';
10
-
11
- class TuiMobileDialog {
12
- constructor() {
13
- this.isIOS = inject(TUI_IS_IOS);
14
- this.context = injectContext();
15
- }
16
- onAction(index) {
17
- this.context.completeWith(index);
18
- }
19
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialog, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiMobileDialog, isStandalone: true, selector: "tui-mobile-dialog", host: { properties: { "class._ios": "isIOS" } }, ngImport: i0, template: "@if (!!context.label) {\n <h2\n automation-id=\"tui-mobile-dialog__label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n {{ context.label }}\n </h2>\n}\n<div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n</div>\n@for (action of context.actions; track action) {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n tuiRipple\n type=\"button\"\n class=\"t-button\"\n [class.t-button_column]=\"$count > 2\"\n (click)=\"onAction($index)\"\n >\n {{ action }}\n </button>\n}\n", styles: [":host{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:block;background:var(--tui-background-base);word-break:break-word;overflow:hidden;padding:1.25rem .75rem 0 1.5rem}:host:not(._ios){max-inline-size:17.5rem;border-radius:.125rem;text-align:start;box-shadow:0 1.5rem 1.5rem #00000052}:host._ios{max-inline-size:16.875rem;padding:1.5rem 0 0;border-radius:.75rem;text-align:center}.t-heading{font-size:1rem}:host._ios .t-heading{font-weight:700;font-size:1.125rem}.t-content{margin-block-start:.75rem;font-size:.875rem;line-height:1.25rem;padding-inline-end:.75rem}:host._ios .t-content{margin-block-start:.25rem;padding-inline-start:1.5rem;padding-inline-end:1.5rem}.t-button{border-radius:0}:host._ios .t-button{border-block-start:#b8b8b8 1px solid;block-size:2.625rem;inline-size:100%}:host._ios .t-button:first-of-type{margin-block-start:1.125rem}:host:not(._ios) .t-button{margin:.5rem 0 .5rem .5rem;float:inline-end}:host:not(._ios) .t-button_column{display:block;float:none;margin-inline-start:auto}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiRipple, selector: "[tuiRipple]", inputs: ["tuiRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21
- }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialog, decorators: [{
23
- type: Component,
24
- args: [{ selector: 'tui-mobile-dialog', imports: [PolymorpheusOutlet, TuiButton, TuiRipple], changeDetection: ChangeDetectionStrategy.OnPush, host: {
25
- '[class._ios]': 'isIOS',
26
- }, template: "@if (!!context.label) {\n <h2\n automation-id=\"tui-mobile-dialog__label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n {{ context.label }}\n </h2>\n}\n<div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n</div>\n@for (action of context.actions; track action) {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n tuiRipple\n type=\"button\"\n class=\"t-button\"\n [class.t-button_column]=\"$count > 2\"\n (click)=\"onAction($index)\"\n >\n {{ action }}\n </button>\n}\n", styles: [":host{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:block;background:var(--tui-background-base);word-break:break-word;overflow:hidden;padding:1.25rem .75rem 0 1.5rem}:host:not(._ios){max-inline-size:17.5rem;border-radius:.125rem;text-align:start;box-shadow:0 1.5rem 1.5rem #00000052}:host._ios{max-inline-size:16.875rem;padding:1.5rem 0 0;border-radius:.75rem;text-align:center}.t-heading{font-size:1rem}:host._ios .t-heading{font-weight:700;font-size:1.125rem}.t-content{margin-block-start:.75rem;font-size:.875rem;line-height:1.25rem;padding-inline-end:.75rem}:host._ios .t-content{margin-block-start:.25rem;padding-inline-start:1.5rem;padding-inline-end:1.5rem}.t-button{border-radius:0}:host._ios .t-button{border-block-start:#b8b8b8 1px solid;block-size:2.625rem;inline-size:100%}:host._ios .t-button:first-of-type{margin-block-start:1.125rem}:host:not(._ios) .t-button{margin:.5rem 0 .5rem .5rem;float:inline-end}:host:not(._ios) .t-button_column{display:block;float:none;margin-inline-start:auto}\n"] }]
27
- }] });
28
-
29
- const TUI_MOBILE_DIALOG_DEFAULT_OPTIONS = {
30
- label: '',
31
- actions: ['OK'],
32
- data: undefined,
33
- };
34
- /**
35
- * Default parameters for mobile dialog component
36
- */
37
- const TUI_MOBILE_DIALOG_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_MOBILE_DIALOG_OPTIONS' : '', {
38
- factory: () => TUI_MOBILE_DIALOG_DEFAULT_OPTIONS,
39
- });
40
- function tuiMobileDialogOptionsProvider(options) {
41
- return tuiProvideOptions(TUI_MOBILE_DIALOG_OPTIONS, options, TUI_MOBILE_DIALOG_DEFAULT_OPTIONS);
42
- }
43
-
44
- class TuiMobileDialogService extends TuiPopoverService {
45
- open(content, options = {}) {
46
- return super.open(content, options);
47
- }
48
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
49
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialogService, providedIn: 'root', useFactory: () => new TuiMobileDialogService(TUI_DIALOGS, TuiMobileDialog, inject(TUI_MOBILE_DIALOG_OPTIONS)) }); }
50
- }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialogService, decorators: [{
52
- type: Injectable,
53
- args: [{
54
- providedIn: 'root',
55
- useFactory: () => new TuiMobileDialogService(TUI_DIALOGS, TuiMobileDialog, inject(TUI_MOBILE_DIALOG_OPTIONS)),
56
- }]
57
- }] });
58
-
59
- /**
60
- * Generated bundle index. Do not edit.
61
- */
62
-
63
- export { TUI_MOBILE_DIALOG_DEFAULT_OPTIONS, TUI_MOBILE_DIALOG_OPTIONS, TuiMobileDialog, TuiMobileDialogService, tuiMobileDialogOptionsProvider };
64
- //# sourceMappingURL=taiga-ui-addon-mobile-components-mobile-dialog.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-mobile-dialog.mjs","sources":["../../../projects/addon-mobile/components/mobile-dialog/mobile-dialog.component.ts","../../../projects/addon-mobile/components/mobile-dialog/mobile-dialog.template.html","../../../projects/addon-mobile/components/mobile-dialog/mobile-dialog.options.ts","../../../projects/addon-mobile/components/mobile-dialog/mobile-dialog.service.ts","../../../projects/addon-mobile/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {TuiRipple} from '@taiga-ui/addon-mobile/directives';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {type TuiMobileDialogOptions} from './mobile-dialog.options';\n\n@Component({\n selector: 'tui-mobile-dialog',\n imports: [PolymorpheusOutlet, TuiButton, TuiRipple],\n templateUrl: './mobile-dialog.template.html',\n styleUrl: './mobile-dialog.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._ios]': 'isIOS',\n },\n})\nexport class TuiMobileDialog<I> {\n protected readonly isIOS = inject(TUI_IS_IOS);\n protected readonly context =\n injectContext<TuiPopover<TuiMobileDialogOptions<I>, number>>();\n\n protected onAction(index: number): void {\n this.context.completeWith(index);\n }\n}\n","@if (!!context.label) {\n <h2\n automation-id=\"tui-mobile-dialog__label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n {{ context.label }}\n </h2>\n}\n<div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n</div>\n@for (action of context.actions; track action) {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n tuiRipple\n type=\"button\"\n class=\"t-button\"\n [class.t-button_column]=\"$count > 2\"\n (click)=\"onAction($index)\"\n >\n {{ action }}\n </button>\n}\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport interface TuiMobileDialogOptions<I = undefined> {\n readonly actions: readonly string[];\n readonly data: I;\n readonly label: string;\n}\n\nexport const TUI_MOBILE_DIALOG_DEFAULT_OPTIONS: TuiMobileDialogOptions = {\n label: '',\n actions: ['OK'],\n data: undefined,\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const TUI_MOBILE_DIALOG_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_MOBILE_DIALOG_OPTIONS' : '',\n {\n factory: () => TUI_MOBILE_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiMobileDialogOptionsProvider(\n options: Partial<TuiMobileDialogOptions<unknown>>,\n): Provider {\n return tuiProvideOptions(\n TUI_MOBILE_DIALOG_OPTIONS,\n options,\n TUI_MOBILE_DIALOG_DEFAULT_OPTIONS,\n );\n}\n","import {inject, Injectable} from '@angular/core';\nimport {type TuiPopoverContext, TuiPopoverService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nimport {TuiMobileDialog} from './mobile-dialog.component';\nimport {\n TUI_MOBILE_DIALOG_OPTIONS,\n type TuiMobileDialogOptions,\n} from './mobile-dialog.options';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiMobileDialogService(\n TUI_DIALOGS,\n TuiMobileDialog,\n inject(TUI_MOBILE_DIALOG_OPTIONS),\n ),\n})\nexport class TuiMobileDialogService extends TuiPopoverService<\n TuiMobileDialogOptions<any>,\n number\n> {\n public override open(\n content: PolymorpheusContent<\n TuiMobileDialogOptions<any> & TuiPopoverContext<number>\n >,\n options: Partial<TuiMobileDialogOptions<any>> = {},\n ): Observable<number> {\n return super.open(content, options);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAmBa,eAAe,CAAA;AAV5B,IAAA,WAAA,GAAA;AAWuB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;QAC1B,IAAO,CAAA,OAAA,GACtB,aAAa,EAAiD;AAKrE;AAHa,IAAA,QAAQ,CAAC,KAAa,EAAA;AAC5B,QAAA,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC;;+GAN3B,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,8HCnB5B,srBA4BA,EAAA,MAAA,EAAA,CAAA,2gCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDjBc,kBAAkB,EAAE,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,SAAS,oIAAE,SAAS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