@taiga-ui/kit 5.0.0-canary.26e65fa → 5.0.0-canary.2da416d

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 (212) hide show
  1. package/components/calendar-month/calendar-month.component.d.ts +4 -3
  2. package/components/combo-box/combo-box.directive.d.ts +1 -0
  3. package/components/copy/button-copy.component.d.ts +17 -0
  4. package/components/copy/copy.d.ts +2 -1
  5. package/components/copy/copy.directive.d.ts +5 -2
  6. package/components/copy/copy.options.d.ts +1 -3
  7. package/components/copy/index.d.ts +1 -0
  8. package/components/index.d.ts +0 -3
  9. package/components/input-chip/input-chip.component.d.ts +5 -0
  10. package/components/input-chip/input-chip.directive.d.ts +1 -1
  11. package/components/input-date/input-date.directive.d.ts +2 -2
  12. package/components/input-date/input-date.options.d.ts +2 -4
  13. package/components/input-date-multi/input-date-multi.directive.d.ts +1 -1
  14. package/components/input-month/input-month.directive.d.ts +1 -1
  15. package/components/input-month/input-month.options.d.ts +1 -7
  16. package/components/input-month-range/input-month-range.directive.d.ts +1 -1
  17. package/components/input-month-range/input-month-range.options.d.ts +1 -3
  18. package/components/input-number/input-number.directive.d.ts +1 -0
  19. package/components/input-number/number-mask.directive.d.ts +1 -1
  20. package/components/input-range/input-range.component.d.ts +1 -0
  21. package/components/input-slider/input-slider.d.ts +1 -1
  22. package/components/input-time/input-time.directive.d.ts +1 -1
  23. package/components/input-time/input-time.options.d.ts +1 -3
  24. package/components/input-year/input-year.directive.d.ts +1 -1
  25. package/components/line-clamp/line-clamp-box.component.d.ts +2 -0
  26. package/components/line-clamp/line-clamp.component.d.ts +2 -0
  27. package/components/range/range.component.d.ts +2 -2
  28. package/components/select/select-option/select-option.component.d.ts +1 -1
  29. package/components/switch/switch.component.d.ts +1 -1
  30. package/components/switch/switch.options.d.ts +1 -1
  31. package/components/tabs/tabs-with-more.component.d.ts +3 -3
  32. package/directives/password/password.options.d.ts +2 -4
  33. package/fesm2022/taiga-ui-kit-components-accordion.mjs +2 -2
  34. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  35. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +2 -2
  36. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-kit-components-avatar.mjs +6 -7
  38. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +2 -4
  40. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  41. package/fesm2022/taiga-ui-kit-components-badge.mjs +3 -2
  42. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  43. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +1 -3
  44. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  45. package/fesm2022/taiga-ui-kit-components-block.mjs +3 -2
  46. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  47. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +2 -4
  48. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  49. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +24 -16
  50. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  51. package/fesm2022/taiga-ui-kit-components-carousel.mjs +2 -6
  52. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  53. package/fesm2022/taiga-ui-kit-components-chip.mjs +4 -3
  54. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +6 -2
  56. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-kit-components-comment.mjs +8 -4
  58. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-kit-components-compass.mjs +4 -2
  60. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-kit-components-copy.mjs +87 -24
  62. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +2 -2
  64. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-kit-components-files.mjs +6 -10
  66. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  67. package/fesm2022/taiga-ui-kit-components-filter.mjs +1 -3
  68. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +16 -10
  70. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-kit-components-input-color.mjs +3 -3
  72. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  73. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +4 -5
  74. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +1 -3
  76. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-kit-components-input-date.mjs +6 -5
  78. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +3 -2
  80. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-kit-components-input-month.mjs +4 -10
  82. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-kit-components-input-number.mjs +25 -16
  84. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +2 -2
  86. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  87. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +2 -2
  88. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-kit-components-input-range.mjs +6 -2
  90. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +1 -1
  92. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-kit-components-input-time.mjs +4 -3
  94. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-kit-components-input-year.mjs +3 -2
  96. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  97. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +1 -3
  98. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-kit-components-like.mjs +3 -2
  100. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  101. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +17 -8
  102. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-kit-components-message.mjs +3 -2
  104. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +5 -7
  106. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  107. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +3 -5
  108. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  109. package/fesm2022/taiga-ui-kit-components-pagination.mjs +2 -2
  110. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  111. package/fesm2022/taiga-ui-kit-components-pin.mjs +5 -3
  112. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  113. package/fesm2022/taiga-ui-kit-components-preview.mjs +10 -14
  114. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  115. package/fesm2022/taiga-ui-kit-components-progress.mjs +8 -10
  116. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  117. package/fesm2022/taiga-ui-kit-components-push.mjs +3 -5
  118. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  119. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +4 -4
  120. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  121. package/fesm2022/taiga-ui-kit-components-range.mjs +17 -14
  122. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  123. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +1 -3
  124. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  125. package/fesm2022/taiga-ui-kit-components-segmented.mjs +3 -9
  126. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-kit-components-select.mjs +6 -9
  128. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-kit-components-status.mjs +5 -3
  130. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-kit-components-stepper.mjs +2 -2
  132. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  133. package/fesm2022/taiga-ui-kit-components-switch.mjs +4 -3
  134. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-kit-components-tabs.mjs +24 -21
  136. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  137. package/fesm2022/taiga-ui-kit-components-textarea.mjs +5 -7
  138. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  139. package/fesm2022/taiga-ui-kit-components-tiles.mjs +1 -3
  140. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  141. package/fesm2022/taiga-ui-kit-components-toast.mjs +4 -5
  142. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  143. package/fesm2022/taiga-ui-kit-components-tree.mjs +4 -12
  144. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  145. package/fesm2022/taiga-ui-kit-components.mjs +0 -3
  146. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  147. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +3 -5
  148. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  149. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +2 -2
  150. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  151. package/fesm2022/taiga-ui-kit-directives-connected.mjs +1 -3
  152. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  153. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +1 -3
  154. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  155. package/fesm2022/taiga-ui-kit-directives-fade.mjs +2 -2
  156. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  157. package/fesm2022/taiga-ui-kit-directives-password.mjs +1 -7
  158. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  159. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +2 -2
  160. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  161. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +1 -3
  162. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -1
  163. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +1 -3
  164. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  165. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +1 -3
  166. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -1
  167. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +1 -3
  168. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -1
  169. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +1 -3
  170. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  171. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +1 -3
  172. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  173. package/fesm2022/taiga-ui-kit-tokens.mjs +18 -54
  174. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  175. package/package.json +41 -54
  176. package/tokens/i18n.d.ts +0 -1
  177. package/components/checkbox/checkbox.component.d.ts +0 -10
  178. package/components/checkbox/checkbox.options.d.ts +0 -10
  179. package/components/checkbox/index.d.ts +0 -2
  180. package/components/radio/index.d.ts +0 -4
  181. package/components/radio/radio.component.d.ts +0 -18
  182. package/components/radio/radio.d.ts +0 -3
  183. package/components/radio/radio.directive.d.ts +0 -8
  184. package/components/radio/radio.options.d.ts +0 -7
  185. package/components/slider/helpers/key-steps.d.ts +0 -27
  186. package/components/slider/helpers/slider-key-steps.directive.d.ts +0 -32
  187. package/components/slider/helpers/slider-readonly.directive.d.ts +0 -15
  188. package/components/slider/helpers/slider-thumb-label.component.d.ts +0 -13
  189. package/components/slider/index.d.ts +0 -6
  190. package/components/slider/slider.component.d.ts +0 -22
  191. package/components/slider/slider.d.ts +0 -5
  192. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +0 -36
  193. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +0 -1
  194. package/fesm2022/taiga-ui-kit-components-radio.mjs +0 -93
  195. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +0 -1
  196. package/fesm2022/taiga-ui-kit-components-slider.mjs +0 -343
  197. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +0 -1
  198. package/styles/components/avatar.less +0 -188
  199. package/styles/components/badge.less +0 -127
  200. package/styles/components/block.less +0 -118
  201. package/styles/components/checkbox.less +0 -84
  202. package/styles/components/chip.less +0 -139
  203. package/styles/components/comment.less +0 -64
  204. package/styles/components/compass.less +0 -49
  205. package/styles/components/like.less +0 -67
  206. package/styles/components/message.less +0 -33
  207. package/styles/components/pin.less +0 -164
  208. package/styles/components/progress-bar.less +0 -117
  209. package/styles/components/radio.less +0 -59
  210. package/styles/components/status.less +0 -40
  211. package/styles/components/switch.less +0 -103
  212. package/styles/components/toast.less +0 -44
