ui-ingredients 0.0.24 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (413) hide show
  1. package/README.md +3 -3
  2. package/dist/accordion/item-content.svelte +14 -7
  3. package/dist/accordion/item-indicator.svelte +14 -7
  4. package/dist/accordion/item-trigger.svelte +13 -6
  5. package/dist/accordion/item.svelte +11 -6
  6. package/dist/accordion/root.svelte +12 -4
  7. package/dist/avatar/fallback.svelte +14 -7
  8. package/dist/avatar/image.svelte +11 -4
  9. package/dist/avatar/root.svelte +11 -13
  10. package/dist/carousel/indicator-group.svelte +14 -7
  11. package/dist/carousel/indicator.svelte +13 -6
  12. package/dist/carousel/item-group.svelte +14 -7
  13. package/dist/carousel/item.svelte +12 -8
  14. package/dist/carousel/next-trigger.svelte +13 -6
  15. package/dist/carousel/prev-trigger.svelte +13 -6
  16. package/dist/carousel/root.svelte +11 -5
  17. package/dist/carousel/viewport.svelte +14 -7
  18. package/dist/checkbox/control.svelte +14 -7
  19. package/dist/checkbox/hidden-input.svelte +1 -1
  20. package/dist/checkbox/indicator.svelte +14 -7
  21. package/dist/checkbox/label.svelte +14 -7
  22. package/dist/checkbox/root.svelte +12 -4
  23. package/dist/clipboard/control.svelte +14 -7
  24. package/dist/clipboard/indicator.svelte +14 -7
  25. package/dist/clipboard/input.svelte +11 -4
  26. package/dist/clipboard/label.svelte +14 -6
  27. package/dist/clipboard/root.svelte +13 -5
  28. package/dist/clipboard/trigger.svelte +13 -6
  29. package/dist/collapsible/content.svelte +14 -7
  30. package/dist/collapsible/root.svelte +14 -6
  31. package/dist/collapsible/trigger.svelte +13 -6
  32. package/dist/color-picker/area-background.svelte +21 -0
  33. package/dist/color-picker/area-background.svelte.d.ts +18 -0
  34. package/dist/color-picker/area-thumb.svelte +21 -0
  35. package/dist/color-picker/area-thumb.svelte.d.ts +18 -0
  36. package/dist/color-picker/area.svelte +27 -0
  37. package/dist/color-picker/area.svelte.d.ts +18 -0
  38. package/dist/color-picker/channel-input.svelte +28 -0
  39. package/dist/color-picker/channel-input.svelte.d.ts +18 -0
  40. package/dist/color-picker/channel-slider-label.svelte +25 -0
  41. package/dist/color-picker/channel-slider-label.svelte.d.ts +18 -0
  42. package/dist/color-picker/channel-slider-thumb.svelte +23 -0
  43. package/dist/color-picker/channel-slider-thumb.svelte.d.ts +18 -0
  44. package/dist/color-picker/channel-slider-track.svelte +23 -0
  45. package/dist/color-picker/channel-slider-track.svelte.d.ts +18 -0
  46. package/dist/color-picker/channel-slider-value-text.svelte +29 -0
  47. package/dist/color-picker/channel-slider-value-text.svelte.d.ts +18 -0
  48. package/dist/color-picker/channel-slider.svelte +29 -0
  49. package/dist/color-picker/channel-slider.svelte.d.ts +18 -0
  50. package/dist/color-picker/color-picker.d.ts +26 -0
  51. package/dist/color-picker/color-picker.js +26 -0
  52. package/dist/color-picker/content.svelte +20 -0
  53. package/dist/color-picker/content.svelte.d.ts +18 -0
  54. package/dist/color-picker/context.svelte.d.ts +8 -0
  55. package/dist/color-picker/context.svelte.js +6 -0
  56. package/dist/color-picker/control.svelte +20 -0
  57. package/dist/color-picker/control.svelte.d.ts +18 -0
  58. package/dist/color-picker/create-color-picker.svelte.d.ts +9 -0
  59. package/dist/color-picker/create-color-picker.svelte.js +20 -0
  60. package/dist/color-picker/eye-dropper-trigger.svelte +20 -0
  61. package/dist/color-picker/eye-dropper-trigger.svelte.d.ts +18 -0
  62. package/dist/color-picker/format-select.svelte +28 -0
  63. package/dist/color-picker/format-select.svelte.d.ts +18 -0
  64. package/dist/color-picker/format-trigger.svelte +20 -0
  65. package/dist/color-picker/format-trigger.svelte.d.ts +18 -0
  66. package/dist/color-picker/hidden-input.svelte +18 -0
  67. package/dist/color-picker/hidden-input.svelte.d.ts +18 -0
  68. package/dist/color-picker/index.d.ts +26 -0
  69. package/dist/color-picker/index.js +1 -0
  70. package/dist/color-picker/label.svelte +20 -0
  71. package/dist/color-picker/label.svelte.d.ts +18 -0
  72. package/dist/color-picker/positioner.svelte +20 -0
  73. package/dist/color-picker/positioner.svelte.d.ts +18 -0
  74. package/dist/color-picker/root.svelte +75 -0
  75. package/dist/color-picker/root.svelte.d.ts +18 -0
  76. package/dist/color-picker/swatch-group.svelte +20 -0
  77. package/dist/color-picker/swatch-group.svelte.d.ts +18 -0
  78. package/dist/color-picker/swatch-indicator.svelte +21 -0
  79. package/dist/color-picker/swatch-indicator.svelte.d.ts +18 -0
  80. package/dist/color-picker/swatch-trigger.svelte +31 -0
  81. package/dist/color-picker/swatch-trigger.svelte.d.ts +18 -0
  82. package/dist/color-picker/swatch.svelte +27 -0
  83. package/dist/color-picker/swatch.svelte.d.ts +18 -0
  84. package/dist/color-picker/transparency-grid.svelte +29 -0
  85. package/dist/color-picker/transparency-grid.svelte.d.ts +18 -0
  86. package/dist/color-picker/trigger.svelte +20 -0
  87. package/dist/color-picker/trigger.svelte.d.ts +18 -0
  88. package/dist/color-picker/value-text.svelte +24 -0
  89. package/dist/color-picker/value-text.svelte.d.ts +18 -0
  90. package/dist/combobox/clear-trigger.svelte +13 -6
  91. package/dist/combobox/content.svelte +14 -7
  92. package/dist/combobox/control.svelte +14 -7
  93. package/dist/combobox/input.svelte +11 -4
  94. package/dist/combobox/item-group-label.svelte +14 -7
  95. package/dist/combobox/item-group.svelte +14 -8
  96. package/dist/combobox/item-indicator.svelte +14 -7
  97. package/dist/combobox/item-text.svelte +18 -11
  98. package/dist/combobox/item.svelte +11 -6
  99. package/dist/combobox/label.svelte +13 -6
  100. package/dist/combobox/list.svelte +14 -7
  101. package/dist/combobox/positioner.svelte +14 -7
  102. package/dist/combobox/root.svelte +11 -5
  103. package/dist/combobox/trigger.svelte +13 -6
  104. package/dist/date-picker/clear-trigger.svelte +13 -6
  105. package/dist/date-picker/content.svelte +14 -7
  106. package/dist/date-picker/control.svelte +14 -7
  107. package/dist/date-picker/create-date-picker.svelte.d.ts +2 -0
  108. package/dist/date-picker/create-date-picker.svelte.js +11 -1
  109. package/dist/date-picker/date-picker.d.ts +1 -0
  110. package/dist/date-picker/date-picker.js +1 -0
  111. package/dist/date-picker/day-table-cell-trigger.svelte +13 -6
  112. package/dist/date-picker/day-table-cell.svelte +12 -13
  113. package/dist/date-picker/index.d.ts +1 -0
  114. package/dist/date-picker/input.svelte +11 -4
  115. package/dist/date-picker/label.svelte +13 -6
  116. package/dist/date-picker/month-select.svelte +19 -12
  117. package/dist/date-picker/month-table-cell-trigger.svelte +13 -6
  118. package/dist/date-picker/month-table-cell.svelte +12 -13
  119. package/dist/date-picker/next-trigger.svelte +13 -6
  120. package/dist/date-picker/positioner.svelte +14 -7
  121. package/dist/date-picker/preset-trigger.svelte +14 -6
  122. package/dist/date-picker/prev-trigger.svelte +13 -6
  123. package/dist/date-picker/range-text.svelte +18 -11
  124. package/dist/date-picker/root.svelte +13 -5
  125. package/dist/date-picker/table-body.svelte +14 -7
  126. package/dist/date-picker/table-head.svelte +14 -7
  127. package/dist/date-picker/table-header.svelte +14 -7
  128. package/dist/date-picker/table-row.svelte +14 -7
  129. package/dist/date-picker/table.svelte +14 -8
  130. package/dist/date-picker/trigger.svelte +13 -6
  131. package/dist/date-picker/view-control.svelte +14 -7
  132. package/dist/date-picker/view-trigger.svelte +28 -0
  133. package/dist/date-picker/view-trigger.svelte.d.ts +18 -0
  134. package/dist/date-picker/view.svelte +22 -9
  135. package/dist/date-picker/year-select.svelte +19 -12
  136. package/dist/date-picker/year-table-cell-trigger.svelte +13 -6
  137. package/dist/date-picker/year-table-cell.svelte +12 -13
  138. package/dist/dialog/backdrop.svelte +14 -7
  139. package/dist/dialog/close-trigger.svelte +13 -6
  140. package/dist/dialog/content.svelte +14 -7
  141. package/dist/dialog/description.svelte +14 -7
  142. package/dist/dialog/positioner.svelte +14 -7
  143. package/dist/dialog/title.svelte +14 -7
  144. package/dist/dialog/trigger.svelte +13 -6
  145. package/dist/editable/area.svelte +14 -7
  146. package/dist/editable/cancel-trigger.svelte +13 -6
  147. package/dist/editable/control.svelte +14 -7
  148. package/dist/editable/edit-trigger.svelte +13 -6
  149. package/dist/editable/input.svelte +11 -4
  150. package/dist/editable/label.svelte +13 -6
  151. package/dist/editable/preview.svelte +18 -11
  152. package/dist/editable/submit-trigger.svelte +13 -6
  153. package/dist/file-upload/dropzone.svelte +14 -7
  154. package/dist/file-upload/hidden-input.svelte +1 -1
  155. package/dist/file-upload/item-delete-trigger.svelte +13 -6
  156. package/dist/file-upload/item-group.svelte +14 -7
  157. package/dist/file-upload/item-name.svelte +18 -11
  158. package/dist/file-upload/item-preview-image.svelte +11 -4
  159. package/dist/file-upload/item-preview.svelte +14 -7
  160. package/dist/file-upload/item-size-text.svelte +18 -11
  161. package/dist/file-upload/item.svelte +14 -7
  162. package/dist/file-upload/label.svelte +13 -6
  163. package/dist/file-upload/root.svelte +1 -1
  164. package/dist/file-upload/trigger.svelte +13 -6
  165. package/dist/hover-card/arrow-tip.svelte +14 -7
  166. package/dist/hover-card/arrow.svelte +14 -7
  167. package/dist/hover-card/content.svelte +14 -7
  168. package/dist/hover-card/positioner.svelte +14 -7
  169. package/dist/hover-card/trigger.svelte +14 -7
  170. package/dist/index.d.ts +4 -0
  171. package/dist/index.js +4 -0
  172. package/dist/menu/arrow-tip.svelte +14 -7
  173. package/dist/menu/arrow.svelte +14 -7
  174. package/dist/menu/content.svelte +14 -7
  175. package/dist/menu/context-trigger.svelte +13 -6
  176. package/dist/menu/indicator.svelte +14 -7
  177. package/dist/menu/item-group-label.svelte +14 -7
  178. package/dist/menu/item-group.svelte +15 -9
  179. package/dist/menu/item.svelte +1 -1
  180. package/dist/menu/option-item-indicator.svelte +14 -7
  181. package/dist/menu/option-item-text.svelte +18 -11
  182. package/dist/menu/option-item.svelte +11 -5
  183. package/dist/menu/positioner.svelte +14 -7
  184. package/dist/menu/separator.svelte +14 -7
  185. package/dist/menu/trigger-item.svelte +14 -7
  186. package/dist/menu/trigger.svelte +14 -7
  187. package/dist/number-input/control.svelte +14 -7
  188. package/dist/number-input/decrement-trigger.svelte +13 -6
  189. package/dist/number-input/increment-trigger.svelte +14 -7
  190. package/dist/number-input/input.svelte +11 -4
  191. package/dist/number-input/label.svelte +13 -6
  192. package/dist/number-input/root.svelte +13 -5
  193. package/dist/number-input/scrubber.svelte +14 -7
  194. package/dist/pagination/ellipsis.svelte +14 -7
  195. package/dist/pagination/item.svelte +13 -6
  196. package/dist/pagination/next-trigger.svelte +13 -6
  197. package/dist/pagination/prev-trigger.svelte +13 -6
  198. package/dist/pagination/root.svelte +13 -5
  199. package/dist/pin-input/anatomy.js +3 -0
  200. package/dist/pin-input/clear-trigger.svelte +18 -12
  201. package/dist/pin-input/create-pin-input.svelte.d.ts +2 -0
  202. package/dist/pin-input/create-pin-input.svelte.js +13 -1
  203. package/dist/pin-input/hidden-input.svelte +1 -1
  204. package/dist/pin-input/input.svelte +11 -4
  205. package/dist/pin-input/label.svelte +13 -6
  206. package/dist/pin-input/pin-input.d.ts +1 -1
  207. package/dist/pin-input/pin-input.js +1 -1
  208. package/dist/pin-input/root.svelte +11 -5
  209. package/dist/popover/arrow-tip.svelte +14 -7
  210. package/dist/popover/arrow.svelte +14 -7
  211. package/dist/popover/close-trigger.svelte +13 -6
  212. package/dist/popover/content.svelte +14 -7
  213. package/dist/popover/description.svelte +14 -7
  214. package/dist/popover/positioner.svelte +14 -7
  215. package/dist/popover/title.svelte +14 -7
  216. package/dist/popover/trigger.svelte +13 -6
  217. package/dist/presence/context.svelte.d.ts +3 -0
  218. package/dist/presence/context.svelte.js +2 -0
  219. package/dist/presence/create-presence.svelte.d.ts +11 -4
  220. package/dist/presence/create-presence.svelte.js +19 -3
  221. package/dist/presence/root.svelte +9 -9
  222. package/dist/presence/root.svelte.d.ts +1 -1
  223. package/dist/progress/circle-range.svelte +13 -6
  224. package/dist/progress/circle-track.svelte +13 -6
  225. package/dist/progress/circle.svelte +13 -6
  226. package/dist/progress/index.d.ts +1 -0
  227. package/dist/progress/label.svelte +14 -7
  228. package/dist/progress/progress.d.ts +1 -0
  229. package/dist/progress/progress.js +1 -0
  230. package/dist/progress/range.svelte +14 -7
  231. package/dist/progress/root.svelte +11 -5
  232. package/dist/progress/track.svelte +14 -7
  233. package/dist/progress/value-text.svelte +18 -11
  234. package/dist/progress/view.svelte +28 -0
  235. package/dist/progress/view.svelte.d.ts +18 -0
  236. package/dist/qr-code/frame.svelte +13 -6
  237. package/dist/qr-code/overlay.svelte +14 -7
  238. package/dist/qr-code/pattern.svelte +13 -6
  239. package/dist/qr-code/root.svelte +11 -5
  240. package/dist/radio-group/indicator.svelte +14 -7
  241. package/dist/radio-group/item-control.svelte +14 -7
  242. package/dist/radio-group/item-hidden-input.svelte +1 -1
  243. package/dist/radio-group/item-text.svelte +14 -7
  244. package/dist/radio-group/item.svelte +10 -12
  245. package/dist/radio-group/label.svelte +14 -7
  246. package/dist/radio-group/root.svelte +13 -5
  247. package/dist/rating-group/control.svelte +16 -9
  248. package/dist/rating-group/hidden-input.svelte +1 -1
  249. package/dist/rating-group/item.svelte +14 -9
  250. package/dist/rating-group/label.svelte +15 -8
  251. package/dist/rating-group/root.svelte +17 -9
  252. package/dist/segment-group/indicator.svelte +14 -8
  253. package/dist/segment-group/item-control.svelte +15 -8
  254. package/dist/segment-group/item-hidden-input.svelte +1 -1
  255. package/dist/segment-group/item-text.svelte +14 -8
  256. package/dist/segment-group/item.svelte +10 -5
  257. package/dist/segment-group/label.svelte +14 -8
  258. package/dist/segment-group/root.svelte +13 -6
  259. package/dist/select/clear-trigger.svelte +13 -6
  260. package/dist/select/content.svelte +14 -7
  261. package/dist/select/control.svelte +14 -7
  262. package/dist/select/hidden-select.svelte +1 -1
  263. package/dist/select/indicator.svelte +14 -7
  264. package/dist/select/item-group-label.svelte +14 -7
  265. package/dist/select/item-group.svelte +14 -8
  266. package/dist/select/item-indicator.svelte +14 -7
  267. package/dist/select/item-text.svelte +18 -11
  268. package/dist/select/item.svelte +11 -6
  269. package/dist/select/label.svelte +13 -6
  270. package/dist/select/list.svelte +14 -7
  271. package/dist/select/positioner.svelte +14 -7
  272. package/dist/select/root.svelte +12 -6
  273. package/dist/select/trigger.svelte +13 -6
  274. package/dist/select/value-text.svelte +20 -13
  275. package/dist/signature-pad/clear-trigger.svelte +14 -7
  276. package/dist/signature-pad/control.svelte +14 -7
  277. package/dist/signature-pad/current-segment-path.svelte +13 -6
  278. package/dist/signature-pad/guide.svelte +14 -7
  279. package/dist/signature-pad/hidden-input.svelte +1 -1
  280. package/dist/signature-pad/label.svelte +13 -6
  281. package/dist/signature-pad/root.svelte +13 -5
  282. package/dist/signature-pad/segment-path.svelte +13 -6
  283. package/dist/signature-pad/segment.svelte +13 -6
  284. package/dist/slider/control.svelte +14 -7
  285. package/dist/slider/hidden-input.svelte +1 -1
  286. package/dist/slider/label.svelte +13 -6
  287. package/dist/slider/marker-group.svelte +14 -7
  288. package/dist/slider/marker.svelte +14 -7
  289. package/dist/slider/range.svelte +14 -7
  290. package/dist/slider/root.svelte +11 -5
  291. package/dist/slider/thumb.svelte +14 -7
  292. package/dist/slider/track.svelte +14 -7
  293. package/dist/slider/value-text.svelte +18 -11
  294. package/dist/splitter/context.svelte.d.ts +3 -0
  295. package/dist/splitter/context.svelte.js +2 -0
  296. package/dist/splitter/create-splitter.svelte.d.ts +7 -0
  297. package/dist/splitter/create-splitter.svelte.js +17 -0
  298. package/dist/splitter/index.d.ts +4 -0
  299. package/dist/splitter/index.js +1 -0
  300. package/dist/splitter/panel.svelte +36 -0
  301. package/dist/splitter/panel.svelte.d.ts +18 -0
  302. package/dist/splitter/resize-trigger.svelte +46 -0
  303. package/dist/splitter/resize-trigger.svelte.d.ts +18 -0
  304. package/dist/splitter/root.svelte +50 -0
  305. package/dist/splitter/root.svelte.d.ts +18 -0
  306. package/dist/splitter/splitter.d.ts +4 -0
  307. package/dist/splitter/splitter.js +4 -0
  308. package/dist/steps/completed-content.svelte +14 -7
  309. package/dist/steps/content.svelte +14 -7
  310. package/dist/steps/indicator.svelte +14 -7
  311. package/dist/steps/item.svelte +11 -6
  312. package/dist/steps/list.svelte +15 -7
  313. package/dist/steps/next-trigger.svelte +13 -6
  314. package/dist/steps/prev-trigger.svelte +13 -6
  315. package/dist/steps/progress.svelte +14 -7
  316. package/dist/steps/root.svelte +12 -6
  317. package/dist/steps/separator.svelte +14 -7
  318. package/dist/steps/trigger.svelte +13 -6
  319. package/dist/switch/control.svelte +14 -7
  320. package/dist/switch/hidden-input.svelte +1 -1
  321. package/dist/switch/label.svelte +14 -7
  322. package/dist/switch/root.svelte +10 -4
  323. package/dist/switch/thumb.svelte +14 -7
  324. package/dist/tabs/content.svelte +14 -7
  325. package/dist/tabs/list.svelte +14 -7
  326. package/dist/tabs/root.svelte +12 -6
  327. package/dist/tabs/trigger.svelte +13 -6
  328. package/dist/tags-input/clear-trigger.svelte +13 -6
  329. package/dist/tags-input/control.svelte +14 -7
  330. package/dist/tags-input/hidden-input.svelte +1 -1
  331. package/dist/tags-input/input.svelte +11 -4
  332. package/dist/tags-input/item-delete-trigger.svelte +13 -6
  333. package/dist/tags-input/item-input.svelte +12 -4
  334. package/dist/tags-input/item-preview.svelte +14 -7
  335. package/dist/tags-input/item-text.svelte +14 -7
  336. package/dist/tags-input/item.svelte +11 -13
  337. package/dist/tags-input/label.svelte +13 -6
  338. package/dist/tags-input/root.svelte +14 -6
  339. package/dist/time-picker/clear-trigger.svelte +27 -0
  340. package/dist/time-picker/clear-trigger.svelte.d.ts +18 -0
  341. package/dist/time-picker/column.svelte +28 -0
  342. package/dist/time-picker/column.svelte.d.ts +18 -0
  343. package/dist/time-picker/content.svelte +27 -0
  344. package/dist/time-picker/content.svelte.d.ts +18 -0
  345. package/dist/time-picker/context.svelte.d.ts +3 -0
  346. package/dist/time-picker/context.svelte.js +2 -0
  347. package/dist/time-picker/control.svelte +27 -0
  348. package/dist/time-picker/control.svelte.d.ts +18 -0
  349. package/dist/time-picker/create-time-picker.svelte.d.ts +8 -0
  350. package/dist/time-picker/create-time-picker.svelte.js +20 -0
  351. package/dist/time-picker/hour-cell.svelte +28 -0
  352. package/dist/time-picker/hour-cell.svelte.d.ts +18 -0
  353. package/dist/time-picker/index.d.ts +15 -0
  354. package/dist/time-picker/index.js +1 -0
  355. package/dist/time-picker/input.svelte +25 -0
  356. package/dist/time-picker/input.svelte.d.ts +18 -0
  357. package/dist/time-picker/label.svelte +27 -0
  358. package/dist/time-picker/label.svelte.d.ts +18 -0
  359. package/dist/time-picker/minute-cell.svelte +28 -0
  360. package/dist/time-picker/minute-cell.svelte.d.ts +18 -0
  361. package/dist/time-picker/period-cell.svelte +36 -0
  362. package/dist/time-picker/period-cell.svelte.d.ts +18 -0
  363. package/dist/time-picker/positioner.svelte +27 -0
  364. package/dist/time-picker/positioner.svelte.d.ts +18 -0
  365. package/dist/time-picker/root.svelte +78 -0
  366. package/dist/time-picker/root.svelte.d.ts +18 -0
  367. package/dist/time-picker/second-cell.svelte +28 -0
  368. package/dist/time-picker/second-cell.svelte.d.ts +18 -0
  369. package/dist/time-picker/spacer.svelte +27 -0
  370. package/dist/time-picker/spacer.svelte.d.ts +18 -0
  371. package/dist/time-picker/time-picker.d.ts +15 -0
  372. package/dist/time-picker/time-picker.js +15 -0
  373. package/dist/time-picker/trigger.svelte +27 -0
  374. package/dist/time-picker/trigger.svelte.d.ts +18 -0
  375. package/dist/timer/action-trigger.svelte +13 -7
  376. package/dist/timer/item-label.svelte +14 -7
  377. package/dist/timer/item-value.svelte +18 -11
  378. package/dist/timer/item.svelte +14 -7
  379. package/dist/timer/root.svelte +11 -5
  380. package/dist/timer/separator.svelte +14 -7
  381. package/dist/toast/action-trigger.svelte +13 -6
  382. package/dist/toast/actor.svelte +6 -6
  383. package/dist/toast/actor.svelte.d.ts +3 -3
  384. package/dist/toast/close-trigger.svelte +13 -6
  385. package/dist/toast/description.svelte +18 -11
  386. package/dist/toast/root.svelte +16 -14
  387. package/dist/toast/title.svelte +18 -11
  388. package/dist/toast/toaster.svelte +3 -2
  389. package/dist/toggle-group/item.svelte +10 -5
  390. package/dist/toggle-group/root.svelte +14 -6
  391. package/dist/tooltip/arrow-tip.svelte +14 -7
  392. package/dist/tooltip/arrow.svelte +14 -7
  393. package/dist/tooltip/content.svelte +14 -7
  394. package/dist/tooltip/positioner.svelte +14 -7
  395. package/dist/tooltip/trigger.svelte +13 -6
  396. package/dist/tree-view/branch-content.svelte +14 -7
  397. package/dist/tree-view/branch-control.svelte +14 -7
  398. package/dist/tree-view/branch-indicator.svelte +14 -7
  399. package/dist/tree-view/branch-text.svelte +14 -7
  400. package/dist/tree-view/branch-trigger.svelte +14 -7
  401. package/dist/tree-view/branch.svelte +11 -13
  402. package/dist/tree-view/item-indicator.svelte +14 -7
  403. package/dist/tree-view/item-text.svelte +14 -7
  404. package/dist/tree-view/item.svelte +11 -13
  405. package/dist/tree-view/label.svelte +14 -7
  406. package/dist/tree-view/root.svelte +12 -6
  407. package/dist/tree-view/tree.svelte +14 -7
  408. package/dist/types.d.ts +2 -1
  409. package/dist/utils.svelte.d.ts +2 -5
  410. package/dist/utils.svelte.js +9 -9
  411. package/package.json +4 -3
  412. package/dist/color-picker/.gitkeep +0 -0
  413. package/dist/time-picker/.gitkeep +0 -0
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const PeriodCell: $$__sveltets_2_IsomorphicComponent<TimePickerPeriodCellProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type PeriodCell = InstanceType<typeof PeriodCell>;
18
+ export default PeriodCell;
@@ -0,0 +1,27 @@
1
+ <script lang="ts" module>
2
+ import type {GenericHtmlProps, HtmlProps} from '../types.js';
3
+ import type {Snippet} from 'svelte';
4
+
5
+ export interface TimePickerPositionerProps extends HtmlProps<'div'> {
6
+ asChild?: Snippet<[attrs: Omit<GenericHtmlProps, 'children'>]>;
7
+ }
8
+ </script>
9
+
10
+ <script lang="ts">
11
+ import {mergeProps} from '../utils.svelte.js';
12
+ import {timePickerContext} from './context.svelte.js';
13
+
14
+ let {asChild, children, ...props}: TimePickerPositionerProps = $props();
15
+
16
+ let timePicker = timePickerContext.get();
17
+
18
+ let attrs = $derived(mergeProps(props, timePicker.getPositionerProps()));
19
+ </script>
20
+
21
+ {#if asChild}
22
+ {@render asChild(attrs)}
23
+ {:else}
24
+ <div {...attrs}>
25
+ {@render children?.()}
26
+ </div>
27
+ {/if}
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Positioner: $$__sveltets_2_IsomorphicComponent<TimePickerPositionerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Positioner = InstanceType<typeof Positioner>;
18
+ export default Positioner;
@@ -0,0 +1,78 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, GenericHtmlProps, HtmlProps} from '../types.js';
3
+ import type {Snippet} from 'svelte';
4
+ import type {CreateTimePickerProps, CreateTimePickerReturn} from './create-time-picker.svelte.js';
5
+
6
+ export interface TimePickerProps
7
+ extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateTimePickerProps> {
8
+ asChild?: Snippet<
9
+ [attrs: Omit<GenericHtmlProps, 'children'>, timePicker: CreateTimePickerReturn]
10
+ >;
11
+ children?: Snippet<[timePicker: CreateTimePickerReturn]>;
12
+ }
13
+ </script>
14
+
15
+ <script lang="ts">
16
+ import {mergeProps} from '../utils.svelte.js';
17
+ import {timePickerContext} from './context.svelte.js';
18
+ import {createTimePicker} from './create-time-picker.svelte.js';
19
+
20
+ let {
21
+ id,
22
+ ids,
23
+ min,
24
+ max,
25
+ name,
26
+ open,
27
+ steps,
28
+ value,
29
+ locale,
30
+ readOnly,
31
+ disabled,
32
+ defaultOpen,
33
+ placeholder,
34
+ positioning,
35
+ allowSeconds,
36
+ disableLayer,
37
+ onOpenChange,
38
+ onValueChange,
39
+ onFocusChange,
40
+ asChild,
41
+ children,
42
+ ...props
43
+ }: TimePickerProps = $props();
44
+
45
+ let timePicker = createTimePicker({
46
+ id,
47
+ ids,
48
+ min,
49
+ max,
50
+ name,
51
+ open,
52
+ steps,
53
+ value,
54
+ locale,
55
+ readOnly,
56
+ disabled,
57
+ defaultOpen,
58
+ placeholder,
59
+ positioning,
60
+ allowSeconds,
61
+ disableLayer,
62
+ onOpenChange,
63
+ onValueChange,
64
+ onFocusChange,
65
+ });
66
+
67
+ let attrs = $derived(mergeProps(props, timePicker.getRootProps()));
68
+
69
+ timePickerContext.set(timePicker);
70
+ </script>
71
+
72
+ {#if asChild}
73
+ {@render asChild(attrs, timePicker)}
74
+ {:else}
75
+ <div {...attrs}>
76
+ {@render children?.(timePicker)}
77
+ </div>
78
+ {/if}
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Root: $$__sveltets_2_IsomorphicComponent<TimePickerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Root = InstanceType<typeof Root>;
18
+ export default Root;
@@ -0,0 +1,28 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, GenericHtmlProps, HtmlProps} from '../types.js';
3
+ import type {CellProps} from '@zag-js/time-picker';
4
+ import type {Snippet} from 'svelte';
5
+
6
+ export interface TimePickerSecondCellProps extends Assign<HtmlProps<'div'>, CellProps> {
7
+ asChild?: Snippet<[attrs: Omit<GenericHtmlProps, 'children'>]>;
8
+ }
9
+ </script>
10
+
11
+ <script lang="ts">
12
+ import {mergeProps} from '../utils.svelte.js';
13
+ import {timePickerContext} from './context.svelte.js';
14
+
15
+ let {value, asChild, children, ...props}: TimePickerSecondCellProps = $props();
16
+
17
+ let timePicker = timePickerContext.get();
18
+
19
+ let attrs = $derived(mergeProps(props, timePicker.getSecondCellProps({value})));
20
+ </script>
21
+
22
+ {#if asChild}
23
+ {@render asChild(attrs)}
24
+ {:else}
25
+ <div {...attrs}>
26
+ {@render children?.()}
27
+ </div>
28
+ {/if}
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const SecondCell: $$__sveltets_2_IsomorphicComponent<TimePickerSecondCellProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type SecondCell = InstanceType<typeof SecondCell>;
18
+ export default SecondCell;
@@ -0,0 +1,27 @@
1
+ <script lang="ts" module>
2
+ import type {GenericHtmlProps, HtmlProps} from '../types.js';
3
+ import type {Snippet} from 'svelte';
4
+
5
+ export interface TimePickerSpacerProps extends HtmlProps<'div'> {
6
+ asChild?: Snippet<[attrs: Omit<GenericHtmlProps, 'children'>]>;
7
+ }
8
+ </script>
9
+
10
+ <script lang="ts">
11
+ import {mergeProps} from '../utils.svelte.js';
12
+ import {timePickerContext} from './context.svelte.js';
13
+
14
+ let {asChild, children, ...props}: TimePickerSpacerProps = $props();
15
+
16
+ let timePicker = timePickerContext.get();
17
+
18
+ let attrs = $derived(mergeProps(props, timePicker.getSpacerProps()));
19
+ </script>
20
+
21
+ {#if asChild}
22
+ {@render asChild(attrs)}
23
+ {:else}
24
+ <div {...attrs}>
25
+ {@render children?.()}
26
+ </div>
27
+ {/if}
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Spacer: $$__sveltets_2_IsomorphicComponent<TimePickerSpacerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Spacer = InstanceType<typeof Spacer>;
18
+ export default Spacer;
@@ -0,0 +1,15 @@
1
+ export { anatomy, parse } from '@zag-js/time-picker';
2
+ export { default as ClearTrigger } from './clear-trigger.svelte';
3
+ export { default as Column } from './column.svelte';
4
+ export { default as Content } from './content.svelte';
5
+ export { default as Control } from './control.svelte';
6
+ export { default as HourCell } from './hour-cell.svelte';
7
+ export { default as Input } from './input.svelte';
8
+ export { default as Label } from './label.svelte';
9
+ export { default as MinuteCell } from './minute-cell.svelte';
10
+ export { default as PeriodCell } from './period-cell.svelte';
11
+ export { default as Positioner } from './positioner.svelte';
12
+ export { default as Root } from './root.svelte';
13
+ export { default as SecondCell } from './second-cell.svelte';
14
+ export { default as Spacer } from './spacer.svelte';
15
+ export { default as Trigger } from './trigger.svelte';
@@ -0,0 +1,15 @@
1
+ export { anatomy, parse } from '@zag-js/time-picker';
2
+ export { default as ClearTrigger } from './clear-trigger.svelte';
3
+ export { default as Column } from './column.svelte';
4
+ export { default as Content } from './content.svelte';
5
+ export { default as Control } from './control.svelte';
6
+ export { default as HourCell } from './hour-cell.svelte';
7
+ export { default as Input } from './input.svelte';
8
+ export { default as Label } from './label.svelte';
9
+ export { default as MinuteCell } from './minute-cell.svelte';
10
+ export { default as PeriodCell } from './period-cell.svelte';
11
+ export { default as Positioner } from './positioner.svelte';
12
+ export { default as Root } from './root.svelte';
13
+ export { default as SecondCell } from './second-cell.svelte';
14
+ export { default as Spacer } from './spacer.svelte';
15
+ export { default as Trigger } from './trigger.svelte';
@@ -0,0 +1,27 @@
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
3
+ import type {Snippet} from 'svelte';
4
+
5
+ export interface TimePickerTriggerProps extends HtmlProps<'button'> {
6
+ asChild?: Snippet<[attrs: Omit<HtmlProps<'button'>, 'children'>]>;
7
+ }
8
+ </script>
9
+
10
+ <script lang="ts">
11
+ import {mergeProps} from '../utils.svelte.js';
12
+ import {timePickerContext} from './context.svelte.js';
13
+
14
+ let {asChild, children, ...props}: TimePickerTriggerProps = $props();
15
+
16
+ let timePicker = timePickerContext.get();
17
+
18
+ let attrs = $derived(mergeProps(props, timePicker.getTriggerProps()));
19
+ </script>
20
+
21
+ {#if asChild}
22
+ {@render asChild(attrs)}
23
+ {:else}
24
+ <button type="button" {...attrs}>
25
+ {@render children?.()}
26
+ </button>
27
+ {/if}
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Trigger: $$__sveltets_2_IsomorphicComponent<TimePickerTriggerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Trigger = InstanceType<typeof Trigger>;
18
+ export default Trigger;
@@ -1,22 +1,28 @@
1
1
  <script lang="ts" module>
2
2
  import type {Assign, HtmlProps} from '../types.js';
3
3
  import type {ActionTriggerProps} from '@zag-js/timer';
4
+ import type {Snippet} from 'svelte';
4
5
 
5
- export interface TimerActionTriggerProps
6
- extends Assign<HtmlProps<'button'>, ActionTriggerProps> {}
6
+ export interface TimerActionTriggerProps extends Assign<HtmlProps<'button'>, ActionTriggerProps> {
7
+ asChild?: Snippet<[attrs: Omit<HtmlProps<'button'>, 'children'>]>;
8
+ }
7
9
  </script>
8
10
 
9
11
  <script lang="ts">
10
- import {mergeProps} from '@zag-js/svelte';
12
+ import {mergeProps} from '../utils.svelte.js';
11
13
  import {timerContext} from './context.svelte.js';
12
14
 
13
- let {action, children, ...props}: TimerActionTriggerProps = $props();
15
+ let {action, asChild, children, ...props}: TimerActionTriggerProps = $props();
14
16
 
15
17
  let timer = timerContext.get();
16
18
 
17
19
  let attrs = $derived(mergeProps(props, timer.getActionTriggerProps({action})));
18
20
  </script>
19
21
 
20
- <button type="button" {...attrs}>
21
- {@render children?.()}
22
- </button>
22
+ {#if asChild}
23
+ {@render asChild(attrs)}
24
+ {:else}
25
+ <button type="button" {...attrs}>
26
+ {@render children?.()}
27
+ </button>
28
+ {/if}
@@ -1,14 +1,17 @@
1
1
  <script lang="ts" module>
2
- import type {HtmlProps} from '../types.js';
2
+ import type {GenericHtmlProps, HtmlProps} from '../types.js';
3
+ import type {Snippet} from 'svelte';
3
4
 
4
- export interface TimerItemLabelProps extends HtmlProps<'span'> {}
5
+ export interface TimerItemLabelProps extends HtmlProps<'div'> {
6
+ asChild?: Snippet<[attrs: Omit<GenericHtmlProps, 'children'>]>;
7
+ }
5
8
  </script>
6
9
 
7
10
  <script lang="ts">
8
- import {mergeProps} from '@zag-js/svelte';
11
+ import {mergeProps} from '../utils.svelte.js';
9
12
  import {timerContext, timerItemPropsContext} from './context.svelte.js';
10
13
 
11
- let {children, ...props}: TimerItemLabelProps = $props();
14
+ let {asChild, children, ...props}: TimerItemLabelProps = $props();
12
15
 
13
16
  let timer = timerContext.get();
14
17
  let itemProps = timerItemPropsContext.get();
@@ -16,6 +19,10 @@
16
19
  let attrs = $derived(mergeProps(props, timer.getItemLabelProps(itemProps)));
17
20
  </script>
18
21
 
19
- <span {...attrs}>
20
- {@render children?.()}
21
- </span>
22
+ {#if asChild}
23
+ {@render asChild(attrs)}
24
+ {:else}
25
+ <div {...attrs}>
26
+ {@render children?.()}
27
+ </div>
28
+ {/if}
@@ -1,14 +1,17 @@
1
1
  <script lang="ts" module>
2
- import type {HtmlProps} from '../types.js';
2
+ import type {GenericHtmlProps, HtmlProps} from '../types.js';
3
+ import type {Snippet} from 'svelte';
3
4
 
4
- export interface TimerItemValueProps extends HtmlProps<'span'> {}
5
+ export interface TimerItemValueProps extends HtmlProps<'div'> {
6
+ asChild?: Snippet<[attrs: Omit<GenericHtmlProps, 'children'>]>;
7
+ }
5
8
  </script>
6
9
 
7
10
  <script lang="ts">
8
- import {mergeProps} from '@zag-js/svelte';
11
+ import {mergeProps} from '../utils.svelte.js';
9
12
  import {timerContext, timerItemPropsContext} from './context.svelte.js';
10
13
 
11
- let {children, ...props}: TimerItemValueProps = $props();
14
+ let {asChild, children, ...props}: TimerItemValueProps = $props();
12
15
 
13
16
  let timer = timerContext.get();
14
17
  let itemProps = timerItemPropsContext.get();
@@ -16,10 +19,14 @@
16
19
  let attrs = $derived(mergeProps(props, timer.getItemValueProps(itemProps)));
17
20
  </script>
18
21
 
19
- <span {...attrs}>
20
- {#if children}
21
- {@render children?.()}
22
- {:else}
23
- {timer.formattedTime[itemProps.type]}
24
- {/if}
25
- </span>
22
+ {#if asChild}
23
+ {@render asChild(attrs)}
24
+ {:else}
25
+ <div {...attrs}>
26
+ {#if children}
27
+ {@render children?.()}
28
+ {:else}
29
+ {timer.formattedTime[itemProps.type]}
30
+ {/if}
31
+ </div>
32
+ {/if}
@@ -1,15 +1,18 @@
1
1
  <script lang="ts" module>
2
- import type {Assign, HtmlProps} from '../types.js';
2
+ import type {Assign, GenericHtmlProps, HtmlProps} from '../types.js';
3
3
  import type {ItemProps} from '@zag-js/timer';
4
+ import type {Snippet} from 'svelte';
4
5
 
5
- export interface TimerItemProps extends Assign<HtmlProps<'div'>, ItemProps> {}
6
+ export interface TimerItemProps extends Assign<HtmlProps<'div'>, ItemProps> {
7
+ asChild?: Snippet<[attrs: Omit<GenericHtmlProps, 'children'>]>;
8
+ }
6
9
  </script>
7
10
 
8
11
  <script lang="ts">
9
- import {mergeProps} from '@zag-js/svelte';
12
+ import {mergeProps} from '../utils.svelte.js';
10
13
  import {timerContext, timerItemPropsContext} from './context.svelte.js';
11
14
 
12
- let {type, children, ...props}: TimerItemProps = $props();
15
+ let {type, asChild, children, ...props}: TimerItemProps = $props();
13
16
 
14
17
  let timer = timerContext.get();
15
18
  let itemProps = $derived({
@@ -21,6 +24,10 @@
21
24
  timerItemPropsContext.set(() => itemProps);
22
25
  </script>
23
26
 
24
- <div {...attrs}>
25
- {@render children?.()}
26
- </div>
27
+ {#if asChild}
28
+ {@render asChild(attrs)}
29
+ {:else}
30
+ <div {...attrs}>
31
+ {@render children?.()}
32
+ </div>
33
+ {/if}
@@ -1,15 +1,16 @@
1
1
  <script lang="ts" module>
2
- import type {Assign, HtmlProps} from '../types.js';
2
+ import type {Assign, GenericHtmlProps, HtmlProps} from '../types.js';
3
3
  import type {Snippet} from 'svelte';
4
4
  import type {CreateTimerProps, CreateTimerReturn} from './create-timer.svelte.js';
5
5
 
6
6
  export interface TimerProps extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateTimerProps> {
7
+ asChild?: Snippet<[attrs: Omit<GenericHtmlProps, 'children'>, timer: CreateTimerReturn]>;
7
8
  children?: Snippet<[timer: CreateTimerReturn]>;
8
9
  }
9
10
  </script>
10
11
 
11
12
  <script lang="ts">
12
- import {mergeProps} from '@zag-js/svelte';
13
+ import {mergeProps} from '../utils.svelte.js';
13
14
  import {timerContext} from './context.svelte.js';
14
15
  import {createTimer} from './create-timer.svelte.js';
15
16
 
@@ -22,6 +23,7 @@
22
23
  countdown,
23
24
  onTick,
24
25
  onComplete,
26
+ asChild,
25
27
  children,
26
28
  ...props
27
29
  }: TimerProps = $props();
@@ -42,6 +44,10 @@
42
44
  timerContext.set(timer);
43
45
  </script>
44
46
 
45
- <div {...attrs}>
46
- {@render children?.(timer)}
47
- </div>
47
+ {#if asChild}
48
+ {@render asChild(attrs, timer)}
49
+ {:else}
50
+ <div {...attrs}>
51
+ {@render children?.(timer)}
52
+ </div>
53
+ {/if}
@@ -1,20 +1,27 @@
1
1
  <script lang="ts" module>
2
- import type {HtmlProps} from '../types.js';
2
+ import type {GenericHtmlProps, HtmlProps} from '../types.js';
3
+ import type {Snippet} from 'svelte';
3
4
 
4
- export interface TimerSeparatorProps extends HtmlProps<'span'> {}
5
+ export interface TimerSeparatorProps extends HtmlProps<'div'> {
6
+ asChild?: Snippet<[attrs: Omit<GenericHtmlProps, 'children'>]>;
7
+ }
5
8
  </script>
6
9
 
7
10
  <script lang="ts">
8
- import {mergeProps} from '@zag-js/svelte';
11
+ import {mergeProps} from '../utils.svelte.js';
9
12
  import {timerContext} from './context.svelte.js';
10
13
 
11
- let {children, ...props}: TimerSeparatorProps = $props();
14
+ let {asChild, children, ...props}: TimerSeparatorProps = $props();
12
15
 
13
16
  let timer = timerContext.get();
14
17
 
15
18
  let attrs = $derived(mergeProps(props, timer.getSeparatorProps()));
16
19
  </script>
17
20
 
18
- <span {...attrs}>
19
- {@render children?.()}
20
- </span>
21
+ {#if asChild}
22
+ {@render asChild(attrs)}
23
+ {:else}
24
+ <div {...attrs}>
25
+ {@render children?.()}
26
+ </div>
27
+ {/if}
@@ -1,20 +1,27 @@
1
1
  <script lang="ts" module>
2
2
  import type {HtmlProps} from '../types.js';
3
+ import type {Snippet} from 'svelte';
3
4
 
4
- export interface ToastActionTriggerProps extends HtmlProps<'button'> {}
5
+ export interface ToastActionTriggerProps extends HtmlProps<'button'> {
6
+ asChild?: Snippet<[attrs: Omit<HtmlProps<'button'>, 'children'>]>;
7
+ }
5
8
  </script>
6
9
 
7
10
  <script lang="ts">
8
- import {mergeProps} from '@zag-js/svelte';
11
+ import {mergeProps} from '../utils.svelte.js';
9
12
  import {toastContext} from './context.svelte.js';
10
13
 
11
- let {children, ...props}: ToastActionTriggerProps = $props();
14
+ let {asChild, children, ...props}: ToastActionTriggerProps = $props();
12
15
 
13
16
  let context = toastContext.get();
14
17
 
15
18
  let attrs = $derived(mergeProps(props, context.getActionTriggerProps()));
16
19
  </script>
17
20
 
18
- <button type="button" {...attrs}>
19
- {@render children?.()}
20
- </button>
21
+ {#if asChild}
22
+ {@render asChild(attrs)}
23
+ {:else}
24
+ <button type="button" {...attrs}>
25
+ {@render children?.()}
26
+ </button>
27
+ {/if}
@@ -1,19 +1,19 @@
1
1
  <script lang="ts">
2
- import * as toast from '@zag-js/toast';
2
+ import * as toast$ from '@zag-js/toast';
3
3
  import type {Snippet} from 'svelte';
4
4
  import {toastContext} from './context.svelte.js';
5
5
  import {createToast, type CreateToastReturn} from './create-toast.svelte.js';
6
6
 
7
7
  interface Props {
8
- actor: toast.Service;
9
- children$: Snippet<[api: CreateToastReturn]>;
8
+ actor: toast$.Service;
9
+ children$: Snippet<[toast: CreateToastReturn]>;
10
10
  }
11
11
 
12
12
  let {actor, children$}: Props = $props();
13
13
 
14
- let context = createToast(actor);
14
+ let toast = createToast(actor);
15
15
 
16
- toastContext.set(context);
16
+ toastContext.set(toast);
17
17
  </script>
18
18
 
19
- {@render children$(context)}
19
+ {@render children$(toast)}
@@ -1,4 +1,4 @@
1
- import * as toast from '@zag-js/toast';
1
+ import * as toast$ from '@zag-js/toast';
2
2
  import type { Snippet } from 'svelte';
3
3
  import { type CreateToastReturn } from './create-toast.svelte.js';
4
4
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
@@ -15,8 +15,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
15
15
  z_$$bindings?: Bindings;
16
16
  }
17
17
  declare const Actor: $$__sveltets_2_IsomorphicComponent<{
18
- actor: toast.Service;
19
- children$: Snippet<[api: CreateToastReturn]>;
18
+ actor: toast$.Service;
19
+ children$: Snippet<[toast: CreateToastReturn]>;
20
20
  }, {
21
21
  [evt: string]: CustomEvent<any>;
22
22
  }, {}, {}, "">;