@taiga-ui/addon-mobile 5.2.0 → 5.3.0-canary.0bfb447

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.
@@ -53,11 +53,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
53
53
 
54
54
  class Styles {
55
55
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
56
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-swipe-actions-5.2.0"], ngImport: i0, template: '', isInline: true, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.2.0\"]){scroll-snap-type:none}tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.2.0\"])>*{animation:tuiOnboardingEnter var(--tui-duration-slow) var(--tui-curve-expressive-entrance),tuiOnboardingShow var(--tui-duration-moderate) linear var(--tui-duration-slow),tuiOnboardingExit var(--tui-duration-slow) var(--tui-curve-expressive-entrance) calc(var(--tui-duration-slow) + var(--tui-duration-moderate))}@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 }); }
56
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-swipe-actions-5.3.0-canary.0bfb447"], ngImport: i0, template: '', isInline: true, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]){scroll-snap-type:none}tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])>*{animation:tuiOnboardingEnter var(--tui-duration-slow) var(--tui-curve-expressive-entrance),tuiOnboardingShow var(--tui-duration-moderate) linear var(--tui-duration-slow),tuiOnboardingExit var(--tui-duration-slow) var(--tui-curve-expressive-entrance) calc(var(--tui-duration-slow) + var(--tui-duration-moderate))}@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 }); }
57
57
  }
58
58
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: Styles, decorators: [{
59
59
  type: Component,
60
- args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-swipe-actions-${TUI_VERSION}`, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.2.0\"]){scroll-snap-type:none}tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.2.0\"])>*{animation:tuiOnboardingEnter var(--tui-duration-slow) var(--tui-curve-expressive-entrance),tuiOnboardingShow var(--tui-duration-moderate) linear var(--tui-duration-slow),tuiOnboardingExit var(--tui-duration-slow) var(--tui-curve-expressive-entrance) calc(var(--tui-duration-slow) + var(--tui-duration-moderate))}@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"] }]
60
+ args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-swipe-actions-${TUI_VERSION}`, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]){scroll-snap-type:none}tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])>*{animation:tuiOnboardingEnter var(--tui-duration-slow) var(--tui-curve-expressive-entrance),tuiOnboardingShow var(--tui-duration-moderate) linear var(--tui-duration-slow),tuiOnboardingExit var(--tui-duration-slow) var(--tui-curve-expressive-entrance) calc(var(--tui-duration-slow) + var(--tui-duration-moderate))}@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"] }]
61
61
  }] });
