ui-ingredients 0.0.43 → 0.0.45

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. package/README.md +3 -0
  2. package/dist/accordion/create-accordion.svelte.js +3 -4
  3. package/dist/accordion/item-content.svelte +7 -11
  4. package/dist/accordion/item.svelte +2 -2
  5. package/dist/accordion/root.svelte +4 -6
  6. package/dist/avatar/create-avatar.svelte.js +3 -4
  7. package/dist/avatar/root.svelte +2 -2
  8. package/dist/carousel/create-carousel.svelte.js +3 -4
  9. package/dist/carousel/indicator.svelte +2 -2
  10. package/dist/carousel/item.svelte +2 -2
  11. package/dist/carousel/root.svelte +2 -2
  12. package/dist/checkbox/create-checkbox.svelte.js +4 -5
  13. package/dist/checkbox/root.svelte +2 -2
  14. package/dist/clipboard/create-clipboard.svelte.js +3 -4
  15. package/dist/clipboard/root.svelte +2 -2
  16. package/dist/collapsible/create-collapsible.svelte.js +3 -4
  17. package/dist/collapsible/root.svelte +2 -2
  18. package/dist/color-picker/create-color-picker.svelte.js +3 -4
  19. package/dist/color-picker/root.svelte +2 -2
  20. package/dist/combobox/create-combobox.svelte.js +4 -5
  21. package/dist/combobox/item.svelte +2 -2
  22. package/dist/combobox/root.svelte +10 -16
  23. package/dist/create-context.svelte.js +1 -9
  24. package/dist/date-picker/create-date-picker.svelte.js +2 -3
  25. package/dist/date-picker/day-table-cell.svelte +2 -2
  26. package/dist/date-picker/month-table-cell.svelte +2 -2
  27. package/dist/date-picker/root.svelte +10 -18
  28. package/dist/date-picker/year-table-cell.svelte +2 -2
  29. package/dist/dialog/backdrop.svelte +7 -12
  30. package/dist/dialog/create-dialog.svelte.js +3 -4
  31. package/dist/dialog/root.svelte +6 -12
  32. package/dist/editable/create-editable.svelte.js +4 -5
  33. package/dist/editable/root.svelte +2 -2
  34. package/dist/environment-provider/root.svelte +5 -8
  35. package/dist/field/create-field.svelte.d.ts +1 -22
  36. package/dist/field/create-field.svelte.js +9 -20
  37. package/dist/field/root.svelte +2 -2
  38. package/dist/file-upload/create-file-upload.svelte.js +4 -5
  39. package/dist/file-upload/item.svelte +2 -2
  40. package/dist/file-upload/root.svelte +2 -2
  41. package/dist/floating-panel/body.svelte +24 -0
  42. package/dist/floating-panel/body.svelte.d.ts +18 -0
  43. package/dist/floating-panel/close-trigger.svelte +27 -0
  44. package/dist/floating-panel/close-trigger.svelte.d.ts +18 -0
  45. package/dist/floating-panel/content.svelte +36 -0
  46. package/dist/floating-panel/content.svelte.d.ts +18 -0
  47. package/dist/floating-panel/context.svelte.d.ts +2 -0
  48. package/dist/floating-panel/context.svelte.js +2 -0
  49. package/dist/floating-panel/create-floating-panel.svelte.d.ts +2 -1
  50. package/dist/floating-panel/create-floating-panel.svelte.js +4 -4
  51. package/dist/floating-panel/drag-trigger.svelte +27 -0
  52. package/dist/floating-panel/drag-trigger.svelte.d.ts +18 -0
  53. package/dist/floating-panel/floating-panel.d.ts +13 -0
  54. package/dist/floating-panel/floating-panel.js +13 -0
  55. package/dist/floating-panel/header.svelte +25 -0
  56. package/dist/floating-panel/header.svelte.d.ts +18 -0
  57. package/dist/floating-panel/index.d.ts +16 -0
  58. package/dist/floating-panel/index.js +3 -0
  59. package/dist/floating-panel/maximize-trigger.svelte +28 -0
  60. package/dist/floating-panel/maximize-trigger.svelte.d.ts +18 -0
  61. package/dist/floating-panel/minimize-trigger.svelte +28 -0
  62. package/dist/floating-panel/minimize-trigger.svelte.d.ts +18 -0
  63. package/dist/floating-panel/positioner.svelte +35 -0
  64. package/dist/floating-panel/positioner.svelte.d.ts +18 -0
  65. package/dist/floating-panel/resize-trigger.svelte +36 -0
  66. package/dist/floating-panel/resize-trigger.svelte.d.ts +18 -0
  67. package/dist/floating-panel/restore-trigger.svelte +28 -0
  68. package/dist/floating-panel/restore-trigger.svelte.d.ts +18 -0
  69. package/dist/floating-panel/root.svelte +45 -0
  70. package/dist/floating-panel/root.svelte.d.ts +18 -0
  71. package/dist/floating-panel/title.svelte +25 -0
  72. package/dist/floating-panel/title.svelte.d.ts +18 -0
  73. package/dist/floating-panel/trigger.svelte +27 -0
  74. package/dist/floating-panel/trigger.svelte.d.ts +18 -0
  75. package/dist/highlight/highlight.svelte +42 -0
  76. package/dist/highlight/highlight.svelte.d.ts +18 -0
  77. package/dist/highlight/index.d.ts +1 -0
  78. package/dist/highlight/index.js +1 -0
  79. package/dist/hover-card/create-hover-card.svelte.js +3 -4
  80. package/dist/hover-card/root.svelte +6 -11
  81. package/dist/index.d.ts +3 -0
  82. package/dist/index.js +3 -0
  83. package/dist/is-object.d.ts +2 -0
  84. package/dist/is-object.js +4 -0
  85. package/dist/locale-provider/root.svelte +8 -6
  86. package/dist/menu/create-menu.svelte.js +3 -4
  87. package/dist/menu/item.svelte +2 -2
  88. package/dist/menu/option-item.svelte +2 -2
  89. package/dist/menu/root.svelte +6 -12
  90. package/dist/merge-props.js +1 -4
  91. package/dist/number-input/create-number-input.svelte.js +4 -5
  92. package/dist/number-input/root.svelte +2 -2
  93. package/dist/pagination/create-pagination.svelte.js +3 -4
  94. package/dist/pagination/root.svelte +2 -2
  95. package/dist/pin-input/create-pin-input.svelte.js +4 -5
  96. package/dist/pin-input/root.svelte +2 -2
  97. package/dist/popover/create-popover.svelte.js +3 -4
  98. package/dist/popover/root.svelte +6 -11
  99. package/dist/presence/root.svelte +7 -3
  100. package/dist/progress/create-progress.svelte.js +3 -4
  101. package/dist/progress/root.svelte +2 -2
  102. package/dist/qr-code/create-qr-code.svelte.js +3 -4
  103. package/dist/qr-code/root.svelte +2 -2
  104. package/dist/radio-group/create-radio-group.svelte.js +3 -4
  105. package/dist/radio-group/item.svelte +2 -2
  106. package/dist/radio-group/root.svelte +2 -2
  107. package/dist/rating-group/create-rating-group.svelte.js +4 -5
  108. package/dist/rating-group/root.svelte +2 -2
  109. package/dist/segment-group/create-segment-group.svelte.js +3 -4
  110. package/dist/segment-group/item.svelte +2 -2
  111. package/dist/segment-group/root.svelte +2 -2
  112. package/dist/select/create-select.svelte.js +2 -3
  113. package/dist/select/item.svelte +2 -2
  114. package/dist/select/root.svelte +11 -19
  115. package/dist/signature-pad/create-signature-pad.svelte.js +3 -4
  116. package/dist/signature-pad/root.svelte +2 -2
  117. package/dist/slider/create-slider.svelte.js +3 -4
  118. package/dist/slider/root.svelte +2 -2
  119. package/dist/slider/thumb.svelte +2 -2
  120. package/dist/splitter/create-splitter.svelte.js +3 -4
  121. package/dist/splitter/panel.svelte +2 -2
  122. package/dist/splitter/resize-trigger.svelte +2 -2
  123. package/dist/splitter/root.svelte +2 -2
  124. package/dist/steps/create-steps.svelte.js +3 -4
  125. package/dist/steps/item.svelte +2 -2
  126. package/dist/steps/root.svelte +2 -2
  127. package/dist/switch/create-switch.svelte.js +4 -5
  128. package/dist/switch/root.svelte +2 -2
  129. package/dist/tabs/content.svelte +2 -2
  130. package/dist/tabs/create-tabs.svelte.js +3 -4
  131. package/dist/tabs/root.svelte +2 -2
  132. package/dist/tabs/trigger.svelte +2 -2
  133. package/dist/tags-input/create-tags-input.svelte.js +4 -5
  134. package/dist/tags-input/item.svelte +2 -2
  135. package/dist/tags-input/root.svelte +2 -2
  136. package/dist/time-picker/create-time-picker.svelte.js +3 -4
  137. package/dist/time-picker/root.svelte +11 -21
  138. package/dist/timer/create-timer.svelte.js +3 -4
  139. package/dist/timer/item.svelte +2 -2
  140. package/dist/timer/root.svelte +2 -2
  141. package/dist/toast/create-toast.svelte.js +1 -2
  142. package/dist/toast/create-toaster.svelte.js +2 -3
  143. package/dist/toggle-group/create-toggle-group.svelte.js +3 -4
  144. package/dist/toggle-group/item.svelte +2 -2
  145. package/dist/toggle-group/root.svelte +2 -2
  146. package/dist/tooltip/create-tooltip.svelte.js +3 -4
  147. package/dist/tooltip/root.svelte +6 -12
  148. package/dist/tour/arrow-tip.svelte +24 -0
  149. package/dist/tour/arrow-tip.svelte.d.ts +18 -0
  150. package/dist/tour/arrow.svelte +24 -0
  151. package/dist/tour/arrow.svelte.d.ts +18 -0
  152. package/dist/tour/close-trigger.svelte +25 -0
  153. package/dist/tour/close-trigger.svelte.d.ts +18 -0
  154. package/dist/tour/content.svelte +30 -0
  155. package/dist/tour/content.svelte.d.ts +18 -0
  156. package/dist/tour/context.svelte.d.ts +2 -0
  157. package/dist/tour/context.svelte.js +3 -0
  158. package/dist/tour/create-tour.svelte.js +4 -4
  159. package/dist/tour/description.svelte +24 -0
  160. package/dist/tour/description.svelte.d.ts +18 -0
  161. package/dist/tour/index.d.ts +17 -0
  162. package/dist/tour/index.js +3 -0
  163. package/dist/tour/next-trigger.svelte +24 -0
  164. package/dist/tour/next-trigger.svelte.d.ts +18 -0
  165. package/dist/tour/overlay.svelte +38 -0
  166. package/dist/tour/overlay.svelte.d.ts +18 -0
  167. package/dist/tour/positioner.svelte +30 -0
  168. package/dist/tour/positioner.svelte.d.ts +18 -0
  169. package/dist/tour/prev-trigger.svelte +24 -0
  170. package/dist/tour/prev-trigger.svelte.d.ts +18 -0
  171. package/dist/tour/progress-text.svelte +28 -0
  172. package/dist/tour/progress-text.svelte.d.ts +18 -0
  173. package/dist/tour/root.svelte +47 -0
  174. package/dist/tour/root.svelte.d.ts +18 -0
  175. package/dist/tour/skip-trigger.svelte +24 -0
  176. package/dist/tour/skip-trigger.svelte.d.ts +18 -0
  177. package/dist/tour/spotlight.svelte +24 -0
  178. package/dist/tour/spotlight.svelte.d.ts +18 -0
  179. package/dist/tour/title.svelte +24 -0
  180. package/dist/tour/title.svelte.d.ts +18 -0
  181. package/dist/tour/tour.d.ts +14 -0
  182. package/dist/tour/tour.js +14 -0
  183. package/dist/tree-view/branch.svelte +2 -2
  184. package/dist/tree-view/create-tree-view.svelte.js +3 -4
  185. package/dist/tree-view/item.svelte +2 -2
  186. package/dist/tree-view/root.svelte +2 -2
  187. package/dist/types.d.ts +10 -16
  188. package/package.json +2 -1
