@tectra-ng/ui 0.3.2 → 0.4.0

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 (241) hide show
  1. package/data-view/README.md +9 -1
  2. package/dialog/README.md +3 -0
  3. package/fesm2022/tectra-ng-ui-accordion.mjs.map +1 -1
  4. package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -1
  5. package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -1
  6. package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -1
  7. package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -1
  8. package/fesm2022/tectra-ng-ui-carousel.mjs.map +1 -1
  9. package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -1
  10. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  11. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
  12. package/fesm2022/tectra-ng-ui-confirm.mjs.map +1 -1
  13. package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -1
  14. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
  15. package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -1
  16. package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
  17. package/fesm2022/tectra-ng-ui-dialog.mjs +51 -0
  18. package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -1
  19. package/fesm2022/tectra-ng-ui-email-suggestion.mjs.map +1 -1
  20. package/fesm2022/tectra-ng-ui-export-font.mjs.map +1 -1
  21. package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
  22. package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -1
  23. package/fesm2022/tectra-ng-ui-galleria.mjs.map +1 -1
  24. package/fesm2022/tectra-ng-ui-highlight-text.mjs.map +1 -1
  25. package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -1
  26. package/fesm2022/tectra-ng-ui-image.mjs.map +1 -1
  27. package/fesm2022/tectra-ng-ui-input-mask.mjs.map +1 -1
  28. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
  29. package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -1
  30. package/fesm2022/tectra-ng-ui-list-input.mjs.map +1 -1
  31. package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -1
  32. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
  33. package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -1
  34. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
  35. package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
  36. package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -1
  37. package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -1
  38. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
  39. package/fesm2022/tectra-ng-ui-sparkline.mjs.map +1 -1
  40. package/fesm2022/tectra-ng-ui-splitter.mjs.map +1 -1
  41. package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -1
  42. package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -1
  43. package/fesm2022/tectra-ng-ui-table.mjs +2 -2
  44. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  45. package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -1
  46. package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -1
  47. package/fesm2022/tectra-ng-ui-toolbar.mjs.map +1 -1
  48. package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -1
  49. package/fesm2022/tectra-ng-ui-tree-select.mjs +20 -3
  50. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  51. package/fesm2022/tectra-ng-ui-tree-table.mjs +2 -2
  52. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
  53. package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -1
  54. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -1
  55. package/fesm2022/tectra-ng-ui.mjs +1 -1
  56. package/fesm2022/tectra-ng-ui.mjs.map +1 -1
  57. package/package.json +4 -4
  58. package/table/README.md +1 -0
  59. package/tree-select/README.md +1 -0
  60. package/types/tectra-ng-ui-accordion.d.ts +96 -65
  61. package/types/tectra-ng-ui-accordion.d.ts.map +1 -1
  62. package/types/tectra-ng-ui-amount.d.ts +40 -17
  63. package/types/tectra-ng-ui-amount.d.ts.map +1 -1
  64. package/types/tectra-ng-ui-analog-clock.d.ts +28 -41
  65. package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -1
  66. package/types/tectra-ng-ui-autocomplete.d.ts +35 -96
  67. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
  68. package/types/tectra-ng-ui-avatar.d.ts +84 -259
  69. package/types/tectra-ng-ui-avatar.d.ts.map +1 -1
  70. package/types/tectra-ng-ui-badge.d.ts +18 -61
  71. package/types/tectra-ng-ui-badge.d.ts.map +1 -1
  72. package/types/tectra-ng-ui-breadcrumb.d.ts +53 -36
  73. package/types/tectra-ng-ui-breadcrumb.d.ts.map +1 -1
  74. package/types/tectra-ng-ui-button-group.d.ts +4 -0
  75. package/types/tectra-ng-ui-button-group.d.ts.map +1 -1
  76. package/types/tectra-ng-ui-button.d.ts +45 -266
  77. package/types/tectra-ng-ui-button.d.ts.map +1 -1
  78. package/types/tectra-ng-ui-card.d.ts +14 -16
  79. package/types/tectra-ng-ui-card.d.ts.map +1 -1
  80. package/types/tectra-ng-ui-carousel.d.ts +55 -27
  81. package/types/tectra-ng-ui-carousel.d.ts.map +1 -1
  82. package/types/tectra-ng-ui-cascade-select.d.ts +48 -8
  83. package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -1
  84. package/types/tectra-ng-ui-checkbox.d.ts +79 -119
  85. package/types/tectra-ng-ui-checkbox.d.ts.map +1 -1
  86. package/types/tectra-ng-ui-chip.d.ts +19 -22
  87. package/types/tectra-ng-ui-chip.d.ts.map +1 -1
  88. package/types/tectra-ng-ui-chips-input.d.ts +41 -11
  89. package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
  90. package/types/tectra-ng-ui-color-picker.d.ts +51 -47
  91. package/types/tectra-ng-ui-color-picker.d.ts.map +1 -1
  92. package/types/tectra-ng-ui-confirm.d.ts +45 -0
  93. package/types/tectra-ng-ui-confirm.d.ts.map +1 -1
  94. package/types/tectra-ng-ui-countdown.d.ts +42 -10
  95. package/types/tectra-ng-ui-countdown.d.ts.map +1 -1
  96. package/types/tectra-ng-ui-country-select.d.ts +41 -96
  97. package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
  98. package/types/tectra-ng-ui-country.d.ts +40 -17
  99. package/types/tectra-ng-ui-country.d.ts.map +1 -1
  100. package/types/tectra-ng-ui-data-view.d.ts +92 -34
  101. package/types/tectra-ng-ui-data-view.d.ts.map +1 -1
  102. package/types/tectra-ng-ui-datepicker.d.ts +186 -147
  103. package/types/tectra-ng-ui-datepicker.d.ts.map +1 -1
  104. package/types/tectra-ng-ui-dialog.d.ts +149 -67
  105. package/types/tectra-ng-ui-dialog.d.ts.map +1 -1
  106. package/types/tectra-ng-ui-divider.d.ts +17 -12
  107. package/types/tectra-ng-ui-divider.d.ts.map +1 -1
  108. package/types/tectra-ng-ui-drawer.d.ts +31 -67
  109. package/types/tectra-ng-ui-drawer.d.ts.map +1 -1
  110. package/types/tectra-ng-ui-email-suggestion.d.ts +25 -8
  111. package/types/tectra-ng-ui-email-suggestion.d.ts.map +1 -1
  112. package/types/tectra-ng-ui-export-font.d.ts +1 -0
  113. package/types/tectra-ng-ui-export-font.d.ts.map +1 -1
  114. package/types/tectra-ng-ui-export.d.ts +238 -0
  115. package/types/tectra-ng-ui-export.d.ts.map +1 -1
  116. package/types/tectra-ng-ui-field.d.ts +24 -11
  117. package/types/tectra-ng-ui-field.d.ts.map +1 -1
  118. package/types/tectra-ng-ui-fieldset.d.ts +14 -23
  119. package/types/tectra-ng-ui-fieldset.d.ts.map +1 -1
  120. package/types/tectra-ng-ui-file-upload.d.ts +127 -115
  121. package/types/tectra-ng-ui-file-upload.d.ts.map +1 -1
  122. package/types/tectra-ng-ui-galleria.d.ts +84 -84
  123. package/types/tectra-ng-ui-galleria.d.ts.map +1 -1
  124. package/types/tectra-ng-ui-highlight-text.d.ts +24 -10
  125. package/types/tectra-ng-ui-highlight-text.d.ts.map +1 -1
  126. package/types/tectra-ng-ui-icon-field.d.ts +20 -0
  127. package/types/tectra-ng-ui-icon-field.d.ts.map +1 -1
  128. package/types/tectra-ng-ui-image.d.ts +60 -36
  129. package/types/tectra-ng-ui-image.d.ts.map +1 -1
  130. package/types/tectra-ng-ui-input-group.d.ts +9 -0
  131. package/types/tectra-ng-ui-input-group.d.ts.map +1 -1
  132. package/types/tectra-ng-ui-input-mask.d.ts +39 -0
  133. package/types/tectra-ng-ui-input-mask.d.ts.map +1 -1
  134. package/types/tectra-ng-ui-input-number.d.ts +73 -15
  135. package/types/tectra-ng-ui-input-number.d.ts.map +1 -1
  136. package/types/tectra-ng-ui-input-otp.d.ts +28 -21
  137. package/types/tectra-ng-ui-input-otp.d.ts.map +1 -1
  138. package/types/tectra-ng-ui-input.d.ts +17 -50
  139. package/types/tectra-ng-ui-input.d.ts.map +1 -1
  140. package/types/tectra-ng-ui-key-filter.d.ts +14 -0
  141. package/types/tectra-ng-ui-key-filter.d.ts.map +1 -1
  142. package/types/tectra-ng-ui-knob.d.ts +38 -18
  143. package/types/tectra-ng-ui-knob.d.ts.map +1 -1
  144. package/types/tectra-ng-ui-label.d.ts +19 -0
  145. package/types/tectra-ng-ui-label.d.ts.map +1 -1
  146. package/types/tectra-ng-ui-link.d.ts +39 -34
  147. package/types/tectra-ng-ui-link.d.ts.map +1 -1
  148. package/types/tectra-ng-ui-list-input.d.ts +54 -45
  149. package/types/tectra-ng-ui-list-input.d.ts.map +1 -1
  150. package/types/tectra-ng-ui-listbox.d.ts +24 -14
  151. package/types/tectra-ng-ui-listbox.d.ts.map +1 -1
  152. package/types/tectra-ng-ui-mention-textarea.d.ts +36 -9
  153. package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -1
  154. package/types/tectra-ng-ui-menu.d.ts +92 -166
  155. package/types/tectra-ng-ui-menu.d.ts.map +1 -1
  156. package/types/tectra-ng-ui-menubar.d.ts +29 -58
  157. package/types/tectra-ng-ui-menubar.d.ts.map +1 -1
  158. package/types/tectra-ng-ui-message.d.ts +61 -126
  159. package/types/tectra-ng-ui-message.d.ts.map +1 -1
  160. package/types/tectra-ng-ui-month-calendar.d.ts +98 -87
  161. package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -1
  162. package/types/tectra-ng-ui-multiselect.d.ts +26 -96
  163. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
  164. package/types/tectra-ng-ui-overlay-badge.d.ts +20 -9
  165. package/types/tectra-ng-ui-overlay-badge.d.ts.map +1 -1
  166. package/types/tectra-ng-ui-paginator.d.ts +69 -47
  167. package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
  168. package/types/tectra-ng-ui-panel-menu.d.ts +52 -105
  169. package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
  170. package/types/tectra-ng-ui-panel.d.ts +22 -30
  171. package/types/tectra-ng-ui-panel.d.ts.map +1 -1
  172. package/types/tectra-ng-ui-password-generator.d.ts +27 -0
  173. package/types/tectra-ng-ui-password-generator.d.ts.map +1 -1
  174. package/types/tectra-ng-ui-password.d.ts +55 -26
  175. package/types/tectra-ng-ui-password.d.ts.map +1 -1
  176. package/types/tectra-ng-ui-pill.d.ts +23 -70
  177. package/types/tectra-ng-ui-pill.d.ts.map +1 -1
  178. package/types/tectra-ng-ui-popover.d.ts +58 -46
  179. package/types/tectra-ng-ui-popover.d.ts.map +1 -1
  180. package/types/tectra-ng-ui-progress-bar.d.ts +32 -28
  181. package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -1
  182. package/types/tectra-ng-ui-progress-spinner.d.ts +18 -16
  183. package/types/tectra-ng-ui-progress-spinner.d.ts.map +1 -1
  184. package/types/tectra-ng-ui-radio-button.d.ts +64 -115
  185. package/types/tectra-ng-ui-radio-button.d.ts.map +1 -1
  186. package/types/tectra-ng-ui-rating.d.ts +40 -29
  187. package/types/tectra-ng-ui-rating.d.ts.map +1 -1
  188. package/types/tectra-ng-ui-scroll-panel.d.ts +22 -17
  189. package/types/tectra-ng-ui-scroll-panel.d.ts.map +1 -1
  190. package/types/tectra-ng-ui-select.d.ts +169 -100
  191. package/types/tectra-ng-ui-select.d.ts.map +1 -1
  192. package/types/tectra-ng-ui-skeleton.d.ts +34 -37
  193. package/types/tectra-ng-ui-skeleton.d.ts.map +1 -1
  194. package/types/tectra-ng-ui-slider.d.ts +37 -33
  195. package/types/tectra-ng-ui-slider.d.ts.map +1 -1
  196. package/types/tectra-ng-ui-sparkline.d.ts +22 -15
  197. package/types/tectra-ng-ui-sparkline.d.ts.map +1 -1
  198. package/types/tectra-ng-ui-speed-dial.d.ts +34 -11
  199. package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -1
  200. package/types/tectra-ng-ui-split-button.d.ts +28 -7
  201. package/types/tectra-ng-ui-split-button.d.ts.map +1 -1
  202. package/types/tectra-ng-ui-splitter.d.ts +47 -23
  203. package/types/tectra-ng-ui-splitter.d.ts.map +1 -1
  204. package/types/tectra-ng-ui-stat-tiles.d.ts +39 -91
  205. package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -1
  206. package/types/tectra-ng-ui-status-icon.d.ts +19 -23
  207. package/types/tectra-ng-ui-status-icon.d.ts.map +1 -1
  208. package/types/tectra-ng-ui-stepper.d.ts +106 -133
  209. package/types/tectra-ng-ui-stepper.d.ts.map +1 -1
  210. package/types/tectra-ng-ui-table.d.ts +415 -183
  211. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  212. package/types/tectra-ng-ui-tabs.d.ts +91 -133
  213. package/types/tectra-ng-ui-tabs.d.ts.map +1 -1
  214. package/types/tectra-ng-ui-tag.d.ts +46 -135
  215. package/types/tectra-ng-ui-tag.d.ts.map +1 -1
  216. package/types/tectra-ng-ui-textarea.d.ts +25 -31
  217. package/types/tectra-ng-ui-textarea.d.ts.map +1 -1
  218. package/types/tectra-ng-ui-timeline.d.ts +39 -27
  219. package/types/tectra-ng-ui-timeline.d.ts.map +1 -1
  220. package/types/tectra-ng-ui-toast.d.ts +84 -78
  221. package/types/tectra-ng-ui-toast.d.ts.map +1 -1
  222. package/types/tectra-ng-ui-toggle-button.d.ts +29 -55
  223. package/types/tectra-ng-ui-toggle-button.d.ts.map +1 -1
  224. package/types/tectra-ng-ui-toggle-switch.d.ts +41 -55
  225. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
  226. package/types/tectra-ng-ui-toolbar.d.ts +15 -14
  227. package/types/tectra-ng-ui-toolbar.d.ts.map +1 -1
  228. package/types/tectra-ng-ui-tooltip.d.ts +72 -22
  229. package/types/tectra-ng-ui-tooltip.d.ts.map +1 -1
  230. package/types/tectra-ng-ui-tree-select.d.ts +65 -104
  231. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
  232. package/types/tectra-ng-ui-tree-table.d.ts +30 -0
  233. package/types/tectra-ng-ui-tree-table.d.ts.map +1 -1
  234. package/types/tectra-ng-ui-tree.d.ts +197 -69
  235. package/types/tectra-ng-ui-tree.d.ts.map +1 -1
  236. package/types/tectra-ng-ui-truncate-text.d.ts +21 -14
  237. package/types/tectra-ng-ui-truncate-text.d.ts.map +1 -1
  238. package/types/tectra-ng-ui-virtual-scroller.d.ts +97 -13
  239. package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -1
  240. package/types/tectra-ng-ui.d.ts +2 -1
  241. package/types/tectra-ng-ui.d.ts.map +1 -1
