@taiga-ui/core 3.14.0 → 3.15.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.
Files changed (218) hide show
  1. package/bundles/taiga-ui-core-components-alert.umd.js +11 -11
  2. package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
  3. package/bundles/taiga-ui-core-components-button.umd.js +16 -16
  4. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  5. package/bundles/taiga-ui-core-components-calendar.umd.js +23 -10
  6. package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
  7. package/bundles/taiga-ui-core-components-data-list.umd.js +34 -37
  8. package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-dialog.umd.js +16 -16
  10. package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-error.umd.js +5 -5
  12. package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
  13. package/bundles/taiga-ui-core-components-expand.umd.js +17 -18
  14. package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-group.umd.js +17 -17
  16. package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-hints-host.umd.js +4 -4
  18. package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +13 -13
  20. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
  21. package/bundles/taiga-ui-core-components-label.umd.js +6 -6
  22. package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
  23. package/bundles/taiga-ui-core-components-link.umd.js +14 -14
  24. package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
  25. package/bundles/taiga-ui-core-components-loader.umd.js +5 -5
  26. package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
  27. package/bundles/taiga-ui-core-components-notification.umd.js +10 -10
  28. package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
  29. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +5 -5
  30. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
  31. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +5 -5
  32. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
  33. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +5 -5
  34. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
  35. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +58 -58
  36. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  37. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +4 -4
  38. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
  39. package/bundles/taiga-ui-core-components-root.umd.js +7 -7
  40. package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
  41. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +28 -28
  42. package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
  43. package/bundles/taiga-ui-core-components-scrollbar.umd.js +10 -10
  44. package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
  45. package/bundles/taiga-ui-core-components-svg.umd.js +18 -18
  46. package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
  47. package/bundles/taiga-ui-core-components-theme-night.umd.js +4 -4
  48. package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
  49. package/bundles/taiga-ui-core-components-tooltip.umd.js +9 -9
  50. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  51. package/bundles/taiga-ui-core-directives-dropdown.umd.js +94 -91
  52. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  53. package/bundles/taiga-ui-core-directives-hint.umd.js +61 -61
  54. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  55. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +1 -1
  56. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
  57. package/bundles/taiga-ui-core-directives-mode.umd.js +2 -2
  58. package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
  59. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +1 -1
  60. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
  61. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +34 -34
  62. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
  63. package/bundles/taiga-ui-core-directives-wrapper.umd.js +9 -9
  64. package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
  65. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +3 -3
  66. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
  67. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +3 -3
  68. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
  69. package/components/calendar/calendar.component.d.ts +4 -2
  70. package/components/expand/expand.component.d.ts +1 -1
  71. package/directives/dropdown/dropdown-context.directive.d.ts +4 -4
  72. package/directives/dropdown/dropdown-options.directive.d.ts +3 -5
  73. package/directives/dropdown/dropdown-position-sided.directive.d.ts +2 -1
  74. package/directives/dropdown/dropdown.directive.d.ts +1 -1
  75. package/esm2015/components/alert/alert.component.js +12 -12
  76. package/esm2015/components/button/button.component.js +17 -17
  77. package/esm2015/components/calendar/calendar.component.js +21 -12
  78. package/esm2015/components/data-list/data-list.component.js +17 -17
  79. package/esm2015/components/data-list/data-list.directive.js +2 -2
  80. package/esm2015/components/data-list/opt-group.directive.js +5 -5
  81. package/esm2015/components/data-list/option/option.component.js +14 -17
  82. package/esm2015/components/dialog/dialog.component.js +14 -14
  83. package/esm2015/components/dialog/dialog.directive.js +4 -4
  84. package/esm2015/components/error/error.component.js +6 -6
  85. package/esm2015/components/expand/expand-content.directive.js +2 -2
  86. package/esm2015/components/expand/expand.component.js +17 -19
  87. package/esm2015/components/group/group-styles.component.js +4 -4
  88. package/esm2015/components/group/group.directive.js +15 -15
  89. package/esm2015/components/hints-host/hints-host.component.js +5 -5
  90. package/esm2015/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
  91. package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +13 -13
  92. package/esm2015/components/label/label.component.js +7 -7
  93. package/esm2015/components/link/link.component.js +15 -15
  94. package/esm2015/components/loader/loader.component.js +6 -6
  95. package/esm2015/components/notification/notification.component.js +11 -11
  96. package/esm2015/components/primitive-calendar/primitive-calendar.component.js +6 -6
  97. package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +6 -6
  98. package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +6 -6
  99. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +32 -32
  100. package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +2 -2
  101. package/esm2015/components/primitive-textfield/textfield/textfield.component.js +13 -13
  102. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +15 -15
  103. package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +5 -5
  104. package/esm2015/components/root/root.component.js +8 -8
  105. package/esm2015/components/scroll-controls/scroll-controls.component.js +6 -6
  106. package/esm2015/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
  107. package/esm2015/components/scroll-controls/scrollbar.directive.js +23 -23
  108. package/esm2015/components/scrollbar/scroll-ref.directive.js +2 -2
  109. package/esm2015/components/scrollbar/scrollable.directive.js +2 -2
  110. package/esm2015/components/scrollbar/scrollbar.component.js +9 -9
  111. package/esm2015/components/svg/svg.component.js +19 -19
  112. package/esm2015/components/theme-night/theme-night.component.js +5 -5
  113. package/esm2015/components/tooltip/tooltip.component.js +10 -10
  114. package/esm2015/directives/dropdown/dropdown-context.directive.js +16 -16
  115. package/esm2015/directives/dropdown/dropdown-driver.directive.js +2 -2
  116. package/esm2015/directives/dropdown/dropdown-host.directive.js +2 -2
  117. package/esm2015/directives/dropdown/dropdown-hover.directive.js +4 -4
  118. package/esm2015/directives/dropdown/dropdown-manual.directive.js +2 -2
  119. package/esm2015/directives/dropdown/dropdown-options.directive.js +19 -15
  120. package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +17 -14
  121. package/esm2015/directives/dropdown/dropdown-position.directive.js +12 -14
  122. package/esm2015/directives/dropdown/dropdown-selection.directive.js +11 -11
  123. package/esm2015/directives/dropdown/dropdown.component.js +18 -20
  124. package/esm2015/directives/dropdown/dropdown.directive.js +7 -7
  125. package/esm2015/directives/hint/hint-describe.directive.js +5 -5
  126. package/esm2015/directives/hint/hint-driver.directive.js +2 -2
  127. package/esm2015/directives/hint/hint-host.directive.js +2 -2
  128. package/esm2015/directives/hint/hint-hover.directive.js +5 -5
  129. package/esm2015/directives/hint/hint-manual.directive.js +2 -2
  130. package/esm2015/directives/hint/hint-options.directive.js +12 -12
  131. package/esm2015/directives/hint/hint-pointer.directive.js +3 -3
  132. package/esm2015/directives/hint/hint-position.directive.js +25 -25
  133. package/esm2015/directives/hint/hint.component.js +10 -10
  134. package/esm2015/directives/hint/hint.directive.js +5 -5
  135. package/esm2015/directives/mask-accessor/mask-accessor.directive.js +2 -2
  136. package/esm2015/directives/mode/mode.directive.js +3 -3
  137. package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
  138. package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
  139. package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
  140. package/esm2015/directives/textfield-controller/textfield-filler.directive.js +5 -5
  141. package/esm2015/directives/textfield-controller/textfield-icon-left.directive.js +5 -5
  142. package/esm2015/directives/textfield-controller/textfield-icon.directive.js +5 -5
  143. package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
  144. package/esm2015/directives/textfield-controller/textfield-postfix.directive.js +5 -5
  145. package/esm2015/directives/textfield-controller/textfield-prefix.directive.js +5 -5
  146. package/esm2015/directives/textfield-controller/textfield-size.directive.js +5 -5
  147. package/esm2015/directives/wrapper/wrapper.directive.js +10 -10
  148. package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +4 -4
  149. package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +4 -4
  150. package/fesm2015/taiga-ui-core-components-alert.js +11 -11
  151. package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
  152. package/fesm2015/taiga-ui-core-components-button.js +16 -16
  153. package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
  154. package/fesm2015/taiga-ui-core-components-calendar.js +20 -11
  155. package/fesm2015/taiga-ui-core-components-calendar.js.map +1 -1
  156. package/fesm2015/taiga-ui-core-components-data-list.js +34 -37
  157. package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
  158. package/fesm2015/taiga-ui-core-components-dialog.js +16 -16
  159. package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
  160. package/fesm2015/taiga-ui-core-components-error.js +5 -5
  161. package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
  162. package/fesm2015/taiga-ui-core-components-expand.js +17 -19
  163. package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
  164. package/fesm2015/taiga-ui-core-components-group.js +17 -17
  165. package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
  166. package/fesm2015/taiga-ui-core-components-hints-host.js +4 -4
  167. package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
  168. package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +13 -13
  169. package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
  170. package/fesm2015/taiga-ui-core-components-label.js +6 -6
  171. package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
  172. package/fesm2015/taiga-ui-core-components-link.js +14 -14
  173. package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
  174. package/fesm2015/taiga-ui-core-components-loader.js +5 -5
  175. package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
  176. package/fesm2015/taiga-ui-core-components-notification.js +10 -10
  177. package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
  178. package/fesm2015/taiga-ui-core-components-primitive-calendar.js +5 -5
  179. package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
  180. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +5 -5
  181. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  182. package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +5 -5
  183. package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
  184. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +59 -59
  185. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  186. package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +4 -4
  187. package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
  188. package/fesm2015/taiga-ui-core-components-root.js +7 -7
  189. package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
  190. package/fesm2015/taiga-ui-core-components-scroll-controls.js +28 -28
  191. package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
  192. package/fesm2015/taiga-ui-core-components-scrollbar.js +10 -10
  193. package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
  194. package/fesm2015/taiga-ui-core-components-svg.js +18 -18
  195. package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
  196. package/fesm2015/taiga-ui-core-components-theme-night.js +4 -4
  197. package/fesm2015/taiga-ui-core-components-theme-night.js.map +1 -1
  198. package/fesm2015/taiga-ui-core-components-tooltip.js +9 -9
  199. package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
  200. package/fesm2015/taiga-ui-core-directives-dropdown.js +96 -92
  201. package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
  202. package/fesm2015/taiga-ui-core-directives-hint.js +61 -61
  203. package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
  204. package/fesm2015/taiga-ui-core-directives-mask-accessor.js +1 -1
  205. package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
  206. package/fesm2015/taiga-ui-core-directives-mode.js +2 -2
  207. package/fesm2015/taiga-ui-core-directives-mode.js.map +1 -1
  208. package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +1 -1
  209. package/fesm2015/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
  210. package/fesm2015/taiga-ui-core-directives-textfield-controller.js +34 -34
  211. package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
  212. package/fesm2015/taiga-ui-core-directives-wrapper.js +9 -9
  213. package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
  214. package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +3 -3
  215. package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
  216. package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +3 -3
  217. package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
  218. package/package.json +6 -6
