ui-ingredients 0.0.19 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (342) hide show
  1. package/README.md +3 -3
  2. package/dist/accordion/create-accordion.svelte.js +4 -4
  3. package/dist/accordion/item-content.svelte +2 -3
  4. package/dist/accordion/item-indicator.svelte +2 -3
  5. package/dist/accordion/item-trigger.svelte +2 -3
  6. package/dist/accordion/item.svelte +3 -4
  7. package/dist/accordion/root.svelte +5 -5
  8. package/dist/avatar/create-avatar.svelte.js +4 -4
  9. package/dist/avatar/fallback.svelte +2 -2
  10. package/dist/avatar/image.svelte +2 -2
  11. package/dist/avatar/root.svelte +5 -5
  12. package/dist/carousel/create-carousel.svelte.js +4 -4
  13. package/dist/carousel/indicator-group.svelte +2 -2
  14. package/dist/carousel/indicator.svelte +2 -2
  15. package/dist/carousel/item-group.svelte +2 -2
  16. package/dist/carousel/item.svelte +3 -3
  17. package/dist/carousel/next-trigger.svelte +2 -2
  18. package/dist/carousel/prev-trigger.svelte +2 -2
  19. package/dist/carousel/root.svelte +5 -5
  20. package/dist/carousel/viewport.svelte +2 -2
  21. package/dist/checkbox/control.svelte +2 -2
  22. package/dist/checkbox/create-checkbox.svelte.js +4 -4
  23. package/dist/checkbox/hidden-input.svelte +2 -2
  24. package/dist/checkbox/indicator.svelte +2 -2
  25. package/dist/checkbox/label.svelte +2 -2
  26. package/dist/checkbox/root.svelte +5 -5
  27. package/dist/clipboard/control.svelte +2 -2
  28. package/dist/clipboard/create-clipboard.svelte.js +2 -2
  29. package/dist/clipboard/indicator.svelte +2 -2
  30. package/dist/clipboard/input.svelte +2 -2
  31. package/dist/clipboard/label.svelte +2 -2
  32. package/dist/clipboard/root.svelte +5 -5
  33. package/dist/clipboard/trigger.svelte +2 -2
  34. package/dist/collapsible/content.svelte +2 -2
  35. package/dist/collapsible/create-collapsible.svelte.js +4 -4
  36. package/dist/collapsible/root.svelte +5 -5
  37. package/dist/collapsible/trigger.svelte +3 -3
  38. package/dist/combobox/clear-trigger.svelte +2 -2
  39. package/dist/combobox/content.svelte +2 -2
  40. package/dist/combobox/control.svelte +2 -2
  41. package/dist/combobox/create-combobox.svelte.js +4 -4
  42. package/dist/combobox/input.svelte +2 -2
  43. package/dist/combobox/item-group-label.svelte +2 -3
  44. package/dist/combobox/item-group.svelte +2 -2
  45. package/dist/combobox/item-indicator.svelte +2 -3
  46. package/dist/combobox/item-text.svelte +3 -4
  47. package/dist/combobox/item.svelte +3 -4
  48. package/dist/combobox/label.svelte +2 -2
  49. package/dist/combobox/list.svelte +2 -2
  50. package/dist/combobox/positioner.svelte +2 -2
  51. package/dist/combobox/root.svelte +5 -5
  52. package/dist/combobox/trigger.svelte +2 -2
  53. package/dist/date-picker/anatomy.js +3 -0
  54. package/dist/date-picker/clear-trigger.svelte +19 -2
  55. package/dist/date-picker/clear-trigger.svelte.d.ts +3 -3
  56. package/dist/date-picker/content.svelte +19 -2
  57. package/dist/date-picker/content.svelte.d.ts +3 -3
  58. package/dist/date-picker/context.svelte.d.ts +8 -8
  59. package/dist/date-picker/context.svelte.js +6 -14
  60. package/dist/date-picker/control.svelte +19 -2
  61. package/dist/date-picker/control.svelte.d.ts +3 -3
  62. package/dist/date-picker/create-date-picker.svelte.d.ts +14 -0
  63. package/dist/date-picker/create-date-picker.svelte.js +24 -0
  64. package/dist/date-picker/date-picker.d.ts +3 -3
  65. package/dist/date-picker/date-picker.js +3 -3
  66. package/dist/date-picker/day-table-cell-trigger.svelte +20 -2
  67. package/dist/date-picker/day-table-cell-trigger.svelte.d.ts +3 -3
  68. package/dist/date-picker/day-table-cell.svelte +39 -2
  69. package/dist/date-picker/day-table-cell.svelte.d.ts +3 -3
  70. package/dist/date-picker/index.d.ts +29 -0
  71. package/dist/date-picker/index.js +2 -0
  72. package/dist/date-picker/input.svelte +18 -2
  73. package/dist/date-picker/input.svelte.d.ts +3 -3
  74. package/dist/date-picker/label.svelte +20 -2
  75. package/dist/date-picker/label.svelte.d.ts +3 -3
  76. package/dist/date-picker/month-select.svelte +40 -2
  77. package/dist/date-picker/month-select.svelte.d.ts +3 -3
  78. package/dist/date-picker/month-table-cell-trigger.svelte +20 -2
  79. package/dist/date-picker/month-table-cell-trigger.svelte.d.ts +3 -3
  80. package/dist/date-picker/month-table-cell.svelte +39 -2
  81. package/dist/date-picker/month-table-cell.svelte.d.ts +3 -3
  82. package/dist/date-picker/next-trigger.svelte +20 -2
  83. package/dist/date-picker/next-trigger.svelte.d.ts +3 -3
  84. package/dist/date-picker/positioner.svelte +19 -2
  85. package/dist/date-picker/positioner.svelte.d.ts +3 -3
  86. package/dist/date-picker/preset-trigger.svelte +21 -2
  87. package/dist/date-picker/preset-trigger.svelte.d.ts +3 -3
  88. package/dist/date-picker/prev-trigger.svelte +20 -2
  89. package/dist/date-picker/prev-trigger.svelte.d.ts +3 -3
  90. package/dist/date-picker/range-text.svelte +23 -2
  91. package/dist/date-picker/range-text.svelte.d.ts +3 -3
  92. package/dist/date-picker/root.svelte +87 -2
  93. package/dist/date-picker/root.svelte.d.ts +3 -3
  94. package/dist/date-picker/table-body.svelte +20 -2
  95. package/dist/date-picker/table-body.svelte.d.ts +3 -3
  96. package/dist/date-picker/table-head.svelte +20 -2
  97. package/dist/date-picker/table-head.svelte.d.ts +3 -3
  98. package/dist/date-picker/table-header.svelte +20 -2
  99. package/dist/date-picker/table-header.svelte.d.ts +3 -3
  100. package/dist/date-picker/table-row.svelte +20 -2
  101. package/dist/date-picker/table-row.svelte.d.ts +3 -3
  102. package/dist/date-picker/table.svelte +29 -2
  103. package/dist/date-picker/table.svelte.d.ts +3 -3
  104. package/dist/date-picker/trigger.svelte +19 -2
  105. package/dist/date-picker/trigger.svelte.d.ts +3 -3
  106. package/dist/date-picker/view-control.svelte +20 -2
  107. package/dist/date-picker/view-control.svelte.d.ts +3 -3
  108. package/dist/date-picker/view.svelte +24 -0
  109. package/dist/date-picker/{view-trigger.svelte.d.ts → view.svelte.d.ts} +5 -5
  110. package/dist/date-picker/year-select.svelte +40 -2
  111. package/dist/date-picker/year-select.svelte.d.ts +3 -3
  112. package/dist/date-picker/year-table-cell-trigger.svelte +20 -2
  113. package/dist/date-picker/year-table-cell-trigger.svelte.d.ts +3 -3
  114. package/dist/date-picker/year-table-cell.svelte +39 -2
  115. package/dist/date-picker/year-table-cell.svelte.d.ts +3 -3
  116. package/dist/dialog/backdrop.svelte +2 -2
  117. package/dist/dialog/close-trigger.svelte +2 -2
  118. package/dist/dialog/content.svelte +2 -2
  119. package/dist/dialog/create-dialog.svelte.js +4 -4
  120. package/dist/dialog/description.svelte +2 -2
  121. package/dist/dialog/positioner.svelte +2 -2
  122. package/dist/dialog/root.svelte +4 -4
  123. package/dist/dialog/title.svelte +2 -2
  124. package/dist/dialog/trigger.svelte +2 -2
  125. package/dist/editable/area.svelte +2 -2
  126. package/dist/editable/cancel-trigger.svelte +2 -2
  127. package/dist/editable/control.svelte +2 -2
  128. package/dist/editable/create-editable.svelte.js +4 -4
  129. package/dist/editable/edit-trigger.svelte +2 -2
  130. package/dist/editable/input.svelte +2 -2
  131. package/dist/editable/label.svelte +2 -2
  132. package/dist/editable/preview.svelte +3 -3
  133. package/dist/editable/root.svelte +4 -4
  134. package/dist/editable/submit-trigger.svelte +2 -2
  135. package/dist/environment-provider/root.svelte +2 -2
  136. package/dist/file-upload/context.svelte.d.ts +5 -8
  137. package/dist/file-upload/context.svelte.js +3 -14
  138. package/dist/file-upload/create-file-upload.svelte.d.ts +7 -0
  139. package/dist/file-upload/create-file-upload.svelte.js +18 -0
  140. package/dist/file-upload/dropzone.svelte +19 -2
  141. package/dist/file-upload/dropzone.svelte.d.ts +3 -3
  142. package/dist/file-upload/hidden-input.svelte +17 -2
  143. package/dist/file-upload/hidden-input.svelte.d.ts +3 -3
  144. package/dist/file-upload/index.d.ts +13 -0
  145. package/dist/file-upload/index.js +1 -0
  146. package/dist/file-upload/item-delete-trigger.svelte +20 -2
  147. package/dist/file-upload/item-delete-trigger.svelte.d.ts +3 -3
  148. package/dist/file-upload/item-group.svelte +19 -2
  149. package/dist/file-upload/item-group.svelte.d.ts +3 -3
  150. package/dist/file-upload/item-name.svelte +24 -2
  151. package/dist/file-upload/item-name.svelte.d.ts +3 -3
  152. package/dist/file-upload/item-preview-image.svelte +26 -2
  153. package/dist/file-upload/item-preview-image.svelte.d.ts +3 -3
  154. package/dist/file-upload/item-preview.svelte +20 -2
  155. package/dist/file-upload/item-preview.svelte.d.ts +3 -3
  156. package/dist/file-upload/item-size-text.svelte +24 -2
  157. package/dist/file-upload/item-size-text.svelte.d.ts +3 -3
  158. package/dist/file-upload/item.svelte +25 -2
  159. package/dist/file-upload/item.svelte.d.ts +3 -3
  160. package/dist/file-upload/label.svelte +19 -2
  161. package/dist/file-upload/label.svelte.d.ts +3 -3
  162. package/dist/file-upload/root.svelte +67 -2
  163. package/dist/file-upload/root.svelte.d.ts +3 -3
  164. package/dist/file-upload/trigger.svelte +19 -2
  165. package/dist/file-upload/trigger.svelte.d.ts +3 -3
  166. package/dist/hover-card/arrow-tip.svelte +2 -2
  167. package/dist/hover-card/arrow.svelte +2 -2
  168. package/dist/hover-card/content.svelte +2 -2
  169. package/dist/hover-card/create-hover-card.svelte.js +4 -4
  170. package/dist/hover-card/positioner.svelte +2 -2
  171. package/dist/hover-card/root.svelte +4 -4
  172. package/dist/hover-card/trigger.svelte +2 -2
  173. package/dist/locale-provider/root.svelte +2 -2
  174. package/dist/menu/arrow-tip.svelte +2 -2
  175. package/dist/menu/arrow.svelte +2 -2
  176. package/dist/menu/context-trigger.svelte +2 -2
  177. package/dist/menu/create-menu.svelte.js +4 -4
  178. package/dist/menu/indicator.svelte +2 -2
  179. package/dist/menu/item-group-label.svelte +2 -3
  180. package/dist/menu/item-group.svelte +2 -2
  181. package/dist/menu/item.svelte +3 -4
  182. package/dist/menu/option-item-indicator.svelte +2 -3
  183. package/dist/menu/option-item-text.svelte +2 -3
  184. package/dist/menu/option-item.svelte +3 -4
  185. package/dist/menu/positioner.svelte +2 -2
  186. package/dist/menu/root.svelte +4 -4
  187. package/dist/menu/separator.svelte +2 -2
  188. package/dist/menu/trigger-item.svelte +2 -2
  189. package/dist/menu/trigger.svelte +2 -2
  190. package/dist/number-input/control.svelte +2 -2
  191. package/dist/number-input/create-number-input.svelte.d.ts +1 -1
  192. package/dist/number-input/create-number-input.svelte.js +5 -5
  193. package/dist/number-input/decrement-trigger.svelte +2 -2
  194. package/dist/number-input/increment-trigger.svelte +2 -2
  195. package/dist/number-input/input.svelte +2 -2
  196. package/dist/number-input/label.svelte +2 -2
  197. package/dist/number-input/root.svelte +7 -5
  198. package/dist/number-input/scrubber.svelte +2 -2
  199. package/dist/pagination/create-pagination.svelte.js +4 -4
  200. package/dist/pagination/ellipsis.svelte +2 -2
  201. package/dist/pagination/item.svelte +2 -2
  202. package/dist/pagination/next-trigger.svelte +2 -2
  203. package/dist/pagination/prev-trigger.svelte +2 -2
  204. package/dist/pagination/root.svelte +5 -5
  205. package/dist/pin-input/clear-trigger.svelte +2 -2
  206. package/dist/pin-input/create-pin-input.svelte.js +4 -4
  207. package/dist/pin-input/hidden-input.svelte +2 -2
  208. package/dist/pin-input/input.svelte +2 -2
  209. package/dist/pin-input/label.svelte +2 -2
  210. package/dist/pin-input/root.svelte +5 -5
  211. package/dist/popover/arrow-tip.svelte +2 -2
  212. package/dist/popover/arrow.svelte +2 -2
  213. package/dist/popover/close-trigger.svelte +2 -2
  214. package/dist/popover/content.svelte +2 -2
  215. package/dist/popover/create-popover.svelte.js +4 -4
  216. package/dist/popover/description.svelte +2 -2
  217. package/dist/popover/positioner.svelte +2 -2
  218. package/dist/popover/root.svelte +4 -4
  219. package/dist/popover/title.svelte +2 -2
  220. package/dist/popover/trigger.svelte +2 -2
  221. package/dist/portal/root.svelte +2 -4
  222. package/dist/presence/create-presence.svelte.d.ts +10 -0
  223. package/dist/presence/create-presence.svelte.js +19 -0
  224. package/dist/presence/root.svelte +11 -20
  225. package/dist/progress/circle-range.svelte +2 -2
  226. package/dist/progress/circle-track.svelte +2 -2
  227. package/dist/progress/circle.svelte +2 -2
  228. package/dist/progress/create-progress.svelte.js +4 -4
  229. package/dist/progress/label.svelte +2 -2
  230. package/dist/progress/range.svelte +2 -2
  231. package/dist/progress/root.svelte +5 -5
  232. package/dist/progress/track.svelte +2 -2
  233. package/dist/progress/value-text.svelte +3 -3
  234. package/dist/qr-code/create-qr-code.svelte.js +4 -4
  235. package/dist/qr-code/frame.svelte +2 -2
  236. package/dist/qr-code/overlay.svelte +2 -2
  237. package/dist/qr-code/pattern.svelte +2 -2
  238. package/dist/qr-code/root.svelte +5 -5
  239. package/dist/radio-group/create-radio-group.svelte.js +4 -4
  240. package/dist/radio-group/indicator.svelte +2 -2
  241. package/dist/radio-group/item-control.svelte +2 -3
  242. package/dist/radio-group/item-hidden-input.svelte +2 -3
  243. package/dist/radio-group/item-text.svelte +2 -3
  244. package/dist/radio-group/item.svelte +3 -4
  245. package/dist/radio-group/label.svelte +2 -2
  246. package/dist/radio-group/root.svelte +5 -5
  247. package/dist/rating-group/control.svelte +2 -2
  248. package/dist/rating-group/create-rating-group.svelte.js +4 -4
  249. package/dist/rating-group/hidden-input.svelte +2 -2
  250. package/dist/rating-group/item.svelte +3 -4
  251. package/dist/rating-group/label.svelte +2 -2
  252. package/dist/rating-group/root.svelte +5 -5
  253. package/dist/segment-group/create-segment-group.svelte.js +4 -4
  254. package/dist/segment-group/indicator.svelte +2 -2
  255. package/dist/segment-group/item-control.svelte +2 -3
  256. package/dist/segment-group/item-hidden-input.svelte +2 -3
  257. package/dist/segment-group/item-text.svelte +2 -3
  258. package/dist/segment-group/item.svelte +3 -4
  259. package/dist/segment-group/label.svelte +2 -2
  260. package/dist/segment-group/root.svelte +5 -5
  261. package/dist/select/clear-trigger.svelte +2 -2
  262. package/dist/select/content.svelte +2 -2
  263. package/dist/select/control.svelte +2 -2
  264. package/dist/select/create-select.svelte.js +4 -4
  265. package/dist/select/hidden-select.svelte +2 -2
  266. package/dist/select/indicator.svelte +2 -2
  267. package/dist/select/item-group-label.svelte +2 -3
  268. package/dist/select/item-group.svelte +2 -2
  269. package/dist/select/item-indicator.svelte +2 -3
  270. package/dist/select/item-text.svelte +3 -4
  271. package/dist/select/item.svelte +3 -4
  272. package/dist/select/label.svelte +2 -2
  273. package/dist/select/list.svelte +2 -2
  274. package/dist/select/positioner.svelte +2 -2
  275. package/dist/select/root.svelte +5 -5
  276. package/dist/select/trigger.svelte +2 -2
  277. package/dist/select/value-text.svelte +4 -4
  278. package/dist/slider/control.svelte +2 -2
  279. package/dist/slider/create-slider.svelte.js +4 -4
  280. package/dist/slider/hidden-input.svelte +2 -3
  281. package/dist/slider/label.svelte +2 -2
  282. package/dist/slider/marker-group.svelte +2 -2
  283. package/dist/slider/marker.svelte +2 -2
  284. package/dist/slider/range.svelte +2 -2
  285. package/dist/slider/root.svelte +5 -5
  286. package/dist/slider/thumb.svelte +2 -3
  287. package/dist/slider/track.svelte +2 -2
  288. package/dist/slider/value-text.svelte +3 -3
  289. package/dist/steps/content.svelte +2 -2
  290. package/dist/steps/create-steps.svelte.js +4 -4
  291. package/dist/steps/indicator.svelte +2 -3
  292. package/dist/steps/item.svelte +3 -4
  293. package/dist/steps/list.svelte +2 -2
  294. package/dist/steps/next-trigger.svelte +2 -2
  295. package/dist/steps/prev-trigger.svelte +2 -2
  296. package/dist/steps/progress.svelte +2 -2
  297. package/dist/steps/root.svelte +5 -5
  298. package/dist/steps/separator.svelte +2 -3
  299. package/dist/steps/trigger.svelte +2 -3
  300. package/dist/switch/control.svelte +2 -2
  301. package/dist/switch/create-switch.svelte.js +4 -4
  302. package/dist/switch/hidden-input.svelte +2 -2
  303. package/dist/switch/label.svelte +2 -2
  304. package/dist/switch/root.svelte +5 -5
  305. package/dist/switch/thumb.svelte +2 -2
  306. package/dist/tabs/content.svelte +2 -2
  307. package/dist/tabs/create-tabs.svelte.js +4 -4
  308. package/dist/tabs/list.svelte +2 -2
  309. package/dist/tabs/root.svelte +5 -5
  310. package/dist/tabs/trigger.svelte +2 -2
  311. package/dist/tags-input/clear-trigger.svelte +2 -2
  312. package/dist/tags-input/control.svelte +2 -2
  313. package/dist/tags-input/create-tags-input.svelte.js +4 -4
  314. package/dist/tags-input/hidden-input.svelte +2 -2
  315. package/dist/tags-input/input.svelte +2 -2
  316. package/dist/tags-input/item-delete-trigger.svelte +2 -3
  317. package/dist/tags-input/item-input.svelte +2 -3
  318. package/dist/tags-input/item-preview.svelte +2 -3
  319. package/dist/tags-input/item-text.svelte +2 -3
  320. package/dist/tags-input/item.svelte +3 -4
  321. package/dist/tags-input/label.svelte +2 -2
  322. package/dist/tags-input/root.svelte +5 -5
  323. package/dist/timer/action-trigger.svelte +2 -2
  324. package/dist/timer/create-timer.svelte.js +2 -2
  325. package/dist/timer/item-label.svelte +2 -3
  326. package/dist/timer/item-value.svelte +3 -4
  327. package/dist/timer/item.svelte +2 -3
  328. package/dist/timer/root.svelte +5 -5
  329. package/dist/timer/separator.svelte +2 -2
  330. package/dist/toast/create-toaster.svelte.js +4 -4
  331. package/dist/toggle-group/create-toggle-group.svelte.js +4 -4
  332. package/dist/toggle-group/item.svelte +3 -4
  333. package/dist/toggle-group/root.svelte +4 -4
  334. package/dist/tooltip/arrow-tip.svelte +2 -2
  335. package/dist/tooltip/arrow.svelte +2 -2
  336. package/dist/tooltip/content.svelte +2 -2
  337. package/dist/tooltip/create-tooltip.svelte.js +4 -4
  338. package/dist/tooltip/positioner.svelte +2 -2
  339. package/dist/tooltip/root.svelte +4 -4
  340. package/dist/tooltip/trigger.svelte +2 -2
  341. package/package.json +3 -2
  342. package/dist/date-picker/view-trigger.svelte +0 -3