62
62
  class TuiSwipeActionsOnboarding {
63
63
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-swipe-actions.mjs","sources":["../../../projects/addon-mobile/components/swipe-actions/swipe-actions.component.ts","../../../projects/addon-mobile/components/swipe-actions/swipe-actions.template.html","../../../projects/addon-mobile/components/swipe-actions/swipe-actions-auto-close.directive.ts","../../../projects/addon-mobile/components/swipe-actions/swipe-actions-onboarding.directive.ts","../../../projects/addon-mobile/components/swipe-actions/taiga-ui-addon-mobile-components-swipe-actions.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n inject,\n signal,\n} from '@angular/core';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\n\n@Component({\n selector: 'tui-swipe-actions',\n imports: [WaResizeObserver],\n templateUrl: './swipe-actions.template.html',\n styleUrl: './swipe-actions.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--t-actions-width]': 'actionsWidth',\n '[style.overscroll-behavior-x]': 'scrolled() ? \"contain\" : \"none\"',\n '(scroll.zoneless)': 'scrolled.set($event.target.scrollLeft > 0)',\n },\n})\nexport class TuiSwipeActions {\n protected actionsWidth = 0;\n protected readonly cdr = inject(ChangeDetectorRef);\n protected readonly scrolled = signal(false);\n\n protected onResize({target}: ResizeObserverEntry): void {\n this.actionsWidth = target.clientWidth;\n this.cdr.detectChanges();\n }\n}\n","<div class=\"t-content\">\n <ng-content />\n</div>\n\n<div\n class=\"t-actions\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\n>\n <ng-content select=\"[tuiSwipeAction]\" />\n</div>\n","import {Directive, input} from '@angular/core';\nimport {tuiGetActualTarget, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\n@Directive({\n selector: 'tui-swipe-actions[autoClose]',\n host: {\n '(document:pointerdown.zoneless)': 'handleEvent($event)',\n '(document:focusin.zoneless)': 'handleEvent($event)',\n },\n})\nexport class TuiSwipeActionsAutoClose {\n private readonly el = tuiInjectElement();\n\n public readonly autoClose = input<boolean | string>(true);\n\n protected handleEvent(event: Event): void {\n if (this.autoClose() !== false && !this.el.contains(tuiGetActualTarget(event))) {\n this.el.scrollTo({left: 0, behavior: 'smooth'});\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n model,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './swipe-actions-onboarding.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: `tui-swipe-actions-${TUI_VERSION}`,\n})\nclass Styles {}\n\n@Directive({\n selector: 'tui-swipe-actions[onboarding]',\n host: {\n '[class._onboarding]': 'onboarding()',\n '(animationend)': 'onboarding.set($event.animationName !== \"tuiOnboardingExit\")',\n },\n})\nexport class TuiSwipeActionsOnboarding {\n public readonly onboarding = model(true);\n\n protected readonly nothing = tuiWithStyles(Styles);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAqBa,eAAe,CAAA;AAZ5B,IAAA,WAAA,GAAA;QAac,IAAA,CAAA,YAAY,GAAG,CAAC;AACP,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;AAM9C,IAAA;IAJa,QAAQ,CAAC,EAAC,MAAM,EAAsB,EAAA;AAC5C,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW;AACtC,QAAA,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE;IAC5B;+GARS,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,4CAAA,EAAA,EAAA,UAAA,EAAA,EAAA,yBAAA,EAAA,cAAA,EAAA,6BAAA,EAAA,sCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrB5B,kNAUA,EAAA,MAAA,EAAA,CAAA,2uGAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDCc,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,aAAA,CAAA,EAAA,OAAA,EAAA,CAAA,kBAAA,CAAA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,aAAa,CAAC,MAAM,CAAC;AACrD,IAAA;+GAJY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,+BAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,cAAA,EAAA,gEAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAPrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,+BAA+B;AACzC,oBAAA,IAAI,EAAE;AACF,wBAAA,qBAAqB,EAAE,cAAc;AACrC,wBAAA,gBAAgB,EAAE,8DAA8D;AACnF,qBAAA;AACJ,iBAAA;;;AC7BD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-swipe-actions.mjs","sources":["../../../projects/addon-mobile/components/swipe-actions/swipe-actions.component.ts","../../../projects/addon-mobile/components/swipe-actions/swipe-actions.template.html","../../../projects/addon-mobile/components/swipe-actions/swipe-actions-auto-close.directive.ts","../../../projects/addon-mobile/components/swipe-actions/swipe-actions-onboarding.directive.ts","../../../projects/addon-mobile/components/swipe-actions/taiga-ui-addon-mobile-components-swipe-actions.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n inject,\n signal,\n} from '@angular/core';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\n\n@Component({\n selector: 'tui-swipe-actions',\n imports: [WaResizeObserver],\n templateUrl: './swipe-actions.template.html',\n styleUrl: './swipe-actions.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--t-actions-width]': 'actionsWidth',\n '[style.overscroll-behavior-x]': 'scrolled() ? \"contain\" : \"none\"',\n '(scroll.zoneless)': 'scrolled.set($event.target.scrollLeft > 0)',\n },\n})\nexport class TuiSwipeActions {\n protected actionsWidth = 0;\n protected readonly cdr = inject(ChangeDetectorRef);\n protected readonly scrolled = signal(false);\n\n protected onResize({target}: ResizeObserverEntry): void {\n this.actionsWidth = target.clientWidth;\n this.cdr.detectChanges();\n }\n}\n","<div class=\"t-content\">\n <ng-content />\n</div>\n\n<div\n class=\"t-actions\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\n>\n <ng-content select=\"[tuiSwipeAction]\" />\n</div>\n","import {Directive, input} from '@angular/core';\nimport {tuiGetActualTarget, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\n@Directive({\n selector: 'tui-swipe-actions[autoClose]',\n host: {\n '(document:pointerdown.zoneless)': 'handleEvent($event)',\n '(document:focusin.zoneless)': 'handleEvent($event)',\n },\n})\nexport class TuiSwipeActionsAutoClose {\n private readonly el = tuiInjectElement();\n\n public readonly autoClose = input<boolean | string>(true);\n\n protected handleEvent(event: Event): void {\n if (this.autoClose() !== false && !this.el.contains(tuiGetActualTarget(event))) {\n this.el.scrollTo({left: 0, behavior: 'smooth'});\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n model,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './swipe-actions-onboarding.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: `tui-swipe-actions-${TUI_VERSION}`,\n})\nclass Styles {}\n\n@Directive({\n selector: 'tui-swipe-actions[onboarding]',\n host: {\n '[class._onboarding]': 'onboarding()',\n '(animationend)': 'onboarding.set($event.animationName !== \"tuiOnboardingExit\")',\n },\n})\nexport class TuiSwipeActionsOnboarding {\n public readonly onboarding = model(true);\n\n protected readonly nothing = tuiWithStyles(Styles);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAqBa,eAAe,CAAA;AAZ5B,IAAA,WAAA,GAAA;QAac,IAAA,CAAA,YAAY,GAAG,CAAC;AACP,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;AAM9C,IAAA;IAJa,QAAQ,CAAC,EAAC,MAAM,EAAsB,EAAA;AAC5C,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW;AACtC,QAAA,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE;IAC5B;+GARS,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,4CAAA,EAAA,EAAA,UAAA,EAAA,EAAA,yBAAA,EAAA,cAAA,EAAA,6BAAA,EAAA,sCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrB5B,kNAUA,EAAA,MAAA,EAAA,CAAA,2uGAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDCc,gBAAgB,EAAA,QAAA,EAAA,oBAA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AA,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC;AAErB,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;AACrD,IAAA;+GAJY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,+BAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,cAAA,EAAA,gEAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAPrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,+BAA+B;AACzC,oBAAA,IAAI,EAAE;AACF,wBAAA,qBAAqB,EAAE,cAAc;AACrC,wBAAA,gBAAgB,EAAE,8DAA8D;AACnF,qBAAA;AACJ,iBAAA;;;AC7BD;;AAEG;;;;"}
@@ -68,13 +68,13 @@ class TuiDropdownMobileComponent {
68
68
  return this.dropdown.el.contains(tuiGetFocused(this.doc));
69
69
  }
