@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
package/README.md CHANGED
@@ -53,7 +53,7 @@ Every component takes `dt` (design tokens of this instance), `pt` / `ptOptions`
53
53
 
54
54
  | Group | `@tectra-ng/ui/…` |
55
55
  |---|---|
56
- | Form | `autocomplete`, `cascade-select`, `checkbox`, `chips-input`, `color-picker`, `country-select`, `datepicker`, `email-suggestion`, `field`, `icon-field`, `input`, `input-group`, `input-mask`, `input-number`, `input-otp`, `key-filter`, `knob`, `label`, `list-input`, `listbox`, `mention-textarea`, `multiselect`, `password`, `password-generator`, `radio-button`, `rating`, `select`, `slider`, `textarea`, `toggle-button`, `toggle-switch`, `tree-select` |
56
+ | Form | `autocomplete`, `cascade-select`, `checkbox`, `chips-input`, `color-picker`, `color-swatches`, `country-select`, `datepicker`, `email-suggestion`, `field`, `icon-field`, `input`, `input-group`, `input-mask`, `input-number`, `input-otp`, `key-filter`, `knob`, `label`, `list-input`, `listbox`, `mention-textarea`, `multiselect`, `password`, `password-generator`, `radio-button`, `rating`, `select`, `select-button`, `slider`, `textarea`, `toggle-button`, `toggle-switch`, `tree-select` |
57
57
  | Actions | `button`, `button-group`, `speed-dial`, `split-button` |
58
58
  | Data | `data-view`, `export`, `month-calendar`, `paginator`, `sparkline`, `stat-tiles`, `table`, `timeline`, `tree`, `tree-table`, `virtual-scroller` |
59
59
  | Overlay | `confirm`, `dialog`, `drawer`, `menu`, `popover`, `toast`, `tooltip` |
package/amount/README.md CHANGED
@@ -7,14 +7,14 @@ A number or a sum of money formatted for the current locale — grouping, decima
7
7
  <tx-amount [amount]="delta" [signColor]="true" [showSign]="true" />