@@ -1,44 +1,83 @@
1
1
  import { ControlValueAccessor } from "@angular/forms";
2
2
  import * as i0 from "@angular/core";
3
+ /** One position of a parsed mask: an editable slot or a fixed literal. */
3
4
  export interface TxMaskSlot {
5
+ /** Pattern a typed character must match; `null` for a literal position. */
4
6
  readonly test: RegExp | null;
7
+ /** Fixed character shown at a literal position; empty for an editable slot. */
5
8
  readonly literal: string;
9
+ /** `true` for slots after `?` in the mask, which may stay empty. */
6
10
  readonly optional: boolean;
7
11
  }
12
+ /** Characters typed into the slots, one entry per mask position; `null` marks an empty slot. */
8
13
  export type TxMaskValues = (string | null)[];
14
+ /** Result of an edit: the new slot values and where the caret goes. */
9
15
  export interface TxMaskEdit {
16
+ /** Slot values after the edit. */
10
17
  readonly values: TxMaskValues;
18
+ /** Caret position after the edit, as a mask position. */
11
19
  readonly caret: number;
12
20
  }
21
+ /**
22
+ * Turns a mask such as `(999) 999-9999` into slots; `9` is a digit, `a` a letter, `*` a letter or
23
+ * digit and `?` makes the rest optional.
24
+ */
13
25
  export declare function parseMask(mask: string, characterPattern?: string): TxMaskSlot[];
26
+ /** Creates slot values with every slot empty. */
14
27
  export declare function emptyValues(slots: TxMaskSlot[]): TxMaskValues;
