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
@@ -9,13 +9,13 @@
9
9
  "files": [
10
10
  {
11
11
  "path": "assets/ui-carousel.js",
12
- "content": "import { createCarousel } from '@data-slot/carousel';\n\n// @data-slot/carousel owns scrolling, snapping, dragging, the arrow keys and the previous and next\n// buttons, and keeps every visible card interactive. It writes English ARIA descriptions and slide\n// labels, so the translated ones from Liquid are put back after binding and slide updates.\nexport function initializeCarousel(root) {\n const content = root.querySelector('[data-slot=\"carousel-content\"]');\n const items = () => [...content.children].filter((item) => item.matches('[data-slot=\"carousel-item\"]'));\n const rootDescription = root.getAttribute('aria-roledescription');\n const descriptions = new WeakMap(items().map((item) => [item, item.getAttribute('aria-roledescription')]));\n let destroyed = false;\n const translate = () => {\n if (destroyed) return;\n if (rootDescription) root.setAttribute('aria-roledescription', rootDescription);\n const slides = items();\n const template = root.dataset.slideLabel;\n slides.forEach((item, index) => {\n const description = descriptions.get(item);\n if (description) item.setAttribute('aria-roledescription', description);\n if (template)\n item.setAttribute('aria-label', template.replace('[index]', index + 1).replace('[total]', slides.length));\n });\n };\n // Observe first to capture authored descriptions before data-slot rewrites them.\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations)\n for (const node of mutation.addedNodes)\n if (node instanceof Element && node.matches('[data-slot=\"carousel-item\"]'))\n descriptions.set(node, node.getAttribute('aria-roledescription'));\n queueMicrotask(translate);\n });\n observer.observe(content, { childList: true });\n const carousel = createCarousel(root, { slides: 'multiple', drag: true, loop: false });\n translate();\n for (const button of root.querySelectorAll('[data-slot=\"carousel-previous\"], [data-slot=\"carousel-next\"]'))\n button.hidden = false;\n const destroy = carousel.destroy.bind(carousel);\n carousel.destroy = () => {\n destroyed = true;\n observer.disconnect();\n destroy();\n };\n return carousel;\n}\n",
12
+ "content": "import { createCarousel } from '@data-slot/carousel';\n\n// @data-slot/carousel owns scrolling, snapping, dragging, the arrow keys and the previous and next\n// buttons, and keeps every visible card interactive. It writes English ARIA descriptions and slide\n// labels, so the translated ones from Liquid are put back after binding and slide updates.\nexport function initializeCarousel(root) {\n const content = root.querySelector('[data-slot=\"carousel-content\"]');\n const items = () => [...content.children].filter((item) => item.matches('[data-slot=\"carousel-item\"]'));\n const rootDescription = root.getAttribute('aria-roledescription');\n const descriptions = new WeakMap(items().map((item) => [item, item.getAttribute('aria-roledescription')]));\n let destroyed = false;\n const translate = () => {\n if (destroyed) return;\n if (rootDescription) root.setAttribute('aria-roledescription', rootDescription);\n const slides = items();\n const template = root.dataset.slideLabel;\n slides.forEach((item, index) => {\n const description = descriptions.get(item);\n if (description) item.setAttribute('aria-roledescription', description);\n if (template)\n item.setAttribute('aria-label', template.replace('[index]', index + 1).replace('[total]', slides.length));\n });\n };\n // Observe first to capture authored descriptions before data-slot rewrites them.\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations)\n for (const node of mutation.addedNodes)\n if (node instanceof Element && node.matches('[data-slot=\"carousel-item\"]'))\n descriptions.set(node, node.getAttribute('aria-roledescription'));\n queueMicrotask(translate);\n });\n observer.observe(content, { childList: true });\n // A thumbnail can link to its slide's id, which works without JavaScript. Once the controller runs,\n // a plain click only scrolls the carousel, so the page does not jump to the slide.\n const onClick = (event) => {\n const link = event.target instanceof Element ? event.target.closest('a[data-slot=\"carousel-indicator\"]') : null;\n if (!link || link.closest('[data-slot=\"carousel\"]') !== root) return;\n if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n };\n // A link to a slide or to something in it, such as a thumbnail followed before this module loaded,\n // keeps that slide.\n let hash = location.hash.slice(1);\n try {\n hash = decodeURIComponent(hash);\n } catch {\n // Keep a malformed hash as it is.\n }\n const target = hash ? document.getElementById(hash) : null;\n const linked = target ? items().findIndex((item) => item.contains(target)) : -1;\n // A row of cards exposes every card that is in view. A gallery that shows one slide at a time sets\n // data-slides='single', so only the shown slide is exposed, also when a fractional width leaves a\n // sliver of the next one in view.\n const carousel = createCarousel(root, {\n slides: root.dataset.slides === 'single' ? 'single' : 'multiple',\n drag: true,\n loop: false,\n ...(linked >= 0 ? { defaultIndex: linked } : {}),\n });\n root.addEventListener('click', onClick);\n translate();\n for (const button of root.querySelectorAll('[data-slot=\"carousel-previous\"], [data-slot=\"carousel-next\"]'))\n button.hidden = false;\n const destroy = carousel.destroy.bind(carousel);\n carousel.destroy = () => {\n destroyed = true;\n observer.disconnect();\n root.removeEventListener('click', onClick);\n destroy();\n };\n return carousel;\n}\n",
13
13
  "type": "registry:file",
14
14
  "target": "~/assets/ui-carousel.js"
15
15
  },
16
16
  {
17
17
  "path": "assets/ui-controls.js",
18
- "content": "// The data-slot controllers that few pages use, imported when theme.js finds their markup. Each\n// entry starts one root and returns its controller with destroy(). Behavior is the vendored\n// controller's; the adapters here only connect it to native forms and theme state.\n\n// A composite input renders hidden after its native fallback, such as a select or radio inputs,\n// which the form submits until the controller runs. Then the fallback leaves the document, so\n// labels and the form see only the field the controller generates, and the fallback's id moves to\n// the labelled element, so a label[for] still reaches the control. start() creates the controller\n// with the fallback's reset default and the value a shopper chose while it loaded; its destroy()\n// writes the current value back, and the fallback returns with its own reset default.\nfunction replaceFallback(root, labelled, start) {\n const fallback = root.previousElementSibling?.matches('[data-fallback]') ? root.previousElementSibling : null;\n const attributes = ['id', 'aria-labelledby'].map((name) => [name, labelled.getAttribute(name)]);\n const restore = () => {\n root.hidden = true;\n for (const [name, value] of attributes) {\n if (value === null) labelled.removeAttribute(name);\n else labelled.setAttribute(name, value);\n }\n if (fallback) root.before(fallback);\n };\n fallback?.remove();\n if (fallback?.id) labelled.id = fallback.id;\n root.hidden = false;\n let controller;\n try {\n controller = start(fallback);\n } catch (error) {\n restore();\n throw error;\n }\n return {\n destroy() {\n controller.destroy();\n restore();\n },\n };\n}\n\nfunction initializeSelect({ createSelect }, root) {\n return replaceFallback(root, root.querySelector('[data-slot=\"select-trigger\"]'), (select) => {\n const options = [...(select?.options ?? [])];\n const initial = options.find((option) => option.defaultSelected) ?? options.find((option) => !option.disabled);\n const controller = createSelect(root, { mountStrategy: 'eager', defaultValue: initial?.value || undefined });\n const value = select?.value || null;\n if (select && value !== controller.value) root.dispatchEvent(new CustomEvent('select:set', { detail: { value } }));\n return {\n destroy() {\n if (select) select.value = controller.value ?? '';\n controller.destroy();\n },\n };\n });\n}\n\nfunction initializeRadioGroup({ createRadioGroup }, root) {\n return replaceFallback(root, root, (fallback) => {\n const inputs = [...(fallback?.querySelectorAll('input[type=\"radio\"]') ?? [])];\n const initial = inputs.find((input) => input.defaultChecked)?.value ?? '';\n const controller = createRadioGroup(root, fallback ? { defaultValue: initial } : {});\n const value = inputs.find((input) => input.checked)?.value ?? null;\n if (fallback && value !== controller.value) {\n if (value === null) controller.clear();\n else controller.select(value);\n }\n return {\n destroy() {\n for (const input of inputs) input.checked = input.value === controller.value;\n controller.destroy();\n },\n };\n });\n}\n\nfunction initializeSwitch({ createSwitch }, root) {\n return replaceFallback(root, root, (checkbox) => {\n const controller = createSwitch(root, checkbox ? { defaultChecked: checkbox.defaultChecked } : {});\n if (checkbox) controller.setChecked(checkbox.checked);\n return {\n destroy() {\n if (checkbox) checkbox.checked = controller.checked;\n controller.destroy();\n },\n };\n });\n}\n\n// The slider has no form field of its own, so its native range inputs stay in the form, hidden,\n// and follow its value. A form reset moves the slider back to the inputs' reset values.\nfunction initializeSlider({ createSlider }, root) {\n const fallback = root.previousElementSibling?.matches('[data-fallback]') ? root.previousElementSibling : null;\n const inputs = fallback ? [...fallback.querySelectorAll('input[type=\"range\"]')] : [];\n const read = () => (inputs.length > 1 ? inputs.map((input) => Number(input.value)) : Number(inputs[0]?.value));\n const write = (value) => {\n [value].flat().forEach((number, index) => {\n if (!inputs[index] || inputs[index].value === String(number)) return;\n inputs[index].value = String(number);\n inputs[index].dispatchEvent(new Event('input', { bubbles: true }));\n });\n };\n const slider = createSlider(root, {\n ...(inputs.length ? { defaultValue: read() } : {}),\n onValueChange: write,\n onValueCommit: () => inputs.forEach((input) => input.dispatchEvent(new Event('change', { bubbles: true }))),\n });\n const events = new AbortController();\n inputs[0]?.form?.addEventListener('reset', () => setTimeout(() => slider.setValue(read())), {\n signal: events.signal,\n });\n if (fallback) fallback.hidden = true;\n root.hidden = false;\n return {\n destroy() {\n events.abort();\n slider.destroy();\n root.hidden = true;\n if (fallback) fallback.hidden = false;\n },\n };\n}\n\n// The action of an alert dialog is a native link or submit or reset button, and the controller\n// leaves closing to the caller. A link closes the dialog on click; a submit or reset button once its\n// form submits or resets, so an invalid form keeps its native validation and the dialog stays open.\nfunction initializeAlertDialog({ createAlertDialog }, root) {\n const dialog = createAlertDialog(root);\n const events = new AbortController();\n for (const action of root.querySelectorAll('[data-slot=\"alert-dialog-action\"]')) {\n action.addEventListener(\n 'click',\n () => {\n const form = ['submit', 'reset'].includes(action.type) ? action.form : null;\n if (form) form.addEventListener(action.type, () => dialog.close(), { once: true, signal: events.signal });\n else dialog.close();\n },\n { signal: events.signal },\n );\n }\n return {\n destroy() {\n events.abort();\n dialog.destroy();\n },\n };\n}\n\n// Buttons inside a toaster show a toast with their translated title and description. Like other\n// triggers that only open a popup, they show once the component has started (data-enhanced).\nfunction initializeToaster({ createToast }, root) {\n const toaster = createToast(root);\n const events = new AbortController();\n for (const button of root.querySelectorAll('[data-toast-title]')) {\n button.addEventListener(\n 'click',\n () => toaster.show({ title: button.dataset.toastTitle, description: button.dataset.toastDescription }),\n { signal: events.signal },\n );\n }\n return {\n destroy() {\n events.abort();\n toaster.destroy();\n },\n };\n}\n\n// Each entry loads its data-slot package, then starts one root with it and returns a controller\n// with destroy(). theme.js starts the root only if it is still current once the package has\n// loaded. Select, tooltip and hover card keep their closed content connected (eager), so nested\n// components and the lifecycle in theme.js never see it leave the document.\nexport const controls = {\n select: [() => import('@data-slot/select'), initializeSelect],\n 'radio-group': [() => import('@data-slot/radio-group'), initializeRadioGroup],\n switch: [() => import('@data-slot/switch'), initializeSwitch],\n slider: [() => import('@data-slot/slider'), initializeSlider],\n toggle: [() => import('@data-slot/toggle'), ({ createToggle }, root) => createToggle(root)],\n 'toggle-group': [() => import('@data-slot/toggle-group'), ({ createToggleGroup }, root) => createToggleGroup(root)],\n collapsible: [() => import('@data-slot/collapsible'), ({ createCollapsible }, root) => createCollapsible(root)],\n popover: [() => import('@data-slot/popover'), ({ createPopover }, root) => createPopover(root)],\n 'hover-card': [\n () => import('@data-slot/hover-card'),\n ({ createHoverCard }, root) => createHoverCard(root, { mountStrategy: 'eager' }),\n ],\n tooltip: [\n () => import('@data-slot/tooltip'),\n ({ createTooltip }, root) => createTooltip(root, { mountStrategy: 'eager' }),\n ],\n 'dropdown-menu': [\n () => import('@data-slot/dropdown-menu'),\n ({ createDropdownMenu }, root) => createDropdownMenu(root),\n ],\n 'alert-dialog': [() => import('@data-slot/alert-dialog'), initializeAlertDialog],\n drawer: [() => import('@data-slot/drawer'), ({ createDrawer }, root) => createDrawer(root)],\n toast: [() => import('@data-slot/toast'), initializeToaster],\n};\n",
18
+ "content": "// The data-slot controllers that few pages use, imported when theme.js finds their markup. Each\n// entry starts one root and returns its controller with destroy(). Behavior is the vendored\n// controller's; the adapters here only connect it to native forms and theme state.\n\n// A composite input renders hidden after its native fallback, such as a select or radio inputs,\n// which the form submits until the controller runs. Then the fallback leaves the document, so\n// labels and the form see only the field the controller generates, and the fallback's id moves to\n// the labelled element, so a label[for] still reaches the control. start() creates the controller\n// with the fallback's reset default and the value a shopper chose while it loaded; its destroy()\n// writes the current value back, and the fallback returns with its own reset default.\nfunction replaceFallback(root, labelled, start) {\n const fallback = root.previousElementSibling?.matches('[data-fallback]') ? root.previousElementSibling : null;\n const attributes = ['id', 'aria-labelledby'].map((name) => [name, labelled.getAttribute(name)]);\n const restore = () => {\n root.hidden = true;\n for (const [name, value] of attributes) {\n if (value === null) labelled.removeAttribute(name);\n else labelled.setAttribute(name, value);\n }\n if (fallback) root.before(fallback);\n };\n fallback?.remove();\n if (fallback?.id) labelled.id = fallback.id;\n root.hidden = false;\n let controller;\n try {\n controller = start(fallback);\n } catch (error) {\n restore();\n throw error;\n }\n return {\n destroy() {\n controller.destroy();\n restore();\n },\n };\n}\n\nfunction initializeSelect({ createSelect }, root) {\n return replaceFallback(root, root.querySelector('[data-slot=\"select-trigger\"]'), (select) => {\n const options = [...(select?.options ?? [])];\n const initial = options.find((option) => option.defaultSelected) ?? options.find((option) => !option.disabled);\n const controller = createSelect(root, { mountStrategy: 'eager', defaultValue: initial?.value || undefined });\n const value = select?.value || null;\n if (select && value !== controller.value) root.dispatchEvent(new CustomEvent('select:set', { detail: { value } }));\n return {\n destroy() {\n if (select) select.value = controller.value ?? '';\n controller.destroy();\n },\n };\n });\n}\n\nfunction initializeRadioGroup({ createRadioGroup }, root) {\n return replaceFallback(root, root, (fallback) => {\n const inputs = [...(fallback?.querySelectorAll('input[type=\"radio\"]') ?? [])];\n const initial = inputs.find((input) => input.defaultChecked)?.value ?? '';\n const controller = createRadioGroup(root, fallback ? { defaultValue: initial } : {});\n const value = inputs.find((input) => input.checked)?.value ?? null;\n if (fallback && value !== controller.value) {\n if (value === null) controller.clear();\n else controller.select(value);\n }\n return {\n destroy() {\n for (const input of inputs) input.checked = input.value === controller.value;\n controller.destroy();\n },\n };\n });\n}\n\nfunction initializeSwitch({ createSwitch }, root) {\n return replaceFallback(root, root, (checkbox) => {\n const controller = createSwitch(root, checkbox ? { defaultChecked: checkbox.defaultChecked } : {});\n if (checkbox) controller.setChecked(checkbox.checked);\n return {\n destroy() {\n if (checkbox) checkbox.checked = controller.checked;\n controller.destroy();\n },\n };\n });\n}\n\n// The slider has no form field of its own, so its native range inputs stay in the form, hidden,\n// and follow its value. A form reset moves the slider back to the inputs' reset values.\nfunction initializeSlider({ createSlider }, root) {\n const fallback = root.previousElementSibling?.matches('[data-fallback]') ? root.previousElementSibling : null;\n const inputs = fallback ? [...fallback.querySelectorAll('input[type=\"range\"]')] : [];\n const read = () => (inputs.length > 1 ? inputs.map((input) => Number(input.value)) : Number(inputs[0]?.value));\n const write = (value) => {\n [value].flat().forEach((number, index) => {\n if (!inputs[index] || inputs[index].value === String(number)) return;\n inputs[index].value = String(number);\n inputs[index].dispatchEvent(new Event('input', { bubbles: true }));\n });\n };\n const slider = createSlider(root, {\n ...(inputs.length ? { defaultValue: read() } : {}),\n onValueChange: write,\n onValueCommit: () => inputs.forEach((input) => input.dispatchEvent(new Event('change', { bubbles: true }))),\n });\n const events = new AbortController();\n inputs[0]?.form?.addEventListener('reset', () => setTimeout(() => slider.setValue(read())), {\n signal: events.signal,\n });\n if (fallback) fallback.hidden = true;\n root.hidden = false;\n return {\n destroy() {\n events.abort();\n slider.destroy();\n root.hidden = true;\n if (fallback) fallback.hidden = false;\n },\n };\n}\n\n// The action of an alert dialog is a native link or submit or reset button, and the controller\n// leaves closing to the caller. A link closes the dialog on click; a submit or reset button once its\n// form submits or resets, so an invalid form keeps its native validation and the dialog stays open.\nfunction initializeAlertDialog({ createAlertDialog }, root) {\n const dialog = createAlertDialog(root);\n const events = new AbortController();\n for (const action of root.querySelectorAll('[data-slot=\"alert-dialog-action\"]')) {\n action.addEventListener(\n 'click',\n () => {\n const form = ['submit', 'reset'].includes(action.type) ? action.form : null;\n if (form) form.addEventListener(action.type, () => dialog.close(), { once: true, signal: events.signal });\n else dialog.close();\n },\n { signal: events.signal },\n );\n }\n return {\n destroy() {\n events.abort();\n dialog.destroy();\n },\n };\n}\n\n// Buttons inside a toaster show a toast with their translated title and description. Like other\n// triggers that only open a popup, they show once the component has started (data-enhanced).\nfunction initializeToaster({ createToast }, root) {\n const toaster = createToast(root);\n const events = new AbortController();\n for (const button of root.querySelectorAll('[data-toast-title]')) {\n button.addEventListener(\n 'click',\n () => toaster.show({ title: button.dataset.toastTitle, description: button.dataset.toastDescription }),\n { signal: events.signal },\n );\n }\n return {\n destroy() {\n events.abort();\n toaster.destroy();\n },\n };\n}\n\n// A number field's buttons step its native input, as its arrow keys do, and fire the input and change\n// events that typing fires, so a form or cart script sees one kind of change. As in Base UI, the\n// runtime disables them when a step would not change the value: at a bound, or while the input is\n// disabled or read-only. They follow new attributes, such as a variant's bounds, and markup a cart\n// refresh replaces; a script that sets the value property fires input or change. Disable the input\n// to disable the field. Without JavaScript the input still works on its own.\nfunction initializeNumberField(_, root) {\n const events = new AbortController();\n const options = { signal: events.signal };\n const buttons = () =>\n root.querySelectorAll('[data-slot=\"number-field-decrement\"], [data-slot=\"number-field-increment\"]');\n // Steps a detached copy, so min, max and step apply as the browser applies them.\n const canStep = (input, decrement) => {\n if (input.disabled || input.readOnly) return false;\n const probe = input.cloneNode();\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 // data-disabled marks a disabled field, as in Astro and React.\n const sync = () => {\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()) {\n // A step button never submits its form, also when the markup leaves out type='button'.\n if (button.type !== 'button') button.type = 'button';\n const disabled = !canStep(input, button.dataset.slot === 'number-field-decrement');\n if (button.disabled !== disabled) button.disabled = disabled;\n }\n };\n root.addEventListener(\n 'click',\n (event) => {\n const button =\n event.target instanceof Element\n ? event.target.closest('[data-slot=\"number-field-decrement\"], [data-slot=\"number-field-increment\"]')\n : null;\n const input = root.querySelector('input');\n if (!button || button.closest('[data-slot=\"number-field\"]') !== root || button.disabled) return;\n if (!input || input.disabled || input.readOnly) return;\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();\n },\n options,\n );\n // Pressing a button keeps the focus on this field's input, so its typed value is not committed by a\n // blur, and a cart that refreshes on change, before the click steps it. Another field still blurs.\n root.addEventListener(\n 'mousedown',\n (event) => {\n if (\n event.target instanceof Element &&\n event.target.closest('[data-slot=\"number-field-decrement\"], [data-slot=\"number-field-increment\"]') &&\n root.querySelector('input') === document.activeElement\n )\n event.preventDefault();\n },\n options,\n );\n // A pointer or focus that reaches the field first also syncs it, for a value a script set without an event.\n for (const type of ['input', 'change', 'pointerover', 'focusin']) root.addEventListener(type, sync, options);\n // A form reset restores the input after the event, also for an input in a form elsewhere.\n document.addEventListener(\n 'reset',\n (event) => {\n if (root.querySelector('input')?.form === event.target)\n setTimeout(() => {\n if (!events.signal.aborted) sync();\n });\n },\n options,\n );\n const observer = new MutationObserver((mutations) => {\n if (mutations.some((mutation) => mutation.type === 'childList' || mutation.target instanceof HTMLInputElement))\n sync();\n });\n observer.observe(root, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['min', 'max', 'step', 'value', 'disabled', 'readonly'],\n });\n sync();\n return {\n destroy() {\n events.abort();\n observer.disconnect();\n for (const button of buttons()) button.disabled = false;\n root.removeAttribute('data-disabled');\n },\n };\n}\n\n// Each entry loads its data-slot package, then starts one root with it and returns a controller\n// with destroy(). theme.js starts the root only if it is still current once the package has\n// loaded. Select, tooltip and hover card keep their closed content connected (eager), so nested\n// components and the lifecycle in theme.js never see it leave the document.\nexport const controls = {\n select: [() => import('@data-slot/select'), initializeSelect],\n 'radio-group': [() => import('@data-slot/radio-group'), initializeRadioGroup],\n switch: [() => import('@data-slot/switch'), initializeSwitch],\n slider: [() => import('@data-slot/slider'), initializeSlider],\n toggle: [() => import('@data-slot/toggle'), ({ createToggle }, root) => createToggle(root)],\n 'toggle-group': [() => import('@data-slot/toggle-group'), ({ createToggleGroup }, root) => createToggleGroup(root)],\n collapsible: [() => import('@data-slot/collapsible'), ({ createCollapsible }, root) => createCollapsible(root)],\n popover: [() => import('@data-slot/popover'), ({ createPopover }, root) => createPopover(root)],\n 'hover-card': [\n () => import('@data-slot/hover-card'),\n ({ createHoverCard }, root) => createHoverCard(root, { mountStrategy: 'eager' }),\n ],\n tooltip: [\n () => import('@data-slot/tooltip'),\n ({ createTooltip }, root) => createTooltip(root, { mountStrategy: 'eager' }),\n ],\n 'dropdown-menu': [\n () => import('@data-slot/dropdown-menu'),\n ({ createDropdownMenu }, root) => createDropdownMenu(root),\n ],\n 'alert-dialog': [() => import('@data-slot/alert-dialog'), initializeAlertDialog],\n drawer: [() => import('@data-slot/drawer'), ({ createDrawer }, root) => createDrawer(root)],\n toast: [() => import('@data-slot/toast'), initializeToaster],\n // data-slot leaves a number field to the native input, so this entry loads no package.\n 'number-field': [async () => ({}), initializeNumberField],\n};\n",
19
19
  "type": "registry:file",
20
20
  "target": "~/assets/ui-controls.js"
21
21
  },
@@ -45,7 +45,7 @@
45
45
  },