@@ -366,14 +366,14 @@
366
366
  this.elementRef = elementRef;
367
367
  this.component = component;
368
368
  this.dropdownService = dropdownService;
369
- this.content = "";
369
+ this.content = '';
370
370
  this.dropdownBoxRef = null;
371
371
  }
372
372
  Object.defineProperty(TuiDropdownDirective.prototype, "position", {
373
373
  get: function () {
374
374
  return utils.tuiCheckFixedPosition(this.elementRef.nativeElement)
375
- ? "fixed"
376
- : "absolute";
375
+ ? 'fixed'
376
+ : 'absolute';
377
377
  },
378
378
  enumerable: false,
379
379
  configurable: true
@@ -424,8 +424,8 @@
424
424
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownDirective, decorators: [{
425
425
  type: i0.Directive,
426
426
  args: [{
427
- selector: "[tuiDropdown]:not(ng-container)",
428
- exportAs: "tuiDropdown",
427
+ selector: '[tuiDropdown]:not(ng-container)',
428
+ exportAs: 'tuiDropdown',
429
429
  providers: [
430
430
  i1$1.tuiAsRectAccessor(TuiDropdownDirective),
431
431
  i1$1.tuiAsVehicle(TuiDropdownDirective),
@@ -449,7 +449,7 @@
449
449
  }] }];
450
450
  }, propDecorators: { content: [{
451
451
  type: i0.Input,
452
- args: ["tuiDropdown"]
452
+ args: ['tuiDropdown']
453
453
  }], position: [] } });
