fulldev-ui 0.26.0 → 0.27.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 (296) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/liquid/assets/data-slot-command.js +1 -1
  3. package/liquid/assets/data-slot-toast.js +1 -1
  4. package/liquid/assets/ui-carousel.css +32 -0
  5. package/liquid/assets/ui-carousel.js +29 -1
  6. package/liquid/assets/ui-controls.js +112 -0
  7. package/liquid/assets/ui-licenses.json +1 -1
  8. package/liquid/assets/ui-manifest.json +12 -10
  9. package/liquid/assets/ui-rating.css +5 -2
  10. package/liquid/contracts.json +14 -1
  11. package/liquid/examples/carousel.liquid +46 -0
  12. package/liquid/examples/dependencies.json +3 -1
  13. package/liquid/examples/number-field.liquid +67 -0
  14. package/liquid/examples/rating.liquid +11 -8
  15. package/liquid/examples/swatch.liquid +25 -0
  16. package/liquid/registry.json +39 -1
  17. package/liquid/snippets/ui-input-group.liquid +47 -8
  18. package/liquid/snippets/ui-input.liquid +3 -1
  19. package/liquid/snippets/ui-number-field.liquid +26 -0
  20. package/liquid/snippets/ui-swatch.liquid +19 -0
  21. package/liquid/snippets/ui.liquid +2 -0
  22. package/package.json +25 -25
  23. package/public/r/liquid/carousel.json +1 -1
  24. package/public/r/liquid/components.json +5 -3
  25. package/public/r/liquid/init.json +1 -1
  26. package/public/r/liquid/input-group.json +1 -1
  27. package/public/r/liquid/input.json +1 -1
  28. package/public/r/liquid/number-field.json +23 -0
  29. package/public/r/liquid/rating.json +1 -1
  30. package/public/r/liquid/registry.json +41 -1
  31. package/public/r/liquid/runtime.json +4 -4
  32. package/public/r/liquid/swatch.json +19 -0
  33. package/public/r/react/styles/base-luma/carousel-indicator.json +24 -0
  34. package/public/r/react/styles/base-luma/components.json +3 -0
  35. package/public/r/react/styles/base-luma/number-field.json +26 -0
  36. package/public/r/react/styles/base-luma/registry.json +68 -0
  37. package/public/r/react/styles/base-luma/swatch.json +21 -0
  38. package/public/r/react/styles/base-lyra/carousel-indicator.json +24 -0
  39. package/public/r/react/styles/base-lyra/components.json +3 -0
  40. package/public/r/react/styles/base-lyra/number-field.json +26 -0
  41. package/public/r/react/styles/base-lyra/registry.json +68 -0
  42. package/public/r/react/styles/base-lyra/swatch.json +21 -0
  43. package/public/r/react/styles/base-maia/carousel-indicator.json +24 -0
  44. package/public/r/react/styles/base-maia/components.json +3 -0
  45. package/public/r/react/styles/base-maia/number-field.json +26 -0
  46. package/public/r/react/styles/base-maia/registry.json +68 -0
  47. package/public/r/react/styles/base-maia/swatch.json +21 -0
  48. package/public/r/react/styles/base-mira/carousel-indicator.json +24 -0
  49. package/public/r/react/styles/base-mira/components.json +3 -0
  50. package/public/r/react/styles/base-mira/number-field.json +26 -0
  51. package/public/r/react/styles/base-mira/registry.json +68 -0
  52. package/public/r/react/styles/base-mira/swatch.json +21 -0
  53. package/public/r/react/styles/base-nova/carousel-indicator.json +24 -0
  54. package/public/r/react/styles/base-nova/components.json +3 -0
  55. package/public/r/react/styles/base-nova/number-field.json +26 -0
  56. package/public/r/react/styles/base-nova/registry.json +68 -0
  57. package/public/r/react/styles/base-nova/swatch.json +21 -0
  58. package/public/r/react/styles/base-rhea/carousel-indicator.json +24 -0
  59. package/public/r/react/styles/base-rhea/components.json +3 -0
  60. package/public/r/react/styles/base-rhea/number-field.json +26 -0
  61. package/public/r/react/styles/base-rhea/registry.json +68 -0
  62. package/public/r/react/styles/base-rhea/swatch.json +21 -0
  63. package/public/r/react/styles/base-sera/carousel-indicator.json +24 -0
  64. package/public/r/react/styles/base-sera/components.json +3 -0
  65. package/public/r/react/styles/base-sera/number-field.json +26 -0
  66. package/public/r/react/styles/base-sera/registry.json +68 -0
  67. package/public/r/react/styles/base-sera/swatch.json +21 -0
  68. package/public/r/react/styles/base-vega/carousel-indicator.json +24 -0
  69. package/public/r/react/styles/base-vega/components.json +3 -0
  70. package/public/r/react/styles/base-vega/number-field.json +26 -0
  71. package/public/r/react/styles/base-vega/registry.json +68 -0
  72. package/public/r/react/styles/base-vega/swatch.json +21 -0
  73. package/public/r/styles/base-luma/accordion.json +1 -1
  74. package/public/r/styles/base-luma/alert-dialog.json +1 -1
  75. package/public/r/styles/base-luma/carousel.json +7 -2
  76. package/public/r/styles/base-luma/collapsible.json +1 -1
  77. package/public/r/styles/base-luma/combobox.json +2 -2
  78. package/public/r/styles/base-luma/command.json +2 -2
  79. package/public/r/styles/base-luma/components.json +2 -0
  80. package/public/r/styles/base-luma/dialog.json +1 -1
  81. package/public/r/styles/base-luma/drawer.json +1 -1
  82. package/public/r/styles/base-luma/dropdown-menu.json +1 -1
  83. package/public/r/styles/base-luma/hover-card.json +2 -2
  84. package/public/r/styles/base-luma/navigation-menu.json +1 -1
  85. package/public/r/styles/base-luma/number-field.json +44 -0
  86. package/public/r/styles/base-luma/popover.json +1 -1
  87. package/public/r/styles/base-luma/radio-group.json +1 -1
  88. package/public/r/styles/base-luma/registry.json +90 -26
  89. package/public/r/styles/base-luma/resizable.json +1 -1
  90. package/public/r/styles/base-luma/select.json +1 -1
  91. package/public/r/styles/base-luma/sheet.json +1 -1
  92. package/public/r/styles/base-luma/sidebar.json +1 -1
  93. package/public/r/styles/base-luma/slider.json +1 -1
  94. package/public/r/styles/base-luma/swatch.json +23 -0
  95. package/public/r/styles/base-luma/switch.json +1 -1
  96. package/public/r/styles/base-luma/tabs.json +1 -1
  97. package/public/r/styles/base-luma/toast.json +1 -1
  98. package/public/r/styles/base-luma/toggle-group.json +1 -1
  99. package/public/r/styles/base-luma/toggle.json +1 -1
  100. package/public/r/styles/base-luma/tooltip.json +1 -1
  101. package/public/r/styles/base-lyra/accordion.json +1 -1
  102. package/public/r/styles/base-lyra/alert-dialog.json +1 -1
  103. package/public/r/styles/base-lyra/carousel.json +7 -2
  104. package/public/r/styles/base-lyra/collapsible.json +1 -1
  105. package/public/r/styles/base-lyra/combobox.json +2 -2
  106. package/public/r/styles/base-lyra/command.json +2 -2
  107. package/public/r/styles/base-lyra/components.json +2 -0
  108. package/public/r/styles/base-lyra/dialog.json +1 -1
  109. package/public/r/styles/base-lyra/drawer.json +1 -1
  110. package/public/r/styles/base-lyra/dropdown-menu.json +1 -1
  111. package/public/r/styles/base-lyra/hover-card.json +2 -2
  112. package/public/r/styles/base-lyra/navigation-menu.json +1 -1
  113. package/public/r/styles/base-lyra/number-field.json +44 -0
  114. package/public/r/styles/base-lyra/popover.json +1 -1
  115. package/public/r/styles/base-lyra/radio-group.json +1 -1
  116. package/public/r/styles/base-lyra/registry.json +90 -26
  117. package/public/r/styles/base-lyra/resizable.json +1 -1
  118. package/public/r/styles/base-lyra/select.json +1 -1
  119. package/public/r/styles/base-lyra/sheet.json +1 -1
  120. package/public/r/styles/base-lyra/sidebar.json +1 -1
  121. package/public/r/styles/base-lyra/slider.json +1 -1
  122. package/public/r/styles/base-lyra/swatch.json +23 -0
  123. package/public/r/styles/base-lyra/switch.json +1 -1
  124. package/public/r/styles/base-lyra/tabs.json +1 -1
  125. package/public/r/styles/base-lyra/toast.json +1 -1
  126. package/public/r/styles/base-lyra/toggle-group.json +1 -1
  127. package/public/r/styles/base-lyra/toggle.json +1 -1
  128. package/public/r/styles/base-lyra/tooltip.json +1 -1
  129. package/public/r/styles/base-maia/accordion.json +1 -1
  130. package/public/r/styles/base-maia/alert-dialog.json +1 -1
  131. package/public/r/styles/base-maia/carousel.json +7 -2
  132. package/public/r/styles/base-maia/collapsible.json +1 -1
  133. package/public/r/styles/base-maia/combobox.json +2 -2
  134. package/public/r/styles/base-maia/command.json +2 -2
  135. package/public/r/styles/base-maia/components.json +2 -0
  136. package/public/r/styles/base-maia/dialog.json +1 -1
  137. package/public/r/styles/base-maia/drawer.json +1 -1
  138. package/public/r/styles/base-maia/dropdown-menu.json +1 -1
  139. package/public/r/styles/base-maia/hover-card.json +2 -2
  140. package/public/r/styles/base-maia/navigation-menu.json +1 -1
  141. package/public/r/styles/base-maia/number-field.json +44 -0
  142. package/public/r/styles/base-maia/popover.json +1 -1
  143. package/public/r/styles/base-maia/radio-group.json +1 -1
  144. package/public/r/styles/base-maia/registry.json +90 -26
  145. package/public/r/styles/base-maia/resizable.json +1 -1
  146. package/public/r/styles/base-maia/select.json +1 -1
  147. package/public/r/styles/base-maia/sheet.json +1 -1
  148. package/public/r/styles/base-maia/sidebar.json +1 -1
  149. package/public/r/styles/base-maia/slider.json +1 -1
  150. package/public/r/styles/base-maia/swatch.json +23 -0
  151. package/public/r/styles/base-maia/switch.json +1 -1
  152. package/public/r/styles/base-maia/tabs.json +1 -1
  153. package/public/r/styles/base-maia/toast.json +1 -1
  154. package/public/r/styles/base-maia/toggle-group.json +1 -1
  155. package/public/r/styles/base-maia/toggle.json +1 -1
  156. package/public/r/styles/base-maia/tooltip.json +1 -1
  157. package/public/r/styles/base-mira/accordion.json +1 -1
  158. package/public/r/styles/base-mira/alert-dialog.json +1 -1
  159. package/public/r/styles/base-mira/carousel.json +7 -2
  160. package/public/r/styles/base-mira/collapsible.json +1 -1
  161. package/public/r/styles/base-mira/combobox.json +2 -2
  162. package/public/r/styles/base-mira/command.json +2 -2
  163. package/public/r/styles/base-mira/components.json +2 -0
  164. package/public/r/styles/base-mira/dialog.json +1 -1
  165. package/public/r/styles/base-mira/drawer.json +1 -1
  166. package/public/r/styles/base-mira/dropdown-menu.json +1 -1
  167. package/public/r/styles/base-mira/hover-card.json +2 -2
  168. package/public/r/styles/base-mira/navigation-menu.json +1 -1
  169. package/public/r/styles/base-mira/number-field.json +44 -0
  170. package/public/r/styles/base-mira/popover.json +1 -1
  171. package/public/r/styles/base-mira/radio-group.json +1 -1
  172. package/public/r/styles/base-mira/registry.json +90 -26
  173. package/public/r/styles/base-mira/resizable.json +1 -1
  174. package/public/r/styles/base-mira/select.json +1 -1
  175. package/public/r/styles/base-mira/sheet.json +1 -1
  176. package/public/r/styles/base-mira/sidebar.json +1 -1
  177. package/public/r/styles/base-mira/slider.json +1 -1
  178. package/public/r/styles/base-mira/swatch.json +23 -0
  179. package/public/r/styles/base-mira/switch.json +1 -1
  180. package/public/r/styles/base-mira/tabs.json +1 -1
  181. package/public/r/styles/base-mira/toast.json +1 -1
  182. package/public/r/styles/base-mira/toggle-group.json +1 -1
  183. package/public/r/styles/base-mira/toggle.json +1 -1
  184. package/public/r/styles/base-mira/tooltip.json +1 -1
  185. package/public/r/styles/base-nova/accordion.json +1 -1
  186. package/public/r/styles/base-nova/alert-dialog.json +1 -1
  187. package/public/r/styles/base-nova/carousel.json +7 -2
  188. package/public/r/styles/base-nova/collapsible.json +1 -1
  189. package/public/r/styles/base-nova/combobox.json +2 -2
  190. package/public/r/styles/base-nova/command.json +2 -2
  191. package/public/r/styles/base-nova/components.json +2 -0
  192. package/public/r/styles/base-nova/dialog.json +1 -1
  193. package/public/r/styles/base-nova/drawer.json +1 -1
  194. package/public/r/styles/base-nova/dropdown-menu.json +1 -1
  195. package/public/r/styles/base-nova/hover-card.json +2 -2
  196. package/public/r/styles/base-nova/navigation-menu.json +1 -1
  197. package/public/r/styles/base-nova/number-field.json +44 -0
  198. package/public/r/styles/base-nova/popover.json +1 -1
  199. package/public/r/styles/base-nova/radio-group.json +1 -1
  200. package/public/r/styles/base-nova/registry.json +90 -26
  201. package/public/r/styles/base-nova/resizable.json +1 -1
  202. package/public/r/styles/base-nova/select.json +1 -1
  203. package/public/r/styles/base-nova/sheet.json +1 -1
  204. package/public/r/styles/base-nova/sidebar.json +1 -1
  205. package/public/r/styles/base-nova/slider.json +1 -1
  206. package/public/r/styles/base-nova/swatch.json +23 -0
  207. package/public/r/styles/base-nova/switch.json +1 -1
  208. package/public/r/styles/base-nova/tabs.json +1 -1
  209. package/public/r/styles/base-nova/toast.json +1 -1
  210. package/public/r/styles/base-nova/toggle-group.json +1 -1
  211. package/public/r/styles/base-nova/toggle.json +1 -1
  212. package/public/r/styles/base-nova/tooltip.json +1 -1
  213. package/public/r/styles/base-rhea/accordion.json +1 -1
  214. package/public/r/styles/base-rhea/alert-dialog.json +1 -1
  215. package/public/r/styles/base-rhea/carousel.json +7 -2
  216. package/public/r/styles/base-rhea/collapsible.json +1 -1
  217. package/public/r/styles/base-rhea/combobox.json +2 -2
  218. package/public/r/styles/base-rhea/command.json +2 -2
  219. package/public/r/styles/base-rhea/components.json +2 -0
  220. package/public/r/styles/base-rhea/dialog.json +1 -1
  221. package/public/r/styles/base-rhea/drawer.json +1 -1
  222. package/public/r/styles/base-rhea/dropdown-menu.json +1 -1
  223. package/public/r/styles/base-rhea/hover-card.json +2 -2
  224. package/public/r/styles/base-rhea/navigation-menu.json +1 -1
  225. package/public/r/styles/base-rhea/number-field.json +44 -0
  226. package/public/r/styles/base-rhea/popover.json +1 -1
  227. package/public/r/styles/base-rhea/radio-group.json +1 -1
  228. package/public/r/styles/base-rhea/registry.json +90 -26
  229. package/public/r/styles/base-rhea/resizable.json +1 -1
  230. package/public/r/styles/base-rhea/select.json +1 -1
  231. package/public/r/styles/base-rhea/sheet.json +1 -1
  232. package/public/r/styles/base-rhea/sidebar.json +1 -1
  233. package/public/r/styles/base-rhea/slider.json +1 -1
  234. package/public/r/styles/base-rhea/swatch.json +23 -0
  235. package/public/r/styles/base-rhea/switch.json +1 -1
  236. package/public/r/styles/base-rhea/tabs.json +1 -1
  237. package/public/r/styles/base-rhea/toast.json +1 -1
  238. package/public/r/styles/base-rhea/toggle-group.json +1 -1
  239. package/public/r/styles/base-rhea/toggle.json +1 -1
  240. package/public/r/styles/base-rhea/tooltip.json +1 -1
  241. package/public/r/styles/base-sera/accordion.json +1 -1
  242. package/public/r/styles/base-sera/alert-dialog.json +1 -1
  243. package/public/r/styles/base-sera/carousel.json +7 -2
  244. package/public/r/styles/base-sera/collapsible.json +1 -1
  245. package/public/r/styles/base-sera/combobox.json +2 -2
  246. package/public/r/styles/base-sera/command.json +2 -2
  247. package/public/r/styles/base-sera/components.json +2 -0
  248. package/public/r/styles/base-sera/dialog.json +1 -1
  249. package/public/r/styles/base-sera/drawer.json +1 -1
  250. package/public/r/styles/base-sera/dropdown-menu.json +1 -1
  251. package/public/r/styles/base-sera/hover-card.json +2 -2
  252. package/public/r/styles/base-sera/navigation-menu.json +1 -1
  253. package/public/r/styles/base-sera/number-field.json +44 -0
  254. package/public/r/styles/base-sera/popover.json +1 -1
  255. package/public/r/styles/base-sera/radio-group.json +1 -1
  256. package/public/r/styles/base-sera/registry.json +90 -26
  257. package/public/r/styles/base-sera/resizable.json +1 -1
  258. package/public/r/styles/base-sera/select.json +1 -1
  259. package/public/r/styles/base-sera/sheet.json +1 -1
  260. package/public/r/styles/base-sera/sidebar.json +1 -1
  261. package/public/r/styles/base-sera/slider.json +1 -1
  262. package/public/r/styles/base-sera/swatch.json +23 -0
  263. package/public/r/styles/base-sera/switch.json +1 -1
  264. package/public/r/styles/base-sera/tabs.json +1 -1
  265. package/public/r/styles/base-sera/toast.json +1 -1
  266. package/public/r/styles/base-sera/toggle-group.json +1 -1
  267. package/public/r/styles/base-sera/toggle.json +1 -1
  268. package/public/r/styles/base-sera/tooltip.json +1 -1
  269. package/public/r/styles/base-vega/accordion.json +1 -1
  270. package/public/r/styles/base-vega/alert-dialog.json +1 -1
  271. package/public/r/styles/base-vega/carousel.json +7 -2
  272. package/public/r/styles/base-vega/collapsible.json +1 -1
  273. package/public/r/styles/base-vega/combobox.json +2 -2
  274. package/public/r/styles/base-vega/command.json +2 -2
  275. package/public/r/styles/base-vega/components.json +2 -0
  276. package/public/r/styles/base-vega/dialog.json +1 -1
  277. package/public/r/styles/base-vega/drawer.json +1 -1
  278. package/public/r/styles/base-vega/dropdown-menu.json +1 -1
  279. package/public/r/styles/base-vega/hover-card.json +2 -2
  280. package/public/r/styles/base-vega/navigation-menu.json +1 -1
  281. package/public/r/styles/base-vega/number-field.json +44 -0
  282. package/public/r/styles/base-vega/popover.json +1 -1
  283. package/public/r/styles/base-vega/radio-group.json +1 -1
  284. package/public/r/styles/base-vega/registry.json +90 -26
  285. package/public/r/styles/base-vega/resizable.json +1 -1
  286. package/public/r/styles/base-vega/select.json +1 -1
  287. package/public/r/styles/base-vega/sheet.json +1 -1
  288. package/public/r/styles/base-vega/sidebar.json +1 -1
  289. package/public/r/styles/base-vega/slider.json +1 -1
  290. package/public/r/styles/base-vega/swatch.json +23 -0
  291. package/public/r/styles/base-vega/switch.json +1 -1
  292. package/public/r/styles/base-vega/tabs.json +1 -1
  293. package/public/r/styles/base-vega/toast.json +1 -1
  294. package/public/r/styles/base-vega/toggle-group.json +1 -1
  295. package/public/r/styles/base-vega/toggle.json +1 -1
  296. package/public/r/styles/base-vega/tooltip.json +1 -1
