@taiga-ui/core 5.25.0 → 5.26.0-canary.eb5f53f
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/classes/accessors.d.ts +3 -0
- package/components/scrollbar/scrollbar.component.d.ts +2 -2
- package/fesm2022/taiga-ui-core-classes.mjs +1 -0
- package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-button.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-cell.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-checkbox.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-checkbox.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +4 -4
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-label.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-link.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-notification.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-radio.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-radio.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +13 -12
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +4 -4
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-title.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-title.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-group.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-alert.mjs +3 -3
- package/fesm2022/taiga-ui-core-portals-alert.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-dialog.mjs +2 -2
- package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-dropdown.mjs +270 -163
- package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-hint.mjs +7 -21
- package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-modal.mjs +3 -3
- package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-dom.mjs +21 -1
- package/fesm2022/taiga-ui-core-utils-dom.mjs.map +1 -1
- package/package.json +19 -19
- package/portals/dropdown/dropdown-anchored.directive.d.ts +4 -1
- package/portals/dropdown/dropdown-context.directive.d.ts +3 -4
- package/portals/dropdown/dropdown-position-sided.directive.d.ts +2 -0
- package/portals/dropdown/dropdown-position.directive.d.ts +2 -0
- package/portals/dropdown/dropdown-selection.directive.d.ts +1 -1
- package/portals/dropdown/dropdown.component.d.ts +10 -8
- package/portals/dropdown/dropdown.providers.d.ts +2 -3
- package/portals/hint/hint-pointer.directive.d.ts +1 -3
- package/utils/dom/anchor-delegate.d.ts +1 -0
- package/utils/dom/index.d.ts +1 -0
|
@@ -1,5 +1,25 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
2
|
+
import { inject, afterNextRender } from '@angular/core';
|
|
3
|
+
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
4
|
+
import { tuiGenerateId } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
5
|
+
import { TuiPopupService } from '@taiga-ui/core/portals/popup';
|
|
1
6
|
import { svgNodeFilter, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_SPACE } from '@taiga-ui/cdk/constants';
|
|
2
7
|
|
|
8
|
+
const STYLE = { position: 'fixed', pointerEvents: 'none' };
|
|
9
|
+
function tuiAnchorDelegate(styles = {}) {
|
|
10
|
+
const el = tuiInjectElement();
|
|
11
|
+
const popups = inject(TuiPopupService);
|
|
12
|
+
const anchor = inject(DOCUMENT).createElement('div');
|
|
13
|
+
afterNextRender(() => {
|
|
14
|
+
const anchorName = `--${tuiGenerateId()}`;
|
|
15
|
+
const positionAnchor = el.dataset.tuiAnchor;
|
|
16
|
+
Object.assign(anchor.style, { ...STYLE, ...styles, positionAnchor, anchorName });
|
|
17
|
+
anchor.dataset.tuiAnchor = anchorName;
|
|
18
|
+
popups.add(anchor);
|
|
19
|
+
});
|
|
20
|
+
return anchor;
|
|
21
|
+
}
|
|
22
|
+
|
|
3
23
|
function tuiCheckFixedPosition(element) {
|
|
4
24
|
return (!!element && (isFixed(element) || tuiCheckFixedPosition(element.parentElement)));
|
|
5
25
|
}
|
|
@@ -87,5 +107,5 @@ function tuiGetWordRange(currentRange) {
|
|
|
87
107
|
* Generated bundle index. Do not edit.
|
|
88
108
|
*/
|
|
89
109
|
|
|
90
|
-
export { tuiCheckFixedPosition, tuiGetViewportHeight, tuiGetViewportWidth, tuiGetWordRange };
|
|
110
|
+
export { tuiAnchorDelegate, tuiCheckFixedPosition, tuiGetViewportHeight, tuiGetViewportWidth, tuiGetWordRange };
|
|
91
111
|
//# sourceMappingURL=taiga-ui-core-utils-dom.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-utils-dom.mjs","sources":["../../../projects/core/utils/dom/check-fixed-position.ts","../../../projects/core/utils/dom/get-viewport.ts","../../../projects/core/utils/dom/get-word-range.ts","../../../projects/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["export function tuiCheckFixedPosition(element?: HTMLElement | null): boolean {\n return (\n !!element && (isFixed(element) || tuiCheckFixedPosition(element.parentElement))\n );\n}\n\nfunction isFixed(element: HTMLElement): boolean {\n return (\n element.ownerDocument.defaultView\n ?.getComputedStyle(element)\n .getPropertyValue('position') === 'fixed'\n );\n}\n","/**\n * @description:\n * Cross-browser @media (height/width)\n *\n * 1. window.innerWidth/Width\n * 1.1. gets CSS viewport @media (height/width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight/Width\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportHeight({document, innerHeight}: Window): number {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n\nexport function tuiGetViewportWidth({document, innerWidth}: Window): number {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n","import {\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n svgNodeFilter,\n} from '@taiga-ui/cdk/constants';\n\n/**\n * Creates a cloned range with its boundaries set at word boundaries\n *\n * @param currentRange a range to clone\n * @return modified range\n */\nexport function tuiGetWordRange(currentRange: Range): Range {\n const range = currentRange.cloneRange();\n const {startContainer, startOffset, endContainer, endOffset} = range;\n const {ownerDocument} = startContainer;\n\n if (!ownerDocument) {\n return range;\n }\n\n const treeWalker = ownerDocument.createTreeWalker(\n ownerDocument.body,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n treeWalker.currentNode = startContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n\n const content =\n container === startContainer\n ? textContent.slice(0, Math.max(0, startOffset + 1))\n : textContent;\n\n const offset =\n Math.max(\n content.lastIndexOf(' '),\n content.lastIndexOf('\\n'),\n content.lastIndexOf(CHAR_NO_BREAK_SPACE),\n content.lastIndexOf(CHAR_ZERO_WIDTH_SPACE),\n ) + 1;\n\n range.setStart(container, 0);\n\n if (offset) {\n range.setStart(container, offset);\n break;\n }\n } while (treeWalker.previousNode());\n\n treeWalker.currentNode = endContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n\n const content =\n container === endContainer ? textContent.slice(endOffset + 1) : textContent;\n\n const offset = [\n content.indexOf(' '),\n content.lastIndexOf('\\n'),\n content.indexOf(CHAR_NO_BREAK_SPACE),\n content.indexOf(CHAR_ZERO_WIDTH_SPACE),\n ].reduce(\n (result, item) =>\n result === -1 || item === -1\n ? Math.max(result, item)\n : Math.min(result, item),\n -1,\n );\n\n range.setEnd(container, textContent.length);\n\n if (offset !== -1) {\n range.setEnd(container, offset + textContent.length - content.length);\n break;\n }\n } while (treeWalker.nextNode());\n\n return range;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-utils-dom.mjs","sources":["../../../projects/core/utils/dom/anchor-delegate.ts","../../../projects/core/utils/dom/check-fixed-position.ts","../../../projects/core/utils/dom/get-viewport.ts","../../../projects/core/utils/dom/get-word-range.ts","../../../projects/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {afterNextRender, inject} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGenerateId} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiPopupService} from '@taiga-ui/core/portals/popup';\n\nconst STYLE: Partial<CSSStyleDeclaration> = {position: 'fixed', pointerEvents: 'none'};\n\nexport function tuiAnchorDelegate(\n styles: Partial<CSSStyleDeclaration> = {},\n): HTMLElement {\n const el = tuiInjectElement();\n const popups = inject(TuiPopupService);\n const anchor = inject(DOCUMENT).createElement('div');\n\n afterNextRender(() => {\n const anchorName = `--${tuiGenerateId()}`;\n const positionAnchor = el.dataset.tuiAnchor;\n\n Object.assign(anchor.style, {...STYLE, ...styles, positionAnchor, anchorName});\n anchor.dataset.tuiAnchor = anchorName;\n popups.add(anchor);\n });\n\n return anchor;\n}\n","export function tuiCheckFixedPosition(element?: HTMLElement | null): boolean {\n return (\n !!element && (isFixed(element) || tuiCheckFixedPosition(element.parentElement))\n );\n}\n\nfunction isFixed(element: HTMLElement): boolean {\n return (\n element.ownerDocument.defaultView\n ?.getComputedStyle(element)\n .getPropertyValue('position') === 'fixed'\n );\n}\n","/**\n * @description:\n * Cross-browser @media (height/width)\n *\n * 1. window.innerWidth/Width\n * 1.1. gets CSS viewport @media (height/width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight/Width\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportHeight({document, innerHeight}: Window): number {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n\nexport function tuiGetViewportWidth({document, innerWidth}: Window): number {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n","import {\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n svgNodeFilter,\n} from '@taiga-ui/cdk/constants';\n\n/**\n * Creates a cloned range with its boundaries set at word boundaries\n *\n * @param currentRange a range to clone\n * @return modified range\n */\nexport function tuiGetWordRange(currentRange: Range): Range {\n const range = currentRange.cloneRange();\n const {startContainer, startOffset, endContainer, endOffset} = range;\n const {ownerDocument} = startContainer;\n\n if (!ownerDocument) {\n return range;\n }\n\n const treeWalker = ownerDocument.createTreeWalker(\n ownerDocument.body,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n treeWalker.currentNode = startContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n\n const content =\n container === startContainer\n ? textContent.slice(0, Math.max(0, startOffset + 1))\n : textContent;\n\n const offset =\n Math.max(\n content.lastIndexOf(' '),\n content.lastIndexOf('\\n'),\n content.lastIndexOf(CHAR_NO_BREAK_SPACE),\n content.lastIndexOf(CHAR_ZERO_WIDTH_SPACE),\n ) + 1;\n\n range.setStart(container, 0);\n\n if (offset) {\n range.setStart(container, offset);\n break;\n }\n } while (treeWalker.previousNode());\n\n treeWalker.currentNode = endContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n\n const content =\n container === endContainer ? textContent.slice(endOffset + 1) : textContent;\n\n const offset = [\n content.indexOf(' '),\n content.lastIndexOf('\\n'),\n content.indexOf(CHAR_NO_BREAK_SPACE),\n content.indexOf(CHAR_ZERO_WIDTH_SPACE),\n ].reduce(\n (result, item) =>\n result === -1 || item === -1\n ? Math.max(result, item)\n : Math.min(result, item),\n -1,\n );\n\n range.setEnd(container, textContent.length);\n\n if (offset !== -1) {\n range.setEnd(container, offset + textContent.length - content.length);\n break;\n }\n } while (treeWalker.nextNode());\n\n return range;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMA,MAAM,KAAK,GAAiC,EAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAC;AAEhF,SAAU,iBAAiB,CAC7B,MAAA,GAAuC,EAAE,EAAA;AAEzC,IA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
|
-
"version": "5.
|
|
3
|
+
"version": "5.26.0-canary.eb5f53f",
|
|
4
4
|
"description": "Core library for creating Angular components and applications using Taiga UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@ng-web-apis/intersection-observer": "^5.3.0",
|
|
42
42
|
"@ng-web-apis/mutation-observer": "^5.3.0",
|
|
43
43
|
"@ng-web-apis/platform": "^5.3.0",
|
|
44
|
-
"@taiga-ui/cdk": "5.
|
|
44
|
+
"@taiga-ui/cdk": "5.26.0",
|
|
45
45
|
"@taiga-ui/event-plugins": "^5.0.0",
|
|
46
|
-
"@taiga-ui/i18n": "5.
|
|
46
|
+
"@taiga-ui/i18n": "5.26.0",
|
|
47
47
|
"@taiga-ui/polymorpheus": "^5.0.1",
|
|
48
|
-
"@taiga-ui/styles": "5.
|
|
48
|
+
"@taiga-ui/styles": "5.26.0",
|
|
49
49
|
"rxjs": ">=7.0.0"
|
|
50
50
|
},
|
|
51
51
|
"schematics": "./schematics/collection.json",
|
|
@@ -195,6 +195,10 @@
|
|
|
195
195
|
"types": "./directives/group/index.d.ts",
|
|
196
196
|
"default": "./fesm2022/taiga-ui-core-directives-group.mjs"
|
|
197
197
|
},
|
|
198
|
+
"./directives/icons": {
|
|
199
|
+
"types": "./directives/icons/index.d.ts",
|
|
200
|
+
"default": "./fesm2022/taiga-ui-core-directives-icons.mjs"
|
|
201
|
+
},
|
|
198
202
|
"./directives/items-handlers": {
|
|
199
203
|
"types": "./directives/items-handlers/index.d.ts",
|
|
200
204
|
"default": "./fesm2022/taiga-ui-core-directives-items-handlers.mjs"
|
|
@@ -203,42 +207,38 @@
|
|
|
203
207
|
"types": "./directives/number-format/index.d.ts",
|
|
204
208
|
"default": "./fesm2022/taiga-ui-core-directives-number-format.mjs"
|
|
205
209
|
},
|
|
206
|
-
"./directives/icons": {
|
|
207
|
-
"types": "./directives/icons/index.d.ts",
|
|
208
|
-
"default": "./fesm2022/taiga-ui-core-directives-icons.mjs"
|
|
209
|
-
},
|
|
210
210
|
"./pipes/filter-by-input": {
|
|
211
211
|
"types": "./pipes/filter-by-input/index.d.ts",
|
|
212
212
|
"default": "./fesm2022/taiga-ui-core-pipes-filter-by-input.mjs"
|
|
213
213
|
},
|
|
214
|
+
"./pipes/format-number": {
|
|
215
|
+
"types": "./pipes/format-number/index.d.ts",
|
|
216
|
+
"default": "./fesm2022/taiga-ui-core-pipes-format-number.mjs"
|
|
217
|
+
},
|
|
214
218
|
"./portals/alert": {
|
|
215
219
|
"types": "./portals/alert/index.d.ts",
|
|
216
220
|
"default": "./fesm2022/taiga-ui-core-portals-alert.mjs"
|
|
217
221
|
},
|
|
218
|
-
"./portals/dialog": {
|
|
219
|
-
"types": "./portals/dialog/index.d.ts",
|
|
220
|
-
"default": "./fesm2022/taiga-ui-core-portals-dialog.mjs"
|
|
221
|
-
},
|
|
222
222
|
"./portals/close": {
|
|
223
223
|
"types": "./portals/close/index.d.ts",
|
|
224
224
|
"default": "./fesm2022/taiga-ui-core-portals-close.mjs"
|
|
225
225
|
},
|
|
226
|
-
"./
|
|
227
|
-
"types": "./
|
|
228
|
-
"default": "./fesm2022/taiga-ui-core-
|
|
226
|
+
"./portals/dialog": {
|
|
227
|
+
"types": "./portals/dialog/index.d.ts",
|
|
228
|
+
"default": "./fesm2022/taiga-ui-core-portals-dialog.mjs"
|
|
229
229
|
},
|
|
230
230
|
"./portals/dropdown": {
|
|
231
231
|
"types": "./portals/dropdown/index.d.ts",
|
|
232
232
|
"default": "./fesm2022/taiga-ui-core-portals-dropdown.mjs"
|
|
233
233
|
},
|
|
234
|
-
"./portals/modal": {
|
|
235
|
-
"types": "./portals/modal/index.d.ts",
|
|
236
|
-
"default": "./fesm2022/taiga-ui-core-portals-modal.mjs"
|
|
237
|
-
},
|
|
238
234
|
"./portals/hint": {
|
|
239
235
|
"types": "./portals/hint/index.d.ts",
|
|
240
236
|
"default": "./fesm2022/taiga-ui-core-portals-hint.mjs"
|
|
241
237
|
},
|
|
238
|
+
"./portals/modal": {
|
|
239
|
+
"types": "./portals/modal/index.d.ts",
|
|
240
|
+
"default": "./fesm2022/taiga-ui-core-portals-modal.mjs"
|
|
241
|
+
},
|
|
242
242
|
"./portals/popup": {
|
|
243
243
|
"types": "./portals/popup/index.d.ts",
|
|
244
244
|
"default": "./fesm2022/taiga-ui-core-portals-popup.mjs"
|
|
@@ -3,13 +3,16 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export declare class TuiDropdownAnchored implements AfterViewInit {
|
|
4
4
|
private readonly el;
|
|
5
5
|
private readonly directive;
|
|
6
|
-
private readonly
|
|
6
|
+
private readonly rect;
|
|
7
7
|
private readonly viewport;
|
|
8
8
|
private readonly vvs;
|
|
9
9
|
private readonly options;
|
|
10
10
|
private readonly position;
|
|
11
|
+
private readonly accessor;
|
|
11
12
|
private readonly styles$;
|
|
13
|
+
protected readonly anchored: boolean;
|
|
12
14
|
ngAfterViewInit(): void;
|
|
15
|
+
protected retrigger(): void;
|
|
13
16
|
private getStyles;
|
|
14
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDropdownAnchored, never>;
|
|
15
18
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiDropdownAnchored, never, never, {}, {}, never, never, true, never>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ElementRef, type OnDestroy } from '@angular/core';
|
|
2
2
|
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
3
3
|
import { TuiRectAccessor } from '@taiga-ui/core/classes';
|
|
4
4
|
import { TuiDropdownDriver } from './dropdown.driver';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class TuiDropdownContext extends TuiRectAccessor implements ElementRef<HTMLElement>,
|
|
6
|
+
export declare class TuiDropdownContext extends TuiRectAccessor implements ElementRef<HTMLElement>, OnDestroy {
|
|
7
7
|
private readonly isTouch;
|
|
8
8
|
private currentRect;
|
|
9
9
|
protected readonly userSelect: import("@angular/core").Signal<"none" | null>;
|
|
@@ -13,8 +13,7 @@ export declare class TuiDropdownContext extends TuiRectAccessor implements Eleme
|
|
|
13
13
|
protected readonly el: HTMLElement;
|
|
14
14
|
protected readonly sub: import("rxjs").Subscription;
|
|
15
15
|
readonly type = "dropdown";
|
|
16
|
-
readonly nativeElement:
|
|
17
|
-
ngAfterViewInit(): void;
|
|
16
|
+
readonly nativeElement: HTMLElement;
|
|
18
17
|
ngOnDestroy(): void;
|
|
19
18
|
getClientRect(): DOMRect;
|
|
20
19
|
protected onContextMenu(x: number, y: number): void;
|
|
@@ -2,6 +2,7 @@ import { TuiPositionAccessor } from '@taiga-ui/core/classes';
|
|
|
2
2
|
import { type TuiPoint } from '@taiga-ui/core/types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class TuiDropdownPositionSided extends TuiPositionAccessor {
|
|
5
|
+
private readonly anchor;
|
|
5
6
|
private readonly options;
|
|
6
7
|
private readonly viewport;
|
|
7
8
|
private readonly vertical;
|
|
@@ -9,6 +10,7 @@ export declare class TuiDropdownPositionSided extends TuiPositionAccessor {
|
|
|
9
10
|
readonly tuiDropdownSided: import("@angular/core").InputSignal<string | boolean>;
|
|
10
11
|
readonly tuiDropdownSidedOffset: import("@angular/core").InputSignal<number>;
|
|
11
12
|
readonly type = "dropdown";
|
|
13
|
+
position(element: HTMLElement): void;
|
|
12
14
|
getPosition(rect: DOMRect): TuiPoint;
|
|
13
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDropdownPositionSided, never>;
|
|
14
16
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiDropdownPositionSided, "[tuiDropdownSided]", never, { "tuiDropdownSided": { "alias": "tuiDropdownSided"; "required": false; "isSignal": true; }; "tuiDropdownSidedOffset": { "alias": "tuiDropdownSidedOffset"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -7,11 +7,13 @@ export declare class TuiDropdownPosition extends TuiPositionAccessor {
|
|
|
7
7
|
private readonly el;
|
|
8
8
|
private readonly options;
|
|
9
9
|
private readonly viewport;
|
|
10
|
+
private readonly anchor;
|
|
10
11
|
private previous?;
|
|
11
12
|
readonly direction: Subject<TuiVerticalDirection>;
|
|
12
13
|
readonly type = "dropdown";
|
|
13
14
|
readonly accessor: TuiRectAccessor;
|
|
14
15
|
readonly tuiDropdownDirectionChange: import("@angular/core").OutputRef<TuiVerticalDirection>;
|
|
16
|
+
position(element: HTMLElement): void;
|
|
15
17
|
getPosition({ width, height }: DOMRect): TuiPoint;
|
|
16
18
|
getAlign(align: TuiDropdownAlign): 'center' | 'left' | 'right';
|
|
17
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDropdownPosition, never>;
|
|
@@ -13,7 +13,7 @@ export declare class TuiDropdownSelection extends TuiDriver implements ElementRe
|
|
|
13
13
|
protected readonly stream$: import("rxjs").Observable<boolean>;
|
|
14
14
|
protected range: Range;
|
|
15
15
|
readonly type = "dropdown";
|
|
16
|
-
readonly nativeElement:
|
|
16
|
+
readonly nativeElement: HTMLElement;
|
|
17
17
|
readonly tuiDropdownSelection: import("@angular/core").InputSignal<string | TuiBooleanHandler<Range>>;
|
|
18
18
|
readonly tuiDropdownSelectionPosition: import("@angular/core").InputSignal<"selection" | "tag" | "word">;
|
|
19
19
|
constructor();
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
+
import { InjectionToken, type OnDestroy, type Type } from '@angular/core';
|
|
2
|
+
import { TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
|
|
1
3
|
import { TuiDropdownDirective } from './dropdown.directive';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
3
5
|
import * as i1 from "@taiga-ui/cdk/directives/active-zone";
|
|
4
6
|
import * as i2 from "@taiga-ui/cdk/directives/animated";
|
|
5
7
|
import * as i3 from "./dropdown-anchored.directive";
|
|
8
|
+
export declare const TUI_DROPDOWN_COMPONENT: InjectionToken<Type<any>>;
|
|
6
9
|
/**
|
|
7
|
-
*
|
|
8
|
-
* This component is used to show template in a portal
|
|
9
|
-
* using default style of white rounded box with a shadow
|
|
10
|
+
* TODO: Remove extends TuiScrollbar in v6 when TuiScrollable is dropped
|
|
10
11
|
*/
|
|
11
|
-
export declare class TuiDropdownComponent {
|
|
12
|
+
export declare class TuiDropdownComponent extends TuiScrollbar implements OnDestroy {
|
|
13
|
+
private readonly anchor;
|
|
14
|
+
private readonly position;
|
|
15
|
+
private readonly darkMode;
|
|
12
16
|
protected readonly options: import("./dropdown-options.directive").TuiDropdownOptions;
|
|
13
17
|
protected readonly directive: TuiDropdownDirective;
|
|
14
|
-
protected readonly context: Record<any, any> | null;
|
|
15
|
-
protected readonly darkMode: import("@angular/core").WritableSignal<boolean> & {
|
|
16
|
-
reset(): void;
|
|
17
|
-
};
|
|
18
18
|
protected readonly theme: import("@angular/core").Signal<string | null | undefined>;
|
|
19
|
+
ngOnDestroy(): void;
|
|
19
20
|
protected readonly close: () => void;
|
|
21
|
+
protected onResize({ target, contentRect }: ResizeObserverEntry): void;
|
|
20
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDropdownComponent, never>;
|
|
21
23
|
static ɵcmp: i0.ɵɵComponentDeclaration<TuiDropdownComponent, "tui-dropdown", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiActiveZone; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiAnimated; inputs: {}; outputs: {}; }, { directive: typeof i3.TuiDropdownAnchored; inputs: {}; outputs: {}; }]>;
|
|
22
24
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type ElementRef, InjectionToken
|
|
1
|
+
import { type ElementRef, InjectionToken } from '@angular/core';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* @deprecated: remove in v6
|
|
4
4
|
*/
|
|
5
|
-
export declare const TUI_DROPDOWN_COMPONENT: InjectionToken<Type<any>>;
|
|
6
5
|
export declare const TUI_DROPDOWN_CONTEXT: InjectionToken<Record<any, any>>;
|
|
7
6
|
export declare const TUI_DROPDOWN_HOST: InjectionToken<ElementRef<Element>>;
|
|
8
7
|
export declare const TUI_DROPDOWN_ANCHOR: InjectionToken<ElementRef<HTMLElement>>;
|
|
@@ -3,10 +3,8 @@ import { type TuiRectAccessor } from '@taiga-ui/core/classes';
|
|
|
3
3
|
import { TuiHintHover } from './hint-hover.directive';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class TuiHintPointer extends TuiHintHover implements TuiRectAccessor, ElementRef<HTMLElement>, OnDestroy {
|
|
6
|
-
private readonly doc;
|
|
7
6
|
private currentRect;
|
|
8
|
-
readonly nativeElement:
|
|
9
|
-
constructor();
|
|
7
|
+
readonly nativeElement: HTMLElement;
|
|
10
8
|
ngOnDestroy(): void;
|
|
11
9
|
getClientRect(): DOMRect;
|
|
12
10
|
protected onMove({ clientX, clientY }: MouseEvent): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function tuiAnchorDelegate(styles?: Partial<CSSStyleDeclaration>): HTMLElement;
|
package/utils/dom/index.d.ts
CHANGED