@tectra-ng/ui 0.1.1 → 0.1.2

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.
Files changed (96) hide show
  1. package/country/README.md +14 -4
  2. package/data-view/README.md +71 -0
  3. package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
  4. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
  5. package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
  6. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
  7. package/fesm2022/tectra-ng-ui-chip.mjs +2 -2
  8. package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -1
  9. package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
  10. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  11. package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
  12. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
  13. package/fesm2022/tectra-ng-ui-country.mjs +47 -6
  14. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
  15. package/fesm2022/tectra-ng-ui-data-view.mjs +1370 -0
  16. package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -0
  17. package/fesm2022/tectra-ng-ui-fieldset.mjs +2 -2
  18. package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -1
  19. package/fesm2022/tectra-ng-ui-input-number.mjs +2 -2
  20. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
  21. package/fesm2022/tectra-ng-ui-input.mjs +2 -2
  22. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
  23. package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
  24. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
  25. package/fesm2022/tectra-ng-ui-menu.mjs +2 -2
  26. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
  27. package/fesm2022/tectra-ng-ui-message.mjs +2 -2
  28. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
  29. package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
  30. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
  31. package/fesm2022/tectra-ng-ui-paginator.mjs +2 -2
  32. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
  33. package/fesm2022/tectra-ng-ui-select.mjs +4 -4
  34. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
  35. package/fesm2022/tectra-ng-ui-slider.mjs +2 -2
  36. package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -1
  37. package/fesm2022/tectra-ng-ui-table.mjs +1373 -1333
  38. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  39. package/fesm2022/tectra-ng-ui-tag.mjs +2 -2
  40. package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -1
  41. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +2 -2
  42. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -1
  43. package/fesm2022/tectra-ng-ui-tree-select.mjs +7 -46
  44. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  45. package/fesm2022/tectra-ng-ui-tree-table.mjs +901 -0
  46. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -0
  47. package/fesm2022/tectra-ng-ui-tree.mjs +1940 -0
  48. package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -0
  49. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +928 -0
  50. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -0
  51. package/package.json +17 -1
  52. package/tree/README.md +93 -0
  53. package/tree-table/README.md +84 -0
  54. package/types/tectra-ng-ui-autocomplete.d.ts +11 -0
  55. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
  56. package/types/tectra-ng-ui-chip.d.ts +3 -0
  57. package/types/tectra-ng-ui-chip.d.ts.map +1 -1
  58. package/types/tectra-ng-ui-country-select.d.ts +11 -0
  59. package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
  60. package/types/tectra-ng-ui-country.d.ts +9 -3
  61. package/types/tectra-ng-ui-country.d.ts.map +1 -1
  62. package/types/tectra-ng-ui-data-view.d.ts +363 -0
  63. package/types/tectra-ng-ui-data-view.d.ts.map +1 -0
  64. package/types/tectra-ng-ui-fieldset.d.ts +8 -0
  65. package/types/tectra-ng-ui-fieldset.d.ts.map +1 -1
  66. package/types/tectra-ng-ui-input-number.d.ts +1 -0
  67. package/types/tectra-ng-ui-input-number.d.ts.map +1 -1
  68. package/types/tectra-ng-ui-input.d.ts +4 -0
  69. package/types/tectra-ng-ui-input.d.ts.map +1 -1
  70. package/types/tectra-ng-ui-menu.d.ts +2 -0
  71. package/types/tectra-ng-ui-menu.d.ts.map +1 -1
  72. package/types/tectra-ng-ui-message.d.ts +5 -0
  73. package/types/tectra-ng-ui-message.d.ts.map +1 -1
  74. package/types/tectra-ng-ui-multiselect.d.ts +11 -0
  75. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
  76. package/types/tectra-ng-ui-paginator.d.ts +1 -0
  77. package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
  78. package/types/tectra-ng-ui-select.d.ts +11 -0
  79. package/types/tectra-ng-ui-select.d.ts.map +1 -1
  80. package/types/tectra-ng-ui-slider.d.ts +1 -0
  81. package/types/tectra-ng-ui-slider.d.ts.map +1 -1
  82. package/types/tectra-ng-ui-table.d.ts +181 -15
  83. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  84. package/types/tectra-ng-ui-tag.d.ts +8 -0
  85. package/types/tectra-ng-ui-tag.d.ts.map +1 -1
  86. package/types/tectra-ng-ui-toggle-switch.d.ts +5 -0
  87. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
  88. package/types/tectra-ng-ui-tree-select.d.ts +19 -22
  89. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
  90. package/types/tectra-ng-ui-tree-table.d.ts +94 -0
  91. package/types/tectra-ng-ui-tree-table.d.ts.map +1 -0
  92. package/types/tectra-ng-ui-tree.d.ts +571 -0
  93. package/types/tectra-ng-ui-tree.d.ts.map +1 -0
  94. package/types/tectra-ng-ui-virtual-scroller.d.ts +297 -0
  95. package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -0
  96. package/virtual-scroller/README.md +60 -0
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-cascade-select.mjs","names":[],"sources":["../../../../packages/ui/cascade-select/src/cascade-select.component.ts","../../../../packages/ui/cascade-select/src/cascade-select.component.html"],"sourcesContent":["import { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedOverlayPositionChange } from '@angular/cdk/overlay';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TxTypeahead, uniqueId } from '@tectra-ng/core/a11y';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport {\n TxOverlayInsets,\n TxPlacement,\n placementFromPosition,\n txAnimateEnter,\n txAnimateLeave,\n txPositions,\n TxOverlayRoom,\n watchOrigin,\n TxOverlayAnchor,\n txScrollStrategy,\n} from '@tectra-ng/core/overlay';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon } from '@tectra-ng/icons';\nimport { TectraCascadeSelectTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxFieldVariant, TxSelectSize, readOptionField, sameOptionValue } from '@tectra-ng/ui/select';\nimport { TxCascadeItem, TxCascadeSelectChangeEvent, TxCascadeSelectPart } from './cascade-select.types';\n\n@Component({\n selector: 'tx-cascade-select',\n imports: [CdkOverlayOrigin, CdkConnectedOverlay, TxOverlayAnchor, TxIcon],\n templateUrl: './cascade-select.component.html',\n styleUrl: './cascade-select.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxCascadeSelect), multi: true }],\n host: {\n class: 'tx-cascade-select',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[attr.data-variant]': 'variant()',\n '[class.tx-cascade-select--open]': 'isOpen()',\n '[class.tx-cascade-select--disabled]': 'disabled()',\n '[class.tx-cascade-select--invalid]': 'isInvalid()',\n '[class.tx-cascade-select--readonly]': 'readonly()',\n '[class.tx-cascade-select--filled]': 'hasValue()',\n },\n})\nexport class TxCascadeSelect extends TxFormControlBase<unknown> {\n readonly options = input<readonly unknown[]>([]);\n readonly optionLabel = input<string>('label');\n readonly optionValue = input<string>('value');\n readonly optionDisabled = input<string>('disabled');\n readonly optionGroupLabel = input<string>('label');\n readonly optionGroupChildren = input<string | readonly string[]>('items');\n readonly dataKey = input<string | undefined>(undefined);\n readonly showPath = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly pathSeparator = input<string>(' / ');\n readonly placeholder = input<string>('');\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly emptyMessage = input<string | undefined>(undefined);\n readonly inputId = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly size = input<TxSelectSize>('medium');\n readonly variant = input<TxFieldVariant>('outlined');\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraCascadeSelectTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxCascadeSelectPart, TxCascadeSelect> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly changed = output<TxCascadeSelectChangeEvent>();\n readonly opened = output<void>();\n readonly closed = output<void>();\n\n readonly box = viewChild.required<ElementRef<HTMLElement>>('box');\n readonly trigger = viewChild.required<ElementRef<HTMLButtonElement>>('trigger');\n readonly panel = viewChild<ElementRef<HTMLElement>>('panel');\n\n private document = inject(DOCUMENT);\n private injector = inject(Injector);\n private overlayInsets = inject(TxOverlayInsets);\n private typeahead = new TxTypeahead();\n private stopWatching: (() => void) | null = null;\n private hasEntered = false;\n private readonly cleanup = inject(DestroyRef).onDestroy(() => this.stopWatching?.());\n\n readonly translations = injectTranslations();\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('cascadeSelect', this, this.pt, this.ptOptions);\n private readonly room = new TxOverlayRoom(txPositions('bottom-start', 4));\n private readonly connectedOverlay = viewChild(CdkConnectedOverlay);\n readonly positions = this.room.positions;\n readonly scrollStrategy = txScrollStrategy(this.injector);\n readonly viewportMargin = this.room.viewportMargin;\n readonly treeId = uniqueId('tx-cascade');\n readonly columnEnter = ['tx-cascade-select__column--enter'];\n readonly noClasses: string[] = [];\n\n readonly isOpen = signal(false);\n readonly isPanelMounted = signal(false);\n readonly placement = signal<TxPlacement>('bottom-start');\n readonly path = signal<number[]>([]);\n readonly activeLevel = signal(0);\n\n readonly selectedPath = computed<number[] | null>(() => this.findPath(this.options(), 0));\n readonly columns = computed<TxCascadeItem[][]>(() => {\n const path = this.path();\n const selected = this.selectedPath() ?? [];\n const columns: TxCascadeItem[][] = [];\n let source: readonly unknown[] = this.options();\n for (let level = 0; source.length; level += 1) {\n const items = source.map((option, index) => this.toItem(option, level, index, path, selected));\n columns.push(items);\n const opened = path[level];\n const next = opened === undefined ? undefined : source[opened];\n source = next !== undefined && items[opened]?.group ? this.childrenOf(next, level) : [];\n }\n return columns;\n });\n readonly activeItem = computed(() => this.columns()[this.activeLevel()]?.[this.path()[this.activeLevel()] ?? -1] ?? null);\n readonly activeId = computed(() => (this.isOpen() ? (this.activeItem()?.id ?? null) : null));\n readonly hasValue = computed(() => this.value() !== null && this.value() !== undefined && this.value() !== '');\n readonly label = computed(() => {\n const path = this.selectedPath();\n if (!path) {\n return '';\n }\n const labels: string[] = [];\n let source: readonly unknown[] = this.options();\n path.forEach((index, level) => {\n const option = source[index];\n const last = level === path.length - 1;\n labels.push(String(readOptionField(option, last ? this.optionLabel() : this.optionGroupLabel()) ?? ''));\n source = last ? [] : this.childrenOf(option, level);\n });\n return this.showPath() ? labels.join(this.pathSeparator()) : (labels.at(-1) ?? '');\n });\n readonly canClear = computed(() => this.showClear() && this.hasValue() && !this.disabled() && !this.readonly());\n readonly emptyText = computed(() => this.emptyMessage() ?? this.translations().emptyMessage);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-cascade-select'), ...this.passThrough().root?.style }));\n readonly panelStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-cascade-select'), ...this.passThrough().panel?.style }));\n\n open(): void {\n if (this.disabled() || this.readonly() || this.isOpen()) {\n return;\n }\n const selected = this.selectedPath();\n const path = selected ? selected : this.firstEnabled(this.options()) >= 0 ? [this.firstEnabled(this.options())] : [];\n this.path.set(path);\n this.activeLevel.set(Math.max(0, path.length - 1));\n this.isOpen.set(true);\n this.hasEntered = false;\n this.isPanelMounted.set(true);\n this.room.open(this.overlayInsets.measure());\n this.stopWatching = watchOrigin(this.box().nativeElement, this.overlayInsets, {\n insetsChange: (insets) => this.room.follow(insets, this.box().nativeElement, this.panel()?.nativeElement, this.connectedOverlay(), this.injector),\n containerScroll: () => this.close(),\n });\n this.opened.emit();\n }\n\n close(): void {\n if (!this.isOpen()) {\n return;\n }\n this.isOpen.set(false);\n this.stopWatching?.();\n this.stopWatching = null;\n this.markTouched();\n this.closed.emit();\n const panel = this.panel()?.nativeElement;\n (panel ? txAnimateLeave(panel, this.placement()) : Promise.resolve()).then(() => {\n if (!this.isOpen()) {\n this.isPanelMounted.set(false);\n }\n });\n }\n\n toggle(): void {\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n }\n\n onBoxClick(event: MouseEvent): void {\n if (!(event.target as HTMLElement).closest('.tx-select__clear')) {\n this.toggle();\n this.trigger().nativeElement.focus();\n }\n }\n\n onPositionChange(change: ConnectedOverlayPositionChange): void {\n this.placement.set(placementFromPosition(change.connectionPair) ?? 'bottom-start');\n const panel = this.panel()?.nativeElement;\n if (!this.hasEntered && this.room.fit(this.box().nativeElement, panel, this.connectedOverlay(), this.injector)) {\n return;\n }\n if (!this.hasEntered && panel) {\n this.hasEntered = true;\n txAnimateEnter(panel, this.placement());\n }\n }\n\n onOutsideClick(event: MouseEvent): void {\n if (!this.box().nativeElement.contains(event.target as Node)) {\n this.close();\n }\n }\n\n onPanelMousedown(event: MouseEvent): void {\n event.preventDefault();\n }\n\n onItemHover(item: TxCascadeItem): void {\n if (!item.disabled) {\n this.focusItem(item.level, item.index);\n }\n }\n\n onItemClick(item: TxCascadeItem): void {\n if (item.disabled) {\n return;\n }\n this.focusItem(item.level, item.index);\n if (!item.group) {\n this.choose(item);\n }\n }\n\n onKeydown(event: KeyboardEvent): void {\n if (this.readonly()) {\n return;\n }\n if (!this.isOpen()) {\n if (['Enter', ' ', 'ArrowDown', 'ArrowUp'].includes(event.key)) {\n event.preventDefault();\n this.open();\n }\n return;\n }\n const level = this.activeLevel();\n const column = this.columns()[level] ?? [];\n const index = this.path()[level] ?? -1;\n const item = column[index];\n switch (event.key) {\n case 'Escape':\n event.preventDefault();\n this.close();\n return;\n case 'Tab':\n this.close();\n return;\n case 'ArrowDown':\n case 'ArrowUp':\n case 'Home':\n case 'End': {\n event.preventDefault();\n const next = this.step(column, index, event.key);\n if (next >= 0) {\n this.focusItem(level, next);\n }\n return;\n }\n case 'ArrowRight':\n event.preventDefault();\n if (item?.group) {\n this.enter(item);\n }\n return;\n case 'ArrowLeft':\n event.preventDefault();\n if (level > 0) {\n this.path.update((path) => path.slice(0, level));\n this.activeLevel.set(level - 1);\n this.scrollActive();\n }\n return;\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (item?.group) {\n this.enter(item);\n } else if (item && !item.disabled) {\n this.choose(item);\n }\n return;\n }\n if (event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {\n const found = this.typeahead.search(\n event.key,\n column.map((entry) => (entry.disabled ? '' : entry.label)),\n index,\n );\n if (found !== null) {\n this.focusItem(level, found);\n }\n }\n }\n\n clear(): void {\n this.updateValue(null);\n this.changed.emit({ value: null, option: null, path: [] });\n this.trigger().nativeElement.focus();\n }\n\n private enter(item: TxCascadeItem): void {\n const children = this.columns()[item.level + 1] ?? [];\n const first = children.findIndex((child) => !child.disabled);\n if (first >= 0) {\n this.path.update((path) => [...path.slice(0, item.level + 1), first]);\n this.activeLevel.set(item.level + 1);\n this.scrollActive();\n }\n }\n\n private focusItem(level: number, index: number): void {\n this.path.update((path) => [...path.slice(0, level), index]);\n this.activeLevel.set(level);\n this.scrollActive();\n }\n\n private choose(item: TxCascadeItem): void {\n const options: unknown[] = [];\n let source: readonly unknown[] = this.options();\n this.path()\n .slice(0, item.level + 1)\n .forEach((index, level) => {\n options.push(source[index]);\n source = this.childrenOf(source[index], level);\n });\n this.updateValue(item.value);\n this.changed.emit({ value: item.value, option: item.option, path: options });\n this.close();\n this.trigger().nativeElement.focus();\n }\n\n private step(column: TxCascadeItem[], index: number, key: string): number {\n const enabled = column.map((item, position) => (item.disabled ? -1 : position)).filter((position) => position >= 0);\n if (!enabled.length) {\n return -1;\n }\n if (key === 'Home') {\n return enabled[0];\n }\n if (key === 'End') {\n return enabled[enabled.length - 1];\n }\n const forward = key === 'ArrowDown';\n const next = forward ? enabled.find((position) => position > index) : [...enabled].reverse().find((position) => position < index);\n return next ?? (forward ? enabled[0] : enabled[enabled.length - 1]);\n }\n\n private childrenOf(option: unknown, level: number): readonly unknown[] {\n const fields = this.optionGroupChildren();\n const field = typeof fields === 'string' ? fields : (fields[level] ?? fields[fields.length - 1]);\n const children = readOptionField(option, field);\n return Array.isArray(children) ? children : [];\n }\n\n private toItem(option: unknown, level: number, index: number, path: number[], selected: number[]): TxCascadeItem {\n const group = this.childrenOf(option, level).length > 0;\n return {\n id: `${this.treeId}-${[...path.slice(0, level), index].join('-')}`,\n label: String(readOptionField(option, group ? this.optionGroupLabel() : this.optionLabel()) ?? ''),\n value: group ? null : readOptionField(option, this.optionValue()),\n option,\n level,\n index,\n group,\n disabled: !!(option && typeof option === 'object' && readOptionField(option, this.optionDisabled())),\n selected: !group && selected.length === level + 1 && selected[level] === index && path.slice(0, level).every((position, depth) => position === selected[depth]),\n onPath: path[level] === index,\n };\n }\n\n private findPath(options: readonly unknown[], level: number): number[] | null {\n if (!this.hasValue()) {\n return null;\n }\n for (let index = 0; index < options.length; index += 1) {\n const option = options[index];\n const children = this.childrenOf(option, level);\n if (children.length) {\n const inner = this.findPath(children, level + 1);\n if (inner) {\n return [index, ...inner];\n }\n } else if (sameOptionValue(readOptionField(option, this.optionValue()), this.value(), this.dataKey())) {\n return [index];\n }\n }\n return null;\n }\n\n private firstEnabled(options: readonly unknown[]): number {\n return options.findIndex((option) => !(option && typeof option === 'object' && readOptionField(option, this.optionDisabled())));\n }\n\n private scrollActive(): void {\n queueMicrotask(() => {\n const id = this.activeId();\n if (id) {\n this.document.getElementById(id)?.scrollIntoView?.({ block: 'nearest' });\n }\n });\n }\n}\n","<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- the combobox inside the box takes focus and keys; the box only widens the click area -->\n<div\n #box\n #origin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"tx-select__box\"\n [class]=\"passThrough().box?.class\"\n [style]=\"passThrough().box?.style\"\n (click)=\"onBoxClick($event)\"\n>\n <button\n #trigger\n type=\"button\"\n role=\"combobox\"\n class=\"tx-select__trigger\"\n aria-haspopup=\"tree\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n [attr.id]=\"inputId() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? (ariaLabelledBy() || inputId() ? null : placeholder() || null)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"treeId\"\n [attr.aria-activedescendant]=\"activeId()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [disabled]=\"disabled()\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (hasValue()) {\n <span class=\"tx-select__value\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">{{ label() }}</span>\n } @else {\n <span class=\"tx-select__value tx-select__value--placeholder\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">{{\n placeholder()\n }}</span>\n }\n </button>\n @if (canClear()) {\n <button\n type=\"button\"\n class=\"tx-select__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n <span class=\"tx-select__dropdown\" aria-hidden=\"true\" [class]=\"passThrough().dropdown?.class\" [style]=\"passThrough().dropdown?.style\">\n <tx-icon class=\"tx-select__chevron\" [name]=\"'chevron-down'\" />\n </span>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n txOverlayAnchor\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isPanelMounted()\"\n [cdkConnectedOverlayPositions]=\"positions()\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayViewportMargin]=\"viewportMargin()\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (positionChange)=\"onPositionChange($event)\"\n (detach)=\"close()\"\n>\n <div\n #panel\n class=\"tx-select__panel tx-cascade-select__panel\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"panelStyle()\"\n (mousedown)=\"onPanelMousedown($event)\"\n >\n <div class=\"tx-cascade-select__tree\" role=\"tree\" [id]=\"treeId\" [attr.aria-label]=\"ariaLabel() || placeholder() || null\">\n @for (column of columns(); track column[0]?.id ?? $index; let level = $index) {\n <div class=\"tx-cascade-select__column\" role=\"group\" [animate.enter]=\"level > 0 ? columnEnter : noClasses\" [class]=\"passThrough().column?.class\" [style]=\"passThrough().column?.style\">\n @for (item of column; track item.id) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- items use aria-activedescendant: focus and keys stay on the field -->\n <div\n role=\"treeitem\"\n class=\"tx-cascade-select__option\"\n [id]=\"item.id\"\n [class.tx-cascade-select__option--active]=\"item.onPath && level === activeLevel()\"\n [class.tx-cascade-select__option--path]=\"item.onPath && level !== activeLevel()\"\n [class.tx-cascade-select__option--selected]=\"item.selected\"\n [class.tx-cascade-select__option--disabled]=\"item.disabled\"\n [attr.aria-level]=\"level + 1\"\n [attr.aria-setsize]=\"column.length\"\n [attr.aria-posinset]=\"item.index + 1\"\n [attr.aria-expanded]=\"item.group ? item.onPath && columns().length > level + 1 : null\"\n [attr.aria-selected]=\"item.group ? null : item.selected\"\n [attr.aria-disabled]=\"item.disabled || null\"\n [class]=\"passThrough().option?.class\"\n [style]=\"passThrough().option?.style\"\n (mouseenter)=\"onItemHover(item)\"\n (click)=\"onItemClick(item)\"\n >\n <span class=\"tx-cascade-select__label\">{{ item.label }}</span>\n @if (item.group) {\n <tx-icon class=\"tx-cascade-select__group-icon\" [name]=\"'chevron-right'\" />\n } @else if (item.selected) {\n <tx-icon class=\"tx-cascade-select__check\" [name]=\"'check'\" />\n }\n </div>\n }\n </div>\n } @empty {\n <div class=\"tx-select__empty\" role=\"presentation\" [class]=\"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AAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAeb,mBAAmB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-cascade-select.mjs","names":[],"sources":["../../../../packages/ui/cascade-select/src/cascade-select.component.ts","../../../../packages/ui/cascade-select/src/cascade-select.component.html"],"sourcesContent":["import { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedOverlayPositionChange } from '@angular/cdk/overlay';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TxTypeahead, uniqueId } from '@tectra-ng/core/a11y';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport {\n TxOverlayInsets,\n TxPlacement,\n placementFromPosition,\n txAnimateEnter,\n txAnimateLeave,\n txPositions,\n TxOverlayRoom,\n watchOrigin,\n TxOverlayAnchor,\n txScrollStrategy,\n} from '@tectra-ng/core/overlay';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon } from '@tectra-ng/icons';\nimport { TectraCascadeSelectTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxFieldVariant, TxSelectSize, readOptionField, sameOptionValue } from '@tectra-ng/ui/select';\nimport { TxCascadeItem, TxCascadeSelectChangeEvent, TxCascadeSelectPart } from './cascade-select.types';\n\n@Component({\n selector: 'tx-cascade-select',\n imports: [CdkOverlayOrigin, CdkConnectedOverlay, TxOverlayAnchor, TxIcon],\n templateUrl: './cascade-select.component.html',\n styleUrl: './cascade-select.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxCascadeSelect), multi: true }],\n host: {\n class: 'tx-cascade-select',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[attr.data-variant]': 'variant()',\n '[class.tx-cascade-select--open]': 'isOpen()',\n '[class.tx-cascade-select--disabled]': 'disabled()',\n '[class.tx-cascade-select--invalid]': 'isInvalid()',\n '[class.tx-cascade-select--readonly]': 'readonly()',\n '[class.tx-cascade-select--filled]': 'hasValue()',\n },\n})\nexport class TxCascadeSelect extends TxFormControlBase<unknown> {\n readonly options = input<readonly unknown[]>([]);\n readonly optionLabel = input<string>('label');\n readonly optionValue = input<string>('value');\n readonly optionDisabled = input<string>('disabled');\n readonly optionGroupLabel = input<string>('label');\n readonly optionGroupChildren = input<string | readonly string[]>('items');\n readonly dataKey = input<string | undefined>(undefined);\n readonly showPath = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly pathSeparator = input<string>(' / ');\n readonly placeholder = input<string>('');\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly emptyMessage = input<string | undefined>(undefined);\n readonly inputId = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly size = input<TxSelectSize>('medium');\n readonly variant = input<TxFieldVariant>('outlined');\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraCascadeSelectTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxCascadeSelectPart, TxCascadeSelect> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly changed = output<TxCascadeSelectChangeEvent>();\n readonly opened = output<void>();\n readonly closed = output<void>();\n\n readonly box = viewChild.required<ElementRef<HTMLElement>>('box');\n readonly trigger = viewChild.required<ElementRef<HTMLButtonElement>>('trigger');\n readonly panel = viewChild<ElementRef<HTMLElement>>('panel');\n\n private document = inject(DOCUMENT);\n private injector = inject(Injector);\n private overlayInsets = inject(TxOverlayInsets);\n private typeahead = new TxTypeahead();\n private stopWatching: (() => void) | null = null;\n private hasEntered = false;\n private readonly cleanup = inject(DestroyRef).onDestroy(() => this.stopWatching?.());\n\n readonly translations = injectTranslations();\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('cascadeSelect', this, this.pt, this.ptOptions);\n private readonly room = new TxOverlayRoom(txPositions('bottom-start', 4));\n private readonly connectedOverlay = viewChild(CdkConnectedOverlay);\n readonly positions = this.room.positions;\n readonly scrollStrategy = txScrollStrategy(this.injector);\n readonly viewportMargin = this.room.viewportMargin;\n readonly treeId = uniqueId('tx-cascade');\n readonly columnEnter = ['tx-cascade-select__column--enter'];\n readonly noClasses: string[] = [];\n\n readonly isOpen = signal(false);\n readonly isPanelMounted = signal(false);\n readonly placement = signal<TxPlacement>('bottom-start');\n readonly path = signal<number[]>([]);\n readonly activeLevel = signal(0);\n\n readonly selectedPath = computed<number[] | null>(() => this.findPath(this.options(), 0));\n readonly columns = computed<TxCascadeItem[][]>(() => {\n const path = this.path();\n const selected = this.selectedPath() ?? [];\n const columns: TxCascadeItem[][] = [];\n let source: readonly unknown[] = this.options();\n for (let level = 0; source.length; level += 1) {\n const items = source.map((option, index) => this.toItem(option, level, index, path, selected));\n columns.push(items);\n const opened = path[level];\n const next = opened === undefined ? undefined : source[opened];\n source = next !== undefined && items[opened]?.group ? this.childrenOf(next, level) : [];\n }\n return columns;\n });\n readonly activeItem = computed(() => this.columns()[this.activeLevel()]?.[this.path()[this.activeLevel()] ?? -1] ?? null);\n readonly activeId = computed(() => (this.isOpen() ? (this.activeItem()?.id ?? null) : null));\n readonly hasValue = computed(() => this.value() !== null && this.value() !== undefined && this.value() !== '');\n readonly label = computed(() => {\n const path = this.selectedPath();\n if (!path) {\n return '';\n }\n const labels: string[] = [];\n let source: readonly unknown[] = this.options();\n path.forEach((index, level) => {\n const option = source[index];\n const last = level === path.length - 1;\n labels.push(String(readOptionField(option, last ? this.optionLabel() : this.optionGroupLabel()) ?? ''));\n source = last ? [] : this.childrenOf(option, level);\n });\n return this.showPath() ? labels.join(this.pathSeparator()) : (labels.at(-1) ?? '');\n });\n readonly canClear = computed(() => this.showClear() && this.hasValue() && !this.disabled() && !this.readonly());\n readonly emptyText = computed(() => this.emptyMessage() ?? this.translations().emptyMessage);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-cascade-select'), ...this.passThrough().root?.style }));\n readonly panelStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-cascade-select'), ...this.passThrough().panel?.style }));\n\n open(): void {\n if (this.disabled() || this.readonly() || this.isOpen()) {\n return;\n }\n const selected = this.selectedPath();\n const path = selected ? selected : this.firstEnabled(this.options()) >= 0 ? [this.firstEnabled(this.options())] : [];\n this.path.set(path);\n this.activeLevel.set(Math.max(0, path.length - 1));\n this.isOpen.set(true);\n this.hasEntered = false;\n this.isPanelMounted.set(true);\n this.room.open(this.overlayInsets.measure());\n this.stopWatching = watchOrigin(this.box().nativeElement, this.overlayInsets, {\n insetsChange: (insets) => this.room.follow(insets, this.box().nativeElement, this.panel()?.nativeElement, this.connectedOverlay(), this.injector),\n containerScroll: () => this.close(),\n });\n this.opened.emit();\n }\n\n close(): void {\n if (!this.isOpen()) {\n return;\n }\n this.isOpen.set(false);\n this.stopWatching?.();\n this.stopWatching = null;\n this.markTouched();\n this.closed.emit();\n const panel = this.panel()?.nativeElement;\n (panel ? txAnimateLeave(panel, this.placement()) : Promise.resolve()).then(() => {\n if (!this.isOpen()) {\n this.isPanelMounted.set(false);\n }\n });\n }\n\n toggle(): void {\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n }\n\n onBoxClick(event: MouseEvent): void {\n if (!(event.target as HTMLElement).closest('.tx-select__clear')) {\n this.toggle();\n this.trigger().nativeElement.focus();\n }\n }\n\n onPositionChange(change: ConnectedOverlayPositionChange): void {\n this.placement.set(placementFromPosition(change.connectionPair) ?? 'bottom-start');\n const panel = this.panel()?.nativeElement;\n if (!this.hasEntered && this.room.fit(this.box().nativeElement, panel, this.connectedOverlay(), this.injector)) {\n return;\n }\n if (!this.hasEntered && panel) {\n this.hasEntered = true;\n txAnimateEnter(panel, this.placement());\n }\n }\n\n onOutsideClick(event: MouseEvent): void {\n if (!this.box().nativeElement.contains(event.target as Node)) {\n this.close();\n }\n }\n\n onPanelMousedown(event: MouseEvent): void {\n event.preventDefault();\n }\n\n onItemHover(item: TxCascadeItem): void {\n if (!item.disabled) {\n this.focusItem(item.level, item.index);\n }\n }\n\n onItemClick(item: TxCascadeItem): void {\n if (item.disabled) {\n return;\n }\n this.focusItem(item.level, item.index);\n if (!item.group) {\n this.choose(item);\n }\n }\n\n onKeydown(event: KeyboardEvent): void {\n if (this.readonly()) {\n return;\n }\n if (!this.isOpen()) {\n if (['Enter', ' ', 'ArrowDown', 'ArrowUp'].includes(event.key)) {\n event.preventDefault();\n this.open();\n }\n return;\n }\n const level = this.activeLevel();\n const column = this.columns()[level] ?? [];\n const index = this.path()[level] ?? -1;\n const item = column[index];\n switch (event.key) {\n case 'Escape':\n event.preventDefault();\n this.close();\n return;\n case 'Tab':\n this.close();\n return;\n case 'ArrowDown':\n case 'ArrowUp':\n case 'Home':\n case 'End': {\n event.preventDefault();\n const next = this.step(column, index, event.key);\n if (next >= 0) {\n this.focusItem(level, next);\n }\n return;\n }\n case 'ArrowRight':\n event.preventDefault();\n if (item?.group) {\n this.enter(item);\n }\n return;\n case 'ArrowLeft':\n event.preventDefault();\n if (level > 0) {\n this.path.update((path) => path.slice(0, level));\n this.activeLevel.set(level - 1);\n this.scrollActive();\n }\n return;\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (item?.group) {\n this.enter(item);\n } else if (item && !item.disabled) {\n this.choose(item);\n }\n return;\n }\n if (event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {\n const found = this.typeahead.search(\n event.key,\n column.map((entry) => (entry.disabled ? '' : entry.label)),\n index,\n );\n if (found !== null) {\n this.focusItem(level, found);\n }\n }\n }\n\n clear(): void {\n this.updateValue(null);\n this.changed.emit({ value: null, option: null, path: [] });\n this.trigger().nativeElement.focus();\n }\n\n private enter(item: TxCascadeItem): void {\n const children = this.columns()[item.level + 1] ?? [];\n const first = children.findIndex((child) => !child.disabled);\n if (first >= 0) {\n this.path.update((path) => [...path.slice(0, item.level + 1), first]);\n this.activeLevel.set(item.level + 1);\n this.scrollActive();\n }\n }\n\n private focusItem(level: number, index: number): void {\n this.path.update((path) => [...path.slice(0, level), index]);\n this.activeLevel.set(level);\n this.scrollActive();\n }\n\n private choose(item: TxCascadeItem): void {\n const options: unknown[] = [];\n let source: readonly unknown[] = this.options();\n this.path()\n .slice(0, item.level + 1)\n .forEach((index, level) => {\n options.push(source[index]);\n source = this.childrenOf(source[index], level);\n });\n this.updateValue(item.value);\n this.changed.emit({ value: item.value, option: item.option, path: options });\n this.close();\n this.trigger().nativeElement.focus();\n }\n\n private step(column: TxCascadeItem[], index: number, key: string): number {\n const enabled = column.map((item, position) => (item.disabled ? -1 : position)).filter((position) => position >= 0);\n if (!enabled.length) {\n return -1;\n }\n if (key === 'Home') {\n return enabled[0];\n }\n if (key === 'End') {\n return enabled[enabled.length - 1];\n }\n const forward = key === 'ArrowDown';\n const next = forward ? enabled.find((position) => position > index) : [...enabled].reverse().find((position) => position < index);\n return next ?? (forward ? enabled[0] : enabled[enabled.length - 1]);\n }\n\n private childrenOf(option: unknown, level: number): readonly unknown[] {\n const fields = this.optionGroupChildren();\n const field = typeof fields === 'string' ? fields : (fields[level] ?? fields[fields.length - 1]);\n const children = readOptionField(option, field);\n return Array.isArray(children) ? children : [];\n }\n\n private toItem(option: unknown, level: number, index: number, path: number[], selected: number[]): TxCascadeItem {\n const group = this.childrenOf(option, level).length > 0;\n return {\n id: `${this.treeId}-${[...path.slice(0, level), index].join('-')}`,\n label: String(readOptionField(option, group ? this.optionGroupLabel() : this.optionLabel()) ?? ''),\n value: group ? null : readOptionField(option, this.optionValue()),\n option,\n level,\n index,\n group,\n disabled: !!(option && typeof option === 'object' && readOptionField(option, this.optionDisabled())),\n selected: !group && selected.length === level + 1 && selected[level] === index && path.slice(0, level).every((position, depth) => position === selected[depth]),\n onPath: path[level] === index,\n };\n }\n\n private findPath(options: readonly unknown[], level: number): number[] | null {\n if (!this.hasValue()) {\n return null;\n }\n for (let index = 0; index < options.length; index += 1) {\n const option = options[index];\n const children = this.childrenOf(option, level);\n if (children.length) {\n const inner = this.findPath(children, level + 1);\n if (inner) {\n return [index, ...inner];\n }\n } else if (sameOptionValue(readOptionField(option, this.optionValue()), this.value(), this.dataKey())) {\n return [index];\n }\n }\n return null;\n }\n\n private firstEnabled(options: readonly unknown[]): number {\n return options.findIndex((option) => !(option && typeof option === 'object' && readOptionField(option, this.optionDisabled())));\n }\n\n private scrollActive(): void {\n queueMicrotask(() => {\n const id = this.activeId();\n if (id) {\n this.document.getElementById(id)?.scrollIntoView?.({ block: 'nearest' });\n }\n });\n }\n}\n","<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- the combobox inside the box takes focus and keys; the box only widens the click area -->\n<div\n #box\n #origin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"tx-select__box\"\n [class]=\"passThrough().box?.class\"\n [style]=\"passThrough().box?.style\"\n (click)=\"onBoxClick($event)\"\n>\n <button\n #trigger\n type=\"button\"\n role=\"combobox\"\n class=\"tx-select__trigger\"\n aria-haspopup=\"tree\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n [attr.id]=\"inputId() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? (ariaLabelledBy() || inputId() ? null : placeholder() || null)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"treeId\"\n [attr.aria-activedescendant]=\"activeId()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [disabled]=\"disabled()\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (hasValue()) {\n <span class=\"tx-select__value\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">{{ label() }}</span>\n } @else {\n <span class=\"tx-select__value tx-select__value--placeholder\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">{{\n placeholder()\n }}</span>\n }\n </button>\n @if (canClear()) {\n <button\n type=\"button\"\n class=\"tx-select__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n <span class=\"tx-select__dropdown\" aria-hidden=\"true\" [class]=\"passThrough().dropdown?.class\" [style]=\"passThrough().dropdown?.style\">\n <tx-icon class=\"tx-select__chevron\" [name]=\"'chevron-down'\" />\n </span>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n txOverlayAnchor\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isPanelMounted()\"\n [cdkConnectedOverlayPositions]=\"positions()\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayViewportMargin]=\"viewportMargin()\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (positionChange)=\"onPositionChange($event)\"\n (detach)=\"close()\"\n>\n <div\n #panel\n class=\"tx-select__panel tx-cascade-select__panel\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"panelStyle()\"\n (mousedown)=\"onPanelMousedown($event)\"\n >\n <div class=\"tx-cascade-select__tree\" role=\"tree\" [id]=\"treeId\" [attr.aria-label]=\"ariaLabel() || placeholder() || null\">\n @for (column of columns(); track column[0]?.id ?? $index; let level = $index) {\n <div class=\"tx-cascade-select__column\" role=\"group\" [animate.enter]=\"level > 0 ? columnEnter : noClasses\" [class]=\"passThrough().column?.class\" [style]=\"passThrough().column?.style\">\n @for (item of column; track item.id) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- items use aria-activedescendant: focus and keys stay on the field -->\n <div\n role=\"treeitem\"\n class=\"tx-cascade-select__option\"\n [id]=\"item.id\"\n [class.tx-cascade-select__option--active]=\"item.onPath && level === activeLevel()\"\n [class.tx-cascade-select__option--path]=\"item.onPath && level !== activeLevel()\"\n [class.tx-cascade-select__option--selected]=\"item.selected\"\n [class.tx-cascade-select__option--disabled]=\"item.disabled\"\n [attr.aria-level]=\"level + 1\"\n [attr.aria-setsize]=\"column.length\"\n [attr.aria-posinset]=\"item.index + 1\"\n [attr.aria-expanded]=\"item.group ? item.onPath && columns().length > level + 1 : null\"\n [attr.aria-selected]=\"item.group ? null : item.selected\"\n [attr.aria-disabled]=\"item.disabled || null\"\n [class]=\"passThrough().option?.class\"\n [style]=\"passThrough().option?.style\"\n (mouseenter)=\"onItemHover(item)\"\n (click)=\"onItemClick(item)\"\n >\n <span class=\"tx-cascade-select__label\">{{ item.label }}</span>\n @if (item.group) {\n <tx-icon class=\"tx-cascade-select__group-icon\" [name]=\"'chevron-right'\" />\n } @else if (item.selected) {\n <tx-icon class=\"tx-cascade-select__check\" [name]=\"'check'\" />\n }\n </div>\n }\n </div>\n } @empty {\n <div class=\"tx-select__empty\" role=\"presentation\" [class]=\"passThrough().empty?.class\" [style]=\"passThrough().empty?.style\">{{ emptyText() }}</div>\n }\n </div>\n </div>\n</ng-template>\n"],"mappings":";;;;;;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AA;CAAA;AAAA,CAAA"}
@@ -179,7 +179,7 @@ var TxChip = class TxChip {
179
179
  }
