@taiga-ui/core 4.52.0-canary.6be767f → 4.52.0-canary.6de148b
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/classes/accessors.d.ts +1 -1
- package/components/calendar/calendar-sheet.options.d.ts +1 -3
- package/{pipes/calendar-sheet → components/calendar}/calendar-sheet.pipe.d.ts +1 -1
- package/components/calendar/calendar-spin.component.d.ts +1 -0
- package/components/calendar/calendar-year.component.d.ts +1 -1
- package/components/calendar/index.d.ts +2 -0
- package/components/data-list/data-list.component.d.ts +8 -12
- package/components/data-list/data-list.d.ts +3 -4
- package/components/data-list/data-list.tokens.d.ts +1 -23
- package/components/data-list/index.d.ts +3 -4
- package/components/data-list/opt-group.directive.d.ts +2 -2
- package/components/data-list/option-content.directive.d.ts +14 -0
- package/components/data-list/option-with-value.directive.d.ts +9 -0
- package/components/data-list/option.directive.d.ts +19 -0
- package/components/error/error.component.d.ts +1 -1
- package/components/icon/icon.component.d.ts +2 -2
- package/components/index.d.ts +2 -3
- package/components/input/index.d.ts +2 -0
- package/components/input/input.d.ts +2 -0
- package/components/input/input.directive.d.ts +30 -0
- package/components/link/link.directive.d.ts +2 -2
- package/components/link/link.options.d.ts +1 -3
- package/components/loader/loader.component.d.ts +7 -7
- package/components/loader/loader.options.d.ts +1 -3
- package/components/notification/index.d.ts +3 -0
- package/components/notification/notification.component.d.ts +14 -0
- package/components/notification/notification.d.ts +3 -0
- package/components/notification/notification.directive.d.ts +7 -12
- package/components/notification/notification.options.d.ts +10 -7
- package/components/notification/notification.service.d.ts +17 -0
- package/components/root/root.component.d.ts +2 -2
- package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
- package/components/scrollbar/scrollbar.component.d.ts +2 -2
- package/components/scrollbar/scrollbar.directive.d.ts +2 -2
- package/components/spin-button/spin-button.component.d.ts +8 -9
- package/components/textfield/index.d.ts +0 -1
- package/components/textfield/textfield-multi/textfield-item.component.d.ts +3 -2
- package/components/textfield/textfield-multi/textfield-multi.component.d.ts +10 -14
- package/components/textfield/textfield.component.d.ts +23 -36
- package/components/textfield/textfield.d.ts +2 -3
- package/components/textfield/textfield.options.d.ts +8 -11
- package/directives/appearance/appearance.directive.d.ts +1 -1
- package/directives/appearance/appearance.options.d.ts +1 -1
- package/directives/date-format/date-format.directive.d.ts +3 -7
- package/directives/group/group.directive.d.ts +7 -7
- package/directives/group/group.options.d.ts +1 -3
- package/directives/index.d.ts +0 -4
- package/directives/number-format/number-format.directive.d.ts +3 -7
- package/fesm2022/taiga-ui-core-animations.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-classes.mjs +6 -8
- package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs +123 -25
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-cell.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +105 -274
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-error.mjs +4 -3
- package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +3 -4
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-input.mjs +95 -0
- package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-link.mjs +10 -16
- package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-loader.mjs +14 -32
- package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-notification.mjs +98 -41
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +6 -18
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +36 -45
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-spin-button.mjs +14 -27
- package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +102 -307
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/{taiga-ui-core-directives-title.mjs → taiga-ui-core-components-title.mjs} +1 -1
- package/fesm2022/taiga-ui-core-components-title.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components.mjs +2 -3
- package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +6 -6
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-date-format.mjs +24 -18
- package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-group.mjs +17 -29
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +2 -2
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +3 -6
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-number-format.mjs +30 -18
- package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives.mjs +0 -4
- package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs +19 -13
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes.mjs +0 -7
- package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-alert.mjs +73 -0
- package/fesm2022/taiga-ui-core-portals-alert.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-portals-dialog.mjs +158 -0
- package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -0
- package/fesm2022/{taiga-ui-core-directives-dropdown.mjs → taiga-ui-core-portals-dropdown.mjs} +113 -258
- package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -0
- package/fesm2022/{taiga-ui-core-directives-hint.mjs → taiga-ui-core-portals-hint.mjs} +100 -190
- package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-portals-modal.mjs +89 -0
- package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -0
- package/fesm2022/{taiga-ui-core-directives-popup.mjs → taiga-ui-core-portals-popup.mjs} +5 -5
- package/fesm2022/taiga-ui-core-portals-popup.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-portals.mjs +11 -0
- package/fesm2022/taiga-ui-core-portals.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-services.mjs +3 -23
- package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +22 -21
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-dom.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-format.mjs +1 -22
- package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +8 -17
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
- package/fesm2022/taiga-ui-core.mjs +1 -0
- package/fesm2022/taiga-ui-core.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +77 -94
- package/pipes/format-number/format-number.pipe.d.ts +6 -4
- package/pipes/index.d.ts +0 -7
- package/portals/alert/alert.directive.d.ts +11 -0
- package/portals/alert/alert.service.d.ts +12 -0
- package/portals/alert/index.d.ts +2 -0
- package/{components → portals}/dialog/dialog.component.d.ts +3 -4
- package/portals/dialog/dialog.directive.d.ts +8 -0
- package/{components → portals}/dialog/dialog.options.d.ts +2 -3
- package/{components → portals}/dialog/dialog.providers.d.ts +1 -2
- package/portals/dialog/dialog.service.d.ts +10 -0
- package/{components → portals}/dialog/index.d.ts +0 -1
- package/{directives → portals}/dropdown/dropdown-hover.directive.d.ts +5 -10
- package/{directives → portals}/dropdown/dropdown-hover.options.d.ts +1 -3
- package/{directives → portals}/dropdown/dropdown-manual.directive.d.ts +2 -2
- package/portals/dropdown/dropdown-open.directive.d.ts +30 -0
- package/{directives → portals}/dropdown/dropdown-position-sided.directive.d.ts +3 -3
- package/{directives → portals}/dropdown/dropdown-position.directive.d.ts +5 -5
- package/{directives → portals}/dropdown/dropdown-selection.directive.d.ts +4 -5
- package/{directives → portals}/dropdown/dropdown.bindings.d.ts +0 -1
- package/{directives → portals}/dropdown/dropdown.d.ts +1 -2
- package/{directives → portals}/dropdown/dropdown.directive.d.ts +6 -8
- package/{directives → portals}/dropdown/index.d.ts +0 -3
- package/{directives → portals}/hint/hint-describe.directive.d.ts +4 -6
- package/{directives → portals}/hint/hint-host.directive.d.ts +2 -2
- package/{directives → portals}/hint/hint-hover.directive.d.ts +3 -4
- package/{directives → portals}/hint/hint-manual.directive.d.ts +2 -2
- package/{directives → portals}/hint/hint-options.directive.d.ts +1 -1
- package/{directives → portals}/hint/hint-overflow.directive.d.ts +2 -2
- package/{directives → portals}/hint/hint-position.directive.d.ts +4 -5
- package/{directives → portals}/hint/hint-unstyled.component.d.ts +2 -7
- package/{directives → portals}/hint/hint.component.d.ts +7 -6
- package/portals/hint/hint.directive.d.ts +24 -0
- package/{directives → portals}/hint/index.d.ts +0 -2
- package/portals/index.d.ts +6 -0
- package/portals/modal/index.d.ts +2 -0
- package/portals/modal/modal.component.d.ts +17 -0
- package/portals/modal/modal.service.d.ts +13 -0
- package/services/index.d.ts +0 -1
- package/styles/components/link.less +1 -0
- package/styles/components/textfield.less +10 -7
- package/styles/mixins/appearance.less +1 -1
- package/styles/mixins/mixins.less +0 -5
- package/styles/mixins/mixins.scss +0 -5
- package/styles/mixins/slider.scss +1 -2
- package/styles/theme/variables.less +2 -4
- package/tokens/common-icons.d.ts +1 -3
- package/tokens/date-format.d.ts +2 -3
- package/tokens/i18n.d.ts +7 -7
- package/tokens/icons.d.ts +0 -4
- package/tokens/number-format.d.ts +2 -3
- package/types/index.d.ts +0 -3
- package/types/size.d.ts +0 -11
- package/utils/format/index.d.ts +0 -1
- package/utils/miscellaneous/get-duration.d.ts +2 -0
- package/utils/miscellaneous/index.d.ts +1 -1
- package/components/alert/alert.component.d.ts +0 -15
- package/components/alert/alert.directive.d.ts +0 -7
- package/components/alert/alert.interfaces.d.ts +0 -12
- package/components/alert/alert.service.d.ts +0 -7
- package/components/alert/alert.tokens.d.ts +0 -12
- package/components/alert/alerts.component.d.ts +0 -12
- package/components/alert/index.d.ts +0 -6
- package/components/data-list/data-list.directive.d.ts +0 -7
- package/components/data-list/option/option-content.d.ts +0 -16
- package/components/data-list/option/option-legacy.component.d.ts +0 -24
- package/components/data-list/option/option.directive.d.ts +0 -27
- package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
- package/components/dialog/dialog.directive.d.ts +0 -7
- package/components/dialog/dialog.service.d.ts +0 -7
- package/components/dialog/dialogs.component.d.ts +0 -8
- package/components/header/header.directive.d.ts +0 -17
- package/components/header/index.d.ts +0 -1
- package/components/textfield/textfield.directive.d.ts +0 -38
- package/directives/dropdown/dropdown-open-legacy.directive.d.ts +0 -12
- package/directives/dropdown/dropdown-open.directive.d.ts +0 -33
- package/directives/dropdown/dropdown.service.d.ts +0 -6
- package/directives/dropdown/dropdowns.component.d.ts +0 -9
- package/directives/hint/hint.directive.d.ts +0 -26
- package/directives/hint/hint.service.d.ts +0 -13
- package/directives/hint/hints.component.d.ts +0 -12
- package/fesm2022/taiga-ui-core-components-alert.mjs +0 -149
- package/fesm2022/taiga-ui-core-components-alert.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-components-dialog.mjs +0 -215
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-components-header.mjs +0 -42
- package/fesm2022/taiga-ui-core-components-header.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-popup.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-title.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -25
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -94
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -32
- package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -28
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -29
- package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -29
- package/fesm2022/taiga-ui-core-pipes-month.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -36
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +0 -1
- package/pipes/auto-color/auto-color.pipe.d.ts +0 -7
- package/pipes/auto-color/index.d.ts +0 -1
- package/pipes/calendar-sheet/index.d.ts +0 -1
- package/pipes/calendar-sheet/utils.d.ts +0 -20
- package/pipes/flag/flag.pipe.d.ts +0 -14
- package/pipes/flag/index.d.ts +0 -1
- package/pipes/format-date/format-date.pipe.d.ts +0 -9
- package/pipes/format-date/index.d.ts +0 -1
- package/pipes/initials/index.d.ts +0 -1
- package/pipes/initials/initials.pipe.d.ts +0 -7
- package/pipes/month/index.d.ts +0 -1
- package/pipes/month/month.pipe.d.ts +0 -10
- package/pipes/order-week-days/index.d.ts +0 -1
- package/services/format-date.service.d.ts +0 -8
- package/types/portal-item.d.ts +0 -9
- package/types/range-state.d.ts +0 -4
- package/types/value-content-context.d.ts +0 -4
- package/utils/format/string-hash-to-hsl.d.ts +0 -6
- package/utils/miscellaneous/to-animation-options.d.ts +0 -4
- /package/{pipes/order-week-days → components/calendar}/order-week-days.pipe.d.ts +0 -0
- /package/{directives → components}/title/index.d.ts +0 -0
- /package/{directives → components}/title/title.directive.d.ts +0 -0
- /package/{components → portals}/dialog/dialog.factory.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown-content.directive.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown-context.directive.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown-limit-width.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown-options.directive.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown.component.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown.driver.d.ts +0 -0
- /package/{directives → portals}/dropdown/dropdown.providers.d.ts +0 -0
- /package/{directives → portals}/dropdown/with-dropdown-open.directive.d.ts +0 -0
- /package/{directives → portals}/hint/hint-driver.directive.d.ts +0 -0
- /package/{directives → portals}/hint/hint-pointer.directive.d.ts +0 -0
- /package/{directives → portals}/hint/hint.d.ts +0 -0
- /package/{directives → portals}/hint/hint.providers.d.ts +0 -0
- /package/{directives → portals}/popup/index.d.ts +0 -0
- /package/{directives → portals}/popup/popup.directive.d.ts +0 -0
- /package/{directives → portals}/popup/popup.service.d.ts +0 -0
- /package/{directives → portals}/popup/popups.component.d.ts +0 -0
|
@@ -8,11 +8,11 @@ const [TUI_CELL_OPTIONS, tuiCellOptionsProvider] = tuiCreateOptions({ height: 'n
|
|
|
8
8
|
|
|
9
9
|
class Styles {
|
|
10
10
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-cell" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiCell]{--t-padding: .125rem 1rem;--t-radius: var(--tui-radius-s);-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;box-sizing:content-box;isolation:isolate;color:var(--tui-text-primary);padding:var(--t-padding);min-block-size:var(--t-height);border-radius:var(--t-radius)}[tuiCell]:disabled,[tuiCell][data-state=disabled]{opacity:initial;pointer-events:none}[tuiCell]:disabled>*:not([tuiTooltip]),[tuiCell][data-state=disabled]>*:not([tuiTooltip]){opacity:var(--tui-disabled-opacity)}[tuiCell]:is(label):has(input:disabled){opacity:initial;pointer-events:none}[tuiCell]:is(label):has(input:disabled)>*:not([tuiTooltip]){opacity:var(--tui-disabled-opacity)}[tuiCell] [tuiAccessories]{position:relative;display:flex;max-block-size:var(--t-height);align-items:center;align-self:stretch}[tuiCell] [tuiCellActions][tuiCellActions]{position:absolute;right:0;z-index:1;padding-inline-end:inherit;--t-group-mask: none;--t-group-mask-end: none;--t-group-mask-start: none}[tuiCell] [tuiCellActions][tuiCellActions]~*{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}[tuiCell] [tuiCellActions][tuiCellActions] button,[tuiCell] [tuiCellActions][tuiCellActions] a{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}[tuiCell] [tuiCellActions][tuiCellActions] button:focus-visible,[tuiCell] [tuiCellActions][tuiCellActions] a:focus-visible{opacity:1}[tuiCell] [tuiSubtitle]{display:flex;align-items:center;gap:.25rem;color:var(--tui-text-secondary)}[tuiCell] [tuiTitle]{flex-shrink:7;margin-inline-end:auto;align-items:normal;text-align:start}[tuiCell] [tuiTitle]~[tuiTitle]{flex-shrink:3;margin-inline-end:0;text-align:end;align-items:flex-end}[tuiCell] [tuiTitle]~[tuiTitle][tuiFade]{align-items:flex-start}[tuiCell] tui-badge-notification[data-size=xs]{position:absolute;top:50%;transform:translateY(-50%);left:-.625rem}[tuiCell][data-size=s]{--t-height: calc(var(--tui-height-s) - .125rem);--t-padding: .1875rem 1rem}[tuiCell][data-size=s][data-height=spacious]{--t-padding: .4375rem 1rem}[tuiCell][data-size=s][data-height=compact]{--t-height: calc(var(--tui-height-s) - .25rem);--t-padding: 0 1rem}[tuiCell][data-size=s] [tuiTitle]{max-block-size:100%;font:var(--tui-font-text-ui-s);gap:0}[tuiCell][data-size=s] [tuiSubtitle]{font:var(--tui-font-text-ui-xs)}[tuiCell][data-size=s]
|
|
11
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-cell" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiCell]{--t-padding: .125rem 1rem;--t-radius: var(--tui-radius-s);-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;text-align:start;box-sizing:content-box;isolation:isolate;color:var(--tui-text-primary);padding:var(--t-padding);min-block-size:var(--t-height);border-radius:var(--t-radius)}[tuiCell]:disabled,[tuiCell][data-state=disabled]{opacity:initial;pointer-events:none}[tuiCell]:disabled>*:not([tuiTooltip]),[tuiCell][data-state=disabled]>*:not([tuiTooltip]){opacity:var(--tui-disabled-opacity)}[tuiCell]:is(label):has(input:disabled){opacity:initial;pointer-events:none}[tuiCell]:is(label):has(input:disabled)>*:not([tuiTooltip]){opacity:var(--tui-disabled-opacity)}[tuiCell] [tuiAccessories]{position:relative;display:flex;max-block-size:var(--t-height);align-items:center;align-self:stretch}[tuiCell] [tuiCellActions][tuiCellActions]{position:absolute;right:0;z-index:1;padding-inline-end:inherit;--t-group-mask: none;--t-group-mask-end: none;--t-group-mask-start: none}[tuiCell] [tuiCellActions][tuiCellActions]~*{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}[tuiCell] [tuiCellActions][tuiCellActions] button,[tuiCell] [tuiCellActions][tuiCellActions] a{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}[tuiCell] [tuiCellActions][tuiCellActions] button:focus-visible,[tuiCell] [tuiCellActions][tuiCellActions] a:focus-visible{opacity:1}[tuiCell] [tuiSubtitle]{display:flex;align-items:center;gap:.25rem;color:var(--tui-text-secondary)}[tuiCell] [tuiTitle]{flex-shrink:7;margin-inline-end:auto;align-items:normal;text-align:start}[tuiCell] [tuiTitle]~[tuiTitle]{flex-shrink:3;margin-inline-end:0;text-align:end;align-items:flex-end}[tuiCell] [tuiTitle]~[tuiTitle][tuiFade]{align-items:flex-start}[tuiCell] tui-badge-notification[data-size=xs]{position:absolute;top:50%;transform:translateY(-50%);left:-.625rem}[tuiCell][data-size=s]{--t-height: calc(var(--tui-height-s) - .125rem);--t-padding: .1875rem 1rem;gap:.5rem}[tuiCell][data-size=s][data-height=spacious]{--t-padding: .4375rem 1rem}[tuiCell][data-size=s][data-height=compact]{--t-height: calc(var(--tui-height-s) - .25rem);--t-padding: 0 1rem}[tuiCell][data-size=s] [tuiTitle]{max-block-size:100%;font:var(--tui-font-text-ui-s);gap:0}[tuiCell][data-size=s] [tuiSubtitle]{font:var(--tui-font-text-ui-xs)}[tuiCell][data-size=s]>[tuiAvatar],[tuiCell][data-size=s]>tui-avatar-stack [tuiAvatar],[tuiCell][data-size=s]>[tuiAccessories] [tuiAvatar],[tuiCell][data-size=s]>[tuiAccessories] tui-avatar-stack [tuiAvatar]{--t-size: 1.5rem;font:var(--tui-font-text-m);font-size:.5625rem}[tuiCell][data-size=m]{--t-height: calc(var(--tui-height-m) - .75rem);--t-padding: .375rem 1rem;gap:.75rem}[tuiCell][data-size=m][data-height=spacious]{--t-padding: 1rem}[tuiCell][data-size=m][data-height=compact]{--t-height: calc(var(--tui-height-m) - .5rem);--t-padding: 0 1rem}[tuiCell][data-size=m] [tuiTitle]{font:var(--tui-font-text-ui-s);gap:.125rem}[tuiCell][data-size=m] [tuiSubtitle]{font:var(--tui-font-text-ui-xs)}[tuiCell][data-size=m]>[tuiAvatar],[tuiCell][data-size=m]>tui-avatar-stack [tuiAvatar],[tuiCell][data-size=m]>[tuiAccessories] [tuiAvatar],[tuiCell][data-size=m]>[tuiAccessories] tui-avatar-stack [tuiAvatar]{--t-size: 2rem;align-self:flex-start}[tuiCell][data-size=l]{--t-height: calc(var(--tui-height-l) - 1rem);--t-padding: .5rem 1rem;--t-radius: var(--tui-radius-l);gap:1rem}[tuiCell][data-size=l][data-height=spacious]{--t-padding: 1.25rem 1rem}[tuiCell][data-size=l][data-height=compact]{--t-height: calc(var(--tui-height-l) - 1rem);--t-padding: 0 1rem}[tuiCell][data-size=l]>[tuiAvatar],[tuiCell][data-size=l]>tui-avatar-stack [tuiAvatar],[tuiCell][data-size=l]>[tuiAccessories] [tuiAvatar],[tuiCell][data-size=l]>[tuiAccessories] tui-avatar-stack [tuiAvatar]{--t-size: 2.5rem;font:var(--tui-font-text-m);font-weight:700;align-self:flex-start}[tuiCell]:hover [tuiCellActions]~*{opacity:0}[tuiCell]:hover [tuiCellActions] button,[tuiCell]:hover [tuiCellActions] a,[tuiCell]:hover [tuiCellActions] label{opacity:1}[tuiCell]:focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:-.125rem}[tuiOption] [tuiCell],tui-primitive-textfield [tuiCell],tui-textfield [tuiCell]{padding:0;white-space:nowrap;overflow:hidden;border-radius:0}@media (hover: hover) and (pointer: fine){a[tuiCell]:hover:not(:disabled,[data-state=disabled]),button[tuiCell]:hover:not(:disabled,[data-state=disabled]),label[tuiCell]:hover:not(:disabled,[data-state=disabled]){background:var(--tui-background-neutral-1);cursor:pointer}label[tuiCell]:hover:not(:has(input:disabled)){background:var(--tui-background-neutral-1);cursor:pointer}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
12
12
|
}
|
|
13
13
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
|
|
14
14
|
type: Component,
|
|
15
|
-
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-cell' }, styles: ["[tuiCell]{--t-padding: .125rem 1rem;--t-radius: var(--tui-radius-s);-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;box-sizing:content-box;isolation:isolate;color:var(--tui-text-primary);padding:var(--t-padding);min-block-size:var(--t-height);border-radius:var(--t-radius)}[tuiCell]:disabled,[tuiCell][data-state=disabled]{opacity:initial;pointer-events:none}[tuiCell]:disabled>*:not([tuiTooltip]),[tuiCell][data-state=disabled]>*:not([tuiTooltip]){opacity:var(--tui-disabled-opacity)}[tuiCell]:is(label):has(input:disabled){opacity:initial;pointer-events:none}[tuiCell]:is(label):has(input:disabled)>*:not([tuiTooltip]){opacity:var(--tui-disabled-opacity)}[tuiCell] [tuiAccessories]{position:relative;display:flex;max-block-size:var(--t-height);align-items:center;align-self:stretch}[tuiCell] [tuiCellActions][tuiCellActions]{position:absolute;right:0;z-index:1;padding-inline-end:inherit;--t-group-mask: none;--t-group-mask-end: none;--t-group-mask-start: none}[tuiCell] [tuiCellActions][tuiCellActions]~*{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}[tuiCell] [tuiCellActions][tuiCellActions] button,[tuiCell] [tuiCellActions][tuiCellActions] a{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}[tuiCell] [tuiCellActions][tuiCellActions] button:focus-visible,[tuiCell] [tuiCellActions][tuiCellActions] a:focus-visible{opacity:1}[tuiCell] [tuiSubtitle]{display:flex;align-items:center;gap:.25rem;color:var(--tui-text-secondary)}[tuiCell] [tuiTitle]{flex-shrink:7;margin-inline-end:auto;align-items:normal;text-align:start}[tuiCell] [tuiTitle]~[tuiTitle]{flex-shrink:3;margin-inline-end:0;text-align:end;align-items:flex-end}[tuiCell] [tuiTitle]~[tuiTitle][tuiFade]{align-items:flex-start}[tuiCell] tui-badge-notification[data-size=xs]{position:absolute;top:50%;transform:translateY(-50%);left:-.625rem}[tuiCell][data-size=s]{--t-height: calc(var(--tui-height-s) - .125rem);--t-padding: .1875rem 1rem}[tuiCell][data-size=s][data-height=spacious]{--t-padding: .4375rem 1rem}[tuiCell][data-size=s][data-height=compact]{--t-height: calc(var(--tui-height-s) - .25rem);--t-padding: 0 1rem}[tuiCell][data-size=s] [tuiTitle]{max-block-size:100%;font:var(--tui-font-text-ui-s);gap:0}[tuiCell][data-size=s] [tuiSubtitle]{font:var(--tui-font-text-ui-xs)}[tuiCell][data-size=s]
|
|
15
|
+
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-cell' }, styles: ["[tuiCell]{--t-padding: .125rem 1rem;--t-radius: var(--tui-radius-s);-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;text-align:start;box-sizing:content-box;isolation:isolate;color:var(--tui-text-primary);padding:var(--t-padding);min-block-size:var(--t-height);border-radius:var(--t-radius)}[tuiCell]:disabled,[tuiCell][data-state=disabled]{opacity:initial;pointer-events:none}[tuiCell]:disabled>*:not([tuiTooltip]),[tuiCell][data-state=disabled]>*:not([tuiTooltip]){opacity:var(--tui-disabled-opacity)}[tuiCell]:is(label):has(input:disabled){opacity:initial;pointer-events:none}[tuiCell]:is(label):has(input:disabled)>*:not([tuiTooltip]){opacity:var(--tui-disabled-opacity)}[tuiCell] [tuiAccessories]{position:relative;display:flex;max-block-size:var(--t-height);align-items:center;align-self:stretch}[tuiCell] [tuiCellActions][tuiCellActions]{position:absolute;right:0;z-index:1;padding-inline-end:inherit;--t-group-mask: none;--t-group-mask-end: none;--t-group-mask-start: none}[tuiCell] [tuiCellActions][tuiCellActions]~*{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}[tuiCell] [tuiCellActions][tuiCellActions] button,[tuiCell] [tuiCellActions][tuiCellActions] a{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}[tuiCell] [tuiCellActions][tuiCellActions] button:focus-visible,[tuiCell] [tuiCellActions][tuiCellActions] a:focus-visible{opacity:1}[tuiCell] [tuiSubtitle]{display:flex;align-items:center;gap:.25rem;color:var(--tui-text-secondary)}[tuiCell] [tuiTitle]{flex-shrink:7;margin-inline-end:auto;align-items:normal;text-align:start}[tuiCell] [tuiTitle]~[tuiTitle]{flex-shrink:3;margin-inline-end:0;text-align:end;align-items:flex-end}[tuiCell] [tuiTitle]~[tuiTitle][tuiFade]{align-items:flex-start}[tuiCell] tui-badge-notification[data-size=xs]{position:absolute;top:50%;transform:translateY(-50%);left:-.625rem}[tuiCell][data-size=s]{--t-height: calc(var(--tui-height-s) - .125rem);--t-padding: .1875rem 1rem;gap:.5rem}[tuiCell][data-size=s][data-height=spacious]{--t-padding: .4375rem 1rem}[tuiCell][data-size=s][data-height=compact]{--t-height: calc(var(--tui-height-s) - .25rem);--t-padding: 0 1rem}[tuiCell][data-size=s] [tuiTitle]{max-block-size:100%;font:var(--tui-font-text-ui-s);gap:0}[tuiCell][data-size=s] [tuiSubtitle]{font:var(--tui-font-text-ui-xs)}[tuiCell][data-size=s]>[tuiAvatar],[tuiCell][data-size=s]>tui-avatar-stack [tuiAvatar],[tuiCell][data-size=s]>[tuiAccessories] [tuiAvatar],[tuiCell][data-size=s]>[tuiAccessories] tui-avatar-stack [tuiAvatar]{--t-size: 1.5rem;font:var(--tui-font-text-m);font-size:.5625rem}[tuiCell][data-size=m]{--t-height: calc(var(--tui-height-m) - .75rem);--t-padding: .375rem 1rem;gap:.75rem}[tuiCell][data-size=m][data-height=spacious]{--t-padding: 1rem}[tuiCell][data-size=m][data-height=compact]{--t-height: calc(var(--tui-height-m) - .5rem);--t-padding: 0 1rem}[tuiCell][data-size=m] [tuiTitle]{font:var(--tui-font-text-ui-s);gap:.125rem}[tuiCell][data-size=m] [tuiSubtitle]{font:var(--tui-font-text-ui-xs)}[tuiCell][data-size=m]>[tuiAvatar],[tuiCell][data-size=m]>tui-avatar-stack [tuiAvatar],[tuiCell][data-size=m]>[tuiAccessories] [tuiAvatar],[tuiCell][data-size=m]>[tuiAccessories] tui-avatar-stack [tuiAvatar]{--t-size: 2rem;align-self:flex-start}[tuiCell][data-size=l]{--t-height: calc(var(--tui-height-l) - 1rem);--t-padding: .5rem 1rem;--t-radius: var(--tui-radius-l);gap:1rem}[tuiCell][data-size=l][data-height=spacious]{--t-padding: 1.25rem 1rem}[tuiCell][data-size=l][data-height=compact]{--t-height: calc(var(--tui-height-l) - 1rem);--t-padding: 0 1rem}[tuiCell][data-size=l]>[tuiAvatar],[tuiCell][data-size=l]>tui-avatar-stack [tuiAvatar],[tuiCell][data-size=l]>[tuiAccessories] [tuiAvatar],[tuiCell][data-size=l]>[tuiAccessories] tui-avatar-stack [tuiAvatar]{--t-size: 2.5rem;font:var(--tui-font-text-m);font-weight:700;align-self:flex-start}[tuiCell]:hover [tuiCellActions]~*{opacity:0}[tuiCell]:hover [tuiCellActions] button,[tuiCell]:hover [tuiCellActions] a,[tuiCell]:hover [tuiCellActions] label{opacity:1}[tuiCell]:focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:-.125rem}[tuiOption] [tuiCell],tui-primitive-textfield [tuiCell],tui-textfield [tuiCell]{padding:0;white-space:nowrap;overflow:hidden;border-radius:0}@media (hover: hover) and (pointer: fine){a[tuiCell]:hover:not(:disabled,[data-state=disabled]),button[tuiCell]:hover:not(:disabled,[data-state=disabled]),label[tuiCell]:hover:not(:disabled,[data-state=disabled]){background:var(--tui-background-neutral-1);cursor:pointer}label[tuiCell]:hover:not(:has(input:disabled)){background:var(--tui-background-neutral-1);cursor:pointer}}\n"] }]
|
|
16
16
|
}] });
|
|
17
17
|
class TuiCell {
|
|
18
18
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-cell.mjs","sources":["../../../projects/core/components/cell/cell.options.ts","../../../projects/core/components/cell/cell.directive.ts","../../../projects/core/components/cell/taiga-ui-core-components-cell.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiCellOptions {\n readonly height: 'compact' | 'normal' | 'spacious';\n readonly size: TuiSizeL | TuiSizeS | '';\n}\n\nexport const [TUI_CELL_OPTIONS, tuiCellOptionsProvider] =\n tuiCreateOptions<TuiCellOptions>({height: 'normal', size: 'l'});\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\n\nimport {TUI_CELL_OPTIONS} from './cell.options';\n\n@Component({\n template: '',\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-cell.mjs","sources":["../../../projects/core/components/cell/cell.options.ts","../../../projects/core/components/cell/cell.directive.ts","../../../projects/core/components/cell/taiga-ui-core-components-cell.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiCellOptions {\n readonly height: 'compact' | 'normal' | 'spacious';\n readonly size: TuiSizeL | TuiSizeS | '';\n}\n\nexport const [TUI_CELL_OPTIONS, tuiCellOptionsProvider] =\n tuiCreateOptions<TuiCellOptions>({height: 'normal', size: 'l'});\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\n\nimport {TUI_CELL_OPTIONS} from './cell.options';\n\n@Component({\n template: '',\n styleUrl: './cell.styles.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-cell'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiCell]:not(ng-template)',\n providers: [tuiButtonOptionsProvider({size: 's'})],\n host: {\n tuiCell: '',\n '[attr.data-size]': 'size() || options.size || \"l\"',\n '[attr.data-height]': 'height()',\n },\n})\nexport class TuiCell {\n protected readonly nothing = tuiWithStyles(Styles);\n protected readonly options = inject(TUI_CELL_OPTIONS);\n\n public readonly size = input(this.options.size, {alias: 'tuiCell'});\n public readonly height = input(this.options.height, {alias: 'tuiCellHeight'});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GACnD,gBAAgB,CAAiB,EAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAC;;ACIlE,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,0wJAAA,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,EAAA,aAAA,EAEG,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAC,KAAK,EAAE,UAAU,EAAC,EAAA,MAAA,EAAA,CAAA,0wJAAA,CAAA,EAAA;;MAahB,OAAO,CAAA;AATpB,IAAA,WAAA,GAAA;AAUuB,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;AAC/B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAErC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAC,KAAK,EAAE,SAAS,EAAC,CAAC;AACnD,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,eAAe,EAAC,CAAC;AAChF,IAAA;+GANY,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAP,OAAO,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,SAAA,EAAA,EAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gBAAA,EAAA,iCAAA,EAAA,kBAAA,EAAA,UAAA,EAAA,EAAA,EAAA,SAAA,EAPL,CAAC,wBAAwB,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAOzC,OAAO,EAAA,UAAA,EAAA,CAAA;kBATnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,4BAA4B;oBACtC,SAAS,EAAE,CAAC,wBAAwB,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC;AAClD,oBAAA,IAAI,EAAE;AACF,wBAAA,OAAO,EAAE,EAAE;AACX,wBAAA,kBAAkB,EAAE,+BAA+B;AACnD,wBAAA,oBAAoB,EAAE,UAAU;AACnC,qBAAA;AACJ,iBAAA;;;AC9BD;;AAEG;;;;"}
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, ContentChild, Directive,
|
|
3
|
-
import {
|
|
4
|
-
import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
|
|
5
|
-
import { tuiQueryListChanges, tuiZonefree, tuiTakeUntilDestroyed } from '@taiga-ui/cdk/observables';
|
|
2
|
+
import { InjectionToken, inject, ContentChild, Directive, input, NgZone, DestroyRef, ChangeDetectorRef, contentChildren, forwardRef, signal, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewContainerRef, createComponent, INJECTOR, EnvironmentInjector } from '@angular/core';
|
|
3
|
+
import { tuiZonefree, tuiTakeUntilDestroyed } from '@taiga-ui/cdk/observables';
|
|
6
4
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
5
|
+
import { tuiMoveFocus, tuiIsFocusedIn, tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
|
|
6
|
+
import { tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
7
|
+
import * as i2 from '@taiga-ui/core/components/cell';
|
|
8
|
+
import { TuiCell, tuiCellOptionsProvider } from '@taiga-ui/core/components/cell';
|
|
9
|
+
import { TUI_NOTHING_FOUND_MESSAGE, tuiAsAuxiliary } from '@taiga-ui/core/tokens';
|
|
10
10
|
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
11
|
-
import {
|
|
11
|
+
import { timer } from 'rxjs';
|
|
12
|
+
import { tuiProvide } from '@taiga-ui/cdk/utils/di';
|
|
12
13
|
import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
|
|
13
|
-
import { TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';
|
|
14
14
|
import * as i1 from '@taiga-ui/core/directives/icons';
|
|
15
15
|
import { TuiWithIcons } from '@taiga-ui/core/directives/icons';
|
|
16
|
+
import { TuiDropdownDirective } from '@taiga-ui/core/portals/dropdown';
|
|
16
17
|
|
|
17
|
-
/**
|
|
18
|
-
* Accessor for data-list options
|
|
19
|
-
*/
|
|
20
|
-
const TUI_DATA_LIST_ACCESSOR = new InjectionToken(ngDevMode ? 'TUI_DATA_LIST_ACCESSOR' : '');
|
|
21
|
-
function tuiAsDataListAccessor(accessor) {
|
|
22
|
-
return [tuiProvide(TUI_DATA_LIST_ACCESSOR, accessor), tuiAsAuxiliary(accessor)];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* DataList controller
|
|
26
|
-
*/
|
|
27
18
|
const TUI_DATA_LIST_HOST = new InjectionToken(ngDevMode ? 'TUI_DATA_LIST_HOST' : '');
|
|
28
19
|
function tuiAsDataListHost(host) {
|
|
29
20
|
return tuiProvide(TUI_DATA_LIST_HOST, host);
|
|
@@ -34,205 +25,47 @@ function tuiAsDataListHost(host) {
|
|
|
34
25
|
*/
|
|
35
26
|
const TUI_OPTION_CONTENT = new InjectionToken(ngDevMode ? 'TUI_OPTION_CONTENT' : '');
|
|
36
27
|
function tuiAsOptionContent(useValue) {
|
|
37
|
-
return {
|
|
38
|
-
provide: TUI_OPTION_CONTENT,
|
|
39
|
-
useValue,
|
|
40
|
-
};
|
|
28
|
+
return { provide: TUI_OPTION_CONTENT, useValue };
|
|
41
29
|
}
|
|
42
30
|
class TuiWithOptionContent {
|
|
43
31
|
constructor() {
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
optional: true,
|
|
47
|
-
});
|
|
32
|
+
this.local = null;
|
|
33
|
+
this.global = inject(TUI_OPTION_CONTENT, { optional: true });
|
|
48
34
|
}
|
|
49
35
|
get content() {
|
|
50
|
-
return this.
|
|
36
|
+
return this.global ?? this.local;
|
|
51
37
|
}
|
|
52
38
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiWithOptionContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
53
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiWithOptionContent, isStandalone: true, queries: [{ propertyName: "
|
|
39
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiWithOptionContent, isStandalone: true, queries: [{ propertyName: "local", first: true, predicate: TUI_OPTION_CONTENT, descendants: true }], ngImport: i0 }); }
|
|
54
40
|
}
|
|
55
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiWithOptionContent, decorators: [{
|
|
56
|
-
type: Directive
|
|
57
|
-
|
|
58
|
-
standalone: true,
|
|
59
|
-
}]
|
|
60
|
-
}], propDecorators: { localContent: [{
|
|
42
|
+
type: Directive
|
|
43
|
+
}], propDecorators: { local: [{
|
|
61
44
|
type: ContentChild,
|
|
62
45
|
args: [TUI_OPTION_CONTENT, { descendants: true }]
|
|
63
46
|
}] } });
|
|
64
47
|
|
|
65
|
-
// TODO(v5): rename `TuiOptionNew` => `TuiOption` & remove [new] from selector
|
|
66
|
-
// TODO: Consider all use cases for aria roles
|
|
67
|
-
class TuiOptionNew {
|
|
68
|
-
constructor() {
|
|
69
|
-
this.vcr = inject(ViewContainerRef);
|
|
70
|
-
this.isMobile = inject(TUI_IS_MOBILE);
|
|
71
|
-
this.el = tuiInjectElement();
|
|
72
|
-
this.dataList = inject(forwardRef(() => TuiDataListComponent), { optional: true });
|
|
73
|
-
this.content = inject(TUI_OPTION_CONTENT, {
|
|
74
|
-
optional: true,
|
|
75
|
-
});
|
|
76
|
-
this.ref = this.content &&
|
|
77
|
-
createComponent(this.content, {
|
|
78
|
-
environmentInjector: inject(EnvironmentInjector),
|
|
79
|
-
elementInjector: inject(INJECTOR),
|
|
80
|
-
hostElement: tuiInjectElement(),
|
|
81
|
-
});
|
|
82
|
-
this.dropdown = inject(TuiDropdownDirective, {
|
|
83
|
-
self: true,
|
|
84
|
-
optional: true,
|
|
85
|
-
})?.ref;
|
|
86
|
-
this.disabled = false;
|
|
87
|
-
if (this.ref) {
|
|
88
|
-
this.vcr.insert(this.ref.hostView);
|
|
89
|
-
this.ref.changeDetectorRef.detectChanges();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
// Preventing focus loss upon focused option removal
|
|
93
|
-
ngOnDestroy() {
|
|
94
|
-
this.dataList?.handleFocusLossIfNecessary(this.el);
|
|
95
|
-
}
|
|
96
|
-
onMouseMove() {
|
|
97
|
-
if (!this.isMobile &&
|
|
98
|
-
!tuiIsFocused(this.el) &&
|
|
99
|
-
this.dataList &&
|
|
100
|
-
this.el.closest('[tuiDataListDropdownManager]')) {
|
|
101
|
-
this.el.focus({ preventScroll: true });
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiOptionNew, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
105
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiOptionNew, isStandalone: true, selector: "button[tuiOption][new], a[tuiOption][new], label[tuiOption][new]", inputs: { disabled: "disabled" }, host: { attributes: { "type": "button", "role": "option" }, listeners: { "mousemove.zoneless": "onMouseMove()" }, properties: { "attr.disabled": "disabled || null", "class._with-dropdown": "dropdown?.()" } }, hostDirectives: [{ directive: i1.TuiWithIcons }], ngImport: i0 }); }
|
|
106
|
-
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiOptionNew, decorators: [{
|
|
108
|
-
type: Directive,
|
|
109
|
-
args: [{
|
|
110
|
-
standalone: true,
|
|
111
|
-
selector: 'button[tuiOption][new], a[tuiOption][new], label[tuiOption][new]',
|
|
112
|
-
hostDirectives: [TuiWithIcons],
|
|
113
|
-
host: {
|
|
114
|
-
type: 'button',
|
|
115
|
-
role: 'option',
|
|
116
|
-
'[attr.disabled]': 'disabled || null',
|
|
117
|
-
'[class._with-dropdown]': 'dropdown?.()',
|
|
118
|
-
'(mousemove.zoneless)': 'onMouseMove()',
|
|
119
|
-
},
|
|
120
|
-
}]
|
|
121
|
-
}], ctorParameters: () => [], propDecorators: { disabled: [{
|
|
122
|
-
type: Input
|
|
123
|
-
}] } });
|
|
124
|
-
// TODO(v5): remove [new] from selector
|
|
125
48
|
class TuiOptionWithValue {
|
|
126
49
|
constructor() {
|
|
127
|
-
this.host = inject(TUI_DATA_LIST_HOST, {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
this.disabled = false;
|
|
131
|
-
this.value = signal(undefined);
|
|
132
|
-
}
|
|
133
|
-
// TODO(v5): use `input.required<T>()` to remove `undefined` from `this.value()`
|
|
134
|
-
set valueSetter(x) {
|
|
135
|
-
this.value.set(x);
|
|
50
|
+
this.host = inject(TUI_DATA_LIST_HOST, { optional: true });
|
|
51
|
+
this.disabled = input(false);
|
|
52
|
+
this.value = input();
|
|
136
53
|
}
|
|
137
54
|
onClick(value = this.value()) {
|
|
138
|
-
if (
|
|
139
|
-
this.host
|
|
55
|
+
if (value !== undefined) {
|
|
56
|
+
this.host?.handleOption?.(value);
|
|
140
57
|
}
|
|
141
58
|
}
|
|
142
59
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiOptionWithValue, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
143
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
60
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiOptionWithValue, isStandalone: true, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
|
|
144
61
|
}
|
|
145
62
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiOptionWithValue, decorators: [{
|
|
146
63
|
type: Directive,
|
|
147
64
|
args: [{
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
host: {
|
|
151
|
-
'(click)': 'onClick()',
|
|
152
|
-
},
|
|
153
|
-
}]
|
|
154
|
-
}], propDecorators: { disabled: [{
|
|
155
|
-
type: Input
|
|
156
|
-
}], valueSetter: [{
|
|
157
|
-
type: Input,
|
|
158
|
-
args: [{ alias: 'value', required: true }]
|
|
159
|
-
}] } });
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* TODO(v5): delete
|
|
163
|
-
* @deprecated use `<button tuiOption new />` / `<a tuiOption new /> / `<label tuiOption new /> instead
|
|
164
|
-
*/
|
|
165
|
-
class TuiOption {
|
|
166
|
-
constructor() {
|
|
167
|
-
this.isMobile = inject(TUI_IS_MOBILE);
|
|
168
|
-
this.el = tuiInjectElement();
|
|
169
|
-
this.dataList = inject(forwardRef(() => TuiDataListComponent), { optional: true });
|
|
170
|
-
this.host = inject(TUI_DATA_LIST_HOST, {
|
|
171
|
-
optional: true,
|
|
172
|
-
});
|
|
173
|
-
this.content = inject(TUI_OPTION_CONTENT, { optional: true });
|
|
174
|
-
this.dropdown = inject(TuiDropdownDirective, {
|
|
175
|
-
self: true,
|
|
176
|
-
optional: true,
|
|
177
|
-
})?.ref;
|
|
178
|
-
this.disabled = false;
|
|
179
|
-
}
|
|
180
|
-
// Preventing focus loss upon focused option removal
|
|
181
|
-
ngOnDestroy() {
|
|
182
|
-
this.dataList?.handleFocusLossIfNecessary(this.el);
|
|
183
|
-
}
|
|
184
|
-
onClick() {
|
|
185
|
-
if (this.host?.handleOption && this.value !== undefined) {
|
|
186
|
-
this.host.handleOption(this.value);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
onMouseMove() {
|
|
190
|
-
if (!this.isMobile &&
|
|
191
|
-
!tuiIsFocused(this.el) &&
|
|
192
|
-
this.dataList &&
|
|
193
|
-
this.el.closest('[tuiDataListDropdownManager]')) {
|
|
194
|
-
this.el.focus({ preventScroll: true });
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiOption, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
198
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiOption, isStandalone: true, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: { disabled: "disabled", value: "value" }, host: { attributes: { "type": "button", "role": "option" }, listeners: { "click": "onClick()", "mousemove.zoneless": "onMouseMove()" }, properties: { "attr.disabled": "disabled || null", "class._with-dropdown": "dropdown?.()" } }, hostDirectives: [{ directive: i1.TuiWithIcons }], ngImport: i0, template: `
|
|
199
|
-
<ng-container *polymorpheusOutlet="content || t as text; context: {$implicit: t}">
|
|
200
|
-
{{ text }}
|
|
201
|
-
</ng-container>
|
|
202
|
-
<ng-template #t>
|
|
203
|
-
<ng-content />
|
|
204
|
-
</ng-template>
|
|
205
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
206
|
-
}
|
|
207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiOption, decorators: [{
|
|
208
|
-
type: Component,
|
|
209
|
-
args: [{
|
|
210
|
-
selector: 'button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])',
|
|
211
|
-
imports: [PolymorpheusOutlet],
|
|
212
|
-
template: `
|
|
213
|
-
<ng-container *polymorpheusOutlet="content || t as text; context: {$implicit: t}">
|
|
214
|
-
{{ text }}
|
|
215
|
-
</ng-container>
|
|
216
|
-
<ng-template #t>
|
|
217
|
-
<ng-content />
|
|
218
|
-
</ng-template>
|
|
219
|
-
`,
|
|
220
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
221
|
-
hostDirectives: [TuiWithIcons],
|
|
222
|
-
host: {
|
|
223
|
-
type: 'button',
|
|
224
|
-
role: 'option',
|
|
225
|
-
'[attr.disabled]': 'disabled || null',
|
|
226
|
-
'[class._with-dropdown]': 'dropdown?.()',
|
|
227
|
-
'(click)': 'onClick()',
|
|
228
|
-
'(mousemove.zoneless)': 'onMouseMove()',
|
|
229
|
-
},
|
|
65
|
+
selector: 'button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]',
|
|
66
|
+
host: { '(click)': 'onClick()' },
|
|
230
67
|
}]
|
|
231
|
-
}]
|
|
232
|
-
type: Input
|
|
233
|
-
}], value: [{
|
|
234
|
-
type: Input
|
|
235
|
-
}] } });
|
|
68
|
+
}] });
|
|
236
69
|
|
|
237
70
|
function tuiInjectDataListSize() {
|
|
238
71
|
const sizes = ['s', 'm', 'l'];
|
|
@@ -242,25 +75,18 @@ function tuiInjectDataListSize() {
|
|
|
242
75
|
// TODO: Consider aria-activedescendant for proper accessibility implementation
|
|
243
76
|
class TuiDataListComponent {
|
|
244
77
|
constructor() {
|
|
245
|
-
// TODO(v5): delete
|
|
246
|
-
this.legacyOptionsQuery = EMPTY_QUERY;
|
|
247
|
-
this.optionsQuery = EMPTY_QUERY;
|
|
248
78
|
this.ngZone = inject(NgZone);
|
|
249
79
|
this.destroyRef = inject(DestroyRef);
|
|
250
80
|
this.el = tuiInjectElement();
|
|
251
81
|
this.cdr = inject(ChangeDetectorRef);
|
|
252
|
-
this.
|
|
253
|
-
this.fallback =
|
|
82
|
+
this.optionsQuery = contentChildren(forwardRef(() => TuiOptionWithValue), { descendants: true });
|
|
83
|
+
this.fallback = inject(TUI_NOTHING_FOUND_MESSAGE);
|
|
254
84
|
this.empty = signal(false);
|
|
255
|
-
this.
|
|
256
|
-
|
|
257
|
-
this.options =
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
])), map(([legacyOptions, options]) => [
|
|
261
|
-
...legacyOptions.map(({ value }) => value),
|
|
262
|
-
...options.map(({ value }) => value()),
|
|
263
|
-
].filter(tuiIsPresent)), startWith([])), { requireSync: true });
|
|
85
|
+
this.emptyContent = input();
|
|
86
|
+
this.size = input(tuiInjectDataListSize());
|
|
87
|
+
this.options = computed(() => this.optionsQuery()
|
|
88
|
+
.map(({ value }) => value())
|
|
89
|
+
.filter(tuiIsPresent));
|
|
264
90
|
}
|
|
265
91
|
onKeyDownArrow(current, step) {
|
|
266
92
|
const { elements } = this;
|
|
@@ -271,9 +97,6 @@ class TuiDataListComponent {
|
|
|
271
97
|
this.origin?.focus({ preventScroll: true });
|
|
272
98
|
}
|
|
273
99
|
}
|
|
274
|
-
ngAfterContentInit() {
|
|
275
|
-
this.contentReady$.next(true);
|
|
276
|
-
}
|
|
277
100
|
// TODO: Refactor to :has after Safari support bumped to 15
|
|
278
101
|
ngAfterContentChecked() {
|
|
279
102
|
timer(0)
|
|
@@ -283,58 +106,38 @@ class TuiDataListComponent {
|
|
|
283
106
|
this.cdr.detectChanges();
|
|
284
107
|
});
|
|
285
108
|
}
|
|
286
|
-
// TODO(v5): delete
|
|
287
|
-
getOptions(includeDisabled = false) {
|
|
288
|
-
return [
|
|
289
|
-
...this.legacyOptionsQuery, // TODO(v5): delete
|
|
290
|
-
...this.optionsQuery,
|
|
291
|
-
]
|
|
292
|
-
.filter(({ disabled }) => includeDisabled || !disabled)
|
|
293
|
-
.map(({ value }) => (isSignal(value) ? value() : value))
|
|
294
|
-
.filter(tuiIsPresent);
|
|
295
|
-
}
|
|
296
109
|
onFocusIn(relatedTarget, currentTarget) {
|
|
297
110
|
if (!currentTarget.contains(relatedTarget) && !this.origin) {
|
|
298
111
|
this.origin = relatedTarget;
|
|
299
112
|
}
|
|
300
113
|
}
|
|
301
114
|
get elements() {
|
|
302
|
-
return Array.from(this.el.querySelectorAll('[tuiOption]'));
|
|
115
|
+
return Array.from(this.el.querySelectorAll('[tuiOption]:not(.t-empty)'));
|
|
303
116
|
}
|
|
304
117
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDataListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
305
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDataListComponent, isStandalone: true, selector: "tui-data-list", inputs: { emptyContent: "emptyContent", size: "size" }, host: { attributes: { "role": "listbox" }, listeners: { "focusin": "onFocusIn($event.relatedTarget, $event.currentTarget)", "mousedown.prevent": "(0)", "wheel.zoneless.passive": "handleFocusLossIfNecessary()", "mouseleave": "handleFocusLossIfNecessary($event.target)", "keydown.tab": "handleFocusLossIfNecessary()", "keydown.shift.tab": "handleFocusLossIfNecessary()", "keydown.arrowDown.prevent": "onKeyDownArrow($event.target, 1)", "keydown.arrowUp.prevent": "onKeyDownArrow($event.target, -1)" }, properties: { "attr.data-size": "size" } }, providers: [
|
|
306
|
-
|
|
118
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDataListComponent, isStandalone: true, selector: "tui-data-list", inputs: { emptyContent: { classPropertyName: "emptyContent", publicName: "emptyContent", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listbox" }, listeners: { "focusin": "onFocusIn($event.relatedTarget, $event.currentTarget)", "mousedown.prevent": "(0)", "wheel.zoneless.passive": "handleFocusLossIfNecessary()", "mouseleave": "handleFocusLossIfNecessary($event.target)", "keydown.tab": "handleFocusLossIfNecessary()", "keydown.shift.tab": "handleFocusLossIfNecessary()", "keydown.arrowDown.prevent": "onKeyDownArrow($event.target, 1)", "keydown.arrowUp.prevent": "onKeyDownArrow($event.target, -1)" }, properties: { "attr.data-size": "size()" } }, providers: [
|
|
119
|
+
tuiCellOptionsProvider(() => ({ size: inject(TuiDataListComponent).size() })),
|
|
120
|
+
tuiAsAuxiliary(TuiDataListComponent),
|
|
307
121
|
{
|
|
308
122
|
provide: TUI_OPTION_CONTENT,
|
|
309
123
|
useFactory: () => inject(TuiWithOptionContent, { optional: true })?.content ??
|
|
310
|
-
// TODO(v5): remove when all legacy controls are deleted
|
|
311
|
-
inject(TUI_OPTION_CONTENT, {
|
|
312
|
-
host: true,
|
|
313
|
-
skipSelf: true,
|
|
314
|
-
optional: true,
|
|
315
|
-
}) ??
|
|
316
124
|
inject(TUI_OPTION_CONTENT, { skipSelf: true, optional: true }),
|
|
317
125
|
},
|
|
318
|
-
], queries: [{ propertyName: "
|
|
126
|
+
], queries: [{ propertyName: "optionsQuery", predicate: i0.forwardRef(() => TuiOptionWithValue), descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content />\n@if (empty()) {\n <!-- tuiOption selector purely for cosmetics, do not import -->\n <span\n tuiCell\n tuiOption\n class=\"t-empty\"\n >\n <ng-container *polymorpheusOutlet=\"emptyContent() || fallback() as text\">\n {{ text }}\n </ng-container>\n </span>\n}\n", styles: ["tui-data-list{display:flex;flex-direction:column;padding:calc(var(--tui-data-list-padding) - var(--tui-data-list-margin)) var(--tui-data-list-padding)}tui-data-list:focus-within [tuiOption]._with-dropdown:not(:focus){background:transparent}tui-data-list[data-size=s]{--tui-data-list-margin: 0rem;--tui-data-list-padding: .25rem}tui-data-list[data-size=s] [tuiOption]{font:var(--tui-font-text-s);min-block-size:2rem;padding:.3125rem .375rem}tui-data-list[data-size=s] [tuiOption]:before{font-size:1rem}tui-data-list[data-size=m]{--tui-data-list-margin: .0625rem;--tui-data-list-padding: .25rem}tui-data-list[data-size=m] [tuiOption]{font:var(--tui-font-text-s);min-block-size:2.5rem;padding:.375rem .5rem}tui-data-list[data-size=l]{--tui-data-list-margin: .125rem;--tui-data-list-padding: .375rem}tui-data-list[data-size=l] [tuiOption]{font:var(--tui-font-text-m);min-block-size:2.75rem;padding:.375rem .625rem}tui-data-list [tuiOption]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;box-sizing:border-box;margin:var(--tui-data-list-margin) 0;border-radius:var(--tui-radius-s);outline:none!important;cursor:pointer;word-break:break-word}tui-data-list [tuiOption]:disabled{opacity:var(--tui-disabled-opacity);cursor:default}@media (hover: hover) and (pointer: fine){tui-data-list [tuiOption]:hover:not(:disabled){background:var(--tui-background-neutral-1)}}tui-data-list [tuiOption]:active:not(:disabled),tui-data-list [tuiOption]:focus-within,tui-data-list [tuiOption]._with-dropdown{background:var(--tui-background-neutral-1)}tui-data-list [tuiOption]:after{font-size:1rem;margin-inline:auto -.625rem;border-inline:.5rem solid}tui-data-list>.t-empty{pointer-events:none;color:var(--tui-text-tertiary)}tui-opt-group{position:relative;display:flex;font:var(--tui-font-text-xs);font-weight:700;color:var(--tui-text-primary);flex-direction:column;line-height:1rem}tui-data-list[data-size=s] tui-opt-group:before{padding-inline:.375rem}tui-data-list[data-size=l] tui-opt-group{font:var(--tui-font-text-m);font-weight:700;line-height:1.25rem}tui-data-list[data-size=l] tui-opt-group:before{padding-inline:.625rem}tui-data-list[data-size=l] tui-opt-group:after{inset-inline:.625rem}tui-opt-group:empty:before,tui-opt-group:empty:after{display:none}tui-opt-group:before{content:attr(data-label);padding:var(--tui-data-list-padding) .5rem;margin:var(--tui-data-list-margin) 0;white-space:normal;word-break:break-word}tui-sheet-dialog tui-opt-group:before{font:var(--tui-font-heading-6);padding:.5rem 0!important;margin:0}tui-opt-group:after{position:absolute;inset-inline:.5rem;top:var(--tui-data-list-padding);block-size:1px;background:var(--tui-border-normal)}tui-opt-group:not(:empty)~tui-opt-group:before{padding-block-start:calc(.75rem + var(--tui-data-list-padding))}tui-opt-group:not(:empty)~tui-opt-group[data-label=\"\"]:before{padding:var(--tui-data-list-padding) 0}tui-opt-group:not(:empty)~tui-opt-group:after{content:\"\"}tui-opt-group[data-label=\"\"]:before{content:\"\";padding:0;margin:0}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiCell, selector: "[tuiCell]:not(ng-template)", inputs: ["tuiCell", "tuiCellHeight"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
319
127
|
}
|
|
320
128
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDataListComponent, decorators: [{
|
|
321
129
|
type: Component,
|
|
322
|
-
args: [{ selector: 'tui-data-list', imports: [PolymorpheusOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
323
|
-
|
|
130
|
+
args: [{ selector: 'tui-data-list', imports: [PolymorpheusOutlet, TuiCell], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
131
|
+
tuiCellOptionsProvider(() => ({ size: inject(TuiDataListComponent).size() })),
|
|
132
|
+
tuiAsAuxiliary(TuiDataListComponent),
|
|
324
133
|
{
|
|
325
134
|
provide: TUI_OPTION_CONTENT,
|
|
326
135
|
useFactory: () => inject(TuiWithOptionContent, { optional: true })?.content ??
|
|
327
|
-
// TODO(v5): remove when all legacy controls are deleted
|
|
328
|
-
inject(TUI_OPTION_CONTENT, {
|
|
329
|
-
host: true,
|
|
330
|
-
skipSelf: true,
|
|
331
|
-
optional: true,
|
|
332
|
-
}) ??
|
|
333
136
|
inject(TUI_OPTION_CONTENT, { skipSelf: true, optional: true }),
|
|
334
137
|
},
|
|
335
138
|
], host: {
|
|
336
139
|
role: 'listbox',
|
|
337
|
-
'[attr.data-size]': 'size',
|
|
140
|
+
'[attr.data-size]': 'size()',
|
|
338
141
|
'(focusin)': 'onFocusIn($event.relatedTarget, $event.currentTarget)',
|
|
339
142
|
'(mousedown.prevent)': '(0)',
|
|
340
143
|
'(wheel.zoneless.passive)': 'handleFocusLossIfNecessary()',
|
|
@@ -343,57 +146,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
343
146
|
'(keydown.shift.tab)': 'handleFocusLossIfNecessary()',
|
|
344
147
|
'(keydown.arrowDown.prevent)': 'onKeyDownArrow($event.target, 1)',
|
|
345
148
|
'(keydown.arrowUp.prevent)': 'onKeyDownArrow($event.target, -1)',
|
|
346
|
-
}, template: "<ng-content />\n@if (empty()) {\n <
|
|
347
|
-
}], propDecorators: { legacyOptionsQuery: [{
|
|
348
|
-
type: ContentChildren,
|
|
349
|
-
args: [forwardRef(() => TuiOption), { descendants: true }]
|
|
350
|
-
}], optionsQuery: [{
|
|
351
|
-
type: ContentChildren,
|
|
352
|
-
args: [forwardRef(() => TuiOptionWithValue), { descendants: true }]
|
|
353
|
-
}], emptyContent: [{
|
|
354
|
-
type: Input
|
|
355
|
-
}], size: [{
|
|
356
|
-
type: Input
|
|
357
|
-
}] } });
|
|
358
|
-
|
|
359
|
-
class TuiDataListDirective {
|
|
360
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDataListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
361
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiDataListDirective, isStandalone: true, selector: "ng-template[tuiDataList]", ngImport: i0 }); }
|
|
362
|
-
}
|
|
363
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDataListDirective, decorators: [{
|
|
364
|
-
type: Directive,
|
|
365
|
-
args: [{
|
|
366
|
-
standalone: true,
|
|
367
|
-
selector: 'ng-template[tuiDataList]',
|
|
368
|
-
}]
|
|
149
|
+
}, template: "<ng-content />\n@if (empty()) {\n <!-- tuiOption selector purely for cosmetics, do not import -->\n <span\n tuiCell\n tuiOption\n class=\"t-empty\"\n >\n <ng-container *polymorpheusOutlet=\"emptyContent() || fallback() as text\">\n {{ text }}\n </ng-container>\n </span>\n}\n", styles: ["tui-data-list{display:flex;flex-direction:column;padding:calc(var(--tui-data-list-padding) - var(--tui-data-list-margin)) var(--tui-data-list-padding)}tui-data-list:focus-within [tuiOption]._with-dropdown:not(:focus){background:transparent}tui-data-list[data-size=s]{--tui-data-list-margin: 0rem;--tui-data-list-padding: .25rem}tui-data-list[data-size=s] [tuiOption]{font:var(--tui-font-text-s);min-block-size:2rem;padding:.3125rem .375rem}tui-data-list[data-size=s] [tuiOption]:before{font-size:1rem}tui-data-list[data-size=m]{--tui-data-list-margin: .0625rem;--tui-data-list-padding: .25rem}tui-data-list[data-size=m] [tuiOption]{font:var(--tui-font-text-s);min-block-size:2.5rem;padding:.375rem .5rem}tui-data-list[data-size=l]{--tui-data-list-margin: .125rem;--tui-data-list-padding: .375rem}tui-data-list[data-size=l] [tuiOption]{font:var(--tui-font-text-m);min-block-size:2.75rem;padding:.375rem .625rem}tui-data-list [tuiOption]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;box-sizing:border-box;margin:var(--tui-data-list-margin) 0;border-radius:var(--tui-radius-s);outline:none!important;cursor:pointer;word-break:break-word}tui-data-list [tuiOption]:disabled{opacity:var(--tui-disabled-opacity);cursor:default}@media (hover: hover) and (pointer: fine){tui-data-list [tuiOption]:hover:not(:disabled){background:var(--tui-background-neutral-1)}}tui-data-list [tuiOption]:active:not(:disabled),tui-data-list [tuiOption]:focus-within,tui-data-list [tuiOption]._with-dropdown{background:var(--tui-background-neutral-1)}tui-data-list [tuiOption]:after{font-size:1rem;margin-inline:auto -.625rem;border-inline:.5rem solid}tui-data-list>.t-empty{pointer-events:none;color:var(--tui-text-tertiary)}tui-opt-group{position:relative;display:flex;font:var(--tui-font-text-xs);font-weight:700;color:var(--tui-text-primary);flex-direction:column;line-height:1rem}tui-data-list[data-size=s] tui-opt-group:before{padding-inline:.375rem}tui-data-list[data-size=l] tui-opt-group{font:var(--tui-font-text-m);font-weight:700;line-height:1.25rem}tui-data-list[data-size=l] tui-opt-group:before{padding-inline:.625rem}tui-data-list[data-size=l] tui-opt-group:after{inset-inline:.625rem}tui-opt-group:empty:before,tui-opt-group:empty:after{display:none}tui-opt-group:before{content:attr(data-label);padding:var(--tui-data-list-padding) .5rem;margin:var(--tui-data-list-margin) 0;white-space:normal;word-break:break-word}tui-sheet-dialog tui-opt-group:before{font:var(--tui-font-heading-6);padding:.5rem 0!important;margin:0}tui-opt-group:after{position:absolute;inset-inline:.5rem;top:var(--tui-data-list-padding);block-size:1px;background:var(--tui-border-normal)}tui-opt-group:not(:empty)~tui-opt-group:before{padding-block-start:calc(.75rem + var(--tui-data-list-padding))}tui-opt-group:not(:empty)~tui-opt-group[data-label=\"\"]:before{padding:var(--tui-data-list-padding) 0}tui-opt-group:not(:empty)~tui-opt-group:after{content:\"\"}tui-opt-group[data-label=\"\"]:before{content:\"\";padding:0;margin:0}\n"] }]
|
|
369
150
|
}] });
|
|
370
|
-
function tuiAsDataList(list) {
|
|
371
|
-
return tuiProvide(TuiDataListDirective, list);
|
|
372
|
-
}
|
|
373
151
|
|
|
374
152
|
class TuiOptGroup {
|
|
153
|
+
constructor() {
|
|
154
|
+
this.label = input();
|
|
155
|
+
}
|
|
375
156
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiOptGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
376
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
157
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiOptGroup, isStandalone: true, selector: "tui-opt-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.data-label": "label() || \"\"" } }, ngImport: i0 }); }
|
|
377
158
|
}
|
|
378
159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiOptGroup, decorators: [{
|
|
379
160
|
type: Directive,
|
|
380
161
|
args: [{
|
|
381
|
-
standalone: true,
|
|
382
162
|
selector: 'tui-opt-group',
|
|
383
163
|
host: {
|
|
384
164
|
role: 'group',
|
|
385
|
-
'[attr.data-label]': 'label',
|
|
165
|
+
'[attr.data-label]': 'label() || ""',
|
|
386
166
|
},
|
|
387
167
|
}]
|
|
388
|
-
}]
|
|
389
|
-
|
|
390
|
-
|
|
168
|
+
}] });
|
|
169
|
+
|
|
170
|
+
class TuiOption {
|
|
171
|
+
constructor() {
|
|
172
|
+
this.vcr = inject(ViewContainerRef);
|
|
173
|
+
this.isMobile = inject(TUI_IS_MOBILE);
|
|
174
|
+
this.el = tuiInjectElement();
|
|
175
|
+
this.datalist = inject(forwardRef(() => TuiDataListComponent), { optional: true });
|
|
176
|
+
this.content = inject(TUI_OPTION_CONTENT, {
|
|
177
|
+
optional: true,
|
|
178
|
+
});
|
|
179
|
+
this.ref = this.content &&
|
|
180
|
+
createComponent(this.content, {
|
|
181
|
+
environmentInjector: inject(EnvironmentInjector),
|
|
182
|
+
elementInjector: inject(INJECTOR),
|
|
183
|
+
hostElement: tuiInjectElement(),
|
|
184
|
+
});
|
|
185
|
+
this.dropdown = inject(TuiDropdownDirective, {
|
|
186
|
+
self: true,
|
|
187
|
+
optional: true,
|
|
188
|
+
})?.ref;
|
|
189
|
+
this.disabled = input(false);
|
|
190
|
+
if (this.ref) {
|
|
191
|
+
this.vcr.insert(this.ref.hostView);
|
|
192
|
+
this.ref.changeDetectorRef.detectChanges();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// Preventing focus loss upon focused option removal
|
|
196
|
+
ngOnDestroy() {
|
|
197
|
+
this.datalist?.handleFocusLossIfNecessary(this.el);
|
|
198
|
+
}
|
|
199
|
+
onMouseMove() {
|
|
200
|
+
if (!this.isMobile &&
|
|
201
|
+
!tuiIsFocused(this.el) &&
|
|
202
|
+
this.datalist &&
|
|
203
|
+
this.el.closest('[tuiDataListDropdownManager]')) {
|
|
204
|
+
this.el.focus({ preventScroll: true });
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiOption, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
208
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiOption, isStandalone: true, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "role": "option" }, listeners: { "mousemove.zoneless": "onMouseMove()" }, properties: { "attr.disabled": "disabled() || null", "class._with-dropdown": "dropdown?.()" } }, hostDirectives: [{ directive: i1.TuiWithIcons }, { directive: i2.TuiCell }], ngImport: i0 }); }
|
|
209
|
+
}
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiOption, decorators: [{
|
|
211
|
+
type: Directive,
|
|
212
|
+
args: [{
|
|
213
|
+
selector: 'button[tuiOption], a[tuiOption], label[tuiOption]',
|
|
214
|
+
hostDirectives: [TuiWithIcons, TuiCell],
|
|
215
|
+
host: {
|
|
216
|
+
type: 'button',
|
|
217
|
+
role: 'option',
|
|
218
|
+
'[attr.disabled]': 'disabled() || null',
|
|
219
|
+
'[class._with-dropdown]': 'dropdown?.()',
|
|
220
|
+
'(mousemove.zoneless)': 'onMouseMove()',
|
|
221
|
+
},
|
|
222
|
+
}]
|
|
223
|
+
}], ctorParameters: () => [] });
|
|
391
224
|
|
|
392
225
|
const TuiDataList = [
|
|
393
226
|
TuiDataListComponent,
|
|
394
|
-
TuiDataListDirective,
|
|
395
227
|
TuiOption,
|
|
396
|
-
TuiOptionNew,
|
|
397
228
|
TuiOptionWithValue,
|
|
398
229
|
TuiOptGroup,
|
|
399
230
|
];
|
|
@@ -402,5 +233,5 @@ const TuiDataList = [
|
|
|
402
233
|
* Generated bundle index. Do not edit.
|
|
403
234
|
*/
|
|
404
235
|
|
|
405
|
-
export {
|
|
236
|
+
export { TUI_DATA_LIST_HOST, TUI_OPTION_CONTENT, TuiDataList, TuiDataListComponent, TuiOptGroup, TuiOption, TuiOptionWithValue, TuiWithOptionContent, tuiAsDataListHost, tuiAsOptionContent, tuiInjectDataListSize };
|
|
406
237
|
//# sourceMappingURL=taiga-ui-core-components-data-list.mjs.map
|