fulldev-ui 0.22.3 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (535) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +5 -1
  3. package/liquid/LICENSE-DATA-SLOT.md +21 -0
  4. package/liquid/LICENSE-FULLDEV.txt +21 -0
  5. package/liquid/LICENSE-SHADCN.md +21 -0
  6. package/liquid/README.md +17 -0
  7. package/liquid/components/accordion.liquid +5 -0
  8. package/liquid/components/alert-dialog.liquid +116 -0
  9. package/liquid/components/alert.liquid +45 -0
  10. package/liquid/components/aspect-ratio.liquid +28 -0
  11. package/liquid/components/attachment.liquid +134 -0
  12. package/liquid/components/avatar.liquid +52 -0
  13. package/liquid/components/badge.liquid +86 -0
  14. package/liquid/components/banner.liquid +40 -0
  15. package/liquid/components/base.liquid +112 -0
  16. package/liquid/components/breadcrumb.liquid +46 -0
  17. package/liquid/components/button-group.liquid +56 -0
  18. package/liquid/components/button.liquid +232 -0
  19. package/liquid/components/card.liquid +5 -0
  20. package/liquid/components/carousel.liquid +5 -0
  21. package/liquid/components/checkbox.liquid +54 -0
  22. package/liquid/components/collapsible.liquid +3 -0
  23. package/liquid/components/combobox.liquid +87 -0
  24. package/liquid/components/command.liquid +86 -0
  25. package/liquid/components/dialog.liquid +80 -0
  26. package/liquid/components/drawer.liquid +97 -0
  27. package/liquid/components/dropdown-menu.liquid +3 -0
  28. package/liquid/components/empty.liquid +77 -0
  29. package/liquid/components/field.liquid +5 -0
  30. package/liquid/components/form.liquid +5 -0
  31. package/liquid/components/header.liquid +33 -0
  32. package/liquid/components/hover-card.liquid +3 -0
  33. package/liquid/components/icon.liquid +5 -0
  34. package/liquid/components/input-group.liquid +53 -0
  35. package/liquid/components/input.liquid +84 -0
  36. package/liquid/components/invalid-controls.liquid +18 -0
  37. package/liquid/components/item.liquid +114 -0
  38. package/liquid/components/kbd.liquid +20 -0
  39. package/liquid/components/logo.liquid +33 -0
  40. package/liquid/components/marquee.liquid +5 -0
  41. package/liquid/components/navigation-menu.liquid +5 -0
  42. package/liquid/components/pagination.liquid +32 -0
  43. package/liquid/components/popover.liquid +3 -0
  44. package/liquid/components/popup.liquid +189 -0
  45. package/liquid/components/price.liquid +5 -0
  46. package/liquid/components/radio-group.liquid +53 -0
  47. package/liquid/components/rating.liquid +5 -0
  48. package/liquid/components/section.liquid +5 -0
  49. package/liquid/components/select.liquid +51 -0
  50. package/liquid/components/separator.liquid +19 -0
  51. package/liquid/components/sheet.liquid +68 -0
  52. package/liquid/components/skeleton.liquid +17 -0
  53. package/liquid/components/slider.liquid +50 -0
  54. package/liquid/components/spinner.liquid +28 -0
  55. package/liquid/components/switch.liquid +54 -0
  56. package/liquid/components/table.liquid +64 -0
  57. package/liquid/components/tabs.liquid +88 -0
  58. package/liquid/components/toast.liquid +5 -0
  59. package/liquid/components/toc.liquid +45 -0
  60. package/liquid/components/toggle-group.liquid +77 -0
  61. package/liquid/components/toggle.liquid +61 -0
  62. package/liquid/components/tooltip.liquid +45 -0
  63. package/liquid/components/triggers.liquid +20 -0
  64. package/liquid/components/typography.liquid +5 -0
  65. package/liquid/components/video.liquid +5 -0
  66. package/liquid/contracts.json +428 -0
  67. package/liquid/examples/accordion.liquid +10 -0
  68. package/liquid/examples/alert-dialog.liquid +40 -0
  69. package/liquid/examples/alert.liquid +4 -0
  70. package/liquid/examples/aspect-ratio.liquid +1 -0
  71. package/liquid/examples/attachment.liquid +22 -0
  72. package/liquid/examples/avatar.liquid +1 -0
  73. package/liquid/examples/badge.liquid +5 -0
  74. package/liquid/examples/banner.liquid +3 -0
  75. package/liquid/examples/breadcrumb.liquid +7 -0
  76. package/liquid/examples/button-group.liquid +6 -0
  77. package/liquid/examples/button.liquid +8 -0
  78. package/liquid/examples/card.liquid +11 -0
  79. package/liquid/examples/carousel.liquid +12 -0
  80. package/liquid/examples/checkbox.liquid +4 -0
  81. package/liquid/examples/collapsible.liquid +29 -0
  82. package/liquid/examples/combobox.liquid +13 -0
  83. package/liquid/examples/command.liquid +10 -0
  84. package/liquid/examples/dependencies.json +60 -0
  85. package/liquid/examples/dialog.liquid +11 -0
  86. package/liquid/examples/drawer.liquid +18 -0
  87. package/liquid/examples/dropdown-menu.liquid +88 -0
  88. package/liquid/examples/empty.liquid +9 -0
  89. package/liquid/examples/field.liquid +105 -0
  90. package/liquid/examples/form.liquid +9 -0
  91. package/liquid/examples/header.liquid +8 -0
  92. package/liquid/examples/hover-card.liquid +16 -0
  93. package/liquid/examples/icon.liquid +3 -0
  94. package/liquid/examples/input-group.liquid +6 -0
  95. package/liquid/examples/input.liquid +4 -0
  96. package/liquid/examples/item.liquid +72 -0
  97. package/liquid/examples/kbd.liquid +1 -0
  98. package/liquid/examples/label.liquid +3 -0
  99. package/liquid/examples/logo.liquid +3 -0
  100. package/liquid/examples/marquee.liquid +5 -0
  101. package/liquid/examples/native-select.liquid +8 -0
  102. package/liquid/examples/navigation-menu.liquid +11 -0
  103. package/liquid/examples/pagination.liquid +11 -0
  104. package/liquid/examples/popover.liquid +14 -0
  105. package/liquid/examples/price.liquid +1 -0
  106. package/liquid/examples/radio-group.liquid +62 -0
  107. package/liquid/examples/rating.liquid +17 -0
  108. package/liquid/examples/section.liquid +9 -0
  109. package/liquid/examples/select.liquid +105 -0
  110. package/liquid/examples/separator.liquid +3 -0
  111. package/liquid/examples/sheet.liquid +11 -0
  112. package/liquid/examples/skeleton.liquid +5 -0
  113. package/liquid/examples/slider.liquid +46 -0
  114. package/liquid/examples/spinner.liquid +11 -0
  115. package/liquid/examples/switch.liquid +7 -0
  116. package/liquid/examples/table.liquid +37 -0
  117. package/liquid/examples/tabs.liquid +21 -0
  118. package/liquid/examples/textarea.liquid +9 -0
  119. package/liquid/examples/toast.liquid +47 -0
  120. package/liquid/examples/toc.liquid +11 -0
  121. package/liquid/examples/toggle-group.liquid +50 -0
  122. package/liquid/examples/toggle.liquid +21 -0
  123. package/liquid/examples/tooltip.liquid +33 -0
  124. package/liquid/examples/typography.liquid +9 -0
  125. package/liquid/examples/video.liquid +7 -0
  126. package/liquid/licenses.json +14 -0
  127. package/liquid/manifest.json +110 -0
  128. package/liquid/registry.json +1295 -0
  129. package/liquid/runtime/ui-carousel.js +44 -0
  130. package/liquid/runtime/ui-controls.js +195 -0
  131. package/liquid/runtime/ui-lifecycle.js +107 -0
  132. package/liquid/runtime/ui-motion.js +45 -0
  133. package/liquid/runtime/ui-start.js +37 -0
  134. package/liquid/snippets/init.liquid +6 -0
  135. package/liquid/snippets/runtime.liquid +9 -0
  136. package/liquid/snippets/ui.liquid +68 -0
  137. package/liquid/styles/accordion.css +66 -0
  138. package/liquid/styles/card.css +114 -0
  139. package/liquid/styles/carousel.css +58 -0
  140. package/liquid/styles/field.css +70 -0
  141. package/liquid/styles/form.css +14 -0
  142. package/liquid/styles/icon.css +32 -0
  143. package/liquid/styles/marquee.css +65 -0
  144. package/liquid/styles/navigation-menu.css +235 -0
  145. package/liquid/styles/price.css +41 -0
  146. package/liquid/styles/primitives.css +53 -0
  147. package/liquid/styles/rating.css +23 -0
  148. package/liquid/styles/section.css +92 -0
  149. package/liquid/styles/toast.css +125 -0
  150. package/liquid/styles/tokens.css +118 -0
  151. package/liquid/styles/typography.css +670 -0
  152. package/liquid/styles/video.css +10 -0
  153. package/liquid/vendor/data-slot-accordion.js +1 -0
  154. package/liquid/vendor/data-slot-alert-dialog.js +1 -0
  155. package/liquid/vendor/data-slot-carousel.js +1 -0
  156. package/liquid/vendor/data-slot-collapsible.js +1 -0
  157. package/liquid/vendor/data-slot-combobox.js +1 -0
  158. package/liquid/vendor/data-slot-command.js +1 -0
  159. package/liquid/vendor/data-slot-core.js +1 -0
  160. package/liquid/vendor/data-slot-dialog.js +1 -0
  161. package/liquid/vendor/data-slot-drawer.js +1 -0
  162. package/liquid/vendor/data-slot-dropdown-menu.js +1 -0
  163. package/liquid/vendor/data-slot-hover-card.js +1 -0
  164. package/liquid/vendor/data-slot-navigation-menu.js +1 -0
  165. package/liquid/vendor/data-slot-popover.js +1 -0
  166. package/liquid/vendor/data-slot-radio-group.js +1 -0
  167. package/liquid/vendor/data-slot-select.js +1 -0
  168. package/liquid/vendor/data-slot-slider.js +1 -0
  169. package/liquid/vendor/data-slot-switch.js +1 -0
  170. package/liquid/vendor/data-slot-tabs.js +1 -0
  171. package/liquid/vendor/data-slot-toast.js +8 -0
  172. package/liquid/vendor/data-slot-toggle-group.js +1 -0
  173. package/liquid/vendor/data-slot-toggle.js +1 -0
  174. package/liquid/vendor/data-slot-tooltip.js +1 -0
  175. package/liquid/vendor.json +180 -0
  176. package/package.json +36 -30
  177. package/public/r/accordion.json +1 -1
  178. package/public/r/alert-dialog.json +1 -1
  179. package/public/r/code-block-examples.json +33 -0
  180. package/public/r/code-block.json +65 -0
  181. package/public/r/collapsible-examples.json +5 -0
  182. package/public/r/collapsible.json +2 -2
  183. package/public/r/combobox.json +3 -3
  184. package/public/r/command.json +2 -2
  185. package/public/r/components.json +2 -0
  186. package/public/r/dialog.json +1 -1
  187. package/public/r/drawer.json +1 -1
  188. package/public/r/dropdown-menu.json +1 -1
  189. package/public/r/hover-card.json +2 -2
  190. package/public/r/liquid/accordion.json +25 -0
  191. package/public/r/liquid/alert-dialog.json +21 -0
  192. package/public/r/liquid/alert.json +18 -0
  193. package/public/r/liquid/aspect-ratio.json +18 -0
  194. package/public/r/liquid/attachment.json +20 -0
  195. package/public/r/liquid/avatar.json +18 -0
  196. package/public/r/liquid/badge.json +18 -0
  197. package/public/r/liquid/banner.json +18 -0
  198. package/public/r/liquid/breadcrumb.json +18 -0
  199. package/public/r/liquid/button-group.json +19 -0
  200. package/public/r/liquid/button.json +18 -0
  201. package/public/r/liquid/card.json +25 -0
  202. package/public/r/liquid/carousel.json +26 -0
  203. package/public/r/liquid/checkbox.json +19 -0
  204. package/public/r/liquid/collapsible.json +19 -0
  205. package/public/r/liquid/combobox.json +21 -0
  206. package/public/r/liquid/command.json +19 -0
  207. package/public/r/liquid/components.json +83 -0
  208. package/public/r/liquid/dialog.json +19 -0
  209. package/public/r/liquid/drawer.json +21 -0
  210. package/public/r/liquid/dropdown-menu.json +21 -0
  211. package/public/r/liquid/empty.json +18 -0
  212. package/public/r/liquid/field.json +25 -0
  213. package/public/r/liquid/form.json +25 -0
  214. package/public/r/liquid/header.json +19 -0
  215. package/public/r/liquid/hover-card.json +20 -0
  216. package/public/r/liquid/icon.json +24 -0
  217. package/public/r/liquid/init.json +34 -0
  218. package/public/r/liquid/input-group.json +20 -0
  219. package/public/r/liquid/input.json +18 -0
  220. package/public/r/liquid/invalid-controls.json +18 -0
  221. package/public/r/liquid/item.json +18 -0
  222. package/public/r/liquid/kbd.json +18 -0
  223. package/public/r/liquid/label.json +11 -0
  224. package/public/r/liquid/logo.json +18 -0
  225. package/public/r/liquid/marquee.json +25 -0
  226. package/public/r/liquid/native-select.json +11 -0
  227. package/public/r/liquid/navigation-menu.json +26 -0
  228. package/public/r/liquid/pagination.json +18 -0
  229. package/public/r/liquid/popover.json +21 -0
  230. package/public/r/liquid/popup.json +18 -0
  231. package/public/r/liquid/price.json +24 -0
  232. package/public/r/liquid/radio-group.json +20 -0
  233. package/public/r/liquid/rating.json +24 -0
  234. package/public/r/liquid/registry.json +1295 -0
  235. package/public/r/liquid/runtime.json +180 -0
  236. package/public/r/liquid/section.json +24 -0
  237. package/public/r/liquid/select.json +22 -0
  238. package/public/r/liquid/separator.json +18 -0
  239. package/public/r/liquid/sheet.json +20 -0
  240. package/public/r/liquid/skeleton.json +18 -0
  241. package/public/r/liquid/slider.json +19 -0
  242. package/public/r/liquid/spinner.json +18 -0
  243. package/public/r/liquid/switch.json +20 -0
  244. package/public/r/liquid/table.json +18 -0
  245. package/public/r/liquid/tabs.json +20 -0
  246. package/public/r/liquid/textarea.json +11 -0
  247. package/public/r/liquid/toast.json +27 -0
  248. package/public/r/liquid/toc.json +18 -0
  249. package/public/r/liquid/toggle-group.json +21 -0
  250. package/public/r/liquid/toggle.json +20 -0
  251. package/public/r/liquid/tooltip.json +20 -0
  252. package/public/r/liquid/triggers.json +18 -0
  253. package/public/r/liquid/typography.json +24 -0
  254. package/public/r/liquid/video.json +25 -0
  255. package/public/r/navigation-menu.json +1 -1
  256. package/public/r/popover.json +1 -1
  257. package/public/r/progress-examples.json +33 -0
  258. package/public/r/progress.json +23 -0
  259. package/public/r/radio-group.json +1 -1
  260. package/public/r/registry.json +163 -26
  261. package/public/r/resizable.json +1 -1
  262. package/public/r/select.json +1 -1
  263. package/public/r/sheet.json +1 -1
  264. package/public/r/sidebar.json +1 -1
  265. package/public/r/slider.json +1 -1
  266. package/public/r/styles/base-luma/accordion.json +1 -1
  267. package/public/r/styles/base-luma/alert-dialog.json +1 -1
  268. package/public/r/styles/base-luma/code-block-examples.json +33 -0
  269. package/public/r/styles/base-luma/code-block.json +65 -0
  270. package/public/r/styles/base-luma/collapsible-examples.json +5 -0
  271. package/public/r/styles/base-luma/collapsible.json +2 -2
  272. package/public/r/styles/base-luma/combobox.json +3 -3
  273. package/public/r/styles/base-luma/command.json +2 -2
  274. package/public/r/styles/base-luma/components.json +2 -0
  275. package/public/r/styles/base-luma/dialog.json +1 -1
  276. package/public/r/styles/base-luma/drawer.json +1 -1
  277. package/public/r/styles/base-luma/dropdown-menu.json +1 -1
  278. package/public/r/styles/base-luma/hover-card.json +2 -2
  279. package/public/r/styles/base-luma/navigation-menu.json +1 -1
  280. package/public/r/styles/base-luma/popover.json +1 -1
  281. package/public/r/styles/base-luma/progress-examples.json +33 -0
  282. package/public/r/styles/base-luma/progress.json +23 -0
  283. package/public/r/styles/base-luma/radio-group.json +1 -1
  284. package/public/r/styles/base-luma/registry.json +163 -26
  285. package/public/r/styles/base-luma/resizable.json +1 -1
  286. package/public/r/styles/base-luma/select.json +1 -1
  287. package/public/r/styles/base-luma/sheet.json +1 -1
  288. package/public/r/styles/base-luma/sidebar.json +1 -1
  289. package/public/r/styles/base-luma/slider.json +1 -1
  290. package/public/r/styles/base-luma/switch.json +1 -1
  291. package/public/r/styles/base-luma/tabs.json +1 -1
  292. package/public/r/styles/base-luma/toast.json +1 -1
  293. package/public/r/styles/base-luma/toggle-group.json +1 -1
  294. package/public/r/styles/base-luma/toggle.json +1 -1
  295. package/public/r/styles/base-luma/tooltip.json +1 -1
  296. package/public/r/styles/base-lyra/accordion.json +1 -1
  297. package/public/r/styles/base-lyra/alert-dialog.json +1 -1
  298. package/public/r/styles/base-lyra/code-block-examples.json +33 -0
  299. package/public/r/styles/base-lyra/code-block.json +65 -0
  300. package/public/r/styles/base-lyra/collapsible-examples.json +5 -0
  301. package/public/r/styles/base-lyra/collapsible.json +2 -2
  302. package/public/r/styles/base-lyra/combobox.json +3 -3
  303. package/public/r/styles/base-lyra/command.json +2 -2
  304. package/public/r/styles/base-lyra/components.json +2 -0
  305. package/public/r/styles/base-lyra/dialog.json +1 -1
  306. package/public/r/styles/base-lyra/drawer.json +1 -1
  307. package/public/r/styles/base-lyra/dropdown-menu.json +1 -1
  308. package/public/r/styles/base-lyra/hover-card.json +2 -2
  309. package/public/r/styles/base-lyra/navigation-menu.json +1 -1
  310. package/public/r/styles/base-lyra/popover.json +1 -1
  311. package/public/r/styles/base-lyra/progress-examples.json +33 -0
  312. package/public/r/styles/base-lyra/progress.json +23 -0
  313. package/public/r/styles/base-lyra/radio-group.json +1 -1
  314. package/public/r/styles/base-lyra/registry.json +163 -26
  315. package/public/r/styles/base-lyra/resizable.json +1 -1
  316. package/public/r/styles/base-lyra/select.json +1 -1
  317. package/public/r/styles/base-lyra/sheet.json +1 -1
  318. package/public/r/styles/base-lyra/sidebar.json +1 -1
  319. package/public/r/styles/base-lyra/slider.json +1 -1
  320. package/public/r/styles/base-lyra/switch.json +1 -1
  321. package/public/r/styles/base-lyra/tabs.json +1 -1
  322. package/public/r/styles/base-lyra/toast.json +1 -1
  323. package/public/r/styles/base-lyra/toggle-group.json +1 -1
  324. package/public/r/styles/base-lyra/toggle.json +1 -1
  325. package/public/r/styles/base-lyra/tooltip.json +1 -1
  326. package/public/r/styles/base-maia/accordion.json +1 -1
  327. package/public/r/styles/base-maia/alert-dialog.json +1 -1
  328. package/public/r/styles/base-maia/code-block-examples.json +33 -0
  329. package/public/r/styles/base-maia/code-block.json +65 -0
  330. package/public/r/styles/base-maia/collapsible-examples.json +5 -0
  331. package/public/r/styles/base-maia/collapsible.json +2 -2
  332. package/public/r/styles/base-maia/combobox.json +3 -3
  333. package/public/r/styles/base-maia/command.json +2 -2
  334. package/public/r/styles/base-maia/components.json +2 -0
  335. package/public/r/styles/base-maia/dialog.json +1 -1
  336. package/public/r/styles/base-maia/drawer.json +1 -1
  337. package/public/r/styles/base-maia/dropdown-menu.json +1 -1
  338. package/public/r/styles/base-maia/hover-card.json +2 -2
  339. package/public/r/styles/base-maia/navigation-menu.json +1 -1
  340. package/public/r/styles/base-maia/popover.json +1 -1
  341. package/public/r/styles/base-maia/progress-examples.json +33 -0
  342. package/public/r/styles/base-maia/progress.json +23 -0
  343. package/public/r/styles/base-maia/radio-group.json +1 -1
  344. package/public/r/styles/base-maia/registry.json +163 -26
  345. package/public/r/styles/base-maia/resizable.json +1 -1
  346. package/public/r/styles/base-maia/select.json +1 -1
  347. package/public/r/styles/base-maia/sheet.json +1 -1
  348. package/public/r/styles/base-maia/sidebar.json +1 -1
  349. package/public/r/styles/base-maia/slider.json +1 -1
  350. package/public/r/styles/base-maia/switch.json +1 -1
  351. package/public/r/styles/base-maia/tabs.json +1 -1
  352. package/public/r/styles/base-maia/toast.json +1 -1
  353. package/public/r/styles/base-maia/toggle-group.json +1 -1
  354. package/public/r/styles/base-maia/toggle.json +1 -1
  355. package/public/r/styles/base-maia/tooltip.json +1 -1
  356. package/public/r/styles/base-mira/accordion.json +1 -1
  357. package/public/r/styles/base-mira/alert-dialog.json +1 -1
  358. package/public/r/styles/base-mira/code-block-examples.json +33 -0
  359. package/public/r/styles/base-mira/code-block.json +65 -0
  360. package/public/r/styles/base-mira/collapsible-examples.json +5 -0
  361. package/public/r/styles/base-mira/collapsible.json +2 -2
  362. package/public/r/styles/base-mira/combobox.json +3 -3
  363. package/public/r/styles/base-mira/command.json +2 -2
  364. package/public/r/styles/base-mira/components.json +2 -0
  365. package/public/r/styles/base-mira/dialog.json +1 -1
  366. package/public/r/styles/base-mira/drawer.json +1 -1
  367. package/public/r/styles/base-mira/dropdown-menu.json +1 -1
  368. package/public/r/styles/base-mira/hover-card.json +2 -2
  369. package/public/r/styles/base-mira/navigation-menu.json +1 -1
  370. package/public/r/styles/base-mira/popover.json +1 -1
  371. package/public/r/styles/base-mira/progress-examples.json +33 -0
  372. package/public/r/styles/base-mira/progress.json +23 -0
  373. package/public/r/styles/base-mira/radio-group.json +1 -1
  374. package/public/r/styles/base-mira/registry.json +163 -26
  375. package/public/r/styles/base-mira/resizable.json +1 -1
  376. package/public/r/styles/base-mira/select.json +1 -1
  377. package/public/r/styles/base-mira/sheet.json +1 -1
  378. package/public/r/styles/base-mira/sidebar.json +1 -1
  379. package/public/r/styles/base-mira/slider.json +1 -1
  380. package/public/r/styles/base-mira/switch.json +1 -1
  381. package/public/r/styles/base-mira/tabs.json +1 -1
  382. package/public/r/styles/base-mira/toast.json +1 -1
  383. package/public/r/styles/base-mira/toggle-group.json +1 -1
  384. package/public/r/styles/base-mira/toggle.json +1 -1
  385. package/public/r/styles/base-mira/tooltip.json +1 -1
  386. package/public/r/styles/base-nova/accordion.json +1 -1
  387. package/public/r/styles/base-nova/alert-dialog.json +1 -1
  388. package/public/r/styles/base-nova/code-block-examples.json +33 -0
  389. package/public/r/styles/base-nova/code-block.json +65 -0
  390. package/public/r/styles/base-nova/collapsible-examples.json +5 -0
  391. package/public/r/styles/base-nova/collapsible.json +2 -2
  392. package/public/r/styles/base-nova/combobox.json +3 -3
  393. package/public/r/styles/base-nova/command.json +2 -2
  394. package/public/r/styles/base-nova/components.json +2 -0
  395. package/public/r/styles/base-nova/dialog.json +1 -1
  396. package/public/r/styles/base-nova/drawer.json +1 -1
  397. package/public/r/styles/base-nova/dropdown-menu.json +1 -1
  398. package/public/r/styles/base-nova/hover-card.json +2 -2
  399. package/public/r/styles/base-nova/navigation-menu.json +1 -1
  400. package/public/r/styles/base-nova/popover.json +1 -1
  401. package/public/r/styles/base-nova/progress-examples.json +33 -0
  402. package/public/r/styles/base-nova/progress.json +23 -0
  403. package/public/r/styles/base-nova/radio-group.json +1 -1
  404. package/public/r/styles/base-nova/registry.json +163 -26
  405. package/public/r/styles/base-nova/resizable.json +1 -1
  406. package/public/r/styles/base-nova/select.json +1 -1
  407. package/public/r/styles/base-nova/sheet.json +1 -1
  408. package/public/r/styles/base-nova/sidebar.json +1 -1
  409. package/public/r/styles/base-nova/slider.json +1 -1
  410. package/public/r/styles/base-nova/switch.json +1 -1
  411. package/public/r/styles/base-nova/tabs.json +1 -1
  412. package/public/r/styles/base-nova/toast.json +1 -1
  413. package/public/r/styles/base-nova/toggle-group.json +1 -1
  414. package/public/r/styles/base-nova/toggle.json +1 -1
  415. package/public/r/styles/base-nova/tooltip.json +1 -1
  416. package/public/r/styles/base-rhea/accordion.json +1 -1
  417. package/public/r/styles/base-rhea/alert-dialog.json +1 -1
  418. package/public/r/styles/base-rhea/code-block-examples.json +33 -0
  419. package/public/r/styles/base-rhea/code-block.json +65 -0
  420. package/public/r/styles/base-rhea/collapsible-examples.json +5 -0
  421. package/public/r/styles/base-rhea/collapsible.json +2 -2
  422. package/public/r/styles/base-rhea/combobox.json +3 -3
  423. package/public/r/styles/base-rhea/command.json +2 -2
  424. package/public/r/styles/base-rhea/components.json +2 -0
  425. package/public/r/styles/base-rhea/dialog.json +1 -1
  426. package/public/r/styles/base-rhea/drawer.json +1 -1
  427. package/public/r/styles/base-rhea/dropdown-menu.json +1 -1
  428. package/public/r/styles/base-rhea/hover-card.json +2 -2
  429. package/public/r/styles/base-rhea/navigation-menu.json +1 -1
  430. package/public/r/styles/base-rhea/popover.json +1 -1
  431. package/public/r/styles/base-rhea/progress-examples.json +33 -0
  432. package/public/r/styles/base-rhea/progress.json +23 -0
  433. package/public/r/styles/base-rhea/radio-group.json +1 -1
  434. package/public/r/styles/base-rhea/registry.json +163 -26
  435. package/public/r/styles/base-rhea/resizable.json +1 -1
  436. package/public/r/styles/base-rhea/select.json +1 -1
  437. package/public/r/styles/base-rhea/sheet.json +1 -1
  438. package/public/r/styles/base-rhea/sidebar.json +1 -1
  439. package/public/r/styles/base-rhea/slider.json +1 -1
  440. package/public/r/styles/base-rhea/switch.json +1 -1
  441. package/public/r/styles/base-rhea/tabs.json +1 -1
  442. package/public/r/styles/base-rhea/toast.json +1 -1
  443. package/public/r/styles/base-rhea/toggle-group.json +1 -1
  444. package/public/r/styles/base-rhea/toggle.json +1 -1
  445. package/public/r/styles/base-rhea/tooltip.json +1 -1
  446. package/public/r/styles/base-sera/accordion.json +1 -1
  447. package/public/r/styles/base-sera/alert-dialog.json +1 -1
  448. package/public/r/styles/base-sera/code-block-examples.json +33 -0
  449. package/public/r/styles/base-sera/code-block.json +65 -0
  450. package/public/r/styles/base-sera/collapsible-examples.json +5 -0
  451. package/public/r/styles/base-sera/collapsible.json +2 -2
  452. package/public/r/styles/base-sera/combobox.json +3 -3
  453. package/public/r/styles/base-sera/command.json +2 -2
  454. package/public/r/styles/base-sera/components.json +2 -0
  455. package/public/r/styles/base-sera/dialog.json +1 -1
  456. package/public/r/styles/base-sera/drawer.json +1 -1
  457. package/public/r/styles/base-sera/dropdown-menu.json +1 -1
  458. package/public/r/styles/base-sera/hover-card.json +2 -2
  459. package/public/r/styles/base-sera/navigation-menu.json +1 -1
  460. package/public/r/styles/base-sera/popover.json +1 -1
  461. package/public/r/styles/base-sera/progress-examples.json +33 -0
  462. package/public/r/styles/base-sera/progress.json +23 -0
  463. package/public/r/styles/base-sera/radio-group.json +1 -1
  464. package/public/r/styles/base-sera/registry.json +163 -26
  465. package/public/r/styles/base-sera/resizable.json +1 -1
  466. package/public/r/styles/base-sera/select.json +1 -1
  467. package/public/r/styles/base-sera/sheet.json +1 -1
  468. package/public/r/styles/base-sera/sidebar.json +1 -1
  469. package/public/r/styles/base-sera/slider.json +1 -1
  470. package/public/r/styles/base-sera/switch.json +1 -1
  471. package/public/r/styles/base-sera/tabs.json +1 -1
  472. package/public/r/styles/base-sera/toast.json +1 -1
  473. package/public/r/styles/base-sera/toggle-group.json +1 -1
  474. package/public/r/styles/base-sera/toggle.json +1 -1
  475. package/public/r/styles/base-sera/tooltip.json +1 -1
  476. package/public/r/styles/base-vega/accordion.json +1 -1
  477. package/public/r/styles/base-vega/alert-dialog.json +1 -1
  478. package/public/r/styles/base-vega/code-block-examples.json +33 -0
  479. package/public/r/styles/base-vega/code-block.json +65 -0
  480. package/public/r/styles/base-vega/collapsible-examples.json +5 -0
  481. package/public/r/styles/base-vega/collapsible.json +2 -2
  482. package/public/r/styles/base-vega/combobox.json +3 -3
  483. package/public/r/styles/base-vega/command.json +2 -2
  484. package/public/r/styles/base-vega/components.json +2 -0
  485. package/public/r/styles/base-vega/dialog.json +1 -1
  486. package/public/r/styles/base-vega/drawer.json +1 -1
  487. package/public/r/styles/base-vega/dropdown-menu.json +1 -1
  488. package/public/r/styles/base-vega/hover-card.json +2 -2
  489. package/public/r/styles/base-vega/navigation-menu.json +1 -1
  490. package/public/r/styles/base-vega/popover.json +1 -1
  491. package/public/r/styles/base-vega/progress-examples.json +33 -0
  492. package/public/r/styles/base-vega/progress.json +23 -0
  493. package/public/r/styles/base-vega/radio-group.json +1 -1
  494. package/public/r/styles/base-vega/registry.json +163 -26
  495. package/public/r/styles/base-vega/resizable.json +1 -1
  496. package/public/r/styles/base-vega/select.json +1 -1
  497. package/public/r/styles/base-vega/sheet.json +1 -1
  498. package/public/r/styles/base-vega/sidebar.json +1 -1
  499. package/public/r/styles/base-vega/slider.json +1 -1
  500. package/public/r/styles/base-vega/switch.json +1 -1
  501. package/public/r/styles/base-vega/tabs.json +1 -1
  502. package/public/r/styles/base-vega/toast.json +1 -1
  503. package/public/r/styles/base-vega/toggle-group.json +1 -1
  504. package/public/r/styles/base-vega/toggle.json +1 -1
  505. package/public/r/styles/base-vega/tooltip.json +1 -1
  506. package/public/r/switch.json +1 -1
  507. package/public/r/tabs.json +1 -1
  508. package/public/r/toast.json +1 -1
  509. package/public/r/toggle-group.json +1 -1
  510. package/public/r/toggle.json +1 -1
  511. package/public/r/tooltip.json +1 -1
  512. package/registry.json +150 -26
  513. package/src/components/examples/code-block/code-block-demo.astro +24 -0
  514. package/src/components/examples/code-block/code-block-lines.astro +20 -0
  515. package/src/components/examples/code-block/code-block-numbered.astro +13 -0
  516. package/src/components/examples/code-block/code-block-wrap.astro +20 -0
  517. package/src/components/examples/collapsible/collapsible-dismissal.astro +46 -0
  518. package/src/components/examples/progress/progress-custom-max.astro +12 -0
  519. package/src/components/examples/progress/progress-demo.astro +10 -0
  520. package/src/components/examples/progress/progress-indeterminate.astro +5 -0
  521. package/src/components/examples/progress/progress-rtl.astro +11 -0
  522. package/src/components/ui/code-block/code-block-actions.astro +19 -0
  523. package/src/components/ui/code-block/code-block-content.astro +44 -0
  524. package/src/components/ui/code-block/code-block-copy-button.astro +88 -0
  525. package/src/components/ui/code-block/code-block-footer.astro +19 -0
  526. package/src/components/ui/code-block/code-block-header.astro +19 -0
  527. package/src/components/ui/code-block/code-block-line.astro +36 -0
  528. package/src/components/ui/code-block/code-block-title.astro +19 -0
  529. package/src/components/ui/code-block/code-block.astro +41 -0
  530. package/src/components/ui/code-block/index.ts +8 -0
  531. package/src/components/ui/collapsible/collapsible.astro +6 -0
  532. package/src/components/ui/combobox/combobox-input.astro +9 -2
  533. package/src/components/ui/progress/index.ts +1 -0
  534. package/src/components/ui/progress/progress.astro +83 -0
  535. package/src/styles/global.css +5 -0
