@loomui-ng/ui 0.0.0-stage → 0.1.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 (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,386 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Directive, computed, input } from "@angular/core";
3
+ import { cva } from "class-variance-authority";
4
+ import * as i1 from "@loomui-ng/ui/utils";
5
+ import { UiElementHost, cn } from "@loomui-ng/ui/utils";
6
+ const bubbleVariants = cva("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
7
+ variants: {
8
+ variant: {
9
+ default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
10
+ muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
11
+ secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
12
+ tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
13
+ outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
14
+ destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30",
15
+ ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50"
16
+ },
17
+ align: {
18
+ end: "",
19
+ start: ""
20
+ }
21
+ },
22
+ defaultVariants: {
23
+ variant: "default",
24
+ align: "start"
25
+ }
26
+ });
27
+ var UiBubble = class UiBubble {
28
+ variant = input("default", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
29
+ align = input("start", ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
30
+ userClass = input("", {
31
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
32
+ alias: "class"
33
+ });
34
+ classes = computed(() => cn(bubbleVariants({
35
+ variant: this.variant(),
36
+ align: this.align()
37
+ }), this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
38
+ static ɵfac = i0.ɵɵngDeclareFactory({
39
+ minVersion: "12.0.0",
40
+ version: "22.2.2",
41
+ ngImport: i0,
42
+ type: UiBubble,
43
+ deps: [],
44
+ target: i0.ɵɵFactoryTarget.Directive
45
+ });
46
+ static ɵdir = i0.ɵɵngDeclareDirective({
47
+ minVersion: "17.1.0",
48
+ version: "22.2.2",
49
+ type: UiBubble,
50
+ isStandalone: true,
51
+ selector: "[uiBubble], ui-bubble",
52
+ inputs: {
53
+ variant: {
54
+ classPropertyName: "variant",
55
+ publicName: "variant",
56
+ isSignal: true,
57
+ isRequired: false,
58
+ transformFunction: null
59
+ },
60
+ align: {
61
+ classPropertyName: "align",
62
+ publicName: "align",
63
+ isSignal: true,
64
+ isRequired: false,
65
+ transformFunction: null
66
+ },
67
+ userClass: {
68
+ classPropertyName: "userClass",
69
+ publicName: "class",
70
+ isSignal: true,
71
+ isRequired: false,
72
+ transformFunction: null
73
+ }
74
+ },
75
+ host: {
76
+ attributes: { "data-slot": "bubble" },
77
+ properties: {
78
+ "attr.data-variant": "variant()",
79
+ "attr.data-align": "align()",
80
+ "attr.class": "classes()"
81
+ }
82
+ },
83
+ hostDirectives: [{ directive: i1.UiElementHost }],
84
+ ngImport: i0
85
+ });
86
+ };
87
+ i0.ɵɵngDeclareClassMetadata({
88
+ minVersion: "12.0.0",
89
+ version: "22.2.2",
90
+ ngImport: i0,
91
+ type: UiBubble,
92
+ decorators: [{
93
+ type: Directive,
94
+ args: [{
95
+ selector: "[uiBubble], ui-bubble",
96
+ hostDirectives: [UiElementHost],
97
+ host: {
98
+ "data-slot": "bubble",
99
+ "[attr.data-variant]": "variant()",
100
+ "[attr.data-align]": "align()",
101
+ "[attr.class]": "classes()"
102
+ }
103
+ }]
104
+ }],
105
+ propDecorators: {
106
+ variant: [{
107
+ type: i0.Input,
108
+ args: [{
109
+ isSignal: true,
110
+ alias: "variant",
111
+ required: false
112
+ }]
113
+ }],
114
+ align: [{
115
+ type: i0.Input,
116
+ args: [{
117
+ isSignal: true,
118
+ alias: "align",
119
+ required: false
120
+ }]
121
+ }],
122
+ userClass: [{
123
+ type: i0.Input,
124
+ args: [{
125
+ isSignal: true,
126
+ alias: "class",
127
+ required: false
128
+ }]
129
+ }]
130
+ }
131
+ });
132
+ var UiBubbleContent = class UiBubbleContent {
133
+ userClass = input("", {
134
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
135
+ alias: "class"
136
+ });
137
+ classes = computed(() => cn("w-fit max-w-full min-w-0 overflow-hidden rounded-3xl border border-transparent px-3 py-2.5 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-start [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/30 whitespace-pre-line", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
138
+ static ɵfac = i0.ɵɵngDeclareFactory({
139
+ minVersion: "12.0.0",
140
+ version: "22.2.2",
141
+ ngImport: i0,
142
+ type: UiBubbleContent,
143
+ deps: [],
144
+ target: i0.ɵɵFactoryTarget.Directive
145
+ });
146
+ static ɵdir = i0.ɵɵngDeclareDirective({
147
+ minVersion: "17.1.0",
148
+ version: "22.2.2",
149
+ type: UiBubbleContent,
150
+ isStandalone: true,
151
+ selector: "[uiBubbleContent], ui-bubble-content",
152
+ inputs: { userClass: {
153
+ classPropertyName: "userClass",
154
+ publicName: "class",
155
+ isSignal: true,
156
+ isRequired: false,
157
+ transformFunction: null
158
+ } },
159
+ host: {
160
+ attributes: { "data-slot": "bubble-content" },
161
+ properties: { "attr.class": "classes()" }
162
+ },
163
+ hostDirectives: [{ directive: i1.UiElementHost }],
164
+ ngImport: i0
165
+ });
166
+ };
167
+ i0.ɵɵngDeclareClassMetadata({
168
+ minVersion: "12.0.0",
169
+ version: "22.2.2",
170
+ ngImport: i0,
171
+ type: UiBubbleContent,
172
+ decorators: [{
173
+ type: Directive,
174
+ args: [{
175
+ selector: "[uiBubbleContent], ui-bubble-content",
176
+ hostDirectives: [UiElementHost],
177
+ host: {
178
+ "data-slot": "bubble-content",
179
+ "[attr.class]": "classes()"
180
+ }
181
+ }]
182
+ }],
183
+ propDecorators: { userClass: [{
184
+ type: i0.Input,
185
+ args: [{
186
+ isSignal: true,
187
+ alias: "class",
188
+ required: false
189
+ }]
190
+ }] }
191
+ });
192
+ var UiBubbleGroup = class UiBubbleGroup {
193
+ userClass = input("", {
194
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
195
+ alias: "class"
196
+ });
197
+ classes = computed(() => cn("flex min-w-0 flex-col gap-2", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
198
+ static ɵfac = i0.ɵɵngDeclareFactory({
199
+ minVersion: "12.0.0",
200
+ version: "22.2.2",
201
+ ngImport: i0,
202
+ type: UiBubbleGroup,
203
+ deps: [],
204
+ target: i0.ɵɵFactoryTarget.Directive
205
+ });
206
+ static ɵdir = i0.ɵɵngDeclareDirective({
207
+ minVersion: "17.1.0",
208
+ version: "22.2.2",
209
+ type: UiBubbleGroup,
210
+ isStandalone: true,
211
+ selector: "[uiBubbleGroup], ui-bubble-group",
212
+ inputs: { userClass: {
213
+ classPropertyName: "userClass",
214
+ publicName: "class",
215
+ isSignal: true,
216
+ isRequired: false,
217
+ transformFunction: null
218
+ } },
219
+ host: {
220
+ attributes: { "data-slot": "bubble-group" },
221
+ properties: { "attr.class": "classes()" }
222
+ },
223
+ hostDirectives: [{ directive: i1.UiElementHost }],
224
+ ngImport: i0
225
+ });
226
+ };
227
+ i0.ɵɵngDeclareClassMetadata({
228
+ minVersion: "12.0.0",
229
+ version: "22.2.2",
230
+ ngImport: i0,
231
+ type: UiBubbleGroup,
232
+ decorators: [{
233
+ type: Directive,
234
+ args: [{
235
+ selector: "[uiBubbleGroup], ui-bubble-group",
236
+ hostDirectives: [UiElementHost],
237
+ host: {
238
+ "data-slot": "bubble-group",
239
+ "[attr.class]": "classes()"
240
+ }
241
+ }]
242
+ }],
243
+ propDecorators: { userClass: [{
244
+ type: i0.Input,
245
+ args: [{
246
+ isSignal: true,
247
+ alias: "class",
248
+ required: false
249
+ }]
250
+ }] }
251
+ });
252
+ const bubbleReactionsVariants = cva("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
253
+ variants: {
254
+ align: {
255
+ end: "bottom-0 translate-y-3/4 end-3 p-0",
256
+ start: "start-3"
257
+ },
258
+ side: {
259
+ bottom: "bottom-0 translate-y-3/4",
260
+ top: "top-0 -translate-y-3/4 start-3"
261
+ }
262
+ },
263
+ defaultVariants: {
264
+ align: "start",
265
+ side: "bottom"
266
+ }
267
+ });
268
+ var UiBubbleReactions = class UiBubbleReactions {
269
+ align = input("start", ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
270
+ side = input("bottom", ...ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []);
271
+ userClass = input("", {
272
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
273
+ alias: "class"
274
+ });
275
+ classes = computed(() => cn(bubbleReactionsVariants({
276
+ align: this.align(),
277
+ side: this.side()
278
+ }), this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
279
+ static ɵfac = i0.ɵɵngDeclareFactory({
280
+ minVersion: "12.0.0",
281
+ version: "22.2.2",
282
+ ngImport: i0,
283
+ type: UiBubbleReactions,
284
+ deps: [],
285
+ target: i0.ɵɵFactoryTarget.Directive
286
+ });
287
+ static ɵdir = i0.ɵɵngDeclareDirective({
288
+ minVersion: "17.1.0",
289
+ version: "22.2.2",
290
+ type: UiBubbleReactions,
291
+ isStandalone: true,
292
+ selector: "[uiBubbleReactions], ui-bubble-reactions",
293
+ inputs: {
294
+ align: {
295
+ classPropertyName: "align",
296
+ publicName: "align",
297
+ isSignal: true,
298
+ isRequired: false,
299
+ transformFunction: null
300
+ },
301
+ side: {
302
+ classPropertyName: "side",
303
+ publicName: "side",
304
+ isSignal: true,
305
+ isRequired: false,
306
+ transformFunction: null
307
+ },
308
+ userClass: {
309
+ classPropertyName: "userClass",
310
+ publicName: "class",
311
+ isSignal: true,
312
+ isRequired: false,
313
+ transformFunction: null
314
+ }
315
+ },
316
+ host: {
317
+ attributes: {
318
+ "data-slot": "bubble-reactions",
319
+ "role": "img"
320
+ },
321
+ properties: {
322
+ "attr.data-align": "align()",
323
+ "attr.data-side": "side()",
324
+ "attr.class": "classes()"
325
+ }
326
+ },
327
+ hostDirectives: [{ directive: i1.UiElementHost }],
328
+ ngImport: i0
329
+ });
330
+ };
331
+ i0.ɵɵngDeclareClassMetadata({
332
+ minVersion: "12.0.0",
333
+ version: "22.2.2",
334
+ ngImport: i0,
335
+ type: UiBubbleReactions,
336
+ decorators: [{
337
+ type: Directive,
338
+ args: [{
339
+ selector: "[uiBubbleReactions], ui-bubble-reactions",
340
+ hostDirectives: [UiElementHost],
341
+ host: {
342
+ "data-slot": "bubble-reactions",
343
+ "role": "img",
344
+ "[attr.data-align]": "align()",
345
+ "[attr.data-side]": "side()",
346
+ "[attr.class]": "classes()"
347
+ }
348
+ }]
349
+ }],
350
+ propDecorators: {
351
+ align: [{
352
+ type: i0.Input,
353
+ args: [{
354
+ isSignal: true,
355
+ alias: "align",
356
+ required: false
357
+ }]
358
+ }],
359
+ side: [{
360
+ type: i0.Input,
361
+ args: [{
362
+ isSignal: true,
363
+ alias: "side",
364
+ required: false
365
+ }]
366
+ }],
367
+ userClass: [{
368
+ type: i0.Input,
369
+ args: [{
370
+ isSignal: true,
371
+ alias: "class",
372
+ required: false
373
+ }]
374
+ }]
375
+ }
376
+ });
377
+ const UI_BUBBLE_GENERATED = [
378
+ UiBubble,
379
+ UiBubbleContent,
380
+ UiBubbleGroup,
381
+ UiBubbleReactions
382
+ ];
383
+ const UI_BUBBLE = UI_BUBBLE_GENERATED;
384
+ export { UI_BUBBLE, UI_BUBBLE_GENERATED, UiBubble, UiBubbleContent, UiBubbleGroup, UiBubbleReactions, bubbleReactionsVariants, bubbleVariants };
385
+
386
+ //# sourceMappingURL=loomui-ng-ui-bubble.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loomui-ng-ui-bubble.mjs","names":[],"sources":["../../../libs/ui/bubble/bubble.ts"],"sourcesContent":["// GENERATED by tools/gen-ui.mjs from docs/evidence/slots/bubble.json.\n// Change tools/ui-specs.mjs and regenerate; hand-written parts live in ./bubble.manual.ts.\nimport { Directive, computed, input } from '@angular/core';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '@loomui-ng/ui/utils';\nimport { UiElementHost } from '@loomui-ng/ui/utils';\n\nexport const bubbleVariants = cva('group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full', {\n variants: {\n variant: {\n default: '*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80',\n muted: '*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]',\n secondary: '*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]',\n tinted: '*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]',\n outline: '*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30',\n destructive: '*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30',\n ghost: 'border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50',\n },\n align: {\n end: '',\n start: '',\n },\n },\n defaultVariants: { variant: 'default', align: 'start' },\n});\n\n@Directive({\n selector: '[uiBubble], ui-bubble', hostDirectives: [UiElementHost],\n host: {\n 'data-slot': 'bubble',\n '[attr.data-variant]': 'variant()',\n '[attr.data-align]': 'align()',\n '[attr.class]': 'classes()',\n },\n})\nexport class UiBubble {\n readonly variant = input<'default' | 'muted' | 'secondary' | 'tinted' | 'outline' | 'destructive' | 'ghost'>('default');\n readonly align = input<'end' | 'start'>('start');\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly classes = computed(() => cn(bubbleVariants({ variant: this.variant(), align: this.align() }), this.userClass()));\n}\n\n@Directive({\n selector: '[uiBubbleContent], ui-bubble-content', hostDirectives: [UiElementHost],\n host: {\n 'data-slot': 'bubble-content',\n '[attr.class]': 'classes()',\n },\n})\nexport class UiBubbleContent {\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly classes = computed(() => cn('w-fit max-w-full min-w-0 overflow-hidden rounded-3xl border border-transparent px-3 py-2.5 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-start [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/30 whitespace-pre-line', this.userClass()));\n}\n\n@Directive({\n selector: '[uiBubbleGroup], ui-bubble-group', hostDirectives: [UiElementHost],\n host: {\n 'data-slot': 'bubble-group',\n '[attr.class]': 'classes()',\n },\n})\nexport class UiBubbleGroup {\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly classes = computed(() => cn('flex min-w-0 flex-col gap-2', this.userClass()));\n}\n\nexport const bubbleReactionsVariants = cva('absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0', {\n variants: {\n align: {\n end: 'bottom-0 translate-y-3/4 end-3 p-0',\n start: 'start-3',\n },\n side: {\n bottom: 'bottom-0 translate-y-3/4',\n top: 'top-0 -translate-y-3/4 start-3',\n },\n },\n defaultVariants: { align: 'start', side: 'bottom' },\n});\n\n@Directive({\n selector: '[uiBubbleReactions], ui-bubble-reactions', hostDirectives: [UiElementHost],\n host: {\n 'data-slot': 'bubble-reactions',\n 'role': 'img',\n '[attr.data-align]': 'align()',\n '[attr.data-side]': 'side()',\n '[attr.class]': 'classes()',\n },\n})\nexport class UiBubbleReactions {\n readonly align = input<'end' | 'start'>('start');\n readonly side = input<'bottom' | 'top'>('bottom');\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly classes = computed(() => cn(bubbleReactionsVariants({ align: this.align(), side: this.side() }), this.userClass()));\n}\n\nexport const UI_BUBBLE_GENERATED = [UiBubble, UiBubbleContent, UiBubbleGroup, UiBubbleReactions] as const;\nexport const UI_BUBBLE = UI_BUBBLE_GENERATED;\n"],"mappings":";;;;;AAOA,MAAa,iBAAiB,IAAI,yKAAyK;CACzM,UAAU;EACR,SAAS;GACP,SAAS;GACT,OAAO;GACP,WAAW;GACX,QAAQ;GACR,SAAS;GACT,aAAa;GACb,OAAO;EACR;EACD,OAAO;GACL,KAAK;GACL,OAAO;EACR;CACF;CACD,iBAAiB;EAAE,SAAS;EAAW,OAAO;CAAO;AACtD,CAAA;AAWD,IAAa,WAAb,MAAa,SAAQ;CACV,UAAU,MAA0F,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC9G,QAAQ,MAAuB,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,YAAY,MAAc,IAAE;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EAAI,OAAO;CAAO,CAAA;CACpC,UAAU,eAAe,GAAG,eAAe;EAAE,SAAS,KAAK,QAAO;EAAI,OAAO,KAAK,MAAK;CAAE,CAAE,GAAG,KAAK,UAAS,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAA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AAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAiB,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,MAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA;IAAA,aAAA;IAAA,QAAA;GAAA;GAAA,YAAA;IAAA,mBAAA;IAAA,kBAAA;IAAA,cAAA;GAAA;EAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,cAAA,CAAA;EAAA,UAAA;CAAA,CAAA;;AAAjB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAV7B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GAA4C,gBAAgB,CAAC,aAAa;GACpF,MAAM;IACJ,aAAa;IACb,QAAQ;IACR,qBAAqB;IACrB,oBAAoB;IACpB,gBAAgB;GACjB;EACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQD,MAAa,sBAAsB;CAAC;CAAU;CAAiB;CAAe;AAAiB;AAC/F,MAAa,YAAY"}
@@ -0,0 +1,193 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Directive, computed, input } from "@angular/core";
3
+ import { cva } from "class-variance-authority";
4
+ import * as i1 from "@loomui-ng/ui/utils";
5
+ import { UiElementHost, cn } from "@loomui-ng/ui/utils";
6
+ const buttonGroupVariants = cva("group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
7
+ variants: { orientation: {
8
+ horizontal: "[&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-e-lg!",
9
+ vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! h-fit"
10
+ } },
11
+ defaultVariants: { orientation: "horizontal" }
12
+ });
13
+ var UiButtonGroup = class UiButtonGroup {
14
+ orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
15
+ userClass = input("", {
16
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
17
+ alias: "class"
18
+ });
19
+ classes = computed(() => cn(buttonGroupVariants({ orientation: this.orientation() }), this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
20
+ static ɵfac = i0.ɵɵngDeclareFactory({
21
+ minVersion: "12.0.0",
22
+ version: "22.2.2",
23
+ ngImport: i0,
24
+ type: UiButtonGroup,
25
+ deps: [],
26
+ target: i0.ɵɵFactoryTarget.Directive
27
+ });
28
+ static ɵdir = i0.ɵɵngDeclareDirective({
29
+ minVersion: "17.1.0",
30
+ version: "22.2.2",
31
+ type: UiButtonGroup,
32
+ isStandalone: true,
33
+ selector: "[uiButtonGroup], ui-button-group",
34
+ inputs: {
35
+ orientation: {
36
+ classPropertyName: "orientation",
37
+ publicName: "orientation",
38
+ isSignal: true,
39
+ isRequired: false,
40
+ transformFunction: null
41
+ },
42
+ userClass: {
43
+ classPropertyName: "userClass",
44
+ publicName: "class",
45
+ isSignal: true,
46
+ isRequired: false,
47
+ transformFunction: null
48
+ }
49
+ },
50
+ host: {
51
+ attributes: {
52
+ "data-slot": "button-group",
53
+ "role": "group"
54
+ },
55
+ properties: {
56
+ "attr.data-orientation": "orientation()",
57
+ "attr.class": "classes()"
58
+ }
59
+ },
60
+ hostDirectives: [{ directive: i1.UiElementHost }],
61
+ ngImport: i0
62
+ });
63
+ };
64
+ i0.ɵɵngDeclareClassMetadata({
65
+ minVersion: "12.0.0",
66
+ version: "22.2.2",
67
+ ngImport: i0,
68
+ type: UiButtonGroup,
69
+ decorators: [{
70
+ type: Directive,
71
+ args: [{
72
+ selector: "[uiButtonGroup], ui-button-group",
73
+ hostDirectives: [UiElementHost],
74
+ host: {
75
+ "data-slot": "button-group",
76
+ "role": "group",
77
+ "[attr.data-orientation]": "orientation()",
78
+ "[attr.class]": "classes()"
79
+ }
80
+ }]
81
+ }],
82
+ propDecorators: {
83
+ orientation: [{
84
+ type: i0.Input,
85
+ args: [{
86
+ isSignal: true,
87
+ alias: "orientation",
88
+ required: false
89
+ }]
90
+ }],
91
+ userClass: [{
92
+ type: i0.Input,
93
+ args: [{
94
+ isSignal: true,
95
+ alias: "class",
96
+ required: false
97
+ }]
98
+ }]
99
+ }
100
+ });
101
+ var UiButtonGroupSeparator = class UiButtonGroupSeparator {
102
+ orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
103
+ userClass = input("", {
104
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
105
+ alias: "class"
106
+ });
107
+ classes = computed(() => cn("shrink-0 data-horizontal:h-px data-vertical:w-px data-vertical:self-stretch relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
108
+ static ɵfac = i0.ɵɵngDeclareFactory({
109
+ minVersion: "12.0.0",
110
+ version: "22.2.2",
111
+ ngImport: i0,
112
+ type: UiButtonGroupSeparator,
113
+ deps: [],
114
+ target: i0.ɵɵFactoryTarget.Directive
115
+ });
116
+ static ɵdir = i0.ɵɵngDeclareDirective({
117
+ minVersion: "17.1.0",
118
+ version: "22.2.2",
119
+ type: UiButtonGroupSeparator,
120
+ isStandalone: true,
121
+ selector: "[uiButtonGroupSeparator], ui-button-group-separator",
122
+ inputs: {
123
+ orientation: {
124
+ classPropertyName: "orientation",
125
+ publicName: "orientation",
126
+ isSignal: true,
127
+ isRequired: false,
128
+ transformFunction: null
129
+ },
130
+ userClass: {
131
+ classPropertyName: "userClass",
132
+ publicName: "class",
133
+ isSignal: true,
134
+ isRequired: false,
135
+ transformFunction: null
136
+ }
137
+ },
138
+ host: {
139
+ attributes: {
140
+ "data-slot": "button-group-separator",
141
+ "role": "none"
142
+ },
143
+ properties: {
144
+ "attr.data-orientation": "orientation()",
145
+ "attr.class": "classes()"
146
+ }
147
+ },
148
+ hostDirectives: [{ directive: i1.UiElementHost }],
149
+ ngImport: i0
150
+ });
151
+ };
152
+ i0.ɵɵngDeclareClassMetadata({
153
+ minVersion: "12.0.0",
154
+ version: "22.2.2",
155
+ ngImport: i0,
156
+ type: UiButtonGroupSeparator,
157
+ decorators: [{
158
+ type: Directive,
159
+ args: [{
160
+ selector: "[uiButtonGroupSeparator], ui-button-group-separator",
161
+ hostDirectives: [UiElementHost],
162
+ host: {
163
+ "data-slot": "button-group-separator",
164
+ "role": "none",
165
+ "[attr.data-orientation]": "orientation()",
166
+ "[attr.class]": "classes()"
167
+ }
168
+ }]
169
+ }],
170
+ propDecorators: {
171
+ orientation: [{
172
+ type: i0.Input,
173
+ args: [{
174
+ isSignal: true,
175
+ alias: "orientation",
176
+ required: false
177
+ }]
178
+ }],
179
+ userClass: [{
180
+ type: i0.Input,
181
+ args: [{
182
+ isSignal: true,
183
+ alias: "class",
184
+ required: false
185
+ }]
186
+ }]
187
+ }
188
+ });
189
+ const UI_BUTTON_GROUP_GENERATED = [UiButtonGroup, UiButtonGroupSeparator];
190
+ const UI_BUTTON_GROUP = UI_BUTTON_GROUP_GENERATED;
191
+ export { UI_BUTTON_GROUP, UI_BUTTON_GROUP_GENERATED, UiButtonGroup, UiButtonGroupSeparator, buttonGroupVariants };
192
+
193
+ //# sourceMappingURL=loomui-ng-ui-button-group.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loomui-ng-ui-button-group.mjs","names":[],"sources":["../../../libs/ui/button-group/button-group.ts"],"sourcesContent":["// GENERATED by tools/gen-ui.mjs from docs/evidence/slots/button-group.json.\n// Change tools/ui-specs.mjs and regenerate; hand-written parts live in ./button-group.manual.ts.\nimport { Directive, computed, input } from '@angular/core';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '@loomui-ng/ui/utils';\nimport { UiElementHost } from '@loomui-ng/ui/utils';\n\nexport const buttonGroupVariants = cva('group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-lg [&>[data-slot=select-trigger]:not([class*=\\'w-\\'])]:w-fit [&>input]:flex-1', {\n variants: {\n orientation: {\n horizontal: '[&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-e-lg!',\n vertical: 'flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! h-fit',\n },\n },\n defaultVariants: { orientation: 'horizontal' },\n});\n\n@Directive({\n selector: '[uiButtonGroup], ui-button-group', hostDirectives: [UiElementHost],\n host: {\n 'data-slot': 'button-group',\n 'role': 'group',\n '[attr.data-orientation]': 'orientation()',\n '[attr.class]': 'classes()',\n },\n})\nexport class UiButtonGroup {\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly classes = computed(() => cn(buttonGroupVariants({ orientation: this.orientation() }), this.userClass()));\n}\n\n@Directive({\n selector: '[uiButtonGroupSeparator], ui-button-group-separator', hostDirectives: [UiElementHost],\n host: {\n 'data-slot': 'button-group-separator',\n 'role': 'none',\n '[attr.data-orientation]': 'orientation()',\n '[attr.class]': 'classes()',\n },\n})\nexport class UiButtonGroupSeparator {\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n readonly userClass = input<string>('', { alias: 'class' });\n protected readonly classes = computed(() => cn('shrink-0 data-horizontal:h-px data-vertical:w-px data-vertical:self-stretch relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto', this.userClass()));\n}\n\nexport const UI_BUTTON_GROUP_GENERATED = [UiButtonGroup, UiButtonGroupSeparator] as const;\nexport const UI_BUTTON_GROUP = UI_BUTTON_GROUP_GENERATED;\n"],"mappings":";;;;;AAOA,MAAa,sBAAsB,IAAI,+SAAiT;CACtV,UAAU,EACR,aAAa;EACX,YAAY;EACZ,UAAU;CACX,EACF;CACD,iBAAiB,EAAE,aAAa,aAAY;AAC7C,CAAA;AAWD,IAAa,gBAAb,MAAa,cAAa;CACf,cAAc,MAAiC,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC5D,YAAY,MAAc,IAAE;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EAAI,OAAO;CAAO,CAAA;CACpC,UAAU,eAAe,GAAG,oBAAoB,EAAE,aAAa,KAAK,YAAW,EAAE,CAAE,GAAG,KAAK,UAAS,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAHhH,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAa,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAb,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAa,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,aAAA;IAAA,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