@@ -1,3 +1,21 @@
1
- <script lang="ts" module></script>
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
2
3
 
3
- <script lang="ts"></script>
4
+ export interface DatePickerTableBodyProps extends HtmlProps<'div'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {datePickerContext, datePickerTablePropsContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: DatePickerTableBodyProps = $props();
12
+
13
+ let datePicker = datePickerContext.get();
14
+ let tableProps = datePickerTablePropsContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, datePicker.getTableBodyProps(tableProps)));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const TableBody: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const TableBody: $$__sveltets_2_IsomorphicComponent<DatePickerTableBodyProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
16
+ }, {}, {}, "">;
17
17
  type TableBody = InstanceType<typeof TableBody>;
18
18
  export default TableBody;
@@ -1,3 +1,21 @@
1
- <script lang="ts" module></script>
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
2
3
 
3
- <script lang="ts"></script>
4
+ export interface DatePickerTableHeadProps extends HtmlProps<'div'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {datePickerContext, datePickerTablePropsContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: DatePickerTableHeadProps = $props();
12
+
13
+ let datePicker = datePickerContext.get();
14
+ let tableProps = datePickerTablePropsContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, datePicker.getTableHeadProps(tableProps)));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const TableHead: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const TableHead: $$__sveltets_2_IsomorphicComponent<DatePickerTableHeadProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
16
+ }, {}, {}, "">;
17
17
  type TableHead = InstanceType<typeof TableHead>;