@@ -4,7 +4,7 @@
4
4
  "title": "Sidebar",
5
5
  "description": "A composable, themeable, and customizable Astro sidebar component.",
6
6
  "dependencies": [
7
- "@data-slot/tooltip@^1.1.2",
7
+ "@data-slot/tooltip@^1.1.3",
8
8
  "@lucide/astro"
9
9
  ],
10
10
  "registryDependencies": [
@@ -4,7 +4,7 @@
4
4
  "title": "Slider",
5
5
  "description": "An input where the user selects a value from within a given range.",
6
6
  "dependencies": [
7
- "@data-slot/slider@^1.1.2"
7
+ "@data-slot/slider@^1.1.3"
8
8
  ],
9
9
  "files": [
10
10
  {
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "swatch",
4
+ "title": "Swatch",
5
+ "description": "A color or pattern beside an option or filter value.",
6
+ "files": [
7
+ {
8
+ "path": "src/components/ui/swatch/swatch.astro",
9
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\"> & {\n color?: string\n image?: string\n}\n\nconst { class: className, color, image, style, ...props } = Astro.props\n\nconst background = {\n \"background-color\": color,\n \"background-image\": image ? `url(${JSON.stringify(image)})` : undefined,\n}\nconst backgroundText = Object.entries(background)\n .filter(([, value]) => value)\n .map(([property, value]) => `${property}: ${value}`)\n .join(\"; \")\n---\n\n<span\n data-slot=\"swatch\"\n aria-hidden=\"true\"\n class={cn(\n \"rounded-full ring-1 ring-foreground/15 ring-inset inline-block size-4 shrink-0 bg-cover bg-center\",\n className\n )}\n style={\n typeof style === \"string\"\n ? [backgroundText, style].filter(Boolean).join(\"; \")\n : { ...background, ...style }\n }\n {...props}\n/>\n",
10
+ "type": "registry:ui"
11
+ },
12
+ {
13
+ "path": "src/components/ui/swatch/index.ts",
14
+ "content": "export { default as Swatch } from \"./swatch.astro\"\n",
15
+ "type": "registry:ui"
16
+ }
17
+ ],
18
+ "docs": "https://ui.full.dev/components/swatch/",
19
+ "categories": [
20
+ "ui"
21
+ ],
22
+ "type": "registry:ui"
23
+ }
@@ -4,7 +4,7 @@
4
4
  "title": "Switch",
5
5
  "description": "A control that switches a setting on or off.",
6
6
  "dependencies": [
7
- "@data-slot/switch@^1.1.2"
7
+ "@data-slot/switch@^1.1.3"
8
8
  ],
9
9
  "files": [
10
10
  {
@@ -4,7 +4,7 @@
4
4
  "title": "Tabs",
5
5
  "description": "A set of layered sections of content, known as tabs, that display one panel of content at a time.",
6
6
  "dependencies": [
7
- "@data-slot/tabs@^1.1.2"
7
+ "@data-slot/tabs@^1.1.3"
8
8
  ],
9
9
  "files": [
10
10
  {
@@ -4,7 +4,7 @@
4
4
  "title": "Toast",
5
5
  "description": "A brief notification that appears without interrupting the user.",
6
6
  "dependencies": [
7
- "@data-slot/toast@^1.1.2",
7
+ "@data-slot/toast@^1.1.3",
8
8
  "@lucide/astro"
9
9
  ],
10
10
  "registryDependencies": [
@@ -4,7 +4,7 @@
4
4
  "title": "Toggle Group",
5
5
  "description": "A set of two-state buttons that can be toggled independently or as a single choice.",
6
6
  "dependencies": [
7
- "@data-slot/toggle-group@^1.1.2"
7
+ "@data-slot/toggle-group@^1.1.3"
8
8
  ],
9
9
  "registryDependencies": [
10
10
  "@fulldev/toggle"
@@ -4,7 +4,7 @@
4
4
  "title": "Toggle",
5
5
  "description": "A two-state button that can be either on or off.",
6
6
  "dependencies": [
7
- "@data-slot/toggle@^1.1.2"
7
+ "@data-slot/toggle@^1.1.3"
8
8
  ],
9
9
  "files": [
10
10
  {
@@ -4,7 +4,7 @@
4
4
  "title": "Tooltip",
5
5
  "description": "Displays contextual information when a user hovers or focuses a trigger.",
6
6
  "dependencies": [
7
- "@data-slot/tooltip@^1.1.2"
7
+ "@data-slot/tooltip@^1.1.3"
8
8
  ],
9
9
  "files": [
10
10
  {
@@ -4,7 +4,7 @@
4
4
  "title": "Accordion",
5
5
  "description": "A vertically stacked set of interactive headings that each reveal a section of content.",
6
6
  "dependencies": [
7
- "@data-slot/accordion@^1.1.2",
7
+ "@data-slot/accordion@^1.1.3",
8
8
  "@lucide/astro"
9
9
  ],
10
10
  "files": [
@@ -4,7 +4,7 @@
4
4
  "title": "Alert Dialog",
5
5
  "description": "A modal dialog for important confirmations that expects a response.",
6
6
  "dependencies": [
7
- "@data-slot/alert-dialog@^1.1.2"
7
+ "@data-slot/alert-dialog@^1.1.3"
8
8
  ],
9
9
  "registryDependencies": [
10
10
  "@fulldev/button"
@@ -13,7 +13,7 @@
13
13
  "files": [
14
14
  {
15
15
  "path": "src/components/ui/carousel/carousel.astro",
16
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { EmblaOptionsType } from \"embla-carousel\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n opts?: EmblaOptionsType\n orientation?: \"horizontal\" | \"vertical\"\n}\n\nconst {\n class: className,\n opts,\n orientation = opts?.axis === \"y\" ? \"vertical\" : \"horizontal\",\n \"aria-roledescription\": roleDescription = \"carousel\",\n \"data-slot\": dataSlot = \"carousel\",\n // A named section is a region landmark. Without a name it would have no\n // role, so it becomes a group, the other container role the APG carousel\n // allows.\n role = Astro.props[\"aria-label\"] || Astro.props[\"aria-labelledby\"]\n ? undefined\n : \"group\",\n ...props\n} = Astro.props\n\nconst resolvedOpts: EmblaOptionsType = {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n}\n---\n\n<section\n data-slot={dataSlot}\n data-orientation={orientation}\n data-carousel-options={JSON.stringify(resolvedOpts)}\n class={cn(\"group/carousel relative\", className)}\n role={role}\n aria-roledescription={roleDescription}\n {...props}\n>\n <slot />\n</section>\n\n<script>\n import EmblaCarousel, {\n type EmblaCarouselType,\n type EmblaOptionsType,\n } from \"embla-carousel\"\n\n type CarouselRoot = HTMLElement & {\n __fulldevCarouselApi?: EmblaCarouselType\n }\n\n const instances = new Map<CarouselRoot, () => void>()\n // A nested carousel owns its own parts. The data-carousel-* markers stay\n // in place when a caller overrides data-slot.\n const rootSelector = \"[data-carousel-options]\"\n const getParts = <T extends Element>(root: CarouselRoot, part: string) =>\n [...root.querySelectorAll<T>(`[data-carousel-${part}]`)].filter(\n (element) => element.closest(rootSelector) === root\n )\n const initialize = () => {\n for (const root of document.querySelectorAll<CarouselRoot>(rootSelector)) {\n if (instances.has(root)) continue\n const viewport = getParts<HTMLElement>(root, \"viewport\")[0]\n if (!viewport) continue\n const opts: EmblaOptionsType = JSON.parse(\n root.dataset.carouselOptions || \"{}\"\n )\n const api = EmblaCarousel(viewport, opts)\n root.__fulldevCarouselApi = api\n const previous = getParts<HTMLButtonElement>(root, \"previous\")\n const next = getParts<HTMLButtonElement>(root, \"next\")\n const emit = (type: \"carousel:init\" | \"carousel:select\") => {\n root.dispatchEvent(\n new CustomEvent(type, {\n detail: {\n api,\n canScrollPrev: api.canScrollPrev(),\n canScrollNext: api.canScrollNext(),\n selectedScrollSnap: api.selectedScrollSnap(),\n scrollSnapList: api.scrollSnapList(),\n },\n })\n )\n }\n const sync = () => {\n root.dataset.canScrollPrev = String(api.canScrollPrev())\n root.dataset.canScrollNext = String(api.canScrollNext())\n root.dataset.selectedScrollSnap = String(api.selectedScrollSnap())\n for (const button of previous)\n if (button.dataset.manualDisabled !== \"true\")\n button.disabled = !api.canScrollPrev()\n for (const button of next)\n if (button.dataset.manualDisabled !== \"true\")\n button.disabled = !api.canScrollNext()\n emit(\"carousel:select\")\n }\n const jump = () =>\n window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n const onPrevious = () => api.scrollPrev(jump())\n const onNext = () => api.scrollNext(jump())\n const onKeyDown = (event: KeyboardEvent) => {\n const target = event.target\n if (\n event.defaultPrevented ||\n !(target instanceof Element) ||\n target.closest(rootSelector) !== root ||\n target.closest(\n 'input, textarea, select, [contenteditable]:not([contenteditable=\"false\"])'\n )\n )\n return\n const vertical = root.dataset.orientation === \"vertical\"\n switch (event.key) {\n case vertical ? \"ArrowUp\" : \"ArrowLeft\":\n onPrevious()\n break\n case vertical ? \"ArrowDown\" : \"ArrowRight\":\n onNext()\n break\n case \"Home\":\n api.scrollTo(0, jump())\n break\n case \"End\":\n api.scrollTo(api.scrollSnapList().length - 1, jump())\n break\n default:\n return\n }\n event.preventDefault()\n }\n for (const button of previous)\n button.addEventListener(\"click\", onPrevious)\n for (const button of next) button.addEventListener(\"click\", onNext)\n root.addEventListener(\"keydown\", onKeyDown)\n api.on(\"select\", sync)\n api.on(\"reInit\", sync)\n sync()\n const frame = requestAnimationFrame(() => emit(\"carousel:init\"))\n instances.set(root, () => {\n cancelAnimationFrame(frame)\n for (const button of previous)\n button.removeEventListener(\"click\", onPrevious)\n for (const button of next) button.removeEventListener(\"click\", onNext)\n root.removeEventListener(\"keydown\", onKeyDown)\n api.off(\"select\", sync)\n api.off(\"reInit\", sync)\n api.destroy()\n delete root.__fulldevCarouselApi\n })\n }\n }\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const cleanup of instances.values()) cleanup()\n instances.clear()\n })\n</script>\n",
16
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { EmblaOptionsType } from \"embla-carousel\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"section\"> & {\n opts?: EmblaOptionsType\n orientation?: \"horizontal\" | \"vertical\"\n}\n\nconst {\n class: className,\n opts,\n orientation = opts?.axis === \"y\" ? \"vertical\" : \"horizontal\",\n \"aria-roledescription\": roleDescription = \"carousel\",\n \"data-slot\": dataSlot = \"carousel\",\n // A named section is a region landmark. Without a name it would have no\n // role, so it becomes a group, the other container role the APG carousel\n // allows.\n role = Astro.props[\"aria-label\"] || Astro.props[\"aria-labelledby\"]\n ? undefined\n : \"group\",\n ...props\n} = Astro.props\n\nconst resolvedOpts: EmblaOptionsType = {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n}\n---\n\n<section\n data-slot={dataSlot}\n data-orientation={orientation}\n data-carousel-options={JSON.stringify(resolvedOpts)}\n class={cn(\"group/carousel relative\", className)}\n role={role}\n aria-roledescription={roleDescription}\n {...props}\n>\n <slot />\n</section>\n\n<script>\n import EmblaCarousel, {\n type EmblaCarouselType,\n type EmblaOptionsType,\n } from \"embla-carousel\"\n\n type CarouselRoot = HTMLElement & {\n __fulldevCarouselApi?: EmblaCarouselType\n }\n\n const instances = new Map<CarouselRoot, () => void>()\n // A nested carousel owns its own parts. The data-carousel-* markers stay\n // in place when a caller overrides data-slot.\n const rootSelector = \"[data-carousel-options]\"\n const getParts = <T extends Element>(root: CarouselRoot, part: string) =>\n [...root.querySelectorAll<T>(`[data-carousel-${part}]`)].filter(\n (element) => element.closest(rootSelector) === root\n )\n const initialize = () => {\n for (const root of document.querySelectorAll<CarouselRoot>(rootSelector)) {\n if (instances.has(root)) continue\n const viewport = getParts<HTMLElement>(root, \"viewport\")[0]\n if (!viewport) continue\n const opts: EmblaOptionsType = JSON.parse(\n root.dataset.carouselOptions || \"{}\"\n )\n const api = EmblaCarousel(viewport, opts)\n // Whether Embla runs at the current breakpoint.\n const active = () => api.internalEngine().options.active !== false\n root.__fulldevCarouselApi = api\n const previous = getParts<HTMLButtonElement>(root, \"previous\")\n const next = getParts<HTMLButtonElement>(root, \"next\")\n // Indicators are read on each use, so thumbnails that a variant change\n // replaces keep working.\n const indicators = () => getParts<HTMLElement>(root, \"indicator\")\n const emit = (type: \"carousel:init\" | \"carousel:select\") => {\n root.dispatchEvent(\n new CustomEvent(type, {\n detail: {\n api,\n canScrollPrev: api.canScrollPrev(),\n canScrollNext: api.canScrollNext(),\n selectedScrollSnap: api.selectedScrollSnap(),\n scrollSnapList: api.scrollSnapList(),\n },\n })\n )\n }\n // As in data-slot, an indicator without a scroll position, such as the\n // last thumbnails when several slides show, is hidden, and all are while\n // Embla is inactive at the current breakpoint.\n const markIndicators = () => {\n const selected = active() ? api.selectedScrollSnap() : -1\n const positions = api.scrollSnapList().length\n for (const indicator of indicators()) {\n const index = Number(indicator.dataset.index)\n indicator.hidden =\n !active() ||\n !Number.isInteger(index) ||\n index < 0 ||\n index >= positions\n const current = index === selected\n indicator.dataset.state = current ? \"active\" : \"inactive\"\n if (current) indicator.setAttribute(\"aria-current\", \"true\")\n else indicator.removeAttribute(\"aria-current\")\n }\n }\n const sync = () => {\n root.dataset.canScrollPrev = String(api.canScrollPrev())\n root.dataset.canScrollNext = String(api.canScrollNext())\n root.dataset.selectedScrollSnap = String(api.selectedScrollSnap())\n for (const button of previous)\n if (button.dataset.manualDisabled !== \"true\")\n button.disabled = !api.canScrollPrev()\n for (const button of next)\n if (button.dataset.manualDisabled !== \"true\")\n button.disabled = !api.canScrollNext()\n markIndicators()\n emit(\"carousel:select\")\n }\n const jump = () =>\n window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n const onPrevious = () => api.scrollPrev(jump())\n const onNext = () => api.scrollNext(jump())\n const onClick = (event: MouseEvent) => {\n const indicator =\n event.target instanceof Element &&\n event.target.closest<HTMLElement>(\"[data-carousel-indicator]\")\n if (!indicator || indicator.closest(rootSelector) !== root) return\n const index = Number(indicator.dataset.index)\n if (\n Number.isInteger(index) &&\n index >= 0 &&\n index < api.scrollSnapList().length\n )\n api.scrollTo(index, jump())\n // Thumbnails a variant change replaced are marked, also when the\n // slide did not change.\n markIndicators()\n }\n const onKeyDown = (event: KeyboardEvent) => {\n const target = event.target\n if (\n event.defaultPrevented ||\n !(target instanceof Element) ||\n target.closest(rootSelector) !== root ||\n target.closest(\n 'input, textarea, select, [contenteditable]:not([contenteditable=\"false\"])'\n )\n )\n return\n const vertical = root.dataset.orientation === \"vertical\"\n switch (event.key) {\n case vertical ? \"ArrowUp\" : \"ArrowLeft\":\n onPrevious()\n break\n case vertical ? \"ArrowDown\" : \"ArrowRight\":\n onNext()\n break\n case \"Home\":\n api.scrollTo(0, jump())\n break\n case \"End\":\n api.scrollTo(api.scrollSnapList().length - 1, jump())\n break\n default:\n return\n }\n event.preventDefault()\n }\n for (const button of previous)\n button.addEventListener(\"click\", onPrevious)\n for (const button of next) button.addEventListener(\"click\", onNext)\n root.addEventListener(\"click\", onClick)\n root.addEventListener(\"keydown\", onKeyDown)\n api.on(\"select\", sync)\n api.on(\"reInit\", sync)\n sync()\n const frame = requestAnimationFrame(() => emit(\"carousel:init\"))\n instances.set(root, () => {\n cancelAnimationFrame(frame)\n for (const button of previous)\n button.removeEventListener(\"click\", onPrevious)\n for (const button of next) button.removeEventListener(\"click\", onNext)\n root.removeEventListener(\"click\", onClick)\n root.removeEventListener(\"keydown\", onKeyDown)\n api.off(\"select\", sync)\n api.off(\"reInit\", sync)\n api.destroy()\n delete root.__fulldevCarouselApi\n })\n }\n }\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const cleanup of instances.values()) cleanup()\n instances.clear()\n })\n</script>\n",
17
17
  "type": "registry:ui"
18
18
  },
19
19
  {
@@ -36,9 +36,14 @@
36
36
  "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronLeftIcon from \"@lucide/astro/icons/chevron-left\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"type\"> & ButtonVariantProps\n\nconst {\n class: className,\n variant = \"outline\",\n size = \"icon-sm\",\n disabled,\n \"data-slot\": dataSlot = \"carousel-previous\",\n ...props\n} = Astro.props\n---\n\n<button\n type=\"button\"\n data-slot={dataSlot}\n data-carousel-previous\n data-variant={variant}\n data-size={size}\n data-manual-disabled={disabled ? \"true\" : undefined}\n disabled={disabled}\n class={cn(\n buttonVariants({ variant, size }),\n \"rounded-2xl absolute touch-manipulation group-data-[orientation=horizontal]/carousel:inset-y-0 group-data-[orientation=horizontal]/carousel:-left-12 group-data-[orientation=horizontal]/carousel:my-auto\",\n \"group-data-[orientation=vertical]/carousel:-top-12 group-data-[orientation=vertical]/carousel:left-1/2 group-data-[orientation=vertical]/carousel:-translate-x-1/2 group-data-[orientation=vertical]/carousel:translate-y-0 group-data-[orientation=vertical]/carousel:rotate-90\",\n className\n )}\n {...props}\n>\n <slot>\n <ChevronLeftIcon aria-hidden=\"true\" />\n <span class=\"sr-only\">Previous slide</span>\n </slot>\n</button>\n",
37
37
  "type": "registry:ui"
38
38
  },
39
+ {
40
+ "path": "src/components/ui/carousel/carousel-indicator.astro",
41
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"type\"> & {\n index: number\n}\n\nconst {\n class: className,\n index,\n \"aria-label\": ariaLabel = `Go to slide ${index + 1}`,\n \"data-slot\": dataSlot = \"carousel-indicator\",\n ...props\n} = Astro.props\n---\n\n<button\n type=\"button\"\n data-slot={dataSlot}\n data-carousel-indicator\n data-index={index}\n aria-label={ariaLabel}\n class={cn(\n \"rounded-xl bg-muted outline-2 outline-offset-2 outline-transparent transition-[outline-color,box-shadow] focus-visible:ring-3 focus-visible:ring-ring/50 data-[state=active]:not-focus-visible:outline-foreground relative block shrink-0 cursor-pointer overflow-hidden [&>img]:size-full [&>img]:object-cover\",\n className\n )}\n {...props}\n>\n <slot />\n</button>\n",
42
+ "type": "registry:ui"
43
+ },
39
44
  {
40
45
  "path": "src/components/ui/carousel/index.ts",
41
- "content": "export type {\n EmblaCarouselType as CarouselApi,\n EmblaOptionsType as CarouselOptions,\n EmblaPluginType as CarouselPlugin,\n} from \"embla-carousel\"\n\nexport { default as Carousel } from \"./carousel.astro\"\nexport { default as CarouselContent } from \"./carousel-content.astro\"\nexport { default as CarouselItem } from \"./carousel-item.astro\"\nexport { default as CarouselPrevious } from \"./carousel-previous.astro\"\nexport { default as CarouselNext } from \"./carousel-next.astro\"\n",
46
+ "content": "export type {\n EmblaCarouselType as CarouselApi,\n EmblaOptionsType as CarouselOptions,\n EmblaPluginType as CarouselPlugin,\n} from \"embla-carousel\"\n\nexport { default as Carousel } from \"./carousel.astro\"\nexport { default as CarouselContent } from \"./carousel-content.astro\"\nexport { default as CarouselItem } from \"./carousel-item.astro\"\nexport { default as CarouselPrevious } from \"./carousel-previous.astro\"\nexport { default as CarouselNext } from \"./carousel-next.astro\"\nexport { default as CarouselIndicator } from \"./carousel-indicator.astro\"\n",
42
47
  "type": "registry:ui"
43
48
  }
44
49
  ],
@@ -4,7 +4,7 @@
4
4
  "title": "Collapsible",
5
5
  "description": "An interactive component which expands/collapses a panel.",
6
6
  "dependencies": [
7
- "@data-slot/collapsible@^1.1.2"
7
+ "@data-slot/collapsible@^1.1.3"
8
8
  ],
9
9
  "files": [
10
10
  {
@@ -4,8 +4,8 @@
4
4
  "title": "Combobox",
5
5
  "description": "Autocomplete input with a list of suggestions.",
6
6
  "dependencies": [
7
- "@data-slot/combobox@^1.1.2",
8
- "@data-slot/core@^1.1.2",
7
+ "@data-slot/combobox@^1.1.3",
8
+ "@data-slot/core@^1.1.3",
9
9
  "@lucide/astro"
10
10
  ],
11
11
  "registryDependencies": [
@@ -4,9 +4,9 @@
4
4
  "title": "Command",
5
5
  "description": "Command menu for search and quick actions.",
6
6
  "dependencies": [
7
- "@data-slot/command@^1.1.2",
7
+ "@data-slot/command@^1.1.3",
8
8
  "@lucide/astro",
9
- "@data-slot/core@^1.1.2"
9
+ "@data-slot/core@^1.1.3"
10
10
  ],
11
11
  "registryDependencies": [
12
12
  "@fulldev/dialog"
@@ -42,6 +42,7 @@
42
42
  "@fulldev/marquee",
43
43
  "@fulldev/native-select",
44
44
  "@fulldev/navigation-menu",
45
+ "@fulldev/number-field",
45
46
  "@fulldev/pagination",
46
47
  "@fulldev/popover",
47
48
  "@fulldev/price",
@@ -57,6 +58,7 @@
57
58
  "@fulldev/skeleton",
58
59
  "@fulldev/slider",
59
60
  "@fulldev/spinner",
61
+ "@fulldev/swatch",
60
62
  "@fulldev/switch",
61
63
  "@fulldev/table",
62
64
  "@fulldev/tabs",
@@ -4,7 +4,7 @@
4
4
  "title": "Dialog",
5
5
  "description": "A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.",
6
6
  "dependencies": [
7
- "@data-slot/dialog@^1.1.2",
7
+ "@data-slot/dialog@^1.1.3",
8
8
  "@lucide/astro"
9
9
  ],
10
10
  "registryDependencies": [
@@ -4,7 +4,7 @@
4
4
  "title": "Drawer",
5
5
  "description": "A drawer component that slides in from any edge of the screen.",
6
6
  "dependencies": [
7
- "@data-slot/drawer@^1.1.2"
7
+ "@data-slot/drawer@^1.1.3"
8
8
  ],
9
9
  "registryDependencies": [
10
10
  "@fulldev/button"
@@ -4,7 +4,7 @@
4
4
  "title": "Dropdown Menu",
5
5
  "description": "Displays a menu to the user, such as a set of actions or functions, triggered by a button.",
6
6
  "dependencies": [
7
- "@data-slot/dropdown-menu@^1.1.2",
7
+ "@data-slot/dropdown-menu@^1.1.3",
8
8
  "@lucide/astro"
9
9
  ],
10
10
  "files": [
@@ -4,8 +4,8 @@
4
4
  "title": "Hover Card",
5
5
  "description": "For sighted users to preview content available behind a link.",
6
6
  "dependencies": [
7
- "@data-slot/hover-card@^1.1.2",
8
- "@data-slot/core@^1.1.2"
7
+ "@data-slot/hover-card@^1.1.3",
8
+ "@data-slot/core@^1.1.3"
9
9
  ],
10
10
  "files": [
11
11
  {
@@ -4,7 +4,7 @@
4
4
  "title": "Navigation Menu",
5
5
  "description": "A collection of links for navigating websites.",
6
6
  "dependencies": [
7
- "@data-slot/navigation-menu@^1.1.2",
7
+ "@data-slot/navigation-menu@^1.1.3",
8
8
  "@lucide/astro"
9
9
  ],
10
10
  "files": [
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "number-field",
4
+ "title": "Number Field",
5
+ "description": "A number input with decrement and increment buttons.",
6
+ "dependencies": [
7
+ "@lucide/astro"
8
+ ],
9
+ "registryDependencies": [
10
+ "@fulldev/input-group"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "src/components/ui/number-field/number-field.astro",
15
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"number-field\"\n role=\"group\"\n class={cn(\n \"bg-input/50 border-transparent has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-8 rounded-2xl border transition-[color,box-shadow] duration-200 in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-1.5 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-1.5 group/input-group relative flex w-32 min-w-0 items-center outline-none\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n // The buttons step the native input as its arrow keys do and fire the\n // input and change events that typing fires. As in Base UI, they are left\n // out of the tab order, where the input's arrow keys step, and disabled when\n // a step would not change the value: at a bound, or while the input is\n // disabled or read-only. They follow new attributes and replaced markup.\n // Without JavaScript the input still works on its own.\n const buttons = (root: Element) =>\n root.querySelectorAll<HTMLButtonElement>(\n '[data-slot=\"number-field-decrement\"], [data-slot=\"number-field-increment\"]'\n )\n // Steps a detached copy, so min, max and step apply as the browser applies\n // them.\n const canStep = (input: HTMLInputElement, decrement: boolean) => {\n if (input.disabled || input.readOnly) return false\n const probe = input.cloneNode() as HTMLInputElement\n probe.value = input.value\n try {\n if (decrement) probe.stepDown()\n else probe.stepUp()\n } catch {\n return false\n }\n return probe.value !== input.value\n }\n const observed = new WeakSet<Element>()\n const observer = new MutationObserver((mutations) => {\n const roots = new Set<Element>()\n for (const mutation of mutations) {\n if (\n mutation.type === \"attributes\" &&\n !(mutation.target instanceof HTMLInputElement)\n )\n continue\n const root =\n mutation.target instanceof Element &&\n mutation.target.closest('[data-slot=\"number-field\"]')\n if (root) roots.add(root)\n }\n for (const root of roots) sync(root)\n })\n // Syncs the buttons, and data-disabled for the input group look, and\n // follows the root's later changes.\n const sync = (root: Element) => {\n const input = root.querySelector(\"input\")\n if (!input) return\n if (input.disabled) root.setAttribute(\"data-disabled\", \"true\")\n else root.removeAttribute(\"data-disabled\")\n for (const button of buttons(root)) {\n if (button.dataset.manualDisabled === \"true\") continue\n const disabled = !canStep(\n input,\n button.dataset.slot === \"number-field-decrement\"\n )\n if (button.disabled !== disabled) button.disabled = disabled\n }\n if (observed.has(root)) return\n observed.add(root)\n observer.observe(root, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: [\"min\", \"max\", \"step\", \"value\", \"disabled\", \"readonly\"],\n })\n }\n const syncAll = () => {\n for (const root of document.querySelectorAll('[data-slot=\"number-field\"]'))\n sync(root)\n }\n\n if (!document.documentElement.dataset.numberFieldBound) {\n document.documentElement.dataset.numberFieldBound = \"true\"\n\n document.addEventListener(\"click\", (event) => {\n const target = event.target\n if (!(target instanceof Element)) return\n\n const button = target.closest(\n '[data-slot=\"number-field-decrement\"], [data-slot=\"number-field-increment\"]'\n )\n if (!(button instanceof HTMLButtonElement) || button.disabled) return\n\n const root = button.closest('[data-slot=\"number-field\"]')\n const input = root?.querySelector(\"input\")\n if (!root || !input || input.disabled || input.readOnly) return\n\n const value = input.value\n try {\n if (button.dataset.slot === \"number-field-decrement\") input.stepDown()\n else input.stepUp()\n } catch {\n return\n }\n if (input.value !== value) {\n input.dispatchEvent(new Event(\"input\", { bubbles: true }))\n input.dispatchEvent(new Event(\"change\", { bubbles: true }))\n }\n sync(root)\n })\n // Pressing a button keeps the focus on its field's input, so the typed\n // value is not committed by a blur, and a form that refreshes on change,\n // before the click steps it. Another field still blurs.\n document.addEventListener(\"mousedown\", (event) => {\n const button =\n event.target instanceof Element &&\n event.target.closest(\n '[data-slot=\"number-field-decrement\"], [data-slot=\"number-field-increment\"]'\n )\n const input = button\n ? button.closest('[data-slot=\"number-field\"]')?.querySelector(\"input\")\n : null\n if (input && input === document.activeElement) event.preventDefault()\n })\n // A pointer or focus that reaches the field first also syncs it, for a\n // field added later or a value a script set without an event.\n for (const type of [\"input\", \"change\", \"pointerover\", \"focusin\"])\n document.addEventListener(type, (event) => {\n const root =\n event.target instanceof Element &&\n event.target.closest('[data-slot=\"number-field\"]')\n if (root) sync(root)\n })\n // A form reset restores the inputs after the event, also an input that\n // belongs to the form from elsewhere.\n document.addEventListener(\"reset\", (event) => {\n setTimeout(() => {\n for (const root of document.querySelectorAll(\n '[data-slot=\"number-field\"]'\n ))\n if (root.querySelector(\"input\")?.form === event.target) sync(root)\n })\n })\n document.addEventListener(\"astro:page-load\", syncAll)\n }\n syncAll()\n</script>\n",
16
+ "type": "registry:ui"
17
+ },
18
+ {
19
+ "path": "src/components/ui/number-field/number-field-decrement.astro",
20
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport MinusIcon from \"@lucide/astro/icons/minus\"\n\nimport { InputGroupAddon, InputGroupButton } from \"@/components/ui/input-group\"\n\ntype Props = Omit<ComponentProps<typeof InputGroupButton>, \"type\">\n\nconst {\n \"aria-label\": ariaLabel = \"Decrease\",\n size = \"icon-xs\",\n disabled,\n ...props\n} = Astro.props\n---\n\n<InputGroupAddon align=\"inline-start\">\n <InputGroupButton\n data-slot=\"number-field-decrement\"\n size={size}\n tabindex={-1}\n aria-label={ariaLabel}\n disabled={disabled}\n data-manual-disabled={disabled ? \"true\" : undefined}\n {...props}\n type=\"button\"\n >\n <slot>\n <MinusIcon aria-hidden=\"true\" />\n </slot>\n </InputGroupButton>\n</InputGroupAddon>\n",
21
+ "type": "registry:ui"
22
+ },
23
+ {
24
+ "path": "src/components/ui/number-field/number-field-increment.astro",
25
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport PlusIcon from \"@lucide/astro/icons/plus\"\n\nimport { InputGroupAddon, InputGroupButton } from \"@/components/ui/input-group\"\n\ntype Props = Omit<ComponentProps<typeof InputGroupButton>, \"type\">\n\nconst {\n \"aria-label\": ariaLabel = \"Increase\",\n size = \"icon-xs\",\n disabled,\n ...props\n} = Astro.props\n---\n\n<InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n data-slot=\"number-field-increment\"\n size={size}\n tabindex={-1}\n aria-label={ariaLabel}\n disabled={disabled}\n data-manual-disabled={disabled ? \"true\" : undefined}\n {...props}\n type=\"button\"\n >\n <slot>\n <PlusIcon aria-hidden=\"true\" />\n </slot>\n </InputGroupButton>\n</InputGroupAddon>\n",
26
+ "type": "registry:ui"
27
+ },
28
+ {
29
+ "path": "src/components/ui/number-field/number-field-input.astro",
30
+ "content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { InputGroupInput } from \"@/components/ui/input-group\"\n\ntype Props = Omit<ComponentProps<typeof InputGroupInput>, \"type\">\n\nconst { class: className, step, min, inputmode, ...props } = Astro.props\n// A field that cannot go below 0 gets the numeric keypad, or the decimal one\n// for fractions. Others keep the browser's keyboard, which has a minus key.\nconst bound =\n min === undefined || min === null || String(min).trim() === \"\"\n ? Number.NaN\n : Number(min)\nconst unsigned = bound >= 0\nconst whole = Number.isInteger(Number(step ?? 1)) && Number.isInteger(bound)\nconst keypad = unsigned ? (whole ? \"numeric\" : \"decimal\") : undefined\n---\n\n<InputGroupInput\n step={step}\n min={min}\n inputmode={inputmode ?? keypad}\n class={cn(\n \"text-center tabular-nums [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none\",\n className\n )}\n {...props}\n type=\"number\"\n/>\n",
31
+ "type": "registry:ui"
32
+ },
33
+ {
34
+ "path": "src/components/ui/number-field/index.ts",
35
+ "content": "export { default as NumberField } from \"./number-field.astro\"\nexport { default as NumberFieldDecrement } from \"./number-field-decrement.astro\"\nexport { default as NumberFieldInput } from \"./number-field-input.astro\"\nexport { default as NumberFieldIncrement } from \"./number-field-increment.astro\"\n",
36
+ "type": "registry:ui"
37
+ }
38
+ ],
39
+ "docs": "https://ui.full.dev/components/number-field/",
40
+ "categories": [
41
+ "ui"
42
+ ],
43
+ "type": "registry:ui"
44
+ }
@@ -4,7 +4,7 @@
4
4
  "title": "Popover",
5
5
  "description": "Displays rich content in a floating layer, triggered by a button.",
6
6
  "dependencies": [
7
- "@data-slot/popover@^1.1.2"
7
+ "@data-slot/popover@^1.1.3"
8
8
  ],
9
9
  "files": [
10
10
  {
@@ -4,7 +4,7 @@
4
4
  "title": "Radio Group",
5
5
  "description": "A set of checkable buttons, known as radio buttons, where no more than one of the buttons can be checked at a time.",
6
6
  "dependencies": [
7
- "@data-slot/radio-group@^1.1.2"
7
+ "@data-slot/radio-group@^1.1.3"
8
8
  ],
9
9
  "files": [
10
10
  {