@taiga-ui/kit 4.4.1 → 4.5.0-canary.49229f4
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/components/calendar-month/calendar-month.component.d.ts +1 -1
- package/components/calendar-range/calendar-range.component.d.ts +2 -3
- package/components/checkbox/checkbox.options.d.ts +1 -1
- package/components/confirm/confirm.component.d.ts +1 -1
- package/components/files/file/file.options.d.ts +1 -1
- package/components/files/files.utils.d.ts +1 -1
- package/components/files/input-files/input-files.directive.d.ts +4 -3
- package/components/index.d.ts +1 -0
- package/components/input-password/index.d.ts +2 -0
- package/components/input-password/input-password.component.d.ts +13 -0
- package/components/input-password/input-password.options.d.ts +12 -0
- package/components/input-phone-international/input-phone-international.component.d.ts +2 -1
- package/components/pagination/pagination.component.d.ts +1 -1
- package/components/preview/pagination/preview-pagination.component.d.ts +1 -1
- package/components/radio/radio.options.d.ts +1 -1
- package/components/radio-list/radio-list.component.d.ts +1 -0
- package/components/segmented/segmented.component.d.ts +0 -2
- package/components/tiles/tile.service.d.ts +1 -1
- package/esm2022/components/accordion/accordion-item.component.mjs +4 -4
- package/esm2022/components/action-bar/action-bar.component.mjs +3 -3
- package/esm2022/components/avatar/avatar-labeled.component.mjs +3 -3
- package/esm2022/components/avatar/avatar-outline.directive.mjs +2 -2
- package/esm2022/components/avatar/avatar.component.mjs +3 -3
- package/esm2022/components/badge/badge.directive.mjs +2 -2
- package/esm2022/components/badge-notification/badge-notification.component.mjs +3 -3
- package/esm2022/components/badged-content/badged-content.component.mjs +3 -3
- package/esm2022/components/block/block.directive.mjs +2 -2
- package/esm2022/components/breadcrumbs/breadcrumbs.component.mjs +4 -4
- package/esm2022/components/calendar-month/calendar-month.component.mjs +8 -8
- package/esm2022/components/calendar-range/calendar-range.component.mjs +13 -13
- package/esm2022/components/carousel/carousel-scroll.directive.mjs +3 -3
- package/esm2022/components/carousel/carousel.component.mjs +7 -7
- package/esm2022/components/checkbox/checkbox.component.mjs +6 -4
- package/esm2022/components/checkbox/checkbox.options.mjs +1 -1
- package/esm2022/components/chip/chip.directive.mjs +2 -2
- package/esm2022/components/comment/comment.directive.mjs +2 -2
- package/esm2022/components/compass/compass.component.mjs +2 -2
- package/esm2022/components/confirm/confirm.component.mjs +6 -5
- package/esm2022/components/data-list-wrapper/data-list-group-wrapper.component.mjs +3 -3
- package/esm2022/components/data-list-wrapper/data-list-wrapper.component.mjs +3 -3
- package/esm2022/components/elastic-container/elastic-container.component.mjs +3 -3
- package/esm2022/components/files/file/file.component.mjs +4 -4
- package/esm2022/components/files/file/file.options.mjs +1 -1
- package/esm2022/components/files/files/files.component.mjs +4 -4
- package/esm2022/components/files/files.utils.mjs +1 -1
- package/esm2022/components/files/input-files/input-files.component.mjs +5 -5
- package/esm2022/components/files/input-files/input-files.content.mjs +4 -3
- package/esm2022/components/files/input-files/input-files.directive.mjs +7 -4
- package/esm2022/components/filter/filter.component.mjs +5 -5
- package/esm2022/components/index.mjs +2 -1
- package/esm2022/components/input-inline/input-inline.component.mjs +4 -4
- package/esm2022/components/input-password/index.mjs +3 -0
- package/esm2022/components/input-password/input-password.component.mjs +65 -0
- package/esm2022/components/input-password/input-password.options.mjs +12 -0
- package/esm2022/components/input-password/taiga-ui-kit-components-input-password.mjs +5 -0
- package/esm2022/components/input-phone-international/input-phone-international.component.mjs +6 -4
- package/esm2022/components/items-with-more/items-with-more.component.mjs +3 -3
- package/esm2022/components/items-with-more/items-with-more.service.mjs +4 -4
- package/esm2022/components/line-clamp/line-clamp-box.component.mjs +3 -3
- package/esm2022/components/line-clamp/line-clamp.component.mjs +4 -4
- package/esm2022/components/pagination/pagination.component.mjs +3 -3
- package/esm2022/components/pdf-viewer/pdf-viewer.component.mjs +6 -6
- package/esm2022/components/pin/pin.directive.mjs +2 -2
- package/esm2022/components/preview/pagination/preview-pagination.component.mjs +4 -4
- package/esm2022/components/preview/preview-dialog/preview-dialog.component.mjs +5 -5
- package/esm2022/components/preview/preview.component.mjs +8 -8
- package/esm2022/components/preview/zoom/preview-zoom.component.mjs +9 -9
- package/esm2022/components/progress/progress-bar/progress-bar.component.mjs +2 -2
- package/esm2022/components/progress/progress-bar/progress-color-segments.directive.mjs +3 -3
- package/esm2022/components/progress/progress-circle/progress-circle.component.mjs +3 -3
- package/esm2022/components/progress/progress-label/progress-label.component.mjs +2 -2
- package/esm2022/components/pulse/pulse.component.mjs +3 -3
- package/esm2022/components/push/push-alert.component.mjs +7 -7
- package/esm2022/components/push/push.component.mjs +3 -3
- package/esm2022/components/radio/radio.component.mjs +7 -4
- package/esm2022/components/radio/radio.options.mjs +1 -1
- package/esm2022/components/radio-list/radio-list.component.mjs +10 -7
- package/esm2022/components/range/range.component.mjs +6 -6
- package/esm2022/components/rating/rating.component.mjs +4 -4
- package/esm2022/components/segmented/segmented.component.mjs +15 -15
- package/esm2022/components/slider/helpers/slider-readonly.directive.mjs +4 -4
- package/esm2022/components/slider/helpers/slider-thumb-label.component.mjs +3 -3
- package/esm2022/components/slider/slider.component.mjs +2 -2
- package/esm2022/components/status/status.directive.mjs +2 -2
- package/esm2022/components/stepper/step.component.mjs +3 -3
- package/esm2022/components/switch/switch.component.mjs +2 -2
- package/esm2022/components/tabs/tabs-horizontal.directive.mjs +3 -3
- package/esm2022/components/tabs/tabs-with-more.component.mjs +6 -4
- package/esm2022/components/tabs/tabs.directive.mjs +2 -2
- package/esm2022/components/tiles/tile.service.mjs +3 -2
- package/esm2022/components/tiles/tiles.component.mjs +2 -2
- package/esm2022/components/tree/components/tree/tree.component.mjs +7 -7
- package/esm2022/components/tree/components/tree-item/tree-item.component.mjs +3 -3
- package/esm2022/components/tree/components/tree-item-content/tree-item-content.component.mjs +5 -5
- package/esm2022/directives/button-group/button-group.directive.mjs +2 -2
- package/esm2022/directives/connected/connected.directive.mjs +2 -2
- package/esm2022/directives/fade/fade.directive.mjs +3 -3
- package/esm2022/directives/fluid-typography/fluid-typography.directive.mjs +3 -3
- package/esm2022/directives/icon-badge/icon-badge.directive.mjs +2 -2
- package/esm2022/directives/sensitive/sensitive.directive.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-accordion.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-avatar.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-block.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +8 -8
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +14 -14
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-carousel.mjs +9 -9
- package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs +5 -3
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-chip.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-comment.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-compass.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-confirm.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-files.mjs +17 -13
- package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-filter.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-password.mjs +81 -0
- package/fesm2022/taiga-ui-kit-components-input-password.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +5 -4
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pagination.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-pdf-viewer.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-preview-dialog.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-preview-preview-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-preview.mjs +23 -23
- package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-progress.mjs +8 -8
- package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pulse.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-push.mjs +9 -9
- package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs +9 -7
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio.mjs +6 -4
- package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-range.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-rating.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-segmented.mjs +14 -14
- package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slider.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-status.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-stepper.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-switch.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tabs.mjs +9 -7
- package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tiles.mjs +4 -3
- package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tree.mjs +13 -13
- package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components.mjs +1 -0
- package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs +2 -2
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-connected.mjs +2 -2
- package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-fade.mjs +2 -2
- package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +2 -2
- package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-icon-badge.mjs +2 -2
- package/fesm2022/taiga-ui-kit-directives-icon-badge.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +4 -4
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
- package/package.json +505 -499
- package/styles/components/badge.less +12 -12
- package/styles/components/block.less +3 -6
- package/styles/components/checkbox.less +2 -2
- package/styles/components/chip.less +3 -3
- package/styles/components/comment.less +2 -2
- package/styles/components/compass.less +6 -6
- package/styles/components/pin.less +9 -9
- package/styles/components/progress-bar.less +2 -2
- package/styles/components/radio.less +2 -2
- package/styles/components/status.less +2 -2
- package/styles/components/switch.less +8 -8
- package/tokens/i18n.d.ts +8 -8
|
@@ -43,12 +43,12 @@ class TuiRating extends TuiControl {
|
|
|
43
43
|
: 0;
|
|
44
44
|
}
|
|
45
45
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRating, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRating, isStandalone: true, selector: "tui-rating", inputs: { icon: "icon", max: "max" }, host: { listeners: { "keydown.capture": "onKeyDown($event)", "pointerdown": "onPointer(1)", "pointercancel": "onPointer(-1)", "document:pointerup": "onPointer(-1)" }, properties: { "class._disabled": "disabled()", "class._readonly": "readOnly()", "class._active": "active" } }, providers: [tuiFallbackValueProvider(0)], usesInheritance: true, ngImport: i0, template: "<input\n min=\"1\"\n type=\"range\"\n class=\"t-range\"\n [attr.aria-disabled]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [max]=\"max\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{standalone: true}\"\n (blur)=\"onTouched()\"\n (ngModelChange)=\"onChange($event)\"\n/>\n<div class=\"t-items\">\n <div\n *tuiRepeatTimes=\"let index of max\"\n class=\"t-item\"\n [class.t-item_active]=\"isActive(index)\"\n (pointerup)=\"onClick(max - index)\"\n >\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon t-icon_blank\"\n [class.t-icon_fraction]=\"isFraction(index)\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"100 - getCut(index)\"\n />\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"getCut(index)\"\n />\n </div>\n</div>\n", styles: [":host{position:relative;display:block;
|
|
46
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRating, isStandalone: true, selector: "tui-rating", inputs: { icon: "icon", max: "max" }, host: { listeners: { "keydown.capture": "onKeyDown($event)", "pointerdown": "onPointer(1)", "pointercancel": "onPointer(-1)", "document:pointerup": "onPointer(-1)" }, properties: { "class._disabled": "disabled()", "class._readonly": "readOnly()", "class._active": "active" } }, providers: [tuiFallbackValueProvider(0)], usesInheritance: true, ngImport: i0, template: "<input\n min=\"1\"\n type=\"range\"\n class=\"t-range\"\n [attr.aria-disabled]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [max]=\"max\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{standalone: true}\"\n (blur)=\"onTouched()\"\n (ngModelChange)=\"onChange($event)\"\n/>\n<div class=\"t-items\">\n <div\n *tuiRepeatTimes=\"let index of max\"\n class=\"t-item\"\n [class.t-item_active]=\"isActive(index)\"\n (pointerup)=\"onClick(max - index)\"\n >\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon t-icon_blank\"\n [class.t-icon_fraction]=\"isFraction(index)\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"100 - getCut(index)\"\n />\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"getCut(index)\"\n />\n </div>\n</div>\n", styles: [":host{position:relative;display:block;inline-size:-webkit-fit-content;inline-size:-moz-fit-content;inline-size:fit-content;min-inline-size:-webkit-fit-content;min-inline-size:-moz-fit-content;min-inline-size:fit-content;font-size:1rem;color:var(--tui-chart-categorical-12);cursor:pointer;-webkit-user-select:none;user-select:none}:host._readonly{pointer-events:none}:host._disabled{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-range{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;opacity:0;box-sizing:border-box;padding:0 .75em;pointer-events:none}.t-range:focus-visible+.t-items{box-shadow:inset 0 0 0 .125rem var(--tui-border-focus)}.t-items{position:relative;display:flex;flex-direction:row-reverse}.t-items:hover .t-icon{clip-path:inset(0 0 0 0)}.t-items:hover .t-icon_blank{clip-path:inset(0 0 0 100%)}.t-item{position:relative;flex:1 0 0;color:var(--tui-text-tertiary);transition-property:color,transform;transition-duration:var(--tui-duration);transition-timing-function:ease-in-out,cubic-bezier(.35,1.5,.4,2.5)}.t-item:first-child{max-inline-size:2.5em}.t-item:hover,.t-item:hover~.t-item,.t-items:not(:hover) .t-item_active{color:currentColor}.t-items:active .t-item:hover,.t-items:active .t-item:hover~.t-item{transform:scale(.85);transition-duration:var(--tui-duration),calc(var(--tui-duration) / 3);transition-timing-function:ease-in-out}.t-icon{transition-property:clip-path;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:2.5em;block-size:2.5em;font-size:inherit;clip-path:inset(0 var(--t-cut) 0 0)}.t-icon ::ng-deep>*{font-size:1rem}.t-icon_blank{position:absolute;top:0;left:0;display:none;color:var(--tui-text-tertiary);clip-path:inset(0 0 0 var(--t-cut))}.t-icon_fraction{display:block}@media (any-pointer: coarse){:host._active .t-item_active{transform:scale(.85);transition-timing-function:ease-in-out}.t-range{pointer-events:auto}.t-icon{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][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: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
47
47
|
}
|
|
48
48
|
export { TuiRating };
|
|
49
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRating, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
|
-
args: [{ standalone: true, selector: 'tui-rating', imports: [CommonModule, FormsModule, TuiIcon, TuiRepeatTimes
|
|
51
|
+
args: [{ standalone: true, selector: 'tui-rating', imports: [CommonModule, FormsModule, PolymorpheusOutlet, TuiIcon, TuiRepeatTimes], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiFallbackValueProvider(0)], host: {
|
|
52
52
|
'[class._disabled]': 'disabled()',
|
|
53
53
|
'[class._readonly]': 'readOnly()',
|
|
54
54
|
'[class._active]': 'active',
|
|
@@ -56,10 +56,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
56
56
|
'(pointerdown)': 'onPointer(1)',
|
|
57
57
|
'(pointercancel)': 'onPointer(-1)',
|
|
58
58
|
'(document:pointerup)': 'onPointer(-1)',
|
|
59
|
-
}, template: "<input\n min=\"1\"\n type=\"range\"\n class=\"t-range\"\n [attr.aria-disabled]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [max]=\"max\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{standalone: true}\"\n (blur)=\"onTouched()\"\n (ngModelChange)=\"onChange($event)\"\n/>\n<div class=\"t-items\">\n <div\n *tuiRepeatTimes=\"let index of max\"\n class=\"t-item\"\n [class.t-item_active]=\"isActive(index)\"\n (pointerup)=\"onClick(max - index)\"\n >\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon t-icon_blank\"\n [class.t-icon_fraction]=\"isFraction(index)\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"100 - getCut(index)\"\n />\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"getCut(index)\"\n />\n </div>\n</div>\n", styles: [":host{position:relative;display:block;
|
|
59
|
+
}, template: "<input\n min=\"1\"\n type=\"range\"\n class=\"t-range\"\n [attr.aria-disabled]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [max]=\"max\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{standalone: true}\"\n (blur)=\"onTouched()\"\n (ngModelChange)=\"onChange($event)\"\n/>\n<div class=\"t-items\">\n <div\n *tuiRepeatTimes=\"let index of max\"\n class=\"t-item\"\n [class.t-item_active]=\"isActive(index)\"\n (pointerup)=\"onClick(max - index)\"\n >\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon t-icon_blank\"\n [class.t-icon_fraction]=\"isFraction(index)\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"100 - getCut(index)\"\n />\n <tui-icon\n *polymorpheusOutlet=\"icon as src; context: {$implicit: max - index}\"\n class=\"t-icon\"\n [icon]=\"src.toString()\"\n [style.--t-cut.%]=\"getCut(index)\"\n />\n </div>\n</div>\n", styles: [":host{position:relative;display:block;inline-size:-webkit-fit-content;inline-size:-moz-fit-content;inline-size:fit-content;min-inline-size:-webkit-fit-content;min-inline-size:-moz-fit-content;min-inline-size:fit-content;font-size:1rem;color:var(--tui-chart-categorical-12);cursor:pointer;-webkit-user-select:none;user-select:none}:host._readonly{pointer-events:none}:host._disabled{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-range{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;opacity:0;box-sizing:border-box;padding:0 .75em;pointer-events:none}.t-range:focus-visible+.t-items{box-shadow:inset 0 0 0 .125rem var(--tui-border-focus)}.t-items{position:relative;display:flex;flex-direction:row-reverse}.t-items:hover .t-icon{clip-path:inset(0 0 0 0)}.t-items:hover .t-icon_blank{clip-path:inset(0 0 0 100%)}.t-item{position:relative;flex:1 0 0;color:var(--tui-text-tertiary);transition-property:color,transform;transition-duration:var(--tui-duration);transition-timing-function:ease-in-out,cubic-bezier(.35,1.5,.4,2.5)}.t-item:first-child{max-inline-size:2.5em}.t-item:hover,.t-item:hover~.t-item,.t-items:not(:hover) .t-item_active{color:currentColor}.t-items:active .t-item:hover,.t-items:active .t-item:hover~.t-item{transform:scale(.85);transition-duration:var(--tui-duration),calc(var(--tui-duration) / 3);transition-timing-function:ease-in-out}.t-icon{transition-property:clip-path;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:2.5em;block-size:2.5em;font-size:inherit;clip-path:inset(0 var(--t-cut) 0 0)}.t-icon ::ng-deep>*{font-size:1rem}.t-icon_blank{position:absolute;top:0;left:0;display:none;color:var(--tui-text-tertiary);clip-path:inset(0 0 0 var(--t-cut))}.t-icon_fraction{display:block}@media (any-pointer: coarse){:host._active .t-item_active{transform:scale(.85);transition-timing-function:ease-in-out}.t-range{pointer-events:auto}.t-icon{transition:none}}\n"] }]
|
|
60
60
|
}], propDecorators: { icon: [{
|
|
61
61
|
type: Input
|
|
62
62
|
}], max: [{
|
|
63
63
|
type: Input
|
|
64
64
|
}] } });
|
|
65
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
65
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF0aW5nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tpdC9jb21wb25lbnRzL3JhdGluZy9yYXRpbmcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2l0L2NvbXBvbmVudHMvcmF0aW5nL3JhdGluZy50ZW1wbGF0ZS5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxpQkFBaU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YXRUaW1lcz1cImxldCBpbmRleCBvZiBtYXhcIlxuICAgICAgICBjbGFzcz1cInQtaXRlbVwiXG4gICAgICAgIFtjbGFzcy50LWl0ZW1fYWN0aXZlXT1cImlzQWN0aXZlKGluZGV4KVwiXG4gICAgICAgIChwb2ludGVydXApPVwib25DbGljayhtYXggLSBpbmRleClcIlxuICAgID5cbiAgICAgICAgPHR1aS1pY29uXG4gICAgICAgICAgICAqcG9seW1vcnBoZXVzT3V0bGV0PVwiaWNvbiBhcyBzcmM7IGNvbnRleHQ6IHskaW1wbGljaXQ6IG1heCAtIGluZGV4fVwiXG4gICAgICAgICAgICBjbGFzcz1cInQtaWNvbiB0LWljb25fYmxhbmtcIlxuICAgICAgICAgICAgW2NsYXNzLnQtaWNvbl9mcmFjdGlvbl09XCJpc0ZyYWN0aW9uKGluZGV4KVwiXG4gICAgICAgICAgICBbaWNvbl09XCJzcmMudG9TdHJpbmcoKVwiXG4gICAgICAgICAgICBbc3R5bGUuLS10LWN1dC4lXT1cIjEwMCAtIGdldEN1dChpbmRleClcIlxuICAgICAgICAvPlxuICAgICAgICA8dHVpLWljb25cbiAgICAgICAgICAgICpwb2x5bW9ycGhldXNPdXRsZXQ9XCJpY29uIGFzIHNyYzsgY29udGV4dDogeyRpbXBsaWNpdDogbWF4IC0gaW5kZXh9XCJcbiAgICAgICAgICAgIGNsYXNzPVwidC1pY29uXCJcbiAgICAgICAgICAgIFtpY29uXT1cInNyYy50b1N0cmluZygpXCJcbiAgICAgICAgICAgIFtzdHlsZS4tLXQtY3V0LiVdPVwiZ2V0Q3V0KGluZGV4KVwiXG4gICAgICAgIC8+XG4gICAgPC9kaXY+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, inject, Input,
|
|
1
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, inject, Input, Output, ViewEncapsulation, } from '@angular/core';
|
|
2
2
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
3
|
import { ResizeObserverService } from '@ng-web-apis/resize-observer';
|
|
4
4
|
import { tuiZonefree } from '@taiga-ui/cdk/observables';
|
|
@@ -12,7 +12,7 @@ class TuiSegmented {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
this.el = tuiInjectElement();
|
|
14
14
|
this.sub = inject(ResizeObserverService, { self: true })
|
|
15
|
-
.pipe(tuiZonefree(
|
|
15
|
+
.pipe(tuiZonefree(), takeUntilDestroyed())
|
|
16
16
|
.subscribe(() => this.refresh());
|
|
17
17
|
this.size = 's';
|
|
18
18
|
this.activeItemIndex = 0;
|
|
@@ -29,30 +29,30 @@ class TuiSegmented {
|
|
|
29
29
|
this.activeItemIndexChange.emit(activeItemIndex);
|
|
30
30
|
this.refresh();
|
|
31
31
|
}
|
|
32
|
-
get left() {
|
|
33
|
-
const element = this.activeElement;
|
|
34
|
-
return tuiIsHTMLElement(element) ? element.offsetLeft : 0;
|
|
35
|
-
}
|
|
36
|
-
get width() {
|
|
37
|
-
return this.activeElement?.clientWidth || 0;
|
|
38
|
-
}
|
|
39
32
|
get activeElement() {
|
|
40
33
|
return this.el.children.item(this.activeItemIndex);
|
|
41
34
|
}
|
|
42
|
-
// TODO: Switch to HostBinding signals in Angular 17+
|
|
43
35
|
refresh() {
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
const el = this.activeElement;
|
|
37
|
+
if (!tuiIsHTMLElement(el)) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
Array.from(this.el.children).forEach((e) => e.classList.remove('tui-segmented_active'));
|
|
41
|
+
el.classList.add('tui-segmented_active');
|
|
42
|
+
const { offsetWidth = 0, offsetLeft = 0, offsetTop = 0 } = el;
|
|
43
|
+
this.el.style.setProperty('--t-top', tuiPx(offsetTop));
|
|
44
|
+
this.el.style.setProperty('--t-left', tuiPx(offsetLeft));
|
|
45
|
+
this.el.style.setProperty('--t-width', tuiPx(offsetWidth));
|
|
46
46
|
}
|
|
47
47
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSegmented, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSegmented, isStandalone: true, selector: "tui-segmented", inputs: { size: "size", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size" } }, providers: [ResizeObserverService, tuiBadgeNotificationOptionsProvider({ size: 's' })], usesOnChanges: true, hostDirectives: [{ directive: i1.TuiSegmentedDirective }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["tui-segmented{position:relative;display:flex;
|
|
48
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSegmented, isStandalone: true, selector: "tui-segmented", inputs: { size: "size", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size" } }, providers: [ResizeObserverService, tuiBadgeNotificationOptionsProvider({ size: 's' })], usesOnChanges: true, hostDirectives: [{ directive: i1.TuiSegmentedDirective }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["tui-segmented{position:relative;display:flex;color:var(--tui-background-base);background:var(--tui-background-neutral-1);overflow:hidden}tui-segmented[data-size=s]{--t-padding: .5rem;--t-gap: .5rem;--t-margin: -.125rem;--t-height: var(--tui-height-s);font:var(--tui-font-text-s);border-radius:var(--tui-radius-m)}tui-segmented[data-size=s] tui-icon{font-size:1rem}tui-segmented[data-size=m]{--t-padding: .875rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-m);font:var(--tui-font-text-m);border-radius:var(--tui-radius-m)}tui-segmented[data-size=l]{--t-padding: 1.25rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-l);font:var(--tui-font-text-l);border-radius:var(--tui-radius-l)}tui-segmented[data-size=l]>*:before{block-size:1.25rem}tui-segmented>a,tui-segmented>button,tui-segmented>label,tui-segmented>label>input:not([tuiRadio]){transition-property:color,background,opacity,border-image;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;justify-content:center;block-size:var(--t-height);white-space:nowrap;gap:var(--t-gap);margin:0;padding:0 var(--t-padding);color:var(--tui-text-primary);overflow:hidden;cursor:pointer;font:inherit;border-radius:inherit;border:.125rem solid transparent;background-clip:padding-box;box-sizing:border-box;border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 0 0 100 .5;clip-path:polygon(-1rem calc(50% - .5rem),1px calc(50% - .5rem),1px 0,100% 0,100% 100%,1px 100%,1px calc(50% + .5rem),-1rem calc(50% + .5rem))}tui-segmented>a>*,tui-segmented>button>*,tui-segmented>label>*,tui-segmented>label>input:not([tuiRadio])>*{margin:0 var(--t-margin)}tui-segmented>a:focus-visible,tui-segmented>button:focus-visible,tui-segmented>label:focus-visible,tui-segmented>label>input:not([tuiRadio]):focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:-.25rem}@media (hover: hover){tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover{background-color:var(--tui-background-neutral-1-hover)}tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover,tui-segmented>a:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>button:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}tui-segmented>a.tui-segmented_active:hover,tui-segmented>button.tui-segmented_active:hover,tui-segmented>label.tui-segmented_active:hover,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active:hover{opacity:var(--tui-disabled-opacity)}}tui-segmented>a:active,tui-segmented>button:active,tui-segmented>label:active,tui-segmented>label>input:not([tuiRadio]):active,tui-segmented>a:active+*,tui-segmented>button:active+*,tui-segmented>label:active+*,tui-segmented>label>input:not([tuiRadio]):active+*,tui-segmented>a.tui-segmented_active,tui-segmented>button.tui-segmented_active,tui-segmented>label.tui-segmented_active,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active,tui-segmented>a.tui-segmented_active+*,tui-segmented>button.tui-segmented_active+*,tui-segmented>label.tui-segmented_active+*,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}tui-segmented>label>input:not([tuiRadio]){position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-segmented:before{transition-property:top,left,width;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;left:var(--t-left);top:var(--t-top);block-size:var(--t-height);inline-size:var(--t-width);border-radius:inherit;background:currentColor;background-clip:padding-box;border:.125rem solid transparent;box-sizing:border-box;filter:drop-shadow(0 .25rem 1.25rem rgba(0,0,0,.1))}[tuiTheme=dark] tui-segmented,tui-segmented[tuiTheme=dark]{--tui-background-base: var(--tui-background-neutral-1-hover)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
49
49
|
}
|
|
50
50
|
export { TuiSegmented };
|
|
51
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSegmented, decorators: [{
|
|
52
52
|
type: Component,
|
|
53
53
|
args: [{ standalone: true, selector: 'tui-segmented', template: '<ng-content />', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [ResizeObserverService, tuiBadgeNotificationOptionsProvider({ size: 's' })], hostDirectives: [TuiSegmentedDirective], host: {
|
|
54
54
|
'[attr.data-size]': 'size',
|
|
55
|
-
}, styles: ["tui-segmented{position:relative;display:flex;
|
|
55
|
+
}, styles: ["tui-segmented{position:relative;display:flex;color:var(--tui-background-base);background:var(--tui-background-neutral-1);overflow:hidden}tui-segmented[data-size=s]{--t-padding: .5rem;--t-gap: .5rem;--t-margin: -.125rem;--t-height: var(--tui-height-s);font:var(--tui-font-text-s);border-radius:var(--tui-radius-m)}tui-segmented[data-size=s] tui-icon{font-size:1rem}tui-segmented[data-size=m]{--t-padding: .875rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-m);font:var(--tui-font-text-m);border-radius:var(--tui-radius-m)}tui-segmented[data-size=l]{--t-padding: 1.25rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-l);font:var(--tui-font-text-l);border-radius:var(--tui-radius-l)}tui-segmented[data-size=l]>*:before{block-size:1.25rem}tui-segmented>a,tui-segmented>button,tui-segmented>label,tui-segmented>label>input:not([tuiRadio]){transition-property:color,background,opacity,border-image;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;justify-content:center;block-size:var(--t-height);white-space:nowrap;gap:var(--t-gap);margin:0;padding:0 var(--t-padding);color:var(--tui-text-primary);overflow:hidden;cursor:pointer;font:inherit;border-radius:inherit;border:.125rem solid transparent;background-clip:padding-box;box-sizing:border-box;border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 0 0 100 .5;clip-path:polygon(-1rem calc(50% - .5rem),1px calc(50% - .5rem),1px 0,100% 0,100% 100%,1px 100%,1px calc(50% + .5rem),-1rem calc(50% + .5rem))}tui-segmented>a>*,tui-segmented>button>*,tui-segmented>label>*,tui-segmented>label>input:not([tuiRadio])>*{margin:0 var(--t-margin)}tui-segmented>a:focus-visible,tui-segmented>button:focus-visible,tui-segmented>label:focus-visible,tui-segmented>label>input:not([tuiRadio]):focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:-.25rem}@media (hover: hover){tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover{background-color:var(--tui-background-neutral-1-hover)}tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover,tui-segmented>a:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>button:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}tui-segmented>a.tui-segmented_active:hover,tui-segmented>button.tui-segmented_active:hover,tui-segmented>label.tui-segmented_active:hover,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active:hover{opacity:var(--tui-disabled-opacity)}}tui-segmented>a:active,tui-segmented>button:active,tui-segmented>label:active,tui-segmented>label>input:not([tuiRadio]):active,tui-segmented>a:active+*,tui-segmented>button:active+*,tui-segmented>label:active+*,tui-segmented>label>input:not([tuiRadio]):active+*,tui-segmented>a.tui-segmented_active,tui-segmented>button.tui-segmented_active,tui-segmented>label.tui-segmented_active,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active,tui-segmented>a.tui-segmented_active+*,tui-segmented>button.tui-segmented_active+*,tui-segmented>label.tui-segmented_active+*,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}tui-segmented>label>input:not([tuiRadio]){position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-segmented:before{transition-property:top,left,width;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;left:var(--t-left);top:var(--t-top);block-size:var(--t-height);inline-size:var(--t-width);border-radius:inherit;background:currentColor;background-clip:padding-box;border:.125rem solid transparent;box-sizing:border-box;filter:drop-shadow(0 .25rem 1.25rem rgba(0,0,0,.1))}[tuiTheme=dark] tui-segmented,tui-segmented[tuiTheme=dark]{--tui-background-base: var(--tui-background-neutral-1-hover)}\n"] }]
|
|
56
56
|
}], propDecorators: { size: [{
|
|
57
57
|
type: Input
|
|
58
58
|
}], activeItemIndex: [{
|
|
@@ -60,4 +60,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
60
60
|
}], activeItemIndexChange: [{
|
|
61
61
|
type: Output
|
|
62
62
|
}] } });
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VnbWVudGVkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tpdC9jb21wb25lbnRzL3NlZ21lbnRlZC9zZWdtZW50ZWQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFDSCx1QkFBdUIsRUFDdkIsU0FBUyxFQUNULFlBQVksRUFDWixNQUFNLEVBQ04sS0FBSyxFQUNMLE1BQU0sRUFDT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4gICAgICAgIHRoaXMuZWwuc3R5bGUuc2V0UHJvcGVydHkoJy0tdC1sZWZ0JywgdHVpUHgob2Zmc2V0TGVmdCkpO1xuICAgICAgICB0aGlzLmVsLnN0eWxlLnNldFByb3BlcnR5KCctLXQtd2lkdGgnLCB0dWlQeChvZmZzZXRXaWR0aCkpO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -8,14 +8,14 @@ import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
|
8
8
|
import { combineLatest, filter, map, merge, tap } from 'rxjs';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
const SLIDER_INTERACTION_KEYS = new Set([
|
|
11
|
+
'ArrowDown',
|
|
11
12
|
'ArrowLeft',
|
|
12
13
|
'ArrowRight',
|
|
13
14
|
'ArrowUp',
|
|
14
|
-
'ArrowDown',
|
|
15
|
-
'Home',
|
|
16
15
|
'End',
|
|
17
|
-
'
|
|
16
|
+
'Home',
|
|
18
17
|
'PageDown',
|
|
18
|
+
'PageUp',
|
|
19
19
|
]);
|
|
20
20
|
/**
|
|
21
21
|
* Native <input type='range' readonly> doesn't work.
|
|
@@ -72,4 +72,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
72
72
|
type: Input,
|
|
73
73
|
args: [{ transform: coerceBooleanProperty }]
|
|
74
74
|
}] } });
|
|
75
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
75
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xpZGVyLXJlYWRvbmx5LmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tpdC9jb21wb25lbnRzL3NsaWRlci9oZWxwZXJzL3NsaWRlci1yZWFkb25seS5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFB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ICAgKiBLZWVwIGluIG1pbmQgdGhhdCBwcmV2ZW50aW5nIHRvdWNoIGV2ZW50IChvbiBzbGlkZXIpIGluc2lkZSBgQEhvc3RMaXN0ZW5lcigndG91Y2hzdGFydCcpYCBkb2Vzbid0IHdvcmsgZm9yIG1vYmlsZSBjaHJvbWUuXG4gICAgICAgICAqL1xuICAgICAgICBjb21iaW5lTGF0ZXN0KFt0b3VjaE1vdmUkLCBzaG91bGRQcmV2ZW50TW92ZSRdKVxuICAgICAgICAgICAgLnBpcGUoXG4gICAgICAgICAgICAgICAgZmlsdGVyKChbXywgc2hvdWxkUHJldmVudE1vdmVdKSA9PiBzaG91bGRQcmV2ZW50TW92ZSksXG4gICAgICAgICAgICAgICAgdGFrZVVudGlsRGVzdHJveWVkKCksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAuc3Vic2NyaWJlKChbbW92ZUV2ZW50XSkgPT4gdGhpcy5wcmV2ZW50RXZlbnQobW92ZUV2ZW50KSk7XG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIHByZXZlbnRFdmVudChldmVudDogRXZlbnQpOiB2b2lkIHtcbiAgICAgICAgaWYgKGV2ZW50LmNhbmNlbGFibGUgJiYgdGhpcy5yZWFkb25seSkge1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByb3RlY3RlZCBwcmV2ZW50S2V5Ym9hcmRJbnRlcmFjdGlvbihldmVudDogS2V5Ym9hcmRFdmVudCk6IHZvaWQge1xuICAgICAgICBpZiAoU0xJREVSX0lOVEVSQUNUSU9OX0tFWVMuaGFzKGV2ZW50LmtleSkpIHtcbiAgICAgICAgICAgIHRoaXMucHJldmVudEV2ZW50KGV2ZW50KTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==
|
|
@@ -21,12 +21,12 @@ class TuiSliderThumbLabel {
|
|
|
21
21
|
return this.ratio * (this.slider?.el.offsetWidth || 0);
|
|
22
22
|
}
|
|
23
23
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSliderThumbLabel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSliderThumbLabel, isStandalone: true, selector: "[tuiSliderThumbLabel]", queries: [{ propertyName: "slider", first: true, predicate: TuiSliderComponent, descendants: true }, { propertyName: "control", first: true, predicate: NgControl, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"control?.valueChanges | async\" />\n\n<div\n class=\"t-ghost\"\n [attr.data-size]=\"size\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.left.px]=\"ghostLeft\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n", styles: [":host{position:relative}.t-ghost{position:absolute;top:0;bottom:0;margin:auto;border-radius:50%;pointer-events:none}.t-ghost[data-size=s]{
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSliderThumbLabel, isStandalone: true, selector: "[tuiSliderThumbLabel]", queries: [{ propertyName: "slider", first: true, predicate: TuiSliderComponent, descendants: true }, { propertyName: "control", first: true, predicate: NgControl, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"control?.valueChanges | async\" />\n\n<div\n class=\"t-ghost\"\n [attr.data-size]=\"size\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.left.px]=\"ghostLeft\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n", styles: [":host{position:relative}.t-ghost{position:absolute;top:0;bottom:0;margin:auto;border-radius:50%;pointer-events:none}.t-ghost[data-size=s]{inline-size:.5rem;block-size:.5rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.5rem))}.t-ghost[data-size=m]{inline-size:.75rem;block-size:.75rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.75rem))}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25
25
|
}
|
|
26
26
|
export { TuiSliderThumbLabel };
|
|
27
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSliderThumbLabel, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
|
-
args: [{ standalone: true, selector: '[tuiSliderThumbLabel]', imports: [AsyncPipe, NgIf], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"control?.valueChanges | async\" />\n\n<div\n class=\"t-ghost\"\n [attr.data-size]=\"size\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.left.px]=\"ghostLeft\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n", styles: [":host{position:relative}.t-ghost{position:absolute;top:0;bottom:0;margin:auto;border-radius:50%;pointer-events:none}.t-ghost[data-size=s]{
|
|
29
|
+
args: [{ standalone: true, selector: '[tuiSliderThumbLabel]', imports: [AsyncPipe, NgIf], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"control?.valueChanges | async\" />\n\n<div\n class=\"t-ghost\"\n [attr.data-size]=\"size\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.left.px]=\"ghostLeft\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n", styles: [":host{position:relative}.t-ghost{position:absolute;top:0;bottom:0;margin:auto;border-radius:50%;pointer-events:none}.t-ghost[data-size=s]{inline-size:.5rem;block-size:.5rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.5rem))}.t-ghost[data-size=m]{inline-size:.75rem;block-size:.75rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.75rem))}\n"] }]
|
|
30
30
|
}], propDecorators: { slider: [{
|
|
31
31
|
type: ContentChild,
|
|
32
32
|
args: [TuiSliderComponent]
|
|
@@ -34,4 +34,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
34
34
|
type: ContentChild,
|
|
35
35
|
args: [NgControl]
|
|
36
36
|
}] } });
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xpZGVyLXRodW1iLWxhYmVsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tpdC9jb21wb25lbnRzL3NsaWRlci9oZWxwZXJzL3NsaWRlci10aHVtYi1sYWJlbC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9raXQvY29tcG9uZW50cy9zbGlkZXIvaGVscGVycy9zbGlkZXItdGh1bWItbGFiZWwudGVtcGxhdGUuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx3REFBd0Q7QUFBeEQsd0RBQXdEO0FBQ3hELE9BQU8sRUFBQyxTQUFTLEVBQUUsSUFBSSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFFaEQsT0FBTyxFQUFDLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDL0UsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLGdCQUFnQixDQUFDO0FBR3pDLE9BQU8sRUFBQyxrQkFBa0IsRUFBQyxNQUFNLHFCQUFxQixDQUFDOztBQUV2RCxNQVFhLG1CQUFtQjtJQU9yQixrQkFBa0I7UUFDckIsU0FBUztZQUNMLE9BQU8sQ0FBQyxNQUFNLENBQ1YsT0FBTyxDQUFDLElBQUksQ0FBQyxPQUFPLE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8+XG48L2Rpdj5cblxuPG5nLWNvbnRlbnQgc2VsZWN0PVwiaW5wdXRbdHlwZT1yYW5nZV1cIiAvPlxuIl19
|
|
@@ -61,7 +61,7 @@ class TuiSliderComponent {
|
|
|
61
61
|
return Number(this.el.step) || 1;
|
|
62
62
|
}
|
|
63
63
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
64
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSliderComponent, isStandalone: true, selector: "input[type=range][tuiSlider]", inputs: { size: "size", segments: "segments" }, host: { listeners: { "input": "0" }, properties: { "style.--tui-slider-track-color": "options.trackColor", "style.--tui-slider-segment-width.%": "segmentWidth", "style.--tui-slider-fill-ratio": "valueRatio", "attr.data-size": "size" } }, ngImport: i0, template: '', isInline: true, styles: [":host{position:relative;display:block;
|
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSliderComponent, isStandalone: true, selector: "input[type=range][tuiSlider]", inputs: { size: "size", segments: "segments" }, host: { listeners: { "input": "0" }, properties: { "style.--tui-slider-track-color": "options.trackColor", "style.--tui-slider-segment-width.%": "segmentWidth", "style.--tui-slider-fill-ratio": "valueRatio", "attr.data-size": "size" } }, ngImport: i0, template: '', isInline: true, styles: [":host{position:relative;display:block;inline-size:100%;color:var(--tui-background-accent-1);cursor:pointer;-webkit-appearance:none;appearance:none;block-size:.125rem;padding:.4375rem 0;background-color:transparent;background-clip:content-box;outline:none;border-radius:var(--tui-radius-m)}:host:active{cursor:ew-resize}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:auto}:host[data-size=s]:not(:disabled):before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.25rem;left:calc(var(--tui-slider-fill-ratio) * 100% - var(--tui-slider-fill-ratio) * .5rem);inline-size:.5rem;block-size:.5rem;border-radius:50%;transform:var(--tui-slider-thumb-transform, scale(1));content:\"\";cursor:ew-resize;background:currentColor;opacity:0}:host[data-size=s]:active:before{opacity:.2;transform:var(--tui-slider-thumb-transform, scale(1)) scale(2.33)}:host[data-size=m]:not(:disabled):before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.125rem;left:calc(var(--tui-slider-fill-ratio) * 100% - var(--tui-slider-fill-ratio) * .75rem);inline-size:.75rem;block-size:.75rem;border-radius:50%;transform:var(--tui-slider-thumb-transform, scale(1));content:\"\";cursor:ew-resize;background:currentColor;opacity:0}:host[data-size=m]:active:before{opacity:.2;transform:var(--tui-slider-thumb-transform, scale(1)) scale(2.33)}:host::-webkit-slider-container{border-radius:inherit}:host[data-size=m]::-webkit-slider-runnable-track{block-size:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .5rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-text-tertiary) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor calc(100% * var(--tui-slider-fill-ratio)),transparent calc(100% * var(--tui-slider-fill-ratio)));background-position-x:0,.25rem,0;background-size:calc(100% - .75rem),calc(100% - .75rem),auto}:host[data-size=s]::-webkit-slider-runnable-track{block-size:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-text-tertiary) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor calc(100% * var(--tui-slider-fill-ratio)),transparent calc(100% * var(--tui-slider-fill-ratio)));background-position-x:0,.125rem,0;background-size:calc(100% - .5rem),calc(100% - .5rem),auto}:host[data-size=m]::-moz-range-track{block-size:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .5rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-text-tertiary) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.25rem;background-size:calc(100% - .75rem)}:host[data-size=s]::-moz-range-track{block-size:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-text-tertiary) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.125rem;background-size:calc(100% - .5rem)}:host[data-size=m]::-webkit-slider-thumb{-webkit-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:.75rem;inline-size:.75rem;box-sizing:content-box;background-clip:content-box;border:.125rem solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1));margin-top:-.4375rem}:not(:disabled):host[data-size=m]::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled):host[data-size=m]::-webkit-slider-thumb:hover,:active:not(:disabled):host[data-size=m]::-webkit-slider-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:focus-visible:host[data-size=m]::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host[data-size=s]::-webkit-slider-thumb{-webkit-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:.5rem;inline-size:.5rem;box-sizing:content-box;background-clip:content-box;border:.25rem solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1));margin-top:-.4375rem}:not(:disabled):host[data-size=s]::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled):host[data-size=s]::-webkit-slider-thumb:hover,:active:not(:disabled):host[data-size=s]::-webkit-slider-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.5)}:focus-visible:host[data-size=s]::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host[data-size=m]::-moz-range-thumb{-moz-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:.75rem;inline-size:.75rem;box-sizing:content-box;background-clip:content-box;border:.125rem solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled):host[data-size=m]::-moz-range-thumb{cursor:ew-resize}:not(:disabled):host[data-size=m]::-moz-range-thumb:hover,:active:not(:disabled):host[data-size=m]::-moz-range-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:focus-visible:host[data-size=m]::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host[data-size=s]::-moz-range-thumb{-moz-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:.5rem;inline-size:.5rem;box-sizing:content-box;background-clip:content-box;border:.25rem solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled):host[data-size=s]::-moz-range-thumb{cursor:ew-resize}:not(:disabled):host[data-size=s]::-moz-range-thumb:hover,:active:not(:disabled):host[data-size=s]::-moz-range-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.5)}:focus-visible:host[data-size=s]::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host::-moz-range-progress{border-radius:inherit}:host::-moz-range-progress{block-size:.125rem;background:currentColor;border-start-end-radius:0;border-end-end-radius:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
65
65
|
}
|
|
66
66
|
__decorate([
|
|
67
67
|
tuiPure
|
|
@@ -81,7 +81,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
81
81
|
'[style.--tui-slider-segment-width.%]': 'segmentWidth',
|
|
82
82
|
'[style.--tui-slider-fill-ratio]': 'valueRatio',
|
|
83
83
|
'[attr.data-size]': 'size',
|
|
84
|
-
}, styles: [":host{position:relative;display:block;
|
|
84
|
+
}, styles: [":host{position:relative;display:block;inline-size:100%;color:var(--tui-background-accent-1);cursor:pointer;-webkit-appearance:none;appearance:none;block-size:.125rem;padding:.4375rem 0;background-color:transparent;background-clip:content-box;outline:none;border-radius:var(--tui-radius-m)}:host:active{cursor:ew-resize}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:auto}:host[data-size=s]:not(:disabled):before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.25rem;left:calc(var(--tui-slider-fill-ratio) * 100% - var(--tui-slider-fill-ratio) * .5rem);inline-size:.5rem;block-size:.5rem;border-radius:50%;transform:var(--tui-slider-thumb-transform, scale(1));content:\"\";cursor:ew-resize;background:currentColor;opacity:0}:host[data-size=s]:active:before{opacity:.2;transform:var(--tui-slider-thumb-transform, scale(1)) scale(2.33)}:host[data-size=m]:not(:disabled):before{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:.125rem;left:calc(var(--tui-slider-fill-ratio) * 100% - var(--tui-slider-fill-ratio) * .75rem);inline-size:.75rem;block-size:.75rem;border-radius:50%;transform:var(--tui-slider-thumb-transform, scale(1));content:\"\";cursor:ew-resize;background:currentColor;opacity:0}:host[data-size=m]:active:before{opacity:.2;transform:var(--tui-slider-thumb-transform, scale(1)) scale(2.33)}:host::-webkit-slider-container{border-radius:inherit}:host[data-size=m]::-webkit-slider-runnable-track{block-size:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .5rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-text-tertiary) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor calc(100% * var(--tui-slider-fill-ratio)),transparent calc(100% * var(--tui-slider-fill-ratio)));background-position-x:0,.25rem,0;background-size:calc(100% - .75rem),calc(100% - .75rem),auto}:host[data-size=s]::-webkit-slider-runnable-track{block-size:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-text-tertiary) 0 .25rem,transparent 0 var(--tui-slider-segment-width)),linear-gradient(to right,currentColor calc(100% * var(--tui-slider-fill-ratio)),transparent calc(100% * var(--tui-slider-fill-ratio)));background-position-x:0,.125rem,0;background-size:calc(100% - .5rem),calc(100% - .5rem),auto}:host[data-size=m]::-moz-range-track{block-size:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .5rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-text-tertiary) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.25rem;background-size:calc(100% - .75rem)}:host[data-size=s]::-moz-range-track{block-size:.125rem;border-radius:inherit;background-repeat:no-repeat;background-color:var(--tui-slider-track-color);background-image:linear-gradient(to right,currentColor 0px .375rem,transparent .25rem),repeating-linear-gradient(to right,var(--tui-text-tertiary) 0 .25rem,transparent 0 var(--tui-slider-segment-width));background-position-x:0,.125rem;background-size:calc(100% - .5rem)}:host[data-size=m]::-webkit-slider-thumb{-webkit-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:.75rem;inline-size:.75rem;box-sizing:content-box;background-clip:content-box;border:.125rem solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1));margin-top:-.4375rem}:not(:disabled):host[data-size=m]::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled):host[data-size=m]::-webkit-slider-thumb:hover,:active:not(:disabled):host[data-size=m]::-webkit-slider-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:focus-visible:host[data-size=m]::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host[data-size=s]::-webkit-slider-thumb{-webkit-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:.5rem;inline-size:.5rem;box-sizing:content-box;background-clip:content-box;border:.25rem solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1));margin-top:-.4375rem}:not(:disabled):host[data-size=s]::-webkit-slider-thumb{cursor:ew-resize}:not(:disabled):host[data-size=s]::-webkit-slider-thumb:hover,:active:not(:disabled):host[data-size=s]::-webkit-slider-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.5)}:focus-visible:host[data-size=s]::-webkit-slider-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host[data-size=m]::-moz-range-thumb{-moz-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:.75rem;inline-size:.75rem;box-sizing:content-box;background-clip:content-box;border:.125rem solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled):host[data-size=m]::-moz-range-thumb{cursor:ew-resize}:not(:disabled):host[data-size=m]::-moz-range-thumb:hover,:active:not(:disabled):host[data-size=m]::-moz-range-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.333)}:focus-visible:host[data-size=m]::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host[data-size=s]::-moz-range-thumb{-moz-transition-property:transform;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;isolation:isolate;-webkit-appearance:none;appearance:none;background-color:currentColor;box-shadow:none;border-radius:50%;block-size:.5rem;inline-size:.5rem;box-sizing:content-box;background-clip:content-box;border:.25rem solid transparent;border-inline-start:0;border-inline-end:0;transform:var(--tui-slider-thumb-transform, scale(1))}:not(:disabled):host[data-size=s]::-moz-range-thumb{cursor:ew-resize}:not(:disabled):host[data-size=s]::-moz-range-thumb:hover,:active:not(:disabled):host[data-size=s]::-moz-range-thumb{transform:var(--tui-slider-thumb-transform, scale(1)) scale(1.5)}:focus-visible:host[data-size=s]::-moz-range-thumb{box-shadow:0 0 0 2px inset var(--tui-border-focus)}:host::-moz-range-progress{border-radius:inherit}:host::-moz-range-progress{block-size:.125rem;background:currentColor;border-start-end-radius:0;border-end-end-radius:0}\n"] }]
|
|
85
85
|
}], ctorParameters: function () { return []; }, propDecorators: { size: [{
|
|
86
86
|
type: Input
|
|
87
87
|
}], segments: [{
|
|
@@ -3,13 +3,13 @@ import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
class TuiStatusStyles {
|
|
5
5
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStatusStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiStatusStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-status" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiStatus]{display:inline-flex;align-items:center;gap:.5rem}[tuiStatus]:before{content:\"\";display:var(--t-status, none);
|
|
6
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiStatusStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-status" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiStatus]{display:inline-flex;align-items:center;gap:.5rem}[tuiStatus]:before{content:\"\";display:var(--t-status, none);inline-size:.5rem;block-size:.5rem;border-radius:100%;background:var(--t-status)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
7
7
|
}
|
|
8
8
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStatusStyles, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
11
11
|
class: 'tui-status',
|
|
12
|
-
}, styles: ["[tuiStatus]{display:inline-flex;align-items:center;gap:.5rem}[tuiStatus]:before{content:\"\";display:var(--t-status, none);
|
|
12
|
+
}, styles: ["[tuiStatus]{display:inline-flex;align-items:center;gap:.5rem}[tuiStatus]:before{content:\"\";display:var(--t-status, none);inline-size:.5rem;block-size:.5rem;border-radius:100%;background:var(--t-status)}\n"] }]
|
|
13
13
|
}] });
|
|
14
14
|
class TuiStatus {
|
|
15
15
|
constructor() {
|
|
@@ -36,7 +36,7 @@ class TuiStep {
|
|
|
36
36
|
this.stepper.activate(this.index);
|
|
37
37
|
}
|
|
38
38
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStep, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiStep, isStandalone: true, selector: "button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]", inputs: { stepState: "stepState", icon: "icon" }, host: { listeners: { "click": "activate()" }, properties: { "attr.data-state": "stepState", "class._vertical": "isVertical", "class._focus-visible": "focusVisible", "class._active": "isActive", "tabIndex": "tabIndex" } }, ngImport: i0, template: "<tui-icon\n *ngIf=\"icon\"\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon\"\n/>\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--tui-text-action);margin-right:1.5rem;outline:none;cursor:pointer;counter-increment:steps;text-align:
|
|
39
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiStep, isStandalone: true, selector: "button[tuiStep], a[tuiStep]:not([routerLink]), a[tuiStep][routerLink][routerLinkActive]", inputs: { stepState: "stepState", icon: "icon" }, host: { listeners: { "click": "activate()" }, properties: { "attr.data-state": "stepState", "class._vertical": "isVertical", "class._focus-visible": "focusVisible", "class._active": "isActive", "tabIndex": "tabIndex" } }, ngImport: i0, template: "<tui-icon\n *ngIf=\"icon\"\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon\"\n/>\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--tui-text-action);margin-right:1.5rem;outline:none;cursor:pointer;counter-increment:steps;text-align:start}:host:disabled{pointer-events:none;color:var(--tui-text-secondary)}:host:hover{color:var(--tui-text-action-hover)}:host:not(:last-of-type)._vertical{margin-bottom:1.25rem}:host._active,:host._active:hover{color:var(--tui-text-primary);cursor:default}:host:focus-visible:before{content:\"\";position:absolute;left:2.75rem;right:0;top:50%;block-size:1.5rem;margin-top:-.75rem;background:var(--tui-service-selection-background)}.t-marker{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;inline-size:2rem;block-size:2rem;border-radius:100%;margin-right:.75rem;flex-shrink:0;align-items:center;align-self:flex-start;justify-content:center;background:var(--tui-background-neutral-1);color:var(--tui-text-action);border:.5rem solid transparent;box-sizing:border-box}:host:disabled .t-marker{background:var(--tui-background-neutral-1);color:var(--tui-text-secondary)}.t-marker_index:before{content:counter(steps)}:host:hover .t-marker_index{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}:host._active .t-marker_index{color:var(--tui-text-primary-on-accent-1);background:var(--tui-background-accent-1)}:host:not([data-state=normal]):not(._active) .t-marker_index,:host:not(._active) .t-marker_custom~.t-marker_index{display:none}.t-marker_error{background:var(--tui-status-negative-pale);color:var(--tui-status-negative)}:host:hover .t-marker_error{background:var(--tui-status-negative-pale-hover);color:var(--tui-status-negative)}:host:not([data-state=error]) .t-marker_error,:host._active .t-marker_error{display:none}:host:not([data-state=pass]) .t-marker_pass,:host._active .t-marker_pass{display:none}:host:not([data-state=normal]) .t-marker_custom,:host._active .t-marker_custom{display:none}:host:hover .t-marker_custom{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
40
40
|
}
|
|
41
41
|
export { TuiStep };
|
|
42
42
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStep, decorators: [{
|
|
@@ -48,10 +48,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
48
48
|
'[class._active]': 'isActive',
|
|
49
49
|
'[tabIndex]': 'tabIndex',
|
|
50
50
|
'(click)': 'activate()',
|
|
51
|
-
}, template: "<tui-icon\n *ngIf=\"icon\"\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon\"\n/>\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--tui-text-action);margin-right:1.5rem;outline:none;cursor:pointer;counter-increment:steps;text-align:
|
|
51
|
+
}, template: "<tui-icon\n *ngIf=\"icon\"\n class=\"t-marker t-marker_custom\"\n [icon]=\"icon\"\n/>\n<tui-icon\n class=\"t-marker t-marker_error\"\n [icon]=\"icons.error\"\n/>\n<tui-icon\n class=\"t-marker t-marker_pass\"\n [icon]=\"icons.check\"\n/>\n<div class=\"t-marker t-marker_index\"></div>\n<ng-content />\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;flex-shrink:0;color:var(--tui-text-action);margin-right:1.5rem;outline:none;cursor:pointer;counter-increment:steps;text-align:start}:host:disabled{pointer-events:none;color:var(--tui-text-secondary)}:host:hover{color:var(--tui-text-action-hover)}:host:not(:last-of-type)._vertical{margin-bottom:1.25rem}:host._active,:host._active:hover{color:var(--tui-text-primary);cursor:default}:host:focus-visible:before{content:\"\";position:absolute;left:2.75rem;right:0;top:50%;block-size:1.5rem;margin-top:-.75rem;background:var(--tui-service-selection-background)}.t-marker{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;inline-size:2rem;block-size:2rem;border-radius:100%;margin-right:.75rem;flex-shrink:0;align-items:center;align-self:flex-start;justify-content:center;background:var(--tui-background-neutral-1);color:var(--tui-text-action);border:.5rem solid transparent;box-sizing:border-box}:host:disabled .t-marker{background:var(--tui-background-neutral-1);color:var(--tui-text-secondary)}.t-marker_index:before{content:counter(steps)}:host:hover .t-marker_index{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}:host._active .t-marker_index{color:var(--tui-text-primary-on-accent-1);background:var(--tui-background-accent-1)}:host:not([data-state=normal]):not(._active) .t-marker_index,:host:not(._active) .t-marker_custom~.t-marker_index{display:none}.t-marker_error{background:var(--tui-status-negative-pale);color:var(--tui-status-negative)}:host:hover .t-marker_error{background:var(--tui-status-negative-pale-hover);color:var(--tui-status-negative)}:host:not([data-state=error]) .t-marker_error,:host._active .t-marker_error{display:none}:host:not([data-state=pass]) .t-marker_pass,:host._active .t-marker_pass{display:none}:host:not([data-state=normal]) .t-marker_custom,:host._active .t-marker_custom{display:none}:host:hover .t-marker_custom{color:var(--tui-text-action-hover);background:var(--tui-background-neutral-1-hover)}\n"] }]
|
|
52
52
|
}], ctorParameters: function () { return []; }, propDecorators: { stepState: [{
|
|
53
53
|
type: Input
|
|
54
54
|
}], icon: [{
|
|
55
55
|
type: Input
|
|
56
56
|
}] } });
|
|
57
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
57
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RlcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9raXQvY29tcG9uZW50cy9zdGVwcGVyL3N0ZXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2l0L2NvbXBvbmVudHMvc3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WNvblwiXG4vPlxuPHR1aS1pY29uXG4gICAgY2xhc3M9XCJ0LW1hcmtlciB0LW1hcmtlcl9lcnJvclwiXG4gICAgW2ljb25dPVwiaWNvbnMuZXJyb3JcIlxuLz5cbjx0dWktaWNvblxuICAgIGNsYXNzPVwidC1tYXJrZXIgdC1tYXJrZXJfcGFzc1wiXG4gICAgW2ljb25dPVwiaWNvbnMuY2hlY2tcIlxuLz5cbjxkaXYgY2xhc3M9XCJ0LW1hcmtlciB0LW1hcmtlcl9pbmRleFwiPjwvZGl2PlxuPG5nLWNvbnRlbnQgLz5cbiJdfQ==
|
|
@@ -28,7 +28,7 @@ class TuiSwitch {
|
|
|
28
28
|
return this.showIcons && icon ? `url(${resolver(icon)})` : null;
|
|
29
29
|
}
|
|
30
30
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSwitch, isStandalone: true, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: { size: "size", showIcons: "showIcons" }, host: { attributes: { "role": "switch" }, properties: { "disabled": "!control || control.disabled", "attr.data-size": "size", "class._readonly": "!control", "style.--t-checked-icon": "icon" } }, hostDirectives: [{ directive: i1.TuiWithAppearance }, { directive: i2.TuiNativeValidator }], ngImport: i0, template: '', isInline: true, styles: ["[tuiSwitch]{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;
|
|
31
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSwitch, isStandalone: true, selector: "input[type=\"checkbox\"][tuiSwitch]", inputs: { size: "size", showIcons: "showIcons" }, host: { attributes: { "role": "switch" }, properties: { "disabled": "!control || control.disabled", "attr.data-size": "size", "class._readonly": "!control", "style.--t-checked-icon": "icon" } }, hostDirectives: [{ directive: i1.TuiWithAppearance }, { directive: i2.TuiNativeValidator }], ngImport: i0, template: '', isInline: true, styles: ["[tuiSwitch]{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:3rem;block-size:1.5rem;border-radius:2rem;overflow:hidden;cursor:pointer;margin:0;flex-shrink:0;color:#fff!important}[tuiSwitch][data-size=s]{block-size:1rem;inline-size:2rem}[tuiSwitch][data-size=s]:before{inline-size:1rem;transform:translate(-1rem);-webkit-mask-size:.75rem;mask-size:.75rem}[tuiSwitch][data-size=s]:after{inline-size:1rem;box-shadow:-2.625rem 0 0 .5rem currentColor;outline-width:.167rem;transform:scale(.375)}[tuiSwitch][data-size=s]:checked:after{transform:scale(.375) translate(2.625rem)}[tuiSwitch]:checked:before{transform:none}[tuiSwitch]:checked:after{transform:scale(.33333) translate(4.5rem)}[tuiSwitch]:disabled._readonly{opacity:1}[tuiSwitch]:before,[tuiSwitch]:after{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;block-size:100%;inline-size:1.5rem}[tuiSwitch]:before{display:var(--t-checked-icon, none);background:currentColor;-webkit-mask:var(--t-checked-icon) no-repeat center;mask:var(--t-checked-icon) no-repeat center;-webkit-mask-size:1rem;mask-size:1rem;transform:translate(-1.5rem)}[tuiSwitch]:after{right:0;border-radius:100%;transform:scale(.33333);box-shadow:-4.5rem 0 0 .75rem currentColor;outline:.375rem solid var(--tui-background-neutral-2-pressed);outline-offset:var(--t-checked-icon, 20rem)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
32
32
|
}
|
|
33
33
|
export { TuiSwitch };
|
|
34
34
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSwitch, decorators: [{
|
|
@@ -39,7 +39,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
39
39
|
'[attr.data-size]': 'size',
|
|
40
40
|
'[class._readonly]': '!control',
|
|
41
41
|
'[style.--t-checked-icon]': 'icon',
|
|
42
|
-
}, styles: ["[tuiSwitch]{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;
|
|
42
|
+
}, styles: ["[tuiSwitch]{transition-property:background,box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;inline-size:3rem;block-size:1.5rem;border-radius:2rem;overflow:hidden;cursor:pointer;margin:0;flex-shrink:0;color:#fff!important}[tuiSwitch][data-size=s]{block-size:1rem;inline-size:2rem}[tuiSwitch][data-size=s]:before{inline-size:1rem;transform:translate(-1rem);-webkit-mask-size:.75rem;mask-size:.75rem}[tuiSwitch][data-size=s]:after{inline-size:1rem;box-shadow:-2.625rem 0 0 .5rem currentColor;outline-width:.167rem;transform:scale(.375)}[tuiSwitch][data-size=s]:checked:after{transform:scale(.375) translate(2.625rem)}[tuiSwitch]:checked:before{transform:none}[tuiSwitch]:checked:after{transform:scale(.33333) translate(4.5rem)}[tuiSwitch]:disabled._readonly{opacity:1}[tuiSwitch]:before,[tuiSwitch]:after{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;block-size:100%;inline-size:1.5rem}[tuiSwitch]:before{display:var(--t-checked-icon, none);background:currentColor;-webkit-mask:var(--t-checked-icon) no-repeat center;mask:var(--t-checked-icon) no-repeat center;-webkit-mask-size:1rem;mask-size:1rem;transform:translate(-1.5rem)}[tuiSwitch]:after{right:0;border-radius:100%;transform:scale(.33333);box-shadow:-4.5rem 0 0 .75rem currentColor;outline:.375rem solid var(--tui-background-neutral-2-pressed);outline-offset:var(--t-checked-icon, 20rem)}\n"] }]
|
|
43
43
|
}], propDecorators: { size: [{
|
|
44
44
|
type: Input
|
|
45
45
|
}], showIcons: [{
|