@zyncat/ui 0.13.1 → 0.15.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 (440) hide show
  1. package/README.md +72 -13
  2. package/dist/alert.css +26 -33
  3. package/dist/alert.js +18 -17
  4. package/dist/alert.js.map +1 -1
  5. package/dist/avatar-group.js +2 -2
  6. package/dist/avatar-group.js.map +1 -1
  7. package/dist/avatar.css +51 -50
  8. package/dist/avatar.js +29 -7
  9. package/dist/avatar.js.map +1 -1
  10. package/dist/badge.css +30 -36
  11. package/dist/badge.js +1 -1
  12. package/dist/button.css +80 -96
  13. package/dist/button.js +1 -1
  14. package/dist/checkbox.css +27 -32
  15. package/dist/checkbox.js +2 -2
  16. package/dist/{chunk-RJFGWJ4W.js → chunk-3XRVPCIM.js} +6 -6
  17. package/dist/chunk-3XRVPCIM.js.map +1 -0
  18. package/dist/{chunk-M43IOM5C.js → chunk-5GBV45YD.js} +3 -3
  19. package/dist/{chunk-M43IOM5C.js.map → chunk-5GBV45YD.js.map} +1 -1
  20. package/dist/{chunk-45R4Z5XN.js → chunk-5VC3TUZ2.js} +4 -4
  21. package/dist/{chunk-45R4Z5XN.js.map → chunk-5VC3TUZ2.js.map} +1 -1
  22. package/dist/{chunk-A5WTZACK.js → chunk-5W5TKANX.js} +3 -3
  23. package/dist/{chunk-A5WTZACK.js.map → chunk-5W5TKANX.js.map} +1 -1
  24. package/dist/{chunk-AADAJL7D.js → chunk-5X3MJRIM.js} +8 -9
  25. package/dist/chunk-5X3MJRIM.js.map +1 -0
  26. package/dist/{chunk-TCUCYFT7.js → chunk-6SUHSSOK.js} +3 -3
  27. package/dist/{chunk-TCUCYFT7.js.map → chunk-6SUHSSOK.js.map} +1 -1
  28. package/dist/{chunk-DDRSMHN4.js → chunk-6X3G4GIM.js} +3 -3
  29. package/dist/{chunk-DDRSMHN4.js.map → chunk-6X3G4GIM.js.map} +1 -1
  30. package/dist/{chunk-TYHR4VNM.js → chunk-AREEMG47.js} +10 -8
  31. package/dist/chunk-AREEMG47.js.map +1 -0
  32. package/dist/{chunk-EF6RPXU7.js → chunk-BH4JFWXQ.js} +36 -31
  33. package/dist/chunk-BH4JFWXQ.js.map +1 -0
  34. package/dist/{chunk-TVYH4AN7.js → chunk-BTF6DAE3.js} +13 -13
  35. package/dist/chunk-BTF6DAE3.js.map +1 -0
  36. package/dist/{chunk-CF4QHO4N.js → chunk-CAXQJSIE.js} +10 -10
  37. package/dist/{chunk-CF4QHO4N.js.map → chunk-CAXQJSIE.js.map} +1 -1
  38. package/dist/{chunk-4C5RZXBT.js → chunk-CFRGQJ23.js} +8 -8
  39. package/dist/chunk-CFRGQJ23.js.map +1 -0
  40. package/dist/{chunk-IJS7TPGV.js → chunk-FEXUS4SV.js} +6 -5
  41. package/dist/chunk-FEXUS4SV.js.map +1 -0
  42. package/dist/{chunk-227ZW4V7.js → chunk-FLQVOSFC.js} +11 -11
  43. package/dist/chunk-FLQVOSFC.js.map +1 -0
  44. package/dist/{chunk-FONOS5RN.js → chunk-FVPNICF4.js} +11 -10
  45. package/dist/chunk-FVPNICF4.js.map +1 -0
  46. package/dist/{chunk-I45AU6KH.js → chunk-GGDAMIBH.js} +13 -7
  47. package/dist/chunk-GGDAMIBH.js.map +1 -0
  48. package/dist/{chunk-4BSHB7R3.js → chunk-GJTHWB6O.js} +9 -9
  49. package/dist/chunk-GJTHWB6O.js.map +1 -0
  50. package/dist/{chunk-EAI4POPB.js → chunk-GOLSYGRA.js} +45 -75
  51. package/dist/chunk-GOLSYGRA.js.map +1 -0
  52. package/dist/chunk-H3X2263Y.js +17 -0
  53. package/dist/chunk-H3X2263Y.js.map +1 -0
  54. package/dist/chunk-K45CWVHS.js +53 -0
  55. package/dist/chunk-K45CWVHS.js.map +1 -0
  56. package/dist/{chunk-JY6A2ZJZ.js → chunk-LNAV5E7S.js} +2 -2
  57. package/dist/{chunk-JY6A2ZJZ.js.map → chunk-LNAV5E7S.js.map} +1 -1
  58. package/dist/{chunk-TUTXXC3W.js → chunk-MDSRZ4QR.js} +3 -3
  59. package/dist/{chunk-TUTXXC3W.js.map → chunk-MDSRZ4QR.js.map} +1 -1
  60. package/dist/chunk-N2GJEO5Z.js +101 -0
  61. package/dist/chunk-N2GJEO5Z.js.map +1 -0
  62. package/dist/chunk-PU3QWBEL.js +39 -0
  63. package/dist/chunk-PU3QWBEL.js.map +1 -0
  64. package/dist/{chunk-43M6GQ4Q.js → chunk-PWQVSVXR.js} +51 -32
  65. package/dist/chunk-PWQVSVXR.js.map +1 -0
  66. package/dist/chunk-QGVFFT2B.js +14 -0
  67. package/dist/chunk-QGVFFT2B.js.map +1 -0
  68. package/dist/{chunk-5PZ43DCG.js → chunk-RBSHRRNO.js} +12 -13
  69. package/dist/chunk-RBSHRRNO.js.map +1 -0
  70. package/dist/{chunk-XNIYSAMJ.js → chunk-RW2A4M2Q.js} +14 -9
  71. package/dist/chunk-RW2A4M2Q.js.map +1 -0
  72. package/dist/{chunk-HY5MPISE.js → chunk-UYSXJ7MH.js} +9 -9
  73. package/dist/chunk-UYSXJ7MH.js.map +1 -0
  74. package/dist/chunk-VDOBLABP.js +38 -0
  75. package/dist/chunk-VDOBLABP.js.map +1 -0
  76. package/dist/chunk-VNVVG47J.js +12 -0
  77. package/dist/chunk-VNVVG47J.js.map +1 -0
  78. package/dist/{chunk-3MPF7FZV.js → chunk-WCWV5IX6.js} +3 -3
  79. package/dist/{chunk-3MPF7FZV.js.map → chunk-WCWV5IX6.js.map} +1 -1
  80. package/dist/{chunk-VAXCXZ53.js → chunk-WZUTBJC4.js} +5 -4
  81. package/dist/chunk-WZUTBJC4.js.map +1 -0
  82. package/dist/cli.js +135 -23
  83. package/dist/collapse.css +15 -30
  84. package/dist/collapse.js +1 -1
  85. package/dist/confetti.css +19 -12
  86. package/dist/confetti.js +7 -6
  87. package/dist/confetti.js.map +1 -1
  88. package/dist/count-badge.js +2 -2
  89. package/dist/date-field.js +20 -19
  90. package/dist/date-field.js.map +1 -1
  91. package/dist/date-picker.css +131 -154
  92. package/dist/date-range-field.js +55 -54
  93. package/dist/date-range-field.js.map +1 -1
  94. package/dist/datetime-field.js +24 -23
  95. package/dist/datetime-field.js.map +1 -1
  96. package/dist/dialog.css +31 -41
  97. package/dist/dialog.js +23 -22
  98. package/dist/dialog.js.map +1 -1
  99. package/dist/digit-strip.css +16 -16
  100. package/dist/dropdown.css +36 -27
  101. package/dist/dropdown.js +77 -40
  102. package/dist/dropdown.js.map +1 -1
  103. package/dist/emoji-picker.js +44 -45
  104. package/dist/emoji-picker.js.map +1 -1
  105. package/dist/facebook-feed.css +145 -148
  106. package/dist/facebook-feed.js +106 -102
  107. package/dist/facebook-feed.js.map +1 -1
  108. package/dist/flow-field.css +8 -4
  109. package/dist/flow-field.js +7 -6
  110. package/dist/flow-field.js.map +1 -1
  111. package/dist/glide.js +4 -3
  112. package/dist/icon.css +7 -10
  113. package/dist/input.css +76 -84
  114. package/dist/instagram-feed.css +65 -66
  115. package/dist/instagram-feed.js +61 -44
  116. package/dist/instagram-feed.js.map +1 -1
  117. package/dist/lens.css +42 -38
  118. package/dist/lens.js +17 -16
  119. package/dist/lens.js.map +1 -1
  120. package/dist/mcp.js +3 -2
  121. package/dist/menu-surface.css +54 -34
  122. package/dist/modal.css +2 -4
  123. package/dist/modal.js +12 -11
  124. package/dist/modal.js.map +1 -1
  125. package/dist/morphing-text.css +26 -16
  126. package/dist/morphing-text.js +14 -13
  127. package/dist/morphing-text.js.map +1 -1
  128. package/dist/motion-devtools.css +42 -68
  129. package/dist/motion-devtools.js +47 -39
  130. package/dist/motion-devtools.js.map +1 -1
  131. package/dist/motion-tokens.js +1 -1
  132. package/dist/multi-select.js +21 -16
  133. package/dist/multi-select.js.map +1 -1
  134. package/dist/number-field.js +14 -14
  135. package/dist/number-field.js.map +1 -1
  136. package/dist/odometer.css +22 -16
  137. package/dist/odometer.js +12 -11
  138. package/dist/odometer.js.map +1 -1
  139. package/dist/otp-field.js +3 -3
  140. package/dist/otp-field.js.map +1 -1
  141. package/dist/overlay.css +4 -9
  142. package/dist/pagination.css +10 -15
  143. package/dist/pagination.js +11 -10
  144. package/dist/pagination.js.map +1 -1
  145. package/dist/popover.css +13 -15
  146. package/dist/popover.js +10 -9
  147. package/dist/radio-group.css +60 -73
  148. package/dist/radio-group.js +30 -29
  149. package/dist/radio-group.js.map +1 -1
  150. package/dist/select.css +66 -75
  151. package/dist/select.js +19 -14
  152. package/dist/select.js.map +1 -1
  153. package/dist/sheet.css +12 -14
  154. package/dist/sheet.js +11 -10
  155. package/dist/status-badge.js +9 -9
  156. package/dist/status-badge.js.map +1 -1
  157. package/dist/styles.css +34 -34
  158. package/dist/support-rail.css +116 -100
  159. package/dist/support-rail.js +41 -40
  160. package/dist/support-rail.js.map +1 -1
  161. package/dist/table.css +76 -84
  162. package/dist/table.js +42 -41
  163. package/dist/table.js.map +1 -1
  164. package/dist/tabs.css +82 -90
  165. package/dist/tabs.js +23 -20
  166. package/dist/tabs.js.map +1 -1
  167. package/dist/tag.css +48 -53
  168. package/dist/tag.js +13 -12
  169. package/dist/tag.js.map +1 -1
  170. package/dist/text-field.js +5 -5
  171. package/dist/textarea.css +46 -49
  172. package/dist/textarea.js +16 -16
  173. package/dist/textarea.js.map +1 -1
  174. package/dist/theme.js +31 -15
  175. package/dist/theme.js.map +1 -1
  176. package/dist/tiktok.css +113 -117
  177. package/dist/tiktok.js +53 -52
  178. package/dist/tiktok.js.map +1 -1
  179. package/dist/time-field.js +26 -20
  180. package/dist/time-field.js.map +1 -1
  181. package/dist/toast-store.js +2 -1
  182. package/dist/toast.css +49 -65
  183. package/dist/toast.js +32 -26
  184. package/dist/toast.js.map +1 -1
  185. package/dist/toggle-tag.js +22 -13
  186. package/dist/toggle-tag.js.map +1 -1
  187. package/dist/toggle.css +26 -31
  188. package/dist/toggle.js +7 -7
  189. package/dist/toggle.js.map +1 -1
  190. package/dist/tooltip.css +16 -23
  191. package/dist/tooltip.js +117 -95
  192. package/dist/tooltip.js.map +1 -1
  193. package/dist/trigger.css +3 -3
  194. package/dist/types/components/composites/alert/Alert.d.ts +1 -2
  195. package/dist/types/components/composites/date-picker/TimeField.d.ts +1 -2
  196. package/dist/types/components/composites/date-picker/field-shell.d.ts +1 -1
  197. package/dist/types/components/composites/date-picker/time-core.d.ts +1 -2
  198. package/dist/types/components/composites/dropdown/Dropdown.d.ts +9 -1
  199. package/dist/types/components/composites/dropdown/types.d.ts +14 -0
  200. package/dist/types/components/composites/emoji-picker/EmojiPickerPanel.d.ts +1 -1
  201. package/dist/types/components/composites/emoji-picker/data.d.ts +2 -5
  202. package/dist/types/components/composites/emoji-picker/react/useEmojiPicker.d.ts +0 -11
  203. package/dist/types/components/composites/emoji-picker/types.d.ts +3 -8
  204. package/dist/types/components/composites/select/MultiSelect.d.ts +6 -1
  205. package/dist/types/components/composites/select/Select.d.ts +6 -1
  206. package/dist/types/components/composites/select/core/index.d.ts +1 -1
  207. package/dist/types/components/composites/select/core/menu.d.ts +3 -3
  208. package/dist/types/components/composites/select/core/panel.d.ts +3 -3
  209. package/dist/types/components/composites/tabs/Tabs.d.ts +7 -10
  210. package/dist/types/components/composites/toast/Toast.d.ts +1 -1
  211. package/dist/types/components/composites/tooltip/Tooltip.d.ts +9 -1
  212. package/dist/types/components/composites/tooltip/tooltip-store.d.ts +5 -6
  213. package/dist/types/components/dev/MotionDevtools.d.ts +3 -1
  214. package/dist/types/components/internal/hooks/use-host-election.d.ts +8 -0
  215. package/dist/types/components/internal/icon/Icon.d.ts +1 -3
  216. package/dist/types/components/internal/menu/highlight.d.ts +7 -0
  217. package/dist/types/components/internal/utils/activation.d.ts +0 -4
  218. package/dist/types/components/primitives/avatar/Avatar.d.ts +1 -1
  219. package/dist/types/components/primitives/button/Button.d.ts +1 -1
  220. package/dist/types/components/primitives/input/TextField.d.ts +1 -2
  221. package/dist/types/components/primitives/textarea/Textarea.d.ts +0 -1
  222. package/dist/types/shared-slot.d.ts +1 -0
  223. package/dist/types/tokens/component-styles.generated.d.ts +79 -151
  224. package/dist/types/tokens/motion-defaults.generated.d.ts +34 -0
  225. package/dist/types/tokens/motion-scale.d.ts +2 -2
  226. package/dist/types/tokens/motion-tokens.d.ts +7 -0
  227. package/dist/types/tokens/theme-sync.d.ts +3 -0
  228. package/dist/types/tokens/theme-tokens.generated.d.ts +669 -1105
  229. package/dist/typing-lines.css +17 -10
  230. package/dist/typing-lines.js +9 -8
  231. package/dist/typing-lines.js.map +1 -1
  232. package/dist/weight-field.css +31 -17
  233. package/dist/weight-field.js +4 -4
  234. package/dist/weight-field.js.map +1 -1
  235. package/dist/youtube.css +90 -96
  236. package/dist/youtube.js +87 -86
  237. package/dist/youtube.js.map +1 -1
  238. package/package.json +3 -1
  239. package/skills/zyncat-ui/SKILL.md +5 -3
  240. package/skills/zyncat-ui/references/components.md +4 -4
  241. package/skills/zyncat-ui/references/theming.md +105 -34
  242. package/src/components/composites/alert/Alert.tsx +9 -10
  243. package/src/components/composites/alert/alert.css +26 -33
  244. package/src/components/composites/date-picker/DateField.tsx +1 -1
  245. package/src/components/composites/date-picker/DateRangeField.tsx +1 -1
  246. package/src/components/composites/date-picker/DateTimeField.tsx +4 -4
  247. package/src/components/composites/date-picker/TimeField.tsx +8 -5
  248. package/src/components/composites/date-picker/calendar-panel.tsx +25 -20
  249. package/src/components/composites/date-picker/date-picker.css +131 -154
  250. package/src/components/composites/date-picker/field-shell.tsx +7 -7
  251. package/src/components/composites/date-picker/range-panel.tsx +34 -34
  252. package/src/components/composites/date-picker/time-core.tsx +4 -6
  253. package/src/components/composites/date-picker/use-day-focus.ts +1 -1
  254. package/src/components/composites/dialog/Dialog.tsx +11 -11
  255. package/src/components/composites/dialog/dialog.css +31 -41
  256. package/src/components/composites/dropdown/Dropdown.tsx +15 -2
  257. package/src/components/composites/dropdown/Dropdown.usage.md +7 -4
  258. package/src/components/composites/dropdown/dropdown.css +36 -27
  259. package/src/components/composites/dropdown/menu-panel.tsx +56 -27
  260. package/src/components/composites/dropdown/types.ts +28 -6
  261. package/src/components/composites/emoji-picker/EmojiPickerPanel.tsx +5 -4
  262. package/src/components/composites/emoji-picker/EmojiPickerPanel.usage.md +4 -4
  263. package/src/components/composites/emoji-picker/data.ts +2 -5
  264. package/src/components/composites/emoji-picker/dom.ts +6 -6
  265. package/src/components/composites/emoji-picker/react/category-bar.tsx +6 -6
  266. package/src/components/composites/emoji-picker/react/useEmojiPicker.ts +0 -11
  267. package/src/components/composites/emoji-picker/scaffold.ts +7 -7
  268. package/src/components/composites/emoji-picker/search.ts +0 -7
  269. package/src/components/composites/emoji-picker/styles.css +34 -34
  270. package/src/components/composites/emoji-picker/types.ts +3 -8
  271. package/src/components/composites/modal/Modal.tsx +2 -2
  272. package/src/components/composites/modal/modal.css +2 -4
  273. package/src/components/composites/pagination/Pagination.tsx +7 -7
  274. package/src/components/composites/pagination/pagination.css +10 -15
  275. package/src/components/composites/popover/Popover.tsx +2 -2
  276. package/src/components/composites/popover/popover.css +13 -15
  277. package/src/components/composites/select/MultiSelect.tsx +11 -2
  278. package/src/components/composites/select/MultiSelect.usage.md +2 -1
  279. package/src/components/composites/select/Select.tsx +10 -1
  280. package/src/components/composites/select/Select.usage.md +2 -1
  281. package/src/components/composites/select/core/index.ts +1 -1
  282. package/src/components/composites/select/core/menu.tsx +19 -4
  283. package/src/components/composites/select/core/panel.tsx +19 -15
  284. package/src/components/composites/select/core/trigger.tsx +5 -5
  285. package/src/components/composites/select/select.css +66 -75
  286. package/src/components/composites/sheet/Sheet.tsx +2 -2
  287. package/src/components/composites/sheet/sheet.css +12 -14
  288. package/src/components/composites/sheet/use-sheet-drag.ts +1 -1
  289. package/src/components/composites/table/Table.tsx +35 -35
  290. package/src/components/composites/table/table.css +76 -84
  291. package/src/components/composites/tabs/Tabs.tsx +20 -21
  292. package/src/components/composites/tabs/Tabs.usage.md +3 -2
  293. package/src/components/composites/tabs/tabs.css +82 -90
  294. package/src/components/composites/toast/Toast.tsx +23 -18
  295. package/src/components/composites/toast/toast-store.ts +8 -6
  296. package/src/components/composites/toast/toast.css +49 -65
  297. package/src/components/composites/tooltip/Tooltip.tsx +40 -19
  298. package/src/components/composites/tooltip/Tooltip.usage.md +9 -1
  299. package/src/components/composites/tooltip/tooltip-host.tsx +55 -23
  300. package/src/components/composites/tooltip/tooltip-store.ts +36 -53
  301. package/src/components/composites/tooltip/tooltip.css +16 -23
  302. package/src/components/compound/support-rail/SupportRail.tsx +33 -33
  303. package/src/components/compound/support-rail/support-rail.css +116 -100
  304. package/src/components/dev/MotionDevtools.tsx +28 -17
  305. package/src/components/dev/MotionDevtools.usage.md +2 -2
  306. package/src/components/dev/motion-devtools.css +42 -68
  307. package/src/components/dev/slowmo-engine.ts +16 -15
  308. package/src/components/expressive/confetti/Confetti.tsx +4 -4
  309. package/src/components/expressive/confetti/confetti.css +19 -12
  310. package/src/components/expressive/facebook-feed/chrome.tsx +2 -2
  311. package/src/components/expressive/facebook-feed/facebook-feed.css +145 -148
  312. package/src/components/expressive/facebook-feed/post.tsx +39 -39
  313. package/src/components/expressive/facebook-feed/reel.tsx +41 -37
  314. package/src/components/expressive/facebook-feed/story.tsx +27 -27
  315. package/src/components/expressive/flow-field/FlowField.tsx +4 -4
  316. package/src/components/expressive/flow-field/flow-field.css +8 -4
  317. package/src/components/expressive/instagram-feed/InstagramFeed.tsx +52 -44
  318. package/src/components/expressive/instagram-feed/instagram-feed.css +65 -66
  319. package/src/components/expressive/lens/Lens.tsx +14 -14
  320. package/src/components/expressive/lens/lens.css +42 -38
  321. package/src/components/expressive/morphing-text/MorphingText.tsx +12 -13
  322. package/src/components/expressive/morphing-text/morphing-text.css +26 -16
  323. package/src/components/expressive/odometer/Odometer.tsx +9 -9
  324. package/src/components/expressive/odometer/odometer.css +22 -16
  325. package/src/components/expressive/tiktok/TikTok.tsx +54 -54
  326. package/src/components/expressive/tiktok/tiktok.css +113 -117
  327. package/src/components/expressive/typing-lines/TypingLines.tsx +0 -0
  328. package/src/components/expressive/typing-lines/typing-lines.css +17 -10
  329. package/src/components/expressive/weight-field/WeightField.tsx +4 -4
  330. package/src/components/expressive/weight-field/weight-field.css +31 -17
  331. package/src/components/expressive/youtube/YouTube.tsx +4 -4
  332. package/src/components/expressive/youtube/glyphs.tsx +16 -16
  333. package/src/components/expressive/youtube/media.tsx +3 -3
  334. package/src/components/expressive/youtube/post.tsx +28 -28
  335. package/src/components/expressive/youtube/short.tsx +25 -25
  336. package/src/components/expressive/youtube/video.tsx +13 -13
  337. package/src/components/expressive/youtube/youtube.css +90 -96
  338. package/src/components/internal/glass/glass.css +19 -22
  339. package/src/components/internal/glass/glint.ts +3 -3
  340. package/src/components/internal/hooks/use-host-election.ts +46 -0
  341. package/src/components/internal/icon/Icon.tsx +1 -5
  342. package/src/components/internal/icon/IconSlot.tsx +1 -1
  343. package/src/components/internal/icon/icon.css +7 -10
  344. package/src/components/internal/menu/highlight.ts +12 -0
  345. package/src/components/internal/menu/menu-row.tsx +5 -5
  346. package/src/components/internal/menu/menu-surface.css +54 -34
  347. package/src/components/internal/overlay/layer.tsx +2 -1
  348. package/src/components/internal/overlay/modal.tsx +5 -4
  349. package/src/components/internal/overlay/overlay.css +4 -9
  350. package/src/components/internal/overlay/trigger.css +3 -3
  351. package/src/components/internal/utils/activation.ts +0 -4
  352. package/src/components/primitives/avatar/Avatar.tsx +24 -8
  353. package/src/components/primitives/avatar/AvatarGroup.tsx +4 -4
  354. package/src/components/primitives/avatar/avatar.css +51 -50
  355. package/src/components/primitives/badge/Badge.tsx +9 -9
  356. package/src/components/primitives/badge/StatusBadge.tsx +7 -7
  357. package/src/components/primitives/badge/badge.css +30 -36
  358. package/src/components/primitives/badge/digit-strip.css +16 -16
  359. package/src/components/primitives/badge/digit-strip.tsx +4 -4
  360. package/src/components/primitives/button/Button.tsx +8 -8
  361. package/src/components/primitives/button/button.css +80 -96
  362. package/src/components/primitives/checkbox/Checkbox.tsx +10 -4
  363. package/src/components/primitives/checkbox/check-glyph.tsx +5 -5
  364. package/src/components/primitives/checkbox/checkbox.css +27 -32
  365. package/src/components/primitives/collapse/Collapse.tsx +2 -2
  366. package/src/components/primitives/collapse/collapse.css +15 -30
  367. package/src/components/primitives/collapse/collapse.typecheck.tsx +1 -1
  368. package/src/components/primitives/input/NumberField.tsx +11 -11
  369. package/src/components/primitives/input/OtpField.tsx +3 -3
  370. package/src/components/primitives/input/TextField.tsx +9 -10
  371. package/src/components/primitives/input/field-chrome.tsx +6 -6
  372. package/src/components/primitives/input/input.css +76 -84
  373. package/src/components/primitives/radio-group/RadioGroup.tsx +23 -23
  374. package/src/components/primitives/radio-group/radio-group.css +60 -73
  375. package/src/components/primitives/tag/Tag.tsx +5 -5
  376. package/src/components/primitives/tag/ToggleTag.tsx +11 -6
  377. package/src/components/primitives/tag/tag.css +48 -53
  378. package/src/components/primitives/textarea/Textarea.tsx +13 -14
  379. package/src/components/primitives/textarea/textarea.css +46 -49
  380. package/src/components/primitives/toggle/Toggle.tsx +7 -7
  381. package/src/components/primitives/toggle/toggle.css +26 -31
  382. package/src/engine/animate.ts +2 -1
  383. package/src/engine/flip.ts +2 -1
  384. package/src/mcp/server.ts +3 -1
  385. package/src/motion/flip.ts +7 -8
  386. package/src/motion/glide.tsx +41 -26
  387. package/src/shared-slot.ts +10 -0
  388. package/src/styles.css +7 -15
  389. package/src/tokens/base.css +15 -0
  390. package/src/tokens/color.css +19 -59
  391. package/src/tokens/component-styles.generated.ts +79 -151
  392. package/src/tokens/dark.css +63 -0
  393. package/src/tokens/decisions.css +26 -0
  394. package/src/tokens/elevation.css +71 -21
  395. package/src/tokens/fonts.css +0 -2
  396. package/src/tokens/glass.css +15 -9
  397. package/src/tokens/motion-defaults.generated.ts +21 -0
  398. package/src/tokens/motion-scale.ts +2 -2
  399. package/src/tokens/motion-tokens.ts +65 -40
  400. package/src/tokens/motion-tokens.usage.md +5 -2
  401. package/src/tokens/motion.css +12 -22
  402. package/src/tokens/radius.css +10 -9
  403. package/src/tokens/semantic.css +57 -37
  404. package/src/tokens/spacing.css +5 -6
  405. package/src/tokens/theme-sync.tsx +15 -0
  406. package/src/tokens/theme-tokens.generated.ts +682 -1109
  407. package/src/tokens/theme.tsx +22 -16
  408. package/src/tokens/theme.usage.md +19 -13
  409. package/src/tokens/typography.css +16 -19
  410. package/tailwind.css +193 -0
  411. package/dist/chunk-227ZW4V7.js.map +0 -1
  412. package/dist/chunk-43M6GQ4Q.js.map +0 -1
  413. package/dist/chunk-4BSHB7R3.js.map +0 -1
  414. package/dist/chunk-4C5RZXBT.js.map +0 -1
  415. package/dist/chunk-5PZ43DCG.js.map +0 -1
  416. package/dist/chunk-7IZJERGA.js +0 -80
  417. package/dist/chunk-7IZJERGA.js.map +0 -1
  418. package/dist/chunk-AADAJL7D.js.map +0 -1
  419. package/dist/chunk-CNWTIMIP.js +0 -39
  420. package/dist/chunk-CNWTIMIP.js.map +0 -1
  421. package/dist/chunk-EAI4POPB.js.map +0 -1
  422. package/dist/chunk-EF6RPXU7.js.map +0 -1
  423. package/dist/chunk-FONOS5RN.js.map +0 -1
  424. package/dist/chunk-FQEHSKEI.js +0 -38
  425. package/dist/chunk-FQEHSKEI.js.map +0 -1
  426. package/dist/chunk-HY5MPISE.js.map +0 -1
  427. package/dist/chunk-I45AU6KH.js.map +0 -1
  428. package/dist/chunk-IJS7TPGV.js.map +0 -1
  429. package/dist/chunk-OWNMRMPN.js +0 -14
  430. package/dist/chunk-OWNMRMPN.js.map +0 -1
  431. package/dist/chunk-RJFGWJ4W.js.map +0 -1
  432. package/dist/chunk-TVYH4AN7.js.map +0 -1
  433. package/dist/chunk-TYHR4VNM.js.map +0 -1
  434. package/dist/chunk-VAXCXZ53.js.map +0 -1
  435. package/dist/chunk-XNIYSAMJ.js.map +0 -1
  436. package/dist/chunk-Y2YA7QRF.js +0 -17
  437. package/dist/chunk-Y2YA7QRF.js.map +0 -1
  438. package/src/tokens/avatar.css +0 -24
  439. package/src/tokens/icons.css +0 -11
  440. package/src/tokens/layers.css +0 -11
