@tectra-ng/ui 0.1.1 → 0.1.3
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/analog-clock/README.md +31 -0
- package/countdown/README.md +45 -0
- package/country/README.md +14 -4
- package/data-view/README.md +71 -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-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-cascade-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-chip.mjs +2 -2
- package/fesm2022/tectra-ng-ui-chip.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-country.mjs +47 -6
- package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-data-view.mjs +1370 -0
- package/fesm2022/tectra-ng-ui-data-view.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-fieldset.mjs +2 -2
- package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input-number.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input-number.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-menu.mjs +2 -2
- package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-message.mjs +2 -2
- package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
- 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-paginator.mjs +2 -2
- package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-select.mjs +4 -4
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-slider.mjs +2 -2
- package/fesm2022/tectra-ng-ui-slider.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-stat-tiles.mjs +661 -0
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-table.mjs +1368 -1348
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tag.mjs +2 -2
- package/fesm2022/tectra-ng-ui-tag.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-toggle-switch.mjs +2 -2
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-select.mjs +7 -46
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +901 -0
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tree.mjs +1940 -0
- package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +928 -0
- package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -0
- package/month-calendar/README.md +46 -0
- package/package.json +56 -4
- package/sparkline/README.md +27 -0
- package/stat-tiles/README.md +53 -0
- package/timeline/README.md +42 -0
- package/tree/README.md +93 -0
- package/tree-table/README.md +84 -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-autocomplete.d.ts +11 -0
- package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
- package/types/tectra-ng-ui-chip.d.ts +3 -0
- package/types/tectra-ng-ui-chip.d.ts.map +1 -1
- 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-country-select.d.ts +11 -0
- package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-country.d.ts +9 -3
- package/types/tectra-ng-ui-country.d.ts.map +1 -1
- package/types/tectra-ng-ui-data-view.d.ts +363 -0
- package/types/tectra-ng-ui-data-view.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-fieldset.d.ts +8 -0
- package/types/tectra-ng-ui-fieldset.d.ts.map +1 -1
- package/types/tectra-ng-ui-input-number.d.ts +1 -0
- package/types/tectra-ng-ui-input-number.d.ts.map +1 -1
- package/types/tectra-ng-ui-input.d.ts +4 -0
- package/types/tectra-ng-ui-input.d.ts.map +1 -1
- package/types/tectra-ng-ui-menu.d.ts +2 -0
- package/types/tectra-ng-ui-menu.d.ts.map +1 -1
- package/types/tectra-ng-ui-message.d.ts +5 -0
- package/types/tectra-ng-ui-message.d.ts.map +1 -1
- 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-multiselect.d.ts +11 -0
- package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
- package/types/tectra-ng-ui-paginator.d.ts +1 -0
- package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
- package/types/tectra-ng-ui-select.d.ts +11 -0
- package/types/tectra-ng-ui-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-slider.d.ts +1 -0
- package/types/tectra-ng-ui-slider.d.ts.map +1 -1
- 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-stat-tiles.d.ts +287 -0
- package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -0
- package/types/tectra-ng-ui-table.d.ts +181 -15
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tag.d.ts +8 -0
- package/types/tectra-ng-ui-tag.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-toggle-switch.d.ts +5 -0
- package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree-select.d.ts +19 -22
- package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree-table.d.ts +94 -0
- package/types/tectra-ng-ui-tree-table.d.ts.map +1 -0
- package/types/tectra-ng-ui-tree.d.ts +571 -0
- package/types/tectra-ng-ui-tree.d.ts.map +1 -0
- package/types/tectra-ng-ui-virtual-scroller.d.ts +297 -0
- package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -0
- package/virtual-scroller/README.md +60 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-virtual-scroller.mjs","names":[],"sources":["../../../../packages/ui/virtual-scroller/src/virtual-scroller.templates.ts","../../../../packages/ui/virtual-scroller/src/virtual-scroller.component.ts","../../../../packages/ui/virtual-scroller/src/virtual-scroller.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxVirtualScrollerContentContext, TxVirtualScrollerItemContext, TxVirtualScrollerLoaderContext } from './virtual-scroller.types';\n\n@Directive({ selector: 'ng-template[txVirtualScrollerItem]' })\nexport class TxVirtualScrollerItem {\n readonly templateRef = inject<TemplateRef<TxVirtualScrollerItemContext>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[txVirtualScrollerLoader]' })\nexport class TxVirtualScrollerLoader {\n readonly templateRef = inject<TemplateRef<TxVirtualScrollerLoaderContext>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[txVirtualScrollerLoadingIcon]' })\nexport class TxVirtualScrollerLoadingIcon {\n readonly templateRef = inject<TemplateRef<void>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[txVirtualScrollerContent]' })\nexport class TxVirtualScrollerContent {\n readonly templateRef = inject<TemplateRef<TxVirtualScrollerContentContext>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n untracked,\n} from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraVirtualScrollerTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxVirtualScrollerContent, TxVirtualScrollerItem, TxVirtualScrollerLoader, TxVirtualScrollerLoadingIcon } from './virtual-scroller.templates';\nimport {\n TxVirtualScrollerContentContext,\n TxVirtualScrollerItemContext,\n TxVirtualScrollerLazyLoadEvent,\n TxVirtualScrollerOrientation,\n TxVirtualScrollerPart,\n TxVirtualScrollerPosition,\n TxVirtualScrollerRenderedRange,\n TxVirtualScrollerScrollEvent,\n} from './virtual-scroller.types';\n\ninterface TxAxisRange {\n first: number;\n last: number;\n viewFirst: number;\n viewLast: number;\n}\n\ninterface TxRenderedCell<T> {\n index: number;\n item: T | undefined;\n}\n\ninterface TxRenderedRow<T> {\n index: number;\n cells: TxRenderedCell<T>[];\n}\n\n@Component({\n selector: 'tx-virtual-scroller',\n imports: [NgTemplateOutlet, TxIcon],\n templateUrl: './virtual-scroller.component.html',\n styleUrl: './virtual-scroller.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-virtual-scroller',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-orientation]': 'orientation()',\n '[class.tx-virtual-scroller--disabled]': 'disabled()',\n '[class.tx-virtual-scroller--loading]': 'showLoaderMask()',\n '[attr.tabindex]': 'tabindex()',\n '[attr.role]': 'ariaLabel() || ariaLabelledBy() ? \"region\" : null',\n '[attr.aria-label]': 'ariaLabel() ?? null',\n '[attr.aria-labelledby]': 'ariaLabelledBy() ?? null',\n '[attr.aria-busy]': 'loading() || null',\n '(scroll)': 'onScroll($event)',\n },\n})\nexport class TxVirtualScroller<T = unknown> {\n readonly items = input<readonly (T | undefined)[] | readonly (readonly (T | undefined)[])[] | null | undefined>(undefined);\n readonly itemSize = input<number | readonly [number, number]>(40);\n readonly scrollHeight = input<string | undefined>(undefined);\n readonly scrollWidth = input<string | undefined>(undefined);\n readonly orientation = input<TxVirtualScrollerOrientation>('vertical');\n readonly numToleratedItems = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly delay = input(0, { transform: numberAttribute });\n readonly step = input(0, { transform: numberAttribute });\n readonly lazy = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly appendOnly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly disabled = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly showSpacer = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showLoader = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly loadingIcon = input('spinner');\n readonly trackBy = input<((index: number, item: T | undefined) => unknown) | undefined>(undefined);\n readonly tabindex = input(0, { transform: numberAttribute });\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraVirtualScrollerTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxVirtualScrollerPart, TxVirtualScroller<T>> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly lazyLoad = output<TxVirtualScrollerLazyLoadEvent>();\n readonly scrolled = output<TxVirtualScrollerScrollEvent>();\n readonly scrollIndexChange = output<TxVirtualScrollerRenderedRange['viewport']>();\n\n readonly itemTemplate = contentChild(TxVirtualScrollerItem);\n readonly loaderTemplate = contentChild(TxVirtualScrollerLoader);\n readonly loadingIconTemplate = contentChild(TxVirtualScrollerLoadingIcon);\n readonly contentTemplate = contentChild(TxVirtualScrollerContent);\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroy = inject(DestroyRef);\n private readonly cleanup = this.destroy.onDestroy(() => clearTimeout(this.timer));\n private timer: ReturnType<typeof setTimeout> | undefined;\n private lastLazy = '';\n private lastViewport = '';\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('virtualScroller', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({\n ...toStyleObject(this.dt(), '--tx-virtual-scroller'),\n ...(this.scrollHeight() ? { height: this.scrollHeight() } : {}),\n ...(this.scrollWidth() ? { width: this.scrollWidth() } : {}),\n ...this.passThrough().root?.style,\n }));\n\n readonly scrollTop = signal(0);\n readonly scrollLeft = signal(0);\n readonly viewportHeight = signal(0);\n readonly viewportWidth = signal(0);\n readonly scrolling = signal(false);\n\n readonly both = computed(() => this.orientation() === 'both');\n readonly horizontal = computed(() => this.orientation() === 'horizontal');\n readonly rowSize = computed(() => {\n const size = this.itemSize();\n return typeof size === 'number' ? size : size[0];\n });\n readonly columnSize = computed(() => {\n const size = this.itemSize();\n return typeof size === 'number' ? size : size[1];\n });\n readonly list = computed(() => (this.items() ?? []) as readonly (T | undefined)[]);\n readonly grid = computed(() => (this.both() ? ((this.items() ?? []) as readonly (readonly (T | undefined)[])[]) : []));\n readonly rowCount = computed(() => (this.horizontal() ? 1 : this.both() ? this.grid().length : this.list().length));\n readonly columnCount = computed(() => {\n if (this.horizontal()) return this.list().length;\n if (!this.both()) return 1;\n return this.grid().reduce((max, row) => Math.max(max, row?.length ?? 0), 0);\n });\n readonly rows = computed(() => (this.horizontal() ? this.fullRange(1) : this.axisRange(this.scrollTop(), this.viewportHeight(), this.rowSize(), this.rowCount())));\n readonly columns = computed(() => {\n if (!this.horizontal() && !this.both()) return this.fullRange(1);\n return this.axisRange(this.scrollLeft(), this.viewportWidth(), this.columnSize(), this.columnCount());\n });\n readonly totalHeight = computed(() => (this.horizontal() ? null : this.rowCount() * this.rowSize()));\n readonly totalWidth = computed(() => (this.horizontal() || this.both() ? this.columnCount() * this.columnSize() : null));\n readonly offsetTop = computed(() => (this.horizontal() ? 0 : this.rows().first * this.rowSize()));\n readonly offsetLeft = computed(() => (this.horizontal() || this.both() ? this.columns().first * this.columnSize() : 0));\n readonly contentTransform = computed(() => `translate3d(${this.offsetLeft()}px, ${this.offsetTop()}px, 0)`);\n\n readonly renderedItems = computed<TxRenderedCell<T>[]>(() => {\n if (this.both()) return [];\n const { first, last } = this.horizontal() ? this.columns() : this.rows();\n const list = this.list();\n const cells: TxRenderedCell<T>[] = [];\n for (let index = first; index < last; index += 1) cells.push({ index, item: list[index] });\n return cells;\n });\n readonly renderedRows = computed<TxRenderedRow<T>[]>(() => {\n if (!this.both()) return [];\n const rows = this.rows();\n const columns = this.columns();\n const grid = this.grid();\n const result: TxRenderedRow<T>[] = [];\n for (let row = rows.first; row < rows.last; row += 1) {\n const cells: TxRenderedCell<T>[] = [];\n for (let column = columns.first; column < columns.last; column += 1) cells.push({ index: column, item: grid[row]?.[column] });\n result.push({ index: row, cells });\n }\n return result;\n });\n readonly showLoaderMask = computed(() => this.showLoader() && (this.loading() || this.scrolling()) && !this.loaderTemplate());\n readonly showLoaderItems = computed(() => this.showLoader() && (this.loading() || this.scrolling()) && !!this.loaderTemplate());\n readonly contentContext = computed<TxVirtualScrollerContentContext<T | undefined>>(() => {\n const items = this.renderedItems().map((cell) => cell.item);\n const range = this.horizontal() ? this.columns() : this.rows();\n return {\n $implicit: items,\n items,\n first: range.first,\n last: range.last,\n count: this.horizontal() ? this.columnCount() : this.rowCount(),\n spacerBefore: this.horizontal() ? this.offsetLeft() : this.offsetTop(),\n itemSize: this.horizontal() ? this.columnSize() : this.rowSize(),\n };\n });\n\n constructor() {\n afterNextRender(() => {\n this.measure();\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(() => this.measure());\n observer.observe(this.host.nativeElement);\n this.destroy.onDestroy(() => observer.disconnect());\n });\n\n effect(() => {\n if (!this.lazy()) return;\n const range = this.horizontal() ? this.columns() : this.rows();\n const step = this.step();\n const count = this.horizontal() ? this.columnCount() : this.rowCount();\n const first = step > 0 ? Math.floor(range.first / step) * step : range.first;\n const last = step > 0 ? Math.min(Math.max(count, range.last), Math.ceil(range.last / step) * step) : range.last;\n const key = `${first}:${last}`;\n if (key === this.lastLazy) return;\n this.lastLazy = key;\n untracked(() => this.lazyLoad.emit({ first, last }));\n });\n\n effect(() => {\n const viewport = this.renderedRange().viewport;\n const key = JSON.stringify(viewport);\n if (key === this.lastViewport) return;\n this.lastViewport = key;\n untracked(() => this.scrollIndexChange.emit(viewport));\n });\n }\n\n readonly renderedRange = computed<TxVirtualScrollerRenderedRange>(() => {\n const rows = this.rows();\n const columns = this.columns();\n if (this.both()) {\n return {\n first: [rows.first, columns.first],\n last: [rows.last, columns.last],\n viewport: { first: [rows.viewFirst, columns.viewFirst], last: [rows.viewLast, columns.viewLast] },\n };\n }\n const range = this.horizontal() ? columns : rows;\n return { first: range.first, last: range.last, viewport: { first: range.viewFirst, last: range.viewLast } };\n });\n\n getRenderedRange(): TxVirtualScrollerRenderedRange {\n return this.renderedRange();\n }\n\n trackOf(index: number, item: T | undefined): unknown {\n const own = this.trackBy();\n return own ? own(index, item) : index;\n }\n\n itemContext(cell: TxRenderedCell<T>, count: number): TxVirtualScrollerItemContext<T | undefined> {\n return {\n $implicit: cell.item,\n index: cell.index,\n count,\n first: cell.index === 0,\n last: cell.index === count - 1,\n even: cell.index % 2 === 0,\n odd: cell.index % 2 === 1,\n };\n }\n\n onScroll(event: Event): void {\n const element = event.target as HTMLElement;\n const top = element.scrollTop;\n const left = element.scrollLeft;\n this.scrolled.emit({ originalEvent: event });\n const apply = () => {\n this.scrollTop.set(top);\n this.scrollLeft.set(left);\n this.viewportHeight.set(element.clientHeight);\n this.viewportWidth.set(element.clientWidth);\n this.scrolling.set(false);\n };\n if (this.delay() > 0) {\n clearTimeout(this.timer);\n this.scrolling.set(true);\n this.timer = setTimeout(apply, this.delay());\n } else {\n apply();\n }\n }\n\n scrollTo(options: ScrollToOptions): void {\n const element = this.host.nativeElement;\n element.scrollTo?.(options);\n if (options.behavior === 'smooth') return;\n if (options.top !== undefined) this.scrollTop.set(Math.max(0, options.top));\n if (options.left !== undefined) this.scrollLeft.set(Math.max(0, options.left));\n }\n\n scrollToIndex(index: TxVirtualScrollerPosition, behavior: ScrollBehavior = 'auto'): void {\n const [row, column] = this.positionOf(index);\n this.scrollTo({ top: row * this.rowSize(), left: column * this.columnSize(), behavior });\n }\n\n scrollInView(index: TxVirtualScrollerPosition, to: 'to-start' | 'to-end', behavior: ScrollBehavior = 'auto'): void {\n const [row, column] = this.positionOf(index);\n if (to === 'to-start') {\n this.scrollToIndex(index, behavior);\n return;\n }\n this.scrollTo({\n top: Math.max(0, (row + 1) * this.rowSize() - this.viewportHeight()),\n left: Math.max(0, (column + 1) * this.columnSize() - this.viewportWidth()),\n behavior,\n });\n }\n\n refresh(): void {\n this.measure();\n }\n\n private positionOf(index: TxVirtualScrollerPosition): [number, number] {\n if (typeof index !== 'number') return [index[0], index[1]];\n return this.horizontal() ? [0, index] : [index, 0];\n }\n\n private measure(): void {\n const element = this.host.nativeElement;\n this.viewportHeight.set(element.clientHeight);\n this.viewportWidth.set(element.clientWidth);\n }\n\n private fullRange(count: number): TxAxisRange {\n return { first: 0, last: count, viewFirst: 0, viewLast: count };\n }\n\n private axisRange(scroll: number, viewport: number, size: number, count: number): TxAxisRange {\n if (this.disabled() || size <= 0) return this.fullRange(count);\n const space = viewport || size * 10;\n const visible = Math.ceil(space / size);\n const tolerance = this.numToleratedItems() ?? Math.ceil(visible / 2);\n const viewFirst = Math.min(count, Math.floor(scroll / size));\n const viewLast = Math.min(count, Math.ceil((scroll + space) / size));\n const first = this.appendOnly() ? 0 : Math.max(0, viewFirst - tolerance);\n const last = Math.min(count, viewLast + tolerance);\n return { first, last, viewFirst, viewLast };\n }\n}\n","@if (showSpacer()) {\n <div\n class=\"tx-virtual-scroller__spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"totalHeight()\"\n [style.width.px]=\"totalWidth()\"\n [class]=\"passThrough().spacer?.class\"\n [style]=\"passThrough().spacer?.style\"\n ></div>\n}\n\n<div\n class=\"tx-virtual-scroller__content\"\n [class.tx-virtual-scroller__content--horizontal]=\"horizontal()\"\n [style.transform]=\"contentTransform()\"\n [class]=\"passThrough().content?.class\"\n [style]=\"passThrough().content?.style\"\n>\n @if (contentTemplate(); as content) {\n <ng-container [ngTemplateOutlet]=\"content.templateRef\" [ngTemplateOutletContext]=\"contentContext()\" />\n } @else if (both()) {\n @for (row of renderedRows(); track row.index) {\n <div class=\"tx-virtual-scroller__row\" [style.height.px]=\"rowSize()\" [class]=\"passThrough().row?.class\" [style]=\"passThrough().row?.style\">\n @for (cell of row.cells; track trackOf(cell.index, cell.item)) {\n <div class=\"tx-virtual-scroller__item\" [style.width.px]=\"columnSize()\" [class]=\"passThrough().item?.class\" [style]=\"passThrough().item?.style\">\n <ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: cell, count: columnCount() }\" />\n </div>\n }\n </div>\n }\n } @else {\n @for (cell of renderedItems(); track trackOf(cell.index, cell.item)) {\n <div\n class=\"tx-virtual-scroller__item\"\n [style.height.px]=\"horizontal() ? null : rowSize()\"\n [style.width.px]=\"horizontal() ? columnSize() : null\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n >\n <ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: cell, count: horizontal() ? columnCount() : rowCount() }\" />\n </div>\n }\n }\n</div>\n\n@if (showLoaderMask()) {\n <div class=\"tx-virtual-scroller__loader\" [class]=\"passThrough().loader?.class\" [style]=\"passThrough().loader?.style\">\n @if (loadingIconTemplate(); as icon) {\n <ng-container [ngTemplateOutlet]=\"icon.templateRef\" />\n } @else {\n <tx-icon\n class=\"tx-virtual-scroller__loading-icon\"\n role=\"img\"\n [name]=\"loadingIcon()\"\n [attr.aria-label]=\"translations().loading\"\n [class]=\"passThrough().loadingIcon?.class\"\n [style]=\"passThrough().loadingIcon?.style\"\n />\n }\n </div>\n}\n\n<ng-template #cellContent let-cell let-count=\"count\">\n @if (showLoaderItems() || (cell.item === undefined && loaderTemplate())) {\n <ng-container [ngTemplateOutlet]=\"loaderTemplate()?.templateRef ?? null\" [ngTemplateOutletContext]=\"{ $implicit: cell.index, index: cell.index, count }\" />\n } @else if (itemTemplate(); as item) {\n <ng-container [ngTemplateOutlet]=\"item.templateRef\" [ngTemplateOutletContext]=\"itemContext(cell, count)\" />\n }\n</ng-template>\n"],"mappings":";;;;;;;;AAIA,IAAa,wBAAb,MAAa,sBAAqB;CACvB,cAAc,OAAkD,WAAW;CADzE,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAqB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAArB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAqB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAArB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EADjC,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,qCAAoC,CAAE;;;AAM7D,IAAa,0BAAb,MAAa,wBAAuB;CACzB,cAAc,OAAoD,WAAW;CAD3E,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAuB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;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AAA;GAAA,MAAA,CAAA,GAAA,iBACnB,uBAAuB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,qBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAClB,4BAA4B,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAChC,wBAAwB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Month calendar
|
|
2
|
+
|
|
3
|
+
A month grid that draws events as continuous bars across days, with day markers, a `+N` link for the events that do not fit and keyboard navigation. Give it events and markers, handle day and event clicks — for schedules, deadlines, shifts or bookings. Below 560px of its own width it turns into a compact grid with coloured dots.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-month-calendar [month]="month()" [events]="events()" [selectedDate]="selected()" (dayClick)="selected.set($event)" (eventClick)="open($event)" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
| Name | Description |
|
|
11
|
+
|---|---|
|
|
12
|
+
| month | Any date inside the month to show; the month of creation by default |
|
|
13
|
+
| events | Bars: `{ id, start, end?, title, tone, avatar?, data? }`; `start` / `end` are `Date` or `'yyyy-MM-dd'` (local days), `end` is the inclusive last day; `tone` is `primary`, `info`, `success`, `warn`, `danger` or `neutral`; `avatar` `{ src?, name? }` shows at the start of the bar |
|
|
14
|
+
| markers | Pills in a day header (a dot in the compact grid): `{ date, tone, label, icon? }` |
|
|
15
|
+
| selectedDate | Highlighted day: a `Date` or `'yyyy-MM-dd'`; it gets the keyboard focus |
|
|
16
|
+
| weekStartsOn | First day of the week: 0 Sunday … 6 Saturday; locale default |
|
|
17
|
+
| maxLanes | Bar rows per week; the rest goes to the `+N` link of the day |
|
|
18
|
+
| labels | Own texts `{ more, today, region }`: `more` with a `{count}` placeholder, `today` added to the name of today, `region` the name of the grid; translated by default |
|
|
19
|
+
| locale | BCP 47 locale for weekday names and day names; the kit locale by default |
|
|
20
|
+
| today | The day treated as today (the day of creation by default); pass it from a clock if the page stays open over midnight |
|
|
21
|
+
| dt | Design tokens of this instance (`monthCalendar`) |
|
|
22
|
+
| pt | Classes and styles of the parts: `root`, `grid`, `head`, `weekday`, `week`, `cell`, `day`, `number`, `marker`, `event`, `more` |
|
|
23
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
24
|
+
| unstyled | Removes the tectra styles |
|
|
25
|
+
|
|
26
|
+
## Outputs
|
|
27
|
+
| Name | Description |
|
|
28
|
+
|---|---|
|
|
29
|
+
| dayClick | A day or its `+N` link was clicked; the day `Date` |
|
|
30
|
+
| eventClick | A bar was clicked; the event |
|
|
31
|
+
|
|
32
|
+
## Slots
|
|
33
|
+
| Name | Description |
|
|
34
|
+
|---|---|
|
|
35
|
+
| txMonthCalendarEvent | `<ng-template txMonthCalendarEvent let-event let-segment="segment">` — content of a bar; `segment` has `lane`, `column`, `span`, `startsHere`, `endsHere` |
|
|
36
|
+
|
|
37
|
+
## Keyboard
|
|
38
|
+
| Key | Action |
|
|
39
|
+
|---|---|
|
|
40
|
+
| Tab | Moves to the selected day (or today, or the first day of the month) |
|
|
41
|
+
| Arrow keys | Previous / next day, same day of the previous / next week |
|
|
42
|
+
| Enter / Space | Clicks the focused day |
|
|
43
|
+
|
|
44
|
+
## Accessibility
|
|
45
|
+
|
|
46
|
+
The month is a `grid` of `gridcell`s with one focusable day (roving focus). Each day is named by its full date, "Today", its markers and its events ("4 events, Sprint, Review…"); the bars and `+N` links are mouse shortcuts hidden from screen readers, so nothing is lost and Enter on a day does what `+N` does. Days of other months and weekend names use the muted text colour, which keeps AA contrast. The selected day has `aria-selected`, today `aria-current="date"`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Angular UI components for tectra: signals, OnPush, accessible and themable, one entry point per component.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tectra-ng.com",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@angular/forms": "^22.0.0",
|
|
26
26
|
"@angular/router": "^22.0.0",
|
|
27
27
|
"rxjs": "^7.8.0",
|
|
28
|
-
"@tectra-ng/core": "^0.1.
|
|
29
|
-
"@tectra-ng/icons": "^0.1.
|
|
30
|
-
"@tectra-ng/themes": "^0.1.
|
|
28
|
+
"@tectra-ng/core": "^0.1.3",
|
|
29
|
+
"@tectra-ng/icons": "^0.1.3",
|
|
30
|
+
"@tectra-ng/themes": "^0.1.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependenciesMeta": {
|
|
33
33
|
"@angular/router": {
|
|
@@ -51,6 +51,10 @@
|
|
|
51
51
|
"types": "./types/tectra-ng-ui-amount.d.ts",
|
|
52
52
|
"default": "./fesm2022/tectra-ng-ui-amount.mjs"
|
|
53
53
|
},
|
|
54
|
+
"./analog-clock": {
|
|
55
|
+
"types": "./types/tectra-ng-ui-analog-clock.d.ts",
|
|
56
|
+
"default": "./fesm2022/tectra-ng-ui-analog-clock.mjs"
|
|
57
|
+
},
|
|
54
58
|
"./autocomplete": {
|
|
55
59
|
"types": "./types/tectra-ng-ui-autocomplete.d.ts",
|
|
56
60
|
"default": "./fesm2022/tectra-ng-ui-autocomplete.mjs"
|
|
@@ -99,6 +103,10 @@
|
|
|
99
103
|
"types": "./types/tectra-ng-ui-confirm.d.ts",
|
|
100
104
|
"default": "./fesm2022/tectra-ng-ui-confirm.mjs"
|
|
101
105
|
},
|
|
106
|
+
"./countdown": {
|
|
107
|
+
"types": "./types/tectra-ng-ui-countdown.d.ts",
|
|
108
|
+
"default": "./fesm2022/tectra-ng-ui-countdown.mjs"
|
|
109
|
+
},
|
|
102
110
|
"./country": {
|
|
103
111
|
"types": "./types/tectra-ng-ui-country.d.ts",
|
|
104
112
|
"default": "./fesm2022/tectra-ng-ui-country.mjs"
|
|
@@ -107,6 +115,14 @@
|
|
|
107
115
|
"types": "./types/tectra-ng-ui-country-select.d.ts",
|
|
108
116
|
"default": "./fesm2022/tectra-ng-ui-country-select.mjs"
|
|
109
117
|
},
|
|
118
|
+
"./data-view": {
|
|
119
|
+
"types": "./types/tectra-ng-ui-data-view.d.ts",
|
|
120
|
+
"default": "./fesm2022/tectra-ng-ui-data-view.mjs"
|
|
121
|
+
},
|
|
122
|
+
"./datepicker": {
|
|
123
|
+
"types": "./types/tectra-ng-ui-datepicker.d.ts",
|
|
124
|
+
"default": "./fesm2022/tectra-ng-ui-datepicker.mjs"
|
|
125
|
+
},
|
|
110
126
|
"./dialog": {
|
|
111
127
|
"types": "./types/tectra-ng-ui-dialog.d.ts",
|
|
112
128
|
"default": "./fesm2022/tectra-ng-ui-dialog.mjs"
|
|
@@ -123,6 +139,14 @@
|
|
|
123
139
|
"types": "./types/tectra-ng-ui-email-suggestion.d.ts",
|
|
124
140
|
"default": "./fesm2022/tectra-ng-ui-email-suggestion.mjs"
|
|
125
141
|
},
|
|
142
|
+
"./export": {
|
|
143
|
+
"types": "./types/tectra-ng-ui-export.d.ts",
|
|
144
|
+
"default": "./fesm2022/tectra-ng-ui-export.mjs"
|
|
145
|
+
},
|
|
146
|
+
"./export-font": {
|
|
147
|
+
"types": "./types/tectra-ng-ui-export-font.d.ts",
|
|
148
|
+
"default": "./fesm2022/tectra-ng-ui-export-font.mjs"
|
|
149
|
+
},
|
|
126
150
|
"./field": {
|
|
127
151
|
"types": "./types/tectra-ng-ui-field.d.ts",
|
|
128
152
|
"default": "./fesm2022/tectra-ng-ui-field.mjs"
|
|
@@ -191,6 +215,10 @@
|
|
|
191
215
|
"types": "./types/tectra-ng-ui-message.d.ts",
|
|
192
216
|
"default": "./fesm2022/tectra-ng-ui-message.mjs"
|
|
193
217
|
},
|
|
218
|
+
"./month-calendar": {
|
|
219
|
+
"types": "./types/tectra-ng-ui-month-calendar.d.ts",
|
|
220
|
+
"default": "./fesm2022/tectra-ng-ui-month-calendar.mjs"
|
|
221
|
+
},
|
|
194
222
|
"./multiselect": {
|
|
195
223
|
"types": "./types/tectra-ng-ui-multiselect.d.ts",
|
|
196
224
|
"default": "./fesm2022/tectra-ng-ui-multiselect.mjs"
|
|
@@ -251,6 +279,10 @@
|
|
|
251
279
|
"types": "./types/tectra-ng-ui-slider.d.ts",
|
|
252
280
|
"default": "./fesm2022/tectra-ng-ui-slider.mjs"
|
|
253
281
|
},
|
|
282
|
+
"./sparkline": {
|
|
283
|
+
"types": "./types/tectra-ng-ui-sparkline.d.ts",
|
|
284
|
+
"default": "./fesm2022/tectra-ng-ui-sparkline.mjs"
|
|
285
|
+
},
|
|
254
286
|
"./speed-dial": {
|
|
255
287
|
"types": "./types/tectra-ng-ui-speed-dial.d.ts",
|
|
256
288
|
"default": "./fesm2022/tectra-ng-ui-speed-dial.mjs"
|
|
@@ -259,6 +291,10 @@
|
|
|
259
291
|
"types": "./types/tectra-ng-ui-split-button.d.ts",
|
|
260
292
|
"default": "./fesm2022/tectra-ng-ui-split-button.mjs"
|
|
261
293
|
},
|
|
294
|
+
"./stat-tiles": {
|
|
295
|
+
"types": "./types/tectra-ng-ui-stat-tiles.d.ts",
|
|
296
|
+
"default": "./fesm2022/tectra-ng-ui-stat-tiles.mjs"
|
|
297
|
+
},
|
|
262
298
|
"./status-icon": {
|
|
263
299
|
"types": "./types/tectra-ng-ui-status-icon.d.ts",
|
|
264
300
|
"default": "./fesm2022/tectra-ng-ui-status-icon.mjs"
|
|
@@ -275,6 +311,10 @@
|
|
|
275
311
|
"types": "./types/tectra-ng-ui-textarea.d.ts",
|
|
276
312
|
"default": "./fesm2022/tectra-ng-ui-textarea.mjs"
|
|
277
313
|
},
|
|
314
|
+
"./timeline": {
|
|
315
|
+
"types": "./types/tectra-ng-ui-timeline.d.ts",
|
|
316
|
+
"default": "./fesm2022/tectra-ng-ui-timeline.mjs"
|
|
317
|
+
},
|
|
278
318
|
"./toast": {
|
|
279
319
|
"types": "./types/tectra-ng-ui-toast.d.ts",
|
|
280
320
|
"default": "./fesm2022/tectra-ng-ui-toast.mjs"
|
|
@@ -291,9 +331,21 @@
|
|
|
291
331
|
"types": "./types/tectra-ng-ui-tooltip.d.ts",
|
|
292
332
|
"default": "./fesm2022/tectra-ng-ui-tooltip.mjs"
|
|
293
333
|
},
|
|
334
|
+
"./tree": {
|
|
335
|
+
"types": "./types/tectra-ng-ui-tree.d.ts",
|
|
336
|
+
"default": "./fesm2022/tectra-ng-ui-tree.mjs"
|
|
337
|
+
},
|
|
294
338
|
"./tree-select": {
|
|
295
339
|
"types": "./types/tectra-ng-ui-tree-select.d.ts",
|
|
296
340
|
"default": "./fesm2022/tectra-ng-ui-tree-select.mjs"
|
|
341
|
+
},
|
|
342
|
+
"./tree-table": {
|
|
343
|
+
"types": "./types/tectra-ng-ui-tree-table.d.ts",
|
|
344
|
+
"default": "./fesm2022/tectra-ng-ui-tree-table.mjs"
|
|
345
|
+
},
|
|
346
|
+
"./virtual-scroller": {
|
|
347
|
+
"types": "./types/tectra-ng-ui-virtual-scroller.d.ts",
|
|
348
|
+
"default": "./fesm2022/tectra-ng-ui-virtual-scroller.mjs"
|
|
297
349
|
}
|
|
298
350
|
},
|
|
299
351
|
"sideEffects": false,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Sparkline
|
|
2
|
+
|
|
3
|
+
A tiny trend line — an SVG line with a soft filled area — for a list of numbers. Use it in stat tiles, table cells or cards where a full chart is too much.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-sparkline [values]="visitsByDay" tone="success" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
| Name | Description |
|
|
11
|
+
|---|---|
|
|
12
|
+
| values | Numbers in order; fewer than two finite numbers draw nothing |
|
|
13
|
+
| tone | Line and area colour: `primary`, `info`, `success`, `warn` or `danger` |
|
|
14
|
+
| ariaLabel | Text for screen readers, e.g. "Visits went up 12% this week"; without it the sparkline is hidden from them |
|
|
15
|
+
| dt | Design tokens of this instance (`sparkline`) |
|
|
16
|
+
| pt | Classes and styles of the parts: `root`, `svg`, `area`, `line` |
|
|
17
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
18
|
+
| unstyled | Removes the tectra styles |
|
|
19
|
+
|
|
20
|
+
## Keyboard
|
|
21
|
+
| Key | Action |
|
|
22
|
+
|---|---|
|
|
23
|
+
| — | Not focusable |
|
|
24
|
+
|
|
25
|
+
## Notes
|
|
26
|
+
|
|
27
|
+
The line is scaled between the smallest and the largest value, so it shows the shape of the trend, not absolute values; there are no axes or tooltips. The host is a full-width block, `height` token high (31.5px); set a size on the host to change it — the SVG stretches and the line keeps its width. `sparklinePoints(values)` returns the points in a 120 × 36 box.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Stat tiles
|
|
2
|
+
|
|
3
|
+
A responsive grid of key numbers — totals, rates, counts — each tile with a tinted icon, a label, a big value with a unit, a meta line, an optional share bar, an aside (a change pill) and room for a sparkline. Tiles can be links.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-stat-tiles ariaLabel="Traffic">
|
|
7
|
+
<tx-stat-tile label="Visits" icon="eye" [value]="12480" meta="Last 30 days" />
|
|
8
|
+
<tx-stat-tile label="Conversion" icon="percentage" tone="success" value="4.2" unit="%" [share]="42" />
|
|
9
|
+
</tx-stat-tiles>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
| Name | Description |
|
|
14
|
+
|---|---|
|
|
15
|
+
| minWidth | `tx-stat-tiles` — narrowest column before the grid wraps; never below the `floorWidth` token (210px) unless `compact` |
|
|
16
|
+
| compact | `tx-stat-tiles` — tighter gap, padding, icon and value; columns down to `minWidth` |
|
|
17
|
+
| ariaLabel | `tx-stat-tiles` — accessible name of the list |
|
|
18
|
+
| ariaLabelledBy | `tx-stat-tiles` — id of the element that names the list |
|
|
19
|
+
| label | `tx-stat-tile` — what the number is |
|
|
20
|
+
| value | `tx-stat-tile` — the number or text; `null` shows "-" |
|
|
21
|
+
| unit | `tx-stat-tile` — small text after the value |
|
|
22
|
+
| icon | `tx-stat-tile` — icon in a square tinted with the tone |
|
|
23
|
+
| meta | `tx-stat-tile` — muted line under the value, cut with an ellipsis |
|
|
24
|
+
| tone | `tx-stat-tile` — `neutral`, `primary`, `success`, `info`, `warn` or `danger`: icon, share bar, accent value and highlight |
|
|
25
|
+
| share | `tx-stat-tile` — 0–100, draws a share bar (a `meter`) |
|
|
26
|
+
| textValue | `tx-stat-tile` — the value is text: smaller, one line, cut with an ellipsis and a title |
|
|
27
|
+
| fitValue | `tx-stat-tile` — the value shrinks with the tile width instead of wrapping |
|
|
28
|
+
| accentValue | `tx-stat-tile` — the value in the tone colour |
|
|
29
|
+
| highlighted | `tx-stat-tile` — tinted background and ring in the tone |
|
|
30
|
+
| link | `tx-stat-tile` — router link of the whole tile |
|
|
31
|
+
| queryParams | `tx-stat-tile` — query params of the router link |
|
|
32
|
+
| href | `tx-stat-tile` — plain URL of the whole tile |
|
|
33
|
+
| target | `tx-stat-tile` — link target; `_blank` adds `rel="noopener noreferrer"` |
|
|
34
|
+
| dt | Design tokens of this instance (`statTiles` / `statTile`) |
|
|
35
|
+
| pt | Classes and styles of the parts: `root` on the grid; `root`, `body`, `head`, `icon`, `main`, `label`, `value`, `unit`, `meta`, `aside`, `bar`, `barFill` on a tile |
|
|
36
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
37
|
+
| unstyled | Removes the tectra styles |
|
|
38
|
+
|
|
39
|
+
## Slots
|
|
40
|
+
| Name | Description |
|
|
41
|
+
|---|---|
|
|
42
|
+
| txStatTileAside | `<tx-pill txStatTileAside>` — content at the top right of a tile, e.g. a change pill |
|
|
43
|
+
| default | `tx-stat-tile` — content under the value, e.g. a sparkline; `tx-stat-tiles` — the tiles |
|
|
44
|
+
|
|
45
|
+
## Keyboard
|
|
46
|
+
| Key | Action |
|
|
47
|
+
|---|---|
|
|
48
|
+
| Tab | Moves to the next link tile; the focused tile gets a 2px ring |
|
|
49
|
+
| Enter | Opens the link of the focused tile |
|
|
50
|
+
|
|
51
|
+
## Accessibility
|
|
52
|
+
|
|
53
|
+
`tx-stat-tiles` is a `list` and every tile a `listitem`; name the list with `ariaLabel` or `ariaLabelledBy`. Icons are decorative. The share bar is a `meter` named by the tile label. A link tile is one anchor, so its label, value and meta are read as the link text.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Timeline
|
|
2
|
+
|
|
3
|
+
Shows events in order along a line — an order history, a release log, the steps of a process — vertically or horizontally, with content on one side, on both sides or alternating.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-timeline [value]="events" ariaLabel="Order history">
|
|
7
|
+
<ng-template txTimelineContent let-event>{{ event.status }}</ng-template>
|
|
8
|
+
<ng-template txTimelineOpposite let-event>{{ event.date }}</ng-template>
|
|
9
|
+
</tx-timeline>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
| Name | Description |
|
|
14
|
+
|---|---|
|
|
15
|
+
| value | Events, one list item each |
|
|
16
|
+
| layout | `vertical` or `horizontal` |
|
|
17
|
+
| align | Vertical: content on the `left` (default), `right` or `alternate`. Horizontal: line at the `top` (default), `bottom` or `alternate` |
|
|
18
|
+
| ariaLabel | Accessible name of the list |
|
|
19
|
+
| ariaLabelledBy | Id of the element that names the list |
|
|
20
|
+
| dt | Design tokens of this instance (`timeline`) |
|
|
21
|
+
| pt | Classes and styles of the parts: `root`, `list`, `event`, `eventOpposite`, `eventSeparator`, `eventMarker`, `eventConnector`, `eventContent` |
|
|
22
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
23
|
+
| unstyled | Removes the tectra styles |
|
|
24
|
+
|
|
25
|
+
## Slots
|
|
26
|
+
| Name | Description |
|
|
27
|
+
|---|---|
|
|
28
|
+
| txTimelineContent | `<ng-template txTimelineContent let-event let-index="index">` — content of an event |
|
|
29
|
+
| txTimelineOpposite | `<ng-template txTimelineOpposite let-event>` — content on the other side of the line, e.g. the date |
|
|
30
|
+
| txTimelineMarker | `<ng-template txTimelineMarker let-event>` — own marker, e.g. an icon in a tinted circle |
|
|
31
|
+
| txTimelineConnector | `<ng-template txTimelineConnector let-event>` — own line to the next event; the last event has none |
|
|
32
|
+
|
|
33
|
+
Every template gets the event as `$implicit` plus `index`, `first` and `last`.
|
|
34
|
+
|
|
35
|
+
## Keyboard
|
|
36
|
+
| Key | Action |
|
|
37
|
+
|---|---|
|
|
38
|
+
| Tab | Moves through links and buttons inside the events; the timeline itself takes no focus |
|
|
39
|
+
|
|
40
|
+
## Accessibility
|
|
41
|
+
|
|
42
|
+
The events are an ordered list (`<ol>` / `<li>`), so screen readers announce their number and position. Markers and connectors are decorative (`aria-hidden`). Name the list with `ariaLabel` or `ariaLabelledBy`.
|
package/tree/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Tree
|
|
2
|
+
|
|
3
|
+
Shows a hierarchy — folders, categories, menus — as a WAI-ARIA tree (`role="tree"`). Nodes open and close, can be selected one by one, several at once or with checkboxes that check a whole branch, searched, loaded lazily, moved by drag and drop (also between trees) and get a right-click menu. Nodes are `{ key, label, children?, icon?, expandedIcon?, collapsedIcon?, leaf?, expanded?, type?, selectable?, disabled?, draggable?, droppable?, loading?, styleClass?, data? }`. Also exports the helpers `walkTree`, `findNode`, `filterTree`, `moveNode`, `insertNode`, `removeNode`, `normalizeChecked`.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
| Name | Description |
|
|
7
|
+
|---|---|
|
|
8
|
+
| value | Nodes of the tree; two-way with `[(value)]`, drag and drop writes the new order back |
|
|
9
|
+
| selectionMode | `single`, `multiple` or `checkbox`; leave empty for a tree without selection |
|
|
10
|
+
| selection | Selected node, or nodes in `multiple` / `checkbox` mode; two-way with `[(selection)]` |
|
|
11
|
+
| expandedKeys | Keys of the open nodes; two-way. Nodes with `expanded: true` are added on first sight |
|
|
12
|
+
| metaKeySelection | A click replaces the selection, Ctrl / ⌘ + click adds or removes a node |
|
|
13
|
+
| propagateSelectionUp | A parent is checked when all its children are, partly checked when some are |
|
|
14
|
+
| propagateSelectionDown | Checking a parent checks its whole branch |
|
|
15
|
+
| highlightOnSelect | Checked nodes also get the selected background |
|
|
16
|
+
| contextMenu | Menu items for a right click or Shift + F10 on a node |
|
|
17
|
+
| contextMenuSelection | The node the menu was opened for; two-way |
|
|
18
|
+
| draggableNodes | Nodes can be dragged (`draggable: false` keeps one in place) |
|
|
19
|
+
| droppableNodes | Nodes accept drops before, after or inside (`droppable: false` refuses inside) |
|
|
20
|
+
| draggableScope | Scope of the dragged nodes, matched against the target tree's `droppableScope` |
|
|
21
|
+
| droppableScope | Scopes this tree accepts from other trees |
|
|
22
|
+
| validateDrop | The drop waits until `accept()` of the `nodeDrop` event is called |
|
|
23
|
+
| loading | Shows the loading state |
|
|
24
|
+
| loadingMode | `mask` covers the tree with a spinner, `icon` only spins the togglers of loading nodes |
|
|
25
|
+
| loadingIcon | Icon of the mask |
|
|
26
|
+
| emptyMessage | Text when there are no nodes or the search found nothing |
|
|
27
|
+
| filter | Search field above the tree |
|
|
28
|
+
| filterBy | Fields searched, comma separated (`label`, `data.code`) |
|
|
29
|
+
| filterMode | `lenient` keeps the whole branch under a match, `strict` keeps only matching descendants |
|
|
30
|
+
| filterPlaceholder | Own placeholder of the search field |
|
|
31
|
+
| filterInputAutoFocus | Focuses the search field on start |
|
|
32
|
+
| scrollHeight | Maximum height of the scroll area; `flex` fills the parent |
|
|
33
|
+
| virtualScroll | Renders only the visible rows (needs `scrollHeight`) |
|
|
34
|
+
| virtualScrollItemSize | Height of one row in px with virtual scroll |
|
|
35
|
+
| virtualScrollTolerance | Rows rendered above and below the visible ones |
|
|
36
|
+
| ariaLabel | Accessible name of the tree |
|
|
37
|
+
| ariaLabelledBy | Id of the element that labels the tree |
|
|
38
|
+
| dt | Design tokens of this instance (`tree`) |
|
|
39
|
+
| pt | Classes and styles of the parts: `root`, `header`, `filter`, `filterInput`, `wrapper`, `list`, `node`, `content`, `toggler`, `checkbox`, `icon`, `label`, `children`, `dropPoint`, `empty`, `mask`, `footer` |
|
|
40
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
41
|
+
| unstyled | Removes the tectra styles |
|
|
42
|
+
|
|
43
|
+
## Outputs
|
|
44
|
+
| Name | Description |
|
|
45
|
+
|---|---|
|
|
46
|
+
| nodeSelect | A node was selected or checked: `{ node, originalEvent }` |
|
|
47
|
+
| nodeUnselect | A node was unselected or unchecked |
|
|
48
|
+
| nodeExpand | A node was opened — load its children here when it has `leaf: false` and no `children` |
|
|
49
|
+
| nodeCollapse | A node was closed |
|
|
50
|
+
| nodeContextMenuSelect | The menu was opened for a node |
|
|
51
|
+
| nodeDoubleClick | A node was double clicked |
|
|
52
|
+
| nodeDrop | A node was dropped: `{ dragNode, dropNode, position, index, originalEvent, accept }` |
|
|
53
|
+
| filtered | The search changed: `{ filter, filteredValue }` |
|
|
54
|
+
| valueChange | The nodes changed after a drop |
|
|
55
|
+
| selectionChange | The selection changed |
|
|
56
|
+
| expandedKeysChange | A node was opened or closed |
|
|
57
|
+
| contextMenuSelectionChange | The menu node changed |
|
|
58
|
+
|
|
59
|
+
## Slots
|
|
60
|
+
| Name | Description |
|
|
61
|
+
|---|---|
|
|
62
|
+
| txTreeNode | `<ng-template txTreeNode let-node>` — content of a node; `txTreeNode="type"` only for nodes of that `type`. Context: `node`, `level`, `expanded`, `selected`, `checked`, `partial` |
|
|
63
|
+
| txTreeHeader | `<ng-template txTreeHeader>` — content above the tree |
|
|
64
|
+
| txTreeFooter | `<ng-template txTreeFooter>` — content below the tree |
|
|
65
|
+
| txTreeEmpty | `<ng-template txTreeEmpty>` — own empty state |
|
|
66
|
+
| txTreeLoading | `<ng-template txTreeLoading>` — own content of the loading mask |
|
|
67
|
+
| txTreeFilter | `<ng-template txTreeFilter let-query let-filter="filter">` — own search field; call `filter(text)` |
|
|
68
|
+
| txTreeToggleIcon | `<ng-template txTreeToggleIcon let-expanded>` — own toggler icon (`loading` in the context) |
|
|
69
|
+
| txTreeCheckboxIcon | `<ng-template txTreeCheckboxIcon let-checked let-partial="partial">` — own checkbox icon |
|
|
70
|
+
|
|
71
|
+
## Methods
|
|
72
|
+
| Name | Description |
|
|
73
|
+
|---|---|
|
|
74
|
+
| expandAll() | Opens every node with children |
|
|
75
|
+
| collapseAll() | Closes every node |
|
|
76
|
+
| filterNodes(text) | Searches the tree |
|
|
77
|
+
| resetFilter() | Clears the search |
|
|
78
|
+
|
|
79
|
+
## Keyboard
|
|
80
|
+
| Key | Action |
|
|
81
|
+
|---|---|
|
|
82
|
+
| Tab | Moves into the tree to the selected node (or the first one) and out of it |
|
|
83
|
+
| ArrowDown / ArrowUp | Next / previous visible node |
|
|
84
|
+
| ArrowRight | Opens a closed node, moves to the first child of an open one |
|
|
85
|
+
| ArrowLeft | Closes an open node, moves to the parent of a closed one |
|
|
86
|
+
| Home / End | First / last visible node |
|
|
87
|
+
| Enter / Space | Selects the node, toggles its checkbox in `checkbox` mode |
|
|
88
|
+
| * | Opens all siblings of the node |
|
|
89
|
+
| Letters | Moves to the next node whose label starts with the typed text |
|
|
90
|
+
| Shift + F10 / Context menu key | Opens the context menu |
|
|
91
|
+
| Alt + ArrowUp / ArrowDown | Moves the node before the previous / after the next sibling (drag and drop on) |
|
|
92
|
+
| Alt + ArrowRight / ArrowLeft | Moves the node into the previous sibling / out of its parent (drag and drop on) |
|
|
93
|
+
| ArrowDown in the search field | Moves to the tree |
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Tree table
|
|
2
|
+
|
|
3
|
+
A table whose rows form a tree (`role="treegrid"`) and looks like the table: the first column gets a toggler and an indent, children open under their parent like an accordion. Built on `tx-table`, so it keeps its columns, cell templates, sorting (siblings are sorted on every level), pagination (of the root nodes), server data, filters (parents of the matches stay and open), column resize, reorder, settings and freezing, scroll height, virtual scroll, editing, row actions, context menu and CSV export. Rows are nodes `{ key?, data, children?, leaf?, expanded?, selectable?, loading? }`; cells read `data`. Every input, output and slot of the table works the same way — the tables below list the tree parts and the most used table ones.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
| Name | Description |
|
|
7
|
+
|---|---|
|
|
8
|
+
| value | Root nodes |
|
|
9
|
+
| columns | Columns (`TxTableColumn`); the first visible one holds the toggler |
|
|
10
|
+
| dataKey | Field of `data` that identifies a row when nodes have no `key` |
|
|
11
|
+
| expandedKeys | Keys of the open nodes; two-way. Nodes with `expanded: true` are added on first sight |
|
|
12
|
+
| selectionMode | `single`, `multiple` (rows) or `checkbox` (a checkbox next to the toggler, select all in the header) |
|
|
13
|
+
| selection | Selected node or nodes; two-way |
|
|
14
|
+
| metaKeySelection | A click replaces the selection, Ctrl / ⌘ + click adds a row |
|
|
15
|
+
| propagateSelectionUp | A parent is checked when all its children are, partly checked when some are |
|
|
16
|
+
| propagateSelectionDown | Checking a parent checks its whole branch |
|
|
17
|
+
| filterMode | `lenient` keeps the whole branch under a match, `strict` keeps only matching descendants |
|
|
18
|
+
| filters | Column filters; two-way |
|
|
19
|
+
| globalFilter | Search over all columns; two-way |
|
|
20
|
+
| sortMode | `single` or `multiple` |
|
|
21
|
+
| sortField | Sorted field; two-way |
|
|
22
|
+
| sortOrder | `asc`, `desc` or `null`; two-way |
|
|
23
|
+
| paginator | Paginator under the table; pages count root nodes |
|
|
24
|
+
| rows | Root nodes per page; two-way |
|
|
25
|
+
| first | Index of the first root node on the page; two-way |
|
|
26
|
+
| totalRecords | Number of root nodes on the server (with `lazy`) |
|
|
27
|
+
| lazy | Sorting, pages and filters come from the server through `lazyLoad` |
|
|
28
|
+
| loading | Blurred loading overlay with a spinner |
|
|
29
|
+
| resizableColumns | Columns can be resized |
|
|
30
|
+
| reorderableColumns | Columns can be dragged to another place |
|
|
31
|
+
| scrollHeight | Height of the scroll area with a sticky header |
|
|
32
|
+
| virtualScroll | Renders only the visible rows (needs `scrollHeight`) |
|
|
33
|
+
| size | `small`, `medium`, `large` |
|
|
34
|
+
| showGridlines | Borders around every cell |
|
|
35
|
+
| stripedRows | Every second row is tinted |
|
|
36
|
+
| rowHover | Rows are highlighted under the pointer |
|
|
37
|
+
| responsive | Cards below the breakpoint (off by default for a tree) |
|
|
38
|
+
| contextMenu | Menu items for a right click on a row |
|
|
39
|
+
| ariaLabel | Accessible name of the tree grid |
|
|
40
|
+
| dt | Design tokens of this instance (`table`; the indent and the gap next to the toggler come from `treeTable`) |
|
|
41
|
+
| pt | Classes and styles of the table parts, plus `treeToggle` |
|
|
42
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
43
|
+
| unstyled | Removes the tectra styles |
|
|
44
|
+
|
|
45
|
+
## Outputs
|
|
46
|
+
| Name | Description |
|
|
47
|
+
|---|---|
|
|
48
|
+
| nodeExpand | A node was opened — load its children here when it has `leaf: false` and no `children` |
|
|
49
|
+
| nodeCollapse | A node was closed |
|
|
50
|
+
| expandedKeysChange | A node was opened or closed |
|
|
51
|
+
| selectionChange | The selection changed |
|
|
52
|
+
| rowSelect | A row was selected or checked: `{ row, index, originalEvent }` (`row` is the node) |
|
|
53
|
+
| rowUnselect | A row was unselected or unchecked |
|
|
54
|
+
| sortChange | The sort changed |
|
|
55
|
+
| pageChange | The page changed |
|
|
56
|
+
| lazyLoad | The server should send another page, sort or filter |
|
|
57
|
+
| filterChange | Filters changed |
|
|
58
|
+
|
|
59
|
+
## Slots
|
|
60
|
+
| Name | Description |
|
|
61
|
+
|---|---|
|
|
62
|
+
| txTableCell | `<ng-template txTableCell="field" let-data let-node="node">` — own cell content; `data` is the node data |
|
|
63
|
+
| txTableHeaderCell | `<ng-template txTableHeaderCell="field" let-column>` — own header content |
|
|
64
|
+
| txTableFooterCell | `<ng-template txTableFooterCell="field">` — own footer content |
|
|
65
|
+
| txTableEmpty | `<ng-template txTableEmpty>` — own empty state |
|
|
66
|
+
| txTableEditor | `<ng-template txTableEditor="field">` — own cell editor |
|
|
67
|
+
|
|
68
|
+
## Methods
|
|
69
|
+
| Name | Description |
|
|
70
|
+
|---|---|
|
|
71
|
+
| expandAll() | Opens every node with children |
|
|
72
|
+
| collapseAll() | Closes every node |
|
|
73
|
+
| exportCSV() | Downloads every node (in tree order) as CSV |
|
|
74
|
+
|
|
75
|
+
## Keyboard
|
|
76
|
+
| Key | Action |
|
|
77
|
+
|---|---|
|
|
78
|
+
| Tab | Moves to the focused row, then to the togglers and controls inside it |
|
|
79
|
+
| ArrowDown / ArrowUp | Next / previous row |
|
|
80
|
+
| ArrowRight | Opens a closed row, moves to the first child of an open one |
|
|
81
|
+
| ArrowLeft | Closes an open row, moves to the parent of a closed one |
|
|
82
|
+
| Home / End | First / last row |
|
|
83
|
+
| Enter / Space | Selects the row or toggles its checkbox |
|
|
84
|
+
| Enter on the toggler | Opens or closes the row |
|