454
454
 
455
455
  var TuiDropdownHoverDirective = /** @class */ (function (_super) {
@@ -479,7 +479,7 @@
479
479
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownHoverDirective, decorators: [{
480
480
  type: i0.Directive,
481
481
  args: [{
482
- selector: "[tuiDropdownHover]:not(ng-container)",
482
+ selector: '[tuiDropdownHover]:not(ng-container)',
483
483
  providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService],
484
484
  }]
485
485
  }], ctorParameters: function () {
@@ -489,25 +489,22 @@
489
489
  }] }];
490
490
  }, propDecorators: { showDelay: [{
491
491
  type: i0.Input,
492
- args: ["tuiDropdownShowDelay"]
492
+ args: ['tuiDropdownShowDelay']
493
493
  }], hideDelay: [{
494
494
  type: i0.Input,
495
- args: ["tuiDropdownHideDelay"]
495
+ args: ['tuiDropdownHideDelay']
496
496
  }] } });
497
497
 
498
- /**
499
- * Safe space around host and screen edges
500
- */
501
- var TUI_DROPDOWN_OFFSET = 4;
502
498
  /** Default values for dropdown options */
503
499
  var TUI_DROPDOWN_DEFAULT_OPTIONS = {
504
- align: "left",
500
+ align: 'left',
505
501
  direction: null,
506
- limitWidth: "auto",
502
+ limitWidth: 'auto',
507
503
  maxHeight: 400,
508
504
  minHeight: 80,
505
+ offset: 4,
509
506
  };