8
8
  ```
9
9
 
10
- `format` uses the digits notation `minInteger.minFraction-maxFraction`: `1.0-2` (default, up to two decimals), `1.2-2` (always two), `1.0-0` (whole numbers). `formatAmount(value, options)` returns the formatted parts for own markup.
10
+ `format` uses the digits notation `minInteger.minFraction-maxFraction`: `1.0-2` (up to two decimals), `1.2-2` (always two), `1.0-0` (whole numbers). Without it a sum of money shows the digits of its currency (`$318.60`, `¥318`) and a plain number shows up to two decimals. `formatAmount(value, options)` returns the formatted parts for own markup.
11
11
 
12
12
  ## Inputs
13
13
  | Name | Description |
14
14
  |---|---|
15
15
  | amount | The number; `null` or `undefined` shows `emptyText` |
16
16
  | currency | ISO 4217 code (`USD`, `EUR`, `UAH`); an unknown code is shown after the number as is |
17
- | format | Digits: `minInteger.minFraction-maxFraction` |
17
+ | format | Digits: `minInteger.minFraction-maxFraction`; by default the currency's own digits, or `1.0-2` without a currency |
18
18
  | notation | `standard` or `compact` (`1.2K`, `3.4M`) |
19
19
  | currencyDisplay | `narrowSymbol` ($), `symbol` (US$), `code` (USD) or `name` (US dollars) |
20
20
  | showSign | Adds `+` to positive numbers |
@@ -10,7 +10,7 @@ A clock face with hour and minute hands (and an optional second hand) that shows
10
10
  | Name | Description |
11
11
  |---|---|
12
12
  | timezone | IANA time zone such as `Europe/Kyiv`; empty or unknown is the local time |
13
- | time | A fixed time (`Date` or ms) instead of the running clock |
13
+ | time | A fixed time (`Date`, ms or an ISO string) instead of the running clock; an invalid string shows the running clock |
14
14
  | showSeconds | Adds a second hand; the clock then updates every second instead of every minute |
15
15
  | ariaLabel | Text before the time in the accessible name, e.g. the city |
16
16
  | dt | Design tokens of this instance (`analogClock`) |
@@ -28,4 +28,5 @@ A clock face with hour and minute hands (and an optional second hand) that shows
28
28
  - The face is `role="img"` named by the time (`14:30`, after `ariaLabel` when set).
29
29
  - Hands turn with a soft spring and always forward — from :59 to :00 they go on, not back around the face; with reduced motion they jump.
30
30
  - The clock updates at the start of each minute (or second), so it stays exact without polling.
31
- - `txAnalogClockHands` (pipe) and `clockHands(ms, timezone)` return `{ time, hourAngle, minuteAngle, secondAngle }`.
31
+ - The face is always round: its width is the `size` token (`210px`), at most the width of its container, and the height follows; ticks and hands are sized in percent of the face.
32
+ - `txAnalogClockHands` (pipe) and `clockHands(time, timezone)` (a `Date`, ms or an ISO string) return `{ time, hourAngle, minuteAngle, secondAngle }`.
@@ -13,7 +13,7 @@ A text field that suggests values while you type. Free text, or only a suggestio
13
13
  | optionGroupLabel | Field of a group shown as its header |
14
14
  | optionGroupChildren | Field of a group that holds its items |
15
15
  | dataKey | Field that identifies an object value |
16
- | multiple | Several values shown as chips; the value is an array |
16
+ | multiple | Several values shown as chips; the value is an array. Without focus the chips stay on one line and the ones that do not fit are counted in a `+N` chip; with focus they wrap so every value shows |
17
17
  | dropdown | Button that shows suggestions without typing |
18
18
  | dropdownMode | `blank` (asks with an empty query) or `current` (with the typed text) |
19
19
  | dropdownIcon | Icon name of the dropdown button |
package/avatar/README.md CHANGED
@@ -23,7 +23,7 @@ A person or an item as a small picture: a photo, otherwise initials from the nam
23
23
  | shape | `circle` or `square` (inherits the group) |
24
24
  | tone | Own colour instead of the one picked from the name: `blue`, `green`, `sky`, `orange`, `purple`, `red` |
25
25
  | ariaLabel | Accessible name instead of `name`; without both the avatar is decorative |
26
- | tooltip | Shows `name` (or `ariaLabel`) in a tooltip instead of the native title; inherits `tooltips` of the group, off on its own |
26
+ | tooltip | Shows `name` (or `ariaLabel`) in a tooltip instead of the native title; `none` shows no hint at all (neither tooltip nor title); inherits `tooltips` of the group, off on its own |
27
27
  | tooltipPlacement | Where the name tooltip opens (`top` by default) |
28
28
  | max | `tx-avatar-group`: shows this many avatars and a `+N` button; it opens a popover that lists the hidden ones (avatar + name) |
29
29
  | tooltips | `tx-avatar-group`: name tooltip on every avatar (on by default) |
@@ -19,7 +19,7 @@ items: TxBreadcrumbItem[] = [{ label: 'Projects', routerLink: '/projects' }, { l
19
19
  | separator | `chevron` (default) or `slash` |
20
20
  | ariaLabel | Label of the navigation landmark ("Breadcrumb" by default, translated) |
21
21
  | dt | Design tokens of this instance (`breadcrumb`) |
22
- | pt | Classes and styles of the parts: `root`, `list`, `item`, `link`, `icon`, `label`, `separator` |
22
+ | pt | Classes and styles of the parts: `root`, `list`, `item`, `link` (links, commands, the current page and disabled items), `text` (an item without a link or command), `icon`, `label`, `separator` |
23
23
  | ptOptions | How `pt` merges with the global pass-through |
24
24
  | unstyled | Removes the tectra styles |
25
25
 
@@ -1,8 +1,40 @@
1
1
  # ButtonGroup
2
2
 
3
- Joins buttons into one segmented control: shared borders, outer corners only. Put `txButton` buttons inside.
3
+ Joins related `txButton` buttons into one block: the inner corners go square, neighbouring borders merge into one line, and only the outer corners stay rounded. Use it for a few actions on the same object (save / delete / cancel), for a pager or a zoom control, or as the base of a split button. For a choice between options that stays selected use `tx-select-button` or `tx-tabs` instead — a button group only triggers actions.
4
+
5
+ Solid buttons next to each other get a thin divider in their own text colour, faded (`buttonGroup.dividerColor` and `buttonGroup.dividerWidth` tokens), so the group does not read as one wide button; outlined buttons share their border instead. The divider sits on the shared edge and stays in place while either neighbour is hovered or pressed.
6
+
7
+ Every button keeps its own inputs: severity, size, variant, icon, badge, loading and disabled work inside a group as they do alone. Give all buttons of a group the same size and variant.
8
+
9
+ ```html
10
+ <tx-button-group aria-label="Document actions">
11
+ <button txButton icon="check">Save</button>
12
+ <button txButton icon="trash">Delete</button>
13
+ <button txButton icon="times">Cancel</button>
14
+ </tx-button-group>
15
+ ```
16
+
17
+ ## Inputs
18
+ | Name | Description |
19
+ |---|---|
20
+ | orientation | `horizontal` (default) puts the buttons in a row, `vertical` stacks them in a column with the divider between rows |
21
+ | fluid | The group takes the full width of its container and the buttons share it equally; without the input it follows a parent `<tx-fluid>` |
22
+ | dt | Design tokens of this one group, e.g. `{ root: { dividerColor: 'var(--tx-surface-0)', dividerWidth: '2px' } }` |
23
+ | pt | Extra `class` / `style` for the `root` part — an object or a function `({ instance }) => ({ class, style })` |
24
+ | ptOptions | How this `pt` meets the global one from `provideTectra({ pt })`: `mergeSections` (default `true`), `mergeProps` (default `false`) |
25
+ | unstyled | Drops the joined borders, square inner corners and the divider; the classes `tx-button-group`, `tx-button-group--vertical` and `tx-button-group--fluid` stay for your own CSS; default from `provideTectra({ unstyled })` |
26
+
27
+ ## Slots
28
+ | Name | Description |
29
+ |---|---|
30
+ | default | The `txButton` buttons (`button` or `a`) of the group |
4
31
 
5
32
  ## Keyboard
6
33
  | Key | Action |
7
34
  |---|---|
8
- | Tab | Moves focus from one button to the next |
35
+ | Tab | Moves focus from one button to the next; disabled buttons are skipped |
36
+ | Enter / Space | Triggers the focused button |
37
+
38
+ ## Accessibility
39
+
40
+ The host has `role="group"`. Give it a name with `aria-label` (or `aria-labelledby`) when the buttons alone do not say what they act on, and give icon-only buttons their own `aria-label`. A focused or hovered button is drawn above its neighbours, so the focus ring is never cut by the next button.
@@ -43,6 +43,13 @@ Shows a list of items a few at a time and pages through them with buttons, indic
43
43
  | txCarouselHeader | Content above the carousel |
44
44
  | txCarouselFooter | Content below the carousel |
45
45
 
46
+ The item template takes the items only for typing — `<ng-template txCarouselItem [txCarouselItemOf]="products" let-product>` gives `product` the item type in strict templates; without it the item stays untyped.
47
+
48
+ ## Inputs — item template
49
+ | Name | Description |
50
+ |---|---|
51
+ | txCarouselItemOf | `txCarouselItem`: the items, only for the type of `let-item` |
52
+
46
53
  ## Keyboard
47
54
  | Key | Action |
48
55
  |---|---|
@@ -5,6 +5,7 @@ A text field that turns what you type into chips — keywords, tags, emails, dom
5
5
  ## Inputs
6
6
  | Name | Description |
7
7
  |---|---|
8
+ | text | Typed text that is not a chip yet; two-way with `[(text)]` — setting it updates the field |
8
9
  | placeholder | Text shown while the field is empty |
9
10
  | separator | Text or pattern that ends a chip while typing and splits pasted text (`,` by default); Enter always adds |
10
11
  | addOnBlur | Adds the typed text when the field loses focus (on by default) |
@@ -32,6 +33,15 @@ A text field that turns what you type into chips — keywords, tags, emails, dom
32
33
  | added | A chip was added: `{ value, values }` |
33
34
  | removed | A chip was removed: `{ value, values }` |
34
35
  | rejected | A value was not added — duplicate, over `max` or not matching `itemPattern`: `{ value, values }` |
36
+ | textChange | The typed text changed |
37
+
38
+ ## Methods
39
+ | Name | Description |
40
+ |---|---|
41
+ | add(value) | Adds a chip or a list of chips with the same checks as typing (duplicates, `max`, `maxLength`, `itemPattern`); emits `added` / `rejected`; does nothing when disabled or read-only. The typed text stays |
42
+ | clearText() | Clears the typed text and keeps the chips |
43
+ | clear() | Removes every chip and the typed text |
44
+ | removeAt(index) | Removes the chip at the index |
35
45
 
36
46
  ## Slots
37
47
  | Name | Description |
@@ -0,0 +1,53 @@
1
+ # ColorSwatches
2
+
3
+ A radio group of color dots: picks one value from a few colors — a theme color, a label color, a calendar color. The picked dot gets a ring and a check mark. A `ControlValueAccessor` — works with `[formControl]`, `ngModel` and signal forms.
4
+
5
+ ```html
6
+ <tx-color-swatches ariaLabel="Label color" [options]="colors" formControlName="color" />
7
+ ```
8
+
9
+ ```ts
10
+ readonly colors: TxColorSwatchOption[] = [
11
+ { value: 'red', color: '#ef4444', label: 'Red' },
12
+ { value: 'green', color: '#22c55e', label: 'Green' },
13
+ ];
14
+ ```
15
+
16
+ The value is the `value` of the picked option; any CSS color works for `color`. The `label` names the dot for screen readers and shows as its tooltip.
17
+
18
+ ## Inputs
19
+ | Name | Description |
20
+ |---|---|
21
+ | options | The dots: `{ value, color, label, disabled? }` |
22
+ | columns | Number of dots per row; without it the dots wrap to the width |
23
+ | size | `small`, `medium`, `large` |
24
+ | invalid | Red rings and `aria-invalid`; without it the control follows its form control |
25
+ | disabled | Disables every dot (also from the form control) |
26
+ | readonly | Shows the value, ignores clicks; the arrow keys still move focus |
27
+ | ariaLabel | Accessible name of the group |
28
+ | ariaLabelledBy | Id of the element that names the group |
29
+ | dt | Design tokens of this instance (`colorSwatches`) |
30
+ | pt | Classes and styles of the parts: `root`, `group`, `swatch`, `check` |
31
+ | ptOptions | How `pt` merges with the global pass-through |
32
+ | unstyled | Removes the tectra styles |
33
+
34
+ ## Outputs
35
+ | Name | Description |
36
+ |---|---|
37
+ | changed | `{ value, originalEvent }` after a click or a key picked a dot |
38
+
39
+ ## Methods
40
+ | Name | Description |
41
+ |---|---|
42
+ | focus | Moves focus to the picked dot, or to the first one that can be picked |
43
+
44
+ ## Keyboard
45
+ | Key | Action |
46
+ |---|---|
47
+ | Tab | Moves focus into the group (to the picked dot) and out of it |
48
+ | Arrow Right / Down | Picks the next dot, from the last back to the first |
49
+ | Arrow Left / Up | Picks the previous dot, from the first to the last |
50
+ | Home / End | Picks the first / last dot |
51
+ | Space | Picks the focused dot |
52
+
53
+ Disabled dots are skipped.
@@ -61,6 +61,17 @@ Shows a collection with your own list and grid templates — cards of products,
61
61
  | txDataViewPaginatorStart | `<ng-template txDataViewPaginatorStart let-state>` — content at the start of the paginator |
62
62
  | txDataViewPaginatorEnd | `<ng-template txDataViewPaginatorEnd let-state>` — content at the end of the paginator |
63
63
 
64
+ Give the list and grid templates the items for typing — `<ng-template txDataViewList [txDataViewListOf]="products" let-items>` — and `items` gets their type in strict templates; without it they stay untyped.
65
+
66
+ ## Inputs — item templates
67
+ | Name | Description |
68
+ |---|---|
69
+ | txDataViewListOf | `txDataViewList`: the items, only for the type of `let-items` |
70
+ | txDataViewGridOf | `txDataViewGrid`: the items, only for the type of `let-items` |
71
+
72
+ ## Frame
73
+ The data view is a content surface like a card: its corner radius and shadow come from `--tx-content-radius` and `--tx-content-shadow`, and the corners clip the header, items and paginator. The items get an inset from the `content.padding` token (none by default, for full-width rows) and `content.gridPadding` in the grid layout (12.25px), so cards never touch the rounded edge.
74
+
64
75
  ## Layout switch
65
76
  `<tx-data-view-layout [(layout)]="layout" />` — two toggle buttons (list, grid) with `aria-pressed`.
66
77
 
@@ -6,6 +6,7 @@ import { optionalBoolean } from "@tectra-ng/core/utils";
6
6
  import { amountTokens, toStyleObject } from "@tectra-ng/themes";
7
7
  import { provideTxIconDefaults, txIconCode } from "@tectra-ng/icons";
8
8
  const DIGITS_INFO = /^(\d+)?(?:\.(\d+))?(?:-(\d+))?$/;
9
+ const DEFAULT_FORMAT = "1.0-2";
9
10
  function parseDigitsInfo(format) {
10
11
  const match = DIGITS_INFO.exec((format ?? "").trim());
11
12
  if (!match) return {};
@@ -32,24 +33,25 @@ function toSegments(parts) {
32
33
  return segments;
33
34
  }
34
35
  function formatAmount(amount, options) {
35
- const base = {
36
- ...parseDigitsInfo(options.format),
36
+ const currency = options.currency?.trim();
37
+ const base = (format) => ({
38
+ ...parseDigitsInfo(format),
37
39
  notation: options.notation ?? "standard",
38
40
  signDisplay: options.showSign ? "exceptZero" : "auto"
39
- };
40
- const currency = options.currency?.trim();
41
+ });
42
+ const plain = base(options.format ?? DEFAULT_FORMAT);
41
43
  if (currency) try {
42
44
  return toSegments(new Intl.NumberFormat(options.locale, {
43
- ...base,
45
+ ...base(options.format),
44
46
  style: "currency",
45
47
  currency,
46
48
  currencyDisplay: options.currencyDisplay ?? "narrowSymbol"
47
49
  }).formatToParts(amount));
48
50
  } catch {
49
51
  return [
50
- ...toSegments(new Intl.NumberFormat(options.locale, base).formatToParts(amount)),
52
+ ...toSegments(new Intl.NumberFormat(options.locale, plain).formatToParts(amount)),
51
53
  {
52
- text: "\xA0",
54
+ text: " ",
53
55
  currency: false
54
56
  },
55
57
  {
@@ -58,7 +60,7 @@ function formatAmount(amount, options) {
58
60
  }
59
61
  ];
60
62
  }
61
- return toSegments(new Intl.NumberFormat(options.locale, base).formatToParts(amount));
63
+ return toSegments(new Intl.NumberFormat(options.locale, plain).formatToParts(amount));
62
64
  }
63
65
  const AMOUNT_ICON_DEFAULTS = { code: txIconCode };
64
66
  const AMOUNT_THEME = { amount: amountTokens };
@@ -67,7 +69,7 @@ var TxAmount = class TxAmount {
67
69
  localeService = inject(TxLocaleService);
68
70
  amount = input(null, ...ngDevMode ? [{ debugName: "amount" }] : /* istanbul ignore next */ []);
69
71
  currency = input(void 0, ...ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []);
70
- format = input("1.0-2", ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
72
+ format = input(void 0, ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
71
73
  notation = input("standard", ...ngDevMode ? [{ debugName: "notation" }] : /* istanbul ignore next */ []);
72
74
  currencyDisplay = input("narrowSymbol", ...ngDevMode ? [{ debugName: "currencyDisplay" }] : /* istanbul ignore next */ []);
73
75
  showSign = input(false, {
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-amount.mjs","names":[],"sources":["../../../../packages/ui/amount/src/format-amount.ts","../../../../packages/ui/amount/src/amount.icons.ts","../../../../packages/ui/amount/src/amount.theme.ts","../../../../packages/ui/amount/src/amount.component.ts"],"sourcesContent":["import { TxAmountFormatOptions, TxAmountSegment } from './amount.types';\n\nconst DIGITS_INFO = /^(\\d+)?(?:\\.(\\d+))?(?:-(\\d+))?$/;\n\n/**\n * Reads a digits-info string like `1.2-2` (integer digits, minimum and maximum fraction digits) into number format options; an invalid string gives no options.\n */\nexport function parseDigitsInfo(format: string | undefined): Pick<Intl.NumberFormatOptions, 'minimumIntegerDigits' | 'minimumFractionDigits' | 'maximumFractionDigits'> {\n const match = DIGITS_INFO.exec((format ?? '').trim());\n if (!match) {\n return {};\n }\n const [, integer, minFraction, maxFraction] = match;\n const minimumFractionDigits = minFraction === undefined ? undefined : Number(minFraction);\n const maximumFractionDigits = maxFraction === undefined ? minimumFractionDigits : Math.max(Number(maxFraction), minimumFractionDigits ?? 0);\n return {\n ...(integer === undefined ? {} : { minimumIntegerDigits: Math.max(1, Number(integer)) }),\n ...(minimumFractionDigits === undefined ? {} : { minimumFractionDigits }),\n ...(maximumFractionDigits === undefined ? {} : { maximumFractionDigits }),\n };\n}\n\nfunction toSegments(parts: Intl.NumberFormatPart[]): TxAmountSegment[] {\n const segments: TxAmountSegment[] = [];\n for (const part of parts) {\n const currency = part.type === 'currency';\n const last = segments[segments.length - 1];\n if (last && last.currency === currency) {\n last.text += part.value;\n } else {\n segments.push({ text: part.value, currency });\n }\n }\n return segments;\n}\n\n/**\n * Formats a number as money in the given locale and currency and splits the result into currency and number segments.\n */\nexport function formatAmount(amount: number, options: TxAmountFormatOptions): TxAmountSegment[] {\n const base: Intl.NumberFormatOptions = {\n ...parseDigitsInfo(options.format),\n notation: options.notation ?? 'standard',\n signDisplay: options.showSign ? 'exceptZero' : 'auto',\n };\n const currency = options.currency?.trim();\n if (currency) {\n try {\n return toSegments(\n new Intl.NumberFormat(options.locale, { ...base, style: 'currency', currency, currencyDisplay: options.currencyDisplay ?? 'narrowSymbol' }).formatToParts(amount),\n );\n } catch {\n return [...toSegments(new Intl.NumberFormat(options.locale, base).formatToParts(amount)), { text: ' ', currency: false }, { text: currency, currency: true }];\n }\n }\n return toSegments(new Intl.NumberFormat(options.locale, base).formatToParts(amount));\n}\n","import { TxIconSet, txIconCode } from '@tectra-ng/icons';\n\nexport const AMOUNT_ICON_DEFAULTS: TxIconSet = {\n code: txIconCode,\n};\n","import { amountTokens } from '@tectra-ng/themes';\n\nexport const AMOUNT_THEME = {\n amount: amountTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraAmountTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxAmountCurrencyDisplay, TxAmountNotation, TxAmountPart, TxAmountSign } from './amount.types';\nimport { formatAmount } from './format-amount';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { AMOUNT_ICON_DEFAULTS } from './amount.icons';\nimport { AMOUNT_THEME } from './amount.theme';\n\n@Component({\n selector: 'tx-amount',\n template: `\n @if (isEmpty()) {\n <span class=\"tx-amount__empty\">{{ emptyText() }}</span>\n } @else {\n @for (segment of segments(); track $index) {\n @if (segment.currency) {\n <span class=\"tx-amount__currency\" [class]=\"passThrough().currency?.class\" [style]=\"passThrough().currency?.style\">{{ segment.text }}</span>\n } @else {\n <span class=\"tx-amount__value\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">{{ segment.text }}</span>\n }\n }\n }\n `,\n styleUrl: './amount.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-amount',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-sign]': 'signColor() ? sign() : null',\n '[class.tx-amount--strong]': 'strong()',\n '[class.tx-amount--zero]': 'sign() === \"zero\"',\n '[class.tx-amount--empty]': 'isEmpty()',\n },\n viewProviders: [provideTxIconDefaults(AMOUNT_ICON_DEFAULTS)],\n})\nexport class TxAmount {\n private readonly amountTheme = injectTokens(AMOUNT_THEME);\n\n private localeService = inject(TxLocaleService);\n\n readonly amount = input<number | null | undefined>(null);\n readonly currency = input<string | null | undefined>(undefined);\n readonly format = input<string>('1.0-2');\n readonly notation = input<TxAmountNotation>('standard');\n readonly currencyDisplay = input<TxAmountCurrencyDisplay>('narrowSymbol');\n readonly showSign = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly signColor = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly strong = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly locale = input<string | undefined>(undefined);\n readonly emptyText = input<string>('—');\n readonly dt = input<TectraDeepPartial<TectraAmountTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxAmountPart, TxAmount> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('amount', this, this.pt, this.ptOptions);\n readonly isEmpty = computed(() => {\n const amount = this.amount();\n return amount === null || amount === undefined || Number.isNaN(amount);\n });\n readonly sign = computed<TxAmountSign | null>(() => {\n const amount = this.amount();\n if (this.isEmpty() || amount === null || amount === undefined) {\n return null;\n }\n return amount > 0 ? 'positive' : amount < 0 ? 'negative' : 'zero';\n });\n readonly segments = computed(() => {\n const amount = this.amount();\n if (this.isEmpty() || amount === null || amount === undefined) {\n return [];\n }\n return formatAmount(amount, {\n locale: this.locale() ?? this.localeService.locale().intl,\n currency: this.currency(),\n format: this.format(),\n notation: this.notation(),\n currencyDisplay: this.currencyDisplay(),\n showSign: this.showSign(),\n });\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-amount'), ...this.passThrough().root?.style }));\n}\n"],"mappings":";;;;;;;AAEA,MAAM,cAAc;AAKpB,SAAgB,gBAAgB,QAA0B;CACxD,MAAM,QAAQ,YAAY,MAAM,UAAU,GAAA,CAAI,KAAI,CAAE;CACpD,IAAI,CAAC,OACH,OAAO,CAAA;CAET,MAAM,GAAG,SAAS,aAAa,eAAe;CAC9C,MAAM,wBAAwB,gBAAgB,SAAY,SAAY,OAAO,WAAW;CACxF,MAAM,wBAAwB,gBAAgB,SAAY,wBAAwB,KAAK,IAAI,OAAO,WAAW,GAAG,yBAAyB,CAAC;CAC1I,OAAO;EACL,GAAI,YAAY,SAAY,CAAA,IAAK,EAAE,sBAAsB,KAAK,IAAI,GAAG,OAAO,OAAO,CAAC,EAAC;EACrF,GAAI,0BAA0B,SAAY,CAAA,IAAK,EAAE,sB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YAAA;IAAA,SAAA;IAAA,SAAA;IAAA,oBAAA;IAAA,kBAAA;IAAA,2BAAA;IAAA,yBAAA;IAAA,0BAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UA3BT;;;;;;;;;;;;;EAYT,UAAA;EAAA,QAAA,CAAA,q3BAAA;EAAA,eAac,CAAC,sBAAsB,oBAAoB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAEjD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAQ,YAAA,CAAA;EA7BpB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAW,UACX;;;;;;;;;;;;;GAYT,iBAEgB,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,oBAAoB;IACpB,6BAA6B;IAC7B,2BAA2B;IAC3B,4BAA4B;GAC7B;GAAA,eACc,CAAC,sBAAsB,oBAAoB,CAAC;GAAC,QAAA,CAAA,q3BAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-amount.mjs","names":[],"sources":["../../../../packages/ui/amount/src/format-amount.ts","../../../../packages/ui/amount/src/amount.icons.ts","../../../../packages/ui/amount/src/amount.theme.ts","../../../../packages/ui/amount/src/amount.component.ts"],"sourcesContent":["import { TxAmountFormatOptions, TxAmountSegment } from './amount.types';\n\nconst DIGITS_INFO = /^(\\d+)?(?:\\.(\\d+))?(?:-(\\d+))?$/;\nconst DEFAULT_FORMAT = '1.0-2';\n\n/**\n * Reads a digits-info string like `1.2-2` (integer digits, minimum and maximum fraction digits) into number format options; an invalid string gives no options.\n */\nexport function parseDigitsInfo(format: string | undefined): Pick<Intl.NumberFormatOptions, 'minimumIntegerDigits' | 'minimumFractionDigits' | 'maximumFractionDigits'> {\n const match = DIGITS_INFO.exec((format ?? '').trim());\n if (!match) {\n return {};\n }\n const [, integer, minFraction, maxFraction] = match;\n const minimumFractionDigits = minFraction === undefined ? undefined : Number(minFraction);\n const maximumFractionDigits = maxFraction === undefined ? minimumFractionDigits : Math.max(Number(maxFraction), minimumFractionDigits ?? 0);\n return {\n ...(integer === undefined ? {} : { minimumIntegerDigits: Math.max(1, Number(integer)) }),\n ...(minimumFractionDigits === undefined ? {} : { minimumFractionDigits }),\n ...(maximumFractionDigits === undefined ? {} : { maximumFractionDigits }),\n };\n}\n\nfunction toSegments(parts: Intl.NumberFormatPart[]): TxAmountSegment[] {\n const segments: TxAmountSegment[] = [];\n for (const part of parts) {\n const currency = part.type === 'currency';\n const last = segments[segments.length - 1];\n if (last && last.currency === currency) {\n last.text += part.value;\n } else {\n segments.push({ text: part.value, currency });\n }\n }\n return segments;\n}\n\n/**\n * Formats a number as money in the given locale and currency and splits the result into currency and number segments.\n */\nexport function formatAmount(amount: number, options: TxAmountFormatOptions): TxAmountSegment[] {\n const currency = options.currency?.trim();\n const base = (format: string | undefined): Intl.NumberFormatOptions => ({\n ...parseDigitsInfo(format),\n notation: options.notation ?? 'standard',\n signDisplay: options.showSign ? 'exceptZero' : 'auto',\n });\n const plain = base(options.format ?? DEFAULT_FORMAT);\n if (currency) {\n try {\n return toSegments(\n new Intl.NumberFormat(options.locale, { ...base(options.format), style: 'currency', currency, currencyDisplay: options.currencyDisplay ?? 'narrowSymbol' }).formatToParts(amount),\n );\n } catch {\n return [...toSegments(new Intl.NumberFormat(options.locale, plain).formatToParts(amount)), { text: ' ', currency: false }, { text: currency, currency: true }];\n }\n }\n return toSegments(new Intl.NumberFormat(options.locale, plain).formatToParts(amount));\n}\n","import { TxIconSet, txIconCode } from '@tectra-ng/icons';\n\nexport const AMOUNT_ICON_DEFAULTS: TxIconSet = {\n code: txIconCode,\n};\n","import { amountTokens } from '@tectra-ng/themes';\n\nexport const AMOUNT_THEME = {\n amount: amountTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraAmountTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxAmountCurrencyDisplay, TxAmountNotation, TxAmountPart, TxAmountSign } from './amount.types';\nimport { formatAmount } from './format-amount';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { AMOUNT_ICON_DEFAULTS } from './amount.icons';\nimport { AMOUNT_THEME } from './amount.theme';\n\n@Component({\n selector: 'tx-amount',\n template: `\n @if (isEmpty()) {\n <span class=\"tx-amount__empty\">{{ emptyText() }}</span>\n } @else {\n @for (segment of segments(); track $index) {\n @if (segment.currency) {\n <span class=\"tx-amount__currency\" [class]=\"passThrough().currency?.class\" [style]=\"passThrough().currency?.style\">{{ segment.text }}</span>\n } @else {\n <span class=\"tx-amount__value\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">{{ segment.text }}</span>\n }\n }\n }\n `,\n styleUrl: './amount.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-amount',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-sign]': 'signColor() ? sign() : null',\n '[class.tx-amount--strong]': 'strong()',\n '[class.tx-amount--zero]': 'sign() === \"zero\"',\n '[class.tx-amount--empty]': 'isEmpty()',\n },\n viewProviders: [provideTxIconDefaults(AMOUNT_ICON_DEFAULTS)],\n})\nexport class TxAmount {\n private readonly amountTheme = injectTokens(AMOUNT_THEME);\n\n private localeService = inject(TxLocaleService);\n\n readonly amount = input<number | null | undefined>(null);\n readonly currency = input<string | null | undefined>(undefined);\n readonly format = input<string | undefined>(undefined);\n readonly notation = input<TxAmountNotation>('standard');\n readonly currencyDisplay = input<TxAmountCurrencyDisplay>('narrowSymbol');\n readonly showSign = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly signColor = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly strong = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly locale = input<string | undefined>(undefined);\n readonly emptyText = input<string>('—');\n readonly dt = input<TectraDeepPartial<TectraAmountTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxAmountPart, TxAmount> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('amount', this, this.pt, this.ptOptions);\n readonly isEmpty = computed(() => {\n const amount = this.amount();\n return amount === null || amount === undefined || Number.isNaN(amount);\n });\n readonly sign = computed<TxAmountSign | null>(() => {\n const amount = this.amount();\n if (this.isEmpty() || amount === null || amount === undefined) {\n return null;\n }\n return amount > 0 ? 'positive' : amount < 0 ? 'negative' : 'zero';\n });\n readonly segments = computed(() => {\n const amount = this.amount();\n if (this.isEmpty() || amount === null || amount === undefined) {\n return [];\n }\n return formatAmount(amount, {\n locale: this.locale() ?? this.localeService.locale().intl,\n currency: this.currency(),\n format: this.format(),\n notation: this.notation(),\n currencyDisplay: this.currencyDisplay(),\n showSign: this.showSign(),\n });\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-amount'), ...this.passThrough().root?.style }));\n}\n"],"mappings":";;;;;;;AAEA,MAAM,cAAc;AACpB,MAAM,iBAAiB;AAKvB,SAAgB,gBAAgB,QAA0B;CACxD,MAAM,QAAQ,YAAY,MAAM,UAAU,GAAA,CAAI,KAAI,CAAE;CACpD,IAAI,CAAC,OACH,OAAO,CAAA;CAET,MAAM,GAAG,SAAS,aAAa,eAAe;CAC9C,MAAM,wBAAwB,gBAAgB,SAAY,SAAY,OAAO,WAAW;CACxF,MAAM,wBAAwB,gBAAgB,SAAY,wBAAwB,KAAK,IAAI,OAAO,WAAW,GAAG,yBAAyB,CAA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;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA;IAAA,SAAA;IAAA,SAAA;IAAA,oBAAA;IAAA,kBAAA;IAAA,2BAAA;IAAA,yBAAA;IAAA,0BAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UA3BT;;;;;;;;;;;;;EAYT,UAAA;EAAA,QAAA,CAAA,q3BAAA;EAAA,eAac,CAAC,sBAAsB,oBAAoB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAEjD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAQ,YAAA,CAAA;EA7BpB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAW,UACX;;;;;;;;;;;;;GAYT,iBAEgB,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,oBAAoB;IACpB,6BAA6B;IAC7B,2BAA2B;IAC3B,4BAA4B;GAC7B;GAAA,eACc,CAAC,sBAAsB,oBAAoB,CAAC;GAAC,QAAA,CAAA,q3BAAA;EAAA,CAAA"}
@@ -12,6 +12,11 @@ function validTimeZone(timezone) {
12
12
  return;
13
13
  }
14
14
  }
15
+ function clockTime(value) {
16
+ if (value === null || value === void 0 || value === "") return null;
17
+ const time = value instanceof Date ? value.getTime() : typeof value === "string" ? Date.parse(value) : value;
18
+ return Number.isFinite(time) ? time : null;
19
+ }
15
20
  function clockHands(now, timezone) {
16
21
  const parts = Object.fromEntries(new Intl.DateTimeFormat("en-GB", {
17
22
  hour: "2-digit",
@@ -19,7 +24,7 @@ function clockHands(now, timezone) {
19
24
  second: "2-digit",
20
25
  hourCycle: "h23",
21
26
  timeZone: validTimeZone(timezone)
22
- }).formatToParts(new Date(now)).map((part) => [part.type, part.value]));
27
+ }).formatToParts(new Date(clockTime(now) ?? Date.now())).map((part) => [part.type, part.value]));
23
28
  const hours = Number(parts["hour"]);
24
29
  const minutes = Number(parts["minute"]);
25
30
  const seconds = Number(parts["second"]);
@@ -106,7 +111,8 @@ var TxAnalogClock = class TxAnalogClock {
106
111
  ];
107
112
  now = signal(Date.now(), ...ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []);
108
113
  timer = null;
109
- hands = computed(() => clockHands(this.time() ?? this.now(), this.timezone()), ...ngDevMode ? [{ debugName: "hands" }] : /* istanbul ignore next */ []);
114
+ fixedTime = computed(() => clockTime(this.time()), ...ngDevMode ? [{ debugName: "fixedTime" }] : /* istanbul ignore next */ []);
115
+ hands = computed(() => clockHands(this.fixedTime() ?? this.now(), this.timezone()), ...ngDevMode ? [{ debugName: "hands" }] : /* istanbul ignore next */ []);
110
116
  label = computed(() => this.ariaLabel() ? `${this.ariaLabel()}, ${this.hands().time}` : this.hands().time, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
111
117
  hourAngle = linkedSignal({
112
118
  ...ngDevMode ? { debugName: "hourAngle" } : /* istanbul ignore next */ {},
@@ -125,7 +131,7 @@ var TxAnalogClock = class TxAnalogClock {
125
131
  });
126
132
  schedule = effect((onCleanup) => {
127
133
  this.now();
128
- if (this.time() !== void 0 && this.time() !== null) return;
134
+ if (this.fixedTime() !== null) return;
129
135
  const step = this.showSeconds() ? 1e3 : 6e4;
130
136
  this.timer = setTimeout(() => this.now.set(Date.now()), step - Date.now() % step + 5);
131
137
  onCleanup(() => {
@@ -255,7 +261,7 @@ var TxAnalogClock = class TxAnalogClock {
255
261
  </div>
256
262
  `,
