@taiga-ui/addon-doc 4.68.0 → 5.0.0-canary.0c88239

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 (139) hide show
  1. package/README.md +33 -43
  2. package/components/api/api-item-number.directive.d.ts +3 -3
  3. package/components/api/api-item.component.d.ts +12 -10
  4. package/components/api/api.component.d.ts +1 -2
  5. package/components/{documentation/pipes → api}/inspect.pipe.d.ts +1 -1
  6. package/components/{documentation/pipes → api}/type-reference.pipe.d.ts +3 -3
  7. package/components/code/index.d.ts +10 -6
  8. package/components/copy/index.d.ts +1 -1
  9. package/components/demo/index.d.ts +14 -10
  10. package/components/doc-tab/index.d.ts +2 -2
  11. package/components/example/example.component.d.ts +16 -17
  12. package/components/example/example.options.d.ts +1 -3
  13. package/components/index.d.ts +1 -11
  14. package/components/internal/header/index.d.ts +4 -4
  15. package/components/internal/source-code/source-code.component.d.ts +7 -8
  16. package/components/language-switcher/index.d.ts +1 -1
  17. package/components/main/main.component.d.ts +1 -2
  18. package/components/navigation/navigation.component.d.ts +7 -5
  19. package/components/navigation/scroll-into-view.directive.d.ts +5 -3
  20. package/components/page/page-tab.directive.d.ts +2 -2
  21. package/components/page/page.component.d.ts +9 -15
  22. package/components/page/page.providers.d.ts +1 -15
  23. package/components/theme-switcher/theme-switcher.component.d.ts +3 -2
  24. package/components/toc/index.d.ts +22 -0
  25. package/fesm2022/taiga-ui-addon-doc-components.mjs +388 -823
  26. package/fesm2022/taiga-ui-addon-doc-components.mjs.map +1 -1
  27. package/fesm2022/taiga-ui-addon-doc-services.mjs +5 -7
  28. package/fesm2022/taiga-ui-addon-doc-services.mjs.map +1 -1
  29. package/fesm2022/taiga-ui-addon-doc-tokens.mjs +28 -93
  30. package/fesm2022/taiga-ui-addon-doc-tokens.mjs.map +1 -1
  31. package/fesm2022/taiga-ui-addon-doc-types.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-addon-doc-utils.mjs +26 -8
  33. package/fesm2022/taiga-ui-addon-doc-utils.mjs.map +1 -1
  34. package/fesm2022/taiga-ui-addon-doc.mjs +4 -8
  35. package/fesm2022/taiga-ui-addon-doc.mjs.map +1 -1
  36. package/index.d.ts +3 -4
  37. package/package.json +20 -35
  38. package/tokens/doc-icons.d.ts +3 -11
  39. package/tokens/i18n.d.ts +1 -12
  40. package/tokens/pages.d.ts +1 -0
  41. package/types/page.d.ts +1 -3
  42. package/utils/index.d.ts +1 -0
  43. package/utils/inspect.d.ts +1 -1
  44. package/utils/provide-route-page-tab.d.ts +3 -4
  45. package/utils/to-kebab.d.ts +8 -0
  46. package/components/documentation/documentation-property-connector.directive.d.ts +0 -32
  47. package/components/documentation/documentation.component.d.ts +0 -23
  48. package/components/documentation/pipes/cleaner.pipe.d.ts +0 -7
  49. package/components/documentation/pipes/color.pipe.d.ts +0 -7
  50. package/components/documentation/pipes/opacity.pipe.d.ts +0 -7
  51. package/components/documentation/pipes/optional.pipe.d.ts +0 -7
  52. package/components/documentation/pipes/primitive-polymorpheus-content.pipe.d.ts +0 -7
  53. package/components/documentation/pipes/strip-optional.pipe.d.ts +0 -7
  54. package/components/internal/see-also/index.d.ts +0 -9
  55. package/directives/index.d.ts +0 -1
  56. package/directives/text-code/text-code.directive.d.ts +0 -9
  57. package/esm2022/components/api/api-item-number.directive.mjs +0 -23
  58. package/esm2022/components/api/api-item.component.mjs +0 -118
  59. package/esm2022/components/api/api.component.mjs +0 -16
  60. package/esm2022/components/code/index.mjs +0 -46
  61. package/esm2022/components/copy/index.mjs +0 -29
  62. package/esm2022/components/demo/index.mjs +0 -170
  63. package/esm2022/components/doc-tab/index.mjs +0 -17
  64. package/esm2022/components/documentation/documentation-property-connector.directive.mjs +0 -134
  65. package/esm2022/components/documentation/documentation.component.mjs +0 -108
  66. package/esm2022/components/documentation/pipes/cleaner.pipe.mjs +0 -18
  67. package/esm2022/components/documentation/pipes/color.pipe.mjs +0 -39
  68. package/esm2022/components/documentation/pipes/inspect.pipe.mjs +0 -33
  69. package/esm2022/components/documentation/pipes/opacity.pipe.mjs +0 -30
  70. package/esm2022/components/documentation/pipes/optional.pipe.mjs +0 -18
  71. package/esm2022/components/documentation/pipes/primitive-polymorpheus-content.pipe.mjs +0 -19
  72. package/esm2022/components/documentation/pipes/strip-optional.pipe.mjs +0 -18
  73. package/esm2022/components/documentation/pipes/type-reference.pipe.mjs +0 -29
  74. package/esm2022/components/example/example-get-tabs.pipe.mjs +0 -18
  75. package/esm2022/components/example/example.component.mjs +0 -118
  76. package/esm2022/components/example/example.options.mjs +0 -19
  77. package/esm2022/components/index.mjs +0 -33
  78. package/esm2022/components/internal/header/index.mjs +0 -39
  79. package/esm2022/components/internal/see-also/index.mjs +0 -26
  80. package/esm2022/components/internal/source-code/source-code.component.mjs +0 -54
  81. package/esm2022/components/language-switcher/index.mjs +0 -77
  82. package/esm2022/components/main/main.component.mjs +0 -41
  83. package/esm2022/components/navigation/navigation.component.mjs +0 -205
  84. package/esm2022/components/navigation/navigation.providers.mjs +0 -59
  85. package/esm2022/components/navigation/scroll-into-view.directive.mjs +0 -32
  86. package/esm2022/components/page/page-tab.directive.mjs +0 -20
  87. package/esm2022/components/page/page.component.mjs +0 -78
  88. package/esm2022/components/page/page.providers.mjs +0 -34
  89. package/esm2022/components/taiga-ui-addon-doc-components.mjs +0 -5
  90. package/esm2022/components/theme-switcher/theme-switcher.component.mjs +0 -45
  91. package/esm2022/directives/index.mjs +0 -2
  92. package/esm2022/directives/taiga-ui-addon-doc-directives.mjs +0 -5
  93. package/esm2022/directives/text-code/text-code.directive.mjs +0 -27
  94. package/esm2022/index.mjs +0 -28
  95. package/esm2022/services/index.mjs +0 -2
  96. package/esm2022/services/taiga-ui-addon-doc-services.mjs +0 -5
  97. package/esm2022/services/theme-dark.service.mjs +0 -52
  98. package/esm2022/taiga-ui-addon-doc.mjs +0 -5
  99. package/esm2022/tokens/code-actions.mjs +0 -8
  100. package/esm2022/tokens/code-editor.mjs +0 -6
  101. package/esm2022/tokens/default-tabs.mjs +0 -8
  102. package/esm2022/tokens/doc-icons.mjs +0 -29
  103. package/esm2022/tokens/example-content-processor.mjs +0 -16
  104. package/esm2022/tokens/excluded-properties.mjs +0 -11
  105. package/esm2022/tokens/i18n.mjs +0 -62
  106. package/esm2022/tokens/index.mjs +0 -17
  107. package/esm2022/tokens/logo.mjs +0 -8
  108. package/esm2022/tokens/page-loaded.mjs +0 -9
  109. package/esm2022/tokens/pages.mjs +0 -12
  110. package/esm2022/tokens/see-also.mjs +0 -8
  111. package/esm2022/tokens/source-code.mjs +0 -8
  112. package/esm2022/tokens/support-language.mjs +0 -5
  113. package/esm2022/tokens/taiga-ui-addon-doc-tokens.mjs +0 -5
  114. package/esm2022/tokens/title.mjs +0 -8
  115. package/esm2022/tokens/type-reference-handler.mjs +0 -9
  116. package/esm2022/tokens/url-state-handler.mjs +0 -27
  117. package/esm2022/types/code-editor.mjs +0 -2
  118. package/esm2022/types/demo-params.mjs +0 -2
  119. package/esm2022/types/index.mjs +0 -2
  120. package/esm2022/types/page.mjs +0 -6
  121. package/esm2022/types/source-code-path-options.mjs +0 -2
  122. package/esm2022/types/taiga-ui-addon-doc-types.mjs +0 -5
  123. package/esm2022/utils/clean-object.mjs +0 -10
  124. package/esm2022/utils/coerce-boolean.mjs +0 -4
  125. package/esm2022/utils/coerce-value.mjs +0 -43
  126. package/esm2022/utils/index.mjs +0 -14
  127. package/esm2022/utils/inspect.mjs +0 -67
  128. package/esm2022/utils/is-page-group.mjs +0 -4
  129. package/esm2022/utils/parse-code-block.mjs +0 -9
  130. package/esm2022/utils/provide-route-page-tab.mjs +0 -13
  131. package/esm2022/utils/raw-load-record.mjs +0 -11
  132. package/esm2022/utils/raw-load.mjs +0 -4
  133. package/esm2022/utils/sort-pages.mjs +0 -26
  134. package/esm2022/utils/taiga-ui-addon-doc-utils.mjs +0 -5
  135. package/esm2022/utils/to-flat-map-pages.mjs +0 -22
  136. package/esm2022/utils/transliterate-keyboard-layout.mjs +0 -47
  137. package/esm2022/utils/type-reference-parser.mjs +0 -21
  138. package/fesm2022/taiga-ui-addon-doc-directives.mjs +0 -33
  139. package/fesm2022/taiga-ui-addon-doc-directives.mjs.map +0 -1
@@ -1,100 +1,118 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Component, ViewEncapsulation, ChangeDetectionStrategy, TemplateRef, Pipe, Directive, Input, EventEmitter, Output, PLATFORM_ID, signal, computed, ViewChild, ContentChild, ChangeDetectorRef, DestroyRef, ContentChildren, InjectionToken, ElementRef } from '@angular/core';
3
- import { TUI_DOC_DOCUMENTATION_TEXTS, TUI_DOC_TYPE_REFERENCE_PARSER, TUI_DOC_TYPE_REFERENCE_HANDLER, TUI_DOC_URL_STATE_HANDLER, TUI_DOC_ICONS, TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR, TUI_DOC_DEMO_TEXTS, TUI_DOC_EXCLUDED_PROPERTIES, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_EXAMPLE_TEXTS, TUI_DOC_CODE_EDITOR, TUI_DOC_CODE_ACTIONS, TUI_DOC_TITLE, TUI_DOC_PAGES, TUI_DOC_PAGE_LOADED, TUI_DOC_SEARCH_TEXT, TUI_DOC_SEARCH_ENABLED, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_MAP_PAGES, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_DIRECTION_ENABLED, TUI_DOC_SEE_ALSO, TUI_DOC_SUPPORT_LANGUAGE, TUI_DOC_DEFAULT_TABS } from '@taiga-ui/addon-doc/tokens';
4
- import { Location, NgForOf, NgIf, NgSwitch, NgSwitchCase, isPlatformServer, JsonPipe, NgTemplateOutlet, DOCUMENT, TitleCasePipe, KeyValuePipe } from '@angular/common';
2
+ import { ChangeDetectionStrategy, ViewEncapsulation, Component, input, Directive, inject, TemplateRef, Pipe, computed, model, PLATFORM_ID, viewChild, ElementRef, contentChild, signal, InjectionToken, effect, contentChildren } from '@angular/core';
3
+ import * as i3 from '@taiga-ui/core/portals/hint';
4
+ import { tuiHintOptionsProvider, TuiHint } from '@taiga-ui/core/portals/hint';
5
+ import { Location, NgTemplateOutlet, isPlatformServer, DOCUMENT, AsyncPipe, NgComponentOutlet, TitleCasePipe, KeyValuePipe } from '@angular/common';
5
6
  import * as i1 from '@angular/forms';
6
7
  import { FormsModule, FormGroup, ReactiveFormsModule, FormControl } from '@angular/forms';
7
- import { ActivatedRoute, UrlSerializer, RouterLink, RouterLinkActive, Router, NavigationEnd, Scroll, RouterOutlet } from '@angular/router';
8
- import { tuiInspectAny, tuiCoerceValue, tuiRawLoad, tuiCoerceValueIsTrue, tuiCleanObject, tuiRawLoadRecord, tuiTransliterateKeyboardLayout } from '@taiga-ui/addon-doc/utils';
9
- import { tuiIsNumber, tuiPx, tuiPure, tuiIsString, tuiProvideOptions, tuiIsPresent, tuiUniqBy } from '@taiga-ui/cdk/utils/miscellaneous';
10
- import { TuiAlertService } from '@taiga-ui/core/components/alert';
11
- import { TuiIcon } from '@taiga-ui/core/components/icon';
12
- import * as i4 from '@taiga-ui/core/components/textfield';
13
- import { TuiTextfield, TuiTextfieldDirective } from '@taiga-ui/core/components/textfield';
8
+ import { ActivatedRoute, UrlSerializer, RouterLink, Router, NavigationEnd, Scroll, RouterLinkActive, RouterOutlet } from '@angular/router';
9
+ import { TUI_DOC_TYPE_REFERENCE_PARSER, TUI_DOC_TYPE_REFERENCE_HANDLER, TUI_DOC_URL_STATE_HANDLER, TUI_DOC_ICONS, TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR, TUI_DOC_DEMO_TEXTS, TUI_DOC_EXAMPLE_CONTENT_PROCESSOR, TUI_DOC_EXAMPLE_TEXTS, TUI_DOC_CODE_EDITOR, TUI_DOC_CODE_ACTIONS, TUI_DOC_TITLE, TUI_DOC_PAGES, TUI_DOC_PAGE_LOADED, TUI_DOC_SEARCH_TEXT, TUI_DOC_SEARCH_ENABLED, TUI_DOC_PAGES_ICONS, TUI_DOC_LOGO, TUI_DOC_MENU_TEXT, TUI_DOC_SOURCE_CODE, TUI_DOC_SOURCE_CODE_TEXT, TUI_DOC_DIRECTION_ENABLED, TUI_DOC_MAP_PAGES, TUI_DOC_SEE_ALSO_TEXT, TUI_DOC_TOC_TEXT, TUI_DOC_SEE_ALSO, TUI_DOC_SUPPORT_LANGUAGE, TUI_DOC_DEFAULT_TABS } from '@taiga-ui/addon-doc/tokens';
10
+ import { tuiInspect, tuiCoerceValue, tuiRawLoad, tuiCoerceValueIsTrue, tuiCleanObject, tuiToKebab, tuiRawLoadRecord, tuiTransliterateKeyboardLayout, TuiDocKebabPipe } from '@taiga-ui/addon-doc/utils';
11
+ import { tuiIsNumber, tuiPx, tuiIsPresent, tuiArrayToggle } from '@taiga-ui/cdk/utils/miscellaneous';
12
+ import * as i6$1 from '@taiga-ui/core/components/input';
13
+ import { TuiInput, TuiInputDirective } from '@taiga-ui/core/components/input';
14
+ import { TuiNotificationService } from '@taiga-ui/core/components/notification';
14
15
  import * as i2 from '@taiga-ui/kit/components/data-list-wrapper';
15
16
  import { TuiDataListWrapper } from '@taiga-ui/kit/components/data-list-wrapper';
16
- import * as i3 from '@taiga-ui/kit/components/input-number';
17
+ import * as i7 from '@taiga-ui/kit/components/input-number';
17
18
  import { TuiInputNumber } from '@taiga-ui/kit/components/input-number';
19
+ import * as i3$1 from '@taiga-ui/kit/components/select';
20
+ import { TuiSelect } from '@taiga-ui/kit/components/select';
18
21
  import { TuiSwitch } from '@taiga-ui/kit/components/switch';
19
22
  import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
20
- import { TUI_IS_E2E } from '@taiga-ui/cdk/tokens';
23
+ import { WA_IS_E2E } from '@ng-web-apis/platform';
24
+ import * as i5 from '@taiga-ui/core/components/textfield';
25
+ import { TuiTextfield } from '@taiga-ui/core/components/textfield';
26
+ import * as i6 from '@taiga-ui/core/portals/dropdown';
21
27
  import * as i1$1 from '@angular/cdk/clipboard';
22
28
  import { ClipboardModule, Clipboard } from '@angular/cdk/clipboard';
23
29
  import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
24
30
  import { TuiButton } from '@taiga-ui/core/components/button';
25
31
  import { TUI_COPY_TEXTS } from '@taiga-ui/kit/tokens';
26
32
  import { Highlight } from 'ngx-highlightjs';