510
- var TUI_DROPDOWN_OPTIONS = new i0.InjectionToken("[TUI_DROPDOWN_OPTIONS] Default parameters for dropdown directive", {
507
+ var TUI_DROPDOWN_OPTIONS = new i0.InjectionToken('[TUI_DROPDOWN_OPTIONS] Default parameters for dropdown directive', {
511
508
  factory: function () { return TUI_DROPDOWN_DEFAULT_OPTIONS; },
512
509
  });
513
510
  var tuiDropdownOptionsProvider = function (override) { return ({
@@ -526,11 +523,12 @@
526
523
  this.limitWidth = this.options.limitWidth;
527
524
  this.minHeight = this.options.minHeight;
528
525
  this.maxHeight = this.options.maxHeight;
526
+ this.offset = this.options.offset;
529
527
  }
530
528
  return TuiDropdownOptionsDirective;
531
529
  }());
532
530
  TuiDropdownOptionsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownOptionsDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS, skipSelf: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
533
- TuiDropdownOptionsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight]", inputs: { align: ["tuiDropdownAlign", "align"], direction: ["tuiDropdownDirection", "direction"], limitWidth: ["tuiDropdownLimitWidth", "limitWidth"], minHeight: ["tuiDropdownMinHeight", "minHeight"], maxHeight: ["tuiDropdownMaxHeight", "maxHeight"] }, providers: [
531
+ TuiDropdownOptionsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: { align: ["tuiDropdownAlign", "align"], direction: ["tuiDropdownDirection", "direction"], limitWidth: ["tuiDropdownLimitWidth", "limitWidth"], minHeight: ["tuiDropdownMinHeight", "minHeight"], maxHeight: ["tuiDropdownMaxHeight", "maxHeight"], offset: ["tuiDropdownOffset", "offset"] }, providers: [
534
532
  {
535
533
  provide: TUI_DROPDOWN_OPTIONS,
536
534
  useExisting: i0.forwardRef(function () { return TuiDropdownOptionsDirective; }),
@@ -551,10 +549,13 @@
551
549
  __decorate([
552
550
  i2.tuiDefaultProp()
553
551
  ], TuiDropdownOptionsDirective.prototype, "maxHeight", void 0);
552
+ __decorate([
553
+ i2.tuiDefaultProp()
554
+ ], TuiDropdownOptionsDirective.prototype, "offset", void 0);
554
555
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownOptionsDirective, decorators: [{
555
556
  type: i0.Directive,
556
557
  args: [{
557
- selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight]",
558
+ selector: '[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]',
558
559
  providers: [
559
560
  {
560
561
  provide: TUI_DROPDOWN_OPTIONS,
@@ -571,19 +572,22 @@
571
572
  }] }];
572
573
  }, propDecorators: { align: [{
573
574
  type: i0.Input,
574
- args: ["tuiDropdownAlign"]
575
+ args: ['tuiDropdownAlign']
575
576
  }], direction: [{
576
577
  type: i0.Input,
577
- args: ["tuiDropdownDirection"]
578
+ args: ['tuiDropdownDirection']
578
579
  }], limitWidth: [{
579
580
  type: i0.Input,
580
- args: ["tuiDropdownLimitWidth"]
581
+ args: ['tuiDropdownLimitWidth']
581
582
  }], minHeight: [{
582
583
  type: i0.Input,
583
- args: ["tuiDropdownMinHeight"]
584
+ args: ['tuiDropdownMinHeight']
584
585
  }], maxHeight: [{
585
586
  type: i0.Input,
586
- args: ["tuiDropdownMaxHeight"]
587
+ args: ['tuiDropdownMaxHeight']
588
+ }], offset: [{
589
+ type: i0.Input,
590
+ args: ['tuiDropdownOffset']
587
591
  }] } });
588
592
 
589
593
  /**
@@ -621,37 +625,35 @@
621
625
  TuiDropdownComponent.prototype.update = function (top, left) {
622
626
  var style = this.elementRef.nativeElement.style;
623
627
  var right = this.elementRef.nativeElement.getBoundingClientRect().right;
624
- var _a = this.options, limitWidth = _a.limitWidth, maxHeight = _a.maxHeight;
628
+ var _a = this.options, limitWidth = _a.limitWidth, maxHeight = _a.maxHeight, offset = _a.offset;
625
629
  var innerHeight = this.windowRef.innerHeight;
626
630
  var clientRect = this.host.clientRect;
627
631
  var position = this.directive.position;
628
632
  var rect = this.accessor.getClientRect();
629
- var offsetX = position === "fixed" ? 0 : -clientRect.left;
630
- var offsetY = position === "fixed" ? 0 : -clientRect.top;
633
+ var offsetX = position === 'fixed' ? 0 : -clientRect.left;
634
+ var offsetY = position === 'fixed' ? 0 : -clientRect.top;
631
635
  top += offsetY;
632
636
  left += offsetX;
633
- var isIntersecting = left < rect.right &&
634
- right > rect.left &&
635
- top < offsetY + 2 * TUI_DROPDOWN_OFFSET;
637
+ var isIntersecting = left < rect.right && right > rect.left && top < offsetY + 2 * offset;
636
638
  var available = isIntersecting
637
- ? rect.top - 2 * TUI_DROPDOWN_OFFSET
638
- : offsetY + innerHeight - top - TUI_DROPDOWN_OFFSET;
639
+ ? rect.top - 2 * offset
640
+ : offsetY + innerHeight - top - offset;
639
641
  style.position = position;
640
- style.top = i2.tuiPx(Math.max(top, offsetY + TUI_DROPDOWN_OFFSET));
642
+ style.top = i2.tuiPx(Math.max(top, offsetY + offset));
641
643
  style.left = i2.tuiPx(left);
642
644
  style.maxHeight = i2.tuiPx(Math.min(maxHeight, available));
643
- style.width = "";
644
- style.minWidth = "";
645
+ style.width = '';
646
+ style.minWidth = '';
645
647
  switch (limitWidth) {
646
- case "min":
648
+ case 'min':
647
649
  style.minWidth = i2.tuiPx(rect.width);
648
650
  break;
649
- case "fixed":
651
+ case 'fixed':
650
652
  style.width = i2.tuiPx(rect.width);
651
653
  }
652
654
  };
653
655
  TuiDropdownComponent.prototype.moveFocusOutside = function (previous) {
654
- var host = document.createElement("div");
656
+ var host = document.createElement('div');
655
657
  var ownerDocument = host.ownerDocument;
656
658
  var root = ownerDocument ? ownerDocument.body : host;
657
659
  var focusable = i2.tuiGetClosestFocusable({ initial: host, root: root, previous: previous });
@@ -667,9 +669,9 @@
667
669
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownComponent, decorators: [{
668
670
  type: i0.Component,
669
671
  args: [{
670
- selector: "tui-dropdown",
671
- templateUrl: "./dropdown.template.html",
672
- styleUrls: ["./dropdown.style.less"],
672
+ selector: 'tui-dropdown',
673
+ templateUrl: './dropdown.template.html',
674
+ styleUrls: ['./dropdown.style.less'],
673
675
  changeDetection: i0.ChangeDetectionStrategy.Default,
674
676
  providers: [i2.TuiDestroyService, services.TuiPositionService],
675
677
  animations: [animations.tuiDropdownAnimation],
@@ -712,14 +714,14 @@
712
714
  }] }];
713
715
  }, propDecorators: { dropdownAnimation: [{
714
716
  type: i0.HostBinding,
715
- args: ["@tuiDropdownAnimation"]
717
+ args: ['@tuiDropdownAnimation']
716
718
  }] } });
717
719
 
718
720
  var TuiDropdownContextDirective = /** @class */ (function (_super) {
719
721
  __extends(TuiDropdownContextDirective, _super);
720
- function TuiDropdownContextDirective(dropdown) {
722
+ function TuiDropdownContextDirective(activeZone) {
721
723
  var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
722
- _this.dropdown = dropdown;
724
+ _this.activeZone = activeZone;
723
725
  _this.stream$ = new i5.Subject();
724
726
  _this.currentRect = i2.EMPTY_CLIENT_RECT;
725
727
  return _this;
@@ -729,8 +731,7 @@
729
731
  this.stream$.next(true);
730
732
  };
731
733
  TuiDropdownContextDirective.prototype.closeDropdown = function (target) {
732
- var _a;
733
- if (!((_a = this.dropdown.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement.contains(target))) {
734
+ if (!this.activeZone.contains(target)) {
734
735
  this.stream$.next(false);
735
736
  }
736
737
  };
@@ -739,37 +740,39 @@
739
740
  };
740
741
  return TuiDropdownContextDirective;
741
742
  }(i1$1.TuiDriver));
742
- TuiDropdownContextDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownContextDirective, deps: [{ token: TuiDropdownDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
743
+ TuiDropdownContextDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownContextDirective, deps: [{ token: i2.TuiActiveZoneDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
743
744
  TuiDropdownContextDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownContextDirective, selector: "[tuiDropdown][tuiDropdownContext]", host: { listeners: { "contextmenu.prevent.stop": "onContextMenu($event.clientX,$event.clientY)", "document:click.silent": "closeDropdown($event.target)", "document:contextmenu.capture.silent": "closeDropdown($event.target)", "document:keydown.esc": "closeDropdown($event.currentTarget)" } }, providers: [
745
+ i2.TuiActiveZoneDirective,
744
746
  i1$1.tuiAsDriver(TuiDropdownContextDirective),
745
747
  i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
746
748
  ], usesInheritance: true, ngImport: i0__namespace });
747
749
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownContextDirective, decorators: [{
748
750
  type: i0.Directive,
749
751
  args: [{
750
- selector: "[tuiDropdown][tuiDropdownContext]",
752
+ selector: '[tuiDropdown][tuiDropdownContext]',
751
753
  providers: [
754
+ i2.TuiActiveZoneDirective,
752
755
  i1$1.tuiAsDriver(TuiDropdownContextDirective),
753
756
  i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
754
757
  ],
755
758
  }]
756
759
  }], ctorParameters: function () {
757
- return [{ type: TuiDropdownDirective, decorators: [{
760
+ return [{ type: i2__namespace.TuiActiveZoneDirective, decorators: [{
758
761
  type: i0.Inject,
759
- args: [TuiDropdownDirective]
762
+ args: [i2.TuiActiveZoneDirective]
760
763
  }] }];
761
764
  }, propDecorators: { onContextMenu: [{
762
765
  type: i0.HostListener,
763
- args: ["contextmenu.prevent.stop", ["$event.clientX", "$event.clientY"]]
766
+ args: ['contextmenu.prevent.stop', ['$event.clientX', '$event.clientY']]
764
767
  }], closeDropdown: [{
765
768
  type: i0.HostListener,
766
- args: ["document:click.silent", ["$event.target"]]
769
+ args: ['document:click.silent', ['$event.target']]
767
770
  }, {
768
771
  type: i0.HostListener,
769
- args: ["document:contextmenu.capture.silent", ["$event.target"]]
772
+ args: ['document:contextmenu.capture.silent', ['$event.target']]
770
773
  }, {
771
774
  type: i0.HostListener,
772
- args: ["document:keydown.esc", ["$event.currentTarget"]]
775
+ args: ['document:keydown.esc', ['$event.currentTarget']]
773
776
  }] } });
774
777
 
775
778
  var TuiDropdownDriverDirective = /** @class */ (function (_super) {
@@ -784,7 +787,7 @@
784
787
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownDriverDirective, decorators: [{
785
788
  type: i0.Directive,
786
789
  args: [{
787
- selector: "[tuiDropdown]",
790
+ selector: '[tuiDropdown]',
788
791
  providers: [i2.TuiDestroyService],
789
792
  }]
790
793
  }] });
@@ -805,7 +808,7 @@
805
808
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownHostDirective, decorators: [{
806
809
  type: i0.Directive,
807
810
  args: [{
808
- selector: "[tuiDropdown][tuiDropdownHost]",
811
+ selector: '[tuiDropdown][tuiDropdownHost]',
809
812
  providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)],
810
813
  }]
811
814
  }], propDecorators: { tuiDropdownHost: [{
@@ -830,7 +833,7 @@
830
833
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownManualDirective, decorators: [{
831
834
  type: i0.Directive,
832
835
  args: [{
833
- selector: "[tuiDropdown][tuiDropdownManual]",
836
+ selector: '[tuiDropdown][tuiDropdownManual]',
834
837
  providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)],
835
838
  }]
836
839
  }], ctorParameters: function () { return []; }, propDecorators: { tuiDropdownManual: [{
@@ -847,22 +850,20 @@
847
850
  var width = _a.width, height = _a.height;
848
851
  var hostRect = this.accessor.getClientRect();
849
852
  var _b = this.windowRef, innerHeight = _b.innerHeight, innerWidth = _b.innerWidth;
850
- var _c = this.options, minHeight = _c.minHeight, align = _c.align, direction = _c.direction;
851
- var previous = this.previous || direction || "bottom";
852
- var right = Math.max(hostRect.right - width, TUI_DROPDOWN_OFFSET);
853
+ var _c = this.options, minHeight = _c.minHeight, align = _c.align, direction = _c.direction, offset = _c.offset;
854
+ var previous = this.previous || direction || 'bottom';
855
+ var right = Math.max(hostRect.right - width, offset);
853
856
  var available = {
854
- top: hostRect.top - 2 * TUI_DROPDOWN_OFFSET,
855
- bottom: innerHeight - hostRect.bottom - 2 * TUI_DROPDOWN_OFFSET,
857
+ top: hostRect.top - 2 * offset,
858
+ bottom: innerHeight - hostRect.bottom - 2 * offset,
856
859
  };
857
860
  var position = {
858
- top: hostRect.top - TUI_DROPDOWN_OFFSET - height,
859
- bottom: hostRect.bottom + TUI_DROPDOWN_OFFSET,
861
+ top: hostRect.top - offset - height,
862
+ bottom: hostRect.bottom + offset,
860
863
  right: right,
861
- left: hostRect.left + width < innerWidth - TUI_DROPDOWN_OFFSET
862
- ? hostRect.left
863
- : right,
864
+ left: hostRect.left + width < innerWidth - offset ? hostRect.left : right,
864
865
  };
865
- var better = available.top > available.bottom ? "top" : "bottom";
866
+ var better = available.top > available.bottom ? 'top' : 'bottom';
866
867
  if ((available[previous] > minHeight && direction) ||
867
868
  available[previous] > height) {
868
869
  return [position[previous], position[align]];
@@ -877,7 +878,7 @@
877
878
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownPositionDirective, decorators: [{
878
879
  type: i0.Directive,
879
880
  args: [{
880
- selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])",
881
+ selector: '[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])',
881
882
  providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)],
882
883
  }]
883
884
  }], ctorParameters: function () {
@@ -899,8 +900,9 @@
899
900
  this.windowRef = windowRef;
900
901
  this.accessor = accessor;
901
902
  this.vertical = vertical;
902
- this.previous = this.options.direction || "bottom";
903
- this.tuiDropdownSided = "";
903
+ this.previous = this.options.direction || 'bottom';
904
+ this.tuiDropdownSided = '';
905
+ this.tuiDropdownSidedOffset = 4;
904
906
  }
905
907
  TuiDropdownPositionSidedDirective.prototype.getPosition = function (rect) {
906
908
  if (this.tuiDropdownSided === false) {
@@ -909,20 +911,20 @@
909
911
  var height = rect.height, width = rect.width;
910
912
  var hostRect = this.accessor.getClientRect();
911
913
  var _a = this.windowRef, innerHeight = _a.innerHeight, innerWidth = _a.innerWidth;
912
- var _b = this.options, align = _b.align, direction = _b.direction, minHeight = _b.minHeight;
914
+ var _b = this.options, align = _b.align, direction = _b.direction, minHeight = _b.minHeight, offset = _b.offset;
913
915
  var available = {
914
916
  top: hostRect.bottom,
915
- left: hostRect.left - TUI_DROPDOWN_OFFSET,
916
- right: innerWidth - hostRect.right - TUI_DROPDOWN_OFFSET,
917
+ left: hostRect.left - offset,
918
+ right: innerWidth - hostRect.right - offset,
917
919
  bottom: innerHeight - hostRect.top,
918
920
  };
919
921
  var position = {
920
- top: hostRect.bottom - height + 2 * TUI_DROPDOWN_OFFSET + 1,
921
- left: hostRect.left - width - TUI_DROPDOWN_OFFSET,
922
- right: hostRect.right + TUI_DROPDOWN_OFFSET,
923
- bottom: hostRect.top - 2 * TUI_DROPDOWN_OFFSET - 1, // 1 for border
922
+ top: hostRect.bottom - height + this.tuiDropdownSidedOffset + 1,
923
+ left: hostRect.left - width - offset,
924
+ right: hostRect.right + offset,
925
+ bottom: hostRect.top - this.tuiDropdownSidedOffset - 1, // 1 for border
924
926
  };
925
- var better = available.top > available.bottom ? "top" : "bottom";
927
+ var better = available.top > available.bottom ? 'top' : 'bottom';
926
928
  var maxLeft = available.left > available.right ? position.left : position.right;
927
929
  var left = available[align] > width ? position[align] : maxLeft;
928
930
  if ((available[this.previous] > minHeight && direction) ||
@@ -935,14 +937,14 @@
935
937
  return TuiDropdownPositionSidedDirective;
936
938
  }());
937
939
  TuiDropdownPositionSidedDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: common.WINDOW }, { token: i1$1.TuiRectAccessor }, { token: TuiDropdownPositionDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
938
- TuiDropdownPositionSidedDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownPositionSidedDirective, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: "tuiDropdownSided" }, providers: [
940
+ TuiDropdownPositionSidedDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownPositionSidedDirective, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: "tuiDropdownSided", tuiDropdownSidedOffset: "tuiDropdownSidedOffset" }, providers: [
939
941
  TuiDropdownPositionDirective,
940
942
  i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
941
943
  ], ngImport: i0__namespace });
942
944
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, decorators: [{
943
945
  type: i0.Directive,
944
946
  args: [{
945
- selector: "[tuiDropdownSided]",
947
+ selector: '[tuiDropdownSided]',
946
948
  providers: [
947
949
  TuiDropdownPositionDirective,
948
950
  i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
@@ -964,6 +966,8 @@
964
966
  }] }];
965
967
  }, propDecorators: { tuiDropdownSided: [{
966
968
  type: i0.Input
969
+ }], tuiDropdownSidedOffset: [{
970
+ type: i0.Input
967
971
  }] } });
968
972
 
969
973
  var TuiDropdownSelectionDirective = /** @class */ (function (_super) {
@@ -989,7 +993,7 @@
989
993
  : _this.range;
990
994
  return (contained && handler(_this.range)) || _this.inDropdown(range);
991
995
  }));
992
- _this.position = "selection";
996
+ _this.position = 'selection';
993
997
  return _this;
994
998
  }