180
180
  `,
181
181
  isInline: true,
182
- styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-chip__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-chip__label:empty{display:none}:host([data-styled]){gap:var(--tx-chip-gap);box-sizing:border-box;height:var(--tx-chip-height);padding:0 var(--tx-chip-padding-x);border-radius:var(--tx-chip-border-radius);background:var(--tx-chip-background);color:var(--tx-chip-color);font-family:var(--tx-font-family);font-size:var(--tx-chip-font-size)}:host([data-styled].tx-chip--image){padding-inline-start:calc((var(--tx-chip-height) - var(--tx-chip-image-size)) / 2)}:host([data-styled].tx-chip--removable){padding-inline-end:calc((var(--tx-chip-height) - var(--tx-chip-remove-size)) / 2)}:host([data-styled]) .tx-chip__image{flex-shrink:0;width:var(--tx-chip-image-size);height:var(--tx-chip-image-size);border-radius:50%;object-fit:cover}:host([data-styled]) .tx-chip__icon{display:inline-flex;flex-shrink:0;color:var(--tx-chip-icon-color)}:host([data-styled]) .tx-chip__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-chip-remove-size);height:var(--tx-chip-remove-size);padding:0;border:none;border-radius:50%;background:transparent;color:var(--tx-chip-remove-color);cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-chip__remove:hover{background:var(--tx-chip-remove-hover-background);color:var(--tx-chip-remove-hover-color)}:host([data-styled]) .tx-chip__remove:focus-visible{outline:2px solid var(--tx-chip-focus-ring-color);outline-offset:1px}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-chip__remove{transition:none}}\n"],
182
+ styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-chip__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-chip__label:empty{display:none}:host([data-styled]){gap:var(--tx-chip-gap);box-sizing:border-box;height:var(--tx-chip-height);padding:0 var(--tx-chip-padding-x);border-radius:var(--tx-chip-border-radius);background:var(--tx-chip-background);color:var(--tx-chip-color);font-family:var(--tx-font-family);font-size:var(--tx-chip-font-size)}:host([data-styled].tx-chip--image){padding-inline-start:calc((var(--tx-chip-height) - var(--tx-chip-image-size)) / 2)}:host([data-styled].tx-chip--removable){padding-inline-end:calc((var(--tx-chip-height) - var(--tx-chip-remove-size)) / 2)}:host([data-styled]) .tx-chip__image{flex-shrink:0;width:var(--tx-chip-image-size);height:var(--tx-chip-image-size);border-radius:50%;object-fit:cover}:host([data-styled]) .tx-chip__icon{display:inline-flex;flex-shrink:0;color:var(--tx-chip-icon-color)}:host([data-styled]) .tx-chip__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-chip-remove-size);height:var(--tx-chip-remove-size);padding:0;border:none;border-radius:50%;background:transparent;color:var(--tx-chip-remove-color);cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-chip__remove:hover{background:var(--tx-chip-remove-hover-background);color:var(--tx-chip-remove-hover-color)}:host([data-styled]) .tx-chip__remove:focus-visible{outline:var(--tx-chip-focus-ring-width) solid var(--tx-chip-focus-ring-color);outline-offset:var(--tx-chip-focus-ring-offset);box-shadow:var(--tx-chip-focus-ring-shadow)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-chip__remove{transition:none}}\n"],
183
183
  dependencies: [{
184
184
  kind: "component",
185
185
  type: TxIcon,
@@ -241,7 +241,7 @@ i0.ɵɵngDeclareClassMetadata({
241
241
  "[class.tx-chip--image]": "!!image()",
242
242
  "[class.tx-chip--removable]": "removable()"
243
243
  },
244
- styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-chip__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-chip__label:empty{display:none}:host([data-styled]){gap:var(--tx-chip-gap);box-sizing:border-box;height:var(--tx-chip-height);padding:0 var(--tx-chip-padding-x);border-radius:var(--tx-chip-border-radius);background:var(--tx-chip-background);color:var(--tx-chip-color);font-family:var(--tx-font-family);font-size:var(--tx-chip-font-size)}:host([data-styled].tx-chip--image){padding-inline-start:calc((var(--tx-chip-height) - var(--tx-chip-image-size)) / 2)}:host([data-styled].tx-chip--removable){padding-inline-end:calc((var(--tx-chip-height) - var(--tx-chip-remove-size)) / 2)}:host([data-styled]) .tx-chip__image{flex-shrink:0;width:var(--tx-chip-image-size);height:var(--tx-chip-image-size);border-radius:50%;object-fit:cover}:host([data-styled]) .tx-chip__icon{display:inline-flex;flex-shrink:0;color:var(--tx-chip-icon-color)}:host([data-styled]) .tx-chip__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-chip-remove-size);height:var(--tx-chip-remove-size);padding:0;border:none;border-radius:50%;background:transparent;color:var(--tx-chip-remove-color);cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-chip__remove:hover{background:var(--tx-chip-remove-hover-background);color:var(--tx-chip-remove-hover-color)}:host([data-styled]) .tx-chip__remove:focus-visible{outline:2px solid var(--tx-chip-focus-ring-color);outline-offset:1px}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-chip__remove{transition:none}}\n"]
244
+ styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-chip__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-chip__label:empty{display:none}:host([data-styled]){gap:var(--tx-chip-gap);box-sizing:border-box;height:var(--tx-chip-height);padding:0 var(--tx-chip-padding-x);border-radius:var(--tx-chip-border-radius);background:var(--tx-chip-background);color:var(--tx-chip-color);font-family:var(--tx-font-family);font-size:var(--tx-chip-font-size)}:host([data-styled].tx-chip--image){padding-inline-start:calc((var(--tx-chip-height) - var(--tx-chip-image-size)) / 2)}:host([data-styled].tx-chip--removable){padding-inline-end:calc((var(--tx-chip-height) - var(--tx-chip-remove-size)) / 2)}:host([data-styled]) .tx-chip__image{flex-shrink:0;width:var(--tx-chip-image-size);height:var(--tx-chip-image-size);border-radius:50%;object-fit:cover}:host([data-styled]) .tx-chip__icon{display:inline-flex;flex-shrink:0;color:var(--tx-chip-icon-color)}:host([data-styled]) .tx-chip__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-chip-remove-size);height:var(--tx-chip-remove-size);padding:0;border:none;border-radius:50%;background:transparent;color:var(--tx-chip-remove-color);cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-chip__remove:hover{background:var(--tx-chip-remove-hover-background);color:var(--tx-chip-remove-hover-color)}:host([data-styled]) .tx-chip__remove:focus-visible{outline:var(--tx-chip-focus-ring-width) solid var(--tx-chip-focus-ring-color);outline-offset:var(--tx-chip-focus-ring-offset);box-shadow:var(--tx-chip-focus-ring-shadow)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-chip__remove{transition:none}}\n"]
245
245
  }]
246
246
  }],
247
247
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-chip.mjs","names":[],"sources":["../../../../packages/ui/chip/src/chip.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input, output } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon, TxIconName, TxIconRegistry } from '@tectra-ng/icons';\nimport { TectraChipTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxChipPart } from './chip.types';\n\n@Component({\n selector: 'tx-chip',\n imports: [TxIcon],\n template: `\n @if (image(); as image) {\n <img class=\"tx-chip__image\" [src]=\"image\" [alt]=\"alt() ?? ''\" [class]=\"passThrough().image?.class\" [style]=\"passThrough().image?.style\" />\n } @else if (icon(); as icon) {\n <span class=\"tx-chip__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (registered(icon); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <span class=\"tx-chip__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ label() }}<ng-content /></span>\n @if (removable()) {\n <button\n type=\"button\"\n class=\"tx-chip__remove\"\n [class]=\"passThrough().remove?.class\"\n [style]=\"passThrough().remove?.style\"\n [attr.aria-label]=\"removeLabel() ?? translations().remove\"\n [title]=\"removeLabel() ?? translations().remove\"\n (click)=\"remove($event)\"\n (keydown.delete)=\"remove($event)\"\n (keydown.backspace)=\"remove($event)\"\n >\n @if (registered(removeIcon()); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"removeIcon()\"></span>\n }\n </button>\n }\n `,\n styleUrl: './chip.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-chip',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-chip--image]': '!!image()',\n '[class.tx-chip--removable]': 'removable()',\n },\n})\nexport class TxChip {\n private txIconRegistry = inject(TxIconRegistry);\n\n readonly label = input<string | undefined>(undefined);\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly image = input<string | undefined>(undefined);\n readonly alt = input<string | undefined>(undefined);\n readonly removable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removeIcon = input<TxIconName | (string & {})>('times-circle');\n readonly removeLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraChipTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxChipPart, TxChip> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly removed = output<Event>();\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('chip', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chip'), ...this.passThrough().root?.style }));\n\n registered(icon: string): string | null {\n return this.txIconRegistry.has(icon) ? icon : null;\n }\n\n remove(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.removed.emit(event);\n }\n}\n"],"mappings":";;;;;;;AAuDA,IAAa,SAAb,MAAa,OAAM;CACT,iBAAiB,OAAO,cAAc;CAErC,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,OAAO,MAA8C,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/D,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,MAAM,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,MAAA,CAAA,+BAAA,CAAA,CAAA;CAC1C,YAAY,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACxE,aAAa,MAAkC,gBAAe,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAC9D,cAAc,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,KAAK,MAAuD,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CACtE,KAAK,MAAqD,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CACpE,YAAY,MAAwC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,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{"version":3,"file":"tectra-ng-ui-chip.mjs","names":[],"sources":["../../../../packages/ui/chip/src/chip.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input, output } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon, TxIconName, TxIconRegistry } from '@tectra-ng/icons';\nimport { TectraChipTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxChipPart } from './chip.types';\n\n@Component({\n selector: 'tx-chip',\n imports: [TxIcon],\n template: `\n @if (image(); as image) {\n <img class=\"tx-chip__image\" [src]=\"image\" [alt]=\"alt() ?? ''\" [class]=\"passThrough().image?.class\" [style]=\"passThrough().image?.style\" />\n } @else if (icon(); as icon) {\n <span class=\"tx-chip__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (registered(icon); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <span class=\"tx-chip__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ label() }}<ng-content /></span>\n @if (removable()) {\n <button\n type=\"button\"\n class=\"tx-chip__remove\"\n [class]=\"passThrough().remove?.class\"\n [style]=\"passThrough().remove?.style\"\n [attr.aria-label]=\"removeLabel() ?? translations().remove\"\n [title]=\"removeLabel() ?? translations().remove\"\n (click)=\"remove($event)\"\n (keydown.delete)=\"remove($event)\"\n (keydown.backspace)=\"remove($event)\"\n >\n @if (registered(removeIcon()); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"removeIcon()\"></span>\n }\n </button>\n }\n `,\n styleUrl: './chip.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-chip',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-chip--image]': '!!image()',\n '[class.tx-chip--removable]': 'removable()',\n },\n})\nexport class TxChip {\n private txIconRegistry = inject(TxIconRegistry);\n\n readonly label = input<string | undefined>(undefined);\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly image = input<string | undefined>(undefined);\n readonly alt = input<string | undefined>(undefined);\n readonly removable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removeIcon = input<TxIconName | (string & {})>('times-circle');\n readonly removeLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraChipTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxChipPart, TxChip> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly removed = output<Event>();\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('chip', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chip'), ...this.passThrough().root?.style }));\n\n registered(icon: string): string | null {\n return this.txIconRegistry.has(icon) ? icon : null;\n }\n\n remove(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.removed.emit(event);\n }\n}\n"],"mappings":";;;;;;;AAuDA,IAAa,SAAb,MAAa,OAAM;CACT,iBAAiB,OAAO,cAAc;CAErC,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,OAAO,MAA8C,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/D,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,MAAM,MAA0B,QAAU,GAAA,YAAA,CAAA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;;;;;;;;;;;;;;;;;;;;;;;;;EAgCT,UAAA;EAAA,QAAA,CAAA,2yDAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MAjCS;GAAM,UAAA;GAAA,QAAA,CAAA,MAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AA6CL,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAM,YAAA,CAAA;EA/ClB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAS,SACV,CAAC,MAAM;GAAC,UACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCT,iBAEgB,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,0BAA0B;IAC1B,8BAA8B;GAC/B;GAAA,QAAA,CAAA,2yDAAA;EAAA,CAAA"}
@@ -382,7 +382,7 @@ var TxChipsInput = class TxChipsInput extends TxFormControlBase {
382
382
  usesInheritance: true,
383
383
  ngImport: i0,
384
384
  template: "<div class=\"tx-chips-input__box\">\n @if (values().length) {\n <span class=\"tx-chips-input__list\" role=\"list\" [class]=\"passThrough().list?.class\" [style]=\"passThrough().list?.style\">\n @for (item of values(); track $index) {\n <tx-chip\n role=\"listitem\"\n class=\"tx-chips-input__chip\"\n [class]=\"passThrough().chip?.class\"\n [style]=\"passThrough().chip?.style\"\n [removable]=\"!disabled() && !readonly()\"\n [removeIcon]=\"'times'\"\n [removeLabel]=\"removeLabel(item)\"\n (removed)=\"removeAt($index)\"\n >\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\" />\n } @else {\n {{ item }}\n }\n </tx-chip>\n }\n </span>\n }\n <input\n #field\n type=\"text\"\n autocomplete=\"off\"\n class=\"tx-chips-input__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [attr.id]=\"inputId() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? (ariaLabelledBy() || inputId() ? null : placeholder() || null)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [placeholder]=\"values().length ? '' : placeholder()\"\n [readOnly]=\"readonly() || isFull()\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (paste)=\"onPaste($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n />\n @if (canClear()) {\n <button\n type=\"button\"\n class=\"tx-chips-input__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n</div>\n",
385
- styles: [":host{display:block;width:100%}.tx-chips-input__box{display:flex;flex-wrap:wrap;align-items:center;cursor:text}.tx-chips-input__list{display:contents}.tx-chips-input__input{flex:1 1 var(--tx-chips-input-input-min-width, 80px);min-width:var(--tx-chips-input-input-min-width, 80px)}:host(.tx-chips-input--disabled) .tx-chips-input__box{cursor:not-allowed}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-chips-input__box{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);gap:var(--tx-chips-input-gap);width:100%}:host([data-styled])[data-variant=filled] .tx-chips-input__box{background:var(--tx-form-field-filled-background)}:host([data-styled]):not(.tx-chips-input--disabled,.tx-chips-input--readonly) .tx-chips-input__box:hover{border-color:var(--tx-form-field-hover-border-color)}:host([data-styled]) .tx-chips-input__box:focus-within{border-color:var(--tx-form-field-focus-border-color);box-shadow:var(--tx-form-field-focus-ring-shadow)}:host([data-styled]).tx-chips-input--readonly .tx-chips-input__box{background:var(--tx-form-field-readonly-background);cursor:default}:host([data-styled]).tx-chips-input--invalid .tx-chips-input__box{border-color:var(--tx-form-field-invalid-border-color)}:host([data-styled]).tx-chips-input--invalid .tx-chips-input__box:focus-within{border-color:var(--tx-form-field-invalid-border-color);box-shadow:var(--tx-form-field-invalid-focus-ring-shadow)}:host([data-styled]).tx-chips-input--disabled .tx-chips-input__box{background:var(--tx-form-field-disabled-background);box-shadow:none;color:var(--tx-form-field-disabled-color);cursor:not-allowed}:host([data-styled])[data-size=small] .tx-chips-input__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height)}:host([data-styled])[data-size=large] .tx-chips-input__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-lg-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-lg-padding-y));padding-inline:calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-lg-font-size);line-height:var(--tx-form-field-lg-line-height)}:host([data-styled]) .tx-chips-input__chip{--tx-chip-height: var(--tx-chips-input-chip-height);--tx-chip-font-size: var(--tx-chips-input-chip-font-size);--tx-chip-padding-x: var(--tx-chips-input-chip-padding-x);--tx-chip-border-radius: var(--tx-chips-input-chip-border-radius);--tx-chip-remove-size: 16px;margin-block:calc((1lh - var(--tx-chips-input-chip-height)) / 2)}:host([data-styled]) .tx-chips-input__input{padding:0;border:none;outline:none;background:transparent;color:inherit;font:inherit}:host([data-styled]) .tx-chips-input__input::placeholder{color:var(--tx-form-field-placeholder-color)}:host([data-styled]) .tx-chips-input__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-chips-input__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}:host([data-styled]) .tx-chips-input__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled]) .tx-chips-input__clear{margin-block:calc((1lh - 24px)/2);margin-inline-start:auto}\n"],
385
+ styles: [":host{display:block;width:100%}.tx-chips-input__box{display:flex;flex-wrap:wrap;align-items:center;cursor:text}.tx-chips-input__list{display:contents}.tx-chips-input__input{flex:1 1 var(--tx-chips-input-input-min-width, 80px);min-width:var(--tx-chips-input-input-min-width, 80px)}:host(.tx-chips-input--disabled) .tx-chips-input__box{cursor:not-allowed}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-chips-input__box{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background-color:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);gap:var(--tx-chips-input-gap);width:100%}:host([data-styled])[data-variant=filled] .tx-chips-input__box{background-color:var(--tx-form-field-filled-background)}:host([data-styled]):not(.tx-chips-input--disabled,.tx-chips-input--readonly) .tx-chips-input__box:hover{border-color:var(--tx-form-field-hover-border-color)}:host([data-styled]) .tx-chips-input__box:focus-within{border-color:var(--tx-form-field-focus-border-color);outline:var(--tx-form-field-focus-ring-width) var(--tx-form-field-focus-ring-style) var(--tx-form-field-focus-ring-color);outline-offset:var(--tx-form-field-focus-ring-offset);box-shadow:var(--tx-form-field-focus-ring-shadow)}:host([data-styled]).tx-chips-input--readonly .tx-chips-input__box{background-color:var(--tx-form-field-readonly-background);cursor:default}:host([data-styled]).tx-chips-input--invalid .tx-chips-input__box{border-color:var(--tx-form-field-invalid-border-color)}:host([data-styled]).tx-chips-input--invalid .tx-chips-input__box:focus-within{border-color:var(--tx-form-field-invalid-border-color);box-shadow:var(--tx-form-field-invalid-focus-ring-shadow)}:host([data-styled]).tx-chips-input--disabled .tx-chips-input__box{background-color:var(--tx-form-field-disabled-background);box-shadow:none;color:var(--tx-form-field-disabled-color);cursor:not-allowed}:host([data-styled])[data-size=small] .tx-chips-input__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height)}:host([data-styled])[data-size=large] .tx-chips-input__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-lg-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-lg-padding-y));padding-inline:calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-lg-font-size);line-height:var(--tx-form-field-lg-line-height)}:host([data-styled]) .tx-chips-input__chip{--tx-chip-height: var(--tx-chips-input-chip-height);--tx-chip-font-size: var(--tx-chips-input-chip-font-size);--tx-chip-padding-x: var(--tx-chips-input-chip-padding-x);--tx-chip-border-radius: var(--tx-chips-input-chip-border-radius);--tx-chip-remove-size: 16px;margin-block:calc((1lh - var(--tx-chips-input-chip-height)) / 2)}:host([data-styled]) .tx-chips-input__input{padding:0;border:none;outline:none;background:transparent;color:inherit;font:inherit}:host([data-styled]) .tx-chips-input__input::placeholder{color:var(--tx-form-field-placeholder-color)}:host([data-styled]) .tx-chips-input__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-chips-input__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}:host([data-styled]) .tx-chips-input__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled]) .tx-chips-input__clear{margin-block:calc((1lh - 24px)/2);margin-inline-start:auto}\n"],
386
386
  dependencies: [
387
387
  {
388
388
  kind: "directive",
@@ -458,7 +458,7 @@ i0.ɵɵngDeclareClassMetadata({
458
458
  "(click)": "onHostClick($event)"
459
459
  },
460
460
  template: "<div class=\"tx-chips-input__box\">\n @if (values().length) {\n <span class=\"tx-chips-input__list\" role=\"list\" [class]=\"passThrough().list?.class\" [style]=\"passThrough().list?.style\">\n @for (item of values(); track $index) {\n <tx-chip\n role=\"listitem\"\n class=\"tx-chips-input__chip\"\n [class]=\"passThrough().chip?.class\"\n [style]=\"passThrough().chip?.style\"\n [removable]=\"!disabled() && !readonly()\"\n [removeIcon]=\"'times'\"\n [removeLabel]=\"removeLabel(item)\"\n (removed)=\"removeAt($index)\"\n >\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\" />\n } @else {\n {{ item }}\n }\n </tx-chip>\n }\n </span>\n }\n <input\n #field\n type=\"text\"\n autocomplete=\"off\"\n class=\"tx-chips-input__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [attr.id]=\"inputId() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? (ariaLabelledBy() || inputId() ? null : placeholder() || null)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [placeholder]=\"values().length ? '' : placeholder()\"\n [readOnly]=\"readonly() || isFull()\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (paste)=\"onPaste($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n />\n @if (canClear()) {\n <button\n type=\"button\"\n class=\"tx-chips-input__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n</div>\n",
461
- styles: [":host{display:block;width:100%}.tx-chips-input__box{display:flex;flex-wrap:wrap;align-items:center;cursor:text}.tx-chips-input__list{display:contents}.tx-chips-input__input{flex:1 1 var(--tx-chips-input-input-min-width, 80px);min-width:var(--tx-chips-input-input-min-width, 80px)}:host(.tx-chips-input--disabled) .tx-chips-input__box{cursor:not-allowed}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-chips-input__box{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);gap:var(--tx-chips-input-gap);width:100%}:host([data-styled])[data-variant=filled] .tx-chips-input__box{background:var(--tx-form-field-filled-background)}:host([data-styled]):not(.tx-chips-input--disabled,.tx-chips-input--readonly) .tx-chips-input__box:hover{border-color:var(--tx-form-field-hover-border-color)}:host([data-styled]) .tx-chips-input__box:focus-within{border-color:var(--tx-form-field-focus-border-color);box-shadow:var(--tx-form-field-focus-ring-shadow)}:host([data-styled]).tx-chips-input--readonly .tx-chips-input__box{background:var(--tx-form-field-readonly-background);cursor:default}:host([data-styled]).tx-chips-input--invalid .tx-chips-input__box{border-color:var(--tx-form-field-invalid-border-color)}:host([data-styled]).tx-chips-input--invalid .tx-chips-input__box:focus-within{border-color:var(--tx-form-field-invalid-border-color);box-shadow:var(--tx-form-field-invalid-focus-ring-shadow)}:host([data-styled]).tx-chips-input--disabled .tx-chips-input__box{background:var(--tx-form-field-disabled-background);box-shadow:none;color:var(--tx-form-field-disabled-color);cursor:not-allowed}:host([data-styled])[data-size=small] .tx-chips-input__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height)}:host([data-styled])[data-size=large] .tx-chips-input__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-lg-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-lg-padding-y));padding-inline:calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-lg-font-size);line-height:var(--tx-form-field-lg-line-height)}:host([data-styled]) .tx-chips-input__chip{--tx-chip-height: var(--tx-chips-input-chip-height);--tx-chip-font-size: var(--tx-chips-input-chip-font-size);--tx-chip-padding-x: var(--tx-chips-input-chip-padding-x);--tx-chip-border-radius: var(--tx-chips-input-chip-border-radius);--tx-chip-remove-size: 16px;margin-block:calc((1lh - var(--tx-chips-input-chip-height)) / 2)}:host([data-styled]) .tx-chips-input__input{padding:0;border:none;outline:none;background:transparent;color:inherit;font:inherit}:host([data-styled]) .tx-chips-input__input::placeholder{color:var(--tx-form-field-placeholder-color)}:host([data-styled]) .tx-chips-input__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-chips-input__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}:host([data-styled]) .tx-chips-input__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled]) .tx-chips-input__clear{margin-block:calc((1lh - 24px)/2);margin-inline-start:auto}\n"]
461
+ styles: [":host{display:block;width:100%}.tx-chips-input__box{display:flex;flex-wrap:wrap;align-items:center;cursor:text}.tx-chips-input__list{display:contents}.tx-chips-input__input{flex:1 1 var(--tx-chips-input-input-min-width, 80px);min-width:var(--tx-chips-input-input-min-width, 80px)}:host(.tx-chips-input--disabled) .tx-chips-input__box{cursor:not-allowed}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-chips-input__box{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background-color:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);gap:var(--tx-chips-input-gap);width:100%}:host([data-styled])[data-variant=filled] .tx-chips-input__box{background-color:var(--tx-form-field-filled-background)}:host([data-styled]):not(.tx-chips-input--disabled,.tx-chips-input--readonly) .tx-chips-input__box:hover{border-color:var(--tx-form-field-hover-border-color)}:host([data-styled]) .tx-chips-input__box:focus-within{border-color:var(--tx-form-field-focus-border-color);outline:var(--tx-form-field-focus-ring-width) var(--tx-form-field-focus-ring-style) var(--tx-form-field-focus-ring-color);outline-offset:var(--tx-form-field-focus-ring-offset);box-shadow:var(--tx-form-field-focus-ring-shadow)}:host([data-styled]).tx-chips-input--readonly .tx-chips-input__box{background-color:var(--tx-form-field-readonly-background);cursor:default}:host([data-styled]).tx-chips-input--invalid .tx-chips-input__box{border-color:var(--tx-form-field-invalid-border-color)}:host([data-styled]).tx-chips-input--invalid .tx-chips-input__box:focus-within{border-color:var(--tx-form-field-invalid-border-color);box-shadow:var(--tx-form-field-invalid-focus-ring-shadow)}:host([data-styled]).tx-chips-input--disabled .tx-chips-input__box{background-color:var(--tx-form-field-disabled-background);box-shadow:none;color:var(--tx-form-field-disabled-color);cursor:not-allowed}:host([data-styled])[data-size=small] .tx-chips-input__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height)}:host([data-styled])[data-size=large] .tx-chips-input__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-lg-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-lg-padding-y));padding-inline:calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-lg-font-size);line-height:var(--tx-form-field-lg-line-height)}:host([data-styled]) .tx-chips-input__chip{--tx-chip-height: var(--tx-chips-input-chip-height);--tx-chip-font-size: var(--tx-chips-input-chip-font-size);--tx-chip-padding-x: var(--tx-chips-input-chip-padding-x);--tx-chip-border-radius: var(--tx-chips-input-chip-border-radius);--tx-chip-remove-size: 16px;margin-block:calc((1lh - var(--tx-chips-input-chip-height)) / 2)}:host([data-styled]) .tx-chips-input__input{padding:0;border:none;outline:none;background:transparent;color:inherit;font:inherit}:host([data-styled]) .tx-chips-input__input::placeholder{color:var(--tx-form-field-placeholder-color)}:host([data-styled]) .tx-chips-input__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-chips-input__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}:host([data-styled]) .tx-chips-input__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled]) .tx-chips-input__clear{margin-block:calc((1lh - 24px)/2);margin-inline-start:auto}\n"]
462
462
  }]
463
463
  }],
