@skeletonlabs/skeleton-svelte 2.0.0-next.3 → 2.0.0-next.5

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 (255) hide show
  1. package/dist/components/accordion/anatomy/content.svelte +12 -9
  2. package/dist/components/accordion/anatomy/content.svelte.d.ts +3 -2
  3. package/dist/components/accordion/anatomy/content.svelte.d.ts.map +1 -0
  4. package/dist/components/accordion/anatomy/heading.svelte +10 -6
  5. package/dist/components/accordion/anatomy/heading.svelte.d.ts +3 -2
  6. package/dist/components/accordion/anatomy/heading.svelte.d.ts.map +1 -0
  7. package/dist/components/accordion/anatomy/indicator.svelte +10 -11
  8. package/dist/components/accordion/anatomy/indicator.svelte.d.ts +3 -2
  9. package/dist/components/accordion/anatomy/indicator.svelte.d.ts.map +1 -0
  10. package/dist/components/accordion/anatomy/item.svelte +19 -20
  11. package/dist/components/accordion/anatomy/item.svelte.d.ts +4 -3
  12. package/dist/components/accordion/anatomy/item.svelte.d.ts.map +1 -0
  13. package/dist/components/accordion/anatomy/root-context.svelte +7 -4
  14. package/dist/components/accordion/anatomy/root-context.svelte.d.ts +3 -2
  15. package/dist/components/accordion/anatomy/root-context.svelte.d.ts.map +1 -0
  16. package/dist/components/accordion/anatomy/root-provider.svelte +33 -0
  17. package/dist/components/accordion/anatomy/root-provider.svelte.d.ts +10 -0
  18. package/dist/components/accordion/anatomy/root-provider.svelte.d.ts.map +1 -0
  19. package/dist/components/accordion/anatomy/root.svelte +19 -19
  20. package/dist/components/accordion/anatomy/root.svelte.d.ts +3 -2
  21. package/dist/components/accordion/anatomy/root.svelte.d.ts.map +1 -0
  22. package/dist/components/accordion/anatomy/trigger.svelte +12 -9
  23. package/dist/components/accordion/anatomy/trigger.svelte.d.ts +3 -2
  24. package/dist/components/accordion/anatomy/trigger.svelte.d.ts.map +1 -0
  25. package/dist/components/accordion/index.d.ts +8 -8
  26. package/dist/components/accordion/index.d.ts.map +1 -0
  27. package/dist/components/accordion/index.js +1 -0
  28. package/dist/components/accordion/modules/anatomy.d.ts +2 -1
  29. package/dist/components/accordion/modules/anatomy.d.ts.map +1 -0
  30. package/dist/components/accordion/modules/anatomy.js +7 -7
  31. package/dist/components/accordion/modules/item-context.d.ts +4 -7
  32. package/dist/components/accordion/modules/item-context.d.ts.map +1 -0
  33. package/dist/components/accordion/modules/root-context.d.ts +3 -6
  34. package/dist/components/accordion/modules/root-context.d.ts.map +1 -0
  35. package/dist/components/accordion/modules/use-accordion.svelte.d.ts +3 -0
  36. package/dist/components/accordion/modules/use-accordion.svelte.d.ts.map +1 -0
  37. package/dist/components/accordion/modules/use-accordion.svelte.js +7 -0
  38. package/dist/components/avatar/anatomy/fallback.svelte +12 -7
  39. package/dist/components/avatar/anatomy/fallback.svelte.d.ts +3 -2
  40. package/dist/components/avatar/anatomy/fallback.svelte.d.ts.map +1 -0
  41. package/dist/components/avatar/anatomy/image.svelte +12 -7
  42. package/dist/components/avatar/anatomy/image.svelte.d.ts +3 -2
  43. package/dist/components/avatar/anatomy/image.svelte.d.ts.map +1 -0
  44. package/dist/components/avatar/anatomy/root-context.svelte +7 -4
  45. package/dist/components/avatar/anatomy/root-context.svelte.d.ts +3 -2
  46. package/dist/components/avatar/anatomy/root-context.svelte.d.ts.map +1 -0
  47. package/dist/components/avatar/anatomy/root-provider.svelte +37 -0
  48. package/dist/components/avatar/anatomy/root-provider.svelte.d.ts +10 -0
  49. package/dist/components/avatar/anatomy/root-provider.svelte.d.ts.map +1 -0
  50. package/dist/components/avatar/anatomy/root.svelte +20 -17
  51. package/dist/components/avatar/anatomy/root.svelte.d.ts +4 -3
  52. package/dist/components/avatar/anatomy/root.svelte.d.ts.map +1 -0
  53. package/dist/components/avatar/index.d.ts +6 -4
  54. package/dist/components/avatar/index.d.ts.map +1 -0
  55. package/dist/components/avatar/index.js +1 -0
  56. package/dist/components/avatar/modules/anatomy.d.ts +2 -0
  57. package/dist/components/avatar/modules/anatomy.d.ts.map +1 -0
  58. package/dist/components/avatar/modules/anatomy.js +5 -3
  59. package/dist/components/avatar/modules/root-context.d.ts +3 -6
  60. package/dist/components/avatar/modules/root-context.d.ts.map +1 -0
  61. package/dist/components/avatar/modules/use-avatar.svelte.d.ts +3 -0
  62. package/dist/components/avatar/modules/use-avatar.svelte.d.ts.map +1 -0
  63. package/dist/components/avatar/modules/use-avatar.svelte.js +7 -0
  64. package/dist/components/progress-linear/anatomy/label.svelte +10 -13
  65. package/dist/components/progress-linear/anatomy/label.svelte.d.ts +3 -2
  66. package/dist/components/progress-linear/anatomy/label.svelte.d.ts.map +1 -0
  67. package/dist/components/progress-linear/anatomy/range.svelte +10 -13
  68. package/dist/components/progress-linear/anatomy/range.svelte.d.ts +3 -2
  69. package/dist/components/progress-linear/anatomy/range.svelte.d.ts.map +1 -0
  70. package/dist/components/progress-linear/anatomy/root-context.svelte +7 -4
  71. package/dist/components/progress-linear/anatomy/root-context.svelte.d.ts +3 -2
  72. package/dist/components/progress-linear/anatomy/root-context.svelte.d.ts.map +1 -0
  73. package/dist/components/progress-linear/anatomy/root-provider.svelte +37 -0
  74. package/dist/components/progress-linear/anatomy/root-provider.svelte.d.ts +10 -0
  75. package/dist/components/progress-linear/anatomy/root-provider.svelte.d.ts.map +1 -0
  76. package/dist/components/progress-linear/anatomy/root.svelte +17 -26
  77. package/dist/components/progress-linear/anatomy/root.svelte.d.ts +4 -3
  78. package/dist/components/progress-linear/anatomy/root.svelte.d.ts.map +1 -0
  79. package/dist/components/progress-linear/anatomy/track.svelte +12 -7
  80. package/dist/components/progress-linear/anatomy/track.svelte.d.ts +3 -2
  81. package/dist/components/progress-linear/anatomy/track.svelte.d.ts.map +1 -0
  82. package/dist/components/progress-linear/index.d.ts +6 -4
  83. package/dist/components/progress-linear/index.d.ts.map +1 -0
  84. package/dist/components/progress-linear/index.js +1 -0
  85. package/dist/components/progress-linear/modules/anatomy.d.ts +1 -0
  86. package/dist/components/progress-linear/modules/anatomy.d.ts.map +1 -0
  87. package/dist/components/progress-linear/modules/anatomy.js +3 -3
  88. package/dist/components/progress-linear/modules/root-context.d.ts +3 -6
  89. package/dist/components/progress-linear/modules/root-context.d.ts.map +1 -0
  90. package/dist/components/progress-linear/modules/use-progress-linear.svelte.d.ts +3 -0
  91. package/dist/components/progress-linear/modules/use-progress-linear.svelte.d.ts.map +1 -0
  92. package/dist/components/progress-linear/modules/use-progress-linear.svelte.js +7 -0
  93. package/dist/components/rating-group/anatomy/control.svelte +15 -8
  94. package/dist/components/rating-group/anatomy/control.svelte.d.ts +3 -2
  95. package/dist/components/rating-group/anatomy/control.svelte.d.ts.map +1 -0
  96. package/dist/components/rating-group/anatomy/hidden-input.svelte +12 -9
  97. package/dist/components/rating-group/anatomy/hidden-input.svelte.d.ts +3 -2
  98. package/dist/components/rating-group/anatomy/hidden-input.svelte.d.ts.map +1 -0
  99. package/dist/components/rating-group/anatomy/item.svelte +19 -22
  100. package/dist/components/rating-group/anatomy/item.svelte.d.ts +4 -3
  101. package/dist/components/rating-group/anatomy/item.svelte.d.ts.map +1 -0
  102. package/dist/components/rating-group/anatomy/label.svelte +15 -8
  103. package/dist/components/rating-group/anatomy/label.svelte.d.ts +3 -2
  104. package/dist/components/rating-group/anatomy/label.svelte.d.ts.map +1 -0
  105. package/dist/components/rating-group/anatomy/root-context.svelte +7 -4
  106. package/dist/components/rating-group/anatomy/root-context.svelte.d.ts +3 -2
  107. package/dist/components/rating-group/anatomy/root-context.svelte.d.ts.map +1 -0
  108. package/dist/components/rating-group/anatomy/root-provider.svelte +37 -0
  109. package/dist/components/rating-group/anatomy/root-provider.svelte.d.ts +10 -0
  110. package/dist/components/rating-group/anatomy/root-provider.svelte.d.ts.map +1 -0
  111. package/dist/components/rating-group/anatomy/root.svelte +20 -23
  112. package/dist/components/rating-group/anatomy/root.svelte.d.ts +4 -3
  113. package/dist/components/rating-group/anatomy/root.svelte.d.ts.map +1 -0
  114. package/dist/components/rating-group/index.d.ts +8 -8
  115. package/dist/components/rating-group/index.d.ts.map +1 -0
  116. package/dist/components/rating-group/index.js +1 -0
  117. package/dist/components/rating-group/modules/anatomy.d.ts +2 -1
  118. package/dist/components/rating-group/modules/anatomy.d.ts.map +1 -0
  119. package/dist/components/rating-group/modules/anatomy.js +7 -7
  120. package/dist/components/rating-group/modules/root-context.d.ts +3 -6
  121. package/dist/components/rating-group/modules/root-context.d.ts.map +1 -0
  122. package/dist/components/rating-group/modules/use-rating-group.svelte.d.ts +3 -0
  123. package/dist/components/rating-group/modules/use-rating-group.svelte.d.ts.map +1 -0
  124. package/dist/components/rating-group/modules/use-rating-group.svelte.js +7 -0
  125. package/dist/components/switch/anatomy/control.svelte +33 -0
  126. package/dist/components/switch/anatomy/control.svelte.d.ts +8 -0
  127. package/dist/components/switch/anatomy/control.svelte.d.ts.map +1 -0
  128. package/dist/components/switch/anatomy/hidden-input.svelte +31 -0
  129. package/dist/components/switch/anatomy/hidden-input.svelte.d.ts +8 -0
  130. package/dist/components/switch/anatomy/hidden-input.svelte.d.ts.map +1 -0
  131. package/dist/components/switch/anatomy/label.svelte +33 -0
  132. package/dist/components/switch/anatomy/label.svelte.d.ts +8 -0
  133. package/dist/components/switch/anatomy/label.svelte.d.ts.map +1 -0
  134. package/dist/components/switch/anatomy/root-context.svelte +21 -0
  135. package/dist/components/switch/anatomy/root-context.svelte.d.ts +9 -0
  136. package/dist/components/switch/anatomy/root-context.svelte.d.ts.map +1 -0
  137. package/dist/components/switch/anatomy/root-provider.svelte +37 -0
  138. package/dist/components/switch/anatomy/root-provider.svelte.d.ts +10 -0
  139. package/dist/components/switch/anatomy/root-provider.svelte.d.ts.map +1 -0
  140. package/dist/components/switch/anatomy/root.svelte +44 -0
  141. package/dist/components/switch/anatomy/root.svelte.d.ts +9 -0
  142. package/dist/components/switch/anatomy/root.svelte.d.ts.map +1 -0
  143. package/dist/components/switch/anatomy/thumb.svelte +33 -0
  144. package/dist/components/switch/anatomy/thumb.svelte.d.ts +8 -0
  145. package/dist/components/switch/anatomy/thumb.svelte.d.ts.map +1 -0
  146. package/dist/components/switch/index.d.ts +10 -0
  147. package/dist/components/switch/index.d.ts.map +1 -0
  148. package/dist/components/switch/index.js +2 -0
  149. package/dist/components/switch/modules/anatomy.d.ts +9 -0
  150. package/dist/components/switch/modules/anatomy.d.ts.map +1 -0
  151. package/dist/components/switch/modules/anatomy.js +15 -0
  152. package/dist/components/switch/modules/root-context.d.ts +6 -0
  153. package/dist/components/switch/modules/root-context.d.ts.map +1 -0
  154. package/dist/components/{rating-group/modules/item-context.js → switch/modules/root-context.js} +1 -1
  155. package/dist/components/switch/modules/use-switch.svelte.d.ts +3 -0
  156. package/dist/components/switch/modules/use-switch.svelte.d.ts.map +1 -0
  157. package/dist/components/switch/modules/use-switch.svelte.js +7 -0
  158. package/dist/components/tabs/anatomy/content.svelte +14 -8
  159. package/dist/components/tabs/anatomy/content.svelte.d.ts +3 -2
  160. package/dist/components/tabs/anatomy/content.svelte.d.ts.map +1 -0
  161. package/dist/components/tabs/anatomy/indicator.svelte +13 -8
  162. package/dist/components/tabs/anatomy/indicator.svelte.d.ts +3 -2
  163. package/dist/components/tabs/anatomy/indicator.svelte.d.ts.map +1 -0
  164. package/dist/components/tabs/anatomy/list.svelte +13 -8
  165. package/dist/components/tabs/anatomy/list.svelte.d.ts +3 -2
  166. package/dist/components/tabs/anatomy/list.svelte.d.ts.map +1 -0
  167. package/dist/components/tabs/anatomy/root-context.svelte +7 -4
  168. package/dist/components/tabs/anatomy/root-context.svelte.d.ts +3 -2
  169. package/dist/components/tabs/anatomy/root-context.svelte.d.ts.map +1 -0
  170. package/dist/components/tabs/anatomy/root-provider.svelte +36 -0
  171. package/dist/components/tabs/anatomy/root-provider.svelte.d.ts +10 -0
  172. package/dist/components/tabs/anatomy/root-provider.svelte.d.ts.map +1 -0
  173. package/dist/components/tabs/anatomy/root.svelte +18 -19
  174. package/dist/components/tabs/anatomy/root.svelte.d.ts +3 -2
  175. package/dist/components/tabs/anatomy/root.svelte.d.ts.map +1 -0
  176. package/dist/components/tabs/anatomy/trigger.svelte +14 -8
  177. package/dist/components/tabs/anatomy/trigger.svelte.d.ts +3 -2
  178. package/dist/components/tabs/anatomy/trigger.svelte.d.ts.map +1 -0
  179. package/dist/components/tabs/index.d.ts +10 -1
  180. package/dist/components/tabs/index.d.ts.map +1 -0
  181. package/dist/components/tabs/index.js +2 -1
  182. package/dist/components/tabs/modules/anatomy.d.ts +2 -0
  183. package/dist/components/tabs/modules/anatomy.d.ts.map +1 -0
  184. package/dist/components/tabs/modules/anatomy.js +6 -4
  185. package/dist/components/tabs/modules/root-context.d.ts +3 -6
  186. package/dist/components/tabs/modules/root-context.d.ts.map +1 -0
  187. package/dist/components/tabs/modules/use-tabs.svelte.d.ts +3 -0
  188. package/dist/components/tabs/modules/use-tabs.svelte.d.ts.map +1 -0
  189. package/dist/components/tabs/modules/use-tabs.svelte.js +7 -0
  190. package/dist/components/toast/anatomy/action-trigger.svelte +33 -0
  191. package/dist/components/toast/anatomy/action-trigger.svelte.d.ts +8 -0
  192. package/dist/components/toast/anatomy/action-trigger.svelte.d.ts.map +1 -0
  193. package/dist/components/toast/anatomy/close-trigger.svelte +39 -0
  194. package/dist/components/toast/anatomy/close-trigger.svelte.d.ts +8 -0
  195. package/dist/components/toast/anatomy/close-trigger.svelte.d.ts.map +1 -0
  196. package/dist/components/toast/anatomy/description.svelte +33 -0
  197. package/dist/components/toast/anatomy/description.svelte.d.ts +8 -0
  198. package/dist/components/toast/anatomy/description.svelte.d.ts.map +1 -0
  199. package/dist/components/toast/anatomy/group.svelte +49 -0
  200. package/dist/components/toast/anatomy/group.svelte.d.ts +12 -0
  201. package/dist/components/toast/anatomy/group.svelte.d.ts.map +1 -0
  202. package/dist/components/toast/anatomy/message.svelte +29 -0
  203. package/dist/components/toast/anatomy/message.svelte.d.ts +8 -0
  204. package/dist/components/toast/anatomy/message.svelte.d.ts.map +1 -0
  205. package/dist/components/toast/anatomy/root-context.svelte +20 -0
  206. package/dist/components/toast/anatomy/root-context.svelte.d.ts +9 -0
  207. package/dist/components/toast/anatomy/root-context.svelte.d.ts.map +1 -0
  208. package/dist/components/toast/anatomy/root.svelte +76 -0
  209. package/dist/components/toast/anatomy/root.svelte.d.ts +10 -0
  210. package/dist/components/toast/anatomy/root.svelte.d.ts.map +1 -0
  211. package/dist/components/toast/anatomy/title.svelte +33 -0
  212. package/dist/components/toast/anatomy/title.svelte.d.ts +8 -0
  213. package/dist/components/toast/anatomy/title.svelte.d.ts.map +1 -0
  214. package/dist/components/toast/index.d.ts +10 -0
  215. package/dist/components/toast/index.d.ts.map +1 -0
  216. package/dist/components/toast/index.js +2 -0
  217. package/dist/components/toast/modules/anatomy.d.ts +10 -0
  218. package/dist/components/toast/modules/anatomy.d.ts.map +1 -0
  219. package/dist/components/toast/modules/anatomy.js +17 -0
  220. package/dist/components/toast/modules/group-context.d.ts +7 -0
  221. package/dist/components/toast/modules/group-context.d.ts.map +1 -0
  222. package/dist/components/toast/modules/group-context.js +2 -0
  223. package/dist/components/toast/modules/root-context.d.ts +7 -0
  224. package/dist/components/toast/modules/root-context.d.ts.map +1 -0
  225. package/dist/components/toast/modules/root-context.js +2 -0
  226. package/dist/index.d.ts +3 -0
  227. package/dist/index.d.ts.map +1 -0
  228. package/dist/index.js +2 -0
  229. package/dist/internal/components/star-empty.svelte.d.ts +1 -0
  230. package/dist/internal/components/star-empty.svelte.d.ts.map +1 -0
  231. package/dist/internal/components/star-full.svelte.d.ts +1 -0
  232. package/dist/internal/components/star-full.svelte.d.ts.map +1 -0
  233. package/dist/internal/components/star-half.svelte.d.ts +1 -0
  234. package/dist/internal/components/star-half.svelte.d.ts.map +1 -0
  235. package/dist/internal/components/x.svelte +14 -0
  236. package/dist/internal/components/x.svelte.d.ts +27 -0
  237. package/dist/internal/components/x.svelte.d.ts.map +1 -0
  238. package/dist/internal/create-context.d.ts +1 -0
  239. package/dist/internal/create-context.d.ts.map +1 -0
  240. package/dist/internal/create-context.js +1 -1
  241. package/dist/internal/html-attributes.d.ts +3 -0
  242. package/dist/internal/html-attributes.d.ts.map +1 -0
  243. package/dist/internal/html-attributes.js +1 -0
  244. package/dist/internal/props-with-children.d.ts +1 -0
  245. package/dist/internal/props-with-children.d.ts.map +1 -0
  246. package/dist/internal/props-with-element.d.ts +5 -4
  247. package/dist/internal/props-with-element.d.ts.map +1 -0
  248. package/package.json +18 -22
  249. package/dist/components/accordion/anatomy/item-context.svelte +0 -18
  250. package/dist/components/accordion/anatomy/item-context.svelte.d.ts +0 -8
  251. package/dist/components/rating-group/anatomy/item-context.svelte +0 -18
  252. package/dist/components/rating-group/anatomy/item-context.svelte.d.ts +0 -8
  253. package/dist/components/rating-group/modules/item-context.d.ts +0 -9
  254. package/dist/internal/test-utils.d.ts +0 -3
  255. package/dist/internal/test-utils.js +0 -9
