@4sh/ui-kit 0.15.0 → 0.17.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 (220) hide show
  1. package/README.fr.md +18 -10
  2. package/README.md +18 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -953
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2039
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -130
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -246
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -291
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -194
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -131
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +723 -596
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +313 -2
  143. package/mcp/data/text-search-docs.json +177 -17
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/styles/utils/_mixins.scss +11 -0
  150. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  151. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  152. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  153. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  154. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  155. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  156. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +577 -367
  157. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  158. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  159. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  160. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  161. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  162. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  163. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  164. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  165. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -57
  166. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -93
  167. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -100
  168. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  169. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -116
  170. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  171. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  172. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  173. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  174. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  175. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  176. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  177. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  178. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  179. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -54
  180. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  181. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  182. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  183. package/types/4sh-ui-kit-forms.d.ts +291 -186
  184. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  185. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  186. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  187. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  188. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  189. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  190. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  191. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  192. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  193. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  194. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  195. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  196. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  197. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  198. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  199. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  200. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  201. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  202. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  203. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  204. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  205. package/types/4sh-ui-kit-motion.d.ts +117 -67
  206. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  207. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  208. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  209. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  210. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  211. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  212. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  213. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  214. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  215. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  216. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  217. package/types/4sh-ui-kit-theming.d.ts +27 -29
  218. package/types/4sh-ui-kit-types.d.ts +6 -5
  219. package/types/4sh-ui-kit.d.ts +4 -3
  220. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,209 +1,474 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, output, inject, viewChild, computed, isDevMode, effect, Component, model } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