18
18
  export default TableHead;
@@ -1,3 +1,21 @@
1
- <script lang="ts" module></script>
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
2
3
 
3
- <script lang="ts"></script>
4
+ export interface DatePickerTableHeaderProps extends HtmlProps<'div'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {datePickerContext, datePickerTablePropsContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: DatePickerTableHeaderProps = $props();
12
+
13
+ let datePicker = datePickerContext.get();
14
+ let tableProps = datePickerTablePropsContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, datePicker.getTableHeaderProps(tableProps)));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const TableHeader: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const TableHeader: $$__sveltets_2_IsomorphicComponent<DatePickerTableHeaderProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
16
+ }, {}, {}, "">;
17
17
  type TableHeader = InstanceType<typeof TableHeader>;
18
18
  export default TableHeader;
@@ -1,3 +1,21 @@
1
- <script lang="ts" module></script>
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
2
3
 
3
- <script lang="ts"></script>
4
+ export interface DatePickerTableRowProps extends HtmlProps<'div'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {datePickerContext, datePickerTablePropsContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: DatePickerTableRowProps = $props();
12
+
13
+ let datePicker = datePickerContext.get();
14
+ let tableProps = datePickerTablePropsContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, datePicker.getTableRowProps(tableProps)));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const TableRow: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const TableRow: $$__sveltets_2_IsomorphicComponent<DatePickerTableRowProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
16
+ }, {}, {}, "">;
17
17
  type TableRow = InstanceType<typeof TableRow>;