70
70
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TuiDropdownMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
71
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { attributes: { "data-tui-version": "5.2.0" }, listeners: { "pointerdown.prevent": "0", "document:click.zoneless.capture": "onClick($event)", "window>scroll.zoneless.capture": "refresh()", "visualViewport>resize.zoneless": "refresh()", "visualViewport>scroll.zoneless": "refresh()" } }, hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiActiveZone }], ngImport: i0, template: `
71
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { attributes: { "data-tui-version": "5.3.0-canary.0bfb447" }, listeners: { "pointerdown.prevent": "0", "document:click.zoneless.capture": "onClick($event)", "window>scroll.zoneless.capture": "refresh()", "visualViewport>resize.zoneless": "refresh()", "visualViewport>scroll.zoneless": "refresh()" } }, hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiActiveZone }], ngImport: i0, template: `
72
72
  <div class="t-container">
73
73
  <ng-container *polymorpheusOutlet="dropdown.content() as text; context: ctx">
74
74
  {{ text }}
75
75
  </ng-container>
76
76
  </div>
77
- `, isInline: true, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]){scrollbar-width:none;-ms-overflow-style: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.2.0\"])::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"])::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]).tui-enter,tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"])>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;inset-block-start:0;block-size:100%;overflow:auto;padding:0 1rem;touch-action:pan-y!important}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"])>.t-container::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"])>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"])>.t-container tui-data-list{padding:0;margin:0 -.5rem}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.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.2.0\"]){touch-action:none;visibility:hidden}.t-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]) *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]) tui-root{visibility:visible}.t-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]) tui-root .t-root-content,.t-dropdown-mobile:where(*[data-tui-version=\"5.2.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 }); }
77
+ `, isInline: true, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]){scrollbar-width:none;-ms-overflow-style: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.3.0-canary.0bfb447\"])::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]).tui-enter,tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;inset-block-start:0;block-size:100%;overflow:auto;padding:0 1rem;touch-action:pan-y!important}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])>.t-container::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])>.t-container tui-data-list{padding:0;margin:0 -.5rem}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]) [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.3.0-canary.0bfb447\"]){touch-action:none;visibility:hidden}.t-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]) *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]) tui-root{visibility:visible}.t-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]) tui-root .t-root-content,.t-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]) 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 }); }
78
78
  }