46
46
  {
47
47
  "path": "assets/data-slot-command.js",
48
- "content": "import{clearRootBinding as e,emit as t,ensureId as n,ensureItemVisibleInContainer as r,getDataBool as i,getDataString as a,getOwnedElements as o,getPart as s,getRoots as c,hasRootBinding as l,on as u,onRoot as d,reuseRootBinding as ee,setAria as f,setRootBinding as te}from\"@data-slot/core\";const p=.1,m=.999,h=/[\\\\/_+.#\"@\\[\\(\\{&]/,g=/[\\\\/_+.#\"@\\[\\(\\{&]/g,_=/[\\s-]/,v=/[\\s-]/g;function y(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?1:.99;let s=`${i},${a}`,c=o[s];if(c!==void 0)return c;let l=r.charAt(a),u=n.indexOf(l,i),d=0;for(;u>=0;){let s=y(e,t,n,r,u+1,a+1,o);if(s>d){if(u===i)s*=1;else if(h.test(e.charAt(u-1))){s*=.8;let t=e.slice(i,u-1).match(g);t&&i>0&&(s*=m**+t.length)}else if(_.test(e.charAt(u-1))){s*=.9;let t=e.slice(i,u-1).match(v);t&&i>0&&(s*=m**+t.length)}else s*=.17,i>0&&(s*=m**+(u-i));e.charAt(u)!==t.charAt(a)&&(s*=.9999)}if(s<p&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a)){let i=y(e,t,n,r,u+1,a+2,o);i*p>s&&(s=i*p)}s>d&&(d=s),u=n.indexOf(l,u+1)}return o[s]=d,d}function b(e){return e.toLowerCase().replace(v,` `)}function ne(e,t,n=[]){let r=n.length>0?`${e} ${n.join(` `)}`:e;return y(r,t,b(r),b(t),0,0,{})}const x=Symbol(`data-slot.command.authored-value`),S=Symbol(`data-slot.command.inferred-value`),C=e=>e==null?null:e.trim(),re=e=>e?e.split(/[,\\n]/).map(e=>e.trim()).filter(Boolean):[],ie=(e,t)=>Array.from(e.children).filter(e=>e instanceof HTMLElement&&e.getAttribute(`data-slot`)===t),ae=e=>{let t=e=>e.nodeType===Node.TEXT_NODE?e.textContent??``:!(e instanceof HTMLElement)||e.getAttribute(`data-slot`)===`command-shortcut`?``:Array.from(e.childNodes,t).join(``);return t(e).replace(/\\s+/g,` `).trim()},oe=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`data-disabled`)||e.getAttribute(`aria-disabled`)===`true`,se=(e,t)=>{let n=e,r=e.hasAttribute(`data-value`);if(n[x]===void 0&&(n[x]=r),r?n[x]||(n[x]=C(e.getAttribute(`data-value`))!==n[S]):n[x]=!1,n[x])return{authored:!0,value:C(e.getAttribute(`data-value`))};let i=t();return n[S]=i,i===null?e.removeAttribute(`data-value`):e.setAttribute(`data-value`,i),{authored:!1,value:i}},w=`@data-slot/command`,T=`[data-slot=\"command-item\"]`,E=`[data-slot=\"command-group\"]`,ce=`[data-slot=\"command-separator\"]`,le=[`input:not([type=\"hidden\"])`,`textarea`,`select`,`button`,`a[href]`,`summary`,`audio[controls]`,`video[controls]`,`[contenteditable=\"\"]`,`[contenteditable=\"true\"]`,`[contenteditable=\"plaintext-only\"]`,`[tabindex]:not([tabindex=\"-1\"])`].join(`, `),ue=(e,t,n)=>t.trim()?ne(e,t,n??[]):1,de=(e,t)=>{let n=e;for(;n&&n.parentElement&&n.parentElement!==t;)n=n.parentElement;return n?.parentElement===t?n:null},D=e=>Array.from(e.children).filter(e=>e instanceof HTMLElement);function O(c,l={}){let p=ee(c,w,`[@data-slot/command] createCommand() called more than once for the same root. Returning the existing controller. Destroy it before rebinding with new options.`);if(p)return p;let m=c,h=s(c,`command-input`),g=s(c,`command-list`);if(!h||!g)throw Error(`Command requires command-input and command-list slots`);let _=o(c,g,`[data-slot=\"command-empty\"]`)[0]??null,v=l.label??a(m,`label`)??`Command Menu`,y=l.shouldFilter??i(m,`shouldFilter`)??!0,b=l.loop??i(m,`loop`)??!1,ne=l.disablePointerSelection??i(m,`disablePointerSelection`)??!1,x=l.vimBindings??i(m,`vimBindings`)??!0,S=l.filter??ue,O=l.onValueChange,fe=l.onSearchChange,pe=l.onSelect,k=C(l.defaultValue??a(m,`defaultValue`)),A=l.defaultSearch??a(m,`defaultSearch`)??``,j=[],M=[],N=[],P=new Map,F=new Map,I=0,L=[],R=null,z=null,B=!1,V=!1,me=!1,H=[],U=new Map,W=!1,he=n(h,`command-input`),ge=n(g,`command-list`);m.hasAttribute(`tabindex`)||(m.tabIndex=-1,me=!0),h.setAttribute(`role`,`combobox`),h.setAttribute(`aria-autocomplete`,`list`),h.setAttribute(`aria-expanded`,`true`),h.setAttribute(`aria-controls`,ge),h.setAttribute(`autocomplete`,`off`),h.setAttribute(`autocorrect`,`off`),h.spellcheck=!1,g.setAttribute(`role`,`listbox`),g.tabIndex=-1;let _e=document.querySelector(`label[for=\"${CSS.escape(he)}\"]`);if(_e){let e=n(_e,`command-label`),t=h.getAttribute(`aria-labelledby`);h.setAttribute(`aria-labelledby`,t?`${t} ${e}`:e),g.setAttribute(`aria-labelledby`,e)}else !h.hasAttribute(`aria-label`)&&!h.hasAttribute(`aria-labelledby`)&&(h.setAttribute(`aria-label`,v),g.setAttribute(`aria-label`,`Suggestions`));let ve=()=>{document.activeElement!==h&&h.focus({preventScroll:!0})},ye=e=>{if(!(e instanceof HTMLElement)||!m.contains(e))return null;let t=e.closest(le);return t instanceof HTMLElement&&m.contains(t)?t:null},be=e=>{R?.disconnect();try{return e()}finally{He()}},xe=()=>{g.style.setProperty(`--command-list-height`,`${g.scrollHeight.toFixed(1)}px`)},Se=(e,t)=>{let n=e.filter(e=>t.includes(e));for(let e of t){if(n.includes(e))continue;let r=t.indexOf(e),i=!1;for(let a=r-1;a>=0;--a){let r=t[a];if(!r)continue;let o=n.indexOf(r);if(o!==-1){n.splice(o+1,0,e),i=!0;break}}if(!i){for(let a=r+1;a<t.length;a+=1){let r=t[a];if(!r)continue;let o=n.indexOf(r);if(o!==-1){n.splice(o,0,e),i=!0;break}}i||n.push(e)}}return n},Ce=()=>{H=D(g),U=new Map(M.map(e=>[e.el,D(e.el)]))},we=()=>{H=Se(H,D(g)),U=new Map(M.map(e=>[e.el,Se(U.get(e.el)??[],D(e.el))]))},G=(e,t)=>{let n=new Set(t.filter(t=>t.parentElement===e)),r=e.firstElementChild;for(let t of[...n,...D(e).filter(e=>!n.has(e))])t===r?r=r.nextElementSibling:e.insertBefore(t,r)},Te=e=>new Map(e.map((e,t)=>[e,t])),Ee=()=>{for(let e of M)G(e.el,U.get(e.el)??[]);G(g,H)},K=()=>k===null?null:j.find(e=>e.value===k&&!e.el.hidden&&!(e.group?.el.hidden??!1))?.el??null,De=()=>{for(let e of j){let t=e.value===k&&k!==null;e.el.hasAttribute(`data-selected`)!==t&&(f(e.el,`selected`,t),t?e.el.setAttribute(`data-selected`,`true`):e.el.removeAttribute(`data-selected`))}let e=K();e?(h.setAttribute(`aria-activedescendant`,e.id),g.setAttribute(`aria-activedescendant`,e.id)):(h.removeAttribute(`aria-activedescendant`),g.removeAttribute(`aria-activedescendant`))},Oe=()=>{k===null?m.removeAttribute(`data-value`):m.setAttribute(`data-value`,k),A?m.setAttribute(`data-search`,A):m.removeAttribute(`data-search`)},ke=()=>[...g.querySelectorAll(T)].map(e=>P.get(e)??null).filter(e=>e!==null&&!e.el.hidden&&!(e.group?.el.hidden??!1)),q=()=>ke().filter(e=>!e.disabled),Ae=(e,n,r)=>{!r||e===n||(t(m,`command:change`,{value:n}),O?.(n))},je=()=>{let e=K();e&&r(e,g)},J=(e,t={})=>{let n=C(e),r=k,i=t.emit??!0,a=t.ensureVisible??!1;return k=n,De(),Oe(),a&&je(),(document.activeElement===h||document.activeElement===m)&&ve(),Ae(r,k,i),r!==k},Me=()=>{j=[],M=[],P=new Map,F=new Map;for(let e of o(m,g,E)){let t=ie(e,`command-group-heading`)[0]??null,r={el:e,heading:t,value:se(e,()=>C(t?.textContent)??n(e,`command-group`)).value??n(e,`command-group`),forceMount:i(e,`forceMount`)??!1,maxRank:0};if(F.set(e,r),M.push(r),e.setAttribute(`role`,`group`),t){let r=n(t,`command-group-heading`);e.setAttribute(`aria-labelledby`,r)}else e.removeAttribute(`aria-labelledby`)}for(let e of o(m,g,T)){let t=e.closest(E),r=t instanceof HTMLElement&&t.closest(`[data-slot=\"command\"]`)===m?F.get(t)??null:null,a={el:e,value:se(e,()=>C(e.getAttribute(`data-label`))??C(ae(e))).value,keywords:re(e.getAttribute(`data-keywords`)??void 0),disabled:oe(e),forceMount:i(e,`forceMount`)??!1,rank:0,group:r};P.set(e,a),j.push(a),n(e,`command-item`),e.setAttribute(`role`,`option`),f(e,`selected`,!1),f(e,`disabled`,a.disabled||null),e.removeAttribute(`data-selected`)}N=o(m,g,ce);for(let e of N)e.setAttribute(`role`,`separator`)},Ne=()=>{let e=A.length>0,t=y&&e;I=0;for(let e of M)e.maxRank=0;for(let e of j)e.rank=t&&e.value!==null?S(e.value,A,e.keywords):1,e.rank>0&&(I+=1),e.el.hidden=!(e.forceMount||e.group?.forceMount||e.rank>0),e.group&&e.rank>e.group.maxRank&&(e.group.maxRank=e.rank);for(let e of M)e.el.hidden=t&&!e.forceMount&&e.maxRank<=0;for(let t of N)t.hidden=e&&!(i(t,`alwaysRender`)??!1);_&&(_.hidden=I>0)},Pe=()=>{if(!y||!A)return;let e=H.filter(e=>e.parentElement===g),t=Te(e),n=new Map,r=new Map;for(let e of j){if(e.group!==null)continue;let t=de(e.el,g);t&&(n.set(t,Math.max(n.get(t)??0,e.rank)),e.el.hidden||r.set(t,Math.max(r.get(t)??0,e.rank)))}let i=new Set([...n.keys(),...M.map(e=>e.el)]),a=[...Array.from(r,([e,t])=>({el:e,rank:t})),...M.filter(e=>!e.el.hidden).map(e=>({el:e.el,rank:e.maxRank}))].sort((e,n)=>n.rank===e.rank?(t.get(e.el)??2**53-1)-(t.get(n.el)??2**53-1):n.rank-e.rank),o=new Set(a.map(e=>e.el)),s=D(g).filter(e=>i.has(e)&&!o.has(e)),c=[...a.map(e=>e.el),...s],l=0;G(g,e.map(e=>i.has(e)?c[l++]??e:e));for(let e of M){let t=U.get(e.el)?.filter(t=>t.parentElement===e.el)??[],n=Te(t),r=new Set,i=new Map;for(let t of j){if(t.group!==e)continue;let n=de(t.el,e.el);n&&(r.add(n),t.el.hidden||i.set(n,Math.max(i.get(n)??0,t.rank)))}let a=Array.from(i,([e,t])=>({el:e,rank:t})).sort((e,t)=>t.rank===e.rank?(n.get(e.el)??2**53-1)-(n.get(t.el)??2**53-1):t.rank-e.rank),o=new Set(a.map(e=>e.el)),s=D(e.el).filter(e=>r.has(e)&&!o.has(e)),c=[...a.map(e=>e.el),...s],l=0,u=t.map(e=>r.has(e)?c[l++]??e:e);G(e.el,u)}},Fe=()=>{be(()=>{y&&A?(Ne(),Pe(),W=!0):(W&&Ee(),Ne(),W=!1),De(),Oe()}),z||xe()},Y=()=>{if(be(Me),W?we():Ce(),Fe(),!(typeof ResizeObserver>`u`)){z??=new ResizeObserver(xe),z.disconnect();for(let e of[g,...o(m,g,`${T}, ${E}, ${ce}, [data-slot=\"command-empty\"]`)])z.observe(e)}},Ie=(e=!0,t=!1)=>{J(q()[0]?.value??null,{emit:e,ensureVisible:t})},X=(e,n=!0,r=!0)=>{A!==e&&(A=e,h.value=e,Fe(),r&&Ie(n,!0),n&&(t(m,`command:search-change`,{search:A}),fe?.(A)))},Le=e=>{e.value===null||e.disabled||(J(e.value,{emit:!0}),t(m,`command:select`,{value:e.value}),pe?.(e.value))},Re=e=>{let t=P.get(e)??null;return t||(Y(),t=P.get(e)??null,t)},Z=e=>{let t=q()[e];t&&J(t.value,{emit:!0,ensureVisible:!0})},Q=e=>{let t=q();if(t.length===0)return;let n=t.findIndex(e=>e.value===k),r=t[n+e];b&&(r=n+e<0?t[t.length-1]:n+e===t.length?t[0]:t[n+e]),r&&J(r.value,{emit:!0,ensureVisible:!0})},ze=e=>{let t=K()?.closest(E);for(;t;){let n=e>0?t.nextElementSibling:t.previousElementSibling,r=null;for(;n;){if(n instanceof HTMLElement&&n.getAttribute(`data-slot`)===`command-group`&&!n.hidden){r=n;break}n=e>0?n.nextElementSibling:n.previousElementSibling}if(!r)break;let i=[...r.querySelectorAll(T)].map(e=>P.get(e)??null).find(e=>e!==null&&!e.disabled&&!e.el.hidden);if(i){J(i.value,{emit:!0,ensureVisible:!0});return}t=r}Q(e)},Be=e=>{if(e.defaultPrevented)return;let t=ye(e.target);if(t&&t!==h)return;let n=e.key.toLowerCase();if(e.isComposing||e.keyCode===229)return;let r=()=>{e.preventDefault(),e.metaKey?Z(q().length-1):e.altKey?ze(1):Q(1)},i=()=>{e.preventDefault(),e.metaKey?Z(0):e.altKey?ze(-1):Q(-1)};switch(n){case`arrowdown`:r();break;case`arrowup`:i();break;case`home`:e.preventDefault(),Z(0);break;case`end`:e.preventDefault(),Z(q().length-1);break;case`enter`:{let t=K(),n=t?P.get(t):null;if(!n||n.value===null)return;e.preventDefault(),Le(n);break}case`j`:case`n`:x&&e.ctrlKey&&r();break;case`k`:case`p`:x&&e.ctrlKey&&i();break}},Ve=()=>{B||V||(B=!0,queueMicrotask(()=>{if(B=!1,V)return;let e=K();Y();let t=e?P.get(e)??null:null;if(t&&t.value!==null&&!t.disabled&&!t.el.hidden&&!(t.group?.el.hidden??!1)){J(t.value,{emit:!0});return}if(k!==null){let e=q().find(e=>e.value===k)??null;if(e){J(e.value,{emit:!0});return}}J(q()[0]?.value??null,{emit:!0})}))},He=()=>{R&&R.observe(g,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:[`data-slot`,`data-value`,`data-label`,`data-keywords`,`data-disabled`,`disabled`,`aria-disabled`,`data-force-mount`,`data-always-render`]})};typeof MutationObserver<`u`&&(R=new MutationObserver(()=>{Ve()}),He()),h.value=A,Y(),(A||k===null)&&Ie(!1),L.push(u(h,`input`,()=>{X(h.value,!0,!0)})),L.push(u(m,`keydown`,e=>{Be(e)})),L.push(u(g,`pointermove`,e=>{if(ne)return;let t=e.target,n=t instanceof HTMLElement?t.closest(T):null;if(!(n instanceof HTMLElement))return;let r=Re(n);!r||r.disabled||n.hidden||r.group?.el.hidden||J(r.value,{emit:!0})})),L.push(u(g,`click`,e=>{let t=e.target,n=ye(t),r=t instanceof HTMLElement?t.closest(T):null;if(n&&n!==r||!(r instanceof HTMLElement))return;let i=Re(r);!i||i.disabled||i.value===null||r.hidden||i.group?.el.hidden||Le(i)})),L.push(d(m,`command:set`,e=>{let t=e.detail;t&&(t.search!==void 0&&X(String(t.search),!0,t.value===void 0),t.value!==void 0&&J(t.value,{emit:!0,ensureVisible:!0}))}));let $={get value(){return k},get search(){return A},select(e){J(e,{emit:!0,ensureVisible:!0})},setSearch(e){X(e,!0,!0)},destroy(){V=!0,R?.disconnect(),z?.disconnect(),L.forEach(e=>e()),L=[],me&&m.removeAttribute(`tabindex`),e(m,w,$)}};return te(m,w,$),$}function fe(e=document){let t=[];for(let n of c(e,`command`))l(n,w)||t.push(O(n));return t}export{fe as create,O as createCommand};",
48
+ "content": "import{clearRootBinding as e,emit as t,ensureId as n,ensureItemVisibleInContainer as r,getDataBool as i,getDataString as a,getOwnedElements as o,getPart as s,getRoots as c,hasRootBinding as l,on as u,onRoot as d,reuseRootBinding as ee,setAria as f,setRootBinding as te}from\"@data-slot/core\";const p=.1,m=.999,h=/[\\\\/_+.#\"@\\[\\(\\{&]/,g=/[\\\\/_+.#\"@\\[\\(\\{&]/g,_=/[\\s-]/,v=/[\\s-]/g;function y(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?1:.99;let s=`${i},${a}`,c=o[s];if(c!==void 0)return c;let l=r.charAt(a),u=n.indexOf(l,i),d=0;for(;u>=0;){let s=y(e,t,n,r,u+1,a+1,o);if(s>d){if(u===i)s*=1;else if(h.test(e.charAt(u-1))){s*=.8;let t=e.slice(i,u-1).match(g);t&&i>0&&(s*=m**+t.length)}else if(_.test(e.charAt(u-1))){s*=.9;let t=e.slice(i,u-1).match(v);t&&i>0&&(s*=m**+t.length)}else s*=.17,i>0&&(s*=m**+(u-i));e.charAt(u)!==t.charAt(a)&&(s*=.9999)}if(s<p&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a)){let i=y(e,t,n,r,u+1,a+2,o);i*p>s&&(s=i*p)}s>d&&(d=s),u=n.indexOf(l,u+1)}return o[s]=d,d}function b(e){return e.toLowerCase().replace(v,` `)}function ne(e,t,n=[]){let r=n.length>0?`${e} ${n.join(` `)}`:e;return y(r,t,b(r),b(t),0,0,{})}const x=Symbol(`data-slot.command.authored-value`),S=Symbol(`data-slot.command.inferred-value`),C=e=>e==null?null:e.trim(),re=e=>e?e.split(/[,\\n]/).map(e=>e.trim()).filter(Boolean):[],ie=(e,t)=>Array.from(e.children).filter(e=>e instanceof HTMLElement&&e.getAttribute(`data-slot`)===t),ae=e=>{let t=e=>e.nodeType===Node.TEXT_NODE?e.textContent??``:!(e instanceof HTMLElement)||e.getAttribute(`data-slot`)===`command-shortcut`?``:Array.from(e.childNodes,t).join(``);return t(e).replace(/\\s+/g,` `).trim()},oe=e=>e.hasAttribute(`disabled`)||e.hasAttribute(`data-disabled`)||e.getAttribute(`aria-disabled`)===`true`,se=(e,t)=>{let n=e,r=e.hasAttribute(`data-value`);if(n[x]===void 0&&(n[x]=r),r?n[x]||(n[x]=C(e.getAttribute(`data-value`))!==n[S]):n[x]=!1,n[x])return{authored:!0,value:C(e.getAttribute(`data-value`))};let i=t();return n[S]=i,i===null?e.removeAttribute(`data-value`):e.setAttribute(`data-value`,i),{authored:!1,value:i}},w=`@data-slot/command`,T=`[data-slot=\"command-item\"]`,E=`[data-slot=\"command-group\"]`,ce=`[data-slot=\"command-separator\"]`,le=[`input:not([type=\"hidden\"])`,`textarea`,`select`,`button`,`a[href]`,`summary`,`audio[controls]`,`video[controls]`,`[contenteditable=\"\"]`,`[contenteditable=\"true\"]`,`[contenteditable=\"plaintext-only\"]`,`[tabindex]:not([tabindex=\"-1\"])`].join(`, `),ue=(e,t,n)=>t.trim()?ne(e,t,n??[]):1,de=(e,t)=>{let n=e;for(;n&&n.parentElement&&n.parentElement!==t;)n=n.parentElement;return n?.parentElement===t?n:null},D=e=>Array.from(e.children).filter(e=>e instanceof HTMLElement);function O(c,l={}){let p=ee(c,w,`[@data-slot/command] createCommand() called more than once for the same root. Returning the existing controller. Destroy it before rebinding with new options.`);if(p)return p;let m=c,h=s(c,`command-input`),g=s(c,`command-list`);if(!h||!g)throw Error(`Command requires command-input and command-list slots`);let _=o(c,g,`[data-slot=\"command-empty\"]`)[0]??null,v=l.label??a(m,`label`)??`Command Menu`,y=l.shouldFilter??i(m,`shouldFilter`)??!0,b=l.loop??i(m,`loop`)??!1,ne=l.disablePointerSelection??i(m,`disablePointerSelection`)??!1,x=l.vimBindings??i(m,`vimBindings`)??!0,S=l.filter??ue,O=l.onValueChange,fe=l.onSearchChange,pe=l.onSelect,k=C(l.defaultValue??a(m,`defaultValue`)),A=l.defaultSearch??a(m,`defaultSearch`)??``,j=[],M=[],N=[],P=new Map,F=new Map,I=0,L=[],R=null,z=null,B=!1,V=!1,me=!1,H=[],U=new Map,W=!1,he=n(h,`command-input`),ge=n(g,`command-list`);m.hasAttribute(`tabindex`)||(m.tabIndex=-1,me=!0),h.setAttribute(`role`,`combobox`),h.setAttribute(`aria-autocomplete`,`list`),h.setAttribute(`aria-expanded`,`true`),h.setAttribute(`aria-controls`,ge),h.setAttribute(`autocomplete`,`off`),h.setAttribute(`autocorrect`,`off`),h.spellcheck=!1,g.setAttribute(`role`,`listbox`),g.tabIndex=-1;let _e=document.querySelector(`label[for=\"${CSS.escape(he)}\"]`);if(_e){let e=n(_e,`command-label`),t=h.getAttribute(`aria-labelledby`);h.setAttribute(`aria-labelledby`,t?`${t} ${e}`:e),g.setAttribute(`aria-labelledby`,e)}else !h.hasAttribute(`aria-label`)&&!h.hasAttribute(`aria-labelledby`)&&(h.setAttribute(`aria-label`,v),g.setAttribute(`aria-label`,`Suggestions`));let ve=()=>{document.activeElement!==h&&h.focus({preventScroll:!0})},ye=e=>{if(!(e instanceof HTMLElement)||!m.contains(e))return null;let t=e.closest(le);return t instanceof HTMLElement&&m.contains(t)?t:null},be=e=>{R?.disconnect();try{return e()}finally{He()}},xe=()=>{g.style.setProperty(`--command-list-height`,`${g.scrollHeight.toFixed(1)}px`)},Se=(e,t)=>{let n=e.filter(e=>t.includes(e));for(let e of t){if(n.includes(e))continue;let r=t.indexOf(e),i=!1;for(let a=r-1;a>=0;--a){let r=t[a];if(!r)continue;let o=n.indexOf(r);if(o!==-1){n.splice(o+1,0,e),i=!0;break}}if(!i){for(let a=r+1;a<t.length;a+=1){let r=t[a];if(!r)continue;let o=n.indexOf(r);if(o!==-1){n.splice(o,0,e),i=!0;break}}i||n.push(e)}}return n},Ce=()=>{H=D(g),U=new Map(M.map(e=>[e.el,D(e.el)]))},we=()=>{H=Se(H,D(g)),U=new Map(M.map(e=>[e.el,Se(U.get(e.el)??[],D(e.el))]))},G=(e,t)=>{let n=new Set(t.filter(t=>t.parentElement===e)),r=e.firstElementChild;for(let t of[...n,...D(e).filter(e=>!n.has(e))])t===r?r=r.nextElementSibling:e.insertBefore(t,r)},Te=e=>new Map(e.map((e,t)=>[e,t])),Ee=()=>{for(let e of M)G(e.el,U.get(e.el)??[]);G(g,H)},K=()=>k===null?null:j.find(e=>e.value===k&&!e.el.hidden&&!(e.group?.el.hidden??!1))?.el??null,De=()=>{for(let e of j){let t=e.value===k&&k!==null;e.el.hasAttribute(`data-selected`)!==t&&(f(e.el,`selected`,t),t?e.el.setAttribute(`data-selected`,`true`):e.el.removeAttribute(`data-selected`))}let e=K();e?(h.setAttribute(`aria-activedescendant`,e.id),g.setAttribute(`aria-activedescendant`,e.id)):(h.removeAttribute(`aria-activedescendant`),g.removeAttribute(`aria-activedescendant`))},Oe=()=>{k===null?m.removeAttribute(`data-value`):m.setAttribute(`data-value`,k),A?m.setAttribute(`data-search`,A):m.removeAttribute(`data-search`)},ke=()=>[...g.querySelectorAll(T)].map(e=>P.get(e)??null).filter(e=>e!==null&&!e.el.hidden&&!(e.group?.el.hidden??!1)),q=()=>ke().filter(e=>!e.disabled),Ae=(e,n,r)=>{!r||e===n||(t(m,`command:change`,{value:n}),O?.(n))},je=()=>{let e=K();e&&r(e,g)},J=(e,t={})=>{let n=C(e),r=k,i=t.emit??!0,a=t.ensureVisible??!1;return k=n,De(),Oe(),a&&je(),(document.activeElement===h||document.activeElement===m)&&ve(),Ae(r,k,i),r!==k},Me=()=>{j=[],M=[],P=new Map,F=new Map;for(let e of o(m,g,E)){let t=ie(e,`command-group-heading`)[0]??null,r={el:e,heading:t,value:se(e,()=>C(t?.textContent)??n(e,`command-group`)).value??n(e,`command-group`),forceMount:i(e,`forceMount`)??!1,maxRank:0};if(F.set(e,r),M.push(r),e.setAttribute(`role`,`group`),t){let r=n(t,`command-group-heading`);e.setAttribute(`aria-labelledby`,r)}else e.removeAttribute(`aria-labelledby`)}for(let e of o(m,g,T)){let t=e.closest(E),r=t instanceof HTMLElement&&t.closest(`[data-slot=\"command\"]`)===m?F.get(t)??null:null,a={el:e,value:se(e,()=>C(e.getAttribute(`data-label`))??C(ae(e))).value,keywords:re(e.getAttribute(`data-keywords`)??void 0),disabled:oe(e),forceMount:i(e,`forceMount`)??!1,rank:0,group:r};P.set(e,a),j.push(a),n(e,`command-item`),e.setAttribute(`role`,`option`),f(e,`selected`,!1),f(e,`disabled`,a.disabled||null),e.removeAttribute(`data-selected`)}N=o(m,g,ce);for(let e of N)e.setAttribute(`role`,`separator`)},Ne=()=>{let e=A.length>0,t=y&&e;I=0;for(let e of M)e.maxRank=0;for(let e of j)e.rank=t&&e.value!==null?S(e.value,A,e.keywords):1,e.rank>0&&(I+=1),e.el.hidden=!(e.forceMount||e.group?.forceMount||e.rank>0),e.group&&e.rank>e.group.maxRank&&(e.group.maxRank=e.rank);for(let e of M)e.el.hidden=t&&!e.forceMount&&e.maxRank<=0;for(let t of N)t.hidden=e&&!(i(t,`alwaysRender`)??!1);_&&(_.hidden=I>0)},Pe=()=>{if(!y||!A)return;let e=H.filter(e=>e.parentElement===g),t=Te(e),n=new Map,r=new Map;for(let e of j){if(e.group!==null)continue;let t=de(e.el,g);t&&(n.set(t,Math.max(n.get(t)??0,e.rank)),e.el.hidden||r.set(t,Math.max(r.get(t)??0,e.rank)))}let i=new Set([...n.keys(),...M.map(e=>e.el)]),a=[...Array.from(r,([e,t])=>({el:e,rank:t})),...M.filter(e=>!e.el.hidden).map(e=>({el:e.el,rank:e.maxRank}))].sort((e,n)=>n.rank===e.rank?(t.get(e.el)??2**53-1)-(t.get(n.el)??2**53-1):n.rank-e.rank),o=new Set(a.map(e=>e.el)),s=D(g).filter(e=>i.has(e)&&!o.has(e)),c=[...a.map(e=>e.el),...s],l=0;G(g,e.map(e=>i.has(e)?c[l++]??e:e));for(let e of M){let t=U.get(e.el)?.filter(t=>t.parentElement===e.el)??[],n=Te(t),r=new Set,i=new Map;for(let t of j){if(t.group!==e)continue;let n=de(t.el,e.el);n&&(r.add(n),t.el.hidden||i.set(n,Math.max(i.get(n)??0,t.rank)))}let a=Array.from(i,([e,t])=>({el:e,rank:t})).sort((e,t)=>t.rank===e.rank?(n.get(e.el)??2**53-1)-(n.get(t.el)??2**53-1):t.rank-e.rank),o=new Set(a.map(e=>e.el)),s=D(e.el).filter(e=>r.has(e)&&!o.has(e)),c=[...a.map(e=>e.el),...s],l=0,u=t.map(e=>r.has(e)?c[l++]??e:e);G(e.el,u)}},Fe=()=>{be(()=>{y&&A?(Ne(),Pe(),W=!0):(W&&Ee(),Ne(),W=!1),De(),Oe()}),typeof ResizeObserver>`u`&&xe()},Y=()=>{if(be(Me),W?we():Ce(),Fe(),!(typeof ResizeObserver>`u`)){z??=new ResizeObserver(xe),z.disconnect();for(let e of[g,...o(m,g,`${T}, ${E}, ${ce}, [data-slot=\"command-empty\"]`)])z.observe(e)}},Ie=(e=!0,t=!1)=>{J(q()[0]?.value??null,{emit:e,ensureVisible:t})},X=(e,n=!0,r=!0)=>{A!==e&&(A=e,h.value=e,Fe(),r&&Ie(n,!0),n&&(t(m,`command:search-change`,{search:A}),fe?.(A)))},Le=e=>{e.value===null||e.disabled||(J(e.value,{emit:!0}),t(m,`command:select`,{value:e.value}),pe?.(e.value))},Re=e=>{let t=P.get(e)??null;return t||(Y(),t=P.get(e)??null,t)},Z=e=>{let t=q()[e];t&&J(t.value,{emit:!0,ensureVisible:!0})},Q=e=>{let t=q();if(t.length===0)return;let n=t.findIndex(e=>e.value===k),r=t[n+e];b&&(r=n+e<0?t[t.length-1]:n+e===t.length?t[0]:t[n+e]),r&&J(r.value,{emit:!0,ensureVisible:!0})},ze=e=>{let t=K()?.closest(E);for(;t;){let n=e>0?t.nextElementSibling:t.previousElementSibling,r=null;for(;n;){if(n instanceof HTMLElement&&n.getAttribute(`data-slot`)===`command-group`&&!n.hidden){r=n;break}n=e>0?n.nextElementSibling:n.previousElementSibling}if(!r)break;let i=[...r.querySelectorAll(T)].map(e=>P.get(e)??null).find(e=>e!==null&&!e.disabled&&!e.el.hidden);if(i){J(i.value,{emit:!0,ensureVisible:!0});return}t=r}Q(e)},Be=e=>{if(e.defaultPrevented)return;let t=ye(e.target);if(t&&t!==h)return;let n=e.key.toLowerCase();if(e.isComposing||e.keyCode===229)return;let r=()=>{e.preventDefault(),e.metaKey?Z(q().length-1):e.altKey?ze(1):Q(1)},i=()=>{e.preventDefault(),e.metaKey?Z(0):e.altKey?ze(-1):Q(-1)};switch(n){case`arrowdown`:r();break;case`arrowup`:i();break;case`home`:e.preventDefault(),Z(0);break;case`end`:e.preventDefault(),Z(q().length-1);break;case`enter`:{let t=K(),n=t?P.get(t):null;if(!n||n.value===null)return;e.preventDefault(),Le(n);break}case`j`:case`n`:x&&e.ctrlKey&&r();break;case`k`:case`p`:x&&e.ctrlKey&&i();break}},Ve=()=>{B||V||(B=!0,queueMicrotask(()=>{if(B=!1,V)return;let e=K();Y();let t=e?P.get(e)??null:null;if(t&&t.value!==null&&!t.disabled&&!t.el.hidden&&!(t.group?.el.hidden??!1)){J(t.value,{emit:!0});return}if(k!==null){let e=q().find(e=>e.value===k)??null;if(e){J(e.value,{emit:!0});return}}J(q()[0]?.value??null,{emit:!0})}))},He=()=>{R&&R.observe(g,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:[`data-slot`,`data-value`,`data-label`,`data-keywords`,`data-disabled`,`disabled`,`aria-disabled`,`data-force-mount`,`data-always-render`]})};typeof MutationObserver<`u`&&(R=new MutationObserver(()=>{Ve()}),He()),h.value=A,Y(),(A||k===null)&&Ie(!1),L.push(u(h,`input`,()=>{X(h.value,!0,!0)})),L.push(u(m,`keydown`,e=>{Be(e)})),L.push(u(g,`pointermove`,e=>{if(ne)return;let t=e.target,n=t instanceof HTMLElement?t.closest(T):null;if(!(n instanceof HTMLElement))return;let r=Re(n);!r||r.disabled||n.hidden||r.group?.el.hidden||J(r.value,{emit:!0})})),L.push(u(g,`click`,e=>{let t=e.target,n=ye(t),r=t instanceof HTMLElement?t.closest(T):null;if(n&&n!==r||!(r instanceof HTMLElement))return;let i=Re(r);!i||i.disabled||i.value===null||r.hidden||i.group?.el.hidden||Le(i)})),L.push(d(m,`command:set`,e=>{let t=e.detail;t&&(t.search!==void 0&&X(String(t.search),!0,t.value===void 0),t.value!==void 0&&J(t.value,{emit:!0,ensureVisible:!0}))}));let $={get value(){return k},get search(){return A},select(e){J(e,{emit:!0,ensureVisible:!0})},setSearch(e){X(e,!0,!0)},destroy(){V=!0,R?.disconnect(),z?.disconnect(),L.forEach(e=>e()),L=[],me&&m.removeAttribute(`tabindex`),e(m,w,$)}};return te(m,w,$),$}function fe(e=document){let t=[];for(let n of c(e,`command`))l(n,w)||t.push(O(n));return t}export{fe as create,O as createCommand};",
49
49
  "type": "registry:file",
50
50
  "target": "~/assets/data-slot-command.js"
51
51
  },