18
18
  export default TableRow;
@@ -1,3 +1,30 @@
1
- <script lang="ts" module></script>
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {TableProps} from '@zag-js/date-picker';
2
4
 
3
- <script lang="ts"></script>
5
+ export interface DatePickerTableProps
6
+ extends Assign<HtmlProps<'div'>, Omit<TableProps, 'view'>> {}
7
+ </script>
8
+
9
+ <script lang="ts">
10
+ import {mergeProps} from '@zag-js/svelte';
11
+ import {
12
+ datePickerContext,
13
+ datePickerTablePropsContext,
14
+ datePickerViewPropsContext,
15
+ } from './context.svelte.js';
16
+
17
+ let {id, columns, children, ...props}: DatePickerTableProps = $props();
18
+
19
+ let datePicker = datePickerContext.get();
20
+ let viewProps = datePickerViewPropsContext.get();
21
+ let tableProps: TableProps = $derived({...viewProps, id, columns});
22
+
23
+ let attrs = $derived(mergeProps(props, datePicker.getTableProps(tableProps)));
24
+
25
+ datePickerTablePropsContext.set(() => tableProps);
26
+ </script>
27
+
28
+ <div {...attrs}>
29
+ {@render children?.()}
30
+ </div>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const Table: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const Table: $$__sveltets_2_IsomorphicComponent<DatePickerTableProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
16
+ }, {}, {}, "">;
17
17
  type Table = InstanceType<typeof Table>;
