@loomui-ng/ui 0.0.0-stage → 0.1.1

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 (270) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +46 -2
  3. package/accordion/README.md +38 -0
  4. package/alert/README.md +32 -0
  5. package/alert-dialog/README.md +37 -0
  6. package/aspect-ratio/README.md +24 -0
  7. package/attachment/README.md +40 -0
  8. package/avatar/README.md +34 -0
  9. package/badge/README.md +29 -0
  10. package/breadcrumb/README.md +33 -0
  11. package/bubble/README.md +32 -0
  12. package/button/README.md +31 -0
  13. package/button-group/README.md +30 -0
  14. package/calendar/README.md +35 -0
  15. package/card/README.md +41 -0
  16. package/carousel/README.md +41 -0
  17. package/chart/README.md +25 -0
  18. package/checkbox/README.md +31 -0
  19. package/collapsible/README.md +31 -0
  20. package/combobox/README.md +47 -0
  21. package/command/README.md +44 -0
  22. package/context-menu/README.md +36 -0
  23. package/data-table/README.md +39 -0
  24. package/date-picker/README.md +23 -0
  25. package/dialog/README.md +52 -0
  26. package/direction/README.md +19 -0
  27. package/drawer/README.md +37 -0
  28. package/dropdown-menu/README.md +46 -0
  29. package/empty/README.md +38 -0
  30. package/fesm2022/loomui-ng-ui-accordion.mjs +555 -0
  31. package/fesm2022/loomui-ng-ui-accordion.mjs.map +1 -0
  32. package/fesm2022/loomui-ng-ui-alert-dialog.mjs +652 -0
  33. package/fesm2022/loomui-ng-ui-alert-dialog.mjs.map +1 -0
  34. package/fesm2022/loomui-ng-ui-alert.mjs +286 -0
  35. package/fesm2022/loomui-ng-ui-alert.mjs.map +1 -0
  36. package/fesm2022/loomui-ng-ui-aspect-ratio.mjs +97 -0
  37. package/fesm2022/loomui-ng-ui-aspect-ratio.mjs.map +1 -0
  38. package/fesm2022/loomui-ng-ui-attachment.mjs +713 -0
  39. package/fesm2022/loomui-ng-ui-attachment.mjs.map +1 -0
  40. package/fesm2022/loomui-ng-ui-avatar.mjs +561 -0
  41. package/fesm2022/loomui-ng-ui-avatar.mjs.map +1 -0
  42. package/fesm2022/loomui-ng-ui-badge.mjs +102 -0
  43. package/fesm2022/loomui-ng-ui-badge.mjs.map +1 -0
  44. package/fesm2022/loomui-ng-ui-breadcrumb.mjs +520 -0
  45. package/fesm2022/loomui-ng-ui-breadcrumb.mjs.map +1 -0
  46. package/fesm2022/loomui-ng-ui-bubble.mjs +386 -0
  47. package/fesm2022/loomui-ng-ui-bubble.mjs.map +1 -0
  48. package/fesm2022/loomui-ng-ui-button-group.mjs +193 -0
  49. package/fesm2022/loomui-ng-ui-button-group.mjs.map +1 -0
  50. package/fesm2022/loomui-ng-ui-button.mjs +162 -0
  51. package/fesm2022/loomui-ng-ui-button.mjs.map +1 -0
  52. package/fesm2022/loomui-ng-ui-calendar.mjs +681 -0
  53. package/fesm2022/loomui-ng-ui-calendar.mjs.map +1 -0
  54. package/fesm2022/loomui-ng-ui-card.mjs +461 -0
  55. package/fesm2022/loomui-ng-ui-card.mjs.map +1 -0
  56. package/fesm2022/loomui-ng-ui-carousel.mjs +532 -0
  57. package/fesm2022/loomui-ng-ui-carousel.mjs.map +1 -0
  58. package/fesm2022/loomui-ng-ui-chart.mjs +373 -0
  59. package/fesm2022/loomui-ng-ui-chart.mjs.map +1 -0
  60. package/fesm2022/loomui-ng-ui-checkbox.mjs +265 -0
  61. package/fesm2022/loomui-ng-ui-checkbox.mjs.map +1 -0
  62. package/fesm2022/loomui-ng-ui-collapsible.mjs +274 -0
  63. package/fesm2022/loomui-ng-ui-collapsible.mjs.map +1 -0
  64. package/fesm2022/loomui-ng-ui-combobox.mjs +971 -0
  65. package/fesm2022/loomui-ng-ui-combobox.mjs.map +1 -0
  66. package/fesm2022/loomui-ng-ui-command.mjs +982 -0
  67. package/fesm2022/loomui-ng-ui-command.mjs.map +1 -0
  68. package/fesm2022/loomui-ng-ui-context-menu.mjs +1359 -0
  69. package/fesm2022/loomui-ng-ui-context-menu.mjs.map +1 -0
  70. package/fesm2022/loomui-ng-ui-data-table.mjs +535 -0
  71. package/fesm2022/loomui-ng-ui-data-table.mjs.map +1 -0
  72. package/fesm2022/loomui-ng-ui-date-picker.mjs +312 -0
  73. package/fesm2022/loomui-ng-ui-date-picker.mjs.map +1 -0
  74. package/fesm2022/loomui-ng-ui-dialog.mjs +508 -0
  75. package/fesm2022/loomui-ng-ui-dialog.mjs.map +1 -0
  76. package/fesm2022/loomui-ng-ui-direction.mjs +112 -0
  77. package/fesm2022/loomui-ng-ui-direction.mjs.map +1 -0
  78. package/fesm2022/loomui-ng-ui-drawer.mjs +590 -0
  79. package/fesm2022/loomui-ng-ui-drawer.mjs.map +1 -0
  80. package/fesm2022/loomui-ng-ui-dropdown-menu.mjs +1322 -0
  81. package/fesm2022/loomui-ng-ui-dropdown-menu.mjs.map +1 -0
  82. package/fesm2022/loomui-ng-ui-empty.mjs +408 -0
  83. package/fesm2022/loomui-ng-ui-empty.mjs.map +1 -0
  84. package/fesm2022/loomui-ng-ui-field.mjs +630 -0
  85. package/fesm2022/loomui-ng-ui-field.mjs.map +1 -0
  86. package/fesm2022/loomui-ng-ui-hover-card.mjs +230 -0
  87. package/fesm2022/loomui-ng-ui-hover-card.mjs.map +1 -0
  88. package/fesm2022/loomui-ng-ui-icon.mjs +498 -0
  89. package/fesm2022/loomui-ng-ui-icon.mjs.map +1 -0
  90. package/fesm2022/loomui-ng-ui-input-group.mjs +463 -0
  91. package/fesm2022/loomui-ng-ui-input-group.mjs.map +1 -0
  92. package/fesm2022/loomui-ng-ui-input-otp.mjs +586 -0
  93. package/fesm2022/loomui-ng-ui-input-otp.mjs.map +1 -0
  94. package/fesm2022/loomui-ng-ui-input.mjs +289 -0
  95. package/fesm2022/loomui-ng-ui-input.mjs.map +1 -0
  96. package/fesm2022/loomui-ng-ui-item.mjs +598 -0
  97. package/fesm2022/loomui-ng-ui-item.mjs.map +1 -0
  98. package/fesm2022/loomui-ng-ui-kbd.mjs +129 -0
  99. package/fesm2022/loomui-ng-ui-kbd.mjs.map +1 -0
  100. package/fesm2022/loomui-ng-ui-label.mjs +68 -0
  101. package/fesm2022/loomui-ng-ui-label.mjs.map +1 -0
  102. package/fesm2022/loomui-ng-ui-marker.mjs +234 -0
  103. package/fesm2022/loomui-ng-ui-marker.mjs.map +1 -0
  104. package/fesm2022/loomui-ng-ui-menubar.mjs +1523 -0
  105. package/fesm2022/loomui-ng-ui-menubar.mjs.map +1 -0
  106. package/fesm2022/loomui-ng-ui-message-scroller.mjs +519 -0
  107. package/fesm2022/loomui-ng-ui-message-scroller.mjs.map +1 -0
  108. package/fesm2022/loomui-ng-ui-message.mjs +408 -0
  109. package/fesm2022/loomui-ng-ui-message.mjs.map +1 -0
  110. package/fesm2022/loomui-ng-ui-native-select.mjs +389 -0
  111. package/fesm2022/loomui-ng-ui-native-select.mjs.map +1 -0
  112. package/fesm2022/loomui-ng-ui-navigation-menu.mjs +609 -0
  113. package/fesm2022/loomui-ng-ui-navigation-menu.mjs.map +1 -0
  114. package/fesm2022/loomui-ng-ui-pagination.mjs +611 -0
  115. package/fesm2022/loomui-ng-ui-pagination.mjs.map +1 -0
  116. package/fesm2022/loomui-ng-ui-popover.mjs +358 -0
  117. package/fesm2022/loomui-ng-ui-popover.mjs.map +1 -0
  118. package/fesm2022/loomui-ng-ui-progress.mjs +159 -0
  119. package/fesm2022/loomui-ng-ui-progress.mjs.map +1 -0
  120. package/fesm2022/loomui-ng-ui-questionnaire.mjs +1012 -0
  121. package/fesm2022/loomui-ng-ui-questionnaire.mjs.map +1 -0
  122. package/fesm2022/loomui-ng-ui-radio-group.mjs +399 -0
  123. package/fesm2022/loomui-ng-ui-radio-group.mjs.map +1 -0
  124. package/fesm2022/loomui-ng-ui-resizable.mjs +518 -0
  125. package/fesm2022/loomui-ng-ui-resizable.mjs.map +1 -0
  126. package/fesm2022/loomui-ng-ui-scroll-area.mjs +135 -0
  127. package/fesm2022/loomui-ng-ui-scroll-area.mjs.map +1 -0
  128. package/fesm2022/loomui-ng-ui-select.mjs +863 -0
  129. package/fesm2022/loomui-ng-ui-select.mjs.map +1 -0
  130. package/fesm2022/loomui-ng-ui-separator.mjs +114 -0
  131. package/fesm2022/loomui-ng-ui-separator.mjs.map +1 -0
  132. package/fesm2022/loomui-ng-ui-sheet.mjs +530 -0
  133. package/fesm2022/loomui-ng-ui-sheet.mjs.map +1 -0
  134. package/fesm2022/loomui-ng-ui-sidebar.mjs +1918 -0
  135. package/fesm2022/loomui-ng-ui-sidebar.mjs.map +1 -0
  136. package/fesm2022/loomui-ng-ui-skeleton.mjs +69 -0
  137. package/fesm2022/loomui-ng-ui-skeleton.mjs.map +1 -0
  138. package/fesm2022/loomui-ng-ui-slider.mjs +390 -0
  139. package/fesm2022/loomui-ng-ui-slider.mjs.map +1 -0
  140. package/fesm2022/loomui-ng-ui-spinner.mjs +85 -0
  141. package/fesm2022/loomui-ng-ui-spinner.mjs.map +1 -0
  142. package/fesm2022/loomui-ng-ui-switch.mjs +212 -0
  143. package/fesm2022/loomui-ng-ui-switch.mjs.map +1 -0
  144. package/fesm2022/loomui-ng-ui-table.mjs +559 -0
  145. package/fesm2022/loomui-ng-ui-table.mjs.map +1 -0
  146. package/fesm2022/loomui-ng-ui-tabs.mjs +544 -0
  147. package/fesm2022/loomui-ng-ui-tabs.mjs.map +1 -0
  148. package/fesm2022/loomui-ng-ui-textarea.mjs +206 -0
  149. package/fesm2022/loomui-ng-ui-textarea.mjs.map +1 -0
  150. package/fesm2022/loomui-ng-ui-toast.mjs +432 -0
  151. package/fesm2022/loomui-ng-ui-toast.mjs.map +1 -0
  152. package/fesm2022/loomui-ng-ui-toggle-group.mjs +477 -0
  153. package/fesm2022/loomui-ng-ui-toggle-group.mjs.map +1 -0
  154. package/fesm2022/loomui-ng-ui-toggle.mjs +219 -0
  155. package/fesm2022/loomui-ng-ui-toggle.mjs.map +1 -0
  156. package/fesm2022/loomui-ng-ui-tooltip.mjs +240 -0
  157. package/fesm2022/loomui-ng-ui-tooltip.mjs.map +1 -0
  158. package/fesm2022/loomui-ng-ui-typography.mjs +129 -0
  159. package/fesm2022/loomui-ng-ui-typography.mjs.map +1 -0
  160. package/fesm2022/loomui-ng-ui-utils.mjs +1533 -0
  161. package/fesm2022/loomui-ng-ui-utils.mjs.map +1 -0
  162. package/fesm2022/loomui-ng-ui.mjs +4 -0
  163. package/fesm2022/loomui-ng-ui.mjs.map +1 -0
  164. package/field/README.md +43 -0
  165. package/hover-card/README.md +31 -0
  166. package/icon/README.md +42 -0
  167. package/input/README.md +26 -0
  168. package/input-group/README.md +40 -0
  169. package/input-otp/README.md +35 -0
  170. package/item/README.md +33 -0
  171. package/kbd/README.md +21 -0
  172. package/label/README.md +24 -0
  173. package/marker/README.md +24 -0
  174. package/menubar/README.md +40 -0
  175. package/message/README.md +32 -0
  176. package/message-scroller/README.md +40 -0
  177. package/native-select/README.md +26 -0
  178. package/navigation-menu/README.md +39 -0
  179. package/package.json +325 -3
  180. package/pagination/README.md +37 -0
  181. package/popover/README.md +37 -0
  182. package/progress/README.md +25 -0
  183. package/questionnaire/README.md +52 -0
  184. package/radio-group/README.md +33 -0
  185. package/resizable/README.md +37 -0
  186. package/scroll-area/README.md +25 -0
  187. package/select/README.md +45 -0
  188. package/separator/README.md +28 -0
  189. package/sheet/README.md +38 -0
  190. package/sidebar/README.md +60 -0
  191. package/skeleton/README.md +21 -0
  192. package/slider/README.md +29 -0
  193. package/spinner/README.md +15 -0
  194. package/styles/loomui.css +330 -0
  195. package/switch/README.md +29 -0
  196. package/table/README.md +31 -0
  197. package/tabs/README.md +42 -0
  198. package/textarea/README.md +28 -0
  199. package/toast/README.md +27 -0
  200. package/toggle/README.md +27 -0
  201. package/toggle-group/README.md +37 -0
  202. package/tooltip/README.md +31 -0
  203. package/types/loomui-ng-ui-accordion.d.ts +141 -0
  204. package/types/loomui-ng-ui-alert-dialog.d.ts +175 -0
  205. package/types/loomui-ng-ui-alert.d.ts +77 -0
  206. package/types/loomui-ng-ui-aspect-ratio.d.ts +31 -0
  207. package/types/loomui-ng-ui-attachment.d.ts +192 -0
  208. package/types/loomui-ng-ui-avatar.d.ts +147 -0
  209. package/types/loomui-ng-ui-badge.d.ts +32 -0
  210. package/types/loomui-ng-ui-breadcrumb.d.ts +118 -0
  211. package/types/loomui-ng-ui-bubble.d.ts +100 -0
  212. package/types/loomui-ng-ui-button-group.d.ts +51 -0
  213. package/types/loomui-ng-ui-button.d.ts +57 -0
  214. package/types/loomui-ng-ui-calendar.d.ts +171 -0
  215. package/types/loomui-ng-ui-card.d.ts +123 -0
  216. package/types/loomui-ng-ui-carousel.d.ts +140 -0
  217. package/types/loomui-ng-ui-chart.d.ts +95 -0
  218. package/types/loomui-ng-ui-checkbox.d.ts +62 -0
  219. package/types/loomui-ng-ui-collapsible.d.ts +74 -0
  220. package/types/loomui-ng-ui-combobox.d.ts +229 -0
  221. package/types/loomui-ng-ui-command.d.ts +231 -0
  222. package/types/loomui-ng-ui-context-menu.d.ts +288 -0
  223. package/types/loomui-ng-ui-data-table.d.ts +111 -0
  224. package/types/loomui-ng-ui-date-picker.d.ts +63 -0
  225. package/types/loomui-ng-ui-dialog.d.ts +127 -0
  226. package/types/loomui-ng-ui-direction.d.ts +42 -0
  227. package/types/loomui-ng-ui-drawer.d.ts +149 -0
  228. package/types/loomui-ng-ui-dropdown-menu.d.ts +258 -0
  229. package/types/loomui-ng-ui-empty.d.ts +109 -0
  230. package/types/loomui-ng-ui-field.d.ts +169 -0
  231. package/types/loomui-ng-ui-hover-card.d.ts +62 -0
  232. package/types/loomui-ng-ui-icon.d.ts +156 -0
  233. package/types/loomui-ng-ui-input-group.d.ts +130 -0
  234. package/types/loomui-ng-ui-input-otp.d.ts +149 -0
  235. package/types/loomui-ng-ui-input.d.ts +89 -0
  236. package/types/loomui-ng-ui-item.d.ts +157 -0
  237. package/types/loomui-ng-ui-kbd.d.ts +36 -0
  238. package/types/loomui-ng-ui-label.d.ts +19 -0
  239. package/types/loomui-ng-ui-marker.d.ts +61 -0
  240. package/types/loomui-ng-ui-menubar.d.ts +321 -0
  241. package/types/loomui-ng-ui-message-scroller.d.ts +138 -0
  242. package/types/loomui-ng-ui-message.d.ts +109 -0
  243. package/types/loomui-ng-ui-native-select.d.ts +84 -0
  244. package/types/loomui-ng-ui-navigation-menu.d.ts +160 -0
  245. package/types/loomui-ng-ui-pagination.d.ts +130 -0
  246. package/types/loomui-ng-ui-popover.d.ts +90 -0
  247. package/types/loomui-ng-ui-progress.d.ts +39 -0
  248. package/types/loomui-ng-ui-questionnaire.d.ts +274 -0
  249. package/types/loomui-ng-ui-radio-group.d.ts +109 -0
  250. package/types/loomui-ng-ui-resizable.d.ts +121 -0
  251. package/types/loomui-ng-ui-scroll-area.d.ts +44 -0
  252. package/types/loomui-ng-ui-select.d.ts +204 -0
  253. package/types/loomui-ng-ui-separator.d.ts +35 -0
  254. package/types/loomui-ng-ui-sheet.d.ts +124 -0
  255. package/types/loomui-ng-ui-sidebar.d.ts +485 -0
  256. package/types/loomui-ng-ui-skeleton.d.ts +20 -0
  257. package/types/loomui-ng-ui-slider.d.ts +103 -0
  258. package/types/loomui-ng-ui-spinner.d.ts +19 -0
  259. package/types/loomui-ng-ui-switch.d.ts +56 -0
  260. package/types/loomui-ng-ui-table.d.ts +148 -0
  261. package/types/loomui-ng-ui-tabs.d.ts +148 -0
  262. package/types/loomui-ng-ui-textarea.d.ts +52 -0
  263. package/types/loomui-ng-ui-toast.d.ts +97 -0
  264. package/types/loomui-ng-ui-toggle-group.d.ts +138 -0
  265. package/types/loomui-ng-ui-toggle.d.ts +63 -0
  266. package/types/loomui-ng-ui-tooltip.d.ts +63 -0
  267. package/types/loomui-ng-ui-typography.d.ts +42 -0
  268. package/types/loomui-ng-ui-utils.d.ts +392 -0
  269. package/types/loomui-ng-ui.d.ts +5 -0
  270. package/typography/README.md +29 -0