@@ -141,7 +141,7 @@
141
141
  },
142
142
  {
143
143
  "path": "assets/data-slot-toast.js",
144
- "content": "import{clearRootBinding as e,createPortalLifecycle as t,createPresenceLifecycle as n,createSwipeGesture as r,createTerminalLifecycle as i,emit as a,focusElement as o,getDataBool as s,getDataEnum as c,getDataNumber as l,getFocusable as u,getPart as d,getRoots as f,hasRootBinding as p,isFocusable as m,on as h,reuseRootBinding as g,setRootBinding as _}from\"@data-slot/core\";const v=[`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`],y=[`default`,`success`,`error`,`warning`,`info`,`loading`],b=e=>!!e&&typeof e==`object`,x=e=>typeof e==`string`,S=e=>typeof e==`string`&&e.trim()!==``,C=e=>typeof e==`boolean`,w=e=>typeof e==`number`&&Number.isFinite(e),T=e=>typeof e==`string`&&y.includes(e),E={title:S,description:x,type:T,duration:w,action:e=>b(e)&&S(e.label)&&(e.onClick===void 0||typeof e.onClick==`function`)&&(e.value===void 0||x(e.value)),dismissible:C,closeButtonAriaLabel:x,testId:x},ee=Object.keys(E),te=new Set([`description`,`action`,`closeButtonAriaLabel`,`testId`]),ne=e=>w(e)?Math.max(1,Math.trunc(e)):3,re=(e,t)=>w(e)?e<=0?0:Math.max(1,Math.trunc(e)):t,ie=(e,t)=>({id:e,title:``,type:`default`,duration:t,dismissible:!0}),D=(e,t)=>t===void 0?e:t??void 0,ae=(e,t)=>{let n=t.title??e.title;if(!S(n))throw Error(`Toast requires a non-empty title`);return{id:e.id,title:n,description:D(e.description,t.description),type:T(t.type)?t.type:e.type,duration:t.duration===void 0?e.duration:re(t.duration,e.duration),action:D(e.action,t.action),dismissible:t.dismissible??e.dismissible,closeButtonAriaLabel:D(e.closeButtonAriaLabel,t.closeButtonAriaLabel),testId:D(e.testId,t.testId)}},O=e=>{let t={};for(let n of ee){let r=e[n];(E[n](r)||r===null&&te.has(n))&&Object.assign(t,{[n]:r})}return t},oe=e=>{if(!b(e))return null;let t=O(e);return t.title?{id:S(e.id)?e.id:void 0,patch:t}:null},se=e=>{if(!b(e)||!S(e.id))return null;let t=O(e);return Object.keys(t).length>0?{id:e.id,patch:t}:null},ce=e=>S(e)?e:b(e)&&S(e.id)?e.id:null,le=e=>typeof e==`string`?{title:e}:e??{},ue=(e,t)=>le(typeof e==`function`?e(t):e),k=(e,t)=>{let{message:n,...r}=e;return{...r,title:S(e.title)?e.title:S(n)?n:t.title,description:e.description===void 0?t.description:e.description,type:e.type??t.type,duration:e.duration??t.duration}},de=e=>S(e)?e:e instanceof Error&&S(e.message)?e.message:`Error`,A=e=>e instanceof HTMLTemplateElement,j=e=>!!e.content.querySelector(`[data-slot=\"toast-item\"]`),M=e=>{let t=e.createElement(`template`);return t.innerHTML=`\n <li data-slot=\"toast-item\" role=\"status\" aria-atomic=\"true\">\n <span data-slot=\"toast-title\"></span>\n <span data-slot=\"toast-description\"></span>\n <button data-slot=\"toast-action\" type=\"button\"></button>\n <button data-slot=\"toast-close\" type=\"button\" aria-label=\"Close\">&times;</button>\n </li>\n `,t},N=(e,t)=>{e.setAttribute(`data-state`,t),t===`open`?(e.setAttribute(`data-open`,``),e.removeAttribute(`data-closed`)):(e.setAttribute(`data-closed`,``),e.removeAttribute(`data-open`))},P=(e,t)=>{t===`error`||t===`warning`?(e.setAttribute(`role`,`alert`),e.setAttribute(`aria-live`,`assertive`)):(e.setAttribute(`role`,`status`),e.setAttribute(`aria-live`,`polite`)),e.setAttribute(`aria-atomic`,`true`)};function fe(e,t){let{viewport:r}=t,a=(A(t.template)&&j(t.template)?t.template:M(r.ownerDocument)).content.cloneNode(!0),o=a.querySelector(`[data-slot=\"toast-item\"]`),s=new WeakMap,c=i(),l=e,u=!1,d=t.paused,f=null,p=l.duration,m=0,h=(e,t)=>{let n=e.querySelector(`[data-slot=\"toast-title\"]`),r=e.querySelector(`[data-slot=\"toast-description\"]`),i=e.querySelector(`[data-slot=\"toast-action\"]`),a=e.querySelector(`[data-slot=\"toast-close\"]`);if(n&&(n.textContent=t.title,n.hidden=!1),r&&(t.description&&t.description.trim()!==``?(r.textContent=t.description,r.hidden=!1):(r.textContent=``,r.hidden=!0)),i&&(t.action?.label&&t.action.label.trim()!==``?(i.textContent=t.action.label,i.hidden=!1):(i.textContent=``,i.hidden=!0)),e.setAttribute(`data-type`,t.type),t.dismissible?e.removeAttribute(`data-dismissible`):e.setAttribute(`data-dismissible`,`false`),t.testId&&t.testId.trim()!==``?e.setAttribute(`data-testid`,t.testId):e.removeAttribute(`data-testid`),a){if(s.has(a)||s.set(a,a.getAttribute(`aria-label`)),t.closeButtonAriaLabel&&t.closeButtonAriaLabel.trim()!==``)a.setAttribute(`aria-label`,t.closeButtonAriaLabel);else{let e=s.get(a);e&&e.trim()!==``?a.setAttribute(`aria-label`,e):a.setAttribute(`aria-label`,`Close`)}a.getAttribute(`aria-label`)||a.setAttribute(`aria-label`,`Close`)}P(e,t.type)},g=()=>{c.cancelTimeout(f),f=null},_=()=>{if(!(!y.active||d||l.duration<=0||f!==null)){if(p<=0){t.onTimeout(y);return}m=Date.now(),f=c.trackTimeout(()=>{f=null,t.onTimeout(y)},p)}},v=n({element:o,win:r.ownerDocument.defaultView??window,onExitComplete:()=>{c.isDestroyed||t.onExitComplete(y)}});c.onDestroy(()=>{v.cleanup(),o.remove()});let y={get id(){return l.id},element:o,get toast(){return l},get active(){return!u&&!c.isDestroyed},get exiting(){return u},mount(){r.appendChild(a),c.trackRaf(()=>{c.trackRaf(()=>{y.active&&o.setAttribute(`data-mounted`,`true`)})}),_()},update(e){y.active&&(l=ae(l,e),h(o,l),e.duration!==void 0&&(g(),p=l.duration,_()))},setPaused(e){d===e||!y.active||(d=e,d?(f!==null&&(p=Math.max(0,p-(Date.now()-m))),g()):_())},dismiss(){y.active&&(u=!0,g(),o.setAttribute(`data-removed`,`true`),o.style.zIndex=`0`,o.style.pointerEvents=`none`,N(o,`closed`),v.exit())},destroy(){c.destroy()}};o.setAttribute(`data-id`,l.id),h(o,l);for(let e of[`mounted`,`removed`,`front`,`visible`,`swiping`,`swipe-out`])o.setAttribute(`data-${e}`,`false`);o.setAttribute(`data-expanded`,String(t.expanded));for(let e of[`amount-x`,`amount-y`,`end-x`,`end-y`])o.style.setProperty(`--toast-swipe-${e}`,`0px`);return N(o,`open`),y}const F=`data-toast-prev-tabindex`,I=`__none__`,pe=e=>{let t=getComputedStyle(e).getPropertyValue(`--toast-gap`).trim();if(!t)return 8;let n=Number.parseFloat(t);return Number.isFinite(n)?n:8},L=e=>{let t=getComputedStyle(e).getPropertyValue(`--toast-collapsed-peek`).trim();if(!t)return 14;let n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):14},R=e=>{let t=e.cloneNode(!0);t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`inert`,``),t.style.width=getComputedStyle(e).width,t.style.height=`auto`,t.style.maxHeight=`none`,t.style.position=`absolute`,t.style.inset=`0 auto auto 0`,t.style.visibility=`hidden`,t.style.pointerEvents=`none`,t.style.transform=`none`,t.style.transition=`none`,t.style.animation=`none`,e.parentElement.append(t);try{return t.offsetHeight||t.getBoundingClientRect().height||e.offsetHeight||e.getBoundingClientRect().height}finally{t.remove()}},me=e=>{let t=u(e);return m(e)&&t.unshift(e),t.filter(e=>e.getAttribute(`aria-hidden`)!==`true`)},z=e=>{let t=[...e.querySelectorAll(`[${F}]`)];return e.hasAttribute(F)&&t.unshift(e),t},B=(e,t)=>{if(t){e.removeAttribute(`aria-hidden`),e.removeAttribute(`inert`);for(let t of z(e)){let e=t.getAttribute(F);t.removeAttribute(F),!e||e===I?t.removeAttribute(`tabindex`):t.setAttribute(`tabindex`,e)}return}for(let t of me(e)){if(!t.hasAttribute(F)){let e=t.getAttribute(`tabindex`);t.setAttribute(F,e===null?I:e)}t.setAttribute(`tabindex`,`-1`)}e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`inert`,``)};function he({viewport:e,limit:t,stackDirection:n,getItems:r,onLayout:i}){let a=e.ownerDocument,o=new Set,s=new WeakMap,c=!1;e.style.setProperty(`--toast-lift`,String(n));let l=t=>{t?e.setAttribute(`data-expanded`,``):e.removeAttribute(`data-expanded`);let n=t?e.style.getPropertyValue(`--toast-expanded-stack-size`):e.style.getPropertyValue(`--toast-collapsed-stack-size`);e.style.setProperty(`--toast-stack-size`,n.trim()===``?`0px`:n);for(let e of o)e.setAttribute(`data-expanded`,String(t))},u=()=>{if(c)return;let n=r(),o=pe(e),l=L(e),u=n.length,d=0,f=0,p=0,m=0;for(let e=0;e<n.length;e+=1){let r=n[e];if(!r)continue;let i=e<t,c=r.getAttribute(`data-visible`)!==`false`,h=R(r)||(s.get(r)??0);h>0&&s.set(r,h),e===0&&(m=h);let g=e*l;if(r.style.setProperty(`--toast-index`,String(e)),r.style.setProperty(`--toast-initial-height`,`${h}px`),r.style.setProperty(`--toast-offset`,`${d}px`),r.style.setProperty(`--toast-collapsed-offset-y`,`${g}px`),r.setAttribute(`data-front`,String(e===0)),r.setAttribute(`data-visible`,String(i)),r.setAttribute(`data-removed`,`false`),r.style.zIndex=String(u-e+1),r.style.pointerEvents=i?``:`none`,!i&&c){let e=a.activeElement;e instanceof HTMLElement&&r.contains(e)&&e.blur()}B(r,i),d+=h+o,i&&(p+=1,f+=h+o)}let h=p>0?Math.max(0,f-o):0,g=p>0?Math.max(0,m+l*(p-1)):0;e.style.setProperty(`--toast-count`,String(u)),e.style.setProperty(`--toast-front-height`,`${m}px`),e.style.setProperty(`--toast-expanded-stack-size`,`${h}px`),e.style.setProperty(`--toast-collapsed-stack-size`,`${g}px`),i()},d=typeof ResizeObserver<`u`?new ResizeObserver(u):null;return{update:u,setExpanded:l,observe(e){o.add(e),d?.observe(e)},unobserve(e){o.delete(e),d?.unobserve(e)},destroy(){c=!0,d?.disconnect(),o.clear(),e.removeAttribute(`data-expanded`)}}}const V=e=>{e.element.setAttribute(`data-swiping`,`false`),e.element.setAttribute(`data-swipe-out`,`false`);for(let t of[`amount-x`,`amount-y`,`end-x`,`end-y`])e.element.style.removeProperty(`--toast-swipe-${t}`)};function ge({viewport:e,position:t,getEntry:n,dismiss:i}){let a={x:t.endsWith(`left`)?-1:t.endsWith(`right`)?1:0,y:t.startsWith(`top`)?-1:1},o=a.x===0?[`y`]:[`x`,`y`],s=(e,t)=>e*t<0?e*.2:e,c=e=>e.active&&e.toast.dismissible;return r({element:e,axes:o,lockThreshold:12,capture:e=>e.element,start(e,t){if(t.closest(`[data-slot=\"toast-action\"], [data-slot=\"toast-close\"]`))return null;let r=n(t);return r&&c(r)?r:null},active:c,move(e,{axis:t,deltaX:n,deltaY:r}){let i=t===`x`?s(n,a.x):0,o=t===`y`?s(r,a.y):0;e.element.setAttribute(`data-swiping`,`true`),e.element.style.setProperty(`--toast-swipe-amount-x`,`${i}px`),e.element.style.setProperty(`--toast-swipe-amount-y`,`${o}px`)},release(e,{axis:t,deltaX:n,deltaY:r}){let o=t===`x`?n:r;if(o*a[t]<40){V(e);return}let s=t===`x`?e.element.offsetWidth:e.element.offsetHeight,c=a[t]*Math.max(Math.abs(o),s+16);e.element.setAttribute(`data-swiping`,`false`),e.element.setAttribute(`data-swipe-out`,`true`),e.element.style.setProperty(`--toast-swipe-end-x`,`${t===`x`?c:0}px`),e.element.style.setProperty(`--toast-swipe-end-y`,`${t===`y`?c:0}px`),i(e)},reset:V})}const H=new Set([`hover`,`focus`]);function _e({hasExitingEntries:e,setExpanded:t,setPaused:n}){let r=new Set,i=!1,a=!1,o=()=>[...r].some(e=>H.has(e)),s=()=>{i&&(o()||!e())&&(i=!1),t(o()||i);let s=r.size>0;s!==a&&(a=s,n(a))};return{get expanded(){return o()||i},get paused(){return a},set(t,n){n?r.add(t):r.delete(t)&&H.has(t)&&!o()&&e()&&(i=!0),s()},sync:s}}const U=`@data-slot/toast`;function W(n,r={}){let u=g(n,U,`[@data-slot/toast] createToast() called more than once for the same root. Returning the existing controller. Destroy it before rebinding with new options.`);if(u)return u;let f=d(n,`toast-viewport`);if(!f)throw Error(`Toast requires a toast-viewport slot`);let p=n.ownerDocument??document,m=d(n,`toast-template`),y=ne(r.limit??l(n,`limit`)),b=re(r.duration??l(n,`duration`),5e3),x=r.position??c(n,`position`,v)??`bottom-right`,C=r.pauseOnHover??s(n,`pauseOnHover`)??!0,w=r.pauseOnFocus??s(n,`pauseOnFocus`)??!0,T=r.portal??s(n,`portal`)??!1,E=r.onShow,ee=r.onDismiss,te=r.onAction,D=x.startsWith(`top`)?1:-1;n.setAttribute(`data-position`,x),f.setAttribute(`data-position`,x),f.hasAttribute(`role`)||f.setAttribute(`role`,`region`),f.hasAttribute(`aria-label`)||f.setAttribute(`aria-label`,`Notifications`);let O=t({content:f,root:n,enabled:T});T&&O.mount();let A=new Map,j=i(),M=[],N=0,P=null,F=()=>[...A.values()].filter(e=>e.active),I=e=>A.get(e.id)===e,pe=()=>[...A.values()].some(e=>e.exiting),L=he({viewport:f,limit:y,stackDirection:D,getItems:()=>F().reverse().map(e=>e.element),onLayout:()=>R.set(`focus`,w&&B())}),R=_e({hasExitingEntries:pe,setExpanded:e=>L.setExpanded(e),setPaused:e=>{for(let t of F())t.setPaused(e)}});p.visibilityState===`hidden`&&R.set(`document`,!0);let z=e=>{if(!(e instanceof Node)||!f.contains(e))return!1;if(!(e instanceof Element))return!0;let t=e.closest(`[data-slot=\"toast-item\"]`);return!t||!f.contains(t)?!0:t.getAttribute(`data-visible`)===`true`&&t.getAttribute(`data-state`)===`open`},B=()=>z(p.activeElement),V=()=>{for(let e of F().reverse()){if(e.element.getAttribute(`data-visible`)!==`true`)continue;let t=me(e.element)[0];if(t)return o(t),!0}return!1},H=()=>P&&P.isConnected?(o(P),!0):!1,W=e=>{let t=p.activeElement;!(t instanceof HTMLElement)||!f.contains(t)||e&&!e.contains(t)||V()||H()||t.blur()},G=e=>{a(n,`toast:change`,{id:e,action:`dismiss`}),ee?.(e)},K=e=>{I(e)&&(Q.cancel(e),L.unobserve(e.element),e.destroy(),A.delete(e.id),L.update())},q=(e,t=!0)=>{!I(e)||!e.active||(Q.cancel(e),e.dismiss(),L.update(),t&&W(e.element),G(e.id))},ve=e=>{let t=A.get(e);t&&q(t)},J=()=>{let e=``;do N+=1,e=`toast-${N}`;while(A.has(e));return e},Y=(e,t)=>{let r=S(e)?e:J(),i=ae(ie(r,b),t),o=A.get(r),s=o?.active;o&&K(o),s&&G(r);let c=fe(i,{viewport:f,template:m,expanded:R.expanded,paused:R.paused,onTimeout:q,onExitComplete:K});if(j.isDestroyed)return c.destroy(),c;let l=A.get(r);return l&&K(l),A.set(r,c),c.mount(),L.observe(c.element),L.update(),I(c)&&c.active&&(a(n,`toast:change`,{id:r,action:`show`}),E?.(r)),c},ye=e=>j.isDestroyed?e.id??J():Y(e.id,e).id,X=(e,t)=>{!I(e)||!e.active||(e.update(t),e.toast.dismissible||Q.cancel(e),L.update())},be=(e,t)=>{let n=A.get(e);n&&X(n,t)},xe=(e,t)=>{let n=k(le(t.loading),{title:`Loading...`,type:`loading`,duration:0,description:t.description}),r=j.isDestroyed?void 0:Y(void 0,n),i=r?.id??J(),a=Promise.resolve().then(()=>typeof e==`function`?e():e).then(e=>{let n=k(ue(t.success,e),{title:`Success`,type:`success`,duration:b,description:t.description});return r&&X(r,n),e}).catch(e=>{let n=k(ue(t.error,e),{title:de(e),type:`error`,duration:b,description:t.description});throw r&&X(r,n),e});return a.catch(()=>{}),{id:i,unwrap:()=>a}},Se=()=>{let e=p.activeElement instanceof HTMLElement&&f.contains(p.activeElement);for(let e of F())q(e,!1);e&&W()},Ce=()=>{let e=!1;return{get defaultPrevented(){return e},preventDefault:()=>{e=!0}}},we=e=>{let t=A.get(e);if(!t||t.exiting)return;let r=t.toast.action?.value,i=Ce();t.toast.action?.onClick?.(i),a(n,`toast:action`,{id:e,value:r}),te?.(e,r),i.defaultPrevented||q(t)},Z=e=>{if(!(e instanceof Element))return;let t=e.closest(`[data-slot=\"toast-item\"]`);if(!t||!f.contains(t))return;let n=A.get(t.getAttribute(`data-id`)??``);return n?.element===t?n:void 0},Q=ge({viewport:f,position:x,getEntry:Z,dismiss:e=>q(e)});M.push(h(f,`click`,e=>{let t=e.target;if(!t)return;let n=t.closest(`[data-slot=\"toast-close\"]`);if(n){let e=Z(n);e&&q(e);return}let r=t.closest(`[data-slot=\"toast-action\"]`);if(r){let e=Z(r);e&&we(e.id)}}));let Te=e=>z(e)||B();M.push(h(f,`pointerenter`,()=>{C&&R.set(`hover`,!0)}),h(f,`pointerleave`,()=>{C&&R.set(`hover`,!1)}),h(f,`focusin`,e=>{if(!w)return;let{relatedTarget:t,target:n}=e;t instanceof HTMLElement&&!f.contains(t)&&(P=t),R.set(`focus`,Te(n))}),h(f,`focusout`,e=>{w&&R.set(`focus`,Te(e.relatedTarget))}));let Ee=p.defaultView??window;M.push(h(Ee,`blur`,()=>R.set(`window`,!0)),h(Ee,`focus`,()=>R.set(`window`,!1)),h(p,`visibilitychange`,()=>R.set(`document`,p.visibilityState===`hidden`))),M.push(h(n,`toast:show`,e=>{let t=oe(e.detail);!t||j.isDestroyed||Y(t.id,t.patch)}),h(n,`toast:update`,e=>{let t=se(e.detail);t&&be(t.id,t.patch)}),h(n,`toast:dismiss`,e=>{let t=ce(e.detail);t&&ve(t)}),h(n,`toast:clear`,()=>{Se()})),j.onDestroy(()=>{M.forEach(e=>e()),Q.destroy(),L.destroy();for(let e of A.values())e.destroy();A.clear(),P=null,O.cleanup(),e(n,U,$)}),L.update();let $={show:ye,update:be,promise:xe,dismiss:ve,dismissAll:Se,get count(){return F().length},destroy:()=>{j.destroy()}};return _(n,U,$),$}function G(e=document){let t=[];for(let n of f(e,`toast`))p(n,U)||t.push(W(n));return t}export{G as create,W as createToast};",
144
+ "content": "import{clearRootBinding as e,createPortalLifecycle as t,createPresenceLifecycle as n,createSwipeGesture as r,createTerminalLifecycle as i,emit as a,focusElement as o,getDataBool as s,getDataEnum as c,getDataNumber as l,getFocusable as u,getPart as d,getRoots as f,hasRootBinding as p,isFocusable as m,on as h,reuseRootBinding as g,setRootBinding as _}from\"@data-slot/core\";const v=[`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`],y=[`default`,`success`,`error`,`warning`,`info`,`loading`],b=e=>!!e&&typeof e==`object`,x=e=>typeof e==`string`,S=e=>typeof e==`string`&&e.trim()!==``,C=e=>typeof e==`boolean`,w=e=>typeof e==`number`&&Number.isFinite(e),T=e=>typeof e==`string`&&y.includes(e),E={title:S,description:x,type:T,duration:w,action:e=>b(e)&&S(e.label)&&(e.onClick===void 0||typeof e.onClick==`function`)&&(e.value===void 0||x(e.value)),dismissible:C,closeButtonAriaLabel:x,testId:x},ee=Object.keys(E),te=new Set([`description`,`action`,`closeButtonAriaLabel`,`testId`]),ne=e=>w(e)?Math.max(1,Math.trunc(e)):3,re=(e,t)=>w(e)?e<=0?0:Math.max(1,Math.trunc(e)):t,ie=(e,t)=>({id:e,title:``,type:`default`,duration:t,dismissible:!0}),D=(e,t)=>t===void 0?e:t??void 0,ae=(e,t)=>{let n=t.title??e.title;if(!S(n))throw Error(`Toast requires a non-empty title`);return{id:e.id,title:n,description:D(e.description,t.description),type:T(t.type)?t.type:e.type,duration:t.duration===void 0?e.duration:re(t.duration,e.duration),action:D(e.action,t.action),dismissible:t.dismissible??e.dismissible,closeButtonAriaLabel:D(e.closeButtonAriaLabel,t.closeButtonAriaLabel),testId:D(e.testId,t.testId)}},O=e=>{let t={};for(let n of ee){let r=e[n];(E[n](r)||r===null&&te.has(n))&&Object.assign(t,{[n]:r})}return t},oe=e=>{if(!b(e))return null;let t=O(e);return t.title?{id:S(e.id)?e.id:void 0,patch:t}:null},se=e=>{if(!b(e)||!S(e.id))return null;let t=O(e);return Object.keys(t).length>0?{id:e.id,patch:t}:null},ce=e=>S(e)?e:b(e)&&S(e.id)?e.id:null,le=e=>typeof e==`string`?{title:e}:e??{},ue=(e,t)=>le(typeof e==`function`?e(t):e),k=(e,t)=>{let{message:n,...r}=e;return{...r,title:S(e.title)?e.title:S(n)?n:t.title,description:e.description===void 0?t.description:e.description,type:e.type??t.type,duration:e.duration??t.duration}},de=e=>S(e)?e:e instanceof Error&&S(e.message)?e.message:`Error`,A=e=>e instanceof HTMLTemplateElement,j=e=>!!e.content.querySelector(`[data-slot=\"toast-item\"]`),M=e=>{let t=e.createElement(`template`);return t.innerHTML=`\n <li data-slot=\"toast-item\" role=\"status\" aria-atomic=\"true\">\n <span data-slot=\"toast-title\"></span>\n <span data-slot=\"toast-description\"></span>\n <button data-slot=\"toast-action\" type=\"button\"></button>\n <button data-slot=\"toast-close\" type=\"button\" aria-label=\"Close\">&times;</button>\n </li>\n `,t},N=(e,t)=>{e.setAttribute(`data-state`,t),t===`open`?(e.setAttribute(`data-open`,``),e.removeAttribute(`data-closed`)):(e.setAttribute(`data-closed`,``),e.removeAttribute(`data-open`))},P=(e,t)=>{t===`error`||t===`warning`?(e.setAttribute(`role`,`alert`),e.setAttribute(`aria-live`,`assertive`)):(e.setAttribute(`role`,`status`),e.setAttribute(`aria-live`,`polite`)),e.setAttribute(`aria-atomic`,`true`)};function fe(e,t){let{viewport:r}=t,a=(A(t.template)&&j(t.template)?t.template:M(r.ownerDocument)).content.cloneNode(!0),o=a.querySelector(`[data-slot=\"toast-item\"]`),s=new WeakMap,c=i(),l=e,u=!1,d=t.paused,f=null,p=l.duration,m=0,h=(e,t)=>{let n=e.querySelector(`[data-slot=\"toast-title\"]`),r=e.querySelector(`[data-slot=\"toast-description\"]`),i=e.querySelector(`[data-slot=\"toast-action\"]`),a=e.querySelector(`[data-slot=\"toast-close\"]`);if(n&&(n.textContent=t.title,n.hidden=!1),r&&(t.description&&t.description.trim()!==``?(r.textContent=t.description,r.hidden=!1):(r.textContent=``,r.hidden=!0)),i&&(t.action?.label&&t.action.label.trim()!==``?(i.textContent=t.action.label,i.hidden=!1):(i.textContent=``,i.hidden=!0)),e.setAttribute(`data-type`,t.type),t.dismissible?e.removeAttribute(`data-dismissible`):e.setAttribute(`data-dismissible`,`false`),t.testId&&t.testId.trim()!==``?e.setAttribute(`data-testid`,t.testId):e.removeAttribute(`data-testid`),a){if(s.has(a)||s.set(a,a.getAttribute(`aria-label`)),t.closeButtonAriaLabel&&t.closeButtonAriaLabel.trim()!==``)a.setAttribute(`aria-label`,t.closeButtonAriaLabel);else{let e=s.get(a);e&&e.trim()!==``?a.setAttribute(`aria-label`,e):a.setAttribute(`aria-label`,`Close`)}a.getAttribute(`aria-label`)||a.setAttribute(`aria-label`,`Close`)}P(e,t.type)},g=()=>{c.cancelTimeout(f),f=null},_=()=>{if(!(!y.active||d||l.duration<=0||f!==null)){if(p<=0){t.onTimeout(y);return}m=Date.now(),f=c.trackTimeout(()=>{f=null,t.onTimeout(y)},p)}},v=n({element:o,win:r.ownerDocument.defaultView??window,onExitComplete:()=>{c.isDestroyed||t.onExitComplete(y)}});c.onDestroy(()=>{v.cleanup(),o.remove()});let y={get id(){return l.id},element:o,get toast(){return l},get active(){return!u&&!c.isDestroyed},get exiting(){return u},mount(){r.appendChild(a),c.trackRaf(()=>{c.trackRaf(()=>{y.active&&o.setAttribute(`data-mounted`,`true`)})}),_()},update(e){y.active&&(l=ae(l,e),h(o,l),e.duration!==void 0&&(g(),p=l.duration,_()))},setPaused(e){d===e||!y.active||(d=e,d?(f!==null&&(p=Math.max(0,p-(Date.now()-m))),g()):_())},dismiss(){y.active&&(u=!0,g(),o.setAttribute(`data-removed`,`true`),o.style.zIndex=`0`,o.style.pointerEvents=`none`,N(o,`closed`),v.exit())},destroy(){c.destroy()}};o.setAttribute(`data-id`,l.id),h(o,l);for(let e of[`mounted`,`removed`,`front`,`visible`,`swiping`,`swipe-out`])o.setAttribute(`data-${e}`,`false`);o.setAttribute(`data-expanded`,String(t.expanded));for(let e of[`amount-x`,`amount-y`,`end-x`,`end-y`])o.style.setProperty(`--toast-swipe-${e}`,`0px`);return N(o,`open`),y}const F=`data-toast-prev-tabindex`,I=`__none__`,pe=e=>{let t=getComputedStyle(e).getPropertyValue(`--toast-gap`).trim();if(!t)return 8;let n=Number.parseFloat(t);return Number.isFinite(n)?n:8},L=e=>{let t=getComputedStyle(e).getPropertyValue(`--toast-collapsed-peek`).trim();if(!t)return 14;let n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):14},R=e=>{let t=e.cloneNode(!0);t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`inert`,``),t.style.width=getComputedStyle(e).width,t.style.height=`auto`,t.style.maxHeight=`none`,t.style.position=`absolute`,t.style.inset=`0 auto auto 0`,t.style.visibility=`hidden`,t.style.pointerEvents=`none`,t.style.transform=`none`,t.style.transition=`none`,t.style.animation=`none`,e.parentElement.append(t);try{return t.offsetHeight||t.getBoundingClientRect().height||e.offsetHeight||e.getBoundingClientRect().height}finally{t.remove()}},me=e=>{let t=u(e);return m(e)&&t.unshift(e),t.filter(e=>e.getAttribute(`aria-hidden`)!==`true`)},z=e=>{let t=[...e.querySelectorAll(`[${F}]`)];return e.hasAttribute(F)&&t.unshift(e),t},B=(e,t)=>{if(t){e.removeAttribute(`aria-hidden`),e.removeAttribute(`inert`);for(let t of z(e)){let e=t.getAttribute(F);t.removeAttribute(F),!e||e===I?t.removeAttribute(`tabindex`):t.setAttribute(`tabindex`,e)}return}for(let t of me(e)){if(!t.hasAttribute(F)){let e=t.getAttribute(`tabindex`);t.setAttribute(F,e===null?I:e)}t.setAttribute(`tabindex`,`-1`)}e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`inert`,``)};function he({viewport:e,limit:t,stackDirection:n,getItems:r,onLayout:i}){let a=e.ownerDocument,o=new Set,s=new WeakMap,c=!1;e.style.setProperty(`--toast-lift`,String(n));let l=t=>{t?e.setAttribute(`data-expanded`,``):e.removeAttribute(`data-expanded`);let n=t?e.style.getPropertyValue(`--toast-expanded-stack-size`):e.style.getPropertyValue(`--toast-collapsed-stack-size`);e.style.setProperty(`--toast-stack-size`,n.trim()===``?`0px`:n);for(let e of o)e.setAttribute(`data-expanded`,String(t))},u=()=>{if(c)return;let n=r(),o=n.length,l=o>0?pe(e):0,u=o>0?L(e):0,d=0,f=0,p=0,m=0;for(let e=0;e<n.length;e+=1){let r=n[e];if(!r)continue;let i=e<t,c=r.getAttribute(`data-visible`)!==`false`,h=R(r)||(s.get(r)??0);h>0&&s.set(r,h),e===0&&(m=h);let g=e*u;if(r.style.setProperty(`--toast-index`,String(e)),r.style.setProperty(`--toast-initial-height`,`${h}px`),r.style.setProperty(`--toast-offset`,`${d}px`),r.style.setProperty(`--toast-collapsed-offset-y`,`${g}px`),r.setAttribute(`data-front`,String(e===0)),r.setAttribute(`data-visible`,String(i)),r.setAttribute(`data-removed`,`false`),r.style.zIndex=String(o-e+1),r.style.pointerEvents=i?``:`none`,!i&&c){let e=a.activeElement;e instanceof HTMLElement&&r.contains(e)&&e.blur()}B(r,i),d+=h+l,i&&(p+=1,f+=h+l)}let h=p>0?Math.max(0,f-l):0,g=p>0?Math.max(0,m+u*(p-1)):0;e.style.setProperty(`--toast-count`,String(o)),e.style.setProperty(`--toast-front-height`,`${m}px`),e.style.setProperty(`--toast-expanded-stack-size`,`${h}px`),e.style.setProperty(`--toast-collapsed-stack-size`,`${g}px`),i()},d=typeof ResizeObserver<`u`?new ResizeObserver(u):null;return{update:u,setExpanded:l,observe(e){o.add(e),d?.observe(e)},unobserve(e){o.delete(e),d?.unobserve(e)},destroy(){c=!0,d?.disconnect(),o.clear(),e.removeAttribute(`data-expanded`)}}}const V=e=>{e.element.setAttribute(`data-swiping`,`false`),e.element.setAttribute(`data-swipe-out`,`false`);for(let t of[`amount-x`,`amount-y`,`end-x`,`end-y`])e.element.style.removeProperty(`--toast-swipe-${t}`)};function ge({viewport:e,position:t,getEntry:n,dismiss:i}){let a={x:t.endsWith(`left`)?-1:t.endsWith(`right`)?1:0,y:t.startsWith(`top`)?-1:1},o=a.x===0?[`y`]:[`x`,`y`],s=(e,t)=>e*t<0?e*.2:e,c=e=>e.active&&e.toast.dismissible;return r({element:e,axes:o,lockThreshold:12,capture:e=>e.element,start(e,t){if(t.closest(`[data-slot=\"toast-action\"], [data-slot=\"toast-close\"]`))return null;let r=n(t);return r&&c(r)?r:null},active:c,move(e,{axis:t,deltaX:n,deltaY:r}){let i=t===`x`?s(n,a.x):0,o=t===`y`?s(r,a.y):0;e.element.setAttribute(`data-swiping`,`true`),e.element.style.setProperty(`--toast-swipe-amount-x`,`${i}px`),e.element.style.setProperty(`--toast-swipe-amount-y`,`${o}px`)},release(e,{axis:t,deltaX:n,deltaY:r}){let o=t===`x`?n:r;if(o*a[t]<40){V(e);return}let s=t===`x`?e.element.offsetWidth:e.element.offsetHeight,c=a[t]*Math.max(Math.abs(o),s+16);e.element.setAttribute(`data-swiping`,`false`),e.element.setAttribute(`data-swipe-out`,`true`),e.element.style.setProperty(`--toast-swipe-end-x`,`${t===`x`?c:0}px`),e.element.style.setProperty(`--toast-swipe-end-y`,`${t===`y`?c:0}px`),i(e)},reset:V})}const H=new Set([`hover`,`focus`]);function _e({hasExitingEntries:e,setExpanded:t,setPaused:n}){let r=new Set,i=!1,a=!1,o=()=>[...r].some(e=>H.has(e)),s=()=>{i&&(o()||!e())&&(i=!1),t(o()||i);let s=r.size>0;s!==a&&(a=s,n(a))};return{get expanded(){return o()||i},get paused(){return a},set(t,n){n?r.add(t):r.delete(t)&&H.has(t)&&!o()&&e()&&(i=!0),s()},sync:s}}const U=`@data-slot/toast`;function W(n,r={}){let u=g(n,U,`[@data-slot/toast] createToast() called more than once for the same root. Returning the existing controller. Destroy it before rebinding with new options.`);if(u)return u;let f=d(n,`toast-viewport`);if(!f)throw Error(`Toast requires a toast-viewport slot`);let p=n.ownerDocument??document,m=d(n,`toast-template`),y=ne(r.limit??l(n,`limit`)),b=re(r.duration??l(n,`duration`),5e3),x=r.position??c(n,`position`,v)??`bottom-right`,C=r.pauseOnHover??s(n,`pauseOnHover`)??!0,w=r.pauseOnFocus??s(n,`pauseOnFocus`)??!0,T=r.portal??s(n,`portal`)??!1,E=r.onShow,ee=r.onDismiss,te=r.onAction,D=x.startsWith(`top`)?1:-1;n.setAttribute(`data-position`,x),f.setAttribute(`data-position`,x),f.hasAttribute(`role`)||f.setAttribute(`role`,`region`),f.hasAttribute(`aria-label`)||f.setAttribute(`aria-label`,`Notifications`);let O=t({content:f,root:n,enabled:T});T&&O.mount();let A=new Map,j=i(),M=[],N=0,P=null,F=()=>[...A.values()].filter(e=>e.active),I=e=>A.get(e.id)===e,pe=()=>[...A.values()].some(e=>e.exiting),L=he({viewport:f,limit:y,stackDirection:D,getItems:()=>F().reverse().map(e=>e.element),onLayout:()=>R.set(`focus`,w&&B())}),R=_e({hasExitingEntries:pe,setExpanded:e=>L.setExpanded(e),setPaused:e=>{for(let t of F())t.setPaused(e)}});p.visibilityState===`hidden`&&R.set(`document`,!0);let z=e=>{if(!(e instanceof Node)||!f.contains(e))return!1;if(!(e instanceof Element))return!0;let t=e.closest(`[data-slot=\"toast-item\"]`);return!t||!f.contains(t)?!0:t.getAttribute(`data-visible`)===`true`&&t.getAttribute(`data-state`)===`open`},B=()=>z(p.activeElement),V=()=>{for(let e of F().reverse()){if(e.element.getAttribute(`data-visible`)!==`true`)continue;let t=me(e.element)[0];if(t)return o(t),!0}return!1},H=()=>P&&P.isConnected?(o(P),!0):!1,W=e=>{let t=p.activeElement;!(t instanceof HTMLElement)||!f.contains(t)||e&&!e.contains(t)||V()||H()||t.blur()},G=e=>{a(n,`toast:change`,{id:e,action:`dismiss`}),ee?.(e)},K=e=>{I(e)&&(Q.cancel(e),L.unobserve(e.element),e.destroy(),A.delete(e.id),L.update())},q=(e,t=!0)=>{!I(e)||!e.active||(Q.cancel(e),e.dismiss(),L.update(),t&&W(e.element),G(e.id))},ve=e=>{let t=A.get(e);t&&q(t)},J=()=>{let e=``;do N+=1,e=`toast-${N}`;while(A.has(e));return e},Y=(e,t)=>{let r=S(e)?e:J(),i=ae(ie(r,b),t),o=A.get(r),s=o?.active;o&&K(o),s&&G(r);let c=fe(i,{viewport:f,template:m,expanded:R.expanded,paused:R.paused,onTimeout:q,onExitComplete:K});if(j.isDestroyed)return c.destroy(),c;let l=A.get(r);return l&&K(l),A.set(r,c),c.mount(),L.observe(c.element),L.update(),I(c)&&c.active&&(a(n,`toast:change`,{id:r,action:`show`}),E?.(r)),c},ye=e=>j.isDestroyed?e.id??J():Y(e.id,e).id,X=(e,t)=>{!I(e)||!e.active||(e.update(t),e.toast.dismissible||Q.cancel(e),L.update())},be=(e,t)=>{let n=A.get(e);n&&X(n,t)},xe=(e,t)=>{let n=k(le(t.loading),{title:`Loading...`,type:`loading`,duration:0,description:t.description}),r=j.isDestroyed?void 0:Y(void 0,n),i=r?.id??J(),a=Promise.resolve().then(()=>typeof e==`function`?e():e).then(e=>{let n=k(ue(t.success,e),{title:`Success`,type:`success`,duration:b,description:t.description});return r&&X(r,n),e}).catch(e=>{let n=k(ue(t.error,e),{title:de(e),type:`error`,duration:b,description:t.description});throw r&&X(r,n),e});return a.catch(()=>{}),{id:i,unwrap:()=>a}},Se=()=>{let e=p.activeElement instanceof HTMLElement&&f.contains(p.activeElement);for(let e of F())q(e,!1);e&&W()},Ce=()=>{let e=!1;return{get defaultPrevented(){return e},preventDefault:()=>{e=!0}}},we=e=>{let t=A.get(e);if(!t||t.exiting)return;let r=t.toast.action?.value,i=Ce();t.toast.action?.onClick?.(i),a(n,`toast:action`,{id:e,value:r}),te?.(e,r),i.defaultPrevented||q(t)},Z=e=>{if(!(e instanceof Element))return;let t=e.closest(`[data-slot=\"toast-item\"]`);if(!t||!f.contains(t))return;let n=A.get(t.getAttribute(`data-id`)??``);return n?.element===t?n:void 0},Q=ge({viewport:f,position:x,getEntry:Z,dismiss:e=>q(e)});M.push(h(f,`click`,e=>{let t=e.target;if(!t)return;let n=t.closest(`[data-slot=\"toast-close\"]`);if(n){let e=Z(n);e&&q(e);return}let r=t.closest(`[data-slot=\"toast-action\"]`);if(r){let e=Z(r);e&&we(e.id)}}));let Te=e=>z(e)||B();M.push(h(f,`pointerenter`,()=>{C&&R.set(`hover`,!0)}),h(f,`pointerleave`,()=>{C&&R.set(`hover`,!1)}),h(f,`focusin`,e=>{if(!w)return;let{relatedTarget:t,target:n}=e;t instanceof HTMLElement&&!f.contains(t)&&(P=t),R.set(`focus`,Te(n))}),h(f,`focusout`,e=>{w&&R.set(`focus`,Te(e.relatedTarget))}));let Ee=p.defaultView??window;M.push(h(Ee,`blur`,()=>R.set(`window`,!0)),h(Ee,`focus`,()=>R.set(`window`,!1)),h(p,`visibilitychange`,()=>R.set(`document`,p.visibilityState===`hidden`))),M.push(h(n,`toast:show`,e=>{let t=oe(e.detail);!t||j.isDestroyed||Y(t.id,t.patch)}),h(n,`toast:update`,e=>{let t=se(e.detail);t&&be(t.id,t.patch)}),h(n,`toast:dismiss`,e=>{let t=ce(e.detail);t&&ve(t)}),h(n,`toast:clear`,()=>{Se()})),j.onDestroy(()=>{M.forEach(e=>e()),Q.destroy(),L.destroy();for(let e of A.values())e.destroy();A.clear(),P=null,O.cleanup(),e(n,U,$)}),L.update();let $={show:ye,update:be,promise:xe,dismiss:ve,dismissAll:Se,get count(){return F().length},destroy:()=>{j.destroy()}};return _(n,U,$),$}function G(e=document){let t=[];for(let n of f(e,`toast`))p(n,U)||t.push(W(n));return t}export{G as create,W as createToast};",
145
145
  "type": "registry:file",
146
146
  "target": "~/assets/data-slot-toast.js"
147
147
  },
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "swatch",
4
+ "title": "Swatch",
5
+ "description": "Native Liquid swatch with readable CSS and shared data-slot parts.",
6
+ "registryDependencies": [
7
+ "https://ui.full.dev/r/liquid/init.json"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "snippets/ui-swatch.liquid",
12
+ "content": "{% doc %}\n Fulldev UI swatch styles. Use native markup with its data-slot parts.\n{% enddoc %}\n\n{% stylesheet %}\n /* A color or pattern beside an option or filter value, such as Shopify's swatch.color or\n swatch.image. Set the background in a style attribute; the faint inner ring keeps white and\n black visible on any background. It is decorative, so the value's name stays in text. */\n [data-slot='swatch'] {\n display: inline-block;\n flex-shrink: 0;\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n border-radius: 999px;\n background-position: center;\n background-size: cover;\n box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--foreground) 15%, transparent);\n }\n{% endstylesheet %}\n",
13
+ "type": "registry:file",
14
+ "target": "~/snippets/ui-swatch.liquid"
15
+ }
16
+ ],
17
+ "docs": "https://ui.full.dev/liquid/components/swatch/",
18
+ "type": "registry:item"
19
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "carousel-indicator",
4
+ "title": "Carousel Indicator",
5
+ "description": "A thumbnail or dot that shows one slide of the shadcn/ui carousel and marks the current one.",
6
+ "dependencies": [
7
+ "cn"
8
+ ],
9
+ "registryDependencies": [
10
+ "carousel"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "src/components/ui/carousel-indicator.tsx",
15
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"cn\"\n\nimport { useCarousel } from \"@/components/ui/carousel\"\n\nfunction CarouselIndicator({\n className,\n index,\n onClick,\n \"aria-label\": ariaLabel = `Go to slide ${index + 1}`,\n ...props\n}: React.ComponentProps<\"button\"> & {\n index: number\n}) {\n const { api, opts } = useCarousel()\n const [selected, setSelected] = React.useState(opts?.startIndex ?? 0)\n const [positions, setPositions] = React.useState<number>()\n const [inactive, setInactive] = React.useState(false)\n\n React.useEffect(() => {\n if (!api) return\n const update = () => {\n setSelected(api.selectedScrollSnap())\n setPositions(api.scrollSnapList().length)\n setInactive(api.internalEngine().options.active === false)\n }\n update()\n api.on(\"select\", update)\n api.on(\"reInit\", update)\n return () => {\n api.off(\"select\", update)\n api.off(\"reInit\", update)\n }\n }, [api])\n\n const active = !inactive && selected === index\n // As in data-slot, an indicator without a scroll position, such as the last\n // thumbnails when several slides show, is hidden, and all are while Embla is\n // inactive at the current breakpoint.\n const hidden =\n inactive ||\n !Number.isInteger(index) ||\n (positions !== undefined && (index < 0 || index >= positions))\n\n return (\n <button\n type=\"button\"\n data-slot=\"carousel-indicator\"\n data-index={index}\n data-state={active ? \"active\" : \"inactive\"}\n aria-current={active ? \"true\" : undefined}\n aria-label={ariaLabel}\n hidden={hidden || undefined}\n className={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 onClick={(event) => {\n onClick?.(event)\n if (event.defaultPrevented || hidden) return\n const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\")\n api?.scrollTo(index, reduce.matches)\n }}\n {...props}\n />\n )\n}\n\nexport { CarouselIndicator }\n",
16
+ "type": "registry:ui"
17
+ }
18
+ ],
19
+ "docs": "https://ui.full.dev/react/components/carousel-indicator/",
20
+ "categories": [
21
+ "ui"
22
+ ],
23
+ "type": "registry:ui"
24
+ }
@@ -5,14 +5,17 @@
5
5
  "description": "Installs every Fulldev UI React extra.",