257
263
  isInline: true,
258
- styles: [":host{display:block}.tx-analog-clock__face{position:relative;box-sizing:border-box;width:100%;height:100%;border-radius:50%}.tx-analog-clock__tick,.tx-analog-clock__hand,.tx-analog-clock__pin{position:absolute;left:50%;border-radius:9999px}:host([data-styled]){width:var(--tx-analog-clock-size);height:var(--tx-analog-clock-size)}:host([data-styled]) .tx-analog-clock__face{background:var(--tx-analog-clock-background);box-shadow:0 0 0 1px var(--tx-analog-clock-border-color),var(--tx-analog-clock-shadow)}:host([data-styled]) .tx-analog-clock__tick{top:50%;width:var(--tx-analog-clock-tick-width);height:var(--tx-analog-clock-tick-height);margin-top:calc(var(--tx-analog-clock-tick-height) / -2);margin-left:calc(var(--tx-analog-clock-tick-width) / -2);background:var(--tx-analog-clock-tick-color);transform:rotate(var(--tx-analog-clock-angle)) translateY(var(--tx-analog-clock-tick-offset))}:host([data-styled]) .tx-analog-clock__tick--major{height:var(--tx-analog-clock-tick-major-height);margin-top:calc(var(--tx-analog-clock-tick-major-height) / -2);background:var(--tx-analog-clock-tick-major-color);transform:rotate(var(--tx-analog-clock-angle)) translateY(var(--tx-analog-clock-tick-major-offset))}:host([data-styled]) .tx-analog-clock__hand{bottom:50%;transform-origin:bottom;rotate:var(--tx-analog-clock-angle);transition:rotate var(--tx-analog-clock-transition-duration) var(--tx-analog-clock-transition-easing)}:host([data-styled]) .tx-analog-clock__hand--hour{width:var(--tx-analog-clock-hour-hand-width);height:var(--tx-analog-clock-hour-hand-length);margin-left:calc(var(--tx-analog-clock-hour-hand-width) / -2);background:var(--tx-analog-clock-hour-hand-color)}:host([data-styled]) .tx-analog-clock__hand--minute{width:var(--tx-analog-clock-minute-hand-width);height:var(--tx-analog-clock-minute-hand-length);margin-left:calc(var(--tx-analog-clock-minute-hand-width) / -2);background:var(--tx-analog-clock-minute-hand-color)}:host([data-styled]) .tx-analog-clock__hand--second{width:var(--tx-analog-clock-second-hand-width);height:var(--tx-analog-clock-second-hand-length);margin-left:calc(var(--tx-analog-clock-second-hand-width) / -2);background:var(--tx-analog-clock-second-hand-color)}:host([data-styled]) .tx-analog-clock__pin{top:50%;width:var(--tx-analog-clock-pin-size);height:var(--tx-analog-clock-pin-size);background:var(--tx-analog-clock-pin-color);box-shadow:0 0 0 var(--tx-analog-clock-pin-ring-width) var(--tx-analog-clock-pin-ring-color);transform:translate(-50%,-50%)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-analog-clock__hand{transition:none}}\n"],
264
+ styles: [":host{display:block}.tx-analog-clock__face{position:relative;box-sizing:border-box;width:100%;aspect-ratio:1;border-radius:50%}.tx-analog-clock__tick,.tx-analog-clock__hand,.tx-analog-clock__pin{position:absolute;left:50%;border-radius:9999px}:host([data-styled]){width:var(--tx-analog-clock-size);max-width:100%;aspect-ratio:1}:host([data-styled]) .tx-analog-clock__face{background:var(--tx-analog-clock-background);box-shadow:0 0 0 1px var(--tx-analog-clock-border-color),var(--tx-analog-clock-shadow)}:host([data-styled]) .tx-analog-clock__tick{top:50%;width:var(--tx-analog-clock-tick-width);height:var(--tx-analog-clock-tick-height);margin-top:calc(var(--tx-analog-clock-tick-height) / -2);margin-left:calc(var(--tx-analog-clock-tick-width) / -2);background:var(--tx-analog-clock-tick-color);transform:rotate(var(--tx-analog-clock-angle)) translateY(var(--tx-analog-clock-tick-offset))}:host([data-styled]) .tx-analog-clock__tick--major{height:var(--tx-analog-clock-tick-major-height);margin-top:calc(var(--tx-analog-clock-tick-major-height) / -2);background:var(--tx-analog-clock-tick-major-color);transform:rotate(var(--tx-analog-clock-angle)) translateY(var(--tx-analog-clock-tick-major-offset))}:host([data-styled]) .tx-analog-clock__hand{bottom:50%;transform-origin:bottom;rotate:var(--tx-analog-clock-angle);transition:rotate var(--tx-analog-clock-transition-duration) var(--tx-analog-clock-transition-easing)}:host([data-styled]) .tx-analog-clock__hand--hour{width:var(--tx-analog-clock-hour-hand-width);height:var(--tx-analog-clock-hour-hand-length);margin-left:calc(var(--tx-analog-clock-hour-hand-width) / -2);background:var(--tx-analog-clock-hour-hand-color)}:host([data-styled]) .tx-analog-clock__hand--minute{width:var(--tx-analog-clock-minute-hand-width);height:var(--tx-analog-clock-minute-hand-length);margin-left:calc(var(--tx-analog-clock-minute-hand-width) / -2);background:var(--tx-analog-clock-minute-hand-color)}:host([data-styled]) .tx-analog-clock__hand--second{width:var(--tx-analog-clock-second-hand-width);height:var(--tx-analog-clock-second-hand-length);margin-left:calc(var(--tx-analog-clock-second-hand-width) / -2);background:var(--tx-analog-clock-second-hand-color)}:host([data-styled]) .tx-analog-clock__pin{top:50%;width:var(--tx-analog-clock-pin-size);height:var(--tx-analog-clock-pin-size);background:var(--tx-analog-clock-pin-color);box-shadow:0 0 0 var(--tx-analog-clock-pin-ring-width) var(--tx-analog-clock-pin-ring-color);transform:translate(-50%,-50%)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-analog-clock__hand{transition:none}}\n"],
259
265
  changeDetection: i0.ChangeDetectionStrategy.OnPush