79
79
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TuiDropdownMobileComponent, decorators: [{
80
80
  type: Component,
@@ -91,7 +91,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
91
91
  '(window>scroll.zoneless.capture)': 'refresh()',
92
92
  '(visualViewport>resize.zoneless)': 'refresh()',
93
93
  '(visualViewport>scroll.zoneless)': 'refresh()',
94
- }, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]){scrollbar-width:none;-ms-overflow-style: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.2.0\"])::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"])::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]).tui-enter,tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"])>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;inset-block-start:0;block-size:100%;overflow:auto;padding:0 1rem;touch-action:pan-y!important}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"])>.t-container::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"])>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"])>.t-container tui-data-list{padding:0;margin:0 -.5rem}tui-dropdown-mobile:where(*[data-tui-version=\"5.2.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.2.0\"]){touch-action:none;visibility:hidden}.t-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]) *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]) tui-root{visibility:visible}.t-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]) tui-root .t-root-content,.t-dropdown-mobile:where(*[data-tui-version=\"5.2.0\"]) tui-root tui-dialogs{visibility:hidden}\n"] }]
94
+ }, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]){scrollbar-width:none;-ms-overflow-style: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.3.0-canary.0bfb447\"])::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]).tui-enter,tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;inset-block-start:0;block-size:100%;overflow:auto;padding:0 1rem;touch-action:pan-y!important}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])>.t-container::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"])>.t-container tui-data-list{padding:0;margin:0 -.5rem}tui-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]) [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.3.0-canary.0bfb447\"]){touch-action:none;visibility:hidden}.t-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]) *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]) tui-root{visibility:visible}.t-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]) tui-root .t-root-content,.t-dropdown-mobile:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]) tui-root tui-dialogs{visibility:hidden}\n"] }]
95
95
  }], ctorParameters: () => [] });
96
96
 