464
464
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-chips-input.mjs","names":[],"sources":["../../../../packages/ui/chips-input/src/chips-input-item.directive.ts","../../../../packages/ui/chips-input/src/chips-input.component.ts","../../../../packages/ui/chips-input/src/chips-input.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxChipsInputItemContext } from './chips-input.types';\n\n@Directive({ selector: 'ng-template[txChipsInputItem]' })\nexport class TxChipsInputItemTemplate {\n readonly templateRef = inject<TemplateRef<TxChipsInputItemContext>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n contentChild,\n forwardRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon } from '@tectra-ng/icons';\nimport { TectraChipsInputTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxChip } from '@tectra-ng/ui/chip';\nimport { TxChipsInputItemTemplate } from './chips-input-item.directive';\nimport { TxChipsInputEvent, TxChipsInputPart, TxChipsInputSize, TxChipsInputVariant } from './chips-input.types';\n\n@Component({\n selector: 'tx-chips-input',\n imports: [NgTemplateOutlet, TxChip, TxIcon],\n templateUrl: './chips-input.component.html',\n styleUrl: './chips-input.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxChipsInput), multi: true }],\n host: {\n class: 'tx-chips-input',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[attr.data-variant]': 'variant()',\n '[class.tx-chips-input--disabled]': 'disabled()',\n '[class.tx-chips-input--invalid]': 'isInvalid()',\n '[class.tx-chips-input--readonly]': 'readonly()',\n '[class.tx-chips-input--filled]': 'values().length > 0 || !!text()',\n '[class.tx-chips-input--full]': 'isFull()',\n '(click)': 'onHostClick($event)',\n },\n})\nexport class TxChipsInput extends TxFormControlBase<string[]> {\n readonly placeholder = input<string>('');\n readonly separator = input<string | RegExp>(',');\n readonly addOnBlur = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly allowDuplicate = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly caseSensitive = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly max = input<number | undefined>(undefined);\n readonly maxLength = input<number | undefined>(undefined);\n readonly itemPattern = input<RegExp | undefined>(undefined);\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly inputId = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly size = input<TxChipsInputSize>('medium');\n readonly variant = input<TxChipsInputVariant>('outlined');\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraChipsInputTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxChipsInputPart, TxChipsInput> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly added = output<TxChipsInputEvent>();\n readonly removed = output<TxChipsInputEvent>();\n readonly rejected = output<TxChipsInputEvent>();\n\n readonly itemTemplate = contentChild(TxChipsInputItemTemplate);\n readonly field = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n readonly translations = injectTranslations();\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('chipsInput', this, this.pt, this.ptOptions);\n readonly text = signal('');\n\n readonly values = computed(() => this.value() ?? []);\n readonly isFull = computed(() => this.max() !== undefined && this.values().length >= (this.max() ?? 0));\n readonly canClear = computed(() => this.showClear() && this.values().length > 0 && !this.disabled() && !this.readonly());\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chips-input'), ...this.passThrough().root?.style }));\n\n override writeValue(value: string[] | null): void {\n super.writeValue(Array.isArray(value) ? value : []);\n }\n\n removeLabel(item: string): string {\n return this.translations().removeItem.replace('{item}', item);\n }\n\n onInput(event: Event): void {\n const text = (event.target as HTMLInputElement).value;\n const separator = this.separator();\n const parts = text.split(separator);\n if (parts.length > 1) {\n this.addAll(parts.slice(0, -1));\n this.setText(parts[parts.length - 1]);\n } else {\n this.text.set(text);\n }\n }\n\n onPaste(event: ClipboardEvent): void {\n const pasted = event.clipboardData?.getData('text') ?? '';\n const parts = pasted.split(/\\r?\\n/).flatMap((line) => line.split(this.separator()));\n if (parts.length > 1) {\n event.preventDefault();\n this.addAll(parts);\n }\n }\n\n onKeydown(event: KeyboardEvent): void {\n if (this.readonly()) {\n return;\n }\n if (event.key === 'Enter') {\n if (this.text().trim()) {\n event.preventDefault();\n this.addAll([this.text()]);\n }\n return;\n }\n if (event.key === 'Backspace' && !this.text() && this.values().length) {\n event.preventDefault();\n this.removeAt(this.values().length - 1);\n }\n }\n\n onBlur(): void {\n if (this.addOnBlur() && this.text().trim()) {\n this.addAll([this.text()]);\n }\n this.markTouched();\n }\n\n onHostClick(event: MouseEvent): void {\n if (!(event.target as HTMLElement).closest('button')) {\n this.field().nativeElement.focus();\n }\n }\n\n removeAt(index: number): void {\n if (this.disabled() || this.readonly()) {\n return;\n }\n const value = this.values()[index];\n const values = this.values().filter((_, position) => position !== index);\n this.updateValue(values);\n this.removed.emit({ value, values });\n this.field().nativeElement.focus();\n }\n\n clear(): void {\n this.updateValue([]);\n this.setText('');\n this.field().nativeElement.focus();\n }\n\n private addAll(parts: string[]): void {\n let values = this.values();\n for (const part of parts.map((item) => item.trim()).filter(Boolean)) {\n const value = this.maxLength() ? part.slice(0, this.maxLength()) : part;\n const duplicate = values.some((item) => (this.caseSensitive() ? item === value : item.toLowerCase() === value.toLowerCase()));\n const full = this.max() !== undefined && values.length >= (this.max() ?? 0);\n const invalidPattern = !!this.itemPattern() && !this.itemPattern()?.test(value);\n if ((duplicate && !this.allowDuplicate()) || full || invalidPattern) {\n this.rejected.emit({ value, values });\n continue;\n }\n values = [...values, value];\n this.updateValue(values);\n this.added.emit({ value, values });\n }\n this.setText('');\n }\n\n private setText(text: string): void {\n this.text.set(text);\n this.field().nativeElement.value = text;\n }\n}\n","<div class=\"tx-chips-input__box\">\n @if (values().length) {\n <span class=\"tx-chips-input__list\" role=\"list\" [class]=\"passThrough().list?.class\" [style]=\"passThrough().list?.style\">\n @for (item of values(); track $index) {\n <tx-chip\n role=\"listitem\"\n class=\"tx-chips-input__chip\"\n [class]=\"passThrough().chip?.class\"\n [style]=\"passThrough().chip?.style\"\n [removable]=\"!disabled() && !readonly()\"\n [removeIcon]=\"'times'\"\n [removeLabel]=\"removeLabel(item)\"\n (removed)=\"removeAt($index)\"\n >\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\" />\n } @else {\n {{ item }}\n }\n </tx-chip>\n }\n </span>\n }\n <input\n #field\n type=\"text\"\n autocomplete=\"off\"\n class=\"tx-chips-input__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [attr.id]=\"inputId() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? (ariaLabelledBy() || inputId() ? null : placeholder() || null)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [placeholder]=\"values().length ? '' : placeholder()\"\n [readOnly]=\"readonly() || isFull()\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (paste)=\"onPaste($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n />\n @if (canClear()) {\n <button\n type=\"button\"\n class=\"tx-chips-input__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n</div>\n"],"mappings":";;;;;;;;;;;AAIA,IAAa,2BAAb,MAAa,yBAAwB;CAC1B,cAAc,OAA6C,WAAW;CADpE,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAwB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAxB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAwB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAxB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EADpC,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,gCAA+B,CAAE;;;AC4CxD,IAAa,eAAb,MAAa,qBAAqB,kBAA2B;CAClD,cAAc,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,YAAY,MAAuB,KAAI,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,YAAY,MAAwB,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACvE,iBAAiB,MAAwB,OAAK;EAA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AA,GAAA;GAAA,MAAA,CAAA,UAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,wBAAwB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CACK,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-chips-input.mjs","names":[],"sources":["../../../../packages/ui/chips-input/src/chips-input-item.directive.ts","../../../../packages/ui/chips-input/src/chips-input.component.ts","../../../../packages/ui/chips-input/src/chips-input.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxChipsInputItemContext } from './chips-input.types';\n\n@Directive({ selector: 'ng-template[txChipsInputItem]' })\nexport class TxChipsInputItemTemplate {\n readonly templateRef = inject<TemplateRef<TxChipsInputItemContext>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n contentChild,\n forwardRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon } from '@tectra-ng/icons';\nimport { TectraChipsInputTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxChip } from '@tectra-ng/ui/chip';\nimport { TxChipsInputItemTemplate } from './chips-input-item.directive';\nimport { TxChipsInputEvent, TxChipsInputPart, TxChipsInputSize, TxChipsInputVariant } from './chips-input.types';\n\n@Component({\n selector: 'tx-chips-input',\n imports: [NgTemplateOutlet, TxChip, TxIcon],\n templateUrl: './chips-input.component.html',\n styleUrl: './chips-input.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxChipsInput), multi: true }],\n host: {\n class: 'tx-chips-input',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[attr.data-variant]': 'variant()',\n '[class.tx-chips-input--disabled]': 'disabled()',\n '[class.tx-chips-input--invalid]': 'isInvalid()',\n '[class.tx-chips-input--readonly]': 'readonly()',\n '[class.tx-chips-input--filled]': 'values().length > 0 || !!text()',\n '[class.tx-chips-input--full]': 'isFull()',\n '(click)': 'onHostClick($event)',\n },\n})\nexport class TxChipsInput extends TxFormControlBase<string[]> {\n readonly placeholder = input<string>('');\n readonly separator = input<string | RegExp>(',');\n readonly addOnBlur = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly allowDuplicate = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly caseSensitive = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly max = input<number | undefined>(undefined);\n readonly maxLength = input<number | undefined>(undefined);\n readonly itemPattern = input<RegExp | undefined>(undefined);\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly inputId = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly size = input<TxChipsInputSize>('medium');\n readonly variant = input<TxChipsInputVariant>('outlined');\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraChipsInputTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxChipsInputPart, TxChipsInput> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly added = output<TxChipsInputEvent>();\n readonly removed = output<TxChipsInputEvent>();\n readonly rejected = output<TxChipsInputEvent>();\n\n readonly itemTemplate = contentChild(TxChipsInputItemTemplate);\n readonly field = viewChild.required<ElementRef<HTMLInputElement>>('field');\n\n readonly translations = injectTranslations();\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('chipsInput', this, this.pt, this.ptOptions);\n readonly text = signal('');\n\n readonly values = computed(() => this.value() ?? []);\n readonly isFull = computed(() => this.max() !== undefined && this.values().length >= (this.max() ?? 0));\n readonly canClear = computed(() => this.showClear() && this.values().length > 0 && !this.disabled() && !this.readonly());\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chips-input'), ...this.passThrough().root?.style }));\n\n override writeValue(value: string[] | null): void {\n super.writeValue(Array.isArray(value) ? value : []);\n }\n\n removeLabel(item: string): string {\n return this.translations().removeItem.replace('{item}', item);\n }\n\n onInput(event: Event): void {\n const text = (event.target as HTMLInputElement).value;\n const separator = this.separator();\n const parts = text.split(separator);\n if (parts.length > 1) {\n this.addAll(parts.slice(0, -1));\n this.setText(parts[parts.length - 1]);\n } else {\n this.text.set(text);\n }\n }\n\n onPaste(event: ClipboardEvent): void {\n const pasted = event.clipboardData?.getData('text') ?? '';\n const parts = pasted.split(/\\r?\\n/).flatMap((line) => line.split(this.separator()));\n if (parts.length > 1) {\n event.preventDefault();\n this.addAll(parts);\n }\n }\n\n onKeydown(event: KeyboardEvent): void {\n if (this.readonly()) {\n return;\n }\n if (event.key === 'Enter') {\n if (this.text().trim()) {\n event.preventDefault();\n this.addAll([this.text()]);\n }\n return;\n }\n if (event.key === 'Backspace' && !this.text() && this.values().length) {\n event.preventDefault();\n this.removeAt(this.values().length - 1);\n }\n }\n\n onBlur(): void {\n if (this.addOnBlur() && this.text().trim()) {\n this.addAll([this.text()]);\n }\n this.markTouched();\n }\n\n onHostClick(event: MouseEvent): void {\n if (!(event.target as HTMLElement).closest('button')) {\n this.field().nativeElement.focus();\n }\n }\n\n removeAt(index: number): void {\n if (this.disabled() || this.readonly()) {\n return;\n }\n const value = this.values()[index];\n const values = this.values().filter((_, position) => position !== index);\n this.updateValue(values);\n this.removed.emit({ value, values });\n this.field().nativeElement.focus();\n }\n\n clear(): void {\n this.updateValue([]);\n this.setText('');\n this.field().nativeElement.focus();\n }\n\n private addAll(parts: string[]): void {\n let values = this.values();\n for (const part of parts.map((item) => item.trim()).filter(Boolean)) {\n const value = this.maxLength() ? part.slice(0, this.maxLength()) : part;\n const duplicate = values.some((item) => (this.caseSensitive() ? item === value : item.toLowerCase() === value.toLowerCase()));\n const full = this.max() !== undefined && values.length >= (this.max() ?? 0);\n const invalidPattern = !!this.itemPattern() && !this.itemPattern()?.test(value);\n if ((duplicate && !this.allowDuplicate()) || full || invalidPattern) {\n this.rejected.emit({ value, values });\n continue;\n }\n values = [...values, value];\n this.updateValue(values);\n this.added.emit({ value, values });\n }\n this.setText('');\n }\n\n private setText(text: string): void {\n this.text.set(text);\n this.field().nativeElement.value = text;\n }\n}\n","<div class=\"tx-chips-input__box\">\n @if (values().length) {\n <span class=\"tx-chips-input__list\" role=\"list\" [class]=\"passThrough().list?.class\" [style]=\"passThrough().list?.style\">\n @for (item of values(); track $index) {\n <tx-chip\n role=\"listitem\"\n class=\"tx-chips-input__chip\"\n [class]=\"passThrough().chip?.class\"\n [style]=\"passThrough().chip?.style\"\n [removable]=\"!disabled() && !readonly()\"\n [removeIcon]=\"'times'\"\n [removeLabel]=\"removeLabel(item)\"\n (removed)=\"removeAt($index)\"\n >\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\" />\n } @else {\n {{ item }}\n }\n </tx-chip>\n }\n </span>\n }\n <input\n #field\n type=\"text\"\n autocomplete=\"off\"\n class=\"tx-chips-input__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [attr.id]=\"inputId() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? (ariaLabelledBy() || inputId() ? null : placeholder() || null)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [placeholder]=\"values().length ? '' : placeholder()\"\n [readOnly]=\"readonly() || isFull()\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (paste)=\"onPaste($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n />\n @if (canClear()) {\n <button\n type=\"button\"\n class=\"tx-chips-input__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n</div>\n"],"mappings":";;;;;;;;;;;AAIA,IAAa,2BAAb,MAAa,yBAAwB;CAC1B,cAAc,OAA6C,WAAW;CADpE,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAwB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAxB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAwB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAxB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EADpC,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,gCAA+B,CAAE;;;AC4CxD,IAAa,eAAb,MAAa,qBAAqB,kBAA2B;CAClD,cAAc,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,YAAY,MAAuB,KAAI,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GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,OAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,wBAAwB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CACK,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -543,7 +543,7 @@ var TxColorPicker = class TxColorPicker extends TxFormControlBase {
543
543
  usesInheritance: true,