28
+ /** Finds the first editable slot at or after a position; the slot count when there is none. */
15
29
  export declare function nextSlot(slots: TxMaskSlot[], from: number): number;
30
+ /** Finds the last editable slot before a position; `-1` when there is none. */
16
31
  export declare function previousSlot(slots: TxMaskSlot[], before: number): number;
32
+ /** Types characters into the slots from a position, skipping literals and characters that do not fit. */
17
33
  export declare function placeFrom(slots: TxMaskSlot[], values: TxMaskValues, from: number, chars: string[]): {
18
34
  values: TxMaskValues;
19
35
  last: number;
20
36
  };
37
+ /** Clears a range of slots and shifts the characters after it forward. */
21
38
  export declare function remove(slots: TxMaskSlot[], values: TxMaskValues, start: number, end: number): TxMaskValues;
39
+ /** Types text over a range of slots, pushing the characters after it back, and returns the new caret. */
22
40
  export declare function insert(slots: TxMaskSlot[], values: TxMaskValues, start: number, end: number, text: string): TxMaskEdit;
41
+ /** Handles Backspace: clears the slot before the caret. */
23
42
  export declare function deleteBackward(slots: TxMaskSlot[], values: TxMaskValues, caret: number): TxMaskEdit;
43
+ /** Handles Delete: clears the slot at or after the caret. */
24
44
  export declare function deleteForward(slots: TxMaskSlot[], values: TxMaskValues, caret: number): TxMaskEdit;
45
+ /**
46
+ * Fills slots from a text: either raw characters (`unmasked`) or a text that already contains the mask
47
+ * literals.
48
+ */
25
49
  export declare function fromText(slots: TxMaskSlot[], text: string, unmasked: boolean): TxMaskValues;
50
+ /** Builds the displayed text, with the slot character in empty slots. */
26
51
  export declare function render(slots: TxMaskSlot[], values: TxMaskValues, slotChar: string): string;
52
+ /** Builds the displayed text up to the last filled slot; empty when nothing is typed. */
27
53
  export declare function renderFilled(slots: TxMaskSlot[], values: TxMaskValues, slotChar: string): string;
54
+ /** Joins the typed characters without literals or empty slots. */
28
55
  export declare function unmaskedValue(slots: TxMaskSlot[], values: TxMaskValues): string;
56
+ /** Position of the last filled slot; `-1` when none is filled. */
29
57
  export declare function lastFilled(slots: TxMaskSlot[], values: TxMaskValues): number;
58
+ /** Tells whether every required slot is filled. */
30
59
  export declare function isComplete(slots: TxMaskSlot[], values: TxMaskValues): boolean;