6
6
  "registryDependencies": [
7
7
  "@fulldev/banner",
8
+ "@fulldev/carousel-indicator",
8
9
  "@fulldev/header",
9
10
  "@fulldev/icon",
10
11
  "@fulldev/layout",
11
12
  "@fulldev/logo",
12
13
  "@fulldev/marquee",
14
+ "@fulldev/number-field",
13
15
  "@fulldev/price",
14
16
  "@fulldev/rating",
15
17
  "@fulldev/section",
18
+ "@fulldev/swatch",
16
19
  "@fulldev/theme-toggle",
17
20
  "@fulldev/toc",
18
21
  "@fulldev/typography",
@@ -0,0 +1,26 @@
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
+ "@base-ui/react",
8
+ "cn",
9
+ "lucide-react"
10
+ ],
11
+ "registryDependencies": [
12
+ "input-group"
13
+ ],
14
+ "files": [
15
+ {
16
+ "path": "src/components/ui/number-field.tsx",
17
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { NumberField as NumberFieldPrimitive } from \"@base-ui/react/number-field\"\nimport { cn } from \"cn\"\nimport { MinusIcon, PlusIcon } from \"lucide-react\"\n\nimport { InputGroupAddon, InputGroupButton } from \"@/components/ui/input-group\"\n\nfunction NumberField({\n className,\n disabled,\n ...props\n}: Omit<NumberFieldPrimitive.Root.Props, \"className\"> & {\n className?: string\n}) {\n return (\n <NumberFieldPrimitive.Root\n data-slot=\"number-field\"\n data-disabled={disabled ? \"true\" : undefined}\n role=\"group\"\n disabled={disabled}\n className={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-9 rounded-4xl border transition-[color,box-shadow,background-color] in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-3xl has-data-[align=block-start]:rounded-3xl has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[textarea]:rounded-2xl 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 )\n}\n\nfunction NumberFieldInput({\n className,\n ...props\n}: Omit<NumberFieldPrimitive.Input.Props, \"className\"> & {\n className?: string\n}) {\n return (\n <NumberFieldPrimitive.Input\n data-slot=\"input-group-control\"\n className={cn(\n \"border-transparent focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 px-3 py-1 text-base transition-[color,box-shadow,background-color] file:h-7 file:text-sm file:font-medium md:text-sm rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent w-full min-w-0 flex-1 text-center tabular-nums outline-none placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NumberFieldDecrement({\n children,\n \"aria-label\": ariaLabel = \"Decrease\",\n ...props\n}: NumberFieldPrimitive.Decrement.Props) {\n return (\n <InputGroupAddon align=\"inline-start\">\n <NumberFieldPrimitive.Decrement\n data-slot=\"number-field-decrement\"\n aria-label={ariaLabel}\n render={\n <InputGroupButton\n size=\"icon-xs\"\n className=\"aria-disabled:pointer-events-none aria-disabled:opacity-50\"\n />\n }\n {...props}\n >\n {children ?? <MinusIcon aria-hidden=\"true\" />}\n </NumberFieldPrimitive.Decrement>\n </InputGroupAddon>\n )\n}\n\nfunction NumberFieldIncrement({\n children,\n \"aria-label\": ariaLabel = \"Increase\",\n ...props\n}: NumberFieldPrimitive.Increment.Props) {\n return (\n <InputGroupAddon align=\"inline-end\">\n <NumberFieldPrimitive.Increment\n data-slot=\"number-field-increment\"\n aria-label={ariaLabel}\n render={\n <InputGroupButton\n size=\"icon-xs\"\n className=\"aria-disabled:pointer-events-none aria-disabled:opacity-50\"\n />\n }\n {...props}\n >\n {children ?? <PlusIcon aria-hidden=\"true\" />}\n </NumberFieldPrimitive.Increment>\n </InputGroupAddon>\n )\n}\n\nexport {\n NumberField,\n NumberFieldDecrement,\n NumberFieldIncrement,\n NumberFieldInput,\n}\n",
18
+ "type": "registry:ui"
19
+ }
20
+ ],
21
+ "docs": "https://ui.full.dev/react/components/number-field/",
22
+ "categories": [
23
+ "ui"
24
+ ],
25
+ "type": "registry:ui"
26
+ }
@@ -3,6 +3,71 @@
3
3
  "name": "fulldev-react",
