@tectra-ng/ui 0.1.2 → 0.1.4
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 +36 -19
- package/accordion/README.md +61 -0
- package/analog-clock/README.md +31 -0
- package/breadcrumb/README.md +57 -0
- package/countdown/README.md +45 -0
- package/datepicker/README.md +109 -0
- package/export/README.md +79 -0
- package/export-font/OFL.txt +93 -0
- package/export-font/README.md +7 -0
- package/fesm2022/tectra-ng-ui-accordion.mjs +980 -0
- package/fesm2022/tectra-ng-ui-accordion.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-analog-clock.mjs +386 -0
- package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs +382 -0
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-countdown.mjs +513 -0
- package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-datepicker.mjs +2640 -0
- package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-export-font.mjs +7 -0
- package/fesm2022/tectra-ng-ui-export-font.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-export.mjs +2574 -0
- package/fesm2022/tectra-ng-ui-export.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-field.mjs +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-file-upload.mjs +1452 -0
- package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-group.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-label.mjs +4 -4
- package/fesm2022/tectra-ng-ui-label.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
- package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-menubar.mjs +742 -0
- package/fesm2022/tectra-ng-ui-menubar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-month-calendar.mjs +601 -0
- package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel-menu.mjs +610 -0
- package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs +319 -0
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-sparkline.mjs +240 -0
- package/fesm2022/tectra-ng-ui-sparkline.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-splitter.mjs +750 -0
- package/fesm2022/tectra-ng-ui-splitter.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs +661 -0
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-stepper.mjs +1166 -0
- package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-table.mjs +195 -71
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tabs.mjs +1218 -0
- package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-textarea.mjs +4 -1
- package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-timeline.mjs +407 -0
- package/fesm2022/tectra-ng-ui-timeline.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-toolbar.mjs +348 -0
- package/fesm2022/tectra-ng-ui-toolbar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tree-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +80 -2
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
- package/field/README.md +1 -1
- package/file-upload/README.md +85 -0
- package/menubar/README.md +51 -0
- package/month-calendar/README.md +46 -0
- package/package.json +80 -4
- package/panel-menu/README.md +45 -0
- package/scroll-panel/README.md +35 -0
- package/sparkline/README.md +27 -0
- package/splitter/README.md +62 -0
- package/stat-tiles/README.md +53 -0
- package/stepper/README.md +66 -0
- package/table/README.md +1 -1
- package/tabs/README.md +69 -0
- package/timeline/README.md +42 -0
- package/toolbar/README.md +35 -0
- package/types/tectra-ng-ui-accordion.d.ts +304 -0
- package/types/tectra-ng-ui-accordion.d.ts.map +1 -0
- package/types/tectra-ng-ui-analog-clock.d.ts +127 -0
- package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -0
- package/types/tectra-ng-ui-breadcrumb.d.ts +157 -0
- package/types/tectra-ng-ui-breadcrumb.d.ts.map +1 -0
- package/types/tectra-ng-ui-countdown.d.ts +150 -0
- package/types/tectra-ng-ui-countdown.d.ts.map +1 -0
- package/types/tectra-ng-ui-datepicker.d.ts +801 -0
- package/types/tectra-ng-ui-datepicker.d.ts.map +1 -0
- package/types/tectra-ng-ui-export-font.d.ts +5 -0
- package/types/tectra-ng-ui-export-font.d.ts.map +1 -0
- package/types/tectra-ng-ui-export.d.ts +427 -0
- package/types/tectra-ng-ui-export.d.ts.map +1 -0
- package/types/tectra-ng-ui-file-upload.d.ts +527 -0
- package/types/tectra-ng-ui-file-upload.d.ts.map +1 -0
- package/types/tectra-ng-ui-menubar.d.ts +201 -0
- package/types/tectra-ng-ui-menubar.d.ts.map +1 -0
- package/types/tectra-ng-ui-month-calendar.d.ts +287 -0
- package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -0
- package/types/tectra-ng-ui-panel-menu.d.ts +244 -0
- package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -0
- package/types/tectra-ng-ui-scroll-panel.d.ts +94 -0
- package/types/tectra-ng-ui-scroll-panel.d.ts.map +1 -0
- package/types/tectra-ng-ui-sparkline.d.ts +80 -0
- package/types/tectra-ng-ui-sparkline.d.ts.map +1 -0
- package/types/tectra-ng-ui-splitter.d.ts +226 -0
- package/types/tectra-ng-ui-splitter.d.ts.map +1 -0
- package/types/tectra-ng-ui-stat-tiles.d.ts +287 -0
- package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -0
- package/types/tectra-ng-ui-stepper.d.ts +446 -0
- package/types/tectra-ng-ui-stepper.d.ts.map +1 -0
- package/types/tectra-ng-ui-table.d.ts +2 -4
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tabs.d.ts +420 -0
- package/types/tectra-ng-ui-tabs.d.ts.map +1 -0
- package/types/tectra-ng-ui-textarea.d.ts +1 -0
- package/types/tectra-ng-ui-textarea.d.ts.map +1 -1
- package/types/tectra-ng-ui-timeline.d.ts +129 -0
- package/types/tectra-ng-ui-timeline.d.ts.map +1 -0
- package/types/tectra-ng-ui-toolbar.d.ts +85 -0
- package/types/tectra-ng-ui-toolbar.d.ts.map +1 -0
- package/types/tectra-ng-ui-tree-table.d.ts.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-tabs.mjs","names":[],"sources":["../../../../packages/ui/tabs/src/tabs.context.ts","../../../../packages/ui/tabs/src/tab.component.ts","../../../../packages/ui/tabs/src/tab-list.component.ts","../../../../packages/ui/tabs/src/tab-list.component.html","../../../../packages/ui/tabs/src/tabs.component.ts","../../../../packages/ui/tabs/src/tab-panels.component.ts","../../../../packages/ui/tabs/src/tab-panel.component.ts"],"sourcesContent":["import { InjectionToken, Signal } from '@angular/core';\nimport { TxResolvedPassThrough } from '@tectra-ng/core/config';\nimport { TxTabValue, TxTabsOrientation, TxTabsPart, TxTabsSize, TxTabsVariant } from './tabs.types';\n\nexport interface TxTabRegistration {\n value: Signal<TxTabValue>;\n description: Signal<string | undefined>;\n disabled: Signal<boolean>;\n}\n\nexport interface TxTabsContext {\n readonly value: Signal<TxTabValue | undefined>;\n readonly variant: Signal<TxTabsVariant>;\n readonly size: Signal<TxTabsSize>;\n readonly orientation: Signal<TxTabsOrientation>;\n readonly raised: Signal<boolean>;\n readonly scrollable: Signal<boolean>;\n readonly showNavigators: Signal<boolean>;\n readonly lazy: Signal<boolean>;\n readonly selectOnFocus: Signal<boolean>;\n readonly isUnstyled: Signal<boolean>;\n readonly passThrough: Signal<TxResolvedPassThrough<TxTabsPart>>;\n readonly activeDescription: Signal<string | undefined>;\n readonly focusValue: Signal<TxTabValue | undefined>;\n hasPanel(value: TxTabValue): boolean;\n select(value: TxTabValue): void;\n tabId(value: TxTabValue): string;\n panelId(value: TxTabValue): string;\n registerTab(tab: TxTabRegistration): () => void;\n registerPanel(value: Signal<TxTabValue>): () => void;\n}\n\nexport const TX_TABS = new InjectionToken<TxTabsContext>('TX_TABS');\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, OnInit, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { TxIcon, TxIconName, TxIconRegistry } from '@tectra-ng/icons';\nimport { TX_TABS } from './tabs.context';\nimport { TxTabValue } from './tabs.types';\n\n@Component({\n selector: 'tx-tab, a[txTab], button[txTab]',\n imports: [TxIcon],\n template: `\n @if (icon(); as icon) {\n <span class=\"tx-tab__icon\" aria-hidden=\"true\" [class]=\"tabs.passThrough().icon?.class\" [style]=\"tabs.passThrough().icon?.style\">\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <span class=\"tx-tab__label\" [class]=\"tabs.passThrough().label?.class\" [style]=\"tabs.passThrough().label?.style\"><ng-content /></span>\n @if (hasBadge()) {\n <span class=\"tx-tab__badge\" [class]=\"tabs.passThrough().badge?.class\" [style]=\"tabs.passThrough().badge?.style\">{{ badge() }}</span>\n }\n `,\n styleUrl: './tab.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-tab',\n role: 'tab',\n '[class]': 'tabs.passThrough().tab?.class',\n '[style]': 'tabs.passThrough().tab?.style',\n '[attr.data-styled]': '!tabs.isUnstyled() || null',\n '[attr.data-variant]': 'tabs.variant()',\n '[attr.data-size]': 'tabs.size()',\n '[attr.data-orientation]': 'tabs.orientation()',\n '[class.tx-tab--raised]': 'tabs.raised()',\n '[class.tx-tab--active]': 'active()',\n '[class.tx-tab--disabled]': 'disabled()',\n '[id]': 'tabs.tabId(value())',\n '[attr.type]': 'isButton ? \"button\" : null',\n '[attr.tabindex]': 'tabs.focusValue() === value() ? 0 : -1',\n '[attr.aria-selected]': 'active()',\n '[attr.aria-disabled]': 'disabled() || null',\n '[attr.aria-controls]': 'tabs.hasPanel(value()) ? tabs.panelId(value()) : null',\n '[attr.data-value]': 'value()',\n '(click)': 'onClick($event)',\n },\n})\nexport class TxTab implements OnInit {\n protected readonly tabs = inject(TX_TABS);\n private txIconRegistry = inject(TxIconRegistry);\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n protected readonly isButton = this.element.tagName === 'BUTTON';\n\n readonly value = input.required<TxTabValue>();\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly badge = input<number | string | null | undefined>(undefined);\n readonly description = input<string | undefined>(undefined);\n readonly disabled = input<boolean, unknown>(false, { transform: booleanAttribute });\n\n readonly active = computed(() => this.tabs.value() === this.value());\n readonly hasBadge = computed(() => this.badge() !== undefined && this.badge() !== null && this.badge() !== '');\n readonly iconName = computed(() => {\n const icon = this.icon();\n return icon && this.txIconRegistry.has(icon) ? icon : null;\n });\n\n private readonly destroyRef = inject(DestroyRef);\n\n ngOnInit(): void {\n const unregister = this.tabs.registerTab({ value: this.value, description: this.description, disabled: this.disabled });\n this.destroyRef.onDestroy(unregister);\n }\n\n focus(): void {\n this.element.focus();\n }\n\n protected onClick(event: MouseEvent): void {\n if (this.disabled()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n return;\n }\n this.tabs.select(this.value());\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n computed,\n contentChildren,\n inject,\n input,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { TxIcon } from '@tectra-ng/icons';\nimport { TxTab } from './tab.component';\nimport { TX_TABS } from './tabs.context';\n\nconst SCROLL_GAP = 8;\n\n@Component({\n selector: 'tx-tab-list',\n imports: [TxIcon],\n templateUrl: './tab-list.component.html',\n styleUrl: './tab-list.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-tab-list',\n '[class]': 'tabs.passThrough().list?.class',\n '[style]': 'tabs.passThrough().list?.style',\n '[attr.data-styled]': '!tabs.isUnstyled() || null',\n '[attr.data-variant]': 'tabs.variant()',\n '[attr.data-size]': 'tabs.size()',\n '[attr.data-orientation]': 'tabs.orientation()',\n '[class.tx-tab-list--raised]': 'tabs.raised()',\n '[class.tx-tab-list--scrollable]': 'tabs.scrollable()',\n },\n})\nexport class TxTabList {\n protected readonly tabs = inject(TX_TABS);\n private readonly items = contentChildren(TxTab, { descendants: true });\n private readonly destroyRef = inject(DestroyRef);\n private readonly content = viewChild.required<ElementRef<HTMLElement>>('content');\n\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n\n protected readonly canScrollPrevious = signal(false);\n protected readonly canScrollNext = signal(false);\n protected readonly bar = signal<{ start: number; size: number } | null>(null);\n protected readonly vertical = computed(() => this.tabs.orientation() === 'vertical');\n protected readonly navigators = computed(() => this.tabs.scrollable() && this.tabs.showNavigators() && !this.vertical());\n\n constructor() {\n afterRenderEffect(() => {\n this.tabs.value();\n this.items();\n this.vertical();\n this.navigators();\n this.tabs.variant();\n untracked(() => {\n this.observe();\n this.scrollToActive();\n this.updateBar();\n this.updateNavigators();\n });\n });\n\n afterNextRender(() => {\n if (typeof ResizeObserver === 'undefined') {\n return;\n }\n const observer = new ResizeObserver(() => {\n this.updateBar();\n this.updateNavigators();\n });\n this.observer = observer;\n this.observe();\n this.destroyRef.onDestroy(() => observer.disconnect());\n });\n }\n\n private observer: ResizeObserver | null = null;\n\n private observe(): void {\n const observer = this.observer;\n if (!observer) {\n return;\n }\n observer.disconnect();\n observer.observe(this.content().nativeElement);\n for (const tab of this.items()) {\n observer.observe(tab.element);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const enabled = this.items().filter((tab) => !tab.disabled());\n if (!enabled.length) {\n return;\n }\n const current = enabled.findIndex((tab) => tab.element === document.activeElement);\n const nextKey = this.vertical() ? 'ArrowDown' : 'ArrowRight';\n const previousKey = this.vertical() ? 'ArrowUp' : 'ArrowLeft';\n let target: TxTab | undefined;\n switch (event.key) {\n case nextKey:\n target = enabled[(current + 1) % enabled.length];\n break;\n case previousKey:\n target = enabled[(current - 1 + enabled.length) % enabled.length];\n break;\n case 'Home':\n target = enabled[0];\n break;\n case 'End':\n target = enabled[enabled.length - 1];\n break;\n case 'Enter':\n case ' ':\n if (current >= 0) {\n event.preventDefault();\n enabled[current].element.click();\n }\n return;\n default:\n return;\n }\n event.preventDefault();\n target.focus();\n if (this.tabs.selectOnFocus()) {\n this.tabs.select(target.value());\n }\n }\n\n protected scrollPrevious(): void {\n const content = this.content().nativeElement;\n content.scrollLeft = Math.max(0, content.scrollLeft - this.scrollStep());\n }\n\n protected scrollNext(): void {\n const content = this.content().nativeElement;\n content.scrollLeft = content.scrollLeft + this.scrollStep();\n }\n\n protected updateNavigators(): void {\n if (!this.navigators()) {\n this.canScrollPrevious.set(false);\n this.canScrollNext.set(false);\n return;\n }\n const content = this.content().nativeElement;\n const max = content.scrollWidth - content.clientWidth;\n this.canScrollPrevious.set(content.scrollLeft > 1);\n this.canScrollNext.set(max - content.scrollLeft > 1);\n }\n\n private scrollStep(): number {\n const content = this.content().nativeElement;\n return Math.max(content.clientWidth * 0.8, 1);\n }\n\n private activeTab(): TxTab | undefined {\n const value = this.tabs.value();\n return this.items().find((tab) => tab.value() === value);\n }\n\n private scrollToActive(): void {\n const tab = this.activeTab();\n if (!tab || this.vertical()) {\n return;\n }\n const content = this.content().nativeElement;\n const listRect = content.getBoundingClientRect();\n const itemRect = tab.element.getBoundingClientRect();\n if (itemRect.left < listRect.left) {\n content.scrollLeft -= listRect.left - itemRect.left + SCROLL_GAP;\n } else if (itemRect.right > listRect.right) {\n content.scrollLeft += itemRect.right - listRect.right + SCROLL_GAP;\n }\n }\n\n private updateBar(): void {\n const tab = this.tabs.variant() === 'line' ? this.activeTab() : undefined;\n if (!tab) {\n this.bar.set(null);\n return;\n }\n const element = tab.element;\n const next = this.vertical()\n ? { start: element.offsetTop, size: element.offsetHeight }\n : { start: element.offsetLeft, size: element.offsetWidth };\n const current = this.bar();\n if (!current || current.start !== next.start || current.size !== next.size) {\n this.bar.set(next);\n }\n }\n}\n","<div class=\"tx-tab-list__track\" [class]=\"tabs.passThrough().track?.class\" [style]=\"tabs.passThrough().track?.style\">\n @if (navigators()) {\n <button\n type=\"button\"\n class=\"tx-tab-list__nav tx-tab-list__nav--previous\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class.tx-tab-list__nav--hidden]=\"!canScrollPrevious()\"\n [class]=\"tabs.passThrough().previousButton?.class\"\n [style]=\"tabs.passThrough().previousButton?.style\"\n (click)=\"scrollPrevious()\"\n >\n <tx-icon name=\"chevron-left\" />\n </button>\n }\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- the tabs inside the list take focus; the list handles their arrow keys -->\n <div\n #content\n class=\"tx-tab-list__content\"\n role=\"tablist\"\n [attr.aria-orientation]=\"tabs.orientation()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [class]=\"tabs.passThrough().content?.class\"\n [style]=\"tabs.passThrough().content?.style\"\n (keydown)=\"onKeydown($event)\"\n (scroll)=\"updateNavigators()\"\n >\n <ng-content />\n @if (bar(); as bar) {\n <span\n class=\"tx-tab-list__active-bar\"\n aria-hidden=\"true\"\n [style.--_bar-start.px]=\"bar.start\"\n [style.--_bar-size.px]=\"bar.size\"\n [class]=\"tabs.passThrough().activeBar?.class\"\n [style]=\"tabs.passThrough().activeBar?.style\"\n ></span>\n }\n </div>\n @if (navigators()) {\n <button\n type=\"button\"\n class=\"tx-tab-list__nav tx-tab-list__nav--next\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class.tx-tab-list__nav--hidden]=\"!canScrollNext()\"\n [class]=\"tabs.passThrough().nextButton?.class\"\n [style]=\"tabs.passThrough().nextButton?.style\"\n (click)=\"scrollNext()\"\n >\n <tx-icon name=\"chevron-right\" />\n </button>\n }\n</div>\n@if (tabs.activeDescription(); as description) {\n <span class=\"tx-tab-list__description\" [class]=\"tabs.passThrough().description?.class\" [style]=\"tabs.passThrough().description?.style\">{{ description }}</span>\n}\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, model, output, signal, Signal } from '@angular/core';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraTabsTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TxTab } from './tab.component';\nimport { TxTabList } from './tab-list.component';\nimport { TX_TABS, TxTabRegistration, TxTabsContext } from './tabs.context';\nimport { TxTabItem, TxTabValue, TxTabsOrientation, TxTabsPart, TxTabsSize, TxTabsVariant } from './tabs.types';\n\n@Component({\n selector: 'tx-tabs',\n imports: [TxTabList, TxTab, TxTooltip],\n template: `\n @if (tabs(); as items) {\n <tx-tab-list [ariaLabel]=\"ariaLabel()\" [ariaLabelledBy]=\"ariaLabelledBy()\">\n @for (item of items; track item.value) {\n <tx-tab\n [value]=\"item.value\"\n [icon]=\"item.icon\"\n [badge]=\"item.badge\"\n [description]=\"item.description\"\n [disabled]=\"item.disabled ?? false\"\n [txTooltip]=\"item.tooltip\"\n tooltipPlacement=\"top\"\n >{{ item.label }}</tx-tab\n >\n }\n </tx-tab-list>\n }\n <ng-content />\n `,\n styles: `\n :host {\n display: flex;\n flex-direction: column;\n min-width: 0;\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: TX_TABS, useExisting: TxTabs }],\n host: {\n class: 'tx-tabs',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-variant]': 'variant()',\n '[attr.data-size]': 'size()',\n '[attr.data-orientation]': 'orientation()',\n '[class.tx-tabs--raised]': 'raised()',\n },\n})\nexport class TxTabs implements TxTabsContext {\n private baseId = uniqueId('tx-tabs');\n private readonly tabRegistrations = signal<TxTabRegistration[]>([]);\n private readonly panelValues = signal<Signal<TxTabValue>[]>([]);\n\n readonly value = model<TxTabValue | undefined>(undefined);\n readonly tabs = input<TxTabItem[] | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly variant = input<TxTabsVariant>('segmented');\n readonly size = input<TxTabsSize>('medium');\n readonly orientation = input<TxTabsOrientation>('horizontal');\n readonly raised = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly scrollable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly showNavigators = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly lazy = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly selectOnFocus = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraTabsTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTabsPart, TxTabs> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly tabChange = output<TxTabValue>();\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('tabs', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-tabs'), ...this.passThrough().root?.style }));\n readonly activeDescription = computed(() => {\n const value = this.value();\n return this.tabRegistrations()\n .find((tab) => tab.value() === value)\n ?.description();\n });\n\n readonly focusValue = computed(() => {\n const tabs = this.tabRegistrations().filter((tab) => !tab.disabled());\n const value = this.value();\n return (tabs.find((tab) => tab.value() === value) ?? tabs[0])?.value();\n });\n\n select(value: TxTabValue): void {\n if (this.value() === value) {\n return;\n }\n this.value.set(value);\n this.tabChange.emit(value);\n }\n\n hasPanel(value: TxTabValue): boolean {\n return this.panelValues().some((panel) => panel() === value);\n }\n\n tabId(value: TxTabValue): string {\n return `${this.baseId}-tab-${this.idPart(value)}`;\n }\n\n panelId(value: TxTabValue): string {\n return `${this.baseId}-panel-${this.idPart(value)}`;\n }\n\n registerTab(tab: TxTabRegistration): () => void {\n this.tabRegistrations.update((tabs) => [...tabs, tab]);\n return () => this.tabRegistrations.update((tabs) => tabs.filter((item) => item !== tab));\n }\n\n registerPanel(value: Signal<TxTabValue>): () => void {\n this.panelValues.update((panels) => [...panels, value]);\n return () => this.panelValues.update((panels) => panels.filter((item) => item !== value));\n }\n\n private idPart(value: TxTabValue): string {\n return String(value).replace(/[^\\w-]/g, '_');\n }\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { TX_TABS } from './tabs.context';\n\n@Component({\n selector: 'tx-tab-panels',\n template: '<ng-content />',\n styles: `\n :host {\n display: block;\n min-width: 0;\n }\n\n :host([data-styled]) {\n padding: var(--tx-tabs-panels-padding);\n background: var(--tx-tabs-panels-background);\n color: var(--tx-tabs-panels-color);\n }\n\n :host([data-styled][data-variant='line']) {\n padding: var(--tx-tabs-panels-line-padding);\n background: var(--tx-tabs-panels-line-background);\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-tab-panels',\n '[class]': 'tabs.passThrough().panels?.class',\n '[style]': 'tabs.passThrough().panels?.style',\n '[attr.data-styled]': '!tabs.isUnstyled() || null',\n '[attr.data-variant]': 'tabs.variant()',\n },\n})\nexport class TxTabPanels {\n protected readonly tabs = inject(TX_TABS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n OnInit,\n TemplateRef,\n computed,\n contentChild,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { TX_TABS } from './tabs.context';\nimport { TxTabPanelContentContext, TxTabValue } from './tabs.types';\n\n@Directive({ selector: 'ng-template[txTabPanelContent]' })\nexport class TxTabPanelContent {\n readonly template = inject<TemplateRef<TxTabPanelContentContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxTabPanelContent, context: unknown): context is TxTabPanelContentContext {\n return !!context;\n }\n}\n\n@Component({\n selector: 'tx-tab-panel',\n imports: [NgTemplateOutlet],\n template: `\n @if (!tabs.lazy() || active()) {\n <ng-content />\n }\n @if (lazyContent(); as content) {\n @if (active() || (visited() && !tabs.lazy())) {\n <ng-container *ngTemplateOutlet=\"content.template; context: { $implicit: value(), value: value() }\" />\n }\n }\n `,\n styles: `\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n :host([data-styled]:focus-visible) {\n outline: var(--tx-tabs-focus-ring-width) solid var(--tx-tabs-focus-ring-color);\n outline-offset: var(--tx-tabs-segmented-focus-ring-offset);\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-tab-panel',\n role: 'tabpanel',\n tabindex: '0',\n '[class]': 'tabs.passThrough().panel?.class',\n '[style]': 'tabs.passThrough().panel?.style',\n '[attr.data-styled]': '!tabs.isUnstyled() || null',\n '[id]': 'tabs.panelId(value())',\n '[attr.aria-labelledby]': 'tabs.tabId(value())',\n '[attr.hidden]': 'active() ? null : \"\"',\n '[class.tx-tab-panel--active]': 'active()',\n },\n})\nexport class TxTabPanel implements OnInit {\n protected readonly tabs = inject(TX_TABS);\n\n readonly value = input.required<TxTabValue>();\n\n protected readonly lazyContent = contentChild(TxTabPanelContent);\n protected readonly visited = signal(false);\n readonly active = computed(() => this.tabs.value() === this.value());\n\n private readonly destroyRef = inject(DestroyRef);\n\n ngOnInit(): void {\n const unregister = this.tabs.registerPanel(this.value);\n this.destroyRef.onDestroy(unregister);\n }\n\n constructor() {\n effect(() => {\n if (this.active()) {\n untracked(() => this.visited.set(true));\n }\n });\n }\n}\n"],"mappings":";;;;;;;;;AAgCA,MAAa,UAAU,IAAI,eAA8B,SAAS;ACelE,IAAa,QAAb,MAAa,MAAK;CACG,OAAO,OAAO,OAAO;CAChC,iBAAiB,OAAO,cAAc;CACrC,UAAU,OAAgC,UAAU,CAAC,CAAC;CAC5C,WAAW,KAAK,QAAQ,YAAY;CAE9C,QAAQ,MAAM,SAAsB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACpC,OAAO,MAA8C,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;C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
56
56
|
lastHeight = 0;
|
|
57
|
+
fitted = false;
|
|
57
58
|
autoResize = input(false, {
|
|
58
59
|
...ngDevMode ? { debugName: "autoResize" } : /* istanbul ignore next */ {},
|
|
59
60
|
transform: booleanAttribute
|
|
@@ -109,12 +110,14 @@ var TxTextarea = class TxTextarea {
|
|
|
109
110
|
fit() {
|
|
110
111
|
const element = this.elementRef.nativeElement;
|
|
111
112
|
if (!this.autoResize()) {
|
|
112
|
-
if (
|
|
113
|
+
if (this.fitted) {
|
|
114
|
+
this.fitted = false;
|
|
113
115
|
element.style.removeProperty("height");
|
|
114
116
|
element.style.removeProperty("overflow-y");
|
|
115
117
|
}
|
|
116
118
|
return;
|
|
117
119
|
}
|
|
120
|
+
this.fitted = true;
|
|
118
121
|
const style = this.document.defaultView?.getComputedStyle(element);
|
|
119
122
|
const borders = style ? px(style.borderTopWidth) + px(style.borderBottomWidth) : 0;
|
|
120
123
|
element.style.height = "auto";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-ui-textarea.mjs","names":[],"sources":["../../../../packages/ui/textarea/src/textarea.styles.ts","../../../../packages/ui/textarea/src/textarea.directive.ts","../../../../packages/ui/textarea/src/textarea-counter.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'tx-textarea-styles',\n template: '',\n styleUrl: './textarea.styles.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TxTextareaStyles {}\n","import { optionalNumber } from '@tectra-ng/core/utils';\nimport {\n DOCUMENT,\n DestroyRef,\n Directive,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { TxStyleLoader } from '@tectra-ng/core/styles';\nimport { TectraDeepPartial, TectraTextareaTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxInput } from '@tectra-ng/ui/input';\nimport { TxTextareaStyles } from './textarea.styles';\nimport { TxTextareaResize } from './textarea.types';\n\n@Directive({\n selector: 'textarea[txTextarea]',\n exportAs: 'txTextarea',\n hostDirectives: [{ directive: TxInput, inputs: ['invalid', 'size', 'variant', 'fluid', 'dt: fieldDt', 'pt', 'ptOptions', 'unstyled'] }],\n host: {\n class: 'tx-textarea',\n '[attr.data-resize]': 'resize()',\n '[class.tx-textarea--auto-resize]': 'autoResize()',\n '[class.tx-textarea--borderless]': 'borderless()',\n '[style]': 'tokenStyle()',\n '(input)': 'onInput()',\n },\n})\nexport class TxTextarea {\n private elementRef = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n private document = inject(DOCUMENT);\n private ngControl = inject(NgControl, { self: true, optional: true });\n private lastHeight = 0;\n\n readonly autoResize = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly maxHeight = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly maxRows = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly resize = input<TxTextareaResize>('vertical');\n readonly borderless = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraTextareaTokens> | undefined>(undefined);\n\n readonly heightChange = output<number>();\n\n readonly length = signal(0);\n readonly maxLength = signal<number | null>(null);\n readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-textarea'));\n\n constructor() {\n inject(TxStyleLoader).load(TxTextareaStyles);\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n this.sync();\n const subscription = this.ngControl?.valueChanges?.subscribe(() => queueMicrotask(() => this.sync()));\n const view = this.document.defaultView;\n const observer = view && 'ResizeObserver' in view ? new ResizeObserver(() => this.fit()) : null;\n observer?.observe(this.elementRef.nativeElement);\n destroyRef.onDestroy(() => {\n subscription?.unsubscribe();\n observer?.disconnect();\n });\n });\n effect(() => {\n this.autoResize();\n this.maxHeight();\n this.maxRows();\n queueMicrotask(() => this.fit());\n });\n }\n\n onInput(): void {\n this.sync();\n }\n\n private sync(): void {\n const element = this.elementRef.nativeElement;\n this.length.set(element.value.length);\n this.maxLength.set(element.maxLength > 0 ? element.maxLength : null);\n this.fit();\n }\n\n private fit(): void {\n const element = this.elementRef.nativeElement;\n if (!this.autoResize()) {\n if (element.style.height) {\n element.style.removeProperty('height');\n element.style.removeProperty('overflow-y');\n }\n return;\n }\n const style = this.document.defaultView?.getComputedStyle(element);\n const borders = style ? px(style.borderTopWidth) + px(style.borderBottomWidth) : 0;\n element.style.height = 'auto';\n const content = element.scrollHeight + borders;\n const limit = this.limit(style, borders);\n const height = limit ? Math.min(content, limit) : content;\n element.style.height = `${height}px`;\n element.style.overflowY = limit && content > limit ? 'auto' : 'hidden';\n if (height !== this.lastHeight) {\n this.lastHeight = height;\n this.heightChange.emit(height);\n }\n }\n\n private limit(style: CSSStyleDeclaration | undefined, borders: number): number | null {\n const maxHeight = this.maxHeight();\n if (maxHeight && maxHeight > 0) {\n return maxHeight;\n }\n const rows = this.maxRows();\n if (rows && style) {\n const lineHeight = px(style.lineHeight) || px(style.fontSize) * 1.5;\n return rows * lineHeight + px(style.paddingTop) + px(style.paddingBottom) + borders;\n }\n return null;\n }\n}\n\nfunction px(value: string): number {\n return parseFloat(value) || 0;\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraTextareaTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTextarea } from './textarea.directive';\nimport { TxTextareaCounterPart } from './textarea.types';\n\n@Component({\n selector: 'tx-textarea-counter',\n template: `{{ text() }}`,\n styles: `\n :host {\n display: block;\n }\n\n :host([data-styled]) {\n margin-top: var(--tx-textarea-counter-margin-top);\n color: var(--tx-textarea-counter-color);\n font-family: var(--tx-font-family);\n font-size: var(--tx-textarea-counter-font-size);\n font-variant-numeric: tabular-nums;\n text-align: end;\n }\n\n :host([data-styled].tx-textarea-counter--limit) {\n color: var(--tx-textarea-counter-limit-color);\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-textarea-counter',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-textarea-counter--limit]': 'isAtLimit()',\n 'aria-hidden': 'true',\n },\n})\nexport class TxTextareaCounter {\n readonly for = input.required<TxTextarea>();\n readonly dt = input<TectraDeepPartial<TectraTextareaTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTextareaCounterPart, TxTextareaCounter> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('textareaCounter', this, this.pt, this.ptOptions);\n readonly text = computed(() => {\n const max = this.for().maxLength();\n return max ? `${this.for().length()} / ${max}` : String(this.for().length());\n });\n readonly isAtLimit = computed(() => {\n const max = this.for().maxLength();\n return !!max && this.for().length() >= max;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-textarea'), ...this.passThrough().root?.style }));\n}\n"],"mappings":";;;;;;;;;AASA,IAAa,mBAAb,MAAa,iBAAgB;CAAhB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAgB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAhB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAgB,cAAA;EAAA,UAAA;EAAA,UAAA;EAAA,UALjB;EAAE,UAAA;EAAA,QAAA,CAAA,q+BAAA;EAAA,iBAAA,GAAA,wBAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAKD,GAAA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AAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,eAAA,OAAA;GAAA,YAAA;IAAA,SAAA;IAAA,SAAA;IAAA,oBAAA;IAAA,oCAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UA7BlB;EAAc,UAAA;EAAA,QAAA,CAAA,oWAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AA6Bb,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EA/B7B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAqB,UACrB;GAAc,iBAmBP,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,sCAAsC;IACtC,eAAe;GAChB;GAAA,QAAA,CAAA,oWAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-textarea.mjs","names":[],"sources":["../../../../packages/ui/textarea/src/textarea.styles.ts","../../../../packages/ui/textarea/src/textarea.directive.ts","../../../../packages/ui/textarea/src/textarea-counter.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'tx-textarea-styles',\n template: '',\n styleUrl: './textarea.styles.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TxTextareaStyles {}\n","import { optionalNumber } from '@tectra-ng/core/utils';\nimport {\n DOCUMENT,\n DestroyRef,\n Directive,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { TxStyleLoader } from '@tectra-ng/core/styles';\nimport { TectraDeepPartial, TectraTextareaTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxInput } from '@tectra-ng/ui/input';\nimport { TxTextareaStyles } from './textarea.styles';\nimport { TxTextareaResize } from './textarea.types';\n\n@Directive({\n selector: 'textarea[txTextarea]',\n exportAs: 'txTextarea',\n hostDirectives: [{ directive: TxInput, inputs: ['invalid', 'size', 'variant', 'fluid', 'dt: fieldDt', 'pt', 'ptOptions', 'unstyled'] }],\n host: {\n class: 'tx-textarea',\n '[attr.data-resize]': 'resize()',\n '[class.tx-textarea--auto-resize]': 'autoResize()',\n '[class.tx-textarea--borderless]': 'borderless()',\n '[style]': 'tokenStyle()',\n '(input)': 'onInput()',\n },\n})\nexport class TxTextarea {\n private elementRef = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n private document = inject(DOCUMENT);\n private ngControl = inject(NgControl, { self: true, optional: true });\n private lastHeight = 0;\n private fitted = false;\n\n readonly autoResize = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly maxHeight = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly maxRows = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly resize = input<TxTextareaResize>('vertical');\n readonly borderless = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraTextareaTokens> | undefined>(undefined);\n\n readonly heightChange = output<number>();\n\n readonly length = signal(0);\n readonly maxLength = signal<number | null>(null);\n readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-textarea'));\n\n constructor() {\n inject(TxStyleLoader).load(TxTextareaStyles);\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n this.sync();\n const subscription = this.ngControl?.valueChanges?.subscribe(() => queueMicrotask(() => this.sync()));\n const view = this.document.defaultView;\n const observer = view && 'ResizeObserver' in view ? new ResizeObserver(() => this.fit()) : null;\n observer?.observe(this.elementRef.nativeElement);\n destroyRef.onDestroy(() => {\n subscription?.unsubscribe();\n observer?.disconnect();\n });\n });\n effect(() => {\n this.autoResize();\n this.maxHeight();\n this.maxRows();\n queueMicrotask(() => this.fit());\n });\n }\n\n onInput(): void {\n this.sync();\n }\n\n private sync(): void {\n const element = this.elementRef.nativeElement;\n this.length.set(element.value.length);\n this.maxLength.set(element.maxLength > 0 ? element.maxLength : null);\n this.fit();\n }\n\n private fit(): void {\n const element = this.elementRef.nativeElement;\n if (!this.autoResize()) {\n if (this.fitted) {\n this.fitted = false;\n element.style.removeProperty('height');\n element.style.removeProperty('overflow-y');\n }\n return;\n }\n this.fitted = true;\n const style = this.document.defaultView?.getComputedStyle(element);\n const borders = style ? px(style.borderTopWidth) + px(style.borderBottomWidth) : 0;\n element.style.height = 'auto';\n const content = element.scrollHeight + borders;\n const limit = this.limit(style, borders);\n const height = limit ? Math.min(content, limit) : content;\n element.style.height = `${height}px`;\n element.style.overflowY = limit && content > limit ? 'auto' : 'hidden';\n if (height !== this.lastHeight) {\n this.lastHeight = height;\n this.heightChange.emit(height);\n }\n }\n\n private limit(style: CSSStyleDeclaration | undefined, borders: number): number | null {\n const maxHeight = this.maxHeight();\n if (maxHeight && maxHeight > 0) {\n return maxHeight;\n }\n const rows = this.maxRows();\n if (rows && style) {\n const lineHeight = px(style.lineHeight) || px(style.fontSize) * 1.5;\n return rows * lineHeight + px(style.paddingTop) + px(style.paddingBottom) + borders;\n }\n return null;\n }\n}\n\nfunction px(value: string): number {\n return parseFloat(value) || 0;\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraTextareaTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTextarea } from './textarea.directive';\nimport { TxTextareaCounterPart } from './textarea.types';\n\n@Component({\n selector: 'tx-textarea-counter',\n template: `{{ text() }}`,\n styles: `\n :host {\n display: block;\n }\n\n :host([data-styled]) {\n margin-top: var(--tx-textarea-counter-margin-top);\n color: var(--tx-textarea-counter-color);\n font-family: var(--tx-font-family);\n font-size: var(--tx-textarea-counter-font-size);\n font-variant-numeric: tabular-nums;\n text-align: end;\n }\n\n :host([data-styled].tx-textarea-counter--limit) {\n color: var(--tx-textarea-counter-limit-color);\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-textarea-counter',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-textarea-counter--limit]': 'isAtLimit()',\n 'aria-hidden': 'true',\n },\n})\nexport class TxTextareaCounter {\n readonly for = input.required<TxTextarea>();\n readonly dt = input<TectraDeepPartial<TectraTextareaTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTextareaCounterPart, TxTextareaCounter> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('textareaCounter', this, this.pt, this.ptOptions);\n readonly text = computed(() => {\n const max = this.for().maxLength();\n return max ? `${this.for().length()} / ${max}` : String(this.for().length());\n });\n readonly isAtLimit = computed(() => {\n const max = this.for().maxLength();\n return !!max && this.for().length() >= max;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-textarea'), ...this.passThrough().root?.style }));\n}\n"],"mappings":";;;;;;;;;AASA,IAAa,mBAAb,MAAa,iBAAgB;CAAhB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAgB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAhB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,S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A;EAAA,UAAA;EAAA,QAAA;GAAA,KAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,IAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,IAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,eAAA,OAAA;GAAA,YAAA;IAAA,SAAA;IAAA,SAAA;IAAA,oBAAA;IAAA,oCAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UA7BlB;EAAc,UAAA;EAAA,QAAA,CAAA,oWAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AA6Bb,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EA/B7B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAqB,UACrB;GAAc,iBAmBP,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,sCAAsC;IACtC,eAAe;GAChB;GAAA,QAAA,CAAA,oWAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, TemplateRef, computed, contentChild, inject, input } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
5
|
+
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
6
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
7
|
+
var TxTimelineContent = class TxTimelineContent {
|
|
8
|
+
templateRef = inject(TemplateRef);
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
10
|
+
minVersion: "12.0.0",
|
|
11
|
+
version: "22.2.3",
|
|
12
|
+
ngImport: i0,
|
|
13
|
+
type: TxTimelineContent,
|
|
14
|
+
deps: [],
|
|
15
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
16
|
+
});
|
|
17
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
18
|
+
minVersion: "14.0.0",
|
|
19
|
+
version: "22.2.3",
|
|
20
|
+
type: TxTimelineContent,
|
|
21
|
+
isStandalone: true,
|
|
22
|
+
selector: "ng-template[txTimelineContent]",
|
|
23
|
+
ngImport: i0
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
27
|
+
minVersion: "12.0.0",
|
|
28
|
+
version: "22.2.3",
|
|
29
|
+
ngImport: i0,
|
|
30
|
+
type: TxTimelineContent,
|
|
31
|
+
decorators: [{
|
|
32
|
+
type: Directive,
|
|
33
|
+
args: [{ selector: "ng-template[txTimelineContent]" }]
|
|
34
|
+
}]
|
|
35
|
+
});
|
|
36
|
+
var TxTimelineOpposite = class TxTimelineOpposite {
|
|
37
|
+
templateRef = inject(TemplateRef);
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
39
|
+
minVersion: "12.0.0",
|
|
40
|
+
version: "22.2.3",
|
|
41
|
+
ngImport: i0,
|
|
42
|
+
type: TxTimelineOpposite,
|
|
43
|
+
deps: [],
|
|
44
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
45
|
+
});
|
|
46
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
47
|
+
minVersion: "14.0.0",
|
|
48
|
+
version: "22.2.3",
|
|
49
|
+
type: TxTimelineOpposite,
|
|
50
|
+
isStandalone: true,
|
|
51
|
+
selector: "ng-template[txTimelineOpposite]",
|
|
52
|
+
ngImport: i0
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
56
|
+
minVersion: "12.0.0",
|
|
57
|
+
version: "22.2.3",
|
|
58
|
+
ngImport: i0,
|
|
59
|
+
type: TxTimelineOpposite,
|
|
60
|
+
decorators: [{
|
|
61
|
+
type: Directive,
|
|
62
|
+
args: [{ selector: "ng-template[txTimelineOpposite]" }]
|
|
63
|
+
}]
|
|
64
|
+
});
|
|
65
|
+
var TxTimelineMarker = class TxTimelineMarker {
|
|
66
|
+
templateRef = inject(TemplateRef);
|
|
67
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
68
|
+
minVersion: "12.0.0",
|
|
69
|
+
version: "22.2.3",
|
|
70
|
+
ngImport: i0,
|
|
71
|
+
type: TxTimelineMarker,
|
|
72
|
+
deps: [],
|
|
73
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
74
|
+
});
|
|
75
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
76
|
+
minVersion: "14.0.0",
|
|
77
|
+
version: "22.2.3",
|
|
78
|
+
type: TxTimelineMarker,
|
|
79
|
+
isStandalone: true,
|
|
80
|
+
selector: "ng-template[txTimelineMarker]",
|
|
81
|
+
ngImport: i0
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
85
|
+
minVersion: "12.0.0",
|
|
86
|
+
version: "22.2.3",
|
|
87
|
+
ngImport: i0,
|
|
88
|
+
type: TxTimelineMarker,
|
|
89
|
+
decorators: [{
|
|
90
|
+
type: Directive,
|
|
91
|
+
args: [{ selector: "ng-template[txTimelineMarker]" }]
|
|
92
|
+
}]
|
|
93
|
+
});
|
|
94
|
+
var TxTimelineConnector = class TxTimelineConnector {
|
|
95
|
+
templateRef = inject(TemplateRef);
|
|
96
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
97
|
+
minVersion: "12.0.0",
|
|
98
|
+
version: "22.2.3",
|
|
99
|
+
ngImport: i0,
|
|
100
|
+
type: TxTimelineConnector,
|
|
101
|
+
deps: [],
|
|
102
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
103
|
+
});
|
|
104
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
105
|
+
minVersion: "14.0.0",
|
|
106
|
+
version: "22.2.3",
|
|
107
|
+
type: TxTimelineConnector,
|
|
108
|
+
isStandalone: true,
|
|
109
|
+
selector: "ng-template[txTimelineConnector]",
|
|
110
|
+
ngImport: i0
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
114
|
+
minVersion: "12.0.0",
|
|
115
|
+
version: "22.2.3",
|
|
116
|
+
ngImport: i0,
|
|
117
|
+
type: TxTimelineConnector,
|
|
118
|
+
decorators: [{
|
|
119
|
+
type: Directive,
|
|
120
|
+
args: [{ selector: "ng-template[txTimelineConnector]" }]
|
|
121
|
+
}]
|
|
122
|
+
});
|
|
123
|
+
var TxTimeline = class TxTimeline {
|
|
124
|
+
value = input([], ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
125
|
+
layout = input("vertical", ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
126
|
+
align = input(void 0, ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
|
|
127
|
+
ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
128
|
+
ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
129
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
130
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
131
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
132
|
+
unstyled = input(void 0, {
|
|
133
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
134
|
+
transform: optionalBoolean
|
|
135
|
+
});
|
|
136
|
+
contentTemplate = contentChild(TxTimelineContent, ...ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
|
|
137
|
+
oppositeTemplate = contentChild(TxTimelineOpposite, ...ngDevMode ? [{ debugName: "oppositeTemplate" }] : /* istanbul ignore next */ []);
|
|
138
|
+
markerTemplate = contentChild(TxTimelineMarker, ...ngDevMode ? [{ debugName: "markerTemplate" }] : /* istanbul ignore next */ []);
|
|
139
|
+
connectorTemplate = contentChild(TxTimelineConnector, ...ngDevMode ? [{ debugName: "connectorTemplate" }] : /* istanbul ignore next */ []);
|
|
140
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
141
|
+
passThrough = injectPassThrough("timeline", this, this.pt, this.ptOptions);
|
|
142
|
+
hostStyle = computed(() => ({
|
|
143
|
+
...toStyleObject(this.dt(), "--tx-timeline"),
|
|
144
|
+
...this.passThrough().root?.style
|
|
145
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
146
|
+
resolvedAlign = computed(() => this.align() ?? (this.layout() === "horizontal" ? "top" : "left"), ...ngDevMode ? [{ debugName: "resolvedAlign" }] : /* istanbul ignore next */ []);
|
|
147
|
+
events = computed(() => {
|
|
148
|
+
const items = this.value() ?? [];
|
|
149
|
+
return items.map((item, index) => ({
|
|
150
|
+
$implicit: item,
|
|
151
|
+
index,
|
|
152
|
+
first: index === 0,
|
|
153
|
+
last: index === items.length - 1
|
|
154
|
+
}));
|
|
155
|
+
}, ...ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []);
|
|
156
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
157
|
+
minVersion: "12.0.0",
|
|
158
|
+
version: "22.2.3",
|
|
159
|
+
ngImport: i0,
|
|
160
|
+
type: TxTimeline,
|
|
161
|
+
deps: [],
|
|
162
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
163
|
+
});
|
|
164
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
165
|
+
minVersion: "17.0.0",
|
|
166
|
+
version: "22.2.3",
|
|
167
|
+
type: TxTimeline,
|
|
168
|
+
isStandalone: true,
|
|
169
|
+
selector: "tx-timeline",
|
|
170
|
+
inputs: {
|
|
171
|
+
value: {
|
|
172
|
+
classPropertyName: "value",
|
|
173
|
+
publicName: "value",
|
|
174
|
+
isSignal: true,
|
|
175
|
+
isRequired: false,
|
|
176
|
+
transformFunction: null
|
|
177
|
+
},
|
|
178
|
+
layout: {
|
|
179
|
+
classPropertyName: "layout",
|
|
180
|
+
publicName: "layout",
|
|
181
|
+
isSignal: true,
|
|
182
|
+
isRequired: false,
|
|
183
|
+
transformFunction: null
|
|
184
|
+
},
|
|
185
|
+
align: {
|
|
186
|
+
classPropertyName: "align",
|
|
187
|
+
publicName: "align",
|
|
188
|
+
isSignal: true,
|
|
189
|
+
isRequired: false,
|
|
190
|
+
transformFunction: null
|
|
191
|
+
},
|
|
192
|
+
ariaLabel: {
|
|
193
|
+
classPropertyName: "ariaLabel",
|
|
194
|
+
publicName: "ariaLabel",
|
|
195
|
+
isSignal: true,
|
|
196
|
+
isRequired: false,
|
|
197
|
+
transformFunction: null
|
|
198
|
+
},
|
|
199
|
+
ariaLabelledBy: {
|
|
200
|
+
classPropertyName: "ariaLabelledBy",
|
|
201
|
+
publicName: "ariaLabelledBy",
|
|
202
|
+
isSignal: true,
|
|
203
|
+
isRequired: false,
|
|
204
|
+
transformFunction: null
|
|
205
|
+
},
|
|
206
|
+
dt: {
|
|
207
|
+
classPropertyName: "dt",
|
|
208
|
+
publicName: "dt",
|
|
209
|
+
isSignal: true,
|
|
210
|
+
isRequired: false,
|
|
211
|
+
transformFunction: null
|
|
212
|
+
},
|
|
213
|
+
pt: {
|
|
214
|
+
classPropertyName: "pt",
|
|
215
|
+
publicName: "pt",
|
|
216
|
+
isSignal: true,
|
|
217
|
+
isRequired: false,
|
|
218
|
+
transformFunction: null
|
|
219
|
+
},
|
|
220
|
+
ptOptions: {
|
|
221
|
+
classPropertyName: "ptOptions",
|
|
222
|
+
publicName: "ptOptions",
|
|
223
|
+
isSignal: true,
|
|
224
|
+
isRequired: false,
|
|
225
|
+
transformFunction: null
|
|
226
|
+
},
|
|
227
|
+
unstyled: {
|
|
228
|
+
classPropertyName: "unstyled",
|
|
229
|
+
publicName: "unstyled",
|
|
230
|
+
isSignal: true,
|
|
231
|
+
isRequired: false,
|
|
232
|
+
transformFunction: null
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
host: {
|
|
236
|
+
properties: {
|
|
237
|
+
"class": "passThrough().root?.class",
|
|
238
|
+
"style": "hostStyle()",
|
|
239
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
240
|
+
"attr.data-layout": "layout()",
|
|
241
|
+
"attr.data-align": "resolvedAlign()"
|
|
242
|
+
},
|
|
243
|
+
classAttribute: "tx-timeline"
|
|
244
|
+
},
|
|
245
|
+
queries: [
|
|
246
|
+
{
|
|
247
|
+
propertyName: "contentTemplate",
|
|
248
|
+
first: true,
|
|
249
|
+
predicate: TxTimelineContent,
|
|
250
|
+
descendants: true,
|
|
251
|
+
isSignal: true
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
propertyName: "oppositeTemplate",
|
|
255
|
+
first: true,
|
|
256
|
+
predicate: TxTimelineOpposite,
|
|
257
|
+
descendants: true,
|
|
258
|
+
isSignal: true
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
propertyName: "markerTemplate",
|
|
262
|
+
first: true,
|
|
263
|
+
predicate: TxTimelineMarker,
|
|
264
|
+
descendants: true,
|
|
265
|
+
isSignal: true
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
propertyName: "connectorTemplate",
|
|
269
|
+
first: true,
|
|
270
|
+
predicate: TxTimelineConnector,
|
|
271
|
+
descendants: true,
|
|
272
|
+
isSignal: true
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
ngImport: i0,
|
|
276
|
+
template: "<ol\n class=\"tx-timeline__list\"\n [class]=\"passThrough().list?.class\"\n [style]=\"passThrough().list?.style\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n>\n @for (event of events(); track $index) {\n <li class=\"tx-timeline__event\" [class]=\"passThrough().event?.class\" [style]=\"passThrough().event?.style\">\n <div\n class=\"tx-timeline__opposite\"\n [class]=\"passThrough().eventOpposite?.class\"\n [style]=\"passThrough().eventOpposite?.style\"\n >\n @if (oppositeTemplate(); as opposite) {\n <ng-container *ngTemplateOutlet=\"opposite.templateRef; context: event\" />\n }\n </div>\n <div\n class=\"tx-timeline__separator\"\n [class]=\"passThrough().eventSeparator?.class\"\n [style]=\"passThrough().eventSeparator?.style\"\n >\n @if (markerTemplate(); as marker) {\n <ng-container *ngTemplateOutlet=\"marker.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__marker\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventMarker?.class\"\n [style]=\"passThrough().eventMarker?.style\"\n ></span>\n }\n @if (!event.last) {\n @if (connectorTemplate(); as connector) {\n <ng-container *ngTemplateOutlet=\"connector.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__connector\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventConnector?.class\"\n [style]=\"passThrough().eventConnector?.style\"\n ></span>\n }\n }\n </div>\n <div\n class=\"tx-timeline__content\"\n [class]=\"passThrough().eventContent?.class\"\n [style]=\"passThrough().eventContent?.style\"\n >\n @if (contentTemplate(); as content) {\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: event\" />\n }\n </div>\n </li>\n }\n</ol>\n",
|
|
277
|
+
styles: [":host{display:block}:host([data-styled]) .tx-timeline__list{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0;list-style:none}:host([data-styled]) .tx-timeline__event{position:relative;display:flex;min-height:var(--tx-timeline-event-min-height)}:host([data-styled]) .tx-timeline__event:last-child{min-height:0}:host([data-styled]) .tx-timeline__opposite,:host([data-styled]) .tx-timeline__content{flex:1}:host([data-styled]) .tx-timeline__separator{display:flex;flex:0;flex-direction:column;align-items:center}:host([data-styled]) .tx-timeline__marker{position:relative;display:inline-flex;align-self:baseline;align-items:center;justify-content:center;box-sizing:border-box;flex-shrink:0;width:var(--tx-timeline-event-marker-size);height:var(--tx-timeline-event-marker-size);border:var(--tx-timeline-event-marker-border-width) solid var(--tx-timeline-event-marker-border-color);border-radius:var(--tx-timeline-event-marker-border-radius);background:var(--tx-timeline-event-marker-background)}:host([data-styled]) .tx-timeline__marker:before{width:var(--tx-timeline-event-marker-content-size);height:var(--tx-timeline-event-marker-content-size);border-radius:var(--tx-timeline-event-marker-content-border-radius);background:var(--tx-timeline-event-marker-content-background);content:\"\"}:host([data-styled]) .tx-timeline__marker:after{position:absolute;width:100%;height:100%;border-radius:var(--tx-timeline-event-marker-border-radius);box-shadow:var(--tx-timeline-event-marker-content-inset-shadow);content:\"\"}:host([data-styled]) .tx-timeline__connector{flex-grow:1;background:var(--tx-timeline-event-connector-color)}:host([data-styled][data-layout=vertical]) .tx-timeline__opposite,:host([data-styled][data-layout=vertical]) .tx-timeline__content{padding:var(--tx-timeline-vertical-event-content-padding)}:host([data-styled][data-layout=vertical]) .tx-timeline__connector{width:var(--tx-timeline-event-connector-size)}:host([data-styled][data-layout=vertical][data-align=left]) .tx-timeline__opposite{text-align:end}:host([data-styled][data-layout=vertical][data-align=left]) .tx-timeline__content{text-align:start}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__event{flex-direction:row-reverse}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__opposite{text-align:start}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__content{text-align:end}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(odd) .tx-timeline__opposite{text-align:end}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(odd) .tx-timeline__content{text-align:start}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n){flex-direction:row-reverse}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n) .tx-timeline__opposite{text-align:start}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n) .tx-timeline__content{text-align:end}:host([data-styled][data-layout=horizontal]) .tx-timeline__list{flex-direction:row}:host([data-styled][data-layout=horizontal]) .tx-timeline__event{flex:1;flex-direction:column}:host([data-styled][data-layout=horizontal]) .tx-timeline__event:last-child{flex:0}:host([data-styled][data-layout=horizontal]) .tx-timeline__separator{flex-direction:row}:host([data-styled][data-layout=horizontal]) .tx-timeline__connector{width:100%;height:var(--tx-timeline-event-connector-size)}:host([data-styled][data-layout=horizontal]) .tx-timeline__opposite,:host([data-styled][data-layout=horizontal]) .tx-timeline__content{padding:var(--tx-timeline-horizontal-event-content-padding)}:host([data-styled][data-layout=horizontal][data-align=bottom]) .tx-timeline__event,:host([data-styled][data-layout=horizontal][data-align=alternate]) .tx-timeline__event:nth-child(2n){flex-direction:column-reverse}\n"],
|
|
278
|
+
dependencies: [{
|
|
279
|
+
kind: "directive",
|
|
280
|
+
type: NgTemplateOutlet,
|
|
281
|
+
selector: "[ngTemplateOutlet]",
|
|
282
|
+
inputs: [
|
|
283
|
+
"ngTemplateOutletContext",
|
|
284
|
+
"ngTemplateOutlet",
|
|
285
|
+
"ngTemplateOutletInjector"
|
|
286
|
+
]
|
|
287
|
+
}],
|
|
288
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
292
|
+
minVersion: "12.0.0",
|
|
293
|
+
version: "22.2.3",
|
|
294
|
+
ngImport: i0,
|
|
295
|
+
type: TxTimeline,
|
|
296
|
+
decorators: [{
|
|
297
|
+
type: Component,
|
|
298
|
+
args: [{
|
|
299
|
+
selector: "tx-timeline",
|
|
300
|
+
imports: [NgTemplateOutlet],
|
|
301
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
302
|
+
host: {
|
|
303
|
+
class: "tx-timeline",
|
|
304
|
+
"[class]": "passThrough().root?.class",
|
|
305
|
+
"[style]": "hostStyle()",
|
|
306
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
307
|
+
"[attr.data-layout]": "layout()",
|
|
308
|
+
"[attr.data-align]": "resolvedAlign()"
|
|
309
|
+
},
|
|
310
|
+
template: "<ol\n class=\"tx-timeline__list\"\n [class]=\"passThrough().list?.class\"\n [style]=\"passThrough().list?.style\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n>\n @for (event of events(); track $index) {\n <li class=\"tx-timeline__event\" [class]=\"passThrough().event?.class\" [style]=\"passThrough().event?.style\">\n <div\n class=\"tx-timeline__opposite\"\n [class]=\"passThrough().eventOpposite?.class\"\n [style]=\"passThrough().eventOpposite?.style\"\n >\n @if (oppositeTemplate(); as opposite) {\n <ng-container *ngTemplateOutlet=\"opposite.templateRef; context: event\" />\n }\n </div>\n <div\n class=\"tx-timeline__separator\"\n [class]=\"passThrough().eventSeparator?.class\"\n [style]=\"passThrough().eventSeparator?.style\"\n >\n @if (markerTemplate(); as marker) {\n <ng-container *ngTemplateOutlet=\"marker.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__marker\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventMarker?.class\"\n [style]=\"passThrough().eventMarker?.style\"\n ></span>\n }\n @if (!event.last) {\n @if (connectorTemplate(); as connector) {\n <ng-container *ngTemplateOutlet=\"connector.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__connector\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventConnector?.class\"\n [style]=\"passThrough().eventConnector?.style\"\n ></span>\n }\n }\n </div>\n <div\n class=\"tx-timeline__content\"\n [class]=\"passThrough().eventContent?.class\"\n [style]=\"passThrough().eventContent?.style\"\n >\n @if (contentTemplate(); as content) {\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: event\" />\n }\n </div>\n </li>\n }\n</ol>\n",
|
|
311
|
+
styles: [":host{display:block}:host([data-styled]) .tx-timeline__list{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0;list-style:none}:host([data-styled]) .tx-timeline__event{position:relative;display:flex;min-height:var(--tx-timeline-event-min-height)}:host([data-styled]) .tx-timeline__event:last-child{min-height:0}:host([data-styled]) .tx-timeline__opposite,:host([data-styled]) .tx-timeline__content{flex:1}:host([data-styled]) .tx-timeline__separator{display:flex;flex:0;flex-direction:column;align-items:center}:host([data-styled]) .tx-timeline__marker{position:relative;display:inline-flex;align-self:baseline;align-items:center;justify-content:center;box-sizing:border-box;flex-shrink:0;width:var(--tx-timeline-event-marker-size);height:var(--tx-timeline-event-marker-size);border:var(--tx-timeline-event-marker-border-width) solid var(--tx-timeline-event-marker-border-color);border-radius:var(--tx-timeline-event-marker-border-radius);background:var(--tx-timeline-event-marker-background)}:host([data-styled]) .tx-timeline__marker:before{width:var(--tx-timeline-event-marker-content-size);height:var(--tx-timeline-event-marker-content-size);border-radius:var(--tx-timeline-event-marker-content-border-radius);background:var(--tx-timeline-event-marker-content-background);content:\"\"}:host([data-styled]) .tx-timeline__marker:after{position:absolute;width:100%;height:100%;border-radius:var(--tx-timeline-event-marker-border-radius);box-shadow:var(--tx-timeline-event-marker-content-inset-shadow);content:\"\"}:host([data-styled]) .tx-timeline__connector{flex-grow:1;background:var(--tx-timeline-event-connector-color)}:host([data-styled][data-layout=vertical]) .tx-timeline__opposite,:host([data-styled][data-layout=vertical]) .tx-timeline__content{padding:var(--tx-timeline-vertical-event-content-padding)}:host([data-styled][data-layout=vertical]) .tx-timeline__connector{width:var(--tx-timeline-event-connector-size)}:host([data-styled][data-layout=vertical][data-align=left]) .tx-timeline__opposite{text-align:end}:host([data-styled][data-layout=vertical][data-align=left]) .tx-timeline__content{text-align:start}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__event{flex-direction:row-reverse}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__opposite{text-align:start}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__content{text-align:end}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(odd) .tx-timeline__opposite{text-align:end}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(odd) .tx-timeline__content{text-align:start}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n){flex-direction:row-reverse}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n) .tx-timeline__opposite{text-align:start}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n) .tx-timeline__content{text-align:end}:host([data-styled][data-layout=horizontal]) .tx-timeline__list{flex-direction:row}:host([data-styled][data-layout=horizontal]) .tx-timeline__event{flex:1;flex-direction:column}:host([data-styled][data-layout=horizontal]) .tx-timeline__event:last-child{flex:0}:host([data-styled][data-layout=horizontal]) .tx-timeline__separator{flex-direction:row}:host([data-styled][data-layout=horizontal]) .tx-timeline__connector{width:100%;height:var(--tx-timeline-event-connector-size)}:host([data-styled][data-layout=horizontal]) .tx-timeline__opposite,:host([data-styled][data-layout=horizontal]) .tx-timeline__content{padding:var(--tx-timeline-horizontal-event-content-padding)}:host([data-styled][data-layout=horizontal][data-align=bottom]) .tx-timeline__event,:host([data-styled][data-layout=horizontal][data-align=alternate]) .tx-timeline__event:nth-child(2n){flex-direction:column-reverse}\n"]
|
|
312
|
+
}]
|
|
313
|
+
}],
|
|
314
|
+
propDecorators: {
|
|
315
|
+
value: [{
|
|
316
|
+
type: i0.Input,
|
|
317
|
+
args: [{
|
|
318
|
+
isSignal: true,
|
|
319
|
+
alias: "value",
|
|
320
|
+
required: false
|
|
321
|
+
}]
|
|
322
|
+
}],
|
|
323
|
+
layout: [{
|
|
324
|
+
type: i0.Input,
|
|
325
|
+
args: [{
|
|
326
|
+
isSignal: true,
|
|
327
|
+
alias: "layout",
|
|
328
|
+
required: false
|
|
329
|
+
}]
|
|
330
|
+
}],
|
|
331
|
+
align: [{
|
|
332
|
+
type: i0.Input,
|
|
333
|
+
args: [{
|
|
334
|
+
isSignal: true,
|
|
335
|
+
alias: "align",
|
|
336
|
+
required: false
|
|
337
|
+
}]
|
|
338
|
+
}],
|
|
339
|
+
ariaLabel: [{
|
|
340
|
+
type: i0.Input,
|
|
341
|
+
args: [{
|
|
342
|
+
isSignal: true,
|
|
343
|
+
alias: "ariaLabel",
|
|
344
|
+
required: false
|
|
345
|
+
}]
|
|
346
|
+
}],
|
|
347
|
+
ariaLabelledBy: [{
|
|
348
|
+
type: i0.Input,
|
|
349
|
+
args: [{
|
|
350
|
+
isSignal: true,
|
|
351
|
+
alias: "ariaLabelledBy",
|
|
352
|
+
required: false
|
|
353
|
+
}]
|
|
354
|
+
}],
|
|
355
|
+
dt: [{
|
|
356
|
+
type: i0.Input,
|
|
357
|
+
args: [{
|
|
358
|
+
isSignal: true,
|
|
359
|
+
alias: "dt",
|
|
360
|
+
required: false
|
|
361
|
+
}]
|
|
362
|
+
}],
|
|
363
|
+
pt: [{
|
|
364
|
+
type: i0.Input,
|
|
365
|
+
args: [{
|
|
366
|
+
isSignal: true,
|
|
367
|
+
alias: "pt",
|
|
368
|
+
required: false
|
|
369
|
+
}]
|
|
370
|
+
}],
|
|
371
|
+
ptOptions: [{
|
|
372
|
+
type: i0.Input,
|
|
373
|
+
args: [{
|
|
374
|
+
isSignal: true,
|
|
375
|
+
alias: "ptOptions",
|
|
376
|
+
required: false
|
|
377
|
+
}]
|
|
378
|
+
}],
|
|
379
|
+
unstyled: [{
|
|
380
|
+
type: i0.Input,
|
|
381
|
+
args: [{
|
|
382
|
+
isSignal: true,
|
|
383
|
+
alias: "unstyled",
|
|
384
|
+
required: false
|
|
385
|
+
}]
|
|
386
|
+
}],
|
|
387
|
+
contentTemplate: [{
|
|
388
|
+
type: i0.ContentChild,
|
|
389
|
+
args: [i0.forwardRef(() => TxTimelineContent), { isSignal: true }]
|
|
390
|
+
}],
|
|
391
|
+
oppositeTemplate: [{
|
|
392
|
+
type: i0.ContentChild,
|
|
393
|
+
args: [i0.forwardRef(() => TxTimelineOpposite), { isSignal: true }]
|
|
394
|
+
}],
|
|
395
|
+
markerTemplate: [{
|
|
396
|
+
type: i0.ContentChild,
|
|
397
|
+
args: [i0.forwardRef(() => TxTimelineMarker), { isSignal: true }]
|
|
398
|
+
}],
|
|
399
|
+
connectorTemplate: [{
|
|
400
|
+
type: i0.ContentChild,
|
|
401
|
+
args: [i0.forwardRef(() => TxTimelineConnector), { isSignal: true }]
|
|
402
|
+
}]
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
export { TxTimeline, TxTimelineConnector, TxTimelineContent, TxTimelineMarker, TxTimelineOpposite };
|
|
406
|
+
|
|
407
|
+
//# sourceMappingURL=tectra-ng-ui-timeline.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-timeline.mjs","names":[],"sources":["../../../../packages/ui/timeline/src/timeline.templates.ts","../../../../packages/ui/timeline/src/timeline.component.ts","../../../../packages/ui/timeline/src/timeline.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxTimelineEventContext } from './timeline.types';\n\n@Directive({ selector: 'ng-template[txTimelineContent]' })\nexport class TxTimelineContent<T = unknown> {\n readonly templateRef = inject<TemplateRef<TxTimelineEventContext<T>>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[txTimelineOpposite]' })\nexport class TxTimelineOpposite<T = unknown> {\n readonly templateRef = inject<TemplateRef<TxTimelineEventContext<T>>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[txTimelineMarker]' })\nexport class TxTimelineMarker<T = unknown> {\n readonly templateRef = inject<TemplateRef<TxTimelineEventContext<T>>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[txTimelineConnector]' })\nexport class TxTimelineConnector<T = unknown> {\n readonly templateRef = inject<TemplateRef<TxTimelineEventContext<T>>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, contentChild, input } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraTimelineTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTimelineConnector, TxTimelineContent, TxTimelineMarker, TxTimelineOpposite } from './timeline.templates';\nimport { TxTimelineAlign, TxTimelineEventContext, TxTimelineLayout, TxTimelinePart } from './timeline.types';\n\n@Component({\n selector: 'tx-timeline',\n imports: [NgTemplateOutlet],\n templateUrl: './timeline.component.html',\n styleUrl: './timeline.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-timeline',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-layout]': 'layout()',\n '[attr.data-align]': 'resolvedAlign()',\n },\n})\nexport class TxTimeline<T = unknown> {\n readonly value = input<readonly T[] | null | undefined>([]);\n readonly layout = input<TxTimelineLayout>('vertical');\n readonly align = input<TxTimelineAlign | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraTimelineTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTimelinePart, TxTimeline<T>> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n protected readonly contentTemplate = contentChild(TxTimelineContent);\n protected readonly oppositeTemplate = contentChild(TxTimelineOpposite);\n protected readonly markerTemplate = contentChild(TxTimelineMarker);\n protected readonly connectorTemplate = contentChild(TxTimelineConnector);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('timeline', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-timeline'), ...this.passThrough().root?.style }));\n readonly resolvedAlign = computed<TxTimelineAlign>(() => this.align() ?? (this.layout() === 'horizontal' ? 'top' : 'left'));\n\n protected readonly events = computed(() => {\n const items = this.value() ?? [];\n return items.map<TxTimelineEventContext<T>>((item, index) => ({\n $implicit: item,\n index,\n first: index === 0,\n last: index === items.length - 1,\n }));\n });\n}\n","<ol\n class=\"tx-timeline__list\"\n [class]=\"passThrough().list?.class\"\n [style]=\"passThrough().list?.style\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n>\n @for (event of events(); track $index) {\n <li class=\"tx-timeline__event\" [class]=\"passThrough().event?.class\" [style]=\"passThrough().event?.style\">\n <div\n class=\"tx-timeline__opposite\"\n [class]=\"passThrough().eventOpposite?.class\"\n [style]=\"passThrough().eventOpposite?.style\"\n >\n @if (oppositeTemplate(); as opposite) {\n <ng-container *ngTemplateOutlet=\"opposite.templateRef; context: event\" />\n }\n </div>\n <div\n class=\"tx-timeline__separator\"\n [class]=\"passThrough().eventSeparator?.class\"\n [style]=\"passThrough().eventSeparator?.style\"\n >\n @if (markerTemplate(); as marker) {\n <ng-container *ngTemplateOutlet=\"marker.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__marker\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventMarker?.class\"\n [style]=\"passThrough().eventMarker?.style\"\n ></span>\n }\n @if (!event.last) {\n @if (connectorTemplate(); as connector) {\n <ng-container *ngTemplateOutlet=\"connector.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__connector\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventConnector?.class\"\n [style]=\"passThrough().eventConnector?.style\"\n ></span>\n }\n }\n </div>\n <div\n class=\"tx-timeline__content\"\n [class]=\"passThrough().eventContent?.class\"\n [style]=\"passThrough().eventContent?.style\"\n >\n @if (contentTemplate(); as content) {\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: event\" />\n }\n </div>\n </li>\n }\n</ol>\n"],"mappings":";;;;;;AAIA,IAAa,oBAAb,MAAa,kBAAiB;CACnB,cAAc,OAA+C,WAAW;CADtE,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAiB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAjB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAiB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAjB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAD7B,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,iCAAgC,CAAE;;;AAMzD,IAAa,qBAAb,MAAa,mBAAkB;CACpB,cAAc,OAA+C,WAAW;CADtE,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAkB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAlB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAkB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAlB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAD9B,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,kCAAiC,C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