@taiga-ui/core 3.17.0 → 3.18.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-core-abstract.umd.js +1 -0
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +189 -167
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +2 -2
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +100 -20
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +31 -13
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +45 -25
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +67 -63
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +39 -1
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/components/dialog/dialog-close.service.d.ts +15 -0
- package/components/dialog/dialog.component.d.ts +5 -4
- package/components/dialog/dialog.tokens.d.ts +2 -0
- package/components/dialog/index.d.ts +1 -1
- package/components/notification/notification.component.d.ts +2 -2
- package/components/svg/deprecated-icons.d.ts +1 -0
- package/components/svg/index.d.ts +2 -0
- package/components/svg/svg-options.d.ts +14 -0
- package/components/svg/svg.component.d.ts +5 -7
- package/components/tooltip/tooltip.component.d.ts +2 -2
- package/components/tooltip/tooltip.module.d.ts +5 -4
- package/directives/dropdown/dropdown-hover-options.directive.d.ts +9 -0
- package/directives/dropdown/dropdown-hover.directive.d.ts +3 -1
- package/directives/dropdown/dropdown-position-sided.directive.d.ts +2 -2
- package/directives/dropdown/dropdown-position.directive.d.ts +2 -2
- package/directives/dropdown/index.d.ts +1 -0
- package/directives/hint/hint-hover.directive.d.ts +4 -2
- package/directives/hint/hint-position.directive.d.ts +2 -2
- package/esm2015/abstract/rect-accessor.js +2 -1
- package/esm2015/components/dialog/dialog-close.service.js +51 -0
- package/esm2015/components/dialog/dialog.component.js +26 -10
- package/esm2015/components/dialog/dialog.tokens.js +5 -1
- package/esm2015/components/dialog/index.js +2 -2
- package/esm2015/components/notification/notification.component.js +3 -3
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +2 -2
- package/esm2015/components/root/root.component.js +1 -1
- package/esm2015/components/svg/deprecated-icons.js +59 -0
- package/esm2015/components/svg/index.js +3 -1
- package/esm2015/components/svg/svg-options.js +29 -0
- package/esm2015/components/svg/svg.component.js +13 -18
- package/esm2015/components/tooltip/tooltip.component.js +13 -13
- package/esm2015/components/tooltip/tooltip.module.js +21 -4
- package/esm2015/directives/dropdown/dropdown-hover-options.directive.js +14 -0
- package/esm2015/directives/dropdown/dropdown-hover.directive.js +10 -5
- package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +12 -12
- package/esm2015/directives/dropdown/dropdown-position.directive.js +11 -11
- package/esm2015/directives/dropdown/index.js +2 -1
- package/esm2015/directives/hint/hint-hover.directive.js +13 -10
- package/esm2015/directives/hint/hint-options.directive.js +2 -2
- package/esm2015/directives/hint/hint-position.directive.js +12 -11
- package/esm2015/directives/hint/hint.component.js +3 -2
- package/esm2015/interfaces/dialog-options.js +1 -1
- package/esm2015/tokens/icon-place.js +5 -2
- package/esm2015/tokens/icons-path.js +4 -1
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/tokens/svg-content-processor.js +4 -1
- package/esm2015/tokens/svg-src-processor.js +4 -1
- package/esm2015/tokens/viewport.js +26 -0
- package/fesm2015/taiga-ui-core-abstract.js +1 -0
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +85 -69
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +2 -2
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +98 -21
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +32 -15
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +42 -25
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +30 -27
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +38 -2
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/interfaces/dialog-options.d.ts +4 -3
- package/package.json +4 -4
- package/styles/mixins/textfield.less +4 -22
- package/styles/mixins/textfield.scss +3 -22
- package/styles/theme/wrapper/icon.less +17 -27
- package/tokens/icon-place.d.ts +3 -0
- package/tokens/icons-path.d.ts +3 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/svg-content-processor.d.ts +3 -0
- package/tokens/svg-src-processor.d.ts +3 -0
- package/tokens/viewport.d.ts +4 -0
- package/components/dialog/dialog.providers.d.ts +0 -5
- package/esm2015/components/dialog/dialog.providers.js +0 -51
|
@@ -452,17 +452,31 @@
|
|
|
452
452
|
args: ['tuiDropdown']
|
|
453
453
|
}], position: [] } });
|
|
454
454
|
|
|
455
|
+
/** Default values for hint options */
|
|
456
|
+
var TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = {
|
|
457
|
+
showDelay: 200,
|
|
458
|
+
hideDelay: 500,
|
|
459
|
+
};
|
|
460
|
+
var TUI_DROPDOWN_HOVER_OPTIONS = new i0.InjectionToken('[TUI_DROPDOWN_HOVER_OPTIONS] Default parameters for dropdown hover directive', {
|
|
461
|
+
factory: function () { return TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS; },
|
|
462
|
+
});
|
|
463
|
+
var tuiDropdownHoverOptionsProvider = function (options) { return ({
|
|
464
|
+
provide: TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS,
|
|
465
|
+
useValue: Object.assign(Object.assign({}, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS), options),
|
|
466
|
+
}); };
|
|
467
|
+
|
|
455
468
|
var TuiDropdownHoverDirective = /** @class */ (function (_super) {
|
|
456
469
|
__extends(TuiDropdownHoverDirective, _super);
|
|
457
|
-
function TuiDropdownHoverDirective(hovered
|
|
470
|
+
function TuiDropdownHoverDirective(hovered$, options) {
|
|
458
471
|
var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
|
|
459
472
|
_this.hovered$ = hovered$;
|
|
473
|
+
_this.options = options;
|
|
460
474
|
_this.toggle$ = new i5.Subject();
|
|
461
475
|
_this.stream$ = i5.merge(_this.toggle$, _this.hovered$).pipe(operators.switchMap(function (visible) { return i5.of(visible).pipe(operators.delay(visible ? _this.showDelay : _this.hideDelay)); }), operators.tap(function (visible) {
|
|
462
476
|
_this.hovered = visible;
|
|
463
477
|
}), operators.share());
|
|
464
|
-
_this.showDelay =
|
|
465
|
-
_this.hideDelay =
|
|
478
|
+
_this.showDelay = _this.options.showDelay;
|
|
479
|
+
_this.hideDelay = _this.options.hideDelay;
|
|
466
480
|
_this.hovered = false;
|
|
467
481
|
return _this;
|
|
468
482
|
}
|
|
@@ -471,7 +485,7 @@
|
|
|
471
485
|
};
|
|
472
486
|
return TuiDropdownHoverDirective;
|
|
473
487
|
}(i1$1.TuiDriver));
|
|
474
|
-
TuiDropdownHoverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownHoverDirective, deps: [{ token: i2.TuiHoveredService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
488
|
+
TuiDropdownHoverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownHoverDirective, deps: [{ token: i2.TuiHoveredService }, { token: TUI_DROPDOWN_HOVER_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
475
489
|
TuiDropdownHoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownHoverDirective, selector: "[tuiDropdownHover]:not(ng-container)", inputs: { showDelay: ["tuiDropdownShowDelay", "showDelay"], hideDelay: ["tuiDropdownHideDelay", "hideDelay"] }, providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService], usesInheritance: true, ngImport: i0__namespace });
|
|
476
490
|
__decorate([
|
|
477
491
|
i2.tuiDefaultProp()
|
|
@@ -489,6 +503,9 @@
|
|
|
489
503
|
return [{ type: i5__namespace.Observable, decorators: [{
|
|
490
504
|
type: i0.Inject,
|
|
491
505
|
args: [i2.TuiHoveredService]
|
|
506
|
+
}] }, { type: undefined, decorators: [{
|
|
507
|
+
type: i0.Inject,
|
|
508
|
+
args: [TUI_DROPDOWN_HOVER_OPTIONS]
|
|
492
509
|
}] }];
|
|
493
510
|
}, propDecorators: { showDelay: [{
|
|
494
511
|
type: i0.Input,
|
|
@@ -861,27 +878,27 @@
|
|
|
861
878
|
}] } });
|
|
862
879
|
|
|
863
880
|
var TuiDropdownPositionDirective = /** @class */ (function () {
|
|
864
|
-
function TuiDropdownPositionDirective(options,
|
|
881
|
+
function TuiDropdownPositionDirective(options, viewport, accessor) {
|
|
865
882
|
this.options = options;
|
|
866
|
-
this.
|
|
883
|
+
this.viewport = viewport;
|
|
867
884
|
this.accessor = accessor;
|
|
868
885
|
}
|
|
869
886
|
TuiDropdownPositionDirective.prototype.getPosition = function (_a) {
|
|
870
887
|
var width = _a.width, height = _a.height;
|
|
871
888
|
var hostRect = this.accessor.getClientRect();
|
|
872
|
-
var
|
|
873
|
-
var
|
|
889
|
+
var viewport = this.viewport.getClientRect();
|
|
890
|
+
var _b = this.options, minHeight = _b.minHeight, align = _b.align, direction = _b.direction, offset = _b.offset;
|
|
874
891
|
var previous = this.previous || direction || 'bottom';
|
|
875
892
|
var right = Math.max(hostRect.right - width, offset);
|
|
876
893
|
var available = {
|
|
877
|
-
top: hostRect.top - 2 * offset,
|
|
878
|
-
bottom:
|
|
894
|
+
top: hostRect.top - 2 * offset - viewport.top,
|
|
895
|
+
bottom: viewport.bottom - hostRect.bottom - 2 * offset,
|
|
879
896
|
};
|
|
880
897
|
var position = {
|
|
881
898
|
top: hostRect.top - offset - height,
|
|
882
899
|
bottom: hostRect.bottom + offset,
|
|
883
900
|
right: right,
|
|
884
|
-
left: hostRect.left + width <
|
|
901
|
+
left: hostRect.left + width < viewport.right - offset ? hostRect.left : right,
|
|
885
902
|
};
|
|
886
903
|
var better = available.top > available.bottom ? 'top' : 'bottom';
|
|
887
904
|
if ((available[previous] > minHeight && direction) ||
|
|
@@ -893,7 +910,7 @@
|
|
|
893
910
|
};
|
|
894
911
|
return TuiDropdownPositionDirective;
|
|
895
912
|
}());
|
|
896
|
-
TuiDropdownPositionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownPositionDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token:
|
|
913
|
+
TuiDropdownPositionDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownPositionDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: i1$1.TuiRectAccessor }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
897
914
|
TuiDropdownPositionDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])", providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)], ngImport: i0__namespace });
|
|
898
915
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownPositionDirective, decorators: [{
|
|
899
916
|
type: i0.Directive,
|
|
@@ -905,9 +922,9 @@
|
|
|
905
922
|
return [{ type: undefined, decorators: [{
|
|
906
923
|
type: i0.Inject,
|
|
907
924
|
args: [TUI_DROPDOWN_OPTIONS]
|
|
908
|
-
}] }, { type:
|
|
925
|
+
}] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
|
|
909
926
|
type: i0.Inject,
|
|
910
|
-
args: [
|
|
927
|
+
args: [tokens.TUI_VIEWPORT]
|
|
911
928
|
}] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
|
|
912
929
|
type: i0.Inject,
|
|
913
930
|
args: [i1$1.TuiRectAccessor]
|
|
@@ -915,9 +932,9 @@
|
|
|
915
932
|
} });
|
|
916
933
|
|
|
917
934
|
var TuiDropdownPositionSidedDirective = /** @class */ (function () {
|
|
918
|
-
function TuiDropdownPositionSidedDirective(options,
|
|
935
|
+
function TuiDropdownPositionSidedDirective(options, viewport, accessor, vertical) {
|
|
919
936
|
this.options = options;
|
|
920
|
-
this.
|
|
937
|
+
this.viewport = viewport;
|
|
921
938
|
this.accessor = accessor;
|
|
922
939
|
this.vertical = vertical;
|
|
923
940
|
this.previous = this.options.direction || 'bottom';
|
|
@@ -930,13 +947,13 @@
|
|
|
930
947
|
}
|
|
931
948
|
var height = rect.height, width = rect.width;
|
|
932
949
|
var hostRect = this.accessor.getClientRect();
|
|
933
|
-
var
|
|
934
|
-
var
|
|
950
|
+
var viewport = this.viewport.getClientRect();
|
|
951
|
+
var _a = this.options, align = _a.align, direction = _a.direction, minHeight = _a.minHeight, offset = _a.offset;
|
|
935
952
|
var available = {
|
|
936
|
-
top: hostRect.bottom,
|
|
937
|
-
left: hostRect.left - offset,
|
|
938
|
-
right:
|
|
939
|
-
bottom:
|
|
953
|
+
top: hostRect.bottom - viewport.top,
|
|
954
|
+
left: hostRect.left - offset - viewport.left,
|
|
955
|
+
right: viewport.right - hostRect.right - offset,
|
|
956
|
+
bottom: viewport.bottom - hostRect.top,
|
|
940
957
|
};
|
|
941
958
|
var position = {
|
|
942
959
|
top: hostRect.bottom - height + this.tuiDropdownSidedOffset + 1,
|
|
@@ -956,7 +973,7 @@
|
|
|
956
973
|
};
|
|
957
974
|
return TuiDropdownPositionSidedDirective;
|
|
958
975
|
}());
|
|
959
|
-
TuiDropdownPositionSidedDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token:
|
|
976
|
+
TuiDropdownPositionSidedDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: tokens.TUI_VIEWPORT }, { token: i1$1.TuiRectAccessor }, { token: TuiDropdownPositionDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
960
977
|
TuiDropdownPositionSidedDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownPositionSidedDirective, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: "tuiDropdownSided", tuiDropdownSidedOffset: "tuiDropdownSidedOffset" }, providers: [
|
|
961
978
|
TuiDropdownPositionDirective,
|
|
962
979
|
i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
|
|
@@ -974,9 +991,9 @@
|
|
|
974
991
|
return [{ type: undefined, decorators: [{
|
|
975
992
|
type: i0.Inject,
|
|
976
993
|
args: [TUI_DROPDOWN_OPTIONS]
|
|
977
|
-
}] }, { type:
|
|
994
|
+
}] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
|
|
978
995
|
type: i0.Inject,
|
|
979
|
-
args: [
|
|
996
|
+
args: [tokens.TUI_VIEWPORT]
|
|
980
997
|
}] }, { type: i1__namespace$2.TuiRectAccessor, decorators: [{
|
|
981
998
|
type: i0.Inject,
|
|
982
999
|
args: [i1$1.TuiRectAccessor]
|
|
@@ -1240,6 +1257,8 @@
|
|
|
1240
1257
|
|
|
1241
1258
|
exports.TUI_DROPDOWN_COMPONENT = TUI_DROPDOWN_COMPONENT;
|
|
1242
1259
|
exports.TUI_DROPDOWN_DEFAULT_OPTIONS = TUI_DROPDOWN_DEFAULT_OPTIONS;
|
|
1260
|
+
exports.TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS;
|
|
1261
|
+
exports.TUI_DROPDOWN_HOVER_OPTIONS = TUI_DROPDOWN_HOVER_OPTIONS;
|
|
1243
1262
|
exports.TUI_DROPDOWN_OPTIONS = TUI_DROPDOWN_OPTIONS;
|
|
1244
1263
|
exports.TuiDropdownComponent = TuiDropdownComponent;
|
|
1245
1264
|
exports.TuiDropdownContextDirective = TuiDropdownContextDirective;
|
|
@@ -1253,6 +1272,7 @@
|
|
|
1253
1272
|
exports.TuiDropdownPositionDirective = TuiDropdownPositionDirective;
|
|
1254
1273
|
exports.TuiDropdownPositionSidedDirective = TuiDropdownPositionSidedDirective;
|
|
1255
1274
|
exports.TuiDropdownSelectionDirective = TuiDropdownSelectionDirective;
|
|
1275
|
+
exports.tuiDropdownHoverOptionsProvider = tuiDropdownHoverOptionsProvider;
|
|
1256
1276
|
exports.tuiDropdownOptionsProvider = tuiDropdownOptionsProvider;
|
|
1257
1277
|
|
|
1258
1278
|
Object.defineProperty(exports, '__esModule', { value: true });
|