60
+ /**
61
+ * Formats a text field as you type: phones, dates, cards, codes. Put `txInputMask` on a native input (with `txInput` for the tectra look). Fixed characters are typed for you, Backspace and Delete skip them, a pasted value is cleaned and fitted.
62
+ * @see https://tectra-ng.com/components/input-mask
63
+ */
31
64
  export declare class TxInputMask implements ControlValueAccessor {
32
65
  private element;
33
66
  private values;
34
67
  private onChange;
35
68
  private onTouched;
36
69
  private lastEmitted;
70
+ /** The mask, e.g. `99/99/9999` */
37
71
  readonly mask: import("@angular/core").InputSignal<string>;
72
+ /** Placeholder shown in empty positions while the field has focus */
38
73
  readonly slotChar: import("@angular/core").InputSignal<string>;
74
+ /** Clears an incomplete value when the field loses focus */
39
75
  readonly autoClear: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
76
+ /** The model gets only the typed characters, without the fixed ones */
40
77
  readonly unmask: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
78
+ /** What `a` accepts, as a RegExp class, e.g. `[A-Za-zА-Яа-яІіЇїЄєҐґ]` */
41
79
  readonly characterPattern: import("@angular/core").InputSignal<string>;
80
+ /** Every required position is filled — the value */
42
81
  readonly completed: import("@angular/core").OutputEmitterRef<string>;
43
82
  readonly slots: import("@angular/core").Signal<import("@tectra-ng/ui/input-mask").TxMaskSlot[]>;
44
83
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-input-mask.d.ts","names":[],"sources":["../../../../packages/ui/input-mask/src/mask-engine.ts","../../../../packages/ui/input-mask/src/input-mask.directive.ts"],"mappings":";;iBAAiB;WACN,MAAM;WACN;WACA;;YAGC;iBAEK;WACN,QAAQ;WACR;;wBAKK,UAAU,cAAc,4BAAgC;wBAcxD,YAAY,OAAO,eAAe;wBAIlC,SAAS,OAAO,cAAc;wBAQ9B,aAAa,OAAO,cAAc;wBAQlC,UAAU,OAAO,cAAc,QAAQ,cAAc,cAAc;EAAoB,QAAQ;EAAc;;wBAiB7G,OAAO,OAAO,cAAc,QAAQ,cAAc,eAAe,cAAc;wBAM/E,OAAO,OAAO,cAAc,QAAQ,cAAc,eAAe,aAAa,eAAe;wBAa7F,eAAe,OAAO,cAAc,QAAQ,cAAc,gBAAgB;wBAK1E,cAAc,OAAO,cAAc,QAAQ,cAAc,gBAAgB;wBAKzE,SAAS,OAAO,cAAc,cAAc,oBAAoB;wBAwBhE,OAAO,OAAO,cAAc,QAAQ,cAAc;wBAKlD,aAAa,OAAO,cAAc,QAAQ,cAAc;wBAKxD,cAAc,OAAO,cAAc,QAAQ;wBAI3C,WAAW,OAAO,cAAc,QAAQ;wBASxC,WAAW,OAAO,cAAc,QAAQ;qBC3G3C,uBAAuB;UAC1B;UACA;UACA;UACA;UACA;WAEC,8BAAI;WACJ,kCAAQ;WACR,mCAAS;WACT,gCAAM;WACN,0CAAgB;WAEhB,mCAAS;WAET,+BAAK,0CAAA;;EAUd,WAAW;EAMX,iBAAiB,KAAK;EAItB,kBAAkB;EAIlB,iBAAiB;EAIjB,cAAc,OAAO;EAoCrB;EAOA;EAKA;EAOA;UASQ;UAKA;UAOA;UAOA;UAQA;UAWA;SAjJG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAW;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-input-mask.d.ts","names":[],"sources":["../../../../packages/ui/input-mask/src/mask-engine.ts","../../../../packages/ui/input-mask/src/input-mask.directive.ts"],"mappings":";;;iBACiB;;WAEN,MAAM;;WAEN;;WAEA;;;YAIC;;iBAGK;;WAEN,QAAQ;;WAER;;;;;;wBASK,UAAU,cAAc,4BAAgC;;wBAexD,YAAY,OAAO,eAAe;;wBAKlC,SAAS,OAAO,cAAc;;wBAS9B,aAAa,OAAO,cAAc;;wBASlC,UAAU,OAAO,cAAc,QAAQ,cAAc,cAAc;EAAoB,QAAQ;EAAc;;;wBAkB7G,OAAO,OAAO,cAAc,QAAQ,cAAc,eAAe,cAAc;;wBAO/E,OAAO,OAAO,cAAc,QAAQ,cAAc,eAAe,aAAa,eAAe;;wBAc7F,eAAe,OAAO,cAAc,QAAQ,cAAc,gBAAgB;;wBAM1E,cAAc,OAAO,cAAc,QAAQ,cAAc,gBAAgB;;;;;wBASzE,SAAS,OAAO,cAAc,cAAc,oBAAoB;;wBAyBhE,OAAO,OAAO,cAAc,QAAQ,cAAc;;wBAMlD,aAAa,OAAO,cAAc,QAAQ,cAAc;;wBAMxD,cAAc,OAAO,cAAc,QAAQ;;wBAK3C,WAAW,OAAO,cAAc,QAAQ;;wBAUxC,WAAW,OAAO,cAAc,QAAQ;;;;;qBCxI3C,uBAAuB;UAC1B;UACA;UACA;UACA;UACA;;WAEC,8BAAI;;WACJ,kCAAQ;;WACR,mCAAS;;WACT,gCAAM;;WACN,0CAAgB;;WAEhB,mCAAS;WAET,+BAAK,0CAAA;;EAUd,WAAW;EAMX,iBAAiB,KAAK;EAItB,kBAAkB;EAIlB,iBAAiB;EAIjB,cAAc,OAAO;EAoCrB;EAOA;EAKA;EAOA;UASQ;UAKA;UAOA;UAOA;UAQA;UAWA;SAjJG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAW;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA"}
@@ -3,104 +3,162 @@ import { ElementRef } from "@angular/core";
3
3
  import { TxPassThroughOptions } from "@tectra-ng/core/config";
4
4
  import { TxFormControlBase } from "@tectra-ng/core/forms";
5
5
  import { TxIconName } from "@tectra-ng/icons";
6
- import { TectraDeepPartial } from "@tectra-ng/themes";
6
+ import { TectraDeepPartial, TectraInputNumberTokens } from "@tectra-ng/themes";
7
+ /** Plain number (`decimal`) or an amount with a currency (`currency`). */
7
8
  export type TxInputNumberMode = 'decimal' | 'currency';
9
+ /** Where the step buttons go: stacked on the right, on both sides, or one above the other. */
8
10
  export type TxInputNumberButtonLayout = 'stacked' | 'horizontal' | 'vertical';
11
+ /** Size of `tx-input-number`. */
9
12
  export type TxInputNumberSize = 'small' | 'medium' | 'large';
13
+ /** Look of `tx-input-number`: outlined or filled. */
10
14
  export type TxInputNumberVariant = 'outlined' | 'filled';
15
+ /** How the currency is written: symbol, narrow symbol, ISO code or full name. */
11
16
  export type TxInputNumberCurrencyDisplay = 'symbol' | 'narrowSymbol' | 'code' | 'name';
17
+ /** Parts of `tx-input-number` that `pt` can style. */
12
18
  export type TxInputNumberPart = 'root' | 'input' | 'increment' | 'decrement' | 'clear';
19
+ /** Event of `changed`: the user changed the number. */
13
20
  export interface TxInputNumberChangeEvent {
21
+ /** New value; `null` when the field is empty. */
14
22
  value: number | null;
23
+ /** Browser event that caused the change. */
15
24
  originalEvent: Event;
16
25
  }
26
+ /** Options of `TxNumberFormat`: locale, currency, digits and affixes. */
17
27
  export interface TxNumberFormatOptions {
28
+ /** Locale that sets the decimal and group separators. */
18
29
  locale: string;
30
+ /** Plain number or currency. */
19
31
  mode: 'decimal' | 'currency';
32
+ /** ISO 4217 code used in `currency` mode (default `USD`). */
20
33
  currency?: string;
34
+ /** How the currency is written (default `symbol`). */
21
35
  currencyDisplay?: 'symbol' | 'narrowSymbol' | 'code' | 'name';
36
+ /** Separates thousands with the group separator. */
22
37
  useGrouping: boolean;
38
+ /** Fewest fraction digits shown; 0 for numbers, the currency default for amounts. */
23
39
  minFractionDigits?: number;
40
+ /** Most fraction digits allowed; 3 for numbers, the currency default for amounts. */
24
41
  maxFractionDigits?: number;
42
+ /** Text added before the number, ahead of any currency symbol. */
25
43
  prefix?: string;
44
+ /** Text added after the number, such as a unit. */
26
45
  suffix?: string;
27
46
  }
47
+ /** Formats and parses numbers as the user types them, keeping the caret in place; used by `tx-input-number`. */
28
48
  export declare class TxNumberFormat {
49
+ /** Decimal separator of the locale. */
29
50
  readonly decimal: string;
51
+ /** Group (thousands) separator of the locale. */
30
52
  readonly group: string;
53
+ /** Text shown before the number: prefix and leading currency symbol. */
31
54
  readonly before: string;
55
+ /** Text shown after the number: trailing currency symbol and suffix. */
32
56
  readonly after: string;
57
+ /** Most fraction digits the field accepts. */
33
58
  readonly maxFraction: number;
34
59
  private full;
35
60
  private integer;
36
61
  constructor(options: TxNumberFormatOptions);
62
+ /** Formats a value for display, with prefix, currency and suffix; empty text for `null`. */
37
63
  format(value: number | null): string;
64
+ /** Reformats text while typing and returns the display text with the parsed value. */
38
65
  formatTyping(text: string): {
39
66
  display: string;
40
67
  value: number | null;
41
68
  };
69
+ /** Reads a number from text in this format; `null` when it holds no digits. */
42
70
  parse(text: string): number | null;
71
+ /** Counts the digits and the decimal separator before a caret position. */
43
72
  countBefore(text: string, caret: number): number;
73
+ /** Finds the caret position in the display text after a given count of digits and decimal separator. */
44
74
  caretFor(display: string, count: number): number;
45
75
  private read;
46
76
  private strip;
47
77
  private isDecimal;
48
78
  }
79
+ /**
80
+ * A number field that formats as you type — group separators, decimals and currency of the current locale — with step buttons, keyboard steps and limits. The model is a `number` (or `null`).
81
+ * @see https://tectra-ng.com/components/input-number
82
+ */
49
83
  export declare class TxInputNumber extends TxFormControlBase<number> {
50
84
  private readonly inputNumberTheme;
51
85
  private txIconRegistry;
52
86
  private localeService;
53
87
  private generatedId;
54
88
  private repeatTimer;
89
+ /** `decimal` or `currency` */
55
90
  readonly mode: import("@angular/core").InputSignal<TxInputNumberMode>;
91
+ /** ISO currency code for `currency` mode, e.g. `USD`, `EUR`, `UAH` */
56
92
  readonly currency: import("@angular/core").InputSignal<string | undefined>;
93
+ /** `symbol`, `narrowSymbol`, `code` or `name` */
57
94
  readonly currencyDisplay: import("@angular/core").InputSignal<TxInputNumberCurrencyDisplay>;
95
+ /** Locale of the formatting; the current tectra locale by default */
58
96
  readonly locale: import("@angular/core").InputSignal<string | undefined>;
97
+ /** Thousands separators */
59
98
  readonly useGrouping: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
99
+ /** Fraction digits always shown after the field loses focus */
60
100
  readonly minFractionDigits: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
101
+ /** Fraction digits allowed while typing (3 for decimals, the currency's own for money) */
61
102
  readonly maxFractionDigits: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
103
+ /** Text before the number, e.g. `~` */
62
104
  readonly prefix: import("@angular/core").InputSignal<string | undefined>;
105
+ /** Text after the number, e.g. ` kg` */
63
106
  readonly suffix: import("@angular/core").InputSignal<string | undefined>;
107
+ /** Smallest value; also blocks the minus sign when it is 0 or more */
64
108
  readonly min: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
109
+ /** Largest value */
65
110
  readonly max: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
111
+ /** Step of the buttons and the arrow keys */
66
112
  readonly step: import("@angular/core").InputSignalWithTransform<number, unknown>;
113
+ /** Shows increment / decrement buttons; hold to repeat */
67
114
  readonly showButtons: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
115
+ /** `stacked` (inside the field), `horizontal` (minus left, plus right) or `vertical` */
68
116
  readonly buttonLayout: import("@angular/core").InputSignal<TxInputNumberButtonLayout>;
117
+ /** Icon of the increment button */
69
118
  readonly incrementIcon: import("@angular/core").InputSignal<TxIconName | (string & {}) | undefined>;
119
+ /** Icon of the decrement button */
70
120
  readonly decrementIcon: import("@angular/core").InputSignal<TxIconName | (string & {}) | undefined>;
121
+ /** Allows an empty value; off — an empty field becomes `min` or 0 */
71
122
  readonly allowEmpty: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
123
+ /** Adds a clear button when there is a value */
72
124
  readonly showClear: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
125
+ /** Placeholder of the input */
73
126
  readonly placeholder: import("@angular/core").InputSignal<string | undefined>;
127
+ /** `small`, `medium`, `large` */
74
128
  readonly size: import("@angular/core").InputSignal<TxInputNumberSize>;
129
+ /** `outlined` or `filled` */
75
130
  readonly variant: import("@angular/core").InputSignal<TxInputNumberVariant>;
131
+ /** Takes the full width of its container; inherits `<tx-fluid>` */
76
132
  readonly fluid: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
133
+ /** Red border; without it the field follows its form control */
77
134
  readonly invalid: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
135
+ /** Disables the field (also from the form control) */
78
136
  readonly disabledInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
137
+ /** Shows the value, no editing or steps */
79
138
  readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
139
+ /** Native `required` */
80
140
  readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
141
+ /** Native `name` */
81
142
  readonly name: import("@angular/core").InputSignal<string | undefined>;
143
+ /** Id of the input, for an outside `<label for>` or a float label */
82
144
  readonly inputId: import("@angular/core").InputSignal<string | undefined>;
145
+ /** Accessible name when there is no visible label */
83
146
  readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
147
+ /** Id of the element that names the field */
84
148
  readonly ariaLabelledBy: import("@angular/core").InputSignal<string | undefined>;
149
+ /** Tab order of the input */
85
150
  readonly tabindex: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
86
- readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<{
87
- button: {
88
- width: string;
89
- stackedWidth: string;
90
- background: string;
91
- hoverBackground: string;
92
- activeBackground: string;
93
- color: string;
94
- hoverColor: string;
95
- activeColor: string;
96
- borderColor: string;
97
- iconSize: string;
98
- };
99
- }> | undefined>;
151
+ /** Design tokens of this instance (`inputNumber`); the field itself uses `formField` */
152
+ readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<TectraInputNumberTokens> | undefined>;
153
+ /** Classes and styles of the parts: `root`, `input`, `increment`, `decrement`, `clear` */
100
154
  readonly pt: import("@angular/core").InputSignal<Partial<Record<TxInputNumberPart, import("@tectra-ng/core/config").TxPassThroughValue<TxInputNumber>>> | undefined>;
155
+ /** How `pt` merges with the global pass-through */
101
156
  readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
157
+ /** Removes the tectra styles */
102
158
  readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
159
+ /** `{ value, originalEvent }` after typing, a step or clearing */
103
160
  readonly changed: import("@angular/core").OutputEmitterRef<TxInputNumberChangeEvent>;
161
+ /** The clear button emptied the field */
104
162
  readonly cleared: import("@angular/core").OutputEmitterRef<void>;
105
163
  readonly inputRef: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
106
164
  readonly translations: import("@angular/core").Signal<import("@tectra-ng/core/config").TxTranslations>;
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-input-number.d.ts","names":[],"sources":["../../../../packages/ui/input-number/src/input-number.types.ts","../../../../packages/ui/input-number/src/number-format.ts","../../../../packages/ui/input-number/src/input-number.component.ts"],"mappings":";;;;;;YAAY;YACA;YACA;YACA;YACA;YACA;iBAEK;EACf;EACA,eAAe;;iBCTA;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;qBAWW;WACF;WACA;WACA;WACA;WACA;UACD;UACA;EAEI,YAAA,SAAS;EAuBrB,OAAO;EAYP,aAAa;IAAiB;IAAiB;;EAa/C,MAAM;EAIN,YAAY,cAAc;EAc1B,SAAS,iBAAiB;UAiBlB;UAkBA;UAWA;;qBC7EG,sBAAsB;mBAChB;UAET;UACA;UACA;UACA;WAEC,8BAAI,YAAA;WACJ,kCAAQ;WACR,yCAAe,YAAA;WACf,gCAAM;WACN,qCAAW;WACX,2CAAiB;WACjB,2CAAiB;WACjB,gCAAM;WACN,gCAAM;WACN,6BAAG;WACH,6BAAG;WACH,8BAAI;WACJ,qCAAW;WACX,sCAAY,YAAA;WACZ,uCAAa,YAAA;WACb,uCAAa,YAAA;WACb,oCAAU;WACV,mCAAS;WACT,qCAAW;WACX,8BAAI,YAAA;WACJ,iCAAO,YAAA;WACP,+BAAK;WACL,iCAAO;WAEP,uCAAa;WACb,kCAAQ;WACR,kCAAQ;WACR,8BAAI;WACJ,iCAAO;WACP,mCAAS;WACT,wCAAc;WACd,kCAAQ;WACR,4BAAE,YAAA;;;;;;;;;;;;;;WACF,4BAAE,YAAA,QAAA,OAAA,oDAAA,mBAAA;WACF,mCAAS,YAAA;WACT,kCAAQ;WAER,iCAAO,iBAAA;WACP,iCAAO;WAEP,kCAAQ,OAAA,WAAA;WAER,sCAAY,wCAAA;WACZ,oCAAU;WACV,iCAAO;WACP,mCAAS;WACT,qCAAW,OAAA,QAAA,OAAA,oDAAA;WAEX,mCAAS;WACT,oCAAU;WACV,oCAAU;WACV,oCAAU;WACV,gCAAM,OAAA;WAcN,sCAAY;WACZ,sCAAY;WACZ,2CAAiB;IAwJ4C;IAA0B;;WAvJvF,2CAAiB;IAuJ4C;IAA0B;;WAtJvF,mCAAS;;;;EAaT,WAAW;EAKpB;EAIA,QAAQ,OAAO;EAUf,UAAU,OAAO;EA+BjB;EAIA,OAAO,OAAO;EAMd,YAAY,mBAAmB,OAAO;EAiBtC;EAOA,MAAM,OAAO;UAML;UAUA;UASA;UAUA;UAMA;UAKA;UAOA;SApOG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAa;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA;IAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-input-number.d.ts","names":[],"sources":["../../../../packages/ui/input-number/src/input-number.types.ts","../../../../packages/ui/input-number/src/number-format.ts","../../../../packages/ui/input-number/src/input-number.component.ts"],"mappings":";;;;;;;YACY;;YAEA;;YAEA;;YAEA;;YAEA;;YAEA;;iBAGK;;EAEf;;EAEA,eAAe;;;iBCjBA;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;qBAYW;;WAEF;;WAEA;;WAEA;;WAEA;;WAEA;UACD;UACA;EAEI,YAAA,SAAS;;EAwBrB,OAAO;;EAaP,aAAa;IAAiB;IAAiB;;;EAc/C,MAAM;;EAKN,YAAY,cAAc;;EAe1B,SAAS,iBAAiB;UAiBlB;UAkBA;UAWA;;;;;;qBClGG,sBAAsB;mBAChB;UAET;UACA;UACA;UACA;;WAEC,8BAAI,YAAA;;WACJ,kCAAQ;;WACR,yCAAe,YAAA;;WACf,gCAAM;;WACN,qCAAW;;WACX,2CAAiB;;WACjB,2CAAiB;;WACjB,gCAAM;;WACN,gCAAM;;WACN,6BAAG;;WACH,6BAAG;;WACH,8BAAI;;WACJ,qCAAW;;WACX,sCAAY,YAAA;;WACZ,uCAAa,YAAA;;WACb,uCAAa,YAAA;;WACb,oCAAU;;WACV,mCAAS;;WACT,qCAAW;;WACX,8BAAI,YAAA;;WACJ,iCAAO,YAAA;;WACP,+BAAK;;WACL,iCAAO;;WAEP,uCAAa;;WACb,kCAAQ;;WACR,kCAAQ;;WACR,8BAAI;;WACJ,iCAAO;;WACP,mCAAS;;WACT,wCAAc;;WACd,kCAAQ;;WACR,4BAAE,YAAA,kBAAA;;WACF,4BAAE,YAAA,QAAA,OAAA,oDAAA,mBAAA;;WACF,mCAAS,YAAA;;WACT,kCAAQ;;WAER,iCAAO,iBAAA;;WACP,iCAAO;WAEP,kCAAQ,OAAA,WAAA;WAER,sCAAY,wCAAA;WACZ,oCAAU;WACV,iCAAO;WACP,mCAAS;WACT,qCAAW,OAAA,QAAA,OAAA,oDAAA;WAEX,mCAAS;WACT,oCAAU;WACV,oCAAU;WACV,oCAAU;WACV,gCAAM,OAAA;WAcN,sCAAY;WACZ,sCAAY;WACZ,2CAAiB;IAwJ4C;IAA0B;;WAvJvF,2CAAiB;IAuJ4C;IAA0B;;WAtJvF,mCAAS;;;;EAaT,WAAW;EAKpB;EAIA,QAAQ,OAAO;EAUf,UAAU,OAAO;EA+BjB;EAIA,OAAO,OAAO;EAMd,YAAY,mBAAmB,OAAO;EAiBtC;EAOA,MAAM,OAAO;UAML;UAUA;UASA;UAUA;UAMA;UAKA;UAOA;SApOG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAa;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA;IAAA"}
@@ -2,50 +2,57 @@ import * as i0 from "@angular/core";
2
2
  import { ElementRef } from "@angular/core";
3
3
  import { TxPassThroughOptions } from "@tectra-ng/core/config";
4
4
  import { TxFormControlBase } from "@tectra-ng/core/forms";
5
- import { TectraDeepPartial } from "@tectra-ng/themes";
5
+ import { TectraDeepPartial, TectraInputOtpTokens } from "@tectra-ng/themes";
6
+ /** Size of `tx-input-otp`. */
6
7
  export type TxInputOtpSize = 'small' | 'medium' | 'large';
8
+ /** Look of `tx-input-otp` cells: outlined or filled. */
7
9
  export type TxInputOtpVariant = 'outlined' | 'filled';
10
+ /** Parts of `tx-input-otp` that `pt` can style. */
8
11
  export type TxInputOtpPart = 'root' | 'cell' | 'separator';
12
+ /**
13
+ * A one-time code in separate cells. Typing moves to the next cell, Backspace and the arrow keys move back, a pasted or SMS-filled code spreads over the cells. The value is one string.
14
+ * @see https://tectra-ng.com/components/input-otp
15
+ */
9
16
  export declare class TxInputOtp extends TxFormControlBase<string> {
10
17
  private readonly inputOtpTheme;
11
18
  private generatedId;
19
+ /** Number of cells */
12
20
  readonly length: import("@angular/core").InputSignalWithTransform<number, unknown>;
21
+ /** Accepts digits only and opens the numeric keyboard on phones */
13
22
  readonly integerOnly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
23
+ /** Hides the characters like a password */
14
24
  readonly mask: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
25
+ /** Shows a separator after every this many cells (`3` → `123–456`) */
15
26
  readonly groupSize: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
27
+ /** Focuses the first cell on load */
16
28
  readonly autoFocus: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
29
+ /** `small`, `medium`, `large` */
17
30
  readonly size: import("@angular/core").InputSignal<TxInputOtpSize>;
31
+ /** `outlined` or `filled` */
18
32
  readonly variant: import("@angular/core").InputSignal<TxInputOtpVariant>;
33
+ /** Red borders; without it the cells follow the form control */
19
34
  readonly invalid: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
35
+ /** Disables the cells (also from the form control) */
20
36
  readonly disabledInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
37
+ /** Shows the code, no editing */
21
38
  readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
39
+ /** Base `name` of the cells (`name-0`, `name-1`…) */
22
40
  readonly name: import("@angular/core").InputSignal<string | undefined>;
41
+ /** Id of the first cell, for an outside `<label for>` */
23
42
  readonly inputId: import("@angular/core").InputSignal<string | undefined>;
43
+ /** Accessible name of the group; each cell is "Character 1 of 6" (translated) */
24
44
  readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
45
+ /** Id of the element that names the group */
25
46
  readonly ariaLabelledBy: import("@angular/core").InputSignal<string | undefined>;
26
- readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<{
27
- root: {
28
- gap: string;
29
- cellWidth: string;
30
- cellFontSize: string;
31
- cellFontWeight: string;
32
- separatorColor: string;
33
- separatorWidth: string;
34
- };
35
- sm: {
36
- cellWidth: string;
37
- cellFontSize: string;
38
- gap: string;
39
- };
40
- lg: {
41
- cellWidth: string;
42
- cellFontSize: string;
43
- gap: string;
44
- };
45
- }> | undefined>;
47
+ /** Design tokens of this instance (`inputOtp`); the cells use `formField` */
48
+ readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<TectraInputOtpTokens> | undefined>;
49
+ /** Classes and styles of the parts: `root`, `cell`, `separator` */
46
50
  readonly pt: import("@angular/core").InputSignal<Partial<Record<TxInputOtpPart, import("@tectra-ng/core/config").TxPassThroughValue<TxInputOtp>>> | undefined>;
51
+ /** How `pt` merges with the global pass-through */
47
52
  readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
53
+ /** Removes the tectra styles */
48
54
  readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
55
+ /** Every cell is filled — the full code */
49
56
  readonly completed: import("@angular/core").OutputEmitterRef<string>;
50
57
  readonly cells: import("@angular/core").Signal<readonly ElementRef<HTMLInputElement>[]>;
51
58
  readonly translations: import("@angular/core").Signal<import("@tectra-ng/core/config").TxTranslations>;
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-input-otp.d.ts","names":[],"sources":["../../../../packages/ui/input-otp/src/input-otp.types.ts","../../../../packages/ui/input-otp/src/input-otp.component.ts"],"mappings":";;;;;YAAY;YACA;YACA;qBC8CC,mBAAmB;mBACb;UAET;WAEC,gCAAM;WACN,qCAAW;WACX,8BAAI;WACJ,mCAAS;WACT,mCAAS;WACT,8BAAI,YAAA;WACJ,iCAAO,YAAA;WACP,iCAAO;WAEP,uCAAa;WACb,kCAAQ;WACR,8BAAI;WACJ,iCAAO;WACP,mCAAS;WACT,wCAAc;WACd,4BAAE,YAAA;;;;;;;;;;;;;;;;;;;;WACF,4BAAE,YAAA,QAAA,OAAA,iDAAA,mBAAA;WACF,mCAAS,YAAA;WACT,kCAAQ;WAER,mCAAS;WAET,+BAAK,gBAAA,WAAA;WAEL,sCAAY,wCAAA;WACZ,oCAAU;WACV,qCAAW,OAAA,QAAA,OAAA,iDAAA;WACX,mCAAS;WAET,+BAAK;WACL,iCAAO;WACP,oCAAU;WACV,oCAAU;WACV,iCAAO;WACP,mCAAS;;;;EAWT,WAAW;EAKpB,aAAa;EAKb,UAAU;EAIV;EAIA,QAAQ,OAAO,OAAO;EActB,QAAQ,OAAO,gBAAgB;EAQ/B,UAAU,OAAO,eAAe;EAiChC,QAAQ,OAAO;EAIf;UAIQ;UAMA;UAYA;UAIA;UAMA;SA/JG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAU;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-input-otp.d.ts","names":[],"sources":["../../../../packages/ui/input-otp/src/input-otp.types.ts","../../../../packages/ui/input-otp/src/input-otp.component.ts"],"mappings":";;;;;;YACY;;YAEA;;YAEA;;;;;qBC2CC,mBAAmB;mBACb;UAET;;WAEC,gCAAM;;WACN,qCAAW;;WACX,8BAAI;;WACJ,mCAAS;;WACT,mCAAS;;WACT,8BAAI,YAAA;;WACJ,iCAAO,YAAA;;WACP,iCAAO;;WAEP,uCAAa;;WACb,kCAAQ;;WACR,8BAAI;;WACJ,iCAAO;;WACP,mCAAS;;WACT,wCAAc;;WACd,4BAAE,YAAA,kBAAA;;WACF,4BAAE,YAAA,QAAA,OAAA,iDAAA,mBAAA;;WACF,mCAAS,YAAA;;WACT,kCAAQ;;WAER,mCAAS;WAET,+BAAK,gBAAA,WAAA;WAEL,sCAAY,wCAAA;WACZ,oCAAU;WACV,qCAAW,OAAA,QAAA,OAAA,iDAAA;WACX,mCAAS;WAET,+BAAK;WACL,iCAAO;WACP,oCAAU;WACV,oCAAU;WACV,iCAAO;WACP,mCAAS;;;;EAWT,WAAW;EAKpB,aAAa;EAKb,UAAU;EAIV;EAIA,QAAQ,OAAO,OAAO;EActB,QAAQ,OAAO,gBAAgB;EAQ/B,UAAU,OAAO,eAAe;EAiChC,QAAQ,OAAO;EAIf;UAIQ;UAMA;UAYA;UAIA;UAMA;SA/JG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAU;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA"}
@@ -1,66 +1,33 @@
1
1
  import { TxPassThroughOptions } from "@tectra-ng/core/config";
2
- import { TectraDeepPartial } from "@tectra-ng/themes";
2
+ import { TectraDeepPartial, TectraFormFieldTokens } from "@tectra-ng/themes";
3
3
  import * as i0 from "@angular/core";
4
+ /** Size of `txInput`. */
4
5
  export type TxInputSize = 'small' | 'medium' | 'large';
6
+ /** Look of a form field: outlined or filled. */
5
7
  export type TxFieldVariant = 'outlined' | 'filled';
8
+ /** Parts of `txInput` that `pt` can style. */
6
9
  export type TxInputPart = 'root';
10
+ /**
11
+ * Styles a native `input` or `textarea` with the shared `formField` tokens (also used by select, password, number…). Native `readonly` and `disabled` are styled too. Works with `[formControl]`, `ngModel` and signal forms as is — it is the native element.
12
+ * @see https://tectra-ng.com/components/input
13
+ */
7
14
  export declare class TxInput {
8
15
  private readonly inputTheme;
16
+ /** Red border and `aria-invalid`. Without it the field follows its form control: invalid once touched or changed */
9
17
  readonly invalid: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
18
+ /** `small`, `medium`, `large` */
10
19
  readonly size: import("@angular/core").InputSignal<TxInputSize>;
20
+ /** `outlined` (border) or `filled` (tinted background) */
11
21
  readonly variant: import("@angular/core").InputSignal<TxFieldVariant>;
22
+ /** Takes the full width of its container; inherits `<tx-fluid>` */
12
23
  readonly fluid: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
13
- readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<{
14
- root: {
15
- background: string;
16
- filledBackground: string;
17
- filledHoverBackground: string;
18
- filledFocusBackground: string;
19
- disabledBackground: string;
20
- readonlyBackground: string;
21
- borderColor: string;
22
- hoverBorderColor: string;
23
- focusBorderColor: string;
24
- invalidBorderColor: string;
25
- color: string;
26
- disabledColor: string;
27
- placeholderColor: string;
28
- filledPlaceholderColor: string;
29
- invalidPlaceholderColor: string;
30
- iconColor: string;
31
- shadow: string;
32
- borderRadius: string;
33
- paddingX: string;
34
- paddingY: string;
35
- fontSize: string;
36
- lineHeight: string;
37
- sm: {
38
- paddingX: string;
39
- paddingY: string;
40
- fontSize: string;
41
- lineHeight: string;
42
- };
43
- lg: {
44
- paddingX: string;
45
- paddingY: string;
46
- fontSize: string;
47
- lineHeight: string;
48
- };
49
- focusRing: {
50
- shadow: string;
51
- width: string;
52
- style: string;
53
- color: string;
54
- offset: string;
55
- };
56
- invalidFocusRing: {
57
- shadow: string;
58
- };
59
- transitionDuration: string;
60
- };
61
- }> | undefined>;
24
+ /** `formField` design tokens of this one field */
25
+ readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<TectraFormFieldTokens> | undefined>;
26
+ /** Extra `class` / `style` on the `root` (the input itself) */
62
27
  readonly pt: import("@angular/core").InputSignal<Partial<Record<"root", import("@tectra-ng/core/config").TxPassThroughValue<TxInput>>> | undefined>;
28
+ /** How this `pt` meets the global one */
63
29
  readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
30
+ /** Drops all tectra styles */
64
31
  readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
65
32
  readonly isInvalid: import("@angular/core").Signal<boolean>;
66
33
  readonly isFilled: import("@angular/core").Signal<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-input.d.ts","names":[],"sources":["../../../../packages/ui/input/src/input.types.ts","../../../../packages/ui/input/src/input.directive.ts"],"mappings":";;;YAAY;YACA;YACA;qBCwBC;mBACM;WAER,iCAAO;WACP,8BAAI,YAAA;WACJ,iCAAO,YAAA;WACP,+BAAK;WACL,4BAAE,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACF,4BAAE,YAAA,QAAA,gDAAA,mBAAA;WACF,mCAAS,YAAA;WACT,kCAAQ;WAER,mCAAS;WACT,kCAAQ;WACR,iCAAO;WACP,oCAAU;WACV,qCAAW,OAAA,QAAA,gDAAA;WACX,mCAAS;;;;SAjBP,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAO;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-input.d.ts","names":[],"sources":["../../../../packages/ui/input/src/input.types.ts","../../../../packages/ui/input/src/input.directive.ts"],"mappings":";;;;YACY;;YAEA;;YAEA;;;;;qBCqBC;mBACM;;WAER,iCAAO;;WACP,8BAAI,YAAA;;WACJ,iCAAO,YAAA;;WACP,+BAAK;;WACL,4BAAE,YAAA,kBAAA;;WACF,4BAAE,YAAA,QAAA,gDAAA,mBAAA;;WACF,mCAAS,YAAA;;WACT,kCAAQ;WAER,mCAAS;WACT,kCAAQ;WACR,iCAAO;WACP,oCAAU;WACV,qCAAW,OAAA,QAAA,gDAAA;WACX,mCAAS;;;;SAjBP,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAO;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
@@ -1,17 +1,31 @@
1
1
  import { AbstractControl, ValidationErrors, Validator } from "@angular/forms";
2
2
  import * as i0 from "@angular/core";
3
+ /** Ready-made character sets for `txKeyFilter`, such as digits, letters, hex or email characters. */
3
4
  export type TxKeyFilterPreset = 'pint' | 'int' | 'pnum' | 'num' | 'money' | 'hex' | 'email' | 'alpha' | 'alphanum' | 'latin' | 'positive' | 'nospace';
5
+ /** What a key filter allows: a pattern for each character and an optional pattern for the whole text. */
4
6
  export interface TxKeyFilterRule {
7
+ /** Each typed or pasted character must match this pattern. */
5
8
  char: RegExp;
9
+ /** The whole text must match this pattern as well, when set. */
6
10
  value?: RegExp;
7
11
  }
12
+ /** Rule of every `TxKeyFilterPreset`. */
8
13
  export declare const TX_KEY_FILTER_PRESETS: Record<TxKeyFilterPreset, TxKeyFilterRule>;
14
+ /** Builds the rule of a preset or pattern, optionally allowing the extra characters. */
9
15
  export declare function txKeyFilterRule(filter: TxKeyFilterPreset | RegExp, extra?: string): TxKeyFilterRule;
16
+ /** Tells whether a text passes a rule: every character matches and, when set, so does the whole text. */
10
17
  export declare function txKeyFilterAccepts(rule: TxKeyFilterRule, text: string): boolean;
18
+ /**
19
+ * Lets only allowed characters into an `input` or `textarea`: blocks typing, cleans pasted and dropped text. With `validateOnly` it does not block anything and reports a `keyFilter` error to the form instead.
20
+ * @see https://tectra-ng.com/components/key-filter
21
+ */
11
22
  export declare class TxKeyFilter implements Validator {
12
23
  private elementRef;
24
+ /** A preset name or a `RegExp` that one character must match */
13
25
  readonly txKeyFilter: import("@angular/core").InputSignal<RegExp | TxKeyFilterPreset>;
26
+ /** Extra characters allowed on top of the preset, e.g. `'-_ '` */
14
27
  readonly keyFilterExtra: import("@angular/core").InputSignal<string>;
28
+ /** Do not block input; add a `keyFilter` error to the form control when the value has other characters */
15
29
  readonly validateOnly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
16
30
  readonly rule: import("@angular/core").Signal<import("@tectra-ng/ui/key-filter").TxKeyFilterRule>;
17
31
  onBeforeInput(inputEvent: Event): void;
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-key-filter.d.ts","names":[],"sources":["../../../../packages/ui/key-filter/src/key-filter.types.ts","../../../../packages/ui/key-filter/src/key-filter.presets.ts","../../../../packages/ui/key-filter/src/key-filter.directive.ts"],"mappings":";;YAAY;iBAcK;EACf,MAAM;EACN,QAAQ;;qBCdG,uBAAuB,OAAO,mBAAmB;wBAe9C,gBAAgB,QAAQ,oBAAoB,QAAQ,iBAAa;wBASjE,mBAAmB,MAAM,iBAAiB;qBCV7C,uBAAuB;UAC1B;WAEC,qCAAW,YAAA,SAAA;WACX,wCAAc;WACd,sCAAY;WAEZ,8BAAI,0CAAA;EAEb,cAAc,YAAY;EAU1B,QAAQ,OAAO;EAOf,OAAO,OAAO;EAOd,SAAS,SAAS,kBAAkB;UAQ5B;UAgBA;UAQA;SAjEG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAW;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-key-filter.d.ts","names":[],"sources":["../../../../packages/ui/key-filter/src/key-filter.types.ts","../../../../packages/ui/key-filter/src/key-filter.presets.ts","../../../../packages/ui/key-filter/src/key-filter.directive.ts"],"mappings":";;;YACY;;iBAeK;;EAEf,MAAM;;EAEN,QAAQ;;;qBCjBG,uBAAuB,OAAO,mBAAmB;;wBAgB9C,gBAAgB,QAAQ,oBAAoB,QAAQ,iBAAa;;wBAUjE,mBAAmB,MAAM,iBAAiB;;;;;qBCb7C,uBAAuB;UAC1B;;WAEC,qCAAW,YAAA,SAAA;;WACX,wCAAc;;WACd,sCAAY;WAEZ,8BAAI,0CAAA;EAEb,cAAc,YAAY;EAU1B,QAAQ,OAAO;EAOf,OAAO,OAAO;EAOd,SAAS,SAAS,kBAAkB;UAQ5B;UAgBA;UAQA;SAjEG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAW;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
@@ -2,61 +2,81 @@ import * as i0 from "@angular/core";
2
2
  import { ElementRef, TemplateRef } from "@angular/core";
3
3
  import { TxPassThroughOptions } from "@tectra-ng/core/config";
4
4
  import { TxFormControlBase } from "@tectra-ng/core/forms";
5
- import { TectraDeepPartial } from "@tectra-ng/themes";
5
+ import { TectraDeepPartial, TectraKnobTokens } from "@tectra-ng/themes";
6
+ /** Shape of the knob track: `dial` is a 270° arc with a gap at the bottom, `ring` a full circle. */
6
7
  export type TxKnobArc = 'dial' | 'ring';
8
+ /** Parts of `tx-knob` that `pt` can style. */
7
9
  export type TxKnobPart = 'root' | 'svg' | 'range' | 'value' | 'handle' | 'text';
10
+ /** Event of `changed`: the user moved the knob. */
8
11
  export interface TxKnobChangeEvent {
12
+ /** New value. */
9
13
  value: number;
14
+ /** Pointer or keyboard event that moved the knob. */
10
15
  originalEvent: Event;
11
16
  }
17
+ /** Context of a `txKnobValue` template: the text in the middle. */
12
18
  export interface TxKnobValueContext {
19
+ /** Current value. */
13
20
  $implicit: number;
14
21
  }
22
+ /**
23
+ * `<ng-template txKnobValue let-value>` — own content in the middle
24
+ * @see https://tectra-ng.com/components/knob
25
+ */
15
26
  export declare class TxKnobValueTemplate {
16
27
  readonly templateRef: TemplateRef<TxKnobValueContext>;
17
28
  static ɵfac: i0.ɵɵFactoryDeclaration<TxKnobValueTemplate, never>;
18
29
  static ɵdir: i0.ɵɵDirectiveDeclaration<TxKnobValueTemplate, "ng-template[txKnobValue]", never, {}, {}, never, never, true, never>;
19
30
  }
31
+ /**
32
+ * A value on a dial: drag along the ring or use the keyboard. `arc="dial"` leaves a gap at the bottom (270°), `arc="ring"` is a full circle with a handle. `limit` caps the value below `max` and shows the unreachable part of the ring.
33
+ * @see https://tectra-ng.com/components/knob
34
+ */
20
35
  export declare class TxKnob extends TxFormControlBase<number> {
21
36
  private readonly knobTheme;
22
37
  private localeService;
23
38
  private lastFraction;
39
+ /** Smallest value */
24
40
  readonly min: import("@angular/core").InputSignalWithTransform<number, unknown>;
41
+ /** Largest value of the scale */
25
42
  readonly max: import("@angular/core").InputSignalWithTransform<number, unknown>;
43
+ /** Step of dragging and the arrow keys */
26
44
  readonly step: import("@angular/core").InputSignalWithTransform<number, unknown>;
45
+ /** Largest value you can set, below `max`; the rest of the ring is marked */
27
46
  readonly limit: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
47
+ /** Width and height in px */
28
48
  readonly size: import("@angular/core").InputSignalWithTransform<number, unknown>;
49
+ /** Thickness of the ring, in units of a 100 × 100 box */
29
50
  readonly strokeWidth: import("@angular/core").InputSignalWithTransform<number, unknown>;
51
+ /** `dial` (270°, gap at the bottom) or `ring` (full circle from the top) */
30
52
  readonly arc: import("@angular/core").InputSignal<TxKnobArc>;
53
+ /** Shows the value in the middle */
31
54
  readonly showValue: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
55
+ /** Shows a handle at the end of the value; on by default for `ring` */
32
56
  readonly showHandle: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
57
+ /** Text of the value, `{value}` is replaced (formatted for the locale), e.g. `{value}%` */
33
58
  readonly valueTemplate: import("@angular/core").InputSignal<string>;
59
+ /** Red ring; without it the knob follows its form control */
34
60
  readonly invalid: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
61
+ /** Disables the knob (also from the form control) */
35
62
  readonly disabledInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
63
+ /** Shows the value, ignores dragging and keys */
36
64
  readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
65
+ /** Accessible name of the knob */
37
66
  readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
67
+ /** Id of the element that names the knob */
38
68
  readonly ariaLabelledBy: import("@angular/core").InputSignal<string | undefined>;
69
+ /** Tab order */
39
70
  readonly tabindex: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
40
- readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<{
41
- root: {
42
- valueColor: string;
43
- rangeColor: string;
44
- limitColor: string;
45
- textColor: string;
46
- textFontSize: string;
47
- textFontWeight: string;
48
- handleColor: string;
49
- handleBorderColor: string;
50
- disabledOpacity: string;
51
- focusRingColor: string;
52
- focusRingWidth: string;
53
- focusRingOffset: string;
54
- transitionDuration: string;
55
- };
56
- }> | undefined>;
71
+ /** Design tokens of this instance (`knob`): value, range, limit, text and handle colours */
72
+ readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<TectraKnobTokens> | undefined>;
73
+ /** Classes and styles of the parts: `root`, `svg`, `range`, `value`, `handle`, `text` */
57
74
  readonly pt: import("@angular/core").InputSignal<Partial<Record<TxKnobPart, import("@tectra-ng/core/config").TxPassThroughValue<TxKnob>>> | undefined>;
75
+ /** How `pt` merges with the global pass-through */
58
76
  readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
77
+ /** Removes the tectra styles */
59
78
  readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
79
+ /** `{ value, originalEvent }` while dragging or after a key */
60
80
  readonly changed: import("@angular/core").OutputEmitterRef<TxKnobChangeEvent>;
61
81
  readonly template: import("@angular/core").Signal<TxKnobValueTemplate | undefined>;
62
82
  readonly svg: import("@angular/core").Signal<ElementRef<SVGSVGElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-knob.d.ts","names":[],"sources":["../../../../packages/ui/knob/src/knob.types.ts","../../../../packages/ui/knob/src/knob-templates.directive.ts","../../../../packages/ui/knob/src/knob.component.ts"],"mappings":";;;;;YAAY;YACA;iBAEK;EACf;EACA,eAAe;;iBAGA;EACf;;qBCLW;WACF,aAAW,YAAA;SADT,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;;qBCgCA,eAAe;mBACT;UAET;UACA;WAEC,6BAAG;WACH,6BAAG;WACH,8BAAI;WACJ,+BAAK;WACL,8BAAI;WACJ,qCAAW;WACX,6BAAG,YAAA;WACH,mCAAS;WACT,oCAAU;WACV,uCAAa;WACb,iCAAO;WAEP,uCAAa;WACb,kCAAQ;WACR,mCAAS;WACT,wCAAc;WACd,kCAAQ;WACR,4BAAE,YAAA;;;;;;;;;;;;;;;;;WACF,4BAAE,YAAA,QAAA,OAAA,6CAAA,mBAAA;WACF,mCAAS,YAAA;WACT,kCAAQ;WAER,iCAAO,iBAAA;WAEP,kCAAQ,OAAA;WACR,6BAAG,OAAA,WAAA;WAEH,oCAAU;WACV,mCAAS;WACT,qCAAW,OAAA,QAAA,OAAA,6CAAA;WAEX,oCAAU;WACV,oCAAU;WACV,oCAAU;WACV,iCAAO;WACP,iCAAO;WACP,gCAAM;WACN,+BAAK;WACL,+BAAK;WACL,8BAAI;WACJ,mCAAS;WACT,kCAAQ;WACR,uCAAa;WACb,gCAAM;WACN,mCAAS;WACT,mCAAS;WACT,mCAAS;WACT,gCAAM;IAqGuB;IAAW;;WApGxC,8BAAI;WACJ,mCAAS;;;;WAOT;EAET,cAAc,OAAO;EAYrB,cAAc,OAAO;EAMrB;EAOA,UAAU,OAAO;EAsBjB;UAIQ;UAoBA;UAUA;UAIA;UAKA;SA1JG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAM;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-knob.d.ts","names":[],"sources":["../../../../packages/ui/knob/src/knob.types.ts","../../../../packages/ui/knob/src/knob-templates.directive.ts","../../../../packages/ui/knob/src/knob.component.ts"],"mappings":";;;;;;YACY;;YAEA;;iBAGK;;EAEf;;EAEA,eAAe;;;iBAIA;;EAEf;;;;;;qBCZW;WACF,aAAW,YAAA;SADT,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;;;;;;qBCgCA,eAAe;mBACT;UAET;UACA;;WAEC,6BAAG;;WACH,6BAAG;;WACH,8BAAI;;WACJ,+BAAK;;WACL,8BAAI;;WACJ,qCAAW;;WACX,6BAAG,YAAA;;WACH,mCAAS;;WACT,oCAAU;;WACV,uCAAa;;WACb,iCAAO;;WAEP,uCAAa;;WACb,kCAAQ;;WACR,mCAAS;;WACT,wCAAc;;WACd,kCAAQ;;WACR,4BAAE,YAAA,kBAAA;;WACF,4BAAE,YAAA,QAAA,OAAA,6CAAA,mBAAA;;WACF,mCAAS,YAAA;;WACT,kCAAQ;;WAER,iCAAO,iBAAA;WAEP,kCAAQ,OAAA;WACR,6BAAG,OAAA,WAAA;WAEH,oCAAU;WACV,mCAAS;WACT,qCAAW,OAAA,QAAA,OAAA,6CAAA;WAEX,oCAAU;WACV,oCAAU;WACV,oCAAU;WACV,iCAAO;WACP,iCAAO;WACP,gCAAM;WACN,+BAAK;WACL,+BAAK;WACL,8BAAI;WACJ,mCAAS;WACT,kCAAQ;WACR,uCAAa;WACb,gCAAM;WACN,mCAAS;WACT,mCAAS;WACT,mCAAS;WACT,gCAAM;IAqGuB;IAAW;;WApGxC,8BAAI;WACJ,mCAAS;;;;WAOT;EAET,cAAc,OAAO;EAYrB,cAAc,OAAO;EAMrB;EAOA,UAAU,OAAO;EAsBjB;UAIQ;UAoBA;UAUA;UAIA;UAKA;SA1JG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAM;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA"}