@@ -1,51 +1,42 @@
1
1
  <script lang="ts" module>
2
- import type { HTMLAttributes } from 'svelte/elements';
3
- import type { PropsWithElement } from '../../../internal/props-with-element';
4
2
  import type { Props } from '@zag-js/progress';
5
3
 
6
- export interface ProgressLinearRootProps
7
- extends PropsWithElement,
8
- Omit<Props, 'id'>,
9
- Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'dir'> {}
4
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
5
+ import type { PropsWithElement } from '../../../internal/props-with-element';
6
+
7
+ export interface ProgressLinearRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {}
10
8
  </script>
11
9
 
12
10
  <script lang="ts">
13
- import { splitProps, machine, connect } from '@zag-js/progress';
14
- import { mergeProps, normalizeProps, useMachine } from '@zag-js/svelte';
15
11
  import { classesProgressLinear } from '@skeletonlabs/skeleton-common';
12
+ import { splitProps } from '@zag-js/progress';
13
+ import { mergeProps } from '@zag-js/svelte';
14
+
16
15
  import { ProgressLinearRootContext } from '../modules/root-context';
16
+ import { useProgressLinear } from '../modules/use-progress-linear.svelte';
17
17
 
18
18
  const props: ProgressLinearRootProps = $props();
19
19
 
