@tectra-ng/ui 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/README.md +1 -1
  2. package/amount/README.md +2 -2
  3. package/analog-clock/README.md +3 -2
  4. package/autocomplete/README.md +1 -1
  5. package/avatar/README.md +1 -1
  6. package/breadcrumb/README.md +1 -1
  7. package/button-group/README.md +34 -2
  8. package/carousel/README.md +7 -0
  9. package/chips-input/README.md +10 -0
  10. package/color-swatches/README.md +53 -0
  11. package/data-view/README.md +11 -0
  12. package/fesm2022/tectra-ng-ui-amount.mjs +11 -9
  13. package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -1
  14. package/fesm2022/tectra-ng-ui-analog-clock.mjs +12 -6
  15. package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -1
  16. package/fesm2022/tectra-ng-ui-autocomplete.mjs +17 -6
  17. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
  18. package/fesm2022/tectra-ng-ui-avatar.mjs +11 -4
  19. package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -1
  20. package/fesm2022/tectra-ng-ui-breadcrumb.mjs +5 -5
  21. package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -1
  22. package/fesm2022/tectra-ng-ui-button-group.mjs +139 -6
  23. package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -1
  24. package/fesm2022/tectra-ng-ui-card.mjs +4 -2
  25. package/fesm2022/tectra-ng-ui-card.mjs.map +1 -1
  26. package/fesm2022/tectra-ng-ui-carousel.mjs +21 -2
  27. package/fesm2022/tectra-ng-ui-carousel.mjs.map +1 -1
  28. package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
  29. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
  30. package/fesm2022/tectra-ng-ui-checkbox.mjs +7 -4
  31. package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -1
  32. package/fesm2022/tectra-ng-ui-chips-input.mjs +41 -8
  33. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  34. package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
  35. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
  36. package/fesm2022/tectra-ng-ui-color-swatches.mjs +378 -0
  37. package/fesm2022/tectra-ng-ui-color-swatches.mjs.map +1 -0
  38. package/fesm2022/tectra-ng-ui-country-select.mjs +6 -4
  39. package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -1
  40. package/fesm2022/tectra-ng-ui-data-view.mjs +61 -10
  41. package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -1
  42. package/fesm2022/tectra-ng-ui-datepicker.mjs +14 -2
  43. package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
  44. package/fesm2022/tectra-ng-ui-dialog.mjs +7 -2
  45. package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -1
  46. package/fesm2022/tectra-ng-ui-export.mjs +19 -20
  47. package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
  48. package/fesm2022/tectra-ng-ui-file-upload.mjs +44 -30
  49. package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -1
  50. package/fesm2022/tectra-ng-ui-galleria.mjs +63 -6
  51. package/fesm2022/tectra-ng-ui-galleria.mjs.map +1 -1
  52. package/fesm2022/tectra-ng-ui-image.mjs +6 -2
  53. package/fesm2022/tectra-ng-ui-image.mjs.map +1 -1
  54. package/fesm2022/tectra-ng-ui-input-otp.mjs +6 -2
  55. package/fesm2022/tectra-ng-ui-input-otp.mjs.map +1 -1
  56. package/fesm2022/tectra-ng-ui-input.mjs +2 -2
  57. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
  58. package/fesm2022/tectra-ng-ui-knob.mjs +15 -4
  59. package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -1
  60. package/fesm2022/tectra-ng-ui-list-input.mjs +2 -2
  61. package/fesm2022/tectra-ng-ui-list-input.mjs.map +1 -1
  62. package/fesm2022/tectra-ng-ui-menu.mjs +110 -10
  63. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
  64. package/fesm2022/tectra-ng-ui-message.mjs +62 -19
  65. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
  66. package/fesm2022/tectra-ng-ui-multiselect.mjs +14 -6
  67. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
  68. package/fesm2022/tectra-ng-ui-paginator.mjs +11 -22
  69. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
  70. package/fesm2022/tectra-ng-ui-panel-menu.mjs +32 -8
  71. package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
  72. package/fesm2022/tectra-ng-ui-panel.mjs +4 -2
  73. package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -1
  74. package/fesm2022/tectra-ng-ui-password.mjs +9 -0
  75. package/fesm2022/tectra-ng-ui-password.mjs.map +1 -1
  76. package/fesm2022/tectra-ng-ui-pill.mjs +3 -2
  77. package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -1
  78. package/fesm2022/tectra-ng-ui-popover.mjs +16 -9
  79. package/fesm2022/tectra-ng-ui-popover.mjs.map +1 -1
  80. package/fesm2022/tectra-ng-ui-progress-bar.mjs +3 -0
  81. package/fesm2022/tectra-ng-ui-progress-bar.mjs.map +1 -1
  82. package/fesm2022/tectra-ng-ui-radio-button.mjs +28 -8
  83. package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -1
  84. package/fesm2022/tectra-ng-ui-rating.mjs +6 -0
  85. package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -1
  86. package/fesm2022/tectra-ng-ui-scroll-panel.mjs +4 -4
  87. package/fesm2022/tectra-ng-ui-scroll-panel.mjs.map +1 -1
  88. package/fesm2022/tectra-ng-ui-select-button.mjs +748 -0
  89. package/fesm2022/tectra-ng-ui-select-button.mjs.map +1 -0
  90. package/fesm2022/tectra-ng-ui-select.mjs +193 -10
  91. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
  92. package/fesm2022/tectra-ng-ui-speed-dial.mjs +91 -60
  93. package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -1
  94. package/fesm2022/tectra-ng-ui-split-button.mjs +22 -8
  95. package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -1
  96. package/fesm2022/tectra-ng-ui-stat-tiles.mjs +8 -5
  97. package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -1
  98. package/fesm2022/tectra-ng-ui-stepper.mjs +72 -29
  99. package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -1
  100. package/fesm2022/tectra-ng-ui-table.mjs +323 -190
  101. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  102. package/fesm2022/tectra-ng-ui-tabs.mjs +10 -7
  103. package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -1
  104. package/fesm2022/tectra-ng-ui-timeline.mjs +87 -10
  105. package/fesm2022/tectra-ng-ui-timeline.mjs.map +1 -1
  106. package/fesm2022/tectra-ng-ui-toast.mjs +24 -7
  107. package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -1
  108. package/fesm2022/tectra-ng-ui-toggle-button.mjs +2 -2
  109. package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -1
  110. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +7 -4
  111. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -1
  112. package/fesm2022/tectra-ng-ui-tooltip.mjs +5 -4
  113. package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -1
  114. package/fesm2022/tectra-ng-ui-tree-select.mjs +31 -9
  115. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  116. package/fesm2022/tectra-ng-ui-tree-table.mjs +7 -5
  117. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
  118. package/fesm2022/tectra-ng-ui-tree.mjs +47 -14
  119. package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -1
  120. package/fesm2022/tectra-ng-ui-truncate-text.mjs +2 -2
  121. package/fesm2022/tectra-ng-ui-truncate-text.mjs.map +1 -1
  122. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +45 -4
  123. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -1
  124. package/fesm2022/tectra-ng-ui.mjs +1 -1
  125. package/field/README.md +2 -2
  126. package/file-upload/README.md +2 -1
  127. package/galleria/README.md +9 -0
  128. package/input-otp/README.md +1 -1
  129. package/knob/README.md +1 -1
  130. package/menu/README.md +10 -2
  131. package/message/README.md +6 -5
  132. package/multiselect/README.md +1 -1
  133. package/package.json +12 -4
  134. package/paginator/README.md +1 -1
  135. package/panel-menu/README.md +1 -1
  136. package/pill/README.md +1 -1
  137. package/popover/README.md +2 -2
  138. package/select/README.md +9 -0
  139. package/select-button/README.md +70 -0
  140. package/speed-dial/README.md +2 -1
  141. package/split-button/README.md +1 -1
  142. package/stat-tiles/README.md +3 -3
  143. package/stepper/README.md +3 -2
  144. package/table/README.md +23 -7
  145. package/tabs/README.md +2 -2
  146. package/timeline/README.md +10 -2
  147. package/tree/README.md +7 -0
  148. package/tree-select/README.md +2 -2
  149. package/tree-table/README.md +1 -1
  150. package/truncate-text/README.md +1 -1
  151. package/types/tectra-ng-ui-amount.d.ts +6 -3
  152. package/types/tectra-ng-ui-amount.d.ts.map +1 -1
  153. package/types/tectra-ng-ui-analog-clock.d.ts +9 -4
  154. package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -1
  155. package/types/tectra-ng-ui-autocomplete.d.ts +2 -1
  156. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
  157. package/types/tectra-ng-ui-avatar.d.ts +4 -2
  158. package/types/tectra-ng-ui-avatar.d.ts.map +1 -1
  159. package/types/tectra-ng-ui-breadcrumb.d.ts +3 -3
  160. package/types/tectra-ng-ui-button-group.d.ts +58 -5
  161. package/types/tectra-ng-ui-button-group.d.ts.map +1 -1
  162. package/types/tectra-ng-ui-card.d.ts.map +1 -1
  163. package/types/tectra-ng-ui-carousel.d.ts +14 -5
  164. package/types/tectra-ng-ui-carousel.d.ts.map +1 -1
  165. package/types/tectra-ng-ui-checkbox.d.ts +1 -0
  166. package/types/tectra-ng-ui-checkbox.d.ts.map +1 -1
  167. package/types/tectra-ng-ui-chips-input.d.ts +15 -1
  168. package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
  169. package/types/tectra-ng-ui-color-swatches.d.ts +141 -0
  170. package/types/tectra-ng-ui-color-swatches.d.ts.map +1 -0
  171. package/types/tectra-ng-ui-data-view.d.ts +31 -12
  172. package/types/tectra-ng-ui-data-view.d.ts.map +1 -1
  173. package/types/tectra-ng-ui-datepicker.d.ts +6 -0
  174. package/types/tectra-ng-ui-datepicker.d.ts.map +1 -1
  175. package/types/tectra-ng-ui-dialog.d.ts +1 -0
  176. package/types/tectra-ng-ui-dialog.d.ts.map +1 -1
  177. package/types/tectra-ng-ui-field.d.ts +2 -2
  178. package/types/tectra-ng-ui-file-upload.d.ts +10 -7
  179. package/types/tectra-ng-ui-file-upload.d.ts.map +1 -1
  180. package/types/tectra-ng-ui-galleria.d.ts +42 -15
  181. package/types/tectra-ng-ui-galleria.d.ts.map +1 -1
  182. package/types/tectra-ng-ui-image.d.ts.map +1 -1
  183. package/types/tectra-ng-ui-input-otp.d.ts +1 -1
  184. package/types/tectra-ng-ui-input-otp.d.ts.map +1 -1
  185. package/types/tectra-ng-ui-knob.d.ts +3 -1
  186. package/types/tectra-ng-ui-knob.d.ts.map +1 -1
  187. package/types/tectra-ng-ui-menu.d.ts +35 -12
  188. package/types/tectra-ng-ui-menu.d.ts.map +1 -1
  189. package/types/tectra-ng-ui-message.d.ts +17 -8
  190. package/types/tectra-ng-ui-message.d.ts.map +1 -1
  191. package/types/tectra-ng-ui-multiselect.d.ts +2 -2
  192. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
  193. package/types/tectra-ng-ui-paginator.d.ts +4 -21
  194. package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
  195. package/types/tectra-ng-ui-panel-menu.d.ts +9 -9
  196. package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
  197. package/types/tectra-ng-ui-panel.d.ts.map +1 -1
  198. package/types/tectra-ng-ui-password.d.ts +3 -0
  199. package/types/tectra-ng-ui-password.d.ts.map +1 -1
  200. package/types/tectra-ng-ui-pill.d.ts +7 -3
  201. package/types/tectra-ng-ui-pill.d.ts.map +1 -1
  202. package/types/tectra-ng-ui-popover.d.ts +4 -2
  203. package/types/tectra-ng-ui-popover.d.ts.map +1 -1
  204. package/types/tectra-ng-ui-progress-bar.d.ts +1 -0
  205. package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -1
  206. package/types/tectra-ng-ui-radio-button.d.ts +3 -1
  207. package/types/tectra-ng-ui-radio-button.d.ts.map +1 -1
  208. package/types/tectra-ng-ui-rating.d.ts +2 -0
  209. package/types/tectra-ng-ui-rating.d.ts.map +1 -1
  210. package/types/tectra-ng-ui-select-button.d.ts +256 -0
  211. package/types/tectra-ng-ui-select-button.d.ts.map +1 -0
  212. package/types/tectra-ng-ui-select.d.ts +85 -20
  213. package/types/tectra-ng-ui-select.d.ts.map +1 -1
  214. package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -1
  215. package/types/tectra-ng-ui-split-button.d.ts.map +1 -1
  216. package/types/tectra-ng-ui-stat-tiles.d.ts +4 -3
  217. package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -1
  218. package/types/tectra-ng-ui-stepper.d.ts +25 -10
  219. package/types/tectra-ng-ui-stepper.d.ts.map +1 -1
  220. package/types/tectra-ng-ui-table.d.ts +147 -75
  221. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  222. package/types/tectra-ng-ui-tabs.d.ts +7 -5
  223. package/types/tectra-ng-ui-tabs.d.ts.map +1 -1
  224. package/types/tectra-ng-ui-timeline.d.ts +46 -9
  225. package/types/tectra-ng-ui-timeline.d.ts.map +1 -1
  226. package/types/tectra-ng-ui-toast.d.ts +3 -0
  227. package/types/tectra-ng-ui-toast.d.ts.map +1 -1
  228. package/types/tectra-ng-ui-toggle-switch.d.ts +1 -0
  229. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
  230. package/types/tectra-ng-ui-tooltip.d.ts.map +1 -1
  231. package/types/tectra-ng-ui-tree-select.d.ts +4 -2
  232. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
  233. package/types/tectra-ng-ui-tree.d.ts +18 -7
  234. package/types/tectra-ng-ui-tree.d.ts.map +1 -1
  235. package/types/tectra-ng-ui-truncate-text.d.ts +1 -1
  236. package/types/tectra-ng-ui-virtual-scroller.d.ts +29 -10
  237. package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -1
  238. package/types/tectra-ng-ui.d.ts +1 -1
  239. package/virtual-scroller/README.md +8 -0