@@ -3,9 +3,10 @@
3
3
  Group: date-time
4
4
  Docs: https://ui.zyncat.app/tabs
5
5
 
6
- Line tabs; the ink reaches then releases; panels enter from the side you moved toward.
6
+ Underline tabs or a segmented pill; the ink reaches then releases; panels enter from the side you moved toward.
7
7
 
8
- items: TabItem[]; value/onChange(value, dir). Pair with <TabPanel name tab dir>.
8
+ items: TabItem[]; value/onChange(value, dir). variant underline|pill - the pill track hugs its tabs rather than
9
+ filling the row, and drops the hairline; the motion is identical in both. Pair with <TabPanel name tab dir>.
9
10
 
10
11
  ```tsx
11
12
  <Tabs name="views" ariaLabel="Workspace views" value={view} onChange={(v, d) => { setView(v); setDir(d); }} items={items} />
@@ -1,31 +1,14 @@
1
1
  @layer zyncat.tokens, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
- /* tabs.css - line tabs for VIEW SWITCHING (overview / activity / settings), sitting on a
5
- hairline baseline. NOT a form control: pick Segmented control for 2-3 filter options.
6
-
7
- Anatomy: .tabs > .tabs__list[role=tablist] > .tab__hover? + .tab* + .tabs__ink
8
- .tab > .tab__pad ( Icon? + .tab__label + .tab__count? )
9
- States: :hover - :active - :focus-visible - :disabled - .is-selected
10
-
11
- Two motions, both driven from Tabs.tsx - nothing here transitions them:
12
- - the ink ("reaches, then releases"): one persistent node; the edge facing the
13
- destination travels first, then the trailing edge settles. animate() keyframes on
14
- x + measured width (destination width is unknowable to transforms; scaleX would
15
- distort the radius).
16
- - the gliding hover: one persistent pill (../motion/glide) that fades in under the
17
- first tab touched, springs between pads, and fades out where it rests on leave.
18
- Label color, icon weight and press dip remain trivial-tier CSS. */
19
-
20
- /* -- Shell - owns the full-width baseline ----------------------------------
21
- The hairline is a ::after on the shell (not a border on the scroller) so it
22
- spans edge-to-edge while the scroller above it clips, masks and scrolls
23
- freely. The scroller gets z-index:1 so the ink paints OVER the hairline. */
24
- .tabs {
4
+ .zc-tabs {
5
+ /* 2px, not --border-emphasis: 1.5px renders as sub-pixel fuzz on 1x screens. */
25
6
  --tabs-ink-h: 2px;
7
+ /* The pill variant's segment radius. The track rounds one pad wider, staying concentric. */
8
+ --tabs-pill-radius: var(--radius-md);
26
9
  position: relative;
27
10
  }
28
- .tabs::after {
11
+ .zc-tabs::after {
29
12
  content: '';
30
13
  position: absolute;
31
14
  inset-inline: 0;
@@ -34,13 +17,7 @@
34
17
  background: var(--border-default);
35
18
  }
36
19
 
37
- /* -- Scroller - the tablist ------------------------------------------------
38
- Overflow is honest: the row scrolls (scrollbar hidden) and the clipped edge
39
- fades out via a mask. The fade lengths are two custom props flipped by
40
- data-fade (set from scroll geometry in Tabs.jsx) - at 0px the mask is fully
41
- opaque, i.e. a no-op. Negative margin + matching padding align the first
42
- label flush with the container edge while the hover pill still has room. */
43
- .tabs__list {
20
+ .zc-tabs__list {
44
21
  position: relative;
45
22
  z-index: 1;
46
23
  display: flex;
@@ -49,6 +26,9 @@
49
26
  scrollbar-width: none;
50
27
  margin-inline: calc(var(--space-2) * -1);
51
28
  padding-inline: var(--space-2);
29
+ margin-block: calc(var(--ring-width) * -1);
30
+ padding-block: var(--ring-width);
31
+ scroll-padding: var(--ring-width);
52
32
 
53
33
  --tabs-fade-start: 0px;
54
34
  --tabs-fade-end: 0px;
@@ -60,22 +40,17 @@
60
40
  transparent
61
41
  );
62
42
  }
63
- .tabs__list::-webkit-scrollbar {
43
+ .zc-tabs__list::-webkit-scrollbar {
64
44
  display: none;
65
45
  }
66
- .tabs__list[data-fade~='start'] {
46
+ .zc-tabs__list[data-fade~='start'] {
67
47
  --tabs-fade-start: var(--space-8);
68
48
  }
69
- .tabs__list[data-fade~='end'] {
49
+ .zc-tabs__list[data-fade~='end'] {
70
50
  --tabs-fade-end: var(--space-8);
71
51
  }
72
52
 
73
- /* -- Tab - the hit target --------------------------------------------------
74
- The button is pill + the ink's own band + a hairline of clearance, so the
75
- ink underlines the pad instead of floating below it (total height 31px).
76
- All visual feedback lives on the inner pill so hover/press/focus read as a
77
- soft inset shape, while the ink below stays anchored to the baseline. */
78
- .tab {
53
+ .zc-tab {
79
54
  appearance: none;
80
55
  border: 0;
81
56
  background: none;
@@ -83,21 +58,20 @@
83
58
  padding: 0 0 calc(var(--tabs-ink-h) + var(--space-px));
84
59
  flex: none;
85
60
  display: block;
86
- font-family: var(--font-sans);
61
+ font-family: var(--font-body);
87
62
  cursor: pointer;
88
63
  -webkit-tap-highlight-color: transparent;
89
64
  }
90
- .tab:focus-visible {
65
+ .zc-tab:focus-visible {
91
66
  outline: none;
92
67
  }
93
68
 
94
- .tab__pad {
95
- position: relative; /* positioned so every pad paints above the shared glide
96
- pill (z-index 0, first child of the list) */
69
+ .zc-tab__pad {
70
+ position: relative; /* paints above the glide pill, the list's absolute z-index 0 first child */
97
71
  display: flex;
98
72
  align-items: center;
99
73
  gap: var(--space-2);
100
- height: var(--control-height-sm); /* 28 */
74
+ height: var(--control-height-sm);
101
75
  padding-inline: var(--space-2);
102
76
  border-radius: var(--radius-md);
103
77
  font: var(--type-micro);
@@ -107,38 +81,34 @@
107
81
  transition:
108
82
  var(--transition-control),
109
83
  transform var(--duration-fast) var(--ease-standard);
84
+ outline: var(--ring-rest);
110
85
  }
111
- .tab__pad .icon {
86
+ .zc-tab__pad .zc-icon {
112
87
  display: inline-flex;
113
88
  }
114
89
 
115
- /* States - hover strengthens the label (the shared glide pill supplies the
116
- background), press dips 1px on a darker fill (tactile, like Button), focus
117
- is the composed accent ring, selection is text-strong + the ink. */
118
- .tab:hover:not(:disabled) .tab__pad {
90
+ .zc-tab:hover:not(:disabled) .zc-tab__pad {
119
91
  color: var(--text-body);
120
92
  }
121
- .tab:active:not(:disabled) .tab__pad {
122
- background: var(--neutral-wash-press);
93
+ .zc-tab:active:not(:disabled) .zc-tab__pad {
123
94
  transform: translateY(var(--space-px));
124
95
  }
125
- .tab.is-selected .tab__pad,
126
- .tab.is-selected:hover:not(:disabled) .tab__pad {
96
+ .zc-tab.zc-is-selected .zc-tab__pad,
97
+ .zc-tab.zc-is-selected:hover:not(:disabled) .zc-tab__pad {
127
98
  color: var(--text-strong);
128
99
  }
129
- .tab:focus-visible .tab__pad {
130
- box-shadow: var(--ring-accent);
100
+ .zc-tab:focus-visible .zc-tab__pad {
101
+ outline: var(--ring-accent);
131
102
  }
132
- .tab:disabled {
103
+ .zc-tab:disabled {
133
104
  cursor: not-allowed;
134
105
  }
135
- .tab:disabled .tab__pad {
106
+ .zc-tab:disabled .zc-tab__pad {
136
107
  color: var(--text-disabled);
137
108
  }
138
109
 
139
- /* -- Count - always mono, always tabular -----------------------------------*/
140
- .tab__count {
141
- font-family: var(--font-mono);
110
+ .zc-tab__count {
111
+ font-family: var(--font-code);
142
112
  font-size: var(--size-micro);
143
113
  line-height: 1;
144
114
  font-variant-numeric: tabular-nums;
@@ -148,21 +118,16 @@
148
118
  border-radius: var(--radius-sm);
149
119
  transition: var(--transition-colors);
150
120
  }
151
- .tab.is-selected .tab__count {
121
+ .zc-tab.zc-is-selected .zc-tab__count {
152
122
  color: var(--text-accent);
153
123
  background: var(--accent-wash);
154
124
  }
155
- .tab:disabled .tab__count {
125
+ .zc-tab:disabled .zc-tab__count {
156
126
  color: var(--text-disabled);
157
127
  background: var(--bg-subtle);
158
128
  }
159
129
 
160
- /* -- The gliding hover ------------------------------------------------------
161
- One persistent pill, first child of the scroller (../motion/glide writes
162
- x/y/width/height/opacity inline; coordinates include scrollLeft, so it
163
- scrolls with its tab). z-index 0 + DOM order keep it under every tab's
164
- positioned pad in both travel directions. Nothing transitions here. */
165
- .tab__hover {
130
+ .zc-tab__hover {
166
131
  opacity: 0;
167
132
  position: absolute;
168
133
  top: 0;
@@ -174,18 +139,10 @@
174
139
  will-change: transform, opacity;
175
140
  }
176
141
 
177
- /* -- The ink ---------------------------------------------------------------
178
- Positioned in the scroller's layout coordinates (offsetLeft space), so it
179
- scrolls WITH its tab. Motion writes transform + width at runtime; resting
180
- geometry is set the same way, so there is nothing to transition here.
181
- EXCEPTION (intentional, mirrors RadioGroup's dot dims): 2px ink height is a
182
- bespoke control dim - elevation.css reserves 2px for selected emphasis, but
183
- ships no width token for it (--border-emphasis is 1.5px, which renders as
184
- sub-pixel fuzz on 1x screens). Do not "fix" it to a token. */
185
- .tabs__ink {
142
+ .zc-tabs__ink {
186
143
  position: absolute;
187
144
  left: 0;
188
- bottom: 0;
145
+ bottom: var(--ring-width);
189
146
  height: var(--tabs-ink-h);
190
147
  border-radius: var(--radius-full);
191
148
  background: var(--accent);
@@ -193,23 +150,58 @@
193
150
  will-change: transform, width;
194
151
  }
195
152
 
196
- /* -- Panel -----------------------------------------------------------------
197
- The panel ROOT is static chrome - borders, padding, background put on it
198
- by the consumer never move; it clips (overflow: hidden) while the content
199
- resizes. Only .tab-panel__inner (the content) enters from the direction of
200
- travel and animates its own height between panels, so a taller or shorter
201
- tab grows into place instead of snapping. The root is focusable per
202
- the APG (tabindex=0) so keyboard users land on content right after the
203
- tablist; the ring shows only for keyboard focus. */
204
- .tab-panel {
153
+ .zc-tabs--pill {
154
+ display: flex;
155
+ width: fit-content;
156
+ max-width: 100%;
157
+ padding: var(--space-1);
158
+ border-radius: calc(var(--tabs-pill-radius) + var(--space-1));
159
+ background: var(--bg-inset);
160
+ }
161
+ .zc-tabs--pill::after {
162
+ content: none;
163
+ }
164
+
165
+ .zc-tabs--pill .zc-tabs__list {
166
+ min-width: 0;
167
+ margin: calc(var(--space-1) * -1);
168
+ padding: var(--space-1);
169
+ border-radius: calc(var(--tabs-pill-radius) + var(--space-1));
170
+ }
171
+
172
+ .zc-tabs--pill .zc-tab {
173
+ padding: 0;
174
+ }
175
+ .zc-tabs--pill .zc-tab__pad {
176
+ z-index: 1;
177
+ border-radius: var(--tabs-pill-radius);
178
+ }
179
+ .zc-tabs--pill .zc-tab:active:not(:disabled) .zc-tab__pad {
180
+ transform: none;
181
+ }
182
+ .zc-tabs--pill .zc-tab__count {
183
+ background: var(--bg-subtle);
184
+ }
185
+
186
+ .zc-tabs--pill .zc-tabs__ink {
187
+ top: var(--space-1);
188
+ bottom: auto;
189
+ height: var(--control-height-sm);
190
+ border-radius: var(--tabs-pill-radius);
191
+ background: var(--bg-surface);
192
+ box-shadow: var(--shadow-xs);
193
+ }
194
+
195
+ .zc-tab-panel {
205
196
  outline: none;
206
197
  overflow: hidden;
207
198
  }
208
- .tab-panel:focus-visible {
209
- box-shadow: var(--ring-accent);
199
+ .zc-tab-panel:focus-visible {
200
+ outline: var(--ring-accent);
201
+ outline-offset: var(--ring-inset);
210
202
  border-radius: var(--radius-md);
211
203
  }
212
- .tab-panel__inner {
204
+ .zc-tab-panel__inner {
213
205
  will-change: transform, opacity;
214
206
  }
215
207
  }
@@ -26,6 +26,7 @@ import { Presence } from '../../../motion/presence';
26
26
  import { popOut } from '../../../motion/presets';
27
27
  import { UIMotion } from '../../../tokens/motion-tokens';
28
28
  import { fireGlint } from '../../internal/glass/glint';
29
+ import { hostRegistry, useElectedHost } from '../../internal/hooks/use-host-election';
29
30
  import { Icon, type IconName } from '../../internal/icon/Icon';
30
31
  import { cx } from '../../internal/utils/cx';
31
32
  import { tokenPx } from '../../internal/utils/token-px';
@@ -34,6 +35,7 @@ import { DEFAULT_TOASTER_CONFIG, UIToast, type ToasterConfig, type ToastRecord,
34
35
 
35
36
  const SM = UIMotion;
36
37
  const store = UIToast;
38
+ const toasterReg = hostRegistry('toast.host@1');
37
39
 
38
40
  const COLLAPSE_GRACE = 140;
39
41
  const SWIPE_X = 64;
@@ -162,7 +164,7 @@ function ToastItem({
162
164
  as="li"
163
165
  ref={ref}
164
166
  exit={popOut(SM.scale.floating, SM.t.exit)}
165
- className="toast glass"
167
+ className="zc-toast zc-glass"
166
168
  data-tone={t.tone}
167
169
  data-behind={behind ? '' : undefined}
168
170
  role={t.tone === 'danger' ? 'alert' : 'status'}
@@ -172,30 +174,30 @@ function ToastItem({
172
174
  if (e.key === 'Escape' && t.dismissible) store.dismiss(t.id);
173
175
  }}
174
176
  >
175
- {t.node ? <div className="toast__custom">{t.node as ReactNode}</div> : <ToastBody t={t} />}
177
+ {t.node ? <div className="zc-toast__custom">{t.node as ReactNode}</div> : <ToastBody t={t} />}
176
178
  </Motion>
177
179
  );
178
180
  }
179
181
 
180
182
  function ToastBody({ t }: { t: ToastRecord }) {
181
183
  return (
182
- <div className="toast__inner">
184
+ <div className="zc-toast__inner">
183
185
  {(t.tone !== 'default' || isFinite(t.duration)) && (
184
- <span className="toast__icon">
186
+ <span className="zc-toast__icon">
185
187
  {t.tone !== 'default' && (
186
- <Motion as="span" className="toast__icon-glyph" animate={GLYPH_POP} deps={[t.tone]}>
188
+ <Motion as="span" className="zc-toast__icon-glyph" animate={GLYPH_POP} deps={[t.tone]}>
187
189
  {t.tone === 'loading' ? (
188
- <span className="toast__spinner" aria-hidden="true"></span>
190
+ <span className="zc-toast__spinner" aria-hidden="true"></span>
189
191
  ) : (
190
192
  <Icon name={TONE_ICON[t.tone] || 'info'} weight="fill" />
191
193
  )}
192
194
  </Motion>
193
195
  )}
194
196
  {isFinite(t.duration) && (
195
- <svg key={'ring-' + t.timerKey} className="toast__ring" viewBox="0 0 36 36" aria-hidden="true">
196
- <circle className="toast__ring-track" cx="18" cy="18" r="16.5"></circle>
197
+ <svg key={'ring-' + t.timerKey} className="zc-toast__ring" viewBox="0 0 36 36" aria-hidden="true">
198
+ <circle className="zc-toast__ring-track" cx="18" cy="18" r="16.5"></circle>
197
199
  <circle
198
- className="toast__ring-arc"
200
+ className="zc-toast__ring-arc"
199
201
  cx="18"
200
202
  cy="18"
201
203
  r="16.5"
@@ -206,12 +208,12 @@ function ToastBody({ t }: { t: ToastRecord }) {
206
208
  )}
207
209
  </span>
208
210
  )}
209
- <Motion className="toast__text" animate={TEXT_FADE} deps={[String(t.message) + '-' + String(t.description)]}>
210
- <p className="toast__message">{t.message}</p>
211
- {t.description != null && <p className="toast__desc">{t.description}</p>}
211
+ <Motion className="zc-toast__text" animate={TEXT_FADE} deps={[String(t.message) + '-' + String(t.description)]}>
212
+ <p className="zc-toast__message">{t.message}</p>
213
+ {t.description != null && <p className="zc-toast__desc">{t.description}</p>}
212
214
  </Motion>
213
215
  {t.count > 1 && (
214
- <Motion as="span" className="toast__count" animate={COUNT_POP} deps={[t.count]}>
216
+ <Motion as="span" className="zc-toast__count" animate={COUNT_POP} deps={[t.count]}>
215
217
  ×{t.count}
216
218
  </Motion>
217
219
  )}
@@ -219,7 +221,7 @@ function ToastBody({ t }: { t: ToastRecord }) {
219
221
  <Button
220
222
  variant="secondary"
221
223
  size="sm"
222
- className="toast__action"
224
+ className="zc-toast__action"
223
225
  onClick={() => {
224
226
  if (t.action.onClick) t.action.onClick();
225
227
  store.dismiss(t.id);
@@ -229,7 +231,7 @@ function ToastBody({ t }: { t: ToastRecord }) {
229
231
  </Button>
230
232
  )}
231
233
  {t.dismissible && (
232
- <button type="button" className="toast__close" aria-label="Dismiss" onClick={() => store.dismiss(t.id)}>
234
+ <button type="button" className="zc-toast__close" aria-label="Dismiss" onClick={() => store.dismiss(t.id)}>
233
235
  <Icon name="close" size="sm" />
234
236
  </button>
235
237
  )}
@@ -299,7 +301,7 @@ function ToastHost({ config, htmlProps }: { config: ToasterConfig; htmlProps?: H
299
301
  return createPortal(
300
302
  <ol
301
303
  {...htmlProps}
302
- className={cx('toast-viewport', paused && 'is-paused', htmlProps?.className)}
304
+ className={cx('zc-toast-viewport', paused && 'zc-is-paused', htmlProps?.className)}
303
305
  data-position={config.position}
304
306
  style={
305
307
  config.offset
@@ -359,18 +361,21 @@ export interface ToasterProps extends Partial<ToasterConfig> {
359
361
  htmlProps?: HTMLAttributes<HTMLOListElement> & DataAttributes;
360
362
  }
361
363
 
362
- export function Toaster({ htmlProps, ...props }: ToasterProps): ReactElement {
364
+ export function Toaster({ htmlProps, ...props }: ToasterProps): ReactElement | null {
363
365
  const config: ToasterConfig = { ...DEFAULT_TOASTER_CONFIG, ...stripUndefined(props) };
366
+ const isHost = useElectedHost(toasterReg, 'toaster');
364
367
 
365
368
  useEffect(() => {
369
+ if (!isHost) return undefined;
366
370
  store.config = config;
367
371
  store.mounted = true;
368
372
  if (config.expand) store.setExpanded(true);
369
373
  return () => {
370
374
  store.mounted = false;
371
375
  };
372
- }, [config.position, config.duration, config.visibleToasts, config.gap, config.offset, config.expand]);
376
+ }, [isHost, config.position, config.duration, config.visibleToasts, config.gap, config.offset, config.expand]);
373
377
 
378
+ if (!isHost) return null;
374
379
  return <ToastHost config={config} htmlProps={htmlProps} />;
375
380
  }
376
381
 
@@ -1,3 +1,5 @@
1
+ import { sharedSlot } from '../../../shared-slot';
2
+
1
3
  export type ToastTone = 'default' | 'success' | 'danger' | 'warning' | 'info' | 'loading' | 'custom';
2
4
 
3
5
  export interface ToastAction {
@@ -62,8 +64,8 @@ const DURATION: Record<string, number> = {
62
64
  loading: Infinity,
63
65
  };
64
66
 
65
- let uid = 0;
66
- const timers = new Map<string, ReturnType<typeof setTimeout>>();
67
+ const ids = sharedSlot('toast.ids@1', () => ({ n: 0 }));
68
+ const timers = sharedSlot('toast.timers@1', () => new Map<string, ReturnType<typeof setTimeout>>());
67
69
 
68
70
  interface ToastStore {
69
71
  toasts: ToastRecord[];
@@ -85,7 +87,7 @@ interface ToastStore {
85
87
  setExpanded(v: boolean): void;
86
88
  }
87
89
 
88
- const store: ToastStore = {
90
+ const store: ToastStore = sharedSlot('toast.store@1', (): ToastStore => ({
89
91
  toasts: [],
90
92
  paused: false,
91
93
  expanded: false,
@@ -174,7 +176,7 @@ const store: ToastStore = {
174
176
  store.expanded = v;
175
177
  store.emit();
176
178
  },
177
- };
179
+ }));
178
180
 
179
181
  let warned = false;
180
182
  let warnScheduled = false;
@@ -201,7 +203,7 @@ function resolveDuration(tone: ToastTone, opt?: number): number {
201
203
 
202
204
  function make(tone: ToastTone, message: string | null, opts: ToastOptions = {}): string {
203
205
  warnIfDetached();
204
- const id = opts.id != null ? String(opts.id) : 'toast-' + ++uid;
206
+ const id = opts.id != null ? String(opts.id) : 'toast-' + ++ids.n;
205
207
  const duration = resolveDuration(tone, opts.duration);
206
208
  if (store.toasts.some((t) => t.id === id)) {
207
209
  return store.update(id, {
@@ -273,7 +275,7 @@ toast.promise = function <T>(promise: Promise<T>, msgs: ToastPromiseMsgs<T> = {}
273
275
 
274
276
  toast.custom = (node, opts = {}) => {
275
277
  warnIfDetached();
276
- const id = opts.id != null ? String(opts.id) : 'toast-' + ++uid;
278
+ const id = opts.id != null ? String(opts.id) : 'toast-' + ++ids.n;
277
279
  const duration = opts.duration != null ? opts.duration : Infinity;
278
280
  if (store.toasts.some((t) => t.id === id)) return store.update(id, { node });
279
281
  return store.add({