20
- const [machineProps, componentProps] = $derived(splitProps(props));
21
- const { element, children, ...restAttributes } = $derived(componentProps);
20
+ const [progressLinearProps, componentProps] = $derived(splitProps(props));
21
+ const { element, children, ...rest } = $derived(componentProps);
22
22
 
23
23
  const id = $props.id();
24
- const service = useMachine(machine, () => ({
24
+ const avatar = useProgressLinear(() => ({
25
25
  id,
26
- ...machineProps
26
+ ...progressLinearProps,
27
27
  }));
28
- const api = $derived(connect(service, normalizeProps));
29
28
 
30
29
  const attributes = $derived(
31
- mergeProps(
32
- api.getRootProps(),
33
- {
34
- class: classesProgressLinear.root
35
- },
36
- restAttributes
37
- )
30
+ mergeProps(avatar().getRootProps(), rest, {
31
+ class: classesProgressLinear.root,
32
+ }),
38
33
  );
39
34
 
40
- ProgressLinearRootContext.provide({
41
- get api() {
42
- return api;
43
- }
44
- });
35
+ ProgressLinearRootContext.provide(() => avatar());
45
36
  </script>
46
37
 
47
38
  {#if element}
48
- {@render element({ attributes })}
39
+ {@render element(attributes)}
49
40
  {:else}
50
41
  <div {...attributes}>
51
42
  {@render children?.()}
@@ -1,8 +1,9 @@
1
- import type { HTMLAttributes } from 'svelte/elements';
2
- import type { PropsWithElement } from '../../../internal/props-with-element';
3
1
  import type { Props } from '@zag-js/progress';
4
- export interface ProgressLinearRootProps extends PropsWithElement, Omit<Props, 'id'>, Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'dir'> {
2
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
3
+ import type { PropsWithElement } from '../../../internal/props-with-element';
4
+ export interface ProgressLinearRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
5
5
  }
6
6
  declare const Root: import("svelte").Component<ProgressLinearRootProps, {}, "">;
7
7
  type Root = ReturnType<typeof Root>;
8
8
  export default Root;
9
+ //# sourceMappingURL=root.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/progress-linear/anatomy/root.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,EAAE,IAAI,GAAG,KAAK,CAAC;CAAG;AAkDpI,QAAA,MAAM,IAAI,6DAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
@@ -1,26 +1,31 @@
1
1
  <script lang="ts" module>
2
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
2
3
  import type { PropsWithElement } from '../../../internal/props-with-element';
3
- import type { HTMLAttributes } from 'svelte/elements';
4
4
 
5
- export interface ProgressLinearTrackProps extends PropsWithElement, HTMLAttributes<HTMLDivElement> {}
5
+ export interface ProgressLinearTrackProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {}
6
6
  </script>
7
7
 
8
8
  <script lang="ts">
9
- import { mergeProps } from '@zag-js/svelte';
10
9
  import { classesProgressLinear } from '@skeletonlabs/skeleton-common';
10
+ import { mergeProps } from '@zag-js/svelte';
11
+
11
12
  import { ProgressLinearRootContext } from '../modules/root-context';
12
13
 
13
14
  const props: ProgressLinearTrackProps = $props();
14
15
 
15
- const rootContext = ProgressLinearRootContext.consume();
16
+ const progressLinear = ProgressLinearRootContext.consume();
16
17
 
17
- const { element, children, ...restAttributes } = $derived(props);
18
+ const { element, children, ...rest } = $derived(props);
18
19
 
19
- const attributes = $derived(mergeProps(rootContext.api.getTrackProps(), { class: classesProgressLinear.track }, restAttributes));
20
+ const attributes = $derived(
21
+ mergeProps(progressLinear().getTrackProps(), rest, {
22
+ class: classesProgressLinear.track,
23
+ }),
24
+ );
20
25
  </script>
21
26
 
22
27
  {#if element}
23
- {@render element({ attributes })}
28
+ {@render element(attributes)}
24
29
  {:else}
25
30
  <div {...attributes}>
26
31
  {@render children?.()}
@@ -1,7 +1,8 @@
1
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
1
2
  import type { PropsWithElement } from '../../../internal/props-with-element';
2
- import type { HTMLAttributes } from 'svelte/elements';
3
- export interface ProgressLinearTrackProps extends PropsWithElement, HTMLAttributes<HTMLDivElement> {
3
+ export interface ProgressLinearTrackProps extends PropsWithElement<'div'>, HTMLAttributes<'div'> {
4
4
  }
5
5
  declare const Track: import("svelte").Component<ProgressLinearTrackProps, {}, "">;
6
6
  type Track = ReturnType<typeof Track>;
7
7
  export default Track;
8
+ //# sourceMappingURL=track.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"track.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/progress-linear/anatomy/track.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC;CAAG;AAuCpG,QAAA,MAAM,KAAK,8DAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
@@ -1,7 +1,9 @@
1
- export { ProgressLinear } from './modules/anatomy';
1
+ export type { ProgressLinearLabelProps } from './anatomy/label.svelte';
2
+ export type { ProgressLinearRangeProps } from './anatomy/range.svelte';
2
3
  export type { ProgressLinearRootProps } from './anatomy/root.svelte';
3
4
  export type { ProgressLinearRootContextProps } from './anatomy/root-context.svelte';
4
- export type { ProgressLinearLabelProps } from './anatomy/label.svelte';
5
+ export type { ProgressLinearRootProviderProps } from './anatomy/root-provider.svelte';
5
6
  export type { ProgressLinearTrackProps } from './anatomy/track.svelte';
6
- export type { ProgressLinearRangeProps } from './anatomy/range.svelte';
7
- export type { ProgressLinearRootContextType as ProgressLinearRootContext } from './modules/root-context';
7
+ export { ProgressLinear } from './modules/anatomy';
8
+ export { useProgressLinear } from './modules/use-progress-linear.svelte';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/progress-linear/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,YAAY,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,YAAY,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,YAAY,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AACpF,YAAY,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACtF,YAAY,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC"}
@@ -1 +1,2 @@
1
1
  export { ProgressLinear } from './modules/anatomy';
2
+ export { useProgressLinear } from './modules/use-progress-linear.svelte';
@@ -4,3 +4,4 @@ export declare const ProgressLinear: import("svelte").Component<import("../anato
4
4
  Track: import("svelte").Component<import("../anatomy/track.svelte").ProgressLinearTrackProps, {}, "">;
5
5
  Range: import("svelte").Component<import("../anatomy/range.svelte").ProgressLinearRangeProps, {}, "">;
6
6
  };
7
+ //# sourceMappingURL=anatomy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anatomy.d.ts","sourceRoot":"","sources":["../../../../src/components/progress-linear/modules/anatomy.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;CAKzB,CAAC"}
@@ -1,11 +1,11 @@
1
+ import Label from '../anatomy/label.svelte';
2
+ import Range from '../anatomy/range.svelte';
1
3
  import Root from '../anatomy/root.svelte';
2
4
  import RootContext from '../anatomy/root-context.svelte';
3
- import Label from '../anatomy/label.svelte';
4
5
  import Track from '../anatomy/track.svelte';
5
- import Range from '../anatomy/range.svelte';
6
6
  export const ProgressLinear = Object.assign(Root, {
7
7
  Context: RootContext,
8
8
  Label: Label,
9
9
  Track: Track,
10
- Range: Range
10
+ Range: Range,
11
11
  });
@@ -1,9 +1,6 @@
1
- import type { Api } from '@zag-js/progress';
2
- export interface ProgressLinearRootContextType {
3
- api: Api;
4
- }
5
1
  export declare const ProgressLinearRootContext: {
6
2
  key: symbol;
7
- consume(): ProgressLinearRootContextType;
8
- provide(value: ProgressLinearRootContextType): ProgressLinearRootContextType;
3
+ consume(): () => import("@zag-js/progress").Api;
4
+ provide(value: () => import("@zag-js/progress").Api): () => import("@zag-js/progress").Api;
9
5
  };
6
+ //# sourceMappingURL=root-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-context.d.ts","sourceRoot":"","sources":["../../../../src/components/progress-linear/modules/root-context.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,yBAAyB;;;;CAAwD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Api, type Props } from '@zag-js/progress';
2
+ export declare function useProgressLinear(props: Props | (() => Props)): () => Api;
3
+ //# sourceMappingURL=use-progress-linear.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-progress-linear.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/progress-linear/modules/use-progress-linear.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAoB,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG1E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,MAAM,KAAK,CAAC,GAAG,MAAM,GAAG,CAIzE"}
@@ -0,0 +1,7 @@
1
+ import { connect, machine } from '@zag-js/progress';
2
+ import { normalizeProps, useMachine } from '@zag-js/svelte';
3
+ export function useProgressLinear(props) {
4
+ const service = useMachine(machine, props);
5
+ const progressLinear = $derived(connect(service, normalizeProps));
6
+ return () => progressLinear;
7
+ }
@@ -1,26 +1,33 @@
1
1
  <script lang="ts" module>
2
- import type { HTMLAttributes } from 'svelte/elements';
2
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
3
3
  import type { PropsWithElement } from '../../../internal/props-with-element';
4
4
 
5
- export interface RatingGroupControlProps extends PropsWithElement, Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'defaultValue' | 'dir'> {}
5
+ export interface RatingGroupControlProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {}
6
6
  </script>
7
7
 
8
8
  <script lang="ts">
9
- import { mergeProps } from '@zag-js/svelte';
10
9
  import { classesRatingGroup } from '@skeletonlabs/skeleton-common';
10
+ import { mergeProps } from '@zag-js/svelte';
11
+
11
12
  import { RatingGroupRootContext } from '../modules/root-context';
12
13
 
13
14
  const props: RatingGroupControlProps = $props();
14
15
 
15
- const rootContext = RatingGroupRootContext.consume();
16
+ const ratingGroup = RatingGroupRootContext.consume();
16
17
 
17
- const { element, children, ...restAttributes } = $derived(props);
18
+ const { element, children, ...rest } = $derived(props);
18
19
 
19
- const attributes = $derived(mergeProps(rootContext.api.getControlProps(), { class: classesRatingGroup.control }, restAttributes));
20
+ const attributes = $derived(
21
+ mergeProps(ratingGroup().getControlProps(), rest, {
22
+ class: classesRatingGroup.control,
23
+ }),
24
+ );
20
25
  </script>
21
26
 
22
27
  {#if element}
23
- {@render element({ attributes })}
28
+ {@render element(attributes)}
24
29
  {:else}
25
- <div {...attributes}>{@render children?.()}</div>
30
+ <div {...attributes}>
31
+ {@render children?.()}
32
+ </div>
26
33
  {/if}
@@ -1,7 +1,8 @@
1
- import type { HTMLAttributes } from 'svelte/elements';
1
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
2
2
  import type { PropsWithElement } from '../../../internal/props-with-element';
3
- export interface RatingGroupControlProps extends PropsWithElement, Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'defaultValue' | 'dir'> {
3
+ export interface RatingGroupControlProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
4
4
  }
5
5
  declare const Control: import("svelte").Component<RatingGroupControlProps, {}, "">;
6
6
  type Control = ReturnType<typeof Control>;
7
7
  export default Control;
8
+ //# sourceMappingURL=control.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/anatomy/control.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,EAAE,IAAI,GAAG,KAAK,CAAC;CAAG;AAuCjH,QAAA,MAAM,OAAO,6DAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
@@ -1,28 +1,31 @@
1
1
  <script lang="ts" module>
2
- import type { HTMLInputAttributes } from 'svelte/elements';
2
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
3
3
  import type { PropsWithElement } from '../../../internal/props-with-element';
4
4
 
5
- export interface RatingGroupHiddenInputProps
6
- extends PropsWithElement,
7
- Omit<HTMLInputAttributes, 'id' | 'defaultValue' | 'dir' | 'children'> {}
5
+ export interface RatingGroupHiddenInputProps extends PropsWithElement<'input'>, HTMLAttributes<'input'> {}
8
6
  </script>
9
7
 
10
8
  <script lang="ts">
11
- import { mergeProps } from '@zag-js/svelte';
12
9
  import { classesRatingGroup } from '@skeletonlabs/skeleton-common';
10
+ import { mergeProps } from '@zag-js/svelte';
11
+
13
12
  import { RatingGroupRootContext } from '../modules/root-context';
14
13
 
15
14
  const props: RatingGroupHiddenInputProps = $props();
16
15
 
17
- const rootContext = RatingGroupRootContext.consume();
16
+ const ratingGroup = RatingGroupRootContext.consume();
18
17
 
19
- const { element, ...restAttributes } = $derived(props);
18
+ const { element, ...rest } = $derived(props);
20
19
 
21
- const attributes = $derived(mergeProps(rootContext.api.getHiddenInputProps(), { class: classesRatingGroup.hiddenInput }, restAttributes));
20
+ const attributes = $derived(
21
+ mergeProps(ratingGroup().getHiddenInputProps(), rest, {
22
+ class: classesRatingGroup.hiddenInput,
23
+ }),
24
+ );
22
25
  </script>
23
26
 
24
27
  {#if element}
25
- {@render element({ attributes })}
28
+ {@render element(attributes)}
26
29
  {:else}
27
30
  <input {...attributes} />
28
31
  {/if}
@@ -1,7 +1,8 @@
1
- import type { HTMLInputAttributes } from 'svelte/elements';
1
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
2
2
  import type { PropsWithElement } from '../../../internal/props-with-element';
3
- export interface RatingGroupHiddenInputProps extends PropsWithElement, Omit<HTMLInputAttributes, 'id' | 'defaultValue' | 'dir' | 'children'> {
3
+ export interface RatingGroupHiddenInputProps extends PropsWithElement<'input'>, HTMLAttributes<'input'> {
4
4
  }
5
5
  declare const HiddenInput: import("svelte").Component<RatingGroupHiddenInputProps, {}, "">;
6
6
  type HiddenInput = ReturnType<typeof HiddenInput>;
7
7
  export default HiddenInput;
8
+ //# sourceMappingURL=hidden-input.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hidden-input.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/anatomy/hidden-input.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC;CAAG;AAqC3G,QAAA,MAAM,WAAW,iEAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -1,12 +1,10 @@
1
1
  <script lang="ts" module>
2
- import type { HTMLAttributes } from 'svelte/elements';
3
- import type { PropsWithElement } from '../../../internal/props-with-element';
4
2
  import type { ItemProps } from '@zag-js/rating-group';
5
3
 
6
- export interface RatingGroupItemProps
7
- extends PropsWithElement,
8
- ItemProps,
9
- Omit<HTMLAttributes<HTMLSpanElement>, 'id' | 'defaultValue' | 'dir'> {
4
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
5
+ import type { PropsWithElement } from '../../../internal/props-with-element';
6
+
7
+ export interface RatingGroupItemProps extends ItemProps, PropsWithElement<'span'>, HTMLAttributes<'span', 'id' | 'dir'> {
10
8
  /**
11
9
  * The content to render when the item is in the empty state.
12
10
  *
@@ -29,32 +27,31 @@
29
27
  </script>
30
28
 
31
29
  <script lang="ts">
32
- import { mergeProps } from '@zag-js/svelte';
33
30
  import { classesRatingGroup } from '@skeletonlabs/skeleton-common';
34
31
  import { splitItemProps } from '@zag-js/rating-group';
35
- import { RatingGroupRootContext } from '../modules/root-context';
36
- import { RatingGroupItemContext } from '../modules/item-context';
37
- import StarFull from '../../../internal/components/star-full.svelte';
32
+ import { mergeProps } from '@zag-js/svelte';
33
+ import type { Snippet } from 'svelte';
34
+
38
35
  import StarEmpty from '../../../internal/components/star-empty.svelte';
36
+ import StarFull from '../../../internal/components/star-full.svelte';
39
37
  import StarHalf from '../../../internal/components/star-half.svelte';
40
- import type { Snippet } from 'svelte';
38
+
39
+ import { RatingGroupRootContext } from '../modules/root-context';
41
40
 
42
41
  const props: RatingGroupItemProps = $props();
43
42
 
44
- const rootContext = RatingGroupRootContext.consume();
43
+ const ratingGroup = RatingGroupRootContext.consume();
45
44
 
46
45
  const [itemProps, componentProps] = $derived(splitItemProps(props));
47
- const { element, children, empty = starEmpty, half = starHalf, full = starFull, ...restAttributes } = $derived(componentProps);
48
-
49
- const itemState = $derived(rootContext.api.getItemState(itemProps));
46
+ const { element, children, empty = starEmpty, half = starHalf, full = starFull, ...rest } = $derived(componentProps);
50
47
 
51
- const attributes = $derived(mergeProps(rootContext.api.getItemProps(itemProps), { class: classesRatingGroup.item }, restAttributes));
48
+ const itemState = $derived(ratingGroup().getItemState(itemProps));
52
49
 
53
- RatingGroupItemContext.provide({
54
- get itemState() {
55
- return itemState;
56
- }
57
- });
50
+ const attributes = $derived(
51
+ mergeProps(ratingGroup().getItemProps(itemProps), rest, {
52
+ class: classesRatingGroup.item,
53
+ }),
54
+ );
58
55
  </script>
59
56
 
60
57
  {#snippet starEmpty()}
@@ -70,7 +67,7 @@
70
67
  {/snippet}
71
68
 
72
69
  {#if element}
73
- {@render element({ attributes })}
70
+ {@render element(attributes)}
74
71
  {:else}
75
72
  <div {...attributes}>
76
73
  {#if children}
@@ -1,7 +1,7 @@
1
- import type { HTMLAttributes } from 'svelte/elements';
2
- import type { PropsWithElement } from '../../../internal/props-with-element';
3
1
  import type { ItemProps } from '@zag-js/rating-group';
4
- export interface RatingGroupItemProps extends PropsWithElement, ItemProps, Omit<HTMLAttributes<HTMLSpanElement>, 'id' | 'defaultValue' | 'dir'> {
2
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
3
+ import type { PropsWithElement } from '../../../internal/props-with-element';
4
+ export interface RatingGroupItemProps extends ItemProps, PropsWithElement<'span'>, HTMLAttributes<'span', 'id' | 'dir'> {
5
5
  /**
6
6
  * The content to render when the item is in the empty state.
7
7
  *
@@ -25,3 +25,4 @@ import type { Snippet } from 'svelte';
25
25
  declare const Item: import("svelte").Component<RatingGroupItemProps, {}, "">;
26
26
  type Item = ReturnType<typeof Item>;
27
27
  export default Item;
28
+ //# sourceMappingURL=item.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/anatomy/item.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,oBAAqB,SAAQ,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,IAAI,GAAG,KAAK,CAAC;IACtH;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAMF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAoEtC,QAAA,MAAM,IAAI,0DAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
@@ -1,26 +1,33 @@
1
1
  <script lang="ts" module>
2
- import type { HTMLAttributes } from 'svelte/elements';
2
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
3
3
  import type { PropsWithElement } from '../../../internal/props-with-element';
4
4
 
5
- export interface RatingGroupLabelProps extends PropsWithElement, Omit<HTMLAttributes<HTMLLabelElement>, 'id' | 'defaultValue' | 'dir'> {}
5
+ export interface RatingGroupLabelProps extends PropsWithElement<'label'>, HTMLAttributes<'label', 'id' | 'dir'> {}
6
6
  </script>
7
7
 
8
8
  <script lang="ts">
9
- import { mergeProps } from '@zag-js/svelte';
10
9
  import { classesRatingGroup } from '@skeletonlabs/skeleton-common';
10
+ import { mergeProps } from '@zag-js/svelte';
11
+
11
12
  import { RatingGroupRootContext } from '../modules/root-context';
12
13
 
13
14
  const props: RatingGroupLabelProps = $props();
14
15
 
15
- const rootContext = RatingGroupRootContext.consume();
16
+ const ratingGroup = RatingGroupRootContext.consume();
16
17
 
17
- const { element, children, ...restAttributes } = $derived(props);
18
+ const { element, children, ...rest } = $derived(props);
18
19
 
19
- const attributes = $derived(mergeProps(rootContext.api.getControlProps(), { class: classesRatingGroup.label }, restAttributes));
20
+ const attributes = $derived(
21
+ mergeProps(ratingGroup().getControlProps(), rest, {
22
+ class: classesRatingGroup.label,
23
+ }),
24
+ );
20
25
  </script>
21
26
 
22
27
  {#if element}
23
- {@render element({ attributes })}
28
+ {@render element(attributes)}
24
29
  {:else}
25
- <label {...attributes}>{@render children?.()}</label>
30
+ <label {...attributes}>
31
+ {@render children?.()}
32
+ </label>
26
33
  {/if}
@@ -1,7 +1,8 @@
1
- import type { HTMLAttributes } from 'svelte/elements';
1
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
2
2
  import type { PropsWithElement } from '../../../internal/props-with-element';
3
- export interface RatingGroupLabelProps extends PropsWithElement, Omit<HTMLAttributes<HTMLLabelElement>, 'id' | 'defaultValue' | 'dir'> {
3
+ export interface RatingGroupLabelProps extends PropsWithElement<'label'>, HTMLAttributes<'label', 'id' | 'dir'> {
4
4
  }
5
5
  declare const Label: import("svelte").Component<RatingGroupLabelProps, {}, "">;
6
6
  type Label = ReturnType<typeof Label>;
7
7
  export default Label;
8
+ //# sourceMappingURL=label.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/anatomy/label.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,GAAG,KAAK,CAAC;CAAG;AAuCnH,QAAA,MAAM,KAAK,2DAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
@@ -1,9 +1,10 @@
1
1
  <script lang="ts" module>
2
2
  import type { Snippet } from 'svelte';
3
- import type { RatingGroupRootContextType } from '../modules/root-context';
3
+
4
+ import type { useRatingGroup } from '../modules/use-rating-group.svelte';
4
5
 
5
6
  export interface RatingGroupRootContextProps {
6
- children: Snippet<[RatingGroupRootContextType]>;
7
+ children: Snippet<[ReturnType<typeof useRatingGroup>]>;
7
8
  }
8
9
  </script>
9
10
 
@@ -12,7 +13,9 @@
12
13
 
13
14
  const props: RatingGroupRootContextProps = $props();
14
15
 
15
- const rootContext = RatingGroupRootContext.consume();
16
+ const ratingGroup = RatingGroupRootContext.consume();
17
+
18
+ const { children } = $derived(props);
16
19
  </script>
17
20
 
18
- {@render props.children(rootContext)}
21
+ {@render children(ratingGroup)}
@@ -1,8 +1,9 @@
1
1
  import type { Snippet } from 'svelte';
2
- import type { RatingGroupRootContextType } from '../modules/root-context';
2
+ import type { useRatingGroup } from '../modules/use-rating-group.svelte';
3
3
  export interface RatingGroupRootContextProps {
4
- children: Snippet<[RatingGroupRootContextType]>;
4
+ children: Snippet<[ReturnType<typeof useRatingGroup>]>;
5
5
  }
6
6
  declare const RootContext: import("svelte").Component<RatingGroupRootContextProps, {}, "">;
7
7
  type RootContext = ReturnType<typeof RootContext>;
8
8
  export default RootContext;
9
+ //# sourceMappingURL=root-context.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-context.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/anatomy/root-context.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,WAAW,2BAA2B;IAC3C,QAAQ,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC;CACvD;AAqBF,QAAA,MAAM,WAAW,iEAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -0,0 +1,37 @@
1
+ <script lang="ts" module>
2
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
3
+ import type { PropsWithElement } from '../../../internal/props-with-element';
4
+
5
+ import type { useRatingGroup } from '../modules/use-rating-group.svelte';
6
+
7
+ export interface RatingGroupRootProviderProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
8
+ value: ReturnType<typeof useRatingGroup>;
9
+ }
10
+ </script>
11
+
12
+ <script lang="ts">
13
+ import { classesRatingGroup } from '@skeletonlabs/skeleton-common';
14
+ import { mergeProps } from '@zag-js/svelte';
15
+
16
+ import { RatingGroupRootContext } from '../modules/root-context';
17
+
18
+ const props: RatingGroupRootProviderProps = $props();
19
+
20
+ const { element, children, value: ratingGroup, ...rest } = $derived(props);
21
+
22
+ const attributes = $derived(
23
+ mergeProps(ratingGroup().getRootProps(), rest, {
24
+ class: classesRatingGroup.root,
25
+ }),
26
+ );
27
+
28
+ RatingGroupRootContext.provide(() => ratingGroup());
29
+ </script>
30
+
31
+ {#if element}
32
+ {@render element(attributes)}
33
+ {:else}
34
+ <div {...attributes}>
35
+ {@render children?.()}
36
+ </div>
37
+ {/if}
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from '../../../internal/html-attributes';
2
+ import type { PropsWithElement } from '../../../internal/props-with-element';
3
+ import type { useRatingGroup } from '../modules/use-rating-group.svelte';
4
+ export interface RatingGroupRootProviderProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
5
+ value: ReturnType<typeof useRatingGroup>;
6
+ }
7
+ declare const RootProvider: import("svelte").Component<RatingGroupRootProviderProps, {}, "">;
8
+ type RootProvider = ReturnType<typeof RootProvider>;
9
+ export default RootProvider;
10
+ //# sourceMappingURL=root-provider.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-provider.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/rating-group/anatomy/root-provider.svelte.ts"],"names":[],"mappings":"AAGC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,WAAW,4BAA6B,SAAQ,gBAAgB,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,EAAE,IAAI,GAAG,KAAK,CAAC;IACjH,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CACzC;AAuCF,QAAA,MAAM,YAAY,kEAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}