18
18
  export default Table;
@@ -1,3 +1,20 @@
1
- <script lang="ts" module></script>
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
2
3
 
3
- <script lang="ts"></script>
4
+ export interface DatePickerTriggerProps extends HtmlProps<'button'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {datePickerContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: DatePickerTriggerProps = $props();
12
+
13
+ let datePicker = datePickerContext.get();
14
+
15
+ let attrs = $derived(mergeProps(props, datePicker.getTriggerProps()));
16
+ </script>
17
+
18
+ <button type="button" {...attrs}>
19
+ {@render children?.()}
20
+ </button>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const Trigger: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const Trigger: $$__sveltets_2_IsomorphicComponent<DatePickerTriggerProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
16
+ }, {}, {}, "">;
17
17
  type Trigger = InstanceType<typeof Trigger>;
18
18
  export default Trigger;
@@ -1,3 +1,21 @@
1
- <script lang="ts" module></script>
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
2
3
 
3
- <script lang="ts"></script>
4
+ export interface DatePickerViewControlProps extends HtmlProps<'div'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {datePickerContext, datePickerViewPropsContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: DatePickerViewControlProps = $props();
12
+
13
+ let datePicker = datePickerContext.get();
14
+ let viewProps = datePickerViewPropsContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, datePicker.getViewControlProps(viewProps)));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const ViewControl: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const ViewControl: $$__sveltets_2_IsomorphicComponent<DatePickerViewControlProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
16
+ }, {}, {}, "">;
17
17
  type ViewControl = InstanceType<typeof ViewControl>;