4
4
  "homepage": "https://ui.full.dev/react/",
5
5
  "items": [
6
+ {
7
+ "name": "carousel-indicator",
8
+ "type": "registry:ui",
9
+ "title": "Carousel Indicator",
10
+ "description": "A thumbnail or dot that shows one slide of the shadcn/ui carousel and marks the current one.",
11
+ "categories": [
12
+ "ui"
13
+ ],
14
+ "docs": "https://ui.full.dev/react/components/carousel-indicator/",
15
+ "dependencies": [
16
+ "cn"
17
+ ],
18
+ "registryDependencies": [
19
+ "carousel"
20
+ ],
21
+ "files": [
22
+ {
23
+ "path": "src/components/ui/carousel-indicator.tsx",
24
+ "type": "registry:ui"
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "name": "number-field",
30
+ "type": "registry:ui",
31
+ "title": "Number Field",
32
+ "description": "A number input with decrement and increment buttons.",
33
+ "categories": [
34
+ "ui"
35
+ ],
36
+ "docs": "https://ui.full.dev/react/components/number-field/",
37
+ "dependencies": [
38
+ "@base-ui/react",
39
+ "cn",
40
+ "lucide-react"
41
+ ],
42
+ "registryDependencies": [
43
+ "input-group"
44
+ ],
45
+ "files": [
46
+ {
47
+ "path": "src/components/ui/number-field.tsx",
48
+ "type": "registry:ui"
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "name": "swatch",
54
+ "type": "registry:ui",
55
+ "title": "Swatch",
56
+ "description": "A color or pattern beside an option or filter value.",
57
+ "categories": [
58
+ "ui"
59
+ ],
60
+ "docs": "https://ui.full.dev/react/components/swatch/",
61
+ "dependencies": [
62
+ "cn"
63
+ ],
64
+ "files": [
65
+ {
66
+ "path": "src/components/ui/swatch.tsx",
67
+ "type": "registry:ui"
68
+ }
69
+ ]
70
+ },
6
71
  {
7
72
  "name": "components",
8
73
  "type": "registry:item",
@@ -11,14 +76,17 @@
11
76
  "docs": "https://ui.full.dev/react/components/",
12
77
  "registryDependencies": [
13
78
  "@fulldev/banner",
79
+ "@fulldev/carousel-indicator",
14
80
  "@fulldev/header",
15
81
  "@fulldev/icon",
16
82
  "@fulldev/layout",
17
83
  "@fulldev/logo",
18
84
  "@fulldev/marquee",
85
+ "@fulldev/number-field",
19
86
  "@fulldev/price",
20
87
  "@fulldev/rating",
21
88
  "@fulldev/section",
89
+ "@fulldev/swatch",
22
90
  "@fulldev/theme-toggle",
23
91
  "@fulldev/toc",
24
92
  "@fulldev/typography",
@@ -0,0 +1,21 @@
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
+ "dependencies": [
7
+ "cn"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "src/components/ui/swatch.tsx",
12
+ "content": "import * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Swatch({\n className,\n color,\n image,\n style,\n ...props\n}: React.ComponentProps<\"span\"> & {\n color?: string\n image?: string\n}) {\n return (\n <span\n data-slot=\"swatch\"\n aria-hidden=\"true\"\n className={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 backgroundColor: color,\n backgroundImage: image ? `url(${JSON.stringify(image)})` : undefined,\n ...style,\n }}\n {...props}\n />\n )\n}\n\nexport { Swatch }\n",
13
+ "type": "registry:ui"
14
+ }
15
+ ],
16
+ "docs": "https://ui.full.dev/react/components/swatch/",
17
+ "categories": [
18
+ "ui"
19
+ ],
20
+ "type": "registry:ui"
21
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "carousel-indicator",
4
+ "title": "Carousel Indicator",
5
+ "description": "A thumbnail or dot that shows one slide of the shadcn/ui carousel and marks the current one.",
6
+ "dependencies": [
7
+ "cn"
8
+ ],
9
+ "registryDependencies": [
10
+ "carousel"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "src/components/ui/carousel-indicator.tsx",
15
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"cn\"\n\nimport { useCarousel } from \"@/components/ui/carousel\"\n\nfunction CarouselIndicator({\n className,\n index,\n onClick,\n \"aria-label\": ariaLabel = `Go to slide ${index + 1}`,\n ...props\n}: React.ComponentProps<\"button\"> & {\n index: number\n}) {\n const { api, opts } = useCarousel()\n const [selected, setSelected] = React.useState(opts?.startIndex ?? 0)\n const [positions, setPositions] = React.useState<number>()\n const [inactive, setInactive] = React.useState(false)\n\n React.useEffect(() => {\n if (!api) return\n const update = () => {\n setSelected(api.selectedScrollSnap())\n setPositions(api.scrollSnapList().length)\n setInactive(api.internalEngine().options.active === false)\n }\n update()\n api.on(\"select\", update)\n api.on(\"reInit\", update)\n return () => {\n api.off(\"select\", update)\n api.off(\"reInit\", update)\n }\n }, [api])\n\n const active = !inactive && selected === index\n // As in data-slot, an indicator without a scroll position, such as the last\n // thumbnails when several slides show, is hidden, and all are while Embla is\n // inactive at the current breakpoint.\n const hidden =\n inactive ||\n !Number.isInteger(index) ||\n (positions !== undefined && (index < 0 || index >= positions))\n\n return (\n <button\n type=\"button\"\n data-slot=\"carousel-indicator\"\n data-index={index}\n data-state={active ? \"active\" : \"inactive\"}\n aria-current={active ? \"true\" : undefined}\n aria-label={ariaLabel}\n hidden={hidden || undefined}\n className={cn(\n \"rounded-none 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 onClick={(event) => {\n onClick?.(event)\n if (event.defaultPrevented || hidden) return\n const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\")\n api?.scrollTo(index, reduce.matches)\n }}\n {...props}\n />\n )\n}\n\nexport { CarouselIndicator }\n",
16
+ "type": "registry:ui"
17
+ }
18
+ ],
19
+ "docs": "https://ui.full.dev/react/components/carousel-indicator/",
20
+ "categories": [
21
+ "ui"
22
+ ],
23
+ "type": "registry:ui"
24
+ }
@@ -5,14 +5,17 @@
5
5
  "description": "Installs every Fulldev UI React extra.",
6
6
  "registryDependencies": [
7
7
  "@fulldev/banner",
8
+ "@fulldev/carousel-indicator",
8
9
  "@fulldev/header",
9
10
  "@fulldev/icon",
10
11
  "@fulldev/layout",
11
12
  "@fulldev/logo",
12
13
  "@fulldev/marquee",
14
+ "@fulldev/number-field",
13
15
  "@fulldev/price",
14
16
  "@fulldev/rating",
15
17
  "@fulldev/section",
18
+ "@fulldev/swatch",
16
19
  "@fulldev/theme-toggle",
17
20
  "@fulldev/toc",
18
21
  "@fulldev/typography",
@@ -0,0 +1,26 @@
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
+ "@base-ui/react",
8
+ "cn",
9
+ "lucide-react"
10
+ ],
11
+ "registryDependencies": [
12
+ "input-group"
13
+ ],
14
+ "files": [
15
+ {
16
+ "path": "src/components/ui/number-field.tsx",
17
+ "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { NumberField as NumberFieldPrimitive } from \"@base-ui/react/number-field\"\nimport { cn } from \"cn\"\nimport { MinusIcon, PlusIcon } from \"lucide-react\"\n\nimport { InputGroupAddon, InputGroupButton } from \"@/components/ui/input-group\"\n\nfunction NumberField({\n className,\n disabled,\n ...props\n}: Omit<NumberFieldPrimitive.Root.Props, \"className\"> & {\n className?: string\n}) {\n return (\n <NumberFieldPrimitive.Root\n data-slot=\"number-field\"\n data-disabled={disabled ? \"true\" : undefined}\n role=\"group\"\n disabled={disabled}\n className={cn(\n \"border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 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 has-[[data-slot=input-group-control]:disabled]:bg-input/50 dark:has-[[data-slot=input-group-control]:disabled]:bg-input/80 h-8 rounded-none border transition-colors in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:disabled]:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-1 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 )\n}\n\nfunction NumberFieldInput({\n className,\n ...props\n}: Omit<NumberFieldPrimitive.Input.Props, \"className\"> & {\n className?: string\n}) {\n return (\n <NumberFieldPrimitive.Input\n data-slot=\"input-group-control\"\n className={cn(\n \"border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-8 px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium md:text-xs rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent w-full min-w-0 flex-1 text-center tabular-nums outline-none placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NumberFieldDecrement({\n children,\n \"aria-label\": ariaLabel = \"Decrease\",\n ...props\n}: NumberFieldPrimitive.Decrement.Props) {\n return (\n <InputGroupAddon align=\"inline-start\">\n <NumberFieldPrimitive.Decrement\n data-slot=\"number-field-decrement\"\n aria-label={ariaLabel}\n render={\n <InputGroupButton\n size=\"icon-xs\"\n className=\"aria-disabled:pointer-events-none aria-disabled:opacity-50\"\n />\n }\n {...props}\n >\n {children ?? <MinusIcon aria-hidden=\"true\" />}\n </NumberFieldPrimitive.Decrement>\n </InputGroupAddon>\n )\n}\n\nfunction NumberFieldIncrement({\n children,\n \"aria-label\": ariaLabel = \"Increase\",\n ...props\n}: NumberFieldPrimitive.Increment.Props) {\n return (\n <InputGroupAddon align=\"inline-end\">\n <NumberFieldPrimitive.Increment\n data-slot=\"number-field-increment\"\n aria-label={ariaLabel}\n render={\n <InputGroupButton\n size=\"icon-xs\"\n className=\"aria-disabled:pointer-events-none aria-disabled:opacity-50\"\n />\n }\n {...props}\n >\n {children ?? <PlusIcon aria-hidden=\"true\" />}\n </NumberFieldPrimitive.Increment>\n </InputGroupAddon>\n )\n}\n\nexport {\n NumberField,\n NumberFieldDecrement,\n NumberFieldIncrement,\n NumberFieldInput,\n}\n",
18
+ "type": "registry:ui"
19
+ }
20
+ ],
21
+ "docs": "https://ui.full.dev/react/components/number-field/",
22
+ "categories": [
23
+ "ui"
24
+ ],
25
+ "type": "registry:ui"
26
+ }