97
97
  class TuiDropdownMobile {
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-dropdown-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/portals/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nconst GAP = 16;\n\n@Component({\n selector: 'tui-dropdown-mobile',\n imports: [PolymorpheusOutlet],\n template: `\n <div class=\"t-container\">\n <ng-container *polymorpheusOutlet=\"dropdown.content() as text; context: ctx\">\n {{ text }}\n </ng-container>\n </div>\n `,\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './dropdown-mobile.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated, TuiActiveZone],\n host: {\n 'data-tui-version': TUI_VERSION,\n '(pointerdown.prevent)': '0',\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(window>scroll.zoneless.capture)': 'refresh()',\n '(visualViewport>resize.zoneless)': 'refresh()',\n '(visualViewport>scroll.zoneless)': 'refresh()',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy {\n private readonly el = tuiInjectElement();\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly doc = inject(DOCUMENT);\n private readonly scrollTop = this.doc.documentElement.scrollTop;\n private readonly observer = new ResizeObserver(() => this.refresh());\n\n protected readonly dropdown = inject(TuiDropdownDirective);\n protected readonly ctx = {$implicit: (): void => this.dropdown.toggle(false)};\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.removeAttribute('data-tui-version');\n this.doc.body.style.removeProperty('--t-root-top');\n this.doc.documentElement.scrollTop = this.scrollTop;\n this.doc.documentElement.style.removeProperty('scroll-behavior');\n\n if (this.focused) {\n this.keyboard.hide();\n }\n }\n\n protected onClick(event: MouseEvent): void {\n if (\n tuiIsElement(event.target) &&\n !this.el.contains(event.target) &&\n (!this.dropdown.el.contains(event.target) ||\n event.target.matches('input,textarea'))\n ) {\n event.stopPropagation();\n }\n }\n\n protected refresh(): void {\n const {offsetTop = 0, height = 0} = this.doc.defaultView?.visualViewport || {};\n\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\n !this.doc.documentElement.style.getPropertyValue('scroll-behavior')\n ) {\n return;\n }\n\n this.doc.documentElement.scrollTop = 0;\n\n const rect = this.dropdown.el.getBoundingClientRect();\n const topMargin = `max(var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)}), env(safe-area-inset-top))`;\n const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;\n const top = `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.setAttribute('data-tui-version', TUI_VERSION);\n this.doc.body.style.setProperty('--t-root-top', top);\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetFocused(this.doc));\n }\n}\n","import {Directive, inject} from '@angular/core';\nimport {WA_IS_MOBILE} from '@ng-web-apis/platform';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n TUI_DROPDOWN_COMPONENT,\n TuiDropdownDirective,\n} from '@taiga-ui/core/portals/dropdown';\n\nimport {TuiDropdownMobileComponent} from './dropdown-mobile.component';\n\n@Directive({\n selector: '[tuiDropdownMobile]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(WA_IS_MOBILE)\n ? TuiDropdownMobileComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n ],\n host: {\n '[style.visibility]': 'dropdown.ref() ? \"visible\" : \"\"',\n '(mousedown)': 'onMouseDown($event)',\n },\n})\nexport class TuiDropdownMobile {\n private readonly isMobile = inject(WA_IS_MOBILE);\n protected readonly dropdown = inject(TuiDropdownDirective);\n\n protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea')\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA,MAAM,GAAG,GAAG,EAAE;MA6BD,0BAA0B,CAAA;AAUnC,IAAA,WAAA,GAAA;QATiB,IAAA,CAAA,EAAE,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACrC,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAA,CAAA,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS;AAC9C,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;AAEjD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACvC,Q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down-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/portals/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nconst GAP = 16;\n\n@Component({\n selector: 'tui-dropdown-mobile',\n imports: [PolymorpheusOutlet],\n template: `\n <div class=\"t-container\">\n <ng-container *polymorpheusOutlet=\"dropdown.content() as text; context: ctx\">\n {{ text }}\n </ng-container>\n </div>\n `,\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './dropdown-mobile.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated, TuiActiveZone],\n host: {\n 'data-tui-version': TUI_VERSION,\n '(pointerdown.prevent)': '0',\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(window>scroll.zoneless.capture)': 'refresh()',\n '(visualViewport>resize.zoneless)': 'refresh()',\n '(visualViewport>scroll.zoneless)': 'refresh()',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy {\n private readonly el = tuiInjectElement();\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly doc = inject(DOCUMENT);\n private readonly scrollTop = this.doc.documentElement.scrollTop;\n private readonly observer = new ResizeObserver(() => this.refresh());\n\n protected readonly dropdown = inject(TuiDropdownDirective);\n protected readonly ctx = {$implicit: (): void => this.dropdown.toggle(false)};\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.removeAttribute('data-tui-version');\n this.doc.body.style.removeProperty('--t-root-top');\n this.doc.documentElement.scrollTop = this.scrollTop;\n this.doc.documentElement.style.removeProperty('scroll-behavior');\n\n if (this.focused) {\n this.keyboard.hide();\n }\n }\n\n protected onClick(event: MouseEvent): void {\n if (\n tuiIsElement(event.target) &&\n !this.el.contains(event.target) &&\n (!this.dropdown.el.contains(event.target) ||\n event.target.matches('input,textarea'))\n ) {\n event.stopPropagation();\n }\n }\n\n protected refresh(): void {\n const {offsetTop = 0, height = 0} = this.doc.defaultView?.visualViewport || {};\n\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\n !this.doc.documentElement.style.getPropertyValue('scroll-behavior')\n ) {\n return;\n }\n\n this.doc.documentElement.scrollTop = 0;\n\n const rect = this.dropdown.el.getBoundingClientRect();\n const topMargin = `max(var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)}), env(safe-area-inset-top))`;\n const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;\n const top = `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.setAttribute('data-tui-version', TUI_VERSION);\n this.doc.body.style.setProperty('--t-root-top', top);\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetFocused(this.doc));\n }\n}\n","import {Directive, inject} from '@angular/core';\nimport {WA_IS_MOBILE} from '@ng-web-apis/platform';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n TUI_DROPDOWN_COMPONENT,\n TuiDropdownDirective,\n} from '@taiga-ui/core/portals/dropdown';\n\nimport {TuiDropdownMobileComponent} from './dropdown-mobile.component';\n\n@Directive({\n selector: '[tuiDropdownMobile]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(WA_IS_MOBILE)\n ? TuiDropdownMobileComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n ],\n host: {\n '[style.visibility]': 'dropdown.ref() ? \"visible\" : \"\"',\n '(mousedown)': 'onMouseDown($event)',\n },\n})\nexport class TuiDropdownMobile {\n private readonly isMobile = inject(WA_IS_MOBILE);\n protected readonly dropdown = inject(TuiDropdownDirective);\n\n protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea')\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA,MAAM,GAAG,GAAG,EAAE;MA6BD,0BAA0B,CAAA;AAUnC,IAAA,WAAA,GAAA;QATiB,IAAA,CAAA,EAAE,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACrC,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAA,CAAA,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS;AAC9C,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;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ACJ,iBAAA;;;ACzBD;;AAEG;;;;"}
@@ -13,11 +13,11 @@ const TO = [{ transform: '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.20", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-ripple-5.2.0"], ngImport: i0, template: '', isInline: true, styles: [".tui-ripple:where(*[data-tui-version=\"5.2.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 }); }
16
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-ripple-5.3.0-canary.0bfb447"], ngImport: i0, template: '', isInline: true, styles: [".tui-ripple:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]){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.20", 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.2.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"] }]
20
+ args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-ripple-${TUI_VERSION}`, styles: [".tui-ripple:where(*[data-tui-version=\"5.3.0-canary.0bfb447\"]){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() {
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.mjs","sources":["../../../projects/addon-mobile/directives/ripple/ripple.directive.ts","../../../projects/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {first, fromEvent, merge, race, switchMap, tap} from 'rxjs';\n\nconst TO = [{transform: 'scale(0)', opacity: '0.12'}, {opacity: '0.12'}];\nconst FROM = [{opacity: '0.12'}, {opacity: '0'}];\n\n@Component({\n template: '',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './ripple.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: `tui-ripple-${TUI_VERSION}`,\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiRipple]',\n host: {\n '(pointerdown.zoneless)':\n 'start($event.clientX, $event.clientY, $event.target, $event.currentTarget)',\n },\n})\nexport class TuiRipple {\n private readonly doc = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));\n\n protected readonly nothing = tuiWithStyles(Styles);\n\n public readonly tuiRipple = input('');\n\n protected start(x: number, y: number, target: HTMLElement, el: HTMLElement): void {\n const element = this.tuiRipple() ? target.closest(this.tuiRipple()) : el;\n\n if (!tuiIsHTMLElement(element)) {\n return;\n }\n\n const ripple = this.createRipple(x, y, element.getBoundingClientRect());\n const touchEnd$ = merge(\n fromEvent(element, 'pointerup'),\n fromEvent(element, 'pointercancel'),\n fromEvent(element, 'pointermove'),\n );\n\n element.appendChild(ripple);\n\n const animationEnd$ = fromEvent(ripple.animate(TO, this.duration), 'finish');\n\n race(\n touchEnd$.pipe(switchMap(() => animationEnd$)),\n animationEnd$.pipe(switchMap(() => touchEnd$)),\n )\n .pipe(\n first(),\n switchMap(() => fromEvent(ripple.animate(FROM, this.duration), 'finish')),\n first(),\n tap(() => element.removeChild(ripple)),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n private createRipple(\n clientX: number,\n clientY: number,\n {width, height, top, left}: DOMRect,\n ): HTMLElement {\n const ripple: HTMLElement = this.doc.createElement('div');\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n\n Object.assign(ripple.style, {\n position: 'absolute',\n top: tuiPx(y),\n left: tuiPx(x),\n width: tuiPx(dimension),\n height: tuiPx(dimension),\n zIndex: 100,\n opacity: 0.12,\n borderRadius: '100%',\n background: 'var(--tui-ripple-background, currentColor)',\n animationFillMode: 'forwards',\n pointerEvents: 'none',\n });\n\n return ripple;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAkBA,MAAM,EAAE,GAAG,CAAC,EAAC,S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KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,sBAAA,EAAA,4EAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,IAAI,EAAE;AACF,wBAAA,wBAAwB,EACpB,4EAA4E;AACnF,qBAAA;AACJ,iBAAA;;;ACxCD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.mjs","sources":["../../../projects/addon-mobile/directives/ripple/ripple.directive.ts","../../../projects/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {first, fromEvent, merge, race, switchMap, tap} from 'rxjs';\n\nconst TO = [{transform: 'scale(0)', opacity: '0.12'}, {opacity: '0.12'}];\nconst FROM = [{opacity: '0.12'}, {opacity: '0'}];\n\n@Component({\n template: '',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './ripple.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: `tui-ripple-${TUI_VERSION}`,\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiRipple]',\n host: {\n '(pointerdown.zoneless)':\n 'start($event.clientX, $event.clientY, $event.target, $event.currentTarget)',\n },\n})\nexport class TuiRipple {\n private readonly doc = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));\n\n protected readonly nothing = tuiWithStyles(Styles);\n\n public readonly tuiRipple = input('');\n\n protected start(x: number, y: number, target: HTMLElement, el: HTMLElement): void {\n const element = this.tuiRipple() ? target.closest(this.tuiRipple()) : el;\n\n if (!tuiIsHTMLElement(element)) {\n return;\n }\n\n const ripple = this.createRipple(x, y, element.getBoundingClientRect());\n const touchEnd$ = merge(\n fromEvent(element, 'pointerup'),\n fromEvent(element, 'pointercancel'),\n fromEvent(element, 'pointermove'),\n );\n\n element.appendChild(ripple);\n\n const animationEnd$ = fromEvent(ripple.animate(TO, this.duration), 'finish');\n\n race(\n touchEnd$.pipe(switchMap(() => animationEnd$)),\n animationEnd$.pipe(switchMap(() => touchEnd$)),\n )\n .pipe(\n first(),\n switchMap(() => fromEvent(ripple.animate(FROM, this.duration), 'finish')),\n first(),\n tap(() => element.removeChild(ripple)),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n private createRipple(\n clientX: number,\n clientY: number,\n {width, height, top, left}: DOMRect,\n ): HTMLElement {\n const ripple: HTMLElement = this.doc.createElement('div');\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n\n Object.assign(ripple.style, {\n position: 'absolute',\n top: tuiPx(y),\n left: tuiPx(x),\n width: tuiPx(dimension),\n height: tuiPx(dimension),\n zIndex: 100,\n opacity: 0.12,\n borderRadius: '100%',\n background: 'var(--tui-ripple-background, currentColor)',\n animationFillMode: 'forwards',\n pointerEvents: 'none',\n });\n\n return ripple;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;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A,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,sBAAA,EAAA,4EAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,IAAI,EAAE;AACF,wBAAA,wBAAwB,EACpB,4EAA4E;AACnF,qBAAA;AACJ,iBAAA;;;ACxCD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/addon-mobile",
3
- "version": "5.2.0",
3
+ "version": "5.3.0-canary.0bfb447",
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",
@@ -36,14 +36,42 @@
36
36
  "types": "./index.d.ts",
37
37
  "default": "./fesm2022/taiga-ui-addon-mobile.mjs"
38
38
  },
39
- "./components": {
40
- "types": "./components/index.d.ts",
41
- "default": "./fesm2022/taiga-ui-addon-mobile-components.mjs"
39
+ "./directives": {
40
+ "types": "./directives/index.d.ts",
41
+ "default": "./fesm2022/taiga-ui-addon-mobile-directives.mjs"
42
42
  },
43
43
  "./services": {
44
44
  "types": "./services/index.d.ts",
45
45
  "default": "./fesm2022/taiga-ui-addon-mobile-services.mjs"
46
46
  },
47
+ "./components": {
48
+ "types": "./components/index.d.ts",
49
+ "default": "./fesm2022/taiga-ui-addon-mobile-components.mjs"
50
+ },
51
+ "./directives/dropdown-mobile": {
52
+ "types": "./directives/dropdown-mobile/index.d.ts",
53
+ "default": "./fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs"
54
+ },
55
+ "./directives/dropdown-sheet": {
56
+ "types": "./directives/dropdown-sheet/index.d.ts",
57
+ "default": "./fesm2022/taiga-ui-addon-mobile-directives-dropdown-sheet.mjs"
58
+ },
59
+ "./directives/elastic-sticky": {
60
+ "types": "./directives/elastic-sticky/index.d.ts",
61
+ "default": "./fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs"
62
+ },
63
+ "./directives/responsive-dialog": {
64
+ "types": "./directives/responsive-dialog/index.d.ts",
65
+ "default": "./fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs"
66
+ },
67
+ "./directives/ripple": {
68
+ "types": "./directives/ripple/index.d.ts",
69
+ "default": "./fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs"
70
+ },
71
+ "./directives/touchable": {
72
+ "types": "./directives/touchable/index.d.ts",
73
+ "default": "./fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs"
74
+ },
47
75
  "./components/bottom-sheet": {
48
76
  "types": "./components/bottom-sheet/index.d.ts",
49
77
  "default": "./fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs"
@@ -75,34 +103,6 @@
75
103
  "./components/tab-bar": {
76
104
  "types": "./components/tab-bar/index.d.ts",
77
105
  "default": "./fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs"
78
- },
79
- "./directives": {
80
- "types": "./directives/index.d.ts",
81
- "default": "./fesm2022/taiga-ui-addon-mobile-directives.mjs"
82
- },
83
- "./directives/dropdown-mobile": {
84
- "types": "./directives/dropdown-mobile/index.d.ts",
85
- "default": "./fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs"
86
- },
87
- "./directives/dropdown-sheet": {
88
- "types": "./directives/dropdown-sheet/index.d.ts",
89
- "default": "./fesm2022/taiga-ui-addon-mobile-directives-dropdown-sheet.mjs"
90
- },
91
- "./directives/elastic-sticky": {
92
- "types": "./directives/elastic-sticky/index.d.ts",
93
- "default": "./fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs"
94
- },
95
- "./directives/responsive-dialog": {
96
- "types": "./directives/responsive-dialog/index.d.ts",
97
- "default": "./fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs"
98
- },
99
- "./directives/ripple": {
100
- "types": "./directives/ripple/index.d.ts",
101
- "default": "./fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs"
102
- },
103
- "./directives/touchable": {
104
- "types": "./directives/touchable/index.d.ts",
105
- "default": "./fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs"
106
106
  }
107
107
  },
108
108
  "peerDependencies": {
@@ -111,10 +111,10 @@
111
111
  "@angular/core": ">=19.0.0",
112
112
  "@ng-web-apis/common": "^5.2.0",
113
113
  "@ng-web-apis/platform": "^5.2.0",
114
- "@taiga-ui/cdk": "5.2.0",
115
- "@taiga-ui/core": "5.2.0",
116
- "@taiga-ui/kit": "5.2.0",
117
- "@taiga-ui/layout": "5.2.0",
114
+ "@taiga-ui/cdk": "5.3.0",
115
+ "@taiga-ui/core": "5.3.0",
116
+ "@taiga-ui/kit": "5.3.0",
117
+ "@taiga-ui/layout": "5.3.0",
118
118
  "@taiga-ui/polymorpheus": "^5.0.0",
119
119
  "rxjs": ">=7.0.0"
120
120
  },