18
18
  export default ViewControl;
@@ -0,0 +1,24 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {ViewProps} from '@zag-js/date-picker';
4
+
5
+ export interface DatePickerViewProps extends Assign<HtmlProps<'div'>, ViewProps> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {parts} from './anatomy.js';
11
+ import {datePickerContext, datePickerViewPropsContext} from './context.svelte.js';
12
+
13
+ let {view = 'day', children, ...props}: DatePickerViewProps = $props();
14
+
15
+ let datePicker = datePickerContext.get();
16
+
17
+ let attrs = $derived(mergeProps(props, parts.view.attrs));
18
+
19
+ datePickerViewPropsContext.set(() => ({view}));
20
+ </script>
21
+
22
+ <div hidden={datePicker.view !== view} {...attrs}>
23
+ {@render children?.()}
24
+ </div>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const ViewTrigger: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const View: $$__sveltets_2_IsomorphicComponent<DatePickerViewProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
17
- type ViewTrigger = InstanceType<typeof ViewTrigger>;
18
- export default ViewTrigger;
16
+ }, {}, {}, "">;
17
+ type View = InstanceType<typeof View>;
18
+ export default View;
@@ -1,3 +1,41 @@
1
- <script lang="ts" module></script>
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
2
3
 
3
- <script lang="ts"></script>
4
+ export interface DatePickerYearSelectProps extends HtmlProps<'select'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {datePickerContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: DatePickerYearSelectProps = $props();
12
+
13
+ let datePicker = datePickerContext.get();
14
+
15
+ let attrs = $derived(mergeProps(props, datePicker.getYearSelectProps()));
16
+
17
+ function getYears() {
18
+ const currentYear = new Date().getFullYear();
19
+
20
+ const start = currentYear - 1000;
21
+ const until = currentYear + 1000;
22
+
23
+ const years = [];
24
+
25
+ for (let i = start; i <= until; i++) {
26
+ years.unshift(i);
27
+ }
28
+
29
+ return years;
30
+ }
31
+ </script>
32
+
33
+ <select {...attrs}>
34
+ {#if children}
35
+ {@render children()}
36
+ {:else}
37
+ {#each getYears() as year}
38
+ <option value={year}>{year}</option>
39
+ {/each}
40
+ {/if}
41
+ </select>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const YearSelect: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const YearSelect: $$__sveltets_2_IsomorphicComponent<DatePickerYearSelectProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
16
+ }, {}, {}, "">;
17
17
  type YearSelect = InstanceType<typeof YearSelect>;
18
18
  export default YearSelect;
@@ -1,3 +1,21 @@
1
- <script lang="ts" module></script>
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
2
3
 
3
- <script lang="ts"></script>
4
+ export interface DatePickerYearTableCellTriggerProps extends HtmlProps<'button'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {datePickerContext, datePickerTableCellPropsContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: DatePickerYearTableCellTriggerProps = $props();
12
+
13
+ let datePicker = datePickerContext.get();
14
+ let tableCellProps = datePickerTableCellPropsContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, datePicker.getYearTableCellTriggerProps(tableCellProps)));
17
+ </script>
18
+
19
+ <button type="button" {...attrs}>
20
+ {@render children?.()}
21
+ </button>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const YearTableCellTrigger: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const YearTableCellTrigger: $$__sveltets_2_IsomorphicComponent<DatePickerYearTableCellTriggerProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
16
+ }, {}, {}, "">;
17
17
  type YearTableCellTrigger = InstanceType<typeof YearTableCellTrigger>;