@@ -0,0 +1,44 @@
1
+ import { createCarousel } from '@data-slot/carousel';
2
+
3
+ // @data-slot/carousel owns scrolling, snapping, dragging, the arrow keys and the previous and next
4
+ // buttons, and keeps every visible card interactive. It writes English ARIA descriptions and slide
5
+ // labels, so the translated ones from Liquid are put back after binding and slide updates.
6
+ export function initializeCarousel(root) {
7
+ const content = root.querySelector('[data-slot="carousel-content"]');
8
+ const items = () => [...content.children].filter((item) => item.matches('[data-slot="carousel-item"]'));
9
+ const rootDescription = root.getAttribute('aria-roledescription');
10
+ const descriptions = new WeakMap(items().map((item) => [item, item.getAttribute('aria-roledescription')]));
11
+ let destroyed = false;
12
+ const translate = () => {
13
+ if (destroyed) return;
14
+ if (rootDescription) root.setAttribute('aria-roledescription', rootDescription);
15
+ const slides = items();
16
+ const template = root.dataset.slideLabel;
17
+ slides.forEach((item, index) => {
18
+ const description = descriptions.get(item);
19
+ if (description) item.setAttribute('aria-roledescription', description);
20
+ if (template)
21
+ item.setAttribute('aria-label', template.replace('[index]', index + 1).replace('[total]', slides.length));
22
+ });
23
+ };
24
+ // Observe first to capture authored descriptions before data-slot rewrites them.
25
+ const observer = new MutationObserver((mutations) => {
26
+ for (const mutation of mutations)
27
+ for (const node of mutation.addedNodes)
28
+ if (node instanceof Element && node.matches('[data-slot="carousel-item"]'))
29
+ descriptions.set(node, node.getAttribute('aria-roledescription'));
30
+ queueMicrotask(translate);
31
+ });
32
+ observer.observe(content, { childList: true });
33
+ const carousel = createCarousel(root, { slides: 'multiple', drag: true, loop: false });
34
+ translate();
35
+ for (const button of root.querySelectorAll('[data-slot="carousel-previous"], [data-slot="carousel-next"]'))
36
+ button.hidden = false;
37
+ const destroy = carousel.destroy.bind(carousel);
38
+ carousel.destroy = () => {
39
+ destroyed = true;
40
+ observer.disconnect();
41
+ destroy();
42
+ };
43
+ return carousel;
44
+ }
@@ -0,0 +1,195 @@
1
+ // The data-slot controllers that few pages use, imported when theme.js finds their markup. Each
2
+ // entry starts one root and returns its controller with destroy(). Behavior is the vendored
3
+ // controller's; the adapters here only connect it to native forms and theme state.
4
+
5
+ // A composite input renders hidden after its native fallback, such as a select or radio inputs,
6
+ // which the form submits until the controller runs. Then the fallback leaves the document, so
7
+ // labels and the form see only the field the controller generates, and the fallback's id moves to
8
+ // the labelled element, so a label[for] still reaches the control. start() creates the controller
9
+ // with the fallback's reset default and the value a shopper chose while it loaded; its destroy()
10
+ // writes the current value back, and the fallback returns with its own reset default.
11
+ function replaceFallback(root, labelled, start) {
12
+ const fallback = root.previousElementSibling?.matches('[data-fallback]') ? root.previousElementSibling : null;
13
+ const attributes = ['id', 'aria-labelledby'].map((name) => [name, labelled.getAttribute(name)]);
14
+ const restore = () => {
15
+ root.hidden = true;
16
+ for (const [name, value] of attributes) {
17
+ if (value === null) labelled.removeAttribute(name);
18
+ else labelled.setAttribute(name, value);
19
+ }
20
+ if (fallback) root.before(fallback);
21
+ };
22
+ fallback?.remove();
23
+ if (fallback?.id) labelled.id = fallback.id;
24
+ root.hidden = false;
25
+ let controller;
26
+ try {
27
+ controller = start(fallback);
28
+ } catch (error) {
29
+ restore();
30
+ throw error;
31
+ }
32
+ return {
33
+ destroy() {
34
+ controller.destroy();
35
+ restore();
36
+ },
37
+ };
38
+ }
39
+
40
+ function initializeSelect({ createSelect }, root) {
41
+ return replaceFallback(root, root.querySelector('[data-slot="select-trigger"]'), (select) => {
42
+ const options = [...(select?.options ?? [])];
43
+ const initial = options.find((option) => option.defaultSelected) ?? options.find((option) => !option.disabled);
44
+ const controller = createSelect(root, { mountStrategy: 'eager', defaultValue: initial?.value || undefined });
45
+ const value = select?.value || null;
46
+ if (select && value !== controller.value) root.dispatchEvent(new CustomEvent('select:set', { detail: { value } }));
47
+ return {
48
+ destroy() {
49
+ if (select) select.value = controller.value ?? '';
50
+ controller.destroy();
51
+ },
52
+ };
53
+ });
54
+ }
55
+
56
+ function initializeRadioGroup({ createRadioGroup }, root) {
57
+ return replaceFallback(root, root, (fallback) => {
58
+ const inputs = [...(fallback?.querySelectorAll('input[type="radio"]') ?? [])];
59
+ const initial = inputs.find((input) => input.defaultChecked)?.value ?? '';
60
+ const controller = createRadioGroup(root, fallback ? { defaultValue: initial } : {});
61
+ const value = inputs.find((input) => input.checked)?.value ?? null;
62
+ if (fallback && value !== controller.value) {
63
+ if (value === null) controller.clear();
64
+ else controller.select(value);
65
+ }
66
+ return {
67
+ destroy() {
68
+ for (const input of inputs) input.checked = input.value === controller.value;
69
+ controller.destroy();
70
+ },
71
+ };
72
+ });
73
+ }
74
+
75
+ function initializeSwitch({ createSwitch }, root) {
76
+ return replaceFallback(root, root, (checkbox) => {
77
+ const controller = createSwitch(root, checkbox ? { defaultChecked: checkbox.defaultChecked } : {});
78
+ if (checkbox) controller.setChecked(checkbox.checked);
79
+ return {
80
+ destroy() {
81
+ if (checkbox) checkbox.checked = controller.checked;
82
+ controller.destroy();
83
+ },
84
+ };
85
+ });
86
+ }
87
+
88
+ // The slider has no form field of its own, so its native range inputs stay in the form, hidden,
89
+ // and follow its value. A form reset moves the slider back to the inputs' reset values.
90
+ function initializeSlider({ createSlider }, root) {
91
+ const fallback = root.previousElementSibling?.matches('[data-fallback]') ? root.previousElementSibling : null;
92
+ const inputs = fallback ? [...fallback.querySelectorAll('input[type="range"]')] : [];
93
+ const read = () => (inputs.length > 1 ? inputs.map((input) => Number(input.value)) : Number(inputs[0]?.value));
94
+ const write = (value) => {
95
+ [value].flat().forEach((number, index) => {
96
+ if (!inputs[index] || inputs[index].value === String(number)) return;
97
+ inputs[index].value = String(number);
98
+ inputs[index].dispatchEvent(new Event('input', { bubbles: true }));
99
+ });
100
+ };
101
+ const slider = createSlider(root, {
102
+ ...(inputs.length ? { defaultValue: read() } : {}),
103
+ onValueChange: write,
104
+ onValueCommit: () => inputs.forEach((input) => input.dispatchEvent(new Event('change', { bubbles: true }))),
105
+ });
106
+ const events = new AbortController();
107
+ inputs[0]?.form?.addEventListener('reset', () => setTimeout(() => slider.setValue(read())), {
108
+ signal: events.signal,
109
+ });
110
+ if (fallback) fallback.hidden = true;
111
+ root.hidden = false;
112
+ return {
113
+ destroy() {
114
+ events.abort();
115
+ slider.destroy();
116
+ root.hidden = true;
117
+ if (fallback) fallback.hidden = false;
118
+ },
119
+ };
120
+ }
121
+
122
+ // The action of an alert dialog is a native link or submit or reset button, and the controller
123
+ // leaves closing to the caller. A link closes the dialog on click; a submit or reset button once its
124
+ // form submits or resets, so an invalid form keeps its native validation and the dialog stays open.
125
+ function initializeAlertDialog({ createAlertDialog }, root) {
126
+ const dialog = createAlertDialog(root);
127
+ const events = new AbortController();
128
+ for (const action of root.querySelectorAll('[data-slot="alert-dialog-action"]')) {
129
+ action.addEventListener(
130
+ 'click',
131
+ () => {
132
+ const form = ['submit', 'reset'].includes(action.type) ? action.form : null;
133
+ if (form) form.addEventListener(action.type, () => dialog.close(), { once: true, signal: events.signal });
134
+ else dialog.close();
135
+ },
136
+ { signal: events.signal },
137
+ );
138
+ }
139
+ return {
140
+ destroy() {
141
+ events.abort();
142
+ dialog.destroy();
143
+ },
144
+ };
145
+ }
146
+
147
+ // Buttons inside a toaster show a toast with their translated title and description. Like other
148
+ // triggers that only open a popup, they show once the component has started (data-enhanced).
149
+ function initializeToaster({ createToast }, root) {
150
+ const toaster = createToast(root);
151
+ const events = new AbortController();
152
+ for (const button of root.querySelectorAll('[data-toast-title]')) {
153
+ button.addEventListener(
154
+ 'click',
155
+ () => toaster.show({ title: button.dataset.toastTitle, description: button.dataset.toastDescription }),
156
+ { signal: events.signal },
157
+ );
158
+ }
159
+ return {
160
+ destroy() {
161
+ events.abort();
162
+ toaster.destroy();
163
+ },
164
+ };
165
+ }
166
+
167
+ // Each entry loads its data-slot package, then starts one root with it and returns a controller
168
+ // with destroy(). theme.js starts the root only if it is still current once the package has
169
+ // loaded. Select, tooltip and hover card keep their closed content connected (eager), so nested
170
+ // components and the lifecycle in theme.js never see it leave the document.
171
+ export const controls = {
172
+ select: [() => import('@data-slot/select'), initializeSelect],
173
+ 'radio-group': [() => import('@data-slot/radio-group'), initializeRadioGroup],
174
+ switch: [() => import('@data-slot/switch'), initializeSwitch],
175
+ slider: [() => import('@data-slot/slider'), initializeSlider],
176
+ toggle: [() => import('@data-slot/toggle'), ({ createToggle }, root) => createToggle(root)],
177
+ 'toggle-group': [() => import('@data-slot/toggle-group'), ({ createToggleGroup }, root) => createToggleGroup(root)],
178
+ collapsible: [() => import('@data-slot/collapsible'), ({ createCollapsible }, root) => createCollapsible(root)],
179
+ popover: [() => import('@data-slot/popover'), ({ createPopover }, root) => createPopover(root)],
180
+ 'hover-card': [
181
+ () => import('@data-slot/hover-card'),
182
+ ({ createHoverCard }, root) => createHoverCard(root, { mountStrategy: 'eager' }),
183
+ ],
184
+ tooltip: [
185
+ () => import('@data-slot/tooltip'),
186
+ ({ createTooltip }, root) => createTooltip(root, { mountStrategy: 'eager' }),
187
+ ],
188
+ 'dropdown-menu': [
189
+ () => import('@data-slot/dropdown-menu'),
190
+ ({ createDropdownMenu }, root) => createDropdownMenu(root),
191
+ ],
192
+ 'alert-dialog': [() => import('@data-slot/alert-dialog'), initializeAlertDialog],
193
+ drawer: [() => import('@data-slot/drawer'), ({ createDrawer }, root) => createDrawer(root)],
194
+ toast: [() => import('@data-slot/toast'), initializeToaster],
195
+ };
@@ -0,0 +1,107 @@
1
+ // One owner per root, including asynchronous imports and Shopify editor replacements.
2
+ export function createLifecycle(factories, scope = document) {
3
+ const components = new Map();
4
+ const events = new AbortController();
5
+
6
+ function initialize(parent) {
7
+ for (const [selector, factory] of factories) {
8
+ const roots = [...parent.querySelectorAll(selector)];
9
+ if (parent.matches?.(selector)) roots.unshift(parent);
10
+ for (const root of roots) {
11
+ if (components.has(root) || !root.isConnected) continue;
12
+ try {
13
+ const controller = factory(root);
14
+ components.set(root, controller);
15
+ if (!controller.ready) root.dataset.enhanced = '';
16
+ controller.ready?.then(
17
+ () => {
18
+ if (components.get(root) === controller) root.dataset.enhanced = '';
19
+ },
20
+ (error) => {
21
+ console.error(error);
22
+ if (components.get(root) === controller) components.delete(root);
23
+ },
24
+ );
25
+ } catch (error) {
26
+ console.error(error);
27
+ }
28
+ }
29
+ }
30
+ }
31
+
32
+ function destroy(predicate) {
33
+ for (const [root, controller] of components) {
34
+ if (!predicate(root)) continue;
35
+ // Drop ownership before a fallback is restored and the observer sees it.
36
+ components.delete(root);
37
+ controller.destroy?.();
38
+ delete root.dataset.enhanced;
39
+ }
40
+ }
41
+
42
+ function reveal(root, method, value) {
43
+ const owner = components.get(root);
44
+ const apply = (controller) => {
45
+ if (owner && components.get(root) === owner) controller?.[method]?.(value);
46
+ };
47
+ // A selected block can arrive while its controller is still loading.
48
+ if (owner?.ready)
49
+ owner.ready.then(
50
+ (controller) => apply(controller ?? owner),
51
+ () => {},
52
+ );
53
+ else apply(owner);
54
+ }
55
+
56
+ initialize(scope);
57
+ const observer = new MutationObserver((mutations) => {
58
+ for (const mutation of mutations) {
59
+ for (const node of mutation.addedNodes) {
60
+ if (node.nodeType === Node.ELEMENT_NODE && node.isConnected) initialize(node);
61
+ }
62
+ }
63
+ if (mutations.some((mutation) => mutation.removedNodes.length)) destroy((root) => !root.isConnected);
64
+ });
65
+ observer.observe(scope === document ? document.body : scope, { childList: true, subtree: true });
66
+ document.addEventListener('shopify:section:load', (event) => initialize(event.target), { signal: events.signal });
67
+ document.addEventListener('shopify:section:unload', (event) => destroy((root) => event.target.contains(root)), {
68
+ signal: events.signal,
69
+ });
70
+ document.addEventListener(
71
+ 'shopify:block:select',
72
+ (event) => {
73
+ const item = event.target.closest('[data-slot="accordion-item"]');
74
+ if (item) reveal(item.closest('[data-slot="accordion"]'), 'expand', item.dataset.value);
75
+ const slide = event.target.closest('[data-slot="carousel-item"]');
76
+ if (slide)
77
+ reveal(slide.closest('[data-slot="carousel"]'), 'goTo', [...slide.parentElement.children].indexOf(slide));
78
+ },
79
+ { signal: events.signal },
80
+ );
81
+ return {
82
+ components,
83
+ initialize,
84
+ destroy() {
85
+ observer.disconnect();
86
+ events.abort();
87
+ destroy(() => true);
88
+ },
89
+ };
90
+ }
91
+
92
+ export function deferred(load, start) {
93
+ return (root) => {
94
+ let controller;
95
+ let destroyed = false;
96
+ const ready = load().then((module) => {
97
+ if (!destroyed && root.isConnected) return (controller = start(module, root));
98
+ });
99
+ return {
100
+ ready,
101
+ destroy() {
102
+ destroyed = true;
103
+ controller?.destroy();
104
+ },
105
+ };
106
+ };
107
+ }
@@ -0,0 +1,45 @@
1
+ const reducedMotion = matchMedia('(prefers-reduced-motion: reduce)');
2
+
3
+ // A pause button for a CSS animation that runs on its own, such as a marquee. Its label stays Pause
4
+ // and aria-pressed carries the state: pressed while the animation is paused.
5
+ export function initializeMotionPause(button) {
6
+ const root = button.closest('[data-motion]');
7
+ const events = new AbortController();
8
+ // CSS animates the root only from here on, so it never moves without a working pause button.
9
+ root.dataset.motionReady = '';
10
+ const sync = () => {
11
+ button.hidden = reducedMotion.matches;
12
+ };
13
+ button.addEventListener(
14
+ 'click',
15
+ () => {
16
+ const paused = button.getAttribute('aria-pressed') !== 'true';
17
+ button.setAttribute('aria-pressed', String(paused));
18
+ root.toggleAttribute('data-paused', paused);
19
+ },
20
+ { signal: events.signal },
21
+ );
22
+ reducedMotion.addEventListener('change', sync, { signal: events.signal });
23
+ sync();
24
+ return {
25
+ destroy() {
26
+ events.abort();
27
+ delete root.dataset.motionReady;
28
+ },
29
+ };
30
+ }
31
+
32
+ // Muted autoplay videos stay still for visitors who prefer reduced motion; they keep their controls.
33
+ export function initializeAutoplayVideo(video) {
34
+ const events = new AbortController();
35
+ const sync = () => {
36
+ if (reducedMotion.matches) video.pause();
37
+ };
38
+ reducedMotion.addEventListener('change', sync, { signal: events.signal });
39
+ sync();
40
+ return {
41
+ destroy() {
42
+ events.abort();
43
+ },
44
+ };
45
+ }
@@ -0,0 +1,37 @@
1
+ import { controls } from '@fulldev/controls';
2
+ import { createLifecycle, deferred } from '@fulldev/lifecycle';
3
+ import { initializeAutoplayVideo, initializeMotionPause } from '@fulldev/motion';
4
+
5
+ const simple = [
6
+ ['accordion', () => import('@data-slot/accordion'), 'createAccordion'],
7
+ ['tabs', () => import('@data-slot/tabs'), 'createTabs'],
8
+ ['dialog', () => import('@data-slot/dialog'), 'createDialog'],
9
+ ['combobox', () => import('@data-slot/combobox'), 'createCombobox'],
10
+ ['command', () => import('@data-slot/command'), 'createCommand'],
11
+ ['navigation-menu', () => import('@data-slot/navigation-menu'), 'createNavigationMenu'],
12
+ ];
13
+
14
+ export const lifecycle = createLifecycle([
15
+ ['[data-motion-pause]', initializeMotionPause],
16
+ ['video[autoplay]', initializeAutoplayVideo],
17
+ ...simple.map(([name, load, factory]) => [
18
+ `[data-slot="${name}"]`,
19
+ deferred(load, (module, root) =>
20
+ module[factory](root, {
21
+ mountStrategy: 'eager',
22
+ ...(name === 'accordion' ? { multiple: root.dataset.multiple !== 'false' } : {}),
23
+ }),
24
+ ),
25
+ ]),
26
+ [
27
+ '[data-slot="carousel"]',
28
+ deferred(
29
+ () => import('@fulldev/carousel'),
30
+ (module, root) => module.initializeCarousel(root),
31
+ ),
32
+ ],
33
+ ...Object.entries(controls).map(([name, [load, start]]) => [
34
+ name === 'toggle' ? 'button[data-slot="toggle"]' : `[data-slot="${name}"]`,
35
+ deferred(load, start),
36
+ ]),
37
+ ]);
@@ -0,0 +1,6 @@
1
+ {% doc %}
2
+ Fulldev UI tokens and native base. Render once in the head before theme overrides.
3
+ {% enddoc %}
4
+
5
+ {{ 'ui-tokens.css' | asset_url | stylesheet_tag: preload: true }}
6
+ {% render 'ui-base' %}
@@ -0,0 +1,9 @@
1
+ {% doc %}
2
+ Default Fulldev UI runtime. Render once in the head, before other module scripts.
3
+ Use your own import map and createLifecycle when the theme supplies Shopify adapters.
4
+ {% enddoc %}
5
+
6
+ <script type='importmap'>
7
+ {"imports": {"@fulldev/motion":{{ 'ui-motion.js' | asset_url | json }},"@fulldev/lifecycle":{{ 'ui-lifecycle.js' | asset_url | json }},"@fulldev/controls":{{ 'ui-controls.js' | asset_url | json }},"@fulldev/carousel":{{ 'ui-carousel.js' | asset_url | json }},"@data-slot/core":{{ 'data-slot-core.js' | asset_url | json }},"@data-slot/dialog":{{ 'data-slot-dialog.js' | asset_url | json }},"@data-slot/command":{{ 'data-slot-command.js' | asset_url | json }},"@data-slot/navigation-menu":{{ 'data-slot-navigation-menu.js' | asset_url | json }},"@data-slot/accordion":{{ 'data-slot-accordion.js' | asset_url | json }},"@data-slot/tabs":{{ 'data-slot-tabs.js' | asset_url | json }},"@data-slot/combobox":{{ 'data-slot-combobox.js' | asset_url | json }},"@data-slot/carousel":{{ 'data-slot-carousel.js' | asset_url | json }},"@data-slot/alert-dialog":{{ 'data-slot-alert-dialog.js' | asset_url | json }},"@data-slot/collapsible":{{ 'data-slot-collapsible.js' | asset_url | json }},"@data-slot/drawer":{{ 'data-slot-drawer.js' | asset_url | json }},"@data-slot/dropdown-menu":{{ 'data-slot-dropdown-menu.js' | asset_url | json }},"@data-slot/hover-card":{{ 'data-slot-hover-card.js' | asset_url | json }},"@data-slot/popover":{{ 'data-slot-popover.js' | asset_url | json }},"@data-slot/radio-group":{{ 'data-slot-radio-group.js' | asset_url | json }},"@data-slot/select":{{ 'data-slot-select.js' | asset_url | json }},"@data-slot/slider":{{ 'data-slot-slider.js' | asset_url | json }},"@data-slot/switch":{{ 'data-slot-switch.js' | asset_url | json }},"@data-slot/toast":{{ 'data-slot-toast.js' | asset_url | json }},"@data-slot/toggle":{{ 'data-slot-toggle.js' | asset_url | json }},"@data-slot/toggle-group":{{ 'data-slot-toggle-group.js' | asset_url | json }},"@data-slot/tooltip":{{ 'data-slot-tooltip.js' | asset_url | json }}}}
8
+ </script>
9
+ <script src='{{ 'ui-start.js' | asset_url }}' type='module'></script>
@@ -0,0 +1,68 @@
1
+ {% doc %}
2
+ All Fulldev UI styles. Render once in the head before theme styles.
3
+
4
+ @param {boolean} [runtime] - False when the theme owns its import map and initialization.
5
+ {% enddoc %}
6
+
7
+ {% render 'ui-init' %}
8
+ {% render 'ui-banner' %}
9
+ {% render 'ui-tabs' %}
10
+ {% render 'ui-form' %}
11
+ {% render 'ui-select' %}
12
+ {% render 'ui-field' %}
13
+ {% render 'ui-item' %}
14
+ {% render 'ui-spinner' %}
15
+ {% render 'ui-video' %}
16
+ {% render 'ui-button' %}
17
+ {% render 'ui-toggle' %}
18
+ {% render 'ui-logo' %}
19
+ {% render 'ui-kbd' %}
20
+ {% render 'ui-rating' %}
21
+ {% render 'ui-tooltip' %}
22
+ {% render 'ui-avatar' %}
23
+ {% render 'ui-empty' %}
24
+ {% render 'ui-alert-dialog' %}
25
+ {% render 'ui-navigation-menu' %}
26
+ {% render 'ui-typography' %}
27
+ {% render 'ui-toc' %}
28
+ {% render 'ui-icon' %}
29
+ {% render 'ui-combobox' %}
30
+ {% render 'ui-toast' %}
31
+ {% render 'ui-header' %}
32
+ {% render 'ui-command' %}
33
+ {% render 'ui-accordion' %}
34
+ {% render 'ui-slider' %}
35
+ {% render 'ui-input' %}
36
+ {% render 'ui-input-group' %}
37
+ {% render 'ui-triggers' %}
38
+ {% render 'ui-toggle-group' %}
39
+ {% render 'ui-dialog' %}
40
+ {% render 'ui-drawer' %}
41
+ {% render 'ui-badge' %}
42
+ {% render 'ui-alert' %}
43
+ {% render 'ui-table' %}
44
+ {% render 'ui-breadcrumb' %}
45
+ {% render 'ui-aspect-ratio' %}
46
+ {% render 'ui-price' %}
47
+ {% render 'ui-radio-group' %}
48
+ {% render 'ui-checkbox' %}
49
+ {% render 'ui-switch' %}
50
+ {% render 'ui-skeleton' %}
51
+ {% render 'ui-separator' %}
52
+ {% render 'ui-card' %}
53
+ {% render 'ui-pagination' %}
54
+ {% render 'ui-popup' %}
55
+ {% render 'ui-sheet' %}
56
+ {% render 'ui-carousel' %}
57
+ {% render 'ui-attachment' %}
58
+ {% render 'ui-marquee' %}
59
+ {% render 'ui-invalid-controls' %}
60
+ {% render 'ui-section' %}
61
+ {% render 'ui-button-group' %}
62
+ {% render 'ui-collapsible' %}
63
+ {% render 'ui-dropdown-menu' %}
64
+ {% render 'ui-popover' %}
65
+ {% render 'ui-hover-card' %}
66
+ {% if runtime != false %}
67
+ {% render 'ui-runtime' %}
68
+ {% endif %}
@@ -0,0 +1,66 @@
1
+ /* The data-slot accordion, and the same parts on native <details> and <summary>, which open
2
+ without JavaScript. */
3
+ [data-slot='accordion'] {
4
+ display: flex;
5
+ flex-direction: column;
6
+ width: 100%;
7
+ }
8
+ [data-slot='accordion-item']:not(:last-child) {
9
+ border-bottom: 1px solid var(--border);
10
+ }
11
+ .accordion__heading {
12
+ font: inherit;
13
+ letter-spacing: var(--tracking-normal);
14
+ }
15
+ [data-slot='accordion-trigger'] {
16
+ display: flex;
17
+ align-items: flex-start;
18
+ justify-content: space-between;
19
+ gap: calc(var(--spacing) * 4);
20
+ width: 100%;
21
+ padding-block: calc(var(--spacing) * 4);
22
+ border: 1px solid transparent;
23
+ border-radius: var(--radius-md);
24
+ font-size: 0.875rem;
25
+ font-weight: 500;
26
+ line-height: 1.43;
27
+ text-align: left;
28
+ list-style: none;
29
+ outline: none;
30
+ }
31
+ summary[data-slot='accordion-trigger']::-webkit-details-marker {
32
+ display: none;
33
+ }
34
+ [data-slot='accordion-trigger']:hover {
35
+ text-decoration: underline;
36
+ }
37
+ [data-slot='accordion-trigger']:focus-visible {
38
+ border-color: var(--ring);
39
+ box-shadow: var(--focus-ring);
40
+ }
41
+ [data-slot='accordion-trigger'] > .icon {
42
+ width: calc(var(--spacing) * 4);
43
+ height: calc(var(--spacing) * 4);
44
+ margin-left: auto;
45
+ color: var(--muted-foreground);
46
+ transition: rotate 200ms;
47
+ }
48
+ [data-slot='accordion-item'][data-state='open'] [data-slot='accordion-trigger'] > .icon,
49
+ details[open] > [data-slot='accordion-trigger'] > .icon {
50
+ rotate: 180deg;
51
+ }
52
+ [data-slot='accordion-content'] {
53
+ overflow: hidden;
54
+ font-size: 0.875rem;
55
+ }
56
+ [data-slot='accordion'] [data-slot='accordion-content'] {
57
+ height: var(--accordion-panel-height);
58
+ transition: height 200ms ease;
59
+ }
60
+ [data-slot='accordion-content'][data-starting-style],
61
+ [data-slot='accordion-content'][data-ending-style] {
62
+ height: 0;
63
+ }
64
+ [data-slot='accordion-content-inner'] {
65
+ padding-bottom: calc(var(--spacing) * 4);
66
+ }