@taiga-ui/kit 4.52.0-canary.24b31eb → 4.52.0-canary.2fa3dd5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/components/action-bar/action-bar.component.d.ts +5 -7
- package/components/action-bar/index.d.ts +0 -2
- package/components/badge/badge.options.d.ts +1 -3
- package/components/badge-notification/badge-notification.options.d.ts +1 -3
- package/components/block/block.options.d.ts +1 -3
- package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
- package/components/calendar-month/calendar-month.component.d.ts +1 -1
- package/components/calendar-range/calendar-range.component.d.ts +1 -2
- package/components/chip/chip.options.d.ts +1 -3
- package/components/confirm/confirm.component.d.ts +2 -2
- package/components/copy/copy.component.d.ts +1 -1
- package/components/copy/copy.directive.d.ts +1 -0
- package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -0
- package/components/files/file/file.options.d.ts +1 -1
- package/components/files/files/files.component.d.ts +2 -2
- package/components/files/input-files/input-files.options.d.ts +1 -3
- package/components/index.d.ts +0 -1
- package/components/input-number/input-number.directive.d.ts +5 -9
- package/components/input-number/step/input-number-step.component.d.ts +1 -1
- package/components/input-phone-international/input-phone-international.component.d.ts +3 -3
- package/components/input-phone-international/input-phone-international.options.d.ts +1 -3
- package/components/input-pin/input-pin.component.d.ts +1 -1
- package/components/input-range/input-range.component.d.ts +4 -7
- package/components/input-slider/input-slider.directive.d.ts +0 -1
- package/components/input-time/input-time.directive.d.ts +6 -8
- package/components/line-clamp/line-clamp.component.d.ts +8 -10
- package/components/line-clamp/line-clamp.options.d.ts +1 -3
- package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
- package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
- package/components/notification-middle/notification-middle.component.d.ts +2 -2
- package/components/notification-middle/notification-middle.directive.d.ts +4 -3
- package/components/notification-middle/notification-middle.service.d.ts +7 -3
- package/components/pagination/index.d.ts +1 -0
- package/components/pagination/pagination.component.d.ts +3 -2
- package/components/pagination/pagination.options.d.ts +10 -0
- package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
- package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
- package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
- package/components/preview/pagination/preview-pagination.component.d.ts +1 -1
- package/components/preview/preview.component.d.ts +1 -1
- package/components/preview/zoom/preview-zoom.component.d.ts +1 -1
- package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
- package/components/progress/progress.options.d.ts +1 -3
- package/components/push/push-alert.component.d.ts +4 -3
- package/components/push/push.component.d.ts +1 -1
- package/components/push/push.directive.d.ts +4 -6
- package/components/push/push.options.d.ts +4 -8
- package/components/push/push.service.d.ts +6 -2
- package/components/range/range-change.directive.d.ts +1 -2
- package/components/range/range.component.d.ts +16 -24
- package/components/rating/rating.options.d.ts +1 -3
- package/components/select/native-select/native-select.component.d.ts +4 -5
- package/components/slider/helpers/key-steps.d.ts +1 -2
- package/components/slider/helpers/slider-key-steps.directive.d.ts +12 -21
- package/components/slider/slider.options.d.ts +1 -6
- package/components/tabs/tabs-with-more.component.d.ts +1 -1
- package/components/tabs/tabs.options.d.ts +1 -6
- package/components/textarea/textarea-limit.directive.d.ts +4 -5
- package/components/toast/toast.component.d.ts +4 -3
- package/components/toast/toast.options.d.ts +8 -7
- package/components/toast/toast.service.d.ts +10 -9
- package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
- package/components/tree/misc/tree.constants.d.ts +0 -3
- package/components/tree/misc/tree.tokens.d.ts +1 -6
- package/directives/button-close/button-close.directive.d.ts +2 -1
- package/directives/button-select/button-select.directive.d.ts +3 -3
- package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
- package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
- package/fesm2022/taiga-ui-kit-components-accordion.mjs +1 -2
- package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs +20 -36
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-avatar.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +4 -9
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge.mjs +6 -10
- package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs +0 -1
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-block.mjs +4 -8
- package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +6 -12
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-button-loading.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +3 -6
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +4 -5
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-carousel.mjs +3 -9
- package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs +1 -1
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-chip.mjs +6 -10
- package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs +5 -6
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-compass.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-confirm.mjs +3 -5
- package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-copy.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +11 -3
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -1
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-files.mjs +17 -24
- package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-floating-container.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-chip.mjs +0 -2
- package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +3 -8
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +0 -1
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +3 -5
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date.mjs +9 -17
- package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs +2 -3
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +3 -5
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-month.mjs +3 -5
- package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-number.mjs +22 -46
- package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +12 -15
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs +3 -5
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-range.mjs +7 -14
- package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs +9 -15
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-time.mjs +29 -35
- package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-year.mjs +2 -4
- package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +2 -4
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-like.mjs +1 -1
- package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +25 -67
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-message.mjs +0 -1
- package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs +12 -14
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +31 -20
- package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pagination.mjs +20 -10
- package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pin.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +23 -15
- package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-preview.mjs +36 -29
- package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-progress.mjs +41 -33
- package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pulse.mjs +1 -1
- package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-push.mjs +40 -47
- package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio.mjs +3 -4
- package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-range.mjs +36 -80
- package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-rating.mjs +3 -8
- package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +7 -3
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-segmented.mjs +3 -4
- package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-select.mjs +35 -40
- package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slider.mjs +59 -67
- package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slides.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-switch.mjs +1 -1
- package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tabs.mjs +7 -17
- package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-textarea.mjs +7 -16
- package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tiles.mjs +2 -3
- package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-toast.mjs +39 -40
- package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tree.mjs +34 -39
- package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components.mjs +0 -1
- package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs +13 -5
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-select.mjs +14 -13
- package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-connected.mjs +0 -1
- package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +0 -1
- package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +12 -25
- package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs +0 -1
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -1
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-password.mjs +2 -6
- package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-present.mjs +0 -1
- package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +2 -2
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +1 -2
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +0 -1
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-emails.mjs +0 -1
- package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +0 -1
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +0 -1
- package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +2 -2
- package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +0 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +0 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-tokens.mjs +5 -18
- package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
- package/package.json +14 -14
- package/styles/components/badge.less +1 -0
- package/styles/components/chip.less +12 -1
- package/tokens/i18n.d.ts +25 -26
- package/tokens/items-handlers.d.ts +1 -7
- package/tokens/preview-icons.d.ts +1 -3
- package/components/action-bar/action-bar.d.ts +0 -3
- package/components/action-bar/action-bar.directive.d.ts +0 -6
- package/components/pdf-viewer/index.d.ts +0 -4
- package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
- package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
- package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
- package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
- package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +0 -83
- package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Directive } from '@angular/core';
|
|
3
|
-
import
|
|
3
|
+
import * as i1 from '@taiga-ui/core/components/button';
|
|
4
|
+
import { tuiButtonOptionsProvider, TuiButton } from '@taiga-ui/core/components/button';
|
|
4
5
|
import { TUI_ICON_START, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
5
6
|
|
|
6
7
|
class TuiButtonClose {
|
|
7
8
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiButtonClose, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
8
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiButtonClose, isStandalone: true, selector: "[
|
|
9
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiButtonClose, isStandalone: true, selector: "[tuiButtonClose]", host: { attributes: { "tuiIconButton": "" }, properties: { "style.--t-radius.%": "100", "attr.type": "\"button\"" } }, providers: [
|
|
9
10
|
tuiButtonOptionsProvider({ appearance: 'neutral', size: 's' }),
|
|
10
11
|
{
|
|
11
12
|
provide: TUI_ICON_START,
|
|
12
13
|
useFactory: () => inject(TUI_COMMON_ICONS).close,
|
|
13
14
|
},
|
|
14
|
-
], ngImport: i0 }); }
|
|
15
|
+
], hostDirectives: [{ directive: i1.TuiButton, inputs: ["size", "size"] }], ngImport: i0 }); }
|
|
15
16
|
}
|
|
16
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiButtonClose, decorators: [{
|
|
17
18
|
type: Directive,
|
|
18
19
|
args: [{
|
|
19
|
-
|
|
20
|
-
selector: '[tuiIconButton][tuiButtonClose]',
|
|
20
|
+
selector: '[tuiButtonClose]',
|
|
21
21
|
providers: [
|
|
22
22
|
tuiButtonOptionsProvider({ appearance: 'neutral', size: 's' }),
|
|
23
23
|
{
|
|
@@ -25,8 +25,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
25
25
|
useFactory: () => inject(TUI_COMMON_ICONS).close,
|
|
26
26
|
},
|
|
27
27
|
],
|
|
28
|
+
hostDirectives: [
|
|
29
|
+
{
|
|
30
|
+
directive: TuiButton,
|
|
31
|
+
inputs: ['size'],
|
|
32
|
+
},
|
|
33
|
+
],
|
|
28
34
|
host: {
|
|
35
|
+
tuiIconButton: '',
|
|
29
36
|
'[style.--t-radius.%]': '100',
|
|
37
|
+
'[attr.type]': '"button"',
|
|
30
38
|
},
|
|
31
39
|
}]
|
|
32
40
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-button-close.mjs","sources":["../../../projects/kit/directives/button-close/button-close.directive.ts","../../../projects/kit/directives/button-close/taiga-ui-kit-directives-button-close.ts"],"sourcesContent":["import {Directive, inject} from '@angular/core';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TUI_COMMON_ICONS, TUI_ICON_START} from '@taiga-ui/core/tokens';\n\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-button-close.mjs","sources":["../../../projects/kit/directives/button-close/button-close.directive.ts","../../../projects/kit/directives/button-close/taiga-ui-kit-directives-button-close.ts"],"sourcesContent":["import {Directive, inject} from '@angular/core';\nimport {TuiButton, tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TUI_COMMON_ICONS, TUI_ICON_START} from '@taiga-ui/core/tokens';\n\n@Directive({\n selector: '[tuiButtonClose]',\n providers: [\n tuiButtonOptionsProvider({appearance: 'neutral', size: 's'}),\n {\n provide: TUI_ICON_START,\n useFactory: () => inject(TUI_COMMON_ICONS).close,\n },\n ],\n hostDirectives: [\n {\n directive: TuiButton,\n inputs: ['size'],\n },\n ],\n host: {\n tuiIconButton: '',\n '[style.--t-radius.%]': '100',\n '[attr.type]': '\"button\"',\n },\n})\nexport class TuiButtonClose {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAyBa,cAAc,CAAA;+GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA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EAAE;AACjB,wBAAA,sBAAsB,EAAE,KAAK;AAC7B,wBAAA,aAAa,EAAE,UAAU;AAC5B,qBAAA;AACJ,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-button-group.mjs","sources":["../../../projects/kit/directives/button-group/button-group.directive.ts","../../../projects/kit/directives/button-group/taiga-ui-kit-directives-button-group.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-button-group.mjs","sources":["../../../projects/kit/directives/button-group/button-group.directive.ts","../../../projects/kit/directives/button-group/taiga-ui-kit-directives-button-group.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n styleUrl: './button-group.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-button-group'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiButtonGroup]',\n})\nexport class TuiButtonGroup {\n protected readonly nothing = tuiWithStyles(Styles);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAQA,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,sHANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,g3DAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPX,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA,EAAC,KAAK,EAAE,kBAAkB,EAAC,EAAA,MAAA,EAAA,CAAA,g3DAAA,CAAA,EAAA;;MAOxB,cAAc,CAAA;AAH3B,IAAA,WAAA,GAAA;AAIuB,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;AACrD;+GAFY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC/B,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive } from '@angular/core';
|
|
2
|
+
import { inject, Directive } from '@angular/core';
|
|
3
3
|
import { TuiControl } from '@taiga-ui/cdk/classes';
|
|
4
4
|
import * as i2 from '@taiga-ui/cdk/directives/native-validator';
|
|
5
5
|
import { TuiNativeValidator } from '@taiga-ui/cdk/directives/native-validator';
|
|
6
|
+
import { tuiArrayToggle } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
6
7
|
import { tuiAsOptionContent, tuiAsDataListHost } from '@taiga-ui/core/components/data-list';
|
|
7
|
-
import * as i3 from '@taiga-ui/core/components/textfield';
|
|
8
|
-
import { TuiWithTextfieldDropdown } from '@taiga-ui/core/components/textfield';
|
|
9
8
|
import * as i1 from '@taiga-ui/core/directives/dropdown';
|
|
10
9
|
import { tuiDropdownOpen, tuiDropdownOptionsProvider, TuiDropdownDirective, TuiWithDropdownOpen } from '@taiga-ui/core/directives/dropdown';
|
|
10
|
+
import { TUI_ITEMS_HANDLERS } from '@taiga-ui/core/directives/items-handlers';
|
|
11
11
|
import { TuiSelectOption } from '@taiga-ui/kit/components/select';
|
|
12
12
|
|
|
13
13
|
class TuiButtonSelect extends TuiControl {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.open = tuiDropdownOpen();
|
|
17
|
+
this.handlers = inject(TUI_ITEMS_HANDLERS);
|
|
17
18
|
this.size = 's';
|
|
18
19
|
}
|
|
19
20
|
handleOption(option) {
|
|
20
|
-
this.
|
|
21
|
-
|
|
21
|
+
if (Array.isArray(this.control.value)) {
|
|
22
|
+
const result = tuiArrayToggle(this.control.value, option, this.handlers.identityMatcher());
|
|
23
|
+
this.onChange(result);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
this.onChange(option);
|
|
27
|
+
this.open.set(false);
|
|
28
|
+
}
|
|
22
29
|
}
|
|
23
30
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiButtonSelect, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
24
31
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiButtonSelect, isStandalone: true, selector: "button[tuiButtonSelect]", providers: [
|
|
25
32
|
tuiAsOptionContent(TuiSelectOption),
|
|
26
33
|
tuiAsDataListHost(TuiButtonSelect),
|
|
27
34
|
tuiDropdownOptionsProvider({ align: 'right' }),
|
|
28
|
-
], usesInheritance: true, hostDirectives: [{ directive: i1.TuiDropdownDirective }, { directive: i2.TuiNativeValidator }, { directive: i1.TuiWithDropdownOpen }
|
|
35
|
+
], usesInheritance: true, hostDirectives: [{ directive: i1.TuiDropdownDirective }, { directive: i2.TuiNativeValidator }, { directive: i1.TuiWithDropdownOpen }], ngImport: i0 }); }
|
|
29
36
|
}
|
|
30
37
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiButtonSelect, decorators: [{
|
|
31
38
|
type: Directive,
|
|
32
39
|
args: [{
|
|
33
|
-
standalone: true,
|
|
34
40
|
selector: 'button[tuiButtonSelect]',
|
|
35
41
|
providers: [
|
|
36
42
|
tuiAsOptionContent(TuiSelectOption),
|
|
37
43
|
tuiAsDataListHost(TuiButtonSelect),
|
|
38
44
|
tuiDropdownOptionsProvider({ align: 'right' }),
|
|
39
45
|
],
|
|
40
|
-
hostDirectives: [
|
|
41
|
-
TuiDropdownDirective,
|
|
42
|
-
TuiNativeValidator,
|
|
43
|
-
TuiWithDropdownOpen,
|
|
44
|
-
TuiWithTextfieldDropdown,
|
|
45
|
-
],
|
|
46
|
+
hostDirectives: [TuiDropdownDirective, TuiNativeValidator, TuiWithDropdownOpen],
|
|
46
47
|
}]
|
|
47
48
|
}] });
|
|
48
49
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-button-select.mjs","sources":["../../../projects/kit/directives/button-select/button-select.directive.ts","../../../projects/kit/directives/button-select/taiga-ui-kit-directives-button-select.ts"],"sourcesContent":["import {Directive} from '@angular/core';\nimport {TuiControl} from '@taiga-ui/cdk/classes';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {\n tuiAsDataListHost,\n tuiAsOptionContent,\n type TuiDataListHost,\n} from '@taiga-ui/core/components/data-list';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-button-select.mjs","sources":["../../../projects/kit/directives/button-select/button-select.directive.ts","../../../projects/kit/directives/button-select/taiga-ui-kit-directives-button-select.ts"],"sourcesContent":["import {Directive, inject} from '@angular/core';\nimport {TuiControl} from '@taiga-ui/cdk/classes';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiArrayToggle} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAsDataListHost,\n tuiAsOptionContent,\n type TuiDataListHost,\n} from '@taiga-ui/core/components/data-list';\nimport {\n TuiDropdownDirective,\n tuiDropdownOpen,\n tuiDropdownOptionsProvider,\n TuiWithDropdownOpen,\n} from '@taiga-ui/core/directives/dropdown';\nimport {TUI_ITEMS_HANDLERS} from '@taiga-ui/core/directives/items-handlers';\nimport {TuiSelectOption} from '@taiga-ui/kit/components/select';\n\n@Directive({\n selector: 'button[tuiButtonSelect]',\n providers: [\n tuiAsOptionContent(TuiSelectOption),\n tuiAsDataListHost(TuiButtonSelect),\n tuiDropdownOptionsProvider({align: 'right'}),\n ],\n hostDirectives: [TuiDropdownDirective, TuiNativeValidator, TuiWithDropdownOpen],\n})\nexport class TuiButtonSelect<T>\n extends TuiControl<T | T[]>\n implements TuiDataListHost<T>\n{\n private readonly open = tuiDropdownOpen();\n private readonly handlers = inject(TUI_ITEMS_HANDLERS);\n\n public readonly size = 's';\n\n public handleOption(option: T): void {\n if (Array.isArray(this.control.value)) {\n const result = tuiArrayToggle(\n this.control.value as T[],\n option,\n this.handlers.identityMatcher(),\n );\n\n this.onChange(result);\n } else {\n this.onChange(option);\n this.open.set(false);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA2BM,MAAO,eACT,SAAQ,UAAmB,CAAA;AAV/B,IAAA,WAAA,GAAA;;QAaqB,IAAI,CAAA,IAAA,GAAG,eAAe,EAAE;AACxB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAA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AAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,SAAS,EAAE;wBACP,kBAAkB,CAAC,eAAe,CAAC;AACnC,wBAAA,iBAAiB,CAAiB,eAAA,CAAA;AAClC,wBAAA,0BAA0B,CAAC,EAAC,KAAK,EAAE,OAAO,EAAC,CAAC;AAC/C,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;AAClF,iBAAA;;;AC1BD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-chevron.mjs","sources":["../../../projects/kit/directives/chevron/chevron.directive.ts","../../../projects/kit/directives/chevron/taiga-ui-kit-directives-chevron.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n effect,\n inject,\n InjectionToken,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiProvide, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TUI_ICON_END} from '@taiga-ui/core/tokens';\n\nexport const TUI_CHEVRON = new InjectionToken(ngDevMode ? 'TUI_CHEVRON' : '', {\n factory: () => '@tui.chevron-down',\n});\n\n@Component({\n template: '',\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-chevron.mjs","sources":["../../../projects/kit/directives/chevron/chevron.directive.ts","../../../projects/kit/directives/chevron/taiga-ui-kit-directives-chevron.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n effect,\n inject,\n InjectionToken,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiProvide, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TUI_ICON_END} from '@taiga-ui/core/tokens';\n\nexport const TUI_CHEVRON = new InjectionToken(ngDevMode ? 'TUI_CHEVRON' : '', {\n factory: () => '@tui.chevron-down',\n});\n\n@Component({\n template: '',\n styleUrl: './chevron.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-chevron'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiChevron]',\n providers: [tuiProvide(TUI_ICON_END, TUI_CHEVRON)],\n host: {tuiChevron: ''},\n})\nexport class TuiChevron {\n private readonly el = tuiInjectElement();\n private readonly dropdown = inject(TuiDropdownDirective, {optional: true});\n\n protected readonly nothing = tuiWithStyles(Styles);\n protected readonly toggle = effect(() =>\n this.el.classList.toggle(\n '_chevron-rotated',\n this.rotated() || (this.rotated() === '' && !!this.dropdown?.ref()),\n ),\n );\n\n public readonly rotated = input<boolean | ''>('', {alias: 'tuiChevron'});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAea,MAAA,WAAW,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,aAAa,GAAG,EAAE,EAAE;AAC1E,IAAA,OAAO,EAAE,MAAM,mBAAmB;AACrC,CAAA;AAED,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,iHANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,y5BAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAA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EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,EAAA,EAAA,SAAA,EAHR,CAAC,UAAU,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAGzC,UAAU,EAAA,UAAA,EAAA,CAAA;kBALtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,cAAc;oBACxB,SAAS,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;AAClD,oBAAA,IAAI,EAAE,EAAC,UAAU,EAAE,EAAE,EAAC;AACzB,iBAAA;;;AChCD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-connected.mjs","sources":["../../../projects/kit/directives/connected/connected.directive.ts","../../../projects/kit/directives/connected/taiga-ui-kit-directives-connected.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-connected.mjs","sources":["../../../projects/kit/directives/connected/connected.directive.ts","../../../projects/kit/directives/connected/taiga-ui-kit-directives-connected.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n styleUrl: './connected.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-connected'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiConnected]',\n})\nexport class TuiConnected {\n protected readonly nothing = tuiWithStyles(Styles);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nex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;;"}
|
|
@@ -92,7 +92,6 @@ __decorate([
|
|
|
92
92
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDataListDropdownManager, decorators: [{
|
|
93
93
|
type: Directive,
|
|
94
94
|
args: [{
|
|
95
|
-
standalone: true,
|
|
96
95
|
selector: 'tui-data-list[tuiDataListDropdownManager]',
|
|
97
96
|
}]
|
|
98
97
|
}], propDecorators: { dropdowns: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-data-list-dropdown-manager.mjs","sources":["../../../projects/kit/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.ts","../../../projects/kit/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ContentChildren,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n type QueryList,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {\n tuiPreventDefault,\n tuiQueryListChanges,\n tuiTypedFromEvent,\n} from '@taiga-ui/cdk/observables';\nimport {tuiGetClosestFocusable} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {\n debounceTime,\n EMPTY,\n filter,\n map,\n merge,\n type Observable,\n shareReplay,\n switchMap,\n take,\n tap,\n} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: 'tui-data-list[tuiDataListDropdownManager]',\n})\nexport class TuiDataListDropdownManager implements AfterViewInit {\n @ContentChildren(TuiDropdownDirective, {descendants: true})\n private readonly dropdowns: QueryList<TuiDropdownDirective> = EMPTY_QUERY;\n\n @ContentChildren(TuiDropdownDirective, {read: ElementRef, descendants: true})\n private readonly els: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly destroyRef = inject(DestroyRef);\n\n public ngAfterViewInit(): void {\n this.right$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((index) => {\n this.tryToFocus(index);\n });\n\n merge(this.immediate$, this.debounce$)\n .pipe(\n switchMap((active) => {\n this.dropdowns.forEach((dropdown, index) => {\n dropdown.toggle(index === active);\n });\n\n const element = this.els.get(active);\n const dropdown = this.dropdowns.get(active);\n const ref = dropdown?.ref();\n\n if (!element || !dropdown || !ref) {\n return EMPTY;\n }\n\n const {nativeElement} = ref.location;\n const mouseEnter$ = tuiTypedFromEvent(\n nativeElement,\n 'mouseenter',\n ).pipe(take(1));\n const esc$ = merge(\n tuiTypedFromEvent(element.nativeElement, 'keydown'),\n tuiTypedFromEvent(nativeElement, 'keydown'),\n ).pipe(filter(({key}) => key === 'Escape'));\n\n return merge(mouseEnter$, esc$).pipe(\n tap((event) => {\n if (dropdown.ref()) {\n event.stopPropagation();\n }\n\n element.nativeElement.focus();\n dropdown.toggle('offsetX' in event);\n }),\n );\n }),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n @tuiPure\n private get elements$(): Observable<readonly HTMLElement[]> {\n return tuiQueryListChanges(this.els).pipe(\n map((array) => array.map(({nativeElement}) => nativeElement)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n @tuiPure\n private get right$(): Observable<number> {\n return this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n tuiTypedFromEvent(element, 'keydown').pipe(\n filter(({key}) => key === 'ArrowRight'),\n tuiPreventDefault(),\n map(() => index),\n ),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get immediate$(): Observable<number> {\n return this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n tuiTypedFromEvent(element, 'click').pipe(map(() => index)),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get debounce$(): Observable<number> {\n return this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n merge(\n tuiTypedFromEvent(element, 'focus'),\n tuiTypedFromEvent(element, 'blur'),\n ).pipe(\n filter(({relatedTarget}) =>\n this.notInDropdown(relatedTarget, index),\n ),\n map(({type}) => (type === 'focus' ? index : NaN)),\n ),\n ),\n ),\n ),\n debounceTime(300),\n );\n }\n\n private notInDropdown(element: EventTarget | null, index: number): boolean {\n return !this.dropdowns\n .get(index)\n ?.ref()\n ?.location.nativeElement.contains(element);\n }\n\n private tryToFocus(index: number): void {\n const content = this.dropdowns.get(index)?.ref()?.location.nativeElement;\n\n if (!content) {\n return;\n }\n\n // First item is focus trap\n const focusTrap = tuiGetClosestFocusable({initial: content, root: content});\n const item = tuiGetClosestFocusable({\n initial: focusTrap || content,\n root: content,\n });\n\n item?.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAoCa,0BAA0B,CAAA;AAJvC,IAAA,WAAA,GAAA;QAMqB,IAAS,CAAA,SAAA,GAAoC,WAAW;QAGxD,IAAG,CAAA,GAAA,GAAuC,WAAW;AAErD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAmInD;IAjIU,eAAe,GAAA;AAClB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;AACtE,YAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;AAC1B,SAAC,CAAC;QAEF,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS;AAChC,aAAA,IAAI,CACD,SAAS,CAAC,CAAC,MAAM,KAAI;YACjB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,KAAK,KAAI;AACvC,gBAAA,QAAQ,CAAC,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC;AACrC,aAAC,CAA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,EAAA,YAAA,EAAA,KAAA,EAAA,SAAA,EAAA,oBAAoB,2BAAS,UAAU,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;AAoDxD,UAAA,CAAA;IADC;AAMA,CAAA,EAAA,0BAAA,CAAA,SAAA,EAAA,WAAA,EAAA,IAAA,CAAA;AAGD,UAAA,CAAA;IADC;AAeA,CAAA,EAAA,0BAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;AAGD,UAAA,CAAA;IADC;AAWA,CAAA,EAAA,0BAAA,CAAA,SAAA,EAAA,YAAA,EAAA,IAAA,CAAA;AAGD,UAAA,CAAA;IADC;AAoBA,CAAA,EAAA,0BAAA,CAAA,SAAA,EAAA,WAAA,EAAA,IAAA,CAAA;4FAjHQ,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAJtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,2CAA2C;AACxD,iBAAA;8BAGoB,SAAS,EAAA,CAAA;sBADzB,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,oBAAoB,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC;gBAIzC,GAAG,EAAA,CAAA;sBADnB,eAAe;uBAAC,oBAAoB,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAC;AAoDhE,aAAA,CAAA,EAAA,SAAS,EAQT,EAAA,EAAA,MAAM,EAiBN,EAAA,EAAA,UAAU,MAaV,SAAS,EAAA,EAAA,EAAA,EAAA,CAAA;;AClIzB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-data-list-dropdown-manager.mjs","sources":["../../../projects/kit/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.ts","../../../projects/kit/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ContentChildren,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n type QueryList,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {\n tuiPreventDefault,\n tuiQueryListChanges,\n tuiTypedFromEvent,\n} from '@taiga-ui/cdk/observables';\nimport {tuiGetClosestFocusable} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {\n debounceTime,\n EMPTY,\n filter,\n map,\n merge,\n type Observable,\n shareReplay,\n switchMap,\n take,\n tap,\n} from 'rxjs';\n\n@Directive({\n selector: 'tui-data-list[tuiDataListDropdownManager]',\n})\nexport class TuiDataListDropdownManager implements AfterViewInit {\n @ContentChildren(TuiDropdownDirective, {descendants: true})\n private readonly dropdowns: QueryList<TuiDropdownDirective> = EMPTY_QUERY;\n\n @ContentChildren(TuiDropdownDirective, {read: ElementRef, descendants: true})\n private readonly els: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly destroyRef = inject(DestroyRef);\n\n public ngAfterViewInit(): void {\n this.right$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((index) => {\n this.tryToFocus(index);\n });\n\n merge(this.immediate$, this.debounce$)\n .pipe(\n switchMap((active) => {\n this.dropdowns.forEach((dropdown, index) => {\n dropdown.toggle(index === active);\n });\n\n const element = this.els.get(active);\n const dropdown = this.dropdowns.get(active);\n const ref = dropdown?.ref();\n\n if (!element || !dropdown || !ref) {\n return EMPTY;\n }\n\n const {nativeElement} = ref.location;\n const mouseEnter$ = tuiTypedFromEvent(\n nativeElement,\n 'mouseenter',\n ).pipe(take(1));\n const esc$ = merge(\n tuiTypedFromEvent(element.nativeElement, 'keydown'),\n tuiTypedFromEvent(nativeElement, 'keydown'),\n ).pipe(filter(({key}) => key === 'Escape'));\n\n return merge(mouseEnter$, esc$).pipe(\n tap((event) => {\n if (dropdown.ref()) {\n event.stopPropagation();\n }\n\n element.nativeElement.focus();\n dropdown.toggle('offsetX' in event);\n }),\n );\n }),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n @tuiPure\n private get elements$(): Observable<readonly HTMLElement[]> {\n return tuiQueryListChanges(this.els).pipe(\n map((array) => array.map(({nativeElement}) => nativeElement)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n @tuiPure\n private get right$(): Observable<number> {\n return this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n tuiTypedFromEvent(element, 'keydown').pipe(\n filter(({key}) => key === 'ArrowRight'),\n tuiPreventDefault(),\n map(() => index),\n ),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get immediate$(): Observable<number> {\n return this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n tuiTypedFromEvent(element, 'click').pipe(map(() => index)),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get debounce$(): Observable<number> {\n return this.elements$.pipe(\n switchMap((elements) =>\n merge(\n ...elements.map((element, index) =>\n merge(\n tuiTypedFromEvent(element, 'focus'),\n tuiTypedFromEvent(element, 'blur'),\n ).pipe(\n filter(({relatedTarget}) =>\n this.notInDropdown(relatedTarget, index),\n ),\n map(({type}) => (type === 'focus' ? index : NaN)),\n ),\n ),\n ),\n ),\n debounceTime(300),\n );\n }\n\n private notInDropdown(element: EventTarget | null, index: number): boolean {\n return !this.dropdowns\n .get(index)\n ?.ref()\n ?.location.nativeElement.contains(element);\n }\n\n private tryToFocus(index: number): void {\n const content = this.dropdowns.get(index)?.ref()?.location.nativeElement;\n\n if (!content) {\n return;\n }\n\n // First item is focus trap\n const focusTrap = tuiGetClosestFocusable({initial: content, root: content});\n const item = tuiGetClosestFocusable({\n initial: focusTrap || content,\n root: content,\n });\n\n item?.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from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kBAHtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,2CAA2C;AACxD,iBAAA;8BAGoB,SAAS,EAAA,CAAA;sBADzB,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,oBAAoB,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC;gBAIzC,GAAG,EAAA,CAAA;sBADnB,eAAe;uBAAC,oBAAoB,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAC;AAoDhE,aAAA,CAAA,EAAA,SAAS,EAQT,EAAA,EAAA,MAAM,EAiBN,EAAA,EAAA,UAAU,MAaV,SAAS,EAAA,EAAA,EAAA,EAAA,CAAA;;ACjIzB;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-fade.mjs","sources":["../../../projects/kit/directives/fade/fade.directive.ts","../../../projects/kit/directives/fade/taiga-ui-kit-directives-fade.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {\n MutationObserverService,\n WA_MUTATION_OBSERVER_INIT,\n} from '@ng-web-apis/mutation-observer';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {TuiTransitioned} from '@taiga-ui/cdk/directives/transitioned';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiOrientation} from '@taiga-ui/core/types';\nimport {filter, fromEvent, merge} from 'rxjs';\n\nconst BUFFER = 1; // buffer for rounding issues\n\n@Component({\n template: '',\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-fade.mjs","sources":["../../../projects/kit/directives/fade/fade.directive.ts","../../../projects/kit/directives/fade/taiga-ui-kit-directives-fade.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {\n MutationObserverService,\n WA_MUTATION_OBSERVER_INIT,\n} from '@ng-web-apis/mutation-observer';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {TuiTransitioned} from '@taiga-ui/cdk/directives/transitioned';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiOrientation} from '@taiga-ui/core/types';\nimport {filter, fromEvent, merge} from 'rxjs';\n\nconst BUFFER = 1; // buffer for rounding issues\n\n@Component({\n template: '',\n styleUrl: './fade.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-fade'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiFade]',\n providers: [\n ResizeObserverService,\n MutationObserverService,\n {\n provide: WA_MUTATION_OBSERVER_INIT,\n useValue: {characterData: true, subtree: true},\n },\n ],\n hostDirectives: [TuiTransitioned],\n host: {\n '[style.line-height]': 'lineHeight',\n '[style.--t-line-height]': 'lineHeight',\n '[style.--t-fade-size]': 'size',\n '[style.--t-fade-offset]': 'offset',\n '[attr.data-orientation]': 'orientation',\n },\n})\nexport class TuiFade {\n protected readonly nothing = tuiWithStyles(Styles);\n\n // TODO: Remove when lh CSS units are supported: https://caniuse.com/mdn-css_types_length_lh\n @Input('tuiFadeHeight')\n public lineHeight: string | null = null;\n\n @Input('tuiFadeSize')\n public size = '1.5em';\n\n @Input('tuiFadeOffset')\n public offset = '0em';\n\n @Input('tuiFade')\n public orientation: TuiOrientation | '' = 'horizontal';\n\n constructor() {\n const el = tuiInjectElement();\n\n merge(\n inject(ResizeObserverService, {self: true}),\n inject(MutationObserverService, {self: true}),\n fromEvent(el, 'scroll'),\n )\n .pipe(\n filter(() => !!el.scrollWidth),\n tuiZonefree(),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n el.classList.toggle('_end', this.isEnd(el));\n el.classList.toggle(\n '_start',\n !!Math.floor(el.scrollLeft) || !!Math.floor(el.scrollTop),\n );\n });\n }\n\n private isEnd({\n scrollTop,\n scrollLeft,\n scrollHeight,\n scrollWidth,\n clientHeight,\n clientWidth,\n }: HTMLElement): boolean {\n return this.orientation === 'vertical'\n ? Math.round(scrollTop) < scrollHeight - clientHeight - BUFFER\n : Math.ceil(Math.abs(scrollLeft)) < scrollWidth - clientWidth - BUFFER ||\n // horizontal multiline fade can kick in early due to hanging elements of fonts so using bigger buffer\n scrollHeight > clientHeight + 4 * BUFFER;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,MAAM,MAAM,GAAG,CAAC,CAAC;AAEjB,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,8GANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,u3IAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPX,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAA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FAUQ,OAAO,EAAA,UAAA,EAAA,CAAA;kBAnBnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE;wBACP,qBAAqB;wBACrB,uBAAuB;AACvB,wBAAA;AACI,4BAAA,OAAO,EAAE,yBAAyB;4BAClC,QAAQ,EAAE,EAAC,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC;AACjD,yBAAA;AACJ,qBAAA;oBACD,cAAc,EAAE,CAAC,eAAe,CAAC;AACjC,oBAAA,IAAI,EAAE;AACF,wBAAA,qBAAqB,EAAE,YAAY;AACnC,wBAAA,yBAAyB,EAAE,YAAY;AACvC,wBAAA,uBAAuB,EAAE,MAAM;AAC/B,wBAAA,yBAAyB,EAAE,QAAQ;AACnC,wBAAA,yBAAyB,EAAE,aAAa;AAC3C,qBAAA;AACJ,iBAAA;wDAMU,UAAU,EAAA,CAAA;sBADhB,KAAK;uBAAC,eAAe;gBAIf,IAAI,EAAA,CAAA;sBADV,KAAK;uBAAC,aAAa;gBAIb,MAAM,EAAA,CAAA;sBADZ,KAAK;uBAAC,eAAe;gBAIf,WAAW,EAAA,CAAA;sBADjB,KAAK;uBAAC,SAAS;;;AChEpB;;AAEG;;;;"}
|
|
@@ -1,36 +1,30 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
2
|
+
import { inject, input, Directive } from '@angular/core';
|
|
3
|
+
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { MutationObserverService, WA_MUTATION_OBSERVER_INIT } from '@ng-web-apis/mutation-observer';
|
|
5
5
|
import { ResizeObserverService } from '@ng-web-apis/resize-observer';
|
|
6
6
|
import { tuiZonefree } from '@taiga-ui/cdk/observables';
|
|
7
7
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { merge, fromEvent } from 'rxjs';
|
|
9
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
10
10
|
|
|
11
11
|
const TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS = {
|
|
12
12
|
min: 0.625,
|
|
13
13
|
max: 1.25,
|
|
14
14
|
};
|
|
15
|
-
const TUI_FLUID_TYPOGRAPHY_OPTIONS =
|
|
16
|
-
factory: () => TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS,
|
|
17
|
-
});
|
|
18
|
-
function tuiFluidTypographyOptionsProvider(options) {
|
|
19
|
-
return tuiProvideOptions(TUI_FLUID_TYPOGRAPHY_OPTIONS, options, TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS);
|
|
20
|
-
}
|
|
15
|
+
const [TUI_FLUID_TYPOGRAPHY_OPTIONS, tuiFluidTypographyOptionsProvider] = tuiCreateOptions(TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS);
|
|
21
16
|
|
|
22
17
|
const STEP = 1 / 16;
|
|
23
18
|
class TuiFluidTypography {
|
|
24
19
|
constructor() {
|
|
25
|
-
// TODO: refactor to signal inputs after Angular update
|
|
26
|
-
this.changes$ = new Subject();
|
|
27
20
|
this.el = tuiInjectElement();
|
|
28
21
|
this.options = inject(TUI_FLUID_TYPOGRAPHY_OPTIONS);
|
|
29
|
-
this.
|
|
22
|
+
this.tuiFluidTypography = input('');
|
|
23
|
+
this.sub = merge(toObservable(this.tuiFluidTypography), inject(ResizeObserverService, { self: true }), inject(MutationObserverService, { self: true }), fromEvent(this.el, 'input'))
|
|
30
24
|
.pipe(tuiZonefree(), takeUntilDestroyed())
|
|
31
25
|
.subscribe(() => {
|
|
32
|
-
const min = Number(this.tuiFluidTypography[0] || this.options.min);
|
|
33
|
-
const max = Number(this.tuiFluidTypography[1] || this.options.max);
|
|
26
|
+
const min = Number(this.tuiFluidTypography()[0] || this.options.min);
|
|
27
|
+
const max = Number(this.tuiFluidTypography()[1] || this.options.max);
|
|
34
28
|
for (let i = max; i >= min; i -= STEP) {
|
|
35
29
|
this.el.style.fontSize = `${i}rem`;
|
|
36
30
|
if (this.el.scrollWidth <= this.el.clientWidth) {
|
|
@@ -38,25 +32,20 @@ class TuiFluidTypography {
|
|
|
38
32
|
}
|
|
39
33
|
}
|
|
40
34
|
});
|
|
41
|
-
this.tuiFluidTypography = '';
|
|
42
|
-
}
|
|
43
|
-
ngOnChanges() {
|
|
44
|
-
this.changes$.next();
|
|
45
35
|
}
|
|
46
36
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFluidTypography, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
47
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
37
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiFluidTypography, isStandalone: true, selector: "[tuiFluidTypography]", inputs: { tuiFluidTypography: { classPropertyName: "tuiFluidTypography", publicName: "tuiFluidTypography", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiFluidTypography": "" } }, providers: [
|
|
48
38
|
ResizeObserverService,
|
|
49
39
|
MutationObserverService,
|
|
50
40
|
{
|
|
51
41
|
provide: WA_MUTATION_OBSERVER_INIT,
|
|
52
42
|
useValue: { characterData: true, subtree: true },
|
|
53
43
|
},
|
|
54
|
-
],
|
|
44
|
+
], ngImport: i0 }); }
|
|
55
45
|
}
|
|
56
46
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFluidTypography, decorators: [{
|
|
57
47
|
type: Directive,
|
|
58
48
|
args: [{
|
|
59
|
-
standalone: true,
|
|
60
49
|
selector: '[tuiFluidTypography]',
|
|
61
50
|
providers: [
|
|
62
51
|
ResizeObserverService,
|
|
@@ -68,9 +57,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
68
57
|
],
|
|
69
58
|
host: { tuiFluidTypography: '' },
|
|
70
59
|
}]
|
|
71
|
-
}]
|
|
72
|
-
type: Input
|
|
73
|
-
}] } });
|
|
60
|
+
}] });
|
|
74
61
|
|
|
75
62
|
/**
|
|
76
63
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-fluid-typography.mjs","sources":["../../../projects/kit/directives/fluid-typography/fluid-typography.options.ts","../../../projects/kit/directives/fluid-typography/fluid-typography.directive.ts","../../../projects/kit/directives/fluid-typography/taiga-ui-kit-directives-fluid-typography.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-fluid-typography.mjs","sources":["../../../projects/kit/directives/fluid-typography/fluid-typography.options.ts","../../../projects/kit/directives/fluid-typography/fluid-typography.directive.ts","../../../projects/kit/directives/fluid-typography/taiga-ui-kit-directives-fluid-typography.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiFluidTypographyOptions {\n readonly min: number;\n readonly max: number;\n}\n\nexport const TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS: TuiFluidTypographyOptions = {\n min: 0.625,\n max: 1.25,\n};\n\nexport const [TUI_FLUID_TYPOGRAPHY_OPTIONS, tuiFluidTypographyOptionsProvider] =\n tuiCreateOptions(TUI_FLUID_TYPOGRAPHY_DEFAULT_OPTIONS);\n","import {Directive, inject, input} from '@angular/core';\nimport {takeUntilDestroyed, toObservable} from '@angular/core/rxjs-interop';\nimport {\n MutationObserverService,\n WA_MUTATION_OBSERVER_INIT,\n} from '@ng-web-apis/mutation-observer';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {fromEvent, merge} from 'rxjs';\n\nimport {TUI_FLUID_TYPOGRAPHY_OPTIONS} from './fluid-typography.options';\n\nconst STEP = 1 / 16;\n\n@Directive({\n selector: '[tuiFluidTypography]',\n providers: [\n ResizeObserverService,\n MutationObserverService,\n {\n provide: WA_MUTATION_OBSERVER_INIT,\n useValue: {characterData: true, subtree: true},\n },\n ],\n host: {tuiFluidTypography: ''},\n})\nexport class TuiFluidTypography {\n private readonly el = tuiInjectElement();\n private readonly options = inject(TUI_FLUID_TYPOGRAPHY_OPTIONS);\n\n public readonly tuiFluidTypography = input<readonly [min: number, max: number] | ''>(\n '',\n );\n\n protected readonly sub = merge(\n toObservable(this.tuiFluidTypography),\n inject(ResizeObserverService, {self: true}),\n inject(MutationObserverService, {self: true}),\n fromEvent(this.el, 'input'),\n )\n .pipe(tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => {\n const min = Number(this.tuiFluidTypography()[0] || this.options.min);\n const max = Number(this.tuiFluidTypography()[1] || this.options.max);\n\n for (let i = max; i >= min; i -= STEP) {\n this.el.style.fontSize = `${i}rem`;\n\n if (this.el.scrollWidth <= this.el.clientWidth) {\n break;\n }\n }\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAOa,MAAA,oCAAoC,GAA8B;AAC3E,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,GAAG,EAAE,IAAI;;AAGN,MAAM,CAAC,4BAA4B,EAAE,iCAAiC,CAAC,GAC1E,gBAAgB,CAAC,oCAAoC;;ACAzD,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE;MAcN,kBAAkB,CAAA;AAZ/B,IAAA,WAAA,GAAA;QAaqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAE/C,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK,CACtC,EAAE,CACL;AAE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AA,EAAA,MAAA,EAAA,EAAA,kBAAA,EAAA,EAAA,iBAAA,EAAA,oBAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,SAAA,EAAA;YACP,qBAAqB;YACrB,uBAAuB;AACvB,YAAA;AACI,gBAAA,OAAO,EAAE,yBAAyB;gBAClC,QAAQ,EAAE,EAAC,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC;AACjD,aAAA;AACJ,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAGQ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAZ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,SAAS,EAAE;wBACP,qBAAqB;wBACrB,uBAAuB;AACvB,wBAAA;AACI,4BAAA,OAAO,EAAE,yBAAyB;4BAClC,QAAQ,EAAE,EAAC,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC;AACjD,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE,EAAC,kBAAkB,EAAE,EAAE,EAAC;AACjC,iBAAA;;;AC1BD;;AAEG;;;;"}
|
|
@@ -76,7 +76,6 @@ class TuiHighlight {
|
|
|
76
76
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHighlight, decorators: [{
|
|
77
77
|
type: Directive,
|
|
78
78
|
args: [{
|
|
79
|
-
standalone: true,
|
|
80
79
|
selector: '[tuiHighlight]',
|
|
81
80
|
providers: [ResizeObserverService],
|
|
82
81
|
host: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-highlight.mjs","sources":["../../../projects/kit/directives/highlight/highlight.directive.ts","../../../projects/kit/directives/highlight/taiga-ui-kit-directives-highlight.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, Input, type OnChanges, Renderer2} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {svgNodeFilter} from '@taiga-ui/cdk/constants';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const [TUI_HIGHLIGHT_OPTIONS, tuiHighlightOptionsProvider] = tuiCreateOptions({\n highlightColor: 'var(--tui-service-selection-background)',\n});\n\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-highlight.mjs","sources":["../../../projects/kit/directives/highlight/highlight.directive.ts","../../../projects/kit/directives/highlight/taiga-ui-kit-directives-highlight.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, Input, type OnChanges, Renderer2} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {svgNodeFilter} from '@taiga-ui/cdk/constants';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const [TUI_HIGHLIGHT_OPTIONS, tuiHighlightOptionsProvider] = tuiCreateOptions({\n highlightColor: 'var(--tui-service-selection-background)',\n});\n\n@Directive({\n selector: '[tuiHighlight]',\n providers: [ResizeObserverService],\n host: {\n '[style.position]': '\"relative\"',\n '[style.zIndex]': '0',\n },\n})\nexport class TuiHighlight implements OnChanges {\n private readonly el = tuiInjectElement();\n private readonly renderer = inject(Renderer2);\n private readonly doc = inject(DOCUMENT);\n\n private readonly highlight: HTMLElement = this.setUpHighlight();\n private readonly treeWalker = this.doc.createTreeWalker(\n this.el,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n @Input()\n public tuiHighlight = '';\n\n @Input()\n public tuiHighlightColor = inject(TUI_HIGHLIGHT_OPTIONS).highlightColor;\n\n constructor() {\n inject(ResizeObserverService, {self: true})\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.updateStyles());\n }\n\n public ngOnChanges(): void {\n this.updateStyles();\n }\n\n protected get match(): boolean {\n return this.indexOf(this.el.textContent) !== -1;\n }\n\n private updateStyles(): void {\n this.highlight.style.display = 'none';\n\n if (!this.match) {\n return;\n }\n\n this.treeWalker.currentNode = this.el;\n\n do {\n const index = this.indexOf(this.treeWalker.currentNode.nodeValue);\n\n if (index === -1) {\n continue;\n }\n\n const range = this.doc.createRange();\n\n range.setStart(this.treeWalker.currentNode, index);\n range.setEnd(this.treeWalker.currentNode, index + this.tuiHighlight.length);\n\n const hostRect = this.el.getBoundingClientRect();\n const {left, top, width, height} = range.getBoundingClientRect();\n const {style} = this.highlight;\n\n style.background = this.tuiHighlightColor;\n style.left = tuiPx(left - hostRect.left);\n style.top = tuiPx(top - hostRect.top);\n style.width = tuiPx(width);\n style.height = tuiPx(height);\n style.display = 'block';\n\n return;\n } while (this.treeWalker.nextNode());\n }\n\n private indexOf(source: string | null): number {\n return !source || !this.tuiHighlight\n ? -1\n : source.toLowerCase().indexOf(this.tuiHighlight.toLowerCase());\n }\n\n private setUpHighlight(): HTMLElement {\n const highlight = this.renderer.createElement('div');\n const {style} = highlight;\n\n style.background = this.tuiHighlightColor;\n style.zIndex = '-1';\n style.position = 'absolute';\n this.renderer.appendChild(this.el, highlight);\n\n return highlight;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MASa,CAAC,qBAAqB,EAAE,2BAA2B,CAAC,GAAG,gBAAgB,CAAC;A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ion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiImgLazyLoading, decorators: [{
|
|
57
57
|
type: Directive,
|
|
58
58
|
args: [{
|
|
59
|
-
standalone: true,
|
|
60
59
|
selector: 'img[loading="lazy"],img[tuiLoading="lazy"]',
|
|
61
60
|
providers: [TuiLazyLoadingService, IntersectionObserverService],
|
|
62
61
|
host: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-lazy-loading.mjs","sources":["../../../projects/kit/directives/lazy-loading/lazy-loading.service.ts","../../../projects/kit/directives/lazy-loading/lazy-loading.directive.ts","../../../projects/kit/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\nimport {type SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {filter, map, Observable, Subject, switchMap, take} from 'rxjs';\n\n@Injectable()\nexport class TuiLazyLoadingService extends Observable<SafeResourceUrl | string> {\n private readonly src$ = new Subject<SafeResourceUrl | string>();\n private readonly intersections$ = inject(IntersectionObserverService);\n private readonly stream$ = this.src$.pipe(\n switchMap((src) =>\n this.intersections$.pipe(\n filter((entry) => !!entry[0]?.isIntersecting),\n map(() => src),\n take(1),\n ),\n ),\n tuiWatch(),\n );\n\n constructor() {\n super((subscriber) => this.stream$.subscribe(subscriber));\n }\n\n public next(src: SafeResourceUrl | string): void {\n this.src$.next(src);\n }\n}\n","import {isPlatformServer} from '@angular/common';\nimport {Directive, inject, Input, PLATFORM_ID, signal} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {type SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TuiLazyLoadingService} from './lazy-loading.service';\n\n/**\n * @deprecated: Drop in v5.0\n */\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-lazy-loading.mjs","sources":["../../../projects/kit/directives/lazy-loading/lazy-loading.service.ts","../../../projects/kit/directives/lazy-loading/lazy-loading.directive.ts","../../../projects/kit/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\nimport {type SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {filter, map, Observable, Subject, switchMap, take} from 'rxjs';\n\n@Injectable()\nexport class TuiLazyLoadingService extends Observable<SafeResourceUrl | string> {\n private readonly src$ = new Subject<SafeResourceUrl | string>();\n private readonly intersections$ = inject(IntersectionObserverService);\n private readonly stream$ = this.src$.pipe(\n switchMap((src) =>\n this.intersections$.pipe(\n filter((entry) => !!entry[0]?.isIntersecting),\n map(() => src),\n take(1),\n ),\n ),\n tuiWatch(),\n );\n\n constructor() {\n super((subscriber) => this.stream$.subscribe(subscriber));\n }\n\n public next(src: SafeResourceUrl | string): void {\n this.src$.next(src);\n }\n}\n","import {isPlatformServer} from '@angular/common';\nimport {Directive, inject, Input, PLATFORM_ID, signal} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {type SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TuiLazyLoadingService} from './lazy-loading.service';\n\n/**\n * @deprecated: Drop in v5.0\n */\n@Directive({\n selector: 'img[loading=\"lazy\"],img[tuiLoading=\"lazy\"]',\n providers: [TuiLazyLoadingService, IntersectionObserverService],\n host: {\n '[style.animation]': 'animation()',\n '[style.background]': 'background()',\n '[attr.loading]': 'supported ? \"lazy\" : null',\n '[attr.src]': 'src()',\n '(load)': 'unset()',\n '(error)': 'unset()',\n },\n})\nexport class TuiImgLazyLoading {\n private readonly isServer = isPlatformServer(inject(PLATFORM_ID));\n private readonly loading$ = inject(TuiLazyLoadingService);\n protected readonly supported = 'loading' in tuiInjectElement<HTMLImageElement>();\n protected src = signal<SafeResourceUrl | string | null>(null);\n protected background = signal(this.isServer ? '' : 'var(--tui-background-neutral-2)');\n protected animation = signal(\n this.isServer ? '' : 'tuiSkeletonVibe ease-in-out 1s infinite alternate',\n );\n\n protected readonly $ =\n !this.supported &&\n this.loading$.pipe(takeUntilDestroyed()).subscribe((src) => this.src.set(src));\n\n @Input('src')\n public set srcSetter(src: SafeResourceUrl | string) {\n if (this.supported) {\n this.src.set(src);\n } else {\n this.loading$.next(src);\n }\n }\n\n protected unset(): void {\n this.background.set('');\n this.animation.set('');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAOM,MAAO,qBAAsB,SAAQ,UAAoC,CAAA;AAc3E,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;AAd5C,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,OAAO,EAA4B;AAC9C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,2BAA2B,CAAC;QACpD,IAAO,CAAA,OAAA,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CACrC,SAAS,CAAC,CAAC,GAAG,KACV,IAAI,CAAC,cAAc,CAAC,IAAI,CACpB,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,EAC7C,GAAG,CAAC,MAAM,GAAG,CAAC,EACd,IAAI,CAAC,CAAC,CAAC,CACV,CACJ,EACD,QAAQ,EAAE,CACb;;AAMM,IAAA,IAAI,CAAC,GAA6B,EAAA;AACrC,QAAA,IAAI,CAAC,IAAI,CAAC,IAAI,CAA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uBAAC,KAAK;;;ACtChB;;AAEG;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, signal, computed, Directive } from '@angular/core';
|
|
3
|
-
import { toSignal } from '@angular/core/rxjs-interop';
|
|
4
3
|
import { tuiIsString, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
5
4
|
import { TuiTextfieldComponent } from '@taiga-ui/core/components/textfield';
|
|
6
5
|
import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
@@ -21,9 +20,7 @@ const [TUI_PASSWORD_OPTIONS, tuiPasswordOptionsProvider] = tuiCreateOptions({
|
|
|
21
20
|
class TuiPassword {
|
|
22
21
|
constructor() {
|
|
23
22
|
this.options = inject(TUI_PASSWORD_OPTIONS);
|
|
24
|
-
this.texts =
|
|
25
|
-
initialValue: ['', ''],
|
|
26
|
-
});
|
|
23
|
+
this.texts = inject(TUI_PASSWORD_TEXTS);
|
|
27
24
|
this.textfield = inject(TuiTextfieldComponent);
|
|
28
25
|
this.hidden = signal(true);
|
|
29
26
|
this.icon = tuiIconStart(computed((size = this.textfield.options.size()) => {
|
|
@@ -32,7 +29,7 @@ class TuiPassword {
|
|
|
32
29
|
: this.options.icons.hide;
|
|
33
30
|
return tuiIsString(icon) ? icon : icon(size);
|
|
34
31
|
}));
|
|
35
|
-
this.hint = tuiDirectiveBinding(TuiHintDirective, '
|
|
32
|
+
this.hint = tuiDirectiveBinding(TuiHintDirective, 'content', computed(() => (this.hidden() ? this.texts()[0] : this.texts()[1])));
|
|
36
33
|
}
|
|
37
34
|
toggle() {
|
|
38
35
|
this.hidden.set(!this.hidden());
|
|
@@ -49,7 +46,6 @@ class TuiPassword {
|
|
|
49
46
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPassword, decorators: [{
|
|
50
47
|
type: Directive,
|
|
51
48
|
args: [{
|
|
52
|
-
standalone: true,
|
|
53
49
|
selector: 'tui-icon[tuiPassword]',
|
|
54
50
|
providers: [
|
|
55
51
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-password.mjs","sources":["../../../projects/kit/directives/password/password.options.ts","../../../projects/kit/directives/password/password.directive.ts","../../../projects/kit/directives/password/taiga-ui-kit-directives-password.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiPasswordOptions {\n readonly icons: Readonly<{\n hide: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n show: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n }>;\n}\n\nexport const [TUI_PASSWORD_OPTIONS, tuiPasswordOptionsProvider] =\n tuiCreateOptions<TuiPasswordOptions>({\n icons: {\n hide: '@tui.eye-off',\n show: '@tui.eye',\n },\n });\n","import {computed, Directive, inject, signal} from '@angular/core';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-password.mjs","sources":["../../../projects/kit/directives/password/password.options.ts","../../../projects/kit/directives/password/password.directive.ts","../../../projects/kit/directives/password/taiga-ui-kit-directives-password.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiPasswordOptions {\n readonly icons: Readonly<{\n hide: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n show: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n }>;\n}\n\nexport const [TUI_PASSWORD_OPTIONS, tuiPasswordOptionsProvider] =\n tuiCreateOptions<TuiPasswordOptions>({\n icons: {\n hide: '@tui.eye-off',\n show: '@tui.eye',\n },\n });\n","import {computed, Directive, inject, signal} from '@angular/core';\nimport {tuiDirectiveBinding, tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_APPEARANCE_OPTIONS,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiHintDirective} from '@taiga-ui/core/directives/hint';\nimport {tuiIconStart} from '@taiga-ui/core/directives/icons';\nimport {TUI_PASSWORD_TEXTS} from '@taiga-ui/kit/tokens';\n\nimport {TUI_PASSWORD_OPTIONS} from './password.options';\n\n@Directive({\n selector: 'tui-icon[tuiPassword]',\n providers: [\n {\n provide: TUI_APPEARANCE_OPTIONS,\n useValue: {appearance: 'icon'},\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDirective,\n inputs: ['tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n style: 'cursor: pointer',\n '(click)': 'toggle()',\n '[style.border]':\n 'textfield.options.size() === \"s\" ? \"0.25rem solid transparent\" : null',\n },\n})\nexport class TuiPassword {\n private readonly options = inject(TUI_PASSWORD_OPTIONS);\n private readonly texts = inject(TUI_PASSWORD_TEXTS);\n\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected readonly hidden = signal(true);\n protected readonly icon = tuiIconStart(\n computed((size = this.textfield.options.size()) => {\n const icon = this.hidden()\n ? this.options.icons.show\n : this.options.icons.hide;\n\n return tuiIsString(icon) ? icon : icon(size);\n }),\n );\n\n protected readonly hint = tuiDirectiveBinding(\n TuiHintDirective,\n 'content',\n computed(() => (this.hidden() ? this.texts()[0] : this.texts()[1])),\n );\n\n protected toggle(): void {\n this.hidden.set(!this.hidden());\n this.textfield.input?.nativeElement.setAttribute(\n 'type',\n this.hidden() ? 'password' : 'text',\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAWa,CAAC,oBAAoB,EAAE,0BAA0B,CAAC,GAC3D,gBAAgB,CAAqB;AACjC,IAAA,KAAK,EA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mB,EAAE,gBAAgB,CAAC;AAClD,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,SAAS,EAAE,UAAU;AACrB,wBAAA,gBAAgB,EACZ,uEAAuE;AAC9E,qBAAA;AACJ,iBAAA;;;AClCD;;AAEG;;;;"}
|
|
@@ -19,7 +19,6 @@ class TuiPresent {
|
|
|
19
19
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPresent, decorators: [{
|
|
20
20
|
type: Directive,
|
|
21
21
|
args: [{
|
|
22
|
-
standalone: true,
|
|
23
22
|
selector: '[tuiPresentChange]',
|
|
24
23
|
host: {
|
|
25
24
|
'[style.animation]': '"tuiPresent 1s infinite"',
|