18
18
  export default YearTableCellTrigger;
@@ -1,3 +1,40 @@
1
- <script lang="ts" module></script>
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {TableCellProps, TableCellState} from '@zag-js/date-picker';
4
+ import type {Snippet} from 'svelte';
2
5
 
3
- <script lang="ts"></script>
6
+ export interface DatePickerYearTableCellProps
7
+ extends Assign<Omit<HtmlProps<'div'>, 'children'>, TableCellProps> {
8
+ children?: Snippet<[state: TableCellState]>;
9
+ }
10
+ </script>
11
+
12
+ <script lang="ts">
13
+ import {mergeProps} from '@zag-js/svelte';
14
+ import {datePickerContext, datePickerTableCellPropsContext} from './context.svelte.js';
15
+
16
+ let {
17
+ /**/
18
+ value,
19
+ disabled,
20
+ columns,
21
+ children,
22
+ ...props
23
+ }: DatePickerYearTableCellProps = $props();
24
+
25
+ let datePicker = datePickerContext.get();
26
+ let tableCellProps: TableCellProps = $derived({
27
+ value,
28
+ disabled,
29
+ columns,
30
+ });
31
+
32
+ let state = $derived(datePicker.getYearTableCellState(tableCellProps));
33
+ let attrs = $derived(mergeProps(props, datePicker.getYearTableCellProps(tableCellProps)));
34
+
35
+ datePickerTableCellPropsContext.set(() => tableCellProps);
36
+ </script>
37
+
38
+ <div {...attrs}>
39
+ {@render children?.(state)}
40
+ </div>
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
2
2
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
3
  $$bindings?: Bindings;