@@ -1,93 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, DestroyRef, input, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive } from '@angular/core';
3
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
- import { NgControl, NgModel, RadioControlValueAccessor } from '@angular/forms';
5
- import * as i2 from '@taiga-ui/cdk/directives/native-validator';
6
- import { TuiNativeValidator } from '@taiga-ui/cdk/directives/native-validator';
7
- import { tuiControlValue } from '@taiga-ui/cdk/observables';
8
- import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
9
- import * as i1 from '@taiga-ui/core/directives/appearance';
10
- import { tuiAppearance, TuiAppearance } from '@taiga-ui/core/directives/appearance';
11
- import { distinctUntilChanged } from 'rxjs';
12
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
13
- import { TUI_DEFAULT_IDENTITY_MATCHER } from '@taiga-ui/cdk/constants';
14
-
15
- const [TUI_RADIO_OPTIONS, tuiRadioOptionsProvider] = tuiCreateOptions({
16
- size: 'm',
17
- appearance: ({ checked }) => (checked ? 'primary' : 'outline-grayscale'),
18
- });
19
-
20
- class TuiRadioComponent {
21
- constructor() {
22
- this.destroyRef = inject(DestroyRef);
23
- this.el = tuiInjectElement();
24
- this.options = inject(TUI_RADIO_OPTIONS);
25
- this.appearance = tuiAppearance(this.options.appearance(this.el));
26
- this.control = inject(NgControl, { self: true, optional: true });
27
- this.size = input(this.options.size);
28
- }
29
- ngOnInit() {
30
- tuiControlValue(this.control)
31
- .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
32
- .subscribe((value) => {
33
- // https://github.com/angular/angular/issues/14988
34
- const fix = this.control instanceof NgModel && value == null
35
- ? this.control.model
36
- : value;
37
- this.el.indeterminate = fix == null && this.el.matches('[tuiCheckbox]');
38
- this.ngDoCheck();
39
- });
40
- }
41
- ngDoCheck() {
42
- this.appearance.set(this.options.appearance(this.el));
43
- }
44
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
45
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.18", type: TuiRadioComponent, isStandalone: true, selector: "input[type=\"radio\"][tuiRadio]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "disabled": "!control || control.disabled", "attr.data-size": "size()", "class._readonly": "!control" } }, hostDirectives: [{ directive: i1.TuiAppearance, inputs: ["tuiAppearanceState", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceFocus", "tuiAppearanceMode", "tuiAppearanceMode"] }, { directive: i2.TuiNativeValidator }], ngImport: i0, template: '', isInline: true, styles: ["[tuiRadio]{--t-size: 1.5rem;transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:var(--t-size);block-size:var(--t-size);cursor:pointer;margin:0;flex-shrink:0;border-radius:100%;color:var(--tui-text-primary-on-accent-1)}[tuiRadio]:disabled._readonly._readonly{opacity:1}[tuiRadio]:before{position:absolute;inset:0;content:\"\";margin:auto;border-radius:100%;background:currentColor;transform:scale(0);transition-property:transform}[tuiRadio]:checked:before{transform:scale(.5)}[tuiRadio][data-size=s]{--t-size: 1rem}[tuiRadio]:invalid:not([data-mode]),[tuiRadio][data-mode~=invalid]{color:#fff}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
46
- }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiRadioComponent, decorators: [{
48
- type: Component,
49
- args: [{ selector: 'input[type="radio"][tuiRadio]', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
50
- {
51
- directive: TuiAppearance,
52
- inputs: ['tuiAppearanceState', 'tuiAppearanceFocus', 'tuiAppearanceMode'],
53
- },
54
- TuiNativeValidator,
55
- ], host: {
56
- '[disabled]': '!control || control.disabled',
57
- '[attr.data-size]': 'size()',
58
- '[class._readonly]': '!control',
59
- }, styles: ["[tuiRadio]{--t-size: 1.5rem;transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:var(--t-size);block-size:var(--t-size);cursor:pointer;margin:0;flex-shrink:0;border-radius:100%;color:var(--tui-text-primary-on-accent-1)}[tuiRadio]:disabled._readonly._readonly{opacity:1}[tuiRadio]:before{position:absolute;inset:0;content:\"\";margin:auto;border-radius:100%;background:currentColor;transform:scale(0);transition-property:transform}[tuiRadio]:checked:before{transform:scale(.5)}[tuiRadio][data-size=s]{--t-size: 1rem}[tuiRadio]:invalid:not([data-mode]),[tuiRadio][data-mode~=invalid]{color:#fff}\n"] }]
60
- }] });
61
-
62
- class TuiRadioDirective {
63
- constructor() {
64
- this.identityMatcher = input(TUI_DEFAULT_IDENTITY_MATCHER);
65
- const accessor = inject(RadioControlValueAccessor);
66
- const writeValue = accessor.writeValue.bind(accessor);
67
- accessor.writeValue = (value) => {
68
- if (this.identityMatcher()(value, accessor.value)) {
69
- writeValue(accessor.value);
70
- }
71
- else {
72
- writeValue(value);
73
- }
74
- };
75
- }
76
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiRadioDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
77
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.18", type: TuiRadioDirective, isStandalone: true, selector: "input[type=\"radio\"][tuiRadio][identityMatcher]", inputs: { identityMatcher: { classPropertyName: "identityMatcher", publicName: "identityMatcher", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
78
- }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiRadioDirective, decorators: [{
80
- type: Directive,
81
- args: [{
82
- selector: 'input[type="radio"][tuiRadio][identityMatcher]',
83
- }]
84
- }], ctorParameters: () => [] });
85
-
86
- const TuiRadio = [TuiRadioComponent, TuiRadioDirective];
87
-
88
- /**
89
- * Generated bundle index. Do not edit.
90
- */
91
-
92
- export { TUI_RADIO_OPTIONS, TuiRadio, TuiRadioComponent, TuiRadioDirective, tuiRadioOptionsProvider };
93
- //# sourceMappingURL=taiga-ui-kit-components-radio.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-kit-components-radio.mjs","sources":["../../../projects/kit/components/radio/radio.options.ts","../../../projects/kit/components/radio/radio.component.ts","../../../projects/kit/components/radio/radio.directive.ts","../../../projects/kit/components/radio/radio.ts","../../../projects/kit/components/radio/taiga-ui-kit-components-radio.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiRadioOptions {\n readonly appearance: TuiStringHandler<HTMLInputElement>;\n readonly size: TuiSizeS;\n}\n\nexport const [TUI_RADIO_OPTIONS, tuiRadioOptionsProvider] =\n tuiCreateOptions<TuiRadioOptions>({\n size: 'm',\n appearance: ({checked}) => (checked ? 'primary' : 'outline-grayscale'),\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n type DoCheck,\n inject,\n input,\n type OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {NgControl, NgModel} from '@angular/forms';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiControlValue} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiAppearance, tuiAppearance} from '@taiga-ui/core/directives/appearance';\nimport {distinctUntilChanged} from 'rxjs';\n\nimport {TUI_RADIO_OPTIONS, type TuiRadioOptions} from './radio.options';\n\n@Component({\n selector: 'input[type=\"radio\"][tuiRadio]',\n template: '',\n styles: '@import \"@taiga-ui/kit/styles/components/radio.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: TuiAppearance,\n inputs: ['tuiAppearanceState', 'tuiAppearanceFocus', 'tuiAppearanceMode'],\n },\n TuiNativeValidator,\n ],\n host: {\n '[disabled]': '!control || control.disabled',\n '[attr.data-size]': 'size()',\n '[class._readonly]': '!control',\n },\n})\nexport class TuiRadioComponent<T extends TuiRadioOptions> implements DoCheck, OnInit {\n private readonly destroyRef = inject(DestroyRef);\n\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly options = inject<T>(TUI_RADIO_OPTIONS);\n protected readonly appearance = tuiAppearance(this.options.appearance(this.el));\n protected readonly control = inject(NgControl, {self: true, optional: true});\n\n public readonly size = input(this.options.size);\n\n public ngOnInit(): void {\n tuiControlValue(this.control)\n .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))\n .subscribe((value) => {\n // https://github.com/angular/angular/issues/14988\n const fix =\n this.control instanceof NgModel && value == null\n ? this.control.model\n : value;\n\n this.el.indeterminate = fix == null && this.el.matches('[tuiCheckbox]');\n this.ngDoCheck();\n });\n }\n\n public ngDoCheck(): void {\n this.appearance.set(this.options.appearance(this.el));\n }\n}\n","import {Directive, inject, input} from '@angular/core';\nimport {RadioControlValueAccessor} from '@angular/forms';\nimport {TUI_DEFAULT_IDENTITY_MATCHER} from '@taiga-ui/cdk/constants';\nimport {type TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\n@Directive({\n selector: 'input[type=\"radio\"][tuiRadio][identityMatcher]',\n})\nexport class TuiRadioDirective<T> {\n public readonly identityMatcher = input<TuiIdentityMatcher<T>>(\n TUI_DEFAULT_IDENTITY_MATCHER,\n );\n\n constructor() {\n const accessor = inject(RadioControlValueAccessor);\n const writeValue = accessor.writeValue.bind(accessor);\n\n accessor.writeValue = (value: T) => {\n if (this.identityMatcher()(value, accessor.value)) {\n writeValue(accessor.value);\n } else {\n writeValue(value);\n }\n };\n }\n}\n","import {TuiRadioComponent} from './radio.component';\nimport {TuiRadioDirective} from './radio.directive';\n\nexport const TuiRadio = [TuiRadioComponent, TuiRadioDirective] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MASa,CAAC,iBAAiB,EAAE,uBAAuB,CAAC,GACrD,gBAAgB,CAAkB;AAC9B,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,UAAU,EAAE,CAAC,EAAC,OAAO,EAAC,MAAM,OAAO,GAAG,SAAS,GAAG,mBAAmB,CAAC;AACzE,CAAA;;MC0BQ,iBAAiB,CAAA;AAnB9B,IAAA,WAAA,GAAA;AAoBqB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAE7B,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB;AACzC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAI,iBAAiB,CAAC;AACtC,QAAA,IAAA,CAAA,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5D,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,EAAE,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;QAE5D,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;AAoBlD;IAlBU,QAAQ,GAAA;AACX,QAAA,eAAe,CAAC,IAAI,CAAC,OAAO;aACvB,IAAI,CAAC,oBAAoB,EAAE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AACP,oBAAA,QAAQ,EAAE,gDAAgD;AAC7D,iBAAA;;;MCJY,QAAQ,GAAG,CAAC,iBAAiB,EAAE,iBAAiB;;ACH7D;;AAEG;;;;"}
@@ -1,343 +0,0 @@
1
- import { tuiRound } from '@taiga-ui/cdk/utils/math';
2
- import * as i0 from '@angular/core';
3
- import { inject, computed, input, ChangeDetectionStrategy, Component, INJECTOR, signal, effect, Directive, contentChild } from '@angular/core';
4
- import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { NgControl, NgModel } from '@angular/forms';
6
- import { TuiControl, TUI_IDENTITY_VALUE_TRANSFORMER } from '@taiga-ui/cdk/classes';
7
- import { tuiWatch, tuiControlValue, tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
8
- import { tuiFallbackValueProvider } from '@taiga-ui/cdk/tokens';
9
- import { take, timer, switchMap, merge, tap, map, combineLatest, filter } from 'rxjs';
10
- import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
11
- import { tuiIsNumber } from '@taiga-ui/cdk/utils/miscellaneous';
12
- import { tuiAsAuxiliary } from '@taiga-ui/core/tokens';
13
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
14
- import { DOCUMENT, AsyncPipe } from '@angular/common';
15
- import { TUI_TRUE_HANDLER, TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
16
- import { tuiHintOptionsProvider } from '@taiga-ui/core/portals/hint';
17
-
18
- /**
19
- * Used as a limit for eliminating JS issues with floating point math
20
- */
21
- const TUI_FLOATING_PRECISION = 7;
22
- function tuiFindKeyStepsBoundariesByFn(keySteps, fn) {
23
- const keyStepUpperIndex = keySteps.findIndex((keyStep, i) => i && fn(keyStep));
24
- const lowerStep = keySteps[keyStepUpperIndex - 1] || keySteps[0];
25
- const upperStep = keySteps[keyStepUpperIndex] ||
26
- keySteps[keySteps.length - 1] || [0, 0];
27
- return [lowerStep, upperStep];
28
- }
29
- function tuiPercentageToKeyStepValue(valuePercentage, keySteps) {
30
- const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] = tuiFindKeyStepsBoundariesByFn(keySteps, ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage);
31
- const ratio = (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);
32
- const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;
33
- return tuiRound(controlValue, TUI_FLOATING_PRECISION);
34
- }
35
- function tuiKeyStepValueToPercentage(value, keySteps) {
36
- const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] = tuiFindKeyStepsBoundariesByFn(keySteps, ([_, keyStepValue]) => value <= keyStepValue);
37
- const ratio = (value - lowerStepValue) / (upperStepValue - lowerStepValue) || 0;
38
- return (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;
39
- }
40
- function tuiCreateKeyStepsTransformer(keySteps) {
41
- return new (class {
42
- fromControlValue(controlValue) {
43
- return tuiKeyStepValueToPercentage(controlValue, keySteps) / 100;
44
- }
45
- toControlValue(ratio) {
46
- return tuiPercentageToKeyStepValue(ratio * 100, keySteps);
47
- }
48
- })();
49
- }
50
-
51
- class TuiSliderComponent {
52
- constructor() {
53
- this.control = inject(NgControl, { self: true, optional: true });
54
- this.ticksGradient = computed((segments = this.segments()) => this.getTicksGradient(segments));
55
- this.segments = input([1], {
56
- alias: 'segments',
57
- transform: (x) => tuiIsNumber(x) ? Array.from({ length: x }, (_, i) => i / x) : x,
58
- });
59
- this.el = tuiInjectElement();
60
- this.keySteps = inject(TuiSliderKeyStepsBase, {
61
- self: true,
62
- optional: true,
63
- });
64
- if (this.control instanceof NgModel) {
65
- /**
66
- * The ValueAccessor.writeValue method is called twice on any value accessor during component initialization,
67
- * when a control is bound using [(ngModel)], first time with a phantom null value.
68
- * With `changeDetection: ChangeDetectionStrategy.OnPush` the second call of writeValue with real value don't re-render the view.
69
- * ___
70
- * See this {@link https://github.com/angular/angular/issues/14988 issue}
71
- */
72
- this.control.valueChanges?.pipe(tuiWatch(), take(1)).subscribe();
73
- }
74
- }
75
- get valueRatio() {
76
- return (this.value - this.min) / (this.max - this.min) || 0;
77
- }
78
- get min() {
79
- return Number(this.el.min);
80
- }
81
- set min(x) {
82
- this.el.min = String(x);
83
- }
84
- get max() {
85
- return Number(this.el.max || 100);
86
- }
87
- set max(x) {
88
- this.el.max = String(x);
89
- }
90
- get step() {
91
- if (!this.el.step) {
92
- return 1;
93
- }
94
- return this.el.step === 'any' ? 0 : Number(this.el.step);
95
- }
96
- set step(x) {
97
- this.el.step = String(x);
98
- }
99
- get value() {
100
- /**
101
- * If developer uses `[(ngModel)]` and programmatically change value,
102
- * the `el.nativeElement.value` is equal to the previous value at this moment
103
- * (it will be updated only in next microtask).
104
- * @see https://github.com/angular/angular/issues/13568
105
- */
106
- if (this.control instanceof NgModel) {
107
- const transformer = this.keySteps?.transformer();
108
- const value = this.keySteps && transformer
109
- ? this.keySteps.toSliderValue(transformer.fromControlValue(this.control.value))
110
- : this.control.viewModel;
111
- return this.step
112
- ? tuiRound(Math.round(value / this.step) * this.step, TUI_FLOATING_PRECISION)
113
- : value;
114
- }
115
- return Number(this.el.value) || 0;
116
- }
117
- set value(newValue) {
118
- this.el.value = `${newValue}`;
119
- }
120
- getTicksGradient(segments) {
121
- if (segments.length <= 1) {
122
- return 'linear-gradient(to right, transparent 0 100%)';
123
- }
124
- const percentages = segments
125
- .filter((segment) => segment > 0 && segment < 1)
126
- .map((segment) => segment * 100);
127
- return percentages.reduce((acc, segment, index) => `${acc}
128
- var(--tui-text-tertiary) ${segment}% calc(${segment}% + var(--t-tick-thickness)),
129
- transparent ${segment}% ${percentages[index + 1] ?? 100}%${percentages[index + 1] ? ',' : ')'}
130
- `, `linear-gradient(to right, transparent 0 ${percentages[0]}%,`);
131
- }
132
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
133
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.18", type: TuiSliderComponent, isStandalone: true, selector: "input[type=range][tuiSlider]", inputs: { segments: { classPropertyName: "segments", publicName: "segments", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "0" }, properties: { "style.--tui-ticks-gradient": "ticksGradient()", "style.--tui-slider-fill-ratio": "valueRatio" } }, providers: [tuiAsAuxiliary(TuiSliderComponent)], ngImport: i0, template: '', isInline: true, styles: [":host{--t-tick-thickness: .25rem;position:relative;display:block;inline-size:100%;color:var(--tui-background-accent-1);cursor:pointer;-webkit-appearance:none;appearance:none;block-size:max(var(--tui-thumb-size, .75rem),1rem);padding:calc((max(var(--tui-thumb-size, .75rem),1rem) - max(calc(calc(var(--tui-thumb-size, .75rem) / 2) - .25rem),.125rem))/2) 0;box-sizing:border-box;outline:none;border-radius:1rem/3rem;background:var(--tui-ticks-gradient) no-repeat calc((var(--tui-thumb-size, .75rem) - var(--t-tick-thickness)) / 2) / calc(100% - var(--tui-thumb-size, .75rem)),linear-gradient(to var(--tui-inline-end),currentColor calc(100% * var(--tui-slider-fill-ratio)),transparent calc(100% * var(--tui-slider-fill-ratio))),var(--tui-background-neutral-2);background-clip:content-box}:host:active{cursor:ew-resize}:host:active:before{opacity:.2;transform:var(--tui-slider-thumb-transform, scale(1)) scale(2.33)}:host:disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}:host:before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;top:calc(max(calc(1rem - var(--tui-thumb-size, .75rem)),0rem)/2);inset-inline-start:var(--t-left);inline-size:var(--tui-thumb-size, .75rem);block-size:var(--tui-thumb-size, .75rem);border-radius:50%;transform:var(--tui-slider-thumb-transform, scale(1));cursor:ew-resize;background:currentColor;opacity:0;--t-left: calc(var(--tui-slider-fill-ratio) * 100% - var(--tui-slider-fill-ratio) * var(--tui-thumb-size, .75rem))}:host:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host::-webkit-slider-thumb{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:var(--tui-thumb-size, .75rem);inline-size:var(--tui-thumb-size, .75rem);box-sizing:content-box;background-clip:content-box;border:calc(max(calc(1rem - var(--tui-thumb-size, .75rem)),0rem)/2) solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled):host::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled):host::-webkit-slider-thumb:hover,:active:not(:disabled):host::-webkit-slider-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:host::-moz-range-thumb{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:var(--tui-thumb-size, .75rem);inline-size:var(--tui-thumb-size, .75rem);box-sizing:content-box;background-clip:content-box;border:calc(max(calc(1rem - var(--tui-thumb-size, .75rem)),0rem)/2) solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled):host::-moz-range-thumb{cursor:ew-resize}:not(:disabled):host::-moz-range-thumb:hover,:active:not(:disabled):host::-moz-range-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:host::-moz-range-progress{opacity:0}:host-context(tui-textfield) :host([type=\"range\"]){position:absolute;inset:100% var(--t-padding) 0;inline-size:auto;margin:calc(-.5*max(calc(calc(var(--tui-thumb-size, .75rem) / 2) - .25rem),.125rem)) 0 0;transform:translateY(-50%);background-color:transparent;pointer-events:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
134
- }
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSliderComponent, decorators: [{
136
- type: Component,
137
- args: [{ selector: 'input[type=range][tuiSlider]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsAuxiliary(TuiSliderComponent)], host: {
138
- /**
139
- * For change detection.
140
- * Webkit does not have built-in method for customization of filling progress (as Firefox).
141
- * We draw filling of progress by `background: linear-gradient(...)` of the track.
142
- * This function triggers change detection (for {@link valueRatio} getter) when we drag thumb of the input.
143
- */
144
- '(input)': '0',
145
- '[style.--tui-ticks-gradient]': 'ticksGradient()',
146
- '[style.--tui-slider-fill-ratio]': 'valueRatio',
147
- }, styles: [":host{--t-tick-thickness: .25rem;position:relative;display:block;inline-size:100%;color:var(--tui-background-accent-1);cursor:pointer;-webkit-appearance:none;appearance:none;block-size:max(var(--tui-thumb-size, .75rem),1rem);padding:calc((max(var(--tui-thumb-size, .75rem),1rem) - max(calc(calc(var(--tui-thumb-size, .75rem) / 2) - .25rem),.125rem))/2) 0;box-sizing:border-box;outline:none;border-radius:1rem/3rem;background:var(--tui-ticks-gradient) no-repeat calc((var(--tui-thumb-size, .75rem) - var(--t-tick-thickness)) / 2) / calc(100% - var(--tui-thumb-size, .75rem)),linear-gradient(to var(--tui-inline-end),currentColor calc(100% * var(--tui-slider-fill-ratio)),transparent calc(100% * var(--tui-slider-fill-ratio))),var(--tui-background-neutral-2);background-clip:content-box}:host:active{cursor:ew-resize}:host:active:before{opacity:.2;transform:var(--tui-slider-thumb-transform, scale(1)) scale(2.33)}:host:disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}:host:before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;top:calc(max(calc(1rem - var(--tui-thumb-size, .75rem)),0rem)/2);inset-inline-start:var(--t-left);inline-size:var(--tui-thumb-size, .75rem);block-size:var(--tui-thumb-size, .75rem);border-radius:50%;transform:var(--tui-slider-thumb-transform, scale(1));cursor:ew-resize;background:currentColor;opacity:0;--t-left: calc(var(--tui-slider-fill-ratio) * 100% - var(--tui-slider-fill-ratio) * var(--tui-thumb-size, .75rem))}:host:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host::-webkit-slider-thumb{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:var(--tui-thumb-size, .75rem);inline-size:var(--tui-thumb-size, .75rem);box-sizing:content-box;background-clip:content-box;border:calc(max(calc(1rem - var(--tui-thumb-size, .75rem)),0rem)/2) solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled):host::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled):host::-webkit-slider-thumb:hover,:active:not(:disabled):host::-webkit-slider-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:host::-moz-range-thumb{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:var(--tui-thumb-size, .75rem);inline-size:var(--tui-thumb-size, .75rem);box-sizing:content-box;background-clip:content-box;border:calc(max(calc(1rem - var(--tui-thumb-size, .75rem)),0rem)/2) solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled):host::-moz-range-thumb{cursor:ew-resize}:not(:disabled):host::-moz-range-thumb:hover,:active:not(:disabled):host::-moz-range-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:host::-moz-range-progress{opacity:0}:host-context(tui-textfield) :host([type=\"range\"]){position:absolute;inset:100% var(--t-padding) 0;inline-size:auto;margin:calc(-.5*max(calc(calc(var(--tui-thumb-size, .75rem) / 2) - .25rem),.125rem)) 0 0;transform:translateY(-50%);background-color:transparent;pointer-events:auto}\n"] }]
148
- }], ctorParameters: () => [] });
149
-
150
- class TuiSliderKeyStepsBase {
151
- constructor() {
152
- this.injector = inject(INJECTOR);
153
- this.control = inject(NgControl, { self: true, optional: true });
154
- this.min = signal(undefined);
155
- this.max = signal(undefined);
156
- this.sync = effect(() => {
157
- const steps = this.keySteps();
158
- this.transformer.set(steps && tuiCreateKeyStepsTransformer(steps));
159
- this.min.set(steps?.[0][1]);
160
- this.max.set(steps?.[steps.length - 1]?.[1]);
161
- });
162
- this.step = input(1);
163
- this.keySteps = input();
164
- this.transformer = signal(undefined);
165
- this.controlValue = toSignal(timer(0) // https://github.com/angular/angular/issues/54418
166
- .pipe(switchMap(() => tuiControlValue(this.control))));
167
- this.totalSteps = computed(() =>
168
- /**
169
- * Not-integer amount of steps is invalid usage of native sliders
170
- * ```html
171
- * <input type="range" [max]="100" [step]="3.33" />
172
- * ```
173
- * (impossible to select 100; 99.9 is max allowed value)
174
- */
175
- Math.round(100 / this.step()));
176
- }
177
- ngOnInit() {
178
- this.slider = this.injector.get(TuiSliderComponent);
179
- }
180
- takeStep(coefficient) {
181
- const newValue = this.slider.value + coefficient;
182
- return (this.transformer()?.toControlValue((this.slider.value + coefficient) / this.totalSteps()) ?? newValue);
183
- }
184
- toSliderValue(fraction) {
185
- return this.transformer() ? fraction * this.totalSteps() : fraction;
186
- }
187
- setControlValue(controlValue) {
188
- const fraction = this.transformer()?.fromControlValue(controlValue) ?? controlValue;
189
- this.slider.value = this.toSliderValue(fraction);
190
- }
191
- getControlValue() {
192
- const { value } = this.slider;
193
- return this.transformer()?.toControlValue(value / this.totalSteps()) ?? value;
194
- }
195
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSliderKeyStepsBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
196
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.18", type: TuiSliderKeyStepsBase, isStandalone: true, selector: "input[tuiSlider][keySteps]", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, keySteps: { classPropertyName: "keySteps", publicName: "keySteps", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.min": "transformer() ? 0 : slider?.min", "attr.step": "transformer() ? 1 : step()", "attr.max": "transformer() ? totalSteps() : slider?.max", "attr.aria-valuemin": "min()", "attr.aria-valuemax": "max()", "attr.aria-valuenow": "controlValue()" } }, ngImport: i0 }); }
197
- }
198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSliderKeyStepsBase, decorators: [{
199
- type: Directive,
200
- args: [{
201
- selector: 'input[tuiSlider][keySteps]',
202
- host: {
203
- '[attr.min]': 'transformer() ? 0 : slider?.min',
204
- '[attr.step]': 'transformer() ? 1 : step()',
205
- '[attr.max]': 'transformer() ? totalSteps() : slider?.max',
206
- '[attr.aria-valuemin]': 'min()',
207
- '[attr.aria-valuemax]': 'max()',
208
- '[attr.aria-valuenow]': 'controlValue()',
209
- },
210
- }]
211
- }] });
212
- class TuiSliderKeySteps extends TuiControl {
213
- constructor() {
214
- super(...arguments);
215
- this.base = inject(TuiSliderKeyStepsBase);
216
- }
217
- set keySteps(steps) {
218
- this.transformer = steps
219
- ? tuiCreateKeyStepsTransformer(steps)
220
- : TUI_IDENTITY_VALUE_TRANSFORMER;
221
- }
222
- setValue(sliderValue) {
223
- this.onChange(this.base.transformer() ? sliderValue / this.base.totalSteps() : sliderValue);
224
- }
225
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSliderKeySteps, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
226
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: TuiSliderKeySteps, isStandalone: true, selector: "input[tuiSlider][keySteps][ngModel],input[tuiSlider][keySteps][formControl],input[tuiSlider][keySteps][formControlName]", inputs: { keySteps: "keySteps" }, host: { listeners: { "blur": "onTouched()", "input": "setValue($event.target.value)", "change": "setValue($event.target.value)" }, properties: { "value": "base.toSliderValue(value())", "disabled": "disabled()" } }, providers: [tuiFallbackValueProvider(0)], usesInheritance: true, ngImport: i0 }); }
227
- }
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSliderKeySteps, decorators: [{
229
- type: Directive,
230
- args: [{
231
- selector: 'input[tuiSlider][keySteps][ngModel],input[tuiSlider][keySteps][formControl],input[tuiSlider][keySteps][formControlName]',
232
- inputs: ['keySteps'],
233
- providers: [tuiFallbackValueProvider(0)],
234
- host: {
235
- '[value]': 'base.toSliderValue(value())',
236
- '[disabled]': 'disabled()',
237
- '(blur)': 'onTouched()',
238
- '(input)': 'setValue($event.target.value)',
239
- '(change)': 'setValue($event.target.value)',
240
- },
241
- }]
242
- }] });
243
-
244
- const SLIDER_INTERACTION_KEYS = new Set([
245
- 'ArrowDown',
246
- 'ArrowLeft',
247
- 'ArrowRight',
248
- 'ArrowUp',
249
- 'End',
250
- 'Home',
251
- 'PageDown',
252
- 'PageUp',
253
- ]);
254
- /**
255
- * Native <input type='range' readonly> doesn't work.
256
- * This directive imitates this native behaviour.
257
- */
258
- class TuiSliderReadonly {
259
- constructor() {
260
- this.el = tuiInjectElement();
261
- this.doc = inject(DOCUMENT);
262
- this.readonly = input(true, { transform: coerceBooleanProperty });
263
- const touchStart$ = tuiTypedFromEvent(this.el, 'touchstart', {
264
- passive: false,
265
- });
266
- const touchMove$ = tuiTypedFromEvent(this.doc, 'touchmove', {
267
- passive: false,
268
- });
269
- const touchEnd$ = tuiTypedFromEvent(this.doc, 'touchend', {
270
- passive: true,
271
- });
272
- const shouldPreventMove$ = merge(touchStart$.pipe(tap((e) => this.preventEvent(e)), map(TUI_TRUE_HANDLER)), touchEnd$.pipe(map(TUI_FALSE_HANDLER)));
273
- /**
274
- * @bad TODO think about another solution.
275
- * Keep in mind that preventing touch event (on slider) inside `@HostListener('touchstart')` doesn't work for mobile chrome.
276
- */
277
- combineLatest([touchMove$, shouldPreventMove$])
278
- .pipe(filter(([_, shouldPreventMove]) => shouldPreventMove), takeUntilDestroyed())
279
- .subscribe(([moveEvent]) => this.preventEvent(moveEvent));
280
- }
281
- preventEvent(event) {
282
- if (event.cancelable && this.readonly()) {
283
- event.preventDefault();
284
- }
285
- }
286
- preventKeyboardInteraction(event) {
287
- if (SLIDER_INTERACTION_KEYS.has(event.key)) {
288
- this.preventEvent(event);
289
- }
290
- }
291
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSliderReadonly, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
292
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.18", type: TuiSliderReadonly, isStandalone: true, selector: "input[tuiSlider][readonly]", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "preventKeyboardInteraction($event)", "mousedown": "preventEvent($event)" } }, ngImport: i0 }); }
293
- }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSliderReadonly, decorators: [{
295
- type: Directive,
296
- args: [{
297
- selector: 'input[tuiSlider][readonly]',
298
- host: {
299
- '(keydown)': 'preventKeyboardInteraction($event)',
300
- '(mousedown)': 'preventEvent($event)',
301
- },
302
- }]
303
- }], ctorParameters: () => [] });
304
-
305
- /// <reference types="@taiga-ui/tsconfig/ng-dev-mode" />
306
- class TuiSliderThumbLabel {
307
- constructor() {
308
- this.slider = contentChild(TuiSliderComponent);
309
- this.control = contentChild(NgControl);
310
- }
311
- ngAfterContentInit() {
312
- ngDevMode &&
313
- console.assert(Boolean(this.control()?.valueChanges), '\n[tuiSliderThumbLabel] expected <input tuiSlider type="range" /> to use Angular Forms.\n' +
314
- 'Use [(ngModel)] or [formControl] or formControlName for correct work.');
315
- }
316
- get ratio() {
317
- return this.slider()?.valueRatio || 0;
318
- }
319
- get ghostStart() {
320
- return this.ratio * (this.slider()?.el.offsetWidth || 0);
321
- }
322
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSliderThumbLabel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
323
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiSliderThumbLabel, isStandalone: true, selector: "[tuiSliderThumbLabel]", providers: [tuiHintOptionsProvider({ direction: 'top', appearance: 'floating' })], queries: [{ propertyName: "slider", first: true, predicate: TuiSliderComponent, descendants: true, isSignal: true }, { propertyName: "control", first: true, predicate: NgControl, descendants: true, isSignal: true }], ngImport: i0, template: "@if (control()?.valueChanges | async) {}\n\n<div\n class=\"t-ghost\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.inset-inline-start.px]=\"ghostStart\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n", styles: [":host{position:relative}.t-ghost{position:absolute;inset-block:0;margin:auto;border-radius:50%;pointer-events:none;inline-size:var(--tui-thumb-size, .75rem);block-size:var(--tui-thumb-size, .75rem);transform:translate(calc(var(--tui-slider-thumb-ratio) * var(--tui-thumb-size, .75rem) * -1 * var(--tui-inline)))}:host-context([dir=\"rtl\"]) .t-ghost{left:unset!important}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
324
- }
325
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSliderThumbLabel, decorators: [{
326
- type: Component,
327
- args: [{ selector: '[tuiSliderThumbLabel]', imports: [AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiHintOptionsProvider({ direction: 'top', appearance: 'floating' })], template: "@if (control()?.valueChanges | async) {}\n\n<div\n class=\"t-ghost\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.inset-inline-start.px]=\"ghostStart\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n", styles: [":host{position:relative}.t-ghost{position:absolute;inset-block:0;margin:auto;border-radius:50%;pointer-events:none;inline-size:var(--tui-thumb-size, .75rem);block-size:var(--tui-thumb-size, .75rem);transform:translate(calc(var(--tui-slider-thumb-ratio) * var(--tui-thumb-size, .75rem) * -1 * var(--tui-inline)))}:host-context([dir=\"rtl\"]) .t-ghost{left:unset!important}\n"] }]
328
- }] });
329
-
330
- const TuiSlider = [
331
- TuiSliderComponent,
332
- TuiSliderThumbLabel,
333
- TuiSliderKeyStepsBase,
334
- TuiSliderKeySteps,
335
- TuiSliderReadonly,
336
- ];
337
-
338
- /**
339
- * Generated bundle index. Do not edit.
340
- */
341
-
342
- export { TUI_FLOATING_PRECISION, TuiSlider, TuiSliderComponent, TuiSliderKeySteps, TuiSliderKeyStepsBase, TuiSliderReadonly, TuiSliderThumbLabel, tuiCreateKeyStepsTransformer, tuiKeyStepValueToPercentage, tuiPercentageToKeyStepValue };
343
- //# sourceMappingURL=taiga-ui-kit-components-slider.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-kit-components-slider.mjs","sources":["../../../projects/kit/components/slider/helpers/key-steps.ts","../../../projects/kit/components/slider/slider.component.ts","../../../projects/kit/components/slider/helpers/slider-key-steps.directive.ts","../../../projects/kit/components/slider/helpers/slider-readonly.directive.ts","../../../projects/kit/components/slider/helpers/slider-thumb-label.component.ts","../../../projects/kit/components/slider/helpers/slider-thumb-label.template.html","../../../projects/kit/components/slider/slider.ts","../../../projects/kit/components/slider/taiga-ui-kit-components-slider.ts"],"sourcesContent":["import {type TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {tuiRound} from '@taiga-ui/cdk/utils/math';\n\n/**\n * Used as a limit for eliminating JS issues with floating point math\n */\nexport const TUI_FLOATING_PRECISION = 7;\n\n/**\n * Steps for splitting sliders into different linear dependencies.\n * Each element of the array has the form [percent, value]\n *\n * Thus, to set a field from 50,000 to 30,000,000 in steps:\n * 1) From 50 000 to 200 000 by 5000 per step (30 steps)\n * 2) From 200 000 to 1 000 000 by 50 000 per step (16 steps)\n * 3) From 1 000 000 to 30 000 000 by 500 000 per step (58 steps)\n *\n * You need to pass the following keyStep (where 104 = 30 + 16 + 58 is the total number of steps):\n * [\n * [0, 50_000],\n * [100 / 104 * 30, 200_000],\n * [100 / 104 * (30 + 16), 1_000_000],\n * [100, 30_000_000],\n * ];\n *\n */\nexport type TuiKeySteps = [[0, number], ...Array<[number, number]>, [100, number]];\n\nfunction tuiFindKeyStepsBoundariesByFn(\n keySteps: TuiKeySteps,\n fn: ([keyStepPercent, keyStepValue]: [number, number]) => boolean,\n): [[number, number], [number, number]] {\n const keyStepUpperIndex = keySteps.findIndex((keyStep, i) => i && fn(keyStep));\n\n const lowerStep = keySteps[keyStepUpperIndex - 1] || keySteps[0];\n const upperStep = keySteps[keyStepUpperIndex] ||\n keySteps[keySteps.length - 1] || [0, 0];\n\n return [lowerStep, upperStep];\n}\n\nexport function tuiPercentageToKeyStepValue(\n valuePercentage: number,\n keySteps: TuiKeySteps,\n): number {\n const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] =\n tuiFindKeyStepsBoundariesByFn(\n keySteps,\n ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage,\n );\n const ratio =\n (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);\n const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;\n\n return tuiRound(controlValue, TUI_FLOATING_PRECISION);\n}\n\nexport function tuiKeyStepValueToPercentage(\n value: number,\n keySteps: TuiKeySteps,\n): number {\n const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] =\n tuiFindKeyStepsBoundariesByFn(\n keySteps,\n ([_, keyStepValue]) => value <= keyStepValue,\n );\n const ratio = (value - lowerStepValue) / (upperStepValue - lowerStepValue) || 0;\n\n return (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;\n}\n\nexport function tuiCreateKeyStepsTransformer(\n keySteps: TuiKeySteps,\n): TuiValueTransformer<number, number> {\n return new (class implements TuiValueTransformer<number, number> {\n public fromControlValue(controlValue: number): number {\n return tuiKeyStepValueToPercentage(controlValue, keySteps) / 100;\n }\n\n public toControlValue(ratio: number): number {\n return tuiPercentageToKeyStepValue(ratio * 100, keySteps);\n }\n })();\n}\n","import {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {NgControl, NgModel} from '@angular/forms';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiRound} from '@taiga-ui/cdk/utils/math';\nimport {tuiIsNumber} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiAsAuxiliary} from '@taiga-ui/core/tokens';\nimport {take} from 'rxjs';\n\nimport {TUI_FLOATING_PRECISION} from './helpers/key-steps';\nimport {TuiSliderKeyStepsBase} from './helpers/slider-key-steps.directive';\n\n@Component({\n selector: 'input[type=range][tuiSlider]',\n template: '',\n styleUrl: './slider.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiAsAuxiliary(TuiSliderComponent)],\n host: {\n /**\n * For change detection.\n * Webkit does not have built-in method for customization of filling progress (as Firefox).\n * We draw filling of progress by `background: linear-gradient(...)` of the track.\n * This function triggers change detection (for {@link valueRatio} getter) when we drag thumb of the input.\n */\n '(input)': '0',\n '[style.--tui-ticks-gradient]': 'ticksGradient()',\n '[style.--tui-slider-fill-ratio]': 'valueRatio',\n },\n})\nexport class TuiSliderComponent {\n private readonly control = inject(NgControl, {self: true, optional: true});\n\n protected readonly ticksGradient = computed((segments = this.segments()) =>\n this.getTicksGradient(segments),\n );\n\n public readonly segments = input([1], {\n alias: 'segments',\n transform: (x: number | readonly number[]): readonly number[] =>\n tuiIsNumber(x) ? Array.from({length: x}, (_, i) => i / x) : x,\n });\n\n public readonly el = tuiInjectElement<HTMLInputElement>();\n public readonly keySteps = inject(TuiSliderKeyStepsBase, {\n self: true,\n optional: true,\n });\n\n constructor() {\n if (this.control instanceof NgModel) {\n /**\n * The ValueAccessor.writeValue method is called twice on any value accessor during component initialization,\n * when a control is bound using [(ngModel)], first time with a phantom null value.\n * With `changeDetection: ChangeDetectionStrategy.OnPush` the second call of writeValue with real value don't re-render the view.\n * ___\n * See this {@link https://github.com/angular/angular/issues/14988 issue}\n */\n this.control.valueChanges?.pipe(tuiWatch(), take(1)).subscribe();\n }\n }\n\n public get valueRatio(): number {\n return (this.value - this.min) / (this.max - this.min) || 0;\n }\n\n public get min(): number {\n return Number(this.el.min);\n }\n\n public set min(x: number) {\n this.el.min = String(x);\n }\n\n public get max(): number {\n return Number(this.el.max || 100);\n }\n\n public set max(x: number) {\n this.el.max = String(x);\n }\n\n public get step(): number {\n if (!this.el.step) {\n return 1;\n }\n\n return this.el.step === 'any' ? 0 : Number(this.el.step);\n }\n\n public set step(x: number) {\n this.el.step = String(x);\n }\n\n public get value(): number {\n /**\n * If developer uses `[(ngModel)]` and programmatically change value,\n * the `el.nativeElement.value` is equal to the previous value at this moment\n * (it will be updated only in next microtask).\n * @see https://github.com/angular/angular/issues/13568\n */\n if (this.control instanceof NgModel) {\n const transformer = this.keySteps?.transformer();\n const value =\n this.keySteps && transformer\n ? this.keySteps.toSliderValue(\n transformer.fromControlValue(this.control.value),\n )\n : this.control.viewModel;\n\n return this.step\n ? tuiRound(\n Math.round(value / this.step) * this.step,\n TUI_FLOATING_PRECISION,\n )\n : value;\n }\n\n return Number(this.el.value) || 0;\n }\n\n public set value(newValue: number) {\n this.el.value = `${newValue}`;\n }\n\n protected getTicksGradient(segments: readonly number[]): string {\n if (segments.length <= 1) {\n return 'linear-gradient(to right, transparent 0 100%)';\n }\n\n const percentages = segments\n .filter((segment) => segment > 0 && segment < 1)\n .map((segment) => segment * 100);\n\n return percentages.reduce(\n (acc, segment, index) =>\n `${acc}\n var(--tui-text-tertiary) ${segment}% calc(${segment}% + var(--t-tick-thickness)),\n transparent ${segment}% ${percentages[index + 1] ?? 100}%${percentages[index + 1] ? ',' : ')'}\n `,\n `linear-gradient(to right, transparent 0 ${percentages[0]}%,`,\n );\n }\n}\n","import {\n computed,\n Directive,\n effect,\n inject,\n INJECTOR,\n input,\n type OnInit,\n signal,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {NgControl} from '@angular/forms';\nimport {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n TuiControl,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {tuiControlValue} from '@taiga-ui/cdk/observables';\nimport {tuiFallbackValueProvider} from '@taiga-ui/cdk/tokens';\nimport {switchMap, timer} from 'rxjs';\n\nimport {TuiSliderComponent} from '../slider.component';\nimport {tuiCreateKeyStepsTransformer, type TuiKeySteps} from './key-steps';\n\n@Directive({\n selector: 'input[tuiSlider][keySteps]',\n host: {\n '[attr.min]': 'transformer() ? 0 : slider?.min',\n '[attr.step]': 'transformer() ? 1 : step()',\n '[attr.max]': 'transformer() ? totalSteps() : slider?.max',\n '[attr.aria-valuemin]': 'min()',\n '[attr.aria-valuemax]': 'max()',\n '[attr.aria-valuenow]': 'controlValue()',\n },\n})\nexport class TuiSliderKeyStepsBase implements OnInit {\n private readonly injector = inject(INJECTOR);\n private readonly control = inject(NgControl, {self: true, optional: true});\n\n protected readonly min = signal<number | undefined>(undefined);\n protected readonly max = signal<number | undefined>(undefined);\n protected readonly sync = effect(() => {\n const steps = this.keySteps();\n\n this.transformer.set(steps && tuiCreateKeyStepsTransformer(steps));\n this.min.set(steps?.[0][1]);\n this.max.set(steps?.[steps.length - 1]?.[1]);\n });\n\n public slider!: TuiSliderComponent;\n public readonly step = input(1);\n public readonly keySteps = input<TuiKeySteps>();\n public readonly transformer = signal<TuiValueTransformer<number, number> | undefined>(\n undefined,\n );\n\n public controlValue = toSignal(\n timer(0) // https://github.com/angular/angular/issues/54418\n .pipe(switchMap(() => tuiControlValue<number>(this.control))),\n );\n\n public readonly totalSteps = computed(() =>\n /**\n * Not-integer amount of steps is invalid usage of native sliders\n * ```html\n * <input type=\"range\" [max]=\"100\" [step]=\"3.33\" />\n * ```\n * (impossible to select 100; 99.9 is max allowed value)\n */\n Math.round(100 / this.step()),\n );\n\n public ngOnInit(): void {\n this.slider = this.injector.get(TuiSliderComponent);\n }\n\n public takeStep(coefficient: number): number {\n const newValue = this.slider.value + coefficient;\n\n return (\n this.transformer()?.toControlValue(\n (this.slider.value + coefficient) / this.totalSteps(),\n ) ?? newValue\n );\n }\n\n public toSliderValue(fraction: number): number {\n return this.transformer() ? fraction * this.totalSteps() : fraction;\n }\n\n public setControlValue(controlValue: number): void {\n const fraction =\n this.transformer()?.fromControlValue(controlValue) ?? controlValue;\n\n this.slider.value = this.toSliderValue(fraction);\n }\n\n public getControlValue(): number {\n const {value} = this.slider;\n\n return this.transformer()?.toControlValue(value / this.totalSteps()) ?? value;\n }\n}\n\n@Directive({\n selector:\n 'input[tuiSlider][keySteps][ngModel],input[tuiSlider][keySteps][formControl],input[tuiSlider][keySteps][formControlName]',\n inputs: ['keySteps'],\n providers: [tuiFallbackValueProvider(0)],\n host: {\n '[value]': 'base.toSliderValue(value())',\n '[disabled]': 'disabled()',\n '(blur)': 'onTouched()',\n '(input)': 'setValue($event.target.value)',\n '(change)': 'setValue($event.target.value)',\n },\n})\nexport class TuiSliderKeySteps extends TuiControl<number> {\n protected readonly base = inject(TuiSliderKeyStepsBase);\n\n public set keySteps(steps: TuiKeySteps | null | undefined) {\n this.transformer = steps\n ? tuiCreateKeyStepsTransformer(steps)\n : TUI_IDENTITY_VALUE_TRANSFORMER;\n }\n\n protected setValue(sliderValue: number): void {\n this.onChange(\n this.base.transformer() ? sliderValue / this.base.totalSteps() : sliderValue,\n );\n }\n}\n","import {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOCUMENT} from '@angular/common';\nimport {Directive, inject, input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TUI_FALSE_HANDLER, TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {combineLatest, filter, map, merge, tap} from 'rxjs';\n\nconst SLIDER_INTERACTION_KEYS = new Set([\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'End',\n 'Home',\n 'PageDown',\n 'PageUp',\n]);\n\n/**\n * Native <input type='range' readonly> doesn't work.\n * This directive imitates this native behaviour.\n */\n@Directive({\n selector: 'input[tuiSlider][readonly]',\n host: {\n '(keydown)': 'preventKeyboardInteraction($event)',\n '(mousedown)': 'preventEvent($event)',\n },\n})\nexport class TuiSliderReadonly {\n private readonly el = tuiInjectElement<HTMLInputElement>();\n private readonly doc = inject(DOCUMENT);\n\n public readonly readonly = input(true, {transform: coerceBooleanProperty});\n\n constructor() {\n const touchStart$ = tuiTypedFromEvent(this.el, 'touchstart', {\n passive: false,\n });\n const touchMove$ = tuiTypedFromEvent(this.doc, 'touchmove', {\n passive: false,\n });\n const touchEnd$ = tuiTypedFromEvent(this.doc, 'touchend', {\n passive: true,\n });\n\n const shouldPreventMove$ = merge(\n touchStart$.pipe(\n tap((e) => this.preventEvent(e)),\n map(TUI_TRUE_HANDLER),\n ),\n touchEnd$.pipe(map(TUI_FALSE_HANDLER)),\n );\n\n /**\n * @bad TODO think about another solution.\n * Keep in mind that preventing touch event (on slider) inside `@HostListener('touchstart')` doesn't work for mobile chrome.\n */\n combineLatest([touchMove$, shouldPreventMove$])\n .pipe(\n filter(([_, shouldPreventMove]) => shouldPreventMove),\n takeUntilDestroyed(),\n )\n .subscribe(([moveEvent]) => this.preventEvent(moveEvent));\n }\n\n protected preventEvent(event: Event): void {\n if (event.cancelable && this.readonly()) {\n event.preventDefault();\n }\n }\n\n protected preventKeyboardInteraction(event: KeyboardEvent): void {\n if (SLIDER_INTERACTION_KEYS.has(event.key)) {\n this.preventEvent(event);\n }\n }\n}\n","/// <reference types=\"@taiga-ui/tsconfig/ng-dev-mode\" />\nimport {AsyncPipe} from '@angular/common';\nimport {\n type AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n contentChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {tuiHintOptionsProvider} from '@taiga-ui/core/portals/hint';\n\nimport {TuiSliderComponent} from '../slider.component';\n\n@Component({\n selector: '[tuiSliderThumbLabel]',\n imports: [AsyncPipe],\n templateUrl: './slider-thumb-label.template.html',\n styleUrl: './slider-thumb-label.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiHintOptionsProvider({direction: 'top', appearance: 'floating'})],\n})\nexport class TuiSliderThumbLabel implements AfterContentInit {\n protected readonly slider = contentChild(TuiSliderComponent);\n protected readonly control = contentChild(NgControl);\n\n public ngAfterContentInit(): void {\n ngDevMode &&\n console.assert(\n Boolean(this.control()?.valueChanges),\n '\\n[tuiSliderThumbLabel] expected <input tuiSlider type=\"range\" /> to use Angular Forms.\\n' +\n 'Use [(ngModel)] or [formControl] or formControlName for correct work.',\n );\n }\n\n protected get ratio(): number {\n return this.slider()?.valueRatio || 0;\n }\n\n protected get ghostStart(): number {\n return this.ratio * (this.slider()?.el.offsetWidth || 0);\n }\n}\n","@if (control()?.valueChanges | async) {}\n\n<div\n class=\"t-ghost\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.inset-inline-start.px]=\"ghostStart\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n","import {\n TuiSliderKeySteps,\n TuiSliderKeyStepsBase,\n} from './helpers/slider-key-steps.directive';\nimport {TuiSliderReadonly} from './helpers/slider-readonly.directive';\nimport {TuiSliderThumbLabel} from './helpers/slider-thumb-label.component';\nimport {TuiSliderComponent} from './slider.component';\n\nexport const TuiSlider = [\n TuiSliderComponent,\n TuiSliderThumbLabel,\n TuiSliderKeyStepsBase,\n TuiSliderKeySteps,\n TuiSliderReadonly,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAGA;;AAEG;AACI,MAAM,sBAAsB,GAAG;AAsBtC,SAAS,6BAA6B,CAClC,QAAqB,EACrB,EAAiE,EAAA;IAEjE,MAAM,iBAAiB,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC;AAE9E,IAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,iBAAiB,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;AAChE,IAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AACzC,QAAA,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;AAE3C,IAAA,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;AACjC;AAEgB,SAAA,2BAA2B,CACvC,eAAuB,EACvB,QAAqB,EAAA;AAErB,IAAA,MAAM,CAAC,CAAC,gBAAgB,EAAE,cAAc,CAAC,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC,GAC1E,6BAA6B,CACzB,QAAQ,EACR,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,KAAK,eAAe,IAAI,iBAAiB,CACnE;AACL,IAAA,MAAM,KAAK,GACP,CAAC,eAAe,GAAG,gBAAgB,KAAK,gBAAgB,GAAG,gBAAgB,CAAC;IAChF,MAAM,YAAY,GAAG,CAAC,cAAc,GAAG,cAAc,IAAI,KAAK,GAAG,cAAc;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