@taiga-ui/addon-mobile 3.104.0 → 3.105.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/bundles/taiga-ui-addon-mobile-components-bottom-sheet.umd.js +109 -0
- package/bundles/taiga-ui-addon-mobile-components-bottom-sheet.umd.js.map +1 -0
- package/bundles/taiga-ui-addon-mobile-components.umd.js +10 -4
- package/bundles/taiga-ui-addon-mobile-components.umd.js.map +1 -1
- package/components/bottom-sheet/bottom-sheet.component.d.ts +12 -0
- package/components/bottom-sheet/bottom-sheet.module.d.ts +8 -0
- package/components/bottom-sheet/index.d.ts +2 -0
- package/components/bottom-sheet/package.json +10 -0
- package/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.d.ts +5 -0
- package/components/index.d.ts +1 -0
- package/esm2015/components/bottom-sheet/bottom-sheet.component.js +55 -0
- package/esm2015/components/bottom-sheet/bottom-sheet.module.js +18 -0
- package/esm2015/components/bottom-sheet/index.js +3 -0
- package/esm2015/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.js +5 -0
- package/esm2015/components/index.js +2 -1
- package/fesm2015/taiga-ui-addon-mobile-components-bottom-sheet.js +77 -0
- package/fesm2015/taiga-ui-addon-mobile-components-bottom-sheet.js.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components.js +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@angular/common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/addon-mobile/components/bottom-sheet', ['exports', '@angular/core', '@taiga-ui/cdk', '@angular/common'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"]["addon-mobile"] = global["taiga-ui"]["addon-mobile"] || {}, global["taiga-ui"]["addon-mobile"].components = global["taiga-ui"]["addon-mobile"].components || {}, global["taiga-ui"]["addon-mobile"].components["bottom-sheet"] = {}), global.ng.core, global.cdk, global.ng.common));
|
|
5
|
+
})(this, (function (exports, i0, cdk, i1) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
+
|
|
28
|
+
var OPTIONS = {
|
|
29
|
+
duration: 20,
|
|
30
|
+
easing: 'ease-in',
|
|
31
|
+
fill: 'forwards',
|
|
32
|
+
};
|
|
33
|
+
var TuiBottomSheetComponent = /** @class */ (function () {
|
|
34
|
+
function TuiBottomSheetComponent(el) {
|
|
35
|
+
this.el = el;
|
|
36
|
+
this.elements = cdk.EMPTY_QUERY;
|
|
37
|
+
this.stops = ['1.5rem'];
|
|
38
|
+
}
|
|
39
|
+
TuiBottomSheetComponent.prototype.onScroll = function () {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
var _c = this.el.nativeElement, clientHeight = _c.clientHeight, scrollTop = _c.scrollTop, scrollHeight = _c.scrollHeight;
|
|
42
|
+
var top = ((_a = this.elements.get(0)) === null || _a === void 0 ? void 0 : _a.nativeElement.clientHeight) || 0;
|
|
43
|
+
var max = ((_b = this.content) === null || _b === void 0 ? void 0 : _b.nativeElement.clientHeight) || Infinity;
|
|
44
|
+
var height = Math.min(clientHeight, max);
|
|
45
|
+
var scrolled = Math.min(scrollTop, height - top);
|
|
46
|
+
var transform = "translate3d(0, " + -1 * scrolled + "px, 0)";
|
|
47
|
+
this.el.nativeElement.style.setProperty('--t-height', scrollHeight + "px");
|
|
48
|
+
this.el.nativeElement.animate([{ transform: transform }], OPTIONS);
|
|
49
|
+
};
|
|
50
|
+
return TuiBottomSheetComponent;
|
|
51
|
+
}());
|
|
52
|
+
TuiBottomSheetComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBottomSheetComponent, deps: [{ token: i0.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
53
|
+
TuiBottomSheetComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiBottomSheetComponent, selector: "tui-bottom-sheet", inputs: { stops: "stops" }, host: { listeners: { "scroll.silent": "onScroll()" }, properties: { "style.--t-start": "stops[0]", "style.scroll-snap-type": "stops.length > 1 ? \"y mandatory\" : null" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }, { propertyName: "elements", predicate: ["stops"], descendants: true }], ngImport: i0__namespace, template: "<div\n *ngFor=\"let stop of stops\"\n #stops\n class=\"t-stop\"\n [style.top]=\"stop\"\n></div>\n<div\n #content\n class=\"t-content\"\n>\n <ng-content></ng-content>\n</div>\n<div class=\"t-bottom\"></div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:100%;left:0;right:0;display:block;block-size:calc(100% - 1rem);max-inline-size:40rem;margin:calc(-1 * var(--t-start)) auto 0;background:var(--tui-elevation-01);border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:auto;box-shadow:0 1rem var(--tui-elevation-01),var(--tui-shadow)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:before{content:\"\";position:-webkit-sticky;position:sticky;top:.625rem;left:50%;z-index:1;display:block;inline-size:2rem;block-size:.25rem;-webkit-margin-after:-.25rem;margin-block-end:-.25rem;transform:translate(-50%);background:var(--tui-elevation-01);box-shadow:0 0 0 20rem var(--tui-elevation-01),inset 0 0 0 1rem var(--tui-base-03);border-radius:1rem;-webkit-clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem));clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem))}:host:after{content:\"\";position:absolute;top:calc(100% - var(--t-start));inline-size:1rem;block-size:calc(var(--t-height) - 100% + var(--t-start));scroll-snap-align:start;scroll-snap-stop:always}.t-content{position:-webkit-sticky;position:sticky;top:0;padding:2.25rem 1rem 1.5rem}.t-bottom{block-size:calc(100% - var(--t-start))}.t-stop{position:absolute;block-size:var(--t-start);inline-size:1rem;pointer-events:none;transform:translateY(-100%);scroll-snap-align:start;scroll-snap-stop:always}.t-stop:last-child{scroll-snap-align:none}\n"], directives: [{ type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
54
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBottomSheetComponent, decorators: [{
|
|
55
|
+
type: i0.Component,
|
|
56
|
+
args: [{
|
|
57
|
+
selector: 'tui-bottom-sheet',
|
|
58
|
+
templateUrl: './bottom-sheet.template.html',
|
|
59
|
+
styleUrls: ['./bottom-sheet.style.less'],
|
|
60
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
61
|
+
host: {
|
|
62
|
+
'[style.--t-start]': 'stops[0]',
|
|
63
|
+
'[style.scroll-snap-type]': 'stops.length > 1 ? "y mandatory" : null',
|
|
64
|
+
'(scroll.silent)': 'onScroll()',
|
|
65
|
+
},
|
|
66
|
+
}]
|
|
67
|
+
}], ctorParameters: function () {
|
|
68
|
+
return [{ type: i0__namespace.ElementRef, decorators: [{
|
|
69
|
+
type: i0.Inject,
|
|
70
|
+
args: [i0.ElementRef]
|
|
71
|
+
}] }];
|
|
72
|
+
}, propDecorators: { elements: [{
|
|
73
|
+
type: i0.ViewChildren,
|
|
74
|
+
args: ['stops']
|
|
75
|
+
}], content: [{
|
|
76
|
+
type: i0.ViewChild,
|
|
77
|
+
args: ['content']
|
|
78
|
+
}], stops: [{
|
|
79
|
+
type: i0.Input
|
|
80
|
+
}] } });
|
|
81
|
+
|
|
82
|
+
var TuiBottomSheetModule = /** @class */ (function () {
|
|
83
|
+
function TuiBottomSheetModule() {
|
|
84
|
+
}
|
|
85
|
+
return TuiBottomSheetModule;
|
|
86
|
+
}());
|
|
87
|
+
TuiBottomSheetModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBottomSheetModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
88
|
+
TuiBottomSheetModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBottomSheetModule, declarations: [TuiBottomSheetComponent], imports: [i1.CommonModule], exports: [TuiBottomSheetComponent] });
|
|
89
|
+
TuiBottomSheetModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBottomSheetModule, imports: [[i1.CommonModule]] });
|
|
90
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiBottomSheetModule, decorators: [{
|
|
91
|
+
type: i0.NgModule,
|
|
92
|
+
args: [{
|
|
93
|
+
imports: [i1.CommonModule],
|
|
94
|
+
declarations: [TuiBottomSheetComponent],
|
|
95
|
+
exports: [TuiBottomSheetComponent],
|
|
96
|
+
}]
|
|
97
|
+
}] });
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Generated bundle index. Do not edit.
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
exports.TuiBottomSheetComponent = TuiBottomSheetComponent;
|
|
104
|
+
exports.TuiBottomSheetModule = TuiBottomSheetModule;
|
|
105
|
+
|
|
106
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
107
|
+
|
|
108
|
+
}));
|
|
109
|
+
//# sourceMappingURL=taiga-ui-addon-mobile-components-bottom-sheet.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-bottom-sheet.umd.js","sources":["../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.component.ts","../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.template.html","../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.module.ts","../../../projects/addon-mobile/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n Input,\n QueryList,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk';\n\nconst OPTIONS = {\n duration: 20,\n easing: 'ease-in',\n fill: 'forwards',\n} as const;\n\n@Component({\n selector: 'tui-bottom-sheet',\n templateUrl: './bottom-sheet.template.html',\n styleUrls: ['./bottom-sheet.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--t-start]': 'stops[0]',\n '[style.scroll-snap-type]': 'stops.length > 1 ? \"y mandatory\" : null',\n '(scroll.silent)': 'onScroll()',\n },\n})\nexport class TuiBottomSheetComponent {\n @ViewChildren('stops')\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @ViewChild('content')\n private readonly content?: ElementRef<HTMLElement>;\n\n @Input()\n stops: readonly string[] = ['1.5rem'];\n\n constructor(@Inject(ElementRef) private readonly el: ElementRef<HTMLElement>) {}\n\n onScroll(): void {\n const {clientHeight, scrollTop, scrollHeight} = this.el.nativeElement;\n const top = this.elements.get(0)?.nativeElement.clientHeight || 0;\n const max = this.content?.nativeElement.clientHeight || Infinity;\n const height = Math.min(clientHeight, max);\n const scrolled = Math.min(scrollTop, height - top);\n const transform = `translate3d(0, ${-1 * scrolled}px, 0)`;\n\n this.el.nativeElement.style.setProperty('--t-height', `${scrollHeight}px`);\n this.el.nativeElement.animate([{transform}], OPTIONS);\n }\n}\n","<div\n *ngFor=\"let stop of stops\"\n #stops\n class=\"t-stop\"\n [style.top]=\"stop\"\n></div>\n<div\n #content\n class=\"t-content\"\n>\n <ng-content></ng-content>\n</div>\n<div class=\"t-bottom\"></div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {TuiBottomSheetComponent} from './bottom-sheet.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TuiBottomSheetComponent],\n exports: [TuiBottomSheetComponent],\n})\nexport class TuiBottomSheetModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["EMPTY_QUERY","i0","ElementRef","i1","Component","ChangeDetectionStrategy","Inject","ViewChildren","ViewChild","Input","CommonModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAYA,IAAM,OAAO,GAAG;IACZ,IAAA,QAAQ,EAAE,EAAE;IACZ,IAAA,MAAM,EAAE,SAAS;IACjB,IAAA,IAAI,EAAE,UAAU;KACV,CAAC;AAaX,QAAA,uBAAA,kBAAA,YAAA;IAUI,IAAA,SAAA,uBAAA,CAAiD,EAA2B,EAAA;IAA3B,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAyB;IAR3D,QAAA,IAAQ,CAAA,Q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ADJC,QAAK;;;AE1BV,QAAA,oBAAA,kBAAA,YAAA;IAAA,IAAA,SAAA,oBAAA,GAAA;;;;4IAAa,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAR,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;IAApB,oBAAA,CAAA,IAAA,GAAAA,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,oBAAoB,EAHd,YAAA,EAAA,CAAA,uBAAuB,CAD5B,EAAA,OAAA,EAAA,CAAAS,eAAY,aAEZ,uBAAuB,CAAA,EAAA,CAAA,CAAA;6IAExB,oBAAoB,EAAA,OAAA,EAAA,CAJpB,CAACA,eAAY,CAAC,CAAA,EAAA,CAAA,CAAA;sHAId,oBAAoB,EAAA,UAAA,EAAA,CAAA;sBALhCC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;wBACN,OAAO,EAAE,CAACD,eAAY,CAAC;wBACvB,YAAY,EAAE,CAAC,uBAAuB,CAAC;wBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;qBACrC,CAAA;;;ICTD;;IAEG;;;;;;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@taiga-ui/addon-mobile/components/app-bar'), require('@taiga-ui/addon-mobile/components/mobile-calendar'), require('@taiga-ui/addon-mobile/components/mobile-calendar-dialog'), require('@taiga-ui/addon-mobile/components/mobile-dialog'), require('@taiga-ui/addon-mobile/components/pull-to-refresh'), require('@taiga-ui/addon-mobile/components/sheet'), require('@taiga-ui/addon-mobile/components/sheet-dialog'), require('@taiga-ui/addon-mobile/components/tab-bar'), require('@taiga-ui/addon-mobile/components/theme-android'), require('@taiga-ui/addon-mobile/components/theme-ios')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/addon-mobile/components', ['exports', '@taiga-ui/addon-mobile/components/app-bar', '@taiga-ui/addon-mobile/components/mobile-calendar', '@taiga-ui/addon-mobile/components/mobile-calendar-dialog', '@taiga-ui/addon-mobile/components/mobile-dialog', '@taiga-ui/addon-mobile/components/pull-to-refresh', '@taiga-ui/addon-mobile/components/sheet', '@taiga-ui/addon-mobile/components/sheet-dialog', '@taiga-ui/addon-mobile/components/tab-bar', '@taiga-ui/addon-mobile/components/theme-android', '@taiga-ui/addon-mobile/components/theme-ios'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"]["addon-mobile"] = global["taiga-ui"]["addon-mobile"] || {}, global["taiga-ui"]["addon-mobile"].components = {}), global["taiga-ui"]["addon-mobile"].components["app-bar"], global["taiga-ui"]["addon-mobile"].components["mobile-calendar"], global["taiga-ui"]["addon-mobile"].components["mobile-calendar-dialog"], global["taiga-ui"]["addon-mobile"].components["mobile-dialog"], global["taiga-ui"]["addon-mobile"].components["pull-to-refresh"], global["taiga-ui"]["addon-mobile"].components.sheet, global["taiga-ui"]["addon-mobile"].components["sheet-dialog"], global["taiga-ui"]["addon-mobile"].components["tab-bar"], global["taiga-ui"]["addon-mobile"].components["theme-android"], global["taiga-ui"]["addon-mobile"].components["theme-ios"]));
|
|
5
|
-
})(this, (function (exports, appBar, mobileCalendar, mobileCalendarDialog, mobileDialog, pullToRefresh, sheet, sheetDialog, tabBar, themeAndroid, themeIos) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@taiga-ui/addon-mobile/components/app-bar'), require('@taiga-ui/addon-mobile/components/bottom-sheet'), require('@taiga-ui/addon-mobile/components/mobile-calendar'), require('@taiga-ui/addon-mobile/components/mobile-calendar-dialog'), require('@taiga-ui/addon-mobile/components/mobile-dialog'), require('@taiga-ui/addon-mobile/components/pull-to-refresh'), require('@taiga-ui/addon-mobile/components/sheet'), require('@taiga-ui/addon-mobile/components/sheet-dialog'), require('@taiga-ui/addon-mobile/components/tab-bar'), require('@taiga-ui/addon-mobile/components/theme-android'), require('@taiga-ui/addon-mobile/components/theme-ios')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/addon-mobile/components', ['exports', '@taiga-ui/addon-mobile/components/app-bar', '@taiga-ui/addon-mobile/components/bottom-sheet', '@taiga-ui/addon-mobile/components/mobile-calendar', '@taiga-ui/addon-mobile/components/mobile-calendar-dialog', '@taiga-ui/addon-mobile/components/mobile-dialog', '@taiga-ui/addon-mobile/components/pull-to-refresh', '@taiga-ui/addon-mobile/components/sheet', '@taiga-ui/addon-mobile/components/sheet-dialog', '@taiga-ui/addon-mobile/components/tab-bar', '@taiga-ui/addon-mobile/components/theme-android', '@taiga-ui/addon-mobile/components/theme-ios'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"]["addon-mobile"] = global["taiga-ui"]["addon-mobile"] || {}, global["taiga-ui"]["addon-mobile"].components = {}), global["taiga-ui"]["addon-mobile"].components["app-bar"], global["taiga-ui"]["addon-mobile"].components["bottom-sheet"], global["taiga-ui"]["addon-mobile"].components["mobile-calendar"], global["taiga-ui"]["addon-mobile"].components["mobile-calendar-dialog"], global["taiga-ui"]["addon-mobile"].components["mobile-dialog"], global["taiga-ui"]["addon-mobile"].components["pull-to-refresh"], global["taiga-ui"]["addon-mobile"].components.sheet, global["taiga-ui"]["addon-mobile"].components["sheet-dialog"], global["taiga-ui"]["addon-mobile"].components["tab-bar"], global["taiga-ui"]["addon-mobile"].components["theme-android"], global["taiga-ui"]["addon-mobile"].components["theme-ios"]));
|
|
5
|
+
})(this, (function (exports, appBar, bottomSheet, mobileCalendar, mobileCalendarDialog, mobileDialog, pullToRefresh, sheet, sheetDialog, tabBar, themeAndroid, themeIos) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Generated bundle index. Do not edit.
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
get: function () { return appBar[k]; }
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
+
Object.keys(bottomSheet).forEach(function (k) {
|
|
18
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return bottomSheet[k]; }
|
|
21
|
+
});
|
|
22
|
+
});
|
|
17
23
|
Object.keys(mobileCalendar).forEach(function (k) {
|
|
18
24
|
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
19
25
|
enumerable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components.umd.js","sources":["../../../projects/addon-mobile/components/taiga-ui-addon-mobile-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;CAAA;;CAEG
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components.umd.js","sources":["../../../projects/addon-mobile/components/taiga-ui-addon-mobile-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;CAAA;;CAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TuiBottomSheetComponent {
|
|
4
|
+
private readonly el;
|
|
5
|
+
private readonly elements;
|
|
6
|
+
private readonly content?;
|
|
7
|
+
stops: readonly string[];
|
|
8
|
+
constructor(el: ElementRef<HTMLElement>);
|
|
9
|
+
onScroll(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiBottomSheetComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TuiBottomSheetComponent, "tui-bottom-sheet", never, { "stops": "stops"; }, {}, never, ["*"]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./bottom-sheet.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class TuiBottomSheetModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiBottomSheetModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TuiBottomSheetModule, [typeof i1.TuiBottomSheetComponent], [typeof i2.CommonModule], [typeof i1.TuiBottomSheetComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<TuiBottomSheetModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"main": "../../bundles/taiga-ui-addon-mobile-components-bottom-sheet.umd.js",
|
|
3
|
+
"module": "../../fesm2015/taiga-ui-addon-mobile-components-bottom-sheet.js",
|
|
4
|
+
"es2015": "../../fesm2015/taiga-ui-addon-mobile-components-bottom-sheet.js",
|
|
5
|
+
"esm2015": "../../esm2015/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.js",
|
|
6
|
+
"fesm2015": "../../fesm2015/taiga-ui-addon-mobile-components-bottom-sheet.js",
|
|
7
|
+
"typings": "taiga-ui-addon-mobile-components-bottom-sheet.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"name": "@taiga-ui/addon-mobile/components/bottom-sheet"
|
|
10
|
+
}
|
package/components/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from '@taiga-ui/addon-mobile/components/app-bar';
|
|
2
|
+
export * from '@taiga-ui/addon-mobile/components/bottom-sheet';
|
|
2
3
|
export * from '@taiga-ui/addon-mobile/components/mobile-calendar';
|
|
3
4
|
export * from '@taiga-ui/addon-mobile/components/mobile-calendar-dialog';
|
|
4
5
|
export * from '@taiga-ui/addon-mobile/components/mobile-dialog';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ElementRef, Inject, Input, ViewChild, ViewChildren, } from '@angular/core';
|
|
2
|
+
import { EMPTY_QUERY } from '@taiga-ui/cdk';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
const OPTIONS = {
|
|
6
|
+
duration: 20,
|
|
7
|
+
easing: 'ease-in',
|
|
8
|
+
fill: 'forwards',
|
|
9
|
+
};
|
|
10
|
+
export class TuiBottomSheetComponent {
|
|
11
|
+
constructor(el) {
|
|
12
|
+
this.el = el;
|
|
13
|
+
this.elements = EMPTY_QUERY;
|
|
14
|
+
this.stops = ['1.5rem'];
|
|
15
|
+
}
|
|
16
|
+
onScroll() {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
const { clientHeight, scrollTop, scrollHeight } = this.el.nativeElement;
|
|
19
|
+
const top = ((_a = this.elements.get(0)) === null || _a === void 0 ? void 0 : _a.nativeElement.clientHeight) || 0;
|
|
20
|
+
const max = ((_b = this.content) === null || _b === void 0 ? void 0 : _b.nativeElement.clientHeight) || Infinity;
|
|
21
|
+
const height = Math.min(clientHeight, max);
|
|
22
|
+
const scrolled = Math.min(scrollTop, height - top);
|
|
23
|
+
const transform = `translate3d(0, ${-1 * scrolled}px, 0)`;
|
|
24
|
+
this.el.nativeElement.style.setProperty('--t-height', `${scrollHeight}px`);
|
|
25
|
+
this.el.nativeElement.animate([{ transform }], OPTIONS);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
TuiBottomSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetComponent, deps: [{ token: ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
TuiBottomSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiBottomSheetComponent, selector: "tui-bottom-sheet", inputs: { stops: "stops" }, host: { listeners: { "scroll.silent": "onScroll()" }, properties: { "style.--t-start": "stops[0]", "style.scroll-snap-type": "stops.length > 1 ? \"y mandatory\" : null" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }, { propertyName: "elements", predicate: ["stops"], descendants: true }], ngImport: i0, template: "<div\n *ngFor=\"let stop of stops\"\n #stops\n class=\"t-stop\"\n [style.top]=\"stop\"\n></div>\n<div\n #content\n class=\"t-content\"\n>\n <ng-content></ng-content>\n</div>\n<div class=\"t-bottom\"></div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:100%;left:0;right:0;display:block;block-size:calc(100% - 1rem);max-inline-size:40rem;margin:calc(-1 * var(--t-start)) auto 0;background:var(--tui-elevation-01);border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:auto;box-shadow:0 1rem var(--tui-elevation-01),var(--tui-shadow)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:before{content:\"\";position:-webkit-sticky;position:sticky;top:.625rem;left:50%;z-index:1;display:block;inline-size:2rem;block-size:.25rem;-webkit-margin-after:-.25rem;margin-block-end:-.25rem;transform:translate(-50%);background:var(--tui-elevation-01);box-shadow:0 0 0 20rem var(--tui-elevation-01),inset 0 0 0 1rem var(--tui-base-03);border-radius:1rem;-webkit-clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem));clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem))}:host:after{content:\"\";position:absolute;top:calc(100% - var(--t-start));inline-size:1rem;block-size:calc(var(--t-height) - 100% + var(--t-start));scroll-snap-align:start;scroll-snap-stop:always}.t-content{position:-webkit-sticky;position:sticky;top:0;padding:2.25rem 1rem 1.5rem}.t-bottom{block-size:calc(100% - var(--t-start))}.t-stop{position:absolute;block-size:var(--t-start);inline-size:1rem;pointer-events:none;transform:translateY(-100%);scroll-snap-align:start;scroll-snap-stop:always}.t-stop:last-child{scroll-snap-align:none}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetComponent, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{
|
|
33
|
+
selector: 'tui-bottom-sheet',
|
|
34
|
+
templateUrl: './bottom-sheet.template.html',
|
|
35
|
+
styleUrls: ['./bottom-sheet.style.less'],
|
|
36
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
37
|
+
host: {
|
|
38
|
+
'[style.--t-start]': 'stops[0]',
|
|
39
|
+
'[style.scroll-snap-type]': 'stops.length > 1 ? "y mandatory" : null',
|
|
40
|
+
'(scroll.silent)': 'onScroll()',
|
|
41
|
+
},
|
|
42
|
+
}]
|
|
43
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
|
|
44
|
+
type: Inject,
|
|
45
|
+
args: [ElementRef]
|
|
46
|
+
}] }]; }, propDecorators: { elements: [{
|
|
47
|
+
type: ViewChildren,
|
|
48
|
+
args: ['stops']
|
|
49
|
+
}], content: [{
|
|
50
|
+
type: ViewChild,
|
|
51
|
+
args: ['content']
|
|
52
|
+
}], stops: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}] } });
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm90dG9tLXNoZWV0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL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HNjcm9sbGVkfXB4LCAwKWA7XG5cbiAgICAgICAgdGhpcy5lbC5uYXRpdmVFbGVtZW50LnN0eWxlLnNldFByb3BlcnR5KCctLXQtaGVpZ2h0JywgYCR7c2Nyb2xsSGVpZ2h0fXB4YCk7XG4gICAgICAgIHRoaXMuZWwubmF0aXZlRWxlbWVudC5hbmltYXRlKFt7dHJhbnNmb3JtfV0sIE9QVElPTlMpO1xuICAgIH1cbn1cbiIsIjxkaXZcbiAgICAqbmdGb3I9XCJsZXQgc3RvcCBvZiBzdG9wc1wiXG4gICAgI3N0b3BzXG4gICAgY2xhc3M9XCJ0LXN0b3BcIlxuICAgIFtzdHlsZS50b3BdPVwic3RvcFwiXG4+PC9kaXY+XG48ZGl2XG4gICAgI2NvbnRlbnRcbiAgICBjbGFzcz1cInQtY29udGVudFwiXG4+XG4gICAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuPC9kaXY+XG48ZGl2IGNsYXNzPVwidC1ib3R0b21cIj48L2Rpdj5cbiJdfQ==
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
|
+
import { TuiBottomSheetComponent } from './bottom-sheet.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class TuiBottomSheetModule {
|
|
6
|
+
}
|
|
7
|
+
TuiBottomSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8
|
+
TuiBottomSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetModule, declarations: [TuiBottomSheetComponent], imports: [CommonModule], exports: [TuiBottomSheetComponent] });
|
|
9
|
+
TuiBottomSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetModule, imports: [[CommonModule]] });
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetModule, decorators: [{
|
|
11
|
+
type: NgModule,
|
|
12
|
+
args: [{
|
|
13
|
+
imports: [CommonModule],
|
|
14
|
+
declarations: [TuiBottomSheetComponent],
|
|
15
|
+
exports: [TuiBottomSheetComponent],
|
|
16
|
+
}]
|
|
17
|
+
}] });
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm90dG9tLXNoZWV0Lm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FkZG9uLW1vYmlsZS9jb21wb25lbnRzL2JvdHRvbS1zaGVldC9ib3R0b20tc2hlZXQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxpQkFBaUIsQ0FBQztBQUM3QyxPQUFPLEVBQUMsUUFBUSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRXZDLE9BQU8sRUFBQyx1QkFBdUIsRUFBQyxNQUFNLDBCQUEwQixDQUFDOztBQU9qRSxNQUFNLE9BQU8sb0JBQW9COztrSEFBcEIsb0JBQW9CO21IQUFwQixvQkFBb0IsaUJBSGQsdUJBQXVCLGFBRDVCLFlBQVksYUFFWix1QkFBdUI7bUhBRXhCLG9CQUFvQixZQUpwQixDQUFDLFlBQVksQ0FBQzs0RkFJZCxvQkFBb0I7a0JBTGhDLFFBQVE7bUJBQUM7b0JBQ04sT0FBTyxFQUFFLENBQUMsWUFBWSxDQUFDO29CQUN2QixZQUFZLEVBQUUsQ0FBQyx1QkFBdUIsQ0FBQztvQkFDdkMsT0FBTyxFQUFFLENBQUMsdUJBQXVCLENBQUM7aUJBQ3JDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtDb21tb25Nb2R1bGV9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XG5pbXBvcnQge05nTW9kdWxlfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHtUdWlCb3R0b21TaGVldENvbXBvbmVudH0gZnJvbSAnLi9ib3R0b20tc2hlZXQuY29tcG9uZW50JztcblxuQE5nTW9kdWxlKHtcbiAgICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlXSxcbiAgICBkZWNsYXJhdGlvbnM6IFtUdWlCb3R0b21TaGVldENvbXBvbmVudF0sXG4gICAgZXhwb3J0czogW1R1aUJvdHRvbVNoZWV0Q29tcG9uZW50XSxcbn0pXG5leHBvcnQgY2xhc3MgVHVpQm90dG9tU2hlZXRNb2R1bGUge31cbiJdfQ==
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './bottom-sheet.component';
|
|
2
|
+
export * from './bottom-sheet.module';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hZGRvbi1tb2JpbGUvY29tcG9uZW50cy9ib3R0b20tc2hlZXQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLHVCQUF1QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9ib3R0b20tc2hlZXQuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vYm90dG9tLXNoZWV0Lm1vZHVsZSc7XG4iXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpZ2EtdWktYWRkb24tbW9iaWxlLWNvbXBvbmVudHMtYm90dG9tLXNoZWV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYWRkb24tbW9iaWxlL2NvbXBvbmVudHMvYm90dG9tLXNoZWV0L3RhaWdhLXVpLWFkZG9uLW1vYmlsZS1jb21wb25lbnRzLWJvdHRvbS1zaGVldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from '@taiga-ui/addon-mobile/components/app-bar';
|
|
2
|
+
export * from '@taiga-ui/addon-mobile/components/bottom-sheet';
|
|
2
3
|
export * from '@taiga-ui/addon-mobile/components/mobile-calendar';
|
|
3
4
|
export * from '@taiga-ui/addon-mobile/components/mobile-calendar-dialog';
|
|
4
5
|
export * from '@taiga-ui/addon-mobile/components/mobile-dialog';
|
|
@@ -8,4 +9,4 @@ export * from '@taiga-ui/addon-mobile/components/sheet-dialog';
|
|
|
8
9
|
export * from '@taiga-ui/addon-mobile/components/tab-bar';
|
|
9
10
|
export * from '@taiga-ui/addon-mobile/components/theme-android';
|
|
10
11
|
export * from '@taiga-ui/addon-mobile/components/theme-ios';
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL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vc2hlZXQnO1xuZXhwb3J0ICogZnJvbSAnQHRhaWdhLXVpL2FkZG9uLW1vYmlsZS9jb21wb25lbnRzL3NoZWV0LWRpYWxvZyc7XG5leHBvcnQgKiBmcm9tICdAdGFpZ2EtdWkvYWRkb24tbW9iaWxlL2NvbXBvbmVudHMvdGFiLWJhcic7XG5leHBvcnQgKiBmcm9tICdAdGFpZ2EtdWkvYWRkb24tbW9iaWxlL2NvbXBvbmVudHMvdGhlbWUtYW5kcm9pZCc7XG5leHBvcnQgKiBmcm9tICdAdGFpZ2EtdWkvYWRkb24tbW9iaWxlL2NvbXBvbmVudHMvdGhlbWUtaW9zJztcbiJdfQ==
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ElementRef, Component, ChangeDetectionStrategy, Inject, ViewChildren, ViewChild, Input, NgModule } from '@angular/core';
|
|
3
|
+
import { EMPTY_QUERY } from '@taiga-ui/cdk';
|
|
4
|
+
import * as i1 from '@angular/common';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
|
|
7
|
+
const OPTIONS = {
|
|
8
|
+
duration: 20,
|
|
9
|
+
easing: 'ease-in',
|
|
10
|
+
fill: 'forwards',
|
|
11
|
+
};
|
|
12
|
+
class TuiBottomSheetComponent {
|
|
13
|
+
constructor(el) {
|
|
14
|
+
this.el = el;
|
|
15
|
+
this.elements = EMPTY_QUERY;
|
|
16
|
+
this.stops = ['1.5rem'];
|
|
17
|
+
}
|
|
18
|
+
onScroll() {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
const { clientHeight, scrollTop, scrollHeight } = this.el.nativeElement;
|
|
21
|
+
const top = ((_a = this.elements.get(0)) === null || _a === void 0 ? void 0 : _a.nativeElement.clientHeight) || 0;
|
|
22
|
+
const max = ((_b = this.content) === null || _b === void 0 ? void 0 : _b.nativeElement.clientHeight) || Infinity;
|
|
23
|
+
const height = Math.min(clientHeight, max);
|
|
24
|
+
const scrolled = Math.min(scrollTop, height - top);
|
|
25
|
+
const transform = `translate3d(0, ${-1 * scrolled}px, 0)`;
|
|
26
|
+
this.el.nativeElement.style.setProperty('--t-height', `${scrollHeight}px`);
|
|
27
|
+
this.el.nativeElement.animate([{ transform }], OPTIONS);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
TuiBottomSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetComponent, deps: [{ token: ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
TuiBottomSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiBottomSheetComponent, selector: "tui-bottom-sheet", inputs: { stops: "stops" }, host: { listeners: { "scroll.silent": "onScroll()" }, properties: { "style.--t-start": "stops[0]", "style.scroll-snap-type": "stops.length > 1 ? \"y mandatory\" : null" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }, { propertyName: "elements", predicate: ["stops"], descendants: true }], ngImport: i0, template: "<div\n *ngFor=\"let stop of stops\"\n #stops\n class=\"t-stop\"\n [style.top]=\"stop\"\n></div>\n<div\n #content\n class=\"t-content\"\n>\n <ng-content></ng-content>\n</div>\n<div class=\"t-bottom\"></div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:100%;left:0;right:0;display:block;block-size:calc(100% - 1rem);max-inline-size:40rem;margin:calc(-1 * var(--t-start)) auto 0;background:var(--tui-elevation-01);border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:auto;box-shadow:0 1rem var(--tui-elevation-01),var(--tui-shadow)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:before{content:\"\";position:-webkit-sticky;position:sticky;top:.625rem;left:50%;z-index:1;display:block;inline-size:2rem;block-size:.25rem;-webkit-margin-after:-.25rem;margin-block-end:-.25rem;transform:translate(-50%);background:var(--tui-elevation-01);box-shadow:0 0 0 20rem var(--tui-elevation-01),inset 0 0 0 1rem var(--tui-base-03);border-radius:1rem;-webkit-clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem));clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem))}:host:after{content:\"\";position:absolute;top:calc(100% - var(--t-start));inline-size:1rem;block-size:calc(var(--t-height) - 100% + var(--t-start));scroll-snap-align:start;scroll-snap-stop:always}.t-content{position:-webkit-sticky;position:sticky;top:0;padding:2.25rem 1rem 1.5rem}.t-bottom{block-size:calc(100% - var(--t-start))}.t-stop{position:absolute;block-size:var(--t-start);inline-size:1rem;pointer-events:none;transform:translateY(-100%);scroll-snap-align:start;scroll-snap-stop:always}.t-stop:last-child{scroll-snap-align:none}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetComponent, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{
|
|
35
|
+
selector: 'tui-bottom-sheet',
|
|
36
|
+
templateUrl: './bottom-sheet.template.html',
|
|
37
|
+
styleUrls: ['./bottom-sheet.style.less'],
|
|
38
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
39
|
+
host: {
|
|
40
|
+
'[style.--t-start]': 'stops[0]',
|
|
41
|
+
'[style.scroll-snap-type]': 'stops.length > 1 ? "y mandatory" : null',
|
|
42
|
+
'(scroll.silent)': 'onScroll()',
|
|
43
|
+
},
|
|
44
|
+
}]
|
|
45
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
|
|
46
|
+
type: Inject,
|
|
47
|
+
args: [ElementRef]
|
|
48
|
+
}] }]; }, propDecorators: { elements: [{
|
|
49
|
+
type: ViewChildren,
|
|
50
|
+
args: ['stops']
|
|
51
|
+
}], content: [{
|
|
52
|
+
type: ViewChild,
|
|
53
|
+
args: ['content']
|
|
54
|
+
}], stops: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}] } });
|
|
57
|
+
|
|
58
|
+
class TuiBottomSheetModule {
|
|
59
|
+
}
|
|
60
|
+
TuiBottomSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
61
|
+
TuiBottomSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetModule, declarations: [TuiBottomSheetComponent], imports: [CommonModule], exports: [TuiBottomSheetComponent] });
|
|
62
|
+
TuiBottomSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetModule, imports: [[CommonModule]] });
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiBottomSheetModule, decorators: [{
|
|
64
|
+
type: NgModule,
|
|
65
|
+
args: [{
|
|
66
|
+
imports: [CommonModule],
|
|
67
|
+
declarations: [TuiBottomSheetComponent],
|
|
68
|
+
exports: [TuiBottomSheetComponent],
|
|
69
|
+
}]
|
|
70
|
+
}] });
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Generated bundle index. Do not edit.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
export { TuiBottomSheetComponent, TuiBottomSheetModule };
|
|
77
|
+
//# sourceMappingURL=taiga-ui-addon-mobile-components-bottom-sheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-bottom-sheet.js","sources":["../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.component.ts","../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.template.html","../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.module.ts","../../../projects/addon-mobile/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n Input,\n QueryList,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk';\n\nconst OPTIONS = {\n duration: 20,\n easing: 'ease-in',\n fill: 'forwards',\n} as const;\n\n@Component({\n selector: 'tui-bottom-sheet',\n templateUrl: './bottom-sheet.template.html',\n styleUrls: ['./bottom-sheet.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--t-start]': 'stops[0]',\n '[style.scroll-snap-type]': 'stops.length > 1 ? \"y mandatory\" : null',\n '(scroll.silent)': 'onScroll()',\n },\n})\nexport class TuiBottomSheetComponent {\n @ViewChildren('stops')\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @ViewChild('content')\n private readonly content?: ElementRef<HTMLElement>;\n\n @Input()\n stops: readonly string[] = ['1.5rem'];\n\n constructor(@Inject(ElementRef) private readonly el: ElementRef<HTMLElement>) {}\n\n onScroll(): void {\n const {clientHeight, scrollTop, scrollHeight} = this.el.nativeElement;\n const top = this.elements.get(0)?.nativeElement.clientHeight || 0;\n const max = this.content?.nativeElement.clientHeight || Infinity;\n const height = Math.min(clientHeight, max);\n const scrolled = Math.min(scrollTop, height - top);\n const transform = `translate3d(0, ${-1 * scrolled}px, 0)`;\n\n this.el.nativeElement.style.setProperty('--t-height', `${scrollHeight}px`);\n this.el.nativeElement.animate([{transform}], OPTIONS);\n }\n}\n","<div\n *ngFor=\"let stop of stops\"\n #stops\n class=\"t-stop\"\n [style.top]=\"stop\"\n></div>\n<div\n #content\n class=\"t-content\"\n>\n <ng-content></ng-content>\n</div>\n<div class=\"t-bottom\"></div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {TuiBottomSheetComponent} from './bottom-sheet.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TuiBottomSheetComponent],\n exports: [TuiBottomSheetComponent],\n})\nexport class TuiBottomSheetModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAYA,MAAM,OAAO,GAAG;AACZ,IAAA,QAAQ,EAAE,EAAE;AACZ,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,IAAI,EAAE,UAAU;CACV,CAAC;MAaE,uBAAuB,CAAA;AAUhC,IAAA,WAAA,CAAiD,EAA2B,EAAA;QAA3B,IAAE,CAAA,EAAA,GAAF,EAAE,CAAyB;QAR3D,IAAQ,CAAA,QAAA,GAAuC,WAAW,CAAC;AAM5E,QAAA,IAAA,CAAA,KAAK,GAAsB,CAAC,QAAQ,CAAC,CAAC;KAE0C;IAEhF,QAAQ,GAAA;;AACJ,QAAA,MAAM,EAAC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAC,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;AACtE,QAAA,MAAM,GAAG,GAAG,CAAA,MAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,aAAa,CAAC,YAAY,KAAI,CAAC,CAAC;AAClE,QAAA,MAAM,GAAG,GAAG,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,aAAa,CAAC,YAAY,KAAI,QAAQ,CAAC;QACjE,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;AAC3C,QAAA,MAAM,QAAQ,GAAG,IAAI,CAA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-mobile/components/bottom-sheet';
|
|
2
3
|
export * from '@taiga-ui/addon-mobile/components/mobile-calendar';
|
|
3
4
|
export * from '@taiga-ui/addon-mobile/components/mobile-calendar-dialog';
|
|
4
5
|
export * from '@taiga-ui/addon-mobile/components/mobile-dialog';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components.js","sources":["../../../projects/addon-mobile/components/taiga-ui-addon-mobile-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components.js","sources":["../../../projects/addon-mobile/components/taiga-ui-addon-mobile-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/addon-mobile",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.105.0",
|
|
4
4
|
"description": "Extension package for Taiga UI that adds support for mobile specific behaviors such as custom data pickers, dropdowns, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"@angular/common": ">=12.0.0",
|
|
16
16
|
"@angular/core": ">=12.0.0",
|
|
17
17
|
"@ng-web-apis/common": ">=3.2.3 <4",
|
|
18
|
-
"@taiga-ui/cdk": ">=3.
|
|
19
|
-
"@taiga-ui/core": ">=3.
|
|
20
|
-
"@taiga-ui/kit": ">=3.
|
|
18
|
+
"@taiga-ui/cdk": ">=3.105.0 <4",
|
|
19
|
+
"@taiga-ui/core": ">=3.105.0 <4",
|
|
20
|
+
"@taiga-ui/kit": ">=3.105.0 <4",
|
|
21
21
|
"@tinkoff/ng-polymorpheus": ">=4.3.0",
|
|
22
22
|
"rxjs": ">=6.0.0"
|
|
23
23
|
},
|