544
544
  ngImport: i0,
545
545
  template: "@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"content\" />\n} @else {\n <button\n #trigger\n #origin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n type=\"button\"\n class=\"tx-color-picker__trigger\"\n aria-haspopup=\"dialog\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n [attr.id]=\"inputId() ?? null\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ? ariaLabelledBy() + ' ' + valueId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-description]=\"showValue() ? null : triggerText()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\"\n >\n <span\n class=\"tx-color-picker__swatch\"\n aria-hidden=\"true\"\n [class.tx-color-picker__swatch--empty]=\"!hasColor()\"\n [style.background-color]=\"hasColor() ? hex() : null\"\n [class]=\"passThrough().swatch?.class\"\n [style]=\"passThrough().swatch?.style\"\n ></span>\n @if (showValue()) {\n <span class=\"tx-color-picker__value\" [id]=\"valueId\" [class.tx-color-picker__value--empty]=\"!hasColor()\">{{ triggerText() }}</span>\n }\n </button>\n <ng-template\n cdkConnectedOverlay\n txOverlayAnchor\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isPanelMounted()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n (attach)=\"onAttach()\"\n (positionChange)=\"onPositionChange($event)\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </ng-template>\n}\n\n<ng-template #content>\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- the panel only listens to keys and focus that bubble from its controls -->\n <div\n #panel\n class=\"tx-color-picker__panel\"\n [attr.role]=\"inline() ? 'group' : 'dialog'\"\n [attr.id]=\"panelId\"\n [attr.aria-label]=\"ariaLabel() ?? translations().pickColor\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"panelStyle()\"\n (keydown)=\"onPanelKeydown($event)\"\n (focusout)=\"onPanelFocusOut($event)\"\n >\n <div\n #area\n class=\"tx-color-picker__area\"\n role=\"slider\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.tabindex]=\"editable() ? 0 : -1\"\n [attr.aria-label]=\"translations().colorArea\"\n [attr.aria-valuenow]=\"hsb().s\"\n [attr.aria-valuetext]=\"areaText()\"\n [attr.aria-disabled]=\"!editable() || null\"\n [style.background-color]=\"hueColor()\"\n [class]=\"passThrough().area?.class\"\n [style]=\"passThrough().area?.style\"\n (pointerdown)=\"onAreaPointer($event)\"\n (pointermove)=\"onAreaPointer($event)\"\n (keydown)=\"onAreaKeydown($event)\"\n >\n <span class=\"tx-color-picker__handle\" [style.left.%]=\"hsb().s\" [style.top.%]=\"100 - hsb().b\" [style.background-color]=\"hex()\"></span>\n </div>\n <div\n class=\"tx-color-picker__hue\"\n role=\"slider\"\n aria-valuemin=\"0\"\n aria-valuemax=\"360\"\n [attr.tabindex]=\"editable() ? 0 : -1\"\n [attr.aria-label]=\"translations().colorHue\"\n [attr.aria-valuenow]=\"hsb().h\"\n [attr.aria-disabled]=\"!editable() || null\"\n [class]=\"passThrough().hue?.class\"\n [style]=\"passThrough().hue?.style\"\n (pointerdown)=\"onHuePointer($event)\"\n (pointermove)=\"onHuePointer($event)\"\n (keydown)=\"onHueKeydown($event)\"\n >\n <span class=\"tx-color-picker__handle\" [style.left.%]=\"(hsb().h / 360) * 100\" [style.background-color]=\"hueColor()\"></span>\n </div>\n @if (showInput() || showClear()) {\n <div class=\"tx-color-picker__row\">\n @if (showInput()) {\n <span class=\"tx-color-picker__preview\" aria-hidden=\"true\" [style.background-color]=\"hasColor() ? hex() : null\"></span>\n <input\n type=\"text\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n maxlength=\"7\"\n class=\"tx-color-picker__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [attr.aria-label]=\"translations().colorHex\"\n [value]=\"draft() ?? (hasColor() ? hex() : '')\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n (input)=\"onHexInput($event)\"\n (blur)=\"onHexBlur()\"\n />\n }\n @if (showClear() && hasColor() && editable()) {\n <button\n type=\"button\"\n class=\"tx-color-picker__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n </div>\n }\n @if (presets().length) {\n <div class=\"tx-color-picker__presets\" role=\"group\" [attr.aria-label]=\"translations().colorPresets\" [class]=\"passThrough().presets?.class\" [style]=\"passThrough().presets?.style\">\n @for (color of presets(); track color) {\n <button\n type=\"button\"\n class=\"tx-color-picker__preset\"\n [style.background-color]=\"color\"\n [attr.aria-label]=\"color\"\n [attr.aria-pressed]=\"isPreset(color)\"\n [disabled]=\"!editable()\"\n [class]=\"passThrough().preset?.class\"\n [style]=\"passThrough().preset?.style\"\n (click)=\"pickPreset(color)\"\n ></button>\n }\n </div>\n }\n </div>\n</ng-template>\n",