@@ -0,0 +1,378 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, booleanAttribute, computed, forwardRef, input, output, viewChildren } from "@angular/core";
3
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
4
+ import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
5
+ import { TxFormControlBase, injectFieldInvalid } from "@tectra-ng/core/forms";
6
+ import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
7
+ import { TxIcon, provideTxIconDefaults, txIconCheck } from "@tectra-ng/icons";
8
+ import { colorSwatchesTokens, iconTokens, toStyleObject } from "@tectra-ng/themes";
9
+ const COLOR_SWATCHES_THEME = {
10
+ colorSwatches: colorSwatchesTokens,
11
+ icon: iconTokens
12
+ };
13
+ const COLOR_SWATCHES_ICON_DEFAULTS = { check: txIconCheck };
14
+ const STEPS = {
15
+ ArrowRight: 1,
16
+ ArrowDown: 1,
17
+ ArrowLeft: -1,
18
+ ArrowUp: -1
19
+ };
20
+ var TxColorSwatches = class TxColorSwatches extends TxFormControlBase {
21
+ colorSwatchesTheme = injectTokens(COLOR_SWATCHES_THEME);
22
+ options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
23
+ columns = input(void 0, {
24
+ ...ngDevMode ? { debugName: "columns" } : /* istanbul ignore next */ {},
25
+ transform: optionalNumber
26
+ });
27
+ size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
28
+ invalid = input(void 0, {
29
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
30
+ transform: optionalBoolean
31
+ });
32
+ disabledInput = input(false, {
33
+ ...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
34
+ alias: "disabled",
35
+ transform: booleanAttribute
36
+ });
37
+ readonly = input(false, {
38
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
39
+ transform: booleanAttribute
40
+ });
41
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
42
+ ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
43
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
44
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
45
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
46
+ unstyled = input(void 0, {
47
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
48
+ transform: optionalBoolean
49
+ });
50
+ changed = output();
51
+ swatches = viewChildren("swatch", ...ngDevMode ? [{ debugName: "swatches" }] : /* istanbul ignore next */ []);
52
+ isUnstyled = injectUnstyled(this.unstyled);
53
+ isInvalid = injectFieldInvalid(this.invalid);
54
+ passThrough = injectPassThrough("colorSwatches", this, this.pt, this.ptOptions);
55
+ isDisabled = computed(() => this.disabled() || this.disabledInput(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
56
+ selectedIndex = computed(() => this.options().findIndex((option) => Object.is(option.value, this.value())), ...ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []);
57
+ focusIndex = computed(() => {
58
+ const selected = this.selectedIndex();
59
+ return selected >= 0 && !this.options()[selected].disabled ? selected : this.options().findIndex((option) => !option.disabled);
60
+ }, ...ngDevMode ? [{ debugName: "focusIndex" }] : /* istanbul ignore next */ []);
61
+ groupStyle = computed(() => {
62
+ const columns = this.columns();
63
+ return {
64
+ ...columns ? { "grid-template-columns": `repeat(${columns}, max-content)` } : {},
65
+ ...this.passThrough().group?.style
66
+ };
67
+ }, ...ngDevMode ? [{ debugName: "groupStyle" }] : /* istanbul ignore next */ []);
68
+ hostStyle = computed(() => ({
69
+ ...toStyleObject(this.dt(), "--tx-color-swatches"),
70
+ ...this.passThrough().root?.style
71
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
72
+ focus() {
73
+ this.swatches()[this.focusIndex()]?.nativeElement.focus();
74
+ }
75
+ select(index, event) {
76
+ const option = this.options()[index];
77
+ if (!option || option.disabled || this.isDisabled() || this.readonly() || index === this.selectedIndex()) return;
78
+ this.updateValue(option.value);
79
+ this.changed.emit({
80
+ value: option.value,
81
+ originalEvent: event
82
+ });
83
+ }
84
+ onKeydown(event, index) {
85
+ const next = this.nextIndex(event.key, index);
86
+ if (next < 0) return;
87
+ event.preventDefault();
88
+ this.swatches()[next].nativeElement.focus();
89
+ this.select(next, event);
90
+ }
91
+ onBlur() {
92
+ this.markTouched();
93
+ }
94
+ nextIndex(key, index) {
95
+ const enabled = this.options().map((option, position) => option.disabled ? -1 : position).filter((position) => position >= 0);
96
+ if (key === "Home" || key === "End") return key === "Home" ? enabled[0] : enabled[enabled.length - 1];
97
+ if (!(key in STEPS)) return -1;
98
+ return enabled[(enabled.indexOf(index) + STEPS[key] + enabled.length) % enabled.length];
99
+ }
100
+ static ɵfac = i0.ɵɵngDeclareFactory({
101
+ minVersion: "12.0.0",
102
+ version: "22.2.5",
103
+ ngImport: i0,
104
+ type: TxColorSwatches,
105
+ deps: null,
106
+ target: i0.ɵɵFactoryTarget.Component
107
+ });
108
+ static ɵcmp = i0.ɵɵngDeclareComponent({
109
+ minVersion: "17.0.0",
110
+ version: "22.2.5",
111
+ type: TxColorSwatches,
112
+ isStandalone: true,
113
+ selector: "tx-color-swatches",
114
+ inputs: {
115
+ options: {
116
+ classPropertyName: "options",
117
+ publicName: "options",
118
+ isSignal: true,
119
+ isRequired: false,
120
+ transformFunction: null
121
+ },
122
+ columns: {
123
+ classPropertyName: "columns",
124
+ publicName: "columns",
125
+ isSignal: true,
126
+ isRequired: false,
127
+ transformFunction: null
128
+ },
129
+ size: {
130
+ classPropertyName: "size",
131
+ publicName: "size",
132
+ isSignal: true,
133
+ isRequired: false,
134
+ transformFunction: null
135
+ },
136
+ invalid: {
137
+ classPropertyName: "invalid",
138
+ publicName: "invalid",
139
+ isSignal: true,
140
+ isRequired: false,
141
+ transformFunction: null
142
+ },
143
+ disabledInput: {
144
+ classPropertyName: "disabledInput",
145
+ publicName: "disabled",
146
+ isSignal: true,
147
+ isRequired: false,
148
+ transformFunction: null
149
+ },
150
+ readonly: {
151
+ classPropertyName: "readonly",
152
+ publicName: "readonly",
153
+ isSignal: true,
154
+ isRequired: false,
155
+ transformFunction: null
156
+ },
157
+ ariaLabel: {
158
+ classPropertyName: "ariaLabel",
159
+ publicName: "ariaLabel",
160
+ isSignal: true,
161
+ isRequired: false,
162
+ transformFunction: null
163
+ },
164
+ ariaLabelledBy: {
165
+ classPropertyName: "ariaLabelledBy",
166
+ publicName: "ariaLabelledBy",
167
+ isSignal: true,
168
+ isRequired: false,
169
+ transformFunction: null
170
+ },
171
+ dt: {
172
+ classPropertyName: "dt",
173
+ publicName: "dt",
174
+ isSignal: true,
175
+ isRequired: false,
176
+ transformFunction: null
177
+ },
178
+ pt: {
179
+ classPropertyName: "pt",
180
+ publicName: "pt",
181
+ isSignal: true,
182
+ isRequired: false,
183
+ transformFunction: null
184
+ },
185
+ ptOptions: {
186
+ classPropertyName: "ptOptions",
187
+ publicName: "ptOptions",
188
+ isSignal: true,
189
+ isRequired: false,
190
+ transformFunction: null
191
+ },
192
+ unstyled: {
193
+ classPropertyName: "unstyled",
194
+ publicName: "unstyled",
195
+ isSignal: true,
196
+ isRequired: false,
197
+ transformFunction: null
198
+ }
199
+ },
200
+ outputs: { changed: "changed" },
201
+ host: {
202
+ properties: {
203
+ "class": "passThrough().root?.class",
204
+ "style": "hostStyle()",
205
+ "attr.data-styled": "!isUnstyled() || null",
206
+ "attr.data-size": "size()",
207
+ "class.tx-color-swatches--disabled": "isDisabled()",
208
+ "class.tx-color-swatches--readonly": "readonly()",
209
+ "class.tx-color-swatches--invalid": "isInvalid()"
210
+ },
211
+ classAttribute: "tx-color-swatches"
212
+ },
213
+ providers: [{
214
+ provide: NG_VALUE_ACCESSOR,
215
+ useExisting: forwardRef(() => TxColorSwatches),
216
+ multi: true
217
+ }],
218
+ viewQueries: [{
219
+ propertyName: "swatches",
220
+ predicate: ["swatch"],
221
+ descendants: true,
222
+ isSignal: true
223
+ }],
224
+ usesInheritance: true,
225
+ ngImport: i0,
226
+ template: "<div\n class=\"tx-color-swatches__group\"\n role=\"radiogroup\"\n [class]=\"passThrough().group?.class\"\n [style]=\"groupStyle()\"\n [attr.data-columns]=\"columns() ? true : null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n>\n @for (option of options(); track option.value; let index = $index) {\n <button\n #swatch\n type=\"button\"\n role=\"radio\"\n class=\"tx-color-swatches__swatch\"\n [class.tx-color-swatches__swatch--selected]=\"index === selectedIndex()\"\n [class]=\"passThrough().swatch?.class\"\n [style]=\"passThrough().swatch?.style\"\n [style.--_color]=\"option.color\"\n [attr.aria-checked]=\"index === selectedIndex()\"\n [attr.aria-label]=\"option.label\"\n [attr.title]=\"option.label\"\n [attr.tabindex]=\"index === focusIndex() ? 0 : -1\"\n [disabled]=\"isDisabled() || option.disabled\"\n (click)=\"select(index, $event)\"\n (keydown)=\"onKeydown($event, index)\"\n (blur)=\"onBlur()\"\n >\n <tx-icon class=\"tx-color-swatches__check\" name=\"check\" aria-hidden=\"true\" [class]=\"passThrough().check?.class\" [style]=\"passThrough().check?.style\" />\n </button>\n }\n</div>\n",
227
+ styles: [":host{display:inline-block;vertical-align:middle}.tx-color-swatches__group{display:flex;flex-wrap:wrap;align-items:center}.tx-color-swatches__group[data-columns]{display:grid}.tx-color-swatches__swatch{position:relative;display:inline-flex;align-items:center;justify-content:center;margin:0;padding:0;border:none;background:var(--_color);font:inherit;cursor:pointer}.tx-color-swatches__swatch:disabled{cursor:default}:host([data-styled]){--_size: var(--tx-color-swatches-size);--_gap: var(--tx-color-swatches-gap);--_check: var(--tx-color-swatches-check-size)}:host([data-styled][data-size=small]){--_size: var(--tx-color-swatches-sm-size);--_gap: var(--tx-color-swatches-sm-gap);--_check: var(--tx-color-swatches-sm-check-size)}:host([data-styled][data-size=large]){--_size: var(--tx-color-swatches-lg-size);--_gap: var(--tx-color-swatches-lg-gap);--_check: var(--tx-color-swatches-lg-check-size)}:host([data-styled]) .tx-color-swatches__group{gap:var(--_gap)}:host([data-styled]) .tx-color-swatches__swatch{width:var(--_size);height:var(--_size);border-radius:var(--tx-color-swatches-border-radius);box-shadow:inset 0 0 0 1px var(--tx-color-swatches-ring-color);outline:var(--tx-color-swatches-selected-ring-width) solid transparent;outline-offset:var(--tx-color-swatches-selected-ring-offset);transition:transform var(--tx-color-swatches-transition-duration) var(--tx-color-swatches-transition-easing),outline-color var(--tx-color-swatches-transition-duration) var(--tx-color-swatches-transition-easing)}:host([data-styled]) .tx-color-swatches__swatch:hover:not(:disabled){transform:scale(var(--tx-color-swatches-hover-scale))}:host([data-styled]) .tx-color-swatches__swatch:focus-visible{outline:var(--tx-color-swatches-focus-ring-width) solid var(--tx-color-swatches-focus-ring-color);outline-offset:var(--tx-color-swatches-focus-ring-offset)}:host([data-styled]) .tx-color-swatches__swatch:disabled:not(.tx-color-swatches__swatch--selected){opacity:var(--tx-color-swatches-disabled-opacity)}:host([data-styled]) .tx-color-swatches__swatch--selected:not(:focus-visible){outline-color:var(--tx-color-swatches-selected-ring-color)}:host([data-styled].tx-color-swatches--readonly) .tx-color-swatches__swatch{cursor:default}:host([data-styled].tx-color-swatches--readonly) .tx-color-swatches__swatch:hover{transform:none}:host([data-styled].tx-color-swatches--disabled) .tx-color-swatches__group{opacity:var(--tx-color-swatches-disabled-opacity)}:host([data-styled].tx-color-swatches--disabled) .tx-color-swatches__swatch:disabled{opacity:1}:host([data-styled].tx-color-swatches--invalid) .tx-color-swatches__swatch{box-shadow:inset 0 0 0 1px var(--tx-color-swatches-invalid-ring-color)}:host([data-styled].tx-color-swatches--invalid) .tx-color-swatches__swatch--selected:not(:focus-visible){outline-color:var(--tx-color-swatches-invalid-ring-color)}:host([data-styled]) .tx-color-swatches__check{color:var(--tx-color-swatches-check-color);font-size:var(--_check);filter:drop-shadow(var(--tx-color-swatches-check-shadow));--tx-icon-stroke-width: var(--tx-color-swatches-check-stroke-width);opacity:0;transform:scale(.4);transition:opacity var(--tx-color-swatches-transition-duration) var(--tx-color-swatches-transition-easing),transform var(--tx-color-swatches-transition-duration) var(--tx-color-swatches-transition-easing)}:host([data-styled]) .tx-color-swatches__swatch--selected .tx-color-swatches__check{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-color-swatches__swatch,:host([data-styled]) .tx-color-swatches__check{transition:none}:host([data-styled]) .tx-color-swatches__swatch:hover:not(:disabled){transform:none}}\n"],
228
+ dependencies: [{
229
+ kind: "component",
230
+ type: TxIcon,
231
+ selector: "tx-icon",
232
+ inputs: ["name"]
233
+ }],
234
+ viewProviders: [provideTxIconDefaults(COLOR_SWATCHES_ICON_DEFAULTS)],
235
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
236
+ });
237
+ };
238
+ i0.ɵɵngDeclareClassMetadata({
239
+ minVersion: "12.0.0",
240
+ version: "22.2.5",
241
+ ngImport: i0,
242
+ type: TxColorSwatches,
243
+ decorators: [{
244
+ type: Component,
245
+ args: [{
246
+ selector: "tx-color-swatches",
247
+ imports: [TxIcon],
248
+ changeDetection: ChangeDetectionStrategy.OnPush,
249
+ providers: [{
250
+ provide: NG_VALUE_ACCESSOR,
251
+ useExisting: forwardRef(() => TxColorSwatches),
252
+ multi: true
253
+ }],
254
+ host: {
255
+ class: "tx-color-swatches",
256
+ "[class]": "passThrough().root?.class",
257
+ "[style]": "hostStyle()",
258
+ "[attr.data-styled]": "!isUnstyled() || null",
259
+ "[attr.data-size]": "size()",
260
+ "[class.tx-color-swatches--disabled]": "isDisabled()",
261
+ "[class.tx-color-swatches--readonly]": "readonly()",
262
+ "[class.tx-color-swatches--invalid]": "isInvalid()"
263
+ },
264
+ viewProviders: [provideTxIconDefaults(COLOR_SWATCHES_ICON_DEFAULTS)],
265
+ template: "<div\n class=\"tx-color-swatches__group\"\n role=\"radiogroup\"\n [class]=\"passThrough().group?.class\"\n [style]=\"groupStyle()\"\n [attr.data-columns]=\"columns() ? true : null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n>\n @for (option of options(); track option.value; let index = $index) {\n <button\n #swatch\n type=\"button\"\n role=\"radio\"\n class=\"tx-color-swatches__swatch\"\n [class.tx-color-swatches__swatch--selected]=\"index === selectedIndex()\"\n [class]=\"passThrough().swatch?.class\"\n [style]=\"passThrough().swatch?.style\"\n [style.--_color]=\"option.color\"\n [attr.aria-checked]=\"index === selectedIndex()\"\n [attr.aria-label]=\"option.label\"\n [attr.title]=\"option.label\"\n [attr.tabindex]=\"index === focusIndex() ? 0 : -1\"\n [disabled]=\"isDisabled() || option.disabled\"\n (click)=\"select(index, $event)\"\n (keydown)=\"onKeydown($event, index)\"\n (blur)=\"onBlur()\"\n >\n <tx-icon class=\"tx-color-swatches__check\" name=\"check\" aria-hidden=\"true\" [class]=\"passThrough().check?.class\" [style]=\"passThrough().check?.style\" />\n </button>\n }\n</div>\n",
266
+ styles: [":host{display:inline-block;vertical-align:middle}.tx-color-swatches__group{display:flex;flex-wrap:wrap;align-items:center}.tx-color-swatches__group[data-columns]{display:grid}.tx-color-swatches__swatch{position:relative;display:inline-flex;align-items:center;justify-content:center;margin:0;padding:0;border:none;background:var(--_color);font:inherit;cursor:pointer}.tx-color-swatches__swatch:disabled{cursor:default}:host([data-styled]){--_size: var(--tx-color-swatches-size);--_gap: var(--tx-color-swatches-gap);--_check: var(--tx-color-swatches-check-size)}:host([data-styled][data-size=small]){--_size: var(--tx-color-swatches-sm-size);--_gap: var(--tx-color-swatches-sm-gap);--_check: var(--tx-color-swatches-sm-check-size)}:host([data-styled][data-size=large]){--_size: var(--tx-color-swatches-lg-size);--_gap: var(--tx-color-swatches-lg-gap);--_check: var(--tx-color-swatches-lg-check-size)}:host([data-styled]) .tx-color-swatches__group{gap:var(--_gap)}:host([data-styled]) .tx-color-swatches__swatch{width:var(--_size);height:var(--_size);border-radius:var(--tx-color-swatches-border-radius);box-shadow:inset 0 0 0 1px var(--tx-color-swatches-ring-color);outline:var(--tx-color-swatches-selected-ring-width) solid transparent;outline-offset:var(--tx-color-swatches-selected-ring-offset);transition:transform var(--tx-color-swatches-transition-duration) var(--tx-color-swatches-transition-easing),outline-color var(--tx-color-swatches-transition-duration) var(--tx-color-swatches-transition-easing)}:host([data-styled]) .tx-color-swatches__swatch:hover:not(:disabled){transform:scale(var(--tx-color-swatches-hover-scale))}:host([data-styled]) .tx-color-swatches__swatch:focus-visible{outline:var(--tx-color-swatches-focus-ring-width) solid var(--tx-color-swatches-focus-ring-color);outline-offset:var(--tx-color-swatches-focus-ring-offset)}:host([data-styled]) .tx-color-swatches__swatch:disabled:not(.tx-color-swatches__swatch--selected){opacity:var(--tx-color-swatches-disabled-opacity)}:host([data-styled]) .tx-color-swatches__swatch--selected:not(:focus-visible){outline-color:var(--tx-color-swatches-selected-ring-color)}:host([data-styled].tx-color-swatches--readonly) .tx-color-swatches__swatch{cursor:default}:host([data-styled].tx-color-swatches--readonly) .tx-color-swatches__swatch:hover{transform:none}:host([data-styled].tx-color-swatches--disabled) .tx-color-swatches__group{opacity:var(--tx-color-swatches-disabled-opacity)}:host([data-styled].tx-color-swatches--disabled) .tx-color-swatches__swatch:disabled{opacity:1}:host([data-styled].tx-color-swatches--invalid) .tx-color-swatches__swatch{box-shadow:inset 0 0 0 1px var(--tx-color-swatches-invalid-ring-color)}:host([data-styled].tx-color-swatches--invalid) .tx-color-swatches__swatch--selected:not(:focus-visible){outline-color:var(--tx-color-swatches-invalid-ring-color)}:host([data-styled]) .tx-color-swatches__check{color:var(--tx-color-swatches-check-color);font-size:var(--_check);filter:drop-shadow(var(--tx-color-swatches-check-shadow));--tx-icon-stroke-width: var(--tx-color-swatches-check-stroke-width);opacity:0;transform:scale(.4);transition:opacity var(--tx-color-swatches-transition-duration) var(--tx-color-swatches-transition-easing),transform var(--tx-color-swatches-transition-duration) var(--tx-color-swatches-transition-easing)}:host([data-styled]) .tx-color-swatches__swatch--selected .tx-color-swatches__check{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-color-swatches__swatch,:host([data-styled]) .tx-color-swatches__check{transition:none}:host([data-styled]) .tx-color-swatches__swatch:hover:not(:disabled){transform:none}}\n"]
267
+ }]
268
+ }],
269
+ propDecorators: {
270
+ options: [{
271
+ type: i0.Input,
272
+ args: [{
273
+ isSignal: true,
274
+ alias: "options",
275
+ required: false
276
+ }]
277
+ }],
278
+ columns: [{
279
+ type: i0.Input,
280
+ args: [{
281
+ isSignal: true,
282
+ alias: "columns",
283
+ required: false
284
+ }]
285
+ }],
286
+ size: [{
287
+ type: i0.Input,
288
+ args: [{
289
+ isSignal: true,
290
+ alias: "size",
291
+ required: false
292
+ }]
293
+ }],
294
+ invalid: [{
295
+ type: i0.Input,
296
+ args: [{
297
+ isSignal: true,
298
+ alias: "invalid",
299
+ required: false
300
+ }]
301
+ }],
302
+ disabledInput: [{
303
+ type: i0.Input,
304
+ args: [{
305
+ isSignal: true,
306
+ alias: "disabled",
307
+ required: false
308
+ }]
309
+ }],
310
+ readonly: [{
311
+ type: i0.Input,
312
+ args: [{
313
+ isSignal: true,
314
+ alias: "readonly",
315
+ required: false
316
+ }]
317
+ }],
318
+ ariaLabel: [{
319
+ type: i0.Input,
320
+ args: [{
321
+ isSignal: true,
322
+ alias: "ariaLabel",
323
+ required: false
324
+ }]
325
+ }],
326
+ ariaLabelledBy: [{
327
+ type: i0.Input,
328
+ args: [{
329
+ isSignal: true,
330
+ alias: "ariaLabelledBy",
331
+ required: false
332
+ }]
333
+ }],
334
+ dt: [{
335
+ type: i0.Input,
336
+ args: [{
337
+ isSignal: true,
338
+ alias: "dt",
339
+ required: false
340
+ }]
341
+ }],
342
+ pt: [{
343
+ type: i0.Input,
344
+ args: [{
345
+ isSignal: true,
346
+ alias: "pt",
347
+ required: false
348
+ }]
349
+ }],
350
+ ptOptions: [{
351
+ type: i0.Input,
352
+ args: [{
353
+ isSignal: true,
354
+ alias: "ptOptions",
355
+ required: false
356
+ }]
357
+ }],
358
+ unstyled: [{
359
+ type: i0.Input,
360
+ args: [{
361
+ isSignal: true,
362
+ alias: "unstyled",
363
+ required: false
364
+ }]
365
+ }],
366
+ changed: [{
367
+ type: i0.Output,
368
+ args: ["changed"]
369
+ }],
370
+ swatches: [{
371
+ type: i0.ViewChildren,
372
+ args: ["swatch", { isSignal: true }]
373
+ }]
374
+ }
375
+ });
376
+ export { TxColorSwatches };
377
+
378
+ //# sourceMappingURL=tectra-ng-ui-color-swatches.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-ui-color-swatches.mjs","names":[],"sources":["../../../../packages/ui/color-swatches/src/color-swatches.theme.ts","../../../../packages/ui/color-swatches/src/color-swatches.icons.ts","../../../../packages/ui/color-swatches/src/color-swatches.component.ts","../../../../packages/ui/color-swatches/src/color-swatches.component.html"],"sourcesContent":["import { colorSwatchesTokens, iconTokens } from '@tectra-ng/themes';\n\nexport const COLOR_SWATCHES_THEME = {\n colorSwatches: colorSwatchesTokens,\n icon: iconTokens,\n};\n","import { TxIconSet, txIconCheck } from '@tectra-ng/icons';\n\nexport const COLOR_SWATCHES_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n};\n","import { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, computed, forwardRef, input, output, viewChildren } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraColorSwatchesTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxColorSwatchOption, TxColorSwatchesChangeEvent, TxColorSwatchesPart, TxColorSwatchesSize } from './color-swatches.types';\nimport { COLOR_SWATCHES_THEME } from './color-swatches.theme';\nimport { COLOR_SWATCHES_ICON_DEFAULTS } from './color-swatches.icons';\n\nconst STEPS: Record<string, number> = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };\n\n/** A radio group of color dots: picks one value from a few colors, like a theme color or a label color. */\n@Component({\n selector: 'tx-color-swatches',\n imports: [TxIcon],\n templateUrl: './color-swatches.component.html',\n styleUrl: './color-swatches.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxColorSwatches), multi: true }],\n host: {\n class: 'tx-color-swatches',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[class.tx-color-swatches--disabled]': 'isDisabled()',\n '[class.tx-color-swatches--readonly]': 'readonly()',\n '[class.tx-color-swatches--invalid]': 'isInvalid()',\n },\n viewProviders: [provideTxIconDefaults(COLOR_SWATCHES_ICON_DEFAULTS)],\n})\nexport class TxColorSwatches<T = string> extends TxFormControlBase<T> {\n private readonly colorSwatchesTheme = injectTokens(COLOR_SWATCHES_THEME);\n\n readonly options = input<readonly TxColorSwatchOption<T>[]>([]);\n readonly columns = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly size = input<TxColorSwatchesSize>('medium');\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraColorSwatchesTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxColorSwatchesPart, TxColorSwatches<T>> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly changed = output<TxColorSwatchesChangeEvent<T>>();\n\n private readonly swatches = viewChildren<ElementRef<HTMLButtonElement>>('swatch');\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly passThrough = injectPassThrough('colorSwatches', this, this.pt, this.ptOptions);\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput());\n readonly selectedIndex = computed(() => this.options().findIndex((option) => Object.is(option.value, this.value())));\n readonly focusIndex = computed(() => {\n const selected = this.selectedIndex();\n return selected >= 0 && !this.options()[selected].disabled ? selected : this.options().findIndex((option) => !option.disabled);\n });\n readonly groupStyle = computed(() => {\n const columns = this.columns();\n return { ...(columns ? { 'grid-template-columns': `repeat(${columns}, max-content)` } : {}), ...this.passThrough().group?.style };\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-color-swatches'), ...this.passThrough().root?.style }));\n\n /** Moves focus to the picked dot, or to the first one that can be picked. */\n focus(): void {\n this.swatches()[this.focusIndex()]?.nativeElement.focus();\n }\n\n select(index: number, event: Event): void {\n const option = this.options()[index];\n if (!option || option.disabled || this.isDisabled() || this.readonly() || index === this.selectedIndex()) {\n return;\n }\n this.updateValue(option.value);\n this.changed.emit({ value: option.value, originalEvent: event });\n }\n\n onKeydown(event: KeyboardEvent, index: number): void {\n const next = this.nextIndex(event.key, index);\n if (next < 0) {\n return;\n }\n event.preventDefault();\n this.swatches()[next].nativeElement.focus();\n this.select(next, event);\n }\n\n onBlur(): void {\n this.markTouched();\n }\n\n private nextIndex(key: string, index: number): number {\n const enabled = this.options()\n .map((option, position) => (option.disabled ? -1 : position))\n .filter((position) => position >= 0);\n if (key === 'Home' || key === 'End') {\n return key === 'Home' ? enabled[0] : enabled[enabled.length - 1];\n }\n if (!(key in STEPS)) {\n return -1;\n }\n const current = enabled.indexOf(index);\n return enabled[(current + STEPS[key] + enabled.length) % enabled.length];\n }\n}\n","<div\n class=\"tx-color-swatches__group\"\n role=\"radiogroup\"\n [class]=\"passThrough().group?.class\"\n [style]=\"groupStyle()\"\n [attr.data-columns]=\"columns() ? true : null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n>\n @for (option of options(); track option.value; let index = $index) {\n <button\n #swatch\n type=\"button\"\n role=\"radio\"\n class=\"tx-color-swatches__swatch\"\n [class.tx-color-swatches__swatch--selected]=\"index === selectedIndex()\"\n [class]=\"passThrough().swatch?.class\"\n [style]=\"passThrough().swatch?.style\"\n [style.--_color]=\"option.color\"\n [attr.aria-checked]=\"index === selectedIndex()\"\n [attr.aria-label]=\"option.label\"\n [attr.title]=\"option.label\"\n [attr.tabindex]=\"index === focusIndex() ? 0 : -1\"\n [disabled]=\"isDisabled() || option.disabled\"\n (click)=\"select(index, $event)\"\n (keydown)=\"onKeydown($event, index)\"\n (blur)=\"onBlur()\"\n >\n <tx-icon class=\"tx-color-swatches__check\" name=\"check\" aria-hidden=\"true\" [class]=\"passThrough().check?.class\" [style]=\"passThrough().check?.style\" />\n </button>\n }\n</div>\n"],"mappings":";;;;;;;;AAEA,MAAa,uBAAuB;CAClC,eAAe;CACf,MAAM;AACP;ACHD,MAAa,+BAA0C,EACrD,OAAO,YACR;ACOD,MAAM,QAAgC;CAAE,YAAY;CAAG,WAAW;CAAG,WAAW;CAAI,SAAS;AAAE;AAsB/F,IAAa,kBAAb,MAAa,wBAAoC,kBAAoB;CAClD,qBAAqB,aAAa,oBAAoB;CAE9D,UAAU,MAAyC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACtD,UAAU,MAAmC,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAc,CAAA;CACnF,OAAO,MAA2B,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC3C,UAAU,MAAoC,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAe,CAAA;CAErF,gBAAgB,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,gBAAA,+BAAA,CAAA;EAAI,OAAO;EAAY,WAAW;C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AA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAQ,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -251,7 +251,7 @@ var TxCountrySelect = class TxCountrySelect extends TxFormControlBase {
251
251
  }],
252
252
  usesInheritance: true,
253
253
  ngImport: i0,
254
- template: "@if (multiple()) {\n <tx-multiselect\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-selected>\n <span class=\"tx-country-select__flags\" [class.tx-country-select__flags--styled]=\"!unstyled()\">\n @for (item of firstFlags(selected); track item.value) {\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [showName]=\"selected.length === 1\" [shape]=\"shape()\" />\n }\n @if (extraCount(selected); as extra) {\n <span class=\"tx-country-select__more\">+{{ extra }}</span>\n }\n </span>\n </ng-template>\n </tx-multiselect>\n} @else {\n <tx-select\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-item>\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n </ng-template>\n </tx-select>\n}\n\n<ng-template #option let-item>\n <span class=\"tx-country-select__option\" [class.tx-country-select__option--styled]=\"!unstyled()\">\n <tx-country class=\"tx-country-select__country\" [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n @if (item.hint) {\n <span class=\"tx-country-select__hint\">{{ item.hint }}</span>\n }\n @if (item.count !== null) {\n <span class=\"tx-country-select__count\">{{ item.count }}</span>\n }\n </span>\n</ng-template>\n",
254
+ template: "@if (multiple()) {\n <tx-multiselect\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-selected>\n <span class=\"tx-country-select__flags\" [class.tx-country-select__flags--styled]=\"!unstyled()\">\n @for (item of firstFlags(selected); track item.value) {\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [showName]=\"selected.length === 1\" [shape]=\"shape()\" />\n }\n @if (extraCount(selected); as extra) {\n <span class=\"tx-country-select__more\">+{{ extra }}</span>\n }\n </span>\n </ng-template>\n </tx-multiselect>\n} @else {\n <tx-select\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-item>\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n </ng-template>\n </tx-select>\n}\n\n<ng-template #option let-item>\n <span class=\"tx-country-select__option\" [class.tx-country-select__option--styled]=\"!unstyled()\">\n <tx-country class=\"tx-country-select__country\" [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n @if (item.hint) {\n <span class=\"tx-country-select__hint\">{{ item.hint }}</span>\n }\n @if (item.count !== null) {\n <span class=\"tx-country-select__count\">{{ item.count }}</span>\n }\n </span>\n</ng-template>\n",
255
255
  styles: [":host{display:block;width:100%}.tx-country-select__option{display:flex;align-items:center;min-width:0}.tx-country-select__country{flex:0 1 auto}.tx-country-select__flags{display:inline-flex;align-items:center;vertical-align:middle}.tx-country-select__option--styled,.tx-country-select__flags--styled{gap:var(--tx-country-gap)}.tx-country-select__option--styled .tx-country-select__hint{overflow:hidden;color:var(--tx-country-hint-color);font-size:var(--tx-country-count-font-size);text-overflow:ellipsis;white-space:nowrap}.tx-country-select__option--styled .tx-country-select__count{margin-inline-start:auto;color:var(--tx-country-count-color);font-size:var(--tx-country-count-font-size);font-variant-numeric:tabular-nums}.tx-country-select__flags--styled .tx-country-select__more{color:var(--tx-country-hint-color);font-size:var(--tx-country-count-font-size)}\n"],
256
256
  dependencies: [
257
257
  {
@@ -326,12 +326,14 @@ var TxCountrySelect = class TxCountrySelect extends TxFormControlBase {
326
326
  {
327
327
  kind: "directive",
328
328
  type: TxSelectOptionTemplate,
329
- selector: "ng-template[txSelectOption]"
329
+ selector: "ng-template[txSelectOption]",
330
+ inputs: ["txSelectOptionOf"]
330
331
  },
331
332
  {
332
333
  kind: "directive",
333
334
  type: TxSelectValueTemplate,
334
- selector: "ng-template[txSelectValue]"
335
+ selector: "ng-template[txSelectValue]",
336
+ inputs: ["txSelectValueOf"]
335
337
  },
336
338
  {
337
339
  kind: "component",
@@ -381,7 +383,7 @@ i0.ɵɵngDeclareClassMetadata({
381
383
  class: "tx-country-select",
382
384
  "[attr.data-styled]": "unstyled() ? null : true"
383
385
  },
384
- template: "@if (multiple()) {\n <tx-multiselect\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-selected>\n <span class=\"tx-country-select__flags\" [class.tx-country-select__flags--styled]=\"!unstyled()\">\n @for (item of firstFlags(selected); track item.value) {\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [showName]=\"selected.length === 1\" [shape]=\"shape()\" />\n }\n @if (extraCount(selected); as extra) {\n <span class=\"tx-country-select__more\">+{{ extra }}</span>\n }\n </span>\n </ng-template>\n </tx-multiselect>\n} @else {\n <tx-select\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-item>\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n </ng-template>\n </tx-select>\n}\n\n<ng-template #option let-item>\n <span class=\"tx-country-select__option\" [class.tx-country-select__option--styled]=\"!unstyled()\">\n <tx-country class=\"tx-country-select__country\" [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n @if (item.hint) {\n <span class=\"tx-country-select__hint\">{{ item.hint }}</span>\n }\n @if (item.count !== null) {\n <span class=\"tx-country-select__count\">{{ item.count }}</span>\n }\n </span>\n</ng-template>\n",
386
+ template: "@if (multiple()) {\n <tx-multiselect\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-selected>\n <span class=\"tx-country-select__flags\" [class.tx-country-select__flags--styled]=\"!unstyled()\">\n @for (item of firstFlags(selected); track item.value) {\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [showName]=\"selected.length === 1\" [shape]=\"shape()\" />\n }\n @if (extraCount(selected); as extra) {\n <span class=\"tx-country-select__more\">+{{ extra }}</span>\n }\n </span>\n </ng-template>\n </tx-multiselect>\n} @else {\n <tx-select\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-item>\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n </ng-template>\n </tx-select>\n}\n\n<ng-template #option let-item>\n <span class=\"tx-country-select__option\" [class.tx-country-select__option--styled]=\"!unstyled()\">\n <tx-country class=\"tx-country-select__country\" [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n @if (item.hint) {\n <span class=\"tx-country-select__hint\">{{ item.hint }}</span>\n }\n @if (item.count !== null) {\n <span class=\"tx-country-select__count\">{{ item.count }}</span>\n }\n </span>\n</ng-template>\n",
385
387
  styles: [":host{display:block;width:100%}.tx-country-select__option{display:flex;align-items:center;min-width:0}.tx-country-select__country{flex:0 1 auto}.tx-country-select__flags{display:inline-flex;align-items:center;vertical-align:middle}.tx-country-select__option--styled,.tx-country-select__flags--styled{gap:var(--tx-country-gap)}.tx-country-select__option--styled .tx-country-select__hint{overflow:hidden;color:var(--tx-country-hint-color);font-size:var(--tx-country-count-font-size);text-overflow:ellipsis;white-space:nowrap}.tx-country-select__option--styled .tx-country-select__count{margin-inline-start:auto;color:var(--tx-country-count-color);font-size:var(--tx-country-count-font-size);font-variant-numeric:tabular-nums}.tx-country-select__flags--styled .tx-country-select__more{color:var(--tx-country-hint-color);font-size:var(--tx-country-count-font-size)}\n"]
386
388
  }]
387
389
  }],
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-country-select.mjs","names":[],"sources":["../../../../packages/ui/country-select/src/country-select.theme.ts","../../../../packages/ui/country-select/src/country-select.component.ts","../../../../packages/ui/country-select/src/country-select.component.html"],"sourcesContent":["import { countryTokens } from '@tectra-ng/themes';\n\nexport const COUNTRY_SELECT_THEME = {\n country: countryTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, booleanAttribute, computed, forwardRef, inject, input, output } from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TxFormControlBase } from '@tectra-ng/core/forms';\nimport { TxLocaleService } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraSelectTokens } from '@tectra-ng/themes';\nimport { TX_COUNTRY_CODES, TxCountry, TxFlagShape, countryName } from '@tectra-ng/ui/country';\nimport { TxMultiselect } from '@tectra-ng/ui/multiselect';\nimport { TxFieldVariant, TxSelect, TxSelectItem, TxSelectOptionTemplate, TxSelectSize, TxSelectValueTemplate } from '@tectra-ng/ui/select';\nimport { TxCountryItem, TxCountryOption, TxCountrySort } from './country-select.types';\nimport { injectTokens } from '@tectra-ng/core/config';\nimport { COUNTRY_SELECT_THEME } from './country-select.theme';\n\n@Component({\n selector: 'tx-country-select',\n imports: [FormsModule, NgTemplateOutlet, TxSelect, TxMultiselect, TxSelectOptionTemplate, TxSelectValueTemplate, TxCountry],\n templateUrl: './country-select.component.html',\n styleUrl: './country-select.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxCountrySelect), multi: true }],\n host: {\n class: 'tx-country-select',\n '[attr.data-styled]': 'unstyled() ? null : true',\n },\n})\nexport class TxCountrySelect extends TxFormControlBase<string | string[]> {\n private readonly countrySelectTheme = injectTokens(COUNTRY_SELECT_THEME);\n\n private locale = inject(TxLocaleService);\n\n readonly options = input<readonly (string | TxCountryOption)[] | undefined>(undefined);\n readonly multiple = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly filter = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly sort = input<TxCountrySort>('name');\n readonly shape = input<TxFlagShape>('rectangle');\n readonly maxFlags = input<number>(3);\n readonly virtualScrollThreshold = input<number>(50);\n readonly placeholder = input<string>('');\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly loading = 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<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<TectraSelectTokens> | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly changed = output<string | string[] | null>();\n\n readonly items = computed<TxCountryItem[]>(() => {\n const locale = this.locale.locale().intl;\n const items = (this.options() ?? TX_COUNTRY_CODES).map((option) => {\n const entry: TxCountryOption = typeof option === 'string' ? { code: option } : option;\n const code = entry.code.trim().toUpperCase();\n return {\n code,\n value: entry.value ?? code,\n label: entry.label ?? countryName(code, locale),\n count: entry.count ?? null,\n hint: entry.hint ?? '',\n disabled: !!entry.disabled,\n };\n });\n if (this.sort() === 'name') {\n const collator = new Intl.Collator(locale);\n items.sort((a, b) => collator.compare(a.label, b.label));\n }\n return items;\n });\n readonly virtual = computed(() => this.items().length > this.virtualScrollThreshold());\n\n extraCount(items: TxSelectItem[]): number {\n return Math.max(0, items.length - this.maxFlags());\n }\n\n firstFlags(items: TxSelectItem[]): TxCountryItem[] {\n return items.slice(0, this.maxFlags()).map((item) => item.option as TxCountryItem);\n }\n\n onModelChange(value: string | string[] | null): void {\n this.updateValue(value);\n this.changed.emit(value);\n }\n\n onClosed(): void {\n this.markTouched();\n }\n}\n","@if (multiple()) {\n <tx-multiselect\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-selected>\n <span class=\"tx-country-select__flags\" [class.tx-country-select__flags--styled]=\"!unstyled()\">\n @for (item of firstFlags(selected); track item.value) {\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [showName]=\"selected.length === 1\" [shape]=\"shape()\" />\n }\n @if (extraCount(selected); as extra) {\n <span class=\"tx-country-select__more\">+{{ extra }}</span>\n }\n </span>\n </ng-template>\n </tx-multiselect>\n} @else {\n <tx-select\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-item>\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n </ng-template>\n </tx-select>\n}\n\n<ng-template #option let-item>\n <span class=\"tx-country-select__option\" [class.tx-country-select__option--styled]=\"!unstyled()\">\n <tx-country class=\"tx-country-select__country\" [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n @if (item.hint) {\n <span class=\"tx-country-select__hint\">{{ item.hint }}</span>\n }\n @if (item.count !== null) {\n <span class=\"tx-country-select__count\">{{ item.count }}</span>\n }\n </span>\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;AAEA,MAAa,uBAAuB,EAClC,SAAS,cACV;ACsBD,IAAa,kBAAb,MAAa,wBAAwB,kBAAoC;CACtD,qBAAqB,aAAa,oBAAoB;CAE/D,SAAS,OAAO,eAAe;CAE9B,UAAU,MAAyD,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC7E,WAAW,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACvE,SAAS,MAAwB,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,SAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACpE,OAAO,MAAqB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACnC,QAAQ,MAAmB,aAAY,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,WAAW,MAAc,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC3B,yBAAyB,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,yBAAA,CAAA,+BAAA,CAAA,CAAA;CAC1C,cAAc,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,YAAY,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACxE,UAAU,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACtE,UAAU,MAA0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A,MAAA;CAAe,YAAA,CAAA;EAZ3B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAmB,SACpB;IAAC;IAAa;IAAkB;IAAU;IAAe;IAAwB;IAAuB;GAAS;GAAC,iBAG1G,wBAAwB;GAAM,WACpC,CAAC;IAAE,SAAS;IAAmB,aAAa,iBAAgB,eAAgB;IAAG,OAAO;GAAI,CAAE;GAAC,MAClG;IACJ,OAAO;IACP,sBAAsB;GACvB;GAAA,UAAA;GAAA,QAAA,CAAA,i2BAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-country-select.mjs","names":[],"sources":["../../../../packages/ui/country-select/src/country-select.theme.ts","../../../../packages/ui/country-select/src/country-select.component.ts","../../../../packages/ui/country-select/src/country-select.component.html"],"sourcesContent":["import { countryTokens } from '@tectra-ng/themes';\n\nexport const COUNTRY_SELECT_THEME = {\n country: countryTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, booleanAttribute, computed, forwardRef, inject, input, output } from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TxFormControlBase } from '@tectra-ng/core/forms';\nimport { TxLocaleService } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraSelectTokens } from '@tectra-ng/themes';\nimport { TX_COUNTRY_CODES, TxCountry, TxFlagShape, countryName } from '@tectra-ng/ui/country';\nimport { TxMultiselect } from '@tectra-ng/ui/multiselect';\nimport { TxFieldVariant, TxSelect, TxSelectItem, TxSelectOptionTemplate, TxSelectSize, TxSelectValueTemplate } from '@tectra-ng/ui/select';\nimport { TxCountryItem, TxCountryOption, TxCountrySort } from './country-select.types';\nimport { injectTokens } from '@tectra-ng/core/config';\nimport { COUNTRY_SELECT_THEME } from './country-select.theme';\n\n@Component({\n selector: 'tx-country-select',\n imports: [FormsModule, NgTemplateOutlet, TxSelect, TxMultiselect, TxSelectOptionTemplate, TxSelectValueTemplate, TxCountry],\n templateUrl: './country-select.component.html',\n styleUrl: './country-select.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxCountrySelect), multi: true }],\n host: {\n class: 'tx-country-select',\n '[attr.data-styled]': 'unstyled() ? null : true',\n },\n})\nexport class TxCountrySelect extends TxFormControlBase<string | string[]> {\n private readonly countrySelectTheme = injectTokens(COUNTRY_SELECT_THEME);\n\n private locale = inject(TxLocaleService);\n\n readonly options = input<readonly (string | TxCountryOption)[] | undefined>(undefined);\n readonly multiple = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly filter = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly sort = input<TxCountrySort>('name');\n readonly shape = input<TxFlagShape>('rectangle');\n readonly maxFlags = input<number>(3);\n readonly virtualScrollThreshold = input<number>(50);\n readonly placeholder = input<string>('');\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly loading = 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<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<TectraSelectTokens> | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly changed = output<string | string[] | null>();\n\n readonly items = computed<TxCountryItem[]>(() => {\n const locale = this.locale.locale().intl;\n const items = (this.options() ?? TX_COUNTRY_CODES).map((option) => {\n const entry: TxCountryOption = typeof option === 'string' ? { code: option } : option;\n const code = entry.code.trim().toUpperCase();\n return {\n code,\n value: entry.value ?? code,\n label: entry.label ?? countryName(code, locale),\n count: entry.count ?? null,\n hint: entry.hint ?? '',\n disabled: !!entry.disabled,\n };\n });\n if (this.sort() === 'name') {\n const collator = new Intl.Collator(locale);\n items.sort((a, b) => collator.compare(a.label, b.label));\n }\n return items;\n });\n readonly virtual = computed(() => this.items().length > this.virtualScrollThreshold());\n\n extraCount(items: TxSelectItem[]): number {\n return Math.max(0, items.length - this.maxFlags());\n }\n\n firstFlags(items: TxSelectItem[]): TxCountryItem[] {\n return items.slice(0, this.maxFlags()).map((item) => item.option as TxCountryItem);\n }\n\n onModelChange(value: string | string[] | null): void {\n this.updateValue(value);\n this.changed.emit(value);\n }\n\n onClosed(): void {\n this.markTouched();\n }\n}\n","@if (multiple()) {\n <tx-multiselect\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-selected>\n <span class=\"tx-country-select__flags\" [class.tx-country-select__flags--styled]=\"!unstyled()\">\n @for (item of firstFlags(selected); track item.value) {\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [showName]=\"selected.length === 1\" [shape]=\"shape()\" />\n }\n @if (extraCount(selected); as extra) {\n <span class=\"tx-country-select__more\">+{{ extra }}</span>\n }\n </span>\n </ng-template>\n </tx-multiselect>\n} @else {\n <tx-select\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-item>\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n </ng-template>\n </tx-select>\n}\n\n<ng-template #option let-item>\n <span class=\"tx-country-select__option\" [class.tx-country-select__option--styled]=\"!unstyled()\">\n <tx-country class=\"tx-country-select__country\" [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n @if (item.hint) {\n <span class=\"tx-country-select__hint\">{{ item.hint }}</span>\n }\n @if (item.count !== null) {\n <span class=\"tx-country-select__count\">{{ item.count }}</span>\n }\n </span>\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;AAEA,MAAa,uBAAuB,EAClC,SAAS,cACV;ACsBD,IAAa,kBAAb,MAAa,wBAAwB,kBAAoC;CACtD,qBAAqB,aAAa,oBAAoB;CAE/D,SAAS,OAAO,eAAe;CAE9B,UAAU,MAAyD,QAAU,GAAA,YAAA,CAAA,EAA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