995
999
  Object.defineProperty(TuiDropdownSelectionDirective.prototype, "tuiDropdownSelection", {
@@ -1003,7 +1007,7 @@
1003
1007
  });
1004
1008
  TuiDropdownSelectionDirective.prototype.getClientRect = function () {
1005
1009
  switch (this.position) {
1006
- case "tag": {
1010
+ case 'tag': {
1007
1011
  var commonAncestorContainer = this.range.commonAncestorContainer;
1008
1012
  var element = i2.tuiIsElement(commonAncestorContainer)
1009
1013
  ? commonAncestorContainer
@@ -1012,7 +1016,7 @@
1012
1016
  ? element.getBoundingClientRect()
1013
1017
  : i2.EMPTY_CLIENT_RECT;
1014
1018
  }
1015
- case "word":
1019
+ case 'word':
1016
1020
  return utils.tuiGetWordRange(this.range).getBoundingClientRect();
1017
1021
  default:
1018
1022
  return this.range.getBoundingClientRect();
@@ -1069,13 +1073,13 @@
1069
1073
  * Create an invisible DIV styled exactly like input/textarea element inside directive
1070
1074
  */
1071
1075
  TuiDropdownSelectionDirective.prototype.initGhost = function (element) {
1072
- var ghost = this.documentRef.createElement("div");
1076
+ var ghost = this.documentRef.createElement('div');
1073
1077
  var nativeElement = this.viewContainerRef.element.nativeElement;
1074
1078
  var _b = getComputedStyle(element), font = _b.font, letterSpacing = _b.letterSpacing, textTransform = _b.textTransform, padding = _b.padding;
1075
- ghost.style.position = "absolute";
1076
- ghost.style.pointerEvents = "none";
1077
- ghost.style.opacity = "0";
1078
- ghost.style.whiteSpace = "pre-wrap";
1079
+ ghost.style.position = 'absolute';
1080
+ ghost.style.pointerEvents = 'none';
1081
+ ghost.style.opacity = '0';
1082
+ ghost.style.whiteSpace = 'pre-wrap';
1079
1083
  ghost.style.font = font;
1080
1084
  ghost.style.letterSpacing = letterSpacing;
1081
1085
  ghost.style.textTransform = textTransform;
@@ -1097,7 +1101,7 @@
1097
1101
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownSelectionDirective, decorators: [{
1098
1102
  type: i0.Directive,
1099
1103
  args: [{
1100
- selector: "[tuiDropdown][tuiDropdownSelection]",
1104
+ selector: '[tuiDropdown][tuiDropdownSelection]',
1101
1105
  providers: [
1102
1106
  i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
1103
1107
  i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
@@ -1125,7 +1129,7 @@
1125
1129
  }] }];
1126
1130
  }, propDecorators: { position: [{
1127
1131
  type: i0.Input,
1128
- args: ["tuiDropdownSelectionPosition"]
1132
+ args: ['tuiDropdownSelectionPosition']
1129
1133
  }], tuiDropdownSelection: [{
1130
1134
  type: i0.Input
1131
1135
  }] } });
@@ -1216,7 +1220,6 @@
1216
1220
 
1217
1221
  exports.TUI_DROPDOWN_COMPONENT = TUI_DROPDOWN_COMPONENT;
1218
1222
  exports.TUI_DROPDOWN_DEFAULT_OPTIONS = TUI_DROPDOWN_DEFAULT_OPTIONS;
1219
- exports.TUI_DROPDOWN_OFFSET = TUI_DROPDOWN_OFFSET;
1220
1223
  exports.TUI_DROPDOWN_OPTIONS = TUI_DROPDOWN_OPTIONS;
1221
1224
  exports.TuiDropdownComponent = TuiDropdownComponent;
1222
1225
  exports.TuiDropdownContextDirective = TuiDropdownContextDirective;