546
- styles: [":host{display:inline-block;vertical-align:top}.tx-color-picker__trigger{display:inline-flex;align-items:center;cursor:pointer}.tx-color-picker__swatch{display:inline-block;flex:none}.tx-color-picker__panel{display:flex;flex-direction:column;box-sizing:border-box}.tx-color-picker__area,.tx-color-picker__hue{position:relative;touch-action:none;cursor:crosshair}.tx-color-picker__hue{cursor:ew-resize}.tx-color-picker__handle{position:absolute;pointer-events:none}.tx-color-picker__row,.tx-color-picker__presets{display:flex;flex-wrap:wrap;align-items:center}.tx-color-picker__input{flex:1;min-width:0}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-color-picker__trigger{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);gap:var(--tx-color-picker-gap)}:host([data-styled]):not(.tx-color-picker--disabled,.tx-color-picker--readonly) .tx-color-picker__trigger:hover{border-color:var(--tx-form-field-hover-border-color)}:host([data-styled]) .tx-color-picker__trigger:focus-visible,:host([data-styled]).tx-color-picker--open .tx-color-picker__trigger{border-color:var(--tx-form-field-focus-border-color);box-shadow:var(--tx-form-field-focus-ring-shadow)}:host([data-styled]).tx-color-picker--invalid .tx-color-picker__trigger{border-color:var(--tx-form-field-invalid-border-color)}:host([data-styled]).tx-color-picker--readonly .tx-color-picker__trigger{background:var(--tx-form-field-readonly-background);cursor:default}:host([data-styled]).tx-color-picker--disabled .tx-color-picker__trigger{background:var(--tx-form-field-disabled-background);box-shadow:none;color:var(--tx-form-field-disabled-color);cursor:not-allowed}:host([data-styled])[data-size=small] .tx-color-picker__trigger{padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height)}:host([data-styled])[data-size=large] .tx-color-picker__trigger{padding-top:var(--tx-field-padding-top, var(--tx-form-field-lg-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-lg-padding-y));padding-inline:calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-lg-font-size);line-height:var(--tx-form-field-lg-line-height)}:host([data-styled]) .tx-color-picker__swatch{width:var(--tx-color-picker-swatch-size);height:var(--tx-color-picker-swatch-size);margin-block:calc((1lh - var(--tx-color-picker-swatch-size)) / 2);border-radius:var(--tx-color-picker-swatch-border-radius);box-shadow:var(--tx-color-picker-swatch-ring)}:host([data-styled]) .tx-color-picker__swatch--empty{background:linear-gradient(135deg,transparent 45%,var(--tx-danger-base) 45% 55%,transparent 55%)}:host([data-styled]) .tx-color-picker__value{font-variant-numeric:tabular-nums}:host([data-styled]) .tx-color-picker__value--empty{color:var(--tx-form-field-placeholder-color)}.tx-color-picker__panel[data-styled]{gap:var(--tx-color-picker-panel-gap);width:var(--tx-color-picker-panel-width);padding:var(--tx-color-picker-panel-padding);border:1px solid var(--tx-color-picker-panel-border-color);border-radius:var(--tx-color-picker-panel-border-radius);background:var(--tx-color-picker-panel-background);box-shadow:var(--tx-color-picker-panel-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size)}.tx-color-picker__panel[data-styled] .tx-color-picker__area{height:var(--tx-color-picker-area-height);border-radius:var(--tx-color-picker-area-border-radius);background-image:var(--tx-color-picker-area-brightness-gradient),var(--tx-color-picker-area-saturation-gradient);outline:none}.tx-color-picker__panel[data-styled] .tx-color-picker__hue{height:var(--tx-color-picker-hue-height);border-radius:var(--tx-color-picker-hue-border-radius);background:var(--tx-color-picker-hue-gradient);outline:none}.tx-color-picker__panel[data-styled] .tx-color-picker__handle{box-sizing:border-box;width:var(--tx-color-picker-handle-size);height:var(--tx-color-picker-handle-size);border:2px solid var(--tx-color-picker-handle-border-color);border-radius:50%;box-shadow:var(--tx-color-picker-handle-ring);transform:translate(-50%,-50%)}.tx-color-picker__panel[data-styled] .tx-color-picker__hue .tx-color-picker__handle{top:50%}.tx-color-picker__panel[data-styled] .tx-color-picker__area:focus-visible .tx-color-picker__handle,.tx-color-picker__panel[data-styled] .tx-color-picker__hue:focus-visible .tx-color-picker__handle{box-shadow:var(--tx-color-picker-handle-focus-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__row{gap:var(--tx-color-picker-gap)}.tx-color-picker__panel[data-styled] .tx-color-picker__preview{width:var(--tx-color-picker-swatch-size);height:var(--tx-color-picker-swatch-size);border-radius:var(--tx-color-picker-swatch-border-radius);box-shadow:var(--tx-color-picker-swatch-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__input{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height);font-family:var(--tx-font-family-mono, monospace);text-transform:lowercase}.tx-color-picker__panel[data-styled] .tx-color-picker__input:focus{border-color:var(--tx-form-field-focus-border-color);box-shadow:var(--tx-form-field-focus-ring-shadow)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-color-picker__panel[data-styled] .tx-color-picker__presets{gap:var(--tx-color-picker-preset-gap)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset{transition:box-shadow var(--tx-motion-duration) var(--tx-motion-easing),transform var(--tx-motion-duration) var(--tx-motion-easing);width:var(--tx-color-picker-preset-size);height:var(--tx-color-picker-preset-size);padding:0;border:none;border-radius:var(--tx-color-picker-preset-border-radius);box-shadow:var(--tx-color-picker-swatch-ring);cursor:pointer}.tx-color-picker__panel[data-styled] .tx-color-picker__preset[aria-pressed=true]{box-shadow:var(--tx-color-picker-preset-selected-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:enabled:hover{transform:scale(1.1)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:disabled{cursor:not-allowed;opacity:.6}@media(prefers-reduced-motion:reduce){.tx-color-picker__panel[data-styled] .tx-color-picker__preset:enabled:hover{transform:none}}\n"],
546
+ styles: [":host{display:inline-block;vertical-align:top}.tx-color-picker__trigger{display:inline-flex;align-items:center;cursor:pointer}.tx-color-picker__swatch{display:inline-block;flex:none}.tx-color-picker__panel{display:flex;flex-direction:column;box-sizing:border-box}.tx-color-picker__area,.tx-color-picker__hue{position:relative;touch-action:none;cursor:crosshair}.tx-color-picker__hue{cursor:ew-resize}.tx-color-picker__handle{position:absolute;pointer-events:none}.tx-color-picker__row,.tx-color-picker__presets{display:flex;flex-wrap:wrap;align-items:center}.tx-color-picker__input{flex:1;min-width:0}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-color-picker__trigger{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background-color:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);gap:var(--tx-color-picker-gap)}:host([data-styled]):not(.tx-color-picker--disabled,.tx-color-picker--readonly) .tx-color-picker__trigger:hover{border-color:var(--tx-form-field-hover-border-color)}:host([data-styled]) .tx-color-picker__trigger:focus-visible,:host([data-styled]).tx-color-picker--open .tx-color-picker__trigger{border-color:var(--tx-form-field-focus-border-color);outline:var(--tx-form-field-focus-ring-width) var(--tx-form-field-focus-ring-style) var(--tx-form-field-focus-ring-color);outline-offset:var(--tx-form-field-focus-ring-offset);box-shadow:var(--tx-form-field-focus-ring-shadow)}:host([data-styled]).tx-color-picker--invalid .tx-color-picker__trigger{border-color:var(--tx-form-field-invalid-border-color)}:host([data-styled]).tx-color-picker--readonly .tx-color-picker__trigger{background-color:var(--tx-form-field-readonly-background);cursor:default}:host([data-styled]).tx-color-picker--disabled .tx-color-picker__trigger{background-color:var(--tx-form-field-disabled-background);box-shadow:none;color:var(--tx-form-field-disabled-color);cursor:not-allowed}:host([data-styled])[data-size=small] .tx-color-picker__trigger{padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height)}:host([data-styled])[data-size=large] .tx-color-picker__trigger{padding-top:var(--tx-field-padding-top, var(--tx-form-field-lg-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-lg-padding-y));padding-inline:calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-lg-font-size);line-height:var(--tx-form-field-lg-line-height)}:host([data-styled]) .tx-color-picker__swatch{width:var(--tx-color-picker-swatch-size);height:var(--tx-color-picker-swatch-size);margin-block:calc((1lh - var(--tx-color-picker-swatch-size)) / 2);border-radius:var(--tx-color-picker-swatch-border-radius);box-shadow:var(--tx-color-picker-swatch-ring)}:host([data-styled]) .tx-color-picker__swatch--empty{background:linear-gradient(135deg,transparent 45%,var(--tx-danger-base) 45% 55%,transparent 55%)}:host([data-styled]) .tx-color-picker__value{font-variant-numeric:tabular-nums}:host([data-styled]) .tx-color-picker__value--empty{color:var(--tx-form-field-placeholder-color)}.tx-color-picker__panel[data-styled]{gap:var(--tx-color-picker-panel-gap);width:var(--tx-color-picker-panel-width);padding:var(--tx-color-picker-panel-padding);border:1px solid var(--tx-color-picker-panel-border-color);border-radius:var(--tx-color-picker-panel-border-radius);background:var(--tx-color-picker-panel-background);box-shadow:var(--tx-color-picker-panel-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size)}.tx-color-picker__panel[data-styled] .tx-color-picker__area{height:var(--tx-color-picker-area-height);border-radius:var(--tx-color-picker-area-border-radius);background-image:var(--tx-color-picker-area-brightness-gradient),var(--tx-color-picker-area-saturation-gradient);outline:none}.tx-color-picker__panel[data-styled] .tx-color-picker__hue{height:var(--tx-color-picker-hue-height);border-radius:var(--tx-color-picker-hue-border-radius);background:var(--tx-color-picker-hue-gradient);outline:none}.tx-color-picker__panel[data-styled] .tx-color-picker__handle{box-sizing:border-box;width:var(--tx-color-picker-handle-size);height:var(--tx-color-picker-handle-size);border:2px solid var(--tx-color-picker-handle-border-color);border-radius:50%;box-shadow:var(--tx-color-picker-handle-ring);transform:translate(-50%,-50%)}.tx-color-picker__panel[data-styled] .tx-color-picker__hue .tx-color-picker__handle{top:50%}.tx-color-picker__panel[data-styled] .tx-color-picker__area:focus-visible .tx-color-picker__handle,.tx-color-picker__panel[data-styled] .tx-color-picker__hue:focus-visible .tx-color-picker__handle{box-shadow:var(--tx-color-picker-handle-focus-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__row{gap:var(--tx-color-picker-gap)}.tx-color-picker__panel[data-styled] .tx-color-picker__preview{width:var(--tx-color-picker-swatch-size);height:var(--tx-color-picker-swatch-size);border-radius:var(--tx-color-picker-swatch-border-radius);box-shadow:var(--tx-color-picker-swatch-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__input{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background-color:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height);font-family:var(--tx-font-family-mono, monospace);text-transform:lowercase}.tx-color-picker__panel[data-styled] .tx-color-picker__input:focus{border-color:var(--tx-form-field-focus-border-color);outline:var(--tx-form-field-focus-ring-width) var(--tx-form-field-focus-ring-style) var(--tx-form-field-focus-ring-color);outline-offset:var(--tx-form-field-focus-ring-offset);box-shadow:var(--tx-form-field-focus-ring-shadow)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-color-picker__panel[data-styled] .tx-color-picker__presets{gap:var(--tx-color-picker-preset-gap)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset{transition:box-shadow var(--tx-motion-duration) var(--tx-motion-easing),transform var(--tx-motion-duration) var(--tx-motion-easing);width:var(--tx-color-picker-preset-size);height:var(--tx-color-picker-preset-size);padding:0;border:none;border-radius:var(--tx-color-picker-preset-border-radius);box-shadow:var(--tx-color-picker-swatch-ring);cursor:pointer}.tx-color-picker__panel[data-styled] .tx-color-picker__preset[aria-pressed=true]{box-shadow:var(--tx-color-picker-preset-selected-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:enabled:hover{transform:scale(1.1)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:disabled{cursor:not-allowed;opacity:.6}@media(prefers-reduced-motion:reduce){.tx-color-picker__panel[data-styled] .tx-color-picker__preset:enabled:hover{transform:none}}\n"],
547
547
  dependencies: [
548
548
  {
549
549
  kind: "directive",
@@ -653,7 +653,7 @@ i0.ɵɵngDeclareClassMetadata({
653
653
  "[class.tx-color-picker--filled]": "hasColor()"
654
654
  },
655
655
  template: "@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"content\" />\n} @else {\n <button\n #trigger\n #origin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n type=\"button\"\n class=\"tx-color-picker__trigger\"\n aria-haspopup=\"dialog\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n [attr.id]=\"inputId() ?? null\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ? ariaLabelledBy() + ' ' + valueId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-description]=\"showValue() ? null : triggerText()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\"\n >\n <span\n class=\"tx-color-picker__swatch\"\n aria-hidden=\"true\"\n [class.tx-color-picker__swatch--empty]=\"!hasColor()\"\n [style.background-color]=\"hasColor() ? hex() : null\"\n [class]=\"passThrough().swatch?.class\"\n [style]=\"passThrough().swatch?.style\"\n ></span>\n @if (showValue()) {\n <span class=\"tx-color-picker__value\" [id]=\"valueId\" [class.tx-color-picker__value--empty]=\"!hasColor()\">{{ triggerText() }}</span>\n }\n </button>\n <ng-template\n cdkConnectedOverlay\n txOverlayAnchor\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isPanelMounted()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n (attach)=\"onAttach()\"\n (positionChange)=\"onPositionChange($event)\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </ng-template>\n}\n\n<ng-template #content>\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- the panel only listens to keys and focus that bubble from its controls -->\n <div\n #panel\n class=\"tx-color-picker__panel\"\n [attr.role]=\"inline() ? 'group' : 'dialog'\"\n [attr.id]=\"panelId\"\n [attr.aria-label]=\"ariaLabel() ?? translations().pickColor\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"panelStyle()\"\n (keydown)=\"onPanelKeydown($event)\"\n (focusout)=\"onPanelFocusOut($event)\"\n >\n <div\n #area\n class=\"tx-color-picker__area\"\n role=\"slider\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.tabindex]=\"editable() ? 0 : -1\"\n [attr.aria-label]=\"translations().colorArea\"\n [attr.aria-valuenow]=\"hsb().s\"\n [attr.aria-valuetext]=\"areaText()\"\n [attr.aria-disabled]=\"!editable() || null\"\n [style.background-color]=\"hueColor()\"\n [class]=\"passThrough().area?.class\"\n [style]=\"passThrough().area?.style\"\n (pointerdown)=\"onAreaPointer($event)\"\n (pointermove)=\"onAreaPointer($event)\"\n (keydown)=\"onAreaKeydown($event)\"\n >\n <span class=\"tx-color-picker__handle\" [style.left.%]=\"hsb().s\" [style.top.%]=\"100 - hsb().b\" [style.background-color]=\"hex()\"></span>\n </div>\n <div\n class=\"tx-color-picker__hue\"\n role=\"slider\"\n aria-valuemin=\"0\"\n aria-valuemax=\"360\"\n [attr.tabindex]=\"editable() ? 0 : -1\"\n [attr.aria-label]=\"translations().colorHue\"\n [attr.aria-valuenow]=\"hsb().h\"\n [attr.aria-disabled]=\"!editable() || null\"\n [class]=\"passThrough().hue?.class\"\n [style]=\"passThrough().hue?.style\"\n (pointerdown)=\"onHuePointer($event)\"\n (pointermove)=\"onHuePointer($event)\"\n (keydown)=\"onHueKeydown($event)\"\n >\n <span class=\"tx-color-picker__handle\" [style.left.%]=\"(hsb().h / 360) * 100\" [style.background-color]=\"hueColor()\"></span>\n </div>\n @if (showInput() || showClear()) {\n <div class=\"tx-color-picker__row\">\n @if (showInput()) {\n <span class=\"tx-color-picker__preview\" aria-hidden=\"true\" [style.background-color]=\"hasColor() ? hex() : null\"></span>\n <input\n type=\"text\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n maxlength=\"7\"\n class=\"tx-color-picker__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [attr.aria-label]=\"translations().colorHex\"\n [value]=\"draft() ?? (hasColor() ? hex() : '')\"\n [readOnly]=\"readonly()\"\n [disabled]=\"disabled()\"\n (input)=\"onHexInput($event)\"\n (blur)=\"onHexBlur()\"\n />\n }\n @if (showClear() && hasColor() && editable()) {\n <button\n type=\"button\"\n class=\"tx-color-picker__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n </div>\n }\n @if (presets().length) {\n <div class=\"tx-color-picker__presets\" role=\"group\" [attr.aria-label]=\"translations().colorPresets\" [class]=\"passThrough().presets?.class\" [style]=\"passThrough().presets?.style\">\n @for (color of presets(); track color) {\n <button\n type=\"button\"\n class=\"tx-color-picker__preset\"\n [style.background-color]=\"color\"\n [attr.aria-label]=\"color\"\n [attr.aria-pressed]=\"isPreset(color)\"\n [disabled]=\"!editable()\"\n [class]=\"passThrough().preset?.class\"\n [style]=\"passThrough().preset?.style\"\n (click)=\"pickPreset(color)\"\n ></button>\n }\n </div>\n }\n </div>\n</ng-template>\n",
656
- styles: [":host{display:inline-block;vertical-align:top}.tx-color-picker__trigger{display:inline-flex;align-items:center;cursor:pointer}.tx-color-picker__swatch{display:inline-block;flex:none}.tx-color-picker__panel{display:flex;flex-direction:column;box-sizing:border-box}.tx-color-picker__area,.tx-color-picker__hue{position:relative;touch-action:none;cursor:crosshair}.tx-color-picker__hue{cursor:ew-resize}.tx-color-picker__handle{position:absolute;pointer-events:none}.tx-color-picker__row,.tx-color-picker__presets{display:flex;flex-wrap:wrap;align-items:center}.tx-color-picker__input{flex:1;min-width:0}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-color-picker__trigger{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);gap:var(--tx-color-picker-gap)}:host([data-styled]):not(.tx-color-picker--disabled,.tx-color-picker--readonly) .tx-color-picker__trigger:hover{border-color:var(--tx-form-field-hover-border-color)}:host([data-styled]) .tx-color-picker__trigger:focus-visible,:host([data-styled]).tx-color-picker--open .tx-color-picker__trigger{border-color:var(--tx-form-field-focus-border-color);box-shadow:var(--tx-form-field-focus-ring-shadow)}:host([data-styled]).tx-color-picker--invalid .tx-color-picker__trigger{border-color:var(--tx-form-field-invalid-border-color)}:host([data-styled]).tx-color-picker--readonly .tx-color-picker__trigger{background:var(--tx-form-field-readonly-background);cursor:default}:host([data-styled]).tx-color-picker--disabled .tx-color-picker__trigger{background:var(--tx-form-field-disabled-background);box-shadow:none;color:var(--tx-form-field-disabled-color);cursor:not-allowed}:host([data-styled])[data-size=small] .tx-color-picker__trigger{padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height)}:host([data-styled])[data-size=large] .tx-color-picker__trigger{padding-top:var(--tx-field-padding-top, var(--tx-form-field-lg-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-lg-padding-y));padding-inline:calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-lg-font-size);line-height:var(--tx-form-field-lg-line-height)}:host([data-styled]) .tx-color-picker__swatch{width:var(--tx-color-picker-swatch-size);height:var(--tx-color-picker-swatch-size);margin-block:calc((1lh - var(--tx-color-picker-swatch-size)) / 2);border-radius:var(--tx-color-picker-swatch-border-radius);box-shadow:var(--tx-color-picker-swatch-ring)}:host([data-styled]) .tx-color-picker__swatch--empty{background:linear-gradient(135deg,transparent 45%,var(--tx-danger-base) 45% 55%,transparent 55%)}:host([data-styled]) .tx-color-picker__value{font-variant-numeric:tabular-nums}:host([data-styled]) .tx-color-picker__value--empty{color:var(--tx-form-field-placeholder-color)}.tx-color-picker__panel[data-styled]{gap:var(--tx-color-picker-panel-gap);width:var(--tx-color-picker-panel-width);padding:var(--tx-color-picker-panel-padding);border:1px solid var(--tx-color-picker-panel-border-color);border-radius:var(--tx-color-picker-panel-border-radius);background:var(--tx-color-picker-panel-background);box-shadow:var(--tx-color-picker-panel-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size)}.tx-color-picker__panel[data-styled] .tx-color-picker__area{height:var(--tx-color-picker-area-height);border-radius:var(--tx-color-picker-area-border-radius);background-image:var(--tx-color-picker-area-brightness-gradient),var(--tx-color-picker-area-saturation-gradient);outline:none}.tx-color-picker__panel[data-styled] .tx-color-picker__hue{height:var(--tx-color-picker-hue-height);border-radius:var(--tx-color-picker-hue-border-radius);background:var(--tx-color-picker-hue-gradient);outline:none}.tx-color-picker__panel[data-styled] .tx-color-picker__handle{box-sizing:border-box;width:var(--tx-color-picker-handle-size);height:var(--tx-color-picker-handle-size);border:2px solid var(--tx-color-picker-handle-border-color);border-radius:50%;box-shadow:var(--tx-color-picker-handle-ring);transform:translate(-50%,-50%)}.tx-color-picker__panel[data-styled] .tx-color-picker__hue .tx-color-picker__handle{top:50%}.tx-color-picker__panel[data-styled] .tx-color-picker__area:focus-visible .tx-color-picker__handle,.tx-color-picker__panel[data-styled] .tx-color-picker__hue:focus-visible .tx-color-picker__handle{box-shadow:var(--tx-color-picker-handle-focus-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__row{gap:var(--tx-color-picker-gap)}.tx-color-picker__panel[data-styled] .tx-color-picker__preview{width:var(--tx-color-picker-swatch-size);height:var(--tx-color-picker-swatch-size);border-radius:var(--tx-color-picker-swatch-border-radius);box-shadow:var(--tx-color-picker-swatch-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__input{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height);font-family:var(--tx-font-family-mono, monospace);text-transform:lowercase}.tx-color-picker__panel[data-styled] .tx-color-picker__input:focus{border-color:var(--tx-form-field-focus-border-color);box-shadow:var(--tx-form-field-focus-ring-shadow)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-color-picker__panel[data-styled] .tx-color-picker__presets{gap:var(--tx-color-picker-preset-gap)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset{transition:box-shadow var(--tx-motion-duration) var(--tx-motion-easing),transform var(--tx-motion-duration) var(--tx-motion-easing);width:var(--tx-color-picker-preset-size);height:var(--tx-color-picker-preset-size);padding:0;border:none;border-radius:var(--tx-color-picker-preset-border-radius);box-shadow:var(--tx-color-picker-swatch-ring);cursor:pointer}.tx-color-picker__panel[data-styled] .tx-color-picker__preset[aria-pressed=true]{box-shadow:var(--tx-color-picker-preset-selected-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:enabled:hover{transform:scale(1.1)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:disabled{cursor:not-allowed;opacity:.6}@media(prefers-reduced-motion:reduce){.tx-color-picker__panel[data-styled] .tx-color-picker__preset:enabled:hover{transform:none}}\n"]
656
+ styles: [":host{display:inline-block;vertical-align:top}.tx-color-picker__trigger{display:inline-flex;align-items:center;cursor:pointer}.tx-color-picker__swatch{display:inline-block;flex:none}.tx-color-picker__panel{display:flex;flex-direction:column;box-sizing:border-box}.tx-color-picker__area,.tx-color-picker__hue{position:relative;touch-action:none;cursor:crosshair}.tx-color-picker__hue{cursor:ew-resize}.tx-color-picker__handle{position:absolute;pointer-events:none}.tx-color-picker__row,.tx-color-picker__presets{display:flex;flex-wrap:wrap;align-items:center}.tx-color-picker__input{flex:1;min-width:0}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-color-picker__trigger{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background-color:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);gap:var(--tx-color-picker-gap)}:host([data-styled]):not(.tx-color-picker--disabled,.tx-color-picker--readonly) .tx-color-picker__trigger:hover{border-color:var(--tx-form-field-hover-border-color)}:host([data-styled]) .tx-color-picker__trigger:focus-visible,:host([data-styled]).tx-color-picker--open .tx-color-picker__trigger{border-color:var(--tx-form-field-focus-border-color);outline:var(--tx-form-field-focus-ring-width) var(--tx-form-field-focus-ring-style) var(--tx-form-field-focus-ring-color);outline-offset:var(--tx-form-field-focus-ring-offset);box-shadow:var(--tx-form-field-focus-ring-shadow)}:host([data-styled]).tx-color-picker--invalid .tx-color-picker__trigger{border-color:var(--tx-form-field-invalid-border-color)}:host([data-styled]).tx-color-picker--readonly .tx-color-picker__trigger{background-color:var(--tx-form-field-readonly-background);cursor:default}:host([data-styled]).tx-color-picker--disabled .tx-color-picker__trigger{background-color:var(--tx-form-field-disabled-background);box-shadow:none;color:var(--tx-form-field-disabled-color);cursor:not-allowed}:host([data-styled])[data-size=small] .tx-color-picker__trigger{padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height)}:host([data-styled])[data-size=large] .tx-color-picker__trigger{padding-top:var(--tx-field-padding-top, var(--tx-form-field-lg-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-lg-padding-y));padding-inline:calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-lg-font-size);line-height:var(--tx-form-field-lg-line-height)}:host([data-styled]) .tx-color-picker__swatch{width:var(--tx-color-picker-swatch-size);height:var(--tx-color-picker-swatch-size);margin-block:calc((1lh - var(--tx-color-picker-swatch-size)) / 2);border-radius:var(--tx-color-picker-swatch-border-radius);box-shadow:var(--tx-color-picker-swatch-ring)}:host([data-styled]) .tx-color-picker__swatch--empty{background:linear-gradient(135deg,transparent 45%,var(--tx-danger-base) 45% 55%,transparent 55%)}:host([data-styled]) .tx-color-picker__value{font-variant-numeric:tabular-nums}:host([data-styled]) .tx-color-picker__value--empty{color:var(--tx-form-field-placeholder-color)}.tx-color-picker__panel[data-styled]{gap:var(--tx-color-picker-panel-gap);width:var(--tx-color-picker-panel-width);padding:var(--tx-color-picker-panel-padding);border:1px solid var(--tx-color-picker-panel-border-color);border-radius:var(--tx-color-picker-panel-border-radius);background:var(--tx-color-picker-panel-background);box-shadow:var(--tx-color-picker-panel-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size)}.tx-color-picker__panel[data-styled] .tx-color-picker__area{height:var(--tx-color-picker-area-height);border-radius:var(--tx-color-picker-area-border-radius);background-image:var(--tx-color-picker-area-brightness-gradient),var(--tx-color-picker-area-saturation-gradient);outline:none}.tx-color-picker__panel[data-styled] .tx-color-picker__hue{height:var(--tx-color-picker-hue-height);border-radius:var(--tx-color-picker-hue-border-radius);background:var(--tx-color-picker-hue-gradient);outline:none}.tx-color-picker__panel[data-styled] .tx-color-picker__handle{box-sizing:border-box;width:var(--tx-color-picker-handle-size);height:var(--tx-color-picker-handle-size);border:2px solid var(--tx-color-picker-handle-border-color);border-radius:50%;box-shadow:var(--tx-color-picker-handle-ring);transform:translate(-50%,-50%)}.tx-color-picker__panel[data-styled] .tx-color-picker__hue .tx-color-picker__handle{top:50%}.tx-color-picker__panel[data-styled] .tx-color-picker__area:focus-visible .tx-color-picker__handle,.tx-color-picker__panel[data-styled] .tx-color-picker__hue:focus-visible .tx-color-picker__handle{box-shadow:var(--tx-color-picker-handle-focus-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__row{gap:var(--tx-color-picker-gap)}.tx-color-picker__panel[data-styled] .tx-color-picker__preview{width:var(--tx-color-picker-swatch-size);height:var(--tx-color-picker-swatch-size);border-radius:var(--tx-color-picker-swatch-border-radius);box-shadow:var(--tx-color-picker-swatch-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__input{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background-color:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height);font-family:var(--tx-font-family-mono, monospace);text-transform:lowercase}.tx-color-picker__panel[data-styled] .tx-color-picker__input:focus{border-color:var(--tx-form-field-focus-border-color);outline:var(--tx-form-field-focus-ring-width) var(--tx-form-field-focus-ring-style) var(--tx-form-field-focus-ring-color);outline-offset:var(--tx-form-field-focus-ring-offset);box-shadow:var(--tx-form-field-focus-ring-shadow)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}.tx-color-picker__panel[data-styled] .tx-color-picker__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-color-picker__panel[data-styled] .tx-color-picker__presets{gap:var(--tx-color-picker-preset-gap)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset{transition:box-shadow var(--tx-motion-duration) var(--tx-motion-easing),transform var(--tx-motion-duration) var(--tx-motion-easing);width:var(--tx-color-picker-preset-size);height:var(--tx-color-picker-preset-size);padding:0;border:none;border-radius:var(--tx-color-picker-preset-border-radius);box-shadow:var(--tx-color-picker-swatch-ring);cursor:pointer}.tx-color-picker__panel[data-styled] .tx-color-picker__preset[aria-pressed=true]{box-shadow:var(--tx-color-picker-preset-selected-ring)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:enabled:hover{transform:scale(1.1)}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}.tx-color-picker__panel[data-styled] .tx-color-picker__preset:disabled{cursor:not-allowed;opacity:.6}@media(prefers-reduced-motion:reduce){.tx-color-picker__panel[data-styled] .tx-color-picker__preset:enabled:hover{transform:none}}\n"]
657
657
  }]
658
658
  }],
659
659
  propDecorators: {