- import { RouterLink } from '@angular/router';
5
- import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
6
-
7
- /** Focusable controls the bar walks with the arrow keys. */
8
- const CONTROL_SELECTOR = '.ui-bottom-tab, .ui-bottom-tab-action';
9
- /**
10
- * ui-bottom-tab , a single destination inside a {@link UiBottomTabBar}.
11
- *
12
- * Renders a real native `<button>` , or an `<a>` as soon as `href` / `routerLink`
13
- * is set, so Cmd/Ctrl+click and "open in new tab" keep working. The host is
14
- * `display: contents`, so the control sits directly inside the bar's `<nav>`.
15
- *
16
- * The active state is owned by the bar (`value` comparison) and surfaced to
17
- * assistive tech as `aria-current="page"`, the pattern for a navigation
18
- * landmark , not `role="tab"`, which would require an associated tab panel.
19
- *
20
- * Declared before {@link UiBottomTabBar} so its `inject()` reference resolves
21
- * at construction time without a temporal-dead-zone error.
22
- */
23
- class UiBottomTab {
24
- constructor() {
25
- /** Identifier of this tab (matched against the bar `value`). */
26
- this.value = input.required(/* @ts-ignore */
27
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
28
- /** Visible label under the icon. Omit it for an icon-only tab (then `ariaLabel` names it). */
29
- this.label = input(/* @ts-ignore */
30
- ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
31
- /** Icon name in the resting state. */
32
- this.icon = input(/* @ts-ignore */
33
- ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
34
- /** Icon name once active (falls back to `icon`). */
35
- this.activeIcon = input(/* @ts-ignore */
36
- ...(ngDevMode ? [undefined, { debugName: "activeIcon" }] : /* istanbul ignore next */ []));
37
- /**
38
- * Icon variant in the resting state. Set it to `outline` to get the classic
39
- * outline → filled swap on activation, `activeIconType` already being `solid`
40
- * , but check the icon exists in the family's outline set first (FontAwesome
41
- * Free only ships a handful).
42
- */
43
- this.iconType = input('solid', /* @ts-ignore */
44
- ...(ngDevMode ? [{ debugName: "iconType" }] : /* istanbul ignore next */ []));
45
- /** Icon variant once active. */
46
- this.activeIconType = input('solid', /* @ts-ignore */
47
- ...(ngDevMode ? [{ debugName: "activeIconType" }] : /* istanbul ignore next */ []));
48
- /** Disable the tab (not activable, skipped by the arrow keys). */
49
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
50
- /** Accessible name override (mandatory when no label is visible). */
51
- this.ariaLabel = input(/* @ts-ignore */
52
- ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
53
- /** Press wave on this tab. `false` opts it out, global activation included. */
54
- this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
55
- /** External / plain URL. Presence switches the control to an `<a>`. */
56
- this.href = input(/* @ts-ignore */
57
- ...(ngDevMode ? [undefined, { debugName: "href" }] : /* istanbul ignore next */ []));
58
- /** Angular router target. Presence switches the control to an `<a>` (RouterLink). */
59
- this.routerLink = input(/* @ts-ignore */
60
- ...(ngDevMode ? [undefined, { debugName: "routerLink" }] : /* istanbul ignore next */ []));
61
- /** Anchor target (e.g. "_blank"). Link mode only. */
62
- this.target = input(/* @ts-ignore */
63
- ...(ngDevMode ? [undefined, { debugName: "target" }] : /* istanbul ignore next */ []));
64
- /** Anchor rel. Defaults to "noopener noreferrer" when target="_blank". */
65
- this.rel = input(/* @ts-ignore */
66
- ...(ngDevMode ? [undefined, { debugName: "rel" }] : /* istanbul ignore next */ []));
67
- /** Fired on activation (click, Enter/Space), even when already active. */
68
- this.tabClick = output();
69
- /** @ignore Parent bar (owns the active value + the shared options). */
70
- this.bar = inject(UiBottomTabBar);
71
- /** @ignore The native control, for programmatic focus. */
72
- this.controlEl = viewChild.required('control', /* @ts-ignore */
73
- ...(ngDevMode ? [{ debugName: "controlEl" }] : /* istanbul ignore next */ []));
74
- /** @ignore Whether this tab is the active one. */
75
- this.active = computed(() => this.bar.isActive(this.value()), /* @ts-ignore */
76
- ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
77
- /** @ignore Label rendered only when provided AND the bar shows labels. */
78
- this.labelVisible = computed(() => !!this.label() && this.bar.showLabels(), /* @ts-ignore */
79
- ...(ngDevMode ? [{ debugName: "labelVisible" }] : /* istanbul ignore next */ []));
80
- /** @ignore Icon swapped on activation (filled once selected, outlined otherwise). */
81
- this.resolvedIcon = computed(() => this.active() ? (this.activeIcon() ?? this.icon()) : this.icon(), /* @ts-ignore */
82
- ...(ngDevMode ? [{ debugName: "resolvedIcon" }] : /* istanbul ignore next */ []));
83
- /** @ignore */
84
- this.resolvedIconType = computed(() => this.active() ? this.activeIconType() : this.iconType(), /* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "resolvedIconType" }] : /* istanbul ignore next */ []));
86
- /**
87
- * @ignore Accessible name: explicit, otherwise the hidden label. Left `null`
88
- * when the label is visible , the control's own text names it.
89
- */
90
- this.accessibleLabel = computed(() => this.ariaLabel() ?? (this.labelVisible() ? null : (this.label() ?? null)), /* @ts-ignore */
91
- ...(ngDevMode ? [{ debugName: "accessibleLabel" }] : /* istanbul ignore next */ []));
92
- /** @ignore Press wave: opted out on the tab, or on the whole bar. */
93
- this.rippleOn = computed(() => this.ripple() && this.bar.ripple(), /* @ts-ignore */
94
- ...(ngDevMode ? [{ debugName: "rippleOn" }] : /* istanbul ignore next */ []));
95
- /** @ignore Control renders an `<a>` (a URL or a router target was provided). */
96
- this.isLink = computed(() => !!this.href() || this.routerLink() != null, /* @ts-ignore */
97
- ...(ngDevMode ? [{ debugName: "isLink" }] : /* istanbul ignore next */ []));
98
- /** @ignore */
99
- this.useRouterLink = computed(() => this.routerLink() != null, /* @ts-ignore */
100
- ...(ngDevMode ? [{ debugName: "useRouterLink" }] : /* istanbul ignore next */ []));
101
- /** @ignore Anchor rel: explicit, or a safe default for target="_blank". */
102
- this.computedRel = computed(() => {
103
- if (this.rel())
104
- return this.rel();
105
- if (this.target() === '_blank')
106
- return 'noopener noreferrer';
107
- return null;
108
- }, /* @ts-ignore */
109
- ...(ngDevMode ? [{ debugName: "computedRel" }] : /* istanbul ignore next */ []));
110
- /** @ignore An `<a>` has no native `disabled`: take it out of the tab order. */
111
- this.linkTabindex = computed(() => (this.disabled() ? -1 : null), /* @ts-ignore */
112
- ...(ngDevMode ? [{ debugName: "linkTabindex" }] : /* istanbul ignore next */ []));
113
- /** @ignore */
114
- this.classes = computed(() => {
115
- const c = ['ui-bottom-tab'];
116
- if (this.active())
117
- c.push('_active');
118
- if (this.disabled())
119
- c.push('_disabled');
120
- if (!this.labelVisible())
121
- c.push('_no-label');
122
- return c.join(' ');
123
- }, /* @ts-ignore */
124
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
125
- if (isDevMode()) {
126
- effect(() => {
127
- if (!this.labelVisible() && !this.accessibleLabel()) {
128
- console.warn('[ui-bottom-tab] Tab with no visible label has no accessible name: provide `ariaLabel` (or `label`).');
129
- }
130
- });
131
- }
132
- }
133
- /** Move focus to this tab's control. */
134
- focus(options) {
135
- this.controlEl().nativeElement.focus(options);
136
- }
137
- /** @ignore */
138
- onClick(event) {
139
- if (this.disabled()) {
140
- event.preventDefault();
141
- return;
142
- }
143
- this.tabClick.emit(event);
144
- this.bar.updateValue(this.value(), event);
145
- }
146
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiBottomTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
147
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiBottomTab, isStandalone: true, selector: "ui-bottom-tab", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, activeIcon: { classPropertyName: "activeIcon", publicName: "activeIcon", isSignal: true, isRequired: false, transformFunction: null }, iconType: { classPropertyName: "iconType", publicName: "iconType", isSignal: true, isRequired: false, transformFunction: null }, activeIconType: { classPropertyName: "activeIconType", publicName: "activeIconType", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabClick: "tabClick" }, host: { classAttribute: "ui-bottom-tab-host" }, viewQueries: [{ propertyName: "controlEl", first: true, predicate: ["control"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isLink()) {\n @if (useRouterLink()) {\n <a\n #control\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n } @else {\n <a\n #control\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n }\n} @else {\n <button\n #control\n type=\"button\"\n [class]=\"classes()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </button>\n}\n\n<ng-template #inner>\n <span class=\"ui-bottom-tab-icon-box\">\n @if (resolvedIcon(); as name) {\n <ui-icon\n class=\"ui-bottom-tab-icon\"\n [name]=\"name\"\n [type]=\"resolvedIconType()\"\n size=\"default\"\n />\n }\n <!-- Adornment layer over the icon (notification badge, dot\u2026): projected content,\n never hit-tested, so a tap always reaches the control. -->\n <span class=\"ui-bottom-tab-adornment\"><ng-content /></span>\n </span>\n @if (labelVisible()) {\n <span class=\"ui-bottom-tab-label\">{{ label() }}</span>\n }\n</ng-template>\n", styles: [":host{display:contents}.ui-bottom-tab{display:flex;flex:1 1 0;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:var(--ui-bottom-tab-bar-item-min-height, 3.5rem);margin:0;padding:var(--ui-bottom-tab-bar-item-padding-y, var(--units-md)) var(--ui-bottom-tab-bar-item-padding-x, var(--units-xs));border:0;border-radius:var(--ui-bottom-tab-bar-item-radius, 0);gap:var(--ui-bottom-tab-bar-item-gap, var(--units-sm));background-color:var(--ui-bottom-tab-bar-tab-surface, var(--navigation-high-surface-default));color:var(--ui-bottom-tab-bar-tab-color, var(--navigation-high-content-default));font-family:var(--ui-bottom-tab-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-bottom-tab-bar-label-weight, var(--weight-regular));font-size:var(--ui-bottom-tab-bar-label-font-size, var(--size-typography-text-sm));line-height:1.2;text-align:center;text-decoration:none;cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-bottom-tab:hover:not(:disabled,[aria-disabled=true]){background-color:var(--ui-bottom-tab-bar-tab-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-bottom-tab-bar-tab-color-hover, var(--navigation-high-content-hover))}.ui-bottom-tab:focus-visible{outline:none;background-color:var(--ui-bottom-tab-bar-tab-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-bottom-tab-bar-tab-color-focus, var(--navigation-high-content-focused));box-shadow:inset 0 0 0 var(--ui-bottom-tab-bar-item-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-tab-bar-tab-focus-ring-color, var(--global-border-focus))}.ui-bottom-tab:active:not(:disabled,[aria-disabled=true]){background-color:var(--ui-bottom-tab-bar-tab-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-bottom-tab-bar-tab-color-pressed, var(--navigation-high-content-pressed))}.ui-bottom-tab:disabled,.ui-bottom-tab._disabled{background-color:var(--ui-bottom-tab-bar-tab-surface-disabled, var(--navigation-high-surface-disabled));color:var(--ui-bottom-tab-bar-tab-color-disabled, var(--navigation-high-content-disabled));cursor:not-allowed}.ui-bottom-tab._active{background-color:var(--ui-bottom-tab-bar-tab-surface-active, var(--navigation-high-surface-active));color:var(--ui-bottom-tab-bar-tab-color-active, var(--navigation-high-content-active))}.ui-bottom-tab-icon-box{position:relative;display:inline-flex;flex:none;align-items:center;justify-content:center}.ui-bottom-tab-icon{--ui-icon-size: var(--ui-bottom-tab-bar-icon-size, var(--size-typography-icon-default))}.ui-bottom-tab-adornment{position:absolute;top:var(--ui-bottom-tab-bar-adornment-offset, -.375rem);left:100%;display:flex;align-items:center;transform:translate(var(--ui-bottom-tab-bar-adornment-offset, -.375rem));pointer-events:none}.ui-bottom-tab-label{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] }); }
148
- }
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiBottomTab, decorators: [{
150
- type: Component,
151
- args: [{ selector: 'ui-bottom-tab', imports: [UiIcon, NgTemplateOutlet, RouterLink], host: { class: 'ui-bottom-tab-host' }, template: "@if (isLink()) {\n @if (useRouterLink()) {\n <a\n #control\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n } @else {\n <a\n #control\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n }\n} @else {\n <button\n #control\n type=\"button\"\n [class]=\"classes()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </button>\n}\n\n<ng-template #inner>\n <span class=\"ui-bottom-tab-icon-box\">\n @if (resolvedIcon(); as name) {\n <ui-icon\n class=\"ui-bottom-tab-icon\"\n [name]=\"name\"\n [type]=\"resolvedIconType()\"\n size=\"default\"\n />\n }\n <!-- Adornment layer over the icon (notification badge, dot\u2026): projected content,\n never hit-tested, so a tap always reaches the control. -->\n <span class=\"ui-bottom-tab-adornment\"><ng-content /></span>\n </span>\n @if (labelVisible()) {\n <span class=\"ui-bottom-tab-label\">{{ label() }}</span>\n }\n</ng-template>\n", styles: [":host{display:contents}.ui-bottom-tab{display:flex;flex:1 1 0;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:var(--ui-bottom-tab-bar-item-min-height, 3.5rem);margin:0;padding:var(--ui-bottom-tab-bar-item-padding-y, var(--units-md)) var(--ui-bottom-tab-bar-item-padding-x, var(--units-xs));border:0;border-radius:var(--ui-bottom-tab-bar-item-radius, 0);gap:var(--ui-bottom-tab-bar-item-gap, var(--units-sm));background-color:var(--ui-bottom-tab-bar-tab-surface, var(--navigation-high-surface-default));color:var(--ui-bottom-tab-bar-tab-color, var(--navigation-high-content-default));font-family:var(--ui-bottom-tab-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-bottom-tab-bar-label-weight, var(--weight-regular));font-size:var(--ui-bottom-tab-bar-label-font-size, var(--size-typography-text-sm));line-height:1.2;text-align:center;text-decoration:none;cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-bottom-tab:hover:not(:disabled,[aria-disabled=true]){background-color:var(--ui-bottom-tab-bar-tab-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-bottom-tab-bar-tab-color-hover, var(--navigation-high-content-hover))}.ui-bottom-tab:focus-visible{outline:none;background-color:var(--ui-bottom-tab-bar-tab-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-bottom-tab-bar-tab-color-focus, var(--navigation-high-content-focused));box-shadow:inset 0 0 0 var(--ui-bottom-tab-bar-item-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-tab-bar-tab-focus-ring-color, var(--global-border-focus))}.ui-bottom-tab:active:not(:disabled,[aria-disabled=true]){background-color:var(--ui-bottom-tab-bar-tab-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-bottom-tab-bar-tab-color-pressed, var(--navigation-high-content-pressed))}.ui-bottom-tab:disabled,.ui-bottom-tab._disabled{background-color:var(--ui-bottom-tab-bar-tab-surface-disabled, var(--navigation-high-surface-disabled));color:var(--ui-bottom-tab-bar-tab-color-disabled, var(--navigation-high-content-disabled));cursor:not-allowed}.ui-bottom-tab._active{background-color:var(--ui-bottom-tab-bar-tab-surface-active, var(--navigation-high-surface-active));color:var(--ui-bottom-tab-bar-tab-color-active, var(--navigation-high-content-active))}.ui-bottom-tab-icon-box{position:relative;display:inline-flex;flex:none;align-items:center;justify-content:center}.ui-bottom-tab-icon{--ui-icon-size: var(--ui-bottom-tab-bar-icon-size, var(--size-typography-icon-default))}.ui-bottom-tab-adornment{position:absolute;top:var(--ui-bottom-tab-bar-adornment-offset, -.375rem);left:100%;display:flex;align-items:center;transform:translate(var(--ui-bottom-tab-bar-adornment-offset, -.375rem));pointer-events:none}.ui-bottom-tab-label{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"] }]
152
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], activeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIcon", required: false }] }], iconType: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconType", required: false }] }], activeIconType: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIconType", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], rel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rel", required: false }] }], tabClick: [{ type: i0.Output, args: ["tabClick"] }], controlEl: [{ type: i0.ViewChild, args: ['control', { isSignal: true }] }] } });
153
- /**
154
- * ui-bottom-tab-action , the circular action raised above a
155
- * {@link UiBottomTabBar} (the "float action" slot of the Figma component).
156
- *
157
- * A command, not a destination: it never carries the bar's active state. Place
158
- * it anywhere among the tabs , between the second and the third for the classic
159
- * centred layout. Always icon-only, so `ariaLabel` is mandatory.
160
- */
161
- class UiBottomTabAction {
162
- constructor() {
163
- /** Icon name. */
164
- this.icon = input('plus', /* @ts-ignore */
165
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
166
- /** Icon variant. */
167
- this.iconType = input('solid', /* @ts-ignore */
168
- ...(ngDevMode ? [{ debugName: "iconType" }] : /* istanbul ignore next */ []));
169
- /** Colour family, mapped onto the `actions.{level}` tokens. */
170
- this.level = input('high', /* @ts-ignore */
171
- ...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
172
- /** Accessible name , mandatory, the button carries no visible text. */
173
- this.ariaLabel = input(/* @ts-ignore */
174
- ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
175
- /** Disable the action (native attribute). */
176
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
177
- /** Press wave on this action. `false` opts it out, global activation included. */
178
- this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
179
- /** Fired on click (never when disabled). */
180
- this.actionClick = output();
181
- /** @ignore */
182
- this.controlEl = viewChild.required('control', /* @ts-ignore */
183
- ...(ngDevMode ? [{ debugName: "controlEl" }] : /* istanbul ignore next */ []));
184
- /** @ignore */
185
- this.classes = computed(() => ['ui-bottom-tab-action', `_${this.level()}`].join(' '), /* @ts-ignore */
186
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
187
- if (isDevMode()) {
188
- effect(() => {
189
- if (!this.ariaLabel()) {
190
- console.warn('[ui-bottom-tab-action] Icon-only action has no accessible name: provide `ariaLabel`.');
191
- }
192
- });
193
- }
194
- }
195
- /** Move focus to the action button. */
196
- focus(options) {
197
- this.controlEl().nativeElement.focus(options);
198
- }
199
- /** @ignore */
200
- onClick(event) {
201
- if (this.disabled())
202
- return;
203
- this.actionClick.emit(event);
204
- }
205
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiBottomTabAction, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
206
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: UiBottomTabAction, isStandalone: true, selector: "ui-bottom-tab-action", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconType: { classPropertyName: "iconType", publicName: "iconType", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick" }, host: { classAttribute: "ui-bottom-tab-action-host" }, viewQueries: [{ propertyName: "controlEl", first: true, predicate: ["control"], descendants: true, isSignal: true }], ngImport: i0, template: `
1
+ import * as i0 from "@angular/core";
2
+ import { Component, booleanAttribute, computed, effect, inject, input, isDevMode, model, output, viewChild } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { RouterLink } from "@angular/router";
5
+ import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
6
+ const CONTROL_SELECTOR = ".ui-bottom-tab, .ui-bottom-tab-action";
7
+ var UiBottomTab = class UiBottomTab {
8
+ constructor() {
9
+ this.value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
10
+ this.label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
11
+ this.icon = input(...ngDevMode ? [void 0, { debugName: "icon" }] : /* istanbul ignore next */ []);
12
+ this.activeIcon = input(...ngDevMode ? [void 0, { debugName: "activeIcon" }] : /* istanbul ignore next */ []);
13
+ this.iconType = input("solid", ...ngDevMode ? [{ debugName: "iconType" }] : /* istanbul ignore next */ []);
14
+ this.activeIconType = input("solid", ...ngDevMode ? [{ debugName: "activeIconType" }] : /* istanbul ignore next */ []);
15
+ this.disabled = input(false, {
16
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
17
+ transform: booleanAttribute
18
+ });
19
+ this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
20
+ this.ripple = input(true, {
21
+ ...ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {},
22
+ transform: booleanAttribute
23
+ });
24
+ this.href = input(...ngDevMode ? [void 0, { debugName: "href" }] : /* istanbul ignore next */ []);
25
+ this.routerLink = input(...ngDevMode ? [void 0, { debugName: "routerLink" }] : /* istanbul ignore next */ []);
26
+ this.target = input(...ngDevMode ? [void 0, { debugName: "target" }] : /* istanbul ignore next */ []);
27
+ this.rel = input(...ngDevMode ? [void 0, { debugName: "rel" }] : /* istanbul ignore next */ []);
28
+ this.tabClick = output();
29
+ this.bar = inject(UiBottomTabBar);
30
+ this.controlEl = viewChild.required("control", ...ngDevMode ? [{ debugName: "controlEl" }] : /* istanbul ignore next */ []);
31
+ this.active = computed(() => this.bar.isActive(this.value()), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
32
+ this.labelVisible = computed(() => !!this.label() && this.bar.showLabels(), ...ngDevMode ? [{ debugName: "labelVisible" }] : /* istanbul ignore next */ []);
33
+ this.resolvedIcon = computed(() => this.active() ? this.activeIcon() ?? this.icon() : this.icon(), ...ngDevMode ? [{ debugName: "resolvedIcon" }] : /* istanbul ignore next */ []);
34
+ this.resolvedIconType = computed(() => this.active() ? this.activeIconType() : this.iconType(), ...ngDevMode ? [{ debugName: "resolvedIconType" }] : /* istanbul ignore next */ []);
35
+ this.accessibleLabel = computed(() => this.ariaLabel() ?? (this.labelVisible() ? null : this.label() ?? null), ...ngDevMode ? [{ debugName: "accessibleLabel" }] : /* istanbul ignore next */ []);
36
+ this.rippleOn = computed(() => this.ripple() && this.bar.ripple(), ...ngDevMode ? [{ debugName: "rippleOn" }] : /* istanbul ignore next */ []);
37
+ this.isLink = computed(() => !!this.href() || this.routerLink() != null, ...ngDevMode ? [{ debugName: "isLink" }] : /* istanbul ignore next */ []);
38
+ this.useRouterLink = computed(() => this.routerLink() != null, ...ngDevMode ? [{ debugName: "useRouterLink" }] : /* istanbul ignore next */ []);
39
+ this.computedRel = computed(() => {
40
+ if (this.rel()) return this.rel();
41
+ if (this.target() === "_blank") return "noopener noreferrer";
42
+ return null;
43
+ }, ...ngDevMode ? [{ debugName: "computedRel" }] : /* istanbul ignore next */ []);
44
+ this.linkTabindex = computed(() => this.disabled() ? -1 : null, ...ngDevMode ? [{ debugName: "linkTabindex" }] : /* istanbul ignore next */ []);
45
+ this.classes = computed(() => {
46
+ const c = ["ui-bottom-tab"];
47
+ if (this.active()) c.push("_active");
48
+ if (this.disabled()) c.push("_disabled");
49
+ if (!this.labelVisible()) c.push("_no-label");
50
+ return c.join(" ");
51
+ }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
52
+ if (isDevMode()) effect(() => {
53
+ if (!this.labelVisible() && !this.accessibleLabel()) console.warn("[ui-bottom-tab] Tab with no visible label has no accessible name: provide `ariaLabel` (or `label`).");
54
+ });
55
+ }
56
+ focus(options) {
57
+ this.controlEl().nativeElement.focus(options);
58
+ }
59
+ onClick(event) {
60
+ if (this.disabled()) {
61
+ event.preventDefault();
62
+ return;
63
+ }
64
+ this.tabClick.emit(event);
65
+ this.bar.updateValue(this.value(), event);
66
+ }
67
+ static {
68
+ this.ɵfac = i0.ɵɵngDeclareFactory({
69
+ minVersion: "12.0.0",
70
+ version: "22.3.0",
71
+ ngImport: i0,
72
+ type: UiBottomTab,
73
+ deps: [],
74
+ target: i0.ɵɵFactoryTarget.Component
75
+ });
76
+ }
77
+ static {
78
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
79
+ minVersion: "17.0.0",
80
+ version: "22.3.0",
81
+ type: UiBottomTab,
82
+ isStandalone: true,
83
+ selector: "ui-bottom-tab",
84
+ inputs: {
85
+ value: {
86
+ classPropertyName: "value",
87
+ publicName: "value",
88
+ isSignal: true,
89
+ isRequired: true,
90
+ transformFunction: null
91
+ },
92
+ label: {
93
+ classPropertyName: "label",
94
+ publicName: "label",
95
+ isSignal: true,
96
+ isRequired: false,
97
+ transformFunction: null
98
+ },
99
+ icon: {
100
+ classPropertyName: "icon",
101
+ publicName: "icon",
102
+ isSignal: true,
103
+ isRequired: false,
104
+ transformFunction: null
105
+ },
106
+ activeIcon: {
107
+ classPropertyName: "activeIcon",
108
+ publicName: "activeIcon",
109
+ isSignal: true,
110
+ isRequired: false,
111
+ transformFunction: null
112
+ },
113
+ iconType: {
114
+ classPropertyName: "iconType",
115
+ publicName: "iconType",
116
+ isSignal: true,
117
+ isRequired: false,
118
+ transformFunction: null
119
+ },
120
+ activeIconType: {
121
+ classPropertyName: "activeIconType",
122
+ publicName: "activeIconType",
123
+ isSignal: true,
124
+ isRequired: false,
125
+ transformFunction: null
126
+ },
127
+ disabled: {
128
+ classPropertyName: "disabled",
129
+ publicName: "disabled",
130
+ isSignal: true,
131
+ isRequired: false,
132
+ transformFunction: null
133
+ },
134
+ ariaLabel: {
135
+ classPropertyName: "ariaLabel",
136
+ publicName: "ariaLabel",
137
+ isSignal: true,
138
+ isRequired: false,
139
+ transformFunction: null
140
+ },
141
+ ripple: {
142
+ classPropertyName: "ripple",
143
+ publicName: "ripple",
144
+ isSignal: true,
145
+ isRequired: false,
146
+ transformFunction: null
147
+ },
148
+ href: {
149
+ classPropertyName: "href",
150
+ publicName: "href",
151
+ isSignal: true,
152
+ isRequired: false,
153
+ transformFunction: null
154
+ },
155
+ routerLink: {
156
+ classPropertyName: "routerLink",
157
+ publicName: "routerLink",
158
+ isSignal: true,
159
+ isRequired: false,
160
+ transformFunction: null
161
+ },
162
+ target: {
163
+ classPropertyName: "target",
164
+ publicName: "target",
165
+ isSignal: true,
166
+ isRequired: false,
167
+ transformFunction: null
168
+ },
169
+ rel: {
170
+ classPropertyName: "rel",
171
+ publicName: "rel",
172
+ isSignal: true,
173
+ isRequired: false,
174
+ transformFunction: null
175
+ }
176
+ },
177
+ outputs: { tabClick: "tabClick" },
178
+ host: { classAttribute: "ui-bottom-tab-host" },
179
+ viewQueries: [{
180
+ propertyName: "controlEl",
181
+ first: true,
182
+ predicate: ["control"],
183
+ descendants: true,
184
+ isSignal: true
185
+ }],
186
+ ngImport: i0,
187
+ template: "@if (isLink()) {\n @if (useRouterLink()) {\n <a\n #control\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n } @else {\n <a\n #control\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n }\n} @else {\n <button\n #control\n type=\"button\"\n [class]=\"classes()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </button>\n}\n\n<ng-template #inner>\n <span class=\"ui-bottom-tab-icon-box\">\n @if (resolvedIcon(); as name) {\n <ui-icon\n class=\"ui-bottom-tab-icon\"\n [name]=\"name\"\n [type]=\"resolvedIconType()\"\n size=\"default\"\n />\n }\n <!-- Adornment layer over the icon (notification badge, dot…): projected content,\n never hit-tested, so a tap always reaches the control. -->\n <span class=\"ui-bottom-tab-adornment\"><ng-content /></span>\n </span>\n @if (labelVisible()) {\n <span class=\"ui-bottom-tab-label\">{{ label() }}</span>\n }\n</ng-template>\n",
188
+ styles: [":host{display:contents}.ui-bottom-tab{display:flex;flex:1 1 0;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:var(--ui-bottom-tab-bar-item-min-height, 3.5rem);margin:0;padding:var(--ui-bottom-tab-bar-item-padding-y, var(--units-md)) var(--ui-bottom-tab-bar-item-padding-x, var(--units-xs));border:0;border-radius:var(--ui-bottom-tab-bar-item-radius, 0);gap:var(--ui-bottom-tab-bar-item-gap, var(--units-sm));background-color:var(--ui-bottom-tab-bar-tab-surface, var(--navigation-high-surface-default));color:var(--ui-bottom-tab-bar-tab-color, var(--navigation-high-content-default));font-family:var(--ui-bottom-tab-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-bottom-tab-bar-label-weight, var(--weight-regular));font-size:var(--ui-bottom-tab-bar-label-font-size, var(--size-typography-text-sm));line-height:1.2;text-align:center;text-decoration:none;cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-bottom-tab:hover:not(:disabled,[aria-disabled=true]){background-color:var(--ui-bottom-tab-bar-tab-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-bottom-tab-bar-tab-color-hover, var(--navigation-high-content-hover))}.ui-bottom-tab:focus-visible{outline:none;background-color:var(--ui-bottom-tab-bar-tab-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-bottom-tab-bar-tab-color-focus, var(--navigation-high-content-focused));box-shadow:inset 0 0 0 var(--ui-bottom-tab-bar-item-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-tab-bar-tab-focus-ring-color, var(--global-border-focus))}.ui-bottom-tab:active:not(:disabled,[aria-disabled=true]){background-color:var(--ui-bottom-tab-bar-tab-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-bottom-tab-bar-tab-color-pressed, var(--navigation-high-content-pressed))}.ui-bottom-tab:disabled,.ui-bottom-tab._disabled{background-color:var(--ui-bottom-tab-bar-tab-surface-disabled, var(--navigation-high-surface-disabled));color:var(--ui-bottom-tab-bar-tab-color-disabled, var(--navigation-high-content-disabled));cursor:not-allowed}.ui-bottom-tab._active{background-color:var(--ui-bottom-tab-bar-tab-surface-active, var(--navigation-high-surface-active));color:var(--ui-bottom-tab-bar-tab-color-active, var(--navigation-high-content-active))}.ui-bottom-tab-icon-box{position:relative;display:inline-flex;flex:none;align-items:center;justify-content:center}.ui-bottom-tab-icon{--ui-icon-size: var(--ui-bottom-tab-bar-icon-size, var(--size-typography-icon-default))}.ui-bottom-tab-adornment{position:absolute;top:var(--ui-bottom-tab-bar-adornment-offset, -.375rem);left:100%;display:flex;align-items:center;transform:translate(var(--ui-bottom-tab-bar-adornment-offset, -.375rem));pointer-events:none}.ui-bottom-tab-label{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"],
189
+ dependencies: [
190
+ {
191
+ kind: "component",
192
+ type: UiIcon,
193
+ selector: "ui-icon",
194
+ inputs: [
195
+ "name",
196
+ "size",
197
+ "type",
198
+ "family",
199
+ "decorative",
200
+ "ariaLabel"
201
+ ]
202
+ },
203
+ {
204
+ kind: "directive",
205
+ type: NgTemplateOutlet,
206
+ selector: "[ngTemplateOutlet]",
207
+ inputs: [
208
+ "ngTemplateOutletContext",
209
+ "ngTemplateOutlet",
210
+ "ngTemplateOutletInjector"
211
+ ]
212
+ },
213
+ {
214
+ kind: "directive",
215
+ type: RouterLink,
216
+ selector: "[routerLink]",
217
+ inputs: [
218
+ "target",
219
+ "queryParams",
220
+ "fragment",
221
+ "queryParamsHandling",
222
+ "state",
223
+ "info",
224
+ "relativeTo",
225
+ "preserveFragment",
226
+ "skipLocationChange",
227
+ "replaceUrl",
228
+ "browserUrl",
229
+ "scroll",
230
+ "routerLink"
231
+ ]
232
+ }
233
+ ]
234
+ });
235
+ }
236
+ };
237
+ i0.ɵɵngDeclareClassMetadata({
238
+ minVersion: "12.0.0",
239
+ version: "22.3.0",
240
+ ngImport: i0,
241
+ type: UiBottomTab,
242
+ decorators: [{
243
+ type: Component,
244
+ args: [{
245
+ selector: "ui-bottom-tab",
246
+ imports: [
247
+ UiIcon,
248
+ NgTemplateOutlet,
249
+ RouterLink
250
+ ],
251
+ host: { class: "ui-bottom-tab-host" },
252
+ template: "@if (isLink()) {\n @if (useRouterLink()) {\n <a\n #control\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n } @else {\n <a\n #control\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n }\n} @else {\n <button\n #control\n type=\"button\"\n [class]=\"classes()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.data-ripple]=\"rippleOn() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </button>\n}\n\n<ng-template #inner>\n <span class=\"ui-bottom-tab-icon-box\">\n @if (resolvedIcon(); as name) {\n <ui-icon\n class=\"ui-bottom-tab-icon\"\n [name]=\"name\"\n [type]=\"resolvedIconType()\"\n size=\"default\"\n />\n }\n <!-- Adornment layer over the icon (notification badge, dot…): projected content,\n never hit-tested, so a tap always reaches the control. -->\n <span class=\"ui-bottom-tab-adornment\"><ng-content /></span>\n </span>\n @if (labelVisible()) {\n <span class=\"ui-bottom-tab-label\">{{ label() }}</span>\n }\n</ng-template>\n",
253
+ styles: [":host{display:contents}.ui-bottom-tab{display:flex;flex:1 1 0;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:var(--ui-bottom-tab-bar-item-min-height, 3.5rem);margin:0;padding:var(--ui-bottom-tab-bar-item-padding-y, var(--units-md)) var(--ui-bottom-tab-bar-item-padding-x, var(--units-xs));border:0;border-radius:var(--ui-bottom-tab-bar-item-radius, 0);gap:var(--ui-bottom-tab-bar-item-gap, var(--units-sm));background-color:var(--ui-bottom-tab-bar-tab-surface, var(--navigation-high-surface-default));color:var(--ui-bottom-tab-bar-tab-color, var(--navigation-high-content-default));font-family:var(--ui-bottom-tab-bar-font-family, var(--fontfamily-base));font-weight:var(--ui-bottom-tab-bar-label-weight, var(--weight-regular));font-size:var(--ui-bottom-tab-bar-label-font-size, var(--size-typography-text-sm));line-height:1.2;text-align:center;text-decoration:none;cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-bottom-tab:hover:not(:disabled,[aria-disabled=true]){background-color:var(--ui-bottom-tab-bar-tab-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-bottom-tab-bar-tab-color-hover, var(--navigation-high-content-hover))}.ui-bottom-tab:focus-visible{outline:none;background-color:var(--ui-bottom-tab-bar-tab-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-bottom-tab-bar-tab-color-focus, var(--navigation-high-content-focused));box-shadow:inset 0 0 0 var(--ui-bottom-tab-bar-item-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-tab-bar-tab-focus-ring-color, var(--global-border-focus))}.ui-bottom-tab:active:not(:disabled,[aria-disabled=true]){background-color:var(--ui-bottom-tab-bar-tab-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-bottom-tab-bar-tab-color-pressed, var(--navigation-high-content-pressed))}.ui-bottom-tab:disabled,.ui-bottom-tab._disabled{background-color:var(--ui-bottom-tab-bar-tab-surface-disabled, var(--navigation-high-surface-disabled));color:var(--ui-bottom-tab-bar-tab-color-disabled, var(--navigation-high-content-disabled));cursor:not-allowed}.ui-bottom-tab._active{background-color:var(--ui-bottom-tab-bar-tab-surface-active, var(--navigation-high-surface-active));color:var(--ui-bottom-tab-bar-tab-color-active, var(--navigation-high-content-active))}.ui-bottom-tab-icon-box{position:relative;display:inline-flex;flex:none;align-items:center;justify-content:center}.ui-bottom-tab-icon{--ui-icon-size: var(--ui-bottom-tab-bar-icon-size, var(--size-typography-icon-default))}.ui-bottom-tab-adornment{position:absolute;top:var(--ui-bottom-tab-bar-adornment-offset, -.375rem);left:100%;display:flex;align-items:center;transform:translate(var(--ui-bottom-tab-bar-adornment-offset, -.375rem));pointer-events:none}.ui-bottom-tab-label{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"]
254
+ }]
255
+ }],
256
+ ctorParameters: () => [],
257
+ propDecorators: {
258
+ value: [{
259
+ type: i0.Input,
260
+ args: [{
261
+ isSignal: true,
262
+ alias: "value",
263
+ required: true
264
+ }]
265
+ }],
266
+ label: [{
267
+ type: i0.Input,
268
+ args: [{
269
+ isSignal: true,
270
+ alias: "label",
271
+ required: false
272
+ }]
273
+ }],
274
+ icon: [{
275
+ type: i0.Input,
276
+ args: [{
277
+ isSignal: true,
278
+ alias: "icon",
279
+ required: false
280
+ }]
281
+ }],
282
+ activeIcon: [{
283
+ type: i0.Input,
284
+ args: [{
285
+ isSignal: true,
286
+ alias: "activeIcon",
287
+ required: false
288
+ }]
289
+ }],
290
+ iconType: [{
291
+ type: i0.Input,
292
+ args: [{
293
+ isSignal: true,
294
+ alias: "iconType",
295
+ required: false
296
+ }]
297
+ }],
298
+ activeIconType: [{
299
+ type: i0.Input,
300
+ args: [{
301
+ isSignal: true,
302
+ alias: "activeIconType",
303
+ required: false
304
+ }]
305
+ }],
306
+ disabled: [{
307
+ type: i0.Input,
308
+ args: [{
309
+ isSignal: true,
310
+ alias: "disabled",
311
+ required: false
312
+ }]
313
+ }],
314
+ ariaLabel: [{
315
+ type: i0.Input,
316
+ args: [{
317
+ isSignal: true,
318
+ alias: "ariaLabel",
319
+ required: false
320
+ }]
321
+ }],
322
+ ripple: [{
323
+ type: i0.Input,
324
+ args: [{
325
+ isSignal: true,
326
+ alias: "ripple",
327
+ required: false
328
+ }]
329
+ }],
330
+ href: [{
331
+ type: i0.Input,
332
+ args: [{
333
+ isSignal: true,
334
+ alias: "href",
335
+ required: false
336
+ }]
337
+ }],
338
+ routerLink: [{
339
+ type: i0.Input,
340
+ args: [{
341
+ isSignal: true,
342
+ alias: "routerLink",
343
+ required: false
344
+ }]
345
+ }],
346
+ target: [{
347
+ type: i0.Input,
348
+ args: [{
349
+ isSignal: true,
350
+ alias: "target",
351
+ required: false
352
+ }]
353
+ }],
354
+ rel: [{
355
+ type: i0.Input,
356
+ args: [{
357
+ isSignal: true,
358
+ alias: "rel",
359
+ required: false
360
+ }]
361
+ }],
362
+ tabClick: [{
363
+ type: i0.Output,
364
+ args: ["tabClick"]
365
+ }],
366
+ controlEl: [{
367
+ type: i0.ViewChild,
368
+ args: ["control", { isSignal: true }]
369
+ }]
370
+ }
371
+ });
372
+ var UiBottomTabAction = class UiBottomTabAction {
373
+ constructor() {
374
+ this.icon = input("plus", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
375
+ this.iconType = input("solid", ...ngDevMode ? [{ debugName: "iconType" }] : /* istanbul ignore next */ []);
376
+ this.level = input("high", ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
377
+ this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
378
+ this.disabled = input(false, {
379
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
380
+ transform: booleanAttribute
381
+ });
382
+ this.ripple = input(true, {
383
+ ...ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {},
384
+ transform: booleanAttribute
385
+ });
386
+ this.actionClick = output();
387
+ this.controlEl = viewChild.required("control", ...ngDevMode ? [{ debugName: "controlEl" }] : /* istanbul ignore next */ []);
388
+ this.classes = computed(() => ["ui-bottom-tab-action", `_${this.level()}`].join(" "), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
389
+ if (isDevMode()) effect(() => {
390
+ if (!this.ariaLabel()) console.warn("[ui-bottom-tab-action] Icon-only action has no accessible name: provide `ariaLabel`.");
391
+ });
392
+ }
393
+ focus(options) {
394
+ this.controlEl().nativeElement.focus(options);
395
+ }
396
+ onClick(event) {
397
+ if (this.disabled()) return;
398
+ this.actionClick.emit(event);
399
+ }
400
+ static {
401
+ this.ɵfac = i0.ɵɵngDeclareFactory({
402
+ minVersion: "12.0.0",
403
+ version: "22.3.0",
404
+ ngImport: i0,
405
+ type: UiBottomTabAction,
406
+ deps: [],
407
+ target: i0.ɵɵFactoryTarget.Component
408
+ });
409
+ }
410
+ static {
411
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
412
+ minVersion: "17.2.0",
413
+ version: "22.3.0",
414
+ type: UiBottomTabAction,
415
+ isStandalone: true,
416
+ selector: "ui-bottom-tab-action",
417
+ inputs: {
418
+ icon: {
419
+ classPropertyName: "icon",
420
+ publicName: "icon",
421
+ isSignal: true,
422
+ isRequired: false,
423
+ transformFunction: null
424
+ },
425
+ iconType: {
426
+ classPropertyName: "iconType",
427
+ publicName: "iconType",
428
+ isSignal: true,
429
+ isRequired: false,
430
+ transformFunction: null
431
+ },
432
+ level: {
433
+ classPropertyName: "level",
434
+ publicName: "level",
435
+ isSignal: true,
436
+ isRequired: false,
437
+ transformFunction: null
438
+ },
439
+ ariaLabel: {
440
+ classPropertyName: "ariaLabel",
441
+ publicName: "ariaLabel",
442
+ isSignal: true,
443
+ isRequired: false,
444
+ transformFunction: null
445
+ },
446
+ disabled: {
447
+ classPropertyName: "disabled",
448
+ publicName: "disabled",
449
+ isSignal: true,
450
+ isRequired: false,
451
+ transformFunction: null
452
+ },
453
+ ripple: {
454
+ classPropertyName: "ripple",
455
+ publicName: "ripple",
456
+ isSignal: true,
457
+ isRequired: false,
458
+ transformFunction: null
459
+ }
460
+ },
461
+ outputs: { actionClick: "actionClick" },
462
+ host: { classAttribute: "ui-bottom-tab-action-host" },
463
+ viewQueries: [{
464
+ propertyName: "controlEl",
465
+ first: true,
466
+ predicate: ["control"],
467
+ descendants: true,
468
+ isSignal: true
469
+ }],
470
+ ngImport: i0,
471
+ template: `
207
472
  <button
208
473
  #control
209
474
  type="button"
@@ -215,11 +480,36 @@ class UiBottomTabAction {
215
480
  >
216
481
  <ui-icon class="ui-bottom-tab-action-icon" [name]="icon()" size="xl" [type]="iconType()" />
217
482
  </button>
218
- `, isInline: true, styles: [":host{display:contents}.ui-bottom-tab-action{display:inline-flex;flex:none;align-items:center;justify-content:center;align-self:center;box-sizing:border-box;width:var(--ui-bottom-tab-bar-action-size, 4rem);height:var(--ui-bottom-tab-bar-action-size, 4rem);margin:0 var(--ui-bottom-tab-bar-action-gap, var(--units-2xs));padding:0;border:0;border-radius:var(--ui-bottom-tab-bar-action-radius, var(--radius-full));transform:translateY(calc(-1 * var(--ui-bottom-tab-bar-action-offset-y, 1.25rem)));box-shadow:var(--ui-bottom-tab-bar-action-shadow, var(--shadow-default-md));cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-bottom-tab-action:focus-visible{outline:none;box-shadow:var(--ui-bottom-tab-bar-action-shadow, var(--shadow-default-md)),0 0 0 var(--ui-bottom-tab-bar-action-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-tab-bar-action-focus-ring-color, var(--global-border-focus))}.ui-bottom-tab-action:disabled{box-shadow:none;cursor:not-allowed}.ui-bottom-tab-action._high{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-high-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-high-content-default))}.ui-bottom-tab-action._high:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-high-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-high-content-hover))}.ui-bottom-tab-action._high:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-high-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-high-content-focused))}.ui-bottom-tab-action._high:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-high-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-high-content-pressed))}.ui-bottom-tab-action._high:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-high-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-high-content-disabled))}.ui-bottom-tab-action._low{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-low-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-low-content-default))}.ui-bottom-tab-action._low:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-low-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-low-content-hover))}.ui-bottom-tab-action._low:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-low-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-low-content-focused))}.ui-bottom-tab-action._low:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-low-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-low-content-pressed))}.ui-bottom-tab-action._low:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-low-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-low-content-disabled))}.ui-bottom-tab-action._success{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-success-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-success-content-default))}.ui-bottom-tab-action._success:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-success-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-success-content-hover))}.ui-bottom-tab-action._success:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-success-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-success-content-focused))}.ui-bottom-tab-action._success:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-success-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-success-content-pressed))}.ui-bottom-tab-action._success:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-success-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-success-content-disabled))}.ui-bottom-tab-action._warning{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-warning-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-warning-content-default))}.ui-bottom-tab-action._warning:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-warning-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-warning-content-hover))}.ui-bottom-tab-action._warning:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-warning-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-warning-content-focused))}.ui-bottom-tab-action._warning:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-warning-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-warning-content-pressed))}.ui-bottom-tab-action._warning:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-warning-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-warning-content-disabled))}.ui-bottom-tab-action._error{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-error-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-error-content-default))}.ui-bottom-tab-action._error:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-error-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-error-content-hover))}.ui-bottom-tab-action._error:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-error-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-error-content-focused))}.ui-bottom-tab-action._error:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-error-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-error-content-pressed))}.ui-bottom-tab-action._error:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-error-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-error-content-disabled))}.ui-bottom-tab-action-icon{--ui-icon-size: var(--ui-bottom-tab-bar-action-icon-size, var(--size-typography-icon-xl))}\n"], dependencies: [{ kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
219
- }
220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiBottomTabAction, decorators: [{
221
- type: Component,
222
- args: [{ selector: 'ui-bottom-tab-action', imports: [UiIcon], template: `
483
+ `,
484
+ isInline: true,
485
+ styles: [":host{display:contents}.ui-bottom-tab-action{display:inline-flex;flex:none;align-items:center;justify-content:center;align-self:center;box-sizing:border-box;width:var(--ui-bottom-tab-bar-action-size, 4rem);height:var(--ui-bottom-tab-bar-action-size, 4rem);margin:0 var(--ui-bottom-tab-bar-action-gap, var(--units-2xs));padding:0;border:0;border-radius:var(--ui-bottom-tab-bar-action-radius, var(--radius-full));transform:translateY(calc(-1 * var(--ui-bottom-tab-bar-action-offset-y, 1.25rem)));box-shadow:var(--ui-bottom-tab-bar-action-shadow, var(--shadow-default-md));cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-bottom-tab-action:focus-visible{outline:none;box-shadow:var(--ui-bottom-tab-bar-action-shadow, var(--shadow-default-md)),0 0 0 var(--ui-bottom-tab-bar-action-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-tab-bar-action-focus-ring-color, var(--global-border-focus))}.ui-bottom-tab-action:disabled{box-shadow:none;cursor:not-allowed}.ui-bottom-tab-action._high{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-high-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-high-content-default))}.ui-bottom-tab-action._high:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-high-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-high-content-hover))}.ui-bottom-tab-action._high:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-high-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-high-content-focused))}.ui-bottom-tab-action._high:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-high-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-high-content-pressed))}.ui-bottom-tab-action._high:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-high-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-high-content-disabled))}.ui-bottom-tab-action._low{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-low-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-low-content-default))}.ui-bottom-tab-action._low:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-low-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-low-content-hover))}.ui-bottom-tab-action._low:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-low-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-low-content-focused))}.ui-bottom-tab-action._low:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-low-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-low-content-pressed))}.ui-bottom-tab-action._low:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-low-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-low-content-disabled))}.ui-bottom-tab-action._success{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-success-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-success-content-default))}.ui-bottom-tab-action._success:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-success-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-success-content-hover))}.ui-bottom-tab-action._success:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-success-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-success-content-focused))}.ui-bottom-tab-action._success:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-success-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-success-content-pressed))}.ui-bottom-tab-action._success:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-success-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-success-content-disabled))}.ui-bottom-tab-action._warning{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-warning-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-warning-content-default))}.ui-bottom-tab-action._warning:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-warning-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-warning-content-hover))}.ui-bottom-tab-action._warning:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-warning-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-warning-content-focused))}.ui-bottom-tab-action._warning:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-warning-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-warning-content-pressed))}.ui-bottom-tab-action._warning:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-warning-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-warning-content-disabled))}.ui-bottom-tab-action._error{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-error-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-error-content-default))}.ui-bottom-tab-action._error:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-error-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-error-content-hover))}.ui-bottom-tab-action._error:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-error-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-error-content-focused))}.ui-bottom-tab-action._error:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-error-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-error-content-pressed))}.ui-bottom-tab-action._error:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-error-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-error-content-disabled))}.ui-bottom-tab-action-icon{--ui-icon-size: var(--ui-bottom-tab-bar-action-icon-size, var(--size-typography-icon-xl))}\n"],
486
+ dependencies: [{
487
+ kind: "component",
488
+ type: UiIcon,
489
+ selector: "ui-icon",
490
+ inputs: [
491
+ "name",
492
+ "size",
493
+ "type",
494
+ "family",
495
+ "decorative",
496
+ "ariaLabel"
497
+ ]
498
+ }]
499
+ });
500
+ }
501
+ };
502
+ i0.ɵɵngDeclareClassMetadata({
503
+ minVersion: "12.0.0",
504
+ version: "22.3.0",
505
+ ngImport: i0,
506
+ type: UiBottomTabAction,
507
+ decorators: [{
508
+ type: Component,
509
+ args: [{
510
+ selector: "ui-bottom-tab-action",
511
+ imports: [UiIcon],
512
+ template: `
223
513
  <button
224
514
  #control
225
515
  type="button"
@@ -231,140 +521,302 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
231
521
  >
232
522
  <ui-icon class="ui-bottom-tab-action-icon" [name]="icon()" size="xl" [type]="iconType()" />
233
523
  </button>
234
- `, host: { class: 'ui-bottom-tab-action-host' }, styles: [":host{display:contents}.ui-bottom-tab-action{display:inline-flex;flex:none;align-items:center;justify-content:center;align-self:center;box-sizing:border-box;width:var(--ui-bottom-tab-bar-action-size, 4rem);height:var(--ui-bottom-tab-bar-action-size, 4rem);margin:0 var(--ui-bottom-tab-bar-action-gap, var(--units-2xs));padding:0;border:0;border-radius:var(--ui-bottom-tab-bar-action-radius, var(--radius-full));transform:translateY(calc(-1 * var(--ui-bottom-tab-bar-action-offset-y, 1.25rem)));box-shadow:var(--ui-bottom-tab-bar-action-shadow, var(--shadow-default-md));cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-bottom-tab-action:focus-visible{outline:none;box-shadow:var(--ui-bottom-tab-bar-action-shadow, var(--shadow-default-md)),0 0 0 var(--ui-bottom-tab-bar-action-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-tab-bar-action-focus-ring-color, var(--global-border-focus))}.ui-bottom-tab-action:disabled{box-shadow:none;cursor:not-allowed}.ui-bottom-tab-action._high{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-high-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-high-content-default))}.ui-bottom-tab-action._high:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-high-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-high-content-hover))}.ui-bottom-tab-action._high:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-high-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-high-content-focused))}.ui-bottom-tab-action._high:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-high-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-high-content-pressed))}.ui-bottom-tab-action._high:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-high-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-high-content-disabled))}.ui-bottom-tab-action._low{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-low-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-low-content-default))}.ui-bottom-tab-action._low:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-low-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-low-content-hover))}.ui-bottom-tab-action._low:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-low-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-low-content-focused))}.ui-bottom-tab-action._low:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-low-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-low-content-pressed))}.ui-bottom-tab-action._low:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-low-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-low-content-disabled))}.ui-bottom-tab-action._success{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-success-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-success-content-default))}.ui-bottom-tab-action._success:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-success-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-success-content-hover))}.ui-bottom-tab-action._success:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-success-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-success-content-focused))}.ui-bottom-tab-action._success:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-success-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-success-content-pressed))}.ui-bottom-tab-action._success:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-success-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-success-content-disabled))}.ui-bottom-tab-action._warning{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-warning-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-warning-content-default))}.ui-bottom-tab-action._warning:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-warning-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-warning-content-hover))}.ui-bottom-tab-action._warning:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-warning-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-warning-content-focused))}.ui-bottom-tab-action._warning:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-warning-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-warning-content-pressed))}.ui-bottom-tab-action._warning:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-warning-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-warning-content-disabled))}.ui-bottom-tab-action._error{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-error-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-error-content-default))}.ui-bottom-tab-action._error:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-error-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-error-content-hover))}.ui-bottom-tab-action._error:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-error-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-error-content-focused))}.ui-bottom-tab-action._error:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-error-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-error-content-pressed))}.ui-bottom-tab-action._error:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-error-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-error-content-disabled))}.ui-bottom-tab-action-icon{--ui-icon-size: var(--ui-bottom-tab-bar-action-icon-size, var(--size-typography-icon-xl))}\n"] }]
235
- }], ctorParameters: () => [], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconType: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconType", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], controlEl: [{ type: i0.ViewChild, args: ['control', { isSignal: true }] }] } });
236
- /**
237
- * ui-bottom-tab-bar , bottom navigation bar for touch devices (mobile, tablet).
238
- *
239
- * A `<nav>` landmark pinned to the bottom of the viewport, holding three to five
240
- * {@link UiBottomTab} destinations and, optionally, a raised
241
- * {@link UiBottomTabAction}. Every colour and metric comes from the
242
- * `navigation.*` / `actions.*` design tokens.
243
- *
244
- * Built for the constraints of the device it lives on: the bar reserves the
245
- * system inset (`safeArea`, the iOS home indicator and the Android gesture bar),
246
- * items never fall under the 44px touch target, the double-tap zoom delay and
247
- * the native tap flash are off (the kit's ripple owns press feedback), and the
248
- * bar disappears from print. It positions itself `fixed` , pass `contained` to
249
- * lay it out inside a positioned ancestor instead (a phone mockup, an embedded
250
- * shell).
251
- *
252
- * @example
253
- * ```html
254
- * <ui-bottom-tab-bar [(value)]="route" ariaLabel="Navigation principale">
255
- * <ui-bottom-tab value="/home" icon="house" label="Accueil" />
256
- * <ui-bottom-tab value="/search" icon="magnifying-glass" label="Recherche" />
257
- * <ui-bottom-tab-action ariaLabel="Nouveau message" (actionClick)="compose()" />
258
- * <ui-bottom-tab value="/inbox" icon="envelope" label="Messages">
259
- * <ui-badge value="3" level="error" />
260
- * </ui-bottom-tab>
261
- * <ui-bottom-tab value="/settings" icon="gear" label="Réglages" />
262
- * </ui-bottom-tab-bar>
263
- * ```
264
- */
265
- class UiBottomTabBar {
266
- constructor() {
267
- /** Value of the active tab (two-way). `undefined` = no active tab. */
268
- this.value = model(undefined, /* @ts-ignore */
269
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
270
- /** Accessible name of the navigation landmark. */
271
- this.ariaLabel = input('Navigation principale', /* @ts-ignore */
272
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
273
- /** Show the tabs' labels. `false` renders an icon-only bar. */
274
- this.showLabels = input(true, { ...(ngDevMode ? { debugName: "showLabels" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
275
- /** Reserve the system inset under the bar (iOS home indicator, Android gesture bar). */
276
- this.safeArea = input(true, { ...(ngDevMode ? { debugName: "safeArea" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
277
- /** Lay the bar out inside its positioned ancestor instead of the viewport. */
278
- this.contained = input(false, { ...(ngDevMode ? { debugName: "contained" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
279
- /** Press wave on the tabs. `false` cuts it on this bar, global activation included. */
280
- this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
281
- /** Fired whenever the active tab changes (click / keyboard). */
282
- this.tabChange = output();
283
- /** @ignore The `<nav>` landmark (arrow-key walking happens inside it). */
284
- this.navEl = viewChild.required('nav', /* @ts-ignore */
285
- ...(ngDevMode ? [{ debugName: "navEl" }] : /* istanbul ignore next */ []));
286
- /** @ignore */
287
- this.classes = computed(() => {
288
- const c = ['ui-bottom-tab-bar'];
289
- if (this.contained())
290
- c.push('_contained');
291
- if (!this.safeArea())
292
- c.push('_no-safe-area');
293
- if (!this.showLabels())
294
- c.push('_no-labels');
295
- return c.join(' ');
296
- }, /* @ts-ignore */
297
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
298
- }
299
- /** @ignore Whether the given value is the active tab. */
300
- isActive(value) {
301
- return this.value() === value;
302
- }
303
- /** @ignore Activate a tab (no-op if already active); emits `tabChange`. */
304
- updateValue(value, event) {
305
- if (this.value() === value)
306
- return;
307
- this.value.set(value);
308
- this.tabChange.emit({ value, originalEvent: event });
309
- }
310
- /**
311
- * @ignore Arrow keys / Home / End walk the bar's controls. This is additive:
312
- * unlike the roving tabindex of the tabs pattern, every control keeps its
313
- * place in the tab order , which is what a navigation landmark owes its users.
314
- *
315
- * The controls are read from the DOM rather than through a content query: the
316
- * bar mixes two projected component types (tabs and the raised action), and a
317
- * single query cannot see both.
318
- */
319
- onKeydown(event) {
320
- if (!['ArrowRight', 'ArrowLeft', 'Home', 'End'].includes(event.key))
321
- return;
322
- const controls = Array.from(this.navEl().nativeElement.querySelectorAll(CONTROL_SELECTOR)).filter((el) => !el.hasAttribute('disabled') && el.getAttribute('tabindex') !== '-1');
323
- if (!controls.length)
324
- return;
325
- let pos = controls.indexOf(document.activeElement);
326
- if (pos === -1)
327
- return; // focus is elsewhere , let the event through.
328
- event.preventDefault();
329
- switch (event.key) {
330
- case 'ArrowRight':
331
- pos = (pos + 1) % controls.length;
332
- break;
333
- case 'ArrowLeft':
334
- pos = (pos - 1 + controls.length) % controls.length;
335
- break;
336
- case 'Home':
337
- pos = 0;
338
- break;
339
- case 'End':
340
- pos = controls.length - 1;
341
- break;
342
- }
343
- controls[pos].focus();
344
- }
345
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiBottomTabBar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
346
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: UiBottomTabBar, isStandalone: true, selector: "ui-bottom-tab-bar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, showLabels: { classPropertyName: "showLabels", publicName: "showLabels", isSignal: true, isRequired: false, transformFunction: null }, safeArea: { classPropertyName: "safeArea", publicName: "safeArea", isSignal: true, isRequired: false, transformFunction: null }, contained: { classPropertyName: "contained", publicName: "contained", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", tabChange: "tabChange" }, host: { listeners: { "keydown": "onKeydown($event)" } }, viewQueries: [{ propertyName: "navEl", first: true, predicate: ["nav"], descendants: true, isSignal: true }], ngImport: i0, template: `
524
+ `,
525
+ host: { class: "ui-bottom-tab-action-host" },
526
+ styles: [":host{display:contents}.ui-bottom-tab-action{display:inline-flex;flex:none;align-items:center;justify-content:center;align-self:center;box-sizing:border-box;width:var(--ui-bottom-tab-bar-action-size, 4rem);height:var(--ui-bottom-tab-bar-action-size, 4rem);margin:0 var(--ui-bottom-tab-bar-action-gap, var(--units-2xs));padding:0;border:0;border-radius:var(--ui-bottom-tab-bar-action-radius, var(--radius-full));transform:translateY(calc(-1 * var(--ui-bottom-tab-bar-action-offset-y, 1.25rem)));box-shadow:var(--ui-bottom-tab-bar-action-shadow, var(--shadow-default-md));cursor:pointer;transition:color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-bottom-tab-action:focus-visible{outline:none;box-shadow:var(--ui-bottom-tab-bar-action-shadow, var(--shadow-default-md)),0 0 0 var(--ui-bottom-tab-bar-action-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-bottom-tab-bar-action-focus-ring-color, var(--global-border-focus))}.ui-bottom-tab-action:disabled{box-shadow:none;cursor:not-allowed}.ui-bottom-tab-action._high{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-high-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-high-content-default))}.ui-bottom-tab-action._high:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-high-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-high-content-hover))}.ui-bottom-tab-action._high:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-high-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-high-content-focused))}.ui-bottom-tab-action._high:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-high-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-high-content-pressed))}.ui-bottom-tab-action._high:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-high-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-high-content-disabled))}.ui-bottom-tab-action._low{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-low-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-low-content-default))}.ui-bottom-tab-action._low:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-low-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-low-content-hover))}.ui-bottom-tab-action._low:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-low-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-low-content-focused))}.ui-bottom-tab-action._low:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-low-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-low-content-pressed))}.ui-bottom-tab-action._low:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-low-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-low-content-disabled))}.ui-bottom-tab-action._success{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-success-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-success-content-default))}.ui-bottom-tab-action._success:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-success-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-success-content-hover))}.ui-bottom-tab-action._success:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-success-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-success-content-focused))}.ui-bottom-tab-action._success:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-success-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-success-content-pressed))}.ui-bottom-tab-action._success:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-success-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-success-content-disabled))}.ui-bottom-tab-action._warning{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-warning-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-warning-content-default))}.ui-bottom-tab-action._warning:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-warning-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-warning-content-hover))}.ui-bottom-tab-action._warning:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-warning-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-warning-content-focused))}.ui-bottom-tab-action._warning:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-warning-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-warning-content-pressed))}.ui-bottom-tab-action._warning:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-warning-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-warning-content-disabled))}.ui-bottom-tab-action._error{background-color:var(--ui-bottom-tab-bar-action-surface, var(--actions-error-surface-default));color:var(--ui-bottom-tab-bar-action-color, var(--actions-error-content-default))}.ui-bottom-tab-action._error:hover:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-hover, var(--actions-error-surface-hover));color:var(--ui-bottom-tab-bar-action-color-hover, var(--actions-error-content-hover))}.ui-bottom-tab-action._error:focus-visible{background-color:var(--ui-bottom-tab-bar-action-surface-focus, var(--actions-error-surface-focused));color:var(--ui-bottom-tab-bar-action-color-focus, var(--actions-error-content-focused))}.ui-bottom-tab-action._error:active:not(:disabled){background-color:var(--ui-bottom-tab-bar-action-surface-pressed, var(--actions-error-surface-pressed));color:var(--ui-bottom-tab-bar-action-color-pressed, var(--actions-error-content-pressed))}.ui-bottom-tab-action._error:disabled{background-color:var(--ui-bottom-tab-bar-action-surface-disabled, var(--actions-error-surface-disabled));color:var(--ui-bottom-tab-bar-action-color-disabled, var(--actions-error-content-disabled))}.ui-bottom-tab-action-icon{--ui-icon-size: var(--ui-bottom-tab-bar-action-icon-size, var(--size-typography-icon-xl))}\n"]
527
+ }]
528
+ }],
529
+ ctorParameters: () => [],
530
+ propDecorators: {
531
+ icon: [{
532
+ type: i0.Input,
533
+ args: [{
534
+ isSignal: true,
535
+ alias: "icon",
536
+ required: false
537
+ }]
538
+ }],
539
+ iconType: [{
540
+ type: i0.Input,
541
+ args: [{
542
+ isSignal: true,
543
+ alias: "iconType",
544
+ required: false
545
+ }]
546
+ }],
547
+ level: [{
548
+ type: i0.Input,
549
+ args: [{
550
+ isSignal: true,
551
+ alias: "level",
552
+ required: false
553
+ }]
554
+ }],
555
+ ariaLabel: [{
556
+ type: i0.Input,
557
+ args: [{
558
+ isSignal: true,
559
+ alias: "ariaLabel",
560
+ required: false
561
+ }]
562
+ }],
563
+ disabled: [{
564
+ type: i0.Input,
565
+ args: [{
566
+ isSignal: true,
567
+ alias: "disabled",
568
+ required: false
569
+ }]
570
+ }],
571
+ ripple: [{
572
+ type: i0.Input,
573
+ args: [{
574
+ isSignal: true,
575
+ alias: "ripple",
576
+ required: false
577
+ }]
578
+ }],
579
+ actionClick: [{
580
+ type: i0.Output,
581
+ args: ["actionClick"]
582
+ }],
583
+ controlEl: [{
584
+ type: i0.ViewChild,
585
+ args: ["control", { isSignal: true }]
586
+ }]
587
+ }
588
+ });
589
+ var UiBottomTabBar = class UiBottomTabBar {
590
+ constructor() {
591
+ this.value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
592
+ this.ariaLabel = input("Navigation principale", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
593
+ this.showLabels = input(true, {
594
+ ...ngDevMode ? { debugName: "showLabels" } : /* istanbul ignore next */ {},
595
+ transform: booleanAttribute
596
+ });
597
+ this.safeArea = input(true, {
598
+ ...ngDevMode ? { debugName: "safeArea" } : /* istanbul ignore next */ {},
599
+ transform: booleanAttribute
600
+ });
601
+ this.contained = input(false, {
602
+ ...ngDevMode ? { debugName: "contained" } : /* istanbul ignore next */ {},
603
+ transform: booleanAttribute
604
+ });
605
+ this.ripple = input(true, {
606
+ ...ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {},
607
+ transform: booleanAttribute
608
+ });
609
+ this.tabChange = output();
610
+ this.navEl = viewChild.required("nav", ...ngDevMode ? [{ debugName: "navEl" }] : /* istanbul ignore next */ []);
611
+ this.classes = computed(() => {
612
+ const c = ["ui-bottom-tab-bar"];
613
+ if (this.contained()) c.push("_contained");
614
+ if (!this.safeArea()) c.push("_no-safe-area");
615
+ if (!this.showLabels()) c.push("_no-labels");
616
+ return c.join(" ");
617
+ }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
618
+ }
619
+ isActive(value) {
620
+ return this.value() === value;
621
+ }
622
+ updateValue(value, event) {
623
+ if (this.value() === value) return;
624
+ this.value.set(value);
625
+ this.tabChange.emit({
626
+ value,
627
+ originalEvent: event
628
+ });
629
+ }
630
+ onKeydown(event) {
631
+ if (![
632
+ "ArrowRight",
633
+ "ArrowLeft",
634
+ "Home",
635
+ "End"
636
+ ].includes(event.key)) return;
637
+ const controls = Array.from(this.navEl().nativeElement.querySelectorAll(CONTROL_SELECTOR)).filter((el) => !el.hasAttribute("disabled") && el.getAttribute("tabindex") !== "-1");
638
+ if (!controls.length) return;
639
+ let pos = controls.indexOf(document.activeElement);
640
+ if (pos === -1) return;
641
+ event.preventDefault();
642
+ switch (event.key) {
643
+ case "ArrowRight":
644
+ pos = (pos + 1) % controls.length;
645
+ break;
646
+ case "ArrowLeft":
647
+ pos = (pos - 1 + controls.length) % controls.length;
648
+ break;
649
+ case "Home":
650
+ pos = 0;
651
+ break;
652
+ case "End": pos = controls.length - 1;
653
+ }
654
+ controls[pos].focus();
655
+ }
656
+ static {
657
+ this.ɵfac = i0.ɵɵngDeclareFactory({
658
+ minVersion: "12.0.0",
659
+ version: "22.3.0",
660
+ ngImport: i0,
661
+ type: UiBottomTabBar,
662
+ deps: [],
663
+ target: i0.ɵɵFactoryTarget.Component
664
+ });
665
+ }
666
+ static {
667
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
668
+ minVersion: "17.2.0",
669
+ version: "22.3.0",
670
+ type: UiBottomTabBar,
671
+ isStandalone: true,
672
+ selector: "ui-bottom-tab-bar",
673
+ inputs: {
674
+ value: {
675
+ classPropertyName: "value",
676
+ publicName: "value",
677
+ isSignal: true,
678
+ isRequired: false,
679
+ transformFunction: null
680
+ },
681
+ ariaLabel: {
682
+ classPropertyName: "ariaLabel",
683
+ publicName: "ariaLabel",
684
+ isSignal: true,
685
+ isRequired: false,
686
+ transformFunction: null
687
+ },
688
+ showLabels: {
689
+ classPropertyName: "showLabels",
690
+ publicName: "showLabels",
691
+ isSignal: true,
692
+ isRequired: false,
693
+ transformFunction: null
694
+ },
695
+ safeArea: {
696
+ classPropertyName: "safeArea",
697
+ publicName: "safeArea",
698
+ isSignal: true,
699
+ isRequired: false,
700
+ transformFunction: null
701
+ },
702
+ contained: {
703
+ classPropertyName: "contained",
704
+ publicName: "contained",
705
+ isSignal: true,
706
+ isRequired: false,
707
+ transformFunction: null
708
+ },
709
+ ripple: {
710
+ classPropertyName: "ripple",
711
+ publicName: "ripple",
712
+ isSignal: true,
713
+ isRequired: false,
714
+ transformFunction: null
715
+ }
716
+ },
717
+ outputs: {
718
+ value: "valueChange",
719
+ tabChange: "tabChange"
720
+ },
721
+ host: { listeners: { "keydown": "onKeydown($event)" } },
722
+ viewQueries: [{
723
+ propertyName: "navEl",
724
+ first: true,
725
+ predicate: ["nav"],
726
+ descendants: true,
727
+ isSignal: true
728
+ }],
729
+ ngImport: i0,
730
+ template: `
347
731
  <nav #nav [class]="classes()" [attr.aria-label]="ariaLabel()">
348
732
  <ng-content />
349
733
  </nav>
350
- `, isInline: true, styles: [":host{display:contents}.ui-bottom-tab-bar{position:fixed;right:0;bottom:0;left:0;z-index:var(--ui-bottom-tab-bar-z-index, 100);display:flex;align-items:center;box-sizing:border-box;gap:var(--ui-bottom-tab-bar-gap, 0);min-height:calc(var(--ui-bottom-tab-bar-min-height, 3.5rem) + var(--ui-bottom-tab-bar-safe-area-offset, env(safe-area-inset-bottom, 0px)));padding:0 var(--ui-bottom-tab-bar-padding-x, 0) var(--ui-bottom-tab-bar-safe-area-offset, env(safe-area-inset-bottom, 0px));border-top:var(--ui-bottom-tab-bar-stroke-width, var(--stroke-sm)) solid var(--ui-bottom-tab-bar-stroke, var(--global-border-default));background-color:var(--ui-bottom-tab-bar-surface, var(--global-background-default));box-shadow:var(--ui-bottom-tab-bar-shadow, none);touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;overflow:visible}.ui-bottom-tab-bar._contained{position:absolute}.ui-bottom-tab-bar._no-safe-area{min-height:var(--ui-bottom-tab-bar-min-height, 3.5rem);padding-bottom:0}@media print{.ui-bottom-tab-bar{display:none}}\n"] }); }
351
- }
352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiBottomTabBar, decorators: [{
353
- type: Component,
354
- args: [{ selector: 'ui-bottom-tab-bar', template: `
734
+ `,
735
+ isInline: true,
736
+ styles: [":host{display:contents}.ui-bottom-tab-bar{position:fixed;right:0;bottom:0;left:0;z-index:var(--ui-bottom-tab-bar-z-index, 100);display:flex;align-items:center;box-sizing:border-box;gap:var(--ui-bottom-tab-bar-gap, 0);min-height:calc(var(--ui-bottom-tab-bar-min-height, 3.5rem) + var(--ui-bottom-tab-bar-safe-area-offset, env(safe-area-inset-bottom, 0px)));padding:0 var(--ui-bottom-tab-bar-padding-x, 0) var(--ui-bottom-tab-bar-safe-area-offset, env(safe-area-inset-bottom, 0px));border-top:var(--ui-bottom-tab-bar-stroke-width, var(--stroke-sm)) solid var(--ui-bottom-tab-bar-stroke, var(--global-border-default));background-color:var(--ui-bottom-tab-bar-surface, var(--global-background-default));box-shadow:var(--ui-bottom-tab-bar-shadow, none);touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;overflow:visible}.ui-bottom-tab-bar._contained{position:absolute}.ui-bottom-tab-bar._no-safe-area{min-height:var(--ui-bottom-tab-bar-min-height, 3.5rem);padding-bottom:0}@media print{.ui-bottom-tab-bar{display:none}}\n"]
737
+ });
738
+ }
739
+ };
740
+ i0.ɵɵngDeclareClassMetadata({
741
+ minVersion: "12.0.0",
742
+ version: "22.3.0",
743
+ ngImport: i0,
744
+ type: UiBottomTabBar,
745
+ decorators: [{
746
+ type: Component,
747
+ args: [{
748
+ selector: "ui-bottom-tab-bar",
749
+ template: `
355
750
  <nav #nav [class]="classes()" [attr.aria-label]="ariaLabel()">
356
751
  <ng-content />
357
752
  </nav>
358
- `, host: { '(keydown)': 'onKeydown($event)' }, styles: [":host{display:contents}.ui-bottom-tab-bar{position:fixed;right:0;bottom:0;left:0;z-index:var(--ui-bottom-tab-bar-z-index, 100);display:flex;align-items:center;box-sizing:border-box;gap:var(--ui-bottom-tab-bar-gap, 0);min-height:calc(var(--ui-bottom-tab-bar-min-height, 3.5rem) + var(--ui-bottom-tab-bar-safe-area-offset, env(safe-area-inset-bottom, 0px)));padding:0 var(--ui-bottom-tab-bar-padding-x, 0) var(--ui-bottom-tab-bar-safe-area-offset, env(safe-area-inset-bottom, 0px));border-top:var(--ui-bottom-tab-bar-stroke-width, var(--stroke-sm)) solid var(--ui-bottom-tab-bar-stroke, var(--global-border-default));background-color:var(--ui-bottom-tab-bar-surface, var(--global-background-default));box-shadow:var(--ui-bottom-tab-bar-shadow, none);touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;overflow:visible}.ui-bottom-tab-bar._contained{position:absolute}.ui-bottom-tab-bar._no-safe-area{min-height:var(--ui-bottom-tab-bar-min-height, 3.5rem);padding-bottom:0}@media print{.ui-bottom-tab-bar{display:none}}\n"] }]
359
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], showLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabels", required: false }] }], safeArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "safeArea", required: false }] }], contained: [{ type: i0.Input, args: [{ isSignal: true, alias: "contained", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], tabChange: [{ type: i0.Output, args: ["tabChange"] }], navEl: [{ type: i0.ViewChild, args: ['nav', { isSignal: true }] }] } });
360
-
361
- /*
362
- * Public API Surface of ui-kit/ui-bottom-tab-bar
363
- */
364
-
365
- /**
366
- * Generated bundle index. Do not edit.
367
- */
368
-
753
+ `,
754
+ host: { "(keydown)": "onKeydown($event)" },
755
+ styles: [":host{display:contents}.ui-bottom-tab-bar{position:fixed;right:0;bottom:0;left:0;z-index:var(--ui-bottom-tab-bar-z-index, 100);display:flex;align-items:center;box-sizing:border-box;gap:var(--ui-bottom-tab-bar-gap, 0);min-height:calc(var(--ui-bottom-tab-bar-min-height, 3.5rem) + var(--ui-bottom-tab-bar-safe-area-offset, env(safe-area-inset-bottom, 0px)));padding:0 var(--ui-bottom-tab-bar-padding-x, 0) var(--ui-bottom-tab-bar-safe-area-offset, env(safe-area-inset-bottom, 0px));border-top:var(--ui-bottom-tab-bar-stroke-width, var(--stroke-sm)) solid var(--ui-bottom-tab-bar-stroke, var(--global-border-default));background-color:var(--ui-bottom-tab-bar-surface, var(--global-background-default));box-shadow:var(--ui-bottom-tab-bar-shadow, none);touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;overflow:visible}.ui-bottom-tab-bar._contained{position:absolute}.ui-bottom-tab-bar._no-safe-area{min-height:var(--ui-bottom-tab-bar-min-height, 3.5rem);padding-bottom:0}@media print{.ui-bottom-tab-bar{display:none}}\n"]
756
+ }]
757
+ }],
758
+ propDecorators: {
759
+ value: [{
760
+ type: i0.Input,
761
+ args: [{
762
+ isSignal: true,
763
+ alias: "value",
764
+ required: false
765
+ }]
766
+ }, {
767
+ type: i0.Output,
768
+ args: ["valueChange"]
769
+ }],
770
+ ariaLabel: [{
771
+ type: i0.Input,
772
+ args: [{
773
+ isSignal: true,
774
+ alias: "ariaLabel",
775
+ required: false
776
+ }]
777
+ }],
778
+ showLabels: [{
779
+ type: i0.Input,
780
+ args: [{
781
+ isSignal: true,
782
+ alias: "showLabels",
783
+ required: false
784
+ }]
785
+ }],
786
+ safeArea: [{
787
+ type: i0.Input,
788
+ args: [{
789
+ isSignal: true,
790
+ alias: "safeArea",
791
+ required: false
792
+ }]
793
+ }],
794
+ contained: [{
795
+ type: i0.Input,
796
+ args: [{
797
+ isSignal: true,
798
+ alias: "contained",
799
+ required: false
800
+ }]
801
+ }],
802
+ ripple: [{
803
+ type: i0.Input,
804
+ args: [{
805
+ isSignal: true,
806
+ alias: "ripple",
807
+ required: false
808
+ }]
809
+ }],
810
+ tabChange: [{
811
+ type: i0.Output,
812
+ args: ["tabChange"]
813
+ }],
814
+ navEl: [{
815
+ type: i0.ViewChild,
816
+ args: ["nav", { isSignal: true }]
817
+ }]
818
+ }
819
+ });
369
820
  export { UiBottomTab, UiBottomTabAction, UiBottomTabBar };
370
- //# sourceMappingURL=4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map
821
+
822
+ //# sourceMappingURL=4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map