@@ -9,7 +9,7 @@ export function createNumberInput(props) {
9
9
  const locale = getLocaleContext();
10
10
  const environment = getEnvironmentContext();
11
11
  const id = uid();
12
- const context = $derived(reflect(() => ({
12
+ const context = reflect(() => ({
13
13
  ids: {
14
14
  label: field?.ids.label,
15
15
  input: field?.ids.control,
@@ -23,9 +23,9 @@ export function createNumberInput(props) {
23
23
  dir: locale?.dir,
24
24
  locale: props.locale ?? locale?.locale,
25
25
  getRootNode: environment?.getRootNode,
26
- })));
26
+ }));
27
27
  const [state, send] = useMachine(numberInput.machine(context), { context });
28
- const api = $derived(reflect(() => {
28
+ return reflect(() => {
29
29
  const o = numberInput.connect(state, send, normalizeProps);
30
30
  return {
31
31
  ...o,
@@ -36,6 +36,5 @@ export function createNumberInput(props) {
36
36
  };
37
37
  },
38
38
  };
39
- }));
40
- return api;
39
+ });
41
40
  }
@@ -21,7 +21,7 @@
21
21
 
22
22
  let {asChild, children, ...props}: NumberInputProps = $props();
23
23
 
24
- let [numberInputProps, otherProps] = $derived(
24
+ let [numberInputProps, localProps] = $derived(
25
25
  createSplitProps<CreateNumberInputProps>([
26
26
  'id',
27
27
  'ids',
@@ -54,7 +54,7 @@
54
54
  let numberInput = createNumberInput(reflect(() => numberInputProps));
55
55
 
56
56
  let mergedProps = $derived(
57
- mergeProps(otherProps, numberInput.getRootProps()),
57
+ mergeProps(localProps, numberInput.getRootProps()),
58
58
  );
59
59
 
60
60
  setNumberInputContext(numberInput);
@@ -7,13 +7,12 @@ export function createPagination(props) {
7
7
  const locale = getLocaleContext();
8
8
  const environment = getEnvironmentContext();
9
9
  const id = uid();
10
- const context = $derived(reflect(() => ({
10
+ const context = reflect(() => ({
11
11
  ...props,
12
12
  id: props.id ?? id,
13
13
  dir: locale?.dir,
14
14
  getRootNode: environment?.getRootNode,
15
- })));
15
+ }));
16
16
  const [state, send] = useMachine(pagination.machine(context), { context });
17
- const api = $derived(reflect(() => pagination.connect(state, send, normalizeProps)));
18
- return api;
17
+ return reflect(() => pagination.connect(state, send, normalizeProps));
19
18
  }
@@ -21,7 +21,7 @@
21
21
 
22
22
  let {asChild, children, ...props}: PaginationProps = $props();
23
23
 
24
- let [paginationProps, otherProps] = $derived(
24
+ let [paginationProps, localProps] = $derived(
25
25
  createSplitProps<CreatePaginationProps>([
26
26
  'id',
27
27
  'ids',
@@ -38,7 +38,7 @@
38
38
 
39
39
  let pagination = createPagination(reflect(() => paginationProps));
40
40
 
41
- let mergedProps = $derived(mergeProps(otherProps, pagination.getRootProps()));
41
+ let mergedProps = $derived(mergeProps(localProps, pagination.getRootProps()));
42
42
 
43
43
  setPaginationContext(pagination);
44
44
  </script>
@@ -9,7 +9,7 @@ export function createPinInputContext(props) {
9
9
  const locale = getLocaleContext();
10
10
  const environment = getEnvironmentContext();
11
11
  const id = uid();
12
- const context = $derived(reflect(() => ({
12
+ const context = reflect(() => ({
13
13
  ids: {
14
14
  label: field?.ids.label,
15
15
  hiddenInput: field?.ids.control,
@@ -22,9 +22,9 @@ export function createPinInputContext(props) {
22
22
  id: props.id ?? id,
23
23
  dir: locale?.dir,
24
24
  getRootNode: environment?.getRootNode,
25
- })));
25
+ }));
26
26
  const [state, send] = useMachine(pinInput.machine(context), { context });
27
- const api = $derived(reflect(() => {
27
+ return reflect(() => {
28
28
  const o = pinInput.connect(state, send, normalizeProps);
29
29
  return {
30
30
  ...o,
@@ -42,6 +42,5 @@ export function createPinInputContext(props) {
42
42
  };
43
43
  },
44
44
  };
45
- }));
46
- return api;
45
+ });
47
46
  }
@@ -21,7 +21,7 @@
21
21
 
22
22
  let {asChild, children, ...props}: PinInputProps = $props();
23
23
 
24
- let [pinInputProps, otherProps] = $derived(
24
+ let [pinInputProps, localProps] = $derived(
25
25
  createSplitProps<CreatePinInputProps>([
26
26
  'id',
27
27
  'ids',
@@ -49,7 +49,7 @@
49
49
 
50
50
  let pinInput = createPinInputContext(reflect(() => pinInputProps));
51
51
 
52
- let mergedProps = $derived(mergeProps(otherProps, pinInput.getRootProps()));
52
+ let mergedProps = $derived(mergeProps(localProps, pinInput.getRootProps()));
53
53
 
54
54
  setPinInputContext(pinInput);
55
55
  </script>
@@ -7,15 +7,14 @@ export function createPopover(props) {
7
7
  const locale = getLocaleContext();
8
8
  const environment = getEnvironmentContext();
9
9
  const id = uid();
10
- const context = $derived(reflect(() => ({
10
+ const context = reflect(() => ({
11
11
  ...props,
12
12
  id: props.id ?? id,
13
13
  dir: locale?.dir,
14
14
  open: props.defaultOpen ?? props.open,
15
15
  getRootNode: environment?.getRootNode,
16
16
  'open.controlled': props.open != null,
17
- })));
17
+ }));
18
18
  const [state, send] = useMachine(popover.machine(context), { context });
19
- const api = $derived(reflect(() => popover.connect(state, send, normalizeProps)));
20
- return api;
19
+ return reflect(() => popover.connect(state, send, normalizeProps));
21
20
  }
@@ -46,17 +46,12 @@
46
46
  );
47
47
 
48
48
  let popover = createPopover(reflect(() => popoverProps));
49
- let presence = createPresence({
50
- get present() {
51
- return popover.open;
52
- },
53
- get lazyMount() {
54
- return presenceStrategyProps.lazyMount;
55
- },
56
- get keepMounted() {
57
- return presenceStrategyProps.keepMounted;
58
- },
59
- });
49
+ let presence = createPresence(
50
+ reflect(() => ({
51
+ ...presenceStrategyProps,
52
+ present: popover.open,
53
+ })),
54
+ );
60
55
 
61
56
  setPopoverContext(popover);
62
57
  setPresenceContext(presence);
@@ -18,14 +18,18 @@
18
18
 
19
19
  let {asChild, children, ...props}: PresenceProps = $props();
20
20
 
21
- let [presenceProps, otherProps] = $derived(
22
- createSplitProps<CreatePresenceProps>(['present'])(props),
21
+ let [presenceProps, localProps] = $derived(
22
+ createSplitProps<CreatePresenceProps>([
23
+ 'present',
24
+ 'lazyMount',
25
+ 'keepMounted',
26
+ ])(props),
23
27
  );
24
28
 
25
29
  let presence = createPresence(reflect(() => presenceProps));
26
30
 
27
31
  let mergedProps = $derived(
28
- mergeProps(otherProps, presence.getPresenceProps()),
32
+ mergeProps(localProps, presence.getPresenceProps()),
29
33
  );
30
34
  </script>
31
35
 
@@ -7,13 +7,12 @@ export function createProgress(props) {
7
7
  const locale = getLocaleContext();
8
8
  const environment = getEnvironmentContext();
9
9
  const id = uid();
10
- const context = $derived(reflect(() => ({
10
+ const context = reflect(() => ({
11
11
  ...props,
12
12
  id: props.id ?? id,
13
13
  dir: locale?.dir,
14
14
  getRootNode: environment?.getRootNode,
15
- })));
15
+ }));
16
16
  const [state, send] = useMachine(progress.machine(context), { context });
17
- const api = $derived(reflect(() => progress.connect(state, send, normalizeProps)));
18
- return api;
17
+ return reflect(() => progress.connect(state, send, normalizeProps));
19
18
  }
@@ -21,7 +21,7 @@
21
21
 
22
22
  let {asChild, children, ...props}: ProgressProps = $props();
23
23
 
24
- let [progressProps, otherProps] = $derived(
24
+ let [progressProps, localProps] = $derived(
25
25
  createSplitProps<CreateProgressProps>([
26
26
  'id',
27
27
  'ids',
@@ -35,7 +35,7 @@
35
35
 
36
36
  let progress = createProgress(reflect(() => progressProps));
37
37
 
38
- let mergedProps = $derived(mergeProps(otherProps, progress.getRootProps()));
38
+ let mergedProps = $derived(mergeProps(localProps, progress.getRootProps()));
39
39
 
40
40
  setProgressContext(progress);
41
41
  </script>
@@ -7,13 +7,12 @@ export function createQRCode(props) {
7
7
  const locale = getLocaleContext();
8
8
  const environment = getEnvironmentContext();
9
9
  const id = uid();
10
- const context = $derived(reflect(() => ({
10
+ const context = reflect(() => ({
11
11
  ...props,
12
12
  id: props.id ?? id,
13
13
  dir: locale?.dir,
14
14
  getRootNode: environment?.getRootNode,
15
- })));
15
+ }));
16
16
  const [state, send] = useMachine(qrCode.machine(context), { context });
17
- const api = $derived(reflect(() => qrCode.connect(state, send, normalizeProps)));
18
- return api;
17
+ return reflect(() => qrCode.connect(state, send, normalizeProps));
19
18
  }
@@ -21,7 +21,7 @@
21
21
 
22
22
  let {asChild, children, ...props}: QrCodeProps = $props();
23
23
 
24
- let [qrCodeProps, otherProps] = $derived(
24
+ let [qrCodeProps, localProps] = $derived(
25
25
  createSplitProps<CreateQrCodeProps>(['id', 'ids', 'value', 'encoding'])(
26
26
  props,
27
27
  ),
@@ -29,7 +29,7 @@
29
29
 
30
30
  let qrCode = createQRCode(reflect(() => qrCodeProps));
31
31
 
32
- let mergedProps = $derived(mergeProps(otherProps, qrCode.getRootProps()));
32
+ let mergedProps = $derived(mergeProps(localProps, qrCode.getRootProps()));
33
33
 
34
34
  setQrCodeContext(qrCode);
35
35
  </script>
@@ -7,13 +7,12 @@ export function createRadioGroup(props) {
7
7
  const locale = getLocaleContext();
8
8
  const environment = getEnvironmentContext();
9
9
  const id = uid();
10
- const context = $derived(reflect(() => ({
10
+ const context = reflect(() => ({
11
11
  ...props,
12
12
  id: props.id ?? id,
13
13
  dir: locale?.dir,
14
14
  getRootNode: environment?.getRootNode,
15
- })));
15
+ }));
16
16
  const [state, send] = useMachine(radioGroup.machine(context), { context });
17
- const api = $derived(reflect(() => radioGroup.connect(state, send, normalizeProps)));
18
- return api;
17
+ return reflect(() => radioGroup.connect(state, send, normalizeProps));
19
18
  }
@@ -18,14 +18,14 @@
18
18
 
19
19
  let radioGroup = getRadioGroupContext();
20
20
 
21
- let [itemProps, otherProps] = $derived(
21
+ let [itemProps, localProps] = $derived(
22
22
  createSplitProps<ItemProps>(['value', 'invalid', 'disabled'])(props),
23
23
  );
24
24
 
25
25
  let itemState = $derived(radioGroup.getItemState(itemProps));
26
26
 
27
27
  let mergedProps = $derived(
28
- mergeProps(otherProps, radioGroup.getItemProps(itemProps)),
28
+ mergeProps(localProps, radioGroup.getItemProps(itemProps)),
29
29
  );
30
30
 
31
31
  setRadioGroupItemPropsContext(() => itemProps);
@@ -21,7 +21,7 @@
21
21
 
22
22
  let {asChild, children, ...props}: RadioGroupProps = $props();
23
23
 
24
- let [radioGroupProps, otherProps] = $derived(
24
+ let [radioGroupProps, localProps] = $derived(
25
25
  createSplitProps<CreateRadioGroupProps>([
26
26
  'id',
27
27
  'ids',
@@ -37,7 +37,7 @@
37
37
 
38
38
  let radioGroup = createRadioGroup(reflect(() => radioGroupProps));
39
39
 
40
- let mergedProps = $derived(mergeProps(otherProps, radioGroup.getRootProps()));
40
+ let mergedProps = $derived(mergeProps(localProps, radioGroup.getRootProps()));
41
41
 
42
42
  setRadioGroupContext(radioGroup);
43
43
  </script>
@@ -9,7 +9,7 @@ export function createRatingGroup(props) {
9
9
  const locale = getLocaleContext();
10
10
  const environment = getEnvironmentContext();
11
11
  const id = uid();
12
- const context = $derived(reflect(() => ({
12
+ const context = reflect(() => ({
13
13
  ids: {
14
14
  label: field?.ids.label,
15
15
  hiddenInput: field?.ids.control,
@@ -21,9 +21,9 @@ export function createRatingGroup(props) {
21
21
  id: props.id ?? id,
22
22
  dir: locale?.dir,
23
23
  getRootNode: environment?.getRootNode,
24
- })));
24
+ }));
25
25
  const [state, send] = useMachine(ratingGroup.machine(context), { context });
26
- const api = $derived(reflect(() => {
26
+ return reflect(() => {
27
27
  const o = ratingGroup.connect(state, send, normalizeProps);
28
28
  return {
29
29
  ...o,
@@ -34,6 +34,5 @@ export function createRatingGroup(props) {
34
34
  };
35
35
  },
36
36
  };
37
- }));
38
- return api;
37
+ });
39
38
  }
@@ -21,7 +21,7 @@
21
21
 
22
22
  let {asChild, children, ...props}: RatingGroupProps = $props();
23
23
 
24
- let [ratingGroupProps, otherProps] = $derived(
24
+ let [ratingGroupProps, localProps] = $derived(
25
25
  createSplitProps<CreateRatingGroupProps>([
26
26
  'id',
27
27
  'ids',
@@ -43,7 +43,7 @@
43
43
  let ratingGroup = createRatingGroup(reflect(() => ratingGroupProps));
44
44
 
45
45
  let mergedProps = $derived(
46
- mergeProps(otherProps, ratingGroup.getRootProps()),
46
+ mergeProps(localProps, ratingGroup.getRootProps()),
47
47
  );
48
48
 
49
49
  setRatingGroupContext(ratingGroup);
@@ -7,13 +7,12 @@ export function createSegmentGroup(props) {
7
7
  const locale = getLocaleContext();
8
8
  const environment = getEnvironmentContext();
9
9
  const id = uid();
10
- const context = $derived(reflect(() => ({
10
+ const context = reflect(() => ({
11
11
  ...props,
12
12
  id: props.id ?? id,
13
13
  dir: locale?.dir,
14
14
  getRootNode: environment?.getRootNode,
15
- })));
15
+ }));
16
16
  const [state, send] = useMachine(segmentGroup.machine(context));
17
- const api = $derived(reflect(() => segmentGroup.connect(state, send, normalizeProps)));
18
- return api;
17
+ return reflect(() => segmentGroup.connect(state, send, normalizeProps));
19
18
  }
@@ -19,14 +19,14 @@
19
19
 
20
20
  let segmentGroup = getSegmentGroupContext();
21
21
 
22
- let [itemProps, otherProps] = $derived(
22
+ let [itemProps, localProps] = $derived(
23
23
  createSplitProps<ItemProps>(['value', 'invalid', 'disabled'])(props),
24
24
  );
25
25
 
26
26
  let itemState = $derived(segmentGroup.getItemState(itemProps));
27
27
  let mergedProps = $derived(
28
28
  mergeProps(
29
- otherProps,
29
+ localProps,
30
30
  segmentGroup.getItemProps(itemProps),
31
31
  parts.item.attrs,
32
32
  ),
@@ -22,7 +22,7 @@
22
22
 
23
23
  let {asChild, children, ...props}: SegmentGroupProps = $props();
24
24
 
25
- let [segmentGroupProps, otherProps] = $derived(
25
+ let [segmentGroupProps, localProps] = $derived(
26
26
  createSplitProps<CreateSegmentGroupProps>([
27
27
  'id',
28
28
  'ids',
@@ -39,7 +39,7 @@
39
39
  let segmentGroup = createSegmentGroup(reflect(() => segmentGroupProps));
40
40
 
41
41
  let mergedProps = $derived(
42
- mergeProps(otherProps, segmentGroup.getRootProps(), parts.root.attrs),
42
+ mergeProps(localProps, segmentGroup.getRootProps(), parts.root.attrs),
43
43
  );
44
44
 
45
45
  setSegmentGroupContext(segmentGroup);
@@ -35,7 +35,7 @@ export function createSelect(props) {
35
35
  collection,
36
36
  });
37
37
  const [state, send] = useMachine(select.machine(context));
38
- const api = $derived(reflect(() => {
38
+ return reflect(() => {
39
39
  const o = select.connect(state, send, normalizeProps);
40
40
  return {
41
41
  ...o,
@@ -46,6 +46,5 @@ export function createSelect(props) {
46
46
  };
47
47
  },
48
48
  };
49
- }));
50
- return api;
49
+ });
51
50
  }
@@ -18,13 +18,13 @@
18
18
 
19
19
  let select = getSelectContext();
20
20
 
21
- let [itemProps, otherProps] = $derived(
21
+ let [itemProps, localProps] = $derived(
22
22
  createSplitProps<ItemProps>(['item', 'persistFocus'])(props),
23
23
  );
24
24
 
25
25
  let itemState = $derived(select.getItemState(itemProps));
26
26
  let mergedProps = $derived(
27
- mergeProps(otherProps, select.getItemProps(itemProps)),
27
+ mergeProps(localProps, select.getItemProps(itemProps)),
28
28
  );
29
29
 
30
30
  setSelectItemPropsContext(() => itemProps);
@@ -25,7 +25,7 @@
25
25
 
26
26
  let {asChild, children, ...props}: SelectProps<T> = $props();
27
27
 
28
- let [selectProps, otherProps] = $derived(
28
+ let [selectProps, rest] = $derived(
29
29
  createSplitProps<CreateSelectProps<T>>([
30
30
  'id',
31
31
  'ids',
@@ -58,27 +58,19 @@
58
58
  ])(props),
59
59
  );
60
60
 
61
- let select = createSelect(reflect(() => selectProps));
62
-
63
- let [presenceStrategyProps, elementProps] = $derived(
64
- createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(
65
- otherProps,
66
- ),
61
+ let [presenceStrategyProps, localProps] = $derived(
62
+ createSplitProps<PresenceStrategyProps>(['lazyMount', 'keepMounted'])(rest),
67
63
  );
68
64
 
69
- let presence = createPresence({
70
- get present() {
71
- return select.open;
72
- },
73
- get lazyMount() {
74
- return presenceStrategyProps.lazyMount;
75
- },
76
- get keepMounted() {
77
- return presenceStrategyProps.keepMounted;
78
- },
79
- });
65
+ let select = createSelect(reflect(() => selectProps));
66
+ let presence = createPresence(
67
+ reflect(() => ({
68
+ ...presenceStrategyProps,
69
+ present: select.open,
70
+ })),
71
+ );
80
72
 
81
- let mergedProps = $derived(mergeProps(elementProps, select.getRootProps()));
73
+ let mergedProps = $derived(mergeProps(localProps, select.getRootProps()));
82
74
 
83
75
  setSelectContext(select);
84
76
  setPresenceContext(presence);
@@ -7,13 +7,12 @@ export function createSignaturePad(props) {
7
7
  const locale = getLocaleContext();
8
8
  const environment = getEnvironmentContext();
9
9
  const id = uid();
10
- const context = $derived(reflect(() => ({
10
+ const context = reflect(() => ({
11
11
  ...props,
12
12
  id: props.id ?? id,
13
13
  dir: locale?.dir,
14
14
  getRootNode: environment?.getRootNode,
15
- })));
15
+ }));
16
16
  const [state, send] = useMachine(signaturePad.machine(context), { context });
17
- const api = $derived(reflect(() => signaturePad.connect(state, send, normalizeProps)));
18
- return api;
17
+ return reflect(() => signaturePad.connect(state, send, normalizeProps));
19
18
  }
@@ -21,7 +21,7 @@
21
21
 
22
22
  let {asChild, children, ...props}: SignaturePadProps = $props();
23
23
 
24
- let [signaturePadProps, otherProps] = $derived(
24
+ let [signaturePadProps, localProps] = $derived(
25
25
  createSplitProps<CreateSignaturePadProps>([
26
26
  'id',
27
27
  'ids',
@@ -39,7 +39,7 @@
39
39
  let signaturePad = createSignaturePad(reflect(() => signaturePadProps));
40
40
 
41
41
  let mergedProps = $derived(
42
- mergeProps(otherProps, signaturePad.getRootProps()),
42
+ mergeProps(localProps, signaturePad.getRootProps()),
43
43
  );
44
44
 
45
45
  setSignaturePadContext(signaturePad);
@@ -7,13 +7,12 @@ export function createSlider(props) {
7
7
  const locale = getLocaleContext();
8
8
  const environment = getEnvironmentContext();
9
9
  const id = uid();
10
- const context = $derived(reflect(() => ({
10
+ const context = reflect(() => ({
11
11
  ...props,
12
12
  id: props.id ?? id,
13
13
  dir: locale?.dir,
14
14
  getRootNode: environment?.getRootNode,
15
- })));
15
+ }));
16
16
  const [state, send] = useMachine(slider.machine(context), { context });
17
- const api = $derived(reflect(() => slider.connect(state, send, normalizeProps)));
18
- return api;
17
+ return reflect(() => slider.connect(state, send, normalizeProps));
19
18
  }
@@ -21,7 +21,7 @@
21
21
 
22
22
  let {asChild, children, ...props}: SliderProps = $props();
23
23
 
24
- let [sliderProps, otherProps] = $derived(
24
+ let [sliderProps, localProps] = $derived(
25
25
  createSplitProps<CreateSliderProps>([
26
26
  'id',
27
27
  'ids',
@@ -50,7 +50,7 @@
50
50
 
51
51
  let slider = createSlider(reflect(() => sliderProps));
52
52
 
53
- let mergedProps = $derived(mergeProps(otherProps, slider.getRootProps()));
53
+ let mergedProps = $derived(mergeProps(localProps, slider.getRootProps()));
54
54
 
55
55
  setSliderContext(slider);
56
56
  </script>
@@ -18,12 +18,12 @@
18
18
 
19
19
  let slider = getSliderContext();
20
20
 
21
- let [thumbProps, otherProps] = $derived(
21
+ let [thumbProps, localProps] = $derived(
22
22
  createSplitProps<ThumbProps>(['name', 'index'])(props),
23
23
  );
24
24
 
25
25
  let mergedProps = $derived(
26
- mergeProps(otherProps, slider.getThumbProps(thumbProps)),
26
+ mergeProps(localProps, slider.getThumbProps(thumbProps)),
27
27
  );
28
28
 
29
29
  setSliderThumbPropsContext(() => thumbProps);
@@ -6,13 +6,12 @@ import { uid } from 'uid';
6
6
  export function createSplitter(props) {
7
7
  const locale = getLocaleContext();
8
8
  const environment = getEnvironmentContext();
9
- const context = $derived(reflect(() => ({
9
+ const context = reflect(() => ({
10
10
  ...props,
11
11
  id: props.id ?? uid(),
12
12
  dir: locale?.dir,
13
13
  getRootNode: environment?.getRootNode,
14
- })));
14
+ }));
15
15
  const [state, send] = useMachine(splitter.machine(context), { context });
16
- const api = $derived(reflect(() => splitter.connect(state, send, normalizeProps)));
17
- return api;
16
+ return reflect(() => splitter.connect(state, send, normalizeProps));
18
17
  }
@@ -15,12 +15,12 @@
15
15
 
16
16
  let splitter = getSplitterContext();
17
17
 
18
- let [panelProps, otherProps] = $derived(
18
+ let [panelProps, localProps] = $derived(
19
19
  createSplitProps<PanelProps>(['id', 'snapSize'])(props),
20
20
  );
21
21
 
22
22
  let mergedProps = $derived(
23
- mergeProps(otherProps, splitter.getPanelProps(panelProps)),
23
+ mergeProps(localProps, splitter.getPanelProps(panelProps)),
24
24
  );
25
25
  </script>
26
26
 
@@ -27,14 +27,14 @@
27
27
 
28
28
  let splitter = getSplitterContext();
29
29
 
30
- let [resizeTriggerProps, otherProps] = $derived(
30
+ let [resizeTriggerProps, localProps] = $derived(
31
31
  createSplitProps<ResizeTriggerProps>(['id', 'step', 'disabled'])(props),
32
32
  );
33
33
 
34
34
  let itemState = $derived(splitter.getResizeTriggerState(resizeTriggerProps));
35
35
 
36
36
  let mergedProps = $derived(
37
- mergeProps(otherProps, splitter.getResizeTriggerProps(resizeTriggerProps)),
37
+ mergeProps(localProps, splitter.getResizeTriggerProps(resizeTriggerProps)),
38
38
  );
39
39
  </script>
40
40