260
266
  });
261
267
  };
@@ -313,7 +319,7 @@ i0.ɵɵngDeclareClassMetadata({
313
319
  "[style]": "hostStyle()",
314
320
  "[attr.data-styled]": "!isUnstyled() || null"
315
321
  },
316
- styles: [":host{display:block}.tx-analog-clock__face{position:relative;box-sizing:border-box;width:100%;height:100%;border-radius:50%}.tx-analog-clock__tick,.tx-analog-clock__hand,.tx-analog-clock__pin{position:absolute;left:50%;border-radius:9999px}:host([data-styled]){width:var(--tx-analog-clock-size);height:var(--tx-analog-clock-size)}:host([data-styled]) .tx-analog-clock__face{background:var(--tx-analog-clock-background);box-shadow:0 0 0 1px var(--tx-analog-clock-border-color),var(--tx-analog-clock-shadow)}:host([data-styled]) .tx-analog-clock__tick{top:50%;width:var(--tx-analog-clock-tick-width);height:var(--tx-analog-clock-tick-height);margin-top:calc(var(--tx-analog-clock-tick-height) / -2);margin-left:calc(var(--tx-analog-clock-tick-width) / -2);background:var(--tx-analog-clock-tick-color);transform:rotate(var(--tx-analog-clock-angle)) translateY(var(--tx-analog-clock-tick-offset))}:host([data-styled]) .tx-analog-clock__tick--major{height:var(--tx-analog-clock-tick-major-height);margin-top:calc(var(--tx-analog-clock-tick-major-height) / -2);background:var(--tx-analog-clock-tick-major-color);transform:rotate(var(--tx-analog-clock-angle)) translateY(var(--tx-analog-clock-tick-major-offset))}:host([data-styled]) .tx-analog-clock__hand{bottom:50%;transform-origin:bottom;rotate:var(--tx-analog-clock-angle);transition:rotate var(--tx-analog-clock-transition-duration) var(--tx-analog-clock-transition-easing)}:host([data-styled]) .tx-analog-clock__hand--hour{width:var(--tx-analog-clock-hour-hand-width);height:var(--tx-analog-clock-hour-hand-length);margin-left:calc(var(--tx-analog-clock-hour-hand-width) / -2);background:var(--tx-analog-clock-hour-hand-color)}:host([data-styled]) .tx-analog-clock__hand--minute{width:var(--tx-analog-clock-minute-hand-width);height:var(--tx-analog-clock-minute-hand-length);margin-left:calc(var(--tx-analog-clock-minute-hand-width) / -2);background:var(--tx-analog-clock-minute-hand-color)}:host([data-styled]) .tx-analog-clock__hand--second{width:var(--tx-analog-clock-second-hand-width);height:var(--tx-analog-clock-second-hand-length);margin-left:calc(var(--tx-analog-clock-second-hand-width) / -2);background:var(--tx-analog-clock-second-hand-color)}:host([data-styled]) .tx-analog-clock__pin{top:50%;width:var(--tx-analog-clock-pin-size);height:var(--tx-analog-clock-pin-size);background:var(--tx-analog-clock-pin-color);box-shadow:0 0 0 var(--tx-analog-clock-pin-ring-width) var(--tx-analog-clock-pin-ring-color);transform:translate(-50%,-50%)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-analog-clock__hand{transition:none}}\n"]
322
+ styles: [":host{display:block}.tx-analog-clock__face{position:relative;box-sizing:border-box;width:100%;aspect-ratio:1;border-radius:50%}.tx-analog-clock__tick,.tx-analog-clock__hand,.tx-analog-clock__pin{position:absolute;left:50%;border-radius:9999px}:host([data-styled]){width:var(--tx-analog-clock-size);max-width:100%;aspect-ratio:1}:host([data-styled]) .tx-analog-clock__face{background:var(--tx-analog-clock-background);box-shadow:0 0 0 1px var(--tx-analog-clock-border-color),var(--tx-analog-clock-shadow)}:host([data-styled]) .tx-analog-clock__tick{top:50%;width:var(--tx-analog-clock-tick-width);height:var(--tx-analog-clock-tick-height);margin-top:calc(var(--tx-analog-clock-tick-height) / -2);margin-left:calc(var(--tx-analog-clock-tick-width) / -2);background:var(--tx-analog-clock-tick-color);transform:rotate(var(--tx-analog-clock-angle)) translateY(var(--tx-analog-clock-tick-offset))}:host([data-styled]) .tx-analog-clock__tick--major{height:var(--tx-analog-clock-tick-major-height);margin-top:calc(var(--tx-analog-clock-tick-major-height) / -2);background:var(--tx-analog-clock-tick-major-color);transform:rotate(var(--tx-analog-clock-angle)) translateY(var(--tx-analog-clock-tick-major-offset))}:host([data-styled]) .tx-analog-clock__hand{bottom:50%;transform-origin:bottom;rotate:var(--tx-analog-clock-angle);transition:rotate var(--tx-analog-clock-transition-duration) var(--tx-analog-clock-transition-easing)}:host([data-styled]) .tx-analog-clock__hand--hour{width:var(--tx-analog-clock-hour-hand-width);height:var(--tx-analog-clock-hour-hand-length);margin-left:calc(var(--tx-analog-clock-hour-hand-width) / -2);background:var(--tx-analog-clock-hour-hand-color)}:host([data-styled]) .tx-analog-clock__hand--minute{width:var(--tx-analog-clock-minute-hand-width);height:var(--tx-analog-clock-minute-hand-length);margin-left:calc(var(--tx-analog-clock-minute-hand-width) / -2);background:var(--tx-analog-clock-minute-hand-color)}:host([data-styled]) .tx-analog-clock__hand--second{width:var(--tx-analog-clock-second-hand-width);height:var(--tx-analog-clock-second-hand-length);margin-left:calc(var(--tx-analog-clock-second-hand-width) / -2);background:var(--tx-analog-clock-second-hand-color)}:host([data-styled]) .tx-analog-clock__pin{top:50%;width:var(--tx-analog-clock-pin-size);height:var(--tx-analog-clock-pin-size);background:var(--tx-analog-clock-pin-color);box-shadow:0 0 0 var(--tx-analog-clock-pin-ring-width) var(--tx-analog-clock-pin-ring-color);transform:translate(-50%,-50%)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-analog-clock__hand{transition:none}}\n"]
317
323
  }]