@@ -0,0 +1,544 @@
1
+ import { Directionality } from "@angular/cdk/bidi";
2
+ import { FocusKeyManager } from "@angular/cdk/a11y";
3
+ import * as i0 from "@angular/core";
4
+ import { Directive, ElementRef, booleanAttribute, computed, contentChildren, forwardRef, inject, input, model } from "@angular/core";
5
+ import * as i1 from "@loomui-ng/ui/utils";
6
+ import { UiElementHost, cn } from "@loomui-ng/ui/utils";
7
+ let nextTabsId = 0;
8
+ var UiTabs = class UiTabs {
9
+ value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
10
+ orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
11
+ dir = input(void 0, ...ngDevMode ? [{ debugName: "dir" }] : /* istanbul ignore next */ []);
12
+ activationMode = input("automatic", ...ngDevMode ? [{ debugName: "activationMode" }] : /* istanbul ignore next */ []);
13
+ userClass = input("", {
14
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
15
+ alias: "class"
16
+ });
17
+ baseId = `ui-tabs-${nextTabsId++}`;
18
+ directionality = inject(Directionality);
19
+ resolvedDir() {
20
+ return this.dir() ?? this.directionality.value;
21
+ }
22
+ classes = computed(() => cn("group/tabs flex gap-2 data-horizontal:flex-col", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
23
+ triggerId(v) {
24
+ return `${this.baseId}-trigger-${v}`;
25
+ }
26
+ contentId(v) {
27
+ return `${this.baseId}-content-${v}`;
28
+ }
29
+ static ɵfac = i0.ɵɵngDeclareFactory({
30
+ minVersion: "12.0.0",
31
+ version: "22.2.2",
32
+ ngImport: i0,
33
+ type: UiTabs,
34
+ deps: [],
35
+ target: i0.ɵɵFactoryTarget.Directive
36
+ });
37
+ static ɵdir = i0.ɵɵngDeclareDirective({
38
+ minVersion: "17.1.0",
39
+ version: "22.2.2",
40
+ type: UiTabs,
41
+ isStandalone: true,
42
+ selector: "[uiTabs], ui-tabs",
43
+ inputs: {
44
+ value: {
45
+ classPropertyName: "value",
46
+ publicName: "value",
47
+ isSignal: true,
48
+ isRequired: false,
49
+ transformFunction: null
50
+ },
51
+ orientation: {
52
+ classPropertyName: "orientation",
53
+ publicName: "orientation",
54
+ isSignal: true,
55
+ isRequired: false,
56
+ transformFunction: null
57
+ },
58
+ dir: {
59
+ classPropertyName: "dir",
60
+ publicName: "dir",
61
+ isSignal: true,
62
+ isRequired: false,
63
+ transformFunction: null
64
+ },
65
+ activationMode: {
66
+ classPropertyName: "activationMode",
67
+ publicName: "activationMode",
68
+ isSignal: true,
69
+ isRequired: false,
70
+ transformFunction: null
71
+ },
72
+ userClass: {
73
+ classPropertyName: "userClass",
74
+ publicName: "class",
75
+ isSignal: true,
76
+ isRequired: false,
77
+ transformFunction: null
78
+ }
79
+ },
80
+ outputs: { value: "valueChange" },
81
+ host: {
82
+ attributes: { "data-slot": "tabs" },
83
+ properties: {
84
+ "attr.data-orientation": "orientation()",
85
+ "attr.dir": "dir()",
86
+ "attr.class": "classes()"
87
+ }
88
+ },
89
+ exportAs: ["uiTabs"],
90
+ hostDirectives: [{ directive: i1.UiElementHost }],
91
+ ngImport: i0
92
+ });
93
+ };
94
+ i0.ɵɵngDeclareClassMetadata({
95
+ minVersion: "12.0.0",
96
+ version: "22.2.2",
97
+ ngImport: i0,
98
+ type: UiTabs,
99
+ decorators: [{
100
+ type: Directive,
101
+ args: [{
102
+ selector: "[uiTabs], ui-tabs",
103
+ hostDirectives: [UiElementHost],
104
+ exportAs: "uiTabs",
105
+ host: {
106
+ "data-slot": "tabs",
107
+ "[attr.data-orientation]": "orientation()",
108
+ "[attr.dir]": "dir()",
109
+ "[attr.class]": "classes()"
110
+ }
111
+ }]
112
+ }],
113
+ propDecorators: {
114
+ value: [{
115
+ type: i0.Input,
116
+ args: [{
117
+ isSignal: true,
118
+ alias: "value",
119
+ required: false
120
+ }]
121
+ }, {
122
+ type: i0.Output,
123
+ args: ["valueChange"]
124
+ }],
125
+ orientation: [{
126
+ type: i0.Input,
127
+ args: [{
128
+ isSignal: true,
129
+ alias: "orientation",
130
+ required: false
131
+ }]
132
+ }],
133
+ dir: [{
134
+ type: i0.Input,
135
+ args: [{
136
+ isSignal: true,
137
+ alias: "dir",
138
+ required: false
139
+ }]
140
+ }],
141
+ activationMode: [{
142
+ type: i0.Input,
143
+ args: [{
144
+ isSignal: true,
145
+ alias: "activationMode",
146
+ required: false
147
+ }]
148
+ }],
149
+ userClass: [{
150
+ type: i0.Input,
151
+ args: [{
152
+ isSignal: true,
153
+ alias: "class",
154
+ required: false
155
+ }]
156
+ }]
157
+ }
158
+ });
159
+ var UiTabsList = class UiTabsList {
160
+ tabs = inject(UiTabs);
161
+ variant = input("default", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
162
+ userClass = input("", {
163
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
164
+ alias: "class"
165
+ });
166
+ triggers = contentChildren(forwardRef(() => UiTabsTrigger), {
167
+ ...ngDevMode ? { debugName: "triggers" } : /* istanbul ignore next */ {},
168
+ descendants: true
169
+ });
170
+ classes = computed(() => cn("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", this.variant() === "line" ? "gap-1 bg-transparent" : "bg-muted", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
171
+ onKeydown(event) {
172
+ const items = this.triggers();
173
+ const index = items.findIndex((t) => t.el.nativeElement === document.activeElement);
174
+ if (index < 0) return;
175
+ const manager = new FocusKeyManager(items).withWrap().withHomeAndEnd().skipPredicate((t) => t.disabled);
176
+ if (this.tabs.orientation() === "horizontal") manager.withHorizontalOrientation(this.tabs.resolvedDir()).withVerticalOrientation(false);
177
+ else manager.withVerticalOrientation(true).withHorizontalOrientation(null);
178
+ manager.setActiveItem(index);
179
+ manager.onKeydown(event);
180
+ const active = manager.activeItem;
181
+ if (active && active !== items[index] && this.tabs.activationMode() === "automatic") active.select();
182
+ }
183
+ static ɵfac = i0.ɵɵngDeclareFactory({
184
+ minVersion: "12.0.0",
185
+ version: "22.2.2",
186
+ ngImport: i0,
187
+ type: UiTabsList,
188
+ deps: [],
189
+ target: i0.ɵɵFactoryTarget.Directive
190
+ });
191
+ static ɵdir = i0.ɵɵngDeclareDirective({
192
+ minVersion: "17.2.0",
193
+ version: "22.2.2",
194
+ type: UiTabsList,
195
+ isStandalone: true,
196
+ selector: "[uiTabsList], ui-tabs-list",
197
+ inputs: {
198
+ variant: {
199
+ classPropertyName: "variant",
200
+ publicName: "variant",
201
+ isSignal: true,
202
+ isRequired: false,
203
+ transformFunction: null
204
+ },
205
+ userClass: {
206
+ classPropertyName: "userClass",
207
+ publicName: "class",
208
+ isSignal: true,
209
+ isRequired: false,
210
+ transformFunction: null
211
+ }
212
+ },
213
+ host: {
214
+ attributes: {
215
+ "role": "tablist",
216
+ "data-slot": "tabs-list"
217
+ },
218
+ listeners: { "keydown": "onKeydown($event)" },
219
+ properties: {
220
+ "attr.aria-orientation": "tabs.orientation()",
221
+ "attr.data-orientation": "tabs.orientation()",
222
+ "attr.data-variant": "variant()",
223
+ "attr.class": "classes()"
224
+ }
225
+ },
226
+ queries: [{
227
+ propertyName: "triggers",
228
+ predicate: i0.forwardRef(() => UiTabsTrigger),
229
+ descendants: true,
230
+ isSignal: true
231
+ }],
232
+ hostDirectives: [{ directive: i1.UiElementHost }],
233
+ ngImport: i0
234
+ });
235
+ };
236
+ i0.ɵɵngDeclareClassMetadata({
237
+ minVersion: "12.0.0",
238
+ version: "22.2.2",
239
+ ngImport: i0,
240
+ type: UiTabsList,
241
+ decorators: [{
242
+ type: Directive,
243
+ args: [{
244
+ selector: "[uiTabsList], ui-tabs-list",
245
+ hostDirectives: [UiElementHost],
246
+ host: {
247
+ role: "tablist",
248
+ "data-slot": "tabs-list",
249
+ "[attr.aria-orientation]": "tabs.orientation()",
250
+ "[attr.data-orientation]": "tabs.orientation()",
251
+ "[attr.data-variant]": "variant()",
252
+ "[attr.class]": "classes()",
253
+ "(keydown)": "onKeydown($event)"
254
+ }
255
+ }]
256
+ }],
257
+ propDecorators: {
258
+ variant: [{
259
+ type: i0.Input,
260
+ args: [{
261
+ isSignal: true,
262
+ alias: "variant",
263
+ required: false
264
+ }]
265
+ }],
266
+ userClass: [{
267
+ type: i0.Input,
268
+ args: [{
269
+ isSignal: true,
270
+ alias: "class",
271
+ required: false
272
+ }]
273
+ }],
274
+ triggers: [{
275
+ type: i0.ContentChildren,
276
+ args: [forwardRef(() => UiTabsTrigger), {
277
+ descendants: true,
278
+ isSignal: true
279
+ }]
280
+ }]
281
+ }
282
+ });
283
+ var UiTabsTrigger = class UiTabsTrigger {
284
+ tabs = inject(UiTabs);
285
+ el = inject(ElementRef);
286
+ value = input("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
287
+ disabledInput = input(false, {
288
+ ...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
289
+ alias: "disabled",
290
+ transform: booleanAttribute
291
+ });
292
+ userClass = input("", {
293
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
294
+ alias: "class"
295
+ });
296
+ selected = computed(() => this.tabs.value() === this.value(), ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
297
+ get disabled() {
298
+ return this.disabledInput();
299
+ }
300
+ isDisabled = computed(() => this.disabledInput(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
301
+ classes = computed(() => cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1 has-data-[icon=inline-start]:ps-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-end-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
302
+ focus() {
303
+ this.el.nativeElement.focus();
304
+ }
305
+ select() {
306
+ if (!this.isDisabled()) this.tabs.value.set(this.value());
307
+ }
308
+ onMouseDown(e) {
309
+ if (e.button === 0 && !e.ctrlKey && !this.isDisabled()) this.select();
310
+ }
311
+ onFocus() {
312
+ if (this.tabs.activationMode() === "automatic" && !this.selected()) this.select();
313
+ }
314
+ static ɵfac = i0.ɵɵngDeclareFactory({
315
+ minVersion: "12.0.0",
316
+ version: "22.2.2",
317
+ ngImport: i0,
318
+ type: UiTabsTrigger,
319
+ deps: [],
320
+ target: i0.ɵɵFactoryTarget.Directive
321
+ });
322
+ static ɵdir = i0.ɵɵngDeclareDirective({
323
+ minVersion: "17.1.0",
324
+ version: "22.2.2",
325
+ type: UiTabsTrigger,
326
+ isStandalone: true,
327
+ selector: "button[uiTabsTrigger], ui-tabs-trigger",
328
+ inputs: {
329
+ value: {
330
+ classPropertyName: "value",
331
+ publicName: "value",
332
+ isSignal: true,
333
+ isRequired: false,
334
+ transformFunction: null
335
+ },
336
+ disabledInput: {
337
+ classPropertyName: "disabledInput",
338
+ publicName: "disabled",
339
+ isSignal: true,
340
+ isRequired: false,
341
+ transformFunction: null
342
+ },
343
+ userClass: {
344
+ classPropertyName: "userClass",
345
+ publicName: "class",
346
+ isSignal: true,
347
+ isRequired: false,
348
+ transformFunction: null
349
+ }
350
+ },
351
+ host: {
352
+ attributes: {
353
+ "type": "button",
354
+ "role": "tab",
355
+ "data-slot": "tabs-trigger"
356
+ },
357
+ listeners: {
358
+ "mousedown": "onMouseDown($event)",
359
+ "focus": "onFocus()",
360
+ "keydown.enter": "select()",
361
+ "keydown.space": "select()"
362
+ },
363
+ properties: {
364
+ "id": "tabs.triggerId(value())",
365
+ "attr.aria-selected": "selected()",
366
+ "attr.aria-controls": "tabs.contentId(value())",
367
+ "attr.data-state": "selected() ? \"active\" : \"inactive\"",
368
+ "attr.data-orientation": "tabs.orientation()",
369
+ "attr.data-disabled": "isDisabled() ? \"\" : null",
370
+ "attr.disabled": "(isDisabled()) ? \"\" : null",
371
+ "attr.tabindex": "selected() ? 0 : -1",
372
+ "attr.class": "classes()"
373
+ }
374
+ },
375
+ hostDirectives: [{ directive: i1.UiElementHost }],
376
+ ngImport: i0
377
+ });
378
+ };
379
+ i0.ɵɵngDeclareClassMetadata({
380
+ minVersion: "12.0.0",
381
+ version: "22.2.2",
382
+ ngImport: i0,
383
+ type: UiTabsTrigger,
384
+ decorators: [{
385
+ type: Directive,
386
+ args: [{
387
+ selector: "button[uiTabsTrigger], ui-tabs-trigger",
388
+ hostDirectives: [UiElementHost],
389
+ host: {
390
+ type: "button",
391
+ role: "tab",
392
+ "data-slot": "tabs-trigger",
393
+ "[id]": "tabs.triggerId(value())",
394
+ "[attr.aria-selected]": "selected()",
395
+ "[attr.aria-controls]": "tabs.contentId(value())",
396
+ "[attr.data-state]": "selected() ? \"active\" : \"inactive\"",
397
+ "[attr.data-orientation]": "tabs.orientation()",
398
+ "[attr.data-disabled]": "isDisabled() ? \"\" : null",
399
+ "[attr.disabled]": "(isDisabled()) ? \"\" : null",
400
+ "[attr.tabindex]": "selected() ? 0 : -1",
401
+ "[attr.class]": "classes()",
402
+ "(mousedown)": "onMouseDown($event)",
403
+ "(focus)": "onFocus()",
404
+ "(keydown.enter)": "select()",
405
+ "(keydown.space)": "select()"
406
+ }
407
+ }]
408
+ }],
409
+ propDecorators: {
410
+ value: [{
411
+ type: i0.Input,
412
+ args: [{
413
+ isSignal: true,
414
+ alias: "value",
415
+ required: false
416
+ }]
417
+ }],
418
+ disabledInput: [{
419
+ type: i0.Input,
420
+ args: [{
421
+ isSignal: true,
422
+ alias: "disabled",
423
+ required: false
424
+ }]
425
+ }],
426
+ userClass: [{
427
+ type: i0.Input,
428
+ args: [{
429
+ isSignal: true,
430
+ alias: "class",
431
+ required: false
432
+ }]
433
+ }]
434
+ }
435
+ });
436
+ var UiTabsContent = class UiTabsContent {
437
+ tabs = inject(UiTabs);
438
+ value = input("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
439
+ userClass = input("", {
440
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
441
+ alias: "class"
442
+ });
443
+ selected = computed(() => this.tabs.value() === this.value(), ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
444
+ classes = computed(() => cn("flex-1 text-sm outline-none", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
445
+ static ɵfac = i0.ɵɵngDeclareFactory({
446
+ minVersion: "12.0.0",
447
+ version: "22.2.2",
448
+ ngImport: i0,
449
+ type: UiTabsContent,
450
+ deps: [],
451
+ target: i0.ɵɵFactoryTarget.Directive
452
+ });
453
+ static ɵdir = i0.ɵɵngDeclareDirective({
454
+ minVersion: "17.1.0",
455
+ version: "22.2.2",
456
+ type: UiTabsContent,
457
+ isStandalone: true,
458
+ selector: "[uiTabsContent], ui-tabs-content",
459
+ inputs: {
460
+ value: {
461
+ classPropertyName: "value",
462
+ publicName: "value",
463
+ isSignal: true,
464
+ isRequired: false,
465
+ transformFunction: null
466
+ },
467
+ userClass: {
468
+ classPropertyName: "userClass",
469
+ publicName: "class",
470
+ isSignal: true,
471
+ isRequired: false,
472
+ transformFunction: null
473
+ }
474
+ },
475
+ host: {
476
+ attributes: {
477
+ "role": "tabpanel",
478
+ "data-slot": "tabs-content",
479
+ "tabindex": "0"
480
+ },
481
+ properties: {
482
+ "id": "tabs.contentId(value())",
483
+ "attr.aria-labelledby": "tabs.triggerId(value())",
484
+ "attr.data-state": "selected() ? \"active\" : \"inactive\"",
485
+ "attr.data-orientation": "tabs.orientation()",
486
+ "attr.hidden": "selected() ? null : \"\"",
487
+ "attr.class": "classes()"
488
+ }
489
+ },
490
+ hostDirectives: [{ directive: i1.UiElementHost }],
491
+ ngImport: i0
492
+ });
493
+ };
494
+ i0.ɵɵngDeclareClassMetadata({
495
+ minVersion: "12.0.0",
496
+ version: "22.2.2",
497
+ ngImport: i0,
498
+ type: UiTabsContent,
499
+ decorators: [{
500
+ type: Directive,
501
+ args: [{
502
+ selector: "[uiTabsContent], ui-tabs-content",
503
+ hostDirectives: [UiElementHost],
504
+ host: {
505
+ role: "tabpanel",
506
+ "data-slot": "tabs-content",
507
+ "[id]": "tabs.contentId(value())",
508
+ "[attr.aria-labelledby]": "tabs.triggerId(value())",
509
+ "[attr.data-state]": "selected() ? \"active\" : \"inactive\"",
510
+ "[attr.data-orientation]": "tabs.orientation()",
511
+ "[attr.hidden]": "selected() ? null : \"\"",
512
+ tabindex: "0",
513
+ "[attr.class]": "classes()"
514
+ }
515
+ }]
516
+ }],
517
+ propDecorators: {
518
+ value: [{
519
+ type: i0.Input,
520
+ args: [{
521
+ isSignal: true,
522
+ alias: "value",
523
+ required: false
524
+ }]
525
+ }],
526
+ userClass: [{
527
+ type: i0.Input,
528
+ args: [{
529
+ isSignal: true,
530
+ alias: "class",
531
+ required: false
532
+ }]
533
+ }]
534
+ }
535
+ });
536
+ const UI_TABS = [
537
+ UiTabs,
538
+ UiTabsList,
539
+ UiTabsTrigger,
540
+ UiTabsContent
541
+ ];
542
+ export { UI_TABS, UiTabs, UiTabsContent, UiTabsList, UiTabsTrigger };
543
+
544
+ //# sourceMappingURL=loomui-ng-ui-tabs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loomui-ng-ui-tabs.mjs","names":[],"sources":["../../../libs/ui/tabs/tabs.ts"],"sourcesContent":["import { Directionality } from '@angular/cdk/bidi';\nimport { FocusableOption, FocusKeyManager } from '@angular/cdk/a11y';\nimport {\n booleanAttribute,\n computed,\n contentChildren,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { cn } from '@loomui-ng/ui/utils';\nimport { UiElementHost } from '@loomui-ng/ui/utils';\n\nlet nextTabsId = 0;\n\n/**\n * <div uiTabs [(value)]=\"tab\">\n * <div uiTabsList>\n * <button uiTabsTrigger value=\"a\">A</button> <button uiTabsTrigger value=\"b\">B</button>\n * </div>\n * <div uiTabsContent value=\"a\">…</div> <div uiTabsContent value=\"b\">…</div>\n * </div>\n */\n@Directive({\n selector: '[uiTabs], ui-tabs', hostDirectives: [UiElementHost],\n exportAs: 'uiTabs',\n host: {\n 'data-slot': 'tabs',\n '[attr.data-orientation]': 'orientation()',\n '[attr.dir]': 'dir()',\n '[attr.class]': 'classes()',\n },\n})\nexport class UiTabs {\n readonly value = model<string | undefined>(undefined);\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n /** Optional explicit direction; otherwise inherited. (Live site always forces dir=\"ltr\" — deviation.) */\n readonly dir = input<'ltr' | 'rtl' | undefined>(undefined);\n readonly activationMode = input<'automatic' | 'manual'>('automatic');\n readonly userClass = input<string>('', { alias: 'class' });\n\n readonly baseId = `ui-tabs-${nextTabsId++}`;\n private readonly directionality = inject(Directionality);\n resolvedDir(): 'ltr' | 'rtl' {\n return this.dir() ?? this.directionality.value;\n }\n\n protected readonly classes = computed(() =>\n cn('group/tabs flex gap-2 data-horizontal:flex-col', this.userClass()),\n );\n\n triggerId(v: string) {\n return `${this.baseId}-trigger-${v}`;\n }\n contentId(v: string) {\n return `${this.baseId}-content-${v}`;\n }\n}\n\n@Directive({\n selector: '[uiTabsList], ui-tabs-list', hostDirectives: [UiElementHost],\n host: {\n role: 'tablist',\n 'data-slot': 'tabs-list',\n '[attr.aria-orientation]': 'tabs.orientation()',\n '[attr.data-orientation]': 'tabs.orientation()',\n '[attr.data-variant]': 'variant()',\n '[attr.class]': 'classes()',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class UiTabsList {\n protected readonly tabs = inject(UiTabs);\n readonly variant = input<'default' | 'line'>('default');\n readonly userClass = input<string>('', { alias: 'class' });\n private readonly triggers = contentChildren(forwardRef(() => UiTabsTrigger), { descendants: true });\n\n protected readonly classes = computed(() =>\n cn(\n 'group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none',\n this.variant() === 'line' ? 'gap-1 bg-transparent' : 'bg-muted',\n this.userClass(),\n ),\n );\n\n protected onKeydown(event: KeyboardEvent): void {\n const items = this.triggers();\n const index = items.findIndex((t) => t.el.nativeElement === document.activeElement);\n if (index < 0) return;\n const manager = new FocusKeyManager<UiTabsTrigger>(items)\n .withWrap()\n .withHomeAndEnd()\n .skipPredicate((t) => t.disabled);\n if (this.tabs.orientation() === 'horizontal') {\n manager.withHorizontalOrientation(this.tabs.resolvedDir()).withVerticalOrientation(false);\n } else {\n manager.withVerticalOrientation(true).withHorizontalOrientation(null);\n }\n manager.setActiveItem(index);\n manager.onKeydown(event);\n const active = manager.activeItem;\n if (active && active !== items[index] && this.tabs.activationMode() === 'automatic') {\n active.select();\n }\n }\n}\n\n@Directive({\n selector: 'button[uiTabsTrigger], ui-tabs-trigger', hostDirectives: [UiElementHost],\n host: {\n type: 'button',\n role: 'tab',\n 'data-slot': 'tabs-trigger',\n '[id]': 'tabs.triggerId(value())',\n '[attr.aria-selected]': 'selected()',\n '[attr.aria-controls]': 'tabs.contentId(value())',\n '[attr.data-state]': 'selected() ? \"active\" : \"inactive\"',\n '[attr.data-orientation]': 'tabs.orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : null',\n '[attr.disabled]': '(isDisabled()) ? \"\" : null',\n // Roving tabindex (observed: selected tab = 0, others = -1).\n '[attr.tabindex]': 'selected() ? 0 : -1',\n '[attr.class]': 'classes()',\n '(mousedown)': 'onMouseDown($event)',\n '(focus)': 'onFocus()',\n '(keydown.enter)': 'select()',\n '(keydown.space)': 'select()',\n },\n})\nexport class UiTabsTrigger implements FocusableOption {\n protected readonly tabs = inject(UiTabs);\n readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly value = input<string>('');\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n readonly userClass = input<string>('', { alias: 'class' });\n\n protected readonly selected = computed(() => this.tabs.value() === this.value());\n /** FocusableOption contract (CDK key manager reads this). */\n get disabled(): boolean {\n return this.disabledInput();\n }\n protected readonly isDisabled = computed(() => this.disabledInput());\n protected readonly classes = computed(() =>\n cn(\n \"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1 has-data-[icon=inline-start]:ps-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-end-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100\",\n this.userClass(),\n ),\n );\n\n focus(): void {\n this.el.nativeElement.focus();\n }\n\n select(): void {\n if (!this.isDisabled()) this.tabs.value.set(this.value());\n }\n\n protected onMouseDown(e: MouseEvent): void {\n if (e.button === 0 && !e.ctrlKey && !this.isDisabled()) this.select();\n }\n\n protected onFocus(): void {\n // Automatic activation on keyboard focus; mouse already selected on mousedown.\n if (this.tabs.activationMode() === 'automatic' && !this.selected()) this.select();\n }\n}\n\n@Directive({\n selector: '[uiTabsContent], ui-tabs-content', hostDirectives: [UiElementHost],\n host: {\n role: 'tabpanel',\n 'data-slot': 'tabs-content',\n '[id]': 'tabs.contentId(value())',\n '[attr.aria-labelledby]': 'tabs.triggerId(value())',\n '[attr.data-state]': 'selected() ? \"active\" : \"inactive\"',\n '[attr.data-orientation]': 'tabs.orientation()',\n '[attr.hidden]': 'selected() ? null : \"\"',\n tabindex: '0',\n '[attr.class]': 'classes()',\n },\n})\nexport class UiTabsContent {\n protected readonly tabs = inject(UiTabs);\n readonly value = input<string>('');\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly selected = computed(() => this.tabs.value() === this.value());\n protected readonly classes = computed(() => cn('flex-1 text-sm outline-none', this.userClass()));\n}\n\nexport const UI_TABS = [UiTabs, UiTabsList, UiTabsTrigger, UiTabsContent] as const;\n"],"mappings":";;;;;;AAgBA,IAAI,aAAa;AAoBjB,IAAa,SAAb,MAAa,OAAM;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