27
- import { BehaviorSubject, Subject, map, switchMap, timer, startWith, skip, merge, ReplaySubject, switchAll, filter, mergeMap, take, debounceTime, combineLatest, fromEvent, of, distinctUntilChanged } from 'rxjs';
28
- import { TUI_FALSE_HANDLER, EMPTY_QUERY } from '@taiga-ui/cdk/constants';
29
- import { __decorate } from 'tslib';
33
+ import { BehaviorSubject, Subject, switchMap, timer, map, startWith, skip, filter, mergeMap, ReplaySubject, take, debounceTime, combineLatest, fromEvent, of } from 'rxjs';
34
+ import { TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
35
+ import * as i4$1 from '@taiga-ui/cdk/directives/item';
36
+ import { TuiItem } from '@taiga-ui/cdk/directives/item';
30
37
  import { TuiResizable, TuiResizer } from '@taiga-ui/cdk/directives/resizer';
31
38
  import { tuiInjectElement, tuiGetElementObscures } from '@taiga-ui/cdk/utils/dom';
32
- import { tuiToInteger, tuiClamp } from '@taiga-ui/cdk/utils/math';
33
- import * as i4$1 from '@taiga-ui/core/components/expand';
39
+ import { tuiClamp } from '@taiga-ui/cdk/utils/math';
40
+ import * as i3$2 from '@taiga-ui/core/components/expand';
34
41
  import { TuiExpand } from '@taiga-ui/core/components/expand';
35
- import { TuiGroup } from '@taiga-ui/core/directives/group';
36
- import { TUI_DARK_MODE, TUI_COMMON_ICONS, TUI_THEME } from '@taiga-ui/core/tokens';
37
- import * as i5 from '@taiga-ui/legacy/components/select';
38
- import { TuiSelectModule } from '@taiga-ui/legacy/components/select';
39
- import * as i8 from '@taiga-ui/legacy/directives/textfield-controller';
40
- import { TuiTextfieldControllerModule } from '@taiga-ui/legacy/directives/textfield-controller';
41
- import * as i3$1 from '@taiga-ui/core/components/data-list';
42
- import { TuiDataList } from '@taiga-ui/core/components/data-list';
43
- import { trigger, transition, style, animate } from '@angular/animations';
44
- import { tuiQueryListChanges, tuiWatch, tuiZonefreeScheduler, tuiControlValue } from '@taiga-ui/cdk/observables';
45
- import { TuiFilterPipe } from '@taiga-ui/cdk/pipes/filter';
46
- import { TuiToArrayPipe } from '@taiga-ui/cdk/pipes/to-array';
47
- import { TuiNotification } from '@taiga-ui/core/components/notification';
48
- import { tuiScrollbarOptionsProvider, TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
49
- import * as i4$2 from '@taiga-ui/core/directives/dropdown';
50
- import { TuiDropdown } from '@taiga-ui/core/directives/dropdown';
51
- import { TuiBadge } from '@taiga-ui/kit/components/badge';
52
- import { tuiRgbToHex } from '@taiga-ui/cdk/utils/color';
42
+ import { TuiIcon } from '@taiga-ui/core/components/icon';
43
+ import { TUI_DARK_MODE, TUI_COMMON_ICONS, TUI_BREAKPOINT } from '@taiga-ui/core/tokens';
44
+ import * as i4 from '@taiga-ui/core/components/label';
53
45
  import { WA_LOCATION, WA_LOCAL_STORAGE } from '@ng-web-apis/common';
54
- import { TuiLet } from '@taiga-ui/cdk/directives/let';
46
+ import * as i1$2 from '@ng-web-apis/intersection-observer';
47
+ import { WaIntersectionObserverDirective, WaIntersectionObservee } from '@ng-web-apis/intersection-observer';
55
48
  import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
56
- import { TuiFullscreen } from '@taiga-ui/core/components/fullscreen';
57
49
  import { TuiLink, tuiLinkOptionsProvider } from '@taiga-ui/core/components/link';
58
50
  import { TuiLoader } from '@taiga-ui/core/components/loader';
59
- import * as i2$1 from '@taiga-ui/kit/components/tabs';
60
- import { TuiTabs } from '@taiga-ui/kit/components/tabs';
61
- import { PolymorpheusComponent, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
51
+ import { TuiTitle } from '@taiga-ui/core/components/title';
52
+ import { TuiFullscreen } from '@taiga-ui/kit/components/fullscreen';
53
+ import { TuiSegmented } from '@taiga-ui/kit/components/segmented';
54
+ import { TuiHeader } from '@taiga-ui/layout/components/header';
55
+ import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
62
56
  import { TUI_EXAMPLE_PRIMARY_FILE_NAME } from '@taiga-ui/addon-doc/types';
63
- import * as i1$2 from '@taiga-ui/cdk/directives/item';
64
- import * as i1$3 from '@taiga-ui/addon-mobile/directives/sidebar';
65
- import { TuiSidebarDirective, TuiSidebar } from '@taiga-ui/addon-mobile/directives/sidebar';
66
- import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
57
+ import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
58
+ import { TuiPopup } from '@taiga-ui/core/portals/popup';
59
+ import { TuiDrawer } from '@taiga-ui/kit/components/drawer';
67
60
  import { Title } from '@angular/platform-browser';
68
61
  import { tuiAutoFocusOptionsProvider, TuiAutoFocus } from '@taiga-ui/cdk/directives/auto-focus';
69
- import * as i2$2 from '@taiga-ui/kit/components/accordion';
62
+ import { tuiZonefreeScheduler, tuiControlValue, tuiWatch } from '@taiga-ui/cdk/observables';
63
+ import * as i2$2 from '@taiga-ui/core/components/data-list';
64
+ import { TuiDataList } from '@taiga-ui/core/components/data-list';
65
+ import { tuiScrollbarOptionsProvider, TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
66
+ import * as i2$1 from '@taiga-ui/kit/components/accordion';
70
67
  import { TuiAccordion } from '@taiga-ui/kit/components/accordion';
71
- import { TuiInputModule } from '@taiga-ui/legacy/components/input';
72
- import { TuiFlagPipe } from '@taiga-ui/core/pipes/flag';
73
68
  import { TuiLanguageSwitcherService } from '@taiga-ui/i18n/utils';
74
- import * as i2$3 from '@taiga-ui/kit/components/badged-content';
75
- import { TuiBadgedContent } from '@taiga-ui/kit/components/badged-content';
69
+ import { TuiBadge } from '@taiga-ui/kit/components/badge';
76
70
  import { TuiButtonSelect } from '@taiga-ui/kit/directives/button-select';
71
+ import { TuiFlagPipe } from '@taiga-ui/kit/pipes/flag';
77
72
  import { TuiRoot } from '@taiga-ui/core/components/root';
78
- import { TuiReplacePipe } from '@taiga-ui/cdk/pipes/replace';
79
- import { TuiAutoColorPipe } from '@taiga-ui/core/pipes/auto-color';
80
- import { TuiChip } from '@taiga-ui/kit/components/chip';
81
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
73
+ import { TuiAutoColorPipe } from '@taiga-ui/kit/pipes/auto-color';
82
74
 
83
75
  class TuiDocAPI {
76
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocAPI, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
77
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: TuiDocAPI, isStandalone: true, selector: "table[tuiDocAPI]", providers: [tuiHintOptionsProvider({ appearance: 'floating' })], ngImport: i0, template: `
78
+ <thead>
79
+ <tr>
80
+ <ng-content select="th" />
81
+ </tr>
82
+ </thead>
83
+ <tbody><ng-content /></tbody>
84
+ <ng-content select="tbody" />
85
+ `, isInline: true, styles: ["[tuiDocAPI]{inline-size:100%}[tuiDocAPI] tbody [tuiTitle]{align-items:flex-start;padding:1rem;box-shadow:0 1px var(--tui-border-normal);background:var(--tui-background-base-alt)}[tuiTheme=dark] [tuiDocAPI] tbody [tuiTitle]{background:var(--tui-background-elevation-2)}[tuiDocAPI] tbody [tuiTitle] [tuiSubtitle]{color:var(--tui-text-secondary)}[tuiDocAPI] th{padding:.5rem 0;color:var(--tui-text-secondary);font:var(--tui-font-body-s);text-align:start;box-shadow:inset 0 -1px var(--tui-border-normal)}[tuiDocAPI] th:last-child{text-align:end}@media screen and (max-width: 767.4px){[tuiDocAPI],[tuiDocAPI] tbody,[tuiDocAPI] tr{display:flex;flex-direction:column}[tuiDocAPI] th,[tuiDocAPI] tbody th,[tuiDocAPI] tr th{display:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
86
+ }
87
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocAPI, decorators: [{
88
+ type: Component,
89
+ args: [{ selector: 'table[tuiDocAPI]', template: `
90
+ <thead>
91
+ <tr>
92
+ <ng-content select="th" />
93
+ </tr>
94
+ </thead>
95
+ <tbody><ng-content /></tbody>
96
+ <ng-content select="tbody" />
97
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiHintOptionsProvider({ appearance: 'floating' })], styles: ["[tuiDocAPI]{inline-size:100%}[tuiDocAPI] tbody [tuiTitle]{align-items:flex-start;padding:1rem;box-shadow:0 1px var(--tui-border-normal);background:var(--tui-background-base-alt)}[tuiTheme=dark] [tuiDocAPI] tbody [tuiTitle]{background:var(--tui-background-elevation-2)}[tuiDocAPI] tbody [tuiTitle] [tuiSubtitle]{color:var(--tui-text-secondary)}[tuiDocAPI] th{padding:.5rem 0;color:var(--tui-text-secondary);font:var(--tui-font-body-s);text-align:start;box-shadow:inset 0 -1px var(--tui-border-normal)}[tuiDocAPI] th:last-child{text-align:end}@media screen and (max-width: 767.4px){[tuiDocAPI],[tuiDocAPI] tbody,[tuiDocAPI] tr{display:flex;flex-direction:column}[tuiDocAPI] th,[tuiDocAPI] tbody th,[tuiDocAPI] tr th{display:none}}\n"] }]
98
+ }] });
99
+
100
+ class TuiDocAPINumberItem {
84
101
  constructor() {
85
- this.texts = inject(TUI_DOC_DOCUMENTATION_TEXTS);
102
+ this.min = input(null);
103
+ this.max = input(null);
86
104
  }
87
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocAPI, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
88
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocAPI, isStandalone: true, selector: "table[tuiDocAPI]", ngImport: i0, template: "<thead>\n <tr>\n <th>{{ texts[2] }}</th>\n <th>{{ texts[1] }}</th>\n <th>{{ texts[3] }}</th>\n </tr>\n</thead>\n<ng-content />\n", styles: ["[tuiDocAPI]{inline-size:100%}[tuiDocAPI] tbody [tuiTitle]{align-items:flex-start;color:var(--tui-text-secondary);padding:1rem;box-shadow:0 1px var(--tui-border-normal);background:var(--tui-background-base-alt)}[tuiDocAPI] th{padding:.5rem 0;color:var(--tui-text-secondary);font-weight:400;text-align:start;box-shadow:inset 0 -1px var(--tui-border-normal)}[tuiDocAPI] th:last-child{text-align:end}@media screen and (max-width: 47.9625em){[tuiDocAPI],[tuiDocAPI] tbody,[tuiDocAPI] tr{display:flex;flex-direction:column}[tuiDocAPI] th,[tuiDocAPI] tbody th,[tuiDocAPI] tr th{display:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
105
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocAPINumberItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
106
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.18", type: TuiDocAPINumberItem, isStandalone: true, selector: "tr[tuiDocAPIItem][type=number]", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
89
107
  }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocAPI, decorators: [{
91
- type: Component,
92
- args: [{ standalone: true, selector: 'table[tuiDocAPI]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<thead>\n <tr>\n <th>{{ texts[2] }}</th>\n <th>{{ texts[1] }}</th>\n <th>{{ texts[3] }}</th>\n </tr>\n</thead>\n<ng-content />\n", styles: ["[tuiDocAPI]{inline-size:100%}[tuiDocAPI] tbody [tuiTitle]{align-items:flex-start;color:var(--tui-text-secondary);padding:1rem;box-shadow:0 1px var(--tui-border-normal);background:var(--tui-background-base-alt)}[tuiDocAPI] th{padding:.5rem 0;color:var(--tui-text-secondary);font-weight:400;text-align:start;box-shadow:inset 0 -1px var(--tui-border-normal)}[tuiDocAPI] th:last-child{text-align:end}@media screen and (max-width: 47.9625em){[tuiDocAPI],[tuiDocAPI] tbody,[tuiDocAPI] tr{display:flex;flex-direction:column}[tuiDocAPI] th,[tuiDocAPI] tbody th,[tuiDocAPI] tr th{display:none}}\n"] }]
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocAPINumberItem, decorators: [{
109
+ type: Directive,
110
+ args: [{ selector: 'tr[tuiDocAPIItem][type=number]' }]
93
111
  }] });
94
112
 
95
113
  class TuiInspectPipe {
96
114
  constructor() {
97
- this.isE2E = inject(TUI_IS_E2E);
115
+ this.isE2E = inject(WA_IS_E2E);
98
116
  }
99
117
  transform(value, depth = 2) {
100
118
  if (this.isE2E && typeof value === 'function') {
@@ -107,20 +125,17 @@ class TuiInspectPipe {
107
125
  */
108
126
  return 'λ(x) => y';
109
127
  }
110
- return value instanceof TemplateRef ? 'TemplateRef' : tuiInspectAny(value, depth);
128
+ return value instanceof TemplateRef ? 'TemplateRef' : tuiInspect(value, depth);
111
129
  }
112
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInspectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
113
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiInspectPipe, isStandalone: true, name: "tuiInspectAny" }); }
130
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiInspectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
131
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: TuiInspectPipe, isStandalone: true, name: "tuiInspect" }); }
114
132
  }
115
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiInspectPipe, decorators: [{
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiInspectPipe, decorators: [{
116
134
  type: Pipe,
117
- args: [{
118
- standalone: true,
119
- name: 'tuiInspectAny',
120
- }]
135
+ args: [{ name: 'tuiInspect' }]
121
136
  }] });
122
137
 
123
- class TuiDocTypeReferencePipe {
138
+ class TuiTypeReferencePipe {
124
139
  constructor() {
125
140
  this.parser = inject(TUI_DOC_TYPE_REFERENCE_PARSER);
126
141
  this.linkHandler = inject(TUI_DOC_TYPE_REFERENCE_HANDLER);
@@ -134,84 +149,64 @@ class TuiDocTypeReferencePipe {
134
149
  }))
135
150
  .sort((a, b) => b.reference?.localeCompare(a.reference ?? '') ?? -1);
136
151
  }
137
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocTypeReferencePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
138
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiDocTypeReferencePipe, isStandalone: true, name: "tuiDocTypeReference" }); }
152
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiTypeReferencePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
153
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: TuiTypeReferencePipe, isStandalone: true, name: "tuiTypeReference" }); }
139
154
  }
140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocTypeReferencePipe, decorators: [{
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiTypeReferencePipe, decorators: [{
141
156
  type: Pipe,
142
- args: [{
143
- standalone: true,
144
- name: 'tuiDocTypeReference',
145
- }]
157
+ args: [{ name: 'tuiTypeReference' }]
146
158
  }] });
147
159
 
148
- class TuiDocAPINumberItem {
149
- constructor() {
150
- this.min = null;
151
- this.max = null;
152
- }
153
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocAPINumberItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
154
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocAPINumberItem, isStandalone: true, selector: "tr[tuiDocAPIItem][type=number]", inputs: { min: "min", max: "max" }, ngImport: i0 }); }
155
- }
156
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocAPINumberItem, decorators: [{
157
- type: Directive,
158
- args: [{
159
- standalone: true,
160
- selector: 'tr[tuiDocAPIItem][type=number]',
161
- }]
162
- }], propDecorators: { min: [{
163
- type: Input
164
- }], max: [{
165
- type: Input
166
- }] } });
167
-
168
- const SERIALIZED_SUFFIX$1 = '$';
160
+ const SERIALIZED_SUFFIX = '$';
169
161
  class TuiDocAPIItem {
170
162
  constructor() {
171
163
  this.locationRef = inject(Location);
172
164
  this.activatedRoute = inject(ActivatedRoute);
173
165
  this.urlSerializer = inject(UrlSerializer);
174
166
  this.urlStateHandler = inject(TUI_DOC_URL_STATE_HANDLER);
175
- this.alerts = inject(TuiAlertService);
176
- this.icons = inject(TUI_DOC_ICONS);
167
+ this.alerts = inject(TuiNotificationService);
177
168
  this.numberItem = inject(TuiDocAPINumberItem, {
178
169
  self: true,
179
170
  optional: true,
180
171
  });
181
- this.name = '';
182
- this.type = '';
183
- this.items = [];
184
- this.valueChange = new EventEmitter();
172
+ this.isBananaBox = computed(() => this.name().startsWith('[('));
173
+ this.isInput = computed(() => this.name().startsWith('['));
174
+ this.isOutput = computed(() => this.name().startsWith('('));
175
+ this.name = input('');
176
+ this.type = input('');
177
+ this.value = model();
178
+ this.items = input([], { transform: (v) => v || [] });
179
+ this.hasCleaner = computed(() => this.type().includes('null') || this.type().includes('PolymorpheusContent'));
185
180
  }
186
- ngAfterViewInit() {
181
+ ngOnInit() {
187
182
  this.parseParams(this.activatedRoute.snapshot.queryParams);
188
183
  }
189
184
  onValueChange(value) {
190
- this.value = value;
191
- this.valueChange.emit(value);
185
+ this.value.set(value);
192
186
  this.setQueryParam(value);
193
187
  }
194
188
  emitEvent(event) {
195
189
  console.info('emitEvent', event);
196
190
  const alert = !event || event?.toString() === '[object Object]'
197
- ? tuiInspectAny(event, 2)
191
+ ? tuiInspect(event, 2)
198
192
  : event;
199
- this.alerts.open(alert, { label: this.name }).subscribe();
193
+ this.alerts.open(alert, { label: this.name() }).subscribe();
200
194
  }
201
195
  clearBrackets(value) {
202
196
  return value.replaceAll(/[()[\]]/g, '');
203
197
  }
204
198
  parseParams(params) {
205
- const name = this.clearBrackets(this.name);
199
+ const name = this.clearBrackets(this.name());
206
200
  const propertyValue = params[name];
207
- const propertyValueWithSuffix = params[`${name}${SERIALIZED_SUFFIX$1}`];
201
+ const propertyValueWithSuffix = params[`${name}${SERIALIZED_SUFFIX}`];
208
202
  if (!propertyValue && !propertyValueWithSuffix) {
209
203
  return;
210
204
  }
211
- let value = !!propertyValueWithSuffix && this.items
212
- ? this.items[propertyValueWithSuffix]
205
+ const items = this.items();
206
+ let value = !!propertyValueWithSuffix && items
207
+ ? items[propertyValueWithSuffix]
213
208
  : tuiCoerceValue(propertyValue);
214
- if (this.type === 'string' && tuiIsNumber(value)) {
209
+ if (this.type() === 'string' && tuiIsNumber(value)) {
215
210
  value = value.toString();
216
211
  }
217
212
  this.onValueChange(value);
@@ -219,109 +214,108 @@ class TuiDocAPIItem {
219
214
  setQueryParam(value) {
220
215
  const tree = this.urlSerializer.parse(this.locationRef.path());
221
216
  const isValueAvailableByKey = value instanceof Object;
222
- const computedValue = isValueAvailableByKey && this.items ? this.items.indexOf(value) : value;
223
- const suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX$1 : '';
224
- const propName = this.clearBrackets(this.name) + suffix;
217
+ const items = this.items();
218
+ const computedValue = isValueAvailableByKey && items ? items.indexOf(value) : value;
219
+ const suffix = isValueAvailableByKey ? SERIALIZED_SUFFIX : '';
220
+ const propName = this.clearBrackets(this.name()) + suffix;
225
221
  tree.queryParams = {
226
222
  ...tree.queryParams,
227
223
  [propName]: computedValue,
228
224
  };
229
225
  this.locationRef.go(this.urlStateHandler(tree));
230
226
  }
231
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocAPIItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
232
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocAPIItem, isStandalone: true, selector: "tr[tuiDocAPIItem]", inputs: { name: "name", type: "type", value: "value", items: "items" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<td class=\"t-td\">\n <code\n class=\"t-name\"\n [class.t-name_banana]=\"name.startsWith('[(')\"\n [class.t-name_input]=\"name.startsWith('[')\"\n [class.t-name_output]=\"name.startsWith('(')\"\n >\n {{ name }}\n </code>\n <ng-content />\n</td>\n<td class=\"t-td\">\n <code class=\"t-type\">\n <ng-container *ngFor=\"let item of type | tuiDocTypeReference; let last = last\">\n <a\n *ngIf=\"item.reference; else default\"\n target=\"_blank\"\n class=\"t-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n <tui-icon\n *ngIf=\"icons.externalLink\"\n [icon]=\"icons.externalLink\"\n [style.font-size.rem]=\"1\"\n />\n </a>\n <ng-template #default>\n {{ item.type }}\n </ng-template>\n <span *ngIf=\"!last\">&nbsp;|&nbsp;</span>\n </ng-container>\n </code>\n</td>\n<td class=\"t-td\">\n <tui-textfield\n *ngIf=\"items.length; else noItems\"\n tuiChevron\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [content]=\"content\"\n [tuiTextfieldCleaner]=\"type.includes('null') || type.includes('PolymorpheusContent')\"\n >\n <select\n placeholder=\"null\"\n tuiTextfield\n [ngModel]=\"value ?? null\"\n (ngModelChange)=\"onValueChange($event)\"\n ></select>\n <tui-data-list-wrapper\n *tuiTextfieldDropdown\n [itemContent]=\"content\"\n [items]=\"items\"\n />\n </tui-textfield>\n <ng-template\n #content\n let-data\n >\n <code [style.margin]=\"0\">{{ data | tuiInspectAny }}</code>\n </ng-template>\n <ng-template #noItems>\n <ng-container\n *ngIf=\"value !== undefined\"\n [ngSwitch]=\"type\"\n >\n <input\n *ngSwitchCase=\"'boolean'\"\n tuiSwitch\n type=\"checkbox\"\n [id]=\"name\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n\n <tui-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n >\n <input\n tuiTextfield\n [id]=\"name\"\n [ngModel]=\"value || ''\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n </tui-textfield>\n\n <tui-textfield\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n >\n <input\n tuiInputNumber\n [id]=\"name\"\n [max]=\"numberItem?.max ?? null\"\n [min]=\"numberItem?.min ?? null\"\n [ngModel]=\"value\"\n [step]=\"1\"\n (ngModelChange)=\"onValueChange($event || 0)\"\n />\n </tui-textfield>\n </ng-container>\n </ng-template>\n</td>\n", styles: [":host{box-shadow:inset 0 -1px var(--tui-border-normal)}.t-td{padding:1.5rem 2rem 1.5rem 0;vertical-align:top}.t-td:last-child{padding-inline-end:0;text-align:end;min-inline-size:10rem}.t-name{display:flex!important;min-block-size:1.5rem;inline-size:-webkit-fit-content;inline-size:-moz-fit-content;inline-size:fit-content;margin:0 0 .5rem!important;-webkit-text-fill-color:var(--tui-background-accent-2-pressed)}.t-name_input{-webkit-text-fill-color:var(--tui-text-negative)}.t-name_banana{-webkit-text-fill-color:var(--tui-text-action)}.t-name_output{-webkit-text-fill-color:var(--tui-status-info)}.t-type{flex-wrap:wrap;align-items:center;justify-content:flex-start;min-block-size:1.5rem;margin:0!important}.t-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-input{min-inline-size:10rem;margin-block-start:-.625rem}.t-input code{overflow:hidden;white-space:nowrap}@media screen and (max-width: 47.9625em){:host{gap:1rem;padding:1rem 0}.t-td{padding:0}.t-td:last-child{text-align:start}.t-input{margin:0}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "pipe", type: TuiDocTypeReferencePipe, name: "tuiDocTypeReference" }, { kind: "component", type: TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { kind: "directive", type: i3.TuiInputNumberDirective, selector: "input[tuiInputNumber]", inputs: ["min", "max", "prefix", "postfix"] }, { kind: "component", type: i3.TuiInputNumberStep, selector: "input[tuiInputNumber][step]", inputs: ["step"] }, { kind: "pipe", type: TuiInspectPipe, name: "tuiInspectAny" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["size", "showIcons"] }, { kind: "component", type: i4.TuiSelect, selector: "select[tuiTextfield]", inputs: ["placeholder"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i4.TuiTextfieldDirective, selector: "input[tuiTextfield]:not([tuiInputCard]):not([tuiInputExpire]):not([tuiInputCVC])" }, { kind: "directive", type: i4.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiTextfieldDropdownDirective, selector: "ng-template[tuiTextfieldDropdown]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
227
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocAPIItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
228
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocAPIItem, isStandalone: true, selector: "tr[tuiDocAPIItem]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<td class=\"t-td\">\n <code\n tuiHintDirection=\"top-end\"\n class=\"t-name\"\n [class.t-name_banana]=\"isBananaBox()\"\n [class.t-name_input]=\"isInput()\"\n [class.t-name_output]=\"isOutput()\"\n [tuiHint]=\"hint\"\n >\n {{ name() }}\n </code>\n <ng-template #hint>\n <ng-content>{{ name() }}</ng-content>\n </ng-template>\n <div class=\"t-description\">\n <ng-container *ngTemplateOutlet=\"hint\" />\n </div>\n</td>\n<td class=\"t-td\">\n <code class=\"t-type\">\n @for (item of type() | tuiTypeReference; track item) {\n @if (item.reference) {\n <a\n rel=\"noreferrer\"\n target=\"_blank\"\n class=\"t-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n } @else {\n {{ item.type }}\n }\n @if (!$last) {\n <span>&nbsp;|&nbsp;</span>\n }\n }\n </code>\n</td>\n<td\n tuiTextfieldSize=\"m\"\n class=\"t-td\"\n>\n @if (items().length) {\n <tui-textfield\n tuiChevron\n class=\"t-input\"\n [content]=\"content\"\n [tuiTextfieldCleaner]=\"hasCleaner()\"\n >\n <input\n tuiSelect\n [ngModel]=\"value() ?? null\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n <tui-data-list-wrapper\n *tuiDropdown\n [itemContent]=\"content\"\n [items]=\"items()\"\n />\n </tui-textfield>\n } @else {\n @if (value() !== undefined) {\n @if (type() === 'boolean') {\n <input\n tuiSwitch\n type=\"checkbox\"\n [id]=\"name()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n }\n\n @if (type() === 'string') {\n <tui-textfield class=\"t-input\">\n <input\n tuiInput\n [id]=\"name()\"\n [ngModel]=\"value() || ''\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n </tui-textfield>\n }\n\n @if (type() === 'number' || type() === 'bigint' || type() === 'number | bigint') {\n <tui-textfield class=\"t-input\">\n <input\n tuiInputNumber\n [id]=\"name()\"\n [max]=\"numberItem?.max() ?? null\"\n [min]=\"numberItem?.min() ?? null\"\n [ngModel]=\"value()\"\n [step]=\"1\"\n (ngModelChange)=\"onValueChange($event || 0)\"\n />\n </tui-textfield>\n }\n }\n }\n <ng-template\n #content\n let-data\n >\n <code [style.margin]=\"0\">{{ data | tuiInspect }}</code>\n </ng-template>\n</td>\n", styles: [":host{box-shadow:inset 0 -1px var(--tui-border-normal)}.t-td{padding:1.5rem 2rem 1.5rem 0;vertical-align:top}.t-td:last-child{padding-inline-end:0;text-align:end;min-inline-size:10rem}.t-td .t-name,.t-td .t-type{outline:none;font-weight:700;margin:0}.t-name{display:flex!important;min-block-size:1.5rem;inline-size:fit-content;-webkit-text-fill-color:var(--tui-background-accent-2-pressed)}.t-name_input{-webkit-text-fill-color:var(--tui-text-negative)}.t-name_banana{-webkit-text-fill-color:var(--tui-text-action)}.t-name_output{-webkit-text-fill-color:var(--tui-status-info)}.t-type{flex-wrap:wrap;align-items:center;justify-content:flex-start;min-block-size:1.5rem}.t-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-input{min-inline-size:10rem;margin-block:-.625rem}.t-input code{overflow:hidden;white-space:nowrap}.t-description{display:none}@media screen and (max-width: 767.4px){:host{gap:1rem;padding:1rem 0}.t-td{padding:0}.t-td:last-child{text-align:start}.t-input{margin:0}.t-name{pointer-events:none}.t-description{display:block;margin-block-start:1rem}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "directive", type: i3.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"], outputs: ["tuiHintVisible"] }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i6$1.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "directive", type: i7.TuiInputNumberDirective, selector: "input[tuiInputNumber]" }, { kind: "component", type: i7.TuiInputNumberStep, selector: "input[tuiInputNumber][step]", inputs: ["step"] }, { kind: "pipe", type: TuiInspectPipe, name: "tuiInspect" }, { kind: "directive", type: i3$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["showIcons"] }, { kind: "pipe", type: TuiTypeReferencePipe, name: "tuiTypeReference" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
233
229
  }
234
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocAPIItem, decorators: [{
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocAPIItem, decorators: [{
235
231
  type: Component,
236
- args: [{ standalone: true, selector: 'tr[tuiDocAPIItem]', imports: [
232
+ args: [{ selector: 'tr[tuiDocAPIItem]', imports: [
237
233
  FormsModule,
238
- NgForOf,
239
- NgIf,
240
- NgSwitch,
241
- NgSwitchCase,
234
+ NgTemplateOutlet,
242
235
  TuiChevron,
243
236
  TuiDataListWrapper,
244
- TuiDocTypeReferencePipe,
245
- TuiIcon,
237
+ TuiHint,
238
+ TuiInput,
246
239
  TuiInputNumber,
247
240
  TuiInspectPipe,
241
+ TuiSelect,
248
242
  TuiSwitch,
249
- TuiTextfield,
250
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<td class=\"t-td\">\n <code\n class=\"t-name\"\n [class.t-name_banana]=\"name.startsWith('[(')\"\n [class.t-name_input]=\"name.startsWith('[')\"\n [class.t-name_output]=\"name.startsWith('(')\"\n >\n {{ name }}\n </code>\n <ng-content />\n</td>\n<td class=\"t-td\">\n <code class=\"t-type\">\n <ng-container *ngFor=\"let item of type | tuiDocTypeReference; let last = last\">\n <a\n *ngIf=\"item.reference; else default\"\n target=\"_blank\"\n class=\"t-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n <tui-icon\n *ngIf=\"icons.externalLink\"\n [icon]=\"icons.externalLink\"\n [style.font-size.rem]=\"1\"\n />\n </a>\n <ng-template #default>\n {{ item.type }}\n </ng-template>\n <span *ngIf=\"!last\">&nbsp;|&nbsp;</span>\n </ng-container>\n </code>\n</td>\n<td class=\"t-td\">\n <tui-textfield\n *ngIf=\"items.length; else noItems\"\n tuiChevron\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [content]=\"content\"\n [tuiTextfieldCleaner]=\"type.includes('null') || type.includes('PolymorpheusContent')\"\n >\n <select\n placeholder=\"null\"\n tuiTextfield\n [ngModel]=\"value ?? null\"\n (ngModelChange)=\"onValueChange($event)\"\n ></select>\n <tui-data-list-wrapper\n *tuiTextfieldDropdown\n [itemContent]=\"content\"\n [items]=\"items\"\n />\n </tui-textfield>\n <ng-template\n #content\n let-data\n >\n <code [style.margin]=\"0\">{{ data | tuiInspectAny }}</code>\n </ng-template>\n <ng-template #noItems>\n <ng-container\n *ngIf=\"value !== undefined\"\n [ngSwitch]=\"type\"\n >\n <input\n *ngSwitchCase=\"'boolean'\"\n tuiSwitch\n type=\"checkbox\"\n [id]=\"name\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n\n <tui-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n >\n <input\n tuiTextfield\n [id]=\"name\"\n [ngModel]=\"value || ''\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n </tui-textfield>\n\n <tui-textfield\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n >\n <input\n tuiInputNumber\n [id]=\"name\"\n [max]=\"numberItem?.max ?? null\"\n [min]=\"numberItem?.min ?? null\"\n [ngModel]=\"value\"\n [step]=\"1\"\n (ngModelChange)=\"onValueChange($event || 0)\"\n />\n </tui-textfield>\n </ng-container>\n </ng-template>\n</td>\n", styles: [":host{box-shadow:inset 0 -1px var(--tui-border-normal)}.t-td{padding:1.5rem 2rem 1.5rem 0;vertical-align:top}.t-td:last-child{padding-inline-end:0;text-align:end;min-inline-size:10rem}.t-name{display:flex!important;min-block-size:1.5rem;inline-size:-webkit-fit-content;inline-size:-moz-fit-content;inline-size:fit-content;margin:0 0 .5rem!important;-webkit-text-fill-color:var(--tui-background-accent-2-pressed)}.t-name_input{-webkit-text-fill-color:var(--tui-text-negative)}.t-name_banana{-webkit-text-fill-color:var(--tui-text-action)}.t-name_output{-webkit-text-fill-color:var(--tui-status-info)}.t-type{flex-wrap:wrap;align-items:center;justify-content:flex-start;min-block-size:1.5rem;margin:0!important}.t-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-input{min-inline-size:10rem;margin-block-start:-.625rem}.t-input code{overflow:hidden;white-space:nowrap}@media screen and (max-width: 47.9625em){:host{gap:1rem;padding:1rem 0}.t-td{padding:0}.t-td:last-child{text-align:start}.t-input{margin:0}}\n"] }]
251
- }], propDecorators: { name: [{
252
- type: Input
253
- }], type: [{
254
- type: Input
255
- }], value: [{
256
- type: Input
257
- }], items: [{
258
- type: Input
259
- }], valueChange: [{
260
- type: Output
261
- }] } });
243
+ TuiTypeReferencePipe,
244
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<td class=\"t-td\">\n <code\n tuiHintDirection=\"top-end\"\n class=\"t-name\"\n [class.t-name_banana]=\"isBananaBox()\"\n [class.t-name_input]=\"isInput()\"\n [class.t-name_output]=\"isOutput()\"\n [tuiHint]=\"hint\"\n >\n {{ name() }}\n </code>\n <ng-template #hint>\n <ng-content>{{ name() }}</ng-content>\n </ng-template>\n <div class=\"t-description\">\n <ng-container *ngTemplateOutlet=\"hint\" />\n </div>\n</td>\n<td class=\"t-td\">\n <code class=\"t-type\">\n @for (item of type() | tuiTypeReference; track item) {\n @if (item.reference) {\n <a\n rel=\"noreferrer\"\n target=\"_blank\"\n class=\"t-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n } @else {\n {{ item.type }}\n }\n @if (!$last) {\n <span>&nbsp;|&nbsp;</span>\n }\n }\n </code>\n</td>\n<td\n tuiTextfieldSize=\"m\"\n class=\"t-td\"\n>\n @if (items().length) {\n <tui-textfield\n tuiChevron\n class=\"t-input\"\n [content]=\"content\"\n [tuiTextfieldCleaner]=\"hasCleaner()\"\n >\n <input\n tuiSelect\n [ngModel]=\"value() ?? null\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n <tui-data-list-wrapper\n *tuiDropdown\n [itemContent]=\"content\"\n [items]=\"items()\"\n />\n </tui-textfield>\n } @else {\n @if (value() !== undefined) {\n @if (type() === 'boolean') {\n <input\n tuiSwitch\n type=\"checkbox\"\n [id]=\"name()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n }\n\n @if (type() === 'string') {\n <tui-textfield class=\"t-input\">\n <input\n tuiInput\n [id]=\"name()\"\n [ngModel]=\"value() || ''\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n </tui-textfield>\n }\n\n @if (type() === 'number' || type() === 'bigint' || type() === 'number | bigint') {\n <tui-textfield class=\"t-input\">\n <input\n tuiInputNumber\n [id]=\"name()\"\n [max]=\"numberItem?.max() ?? null\"\n [min]=\"numberItem?.min() ?? null\"\n [ngModel]=\"value()\"\n [step]=\"1\"\n (ngModelChange)=\"onValueChange($event || 0)\"\n />\n </tui-textfield>\n }\n }\n }\n <ng-template\n #content\n let-data\n >\n <code [style.margin]=\"0\">{{ data | tuiInspect }}</code>\n </ng-template>\n</td>\n", styles: [":host{box-shadow:inset 0 -1px var(--tui-border-normal)}.t-td{padding:1.5rem 2rem 1.5rem 0;vertical-align:top}.t-td:last-child{padding-inline-end:0;text-align:end;min-inline-size:10rem}.t-td .t-name,.t-td .t-type{outline:none;font-weight:700;margin:0}.t-name{display:flex!important;min-block-size:1.5rem;inline-size:fit-content;-webkit-text-fill-color:var(--tui-background-accent-2-pressed)}.t-name_input{-webkit-text-fill-color:var(--tui-text-negative)}.t-name_banana{-webkit-text-fill-color:var(--tui-text-action)}.t-name_output{-webkit-text-fill-color:var(--tui-status-info)}.t-type{flex-wrap:wrap;align-items:center;justify-content:flex-start;min-block-size:1.5rem}.t-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-input{min-inline-size:10rem;margin-block:-.625rem}.t-input code{overflow:hidden;white-space:nowrap}.t-description{display:none}@media screen and (max-width: 767.4px){:host{gap:1rem;padding:1rem 0}.t-td{padding:0}.t-td:last-child{text-align:start}.t-input{margin:0}.t-name{pointer-events:none}.t-description{display:block;margin-block-start:1rem}}\n"] }]
245
+ }] });
262
246
 
263
247
  class TuiDocCode {
264
248
  constructor() {
265
249
  this.icons = inject(TUI_DOC_ICONS);
266
250
  this.rawLoader$$ = new BehaviorSubject('');
251
+ this.texts = inject(TUI_COPY_TEXTS);
267
252
  this.isServer = isPlatformServer(inject(PLATFORM_ID));
268
253
  this.markdownCodeProcessor = inject(TUI_DOC_EXAMPLE_MARKDOWN_CODE_PROCESSOR);
269
254
  this.copy$ = new Subject();
270
- this.copyText = toSignal(inject(TUI_COPY_TEXTS).pipe(map(([copy]) => copy)));
255
+ this.copyText = computed(() => this.texts()[0]);
271
256
  this.icon = toSignal(this.copy$.pipe(switchMap(() => timer(2000).pipe(map(() => this.icons.copy), startWith(this.icons.check)))), { initialValue: this.icons.copy });
272
257
  this.processor = toSignal(this.rawLoader$$.pipe(switchMap(tuiRawLoad), map((value) => this.markdownCodeProcessor(value))), { initialValue: [] });
273
- this.filename = '';
274
- }
275
- set code(code) {
276
- this.rawLoader$$.next(code);
258
+ this.filename = input('');
259
+ this.code = input('');
260
+ this.lineNumbers = input(true);
277
261
  }
278
262
  get hasFilename() {
279
- return !!this.filename;
263
+ return !!this.filename();
280
264
  }
281
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocCode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
282
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocCode, isStandalone: true, selector: "tui-doc-code", inputs: { filename: "filename", code: "code" }, host: { properties: { "style.visibility": "isServer ? \"hidden\" : \"visible\"", "class._has-filename": "hasFilename" } }, ngImport: i0, template: "<p\n *ngIf=\"filename\"\n class=\"t-header\"\n>\n {{ filename }}\n</p>\n<pre\n *ngFor=\"let content of processor()\"\n class=\"t-code\"\n>\n <code [lineNumbers]=\"true\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <button\n tuiIconButton\n type=\"button\"\n appearance=\"outline-grayscale\"\n size=\"s\"\n class=\"t-copy-button\"\n [iconStart]=\"icon()\"\n [cdkCopyToClipboard]=\"content\"\n (click)=\"copy$.next()\"\n >\n {{ copyText()}}\n </button>\n <ng-content />\n </div>\n</pre>\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.t-header+.t-code{border-radius:.25rem}.t-code{position:relative;margin:0;white-space:normal;outline:1px solid var(--tui-border-normal)}.t-code ::ng-deep .hljs-ln{inline-size:100%}.t-code ::ng-deep .hljs-ln .hljs-ln-numbers{inline-size:1rem}.t-code ::ng-deep .hljs-ln td{white-space:pre}.t-code ::ng-deep .hljs-ln td:not(.hljs-ln-numbers):hover{outline:1px solid var(--tui-border-normal);border-radius:.25rem}.t-code+.t-code{margin-block-start:1rem}.t-code-actions{position:absolute;top:.75rem;right:.75rem;display:flex;justify-content:center;align-items:center;flex-direction:row-reverse}.t-copy-button::ng-deep+*:not(:empty){margin-inline-end:.375rem}.hljs:not(:empty){font:var(--tui-font-text-m);font-size:.875rem;padding:1.5rem 2rem;font-family:monospace;overflow-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio: 0) and (-webkit-min-device-pixel-ratio: 0),all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.hljs:not(:empty){padding:1rem}}.t-code-actions,.hljs:not(:empty){background:var(--tui-background-base)}@supports (background: color-mix(in srgb,var(--tui-background-base),#222 2%)){.t-code-actions,.hljs:not(:empty){background:color-mix(in srgb,var(--tui-background-base),#222 2%)}}\n"], dependencies: [{ kind: "ngmodule", type: ClipboardModule }, { kind: "directive", type: i1$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "directive", type: Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
265
+ ngOnChanges() {
266
+ this.rawLoader$$.next(this.code());
267
+ }
268
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocCode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
269
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocCode, isStandalone: true, selector: "tui-doc-code", inputs: { filename: { classPropertyName: "filename", publicName: "filename", isSignal: true, isRequired: false, transformFunction: null }, code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: false, transformFunction: null }, lineNumbers: { classPropertyName: "lineNumbers", publicName: "lineNumbers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.visibility": "isServer ? \"hidden\" : \"visible\"", "class._has-filename": "hasFilename" } }, usesOnChanges: true, ngImport: i0, template: "@if (filename()) {\n <p class=\"t-header\">\n {{ filename() }}\n </p>\n}\n@for (content of processor(); track content) {\n <pre class=\"t-code\">\n <code [lineNumbers]=\"lineNumbers()\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <button\n tuiIconButton\n type=\"button\"\n appearance=\"\"\n size=\"s\"\n class=\"t-copy-button\"\n [iconStart]=\"icon()\"\n [cdkCopyToClipboard]=\"content\"\n (click)=\"copy$.next()\"\n >\n {{ copyText() }}\n </button>\n <ng-content />\n </div>\n </pre>\n}\n", styles: [":host{display:block}.t-header{font:var(--tui-font-body-s);font-weight:700}.t-header+.t-code{border-radius:.25rem}.t-code{position:relative;margin:0;white-space:normal;outline:1px solid var(--tui-border-normal)}.t-code ::ng-deep .hljs-ln{inline-size:100%}.t-code ::ng-deep .hljs-ln .hljs-ln-numbers{inline-size:1rem}.t-code ::ng-deep .hljs-ln td{white-space:pre}.t-code ::ng-deep .hljs-ln td:not(.hljs-ln-numbers):hover{outline:1px solid var(--tui-border-normal);border-radius:.25rem}.t-code+.t-code{margin-block-start:1rem}.t-code-actions{position:absolute;display:flex;inset-block-start:.75rem;inset-inline-end:.75rem;justify-content:center;align-items:center;flex-direction:row-reverse;background:var(--tui-background-base-alt);border-radius:var(--tui-radius-xs);--tui-stroke-width: .09375rem}:host-context([tuiTheme=\"dark\"]) .t-code-actions{background:var(--tui-background-elevation-2)}.t-copy-button::ng-deep+*:not(:empty){margin-inline-end:.375rem}.hljs:not(:empty){font:var(--tui-font-body-m);font-size:.875rem;padding:1rem;font-family:monospace;overflow-wrap:break-word;white-space:pre-wrap}\n"], dependencies: [{ kind: "ngmodule", type: ClipboardModule }, { kind: "directive", type: i1$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "directive", type: Highlight, selector: "[highlight]", inputs: ["highlight", "languages", "lineNumbers"], outputs: ["highlighted"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
283
270
  }
284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocCode, decorators: [{
271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocCode, decorators: [{
285
272
  type: Component,
286
- args: [{ standalone: true, selector: 'tui-doc-code', imports: [ClipboardModule, Highlight, NgForOf, NgIf, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, host: {
273
+ args: [{ selector: 'tui-doc-code', imports: [ClipboardModule, Highlight, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, host: {
287
274
  '[style.visibility]': 'isServer ? "hidden" : "visible"',
288
275
  '[class._has-filename]': 'hasFilename',
289
- }, template: "<p\n *ngIf=\"filename\"\n class=\"t-header\"\n>\n {{ filename }}\n</p>\n<pre\n *ngFor=\"let content of processor()\"\n class=\"t-code\"\n>\n <code [lineNumbers]=\"true\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <button\n tuiIconButton\n type=\"button\"\n appearance=\"outline-grayscale\"\n size=\"s\"\n class=\"t-copy-button\"\n [iconStart]=\"icon()\"\n [cdkCopyToClipboard]=\"content\"\n (click)=\"copy$.next()\"\n >\n {{ copyText()}}\n </button>\n <ng-content />\n </div>\n</pre>\n", styles: [":host{display:block}.t-header{font:var(--tui-font-text-s);font-weight:700}.t-header+.t-code{border-radius:.25rem}.t-code{position:relative;margin:0;white-space:normal;outline:1px solid var(--tui-border-normal)}.t-code ::ng-deep .hljs-ln{inline-size:100%}.t-code ::ng-deep .hljs-ln .hljs-ln-numbers{inline-size:1rem}.t-code ::ng-deep .hljs-ln td{white-space:pre}.t-code ::ng-deep .hljs-ln td:not(.hljs-ln-numbers):hover{outline:1px solid var(--tui-border-normal);border-radius:.25rem}.t-code+.t-code{margin-block-start:1rem}.t-code-actions{position:absolute;top:.75rem;right:.75rem;display:flex;justify-content:center;align-items:center;flex-direction:row-reverse}.t-copy-button::ng-deep+*:not(:empty){margin-inline-end:.375rem}.hljs:not(:empty){font:var(--tui-font-text-m);font-size:.875rem;padding:1.5rem 2rem;font-family:monospace;overflow-wrap:break-word;white-space:pre-wrap}@media all and (-webkit-min-device-pixel-ratio: 0) and (-webkit-min-device-pixel-ratio: 0),all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.hljs:not(:empty)::-webkit-scrollbar,.hljs:not(:empty)::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.hljs:not(:empty)::-webkit-scrollbar{background-color:transparent}.hljs:not(:empty)::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.hljs:not(:empty)::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.hljs:not(:empty)::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.hljs:not(:empty){padding:1rem}}.t-code-actions,.hljs:not(:empty){background:var(--tui-background-base)}@supports (background: color-mix(in srgb,var(--tui-background-base),#222 2%)){.t-code-actions,.hljs:not(:empty){background:color-mix(in srgb,var(--tui-background-base),#222 2%)}}\n"] }]
290
- }], propDecorators: { filename: [{
291
- type: Input
292
- }], code: [{
293
- type: Input
294
- }] } });
276
+ }, template: "@if (filename()) {\n <p class=\"t-header\">\n {{ filename() }}\n </p>\n}\n@for (content of processor(); track content) {\n <pre class=\"t-code\">\n <code [lineNumbers]=\"lineNumbers()\" [highlight]=\"content\"></code>\n <div class=\"t-code-actions\">\n <button\n tuiIconButton\n type=\"button\"\n appearance=\"\"\n size=\"s\"\n class=\"t-copy-button\"\n [iconStart]=\"icon()\"\n [cdkCopyToClipboard]=\"content\"\n (click)=\"copy$.next()\"\n >\n {{ copyText() }}\n </button>\n <ng-content />\n </div>\n </pre>\n}\n", styles: [":host{display:block}.t-header{font:var(--tui-font-body-s);font-weight:700}.t-header+.t-code{border-radius:.25rem}.t-code{position:relative;margin:0;white-space:normal;outline:1px solid var(--tui-border-normal)}.t-code ::ng-deep .hljs-ln{inline-size:100%}.t-code ::ng-deep .hljs-ln .hljs-ln-numbers{inline-size:1rem}.t-code ::ng-deep .hljs-ln td{white-space:pre}.t-code ::ng-deep .hljs-ln td:not(.hljs-ln-numbers):hover{outline:1px solid var(--tui-border-normal);border-radius:.25rem}.t-code+.t-code{margin-block-start:1rem}.t-code-actions{position:absolute;display:flex;inset-block-start:.75rem;inset-inline-end:.75rem;justify-content:center;align-items:center;flex-direction:row-reverse;background:var(--tui-background-base-alt);border-radius:var(--tui-radius-xs);--tui-stroke-width: .09375rem}:host-context([tuiTheme=\"dark\"]) .t-code-actions{background:var(--tui-background-elevation-2)}.t-copy-button::ng-deep+*:not(:empty){margin-inline-end:.375rem}.hljs:not(:empty){font:var(--tui-font-body-m);font-size:.875rem;padding:1rem;font-family:monospace;overflow-wrap:break-word;white-space:pre-wrap}\n"] }]
277
+ }] });
295
278
 
296
279
  const COPIED_TIMEOUT = 1500;
297
280
  class TuiDocCopy {
298
281
  constructor() {
299
282
  this.copy$ = new Subject();
300
- this.texts = toSignal(inject(TUI_COPY_TEXTS), {
301
- initialValue: ['', ''],
302
- });
283
+ this.texts = inject(TUI_COPY_TEXTS);
303
284
  this.copied = toSignal(this.copy$.pipe(switchMap(() => timer(COPIED_TIMEOUT).pipe(map(TUI_FALSE_HANDLER), startWith(true)))), { initialValue: false });
304
285
  }
305
286
  onClick() {
306
287
  this.copy$.next();
307
288
  }
308
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocCopy, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
309
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocCopy, isStandalone: true, selector: "tui-doc-copy", ngImport: i0, template: "<button\n appearance=\"\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-copy\"\n (click)=\"onClick()\"\n>\n <span class=\"t-content\">\n <span\n class=\"t-initial\"\n [attr.data-text]=\"copied() ? '' : texts()[0]\"\n >\n <ng-container *ngIf=\"!copied()\">\n <ng-content />\n </ng-container>\n </span>\n {{ copied() ? texts()[1] : '' }}\n </span>\n</button>\n", styles: [":host{position:relative;display:inline-block;vertical-align:middle;border-radius:var(--tui-radius-m)}.t-copy{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:100%;block-size:100%;color:var(--tui-text-primary);background:var(--tui-background-base);overflow:hidden}.t-copy:hover{background:var(--tui-background-base-alt)}.t-initial{white-space:nowrap}.t-initial:empty:before{content:attr(data-text)}.t-content{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;flex-direction:column;text-align:center;line-height:2rem}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
289
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocCopy, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
290
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocCopy, isStandalone: true, selector: "tui-doc-copy", ngImport: i0, template: "<button\n appearance=\"\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-copy\"\n (click)=\"onClick()\"\n>\n <span class=\"t-content\">\n <span\n class=\"t-initial\"\n [attr.data-text]=\"copied() ? '' : texts()[0]\"\n >\n @if (!copied()) {\n <ng-content />\n }\n </span>\n {{ copied() ? texts()[1] : '' }}\n </span>\n</button>\n", styles: [":host{position:relative;display:inline-block;vertical-align:middle;border-radius:var(--tui-radius-m)}.t-copy{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:100%;block-size:100%;color:var(--tui-text-primary);background:var(--tui-background-base);overflow:hidden}.t-copy:hover{background:var(--tui-background-base-alt)}.t-initial{white-space:nowrap}.t-initial:empty:before{content:attr(data-text)}.t-content{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;flex-direction:column;text-align:center;line-height:2rem}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
310
291
  }
311
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocCopy, decorators: [{
292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocCopy, decorators: [{
312
293
  type: Component,
313
- args: [{ standalone: true, selector: 'tui-doc-copy', imports: [NgIf, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n appearance=\"\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-copy\"\n (click)=\"onClick()\"\n>\n <span class=\"t-content\">\n <span\n class=\"t-initial\"\n [attr.data-text]=\"copied() ? '' : texts()[0]\"\n >\n <ng-container *ngIf=\"!copied()\">\n <ng-content />\n </ng-container>\n </span>\n {{ copied() ? texts()[1] : '' }}\n </span>\n</button>\n", styles: [":host{position:relative;display:inline-block;vertical-align:middle;border-radius:var(--tui-radius-m)}.t-copy{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:100%;block-size:100%;color:var(--tui-text-primary);background:var(--tui-background-base);overflow:hidden}.t-copy:hover{background:var(--tui-background-base-alt)}.t-initial{white-space:nowrap}.t-initial:empty:before{content:attr(data-text)}.t-content{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;flex-direction:column;text-align:center;line-height:2rem}\n"] }]
294
+ args: [{ selector: 'tui-doc-copy', imports: [TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n appearance=\"\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-copy\"\n (click)=\"onClick()\"\n>\n <span class=\"t-content\">\n <span\n class=\"t-initial\"\n [attr.data-text]=\"copied() ? '' : texts()[0]\"\n >\n @if (!copied()) {\n <ng-content />\n }\n </span>\n {{ copied() ? texts()[1] : '' }}\n </span>\n</button>\n", styles: [":host{position:relative;display:inline-block;vertical-align:middle;border-radius:var(--tui-radius-m)}.t-copy{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:100%;block-size:100%;color:var(--tui-text-primary);background:var(--tui-background-base);overflow:hidden}.t-copy:hover{background:var(--tui-background-base-alt)}.t-initial{white-space:nowrap}.t-initial:empty:before{content:attr(data-text)}.t-content{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;flex-direction:column;text-align:center;line-height:2rem}\n"] }]
314
295
  }] });
315
296
 
316
297
  const MIN_WIDTH = 160;
298
+ class TuiJsonPipe {
299
+ transform(value) {
300
+ return JSON.stringify(value, (_, x) => (typeof x === 'bigint' ? `${String(x)}n` : x), 2);
301
+ }
302
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiJsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
303
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: TuiJsonPipe, isStandalone: true, name: "json" }); }
304
+ }
305
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiJsonPipe, decorators: [{
306
+ type: Pipe,
307
+ args: [{ name: 'json' }]
308
+ }] });
317
309
  class TuiDocDemo {
318
310
  constructor() {
311
+ this.resizable = viewChild.required(TuiResizable, { read: ElementRef });
312
+ this.content = viewChild.required('content');
319
313
  this.el = tuiInjectElement();
320
314
  this.locationRef = inject(Location);
321
315
  this.urlSerializer = inject(UrlSerializer);
322
316
  this.urlStateHandler = inject(TUI_DOC_URL_STATE_HANDLER);
323
317
  this.darkMode = inject(TUI_DARK_MODE);
324
- this.template = null;
318
+ this.template = contentChild((TemplateRef));
325
319
  this.rendered = signal(false);
326
320
  this.theme = computed(() => (this.dark() ? 'dark' : 'light'));
327
321
  this.dark = signal(tuiCoerceValueIsTrue(this.params.darkMode ?? this.darkMode()));
@@ -332,10 +326,10 @@ class TuiDocDemo {
332
326
  this.updateOn = this.params.updateOn || this.updateOnVariants[0];
333
327
  this.opaque = tuiCoerceValueIsTrue(this.params.sandboxOpaque ?? true);
334
328
  this.expanded = tuiCoerceValueIsTrue(this.params.sandboxExpanded ?? false);
335
- this.sandboxWidth = tuiToInteger(this.params.sandboxWidth);
329
+ this.sandboxWidth = parseInt(this.params.sandboxWidth, 10);
336
330
  this.texts = inject(TUI_DOC_DEMO_TEXTS);
337
- this.control = null;
338
- this.sticky = true;
331
+ this.control = input(null);
332
+ this.sticky = input(true);
339
333
  }
340
334
  ngAfterViewInit() {
341
335
  this.createForm();
@@ -367,21 +361,20 @@ class TuiDocDemo {
367
361
  this.createForm();
368
362
  }
369
363
  updateWidth(width = NaN) {
370
- if (!this.resizer || !this.resizable || !this.content) {
364
+ if (!this.resizable() || !this.content()) {
371
365
  return;
372
366
  }
373
- const safe = width || this.resizable.nativeElement.clientWidth;
367
+ const safe = width || this.resizable().nativeElement.clientWidth;
374
368
  const total = this.el.clientWidth;
375
369
  const clamped = Math.round(tuiClamp(safe, MIN_WIDTH, total)) - this.delta;
376
370
  const validated = safe < total ? clamped : NaN;
377
- this.resizer.nativeElement.textContent = String(clamped || '-');
378
- this.resizable.nativeElement.style.width = validated ? tuiPx(safe) : '';
371
+ this.resizable().nativeElement.style.width = validated ? tuiPx(safe) : '';
379
372
  this.sandboxWidth = validated;
380
373
  }
381
374
  get delta() {
382
- return this.resizable && this.content
383
- ? this.resizable.nativeElement.clientWidth -
384
- this.content.nativeElement.clientWidth
375
+ return this.resizable() && this.content()
376
+ ? this.resizable().nativeElement.clientWidth -
377
+ this.content().nativeElement.clientWidth
385
378
  : 0;
386
379
  }
387
380
  get params() {
@@ -398,390 +391,53 @@ class TuiDocDemo {
398
391
  this.locationRef.go(this.urlStateHandler(tree));
399
392
  }
400
393
  createForm() {
401
- const { control, updateOn } = this;
394
+ const control = this.control();
402
395
  if (control) {
403
- this.testForm = new FormGroup({ testValue: control }, { updateOn });
396
+ this.form = new FormGroup({ value: control }, { updateOn: this.updateOn });
404
397
  }
405
398
  }
406
399
  getUrlTree() {
407
400
  return this.urlSerializer.parse(this.locationRef.path());
408
401
  }
409
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocDemo, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
410
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocDemo, isStandalone: true, selector: "tui-doc-demo", inputs: { control: "control", sticky: "sticky" }, host: { listeners: { "window:resize": "onResize()", "document:mouseup.zoneless": "onMouseUp()" }, properties: { "class._sticky": "sticky" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "resizable", first: true, predicate: TuiResizable, descendants: true, static: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }, { propertyName: "resizer", first: true, predicate: ["resizer"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"t-settings\">\n <label class=\"t-label\">\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"dark()\"\n (ngModelChange)=\"onModeChange($event)\"\n />\n {{ texts[0] }}\n </label>\n <label class=\"t-label\">\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"opaque\"\n (ngModelChange)=\"changeOpaque($event)\"\n />\n {{ texts[1] }}\n </label>\n</div>\n<div\n tuiResizable\n class=\"t-wrapper\"\n [attr.tuiTheme]=\"theme()\"\n [class.t-wrapper_transparent]=\"!opaque\"\n [style.visibility]=\"rendered() ? 'visible' : 'hidden'\"\n>\n <div class=\"t-content\">\n <div\n #content\n id=\"demo-content\"\n >\n <form\n *ngIf=\"testForm\"\n class=\"t-form\"\n [formGroup]=\"testForm\"\n >\n <div class=\"t-input-wrapper\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <button\n automation-id=\"tui-demo-button__toggle-details\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiChevron]=\"expanded\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"expanded\"\n >\n <ng-template tuiExpandContent>\n <pre class=\"t-value\">Form data: {{ testForm.value | json }}</pre>\n <div\n tuiGroup\n class=\"t-form-controls\"\n >\n <tui-select\n automation-id=\"tui-demo-select__expand-update-on\"\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n >\n updateOn\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"updateOnVariants\"\n />\n </tui-select>\n <button\n automation-id=\"tui-demo-button__reset-state\"\n size=\"s\"\n tuiButton\n type=\"reset\"\n [style.flex]=\"'0 0 auto'\"\n >\n Reset\n </button>\n <button\n automation-id=\"tui-demo-button__submit-state\"\n size=\"s\"\n tuiButton\n type=\"submit\"\n [style.flex]=\"'0 0 auto'\"\n >\n Submit\n </button>\n </div>\n </ng-template>\n </tui-expand>\n </form>\n <ng-content />\n </div>\n </div>\n <div\n #resizer\n class=\"t-resizer\"\n [tuiResizer]=\"[1, 0]\"\n (tuiSizeChange)=\"updateWidth($event[0])\"\n ></div>\n</div>\n", styles: [":host{position:relative;display:block;min-inline-size:100%;margin:1.5rem 0;pointer-events:none;font:var(--tui-font-text-s)}.t-settings{position:absolute;bottom:calc(100% + .75rem);display:flex;gap:1rem;align-items:center;justify-content:flex-end;pointer-events:none;inline-size:100%}.t-settings>*{pointer-events:auto}.t-label{display:flex;align-items:center;gap:.5rem}.t-wrapper{display:flex;box-shadow:var(--tui-shadow-medium);border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);max-inline-size:100%;min-block-size:6rem;inline-size:100%;min-inline-size:10rem;color:var(--tui-text-primary);background-color:var(--tui-background-base);overflow:hidden;pointer-events:auto}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-background-base-alt) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-background-base-alt) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}@media screen and (max-width: 47.9625em){.t-wrapper{min-block-size:auto}}.t-content{flex:1 1 0;min-inline-size:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}@media screen and (max-width: 47.9625em){.t-content{padding:1rem}}.t-form{display:flex;flex-wrap:wrap;align-items:flex-start}.t-input-wrapper{inline-size:100%;margin-block-end:.5rem}.t-expand{inline-size:100%}.t-value{flex:1;background:var(--tui-background-neutral-1);padding:.75rem;border-radius:.25rem}.t-mode{inline-size:12.5rem}.t-select{max-inline-size:15rem}.t-resizer{position:relative;display:flex;box-shadow:var(--tui-shadow-medium);inline-size:3.5rem;min-block-size:inherit;align-items:center;justify-content:center;flex-shrink:0;border-inline-start:1px solid var(--tui-border-normal);outline:none;background:var(--tui-background-base);color:var(--tui-text-primary)}.t-resizer:before,.t-resizer:after{content:\"\";position:absolute;top:.75rem;left:50%;bottom:calc(50% + 1rem);inline-size:1px;background:var(--tui-border-normal);box-shadow:-.25rem 0 var(--tui-border-normal);transform:translateZ(0)}.t-resizer:after{bottom:.75rem;top:calc(50% + 1rem)}@media screen and (max-width: 47.9625em){.t-resizer{display:none}}.t-resizer-text{position:relative;z-index:1;font:var(--tui-font-text-s);padding:.75rem;background:var(--tui-background-base)}.wrapper_light .t-resizer-text{background:#3e464e}.t-group,.t-checkbox{display:flex;align-items:center;margin-inline-start:.75rem}.t-button,.t-form-controls{margin-block-start:.75rem}@supports (position: sticky){@media screen and (min-height: 37.5rem){:host._sticky{position:sticky;top:4.625rem;z-index:2}}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "directive", type: i3$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i4$1.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }, { kind: "directive", type: i4$1.TuiExpandContent, selector: "[tuiExpandContent]" }, { kind: "directive", type: TuiGroup, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "collapsed", "rounded", "size"] }, { kind: "directive", type: TuiResizable, selector: "[tuiResizable]" }, { kind: "directive", type: TuiResizer, selector: "[tuiResizer]", inputs: ["tuiResizer"], outputs: ["tuiSizeChange"] }, { kind: "ngmodule", type: TuiSelectModule }, { kind: "component", type: i5.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i5.TuiSelectDirective, selector: "tui-select" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["size", "showIcons"] }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i8.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
402
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocDemo, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
403
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocDemo, isStandalone: true, selector: "tui-doc-demo", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, sticky: { classPropertyName: "sticky", publicName: "sticky", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()", "document:mouseup.zoneless": "onMouseUp()" }, properties: { "class._sticky": "sticky()", "attr.tuiTheme": "theme()" } }, queries: [{ propertyName: "template", first: true, predicate: (TemplateRef), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "resizable", first: true, predicate: TuiResizable, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"t-settings\">\n <label tuiLabel>\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"dark()\"\n (ngModelChange)=\"onModeChange($event)\"\n />\n <small>{{ texts[0] }}</small>\n </label>\n <label tuiLabel>\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"opaque\"\n (ngModelChange)=\"changeOpaque($event)\"\n />\n <small>{{ texts[1] }}</small>\n </label>\n</div>\n<div\n tuiResizable\n class=\"t-wrapper\"\n [class.t-wrapper_transparent]=\"!opaque\"\n [style.visibility]=\"rendered() ? 'visible' : 'hidden'\"\n>\n <div class=\"t-content\">\n <div\n #content\n id=\"demo-content\"\n >\n @if (form) {\n <form\n id=\"tui-demo-form\"\n [formGroup]=\"form\"\n >\n <ng-container [ngTemplateOutlet]=\"template() || null\" />\n </form>\n }\n <ng-content />\n </div>\n </div>\n <div\n class=\"t-resizer\"\n [tuiResizer]=\"[1, 0]\"\n (tuiSizeChange)=\"updateWidth($event[0])\"\n >\n <tui-icon icon=\"@tui.grip-vertical\" />\n </div>\n</div>\n@if (form) {\n <tui-expand [expanded]=\"expanded\">\n <ng-template tuiItem>\n <pre class=\"t-value\">Form data: {{ form.value | json }}</pre>\n </ng-template>\n </tui-expand>\n <div class=\"t-footer\">\n <button\n appearance=\"flat-grayscale\"\n automation-id=\"tui-demo-button__toggle-details\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiChevron]=\"expanded\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <tui-textfield\n tuiChevron\n tuiTextfieldAppearance=\"secondary-grayscale\"\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [tuiTextfieldCleaner]=\"false\"\n >\n <input\n automation-id=\"tui-demo-select__expand-update-on\"\n tuiSelect\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n />\n <tui-data-list-wrapper\n *tuiDropdown\n [items]=\"updateOnVariants\"\n />\n </tui-textfield>\n <button\n appearance=\"secondary-grayscale\"\n automation-id=\"tui-demo-button__reset-state\"\n form=\"tui-demo-form\"\n size=\"s\"\n tuiButton\n type=\"reset\"\n >\n Reset\n </button>\n <button\n appearance=\"secondary-grayscale\"\n automation-id=\"tui-demo-button__submit-state\"\n form=\"tui-demo-form\"\n size=\"s\"\n tuiButton\n type=\"submit\"\n >\n Submit\n </button>\n </div>\n}\n", styles: [":host{position:relative;display:block;min-inline-size:100%;margin:0 0 1.5rem;font:var(--tui-font-body-s);color:var(--tui-text-primary);background:var(--tui-background-base-alt);box-shadow:0 0 1rem .5rem var(--tui-background-base);border-radius:var(--tui-radius-m);overflow:hidden;box-sizing:border-box}:host :host-context([tuiTheme=\"dark\"]){background:var(--tui-background-elevation-2)}.t-settings{display:flex;gap:1rem;align-items:center;justify-content:flex-end;padding:.5rem .75rem .25rem}.t-wrapper{display:flex;max-inline-size:100%;min-block-size:6rem;inline-size:100%;min-inline-size:10rem;color:var(--tui-text-primary);background-color:var(--tui-background-base);padding:.25rem;border-radius:var(--tui-radius-m);box-sizing:border-box;box-shadow:inset 0 0 0 .25rem var(--tui-background-base-alt);overflow:hidden;pointer-events:auto}:host-context([tuiTheme=\"dark\"]) .t-wrapper{box-shadow:inset 0 0 0 .25rem var(--tui-background-elevation-2)}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-background-base-alt) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-background-base-alt) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}@media screen and (max-width: 767.4px){.t-wrapper{min-block-size:auto}}.t-content{flex:1 1 0;min-inline-size:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}@media screen and (max-width: 767.4px){.t-content{padding:1rem}}.t-footer{display:flex;gap:.25rem;padding:0 .25rem .25rem}.t-select{inline-size:6rem;margin-inline-start:auto}.t-value{flex:1;background:var(--tui-background-base);border-radius:var(--tui-radius-m);box-shadow:inset 0 -.25rem 0 .25rem var(--tui-background-base-alt);padding:.5rem .75rem 1rem;margin:0 0 -.25rem}:host-context([tuiTheme=\"dark\"]) .t-value{box-shadow:inset 0 -.25rem 0 .25rem var(--tui-background-elevation-2)}.t-resizer{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;min-block-size:inherit;align-items:center;justify-content:center;flex-shrink:0;color:var(--tui-text-tertiary)}.t-resizer:hover,.t-resizer:active{color:var(--tui-text-secondary)}@media screen and (max-width: 767.4px){.t-resizer{display:none}}@media screen and (min-height: 37.5rem){:host._sticky{position:sticky;top:4.625rem;z-index:2}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels])", inputs: ["items", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "component", type: TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: TuiItem, selector: "[tuiItem]" }, { kind: "pipe", type: TuiJsonPipe, name: "json" }, { kind: "directive", type: TuiResizable, selector: "[tuiResizable]" }, { kind: "directive", type: TuiResizer, selector: "[tuiResizer]", inputs: ["tuiResizer"], outputs: ["tuiSizeChange"] }, { kind: "directive", type: i3$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "directive", type: i4.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["showIcons"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
411
404
  }
412
- __decorate([
413
- tuiPure
414
- ], TuiDocDemo.prototype, "updateUrl", null);
415
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocDemo, decorators: [{
405
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocDemo, decorators: [{
416
406
  type: Component,
417
- args: [{ standalone: true, selector: 'tui-doc-demo', imports: [
407
+ args: [{ selector: 'tui-doc-demo', imports: [
418
408
  FormsModule,
419
- JsonPipe,
420
- NgIf,
421
409
  NgTemplateOutlet,
422
410
  ReactiveFormsModule,
423
411
  TuiButton,
424
412
  TuiChevron,
425
413
  TuiDataListWrapper,
426
414
  TuiExpand,
427
- TuiGroup,
415
+ TuiIcon,
416
+ TuiItem,
417
+ TuiJsonPipe,
428
418
  TuiResizable,
429
419
  TuiResizer,
430
- TuiSelectModule,
420
+ TuiSelect,
431
421
  TuiSwitch,
432
- TuiTextfieldControllerModule,
422
+ TuiTextfield,
433
423
  ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
434
- '[class._sticky]': 'sticky',
424
+ '[class._sticky]': 'sticky()',
425
+ '[attr.tuiTheme]': 'theme()',
435
426
  '(window:resize)': 'onResize()',
436
427
  '(document:mouseup.zoneless)': 'onMouseUp()',
437
- }, template: "<div class=\"t-settings\">\n <label class=\"t-label\">\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"dark()\"\n (ngModelChange)=\"onModeChange($event)\"\n />\n {{ texts[0] }}\n </label>\n <label class=\"t-label\">\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"opaque\"\n (ngModelChange)=\"changeOpaque($event)\"\n />\n {{ texts[1] }}\n </label>\n</div>\n<div\n tuiResizable\n class=\"t-wrapper\"\n [attr.tuiTheme]=\"theme()\"\n [class.t-wrapper_transparent]=\"!opaque\"\n [style.visibility]=\"rendered() ? 'visible' : 'hidden'\"\n>\n <div class=\"t-content\">\n <div\n #content\n id=\"demo-content\"\n >\n <form\n *ngIf=\"testForm\"\n class=\"t-form\"\n [formGroup]=\"testForm\"\n >\n <div class=\"t-input-wrapper\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <button\n automation-id=\"tui-demo-button__toggle-details\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiChevron]=\"expanded\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"expanded\"\n >\n <ng-template tuiExpandContent>\n <pre class=\"t-value\">Form data: {{ testForm.value | json }}</pre>\n <div\n tuiGroup\n class=\"t-form-controls\"\n >\n <tui-select\n automation-id=\"tui-demo-select__expand-update-on\"\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n >\n updateOn\n <tui-data-list-wrapper\n *tuiDataList\n [items]=\"updateOnVariants\"\n />\n </tui-select>\n <button\n automation-id=\"tui-demo-button__reset-state\"\n size=\"s\"\n tuiButton\n type=\"reset\"\n [style.flex]=\"'0 0 auto'\"\n >\n Reset\n </button>\n <button\n automation-id=\"tui-demo-button__submit-state\"\n size=\"s\"\n tuiButton\n type=\"submit\"\n [style.flex]=\"'0 0 auto'\"\n >\n Submit\n </button>\n </div>\n </ng-template>\n </tui-expand>\n </form>\n <ng-content />\n </div>\n </div>\n <div\n #resizer\n class=\"t-resizer\"\n [tuiResizer]=\"[1, 0]\"\n (tuiSizeChange)=\"updateWidth($event[0])\"\n ></div>\n</div>\n", styles: [":host{position:relative;display:block;min-inline-size:100%;margin:1.5rem 0;pointer-events:none;font:var(--tui-font-text-s)}.t-settings{position:absolute;bottom:calc(100% + .75rem);display:flex;gap:1rem;align-items:center;justify-content:flex-end;pointer-events:none;inline-size:100%}.t-settings>*{pointer-events:auto}.t-label{display:flex;align-items:center;gap:.5rem}.t-wrapper{display:flex;box-shadow:var(--tui-shadow-medium);border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);max-inline-size:100%;min-block-size:6rem;inline-size:100%;min-inline-size:10rem;color:var(--tui-text-primary);background-color:var(--tui-background-base);overflow:hidden;pointer-events:auto}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-background-base-alt) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-background-base-alt) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}@media screen and (max-width: 47.9625em){.t-wrapper{min-block-size:auto}}.t-content{flex:1 1 0;min-inline-size:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}@media screen and (max-width: 47.9625em){.t-content{padding:1rem}}.t-form{display:flex;flex-wrap:wrap;align-items:flex-start}.t-input-wrapper{inline-size:100%;margin-block-end:.5rem}.t-expand{inline-size:100%}.t-value{flex:1;background:var(--tui-background-neutral-1);padding:.75rem;border-radius:.25rem}.t-mode{inline-size:12.5rem}.t-select{max-inline-size:15rem}.t-resizer{position:relative;display:flex;box-shadow:var(--tui-shadow-medium);inline-size:3.5rem;min-block-size:inherit;align-items:center;justify-content:center;flex-shrink:0;border-inline-start:1px solid var(--tui-border-normal);outline:none;background:var(--tui-background-base);color:var(--tui-text-primary)}.t-resizer:before,.t-resizer:after{content:\"\";position:absolute;top:.75rem;left:50%;bottom:calc(50% + 1rem);inline-size:1px;background:var(--tui-border-normal);box-shadow:-.25rem 0 var(--tui-border-normal);transform:translateZ(0)}.t-resizer:after{bottom:.75rem;top:calc(50% + 1rem)}@media screen and (max-width: 47.9625em){.t-resizer{display:none}}.t-resizer-text{position:relative;z-index:1;font:var(--tui-font-text-s);padding:.75rem;background:var(--tui-background-base)}.wrapper_light .t-resizer-text{background:#3e464e}.t-group,.t-checkbox{display:flex;align-items:center;margin-inline-start:.75rem}.t-button,.t-form-controls{margin-block-start:.75rem}@supports (position: sticky){@media screen and (min-height: 37.5rem){:host._sticky{position:sticky;top:4.625rem;z-index:2}}}\n"] }]
438
- }], propDecorators: { resizable: [{
439
- type: ViewChild,
440
- args: [TuiResizable, { static: true }]
441
- }], content: [{
442
- type: ViewChild,
443
- args: ['content', { static: true }]
444
- }], resizer: [{
445
- type: ViewChild,
446
- args: ['resizer', { static: true }]
447
- }], template: [{
448
- type: ContentChild,
449
- args: [TemplateRef]
450
- }], control: [{
451
- type: Input
452
- }], sticky: [{
453
- type: Input
454
- }], updateUrl: [] } });
455
-
456
- class TuiDocTab {
457
- constructor() {
458
- this.src = '';
459
- }
460
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
461
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocTab, isStandalone: true, selector: "tui-doc-tab", inputs: { src: "src" }, ngImport: i0, template: "<div class=\"t-tab\">\n <img\n alt=\"Documentation tab icon\"\n class=\"t-icon\"\n [src]=\"src\"\n />\n <ng-content />\n</div>\n", styles: [".t-tab{display:flex;align-items:center;justify-content:center;padding:0 .5rem;gap:.5rem;color:var(--tui-text-primary)}.t-tab .t-icon{inline-size:1rem;block-size:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
462
- }
463
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocTab, decorators: [{
464
- type: Component,
465
- args: [{ standalone: true, selector: 'tui-doc-tab', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"t-tab\">\n <img\n alt=\"Documentation tab icon\"\n class=\"t-icon\"\n [src]=\"src\"\n />\n <ng-content />\n</div>\n", styles: [".t-tab{display:flex;align-items:center;justify-content:center;padding:0 .5rem;gap:.5rem;color:var(--tui-text-primary)}.t-tab .t-icon{inline-size:1rem;block-size:1rem}\n"] }]
466
- }], propDecorators: { src: [{
467
- type: Input
468
- }] } });
469
-
470
- const SERIALIZED_SUFFIX = '$';
471
- // @bad TODO: refactor output and value sync
472
- class TuiDocDocumentationPropertyConnector {
473
- constructor() {
474
- this.locationRef = inject(Location);
475
- this.activatedRoute = inject(ActivatedRoute);
476
- this.urlSerializer = inject(UrlSerializer);
477
- this.urlStateHandler = inject(TUI_DOC_URL_STATE_HANDLER);
478
- this.alerts = inject(TuiAlertService);
479
- this.documentationPropertyName = '';
480
- this.documentationPropertyMode = null;
481
- this.documentationPropertyType = '';
482
- this.documentationPropertyDeprecated = false;
483
- this.documentationPropertyValues = null;
484
- this.documentationPropertyValueChange = new EventEmitter();
485
- this.changed$ = new Subject();
486
- this.emits = signal(1);
487
- this.template = inject(TemplateRef);
488
- }
489
- get attrName() {
490
- switch (this.documentationPropertyMode) {
491
- case 'input':
492
- return `[${this.documentationPropertyName}]`;
493
- case 'input-output':
494
- return `[(${this.documentationPropertyName})]`;
495
- case 'output':
496
- return `(${this.documentationPropertyName})`;
497
- default:
498
- return this.documentationPropertyName;
499
- }
500
- }
501
- get shouldShowValues() {
502
- return this.documentationPropertyMode !== 'output';
503
- }
504
- get hasItems() {
505
- return !!this.documentationPropertyValues;
506
- }
507
- ngOnInit() {
508
- this.parseParams(this.activatedRoute.snapshot.queryParams);
509
- }
510
- ngOnChanges() {
511
- this.changed$.next();
512
- }
513
- onValueChange(value) {
514
- this.documentationPropertyValue = value;
515
- this.documentationPropertyValueChange.emit(value);
516
- this.setQueryParam(value);
517
- }
518
- emitEvent(event) {
519
- // For more convenient debugging
520
- console.info(this.attrName, event);
521
- this.emits.update((x) => ++x);
522
- let content;
523
- if (event !== undefined) {
524
- content = tuiInspectAny(event, 2);
525
- }
526
- this.alerts.open(content, { label: this.attrName }).subscribe();
527
- }
528
- parseParams(params) {
529
- const propertyValue = params[this.documentationPropertyName];
530
- const propertyValueWithSuffix = params[`${this.documentationPropertyName}${SERIALIZED_SUFFIX}`];
531
- if (!propertyValue && !propertyValueWithSuffix) {
532
- return;
533
- }
534
- let value = !!propertyValueWithSuffix && this.documentationPropertyValues
535
- ? this.documentationPropertyValues[propertyValueWithSuffix]
536
- : tuiCoerceValue(propertyValue);
537
- if (this.documentationPropertyType === 'string' && tuiIsNumber(value)) {
538
- value = value.toString();
539
- }
540
- this.onValueChange(value);
541
- }
542
- setQueryParam(value) {
543
- const tree = this.urlSerializer.parse(this.locationRef.path());
544
- const isValueAvailableByKey = value instanceof Object;
545
- const name = this.documentationPropertyName;
546
- const nameWithSuffix = `${name}${SERIALIZED_SUFFIX}`;
547
- const computedValue = isValueAvailableByKey && this.documentationPropertyValues
548
- ? this.documentationPropertyValues.indexOf(value)
549
- : value;
550
- tree.queryParams = tuiCleanObject({
551
- ...tree.queryParams,
552
- /**
553
- * Caretaker note: reset previous conflicted param in route
554
- * issue: https://github.com/taiga-family/taiga-ui/issues/9764
555
- */
556
- ...(isValueAvailableByKey
557
- ? {
558
- [nameWithSuffix]: computedValue,
559
- [name]: undefined,
560
- }
561
- : {
562
- [nameWithSuffix]: undefined,
563
- [name]: computedValue,
564
- }),
565
- });
566
- this.locationRef.go(this.urlStateHandler(tree));
567
- }
568
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocDocumentationPropertyConnector, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
569
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocDocumentationPropertyConnector, isStandalone: true, selector: "ng-template[documentationPropertyName]", inputs: { documentationPropertyName: "documentationPropertyName", documentationPropertyMode: "documentationPropertyMode", documentationPropertyType: "documentationPropertyType", documentationPropertyValue: "documentationPropertyValue", documentationPropertyDeprecated: "documentationPropertyDeprecated", documentationPropertyValues: "documentationPropertyValues" }, outputs: { documentationPropertyValueChange: "documentationPropertyValueChange" }, exportAs: ["documentationProperty"], usesOnChanges: true, ngImport: i0 }); }
570
- }
571
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocDocumentationPropertyConnector, decorators: [{
572
- type: Directive,
573
- args: [{
574
- standalone: true,
575
- selector: 'ng-template[documentationPropertyName]',
576
- exportAs: 'documentationProperty',
577
- }]
578
- }], propDecorators: { documentationPropertyName: [{
579
- type: Input
580
- }], documentationPropertyMode: [{
581
- type: Input
582
- }], documentationPropertyType: [{
583
- type: Input
584
- }], documentationPropertyValue: [{
585
- type: Input
586
- }], documentationPropertyDeprecated: [{
587
- type: Input
588
- }], documentationPropertyValues: [{
589
- type: Input
590
- }], documentationPropertyValueChange: [{
591
- type: Output
592
- }] } });
593
-
594
- class TuiShowCleanerPipe {
595
- transform(type) {
596
- return type.includes('null');
597
- }
598
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiShowCleanerPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
599
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiShowCleanerPipe, isStandalone: true, name: "tuiShowCleanerPipe" }); }
600
- }
601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiShowCleanerPipe, decorators: [{
602
- type: Pipe,
603
- args: [{
604
- standalone: true,
605
- name: 'tuiShowCleanerPipe',
606
- }]
428
+ }, template: "<div class=\"t-settings\">\n <label tuiLabel>\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"dark()\"\n (ngModelChange)=\"onModeChange($event)\"\n />\n <small>{{ texts[0] }}</small>\n </label>\n <label tuiLabel>\n <input\n size=\"s\"\n tuiSwitch\n type=\"checkbox\"\n [ngModel]=\"opaque\"\n (ngModelChange)=\"changeOpaque($event)\"\n />\n <small>{{ texts[1] }}</small>\n </label>\n</div>\n<div\n tuiResizable\n class=\"t-wrapper\"\n [class.t-wrapper_transparent]=\"!opaque\"\n [style.visibility]=\"rendered() ? 'visible' : 'hidden'\"\n>\n <div class=\"t-content\">\n <div\n #content\n id=\"demo-content\"\n >\n @if (form) {\n <form\n id=\"tui-demo-form\"\n [formGroup]=\"form\"\n >\n <ng-container [ngTemplateOutlet]=\"template() || null\" />\n </form>\n }\n <ng-content />\n </div>\n </div>\n <div\n class=\"t-resizer\"\n [tuiResizer]=\"[1, 0]\"\n (tuiSizeChange)=\"updateWidth($event[0])\"\n >\n <tui-icon icon=\"@tui.grip-vertical\" />\n </div>\n</div>\n@if (form) {\n <tui-expand [expanded]=\"expanded\">\n <ng-template tuiItem>\n <pre class=\"t-value\">Form data: {{ form.value | json }}</pre>\n </ng-template>\n </tui-expand>\n <div class=\"t-footer\">\n <button\n appearance=\"flat-grayscale\"\n automation-id=\"tui-demo-button__toggle-details\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"t-button\"\n [tuiChevron]=\"expanded\"\n (click)=\"toggleDetails()\"\n >\n {{ texts[2] }}\n </button>\n <tui-textfield\n tuiChevron\n tuiTextfieldAppearance=\"secondary-grayscale\"\n tuiTextfieldSize=\"s\"\n class=\"t-select\"\n [tuiTextfieldCleaner]=\"false\"\n >\n <input\n automation-id=\"tui-demo-select__expand-update-on\"\n tuiSelect\n [ngModel]=\"updateOn\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateOnChange($event)\"\n />\n <tui-data-list-wrapper\n *tuiDropdown\n [items]=\"updateOnVariants\"\n />\n </tui-textfield>\n <button\n appearance=\"secondary-grayscale\"\n automation-id=\"tui-demo-button__reset-state\"\n form=\"tui-demo-form\"\n size=\"s\"\n tuiButton\n type=\"reset\"\n >\n Reset\n </button>\n <button\n appearance=\"secondary-grayscale\"\n automation-id=\"tui-demo-button__submit-state\"\n form=\"tui-demo-form\"\n size=\"s\"\n tuiButton\n type=\"submit\"\n >\n Submit\n </button>\n </div>\n}\n", styles: [":host{position:relative;display:block;min-inline-size:100%;margin:0 0 1.5rem;font:var(--tui-font-body-s);color:var(--tui-text-primary);background:var(--tui-background-base-alt);box-shadow:0 0 1rem .5rem var(--tui-background-base);border-radius:var(--tui-radius-m);overflow:hidden;box-sizing:border-box}:host :host-context([tuiTheme=\"dark\"]){background:var(--tui-background-elevation-2)}.t-settings{display:flex;gap:1rem;align-items:center;justify-content:flex-end;padding:.5rem .75rem .25rem}.t-wrapper{display:flex;max-inline-size:100%;min-block-size:6rem;inline-size:100%;min-inline-size:10rem;color:var(--tui-text-primary);background-color:var(--tui-background-base);padding:.25rem;border-radius:var(--tui-radius-m);box-sizing:border-box;box-shadow:inset 0 0 0 .25rem var(--tui-background-base-alt);overflow:hidden;pointer-events:auto}:host-context([tuiTheme=\"dark\"]) .t-wrapper{box-shadow:inset 0 0 0 .25rem var(--tui-background-elevation-2)}.t-wrapper.t-wrapper_transparent{background-image:linear-gradient(45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(-45deg,var(--tui-background-base-alt) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--tui-background-base-alt) 75%),linear-gradient(-45deg,transparent 75%,var(--tui-background-base-alt) 75%);background-size:1.25rem 1.25rem;background-position:0 0,0 .625rem,.625rem -.625rem,-.625rem 0}@media screen and (max-width: 767.4px){.t-wrapper{min-block-size:auto}}.t-content{flex:1 1 0;min-inline-size:0;padding:1.5rem;box-sizing:border-box;overflow:hidden}@media screen and (max-width: 767.4px){.t-content{padding:1rem}}.t-footer{display:flex;gap:.25rem;padding:0 .25rem .25rem}.t-select{inline-size:6rem;margin-inline-start:auto}.t-value{flex:1;background:var(--tui-background-base);border-radius:var(--tui-radius-m);box-shadow:inset 0 -.25rem 0 .25rem var(--tui-background-base-alt);padding:.5rem .75rem 1rem;margin:0 0 -.25rem}:host-context([tuiTheme=\"dark\"]) .t-value{box-shadow:inset 0 -.25rem 0 .25rem var(--tui-background-elevation-2)}.t-resizer{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;min-block-size:inherit;align-items:center;justify-content:center;flex-shrink:0;color:var(--tui-text-tertiary)}.t-resizer:hover,.t-resizer:active{color:var(--tui-text-secondary)}@media screen and (max-width: 767.4px){.t-resizer{display:none}}@media screen and (min-height: 37.5rem){:host._sticky{position:sticky;top:4.625rem;z-index:2}}\n"] }]
607
429
  }] });
608
430
 
609
- class TuiIsOptionalPipe {
610
- transform(name) {
611
- return name.includes('?');
612
- }
613
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIsOptionalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
614
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiIsOptionalPipe, isStandalone: true, name: "tuiIsOptionalPipe" }); }
615
- }
616
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIsOptionalPipe, decorators: [{
617
- type: Pipe,
618
- args: [{
619
- standalone: true,
620
- name: 'tuiIsOptionalPipe',
621
- }]
622
- }] });
623
-
624
- class TuiStripOptionalPipe {
625
- transform(name) {
626
- return name.replace('?', '');
627
- }
628
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStripOptionalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
629
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiStripOptionalPipe, isStandalone: true, name: "tuiStripOptionalPipe" }); }
630
- }
631
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStripOptionalPipe, decorators: [{
632
- type: Pipe,
633
- args: [{
634
- standalone: true,
635
- name: 'tuiStripOptionalPipe',
636
- }]
637
- }] });
638
-
639
- // @bad TODO subscribe propertiesConnectors changes
640
- // @bad TODO refactor to make more flexible
641
- class TuiDocDocumentation {
431
+ class TuiDocTab {
642
432
  constructor() {
643
- this.cdr = inject(ChangeDetectorRef);
644
- this.destroyRef = inject(DestroyRef);
645
- this.propertiesConnectors = EMPTY_QUERY;
646
- this.texts = inject(TUI_DOC_DOCUMENTATION_TEXTS);
647
- this.excludedProperties = inject(TUI_DOC_EXCLUDED_PROPERTIES);
648
- this.activeItemIndex = 0;
649
- this.heading = '';
650
- this.showValues = true;
651
- this.isAPI = false;
652
- this.matcher = (item, exclusions) => !exclusions.has(item.documentationPropertyName);
653
- }
654
- ngAfterContentInit() {
655
- tuiQueryListChanges(this.propertiesConnectors)
656
- .pipe(switchMap((items) => merge(...items.map(({ changed$ }) => changed$))), tuiWatch(this.cdr), takeUntilDestroyed(this.destroyRef))
657
- .subscribe();
433
+ this.src = input('');
658
434
  }
659
- get type() {
660
- return this.isAPI ? this.texts[0] : this.texts[1];
661
- }
662
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocDocumentation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
663
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocDocumentation, isStandalone: true, selector: "tui-doc-documentation", inputs: { heading: "heading", showValues: "showValues", isAPI: "isAPI" }, providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], queries: [{ propertyName: "propertiesConnectors", predicate: TuiDocDocumentationPropertyConnector }], ngImport: i0, template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content />\n<ng-container *ngIf=\"propertiesConnectors | tuiToArray | tuiFilter: matcher : excludedProperties as properties\">\n <table\n *ngIf=\"properties.length\"\n class=\"t-table\"\n >\n <tbody>\n <tr class=\"t-row t-row_header\">\n <th class=\"t-th t-cell t-cell_prop\">{{ texts[2] }}</th>\n <th class=\"t-th\">{{ type }}</th>\n <th\n *ngIf=\"showValues && !isAPI\"\n class=\"t-th t-cell t-th_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of properties\"\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n >\n <td class=\"t-cell t-no-overflow\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property t-additional-info\"\n >\n <code\n *ngIf=\"propertyConnector.attrName\"\n class=\"t-property-code\"\n [style.color]=\"'var(--tui-background-accent-2-pressed)'\"\n >\n {{ propertyConnector.attrName | tuiStripOptionalPipe }}\n </code>\n <tui-badge\n *ngIf=\"propertyConnector.attrName | tuiIsOptionalPipe\"\n appearance=\"neutral\"\n size=\"s\"\n >\n Optional\n </tui-badge>\n <tui-badge\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n appearance=\"negative\"\n size=\"s\"\n >\n Deprecated\n </tui-badge>\n </div>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\" />\n </td>\n <td class=\"t-cell t-no-overflow\">\n <span class=\"type\">\n <code class=\"t-code-type\">\n <ng-container\n *ngFor=\"\n let item of propertyConnector.documentationPropertyType | tuiDocTypeReference;\n let last = last\n \"\n >\n <a\n *ngIf=\"item.reference; else default\"\n target=\"_blank\"\n class=\"t-code-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n <ng-template #default>\n {{ item.type }}\n </ng-template>\n <span *ngIf=\"!last\">&nbsp;|&nbsp;</span>\n </ng-container>\n </code>\n </span>\n </td>\n <td\n *ngIf=\"showValues\"\n class=\"t-cell t-cell_value\"\n >\n <ng-container *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\">\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [tuiTextfieldCleaner]=\"propertyConnector.documentationPropertyType | tuiShowCleanerPipe\"\n [tuiTextfieldLabelOutside]=\"true\"\n [valueContent]=\"selectContent\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n class=\"t-data-list\"\n [itemContent]=\"selectContent\"\n [items]=\"propertyConnector.documentationPropertyValues\"\n />\n </tui-select>\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container [ngSwitch]=\"propertyConnector.documentationPropertyType\">\n <input\n *ngSwitchCase=\"'boolean'\"\n tuiSwitch\n type=\"checkbox\"\n class=\"t-switch\"\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [showIcons]=\"true\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n\n <tui-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n >\n <input\n tuiTextfield\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue || ''\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n </tui-textfield>\n\n <tui-textfield\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n >\n <input\n tuiInputNumber\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [step]=\"1\"\n (ngModelChange)=\"propertyConnector.onValueChange($event || 0)\"\n />\n </tui-textfield>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits()\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n </tbody>\n </table>\n</ng-container>\n", styles: [":host{display:block;min-inline-size:100%}.t-table{inline-size:100%;table-layout:fixed}.t-row:not(:last-child){border-block-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 47.9625em){.t-row{display:flex;flex-wrap:wrap}.t-row_header{display:none}}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-inline-start:0}.t-cell:last-child{padding-inline-end:0}.t-cell_prop{inline-size:40%}.t-cell_value{text-align:end}@media screen and (max-width: 47.9625em){.t-cell{inline-size:100%;block-size:auto;padding:.5rem 0;text-align:start}}.t-th{padding:.5rem 1rem;color:var(--tui-text-secondary);font-weight:400;text-align:start}.t-th_value{max-inline-size:20rem;text-align:end}@media screen and (max-width: 47.9625em){.t-th_value{inline-size:9.375rem}}.t-property{font:var(--tui-font-text-m);margin-block-end:.25rem;font-family:monospace;color:#8f75d1}@media screen and (max-width: 47.9625em){.t-property{padding:.5rem 0}}.t-type{font-family:monospace}.t-deprecated .t-property-code{text-decoration:line-through}.t-deprecated-label{margin-inline-end:.125rem;color:var(--tui-text-negative);font-size:.75rem}.t-additional-info{display:flex;gap:.3125rem;align-items:center}.t-exception{display:block;inline-size:-webkit-max-content;inline-size:max-content}.t-output{text-align:start;opacity:0}.t-heading{font:var(--tui-font-heading-4)}.t-code-type{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start}.t-code-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-code-reference:after{content:\"\";font-size:1rem;inline-size:1rem;block-size:1rem;background:currentColor;-webkit-mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1rem\" height=\"1rem\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path><polyline points=\"15 3 21 3 21 9\"></polyline><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"></line></svg>') center / 100%;mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1rem\" height=\"1rem\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path><polyline points=\"15 3 21 3 21 9\"></polyline><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"></line></svg>') center / 100%}.t-switch{display:block}@media not screen and (max-width: 47.9625em){.t-switch{margin-inline-start:auto}}.t-data-list{overflow-wrap:anywhere}@media not screen and (max-width: 47.9625em){.t-data-list{max-inline-size:22.5rem}}.t-no-overflow{overflow:hidden!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiBadge, selector: "tui-badge,[tuiBadge]", inputs: ["size"] }, { kind: "component", type: i2.TuiDataListWrapperComponent, selector: "tui-data-list-wrapper:not([labels]), tui-data-list-wrapper:not([labels])[new]", inputs: ["items", "disabledItemHandler", "emptyContent", "size", "itemContent"], outputs: ["itemClick"] }, { kind: "directive", type: i3$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "pipe", type: TuiDocTypeReferencePipe, name: "tuiDocTypeReference" }, { kind: "directive", type: i4$2.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: ["tuiDropdownAlign", "tuiDropdownAppearance", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownOffset"] }, { kind: "pipe", type: TuiFilterPipe, name: "tuiFilter" }, { kind: "directive", type: i3.TuiInputNumberDirective, selector: "input[tuiInputNumber]", inputs: ["min", "max", "prefix", "postfix"] }, { kind: "component", type: i3.TuiInputNumberStep, selector: "input[tuiInputNumber][step]", inputs: ["step"] }, { kind: "pipe", type: TuiInspectPipe, name: "tuiInspectAny" }, { kind: "pipe", type: TuiIsOptionalPipe, name: "tuiIsOptionalPipe" }, { kind: "directive", type: TuiNotification, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", inputs: ["appearance", "icon", "size"] }, { kind: "ngmodule", type: TuiSelectModule }, { kind: "component", type: i5.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i5.TuiSelectDirective, selector: "tui-select" }, { kind: "pipe", type: TuiShowCleanerPipe, name: "tuiShowCleanerPipe" }, { kind: "pipe", type: TuiStripOptionalPipe, name: "tuiStripOptionalPipe" }, { kind: "component", type: TuiSwitch, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: ["size", "showIcons"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i4.TuiTextfieldDirective, selector: "input[tuiTextfield]:not([tuiInputCard]):not([tuiInputExpire]):not([tuiInputCVC])" }, { kind: "directive", type: i4.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i8.TuiTextfieldCleanerDirective, selector: "[tuiTextfieldCleaner]", inputs: ["tuiTextfieldCleaner"] }, { kind: "directive", type: i8.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i8.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { kind: "pipe", type: TuiToArrayPipe, name: "tuiToArray" }], animations: [
664
- trigger('emitEvent', [
665
- transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
666
- ]),
667
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
435
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
436
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.18", type: TuiDocTab, isStandalone: true, selector: "tui-doc-tab", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"t-tab\">\n <img\n alt=\"Documentation tab icon\"\n class=\"t-icon\"\n [src]=\"src()\"\n />\n <ng-content />\n</div>\n", styles: [".t-tab{display:flex;align-items:center;justify-content:center;padding:0 .5rem;gap:.5rem;color:var(--tui-text-primary)}.t-tab .t-icon{inline-size:1rem;block-size:1rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
668
437
  }
669
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocDocumentation, decorators: [{
438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocTab, decorators: [{
670
439
  type: Component,
671
- args: [{ standalone: true, selector: 'tui-doc-documentation', imports: [
672
- FormsModule,
673
- NgForOf,
674
- NgIf,
675
- NgSwitch,
676
- NgSwitchCase,
677
- NgTemplateOutlet,
678
- TuiBadge,
679
- TuiDataListWrapper,
680
- TuiDocTypeReferencePipe,
681
- TuiDropdown,
682
- TuiFilterPipe,
683
- TuiInputNumber,
684
- TuiInspectPipe,
685
- TuiIsOptionalPipe,
686
- TuiNotification,
687
- TuiSelectModule,
688
- TuiShowCleanerPipe,
689
- TuiStripOptionalPipe,
690
- TuiSwitch,
691
- TuiTextfield,
692
- TuiTextfieldControllerModule,
693
- TuiToArrayPipe,
694
- ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], animations: [
695
- trigger('emitEvent', [
696
- transition(':increment', [style({ opacity: 1 }), animate('500ms ease-in')]),
697
- ]),
698
- ], template: "<h1\n *ngIf=\"heading\"\n class=\"t-heading\"\n>\n {{ heading }}\n</h1>\n<ng-content />\n<ng-container *ngIf=\"propertiesConnectors | tuiToArray | tuiFilter: matcher : excludedProperties as properties\">\n <table\n *ngIf=\"properties.length\"\n class=\"t-table\"\n >\n <tbody>\n <tr class=\"t-row t-row_header\">\n <th class=\"t-th t-cell t-cell_prop\">{{ texts[2] }}</th>\n <th class=\"t-th\">{{ type }}</th>\n <th\n *ngIf=\"showValues && !isAPI\"\n class=\"t-th t-cell t-th_value\"\n >\n {{ texts[3] }}\n </th>\n </tr>\n <tr\n *ngFor=\"let propertyConnector of properties\"\n class=\"t-row\"\n [class.t-deprecated]=\"propertyConnector.documentationPropertyDeprecated\"\n >\n <td class=\"t-cell t-no-overflow\">\n <div\n automation-id=\"tui-documentation__property-name\"\n class=\"t-property t-additional-info\"\n >\n <code\n *ngIf=\"propertyConnector.attrName\"\n class=\"t-property-code\"\n [style.color]=\"'var(--tui-background-accent-2-pressed)'\"\n >\n {{ propertyConnector.attrName | tuiStripOptionalPipe }}\n </code>\n <tui-badge\n *ngIf=\"propertyConnector.attrName | tuiIsOptionalPipe\"\n appearance=\"neutral\"\n size=\"s\"\n >\n Optional\n </tui-badge>\n <tui-badge\n *ngIf=\"propertyConnector.documentationPropertyDeprecated\"\n appearance=\"negative\"\n size=\"s\"\n >\n Deprecated\n </tui-badge>\n </div>\n <ng-container [ngTemplateOutlet]=\"propertyConnector.template\" />\n </td>\n <td class=\"t-cell t-no-overflow\">\n <span class=\"type\">\n <code class=\"t-code-type\">\n <ng-container\n *ngFor=\"\n let item of propertyConnector.documentationPropertyType | tuiDocTypeReference;\n let last = last\n \"\n >\n <a\n *ngIf=\"item.reference; else default\"\n target=\"_blank\"\n class=\"t-code-reference\"\n [attr.href]=\"item.reference\"\n >\n {{ item.type }}\n </a>\n <ng-template #default>\n {{ item.type }}\n </ng-template>\n <span *ngIf=\"!last\">&nbsp;|&nbsp;</span>\n </ng-container>\n </code>\n </span>\n </td>\n <td\n *ngIf=\"showValues\"\n class=\"t-cell t-cell_value\"\n >\n <ng-container *ngIf=\"propertyConnector.shouldShowValues; else elseEmitter\">\n <tui-select\n *ngIf=\"propertyConnector.hasItems; else noItems\"\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n [nativeId]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [tuiTextfieldCleaner]=\"propertyConnector.documentationPropertyType | tuiShowCleanerPipe\"\n [tuiTextfieldLabelOutside]=\"true\"\n [valueContent]=\"selectContent\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n >\n <code class=\"t-exception\">null</code>\n <tui-data-list-wrapper\n *tuiDataList\n class=\"t-data-list\"\n [itemContent]=\"selectContent\"\n [items]=\"propertyConnector.documentationPropertyValues\"\n />\n </tui-select>\n <ng-template\n #selectContent\n let-data\n >\n <code>{{ data | tuiInspectAny }}</code>\n </ng-template>\n\n <ng-template #noItems>\n <ng-container [ngSwitch]=\"propertyConnector.documentationPropertyType\">\n <input\n *ngSwitchCase=\"'boolean'\"\n tuiSwitch\n type=\"checkbox\"\n class=\"t-switch\"\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [showIcons]=\"true\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n\n <tui-textfield\n *ngSwitchCase=\"'string'\"\n tuiTextfieldSize=\"m\"\n >\n <input\n tuiTextfield\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue || ''\"\n (ngModelChange)=\"propertyConnector.onValueChange($event)\"\n />\n </tui-textfield>\n\n <tui-textfield\n *ngSwitchCase=\"'number'\"\n tuiTextfieldSize=\"m\"\n >\n <input\n tuiInputNumber\n [id]=\"propertyConnector.attrName\"\n [ngModel]=\"propertyConnector.documentationPropertyValue\"\n [step]=\"1\"\n (ngModelChange)=\"propertyConnector.onValueChange($event || 0)\"\n />\n </tui-textfield>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #elseEmitter>\n <tui-notification\n class=\"t-output\"\n [@emitEvent]=\"propertyConnector.emits()\"\n >\n Emit!\n </tui-notification>\n </ng-template>\n </td>\n </tr>\n </tbody>\n </table>\n</ng-container>\n", styles: [":host{display:block;min-inline-size:100%}.t-table{inline-size:100%;table-layout:fixed}.t-row:not(:last-child){border-block-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 47.9625em){.t-row{display:flex;flex-wrap:wrap}.t-row_header{display:none}}.t-cell{padding:1rem 1rem .875rem}.t-cell:first-child{padding-inline-start:0}.t-cell:last-child{padding-inline-end:0}.t-cell_prop{inline-size:40%}.t-cell_value{text-align:end}@media screen and (max-width: 47.9625em){.t-cell{inline-size:100%;block-size:auto;padding:.5rem 0;text-align:start}}.t-th{padding:.5rem 1rem;color:var(--tui-text-secondary);font-weight:400;text-align:start}.t-th_value{max-inline-size:20rem;text-align:end}@media screen and (max-width: 47.9625em){.t-th_value{inline-size:9.375rem}}.t-property{font:var(--tui-font-text-m);margin-block-end:.25rem;font-family:monospace;color:#8f75d1}@media screen and (max-width: 47.9625em){.t-property{padding:.5rem 0}}.t-type{font-family:monospace}.t-deprecated .t-property-code{text-decoration:line-through}.t-deprecated-label{margin-inline-end:.125rem;color:var(--tui-text-negative);font-size:.75rem}.t-additional-info{display:flex;gap:.3125rem;align-items:center}.t-exception{display:block;inline-size:-webkit-max-content;inline-size:max-content}.t-output{text-align:start;opacity:0}.t-heading{font:var(--tui-font-heading-4)}.t-code-type{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start}.t-code-reference{display:inline-flex;color:var(--tui-text-action);text-decoration:none;align-items:center;justify-content:center;gap:.1875rem}.t-code-reference:after{content:\"\";font-size:1rem;inline-size:1rem;block-size:1rem;background:currentColor;-webkit-mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1rem\" height=\"1rem\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path><polyline points=\"15 3 21 3 21 9\"></polyline><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"></line></svg>') center / 100%;mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1rem\" height=\"1rem\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path><polyline points=\"15 3 21 3 21 9\"></polyline><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"></line></svg>') center / 100%}.t-switch{display:block}@media not screen and (max-width: 47.9625em){.t-switch{margin-inline-start:auto}}.t-data-list{overflow-wrap:anywhere}@media not screen and (max-width: 47.9625em){.t-data-list{max-inline-size:22.5rem}}.t-no-overflow{overflow:hidden!important}\n"] }]
699
- }], propDecorators: { propertiesConnectors: [{
700
- type: ContentChildren,
701
- args: [TuiDocDocumentationPropertyConnector]
702
- }], heading: [{
703
- type: Input
704
- }], showValues: [{
705
- type: Input
706
- }], isAPI: [{
707
- type: Input
708
- }] } });
709
-
710
- class TuiGetColorPipe {
711
- transform(color) {
712
- if (color.length === 4) {
713
- return color
714
- .split('')
715
- .reduce((result, current) => [...result, current, current], [])
716
- .join('')
717
- .replace('#', '');
718
- }
719
- if (color.startsWith('#')) {
720
- return color;
721
- }
722
- if (color === 'transparent') {
723
- return '#000000';
724
- }
725
- const parsed = color
726
- .replace('rgb(', '')
727
- .replace('rgba(', '')
728
- .replace(')', '')
729
- .replace(' ', '')
730
- .split(',')
731
- .map((v) => Number.parseInt(v, 10));
732
- return tuiRgbToHex(...parsed);
733
- }
734
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiGetColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
735
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiGetColorPipe, isStandalone: true, name: "tuiGetColorPipe" }); }
736
- }
737
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiGetColorPipe, decorators: [{
738
- type: Pipe,
739
- args: [{
740
- standalone: true,
741
- name: 'tuiGetColorPipe',
742
- }]
743
- }] });
744
-
745
- class TuiGetOpacityPipe {
746
- transform(color) {
747
- if (color.startsWith('#') || color.startsWith('rgb(')) {
748
- return 100;
749
- }
750
- if (color === 'transparent') {
751
- return 0;
752
- }
753
- const lastComma = color.lastIndexOf(',');
754
- const parsed = color
755
- .slice(lastComma)
756
- .replace(')', '')
757
- .replace(' ', '')
758
- .replace(',', '');
759
- return Math.round(Number.parseFloat(parsed) * 100);
760
- }
761
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiGetOpacityPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
762
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiGetOpacityPipe, isStandalone: true, name: "tuiGetOpacity" }); }
763
- }
764
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiGetOpacityPipe, decorators: [{
765
- type: Pipe,
766
- args: [{
767
- standalone: true,
768
- name: 'tuiGetOpacity',
769
- }]
770
- }] });
771
-
772
- class TuiIsPrimitivePolymorpheusContentPipe {
773
- transform(value) {
774
- return tuiIsString(value) || tuiIsNumber(value);
775
- }
776
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIsPrimitivePolymorpheusContentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
777
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiIsPrimitivePolymorpheusContentPipe, isStandalone: true, name: "tuiIsPrimitivePolymorpheusContentPipe" }); }
778
- }
779
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIsPrimitivePolymorpheusContentPipe, decorators: [{
780
- type: Pipe,
781
- args: [{
782
- standalone: true,
783
- name: 'tuiIsPrimitivePolymorpheusContentPipe',
784
- }]
440
+ args: [{ selector: 'tui-doc-tab', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"t-tab\">\n <img\n alt=\"Documentation tab icon\"\n class=\"t-icon\"\n [src]=\"src()\"\n />\n <ng-content />\n</div>\n", styles: [".t-tab{display:flex;align-items:center;justify-content:center;padding:0 .5rem;gap:.5rem;color:var(--tui-text-primary)}.t-tab .t-icon{inline-size:1rem;block-size:1rem}\n"] }]
785
441
  }] });
786
442
 
787
443
  const TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = {
@@ -793,37 +449,29 @@ const TUI_DOC_EXAMPLE_DEFAULT_OPTIONS = {
793
449
  /**
794
450
  * Default parameters for DocExample component
795
451
  */
796
- const TUI_DOC_EXAMPLE_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_DOC_EXAMPLE_OPTIONS' : '', {
797
- factory: () => TUI_DOC_EXAMPLE_DEFAULT_OPTIONS,
798
- });
799
- function tuiDocExampleOptionsProvider(options) {
800
- return tuiProvideOptions(TUI_DOC_EXAMPLE_OPTIONS, options, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS);
801
- }
452
+ const [TUI_DOC_EXAMPLE_OPTIONS, tuiDocExampleOptionsProvider] = tuiCreateOptions(TUI_DOC_EXAMPLE_DEFAULT_OPTIONS);
802
453
 
803
454
  class TuiDocExampleGetTabsPipe {
804
455
  transform(content, defaultTab) {
805
456
  return [defaultTab, ...Object.keys(content).filter((tab) => content[tab])];
806
457
  }
807
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocExampleGetTabsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
808
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiDocExampleGetTabsPipe, isStandalone: true, name: "tuiDocExampleGetTabs" }); }
458
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocExampleGetTabsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
459
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: TuiDocExampleGetTabsPipe, isStandalone: true, name: "tuiDocExampleGetTabs" }); }
809
460
  }
810
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocExampleGetTabsPipe, decorators: [{
461
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocExampleGetTabsPipe, decorators: [{
811
462
  type: Pipe,
812
- args: [{
813
- standalone: true,
814
- name: 'tuiDocExampleGetTabs',
815
- }]
463
+ args: [{ name: 'tuiDocExampleGetTabs' }]
816
464
  }] });
817
465
 
818
466
  class TuiDocExample {
819
467
  constructor() {
468
+ this.doc = inject(DOCUMENT);
820
469
  this.clipboard = inject(Clipboard);
821
- this.alerts = inject(TuiAlertService);
470
+ this.alerts = inject(TuiNotificationService);
822
471
  this.location = inject(WA_LOCATION);
823
- this.copyTexts$ = inject(TUI_COPY_TEXTS);
472
+ this.copyTexts = inject(TUI_COPY_TEXTS);
824
473
  this.processContent = inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR);
825
474
  this.rawLoader$$ = new BehaviorSubject({});
826
- this.lazyLoader$$ = new ReplaySubject(1);
827
475
  this.fullscreenEnabled = inject(DOCUMENT).fullscreenEnabled;
828
476
  this.icons = inject(TUI_DOC_ICONS);
829
477
  this.options = inject(TUI_DOC_EXAMPLE_OPTIONS);
@@ -831,26 +479,23 @@ class TuiDocExample {
831
479
  this.codeEditor = inject(TUI_DOC_CODE_EDITOR, { optional: true });
832
480
  this.codeActions = inject(TUI_DOC_CODE_ACTIONS);
833
481
  this.route = inject(ActivatedRoute);
834
- this.defaultTabIndex = 0;
835
- this.defaultTab = this.texts[this.defaultTabIndex];
836
- this.activeItemIndex = this.defaultTabIndex;
482
+ this.defaultTab = this.texts[0];
483
+ this.activeItemIndex = 0;
837
484
  this.fullscreen = false;
838
- this.copy = toSignal(this.copyTexts$.pipe(map(([copy]) => copy)), {
839
- initialValue: '',
840
- });
485
+ this.copy = computed(() => this.copyTexts()[0]);
841
486
  this.loading = signal(false);
487
+ this.id = computed(() => tuiToKebab(this.heading()));
842
488
  this.processor = toSignal(this.rawLoader$$.pipe(switchMap(tuiRawLoadRecord), map((value) => this.processContent(value))), { initialValue: {} });
843
- this.lazyComponent = toSignal(this.lazyLoader$$.pipe(switchAll(), map((module) => new PolymorpheusComponent(module.default))));
844
- this.id = null;
845
- this.fullsize = inject(TUI_DOC_EXAMPLE_OPTIONS).fullsize;
846
- this.componentName = this.location.pathname.slice(1);
489
+ this.heading = input('');
490
+ this.description = input();
491
+ this.fullsize = input(inject(TUI_DOC_EXAMPLE_OPTIONS).fullsize);
492
+ this.component = input();
493
+ this.content = input({});
494
+ this.preview = input(true);
847
495
  this.visible = (files) => Boolean(this.codeEditor && this.options.codeEditorVisibilityHandler(files));
848
496
  }
849
- set content(content) {
850
- this.rawLoader$$.next(content);
851
- }
852
- set component(content) {
853
- this.lazyLoader$$.next(content);
497
+ ngOnChanges() {
498
+ this.rawLoader$$.next(this.content());
854
499
  }
855
500
  getTabTitle(fileName) {
856
501
  return this.options.tabTitles.get(fileName) || fileName;
@@ -864,48 +509,47 @@ class TuiDocExample {
864
509
  edit(files) {
865
510
  this.loading.set(true);
866
511
  this.codeEditor
867
- ?.edit(this.componentName, this.id || '', files)
512
+ ?.edit(this.location.pathname.slice(1), this.id() || '', files)
868
513
  .finally(() => this.loading.set(false));
869
514
  }
870
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocExample, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
871
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocExample, isStandalone: true, selector: "tui-doc-example", inputs: { id: "id", heading: "heading", description: "description", fullsize: "fullsize", componentName: "componentName", content: "content", component: "component" }, host: { properties: { "attr.id": "id", "class._fullsize": "fullsize" } }, ngImport: i0, template: "<div class=\"t-title-block\">\n <h2\n *ngIf=\"heading\"\n class=\"t-title\"\n >\n <span\n *polymorpheusOutlet=\"heading as text\"\n [textContent]=\"text\"\n ></span>\n </h2>\n <a\n *ngIf=\"id\"\n routerLink=\".\"\n routerLinkActive=\"t-link-active\"\n tuiLink\n type=\"button\"\n class=\"t-link\"\n [attr.title]=\"copy()\"\n [fragment]=\"id\"\n [relativeTo]=\"route.firstChild ?? route\"\n [routerLinkActiveOptions]=\"{matrixParams: 'exact', queryParams: 'exact', paths: 'exact', fragment: 'exact'}\"\n (click)=\"copyExampleLink($event.currentTarget)\"\n >\n #\n </a>\n</div>\n<h3\n *ngIf=\"description\"\n class=\"t-description\"\n>\n <ng-container *polymorpheusOutlet=\"description as text\">\n {{ text }}\n </ng-container>\n</h3>\n\n<div\n class=\"t-example\"\n [(tuiFullscreen)]=\"fullscreen\"\n>\n <ng-container *ngIf=\"processor() | tuiDocExampleGetTabs: defaultTab as tabs\">\n <div\n *ngIf=\"tabs.length > 1\"\n class=\"t-tabs-wrapper\"\n >\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabs\">\n <button\n *tuiItem\n tuiTab\n type=\"button\"\n >\n <ng-container *polymorpheusOutlet=\"getTabTitle(tab) as text\">\n {{ text }}\n </ng-container>\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <tui-loader\n *ngIf=\"processor() | tuiMapper: visible\"\n size=\"xs\"\n class=\"t-code-editor\"\n [overlay]=\"true\"\n [showLoader]=\"loading()\"\n (click)=\"edit(processor())\"\n >\n <ng-container *ngIf=\"codeEditor?.content as content; else defaultEditContent\">\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEditContent>\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n </ng-template>\n </tui-loader>\n\n <button\n *ngIf=\"fullscreenEnabled\"\n appearance=\"flat\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"fullscreen ? icons.shrink : icons.expand\"\n (click)=\"fullscreen = !fullscreen\"\n >\n Fullscreen\n </button>\n </div>\n\n <div\n *ngFor=\"let tab of tabs; let index = index\"\n class=\"t-content\"\n >\n <section\n *ngIf=\"index === defaultTabIndex\"\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n [style.display]=\"activeItemIndex === index && index === defaultTabIndex ? 'block' : 'none'\"\n >\n <ng-content />\n <ng-container *polymorpheusOutlet=\"lazyComponent() as text\">\n {{ text }}\n </ng-container>\n </section>\n\n <tui-doc-code\n *tuiLet=\"processor()[tabs[index] || 0] || '' as code\"\n [code]=\"code\"\n [style.display]=\"activeItemIndex === index && index !== defaultTabIndex ? 'block' : 'none'\"\n >\n <ng-container *ngFor=\"let action of codeActions\">\n <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\n </ng-container>\n </tui-doc-code>\n </div>\n </ng-container>\n</div>\n", styles: [":host{position:relative;display:block;padding-block-start:3.5rem;clear:inline-end}:host:target{animation:1s tuiShaking}@media screen and (max-width: 47.9625em){:host{padding-block-start:2rem}}.t-title-block{display:flex;flex-direction:row-reverse}.t-title{font:var(--tui-font-heading-5);margin:0 auto .5rem 0}@media screen and (max-width: 47.9625em){.t-title{font:var(--tui-font-heading-6)}}.t-title:hover+.t-link{opacity:1}.t-link{font:var(--tui-font-heading-6);padding-inline-end:.1rem}@media not screen and (max-width: 47.9625em){.t-link{font:var(--tui-font-heading-5);margin-inline-start:-1.6rem}.t-link:not(:hover,:focus-visible):not(.t-link-active){opacity:0}}.t-description{font:var(--tui-font-text-m);font-weight:400;margin:0}.t-title:first-letter,.t-description:first-letter{text-transform:capitalize}.t-example{position:relative;margin-block-start:1.5rem;border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem #0000001a;overflow:hidden}@media screen and (max-width: 47.9625em){.t-example{margin-block-start:.75rem}}.t-tabs-wrapper{display:flex;padding:0 .875rem 0 2rem;box-shadow:inset 0 -1px var(--tui-border-normal);justify-content:space-between;align-items:center;gap:.5rem}@media screen and (max-width: 47.9625em){.t-tabs-wrapper{padding:0 .875rem 0 1rem}}.t-tabs{flex-grow:1;box-shadow:none}.t-code-editor{flex-shrink:0;block-size:auto}@media screen and (max-width: 47.9625em){.t-code-editor{font-size:0;inline-size:1.5rem}}.t-demo{position:relative;padding:2rem;max-inline-size:100%;box-sizing:border-box;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio: 0) and (-webkit-min-device-pixel-ratio: 0),all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.t-demo{padding:1rem}}:host:not(._fullsize) .t-demo{inline-size:-webkit-min-content;inline-size:min-content;min-inline-size:21rem}tui-doc-code{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiDocCode, selector: "tui-doc-code", inputs: ["filename", "code"] }, { kind: "pipe", type: TuiDocExampleGetTabsPipe, name: "tuiDocExampleGetTabs" }, { kind: "component", type: TuiFullscreen, selector: "[tuiFullscreen]", inputs: ["tuiFullscreenOptions", "tuiFullscreen"], outputs: ["tuiFullscreenChange"] }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "directive", type: i1$2.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: i2$1.TuiTab, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { kind: "component", type: i2$1.TuiTabsWithMore, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["size", "moreContent", "dropdownContent", "underline", "itemsLimit", "activeItemIndex"], outputs: ["activeItemIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
515
+ onIntersection() {
516
+ this.doc.dispatchEvent(new CustomEvent('tui-example', { detail: this.id() }));
517
+ }
518
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocExample, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
519
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocExample, isStandalone: true, selector: "tui-doc-example", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, fullsize: { classPropertyName: "fullsize", publicName: "fullsize", isSignal: true, isRequired: false, transformFunction: null }, component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, preview: { classPropertyName: "preview", publicName: "preview", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "waIntersectionThreshold": "1", "waIntersectionRootMargin": "-40px 0px 1000000% 0px" }, listeners: { "waIntersectionObservee": "onIntersection()" }, properties: { "attr.id": "id()", "class._fullsize": "fullsize()" } }, usesOnChanges: true, hostDirectives: [{ directive: i1$2.WaIntersectionObserverDirective }, { directive: i1$2.WaIntersectionObservee, outputs: ["waIntersectionObservee", "waIntersectionObservee"] }], ngImport: i0, template: "@if (heading()) {\n <header tuiHeader=\"h6\">\n <hgroup tuiTitle>\n <h3>\n <a\n appearance=\"\"\n routerLink=\".\"\n tuiLink\n class=\"t-link\"\n [attr.title]=\"copy()\"\n [fragment]=\"id()\"\n [iconEnd]=\"icons.link\"\n [relativeTo]=\"route.firstChild ?? route\"\n (click)=\"copyExampleLink($event.currentTarget)\"\n >\n {{ heading() }}\n </a>\n </h3>\n @if (description()) {\n <p>\n <ng-container *polymorpheusOutlet=\"description() as text\">\n {{ text }}\n </ng-container>\n </p>\n }\n </hgroup>\n </header>\n}\n<div\n class=\"t-example\"\n [(tuiFullscreen)]=\"fullscreen\"\n>\n @if (processor() | tuiDocExampleGetTabs: defaultTab; as all) {\n @let tabs = preview() ? all : all.slice(1);\n @if (tabs.length) {\n <div class=\"t-header\">\n <tui-segmented\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n @for (tab of tabs; track tab) {\n <button type=\"button\">\n <ng-container *polymorpheusOutlet=\"getTabTitle(tab) as text\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-segmented>\n @if (processor() | tuiMapper: visible) {\n <tui-loader\n size=\"xs\"\n class=\"t-code-editor\"\n [loading]=\"loading()\"\n [overlay]=\"true\"\n (click)=\"edit(processor())\"\n >\n @if (codeEditor?.content; as content) {\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n } @else {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n }\n </tui-loader>\n }\n @if (fullscreenEnabled && preview()) {\n <button\n appearance=\"flat-grayscale\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"fullscreen ? icons.shrink : icons.expand\"\n (click)=\"fullscreen = !fullscreen\"\n >\n Fullscreen\n </button>\n }\n </div>\n }\n @for (tab of tabs; track tab) {\n <div class=\"t-content\">\n @if (!$index && preview()) {\n <section\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n [style.display]=\"activeItemIndex === $index ? 'block' : 'none'\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n <ng-container *ngComponentOutlet=\"component() | async\" />\n </section>\n }\n @let code = processor()[tabs[$index] || 0] || '';\n <tui-doc-code\n [code]=\"code\"\n [style.display]=\"activeItemIndex === $index && ($index || !preview()) ? 'block' : 'none'\"\n >\n @for (action of codeActions; track action) {\n <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\n }\n </tui-doc-code>\n </div>\n } @empty {\n <div class=\"t-content\">\n <section class=\"t-demo\">\n <ng-container *ngTemplateOutlet=\"content\" />\n </section>\n </div>\n }\n }\n</div>\n<ng-template #content>\n <ng-content />\n</ng-template>\n", styles: [":host{position:relative;display:block;padding-block-start:2rem;scroll-margin-top:4rem}:host :host-context(tui-doc-toc +){padding-block-start:0}:host :host-context(tui-doc-toc ~){inline-size:calc(100% - 20rem)}@media screen and (max-width: 1279.4px){:host :host-context(tui-doc-toc ~){inline-size:100%}}:host :host-context(tui-doc-toc:empty ~){inline-size:100%}:host ::ng-deep :fullscreen .t-header{padding:.25rem}.t-link{text-decoration:none!important;font:inherit}.t-link:after{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;color:transparent}.t-link:hover,.t-link:hover:after{color:var(--tui-text-secondary)}.t-example{position:relative;border:.25rem solid var(--tui-background-base-alt);border-radius:var(--tui-radius-m);overflow:hidden}:host-context([tuiTheme=\"dark\"]) .t-example{border:.25rem solid var(--tui-background-elevation-2)}.t-example:not(:first-child){margin-block-start:1.25rem}@media screen and (max-width: 767.4px){.t-example:not(:first-child){margin-block-start:.75rem}}.t-header{display:flex;justify-content:space-between;align-items:center;overflow:auto;gap:.25rem;padding-block-end:.25rem;padding-inline-end:.125rem;background:var(--tui-background-base-alt);--tui-stroke-width: .09375rem}:host-context([tuiTheme=\"dark\"]) .t-header{background:var(--tui-background-elevation-2)}.t-tabs{flex-grow:1;background:none;margin:-.125rem}.t-tabs:before{filter:none}.t-content{border-radius:var(--tui-radius-m);box-shadow:-1rem -1rem var(--tui-background-base-alt),1rem -1rem var(--tui-background-base-alt)}:host-context([tuiTheme=\"dark\"]) .t-content{box-shadow:-1rem -1rem var(--tui-background-elevation-2),1rem -1rem var(--tui-background-elevation-2)}.t-content:first-child{box-shadow:none}.t-code-editor{flex-shrink:0;block-size:auto}@media screen and (max-width: 767.4px){.t-code-editor{font-size:0;inline-size:1.5rem}}.t-demo{position:relative;padding:2rem;max-inline-size:100%;box-sizing:border-box;overflow-x:auto}:host:not(._fullsize) .t-demo{inline-size:min-content;min-inline-size:21rem}@media screen and (max-width: 767.4px){.t-demo{min-inline-size:100%!important;padding:1rem}}tui-doc-code{overflow:hidden}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiDocCode, selector: "tui-doc-code", inputs: ["filename", "code", "lineNumbers"] }, { kind: "pipe", type: TuiDocExampleGetTabsPipe, name: "tuiDocExampleGetTabs" }, { kind: "component", type: TuiFullscreen, selector: "[tuiFullscreen]", inputs: ["tuiFullscreen", "tuiFullscreenOptions"], outputs: ["tuiFullscreenChange"] }, { kind: "directive", type: TuiHeader, selector: "[tuiHeader]", inputs: ["tuiHeader"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "component", type: TuiSegmented, selector: "tui-segmented", inputs: ["size", "activeItemIndex"], outputs: ["activeItemIndexChange"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
872
520
  }
873
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocExample, decorators: [{
521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocExample, decorators: [{
874
522
  type: Component,
875
- args: [{ standalone: true, selector: 'tui-doc-example', imports: [
876
- NgForOf,
877
- NgIf,
523
+ args: [{ selector: 'tui-doc-example', imports: [
524
+ AsyncPipe,
525
+ NgComponentOutlet,
526
+ NgTemplateOutlet,
878
527
  PolymorpheusOutlet,
879
528
  RouterLink,
880
- RouterLinkActive,
881
529
  TuiButton,
882
530
  TuiDocCode,
883
531
  TuiDocExampleGetTabsPipe,
884
532
  TuiFullscreen,
885
- TuiLet,
533
+ TuiHeader,
886
534
  TuiLink,
887
535
  TuiLoader,
888
536
  TuiMapperPipe,
889
- TuiTabs,
890
- ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
891
- '[attr.id]': 'id',
892
- '[class._fullsize]': 'fullsize',
893
- }, template: "<div class=\"t-title-block\">\n <h2\n *ngIf=\"heading\"\n class=\"t-title\"\n >\n <span\n *polymorpheusOutlet=\"heading as text\"\n [textContent]=\"text\"\n ></span>\n </h2>\n <a\n *ngIf=\"id\"\n routerLink=\".\"\n routerLinkActive=\"t-link-active\"\n tuiLink\n type=\"button\"\n class=\"t-link\"\n [attr.title]=\"copy()\"\n [fragment]=\"id\"\n [relativeTo]=\"route.firstChild ?? route\"\n [routerLinkActiveOptions]=\"{matrixParams: 'exact', queryParams: 'exact', paths: 'exact', fragment: 'exact'}\"\n (click)=\"copyExampleLink($event.currentTarget)\"\n >\n #\n </a>\n</div>\n<h3\n *ngIf=\"description\"\n class=\"t-description\"\n>\n <ng-container *polymorpheusOutlet=\"description as text\">\n {{ text }}\n </ng-container>\n</h3>\n\n<div\n class=\"t-example\"\n [(tuiFullscreen)]=\"fullscreen\"\n>\n <ng-container *ngIf=\"processor() | tuiDocExampleGetTabs: defaultTab as tabs\">\n <div\n *ngIf=\"tabs.length > 1\"\n class=\"t-tabs-wrapper\"\n >\n <tui-tabs-with-more\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabs\">\n <button\n *tuiItem\n tuiTab\n type=\"button\"\n >\n <ng-container *polymorpheusOutlet=\"getTabTitle(tab) as text\">\n {{ text }}\n </ng-container>\n </button>\n </ng-container>\n </tui-tabs-with-more>\n\n <tui-loader\n *ngIf=\"processor() | tuiMapper: visible\"\n size=\"xs\"\n class=\"t-code-editor\"\n [overlay]=\"true\"\n [showLoader]=\"loading()\"\n (click)=\"edit(processor())\"\n >\n <ng-container *ngIf=\"codeEditor?.content as content; else defaultEditContent\">\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEditContent>\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n </ng-template>\n </tui-loader>\n\n <button\n *ngIf=\"fullscreenEnabled\"\n appearance=\"flat\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"fullscreen ? icons.shrink : icons.expand\"\n (click)=\"fullscreen = !fullscreen\"\n >\n Fullscreen\n </button>\n </div>\n\n <div\n *ngFor=\"let tab of tabs; let index = index\"\n class=\"t-content\"\n >\n <section\n *ngIf=\"index === defaultTabIndex\"\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n [style.display]=\"activeItemIndex === index && index === defaultTabIndex ? 'block' : 'none'\"\n >\n <ng-content />\n <ng-container *polymorpheusOutlet=\"lazyComponent() as text\">\n {{ text }}\n </ng-container>\n </section>\n\n <tui-doc-code\n *tuiLet=\"processor()[tabs[index] || 0] || '' as code\"\n [code]=\"code\"\n [style.display]=\"activeItemIndex === index && index !== defaultTabIndex ? 'block' : 'none'\"\n >\n <ng-container *ngFor=\"let action of codeActions\">\n <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\n </ng-container>\n </tui-doc-code>\n </div>\n </ng-container>\n</div>\n", styles: [":host{position:relative;display:block;padding-block-start:3.5rem;clear:inline-end}:host:target{animation:1s tuiShaking}@media screen and (max-width: 47.9625em){:host{padding-block-start:2rem}}.t-title-block{display:flex;flex-direction:row-reverse}.t-title{font:var(--tui-font-heading-5);margin:0 auto .5rem 0}@media screen and (max-width: 47.9625em){.t-title{font:var(--tui-font-heading-6)}}.t-title:hover+.t-link{opacity:1}.t-link{font:var(--tui-font-heading-6);padding-inline-end:.1rem}@media not screen and (max-width: 47.9625em){.t-link{font:var(--tui-font-heading-5);margin-inline-start:-1.6rem}.t-link:not(:hover,:focus-visible):not(.t-link-active){opacity:0}}.t-description{font:var(--tui-font-text-m);font-weight:400;margin:0}.t-title:first-letter,.t-description:first-letter{text-transform:capitalize}.t-example{position:relative;margin-block-start:1.5rem;border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);box-shadow:0 .125rem .1875rem #0000001a;overflow:hidden}@media screen and (max-width: 47.9625em){.t-example{margin-block-start:.75rem}}.t-tabs-wrapper{display:flex;padding:0 .875rem 0 2rem;box-shadow:inset 0 -1px var(--tui-border-normal);justify-content:space-between;align-items:center;gap:.5rem}@media screen and (max-width: 47.9625em){.t-tabs-wrapper{padding:0 .875rem 0 1rem}}.t-tabs{flex-grow:1;box-shadow:none}.t-code-editor{flex-shrink:0;block-size:auto}@media screen and (max-width: 47.9625em){.t-code-editor{font-size:0;inline-size:1.5rem}}.t-demo{position:relative;padding:2rem;max-inline-size:100%;box-sizing:border-box;overflow-x:auto}@media all and (-webkit-min-device-pixel-ratio: 0) and (-webkit-min-device-pixel-ratio: 0),all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm){.t-demo::-webkit-scrollbar,.t-demo::-webkit-scrollbar-thumb{inline-size:1rem;block-size:1rem;border-radius:6.25rem;background-clip:padding-box;border:.375rem solid transparent}.t-demo::-webkit-scrollbar{background-color:transparent}.t-demo::-webkit-scrollbar-thumb{background-color:var(--tui-background-neutral-1-hover)}.t-demo::-webkit-scrollbar-thumb:hover{background-color:var(--tui-background-neutral-1-pressed)}.t-demo::-webkit-scrollbar-thumb:active{background-color:var(--tui-text-tertiary)}}@media screen and (max-width: 47.9625em){.t-demo{padding:1rem}}:host:not(._fullsize) .t-demo{inline-size:-webkit-min-content;inline-size:min-content;min-inline-size:21rem}tui-doc-code{overflow:hidden}\n"] }]
894
- }], propDecorators: { id: [{
895
- type: Input
896
- }], heading: [{
897
- type: Input
898
- }], description: [{
899
- type: Input
900
- }], fullsize: [{
901
- type: Input
902
- }], componentName: [{
903
- type: Input
904
- }], content: [{
905
- type: Input
906
- }], component: [{
907
- type: Input
908
- }] } });
537
+ TuiSegmented,
538
+ TuiTitle,
539
+ ], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
540
+ WaIntersectionObserverDirective,
541
+ {
542
+ directive: WaIntersectionObservee,
543
+ outputs: ['waIntersectionObservee'],
544
+ },
545
+ ], host: {
546
+ waIntersectionThreshold: '1',
547
+ waIntersectionRootMargin: '-40px 0px 1000000% 0px',
548
+ '[attr.id]': 'id()',
549
+ '[class._fullsize]': 'fullsize()',
550
+ '(waIntersectionObservee)': 'onIntersection()',
551
+ }, template: "@if (heading()) {\n <header tuiHeader=\"h6\">\n <hgroup tuiTitle>\n <h3>\n <a\n appearance=\"\"\n routerLink=\".\"\n tuiLink\n class=\"t-link\"\n [attr.title]=\"copy()\"\n [fragment]=\"id()\"\n [iconEnd]=\"icons.link\"\n [relativeTo]=\"route.firstChild ?? route\"\n (click)=\"copyExampleLink($event.currentTarget)\"\n >\n {{ heading() }}\n </a>\n </h3>\n @if (description()) {\n <p>\n <ng-container *polymorpheusOutlet=\"description() as text\">\n {{ text }}\n </ng-container>\n </p>\n }\n </hgroup>\n </header>\n}\n<div\n class=\"t-example\"\n [(tuiFullscreen)]=\"fullscreen\"\n>\n @if (processor() | tuiDocExampleGetTabs: defaultTab; as all) {\n @let tabs = preview() ? all : all.slice(1);\n @if (tabs.length) {\n <div class=\"t-header\">\n <tui-segmented\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n @for (tab of tabs; track tab) {\n <button type=\"button\">\n <ng-container *polymorpheusOutlet=\"getTabTitle(tab) as text\">\n {{ text }}\n </ng-container>\n </button>\n }\n </tui-segmented>\n @if (processor() | tuiMapper: visible) {\n <tui-loader\n size=\"xs\"\n class=\"t-code-editor\"\n [loading]=\"loading()\"\n [overlay]=\"true\"\n (click)=\"edit(processor())\"\n >\n @if (codeEditor?.content; as content) {\n <ng-container *polymorpheusOutlet=\"content as editContent\">\n {{ editContent }}\n </ng-container>\n } @else {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n type=\"button\"\n >\n Edit on {{ codeEditor!.name }}\n </button>\n }\n </tui-loader>\n }\n @if (fullscreenEnabled && preview()) {\n <button\n appearance=\"flat-grayscale\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"fullscreen ? icons.shrink : icons.expand\"\n (click)=\"fullscreen = !fullscreen\"\n >\n Fullscreen\n </button>\n }\n </div>\n }\n @for (tab of tabs; track tab) {\n <div class=\"t-content\">\n @if (!$index && preview()) {\n <section\n automation-id=\"tui-doc-example\"\n class=\"t-demo\"\n [style.display]=\"activeItemIndex === $index ? 'block' : 'none'\"\n >\n <ng-container *ngTemplateOutlet=\"content\" />\n <ng-container *ngComponentOutlet=\"component() | async\" />\n </section>\n }\n @let code = processor()[tabs[$index] || 0] || '';\n <tui-doc-code\n [code]=\"code\"\n [style.display]=\"activeItemIndex === $index && ($index || !preview()) ? 'block' : 'none'\"\n >\n @for (action of codeActions; track action) {\n <ng-container *polymorpheusOutlet=\"action as text; context: {$implicit: code}\">\n {{ text }}\n </ng-container>\n }\n </tui-doc-code>\n </div>\n } @empty {\n <div class=\"t-content\">\n <section class=\"t-demo\">\n <ng-container *ngTemplateOutlet=\"content\" />\n </section>\n </div>\n }\n }\n</div>\n<ng-template #content>\n <ng-content />\n</ng-template>\n", styles: [":host{position:relative;display:block;padding-block-start:2rem;scroll-margin-top:4rem}:host :host-context(tui-doc-toc +){padding-block-start:0}:host :host-context(tui-doc-toc ~){inline-size:calc(100% - 20rem)}@media screen and (max-width: 1279.4px){:host :host-context(tui-doc-toc ~){inline-size:100%}}:host :host-context(tui-doc-toc:empty ~){inline-size:100%}:host ::ng-deep :fullscreen .t-header{padding:.25rem}.t-link{text-decoration:none!important;font:inherit}.t-link:after{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;color:transparent}.t-link:hover,.t-link:hover:after{color:var(--tui-text-secondary)}.t-example{position:relative;border:.25rem solid var(--tui-background-base-alt);border-radius:var(--tui-radius-m);overflow:hidden}:host-context([tuiTheme=\"dark\"]) .t-example{border:.25rem solid var(--tui-background-elevation-2)}.t-example:not(:first-child){margin-block-start:1.25rem}@media screen and (max-width: 767.4px){.t-example:not(:first-child){margin-block-start:.75rem}}.t-header{display:flex;justify-content:space-between;align-items:center;overflow:auto;gap:.25rem;padding-block-end:.25rem;padding-inline-end:.125rem;background:var(--tui-background-base-alt);--tui-stroke-width: .09375rem}:host-context([tuiTheme=\"dark\"]) .t-header{background:var(--tui-background-elevation-2)}.t-tabs{flex-grow:1;background:none;margin:-.125rem}.t-tabs:before{filter:none}.t-content{border-radius:var(--tui-radius-m);box-shadow:-1rem -1rem var(--tui-background-base-alt),1rem -1rem var(--tui-background-base-alt)}:host-context([tuiTheme=\"dark\"]) .t-content{box-shadow:-1rem -1rem var(--tui-background-elevation-2),1rem -1rem var(--tui-background-elevation-2)}.t-content:first-child{box-shadow:none}.t-code-editor{flex-shrink:0;block-size:auto}@media screen and (max-width: 767.4px){.t-code-editor{font-size:0;inline-size:1.5rem}}.t-demo{position:relative;padding:2rem;max-inline-size:100%;box-sizing:border-box;overflow-x:auto}:host:not(._fullsize) .t-demo{inline-size:min-content;min-inline-size:21rem}@media screen and (max-width: 767.4px){.t-demo{min-inline-size:100%!important;padding:1rem}}tui-doc-code{overflow:hidden}\n"] }]
552
+ }] });
909
553
 
910
554
  function labelsProviderFactory(pages) {
911
555
  return pages
@@ -952,9 +596,7 @@ const NAVIGATION_PROVIDERS = [
952
596
  ];
953
597
  },
954
598
  },
955
- tuiScrollbarOptionsProvider({
956
- mode: 'hover',
957
- }),
599
+ tuiScrollbarOptionsProvider({ mode: 'hover' }),
958
600
  ];
959
601
 
960
602
  class TuiDocScrollIntoViewLink {
@@ -964,41 +606,48 @@ class TuiDocScrollIntoViewLink {
964
606
  this.sub = inject(TUI_DOC_PAGE_LOADED)
965
607
  .pipe(filter(Boolean), take(1), switchMap(() => this.scroll$), debounceTime(750, tuiZonefreeScheduler()), filter((shallWe) => shallWe && !!tuiGetElementObscures(this.el)), takeUntilDestroyed())
966
608
  .subscribe(() => this.el.scrollIntoView());
609
+ this.tuiDocScrollIntoViewLink = input(false);
967
610
  }
968
- set tuiDocScrollIntoViewLink(shallWe) {
969
- this.scroll$.next(shallWe);
611
+ ngOnChanges() {
612
+ this.scroll$.next(this.tuiDocScrollIntoViewLink());
970
613
  }
971
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocScrollIntoViewLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
972
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocScrollIntoViewLink, isStandalone: true, selector: "[tuiDocScrollIntoViewLink]", inputs: { tuiDocScrollIntoViewLink: "tuiDocScrollIntoViewLink" }, ngImport: i0 }); }
614
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocScrollIntoViewLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
615
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.18", type: TuiDocScrollIntoViewLink, isStandalone: true, selector: "[tuiDocScrollIntoViewLink]", inputs: { tuiDocScrollIntoViewLink: { classPropertyName: "tuiDocScrollIntoViewLink", publicName: "tuiDocScrollIntoViewLink", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
973
616
  }
974
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocScrollIntoViewLink, decorators: [{
617
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocScrollIntoViewLink, decorators: [{
975
618
  type: Directive,
976
- args: [{
977
- standalone: true,
978
- selector: '[tuiDocScrollIntoViewLink]',
979
- }]
980
- }], propDecorators: { tuiDocScrollIntoViewLink: [{
981
- type: Input
982
- }] } });
619
+ args: [{ selector: '[tuiDocScrollIntoViewLink]' }]
620
+ }] });
983
621
 
622
+ function tuiUniqBy(array, key) {
623
+ return Array.from(array
624
+ .reduce((map, item) => (map.has(item[key]) ? map : map.set(item[key], item)), new Map())
625
+ .values());
626
+ }
984
627
  class TuiDocNavigation {
985
628
  constructor() {
629
+ this.searchInput = viewChild(TuiInputDirective, { read: ElementRef });
986
630
  this.router = inject(Router);
987
631
  this.doc = inject(DOCUMENT);
988
632
  this.open = signal(false);
989
633
  this.menuOpen = false;
990
- this.sidebar = inject(TuiSidebarDirective, { optional: true });
634
+ this.drawer = inject(TuiDrawer, { optional: true });
991
635
  this.labels = inject(NAVIGATION_LABELS);
992
636
  this.items = inject(NAVIGATION_ITEMS);
993
637
  this.searchText = inject(TUI_DOC_SEARCH_TEXT);
994
638
  this.searchEnabled = inject(TUI_DOC_SEARCH_ENABLED);
995
639
  this.docIcons = inject(TUI_DOC_ICONS);
640
+ this.pagesIcons = inject(TUI_DOC_PAGES_ICONS);
996
641
  this.icons = inject(TUI_COMMON_ICONS);
642
+ this.flat = this.items.reduce((array, item) => [
643
+ ...array,
644
+ item.reduce((pages, page) => 'subPages' in page ? [...pages, ...page.subPages] : [...pages, page], []),
645
+ ], []);
997
646
  this.openPagesArr = [];
998
647
  this.openPagesGroupsArr = [];
999
648
  this.active = '';
1000
649
  this.search = new FormControl('');
1001
- this.filtered = toSignal(tuiControlValue(this.search).pipe(filter((search) => search.trim().length > 2), map((search) => this.filterItems(this.flattenSubPages(this.items), search))), { initialValue: [] });
650
+ this.filtered = toSignal(tuiControlValue(this.search).pipe(filter((search) => search.trim().length > 2), map((search) => this.filterItems(this.flat, search))), { initialValue: [] });
1002
651
  const titleService = inject(Title);
1003
652
  const readyToScroll$ = inject(TUI_DOC_PAGE_LOADED);
1004
653
  inject(NAVIGATION_TITLE)
@@ -1043,7 +692,7 @@ class TuiDocNavigation {
1043
692
  onFocusSearch(event) {
1044
693
  if (event.code === 'Slash' &&
1045
694
  !this.doc.activeElement?.matches('input,textarea,[contenteditable]')) {
1046
- this.searchInput?.nativeElement?.focus();
695
+ this.searchInput()?.nativeElement?.focus();
1047
696
  event.preventDefault();
1048
697
  }
1049
698
  }
@@ -1062,14 +711,6 @@ class TuiDocNavigation {
1062
711
  search.split(/\s/).find((word) => title.includes(word)));
1063
712
  }), 'title'));
1064
713
  }
1065
- flattenSubPages(items) {
1066
- return items.reduce((array, item) => [
1067
- ...array,
1068
- item.reduce((pages, page) => 'subPages' in page
1069
- ? [...pages, ...page.subPages]
1070
- : [...pages, page], []),
1071
- ], []);
1072
- }
1073
714
  isActiveRoute(route) {
1074
715
  return this.router.isActive(route, {
1075
716
  paths: 'subset',
@@ -1112,20 +753,12 @@ class TuiDocNavigation {
1112
753
  target.click();
1113
754
  target.remove();
1114
755
  }
1115
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocNavigation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1116
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocNavigation, isStandalone: true, selector: "tui-doc-navigation", host: { listeners: { "window:keydown": "onFocusSearch($event)" }, properties: { "class._open": "menuOpen" } }, providers: NAVIGATION_PROVIDERS, viewQueries: [{ propertyName: "searchInput", first: true, predicate: TuiTextfieldDirective, descendants: true, read: ElementRef }], ngImport: i0, template: "<tui-textfield\n *ngIf=\"searchEnabled()\"\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [iconStart]=\"docIcons.search\"\n [open]=\"open() && canOpen\"\n (keyup)=\"open.set(canOpen && $event.code !== 'Escape')\"\n (openChange)=\"open.set($event)\"\n>\n <code\n *ngIf=\"!search.value\"\n class=\"t-slash\"\n >\n /\n </code>\n <input\n tuiTextfield\n class=\"t-prevent-ios-scroll\"\n [formControl]=\"search\"\n [placeholder]=\"searchText\"\n [tuiAutoFocus]=\"!!sidebar\"\n />\n <ng-container *ngIf=\"canOpen\">\n <tui-data-list *tuiTextfieldDropdown>\n <tui-opt-group\n *ngFor=\"let group of filtered(); let index = index\"\n [label]=\"labels[index] || ''\"\n >\n <ng-container *ngFor=\"let item of group\">\n <a\n *ngIf=\"item.route.includes('://'); else internal\"\n tuiOption\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [target]=\"item.target || '_self'\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n\n <ng-template #internal>\n <a\n tuiOption\n [attr.rel]=\"item.rel\"\n [fragment]=\"item.fragment\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n (click)=\"onClick()\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n </ng-template>\n </ng-container>\n </tui-opt-group>\n </tui-data-list>\n </ng-container>\n</tui-textfield>\n\n<nav class=\"t-navigation\">\n <tui-scrollbar class=\"t-scrollbar\">\n <tui-accordion\n [class.t-accordion-standalone]=\"!searchEnabled()\"\n [closeOthers]=\"false\"\n [rounded]=\"false\"\n >\n <tui-accordion-item\n *ngFor=\"let label of labels; index as index\"\n size=\"s\"\n [borders]=\"null\"\n [open]=\"!!openPagesArr[index]\"\n (openChange)=\"openPagesArr[index] = $event\"\n >\n <span class=\"t-label\">\n <strong>{{ label }}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"t-section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: index * 100 + subIndex}\"\n />\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"t-items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: items.length - 1 + index}\"\n />\n </div>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n <ng-container *ngIf=\"!item.subPages; else subPagesTemplate\">\n <a\n *ngIf=\"item.route.includes('://'); else internal\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [target]=\"item.target || '_self'\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n\n <ng-template #internal>\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [tuiDocScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n </ng-template>\n </ng-container>\n\n <ng-template #subPagesTemplate>\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\n tuiLink\n type=\"button\"\n class=\"t-sublink t-sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesGroupsArr[index]\"\n [icon]=\"icons.more\"\n />\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_bordered\">\n <ng-container *ngFor=\"let subPage of $pages(item.subPages)\">\n <a\n *ngIf=\"subPage.route.includes('://'); else internal\"\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [href]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n >\n {{ subPage.title }}\n <tui-icon\n *polymorpheusOutlet=\"subPage.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n\n <ng-template #internal>\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [fragment]=\"subPage.fragment\"\n [routerLink]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n [tuiDocScrollIntoViewLink]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n >\n {{ subPage.title }}\n <tui-icon\n *polymorpheusOutlet=\"subPage.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n </ng-template>\n </ng-container>\n </div>\n </tui-expand>\n </div>\n </ng-template>\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content />\n", styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-background-base)}.t-input{margin:1.25rem}.t-input ::ng-deep tui-icon{border-width:.25rem}.t-slash{block-size:1rem;font-size:.5rem}.t-navigation{display:flex;max-block-size:100%;min-block-size:0;flex:1 1 0;text-align:start}.t-navigation tui-scrollbar{overscroll-behavior:none}.t-accordion-standalone{margin-block-start:1rem}.t-scrollbar{scroll-behavior:var(--tui-scroll-behavior);inline-size:100%}.t-items-container{display:flex;flex-direction:column;padding:0 1rem}.t-label{margin-inline-start:.5rem}.t-expand{margin-inline-start:.25rem}.t-section{display:flex;flex-direction:column;align-items:flex-start;margin:-.5rem 0 -1rem}.t-section_bordered{margin:.5rem 0;border-inline-start:1px solid var(--tui-border-normal)}@supports (-webkit-touch-callout: none){.t-prevent-ios-scroll:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}.t-subsection{margin-inline-start:.5rem}.t-sublink{font:var(--tui-font-text-m);margin-inline-start:.5rem;padding:.5rem 0;text-decoration:none}.t-sublink_small{margin-inline-start:1rem;line-height:1.5rem;padding-block-start:.5rem}.t-sublink_subsection{margin-inline-start:0;line-height:1.6rem}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-primary)}.t-icon{margin-inline-start:.5rem}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:1rem;block-size:1rem;margin:-.25rem .25rem 0 -.1875rem}.t-chevron_active{transform:rotate(90deg)}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i2$2.TuiAccordionItem, selector: "tui-accordion-item", inputs: ["noPadding", "showArrow", "borders", "size", "disabled", "disableHover", "open", "async"], outputs: ["openChange"] }, { kind: "directive", type: i2$2.TuiAccordionDirective, selector: "tui-accordion", inputs: ["closeOthers"] }, { kind: "directive", type: i2$2.TuiAccordionItemContent, selector: "ng-template[tuiAccordionItemContent]" }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "component", type: i3$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "component", type: i3$1.TuiOption, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: ["disabled", "value"] }, { kind: "directive", type: i3$1.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "directive", type: TuiDocScrollIntoViewLink, selector: "[tuiDocScrollIntoViewLink]", inputs: ["tuiDocScrollIntoViewLink"] }, { kind: "component", type: i4$1.TuiExpandComponent, selector: "tui-expand", inputs: ["async", "expanded"] }, { kind: "component", type: TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { kind: "ngmodule", type: TuiInputModule }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }, { kind: "component", type: i4.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i4.TuiTextfieldDirective, selector: "input[tuiTextfield]:not([tuiInputCard]):not([tuiInputExpire]):not([tuiInputCVC])" }, { kind: "directive", type: i4.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i4.TuiTextfieldDropdownDirective, selector: "ng-template[tuiTextfieldDropdown]" }, { kind: "ngmodule", type: TuiTextfieldControllerModule }, { kind: "directive", type: i8.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
756
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocNavigation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
757
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocNavigation, isStandalone: true, selector: "tui-doc-navigation", host: { listeners: { "window:keydown": "onFocusSearch($event)" }, properties: { "class._open": "menuOpen" } }, providers: NAVIGATION_PROVIDERS, viewQueries: [{ propertyName: "searchInput", first: true, predicate: TuiInputDirective, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (searchEnabled()) {\n <tui-textfield\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [iconStart]=\"docIcons.search\"\n [open]=\"open() && canOpen\"\n (keyup)=\"open.set(canOpen && $event.code !== 'Escape')\"\n (openChange)=\"open.set($event)\"\n >\n @if (!search.value) {\n <code class=\"t-slash\">/</code>\n }\n\n <input\n tuiInput\n class=\"t-prevent-ios-scroll\"\n [formControl]=\"search\"\n [placeholder]=\"searchText\"\n [tuiAutoFocus]=\"!!drawer\"\n />\n\n @if (canOpen) {\n <tui-data-list *tuiDropdown>\n @for (group of filtered(); track group) {\n <tui-opt-group [label]=\"labels[$index] || ''\">\n @for (item of group; track item) {\n @if (item.route.includes('://')) {\n <a\n tuiOption\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n ></a>\n } @else {\n <a\n tuiOption\n [attr.rel]=\"item.rel\"\n [fragment]=\"item.fragment\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n (click)=\"onClick()\"\n ></a>\n }\n }\n </tui-opt-group>\n }\n </tui-data-list>\n }\n </tui-textfield>\n}\n\n<nav class=\"t-navigation\">\n <tui-scrollbar class=\"t-scrollbar\">\n <tui-accordion\n size=\"s\"\n class=\"t-accordion\"\n [closeOthers]=\"false\"\n >\n @for (item of itemsWithoutSections; track item) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n @for (label of labels; track $index; let index = $index) {\n <button\n appearance=\"\"\n iconEnd=\"\"\n class=\"t-accordion-item\"\n [iconStart]=\"pagesIcons[label]\"\n [tuiAccordion]=\"!!openPagesArr[$index]\"\n (tuiAccordionChange)=\"openPagesArr[$index] = !!$event\"\n >\n <span class=\"t-label\">{{ label }}</span>\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesArr[$index]\"\n [icon]=\"icons.more\"\n [style.margin]=\"0\"\n />\n </button>\n <tui-expand [style.padding-block]=\"0\">\n <div\n *tuiItem\n class=\"t-section\"\n >\n @for (item of items[$index]; track $index) {\n <ng-container\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: index * 100 + $index}\"\n />\n }\n </div>\n </tui-expand>\n }\n </tui-accordion>\n\n <ng-template\n #page\n let-item\n >\n @if (item.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n ></a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n [tuiDocScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n ></a>\n }\n </ng-template>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n @if (!item.subPages) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n } @else {\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n @if (item.subPages) {\n <button\n tuiLink\n type=\"button\"\n class=\"t-sublink t-sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesGroupsArr[index]\"\n [icon]=\"icons.more\"\n />\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </button>\n }\n\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_nested\">\n @for (subPage of $pages(item.subPages); track subPage) {\n @if (subPage.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [href]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n [textContent]=\"subPage.title\"\n ></a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [fragment]=\"subPage.fragment\"\n [routerLink]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n [textContent]=\"subPage.title\"\n [tuiDocScrollIntoViewLink]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n ></a>\n }\n }\n </div>\n </tui-expand>\n </div>\n }\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content />\n", styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;padding:0 .25rem;background:var(--tui-background-base);--tui-stroke-width: .09375rem}.t-input{margin:1.25rem}.t-slash{block-size:1rem;font-size:.5rem}.t-navigation{display:flex;flex-wrap:wrap;max-block-size:100%;min-block-size:0;flex:1 1 0;text-align:start}.t-navigation tui-scrollbar{overscroll-behavior:none}:host-context(tui-drawer){margin:-1.25rem -1.5rem}:host-context(tui-drawer) .t-scrollbar{display:contents}.t-accordion{inline-size:auto;margin:.5rem .375rem 1.5rem}.t-scrollbar{scroll-behavior:var(--tui-scroll-behavior);inline-size:100%}.t-label{margin-inline-start:1.1875rem;font-weight:700}.t-expand{margin-inline-start:.25rem;padding-block:0}.t-section{display:flex;flex-direction:column;align-items:flex-start}.t-section_nested{margin:0 .75rem;clip-path:inset(.5rem 0)}@supports (-webkit-touch-callout: none){.t-prevent-ios-scroll:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}.t-subsection{margin-inline-start:.625rem}.t-sublink{font:var(--tui-font-body-s);padding-block:.375rem;padding-inline-start:.4375rem;text-decoration:none}.t-accordion>.t-sublink{font:var(--tui-font-body-s);font-weight:700;color:var(--tui-text-primary);align-items:center;padding:.625rem 1rem;margin-inline-start:1px}.t-accordion>.t-sublink:before{margin-inline-end:.875rem}.t-accordion>.t-sublink:after{opacity:0}.t-sublink_small{margin-inline-start:1rem;padding-inline:0}.t-sublink_subsection{margin-inline-start:0!important}.t-sublink_subsection:before{opacity:0}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-primary);font-weight:700}.t-sublink.t-sublink.t-sublink_active:after{position:absolute;display:block;inset-block:.5rem;inset-inline-start:-1rem;block-size:auto;inline-size:.1875rem;padding:0;margin-inline-start:-1px;border-radius:1rem;background:var(--tui-text-primary)}.t-sublink:not([data-icon-start]){margin-inline-start:1.875rem}.t-sublink:not([data-icon-start]):before{position:absolute;top:0;bottom:0;display:block;inset-inline-start:-1rem;block-size:auto;inline-size:1px;padding:0;background:var(--tui-border-normal)}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font-size:1rem;margin-inline:-.625rem .6875rem;vertical-align:sub}.t-chevron_active{transform:rotate(90deg)}.t-accordion-item{block-size:2.5rem}.t-accordion-item:before{position:relative;inset-inline-start:.5625rem;font-size:1rem}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i2$1.TuiAccordionComponent, selector: "tui-accordion", inputs: ["closeOthers", "size"] }, { kind: "directive", type: i2$1.TuiAccordionDirective, selector: "button[tuiAccordion]", inputs: ["tuiAccordion"], outputs: ["tuiAccordionChange"] }, { kind: "component", type: i3$2.TuiExpand, selector: "tui-expand", inputs: ["expanded"] }, { kind: "directive", type: i4$1.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "component", type: i2$2.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i2$2.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i2$2.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "directive", type: TuiDocScrollIntoViewLink, selector: "[tuiDocScrollIntoViewLink]", inputs: ["tuiDocScrollIntoViewLink"] }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i6$1.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1117
758
  }
1118
- __decorate([
1119
- tuiPure
1120
- ], TuiDocNavigation.prototype, "filterItems", null);
1121
- __decorate([
1122
- tuiPure
1123
- ], TuiDocNavigation.prototype, "flattenSubPages", null);
1124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocNavigation, decorators: [{
759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocNavigation, decorators: [{
1125
760
  type: Component,
1126
- args: [{ standalone: true, selector: 'tui-doc-navigation', imports: [
1127
- NgForOf,
1128
- NgIf,
761
+ args: [{ selector: 'tui-doc-navigation', imports: [
1129
762
  NgTemplateOutlet,
1130
763
  PolymorpheusOutlet,
1131
764
  ReactiveFormsModule,
@@ -1137,109 +770,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1137
770
  TuiDocScrollIntoViewLink,
1138
771
  TuiExpand,
1139
772
  TuiIcon,
1140
- TuiInputModule,
773
+ TuiInput,
1141
774
  TuiLink,
1142
775
  TuiScrollbar,
1143
- TuiTextfield,
1144
- TuiTextfieldControllerModule,
1145
776
  ], changeDetection: ChangeDetectionStrategy.OnPush, providers: NAVIGATION_PROVIDERS, host: {
1146
777
  '[class._open]': 'menuOpen',
1147
778
  '(window:keydown)': 'onFocusSearch($event)',
1148
- }, template: "<tui-textfield\n *ngIf=\"searchEnabled()\"\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [iconStart]=\"docIcons.search\"\n [open]=\"open() && canOpen\"\n (keyup)=\"open.set(canOpen && $event.code !== 'Escape')\"\n (openChange)=\"open.set($event)\"\n>\n <code\n *ngIf=\"!search.value\"\n class=\"t-slash\"\n >\n /\n </code>\n <input\n tuiTextfield\n class=\"t-prevent-ios-scroll\"\n [formControl]=\"search\"\n [placeholder]=\"searchText\"\n [tuiAutoFocus]=\"!!sidebar\"\n />\n <ng-container *ngIf=\"canOpen\">\n <tui-data-list *tuiTextfieldDropdown>\n <tui-opt-group\n *ngFor=\"let group of filtered(); let index = index\"\n [label]=\"labels[index] || ''\"\n >\n <ng-container *ngFor=\"let item of group\">\n <a\n *ngIf=\"item.route.includes('://'); else internal\"\n tuiOption\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [target]=\"item.target || '_self'\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n\n <ng-template #internal>\n <a\n tuiOption\n [attr.rel]=\"item.rel\"\n [fragment]=\"item.fragment\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n (click)=\"onClick()\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n </ng-template>\n </ng-container>\n </tui-opt-group>\n </tui-data-list>\n </ng-container>\n</tui-textfield>\n\n<nav class=\"t-navigation\">\n <tui-scrollbar class=\"t-scrollbar\">\n <tui-accordion\n [class.t-accordion-standalone]=\"!searchEnabled()\"\n [closeOthers]=\"false\"\n [rounded]=\"false\"\n >\n <tui-accordion-item\n *ngFor=\"let label of labels; index as index\"\n size=\"s\"\n [borders]=\"null\"\n [open]=\"!!openPagesArr[index]\"\n (openChange)=\"openPagesArr[index] = $event\"\n >\n <span class=\"t-label\">\n <strong>{{ label }}</strong>\n </span>\n <ng-template tuiAccordionItemContent>\n <div class=\"t-section\">\n <ng-container\n *ngFor=\"let item of items[index]; index as subIndex\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: index * 100 + subIndex}\"\n />\n </div>\n </ng-template>\n </tui-accordion-item>\n </tui-accordion>\n <div class=\"t-items-container\">\n <ng-container\n *ngFor=\"let item of itemsWithoutSections; let index = index\"\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: items.length - 1 + index}\"\n />\n </div>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n <ng-container *ngIf=\"!item.subPages; else subPagesTemplate\">\n <a\n *ngIf=\"item.route.includes('://'); else internal\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [target]=\"item.target || '_self'\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n\n <ng-template #internal>\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [tuiDocScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n >\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n </ng-template>\n </ng-container>\n\n <ng-template #subPagesTemplate>\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n <button\n *ngIf=\"item.subPages\"\n tuiLink\n type=\"button\"\n class=\"t-sublink t-sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesGroupsArr[index]\"\n [icon]=\"icons.more\"\n />\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </button>\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_bordered\">\n <ng-container *ngFor=\"let subPage of $pages(item.subPages)\">\n <a\n *ngIf=\"subPage.route.includes('://'); else internal\"\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [href]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n >\n {{ subPage.title }}\n <tui-icon\n *polymorpheusOutlet=\"subPage.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n\n <ng-template #internal>\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [fragment]=\"subPage.fragment\"\n [routerLink]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n [tuiDocScrollIntoViewLink]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n >\n {{ subPage.title }}\n <tui-icon\n *polymorpheusOutlet=\"subPage.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </a>\n </ng-template>\n </ng-container>\n </div>\n </tui-expand>\n </div>\n </ng-template>\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content />\n", styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;background:var(--tui-background-base)}.t-input{margin:1.25rem}.t-input ::ng-deep tui-icon{border-width:.25rem}.t-slash{block-size:1rem;font-size:.5rem}.t-navigation{display:flex;max-block-size:100%;min-block-size:0;flex:1 1 0;text-align:start}.t-navigation tui-scrollbar{overscroll-behavior:none}.t-accordion-standalone{margin-block-start:1rem}.t-scrollbar{scroll-behavior:var(--tui-scroll-behavior);inline-size:100%}.t-items-container{display:flex;flex-direction:column;padding:0 1rem}.t-label{margin-inline-start:.5rem}.t-expand{margin-inline-start:.25rem}.t-section{display:flex;flex-direction:column;align-items:flex-start;margin:-.5rem 0 -1rem}.t-section_bordered{margin:.5rem 0;border-inline-start:1px solid var(--tui-border-normal)}@supports (-webkit-touch-callout: none){.t-prevent-ios-scroll:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}.t-subsection{margin-inline-start:.5rem}.t-sublink{font:var(--tui-font-text-m);margin-inline-start:.5rem;padding:.5rem 0;text-decoration:none}.t-sublink_small{margin-inline-start:1rem;line-height:1.5rem;padding-block-start:.5rem}.t-sublink_subsection{margin-inline-start:0;line-height:1.6rem}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-primary)}.t-icon{margin-inline-start:.5rem}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:1rem;block-size:1rem;margin:-.25rem .25rem 0 -.1875rem}.t-chevron_active{transform:rotate(90deg)}\n"] }]
1149
- }], ctorParameters: function () { return []; }, propDecorators: { searchInput: [{
1150
- type: ViewChild,
1151
- args: [TuiTextfieldDirective, { read: ElementRef }]
1152
- }], filterItems: [], flattenSubPages: [] } });
779
+ }, template: "@if (searchEnabled()) {\n <tui-textfield\n tuiTextfieldSize=\"m\"\n class=\"t-input\"\n [iconStart]=\"docIcons.search\"\n [open]=\"open() && canOpen\"\n (keyup)=\"open.set(canOpen && $event.code !== 'Escape')\"\n (openChange)=\"open.set($event)\"\n >\n @if (!search.value) {\n <code class=\"t-slash\">/</code>\n }\n\n <input\n tuiInput\n class=\"t-prevent-ios-scroll\"\n [formControl]=\"search\"\n [placeholder]=\"searchText\"\n [tuiAutoFocus]=\"!!drawer\"\n />\n\n @if (canOpen) {\n <tui-data-list *tuiDropdown>\n @for (group of filtered(); track group) {\n <tui-opt-group [label]=\"labels[$index] || ''\">\n @for (item of group; track item) {\n @if (item.route.includes('://')) {\n <a\n tuiOption\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n ></a>\n } @else {\n <a\n tuiOption\n [attr.rel]=\"item.rel\"\n [fragment]=\"item.fragment\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n (click)=\"onClick()\"\n ></a>\n }\n }\n </tui-opt-group>\n }\n </tui-data-list>\n }\n </tui-textfield>\n}\n\n<nav class=\"t-navigation\">\n <tui-scrollbar class=\"t-scrollbar\">\n <tui-accordion\n size=\"s\"\n class=\"t-accordion\"\n [closeOthers]=\"false\"\n >\n @for (item of itemsWithoutSections; track item) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n @for (label of labels; track $index; let index = $index) {\n <button\n appearance=\"\"\n iconEnd=\"\"\n class=\"t-accordion-item\"\n [iconStart]=\"pagesIcons[label]\"\n [tuiAccordion]=\"!!openPagesArr[$index]\"\n (tuiAccordionChange)=\"openPagesArr[$index] = !!$event\"\n >\n <span class=\"t-label\">{{ label }}</span>\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesArr[$index]\"\n [icon]=\"icons.more\"\n [style.margin]=\"0\"\n />\n </button>\n <tui-expand [style.padding-block]=\"0\">\n <div\n *tuiItem\n class=\"t-section\"\n >\n @for (item of items[$index]; track $index) {\n <ng-container\n [ngTemplateOutlet]=\"pages\"\n [ngTemplateOutletContext]=\"{item: item, index: index * 100 + $index}\"\n />\n }\n </div>\n </tui-expand>\n }\n </tui-accordion>\n\n <ng-template\n #page\n let-item\n >\n @if (item.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [href]=\"item.route\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n ></a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink\"\n [attr.rel]=\"item.rel\"\n [iconStart]=\"item.section ? '' : pagesIcons[item.title]\"\n [routerLink]=\"item.route\"\n [target]=\"item.target || '_self'\"\n [textContent]=\"item.title\"\n [tuiDocScrollIntoViewLink]=\"isActive(item.route)\"\n (click)=\"closeMenu()\"\n ></a>\n }\n </ng-template>\n\n <ng-template\n #pages\n let-index=\"index\"\n let-item=\"item\"\n >\n @if (!item.subPages) {\n <ng-container\n [ngTemplateOutlet]=\"page\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n } @else {\n <div\n routerLinkActive\n class=\"t-subsection\"\n [routerLinkActiveOptions]=\"{exact: false}\"\n >\n @if (item.subPages) {\n <button\n tuiLink\n type=\"button\"\n class=\"t-sublink t-sublink_subsection\"\n (click)=\"onGroupClick(index)\"\n >\n <tui-icon\n class=\"t-chevron\"\n [class.t-chevron_active]=\"!!openPagesGroupsArr[index]\"\n [icon]=\"icons.more\"\n />\n {{ item.title }}\n <tui-icon\n *polymorpheusOutlet=\"item.icon as icon\"\n class=\"t-icon\"\n [icon]=\"icon\"\n />\n </button>\n }\n\n <tui-expand\n class=\"t-expand\"\n [expanded]=\"!!openPagesGroupsArr[index]\"\n >\n <div class=\"t-section t-section_nested\">\n @for (subPage of $pages(item.subPages); track subPage) {\n @if (subPage.route.includes('://')) {\n <a\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [href]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n [textContent]=\"subPage.title\"\n ></a>\n } @else {\n <a\n routerLinkActive=\"t-sublink_active\"\n tuiLink\n class=\"t-sublink t-sublink_small\"\n [attr.rel]=\"subPage.rel\"\n [fragment]=\"subPage.fragment\"\n [routerLink]=\"subPage.route\"\n [target]=\"subPage.target || '_self'\"\n [textContent]=\"subPage.title\"\n [tuiDocScrollIntoViewLink]=\"isActive(subPage.route)\"\n (click)=\"closeMenu()\"\n ></a>\n }\n }\n </div>\n </tui-expand>\n </div>\n }\n </ng-template>\n </tui-scrollbar>\n</nav>\n\n<ng-content />\n", styles: [":host{z-index:1;display:flex;flex-direction:column;text-align:center;padding:0 .25rem;background:var(--tui-background-base);--tui-stroke-width: .09375rem}.t-input{margin:1.25rem}.t-slash{block-size:1rem;font-size:.5rem}.t-navigation{display:flex;flex-wrap:wrap;max-block-size:100%;min-block-size:0;flex:1 1 0;text-align:start}.t-navigation tui-scrollbar{overscroll-behavior:none}:host-context(tui-drawer){margin:-1.25rem -1.5rem}:host-context(tui-drawer) .t-scrollbar{display:contents}.t-accordion{inline-size:auto;margin:.5rem .375rem 1.5rem}.t-scrollbar{scroll-behavior:var(--tui-scroll-behavior);inline-size:100%}.t-label{margin-inline-start:1.1875rem;font-weight:700}.t-expand{margin-inline-start:.25rem;padding-block:0}.t-section{display:flex;flex-direction:column;align-items:flex-start}.t-section_nested{margin:0 .75rem;clip-path:inset(.5rem 0)}@supports (-webkit-touch-callout: none){.t-prevent-ios-scroll:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}.t-subsection{margin-inline-start:.625rem}.t-sublink{font:var(--tui-font-body-s);padding-block:.375rem;padding-inline-start:.4375rem;text-decoration:none}.t-accordion>.t-sublink{font:var(--tui-font-body-s);font-weight:700;color:var(--tui-text-primary);align-items:center;padding:.625rem 1rem;margin-inline-start:1px}.t-accordion>.t-sublink:before{margin-inline-end:.875rem}.t-accordion>.t-sublink:after{opacity:0}.t-sublink_small{margin-inline-start:1rem;padding-inline:0}.t-sublink_subsection{margin-inline-start:0!important}.t-sublink_subsection:before{opacity:0}.t-sublink.t-sublink.t-sublink_active{color:var(--tui-text-primary);font-weight:700}.t-sublink.t-sublink.t-sublink_active:after{position:absolute;display:block;inset-block:.5rem;inset-inline-start:-1rem;block-size:auto;inline-size:.1875rem;padding:0;margin-inline-start:-1px;border-radius:1rem;background:var(--tui-text-primary)}.t-sublink:not([data-icon-start]){margin-inline-start:1.875rem}.t-sublink:not([data-icon-start]):before{position:absolute;top:0;bottom:0;display:block;inset-inline-start:-1rem;block-size:auto;inline-size:1px;padding:0;background:var(--tui-border-normal)}.t-chevron{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font-size:1rem;margin-inline:-.625rem .6875rem;vertical-align:sub}.t-chevron_active{transform:rotate(90deg)}.t-accordion-item{block-size:2.5rem}.t-accordion-item:before{position:relative;inset-inline-start:.5625rem;font-size:1rem}\n"] }]
780
+ }], ctorParameters: () => [] });
1153
781
 
1154
782
  class TuiDocHeader {
1155
783
  constructor() {
1156
- this.stream$ = new Subject();
1157
784
  this.router = inject(Router);
785
+ this.routeEvents = toSignal(this.router.events, { initialValue: null });
1158
786
  this.icons = inject(TUI_DOC_ICONS);
1159
787
  this.logo = inject(TUI_DOC_LOGO);
1160
788
  this.menu = inject(TUI_DOC_MENU_TEXT);
1161
- this.open = toSignal(merge(this.router.events.pipe(map(TUI_FALSE_HANDLER)), this.stream$).pipe(startWith(false), distinctUntilChanged()), { initialValue: false });
1162
- }
1163
- onClick() {
1164
- this.stream$.next(true);
1165
- }
1166
- onActiveZone(active) {
1167
- if (!active) {
1168
- this.stream$.next(false);
1169
- }
1170
- }
1171
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1172
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocHeader, isStandalone: true, selector: "header[tuiDocHeader]", ngImport: i0, template: "<button\n appearance=\"icon\"\n tuiIconButton\n type=\"button\"\n class=\"t-menu\"\n [iconStart]=\"icons.menu\"\n [title]=\"menu\"\n (click)=\"onClick()\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-doc-navigation\n *tuiSidebar=\"open()\"\n class=\"t-navigation\"\n />\n</button>\n<div class=\"t-logo\">\n <img\n *polymorpheusOutlet=\"logo as src\"\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n</div>\n<ng-content />\n", styles: [":host{position:fixed;top:0;left:0;right:0;z-index:1;display:flex;box-shadow:var(--tui-shadow-small);block-size:4.125rem;align-items:center;padding:0 1.25rem;background:var(--tui-background-base);border-block-end:1px solid var(--tui-border-normal)}@supports (background: color-mix(in srgb,var(--tui-background-base),transparent 50%)){:host{background:color-mix(in srgb,var(--tui-background-base),transparent 50%);-webkit-backdrop-filter:blur(1.25rem);backdrop-filter:blur(1.25rem)}}.t-logo{margin-inline-end:auto;font:var(--tui-font-heading-5)}.t-img{display:block}.t-menu{margin-inline-start:-1.25rem}@media screen and (min-width: 48em){.t-menu{display:none}}.t-navigation{min-block-size:100%}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiActiveZone, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiDocNavigation, selector: "tui-doc-navigation" }, { kind: "directive", type: i1$3.TuiSidebarDirective, selector: "[tuiSidebar]", inputs: ["tuiSidebarDirection", "tuiSidebarAutoWidth", "tuiSidebar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1173
- }
1174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocHeader, decorators: [{
1175
- type: Component,
1176
- args: [{ standalone: true, selector: 'header[tuiDocHeader]', imports: [PolymorpheusOutlet, TuiActiveZone, TuiButton, TuiDocNavigation, TuiSidebar], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n appearance=\"icon\"\n tuiIconButton\n type=\"button\"\n class=\"t-menu\"\n [iconStart]=\"icons.menu\"\n [title]=\"menu\"\n (click)=\"onClick()\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-doc-navigation\n *tuiSidebar=\"open()\"\n class=\"t-navigation\"\n />\n</button>\n<div class=\"t-logo\">\n <img\n *polymorpheusOutlet=\"logo as src\"\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n</div>\n<ng-content />\n", styles: [":host{position:fixed;top:0;left:0;right:0;z-index:1;display:flex;box-shadow:var(--tui-shadow-small);block-size:4.125rem;align-items:center;padding:0 1.25rem;background:var(--tui-background-base);border-block-end:1px solid var(--tui-border-normal)}@supports (background: color-mix(in srgb,var(--tui-background-base),transparent 50%)){:host{background:color-mix(in srgb,var(--tui-background-base),transparent 50%);-webkit-backdrop-filter:blur(1.25rem);backdrop-filter:blur(1.25rem)}}.t-logo{margin-inline-end:auto;font:var(--tui-font-heading-5)}.t-img{display:block}.t-menu{margin-inline-start:-1.25rem}@media screen and (min-width: 48em){.t-menu{display:none}}.t-navigation{min-block-size:100%}\n"] }]
1177
- }] });
1178
-
1179
- class TuiDocSeeAlso {
1180
- constructor() {
1181
- this.pages = inject(TUI_DOC_MAP_PAGES);
1182
- this.text = inject(TUI_DOC_SEE_ALSO_TEXT);
1183
- this.seeAlso = [];
1184
- }
1185
- getRouterLink(pageTitle) {
1186
- return this.pages.get(pageTitle)?.route ?? '';
789
+ this.breakpoint = inject(TUI_BREAKPOINT);
790
+ this.open = signal(false);
791
+ effect(() => this.routeEvents() && this.open.set(false));
1187
792
  }
1188
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocSeeAlso, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1189
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocSeeAlso, isStandalone: true, selector: "tui-doc-see-also", inputs: { seeAlso: "seeAlso" }, ngImport: i0, template: "<h5 class=\"t-header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a\n tuiLink\n [innerText]=\"item\"\n [routerLink]=\"getRouterLink(item)\"\n ></a>\n <ng-container *ngIf=\"!last\">{{ ', ' }}</ng-container>\n</ng-container>\n", styles: [":host{display:block}.t-header{font-size:.6875rem;line-height:1rem;text-transform:uppercase;letter-spacing:.075em;color:var(--tui-text-secondary);margin:0 0 .5rem;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
793
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
794
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocHeader, isStandalone: true, selector: "header[tuiDocHeader]", ngImport: i0, template: "@if (breakpoint() === 'mobile') {\n <button\n appearance=\"flat-grayscale\"\n tuiIconButton\n type=\"button\"\n class=\"t-menu\"\n [iconStart]=\"icons.menu\"\n [title]=\"menu\"\n (click)=\"open.set(true)\"\n ></button>\n}\n\n<tui-drawer\n *tuiPopup=\"open()\"\n direction=\"start\"\n class=\"t-drawer\"\n [overlay]=\"true\"\n (click.self)=\"open.set(false)\"\n>\n <tui-doc-navigation />\n</tui-drawer>\n\n<div class=\"t-logo\">\n <img\n *polymorpheusOutlet=\"logo as src\"\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n</div>\n<ng-content />\n", styles: [":host{position:fixed;z-index:1;display:flex;inset:0 0 auto;block-size:4.125rem;align-items:center;padding:0 1.5rem;background:var(--tui-background-base-alt);--tui-stroke-width: .09375rem}:host :host-context([tuiTheme=\"dark\"]){background:var(--tui-background-elevation-2)}:host:after{content:\"\";position:fixed;inset:3.5rem 0 0;pointer-events:none;border-radius:var(--tui-radius-xl);border:.5rem solid var(--tui-background-base-alt);box-shadow:-5rem 0 var(--tui-background-base-alt),5rem 0 var(--tui-background-base-alt)}:host-context([tuiTheme=\"dark\"]) :host:after{border:.5rem solid var(--tui-background-elevation-2);box-shadow:-5rem 0 var(--tui-background-elevation-2),5rem 0 var(--tui-background-elevation-2)}.t-logo{margin-inline-end:auto;font:var(--tui-font-heading-h6)}.t-img{display:block}.t-menu{margin-inline-start:-1.25rem}.t-drawer{inline-size:17.25rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiDocNavigation, selector: "tui-doc-navigation" }, { kind: "component", type: TuiDrawer, selector: "tui-drawer", inputs: ["direction", "overlay"] }, { kind: "directive", type: TuiPopup, selector: "ng-template[tuiPopup]", inputs: ["tuiPopup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1190
795
  }
1191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocSeeAlso, decorators: [{
796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocHeader, decorators: [{
1192
797
  type: Component,
1193
- args: [{ standalone: true, selector: 'tui-doc-see-also', imports: [NgForOf, NgIf, RouterLink, TuiLink], changeDetection: ChangeDetectionStrategy.OnPush, template: "<h5 class=\"t-header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a\n tuiLink\n [innerText]=\"item\"\n [routerLink]=\"getRouterLink(item)\"\n ></a>\n <ng-container *ngIf=\"!last\">{{ ', ' }}</ng-container>\n</ng-container>\n", styles: [":host{display:block}.t-header{font-size:.6875rem;line-height:1rem;text-transform:uppercase;letter-spacing:.075em;color:var(--tui-text-secondary);margin:0 0 .5rem;white-space:nowrap}\n"] }]
1194
- }], propDecorators: { seeAlso: [{
1195
- type: Input
1196
- }] } });
798
+ args: [{ selector: 'header[tuiDocHeader]', imports: [PolymorpheusOutlet, TuiButton, TuiDocNavigation, TuiDrawer, TuiPopup], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (breakpoint() === 'mobile') {\n <button\n appearance=\"flat-grayscale\"\n tuiIconButton\n type=\"button\"\n class=\"t-menu\"\n [iconStart]=\"icons.menu\"\n [title]=\"menu\"\n (click)=\"open.set(true)\"\n ></button>\n}\n\n<tui-drawer\n *tuiPopup=\"open()\"\n direction=\"start\"\n class=\"t-drawer\"\n [overlay]=\"true\"\n (click.self)=\"open.set(false)\"\n>\n <tui-doc-navigation />\n</tui-drawer>\n\n<div class=\"t-logo\">\n <img\n *polymorpheusOutlet=\"logo as src\"\n alt=\"Logo\"\n class=\"t-img\"\n [src]=\"src\"\n />\n</div>\n<ng-content />\n", styles: [":host{position:fixed;z-index:1;display:flex;inset:0 0 auto;block-size:4.125rem;align-items:center;padding:0 1.5rem;background:var(--tui-background-base-alt);--tui-stroke-width: .09375rem}:host :host-context([tuiTheme=\"dark\"]){background:var(--tui-background-elevation-2)}:host:after{content:\"\";position:fixed;inset:3.5rem 0 0;pointer-events:none;border-radius:var(--tui-radius-xl);border:.5rem solid var(--tui-background-base-alt);box-shadow:-5rem 0 var(--tui-background-base-alt),5rem 0 var(--tui-background-base-alt)}:host-context([tuiTheme=\"dark\"]) :host:after{border:.5rem solid var(--tui-background-elevation-2);box-shadow:-5rem 0 var(--tui-background-elevation-2),5rem 0 var(--tui-background-elevation-2)}.t-logo{margin-inline-end:auto;font:var(--tui-font-heading-h6)}.t-img{display:block}.t-menu{margin-inline-start:-1.25rem}.t-drawer{inline-size:17.25rem}\n"] }]
799
+ }], ctorParameters: () => [] });
1197
800
 
1198
801
  class TuiDocSourceCode {
1199
802
  constructor() {
1200
803
  this.icons = inject(TUI_DOC_ICONS);
1201
804
  this.sourceCode = inject(TUI_DOC_SOURCE_CODE);
1202
805
  this.text = inject(TUI_DOC_SOURCE_CODE_TEXT);
1203
- this.header = '';
1204
- this.package = '';
1205
- this.type = '';
1206
- this.path = '';
1207
- }
1208
- get pathOptions() {
1209
- return this.getPathOptions(this.header, this.package, this.type, this.path);
1210
- }
1211
- pathIsUrl(path) {
1212
- return path.startsWith('http');
1213
- }
1214
- getPathOptions(header, packageName, type, path) {
1215
- return {
1216
- header,
1217
- package: packageName,
1218
- type,
1219
- path,
1220
- };
1221
- }
1222
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocSourceCode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1223
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocSourceCode, isStandalone: true, selector: "tui-doc-source-code", inputs: { header: "header", package: "package", type: "type", path: "path" }, ngImport: i0, template: "<a\n *polymorpheusOutlet=\"pathIsUrl(path) ? path : sourceCode as link; context: pathOptions\"\n appearance=\"icon\"\n size=\"s\"\n target=\"_blank\"\n tuiIconButton\n type=\"button\"\n [href]=\"link\"\n [iconStart]=\"icons.code\"\n [style.height]=\"'var(--tui-height-l)'\"\n>\n {{ text }}\n</a>\n", dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
806
+ this.header = input('');
807
+ this.package = input('');
808
+ this.type = input('');
809
+ this.path = input('');
810
+ this.pathOptions = computed(() => ({
811
+ header: this.header(),
812
+ package: this.package(),
813
+ type: this.type(),
814
+ path: this.path(),
815
+ }));
816
+ this.pathIsUrl = computed(() => this.path()?.startsWith('http') ?? false);
817
+ }
818
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocSourceCode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
819
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.18", type: TuiDocSourceCode, isStandalone: true, selector: "tui-doc-source-code", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, package: { classPropertyName: "package", publicName: "package", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<a\n *polymorpheusOutlet=\"pathIsUrl() ? path() : sourceCode as link; context: pathOptions()\"\n appearance=\"secondary-grayscale\"\n size=\"s\"\n target=\"_blank\"\n tuiButton\n [href]=\"link\"\n [iconStart]=\"icons.code\"\n>\n {{ text }}\n</a>\n", dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1224
820
  }
1225
- __decorate([
1226
- tuiPure
1227
- ], TuiDocSourceCode.prototype, "pathIsUrl", null);
1228
- __decorate([
1229
- tuiPure
1230
- ], TuiDocSourceCode.prototype, "getPathOptions", null);
1231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocSourceCode, decorators: [{
821
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocSourceCode, decorators: [{
1232
822
  type: Component,
1233
- args: [{ standalone: true, selector: 'tui-doc-source-code', imports: [PolymorpheusOutlet, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n *polymorpheusOutlet=\"pathIsUrl(path) ? path : sourceCode as link; context: pathOptions\"\n appearance=\"icon\"\n size=\"s\"\n target=\"_blank\"\n tuiIconButton\n type=\"button\"\n [href]=\"link\"\n [iconStart]=\"icons.code\"\n [style.height]=\"'var(--tui-height-l)'\"\n>\n {{ text }}\n</a>\n" }]
1234
- }], propDecorators: { header: [{
1235
- type: Input
1236
- }], package: [{
1237
- type: Input
1238
- }], type: [{
1239
- type: Input
1240
- }], path: [{
1241
- type: Input
1242
- }], pathIsUrl: [], getPathOptions: [] } });
823
+ args: [{ selector: 'tui-doc-source-code', imports: [PolymorpheusOutlet, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n *polymorpheusOutlet=\"pathIsUrl() ? path() : sourceCode as link; context: pathOptions()\"\n appearance=\"secondary-grayscale\"\n size=\"s\"\n target=\"_blank\"\n tuiButton\n [href]=\"link\"\n [iconStart]=\"icons.code\"\n>\n {{ text }}\n</a>\n" }]
824
+ }] });
1243
825
 
1244
826
  class TuiDocLanguageSwitcher {
1245
827
  constructor() {
@@ -1277,23 +859,22 @@ class TuiDocLanguageSwitcher {
1277
859
  this.switcher.setLanguage(lang);
1278
860
  this.open = false;
1279
861
  }
1280
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocLanguageSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1281
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocLanguageSwitcher, isStandalone: true, selector: "tui-doc-language-switcher", providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], ngImport: i0, template: "<tui-badged-content>\n <img\n alt=\"\"\n size=\"s\"\n tuiBadge\n tuiSlot=\"bottom\"\n [src]=\"flags.get(language.value ?? '') || flags.get(switcher.language) | tuiFlag\"\n />\n\n <button\n appearance=\"outline-grayscale\"\n size=\"s\"\n tuiButtonSelect\n tuiIconButton\n type=\"button\"\n [formControl]=\"language\"\n [iconStart]=\"icons.languages\"\n >\n Language\n <tui-data-list *tuiTextfieldDropdown>\n <tui-opt-group label=\"Language of components\">\n <button\n *ngFor=\"let name of names\"\n new\n tuiOption\n type=\"button\"\n [value]=\"name | titlecase\"\n (click)=\"setLang(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"flags.get(name) | tuiFlag\"\n />\n {{ name | titlecase }}\n </button>\n </tui-opt-group>\n </tui-data-list>\n </button>\n</tui-badged-content>\n", styles: [".t-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:50%;margin-inline-end:.5rem}[tuiOption]{justify-content:flex-start;gap:.5rem}img{box-shadow:inset 0 0 0 1px var(--tui-border-normal)}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "directive", type: TuiBadge, selector: "tui-badge,[tuiBadge]", inputs: ["size"] }, { kind: "directive", type: i2$3.TuiBadgedContentDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "component", type: i2$3.TuiBadgedContentComponent, selector: "tui-badged-content" }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiButtonSelect, selector: "button[tuiButtonSelect]" }, { kind: "component", type: i3$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$1.TuiOptionNew, selector: "button[tuiOption][new], a[tuiOption][new], label[tuiOption][new]", inputs: ["disabled"] }, { kind: "directive", type: i3$1.TuiOptionWithValue, selector: "button[tuiOption][value][new], a[tuiOption][value][new], label[tuiOption][value][new]", inputs: ["disabled", "value"] }, { kind: "directive", type: i3$1.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "pipe", type: TuiFlagPipe, name: "tuiFlag" }, { kind: "directive", type: i4.TuiTextfieldDropdownDirective, selector: "ng-template[tuiTextfieldDropdown]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
862
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocLanguageSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
863
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocLanguageSwitcher, isStandalone: true, selector: "tui-doc-language-switcher", providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], ngImport: i0, template: "<button\n appearance=\"secondary-grayscale\"\n size=\"s\"\n tuiButton\n tuiButtonSelect\n tuiChevron\n type=\"button\"\n [formControl]=\"language\"\n>\n <img\n alt=\"\"\n size=\"s\"\n tuiBadge\n [src]=\"flags.get(language.value ?? '') || flags.get(switcher.language) | tuiFlag\"\n />\n Language\n <tui-data-list *tuiDropdown>\n <tui-opt-group label=\"Language of components\">\n @for (name of names; track name) {\n <button\n tuiOption\n type=\"button\"\n [value]=\"name | titlecase\"\n (click)=\"setLang(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"flags.get(name) | tuiFlag\"\n />\n {{ name | titlecase }}\n </button>\n }\n </tui-opt-group>\n </tui-data-list>\n</button>\n", styles: [".t-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:50%;margin-inline-end:.5rem}[tuiOption]{justify-content:flex-start;gap:.5rem}img{box-shadow:inset 0 0 0 1px var(--tui-border-normal)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "directive", type: TuiBadge, selector: "[tuiBadge],tui-icon[tuiBadge]", inputs: ["size"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiButtonSelect, selector: "button[tuiButtonSelect]" }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2$2.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i2$2.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i2$2.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "directive", type: i2$2.TuiOptGroup, selector: "tui-opt-group", inputs: ["label"] }, { kind: "pipe", type: TuiFlagPipe, name: "tuiFlag" }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1282
864
  }
1283
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocLanguageSwitcher, decorators: [{
865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocLanguageSwitcher, decorators: [{
1284
866
  type: Component,
1285
- args: [{ standalone: true, selector: 'tui-doc-language-switcher', imports: [
1286
- NgForOf,
867
+ args: [{ selector: 'tui-doc-language-switcher', imports: [
1287
868
  ReactiveFormsModule,
1288
869
  TitleCasePipe,
1289
870
  TuiBadge,
1290
- TuiBadgedContent,
1291
871
  TuiButton,
1292
872
  TuiButtonSelect,
873
+ TuiChevron,
1293
874
  TuiDataList,
1294
875
  TuiFlagPipe,
1295
876
  TuiTextfield,
1296
- ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], template: "<tui-badged-content>\n <img\n alt=\"\"\n size=\"s\"\n tuiBadge\n tuiSlot=\"bottom\"\n [src]=\"flags.get(language.value ?? '') || flags.get(switcher.language) | tuiFlag\"\n />\n\n <button\n appearance=\"outline-grayscale\"\n size=\"s\"\n tuiButtonSelect\n tuiIconButton\n type=\"button\"\n [formControl]=\"language\"\n [iconStart]=\"icons.languages\"\n >\n Language\n <tui-data-list *tuiTextfieldDropdown>\n <tui-opt-group label=\"Language of components\">\n <button\n *ngFor=\"let name of names\"\n new\n tuiOption\n type=\"button\"\n [value]=\"name | titlecase\"\n (click)=\"setLang(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"flags.get(name) | tuiFlag\"\n />\n {{ name | titlecase }}\n </button>\n </tui-opt-group>\n </tui-data-list>\n </button>\n</tui-badged-content>\n", styles: [".t-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:50%;margin-inline-end:.5rem}[tuiOption]{justify-content:flex-start;gap:.5rem}img{box-shadow:inset 0 0 0 1px var(--tui-border-normal)}\n"] }]
877
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiScrollbarOptionsProvider({ mode: 'hover' })], template: "<button\n appearance=\"secondary-grayscale\"\n size=\"s\"\n tuiButton\n tuiButtonSelect\n tuiChevron\n type=\"button\"\n [formControl]=\"language\"\n>\n <img\n alt=\"\"\n size=\"s\"\n tuiBadge\n [src]=\"flags.get(language.value ?? '') || flags.get(switcher.language) | tuiFlag\"\n />\n Language\n <tui-data-list *tuiDropdown>\n <tui-opt-group label=\"Language of components\">\n @for (name of names; track name) {\n <button\n tuiOption\n type=\"button\"\n [value]=\"name | titlecase\"\n (click)=\"setLang(name)\"\n >\n <img\n alt=\"\"\n class=\"t-flag\"\n [src]=\"flags.get(name) | tuiFlag\"\n />\n {{ name | titlecase }}\n </button>\n }\n </tui-opt-group>\n </tui-data-list>\n</button>\n", styles: [".t-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:50%;margin-inline-end:.5rem}[tuiOption]{justify-content:flex-start;gap:.5rem}img{box-shadow:inset 0 0 0 1px var(--tui-border-normal)}\n"] }]
1297
878
  }] });
1298
879
  function capitalize(value) {
1299
880
  return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
@@ -1305,148 +886,131 @@ class TuiDocMain {
1305
886
  this.icons = inject(TUI_DOC_ICONS);
1306
887
  this.dir = inject(TUI_DOC_DIRECTION_ENABLED);
1307
888
  this.darkMode = inject(TUI_DARK_MODE);
1308
- this.theme = computed(() => (this.darkMode() ? 'dark' : null));
1309
889
  this.icon = computed(() => this.darkMode() ? this.icons.light : this.icons.dark);
1310
890
  }
1311
891
  changeTextDirection() {
1312
892
  const dir = this.doc.documentElement.getAttribute('dir') ?? 'ltr';
1313
893
  this.doc.documentElement.setAttribute('dir', dir === 'ltr' ? 'rtl' : 'ltr');
1314
894
  }
1315
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocMain, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1316
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocMain, isStandalone: true, selector: "tui-doc-main", ngImport: i0, template: "<tui-root [attr.tuiTheme]=\"theme()\">\n <div class=\"tui-doc-page\">\n <tui-doc-navigation class=\"tui-doc-navigation\">\n <ng-content select=\"tuiDocNavigation\" />\n </tui-doc-navigation>\n <div class=\"tui-doc-content\">\n <router-outlet class=\"tui-doc-outlet\" />\n </div>\n </div>\n <header tuiDocHeader>\n <ng-content select=\"tuiDocHeader\" />\n\n <button\n *ngIf=\"dir && icons.ltr\"\n appearance=\"outline\"\n aria-label=\"Switch directionality of the element's text\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"tui-doc-switch-direction\"\n [iconEnd]=\"icons.ltr.preview\"\n (click)=\"changeTextDirection()\"\n >\n <tui-icon [icon]=\"icons.ltr.direction\" />\n </button>\n\n <button\n appearance=\"secondary\"\n aria-label=\"Switch between dark and light mode\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"tui-doc-dark-mode-switch\"\n [iconStart]=\"icon()\"\n [style.border-radius.%]=\"100\"\n (click)=\"darkMode.set(!darkMode())\"\n ></button>\n </header>\n <ng-container ngProjectAs=\"tuiOverContent\">\n <ng-content select=\"tuiOverContent\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverDialogs\">\n <ng-content select=\"tuiOverDialogs\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverAlerts\">\n <ng-content select=\"tuiOverAlerts\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverDropdowns\">\n <ng-content select=\"tuiOverDropdowns\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverHints\">\n <ng-content select=\"tuiOverHints\" />\n </ng-container>\n</tui-root>\n", styles: ["@keyframes tuiShaking{0%,to{transform:translateZ(0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}html,body{scroll-padding-top:4rem;background:var(--tui-background-base)}tui-root>tui-scroll-controls>.t-bar_vertical{top:4rem!important}tui-doc-main{display:block}code:not(pre code):not(.hljs):not([class*=language-]){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:inline-flex;background:var(--tui-background-neutral-1);color:var(--tui-text-secondary);vertical-align:middle;align-items:center;border-radius:.25rem;font-weight:500;outline:1px solid var(--tui-border-hover);font-size:.75rem;padding:0 .3125rem;margin:.125rem .1875rem;text-wrap:wrap}a code:not(pre code):not(.hljs):not([class*=language-]){color:var(--tui-text-action)}button:focus code,a:focus code{background:var(--tui-background-base)}.tui-doc-page{isolation:isolate;padding-block-start:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;inline-size:16.25rem;border-inline-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 47.9625em){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-inline-start:16.25rem}@media screen and (max-width: 47.9625em){.tui-doc-content{margin-inline-start:0}}.tui-doc-outlet+*{display:block}.tui-doc-switch-direction,.tui-doc-dark-mode-switch{margin-inline-start:1rem}tui-doc-code .hljs-tag{background:none}tui-doc-code .hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-primary);background-color:var(--tui-background-neutral-1)}tui-doc-code .hljs.hljs-line-numbers{background:transparent}tui-doc-code .hljs-subst,tui-doc-code .hljs-title{font-weight:400;color:var(--tui-text-primary)}tui-doc-code .hljs-property{color:#bd65a4}tui-doc-code .hljs-comment,tui-doc-code .hljs-quote{color:var(--tui-text-secondary);font-style:italic}tui-doc-code .hljs-meta{color:#e38162}tui-doc-code .hljs-section,tui-doc-code .hljs-name,tui-doc-code .hljs-literal,tui-doc-code .hljs-keyword,tui-doc-code .hljs-selector-tag,tui-doc-code .hljs-type,tui-doc-code .hljs-selector-id,tui-doc-code .hljs-selector-class{font-weight:700;color:var(--tui-text-action)}tui-doc-code .hljs-attr{color:var(--tui-text-action)}tui-doc-code .hljs-attribute,tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link,tui-doc-code .hljs-built_in{font-weight:700;color:#b8474e}tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link{font-weight:400}tui-doc-code .hljs-string{color:var(--tui-status-positive);font-weight:700}tui-doc-code .hljs-symbol,tui-doc-code .hljs-bullet,tui-doc-code .hljs-formula{color:var(--tui-text-primary);background:var(--tui-background-base-alt);font-style:italic}tui-doc-code .hljs-doctag{text-decoration:underline}tui-doc-code .hljs-variable,tui-doc-code .hljs-template-variable{color:var(--tui-text-action-hover)}tui-doc-code .hljs-addition{background:var(--tui-status-positive-pale)}tui-doc-code .hljs-deletion{background:var(--tui-status-negative-pale)}tui-doc-code .hljs-emphasis{font-style:italic}tui-doc-code .hljs-strong{font-weight:700}tui-doc-code .hljs .hljs-line-numbers{padding:0}tui-doc-code .hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:end;padding-inline-end:1em!important}[tuiTheme=dark] tui-doc-code .hljs-variable,tui-doc-code[tuiTheme=dark] .hljs-variable,[tuiTheme=dark] tui-doc-code .hljs-template-variable,tui-doc-code[tuiTheme=dark] .hljs-template-variable{color:var(--tui-status-warning)}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiDocHeader, selector: "header[tuiDocHeader]" }, { kind: "component", type: TuiDocNavigation, selector: "tui-doc-navigation" }, { kind: "component", type: TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { kind: "component", type: TuiRoot, selector: "tui-root" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
895
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocMain, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
896
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocMain, isStandalone: true, selector: "tui-doc-main", ngImport: i0, template: "<tui-root>\n <div class=\"tui-doc-page\">\n <tui-doc-navigation class=\"tui-doc-navigation\">\n <ng-content select=\"tuiDocNavigation\" />\n </tui-doc-navigation>\n <div class=\"tui-doc-content\">\n <router-outlet class=\"tui-doc-outlet\" />\n </div>\n </div>\n <header tuiDocHeader>\n <ng-content select=\"tuiDocHeader\" />\n\n @if (dir) {\n <button\n appearance=\"\"\n aria-label=\"Switch directionality of the element's text\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"tui-doc-switch-direction\"\n [style.border-radius.%]=\"100\"\n (click)=\"changeTextDirection()\"\n >\n <tui-icon\n [badge]=\"icons.ltr.direction\"\n [icon]=\"icons.ltr.preview\"\n />\n </button>\n }\n\n <button\n appearance=\"\"\n aria-label=\"Switch between dark and light mode\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"tui-doc-dark-mode-switch\"\n [style.border-radius.%]=\"100\"\n (click)=\"darkMode.set(!darkMode())\"\n >\n <tui-icon [icon]=\"icon()\" />\n </button>\n </header>\n <ng-container ngProjectAs=\"tuiOverContent\">\n <ng-content select=\"tuiOverContent\" />\n </ng-container>\n</tui-root>\n", styles: ["html,body{background:var(--tui-background-base)}tui-doc-main{display:block}code:not(pre code):not(.hljs):not([class*=language-]){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:inline-flex;background:var(--tui-background-neutral-1);color:var(--tui-text-secondary);vertical-align:middle;align-items:center;border-radius:.25rem;font-weight:500;outline:1px solid var(--tui-border-hover);font-size:.75rem;padding:0 .3125rem;margin:.125rem .1875rem;text-wrap:wrap}a code:not(pre code):not(.hljs):not([class*=language-]){color:var(--tui-text-action)}button:focus code,a:focus code{background:var(--tui-background-base)}.tui-doc-page{isolation:isolate;padding-block-start:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;inline-size:16.5rem;box-sizing:border-box}tui-doc-navigation.tui-doc-navigation:before,tui-doc-navigation.tui-doc-navigation:after{content:\"\";position:absolute;inset:-.25rem 0 .25rem;pointer-events:none;border-radius:var(--tui-radius-m);border:.25rem solid var(--tui-background-base-alt)}:host-context([tuiTheme=\"dark\"]) tui-doc-navigation.tui-doc-navigation:before,:host-context([tuiTheme=\"dark\"]) tui-doc-navigation.tui-doc-navigation:after{border:.25rem solid var(--tui-background-elevation-2)}tui-doc-navigation.tui-doc-navigation:after{inset-inline-start:100%;inline-size:200vw;margin-inline-start:-.25rem}@media screen and (max-width: 767.4px){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-inline-start:16.5rem}@media screen and (max-width: 767.4px){.tui-doc-content{margin-inline:0}}.tui-doc-outlet+*{display:block}button.tui-doc-switch-direction,button.tui-doc-dark-mode-switch{margin-inline-start:1rem;background:var(--tui-background-base)}tui-doc-code .hljs-tag{background:none}tui-doc-code .hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-primary)}tui-doc-code .hljs-subst,tui-doc-code .hljs-title{font-weight:400;color:var(--tui-text-primary)}tui-doc-code .hljs-property{color:#bd65a4}tui-doc-code .hljs-comment,tui-doc-code .hljs-quote{color:var(--tui-text-secondary);font-style:italic}tui-doc-code .hljs-meta{color:#e38162}tui-doc-code .hljs-section,tui-doc-code .hljs-name,tui-doc-code .hljs-literal,tui-doc-code .hljs-keyword,tui-doc-code .hljs-selector-tag,tui-doc-code .hljs-type,tui-doc-code .hljs-selector-id,tui-doc-code .hljs-selector-class{font-weight:700;color:var(--tui-text-action)}tui-doc-code .hljs-attr{color:var(--tui-text-action)}tui-doc-code .hljs-attribute,tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link,tui-doc-code .hljs-built_in{font-weight:700;color:#b8474e}tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link{font-weight:400}tui-doc-code .hljs-string{color:var(--tui-status-positive);font-weight:700}tui-doc-code .hljs-symbol,tui-doc-code .hljs-bullet,tui-doc-code .hljs-formula{color:var(--tui-text-primary);background:var(--tui-background-base-alt);font-style:italic}tui-doc-code .hljs-doctag{text-decoration:underline}tui-doc-code .hljs-variable,tui-doc-code .hljs-template-variable{color:var(--tui-text-action-hover)}tui-doc-code .hljs-addition{background:var(--tui-status-positive-pale)}tui-doc-code .hljs-deletion{background:var(--tui-status-negative-pale)}tui-doc-code .hljs-emphasis{font-style:italic}tui-doc-code .hljs-strong{font-weight:700}tui-doc-code .hljs .hljs-line-numbers{padding:0}tui-doc-code .hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:end;padding-inline-end:1em!important}[tuiTheme=dark] tui-doc-code .hljs-variable,tui-doc-code[tuiTheme=dark] .hljs-variable,[tuiTheme=dark] tui-doc-code .hljs-template-variable,tui-doc-code[tuiTheme=dark] .hljs-template-variable{color:var(--tui-status-warning)}tui-root>tui-scroll-controls .t-bar.t-bar_vertical{inset-block:4.5rem 1rem;transform:translate(-.75rem);opacity:.5}\n"], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiDocHeader, selector: "header[tuiDocHeader]" }, { kind: "component", type: TuiDocNavigation, selector: "tui-doc-navigation" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: TuiRoot, selector: "tui-root" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
1317
897
  }
1318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocMain, decorators: [{
898
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocMain, decorators: [{
1319
899
  type: Component,
1320
- args: [{ standalone: true, selector: 'tui-doc-main', imports: [
1321
- NgIf,
1322
- RouterOutlet,
1323
- TuiButton,
1324
- TuiDocHeader,
1325
- TuiDocNavigation,
1326
- TuiIcon,
1327
- TuiRoot,
1328
- ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, template: "<tui-root [attr.tuiTheme]=\"theme()\">\n <div class=\"tui-doc-page\">\n <tui-doc-navigation class=\"tui-doc-navigation\">\n <ng-content select=\"tuiDocNavigation\" />\n </tui-doc-navigation>\n <div class=\"tui-doc-content\">\n <router-outlet class=\"tui-doc-outlet\" />\n </div>\n </div>\n <header tuiDocHeader>\n <ng-content select=\"tuiDocHeader\" />\n\n <button\n *ngIf=\"dir && icons.ltr\"\n appearance=\"outline\"\n aria-label=\"Switch directionality of the element's text\"\n size=\"s\"\n tuiButton\n type=\"button\"\n class=\"tui-doc-switch-direction\"\n [iconEnd]=\"icons.ltr.preview\"\n (click)=\"changeTextDirection()\"\n >\n <tui-icon [icon]=\"icons.ltr.direction\" />\n </button>\n\n <button\n appearance=\"secondary\"\n aria-label=\"Switch between dark and light mode\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"tui-doc-dark-mode-switch\"\n [iconStart]=\"icon()\"\n [style.border-radius.%]=\"100\"\n (click)=\"darkMode.set(!darkMode())\"\n ></button>\n </header>\n <ng-container ngProjectAs=\"tuiOverContent\">\n <ng-content select=\"tuiOverContent\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverDialogs\">\n <ng-content select=\"tuiOverDialogs\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverAlerts\">\n <ng-content select=\"tuiOverAlerts\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverDropdowns\">\n <ng-content select=\"tuiOverDropdowns\" />\n </ng-container>\n <ng-container ngProjectAs=\"tuiOverHints\">\n <ng-content select=\"tuiOverHints\" />\n </ng-container>\n</tui-root>\n", styles: ["@keyframes tuiShaking{0%,to{transform:translateZ(0)}10%,30%,50%,70%,90%{transform:translate3d(-.3125rem,0,0)}20%,40%,60%,80%{transform:translate3d(.3125rem,0,0)}}html,body{scroll-padding-top:4rem;background:var(--tui-background-base)}tui-root>tui-scroll-controls>.t-bar_vertical{top:4rem!important}tui-doc-main{display:block}code:not(pre code):not(.hljs):not([class*=language-]){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:inline-flex;background:var(--tui-background-neutral-1);color:var(--tui-text-secondary);vertical-align:middle;align-items:center;border-radius:.25rem;font-weight:500;outline:1px solid var(--tui-border-hover);font-size:.75rem;padding:0 .3125rem;margin:.125rem .1875rem;text-wrap:wrap}a code:not(pre code):not(.hljs):not([class*=language-]){color:var(--tui-text-action)}button:focus code,a:focus code{background:var(--tui-background-base)}.tui-doc-page{isolation:isolate;padding-block-start:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;inline-size:16.25rem;border-inline-end:1px solid var(--tui-border-normal)}@media screen and (max-width: 47.9625em){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-inline-start:16.25rem}@media screen and (max-width: 47.9625em){.tui-doc-content{margin-inline-start:0}}.tui-doc-outlet+*{display:block}.tui-doc-switch-direction,.tui-doc-dark-mode-switch{margin-inline-start:1rem}tui-doc-code .hljs-tag{background:none}tui-doc-code .hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-primary);background-color:var(--tui-background-neutral-1)}tui-doc-code .hljs.hljs-line-numbers{background:transparent}tui-doc-code .hljs-subst,tui-doc-code .hljs-title{font-weight:400;color:var(--tui-text-primary)}tui-doc-code .hljs-property{color:#bd65a4}tui-doc-code .hljs-comment,tui-doc-code .hljs-quote{color:var(--tui-text-secondary);font-style:italic}tui-doc-code .hljs-meta{color:#e38162}tui-doc-code .hljs-section,tui-doc-code .hljs-name,tui-doc-code .hljs-literal,tui-doc-code .hljs-keyword,tui-doc-code .hljs-selector-tag,tui-doc-code .hljs-type,tui-doc-code .hljs-selector-id,tui-doc-code .hljs-selector-class{font-weight:700;color:var(--tui-text-action)}tui-doc-code .hljs-attr{color:var(--tui-text-action)}tui-doc-code .hljs-attribute,tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link,tui-doc-code .hljs-built_in{font-weight:700;color:#b8474e}tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link{font-weight:400}tui-doc-code .hljs-string{color:var(--tui-status-positive);font-weight:700}tui-doc-code .hljs-symbol,tui-doc-code .hljs-bullet,tui-doc-code .hljs-formula{color:var(--tui-text-primary);background:var(--tui-background-base-alt);font-style:italic}tui-doc-code .hljs-doctag{text-decoration:underline}tui-doc-code .hljs-variable,tui-doc-code .hljs-template-variable{color:var(--tui-text-action-hover)}tui-doc-code .hljs-addition{background:var(--tui-status-positive-pale)}tui-doc-code .hljs-deletion{background:var(--tui-status-negative-pale)}tui-doc-code .hljs-emphasis{font-style:italic}tui-doc-code .hljs-strong{font-weight:700}tui-doc-code .hljs .hljs-line-numbers{padding:0}tui-doc-code .hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:end;padding-inline-end:1em!important}[tuiTheme=dark] tui-doc-code .hljs-variable,tui-doc-code[tuiTheme=dark] .hljs-variable,[tuiTheme=dark] tui-doc-code .hljs-template-variable,tui-doc-code[tuiTheme=dark] .hljs-template-variable{color:var(--tui-status-warning)}\n"] }]
900
+ args: [{ selector: 'tui-doc-main', imports: [RouterOutlet, TuiButton, TuiDocHeader, TuiDocNavigation, TuiIcon, TuiRoot], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, template: "<tui-root>\n <div class=\"tui-doc-page\">\n <tui-doc-navigation class=\"tui-doc-navigation\">\n <ng-content select=\"tuiDocNavigation\" />\n </tui-doc-navigation>\n <div class=\"tui-doc-content\">\n <router-outlet class=\"tui-doc-outlet\" />\n </div>\n </div>\n <header tuiDocHeader>\n <ng-content select=\"tuiDocHeader\" />\n\n @if (dir) {\n <button\n appearance=\"\"\n aria-label=\"Switch directionality of the element's text\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"tui-doc-switch-direction\"\n [style.border-radius.%]=\"100\"\n (click)=\"changeTextDirection()\"\n >\n <tui-icon\n [badge]=\"icons.ltr.direction\"\n [icon]=\"icons.ltr.preview\"\n />\n </button>\n }\n\n <button\n appearance=\"\"\n aria-label=\"Switch between dark and light mode\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"tui-doc-dark-mode-switch\"\n [style.border-radius.%]=\"100\"\n (click)=\"darkMode.set(!darkMode())\"\n >\n <tui-icon [icon]=\"icon()\" />\n </button>\n </header>\n <ng-container ngProjectAs=\"tuiOverContent\">\n <ng-content select=\"tuiOverContent\" />\n </ng-container>\n</tui-root>\n", styles: ["html,body{background:var(--tui-background-base)}tui-doc-main{display:block}code:not(pre code):not(.hljs):not([class*=language-]){transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:inline-flex;background:var(--tui-background-neutral-1);color:var(--tui-text-secondary);vertical-align:middle;align-items:center;border-radius:.25rem;font-weight:500;outline:1px solid var(--tui-border-hover);font-size:.75rem;padding:0 .3125rem;margin:.125rem .1875rem;text-wrap:wrap}a code:not(pre code):not(.hljs):not([class*=language-]){color:var(--tui-text-action)}button:focus code,a:focus code{background:var(--tui-background-base)}.tui-doc-page{isolation:isolate;padding-block-start:4rem}tui-doc-navigation.tui-doc-navigation{position:fixed;top:4rem;bottom:0;inline-size:16.5rem;box-sizing:border-box}tui-doc-navigation.tui-doc-navigation:before,tui-doc-navigation.tui-doc-navigation:after{content:\"\";position:absolute;inset:-.25rem 0 .25rem;pointer-events:none;border-radius:var(--tui-radius-m);border:.25rem solid var(--tui-background-base-alt)}:host-context([tuiTheme=\"dark\"]) tui-doc-navigation.tui-doc-navigation:before,:host-context([tuiTheme=\"dark\"]) tui-doc-navigation.tui-doc-navigation:after{border:.25rem solid var(--tui-background-elevation-2)}tui-doc-navigation.tui-doc-navigation:after{inset-inline-start:100%;inline-size:200vw;margin-inline-start:-.25rem}@media screen and (max-width: 767.4px){tui-doc-navigation.tui-doc-navigation{display:none}}.tui-doc-content{margin-inline-start:16.5rem}@media screen and (max-width: 767.4px){.tui-doc-content{margin-inline:0}}.tui-doc-outlet+*{display:block}button.tui-doc-switch-direction,button.tui-doc-dark-mode-switch{margin-inline-start:1rem;background:var(--tui-background-base)}tui-doc-code .hljs-tag{background:none}tui-doc-code .hljs{display:block;overflow-x:auto;padding:.5em;color:var(--tui-text-primary)}tui-doc-code .hljs-subst,tui-doc-code .hljs-title{font-weight:400;color:var(--tui-text-primary)}tui-doc-code .hljs-property{color:#bd65a4}tui-doc-code .hljs-comment,tui-doc-code .hljs-quote{color:var(--tui-text-secondary);font-style:italic}tui-doc-code .hljs-meta{color:#e38162}tui-doc-code .hljs-section,tui-doc-code .hljs-name,tui-doc-code .hljs-literal,tui-doc-code .hljs-keyword,tui-doc-code .hljs-selector-tag,tui-doc-code .hljs-type,tui-doc-code .hljs-selector-id,tui-doc-code .hljs-selector-class{font-weight:700;color:var(--tui-text-action)}tui-doc-code .hljs-attr{color:var(--tui-text-action)}tui-doc-code .hljs-attribute,tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link,tui-doc-code .hljs-built_in{font-weight:700;color:#b8474e}tui-doc-code .hljs-number,tui-doc-code .hljs-regexp,tui-doc-code .hljs-link{font-weight:400}tui-doc-code .hljs-string{color:var(--tui-status-positive);font-weight:700}tui-doc-code .hljs-symbol,tui-doc-code .hljs-bullet,tui-doc-code .hljs-formula{color:var(--tui-text-primary);background:var(--tui-background-base-alt);font-style:italic}tui-doc-code .hljs-doctag{text-decoration:underline}tui-doc-code .hljs-variable,tui-doc-code .hljs-template-variable{color:var(--tui-text-action-hover)}tui-doc-code .hljs-addition{background:var(--tui-status-positive-pale)}tui-doc-code .hljs-deletion{background:var(--tui-status-negative-pale)}tui-doc-code .hljs-emphasis{font-style:italic}tui-doc-code .hljs-strong{font-weight:700}tui-doc-code .hljs .hljs-line-numbers{padding:0}tui-doc-code .hljs-ln-numbers{vertical-align:top;opacity:.3;text-align:end;padding-inline-end:1em!important}[tuiTheme=dark] tui-doc-code .hljs-variable,tui-doc-code[tuiTheme=dark] .hljs-variable,[tuiTheme=dark] tui-doc-code .hljs-template-variable,tui-doc-code[tuiTheme=dark] .hljs-template-variable{color:var(--tui-status-warning)}tui-root>tui-scroll-controls .t-bar.t-bar_vertical{inset-block:4.5rem 1rem;transform:translate(-.75rem);opacity:.5}\n"] }]
1329
901
  }] });
1330
902
 
1331
- const [TUI_DOC_PAGE_OPTIONS, tuiDocPageOptionsProvider] = tuiCreateOptions({
1332
- header: '',
1333
- package: '',
1334
- type: '',
1335
- tags: [],
1336
- path: '',
1337
- deprecated: false,
1338
- });
1339
- const TUI_DOC_TABS = new InjectionToken(ngDevMode ? 'TUI_DOC_TABS' : '', {
1340
- factory: () => () => ({}),
1341
- });
1342
- /**
1343
- * Array if related page titles
1344
- */
1345
- const PAGE_SEE_ALSO = new InjectionToken(ngDevMode ? 'PAGE_SEE_ALSO' : '');
1346
- const PAGE_PROVIDERS = [
1347
- {
1348
- provide: PAGE_SEE_ALSO,
1349
- deps: [ElementRef, TUI_DOC_SEE_ALSO],
1350
- useFactory: ({ nativeElement }, seeAlsoGroups) => {
1351
- const currentHeader = nativeElement.getAttribute('header');
1352
- const groups = seeAlsoGroups.filter((group) => group.includes(currentHeader)) || [];
1353
- const seeAlsoSet = new Set(groups
1354
- .join()
1355
- .split(',')
1356
- .filter((component) => component && component !== currentHeader));
1357
- return Array.from(seeAlsoSet);
1358
- },
1359
- },
1360
- ];
903
+ class TuiDocToc {
904
+ constructor() {
905
+ this.el = tuiInjectElement();
906
+ this.pages = inject(TUI_DOC_MAP_PAGES);
907
+ this.examples = [];
908
+ this.active = '';
909
+ this.toc = signal([]);
910
+ this.route = inject(ActivatedRoute);
911
+ this.seeAlso = getSeeAlso();
912
+ this.text = {
913
+ toc: inject(TUI_DOC_TOC_TEXT),
914
+ seeAlso: inject(TUI_DOC_SEE_ALSO_TEXT),
915
+ };
916
+ }
917
+ ngOnInit() {
918
+ setTimeout(() => {
919
+ const page = this.el.closest('tui-doc-page');
920
+ const links = page?.querySelectorAll('tui-doc-example > header .t-link');
921
+ const toc = Array.from(links || []).map((el) => el.textContent?.trim() || '');
922
+ this.toc.set(toc);
923
+ });
924
+ }
925
+ isActive(fragment) {
926
+ return this.active ? fragment === this.active : fragment === this.toc()[0];
927
+ }
928
+ getRouterLink(pageTitle) {
929
+ return this.pages.get(pageTitle)?.route ?? '';
930
+ }
931
+ onExample(example) {
932
+ const toc = this.toc();
933
+ this.examples = tuiArrayToggle(this.examples, example);
934
+ this.active =
935
+ toc.find((item) => this.examples.includes(tuiToKebab(item))) ||
936
+ toc[toc.length - 1] ||
937
+ '';
938
+ }
939
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocToc, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
940
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocToc, isStandalone: true, selector: "tui-doc-toc", host: { listeners: { "document:tui-example": "onExample($event.detail)" } }, ngImport: i0, template: "@if (toc().length > 1) {\n <h2 tuiTitle=\"s\">\n <b>{{ text.toc }}</b>\n </h2>\n <nav>\n @for (item of toc(); track $index) {\n <a\n appearance=\"action-grayscale\"\n routerLink=\".\"\n tuiLink\n type=\"button\"\n [class._active]=\"isActive(item)\"\n [fragment]=\"item | tuiKebab\"\n [relativeTo]=\"route.firstChild ?? route\"\n >\n {{ item }}\n </a>\n }\n </nav>\n @if (seeAlso.length) {\n <h2 tuiTitle=\"s\">\n <b>{{ text.seeAlso }}</b>\n </h2>\n @for (item of seeAlso; track $index) {\n <a\n tuiLink\n [innerText]=\"item\"\n [routerLink]=\"getRouterLink(item)\"\n ></a>\n @if (!$last) {\n <span>{{ ', ' }}</span>\n }\n }\n }\n}\n", styles: [":host{position:sticky;top:6rem;display:block;float:inline-end;inline-size:14rem;margin-inline-start:5rem;font:var(--tui-font-body-s)}:host:empty{display:none}@media screen and (max-width: 1279.4px){:host{display:none}}nav{display:flex;flex-direction:column;box-shadow:inset 1px 0 var(--tui-border-normal);margin:1rem 0 2rem;clip-path:inset(.5rem -1rem)}nav [tuiLink]{position:relative;padding:.375rem 1rem}nav [tuiLink]._active{font-weight:700;color:var(--tui-text-primary)}nav [tuiLink]._active:before{position:absolute;display:block;inset-inline-start:-1px;inset-block:.5rem;inline-size:.1875rem;block-size:1rem;background:var(--tui-text-primary);border-radius:1rem;padding:0}[tuiTitle]{margin:.5rem 0}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: TuiDocKebabPipe, name: "tuiKebab" }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
941
+ }
942
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocToc, decorators: [{
943
+ type: Component,
944
+ args: [{ selector: 'tui-doc-toc', imports: [RouterLink, TuiDocKebabPipe, TuiLink, TuiTitle], changeDetection: ChangeDetectionStrategy.OnPush, host: { '(document:tui-example)': 'onExample($event.detail)' }, template: "@if (toc().length > 1) {\n <h2 tuiTitle=\"s\">\n <b>{{ text.toc }}</b>\n </h2>\n <nav>\n @for (item of toc(); track $index) {\n <a\n appearance=\"action-grayscale\"\n routerLink=\".\"\n tuiLink\n type=\"button\"\n [class._active]=\"isActive(item)\"\n [fragment]=\"item | tuiKebab\"\n [relativeTo]=\"route.firstChild ?? route\"\n >\n {{ item }}\n </a>\n }\n </nav>\n @if (seeAlso.length) {\n <h2 tuiTitle=\"s\">\n <b>{{ text.seeAlso }}</b>\n </h2>\n @for (item of seeAlso; track $index) {\n <a\n tuiLink\n [innerText]=\"item\"\n [routerLink]=\"getRouterLink(item)\"\n ></a>\n @if (!$last) {\n <span>{{ ', ' }}</span>\n }\n }\n }\n}\n", styles: [":host{position:sticky;top:6rem;display:block;float:inline-end;inline-size:14rem;margin-inline-start:5rem;font:var(--tui-font-body-s)}:host:empty{display:none}@media screen and (max-width: 1279.4px){:host{display:none}}nav{display:flex;flex-direction:column;box-shadow:inset 1px 0 var(--tui-border-normal);margin:1rem 0 2rem;clip-path:inset(.5rem -1rem)}nav [tuiLink]{position:relative;padding:.375rem 1rem}nav [tuiLink]._active{font-weight:700;color:var(--tui-text-primary)}nav [tuiLink]._active:before{position:absolute;display:block;inset-inline-start:-1px;inset-block:.5rem;inline-size:.1875rem;block-size:1rem;background:var(--tui-text-primary);border-radius:1rem;padding:0}[tuiTitle]{margin:.5rem 0}\n"] }]
945
+ }] });
946
+ function getSeeAlso() {
947
+ const current = inject(TuiDocPage).header() || '';
948
+ const groups = inject(TUI_DOC_SEE_ALSO).filter((group) => group.includes(current)) || [];
949
+ return Array.from(new Set(groups
950
+ .join()
951
+ .split(',')
952
+ .filter((component) => component && component !== current)));
953
+ }
954
+
955
+ const TUI_DOC_TABS = new InjectionToken(ngDevMode ? 'TUI_DOC_TABS' : '', { factory: () => () => ({}) });
1361
956
 
1362
957
  class TuiDocPageTabConnector {
1363
958
  constructor() {
959
+ this.pageTab = input();
1364
960
  this.template = inject((TemplateRef));
1365
961
  }
1366
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocPageTabConnector, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1367
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocPageTabConnector, isStandalone: true, selector: "ng-template[pageTab]", inputs: { pageTab: "pageTab" }, ngImport: i0 }); }
962
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocPageTabConnector, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
963
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.18", type: TuiDocPageTabConnector, isStandalone: true, selector: "ng-template[pageTab]", inputs: { pageTab: { classPropertyName: "pageTab", publicName: "pageTab", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1368
964
  }
1369
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocPageTabConnector, decorators: [{
965
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocPageTabConnector, decorators: [{
1370
966
  type: Directive,
1371
- args: [{
1372
- standalone: true,
1373
- selector: 'ng-template[pageTab]',
1374
- }]
1375
- }], propDecorators: { pageTab: [{
1376
- type: Input
1377
- }] } });
967
+ args: [{ selector: 'ng-template[pageTab]' }]
968
+ }] });
1378
969
 
1379
970
  class TuiDocPage {
1380
971
  constructor() {
1381
- this.options = inject(TUI_DOC_PAGE_OPTIONS);
972
+ this.tabConnectors = contentChildren(TuiDocPageTabConnector);
1382
973
  this.tabs = inject(TUI_DOC_TABS)(inject(ActivatedRoute).snapshot);
1383
974
  this.supportLanguage = inject(TUI_DOC_SUPPORT_LANGUAGE);
1384
975
  this.defaultTabs = inject(TUI_DOC_DEFAULT_TABS);
1385
976
  this.from = / /g;
1386
977
  this.to = '_';
1387
- this.header = this.options.header;
1388
- this.package = this.options.package;
1389
- this.type = this.options.type;
1390
- this.tags = this.options.tags;
1391
- this.path = this.options.path;
1392
- this.deprecated = this.options.deprecated;
1393
- this.tabConnectors = EMPTY_QUERY;
1394
- this.activeItemIndex = 0;
1395
- this.seeAlso = inject(PAGE_SEE_ALSO);
1396
- }
1397
- get showSeeAlso() {
1398
- return !!this.seeAlso.length && this.activeItemIndex === 0;
1399
- }
1400
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1401
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocPage, isStandalone: true, selector: "tui-doc-page", inputs: { header: "header", package: "package", type: "type", tags: "tags", path: "path", deprecated: "deprecated" }, providers: PAGE_PROVIDERS, queries: [{ propertyName: "tabConnectors", predicate: TuiDocPageTabConnector }], ngImport: i0, template: "<header class=\"t-header\">\n <h1\n *ngIf=\"header\"\n class=\"t-title\"\n >\n {{ header }}\n <tui-chip\n *ngIf=\"!!deprecated || deprecated === ''\"\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_deprecated\"\n >\n deprecated\n </tui-chip>\n <tui-chip\n *ngIf=\"package\"\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"package | tuiAutoColor\"\n >\n {{ package }}\n </tui-chip>\n <tui-chip\n *ngFor=\"let tag of tags\"\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </tui-chip>\n </h1>\n <tui-tabs-with-more\n *ngIf=\"tabConnectors.length\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabConnectors; first as first; index as index\">\n <ng-container *ngIf=\"tab.pageTab || defaultTabs[index] as tabName\">\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"first ? './' : (tabName | tuiReplace: from : to)\"\n [routerLinkActiveOptions]=\"{exact: first}\"\n >\n {{ tabName }}\n </a>\n </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let tab of tabs | keyvalue\">\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n </ng-container>\n </tui-tabs-with-more>\n\n <div\n *ngIf=\"package || path || type\"\n class=\"t-right-side\"\n >\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [path]=\"path\"\n [type]=\"type\"\n />\n\n <tui-doc-language-switcher *ngIf=\"supportLanguage.has(header)\" />\n </div>\n</header>\n<div class=\"t-content\">\n <ng-content />\n <tui-doc-see-also\n *ngIf=\"showSeeAlso\"\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n />\n <ng-container *ngFor=\"let tab of tabConnectors; index as index\">\n <ng-container\n *ngIf=\"index === activeItemIndex\"\n [ngTemplateOutlet]=\"tab.template\"\n />\n </ng-container>\n <ng-container *ngFor=\"let tab of tabs | keyvalue; index as index\">\n <ng-container *ngIf=\"index + tabConnectors.length === activeItemIndex\">\n <ng-container *polymorpheusOutlet=\"tab.value as text\">{{ text }}</ng-container>\n </ng-container>\n </ng-container>\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-block-size:0;flex-basis:0;flex-grow:1;font:var(--tui-font-text-m)}.t-header{display:flex;font:var(--tui-font-heading-3);flex-wrap:wrap;color:var(--tui-text-primary);box-shadow:inset 0 -1px 0 0 var(--tui-border-normal);box-sizing:border-box;flex-shrink:0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-header{font:var(--tui-font-heading-4);margin:0}}@media screen and (max-width: 47.9625em){.t-header:not(:empty){min-block-size:4.5rem;padding:0 1.25rem}}.t-title{min-inline-size:100%;padding:3.75rem 0 0;font-size:inherit;margin:0}@media screen and (max-width: 47.9625em){.t-title{padding:1.25rem 0 0}}.t-tag{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem}.t-tag_deprecated{background-color:var(--tui-status-negative);color:#fff}.t-tag.t-tag_package{color:#000}.t-tabs{flex:1;margin:1.125rem .3125rem 0 0;box-shadow:none}@media screen and (max-width: 47.9625em){.t-tabs{margin-block-start:.25rem}}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-content{padding:2rem 1.25rem;margin:0}}.t-see-also{min-inline-size:18.75rem;inline-size:30%;float:inline-end;margin:0 0 1rem;margin-inline-start:1.5rem}@media screen and (max-width: 47.9625em){.t-see-also{float:none;inline-size:100%;margin:0 0 1.5rem}}.t-right-side{display:flex;gap:1rem;align-items:center;align-self:center;margin-inline-start:auto}.t-source-code{block-size:3.125rem}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: TuiAutoColorPipe, name: "tuiAutoColor" }, { kind: "directive", type: TuiChip, selector: "tui-chip,[tuiChip]", inputs: ["size"] }, { kind: "component", type: TuiDocLanguageSwitcher, selector: "tui-doc-language-switcher" }, { kind: "component", type: TuiDocSeeAlso, selector: "tui-doc-see-also", inputs: ["seeAlso"] }, { kind: "component", type: TuiDocSourceCode, selector: "tui-doc-source-code", inputs: ["header", "package", "type", "path"] }, { kind: "pipe", type: TuiReplacePipe, name: "tuiReplace" }, { kind: "directive", type: i1$2.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: i2$1.TuiTab, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { kind: "component", type: i2$1.TuiTabsWithMore, selector: "tui-tabs-with-more, nav[tuiTabsWithMore]", inputs: ["size", "moreContent", "dropdownContent", "underline", "itemsLimit", "activeItemIndex"], outputs: ["activeItemIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
978
+ this.header = input('');
979
+ this.package = input('');
980
+ this.type = input('');
981
+ this.tags = input([]);
982
+ this.path = input('');
983
+ this.activeItemIndex = model(0);
984
+ }
985
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
986
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocPage, isStandalone: true, selector: "tui-doc-page", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, package: { classPropertyName: "package", publicName: "package", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, tags: { classPropertyName: "tags", publicName: "tags", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: false, transformFunction: null }, activeItemIndex: { classPropertyName: "activeItemIndex", publicName: "activeItemIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeItemIndex: "activeItemIndexChange" }, queries: [{ propertyName: "tabConnectors", predicate: TuiDocPageTabConnector, isSignal: true }], ngImport: i0, template: "<header\n tuiHeader\n class=\"t-header\"\n>\n @if (header()) {\n <hgroup tuiTitle>\n <h1>\n {{ header() }}\n @if (package()) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"package() | tuiAutoColor\"\n >\n {{ package() }}\n </span>\n }\n @for (tag of tags(); track $index) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </span>\n }\n </h1>\n <p class=\"t-navigation\">\n @if (tabConnectors().length > 1) {\n <tui-segmented [(activeItemIndex)]=\"activeItemIndex\">\n @for (tab of tabConnectors(); track tab) {\n @if (tab.pageTab() || defaultTabs[$index]; as tabName) {\n <a\n routerLinkActive\n [routerLink]=\"$first ? './' : tabName.replace(from, to)\"\n [routerLinkActiveOptions]=\"{exact: $first}\"\n >\n {{ tabName }}\n </a>\n }\n }\n @for (tab of tabs | keyvalue; track tab) {\n <a\n routerLinkActive\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n }\n </tui-segmented>\n }\n\n @if (package() || path() || type()) {\n @if (supportLanguage.has(header())) {\n <tui-doc-language-switcher />\n }\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header()\"\n [package]=\"package()\"\n [path]=\"path()\"\n [type]=\"type()\"\n />\n }\n </p>\n </hgroup>\n }\n</header>\n<ng-content />\n@for (tab of tabConnectors(); track tab) {\n @if ($index === activeItemIndex()) {\n <tui-doc-toc />\n <ng-container [ngTemplateOutlet]=\"tab.template\" />\n }\n}\n@for (tab of tabs | keyvalue; track tab) {\n @if ($index + tabConnectors().length === activeItemIndex()) {\n <ng-container *polymorpheusOutlet=\"tab.value as text\">{{ text }}</ng-container>\n }\n}\n", styles: [":host{display:block;max-inline-size:70rem;font:var(--tui-font-body-m);padding:3rem;margin:0 auto}@media screen and (max-width: 767.4px){:host{padding:1rem 1.5rem}}.t-header{margin-block-end:2rem}.t-navigation{display:flex;gap:.625rem;margin-block-start:1rem}@media screen and (max-width: 767.4px){.t-navigation{margin:.5rem 0 1rem}}.t-badge{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem;color:#000}.t-content{padding:1rem 2rem}@media screen and (max-width: 767.4px){.t-content{padding:1rem 1.5rem}}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: TuiAutoColorPipe, name: "tuiAutoColor" }, { kind: "directive", type: TuiBadge, selector: "[tuiBadge],tui-icon[tuiBadge]", inputs: ["size"] }, { kind: "component", type: TuiDocLanguageSwitcher, selector: "tui-doc-language-switcher" }, { kind: "component", type: TuiDocSourceCode, selector: "tui-doc-source-code", inputs: ["header", "package", "type", "path"] }, { kind: "component", type: TuiDocToc, selector: "tui-doc-toc" }, { kind: "directive", type: TuiHeader, selector: "[tuiHeader]", inputs: ["tuiHeader"] }, { kind: "component", type: TuiSegmented, selector: "tui-segmented", inputs: ["size", "activeItemIndex"], outputs: ["activeItemIndexChange"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1402
987
  }
1403
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocPage, decorators: [{
988
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocPage, decorators: [{
1404
989
  type: Component,
1405
- args: [{ standalone: true, selector: 'tui-doc-page', imports: [
990
+ args: [{ selector: 'tui-doc-page', imports: [
1406
991
  KeyValuePipe,
1407
- NgForOf,
1408
- NgIf,
1409
992
  NgTemplateOutlet,
1410
993
  PolymorpheusOutlet,
1411
994
  RouterLink,
1412
995
  RouterLinkActive,
1413
996
  TuiAutoColorPipe,
1414
- TuiChip,
997
+ TuiBadge,
1415
998
  TuiDocLanguageSwitcher,
1416
- TuiDocSeeAlso,
1417
999
  TuiDocSourceCode,
1418
- TuiReplacePipe,
1419
- TuiTabs,
1420
- ], changeDetection: ChangeDetectionStrategy.OnPush, providers: PAGE_PROVIDERS, template: "<header class=\"t-header\">\n <h1\n *ngIf=\"header\"\n class=\"t-title\"\n >\n {{ header }}\n <tui-chip\n *ngIf=\"!!deprecated || deprecated === ''\"\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_deprecated\"\n >\n deprecated\n </tui-chip>\n <tui-chip\n *ngIf=\"package\"\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"package | tuiAutoColor\"\n >\n {{ package }}\n </tui-chip>\n <tui-chip\n *ngFor=\"let tag of tags\"\n appearance=\"custom\"\n size=\"xs\"\n class=\"t-tag t-tag_package\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </tui-chip>\n </h1>\n <tui-tabs-with-more\n *ngIf=\"tabConnectors.length\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"activeItemIndex\"\n >\n <ng-container *ngFor=\"let tab of tabConnectors; first as first; index as index\">\n <ng-container *ngIf=\"tab.pageTab || defaultTabs[index] as tabName\">\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"first ? './' : (tabName | tuiReplace: from : to)\"\n [routerLinkActiveOptions]=\"{exact: first}\"\n >\n {{ tabName }}\n </a>\n </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let tab of tabs | keyvalue\">\n <a\n *tuiItem\n routerLinkActive\n tuiTab\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n </ng-container>\n </tui-tabs-with-more>\n\n <div\n *ngIf=\"package || path || type\"\n class=\"t-right-side\"\n >\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header\"\n [package]=\"package\"\n [path]=\"path\"\n [type]=\"type\"\n />\n\n <tui-doc-language-switcher *ngIf=\"supportLanguage.has(header)\" />\n </div>\n</header>\n<div class=\"t-content\">\n <ng-content />\n <tui-doc-see-also\n *ngIf=\"showSeeAlso\"\n class=\"t-see-also\"\n [seeAlso]=\"seeAlso\"\n />\n <ng-container *ngFor=\"let tab of tabConnectors; index as index\">\n <ng-container\n *ngIf=\"index === activeItemIndex\"\n [ngTemplateOutlet]=\"tab.template\"\n />\n </ng-container>\n <ng-container *ngFor=\"let tab of tabs | keyvalue; index as index\">\n <ng-container *ngIf=\"index + tabConnectors.length === activeItemIndex\">\n <ng-container *polymorpheusOutlet=\"tab.value as text\">{{ text }}</ng-container>\n </ng-container>\n </ng-container>\n</div>\n", styles: [":host{display:flex;flex-direction:column;min-block-size:0;flex-basis:0;flex-grow:1;font:var(--tui-font-text-m)}.t-header{display:flex;font:var(--tui-font-heading-3);flex-wrap:wrap;color:var(--tui-text-primary);box-shadow:inset 0 -1px 0 0 var(--tui-border-normal);box-sizing:border-box;flex-shrink:0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-header{font:var(--tui-font-heading-4);margin:0}}@media screen and (max-width: 47.9625em){.t-header:not(:empty){min-block-size:4.5rem;padding:0 1.25rem}}.t-title{min-inline-size:100%;padding:3.75rem 0 0;font-size:inherit;margin:0}@media screen and (max-width: 47.9625em){.t-title{padding:1.25rem 0 0}}.t-tag{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem}.t-tag_deprecated{background-color:var(--tui-status-negative);color:#fff}.t-tag.t-tag_package{color:#000}.t-tabs{flex:1;margin:1.125rem .3125rem 0 0;box-shadow:none}@media screen and (max-width: 47.9625em){.t-tabs{margin-block-start:.25rem}}.t-content{padding:2rem 0;margin:0 min(10vw,8.75rem)}@media screen and (max-width: 47.9625em){.t-content{padding:2rem 1.25rem;margin:0}}.t-see-also{min-inline-size:18.75rem;inline-size:30%;float:inline-end;margin:0 0 1rem;margin-inline-start:1.5rem}@media screen and (max-width: 47.9625em){.t-see-also{float:none;inline-size:100%;margin:0 0 1.5rem}}.t-right-side{display:flex;gap:1rem;align-items:center;align-self:center;margin-inline-start:auto}.t-source-code{block-size:3.125rem}\n"] }]
1421
- }], propDecorators: { header: [{
1422
- type: Input
1423
- }], package: [{
1424
- type: Input
1425
- }], type: [{
1426
- type: Input
1427
- }], tags: [{
1428
- type: Input
1429
- }], path: [{
1430
- type: Input
1431
- }], deprecated: [{
1432
- type: Input
1433
- }], tabConnectors: [{
1434
- type: ContentChildren,
1435
- args: [TuiDocPageTabConnector]
1436
- }] } });
1000
+ TuiDocToc,
1001
+ TuiHeader,
1002
+ TuiSegmented,
1003
+ TuiTitle,
1004
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<header\n tuiHeader\n class=\"t-header\"\n>\n @if (header()) {\n <hgroup tuiTitle>\n <h1>\n {{ header() }}\n @if (package()) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"package() | tuiAutoColor\"\n >\n {{ package() }}\n </span>\n }\n @for (tag of tags(); track $index) {\n <span\n appearance=\"custom\"\n size=\"m\"\n tuiBadge\n class=\"t-badge\"\n [style.background]=\"tag | tuiAutoColor\"\n >\n {{ tag }}\n </span>\n }\n </h1>\n <p class=\"t-navigation\">\n @if (tabConnectors().length > 1) {\n <tui-segmented [(activeItemIndex)]=\"activeItemIndex\">\n @for (tab of tabConnectors(); track tab) {\n @if (tab.pageTab() || defaultTabs[$index]; as tabName) {\n <a\n routerLinkActive\n [routerLink]=\"$first ? './' : tabName.replace(from, to)\"\n [routerLinkActiveOptions]=\"{exact: $first}\"\n >\n {{ tabName }}\n </a>\n }\n }\n @for (tab of tabs | keyvalue; track tab) {\n <a\n routerLinkActive\n [routerLink]=\"tab.key\"\n >\n {{ tab.key }}\n </a>\n }\n </tui-segmented>\n }\n\n @if (package() || path() || type()) {\n @if (supportLanguage.has(header())) {\n <tui-doc-language-switcher />\n }\n <tui-doc-source-code\n class=\"t-source-code\"\n [header]=\"header()\"\n [package]=\"package()\"\n [path]=\"path()\"\n [type]=\"type()\"\n />\n }\n </p>\n </hgroup>\n }\n</header>\n<ng-content />\n@for (tab of tabConnectors(); track tab) {\n @if ($index === activeItemIndex()) {\n <tui-doc-toc />\n <ng-container [ngTemplateOutlet]=\"tab.template\" />\n }\n}\n@for (tab of tabs | keyvalue; track tab) {\n @if ($index + tabConnectors().length === activeItemIndex()) {\n <ng-container *polymorpheusOutlet=\"tab.value as text\">{{ text }}</ng-container>\n }\n}\n", styles: [":host{display:block;max-inline-size:70rem;font:var(--tui-font-body-m);padding:3rem;margin:0 auto}@media screen and (max-width: 767.4px){:host{padding:1rem 1.5rem}}.t-header{margin-block-end:2rem}.t-navigation{display:flex;gap:.625rem;margin-block-start:1rem}@media screen and (max-width: 767.4px){.t-navigation{margin:.5rem 0 1rem}}.t-badge{vertical-align:middle;text-transform:uppercase;margin-inline-end:.5rem;color:#000}.t-content{padding:1rem 2rem}@media screen and (max-width: 767.4px){.t-content{padding:1rem 1.5rem}}\n"] }]
1005
+ }] });
1437
1006
 
1438
1007
  const TUI_THEME_KEY = new InjectionToken(ngDevMode ? 'TUI_THEME_KEY' : '', {
1439
1008
  factory: () => 'data-tui-theme',
1440
1009
  });
1441
- const TUI_THEMES = new InjectionToken(ngDevMode ? 'TUI_THEMES' : '', {
1442
- factory: () => ({}),
1010
+ const TUI_THEME = new InjectionToken(ngDevMode ? 'TUI_THEME' : '', {
1011
+ factory: () => inject(WA_LOCAL_STORAGE)?.getItem(inject(TUI_THEME_KEY)) || 'Taiga UI',
1443
1012
  });
1444
- function tuiDocThemeProvider() {
1445
- return {
1446
- provide: TUI_THEME,
1447
- useFactory: () => inject(WA_LOCAL_STORAGE)?.getItem(inject(TUI_THEME_KEY)) || 'Taiga UI',
1448
- };
1449
- }
1013
+ const TUI_THEMES = new InjectionToken(ngDevMode ? 'TUI_THEMES' : '', { factory: () => ({}) });
1450
1014
  class TuiDocThemeSwitcher {
1451
1015
  constructor() {
1452
1016
  this.storage = inject(WA_LOCAL_STORAGE);
@@ -1455,22 +1019,23 @@ class TuiDocThemeSwitcher {
1455
1019
  this.theme = inject(TUI_THEME);
1456
1020
  this.themes = inject(TUI_THEMES);
1457
1021
  this.keys = Object.keys(this.themes);
1022
+ inject(DOCUMENT).documentElement.setAttribute(this.key, this.theme);
1458
1023
  }
1459
1024
  onTheme(theme) {
1460
1025
  this.storage?.setItem(this.key, theme);
1461
1026
  this.location.reload();
1462
1027
  }
1463
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocThemeSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1464
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDocThemeSwitcher, isStandalone: true, selector: "tui-doc-theme-switcher", ngImport: i0, template: "<tui-select\n [ngModel]=\"theme\"\n (ngModelChange)=\"onTheme($event)\"\n>\n <ng-content />\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let key of keys\"\n tuiOption\n type=\"button\"\n [value]=\"key\"\n >\n <img\n alt=\"\"\n [src]=\"themes[key]\"\n [style.margin-inline-end.rem]=\"0.5\"\n [style.width.rem]=\"1.75\"\n />\n {{ key }}\n </button>\n </tui-data-list>\n</tui-select>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i3$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i3$1.TuiOption, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: ["disabled", "value"] }, { kind: "ngmodule", type: TuiSelectModule }, { kind: "component", type: i5.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i5.TuiSelectDirective, selector: "tui-select" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1028
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocThemeSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1029
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiDocThemeSwitcher, isStandalone: true, selector: "tui-doc-theme-switcher", ngImport: i0, template: "<tui-textfield\n tuiChevron\n [tuiTextfieldCleaner]=\"false\"\n>\n <label tuiLabel>\n <ng-content />\n </label>\n <input\n tuiSelect\n [ngModel]=\"theme\"\n (ngModelChange)=\"onTheme($event)\"\n />\n <tui-data-list *tuiDropdown>\n @for (key of keys; track key) {\n <button\n tuiOption\n type=\"button\"\n [value]=\"key\"\n >\n <img\n alt=\"\"\n [src]=\"themes[key]\"\n [style.margin-inline-end.rem]=\"0.5\"\n [style.width.rem]=\"1.75\"\n />\n {{ key }}\n </button>\n }\n </tui-data-list>\n</tui-textfield>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i2$2.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i2$2.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "directive", type: i2$2.TuiOptionWithValue, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: ["disabled", "value"] }, { kind: "directive", type: i3$1.TuiSelectDirective, selector: "input[tuiSelect]" }, { kind: "directive", type: i4.TuiLabel, selector: "label[tuiLabel]" }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1465
1030
  }
1466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDocThemeSwitcher, decorators: [{
1031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiDocThemeSwitcher, decorators: [{
1467
1032
  type: Component,
1468
- args: [{ standalone: true, selector: 'tui-doc-theme-switcher', imports: [FormsModule, NgForOf, TuiDataList, TuiSelectModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-select\n [ngModel]=\"theme\"\n (ngModelChange)=\"onTheme($event)\"\n>\n <ng-content />\n <tui-data-list *tuiDataList>\n <button\n *ngFor=\"let key of keys\"\n tuiOption\n type=\"button\"\n [value]=\"key\"\n >\n <img\n alt=\"\"\n [src]=\"themes[key]\"\n [style.margin-inline-end.rem]=\"0.5\"\n [style.width.rem]=\"1.75\"\n />\n {{ key }}\n </button>\n </tui-data-list>\n</tui-select>\n" }]
1469
- }] });
1033
+ args: [{ selector: 'tui-doc-theme-switcher', imports: [FormsModule, TuiChevron, TuiDataList, TuiSelect, TuiTextfield], changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-textfield\n tuiChevron\n [tuiTextfieldCleaner]=\"false\"\n>\n <label tuiLabel>\n <ng-content />\n </label>\n <input\n tuiSelect\n [ngModel]=\"theme\"\n (ngModelChange)=\"onTheme($event)\"\n />\n <tui-data-list *tuiDropdown>\n @for (key of keys; track key) {\n <button\n tuiOption\n type=\"button\"\n [value]=\"key\"\n >\n <img\n alt=\"\"\n [src]=\"themes[key]\"\n [style.margin-inline-end.rem]=\"0.5\"\n [style.width.rem]=\"1.75\"\n />\n {{ key }}\n </button>\n }\n </tui-data-list>\n</tui-textfield>\n" }]
1034
+ }], ctorParameters: () => [] });
1470
1035
 
1471
1036
  /**
1472
1037
  * Generated bundle index. Do not edit.
1473
1038
  */
1474
1039
 
1475
- export { NAVIGATION_ITEMS, NAVIGATION_LABELS, NAVIGATION_PROVIDERS, NAVIGATION_TITLE, PAGE_PROVIDERS, PAGE_SEE_ALSO, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS, TUI_DOC_EXAMPLE_OPTIONS, TUI_DOC_PAGE_OPTIONS, TUI_DOC_TABS, TUI_THEMES, TUI_THEME_KEY, TuiDocAPI, TuiDocAPIItem, TuiDocAPINumberItem, TuiDocCode, TuiDocCopy, TuiDocDemo, TuiDocDocumentation, TuiDocDocumentationPropertyConnector, TuiDocExample, TuiDocExampleGetTabsPipe, TuiDocHeader, TuiDocLanguageSwitcher, TuiDocMain, TuiDocNavigation, TuiDocPage, TuiDocPageTabConnector, TuiDocScrollIntoViewLink, TuiDocSeeAlso, TuiDocSourceCode, TuiDocTab, TuiDocThemeSwitcher, TuiDocTypeReferencePipe, TuiGetColorPipe, TuiGetOpacityPipe, TuiInspectPipe, TuiIsOptionalPipe, TuiIsPrimitivePolymorpheusContentPipe, TuiShowCleanerPipe, TuiStripOptionalPipe, tuiDocExampleOptionsProvider, tuiDocPageOptionsProvider, tuiDocThemeProvider };
1040
+ export { NAVIGATION_ITEMS, NAVIGATION_LABELS, NAVIGATION_PROVIDERS, NAVIGATION_TITLE, TUI_DOC_EXAMPLE_DEFAULT_OPTIONS, TUI_DOC_EXAMPLE_OPTIONS, TUI_DOC_TABS, TUI_THEME, TUI_THEMES, TUI_THEME_KEY, TuiDocAPI, TuiDocAPIItem, TuiDocAPINumberItem, TuiDocCode, TuiDocCopy, TuiDocDemo, TuiDocExample, TuiDocExampleGetTabsPipe, TuiDocHeader, TuiDocLanguageSwitcher, TuiDocMain, TuiDocNavigation, TuiDocPage, TuiDocPageTabConnector, TuiDocScrollIntoViewLink, TuiDocSourceCode, TuiDocTab, TuiDocThemeSwitcher, TuiDocToc, TuiJsonPipe, tuiDocExampleOptionsProvider };
1476
1041
  //# sourceMappingURL=taiga-ui-addon-doc-components.mjs.map