318
324
  }],
319
325
  propDecorators: {
@@ -383,6 +389,6 @@ i0.ɵɵngDeclareClassMetadata({
383
389
  }]
384
390
  }
385
391
  });
386
- export { TxAnalogClock, TxAnalogClockHandsPipe, clockHands, forwardAngle, validTimeZone };
392
+ export { TxAnalogClock, TxAnalogClockHandsPipe, clockHands, clockTime, forwardAngle, validTimeZone };
387
393
 
388
394
  //# sourceMappingURL=tectra-ng-ui-analog-clock.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-analog-clock.mjs","names":[],"sources":["../../../../packages/ui/analog-clock/src/analog-clock.utils.ts","../../../../packages/ui/analog-clock/src/analog-clock-hands.pipe.ts","../../../../packages/ui/analog-clock/src/analog-clock.theme.ts","../../../../packages/ui/analog-clock/src/analog-clock.component.ts"],"sourcesContent":["import { TxAnalogClockHands } from './analog-clock.types';\n\n/** Returns the time zone when the browser knows it, otherwise `undefined`. */\nexport function validTimeZone(timezone: string | null | undefined): string | undefined {\n if (!timezone) return undefined;\n try {\n new Intl.DateTimeFormat('en-GB', { timeZone: timezone });\n return timezone;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Computes the text time and the hand angles of a moment in the given time zone; the local zone is used when it is empty or unknown.\n */\nexport function clockHands(now: number | Date, timezone: string | null | undefined): TxAnalogClockHands {\n const parts = Object.fromEntries(\n new Intl.DateTimeFormat('en-GB', { hour: '2-digit', minute: '2-digit', second: '2-digit', hourCycle: 'h23', timeZone: validTimeZone(timezone) })\n .formatToParts(new Date(now))\n .map((part) => [part.type, part.value]),\n );\n const hours = Number(parts['hour']);\n const minutes = Number(parts['minute']);\n const seconds = Number(parts['second']);\n return {\n time: `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}`,\n hourAngle: ((hours % 12) + minutes / 60) * 30,\n minuteAngle: minutes * 6,\n secondAngle: seconds * 6,\n };\n}\n\n/**\n * Turns the next hand angle into one that never goes back past the previous angle, so a hand animates through 360 instead of rewinding.\n */\nexport function forwardAngle(previous: number | null, next: number): number {\n if (previous === null) return next;\n const turns = Math.floor(previous / 360);\n let angle = turns * 360 + next;\n if (angle < previous - 0.001) angle += 360;\n return angle;\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { TxAnalogClockHands } from './analog-clock.types';\nimport { clockHands } from './analog-clock.utils';\n\n/** Turns a time into the hand angles of an analog clock in an optional time zone, for custom clock faces. */\n@Pipe({ name: 'txAnalogClockHands' })\nexport class TxAnalogClockHandsPipe implements PipeTransform {\n transform(now: number | Date, timezone: string | null = null): TxAnalogClockHands {\n return clockHands(now, timezone);\n }\n}\n","import { analogClockTokens } from '@tectra-ng/themes';\n\nexport const ANALOG_CLOCK_THEME = {\n analogClock: analogClockTokens,\n};\n","import { ChangeDetectionStrategy, Component, DestroyRef, booleanAttribute, computed, effect, inject, input, linkedSignal, signal } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraAnalogClockTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxAnalogClockPart } from './analog-clock.types';\nimport { clockHands, forwardAngle } from './analog-clock.utils';\nimport { ANALOG_CLOCK_THEME } from './analog-clock.theme';\n\n@Component({\n selector: 'tx-analog-clock',\n template: `\n <div class=\"tx-analog-clock__face\" role=\"img\" [attr.aria-label]=\"label()\" [class]=\"passThrough().face?.class\" [style]=\"passThrough().face?.style\">\n @for (tick of ticks; track tick) {\n <span\n class=\"tx-analog-clock__tick\"\n aria-hidden=\"true\"\n [class.tx-analog-clock__tick--major]=\"tick % 3 === 0\"\n [style.--tx-analog-clock-angle]=\"tick * 30 + 'deg'\"\n [class]=\"passThrough().tick?.class\"\n [style]=\"passThrough().tick?.style\"\n ></span>\n }\n <span\n class=\"tx-analog-clock__hand tx-analog-clock__hand--hour\"\n aria-hidden=\"true\"\n [style.--tx-analog-clock-angle]=\"hourAngle() + 'deg'\"\n [class]=\"passThrough().hourHand?.class\"\n [style]=\"passThrough().hourHand?.style\"\n ></span>\n <span\n class=\"tx-analog-clock__hand tx-analog-clock__hand--minute\"\n aria-hidden=\"true\"\n [style.--tx-analog-clock-angle]=\"minuteAngle() + 'deg'\"\n [class]=\"passThrough().minuteHand?.class\"\n [style]=\"passThrough().minuteHand?.style\"\n ></span>\n @if (showSeconds()) {\n <span\n class=\"tx-analog-clock__hand tx-analog-clock__hand--second\"\n aria-hidden=\"true\"\n [style.--tx-analog-clock-angle]=\"secondAngle() + 'deg'\"\n [class]=\"passThrough().secondHand?.class\"\n [style]=\"passThrough().secondHand?.style\"\n ></span>\n }\n <span class=\"tx-analog-clock__pin\" aria-hidden=\"true\" [class]=\"passThrough().pin?.class\" [style]=\"passThrough().pin?.style\"></span>\n </div>\n `,\n styleUrl: './analog-clock.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-analog-clock',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n})\nexport class TxAnalogClock {\n private readonly analogClockTheme = injectTokens(ANALOG_CLOCK_THEME);\n\n readonly timezone = input<string | null | undefined>(undefined);\n readonly time = input<Date | number | null | undefined>(undefined);\n readonly showSeconds = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraAnalogClockTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxAnalogClockPart, TxAnalogClock> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('analogClock', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-analog-clock'), ...this.passThrough().root?.style }));\n\n protected readonly ticks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n private readonly now = signal(Date.now());\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n readonly hands = computed(() => clockHands(this.time() ?? this.now(), this.timezone()));\n readonly label = computed(() => (this.ariaLabel() ? `${this.ariaLabel()}, ${this.hands().time}` : this.hands().time));\n readonly hourAngle = linkedSignal<number, number>({ source: () => this.hands().hourAngle, computation: (next, previous) => forwardAngle(previous?.value ?? null, next) });\n readonly minuteAngle = linkedSignal<number, number>({ source: () => this.hands().minuteAngle, computation: (next, previous) => forwardAngle(previous?.value ?? null, next) });\n readonly secondAngle = linkedSignal<number, number>({ source: () => this.hands().secondAngle, computation: (next, previous) => forwardAngle(previous?.value ?? null, next) });\n\n private readonly schedule = effect((onCleanup) => {\n this.now();\n if (this.time() !== undefined && this.time() !== null) return;\n const step = this.showSeconds() ? 1000 : 60000;\n this.timer = setTimeout(() => this.now.set(Date.now()), step - (Date.now() % step) + 5);\n onCleanup(() => {\n if (this.timer) clearTimeout(this.timer);\n });\n });\n\n private readonly cleanup = inject(DestroyRef).onDestroy(() => {\n if (this.timer) clearTimeout(this.timer);\n });\n}\n"],"mappings":";;;;;AAGA,SAAgB,cAAc,UAAmC;CAC/D,IAAI,CAAC,UAAU,OAAO;CACtB,IAAI;EACF,IAAI,KAAK,eAAe,SAAS,EAAE,UAAU,SAAQ,CAAE;EACvD,OAAO;CACT,QAAQ;EACN;CACF;AACF;AAKA,SAAgB,WAAW,KAAoB,UAAmC;CAChF,MAAM,QAAQ,OAAO,YACnB,IAAI,KAAK,eAAe,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAW,QAAQ;EAAW,WAAW;EAAO,UAAU,cAAc,QAAQ;CAAC,CAAE,CAAC,CAC7I,cAAc,IAAI,KAAK,GAAG,CAAC,CAAC,CAC5B,KAAK,SAAS,CAAC,KAAK,MAAM,KAAK,KAAK,CAAC,CAAC;CAE3C,MAAM,QAAQ,OAAO,MAAM,OAAO;CAClC,MAAM,UAAU,OAAO,MAAM,SAAS;CACtC,MAAM,UAAU,OAAO,MAAM,SAAS;CACtC,OAAO;EACL,MAAM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AAA,CAAA,4iFAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-analog-clock.mjs","names":[],"sources":["../../../../packages/ui/analog-clock/src/analog-clock.utils.ts","../../../../packages/ui/analog-clock/src/analog-clock-hands.pipe.ts","../../../../packages/ui/analog-clock/src/analog-clock.theme.ts","../../../../packages/ui/analog-clock/src/analog-clock.component.ts"],"sourcesContent":["import { TxAnalogClockHands, TxAnalogClockTime } from './analog-clock.types';\n\n/** Returns the time zone when the browser knows it, otherwise `undefined`. */\nexport function validTimeZone(timezone: string | null | undefined): string | undefined {\n if (!timezone) return undefined;\n try {\n new Intl.DateTimeFormat('en-GB', { timeZone: timezone });\n return timezone;\n } catch {\n return undefined;\n }\n}\n\n/** Turns a `Date`, milliseconds or an ISO string into milliseconds; `null` when it is empty or not a valid time. */\nexport function clockTime(value: TxAnalogClockTime): number | null {\n if (value === null || value === undefined || value === '') return null;\n const time = value instanceof Date ? value.getTime() : typeof value === 'string' ? Date.parse(value) : value;\n return Number.isFinite(time) ? time : null;\n}\n\n/**\n * Computes the text time and the hand angles of a moment in the given time zone; the local zone is used when it is empty or unknown.\n */\nexport function clockHands(now: number | Date | string, timezone: string | null | undefined): TxAnalogClockHands {\n const parts = Object.fromEntries(\n new Intl.DateTimeFormat('en-GB', { hour: '2-digit', minute: '2-digit', second: '2-digit', hourCycle: 'h23', timeZone: validTimeZone(timezone) })\n .formatToParts(new Date(clockTime(now) ?? Date.now()))\n .map((part) => [part.type, part.value]),\n );\n const hours = Number(parts['hour']);\n const minutes = Number(parts['minute']);\n const seconds = Number(parts['second']);\n return {\n time: `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}`,\n hourAngle: ((hours % 12) + minutes / 60) * 30,\n minuteAngle: minutes * 6,\n secondAngle: seconds * 6,\n };\n}\n\n/**\n * Turns the next hand angle into one that never goes back past the previous angle, so a hand animates through 360 instead of rewinding.\n */\nexport function forwardAngle(previous: number | null, next: number): number {\n if (previous === null) return next;\n const turns = Math.floor(previous / 360);\n let angle = turns * 360 + next;\n if (angle < previous - 0.001) angle += 360;\n return angle;\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { TxAnalogClockHands } from './analog-clock.types';\nimport { clockHands } from './analog-clock.utils';\n\n/** Turns a time into the hand angles of an analog clock in an optional time zone, for custom clock faces. */\n@Pipe({ name: 'txAnalogClockHands' })\nexport class TxAnalogClockHandsPipe implements PipeTransform {\n transform(now: number | Date | string, timezone: string | null = null): TxAnalogClockHands {\n return clockHands(now, timezone);\n }\n}\n","import { analogClockTokens } from '@tectra-ng/themes';\n\nexport const ANALOG_CLOCK_THEME = {\n analogClock: analogClockTokens,\n};\n","import { ChangeDetectionStrategy, Component, DestroyRef, booleanAttribute, computed, effect, inject, input, linkedSignal, signal } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraAnalogClockTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxAnalogClockPart, TxAnalogClockTime } from './analog-clock.types';\nimport { clockHands, clockTime, forwardAngle } from './analog-clock.utils';\nimport { ANALOG_CLOCK_THEME } from './analog-clock.theme';\n\n@Component({\n selector: 'tx-analog-clock',\n template: `\n <div class=\"tx-analog-clock__face\" role=\"img\" [attr.aria-label]=\"label()\" [class]=\"passThrough().face?.class\" [style]=\"passThrough().face?.style\">\n @for (tick of ticks; track tick) {\n <span\n class=\"tx-analog-clock__tick\"\n aria-hidden=\"true\"\n [class.tx-analog-clock__tick--major]=\"tick % 3 === 0\"\n [style.--tx-analog-clock-angle]=\"tick * 30 + 'deg'\"\n [class]=\"passThrough().tick?.class\"\n [style]=\"passThrough().tick?.style\"\n ></span>\n }\n <span\n class=\"tx-analog-clock__hand tx-analog-clock__hand--hour\"\n aria-hidden=\"true\"\n [style.--tx-analog-clock-angle]=\"hourAngle() + 'deg'\"\n [class]=\"passThrough().hourHand?.class\"\n [style]=\"passThrough().hourHand?.style\"\n ></span>\n <span\n class=\"tx-analog-clock__hand tx-analog-clock__hand--minute\"\n aria-hidden=\"true\"\n [style.--tx-analog-clock-angle]=\"minuteAngle() + 'deg'\"\n [class]=\"passThrough().minuteHand?.class\"\n [style]=\"passThrough().minuteHand?.style\"\n ></span>\n @if (showSeconds()) {\n <span\n class=\"tx-analog-clock__hand tx-analog-clock__hand--second\"\n aria-hidden=\"true\"\n [style.--tx-analog-clock-angle]=\"secondAngle() + 'deg'\"\n [class]=\"passThrough().secondHand?.class\"\n [style]=\"passThrough().secondHand?.style\"\n ></span>\n }\n <span class=\"tx-analog-clock__pin\" aria-hidden=\"true\" [class]=\"passThrough().pin?.class\" [style]=\"passThrough().pin?.style\"></span>\n </div>\n `,\n styleUrl: './analog-clock.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-analog-clock',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n})\nexport class TxAnalogClock {\n private readonly analogClockTheme = injectTokens(ANALOG_CLOCK_THEME);\n\n readonly timezone = input<string | null | undefined>(undefined);\n readonly time = input<TxAnalogClockTime>(undefined);\n readonly showSeconds = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraAnalogClockTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxAnalogClockPart, TxAnalogClock> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('analogClock', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-analog-clock'), ...this.passThrough().root?.style }));\n\n protected readonly ticks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n private readonly now = signal(Date.now());\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n private readonly fixedTime = computed(() => clockTime(this.time()));\n readonly hands = computed(() => clockHands(this.fixedTime() ?? this.now(), this.timezone()));\n readonly label = computed(() => (this.ariaLabel() ? `${this.ariaLabel()}, ${this.hands().time}` : this.hands().time));\n readonly hourAngle = linkedSignal<number, number>({ source: () => this.hands().hourAngle, computation: (next, previous) => forwardAngle(previous?.value ?? null, next) });\n readonly minuteAngle = linkedSignal<number, number>({ source: () => this.hands().minuteAngle, computation: (next, previous) => forwardAngle(previous?.value ?? null, next) });\n readonly secondAngle = linkedSignal<number, number>({ source: () => this.hands().secondAngle, computation: (next, previous) => forwardAngle(previous?.value ?? null, next) });\n\n private readonly schedule = effect((onCleanup) => {\n this.now();\n if (this.fixedTime() !== null) return;\n const step = this.showSeconds() ? 1000 : 60000;\n this.timer = setTimeout(() => this.now.set(Date.now()), step - (Date.now() % step) + 5);\n onCleanup(() => {\n if (this.timer) clearTimeout(this.timer);\n });\n });\n\n private readonly cleanup = inject(DestroyRef).onDestroy(() => {\n if (this.timer) clearTimeout(this.timer);\n });\n}\n"],"mappings":";;;;;AAGA,SAAgB,cAAc,UAAmC;CAC/D,IAAI,CAAC,UAAU,OAAO;CACtB,IAAI;EACF,IAAI,KAAK,eAAe,SAAS,EAAE,UAAU,SAAQ,CAAE;EACvD,OAAO;CACT,QAAQ;EACN;CACF;AACF;AAGA,SAAgB,UAAU,OAAwB;CAChD,IAAI,UAAU,QAAQ,UAAU,UAAa,UAAU,IAAI,OAAO;CAClE,MAAM,OAAO,iBAAiB,OAAO,MAAM,QAAO,IAAK,OAAO,UAAU,WAAW,KAAK,MAAM,KAAK,IAAI;CACvG,OAAO,OAAO,SAAS,IAAI,IAAI,OAAO;AACxC;AAKA,SAAgB,WAAW,KAA6B,UAAmC;CACzF,MAAM,QAAQ,OAAO,YACnB,IAAI,KAAK,eAAe,SAAS;EAAE,MAAM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