4
4
  } & Exports;
5
- (internal: unknown, props: {
5
+ (internal: unknown, props: Props & {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
8
  }): Exports & {
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
11
  };
12
12
  z_$$bindings?: Bindings;
13
13
  }
14
- declare const YearTableCell: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const YearTableCell: $$__sveltets_2_IsomorphicComponent<DatePickerYearTableCellProps, {
15
15
  [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
16
+ }, {}, {}, "">;
17
17
  type YearTableCell = InstanceType<typeof YearTableCell>;
18
18
  export default YearTableCell;
@@ -10,9 +10,9 @@
10
10
 
11
11
  let {children, ...props}: DialogBackdropProps = $props();
12
12
 
13
- let context = dialogContext.get();
13
+ let dialog = dialogContext.get();
14
14
 
15
- let attrs = $derived(mergeProps(props, context.getBackdropProps()));
15
+ let attrs = $derived(mergeProps(props, dialog.getBackdropProps()));
16
16
  </script>
17
17
 
18
18
  <div {...attrs}>
@@ -10,9 +10,9 @@
10
10
 
11
11
  let {children, ...props}: DialogCloseTriggerProps = $props();
12
12
 
13
- let context = dialogContext.get();
13
+ let dialog = dialogContext.get();
14
14
 
15
- let attrs = $derived(mergeProps(props, context.getCloseTriggerProps()));
15
+ let attrs = $derived(mergeProps(props, dialog.getCloseTriggerProps()));
16
16
  </script>
17
17
 
18
18
  <button type="button" {...attrs}>
@@ -10,9 +10,9 @@
10
10
 
11
11
  let {children, ...props}: DialogContentProps = $props();
12
12
 
13
- let context = dialogContext.get();
13
+ let dialog = dialogContext.get();
14
14
 
15
- let attrs = $derived(mergeProps(props, context.getContentProps()));
15
+ let attrs = $derived(mergeProps(props, dialog.getContentProps()));
16
16
  </script>
17
17
 
18
18
  <div {...attrs}>
@@ -4,14 +4,14 @@ import { createUniqueId } from '../utils.svelte.js';
4
4
  import * as dialog from '@zag-js/dialog';
5
5
  import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
6
6
  export function createDialog(props) {
7
- const localeContext = getLocaleContext();
8
- const environmentContext = getEnvironmentContext();
7
+ const locale = getLocaleContext();
8
+ const environment = getEnvironmentContext();
9
9
  const [state, send] = useMachine(dialog.machine({
10
10
  ...props,
11
11
  id: props.id ?? createUniqueId(),
12
- dir: localeContext?.dir,
12
+ dir: locale?.dir,
13
13
  open: props.defaultOpen,
14
- getRootNode: environmentContext?.getRootNode,
14
+ getRootNode: environment?.getRootNode,
15
15
  'open.controlled': props.open != null,
16
16
  }));
17
17
  const api = $derived(reflect(() => dialog.connect(state, send, normalizeProps)));
@@ -10,9 +10,9 @@
10
10
 
11
11
  let {children, ...props}: DialogDescriptionProps = $props();
12
12
 
13
- let context = dialogContext.get();
13
+ let dialog = dialogContext.get();
14
14
 
15
- let attrs = $derived(mergeProps(props, context.getDescriptionProps()));
15
+ let attrs = $derived(mergeProps(props, dialog.getDescriptionProps()));
16
16
  </script>
17
17
 
18
18
  <div {...attrs}>
@@ -10,9 +10,9 @@
10
10
 
11
11
  let {children, ...props}: DialogPositionerProps = $props();
12
12
 
13
- let context = dialogContext.get();
13
+ let dialog = dialogContext.get();
14
14
 
15
- let attrs = $derived(mergeProps(props, context.getPositionerProps()));
15
+ let attrs = $derived(mergeProps(props, dialog.getPositionerProps()));
16
16
  </script>
17
17
 
18
18
  <div {...attrs}>
@@ -3,7 +3,7 @@
3
3
  import type {CreateDialogProps, CreateDialogReturn} from './create-dialog.svelte.js';
4
4
 
5
5
  export interface DialogProps extends CreateDialogProps {
6
- children?: Snippet<[api: CreateDialogReturn]>;
6
+ children?: Snippet<[dialog: CreateDialogReturn]>;
7
7
  }
8
8
  </script>
9
9
 
@@ -13,9 +13,9 @@
13
13
 
14
14
  let {children, ...props}: DialogProps = $props();
15
15
 
16
- let context = createDialog(props);
16
+ let dialog = createDialog(props);
17
17
 
18
- dialogContext.set(context);
18
+ dialogContext.set(dialog);
19
19
  </script>
20
20
 
21
- {@render children?.(context)}
21
+ {@render children?.(dialog)}